@remotion/cli 4.0.0-alpha.185 → 4.0.0-alpha.217
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/ansi/ansi-split.d.ts +1 -0
- package/dist/ansi/ansi-split.js +16 -3
- package/dist/benchmark.js +3 -0
- package/dist/color-math.d.ts +2 -1
- package/dist/color-math.js +2 -3
- package/dist/composition-prompts.d.ts +3 -4
- package/dist/composition-prompts.js +0 -1
- package/dist/compositions.js +3 -0
- package/dist/config/browser.d.ts +1 -3
- package/dist/config/browser.js +2 -12
- package/dist/config/index.d.ts +11 -2
- package/dist/config/index.js +6 -1
- package/dist/config/scale.d.ts +2 -1
- package/dist/config/user-agent.d.ts +4 -0
- package/dist/config/user-agent.js +12 -0
- package/dist/download-progress.js +7 -2
- package/dist/editor/components/EditorContexts.js +2 -1
- package/dist/editor/components/Menu/MenuSubItem.d.ts +0 -1
- package/dist/editor/components/Menu/MenuSubItem.js +1 -2
- package/dist/editor/components/ModalContainer.d.ts +2 -0
- package/dist/editor/components/ModalContainer.js +12 -3
- package/dist/editor/components/Modals.js +1 -1
- package/dist/editor/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/editor/components/NewComposition/InputDragger.js +2 -2
- package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/editor/components/NewComposition/NewComposition.js +8 -5
- package/dist/editor/components/NewComposition/RemInput.d.ts +2 -1
- package/dist/editor/components/NewComposition/RemInput.js +3 -2
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +0 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.js +3 -3
- package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
- package/dist/editor/components/Notifications/ServerDisconnected.d.ts +0 -4
- package/dist/editor/components/Notifications/ServerDisconnected.js +1 -2
- package/dist/editor/components/PlaybackRateSelector.d.ts +0 -2
- package/dist/editor/components/PlaybackRateSelector.js +5 -6
- package/dist/editor/components/Preview.d.ts +0 -1
- package/dist/editor/components/Preview.js +4 -4
- package/dist/editor/components/PreviewToolbar.js +1 -1
- package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/editor/components/QuickSwitcher/algolia-search.d.ts +0 -27
- package/dist/editor/components/QuickSwitcher/algolia-search.js +2 -3
- package/dist/editor/components/RenderButton.js +9 -2
- package/dist/editor/components/RenderModal/CrfSetting.js +1 -1
- package/dist/editor/components/RenderModal/EnvInput.js +1 -1
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +1 -1
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +1 -1
- package/dist/editor/components/RenderModal/NumberSetting.js +1 -1
- package/dist/editor/components/RenderModal/RenderModal.d.ts +1 -0
- package/dist/editor/components/RenderModal/RenderModal.js +20 -11
- package/dist/editor/components/RenderModal/RenderModalAudio.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalData.js +116 -13
- package/dist/editor/components/RenderModal/RenderModalInput.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +1 -2
- package/dist/editor/components/RenderModal/RenderModalPicture.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +9 -42
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +11 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +55 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +10 -5
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +17 -9
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +7 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +7 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +10 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +6 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +10 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +11 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +6 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +30 -18
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +12 -8
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
- package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +62 -57
- package/dist/editor/components/RenderModal/WarningIndicatorButton.d.ts +6 -0
- package/dist/editor/components/RenderModal/WarningIndicatorButton.js +49 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +11 -0
- package/dist/editor/components/RenderModal/get-render-modal-warnings.js +26 -0
- package/dist/editor/components/RenderModal/layout.js +0 -1
- package/dist/editor/components/RenderModal/out-name-checker.d.ts +0 -1
- package/dist/editor/components/RenderModal/out-name-checker.js +3 -3
- package/dist/editor/components/RenderQueue/actions.d.ts +0 -2
- package/dist/editor/components/RenderQueue/actions.js +10 -11
- package/dist/editor/components/RenderQueue/index.js +25 -1
- package/dist/editor/components/RenderToolbarIcon.js +25 -10
- package/dist/editor/components/SegmentedControl.d.ts +0 -5
- package/dist/editor/components/SegmentedControl.js +2 -3
- package/dist/editor/components/SizeSelector.d.ts +0 -1
- package/dist/editor/components/SizeSelector.js +3 -3
- package/dist/editor/components/Splitter/SplitterElement.js +1 -0
- package/dist/editor/components/Splitter/SplitterHandle.d.ts +0 -1
- package/dist/editor/components/Splitter/SplitterHandle.js +6 -6
- package/dist/editor/components/Tabs/index.d.ts +0 -1
- package/dist/editor/components/Tabs/index.js +3 -3
- package/dist/editor/components/Tabs/vertical.d.ts +0 -5
- package/dist/editor/components/Tabs/vertical.js +3 -17
- package/dist/editor/components/TimeValue.js +3 -4
- package/dist/editor/components/Timeline/TimelineListItem.js +9 -1
- package/dist/editor/components/Timeline/imperative-state.d.ts +0 -4
- package/dist/editor/components/Timeline/imperative-state.js +13 -13
- package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +0 -1
- package/dist/editor/components/Timeline/timeline-scroll-logic.js +5 -6
- package/dist/editor/components/ZoomPersistor.d.ts +0 -1
- package/dist/editor/components/ZoomPersistor.js +2 -3
- package/dist/editor/components/get-zod-if-possible.d.ts +10 -0
- package/dist/editor/components/get-zod-if-possible.js +79 -0
- package/dist/editor/helpers/calculate-timeline.d.ts +0 -4
- package/dist/editor/helpers/colors.d.ts +0 -1
- package/dist/editor/helpers/colors.js +3 -3
- package/dist/editor/helpers/create-folder-tree.d.ts +0 -1
- package/dist/editor/helpers/create-folder-tree.js +3 -4
- package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/editor/icons/caret.d.ts +4 -2
- package/dist/editor/icons/caret.js +17 -3
- package/dist/editor/state/keybindings.d.ts +2 -1
- package/dist/editor/state/modals.d.ts +1 -0
- package/dist/editor/state/preview-size.d.ts +0 -1
- package/dist/editor/state/preview-size.js +3 -4
- package/dist/editor/state/sidebar.d.ts +1 -1
- package/dist/editor/state/timeline-ref.d.ts +2 -1
- package/dist/editor/state/z-index.d.ts +0 -5
- package/dist/editor/state/z-index.js +8 -5
- package/dist/get-cli-options.js +1 -0
- package/dist/get-config-file-name.d.ts +0 -2
- package/dist/get-config-file-name.js +7 -7
- package/dist/index.d.ts +52 -1
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/parse-command-line.d.ts +3 -1
- package/dist/parse-command-line.js +3 -0
- package/dist/preview-server/api-types.d.ts +0 -4
- package/dist/preview-server/dev-middleware/middleware.d.ts +0 -1
- package/dist/preview-server/dev-middleware/middleware.js +1 -2
- package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +8 -5
- package/dist/preview-server/error-overlay/remotion-overlay/Button.js +5 -4
- package/dist/preview-server/hot-middleware/client.js +2 -2
- package/dist/preview-server/public-folder.d.ts +0 -5
- package/dist/preview-server/public-folder.js +3 -4
- package/dist/preview-server/render-queue/job.d.ts +1 -1
- package/dist/preview-server/render-queue/make-retry-payload.js +2 -0
- package/dist/preview-server/render-queue/queue.d.ts +1 -13
- package/dist/preview-server/render-queue/queue.js +13 -9
- package/dist/progress-bar.d.ts +1 -12
- package/dist/progress-bar.js +4 -15
- package/dist/render-flows/render.js +3 -0
- package/dist/render-flows/still.js +6 -0
- package/dist/select-composition.d.ts +2 -1
- package/dist/setup-cache.d.ts +2 -14
- package/dist/setup-cache.js +6 -5
- package/package.json +10 -8
- package/dist/editor/components/CollapsedSidebarExpander.d.ts +0 -5
- package/dist/editor/components/CollapsedSidebarExpander.js +0 -40
- package/dist/editor/components/SidebarContent.d.ts +0 -5
- package/dist/editor/components/SidebarContent.js +0 -53
- package/dist/editor/icons/save.d.ts +0 -2
- package/dist/editor/icons/save.js +0 -8
package/dist/ansi/ansi-split.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.splitAnsi = void 0;
|
|
4
|
-
const
|
|
3
|
+
exports.stripAnsi = exports.splitAnsi = void 0;
|
|
4
|
+
const ansiRegex = () => {
|
|
5
|
+
const pattern = [
|
|
6
|
+
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
7
|
+
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
8
|
+
].join('|');
|
|
9
|
+
return new RegExp(pattern, 'g');
|
|
10
|
+
};
|
|
5
11
|
function splitAnsi(str) {
|
|
6
|
-
const parts = str.match(
|
|
12
|
+
const parts = str.match(ansiRegex());
|
|
7
13
|
if (!parts)
|
|
8
14
|
return [str];
|
|
9
15
|
const result = [];
|
|
@@ -29,3 +35,10 @@ function splitAnsi(str) {
|
|
|
29
35
|
return result;
|
|
30
36
|
}
|
|
31
37
|
exports.splitAnsi = splitAnsi;
|
|
38
|
+
const stripAnsi = (str) => {
|
|
39
|
+
if (typeof str !== 'string') {
|
|
40
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
|
|
41
|
+
}
|
|
42
|
+
return str.replace(ansiRegex(), '');
|
|
43
|
+
};
|
|
44
|
+
exports.stripAnsi = stripAnsi;
|
package/dist/benchmark.js
CHANGED
|
@@ -114,6 +114,9 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
114
114
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
115
115
|
bundlingStep: 0,
|
|
116
116
|
steps: 1,
|
|
117
|
+
onDirectoryCreated: (dir) => {
|
|
118
|
+
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
119
|
+
},
|
|
117
120
|
});
|
|
118
121
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
|
|
119
122
|
const puppeteerInstance = await browserInstance;
|
package/dist/color-math.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ZodColorType } from './editor/components/get-zod-if-possible';
|
|
2
|
+
export declare const colorWithNewOpacity: (color: string, opacity: number, zColor: ZodColorType) => string;
|
package/dist/color-math.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.colorWithNewOpacity = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const { r, g, b } = remotion_1.Internals.parseColor(color);
|
|
4
|
+
const colorWithNewOpacity = (color, opacity, zColor) => {
|
|
5
|
+
const { r, g, b } = zColor.ZColorInternals.parseColor(color);
|
|
7
6
|
if (opacity >= 255) {
|
|
8
7
|
return `#${r.toString(16)}${g.toString(16)}${b.toString(16)}`;
|
|
9
8
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { PromptObject } from 'prompts';
|
|
2
|
-
|
|
3
|
-
export declare type Question<V extends string = string> = PromptObject<V> & {
|
|
2
|
+
declare type Question<V extends string = string> = PromptObject<V> & {
|
|
4
3
|
optionsPerPage?: number;
|
|
5
4
|
};
|
|
6
|
-
|
|
7
|
-
export default function prompt(questions: Question): Promise<prompts.Answers<string>>;
|
|
5
|
+
declare type NamelessQuestion = Omit<Question<'value'>, 'name'>;
|
|
8
6
|
export declare function selectAsync(question: NamelessQuestion): Promise<string | string[]>;
|
|
7
|
+
export {};
|
package/dist/compositions.js
CHANGED
|
@@ -36,6 +36,9 @@ const listCompositionsCommand = async (remotionRoot, args) => {
|
|
|
36
36
|
logLevel: config_1.ConfigInternals.Logging.getLogLevel(),
|
|
37
37
|
bundlingStep: 0,
|
|
38
38
|
steps: 1,
|
|
39
|
+
onDirectoryCreated: (dir) => {
|
|
40
|
+
(0, cleanup_before_quit_1.registerCleanupJob)(() => renderer_1.RenderInternals.deleteDirectory(dir));
|
|
41
|
+
},
|
|
39
42
|
});
|
|
40
43
|
(0, cleanup_before_quit_1.registerCleanupJob)(() => cleanupBundle());
|
|
41
44
|
const compositions = await (0, renderer_1.getCompositions)(bundled, {
|
package/dist/config/browser.d.ts
CHANGED
package/dist/config/browser.js
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBrowser =
|
|
4
|
-
|
|
5
|
-
const setBrowser = (browser) => {
|
|
6
|
-
if (browser === 'chrome') {
|
|
7
|
-
process.env.PUPPETEER_PRODUCT = 'chrome';
|
|
8
|
-
}
|
|
9
|
-
if (browser === 'firefox') {
|
|
10
|
-
process.env.PUPPETEER_PRODUCT = 'firefox';
|
|
11
|
-
}
|
|
12
|
-
currentBrowser = browser;
|
|
13
|
-
};
|
|
14
|
-
exports.setBrowser = setBrowser;
|
|
3
|
+
exports.getBrowser = void 0;
|
|
4
|
+
const currentBrowser = null;
|
|
15
5
|
const getBrowser = () => {
|
|
16
6
|
return currentBrowser;
|
|
17
7
|
};
|
package/dist/config/index.d.ts
CHANGED
|
@@ -106,6 +106,11 @@ declare global {
|
|
|
106
106
|
* Default: 'swangle' in Lambda, null elsewhere.
|
|
107
107
|
*/
|
|
108
108
|
readonly setChromiumOpenGlRenderer: (renderer: 'swangle' | 'angle' | 'egl' | 'swiftshader') => void;
|
|
109
|
+
/**
|
|
110
|
+
* Set the user agent for Chrome. Only works during rendering.
|
|
111
|
+
* Default is the default user agent for Chrome
|
|
112
|
+
*/
|
|
113
|
+
readonly setChromiumUserAgent: (userAgent: string | null) => void;
|
|
109
114
|
/**
|
|
110
115
|
* Set a custom location for a .env file.
|
|
111
116
|
* Default: `.env`
|
|
@@ -120,10 +125,13 @@ declare global {
|
|
|
120
125
|
* @deprecated Renamed to `setJpegQuality`.
|
|
121
126
|
*/
|
|
122
127
|
readonly setQuality: (q: never) => void;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Separated into `setStillImageFormat()` and `setVideoImageFormat()`.
|
|
130
|
+
*/
|
|
131
|
+
readonly setImageFormat: (q: never) => void;
|
|
123
132
|
/**
|
|
124
133
|
* Set the JPEG quality for the frames.
|
|
125
134
|
* Must be between 0 and 100.
|
|
126
|
-
* Must be between 0 and 100.
|
|
127
135
|
* Default: 80
|
|
128
136
|
*/
|
|
129
137
|
readonly setJpegQuality: (q: number | undefined) => void;
|
|
@@ -243,7 +251,7 @@ export type { Concurrency, WebpackConfiguration, WebpackOverrideFn };
|
|
|
243
251
|
export declare const ConfigInternals: {
|
|
244
252
|
getRange: () => FrameRange | null;
|
|
245
253
|
getOutputCodecOrUndefined: () => CodecOrUndefined;
|
|
246
|
-
getBrowser: () =>
|
|
254
|
+
getBrowser: () => null;
|
|
247
255
|
getPixelFormat: () => "yuv420p" | "yuva420p" | "yuv422p" | "yuv444p" | "yuv420p10le" | "yuv422p10le" | "yuv444p10le" | "yuva444p10le";
|
|
248
256
|
getProResProfile: () => "4444-xq" | "4444" | "hq" | "standard" | "light" | "proxy" | undefined;
|
|
249
257
|
getShouldOverwrite: ({ defaultValue, }: {
|
|
@@ -290,4 +298,5 @@ export declare const ConfigInternals: {
|
|
|
290
298
|
getNumberOfGifLoops: () => Loop;
|
|
291
299
|
getWebpackPolling: () => number | null;
|
|
292
300
|
getShouldOpenBrowser: () => boolean;
|
|
301
|
+
getChromiumUserAgent: () => string | null;
|
|
293
302
|
};
|
package/dist/config/index.js
CHANGED
|
@@ -78,6 +78,7 @@ const prores_profile_2 = require("./prores-profile");
|
|
|
78
78
|
const public_dir_1 = require("./public-dir");
|
|
79
79
|
const scale_2 = require("./scale");
|
|
80
80
|
const timeout_2 = require("./timeout");
|
|
81
|
+
const user_agent_1 = require("./user-agent");
|
|
81
82
|
const webpack_caching_2 = require("./webpack-caching");
|
|
82
83
|
const webpack_poll_1 = require("./webpack-poll");
|
|
83
84
|
const width_1 = require("./width");
|
|
@@ -100,11 +101,15 @@ exports.Config = {
|
|
|
100
101
|
setChromiumIgnoreCertificateErrors: chromium_flags_2.setChromiumIgnoreCertificateErrors,
|
|
101
102
|
setChromiumHeadlessMode: chromium_flags_2.setChromiumHeadlessMode,
|
|
102
103
|
setChromiumOpenGlRenderer: chromium_flags_2.setChromiumOpenGlRenderer,
|
|
104
|
+
setChromiumUserAgent: user_agent_1.setChromiumUserAgent,
|
|
103
105
|
setDotEnvLocation: env_file_2.setDotEnvLocation,
|
|
104
106
|
setConcurrency: concurrency_2.setConcurrency,
|
|
105
107
|
setQuality: () => {
|
|
106
108
|
throw new Error('setQuality() has been renamed - use setJpegQuality() instead.');
|
|
107
109
|
},
|
|
110
|
+
setImageFormat: () => {
|
|
111
|
+
throw new Error('setImageFormat() has been renamed - use setVideoImageFormat() or setStillImageFormat() instead.');
|
|
112
|
+
},
|
|
108
113
|
setJpegQuality: jpeg_quality_2.setJpegQuality,
|
|
109
114
|
setStillImageFormat: image_format_1.setStillImageFormat,
|
|
110
115
|
setVideoImageFormat: image_format_1.setVideoImageFormat,
|
|
@@ -126,7 +131,6 @@ exports.Config = {
|
|
|
126
131
|
overrideHeight: height_1.overrideHeight,
|
|
127
132
|
overrideWidth: width_1.overrideWidth,
|
|
128
133
|
overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
|
|
129
|
-
// Options added after migration
|
|
130
134
|
setAudioCodec: audio_codec_1.setAudioCodec,
|
|
131
135
|
};
|
|
132
136
|
exports.ConfigInternals = {
|
|
@@ -177,4 +181,5 @@ exports.ConfigInternals = {
|
|
|
177
181
|
getNumberOfGifLoops: number_of_gif_loops_1.getNumberOfGifLoops,
|
|
178
182
|
getWebpackPolling: webpack_poll_1.getWebpackPolling,
|
|
179
183
|
getShouldOpenBrowser: open_browser_1.getShouldOpenBrowser,
|
|
184
|
+
getChromiumUserAgent: user_agent_1.getChromiumUserAgent,
|
|
180
185
|
};
|
package/dist/config/scale.d.ts
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getChromiumUserAgent = exports.setChromiumUserAgent = void 0;
|
|
4
|
+
let userAgent = null;
|
|
5
|
+
const setChromiumUserAgent = (newAgent) => {
|
|
6
|
+
userAgent = newAgent;
|
|
7
|
+
};
|
|
8
|
+
exports.setChromiumUserAgent = setChromiumUserAgent;
|
|
9
|
+
const getChromiumUserAgent = () => {
|
|
10
|
+
return userAgent;
|
|
11
|
+
};
|
|
12
|
+
exports.getChromiumUserAgent = getChromiumUserAgent;
|
|
@@ -4,6 +4,7 @@ exports.makeMultiDownloadProgress = exports.getFileSizeDownloadBar = void 0;
|
|
|
4
4
|
const format_bytes_1 = require("./format-bytes");
|
|
5
5
|
const log_1 = require("./log");
|
|
6
6
|
const make_progress_bar_1 = require("./make-progress-bar");
|
|
7
|
+
const truthy_1 = require("./truthy");
|
|
7
8
|
const getFileSizeDownloadBar = (downloaded) => {
|
|
8
9
|
const desiredLength = (0, make_progress_bar_1.makeProgressBar)(0).length;
|
|
9
10
|
return `[${(0, format_bytes_1.formatBytes)(downloaded).padEnd(desiredLength - 2, ' ')}]`;
|
|
@@ -25,7 +26,9 @@ const makeMultiDownloadProgress = (progresses, indent) => {
|
|
|
25
26
|
? (0, make_progress_bar_1.makeProgressBar)(progress.progress)
|
|
26
27
|
: (0, exports.getFileSizeDownloadBar)(progress.downloaded),
|
|
27
28
|
`Downloading ${truncatedFileName}`,
|
|
28
|
-
]
|
|
29
|
+
]
|
|
30
|
+
.filter(truthy_1.truthy)
|
|
31
|
+
.join(' ');
|
|
29
32
|
}
|
|
30
33
|
const everyFileHasContentLength = progresses.every((p) => p.totalBytes !== null);
|
|
31
34
|
return [
|
|
@@ -36,6 +39,8 @@ const makeMultiDownloadProgress = (progresses, indent) => {
|
|
|
36
39
|
progresses.length)
|
|
37
40
|
: (0, exports.getFileSizeDownloadBar)(progresses.reduce((a, b) => a + b.downloaded, 0)),
|
|
38
41
|
`Downloading ${progresses.length} files`,
|
|
39
|
-
]
|
|
42
|
+
]
|
|
43
|
+
.filter(truthy_1.truthy)
|
|
44
|
+
.join(' ');
|
|
40
45
|
};
|
|
41
46
|
exports.makeMultiDownloadProgress = makeMultiDownloadProgress;
|
|
@@ -9,6 +9,7 @@ const keybindings_1 = require("../state/keybindings");
|
|
|
9
9
|
const preview_size_1 = require("../state/preview-size");
|
|
10
10
|
const sidebar_1 = require("../state/sidebar");
|
|
11
11
|
const CheckerboardProvider_1 = require("./CheckerboardProvider");
|
|
12
|
+
const get_zod_if_possible_1 = require("./get-zod-if-possible");
|
|
12
13
|
const MediaVolumeProvider_1 = require("./MediaVolumeProvider");
|
|
13
14
|
const ModalsProvider_1 = require("./ModalsProvider");
|
|
14
15
|
const PlayerEmitterContext_1 = require("./PlayerEmitterContext");
|
|
@@ -16,6 +17,6 @@ const context_1 = require("./RenderQueue/context");
|
|
|
16
17
|
const SetTimelineInOutProvider_1 = require("./SetTimelineInOutProvider");
|
|
17
18
|
const ZoomGesturesProvider_1 = require("./ZoomGesturesProvider");
|
|
18
19
|
const EditorContexts = ({ children }) => {
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)(client_id_1.PreviewServerConnection, { children: (0, jsx_runtime_1.jsx)(context_1.RenderQueueContextProvider, { children: (0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(CheckerboardProvider_1.CheckerboardProvider, { children: (0, jsx_runtime_1.jsx)(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeProvider, { children: (0, jsx_runtime_1.jsx)(ModalsProvider_1.ModalsProvider, { children: (0, jsx_runtime_1.jsx)(MediaVolumeProvider_1.MediaVolumeProvider, { children: (0, jsx_runtime_1.jsx)(PlayerEmitterContext_1.PlayerEmitterContext, { children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsx)(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(get_zod_if_possible_1.ZodProvider, { children: (0, jsx_runtime_1.jsx)(client_id_1.PreviewServerConnection, { children: (0, jsx_runtime_1.jsx)(context_1.RenderQueueContextProvider, { children: (0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(CheckerboardProvider_1.CheckerboardProvider, { children: (0, jsx_runtime_1.jsx)(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeProvider, { children: (0, jsx_runtime_1.jsx)(ModalsProvider_1.ModalsProvider, { children: (0, jsx_runtime_1.jsx)(MediaVolumeProvider_1.MediaVolumeProvider, { children: (0, jsx_runtime_1.jsx)(PlayerEmitterContext_1.PlayerEmitterContext, { children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsx)(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
20
21
|
};
|
|
21
22
|
exports.EditorContexts = EditorContexts;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SubMenu } from '../NewComposition/ComboBox';
|
|
3
|
-
export declare const MENU_SUBMENU_BUTTON_CLASS_NAME = "remotion-submenu-button";
|
|
4
3
|
export declare type SubMenuActivated = false | 'with-mouse' | 'without-mouse';
|
|
5
4
|
export declare const MenuSubItem: React.FC<{
|
|
6
5
|
label: React.ReactNode;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.MenuSubItem =
|
|
6
|
+
exports.MenuSubItem = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const player_1 = require("@remotion/player");
|
|
9
9
|
const react_1 = require("react");
|
|
@@ -24,7 +24,6 @@ const container = {
|
|
|
24
24
|
paddingRight: 8,
|
|
25
25
|
cursor: 'default',
|
|
26
26
|
};
|
|
27
|
-
exports.MENU_SUBMENU_BUTTON_CLASS_NAME = 'remotion-submenu-button';
|
|
28
27
|
const labelStyle = {
|
|
29
28
|
fontSize: 13,
|
|
30
29
|
overflow: 'hidden',
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModalContainer = void 0;
|
|
3
|
+
exports.ModalContainer = exports.getMaxModalHeight = exports.getMaxModalWidth = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const colors_1 = require("../helpers/colors");
|
|
6
6
|
const z_index_1 = require("../state/z-index");
|
|
7
|
+
const padding = 20;
|
|
8
|
+
const getMaxModalWidth = (width) => {
|
|
9
|
+
return `min(calc(100vw - ${padding * 2}px), calc(${width}px - ${padding * 2}px))`;
|
|
10
|
+
};
|
|
11
|
+
exports.getMaxModalWidth = getMaxModalWidth;
|
|
12
|
+
const getMaxModalHeight = (height) => {
|
|
13
|
+
return `min(calc(100vh - ${padding * 2}px), calc(${height}px - ${padding * 2}px))`;
|
|
14
|
+
};
|
|
15
|
+
exports.getMaxModalHeight = getMaxModalHeight;
|
|
7
16
|
const backgroundOverlay = {
|
|
8
17
|
backgroundColor: 'rgba(255, 255, 255, 0.2)',
|
|
9
18
|
backdropFilter: `blur(1px)`,
|
|
@@ -11,13 +20,13 @@ const backgroundOverlay = {
|
|
|
11
20
|
height: '100%',
|
|
12
21
|
width: '100%',
|
|
13
22
|
display: 'flex',
|
|
14
|
-
|
|
15
|
-
alignItems: 'center',
|
|
23
|
+
padding,
|
|
16
24
|
};
|
|
17
25
|
const panel = {
|
|
18
26
|
backgroundColor: colors_1.BACKGROUND,
|
|
19
27
|
boxShadow: '0 0 4px black',
|
|
20
28
|
color: 'white',
|
|
29
|
+
margin: 'auto',
|
|
21
30
|
};
|
|
22
31
|
const ModalContainer = ({ children, onEscape, onOutsideClick }) => {
|
|
23
32
|
return ((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onOutsideClick, onEscape: onEscape, children: (0, jsx_runtime_1.jsx)("div", { style: panel, children: children }) }) }));
|
|
@@ -16,7 +16,7 @@ const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
|
16
16
|
const Modals = () => {
|
|
17
17
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
18
18
|
const canRender = (0, react_1.useContext)(client_id_1.PreviewServerConnectionCtx).type === 'connected';
|
|
19
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModal, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors })), modalContextType &&
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && canRender && modalContextType.type === 'render' && ((0, jsx_runtime_1.jsx)(RenderModal_1.RenderModal, { initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialOutName: modalContextType.initialOutName, initialScale: modalContextType.initialScale, initialVerbose: modalContextType.initialVerbose, initialRenderType: modalContextType.initialRenderType, initialVideoCodecForAudioTab: modalContextType.initialVideoCodecForAudioTab, initialVideoCodecForVideoTab: modalContextType.initialVideoCodecForVideoTab, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialAudioCodec: modalContextType.initialAudioCodec, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, defaultProps: modalContextType.defaultProps })), modalContextType &&
|
|
20
20
|
canRender &&
|
|
21
21
|
modalContextType.type === 'render-progress' && ((0, jsx_runtime_1.jsx)(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'quick-switcher' && ((0, jsx_runtime_1.jsx)(QuickSwitcher_1.default, { invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode }))] }));
|
|
22
22
|
};
|
|
@@ -6,6 +6,7 @@ declare type Props = InputHTMLAttributes<HTMLInputElement> & {
|
|
|
6
6
|
onTextChange: (newVal: string) => void;
|
|
7
7
|
status: RemInputStatus;
|
|
8
8
|
formatter?: (str: number | string) => string;
|
|
9
|
+
rightAlign: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const InputDragger: React.FC<Props>;
|
|
11
12
|
export {};
|
|
@@ -8,7 +8,7 @@ const noop_1 = require("../../helpers/noop");
|
|
|
8
8
|
const input_dragger_click_lock_1 = require("../../state/input-dragger-click-lock");
|
|
9
9
|
const z_index_1 = require("../../state/z-index");
|
|
10
10
|
const RemInput_1 = require("./RemInput");
|
|
11
|
-
const InputDragger = ({ onValueChange, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), status, ...props }) => {
|
|
11
|
+
const InputDragger = ({ onValueChange, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), status, rightAlign, ...props }) => {
|
|
12
12
|
const [inputFallback, setInputFallback] = (0, react_1.useState)(false);
|
|
13
13
|
const fallbackRef = (0, react_1.useRef)(null);
|
|
14
14
|
const style = (0, react_1.useMemo)(() => {
|
|
@@ -99,7 +99,7 @@ const InputDragger = ({ onValueChange, min: _min, max: _max, step: _step, value,
|
|
|
99
99
|
}
|
|
100
100
|
}, [inputFallback]);
|
|
101
101
|
if (inputFallback) {
|
|
102
|
-
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, min: _min, step: _step, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', ...props }) }));
|
|
102
|
+
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, min: _min, step: _step, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', rightAlign: rightAlign, ...props }) }));
|
|
103
103
|
}
|
|
104
104
|
return ((0, jsx_runtime_1.jsx)("button", { type: "button", style: style, onClick: onClick, onPointerDown: onPointerDown, children: (0, jsx_runtime_1.jsx)("span", { style: span, children: formatter(value) }) }));
|
|
105
105
|
};
|
|
@@ -18,6 +18,6 @@ const NewCompDuration = ({ durationInFrames, setDurationInFrames, fps }) => {
|
|
|
18
18
|
const compDurationErrMessage = (0, validate_new_comp_data_1.validateCompositionDuration)(durationInFrames);
|
|
19
19
|
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: " Duration in frames" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: durationInFrames, onTextChange: onDurationInFramesChanged, placeholder: "Duration (frames)", name: "durationInFrames", min: 1, step: 1, required: true, status: "ok",
|
|
20
20
|
// Hitting Promise.all() limit in Chrome
|
|
21
|
-
max: 300000, onValueChange: onDurationChangedDirectly }), compDurationErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compDurationErrMessage, type: "error" })] })) : null] }), (0, jsx_runtime_1.jsxs)("span", { style: new_comp_layout_1.rightLabel, children: [(Number(durationInFrames) / Number(fps)).toFixed(2), "sec"] })] }) }) }));
|
|
21
|
+
max: 300000, onValueChange: onDurationChangedDirectly, rightAlign: false }), compDurationErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compDurationErrMessage, type: "error" })] })) : null] }), (0, jsx_runtime_1.jsxs)("span", { style: new_comp_layout_1.rightLabel, children: [(Number(durationInFrames) / Number(fps)).toFixed(2), "sec"] })] }) }) }));
|
|
22
22
|
};
|
|
23
23
|
exports.NewCompDuration = NewCompDuration;
|
|
@@ -28,12 +28,12 @@ const left = {
|
|
|
28
28
|
fontSize: 13,
|
|
29
29
|
};
|
|
30
30
|
const panelRight = {
|
|
31
|
-
width: 400,
|
|
32
31
|
backgroundColor: 'black',
|
|
33
32
|
display: 'flex',
|
|
34
33
|
justifyContent: 'center',
|
|
35
34
|
alignItems: 'center',
|
|
36
35
|
position: 'relative',
|
|
36
|
+
width: 400,
|
|
37
37
|
};
|
|
38
38
|
const pre = {
|
|
39
39
|
fontSize: 17,
|
|
@@ -67,8 +67,11 @@ const NewComposition = (props) => {
|
|
|
67
67
|
return {
|
|
68
68
|
flexDirection: 'row',
|
|
69
69
|
display: 'flex',
|
|
70
|
-
width: 950,
|
|
71
|
-
height: type === 'composition'
|
|
70
|
+
width: (0, ModalContainer_1.getMaxModalWidth)(950),
|
|
71
|
+
height: type === 'composition'
|
|
72
|
+
? (0, ModalContainer_1.getMaxModalHeight)(490)
|
|
73
|
+
: (0, ModalContainer_1.getMaxModalHeight)(340),
|
|
74
|
+
overflow: 'hidden',
|
|
72
75
|
};
|
|
73
76
|
}, [type]);
|
|
74
77
|
const [lockedAspectRatio, setLockedAspectRatio] = (0, react_1.useState)((0, aspect_ratio_locked_1.loadAspectRatioOption)() ? Number(size.width) / Number(size.height) : null);
|
|
@@ -180,7 +183,7 @@ const NewComposition = (props) => {
|
|
|
180
183
|
},
|
|
181
184
|
];
|
|
182
185
|
}, [onTypeChanged]);
|
|
183
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "New composition" }), (0, jsx_runtime_1.jsxs)("div", { style: panelContent, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 3 }), (0, jsx_runtime_1.jsxs)("form", { children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Type" }), (0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.inputArea, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Name" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: name, onChange: onNameChange, type: "text", placeholder: "Composition name", status: "ok" }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Width" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (w) => `${w}px`, max: 100000000, onValueChange: onWidthDirectlyChanged }), compWidthErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compWidthErrMessage, type: "error" })] })) : null] })] }) }) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Height" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (h) => `${h}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged }), compHeightErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compHeightErrMessage, type: "error" })] })) : null] })] }) })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(NewCompAspectRatio_1.NewCompAspectRatio, { width: Number(size.width), height: Number(size.height), aspectRatioLocked: lockedAspectRatio, setAspectRatioLocked: setAspectRatioLocked }) })] }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), type === 'composition' ? ((0, jsx_runtime_1.jsx)(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, fps: selectedFrameRate, setDurationInFrames: setDurationInFrames })) : null, (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", {}), type === 'composition' ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Framerate" }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Framerate", style: comboBoxStyle, values: items, selectedId: selectedFrameRate })] })] })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: panelRight, children: [(0, jsx_runtime_1.jsx)("pre", { style: pre, children: (0, NewCompCode_1.getNewCompositionCode)({
|
|
186
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "New composition" }), (0, jsx_runtime_1.jsxs)("div", { style: panelContent, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 3 }), (0, jsx_runtime_1.jsxs)("form", { children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Type" }), (0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.inputArea, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Name" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: name, onChange: onNameChange, type: "text", placeholder: "Composition name", status: "ok", rightAlign: false }), compNameErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })] })) : null] })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Width" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (w) => `${w}px`, max: 100000000, onValueChange: onWidthDirectlyChanged, rightAlign: false }), compWidthErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compWidthErrMessage, type: "error" })] })) : null] })] }) }) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Height" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (h) => `${h}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged, rightAlign: false }), compHeightErrMessage ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compHeightErrMessage, type: "error" })] })) : null] })] }) })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(NewCompAspectRatio_1.NewCompAspectRatio, { width: Number(size.width), height: Number(size.height), aspectRatioLocked: lockedAspectRatio, setAspectRatioLocked: setAspectRatioLocked }) })] }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), type === 'composition' ? ((0, jsx_runtime_1.jsx)(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, fps: selectedFrameRate, setDurationInFrames: setDurationInFrames })) : null, (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", {}), type === 'composition' ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Framerate" }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Framerate", style: comboBoxStyle, values: items, selectedId: selectedFrameRate })] })] })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: panelRight, children: [(0, jsx_runtime_1.jsx)("pre", { style: pre, children: (0, NewCompCode_1.getNewCompositionCode)({
|
|
184
187
|
type,
|
|
185
188
|
durationInFrames: Number(durationInFrames),
|
|
186
189
|
fps: Number(selectedFrameRate),
|
|
@@ -196,6 +199,6 @@ const NewComposition = (props) => {
|
|
|
196
199
|
width: Number(size.width),
|
|
197
200
|
name,
|
|
198
201
|
raw: true,
|
|
199
|
-
}) })] })] })] })] }));
|
|
202
|
+
}) })] })] }), ' '] })] }));
|
|
200
203
|
};
|
|
201
204
|
exports.default = NewComposition;
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export declare type RemInputStatus = 'error' | 'warning' | 'ok';
|
|
4
4
|
declare type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
5
5
|
status: RemInputStatus;
|
|
6
|
+
rightAlign: boolean;
|
|
6
7
|
};
|
|
7
8
|
export declare const INPUT_HORIZONTAL_PADDING = 8;
|
|
8
9
|
export declare const RightAlignInput: React.FC<PropsWithChildren>;
|
|
@@ -12,5 +13,5 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
12
13
|
isFocused: boolean;
|
|
13
14
|
isHovered: boolean;
|
|
14
15
|
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
|
|
15
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
16
17
|
export {};
|
|
@@ -30,7 +30,7 @@ const getInputBorderColor = ({ status, isFocused, isHovered, }) => status === 'w
|
|
|
30
30
|
? colors_1.INPUT_BORDER_COLOR_HOVERED
|
|
31
31
|
: colors_1.INPUT_BORDER_COLOR_UNHOVERED;
|
|
32
32
|
exports.getInputBorderColor = getInputBorderColor;
|
|
33
|
-
const RemInputForwardRef = ({ status, ...props }, ref) => {
|
|
33
|
+
const RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
34
34
|
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
35
35
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
36
36
|
const inputRef = (0, react_1.useRef)(null);
|
|
@@ -42,9 +42,10 @@ const RemInputForwardRef = ({ status, ...props }, ref) => {
|
|
|
42
42
|
...exports.inputBaseStyle,
|
|
43
43
|
width: '100%',
|
|
44
44
|
borderColor: (0, exports.getInputBorderColor)({ isFocused, isHovered, status }),
|
|
45
|
+
textAlign: rightAlign ? 'right' : 'left',
|
|
45
46
|
...((_a = props.style) !== null && _a !== void 0 ? _a : {}),
|
|
46
47
|
};
|
|
47
|
-
}, [isFocused, isHovered, props.style, status]);
|
|
48
|
+
}, [isFocused, isHovered, rightAlign, props.style, status]);
|
|
48
49
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
49
50
|
return inputRef.current;
|
|
50
51
|
}, []);
|
|
@@ -3,6 +3,5 @@ import type { RemInputStatus } from './RemInput';
|
|
|
3
3
|
declare type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
};
|
|
6
|
-
export declare const inputBaseStyle: React.CSSProperties;
|
|
7
6
|
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "key" | "status" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
7
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RemInputTypeColor =
|
|
3
|
+
exports.RemInputTypeColor = 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");
|
|
7
7
|
const z_index_1 = require("../../state/z-index");
|
|
8
8
|
const RemInput_1 = require("./RemInput");
|
|
9
|
-
|
|
9
|
+
const inputBaseStyle = {
|
|
10
10
|
padding: 0,
|
|
11
11
|
borderStyle: 'solid',
|
|
12
12
|
borderWidth: 1,
|
|
@@ -20,7 +20,7 @@ const RemInputTypeColorForwardRef = ({ status, ...props }, ref) => {
|
|
|
20
20
|
var _a;
|
|
21
21
|
return {
|
|
22
22
|
backgroundColor: colors_1.INPUT_BACKGROUND,
|
|
23
|
-
...
|
|
23
|
+
...inputBaseStyle,
|
|
24
24
|
borderColor: (0, RemInput_1.getInputBorderColor)({ isFocused, isHovered, status }),
|
|
25
25
|
...((_a = props.style) !== null && _a !== void 0 ? _a : {}),
|
|
26
26
|
};
|
|
@@ -9,8 +9,8 @@ const WarningTriangle = (props) => {
|
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z" }) }));
|
|
10
10
|
};
|
|
11
11
|
const style = {
|
|
12
|
-
width:
|
|
13
|
-
height:
|
|
12
|
+
width: 12,
|
|
13
|
+
height: 12,
|
|
14
14
|
flexShrink: 0,
|
|
15
15
|
};
|
|
16
16
|
const container = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerDisconnected =
|
|
3
|
+
exports.ServerDisconnected = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const client_id_1 = require("../../helpers/client-id");
|
|
@@ -32,7 +32,6 @@ const inlineCode = {
|
|
|
32
32
|
fontSize: 16,
|
|
33
33
|
fontFamily: 'monospace',
|
|
34
34
|
};
|
|
35
|
-
exports.serverDisconnectedRef = (0, react_1.createRef)();
|
|
36
35
|
let pageIsGoingToReload = false;
|
|
37
36
|
window.addEventListener('beforeunload', () => {
|
|
38
37
|
pageIsGoingToReload = true;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const commonPlaybackRates: number[];
|
|
3
|
-
export declare const getPlaybackRateLabel: (playbackRate: number) => string;
|
|
4
2
|
export declare const PlaybackRateSelector: React.FC<{
|
|
5
3
|
playbackRate: number;
|
|
6
4
|
setPlaybackRate: React.Dispatch<React.SetStateAction<number>>;
|