@remotion/cli 3.3.80 → 3.3.82
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 +57 -11
- package/dist/config/jpeg-quality.d.ts +2 -0
- package/dist/config/jpeg-quality.js +17 -0
- package/dist/editor/components/CheckerboardContext.d.ts +0 -0
- package/dist/editor/components/CheckerboardContext.js +1 -0
- package/dist/editor/components/CheckerboardProvider.d.ts +4 -0
- package/dist/editor/components/CheckerboardProvider.js +24 -0
- package/dist/editor/components/CurrentCompositionSideEffects.js +0 -1
- package/dist/editor/components/InlineAction.js +1 -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/RemTextarea.js +4 -2
- package/dist/editor/components/PlayerEmitterContext.d.ts +4 -0
- package/dist/editor/components/PlayerEmitterContext.js +11 -0
- package/dist/editor/components/RenderButton.js +2 -2
- package/dist/editor/components/RenderModal/EnvInput.d.ts +1 -0
- package/dist/editor/components/RenderModal/EnvInput.js +22 -2
- package/dist/editor/components/RenderModal/InfoTooltip.js +2 -1
- package/dist/editor/components/RenderModal/InlineEyeIcon.js +3 -27
- package/dist/editor/components/RenderModal/InlineRemoveButton.js +0 -2
- 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 +50 -15
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +6 -1
- package/dist/editor/components/RenderModal/RenderModalAudio.js +4 -1
- package/dist/editor/components/RenderModal/RenderModalBasic.js +4 -1
- package/dist/editor/components/RenderModal/RenderModalData.d.ts +1 -2
- package/dist/editor/components/RenderModal/RenderModalData.js +28 -6
- package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +8 -5
- package/dist/editor/components/RenderModal/RenderModalGif.js +4 -1
- package/dist/editor/components/RenderModal/RenderModalInput.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +2 -0
- package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +14 -3
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +3 -3
- package/dist/editor/components/RenderModal/RenderModalPicture.js +5 -2
- package/dist/editor/components/RenderModal/RenderStatusModal.js +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +41 -5
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +15 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -4
- package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +12 -3
- package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +2 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +14 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +68 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +6 -2
- package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +4 -1
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullEditor.d.ts +15 -0
- package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullEditor.js +45 -0
- 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 +10 -1
- 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 +150 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.d.ts +2 -0
- package/dist/editor/components/RenderModal/SchemaEditor/schema-serialization.js +21 -0
- package/dist/editor/components/RenderModal/layout.js +0 -1
- package/dist/editor/components/RenderModal/out-name-checker.js +2 -1
- package/dist/editor/components/RenderQueue/actions.d.ts +5 -4
- package/dist/editor/components/RenderQueue/actions.js +11 -5
- package/dist/editor/components/RenderQueue/context.d.ts +0 -1
- package/dist/editor/components/RenderQueue/context.js +1 -8
- package/dist/editor/components/RenderQueue/index.js +1 -0
- package/dist/editor/components/RenderToolbarIcon.d.ts +1 -1
- package/dist/editor/components/RenderToolbarIcon.js +6 -6
- package/dist/editor/components/RendersTab.js +1 -1
- package/dist/editor/components/RightPanel.d.ts +6 -0
- package/dist/editor/components/RightPanel.js +42 -4
- 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 +51 -0
- package/dist/editor/components/Tabs/index.js +1 -1
- package/dist/editor/components/ZoomGesturesProvider.d.ts +4 -0
- package/dist/editor/components/ZoomGesturesProvider.js +24 -0
- package/dist/editor/helpers/convert-env-variables.js +2 -2
- package/dist/editor/helpers/use-breakpoint.d.ts +1 -0
- package/dist/editor/helpers/use-breakpoint.js +17 -0
- package/dist/editor/icons/render.d.ts +3 -0
- package/dist/editor/icons/render.js +6 -2
- 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/render-queue/queue.js +1 -0
- package/dist/preview-server/routes/add-render.js +2 -2
- package/dist/preview-server/routes/can-update-default-props.d.ts +0 -0
- package/dist/preview-server/routes/can-update-default-props.js +1 -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 +4 -8
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +2 -5
- package/package.json +6 -6
- package/dist/editor/icons/save.d.ts +0 -2
- package/dist/editor/icons/save.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudrunCommand: (remotionRoot: string, args: string[]) => Promise<never>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cloudrunCommand = void 0;
|
|
4
|
+
const log_1 = require("./log");
|
|
5
|
+
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
6
|
+
const update_available_1 = require("./preview-server/update-available");
|
|
7
|
+
const cloudrunCommand = async (remotionRoot, args) => {
|
|
8
|
+
try {
|
|
9
|
+
const path = require.resolve('@remotion/cloudrun', {
|
|
10
|
+
paths: [remotionRoot],
|
|
11
|
+
});
|
|
12
|
+
const { CloudrunInternals } = require(path);
|
|
13
|
+
await CloudrunInternals.executeCommand(args, remotionRoot);
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot, undefined);
|
|
18
|
+
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
19
|
+
log_1.Log.error(err);
|
|
20
|
+
log_1.Log.error('Remotion CloudRun is not installed.');
|
|
21
|
+
log_1.Log.info('');
|
|
22
|
+
log_1.Log.info('You can install it using:');
|
|
23
|
+
log_1.Log.info(`${installCommand} @remotion/cloudrun@${(0, update_available_1.getRemotionVersion)()}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.cloudrunCommand = cloudrunCommand;
|
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.updateDefaultProps = void 0;
|
|
4
|
-
const prettier_1 = require("prettier");
|
|
5
27
|
const findStarter = ({ input, compositionId, }) => {
|
|
6
28
|
const format1 = input.indexOf(`id="${compositionId}"`);
|
|
7
29
|
if (format1 > -1) {
|
|
@@ -25,13 +47,24 @@ const findStarter = ({ input, compositionId, }) => {
|
|
|
25
47
|
}
|
|
26
48
|
throw new Error(`Could not find composition ID ${compositionId} in file`);
|
|
27
49
|
};
|
|
50
|
+
const findEndPosition = (input, currentPosition) => {
|
|
51
|
+
const asConstVersion = input
|
|
52
|
+
.slice(currentPosition + 1)
|
|
53
|
+
.search(/as\sconst[ \t\n\r]+\}/);
|
|
54
|
+
if (asConstVersion !== -1) {
|
|
55
|
+
const nextEnd = input.indexOf('}', asConstVersion + currentPosition + 1);
|
|
56
|
+
return nextEnd - 1;
|
|
57
|
+
}
|
|
58
|
+
const next = input.indexOf('}}', currentPosition + 1);
|
|
59
|
+
if (next !== -1) {
|
|
60
|
+
return next;
|
|
61
|
+
}
|
|
62
|
+
throw new Error('Could not find end of defaultProps');
|
|
63
|
+
};
|
|
28
64
|
const findEnder = (input, position, maxPosition) => {
|
|
29
65
|
let currentPosition = position;
|
|
30
66
|
while (currentPosition < maxPosition) {
|
|
31
|
-
const next = input
|
|
32
|
-
if (next === -1) {
|
|
33
|
-
throw new Error('Could not find end of defaultProps');
|
|
34
|
-
}
|
|
67
|
+
const next = findEndPosition(input, currentPosition);
|
|
35
68
|
currentPosition = next;
|
|
36
69
|
const nextChar = input[next + 1];
|
|
37
70
|
if (nextChar === ',') {
|
|
@@ -58,14 +91,17 @@ const stringifyDefaultProps = (props) => {
|
|
|
58
91
|
if (this[key] instanceof Date) {
|
|
59
92
|
return `__REMOVEQUOTE__new Date('${new Date(this[key]).toISOString()}')__REMOVEQUOTE__`;
|
|
60
93
|
}
|
|
94
|
+
if (typeof this[key] === 'string') {
|
|
95
|
+
return `${this[key]}__ADD_AS_CONST__`;
|
|
96
|
+
}
|
|
61
97
|
return value;
|
|
62
98
|
})
|
|
63
|
-
.replace(
|
|
64
|
-
.replace(
|
|
99
|
+
.replace(/"__REMOVEQUOTE__/g, '')
|
|
100
|
+
.replace(/__REMOVEQUOTE__"/g, '')
|
|
101
|
+
.replace(/__ADD_AS_CONST__"/g, '" as const');
|
|
65
102
|
};
|
|
66
103
|
// TODO: Add more sanity checks
|
|
67
104
|
// TODO: better error messages
|
|
68
|
-
// TODO: throw if prettier was not found
|
|
69
105
|
const updateDefaultProps = async ({ input, compositionId, newDefaultProps, }) => {
|
|
70
106
|
const starter = findStarter({ input, compositionId });
|
|
71
107
|
const START_TOKEN = 'defaultProps={';
|
|
@@ -75,23 +111,33 @@ const updateDefaultProps = async ({ input, compositionId, newDefaultProps, }) =>
|
|
|
75
111
|
}
|
|
76
112
|
const maxEnd = findTerminators(input, starter);
|
|
77
113
|
const [startPos, endPos] = findEnder(input, start + START_TOKEN.length, maxEnd);
|
|
114
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
115
|
+
let prettier = null;
|
|
116
|
+
try {
|
|
117
|
+
prettier = await Promise.resolve().then(() => __importStar(require('prettier')));
|
|
118
|
+
}
|
|
119
|
+
catch (err) {
|
|
120
|
+
throw new Error('Cannot save default props because Prettier cannot be found in the current project.');
|
|
121
|
+
}
|
|
122
|
+
const { format, resolveConfig, resolveConfigFile } = prettier;
|
|
78
123
|
const newFile = input.substring(0, startPos) +
|
|
79
124
|
stringifyDefaultProps(newDefaultProps) +
|
|
80
125
|
input.substring(endPos);
|
|
81
|
-
const configFilePath = await
|
|
126
|
+
const configFilePath = await resolveConfigFile();
|
|
82
127
|
if (!configFilePath) {
|
|
83
128
|
throw new Error('prettier config file not found');
|
|
84
129
|
}
|
|
85
|
-
const prettierConfig = await
|
|
130
|
+
const prettierConfig = await resolveConfig(configFilePath);
|
|
86
131
|
if (!prettierConfig) {
|
|
87
132
|
throw new Error('Prettier config not found');
|
|
88
133
|
}
|
|
89
|
-
const prettified =
|
|
134
|
+
const prettified = format(newFile, {
|
|
90
135
|
...prettierConfig,
|
|
91
136
|
rangeStart: startPos,
|
|
92
137
|
rangeEnd: endPos,
|
|
93
138
|
filepath: 'test.tsx',
|
|
94
139
|
plugins: [],
|
|
140
|
+
endOfLine: 'auto',
|
|
95
141
|
});
|
|
96
142
|
return prettified;
|
|
97
143
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getJpegQuality = exports.setJpegQuality = void 0;
|
|
4
|
+
const renderer_1 = require("@remotion/renderer");
|
|
5
|
+
const defaultValue = undefined;
|
|
6
|
+
let quality = defaultValue;
|
|
7
|
+
const setJpegQuality = (q) => {
|
|
8
|
+
renderer_1.RenderInternals.validateJpegQuality(q);
|
|
9
|
+
if (q === 0 || q === undefined) {
|
|
10
|
+
quality = defaultValue;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
quality = q;
|
|
14
|
+
};
|
|
15
|
+
exports.setJpegQuality = setJpegQuality;
|
|
16
|
+
const getJpegQuality = () => quality;
|
|
17
|
+
exports.getJpegQuality = getJpegQuality;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CheckerboardProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const checkerboard_1 = require("../state/checkerboard");
|
|
7
|
+
const CheckerboardProvider = ({ children }) => {
|
|
8
|
+
const [checkerboard, setCheckerboardState] = (0, react_1.useState)(() => (0, checkerboard_1.loadCheckerboardOption)());
|
|
9
|
+
const setCheckerboard = (0, react_1.useCallback)((newValue) => {
|
|
10
|
+
setCheckerboardState((prevState) => {
|
|
11
|
+
const newVal = newValue(prevState);
|
|
12
|
+
(0, checkerboard_1.persistCheckerboardOption)(newVal);
|
|
13
|
+
return newVal;
|
|
14
|
+
});
|
|
15
|
+
}, []);
|
|
16
|
+
const checkerboardCtx = (0, react_1.useMemo)(() => {
|
|
17
|
+
return {
|
|
18
|
+
checkerboard,
|
|
19
|
+
setCheckerboard,
|
|
20
|
+
};
|
|
21
|
+
}, [checkerboard, setCheckerboard]);
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: children }));
|
|
23
|
+
};
|
|
24
|
+
exports.CheckerboardProvider = CheckerboardProvider;
|
|
@@ -33,7 +33,6 @@ const CurrentCompositionKeybindings = () => {
|
|
|
33
33
|
const renderButton = document.getElementById('render-modal-button');
|
|
34
34
|
renderButton.click();
|
|
35
35
|
}, [type, video]);
|
|
36
|
-
// TODO: Does not work if the left sidebar is collapsed
|
|
37
36
|
(0, react_1.useEffect)(() => {
|
|
38
37
|
const binding = keybindings.registerKeybinding({
|
|
39
38
|
event: 'keydown',
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MediaVolumeProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const mute_1 = require("../state/mute");
|
|
8
|
+
const MediaVolumeProvider = ({ children }) => {
|
|
9
|
+
const [mediaMuted, setMediaMuted] = (0, react_1.useState)(() => (0, mute_1.loadMuteOption)());
|
|
10
|
+
const [mediaVolume, setMediaVolume] = (0, react_1.useState)(1);
|
|
11
|
+
const mediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
12
|
+
return {
|
|
13
|
+
mediaMuted,
|
|
14
|
+
mediaVolume,
|
|
15
|
+
};
|
|
16
|
+
}, [mediaMuted, mediaVolume]);
|
|
17
|
+
const setMediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
18
|
+
return {
|
|
19
|
+
setMediaMuted,
|
|
20
|
+
setMediaVolume,
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: children }) }));
|
|
24
|
+
};
|
|
25
|
+
exports.MediaVolumeProvider = MediaVolumeProvider;
|
|
@@ -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,
|
|
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 &&
|
|
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
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ModalsProvider = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const modals_1 = require("../state/modals");
|
|
7
|
+
const ModalsProvider = ({ children }) => {
|
|
8
|
+
const [modalContextType, setModalContextType] = (0, react_1.useState)(null);
|
|
9
|
+
const modalsContext = (0, react_1.useMemo)(() => {
|
|
10
|
+
return {
|
|
11
|
+
selectedModal: modalContextType,
|
|
12
|
+
setSelectedModal: setModalContextType,
|
|
13
|
+
};
|
|
14
|
+
}, [modalContextType]);
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: children }));
|
|
16
|
+
};
|
|
17
|
+
exports.ModalsProvider = ModalsProvider;
|
|
@@ -5,6 +5,7 @@ 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
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
8
9
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
9
10
|
exports.inputBaseStyle = {
|
|
10
11
|
padding: `${RemInput_1.INPUT_HORIZONTAL_PADDING}px 10px`,
|
|
@@ -12,7 +13,8 @@ exports.inputBaseStyle = {
|
|
|
12
13
|
borderStyle: 'solid',
|
|
13
14
|
borderWidth: 1,
|
|
14
15
|
fontSize: 14,
|
|
15
|
-
resize: '
|
|
16
|
+
resize: 'none',
|
|
17
|
+
overflowX: 'hidden',
|
|
16
18
|
};
|
|
17
19
|
const RemTextareaFRFunction = ({ status, ...props }, ref) => {
|
|
18
20
|
const [isFocused, setIsFocused] = (0, react_1.useState)(false);
|
|
@@ -85,6 +87,6 @@ const RemTextareaFRFunction = ({ status, ...props }, ref) => {
|
|
|
85
87
|
current.removeEventListener('keydown', onKeyDown);
|
|
86
88
|
};
|
|
87
89
|
}, [inputRef]);
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)("textarea", { ref: inputRef, tabIndex: tabIndex, ...props, style: style }));
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)("textarea", { ref: inputRef, tabIndex: tabIndex, ...props, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, style: style }));
|
|
89
91
|
};
|
|
90
92
|
exports.RemTextarea = (0, react_1.forwardRef)(RemTextareaFRFunction);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlayerEmitterContext = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const player_1 = require("@remotion/player");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const PlayerEmitterContext = ({ children }) => {
|
|
8
|
+
const [emitter] = (0, react_1.useState)(() => new player_1.PlayerInternals.PlayerEmitter());
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: children }));
|
|
10
|
+
};
|
|
11
|
+
exports.PlayerEmitterContext = PlayerEmitterContext;
|
|
@@ -34,7 +34,7 @@ const RenderButton = ({ composition, visible }) => {
|
|
|
34
34
|
initialFrame: 0,
|
|
35
35
|
initialVideoImageFormat: defaults.videoImageFormat,
|
|
36
36
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
37
|
-
|
|
37
|
+
initialJpegQuality: defaults.jpegQuality,
|
|
38
38
|
initialScale: defaults.scale,
|
|
39
39
|
initialVerbose: defaults.logLevel === 'verbose',
|
|
40
40
|
initialOutName: (0, get_default_out_name_1.getDefaultOutLocation)({
|
|
@@ -68,6 +68,6 @@ const RenderButton = ({ composition, visible }) => {
|
|
|
68
68
|
if (!visible) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
-
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: (0, jsx_runtime_1.jsx)(render_1.
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: (0, jsx_runtime_1.jsx)(render_1.ThinRenderIcon, { svgProps: iconStyle }) }));
|
|
72
72
|
};
|
|
73
73
|
exports.RenderButton = RenderButton;
|
|
@@ -28,6 +28,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const layout_1 = require("../layout");
|
|
30
30
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
31
|
+
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
31
32
|
const InlineEyeIcon_1 = require("./InlineEyeIcon");
|
|
32
33
|
const InlineRemoveButton_1 = require("./InlineRemoveButton");
|
|
33
34
|
const layout_2 = require("./layout");
|
|
@@ -35,8 +36,20 @@ const input = {
|
|
|
35
36
|
flex: 1,
|
|
36
37
|
width: '100%',
|
|
37
38
|
};
|
|
38
|
-
const
|
|
39
|
+
const validationStyle = {
|
|
40
|
+
paddingLeft: layout_2.optionRow.paddingLeft,
|
|
41
|
+
paddingRight: layout_2.optionRow.paddingRight,
|
|
42
|
+
};
|
|
43
|
+
const EnvInput = ({ onEnvKeyChange, onEnvValChange, envKey, envVal, onDelete, index, autoFocus, isDuplicate, }) => {
|
|
39
44
|
const [showInPlainText, setShowInPlainText] = react_1.default.useState(false);
|
|
45
|
+
const [initialWarningKeyMissing, setKeyWarningEligible] = react_1.default.useState(() => {
|
|
46
|
+
return envKey.trim() === '' && envVal.trim() !== '';
|
|
47
|
+
});
|
|
48
|
+
const [initialWarningValMissing, setValueWarningEligible] = react_1.default.useState(() => {
|
|
49
|
+
return envKey.trim() !== '' && envVal.trim() === '';
|
|
50
|
+
});
|
|
51
|
+
const isKeyMissing = envKey.trim() === '' && initialWarningKeyMissing && envVal.trim() !== '';
|
|
52
|
+
const isValMissing = envVal.trim() === '' && initialWarningValMissing && envKey.trim() !== '';
|
|
40
53
|
const handleDelete = (0, react_1.useCallback)(() => {
|
|
41
54
|
onDelete(index);
|
|
42
55
|
}, [index, onDelete]);
|
|
@@ -49,6 +62,13 @@ const EnvInput = ({ onEnvKeyChange, onEnvValChange, envKey, envVal, onDelete, in
|
|
|
49
62
|
const handleValueChange = (0, react_1.useCallback)((e) => {
|
|
50
63
|
onEnvValChange(index, e.target.value);
|
|
51
64
|
}, [index, onEnvValChange]);
|
|
52
|
-
|
|
65
|
+
const makeKeyWarningEligible = (0, react_1.useCallback)(() => {
|
|
66
|
+
setKeyWarningEligible(true);
|
|
67
|
+
}, []);
|
|
68
|
+
const makeValueWarningEligible = (0, react_1.useCallback)(() => {
|
|
69
|
+
setValueWarningEligible(true);
|
|
70
|
+
}, []);
|
|
71
|
+
const isNodeEnvKey = envKey.trim() === 'NODE_ENV';
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isNodeEnvKey || isDuplicate || isKeyMissing ? 'warning' : 'ok', type: "text", placeholder: "Key", style: input, value: envKey, onBlur: makeKeyWarningEligible, autoFocus: autoFocus, onChange: handleKeyChange }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: isValMissing ? 'warning' : 'ok', placeholder: "Value", type: showInPlainText ? 'text' : 'password', style: input, value: envVal, onBlur: makeValueWarningEligible, onChange: handleValueChange }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1.5 }), (0, jsx_runtime_1.jsx)(InlineEyeIcon_1.InlineEyeButton, { enabled: !showInPlainText, onClick: togglePlainText }), (0, jsx_runtime_1.jsx)(InlineRemoveButton_1.InlineRemoveButton, { onClick: handleDelete })] }), isNodeEnvKey ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "NODE_ENV will be overwritten by Remotion during the render process." }) })) : null, isDuplicate ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: `${envKey.toUpperCase()} is already defined.` }) })) : null, isKeyMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Key is missing." }) })) : null, isValMissing ? ((0, jsx_runtime_1.jsx)("div", { style: validationStyle, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "Value is missing." }) })) : null] }));
|
|
53
73
|
};
|
|
54
74
|
exports.EnvInput = EnvInput;
|
|
@@ -4,6 +4,7 @@ exports.InfoTooltip = 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
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
7
8
|
const styles_1 = require("../Menu/styles");
|
|
8
9
|
const arrow = {
|
|
9
10
|
height: 7,
|
|
@@ -34,6 +35,6 @@ const InfoTooltip = ({ children, arrowDirection }) => {
|
|
|
34
35
|
display: 'flex',
|
|
35
36
|
flexDirection: arrowDirection === 'up' ? 'column-reverse' : 'column',
|
|
36
37
|
alignItems: 'flex-start',
|
|
37
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { style: container, className:
|
|
38
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: children }), arrowDirection === 'down' ? ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 14 7", style: arrowDown, children: (0, jsx_runtime_1.jsx)("path", { d: `M 14 0 L 7 7 L 0 0`, fill: colors_1.BACKGROUND, strokeLinecap: "butt", stroke: colors_1.BORDER_COLOR, strokeWidth: 0.5 }) })) : null, arrowDirection === 'up' ? ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 14 7", style: arrowUp, children: (0, jsx_runtime_1.jsx)("path", { d: `M 0 7 L 7 0 L 14 7`, fill: colors_1.BACKGROUND, strokeLinecap: "butt", stroke: colors_1.BORDER_COLOR, strokeWidth: 0.5 }) })) : null] }));
|
|
38
39
|
};
|
|
39
40
|
exports.InfoTooltip = InfoTooltip;
|
|
@@ -2,37 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InlineEyeButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
5
|
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const InlineAction_1 = require("../InlineAction");
|
|
7
7
|
const clearIcon = {
|
|
8
|
-
height:
|
|
8
|
+
height: 14,
|
|
9
9
|
color: colors_1.LIGHT_TEXT,
|
|
10
10
|
};
|
|
11
11
|
const InlineEyeButton = ({ onClick, enabled }) => {
|
|
12
|
-
|
|
13
|
-
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
14
|
-
setHovered(true);
|
|
15
|
-
}, []);
|
|
16
|
-
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
17
|
-
setHovered(false);
|
|
18
|
-
}, []);
|
|
19
|
-
const handleClick = (0, react_1.useCallback)((e) => {
|
|
20
|
-
e.preventDefault();
|
|
21
|
-
onClick();
|
|
22
|
-
}, [onClick]);
|
|
23
|
-
const color = hovered ? 'white' : colors_1.LIGHT_TEXT;
|
|
24
|
-
const style = (0, react_1.useMemo)(() => {
|
|
25
|
-
return {
|
|
26
|
-
display: 'inline-flex',
|
|
27
|
-
justifyContent: 'center',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
appearance: 'none',
|
|
30
|
-
padding: 0,
|
|
31
|
-
cursor: 'pointer',
|
|
32
|
-
border: 'none',
|
|
33
|
-
width: 24,
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
return ((0, jsx_runtime_1.jsx)("button", { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: style, onClick: handleClick, type: "button", children: enabled ? ((0, jsx_runtime_1.jsx)("svg", { style: clearIcon, viewBox: "0 0 640 512", children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M25.9 3.4C19-2 8.9-.8 3.4 6.1S-.8 23.1 6.1 28.6l608 480c6.9 5.5 17 4.3 22.5-2.6s4.3-17-2.6-22.5L25.9 3.4zM605.5 268.3c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-51.2 0-96 14.8-133.9 36.8l27.3 21.5C244.6 74.2 280.2 64 320 64c70.4 0 127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-9.2 22.1-25.9 52-49.5 81.5l25.1 19.8c25.6-32 43.7-64.4 53.9-89zM88.4 154.7c-25.6 32-43.7 64.4-53.9 89c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c51.2 0 96-14.8 133.9-36.8l-27.3-21.5C395.4 437.8 359.8 448 320 448c-70.4 0-127.7-32-170.8-72C106.1 336 77.3 288 64 256c9.2-22.1 25.9-52 49.5-81.5L88.4 154.7zM320 384c16.7 0 32.7-3.2 47.4-9.1l-30.9-24.4c-5.4 .9-10.9 1.4-16.5 1.4c-51 0-92.8-39.8-95.8-90.1l-30.9-24.4c-.9 6-1.3 12.2-1.3 18.5c0 70.7 57.3 128 128 128zM448 256c0-70.7-57.3-128-128-128c-16.7 0-32.7 3.2-47.4 9.1l30.9 24.4c5.4-.9 10.9-1.4 16.5-1.4c51 0 92.8 39.8 95.8 90.1l30.9 24.4c.9-6 1.3-12.2 1.3-18.5z" }) })) : ((0, jsx_runtime_1.jsx)("svg", { style: clearIcon, viewBox: "0 0 576 512", children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M117.2 136C160.3 96 217.6 64 288 64s127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-13.3 32-42.1 80-85.2 120c-43.1 40-100.4 72-170.8 72s-127.7-32-170.8-72C74.1 336 45.3 288 32 256c13.3-32 42.1-80 85.2-120zM288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM192 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z" }) })) }));
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: enabled ? ((0, jsx_runtime_1.jsx)("svg", { style: clearIcon, viewBox: "0 0 640 512", children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: "M25.9 3.4C19-2 8.9-.8 3.4 6.1S-.8 23.1 6.1 28.6l608 480c6.9 5.5 17 4.3 22.5-2.6s4.3-17-2.6-22.5L25.9 3.4zM605.5 268.3c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-51.2 0-96 14.8-133.9 36.8l27.3 21.5C244.6 74.2 280.2 64 320 64c70.4 0 127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-9.2 22.1-25.9 52-49.5 81.5l25.1 19.8c25.6-32 43.7-64.4 53.9-89zM88.4 154.7c-25.6 32-43.7 64.4-53.9 89c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c51.2 0 96-14.8 133.9-36.8l-27.3-21.5C395.4 437.8 359.8 448 320 448c-70.4 0-127.7-32-170.8-72C106.1 336 77.3 288 64 256c9.2-22.1 25.9-52 49.5-81.5L88.4 154.7zM320 384c16.7 0 32.7-3.2 47.4-9.1l-30.9-24.4c-5.4 .9-10.9 1.4-16.5 1.4c-51 0-92.8-39.8-95.8-90.1l-30.9-24.4c-.9 6-1.3 12.2-1.3 18.5c0 70.7 57.3 128 128 128zM448 256c0-70.7-57.3-128-128-128c-16.7 0-32.7 3.2-47.4 9.1l30.9 24.4c5.4-.9 10.9-1.4 16.5-1.4c51 0 92.8 39.8 95.8 90.1l30.9 24.4c.9-6 1.3-12.2 1.3-18.5z" }) })) : ((0, jsx_runtime_1.jsx)("svg", { style: clearIcon, viewBox: "0 0 576 512", children: (0, jsx_runtime_1.jsx)("path", { fill: 'currentColor', d: "M117.2 136C160.3 96 217.6 64 288 64s127.7 32 170.8 72c43.1 40 71.9 88 85.2 120c-13.3 32-42.1 80-85.2 120c-43.1 40-100.4 72-170.8 72s-127.7-32-170.8-72C74.1 336 45.3 288 32 256c13.3-32 42.1-80 85.2-120zM288 32c-80.8 0-145.5 36.8-192.6 80.6C48.6 156 17.3 208 2.5 243.7c-3.3 7.9-3.3 16.7 0 24.6C17.3 304 48.6 356 95.4 399.4C142.5 443.2 207.2 480 288 480s145.5-36.8 192.6-80.6c46.8-43.5 78.1-95.4 93-131.1c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C433.5 68.8 368.8 32 288 32zM192 256a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zm224 0a128 128 0 1 0 -256 0 128 128 0 1 0 256 0z" }) })) }));
|
|
37
13
|
};
|
|
38
14
|
exports.InlineEyeButton = InlineEyeButton;
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InlineRemoveButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const colors_1 = require("../../helpers/colors");
|
|
6
5
|
const InlineAction_1 = require("../InlineAction");
|
|
7
6
|
const clearIcon = {
|
|
8
7
|
height: 14,
|
|
9
|
-
color: colors_1.LIGHT_TEXT,
|
|
10
8
|
};
|
|
11
9
|
const InlineRemoveButton = ({ onClick }) => {
|
|
12
10
|
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: clearIcon, children: (0, jsx_runtime_1.jsx)("path", { d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z", fill: "currentcolor" }) }) }));
|
|
@@ -4,9 +4,9 @@ exports.JpegQualitySetting = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const NumberSetting_1 = require("./NumberSetting");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const JpegQualitySetting = ({
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min:
|
|
7
|
+
const MIN_JPEG_QUALITY = 1;
|
|
8
|
+
const MAX_JPEG_QUALITY = 100;
|
|
9
|
+
const JpegQualitySetting = ({ jpegQuality, setJpegQuality }) => {
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: MIN_JPEG_QUALITY, max: MAX_JPEG_QUALITY, step: 1, name: "JPEG Quality", onValueChanged: setJpegQuality, value: jpegQuality, hint: client_1.BrowserSafeApis.options.jpegQualityOption }));
|
|
11
11
|
};
|
|
12
12
|
exports.JpegQualitySetting = JpegQualitySetting;
|
|
@@ -6,7 +6,7 @@ export declare const RenderModal: React.FC<{
|
|
|
6
6
|
initialFrame: number;
|
|
7
7
|
initialVideoImageFormat: VideoImageFormat;
|
|
8
8
|
initialStillImageFormat: StillImageFormat;
|
|
9
|
-
|
|
9
|
+
initialJpegQuality: number;
|
|
10
10
|
initialScale: number;
|
|
11
11
|
initialVerbose: boolean;
|
|
12
12
|
initialOutName: string;
|