@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
|
@@ -6,8 +6,10 @@ const client_1 = require("@remotion/renderer/client");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
|
|
9
|
+
const ShortcutHint_1 = require("../../../preview-server/error-overlay/remotion-overlay/ShortcutHint");
|
|
9
10
|
const convert_env_variables_1 = require("../../helpers/convert-env-variables");
|
|
10
11
|
const render_modal_sections_1 = require("../../helpers/render-modal-sections");
|
|
12
|
+
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
11
13
|
const audio_1 = require("../../icons/audio");
|
|
12
14
|
const data_1 = require("../../icons/data");
|
|
13
15
|
const file_1 = require("../../icons/file");
|
|
@@ -15,12 +17,13 @@ const frame_1 = require("../../icons/frame");
|
|
|
15
17
|
const gear_1 = require("../../icons/gear");
|
|
16
18
|
const gif_1 = require("../../icons/gif");
|
|
17
19
|
const modals_1 = require("../../state/modals");
|
|
18
|
-
const
|
|
20
|
+
const sidebar_1 = require("../../state/sidebar");
|
|
21
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
19
22
|
const ModalContainer_1 = require("../ModalContainer");
|
|
20
23
|
const ModalHeader_1 = require("../ModalHeader");
|
|
21
24
|
const actions_1 = require("../RenderQueue/actions");
|
|
25
|
+
const RightPanel_1 = require("../RightPanel");
|
|
22
26
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
23
|
-
const SidebarContent_1 = require("../SidebarContent");
|
|
24
27
|
const Tabs_1 = require("../Tabs");
|
|
25
28
|
const CrfSetting_1 = require("./CrfSetting");
|
|
26
29
|
const out_name_checker_1 = require("./out-name-checker");
|
|
@@ -57,10 +60,10 @@ const container = {
|
|
|
57
60
|
width: '100%',
|
|
58
61
|
borderBottom: '1px solid black',
|
|
59
62
|
};
|
|
60
|
-
const
|
|
63
|
+
const rightPanel = {
|
|
61
64
|
height: 600,
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
width: 650,
|
|
66
|
+
display: 'flex',
|
|
64
67
|
};
|
|
65
68
|
const horizontalLayout = {
|
|
66
69
|
display: 'flex',
|
|
@@ -100,7 +103,7 @@ const buttonStyle = {
|
|
|
100
103
|
const flexer = {
|
|
101
104
|
flex: 1,
|
|
102
105
|
};
|
|
103
|
-
const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat,
|
|
106
|
+
const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, initialStillImageFormat, initialJpegQuality, initialScale, initialVerbose, initialOutName, initialRenderType, initialVideoCodecForAudioTab, initialVideoCodecForVideoTab, initialConcurrency, maxConcurrency, minConcurrency, initialMuted, initialEnforceAudioTrack, initialProResProfile, initialPixelFormat, initialVideoBitrate, initialAudioBitrate, initialEveryNthFrame, initialNumberOfGifLoops, initialDelayRenderTimeout, initialAudioCodec, initialEnvVariables, initialDisableWebSecurity, initialGl, initialHeadless, initialIgnoreCertificateErrors, }) => {
|
|
104
107
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
105
108
|
const onQuit = (0, react_1.useCallback)(() => {
|
|
106
109
|
setSelectedModal(null);
|
|
@@ -118,7 +121,7 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
118
121
|
const [mutedState, setMuted] = (0, react_1.useState)(() => initialMuted);
|
|
119
122
|
const [enforceAudioTrackState, setEnforceAudioTrackState] = (0, react_1.useState)(() => initialEnforceAudioTrack);
|
|
120
123
|
const [renderMode, setRenderModeState] = (0, react_1.useState)(initialRenderType);
|
|
121
|
-
const [
|
|
124
|
+
const [jpegQuality, setJpegQuality] = (0, react_1.useState)(() => initialJpegQuality);
|
|
122
125
|
const [scale, setScale] = (0, react_1.useState)(() => initialScale);
|
|
123
126
|
const [verbose, setVerboseLogging] = (0, react_1.useState)(() => initialVerbose);
|
|
124
127
|
const [disallowParallelEncoding, setDisallowParallelEncoding] = (0, react_1.useState)(false);
|
|
@@ -281,15 +284,18 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
281
284
|
setStillImageFormat(format);
|
|
282
285
|
setDefaultOutName({ type: 'still', imageFormat: format });
|
|
283
286
|
}, [setDefaultOutName]);
|
|
287
|
+
const { setSidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
284
288
|
const onClickStill = (0, react_1.useCallback)(() => {
|
|
285
289
|
var _a;
|
|
286
|
-
(
|
|
290
|
+
setSidebarCollapsedStateRight('expanded');
|
|
291
|
+
(0, RightPanel_1.persistSelectedPanel)('renders');
|
|
292
|
+
(_a = RightPanel_1.rightSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
287
293
|
dispatchIfMounted({ type: 'start' });
|
|
288
294
|
(0, actions_1.addStillRenderJob)({
|
|
289
295
|
compositionId,
|
|
290
296
|
outName,
|
|
291
297
|
imageFormat: stillImageFormat,
|
|
292
|
-
|
|
298
|
+
jpegQuality: stillImageFormat === 'jpeg' ? jpegQuality : null,
|
|
293
299
|
frame,
|
|
294
300
|
scale,
|
|
295
301
|
verbose,
|
|
@@ -306,11 +312,12 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
306
312
|
dispatchIfMounted({ type: 'fail' });
|
|
307
313
|
});
|
|
308
314
|
}, [
|
|
315
|
+
setSidebarCollapsedStateRight,
|
|
309
316
|
dispatchIfMounted,
|
|
310
317
|
compositionId,
|
|
311
318
|
outName,
|
|
312
319
|
stillImageFormat,
|
|
313
|
-
|
|
320
|
+
jpegQuality,
|
|
314
321
|
frame,
|
|
315
322
|
scale,
|
|
316
323
|
verbose,
|
|
@@ -330,13 +337,15 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
330
337
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
331
338
|
const onClickVideo = (0, react_1.useCallback)(() => {
|
|
332
339
|
var _a;
|
|
333
|
-
(
|
|
340
|
+
setSidebarCollapsedStateRight('expanded');
|
|
341
|
+
(0, RightPanel_1.persistSelectedPanel)('renders');
|
|
342
|
+
(_a = RightPanel_1.rightSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
334
343
|
dispatchIfMounted({ type: 'start' });
|
|
335
344
|
(0, actions_1.addVideoRenderJob)({
|
|
336
345
|
compositionId,
|
|
337
346
|
outName,
|
|
338
347
|
imageFormat: videoImageFormat,
|
|
339
|
-
|
|
348
|
+
jpegQuality: stillImageFormat === 'jpeg' ? jpegQuality : null,
|
|
340
349
|
scale,
|
|
341
350
|
verbose,
|
|
342
351
|
codec,
|
|
@@ -367,12 +376,13 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
367
376
|
dispatchIfMounted({ type: 'fail' });
|
|
368
377
|
});
|
|
369
378
|
}, [
|
|
379
|
+
setSidebarCollapsedStateRight,
|
|
370
380
|
dispatchIfMounted,
|
|
371
381
|
compositionId,
|
|
372
382
|
outName,
|
|
373
383
|
videoImageFormat,
|
|
374
384
|
stillImageFormat,
|
|
375
|
-
|
|
385
|
+
jpegQuality,
|
|
376
386
|
scale,
|
|
377
387
|
verbose,
|
|
378
388
|
codec,
|
|
@@ -521,11 +531,36 @@ const RenderModal = ({ compositionId, initialFrame, initialVideoImageFormat, ini
|
|
|
521
531
|
stillImageFormat,
|
|
522
532
|
});
|
|
523
533
|
const { tab, setTab, shownTabs } = (0, render_modal_sections_1.useRenderModalSections)(renderMode, codec);
|
|
524
|
-
|
|
534
|
+
const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
|
|
535
|
+
const renderDisabled = state.type === 'load' || !outnameValidation.valid;
|
|
536
|
+
const trigger = (0, react_1.useCallback)(() => {
|
|
537
|
+
if (renderDisabled) {
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
if (renderMode === 'still') {
|
|
541
|
+
onClickStill();
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
onClickVideo();
|
|
545
|
+
}
|
|
546
|
+
}, [onClickStill, onClickVideo, renderDisabled, renderMode]);
|
|
547
|
+
(0, react_1.useEffect)(() => {
|
|
548
|
+
registerKeybinding({
|
|
549
|
+
callback() {
|
|
550
|
+
trigger();
|
|
551
|
+
},
|
|
552
|
+
commandCtrlKey: true,
|
|
553
|
+
key: 'Enter',
|
|
554
|
+
event: 'keydown',
|
|
555
|
+
preventDefault: true,
|
|
556
|
+
triggerIfInputFieldFocused: false,
|
|
557
|
+
});
|
|
558
|
+
}, [registerKeybinding, trigger]);
|
|
559
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
|
|
525
560
|
...buttonStyle,
|
|
526
561
|
backgroundColor: outnameValidation.valid
|
|
527
562
|
? 'var(--blue)'
|
|
528
563
|
: 'var(--blue-disabled)',
|
|
529
|
-
}, children: state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...' })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.
|
|
564
|
+
}, children: [state.type === 'idle' ? `Render ${renderMode}` : 'Rendering...', (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: leftSidebar, children: [shownTabs.includes('general') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: icon }) }), "General"] })) : null, shownTabs.includes('data') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: icon }) }), "Input Props"] })) : null, shownTabs.includes('picture') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: icon }) }), "Picture"] })) : null, shownTabs.includes('audio') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: icon }) }), "Audio"] })) : null, shownTabs.includes('gif') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'gif', onClick: () => setTab('gif'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gif_1.GifIcon, { style: icon }) }), "GIF"] })) : null, shownTabs.includes('advanced') ? ((0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { style: horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: icon }) }), "Other"] })) : null] }), (0, jsx_runtime_1.jsx)("div", { style: rightPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, currentComposition: currentComposition, frame: frame, imageFormatOptions: imageFormatOptions, outName: outName, proResProfile: proResProfile, renderMode: renderMode, setVideoCodec: setCodec, setFrame: setFrame, setOutName: setOutName, setProResProfile: setProResProfile, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(RenderModalPicture_1.RenderModalPicture, { renderMode: renderMode, scale: scale, setScale: setScale, pixelFormat: pixelFormat, setPixelFormat: setPixelFormat, imageFormatOptions: imageFormatOptions, crf: crf, setCrf: setCrf, customTargetVideoBitrate: customTargetVideoBitrate, maxCrf: maxCrf, minCrf: minCrf, jpegQuality: jpegQuality, qualityControlType: qualityControlType, setJpegQuality: setJpegQuality, setCustomTargetVideoBitrateValue: setCustomTargetVideoBitrateValue, setQualityControl: setQualityControl, shouldDisplayCrfOption: shouldDisplayCrfOption, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(RenderModalAudio_1.RenderModalAudio, { muted: muted, renderMode: renderMode, setMuted: setMuted, codec: codec, audioCodec: audioCodec, setAudioCodec: setAudioCodec, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrackState: setEnforceAudioTrackState, customTargetAudioBitrate: customTargetAudioBitrate, setCustomTargetAudioBitrateValue: setCustomTargetAudioBitrateValue, setShouldHaveCustomTargetAudioBitrate: setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate: shouldHaveCustomTargetAudioBitrate })) : tab === 'gif' ? ((0, jsx_runtime_1.jsx)(RenderModalGif_1.RenderModalGif, { everyNthFrame: everyNthFrame, limitNumberOfGifLoops: limitNumberOfGifLoops, numberOfGifLoopsSetting: numberOfGifLoopsSetting, setEveryNthFrameSetting: setEveryNthFrameSetting, setLimitNumberOfGifLoops: setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting: setNumberOfGifLoopsSetting })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(RenderModalData_1.RenderModalData, { inputProps: inputProps, setInputProps: setInputProps, composition: currentComposition, compact: false, mayShowSaveButton: false })) : ((0, jsx_runtime_1.jsx)(RenderModalAdvanced_1.RenderModalAdvanced, { concurrency: concurrency, maxConcurrency: maxConcurrency, minConcurrency: minConcurrency, renderMode: renderMode, setConcurrency: setConcurrency, setVerboseLogging: setVerboseLogging, verbose: verbose, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, disallowParallelEncoding: disallowParallelEncoding, setDisallowParallelEncoding: setDisallowParallelEncoding, setDisableWebSecurity: setDisableWebSecurity, setIgnoreCertificateErrors: setIgnoreCertificateErrors, setHeadless: setHeadless, headless: headless, ignoreCertificateErrors: ignoreCertificateErrors, disableWebSecurity: disableWebSecurity, openGlOption: openGlOption, setOpenGlOption: setOpenGlOption, setEnvVariables: setEnvVariables, envVariables: envVariables })) })] })] }));
|
|
530
565
|
};
|
|
531
566
|
exports.RenderModal = RenderModal;
|
|
@@ -5,11 +5,16 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
7
7
|
const Checkbox_1 = require("../Checkbox");
|
|
8
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
8
9
|
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
9
10
|
const layout_1 = require("./layout");
|
|
10
11
|
const NumberSetting_1 = require("./NumberSetting");
|
|
11
12
|
const RenderModalEnvironmentVariables_1 = require("./RenderModalEnvironmentVariables");
|
|
12
13
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
14
|
+
const container = {
|
|
15
|
+
flex: 1,
|
|
16
|
+
overflowY: 'auto',
|
|
17
|
+
};
|
|
13
18
|
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, setVerboseLogging, verbose, delayRenderTimeout, setDelayRenderTimeout, disallowParallelEncoding, setDisallowParallelEncoding, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setEnvVariables, envVariables, }) => {
|
|
14
19
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
15
20
|
return ['angle', 'egl', 'swangle', 'swiftshader', 'default'];
|
|
@@ -45,7 +50,7 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
45
50
|
};
|
|
46
51
|
});
|
|
47
52
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
48
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting
|
|
49
54
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
50
55
|
, {
|
|
51
56
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
@@ -15,6 +15,9 @@ const layout_1 = require("./layout");
|
|
|
15
15
|
const MutedSetting_1 = require("./MutedSetting");
|
|
16
16
|
const OptionExplainer_1 = require("./OptionExplainer");
|
|
17
17
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
18
|
+
const container = {
|
|
19
|
+
flex: 1,
|
|
20
|
+
};
|
|
18
21
|
const RenderModalAudio = ({ muted, setMuted, renderMode, enforceAudioTrack, setEnforceAudioTrackState, setShouldHaveCustomTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate, setCustomTargetAudioBitrateValue, customTargetAudioBitrate, audioCodec, codec, setAudioCodec, }) => {
|
|
19
22
|
const onShouldHaveTargetAudioBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
20
23
|
setShouldHaveCustomTargetAudioBitrate(e.target.checked);
|
|
@@ -38,6 +41,6 @@ const RenderModalAudio = ({ muted, setMuted, renderMode, enforceAudioTrack, setE
|
|
|
38
41
|
};
|
|
39
42
|
});
|
|
40
43
|
}, [codec, setAudioCodec]);
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Audio Codec" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: audioCodecOptions(codec), selectedId: audioCodec, title: "AudioCodec" }) })] })) : null, renderMode === 'video' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { enforceAudioTrack: enforceAudioTrack, muted: muted, setMuted: setMuted, hint: client_1.BrowserSafeApis.options.muteOption }), (0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { muted: muted, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState, option: client_1.BrowserSafeApis.options.enforceAudioOption }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})] })), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.audioBitrateOption }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged, status: "ok" }) }) })] })) : null] }));
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' && audioCodecOptions(codec).length >= 2 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Audio Codec" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: audioCodecOptions(codec), selectedId: audioCodec, title: "AudioCodec" }) })] })) : null, renderMode === 'video' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MutedSetting_1.MutedSetting, { enforceAudioTrack: enforceAudioTrack, muted: muted, setMuted: setMuted, hint: client_1.BrowserSafeApis.options.muteOption }), (0, jsx_runtime_1.jsx)(EnforceAudioTrackSetting_1.EnforceAudioTrackSetting, { muted: muted, enforceAudioTrack: enforceAudioTrack, setEnforceAudioTrack: setEnforceAudioTrackState, option: client_1.BrowserSafeApis.options.enforceAudioOption }), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {})] })), renderMode === 'still' ? null : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Custom audio bitrate" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: shouldHaveCustomTargetAudioBitrate, onChange: onShouldHaveTargetAudioBitrateChanged }) })] })), shouldHaveCustomTargetAudioBitrate && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target audio bitrate" }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.audioBitrateOption }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetAudioBitrate, onChange: onTargetAudioBitrateChanged, status: "ok" }) }) })] })) : null] }));
|
|
42
45
|
};
|
|
43
46
|
exports.RenderModalAudio = RenderModalAudio;
|
|
@@ -17,6 +17,9 @@ const InfoBubble_1 = require("./InfoBubble");
|
|
|
17
17
|
const layout_1 = require("./layout");
|
|
18
18
|
const OptionExplainer_1 = require("./OptionExplainer");
|
|
19
19
|
const RenderModalInput_1 = require("./RenderModalInput");
|
|
20
|
+
const container = {
|
|
21
|
+
flex: 1,
|
|
22
|
+
};
|
|
20
23
|
const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setVideoCodec: setCodec, proResProfile, setProResProfile, frame, setFrame, currentComposition, setOutName, setEndFrame, endFrame, setStartFrame, startFrame, validationMessage, }) => {
|
|
21
24
|
const existence = (0, use_file_existence_1.useFileExistence)(outName);
|
|
22
25
|
const videoCodecOptions = (0, react_1.useMemo)(() => {
|
|
@@ -71,6 +74,6 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
|
|
|
71
74
|
const onValueChange = (0, react_1.useCallback)((e) => {
|
|
72
75
|
setOutName(e.target.value);
|
|
73
76
|
}, [setOutName]);
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.label, children: ["Codec", (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && currentComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${currentComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: currentComposition.durationInFrames - 1 }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: proResProfile, selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: currentComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_1.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
|
|
77
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.label, children: ["Codec", (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoCodecOption }) })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: videoCodecOptions, selectedId: codec, title: "Codec" }) })] })), renderMode === 'still' && currentComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${currentComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: currentComposition.durationInFrames - 1 }) }) })] })) : null, renderMode === 'video' && codec === 'prores' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "ProRes profile" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: proResProfile, selectedId: proResProfile, values: proResProfileOptions }) })] })) : null, renderMode === 'still' ? null : ((0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: currentComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), (0, jsx_runtime_1.jsx)(RenderModalInput_1.RenderModalInput, { existence: existence, inputStyle: layout_1.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage })] }));
|
|
75
78
|
};
|
|
76
79
|
exports.RenderModalBasic = RenderModalBasic;
|
|
@@ -3,24 +3,45 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RenderModalData = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const layout_1 = require("../layout");
|
|
6
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const actions_1 = require("../RenderQueue/actions");
|
|
9
8
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
10
9
|
const RenderModalJSONInputPropsEditor_1 = require("./RenderModalJSONInputPropsEditor");
|
|
11
10
|
const SchemaEditor_1 = require("./SchemaEditor/SchemaEditor");
|
|
12
11
|
const outer = {
|
|
13
|
-
|
|
12
|
+
display: 'flex',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
flex: 1,
|
|
15
|
+
overflow: 'hidden',
|
|
14
16
|
};
|
|
15
17
|
const controlContainer = {
|
|
16
|
-
display: 'flex',
|
|
17
18
|
flexDirection: 'row',
|
|
19
|
+
display: 'flex',
|
|
20
|
+
paddingLeft: 12,
|
|
21
|
+
paddingTop: 12,
|
|
22
|
+
paddingBottom: 12,
|
|
23
|
+
borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
|
|
18
24
|
};
|
|
19
|
-
const RenderModalData = ({ composition, inputProps, setInputProps, compact,
|
|
25
|
+
const RenderModalData = ({ composition, inputProps, setInputProps, compact, mayShowSaveButton }) => {
|
|
20
26
|
const [mode, setMode] = (0, react_1.useState)('schema');
|
|
27
|
+
const [valBeforeSafe, setValBeforeSafe] = (0, react_1.useState)(inputProps);
|
|
21
28
|
const zodValidationResult = (0, react_1.useMemo)(() => {
|
|
22
29
|
return composition.schema.safeParse(inputProps);
|
|
23
30
|
}, [composition.schema, inputProps]);
|
|
31
|
+
const [canSaveDefaultProps, setCanSaveDefaultProps] = (0, react_1.useState)(false);
|
|
32
|
+
const showSaveButton = mayShowSaveButton && canSaveDefaultProps;
|
|
33
|
+
// TODO: Show reason
|
|
34
|
+
// TODO: Update if root file is updated
|
|
35
|
+
(0, react_1.useEffect)(() => {
|
|
36
|
+
(0, actions_1.canUpdateDefaultProps)(composition.id)
|
|
37
|
+
.then((can) => {
|
|
38
|
+
setCanSaveDefaultProps(can.canUpdate);
|
|
39
|
+
})
|
|
40
|
+
.catch(() => {
|
|
41
|
+
// TODO: Use error as reason
|
|
42
|
+
setCanSaveDefaultProps(false);
|
|
43
|
+
});
|
|
44
|
+
}, [composition.id]);
|
|
24
45
|
const modeItems = (0, react_1.useMemo)(() => {
|
|
25
46
|
return [
|
|
26
47
|
{
|
|
@@ -45,11 +66,12 @@ const RenderModalData = ({ composition, inputProps, setInputProps, compact, upda
|
|
|
45
66
|
setMode('schema');
|
|
46
67
|
}, []);
|
|
47
68
|
const onUpdate = (0, react_1.useCallback)(() => {
|
|
69
|
+
setValBeforeSafe(inputProps);
|
|
48
70
|
(0, actions_1.updateDefaultProps)(composition.id, inputProps);
|
|
49
71
|
}, [composition.id, inputProps]);
|
|
50
72
|
const onSave = (0, react_1.useCallback)((updater) => {
|
|
51
73
|
(0, actions_1.updateDefaultProps)(composition.id, updater(composition.defaultProps));
|
|
52
74
|
}, [composition.defaultProps, composition.id]);
|
|
53
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: controlContainer, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false }) }),
|
|
75
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: controlContainer, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: modeItems, needsWrapping: false }) }), mode === 'schema' ? ((0, jsx_runtime_1.jsx)(SchemaEditor_1.SchemaEditor, { value: inputProps, setValue: setInputProps, schema: composition.schema, zodValidationResult: zodValidationResult, compact: compact, defaultProps: composition.defaultProps, onSave: onSave, showSaveButton: showSaveButton })) : ((0, jsx_runtime_1.jsx)(RenderModalJSONInputPropsEditor_1.RenderModalJSONInputPropsEditor, { value: inputProps !== null && inputProps !== void 0 ? inputProps : {}, setValue: setInputProps, zodValidationResult: zodValidationResult, switchToSchema: switchToSchema, onSave: onUpdate, valBeforeSafe: valBeforeSafe }))] }));
|
|
54
76
|
};
|
|
55
77
|
exports.RenderModalData = RenderModalData;
|
|
@@ -19,9 +19,6 @@ const container = {
|
|
|
19
19
|
const button = {
|
|
20
20
|
marginLeft: 16,
|
|
21
21
|
};
|
|
22
|
-
// TODO: should warn if XOR key XOR value is empty
|
|
23
|
-
// TODO: Should warn if trying to set the same key twice
|
|
24
|
-
// TODO: Should warn if trying to set NODE_ENV
|
|
25
22
|
const RenderModalEnvironmentVariables = ({ envVariables, setEnvVariables }) => {
|
|
26
23
|
const onEnvValChange = (0, react_1.useCallback)((index, value) => {
|
|
27
24
|
setEnvVariables((oldEnv) => {
|
|
@@ -43,10 +40,16 @@ const RenderModalEnvironmentVariables = ({ envVariables, setEnvVariables }) => {
|
|
|
43
40
|
const addField = (0, react_1.useCallback)(() => {
|
|
44
41
|
setEnvVariables((oldEnv) => [...oldEnv, ['', '']]);
|
|
45
42
|
}, [setEnvVariables]);
|
|
43
|
+
const usedKeys = [];
|
|
46
44
|
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("strong", { style: title, children: "Environment variables" }), envVariables.map((env, i) => {
|
|
45
|
+
let isDuplicate = false;
|
|
46
|
+
if (usedKeys.includes(env[0].toUpperCase())) {
|
|
47
|
+
isDuplicate = true;
|
|
48
|
+
}
|
|
49
|
+
usedKeys.push(env[0].toUpperCase());
|
|
47
50
|
return ((0, jsx_runtime_1.jsx)(EnvInput_1.EnvInput
|
|
48
51
|
// eslint-disable-next-line react/no-array-index-key
|
|
49
|
-
, { onEnvKeyChange: onEnvKeyChange, onEnvValChange: onEnvValChange, envKey: env[0], envVal: env[1], onDelete: onDelete, index: i, autoFocus: i === envVariables.length - 1 && env[0] === '' }, i));
|
|
50
|
-
}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(Button_1.Button, { style: button, onClick: addField, children: "+ Add env variable" })] }));
|
|
52
|
+
, { onEnvKeyChange: onEnvKeyChange, onEnvValChange: onEnvValChange, envKey: env[0], envVal: env[1], onDelete: onDelete, index: i, isDuplicate: isDuplicate, autoFocus: i === envVariables.length - 1 && env[0] === '' }, i));
|
|
53
|
+
}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(Button_1.Button, { style: button, onClick: addField, children: "+ Add env variable" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true })] }));
|
|
51
54
|
};
|
|
52
55
|
exports.RenderModalEnvironmentVariables = RenderModalEnvironmentVariables;
|
|
@@ -7,10 +7,13 @@ const Checkbox_1 = require("../Checkbox");
|
|
|
7
7
|
const layout_1 = require("./layout");
|
|
8
8
|
const NumberOfLoopsSetting_1 = require("./NumberOfLoopsSetting");
|
|
9
9
|
const NumberSetting_1 = require("./NumberSetting");
|
|
10
|
+
const container = {
|
|
11
|
+
flex: 1,
|
|
12
|
+
};
|
|
10
13
|
const RenderModalGif = ({ everyNthFrame, limitNumberOfGifLoops, numberOfGifLoopsSetting, setEveryNthFrameSetting, setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting, }) => {
|
|
11
14
|
const onShouldLimitNumberOfGifLoops = (0, react_1.useCallback)((e) => {
|
|
12
15
|
setLimitNumberOfGifLoops(e.target.checked);
|
|
13
16
|
}, [setLimitNumberOfGifLoops]);
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { name: "Every nth frame", min: 1, onValueChanged: setEveryNthFrameSetting, value: everyNthFrame, step: 1 }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Limit GIF loops" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: limitNumberOfGifLoops, onChange: onShouldLimitNumberOfGifLoops }) })] }), limitNumberOfGifLoops ? ((0, jsx_runtime_1.jsx)(NumberOfLoopsSetting_1.NumberOfLoopsSetting, { numberOfGifLoops: numberOfGifLoopsSetting, setNumberOfGifLoops: setNumberOfGifLoopsSetting })) : null] }));
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { name: "Every nth frame", min: 1, onValueChanged: setEveryNthFrameSetting, value: everyNthFrame, step: 1 }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Limit GIF loops" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: limitNumberOfGifLoops, onChange: onShouldLimitNumberOfGifLoops }) })] }), limitNumberOfGifLoops ? ((0, jsx_runtime_1.jsx)(NumberOfLoopsSetting_1.NumberOfLoopsSetting, { numberOfGifLoops: numberOfGifLoopsSetting, setNumberOfGifLoops: setNumberOfGifLoopsSetting })) : null] }));
|
|
15
18
|
};
|
|
16
19
|
exports.RenderModalGif = RenderModalGif;
|
|
@@ -8,6 +8,6 @@ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
|
8
8
|
const layout_2 = require("./layout");
|
|
9
9
|
// eslint-disable-next-line react/function-component-definition
|
|
10
10
|
function RenderModalInput({ existence, inputStyle, outName, onValueChange, validationMessage, }) {
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)(layout_1.Column, { children: (0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Output name" }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange }), validationMessage ? ((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-end", message: validationMessage, type: 'error' })] })) : existence ? ((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-end", message: "Will be overwritten", type: 'warning' })] })) : null] }) })] }));
|
|
12
12
|
}
|
|
13
13
|
exports.RenderModalInput = RenderModalInput;
|
|
@@ -5,4 +5,6 @@ export declare const RenderModalJSONInputPropsEditor: React.FC<{
|
|
|
5
5
|
setValue: React.Dispatch<React.SetStateAction<unknown>>;
|
|
6
6
|
zodValidationResult: z.SafeParseReturnType<unknown, unknown>;
|
|
7
7
|
switchToSchema: () => void;
|
|
8
|
+
onSave: () => void;
|
|
9
|
+
valBeforeSafe: unknown;
|
|
8
10
|
}>;
|
|
@@ -27,6 +27,7 @@ exports.RenderModalJSONInputPropsEditor = void 0;
|
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
|
|
30
|
+
const layout_1 = require("../layout");
|
|
30
31
|
const RemTextarea_1 = require("../NewComposition/RemTextarea");
|
|
31
32
|
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
32
33
|
const date_serialization_1 = require("./SchemaEditor/date-serialization");
|
|
@@ -41,7 +42,7 @@ const parseJSON = (str) => {
|
|
|
41
42
|
};
|
|
42
43
|
const style = {
|
|
43
44
|
fontFamily: 'monospace',
|
|
44
|
-
|
|
45
|
+
flex: 1,
|
|
45
46
|
};
|
|
46
47
|
const schemaButton = {
|
|
47
48
|
border: 'none',
|
|
@@ -50,8 +51,14 @@ const schemaButton = {
|
|
|
50
51
|
cursor: 'pointer',
|
|
51
52
|
backgroundColor: 'transparent',
|
|
52
53
|
};
|
|
54
|
+
const scrollable = {
|
|
55
|
+
padding: '8px 12px',
|
|
56
|
+
display: 'flex',
|
|
57
|
+
flexDirection: 'column',
|
|
58
|
+
flex: 1,
|
|
59
|
+
};
|
|
53
60
|
// TODO: Note if custom 'remotion-date:' pattern has been used
|
|
54
|
-
const RenderModalJSONInputPropsEditor = ({ setValue, value, zodValidationResult, switchToSchema }) => {
|
|
61
|
+
const RenderModalJSONInputPropsEditor = ({ setValue, value, zodValidationResult, switchToSchema, onSave, valBeforeSafe, }) => {
|
|
55
62
|
const [localValue, setLocalValue] = react_1.default.useState(() => {
|
|
56
63
|
return parseJSON((0, date_serialization_1.serializeJSONWithDate)(value, 2));
|
|
57
64
|
});
|
|
@@ -82,6 +89,10 @@ const RenderModalJSONInputPropsEditor = ({ setValue, value, zodValidationResult,
|
|
|
82
89
|
setValue(parsed.value);
|
|
83
90
|
}
|
|
84
91
|
}, [setValue]);
|
|
85
|
-
|
|
92
|
+
const hasChanged = (0, react_1.useMemo)(() => {
|
|
93
|
+
return value && JSON.stringify(value) !== JSON.stringify(valBeforeSafe);
|
|
94
|
+
}, [valBeforeSafe, value]);
|
|
95
|
+
// TODO: Indicate saving progress
|
|
96
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: scrollable, children: [(0, jsx_runtime_1.jsx)(RemTextarea_1.RemTextarea, { onChange: onChange, value: localValue.str, status: localValue.validJSON ? 'ok' : 'error', style: style }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), localValue.validJSON === false ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: localValue.error, type: "error" })) : zodValidationResult.success === false ? ((0, jsx_runtime_1.jsx)("button", { type: "button", style: schemaButton, onClick: switchToSchema, children: (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: "Does not match schema", type: "warning" }) })) : null, (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { disabled: !localValue.validJSON, onClick: onPretty, children: "Format JSON" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onSave, disabled: !zodValidationResult.success || !hasChanged, children: "Save" })] })] }));
|
|
86
97
|
};
|
|
87
98
|
exports.RenderModalJSONInputPropsEditor = RenderModalJSONInputPropsEditor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { PixelFormat, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import type { SegmentedControlItem } from '../SegmentedControl';
|
|
4
4
|
import type { RenderType } from './RenderModalAdvanced';
|
|
5
5
|
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
@@ -15,8 +15,8 @@ export declare const RenderModalPicture: React.FC<{
|
|
|
15
15
|
qualityControlType: QualityControl;
|
|
16
16
|
videoImageFormat: VideoImageFormat;
|
|
17
17
|
stillImageFormat: StillImageFormat;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
setJpegQuality: React.Dispatch<React.SetStateAction<number>>;
|
|
19
|
+
jpegQuality: number;
|
|
20
20
|
maxCrf: number;
|
|
21
21
|
minCrf: number;
|
|
22
22
|
setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
@@ -16,7 +16,10 @@ const OptionExplainer_1 = require("./OptionExplainer");
|
|
|
16
16
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
17
17
|
const ScaleSetting_1 = require("./ScaleSetting");
|
|
18
18
|
const qualityControlModes = ['crf', 'bitrate'];
|
|
19
|
-
const
|
|
19
|
+
const container = {
|
|
20
|
+
flex: 1,
|
|
21
|
+
};
|
|
22
|
+
const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, setPixelFormat, imageFormatOptions, setQualityControl, qualityControlType, videoImageFormat, setJpegQuality, jpegQuality, maxCrf, minCrf, setCrf, shouldDisplayCrfOption, setCustomTargetVideoBitrateValue, crf, customTargetVideoBitrate, stillImageFormat, }) => {
|
|
20
23
|
const pixelFormatOptions = (0, react_1.useMemo)(() => {
|
|
21
24
|
return client_1.BrowserSafeApis.validPixelFormats.map((option) => {
|
|
22
25
|
return {
|
|
@@ -46,7 +49,7 @@ const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, setPixel
|
|
|
46
49
|
const onTargetVideoBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
47
50
|
setCustomTargetVideoBitrateValue(e.target.value);
|
|
48
51
|
}, [setCustomTargetVideoBitrateValue]);
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Image Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, {
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Image Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: false }) })] })) : null, renderMode === 'video' && videoImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'still' && stillImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(JpegQualitySetting_1.JpegQualitySetting, { jpegQuality: jpegQuality, setJpegQuality: setJpegQuality })), renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Quality control" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: qualityControlOptions, needsWrapping: true }) })] })) : null, shouldDisplayCrfOption &&
|
|
50
53
|
qualityControlType === 'crf' &&
|
|
51
54
|
renderMode !== 'still' ? ((0, jsx_runtime_1.jsx)(CrfSetting_1.CrfSetting, { crf: crf, min: minCrf, max: maxCrf, setCrf: setCrf, option: client_1.BrowserSafeApis.options.crfOption })) : null, qualityControlType === 'bitrate' && renderMode !== 'still' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Target video bitrate" }), (0, jsx_runtime_1.jsx)(InfoBubble_1.InfoBubble, { title: "Learn more about this option", children: (0, jsx_runtime_1.jsx)(OptionExplainer_1.OptionExplainer, { option: client_1.BrowserSafeApis.options.videoBitrate }) }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { style: layout_1.input, value: customTargetVideoBitrate, onChange: onTargetVideoBitrateChanged, status: "ok" }) }) })] })) : null, renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, (0, jsx_runtime_1.jsx)(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale }), renderMode === 'video' ? (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Pixel format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: pixelFormatOptions, selectedId: pixelFormat, title: "Pixel Format" }) })] })) : null] }));
|
|
52
55
|
};
|
|
@@ -7,6 +7,7 @@ const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay
|
|
|
7
7
|
const make_retry_payload_1 = require("../../../preview-server/render-queue/make-retry-payload");
|
|
8
8
|
const modals_1 = require("../../state/modals");
|
|
9
9
|
const layout_1 = require("../layout");
|
|
10
|
+
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
10
11
|
const ModalContainer_1 = require("../ModalContainer");
|
|
11
12
|
const ModalHeader_1 = require("../ModalHeader");
|
|
12
13
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
@@ -66,6 +67,6 @@ const RenderStatusModal = ({ jobId }) => {
|
|
|
66
67
|
if (!job || job.status === 'idle') {
|
|
67
68
|
throw new Error('should not have rendered this modal');
|
|
68
69
|
}
|
|
69
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${job.compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [job.status === 'failed' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { children: "The render failed because of the following error:" }), (0, jsx_runtime_1.jsx)("div", { className:
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${job.compositionId}` }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [job.status === 'failed' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("p", { children: "The render failed because of the following error:" }), (0, jsx_runtime_1.jsx)("div", { className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, style: codeBlock, children: job.error.stack })] })) : null, job.status === 'done' || job.status === 'running' ? ((0, jsx_runtime_1.jsx)(GuiRenderStatus_1.GuiRenderStatus, { job: job })) : null, (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsxs)("div", { style: buttonRow, children: [job.status === 'running' ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClickOnCancel, children: "Cancel render" })) : ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClickOnRemove, children: "Remove render" })), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onRetry, children: "Retry" })) : null, (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onQuit, children: "Close" })] })] })] }));
|
|
70
71
|
};
|
|
71
72
|
exports.RenderStatusModal = RenderStatusModal;
|