@remotion/cli 3.3.77 → 3.3.79
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/better-opn/index.d.ts +6 -0
- package/dist/better-opn/index.js +202 -0
- package/dist/editor/helpers/get-timeline-sequence-layout.js +1 -1
- package/dist/handle-common-errors.js +16 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/preview.js +8 -3
- package/package.json +7 -7
- package/dist/convert-entry-point-to-serve-url.d.ts +0 -1
- package/dist/convert-entry-point-to-serve-url.js +0 -15
- package/dist/editor/components/Checkbox.d.ts +0 -5
- package/dist/editor/components/Checkbox.js +0 -38
- package/dist/editor/components/CollapsableOptions.d.ts +0 -6
- package/dist/editor/components/CollapsableOptions.js +0 -35
- package/dist/editor/components/CurrentCompositionSideEffects.d.ts +0 -3
- package/dist/editor/components/CurrentCompositionSideEffects.js +0 -43
- package/dist/editor/components/InlineAction.d.ts +0 -5
- package/dist/editor/components/InlineAction.js +0 -34
- package/dist/editor/components/Modals.d.ts +0 -2
- package/dist/editor/components/Modals.js +0 -23
- package/dist/editor/components/RenderButton.d.ts +0 -6
- package/dist/editor/components/RenderButton.js +0 -67
- package/dist/editor/components/RenderModal/CrfSetting.d.ts +0 -15
- package/dist/editor/components/RenderModal/CrfSetting.js +0 -43
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +0 -14
- package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +0 -8
- package/dist/editor/components/RenderModal/FrameRangeSetting.js +0 -42
- package/dist/editor/components/RenderModal/MutedSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/MutedSetting.js +0 -14
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +0 -26
- package/dist/editor/components/RenderModal/NumberSetting.d.ts +0 -9
- package/dist/editor/components/RenderModal/NumberSetting.js +0 -26
- package/dist/editor/components/RenderModal/QualitySetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/QualitySetting.js +0 -27
- package/dist/editor/components/RenderModal/RenderErrorModal.d.ts +0 -5
- package/dist/editor/components/RenderModal/RenderErrorModal.js +0 -64
- package/dist/editor/components/RenderModal/RenderModal.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModal.js +0 -484
- package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +0 -11
- package/dist/editor/components/RenderModal/RenderModalAdvanced.js +0 -15
- package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +0 -13
- package/dist/editor/components/RenderModal/RenderModalAudio.js +0 -22
- package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +0 -24
- package/dist/editor/components/RenderModal/RenderModalBasic.js +0 -87
- package/dist/editor/components/RenderModal/RenderModalGif.d.ts +0 -9
- package/dist/editor/components/RenderModal/RenderModalGif.js +0 -16
- package/dist/editor/components/RenderModal/RenderModalHr.d.ts +0 -2
- package/dist/editor/components/RenderModal/RenderModalHr.js +0 -18
- package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +0 -28
- package/dist/editor/components/RenderModal/RenderModalPicture.js +0 -51
- package/dist/editor/components/RenderModal/ScaleSetting.d.ts +0 -5
- package/dist/editor/components/RenderModal/ScaleSetting.js +0 -11
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +0 -18
- package/dist/editor/components/RenderModal/human-readable-codec.d.ts +0 -2
- package/dist/editor/components/RenderModal/human-readable-codec.js +0 -36
- package/dist/editor/components/RenderModal/layout.d.ts +0 -5
- package/dist/editor/components/RenderModal/layout.js +0 -31
- package/dist/editor/components/RenderQueue/CircularProgress.d.ts +0 -5
- package/dist/editor/components/RenderQueue/CircularProgress.js +0 -18
- package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueError.js +0 -26
- package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItem.js +0 -39
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +0 -22
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +0 -27
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +0 -24
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +0 -27
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +0 -23
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +0 -5
- package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +0 -22
- package/dist/editor/components/RenderQueue/actions.d.ts +0 -49
- package/dist/editor/components/RenderQueue/actions.js +0 -98
- package/dist/editor/components/RenderQueue/context.d.ts +0 -19
- package/dist/editor/components/RenderQueue/context.js +0 -56
- package/dist/editor/components/RenderQueue/index.d.ts +0 -2
- package/dist/editor/components/RenderQueue/index.js +0 -18
- package/dist/editor/components/RenderQueue/item-style.d.ts +0 -2
- package/dist/editor/components/RenderQueue/item-style.js +0 -21
- package/dist/editor/components/RenderToolbarIcon.d.ts +0 -2
- package/dist/editor/components/RenderToolbarIcon.js +0 -78
- package/dist/editor/components/RendersTab.d.ts +0 -6
- package/dist/editor/components/RendersTab.js +0 -43
- package/dist/editor/components/SegmentedControl.d.ts +0 -16
- package/dist/editor/components/SegmentedControl.js +0 -63
- package/dist/editor/components/SidebarContent.d.ts +0 -5
- package/dist/editor/components/SidebarContent.js +0 -52
- package/dist/editor/components/Tabs/index.d.ts +0 -11
- package/dist/editor/components/Tabs/index.js +0 -51
- package/dist/editor/helpers/client-id.d.ts +0 -17
- package/dist/editor/helpers/client-id.js +0 -46
- package/dist/editor/helpers/use-file-existence.d.ts +0 -1
- package/dist/editor/helpers/use-file-existence.js +0 -66
- package/dist/editor/icons/RenderStillIcon.d.ts +0 -3
- package/dist/editor/icons/RenderStillIcon.js +0 -8
- package/dist/editor/icons/audio.d.ts +0 -2
- package/dist/editor/icons/audio.js +0 -6
- package/dist/editor/icons/file.d.ts +0 -2
- package/dist/editor/icons/file.js +0 -6
- package/dist/editor/icons/frame.d.ts +0 -2
- package/dist/editor/icons/frame.js +0 -6
- package/dist/editor/icons/gear.d.ts +0 -2
- package/dist/editor/icons/gear.js +0 -6
- package/dist/editor/icons/gif.d.ts +0 -2
- package/dist/editor/icons/gif.js +0 -6
- package/dist/editor/icons/render.d.ts +0 -5
- package/dist/editor/icons/render.js +0 -8
- package/dist/editor/icons/video.d.ts +0 -5
- package/dist/editor/icons/video.js +0 -8
- package/dist/ffmpeg.d.ts +0 -2
- package/dist/ffmpeg.js +0 -21
- package/dist/file-watcher.d.ts +0 -9
- package/dist/file-watcher.js +0 -35
- package/dist/gcp-command.d.ts +0 -1
- package/dist/gcp-command.js +0 -27
- package/dist/get-default-out-name.d.ts +0 -5
- package/dist/get-default-out-name.js +0 -10
- package/dist/preview-server/api-routes.d.ts +0 -4
- package/dist/preview-server/api-routes.js +0 -17
- package/dist/preview-server/api-types.d.ts +0 -27
- package/dist/preview-server/api-types.js +0 -2
- package/dist/preview-server/file-existence-watchers.d.ts +0 -13
- package/dist/preview-server/file-existence-watchers.js +0 -62
- package/dist/preview-server/handler.d.ts +0 -9
- package/dist/preview-server/handler.js +0 -34
- package/dist/preview-server/parse-body.d.ts +0 -2
- package/dist/preview-server/parse-body.js +0 -16
- package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +0 -10
- package/dist/preview-server/render-queue/get-default-video-contexts.js +0 -13
- package/dist/preview-server/render-queue/job.d.ts +0 -114
- package/dist/preview-server/render-queue/job.js +0 -2
- package/dist/preview-server/render-queue/make-retry-payload.d.ts +0 -3
- package/dist/preview-server/render-queue/make-retry-payload.js +0 -79
- package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +0 -1
- package/dist/preview-server/render-queue/open-directory-in-finder.js +0 -34
- package/dist/preview-server/render-queue/process-still.d.ts +0 -8
- package/dist/preview-server/render-queue/process-still.js +0 -47
- package/dist/preview-server/render-queue/process-video.d.ts +0 -8
- package/dist/preview-server/render-queue/process-video.js +0 -64
- package/dist/preview-server/render-queue/queue.d.ts +0 -21
- package/dist/preview-server/render-queue/queue.js +0 -185
- package/dist/preview-server/routes/add-render.d.ts +0 -3
- package/dist/preview-server/routes/add-render.js +0 -68
- package/dist/preview-server/routes/cancel-render.d.ts +0 -3
- package/dist/preview-server/routes/cancel-render.js +0 -9
- package/dist/preview-server/routes/open-in-file-explorer.d.ts +0 -3
- package/dist/preview-server/routes/open-in-file-explorer.js +0 -14
- package/dist/preview-server/routes/remove-render.d.ts +0 -3
- package/dist/preview-server/routes/remove-render.js +0 -9
- package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/subscribe-to-file-existence.js +0 -13
- package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +0 -3
- package/dist/preview-server/routes/unsubscribe-from-file-existence.js +0 -13
- package/dist/render-flows/render.d.ts +0 -46
- package/dist/render-flows/render.js +0 -279
- package/dist/render-flows/still.d.ts +0 -29
- package/dist/render-flows/still.js +0 -171
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalBasic = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const client_1 = require("@remotion/renderer/client");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const use_file_existence_1 = require("../../helpers/use-file-existence");
|
|
8
|
-
const Checkmark_1 = require("../../icons/Checkmark");
|
|
9
|
-
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
10
|
-
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
11
|
-
const RemInput_1 = require("../NewComposition/RemInput");
|
|
12
|
-
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
13
|
-
const SegmentedControl_1 = require("../SegmentedControl");
|
|
14
|
-
const FrameRangeSetting_1 = require("./FrameRangeSetting");
|
|
15
|
-
const human_readable_audio_codecs_1 = require("./human-readable-audio-codecs");
|
|
16
|
-
const human_readable_codec_1 = require("./human-readable-codec");
|
|
17
|
-
const layout_1 = require("./layout");
|
|
18
|
-
const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, customAudioCodec, setCodec, setAudioCodec, proResProfile, setProResProfile, frame, setFrame, currentComposition, setOutName, setEndFrame, endFrame, setStartFrame, startFrame, }) => {
|
|
19
|
-
const existence = (0, use_file_existence_1.useFileExistence)(outName);
|
|
20
|
-
const videoCodecOptions = (0, react_1.useMemo)(() => {
|
|
21
|
-
return client_1.BrowserSafeApis.validCodecs
|
|
22
|
-
.filter((c) => {
|
|
23
|
-
return client_1.BrowserSafeApis.isAudioCodec(c) === (renderMode === 'audio');
|
|
24
|
-
})
|
|
25
|
-
.map((codecOption) => {
|
|
26
|
-
return {
|
|
27
|
-
label: (0, human_readable_codec_1.humanReadableCodec)(codecOption),
|
|
28
|
-
onClick: () => setCodec(codecOption),
|
|
29
|
-
key: codecOption,
|
|
30
|
-
leftItem: codec === codecOption ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
31
|
-
id: codecOption,
|
|
32
|
-
keyHint: null,
|
|
33
|
-
quickSwitcherLabel: null,
|
|
34
|
-
subMenu: null,
|
|
35
|
-
type: 'item',
|
|
36
|
-
value: codecOption,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
}, [renderMode, setCodec, codec]);
|
|
40
|
-
const audioCodecOptions = (0, react_1.useCallback)((currentCodec) => {
|
|
41
|
-
return client_1.BrowserSafeApis.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
|
|
42
|
-
return {
|
|
43
|
-
label: (0, human_readable_audio_codecs_1.humanReadableAudioCodec)(audioCodecOption),
|
|
44
|
-
onClick: () => setAudioCodec(audioCodecOption),
|
|
45
|
-
key: audioCodecOption,
|
|
46
|
-
leftItem: codec === audioCodecOption ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
47
|
-
id: audioCodecOption,
|
|
48
|
-
keyHint: null,
|
|
49
|
-
quickSwitcherLabel: null,
|
|
50
|
-
subMenu: null,
|
|
51
|
-
type: 'item',
|
|
52
|
-
value: audioCodecOption,
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
}, [codec, setAudioCodec]);
|
|
56
|
-
const proResProfileOptions = (0, react_1.useMemo)(() => {
|
|
57
|
-
return client_1.BrowserSafeApis.proResProfileOptions.map((option) => {
|
|
58
|
-
return {
|
|
59
|
-
label: option,
|
|
60
|
-
onClick: () => setProResProfile(option),
|
|
61
|
-
key: option,
|
|
62
|
-
selected: proResProfile === option,
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
}, [proResProfile, setProResProfile]);
|
|
66
|
-
const onFrameSetDirectly = (0, react_1.useCallback)((newFrame) => {
|
|
67
|
-
setFrame(newFrame);
|
|
68
|
-
}, [setFrame]);
|
|
69
|
-
const onFrameChanged = (0, react_1.useCallback)((e) => {
|
|
70
|
-
setFrame((q) => {
|
|
71
|
-
const newFrame = parseFloat(e);
|
|
72
|
-
if (Number.isNaN(newFrame)) {
|
|
73
|
-
return q;
|
|
74
|
-
}
|
|
75
|
-
return newFrame;
|
|
76
|
-
});
|
|
77
|
-
}, [setFrame]);
|
|
78
|
-
const onValueChange = (0, react_1.useCallback)((e) => {
|
|
79
|
-
setOutName(e.target.value);
|
|
80
|
-
}, [setOutName]);
|
|
81
|
-
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)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Codec" }), (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" }) })] }), 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: customAudioCodec, title: "AudioCodec" }) })] })) : null] })), 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, 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)(SegmentedControl_1.SegmentedControl, { items: proResProfileOptions, needsWrapping: true }) })] })) : 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.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Output name" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput
|
|
82
|
-
// TODO: Validate and reject folders or weird file names
|
|
83
|
-
, {
|
|
84
|
-
// TODO: Validate and reject folders or weird file names
|
|
85
|
-
warning: existence, style: layout_1.input, type: "text", value: outName, onChange: onValueChange }), existence ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: "Will be overwritten" })) : null] }) })] })] }));
|
|
86
|
-
};
|
|
87
|
-
exports.RenderModalBasic = RenderModalBasic;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const RenderModalGif: React.FC<{
|
|
3
|
-
limitNumberOfGifLoops: boolean;
|
|
4
|
-
setLimitNumberOfGifLoops: (value: React.SetStateAction<boolean>) => void;
|
|
5
|
-
numberOfGifLoopsSetting: number;
|
|
6
|
-
setNumberOfGifLoopsSetting: React.Dispatch<React.SetStateAction<number>>;
|
|
7
|
-
everyNthFrame: number;
|
|
8
|
-
setEveryNthFrameSetting: React.Dispatch<React.SetStateAction<number>>;
|
|
9
|
-
}>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalGif = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const Checkbox_1 = require("../Checkbox");
|
|
7
|
-
const layout_1 = require("./layout");
|
|
8
|
-
const NumberOfLoopsSetting_1 = require("./NumberOfLoopsSetting");
|
|
9
|
-
const NumberSetting_1 = require("./NumberSetting");
|
|
10
|
-
const RenderModalGif = ({ everyNthFrame, limitNumberOfGifLoops, numberOfGifLoopsSetting, setEveryNthFrameSetting, setLimitNumberOfGifLoops, setNumberOfGifLoopsSetting, }) => {
|
|
11
|
-
const onShouldLimitNumberOfGifLoops = (0, react_1.useCallback)((e) => {
|
|
12
|
-
setLimitNumberOfGifLoops(e.target.checked);
|
|
13
|
-
}, [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] }));
|
|
15
|
-
};
|
|
16
|
-
exports.RenderModalGif = RenderModalGif;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalHr = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const hrStyle = {
|
|
6
|
-
margin: '0 0 0 0',
|
|
7
|
-
padding: '0 0 0 0',
|
|
8
|
-
border: 'none',
|
|
9
|
-
borderTop: '1px solid #000',
|
|
10
|
-
marginRight: 16,
|
|
11
|
-
marginLeft: 16,
|
|
12
|
-
marginTop: 8,
|
|
13
|
-
marginBottom: 8,
|
|
14
|
-
};
|
|
15
|
-
const RenderModalHr = () => {
|
|
16
|
-
return (0, jsx_runtime_1.jsx)("div", { style: hrStyle });
|
|
17
|
-
};
|
|
18
|
-
exports.RenderModalHr = RenderModalHr;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PixelFormat, StillImageFormat, VideoImageFormat } from '@remotion/renderer';
|
|
3
|
-
import type { SegmentedControlItem } from '../SegmentedControl';
|
|
4
|
-
import type { RenderType } from './RenderModalAdvanced';
|
|
5
|
-
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
6
|
-
export declare type QualityControl = typeof qualityControlModes[number];
|
|
7
|
-
export declare const RenderModalPicture: React.FC<{
|
|
8
|
-
renderMode: RenderType;
|
|
9
|
-
scale: number;
|
|
10
|
-
setScale: React.Dispatch<React.SetStateAction<number>>;
|
|
11
|
-
pixelFormat: PixelFormat;
|
|
12
|
-
setPixelFormat: React.Dispatch<React.SetStateAction<PixelFormat>>;
|
|
13
|
-
imageFormatOptions: SegmentedControlItem[];
|
|
14
|
-
setQualityControl: React.Dispatch<React.SetStateAction<QualityControl>>;
|
|
15
|
-
qualityControlType: QualityControl;
|
|
16
|
-
videoImageFormat: VideoImageFormat;
|
|
17
|
-
stillImageFormat: StillImageFormat;
|
|
18
|
-
setQuality: React.Dispatch<React.SetStateAction<number>>;
|
|
19
|
-
quality: number;
|
|
20
|
-
maxCrf: number;
|
|
21
|
-
minCrf: number;
|
|
22
|
-
setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
23
|
-
shouldDisplayCrfOption: boolean;
|
|
24
|
-
setCustomTargetVideoBitrateValue: React.Dispatch<React.SetStateAction<string>>;
|
|
25
|
-
crf: number;
|
|
26
|
-
customTargetVideoBitrate: string;
|
|
27
|
-
}>;
|
|
28
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderModalPicture = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const client_1 = require("@remotion/renderer/client");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const Checkmark_1 = require("../../icons/Checkmark");
|
|
8
|
-
const ComboBox_1 = require("../NewComposition/ComboBox");
|
|
9
|
-
const RemInput_1 = require("../NewComposition/RemInput");
|
|
10
|
-
const SegmentedControl_1 = require("../SegmentedControl");
|
|
11
|
-
const layout_1 = require("./layout");
|
|
12
|
-
const NumberSetting_1 = require("./NumberSetting");
|
|
13
|
-
const QualitySetting_1 = require("./QualitySetting");
|
|
14
|
-
const RenderModalHr_1 = require("./RenderModalHr");
|
|
15
|
-
const ScaleSetting_1 = require("./ScaleSetting");
|
|
16
|
-
const qualityControlModes = ['crf', 'bitrate'];
|
|
17
|
-
const RenderModalPicture = ({ renderMode, scale, setScale, pixelFormat, setPixelFormat, imageFormatOptions, setQualityControl, qualityControlType, videoImageFormat, setQuality, quality, maxCrf, minCrf, setCrf, shouldDisplayCrfOption, setCustomTargetVideoBitrateValue, crf, customTargetVideoBitrate, stillImageFormat, }) => {
|
|
18
|
-
const pixelFormatOptions = (0, react_1.useMemo)(() => {
|
|
19
|
-
return client_1.BrowserSafeApis.validPixelFormats.map((option) => {
|
|
20
|
-
return {
|
|
21
|
-
label: option,
|
|
22
|
-
onClick: () => setPixelFormat(option),
|
|
23
|
-
key: option,
|
|
24
|
-
id: option,
|
|
25
|
-
keyHint: null,
|
|
26
|
-
leftItem: pixelFormat === option ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
27
|
-
quickSwitcherLabel: null,
|
|
28
|
-
subMenu: null,
|
|
29
|
-
type: 'item',
|
|
30
|
-
value: option,
|
|
31
|
-
};
|
|
32
|
-
});
|
|
33
|
-
}, [pixelFormat, setPixelFormat]);
|
|
34
|
-
const qualityControlOptions = (0, react_1.useMemo)(() => {
|
|
35
|
-
return qualityControlModes.map((option) => {
|
|
36
|
-
return {
|
|
37
|
-
label: option === 'crf' ? 'CRF' : 'Bitrate',
|
|
38
|
-
onClick: () => setQualityControl(option),
|
|
39
|
-
key: option,
|
|
40
|
-
selected: qualityControlType === option,
|
|
41
|
-
};
|
|
42
|
-
});
|
|
43
|
-
}, [qualityControlType, setQualityControl]);
|
|
44
|
-
const onTargetVideoBitrateChanged = (0, react_1.useCallback)((e) => {
|
|
45
|
-
setCustomTargetVideoBitrateValue(e.target.value);
|
|
46
|
-
}, [setCustomTargetVideoBitrateValue]);
|
|
47
|
-
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)(QualitySetting_1.QualitySetting, { setQuality: setQuality, quality: quality })), renderMode === 'still' && stillImageFormat === 'jpeg' && ((0, jsx_runtime_1.jsx)(QualitySetting_1.QualitySetting, { setQuality: setQuality, quality: quality })), (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), 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 &&
|
|
48
|
-
qualityControlType === 'crf' &&
|
|
49
|
-
renderMode !== 'still' ? ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: minCrf, max: maxCrf, name: "CRF", onValueChanged: setCrf, value: crf, step: 1 })) : 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)("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 }) }) })] })) : null, (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), renderMode === 'video' ? ((0, jsx_runtime_1.jsx)(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale })) : null, (0, jsx_runtime_1.jsx)(RenderModalHr_1.RenderModalHr, {}), 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] }));
|
|
50
|
-
};
|
|
51
|
-
exports.RenderModalPicture = RenderModalPicture;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ScaleSetting = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const NumberSetting_1 = require("./NumberSetting");
|
|
6
|
-
const MIN_SCALE = 0.1;
|
|
7
|
-
const MAX_SCALE = 10;
|
|
8
|
-
const ScaleSetting = ({ scale, setScale }) => {
|
|
9
|
-
return ((0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { min: MIN_SCALE, max: MAX_SCALE, step: 0.1, name: "Scale", onValueChanged: setScale, value: scale }));
|
|
10
|
-
};
|
|
11
|
-
exports.ScaleSetting = ScaleSetting;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanReadableAudioCodec = void 0;
|
|
4
|
-
const humanReadableAudioCodec = (audioCodec) => {
|
|
5
|
-
if (audioCodec === 'aac') {
|
|
6
|
-
return 'AAC';
|
|
7
|
-
}
|
|
8
|
-
if (audioCodec === 'mp3') {
|
|
9
|
-
return 'MP3';
|
|
10
|
-
}
|
|
11
|
-
if (audioCodec === 'pcm-16') {
|
|
12
|
-
return 'Lossless';
|
|
13
|
-
}
|
|
14
|
-
if (audioCodec === 'opus') {
|
|
15
|
-
return 'Opus';
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
exports.humanReadableAudioCodec = humanReadableAudioCodec;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanReadableCodec = void 0;
|
|
4
|
-
const humanReadableCodec = (codec) => {
|
|
5
|
-
if (codec === 'aac') {
|
|
6
|
-
return 'AAC';
|
|
7
|
-
}
|
|
8
|
-
if (codec === 'mp3') {
|
|
9
|
-
return 'MP3';
|
|
10
|
-
}
|
|
11
|
-
if (codec === 'gif') {
|
|
12
|
-
return 'GIF';
|
|
13
|
-
}
|
|
14
|
-
if (codec === 'h264') {
|
|
15
|
-
return 'H.264';
|
|
16
|
-
}
|
|
17
|
-
if (codec === 'h264-mkv') {
|
|
18
|
-
return 'H.264 MKV';
|
|
19
|
-
}
|
|
20
|
-
if (codec === 'h265') {
|
|
21
|
-
return 'H.265';
|
|
22
|
-
}
|
|
23
|
-
if (codec === 'prores') {
|
|
24
|
-
return 'ProRes';
|
|
25
|
-
}
|
|
26
|
-
if (codec === 'vp8') {
|
|
27
|
-
return 'WebM VP8';
|
|
28
|
-
}
|
|
29
|
-
if (codec === 'vp9') {
|
|
30
|
-
return 'WebM VP9';
|
|
31
|
-
}
|
|
32
|
-
if (codec === 'wav') {
|
|
33
|
-
return 'Waveform';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
exports.humanReadableCodec = humanReadableCodec;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.input = exports.rightRow = exports.label = exports.optionRow = void 0;
|
|
4
|
-
const colors_1 = require("../../helpers/colors");
|
|
5
|
-
exports.optionRow = {
|
|
6
|
-
display: 'flex',
|
|
7
|
-
flexDirection: 'row',
|
|
8
|
-
alignItems: 'flex-start',
|
|
9
|
-
minHeight: 40,
|
|
10
|
-
paddingLeft: 16,
|
|
11
|
-
paddingRight: 16,
|
|
12
|
-
paddingTop: 8,
|
|
13
|
-
paddingBottom: 8,
|
|
14
|
-
};
|
|
15
|
-
exports.label = {
|
|
16
|
-
width: 150,
|
|
17
|
-
fontSize: 15,
|
|
18
|
-
lineHeight: '40px',
|
|
19
|
-
color: colors_1.LIGHT_TEXT,
|
|
20
|
-
};
|
|
21
|
-
exports.rightRow = {
|
|
22
|
-
display: 'flex',
|
|
23
|
-
flexDirection: 'row',
|
|
24
|
-
justifyContent: 'flex-end',
|
|
25
|
-
alignSelf: 'center',
|
|
26
|
-
flex: 1,
|
|
27
|
-
};
|
|
28
|
-
exports.input = {
|
|
29
|
-
minWidth: 250,
|
|
30
|
-
textAlign: 'right',
|
|
31
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CircularProgress = exports.RENDER_STATUS_INDICATOR_SIZE = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const colors_1 = require("../../helpers/colors");
|
|
6
|
-
exports.RENDER_STATUS_INDICATOR_SIZE = 16;
|
|
7
|
-
const STROKE_WIDTH = 3;
|
|
8
|
-
const container = {
|
|
9
|
-
height: exports.RENDER_STATUS_INDICATOR_SIZE,
|
|
10
|
-
width: exports.RENDER_STATUS_INDICATOR_SIZE,
|
|
11
|
-
transform: `rotate(-90deg)`,
|
|
12
|
-
};
|
|
13
|
-
const CircularProgress = ({ progress }) => {
|
|
14
|
-
const r = exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH;
|
|
15
|
-
const circumference = r * Math.PI * 2;
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: container, viewBox: `0 0 ${exports.RENDER_STATUS_INDICATOR_SIZE} ${exports.RENDER_STATUS_INDICATOR_SIZE}`, children: (0, jsx_runtime_1.jsx)("circle", { r: exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH, stroke: colors_1.LIGHT_TEXT, fill: "none", strokeWidth: STROKE_WIDTH, cx: exports.RENDER_STATUS_INDICATOR_SIZE / 2, cy: exports.RENDER_STATUS_INDICATOR_SIZE / 2, strokeDasharray: `${circumference} ${circumference}`, strokeMiterlimit: 0, strokeDashoffset: (1 - progress) * circumference }) }));
|
|
17
|
-
};
|
|
18
|
-
exports.CircularProgress = CircularProgress;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueError = 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 z_index_1 = require("../../state/z-index");
|
|
8
|
-
const item_style_1 = require("./item-style");
|
|
9
|
-
const outputLocation = {
|
|
10
|
-
...item_style_1.renderQueueItemSubtitleStyle,
|
|
11
|
-
};
|
|
12
|
-
const RenderQueueError = ({ job }) => {
|
|
13
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
14
|
-
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
15
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
16
|
-
setSelectedModal({
|
|
17
|
-
type: 'render-error',
|
|
18
|
-
job,
|
|
19
|
-
});
|
|
20
|
-
}, [job, setSelectedModal]);
|
|
21
|
-
if (job.status !== 'failed') {
|
|
22
|
-
throw new Error('should not have rendered this component');
|
|
23
|
-
}
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.error.message, children: job.error.message }));
|
|
25
|
-
};
|
|
26
|
-
exports.RenderQueueError = RenderQueueError;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueItem = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const layout_1 = require("../layout");
|
|
6
|
-
const RenderQueueError_1 = require("./RenderQueueError");
|
|
7
|
-
const RenderQueueItemCancelButton_1 = require("./RenderQueueItemCancelButton");
|
|
8
|
-
const RenderQueueItemStatus_1 = require("./RenderQueueItemStatus");
|
|
9
|
-
const RenderQueueOutputName_1 = require("./RenderQueueOutputName");
|
|
10
|
-
const RenderQueueProgressMessage_1 = require("./RenderQueueProgressMessage");
|
|
11
|
-
const RenderQueueRemoveItem_1 = require("./RenderQueueRemoveItem");
|
|
12
|
-
const RenderQueueRepeat_1 = require("./RenderQueueRepeat");
|
|
13
|
-
const container = {
|
|
14
|
-
padding: 12,
|
|
15
|
-
display: 'flex',
|
|
16
|
-
flexDirection: 'row',
|
|
17
|
-
paddingBottom: 10,
|
|
18
|
-
paddingRight: 4,
|
|
19
|
-
};
|
|
20
|
-
const title = {
|
|
21
|
-
fontSize: 13,
|
|
22
|
-
lineHeight: 1,
|
|
23
|
-
};
|
|
24
|
-
const right = {
|
|
25
|
-
flex: 1,
|
|
26
|
-
display: 'flex',
|
|
27
|
-
flexDirection: 'column',
|
|
28
|
-
overflow: 'hidden',
|
|
29
|
-
};
|
|
30
|
-
const subtitle = {
|
|
31
|
-
maxWidth: '100%',
|
|
32
|
-
flex: 1,
|
|
33
|
-
display: 'flex',
|
|
34
|
-
overflow: 'hidden',
|
|
35
|
-
};
|
|
36
|
-
const RenderQueueItem = ({ job }) => {
|
|
37
|
-
return ((0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, align: "center", children: [(0, jsx_runtime_1.jsx)(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsxs)("div", { style: right, children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: job.compositionId }), (0, jsx_runtime_1.jsx)("div", { style: subtitle, children: job.status === 'done' ? ((0, jsx_runtime_1.jsx)(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : null })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), job.status === 'done' || job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job })) : null, job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : ((0, jsx_runtime_1.jsx)(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job }))] }));
|
|
38
|
-
};
|
|
39
|
-
exports.RenderQueueItem = RenderQueueItem;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueCancelButton = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const InlineAction_1 = require("../InlineAction");
|
|
7
|
-
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
|
-
const actions_1 = require("./actions");
|
|
9
|
-
const RenderQueueCancelButton = ({ job }) => {
|
|
10
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
11
|
-
(0, actions_1.cancelRenderJob)(job).catch((err) => {
|
|
12
|
-
(0, NotificationCenter_1.sendErrorNotification)(`Could not cancel job: ${err.message}`);
|
|
13
|
-
});
|
|
14
|
-
}, [job]);
|
|
15
|
-
const icon = (0, react_1.useMemo)(() => {
|
|
16
|
-
return {
|
|
17
|
-
height: 14,
|
|
18
|
-
};
|
|
19
|
-
}, []);
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentcolor", d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }) }));
|
|
21
|
-
};
|
|
22
|
-
exports.RenderQueueCancelButton = RenderQueueCancelButton;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueItemStatus = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const colors_1 = require("../../helpers/colors");
|
|
6
|
-
const CircularProgress_1 = require("./CircularProgress");
|
|
7
|
-
const iconStyle = {
|
|
8
|
-
height: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
|
|
9
|
-
width: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
|
|
10
|
-
};
|
|
11
|
-
const RenderQueueItemStatus = ({ job }) => {
|
|
12
|
-
if (job.status === 'failed') {
|
|
13
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("svg", { style: iconStyle, viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: colors_1.FAIL_COLOR, d: "M0 160V352L160 512H352L512 352V160L352 0H160L0 160zm353.9 32l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z" }) }) }));
|
|
14
|
-
}
|
|
15
|
-
if (job.status === 'idle') {
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: iconStyle, viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: colors_1.LIGHT_TEXT, d: "M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z" }) }));
|
|
17
|
-
}
|
|
18
|
-
if (job.status === 'done') {
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: iconStyle, viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: colors_1.LIGHT_TEXT, d: "M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM369 209L241 337l-17 17-17-17-64-64-17-17L160 222.1l17 17 47 47L335 175l17-17L385.9 192l-17 17z" }) }));
|
|
20
|
-
}
|
|
21
|
-
if (job.status === 'running') {
|
|
22
|
-
// Add a minimum progress to avoid the progress bar from disappearing
|
|
23
|
-
return (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { progress: Math.max(0.07, job.progress) });
|
|
24
|
-
}
|
|
25
|
-
throw new Error('Unknown job status');
|
|
26
|
-
};
|
|
27
|
-
exports.RenderQueueItemStatus = RenderQueueItemStatus;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueOutputName = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
7
|
-
const actions_1 = require("./actions");
|
|
8
|
-
const item_style_1 = require("./item-style");
|
|
9
|
-
const RenderQueueOutputName = ({ job }) => {
|
|
10
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
11
|
-
(0, actions_1.openInFileExplorer)({ directory: job.outName }).catch((err) => {
|
|
12
|
-
(0, NotificationCenter_1.sendErrorNotification)(`Could not open file: ${err.message}`);
|
|
13
|
-
});
|
|
14
|
-
}, [job.outName]);
|
|
15
|
-
const style = (0, react_1.useMemo)(() => {
|
|
16
|
-
return {
|
|
17
|
-
...item_style_1.renderQueueItemSubtitleStyle,
|
|
18
|
-
cursor: job.deletedOutputLocation ? 'inherit' : 'pointer',
|
|
19
|
-
textDecoration: job.deletedOutputLocation ? 'line-through' : 'none',
|
|
20
|
-
};
|
|
21
|
-
}, [job.deletedOutputLocation]);
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: style, disabled: job.deletedOutputLocation, title: job.deletedOutputLocation ? 'File was deleted' : job.outName, children: job.outName }));
|
|
23
|
-
};
|
|
24
|
-
exports.RenderQueueOutputName = RenderQueueOutputName;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueProgressMessage = 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 z_index_1 = require("../../state/z-index");
|
|
8
|
-
const item_style_1 = require("./item-style");
|
|
9
|
-
const outputLocation = {
|
|
10
|
-
...item_style_1.renderQueueItemSubtitleStyle,
|
|
11
|
-
};
|
|
12
|
-
const RenderQueueProgressMessage = ({ job }) => {
|
|
13
|
-
if (job.status !== 'running') {
|
|
14
|
-
throw new Error('should not have rendered this component');
|
|
15
|
-
}
|
|
16
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
17
|
-
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
18
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
19
|
-
// TODO: Show progress instead
|
|
20
|
-
setSelectedModal({
|
|
21
|
-
type: 'render-error',
|
|
22
|
-
job,
|
|
23
|
-
});
|
|
24
|
-
}, [job, setSelectedModal]);
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.message, children: job.message }));
|
|
26
|
-
};
|
|
27
|
-
exports.RenderQueueProgressMessage = RenderQueueProgressMessage;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RenderQueueRemoveItem = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const InlineAction_1 = require("../InlineAction");
|
|
7
|
-
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
|
-
const actions_1 = require("./actions");
|
|
9
|
-
const RenderQueueRemoveItem = ({ job }) => {
|
|
10
|
-
const onClick = (0, react_1.useCallback)(() => {
|
|
11
|
-
(0, actions_1.removeRenderJob)(job).catch((err) => {
|
|
12
|
-
(0, NotificationCenter_1.sendErrorNotification)(`Could not remove item: ${err.message}`);
|
|
13
|
-
console.log(err);
|
|
14
|
-
});
|
|
15
|
-
}, [job]);
|
|
16
|
-
const icon = (0, react_1.useMemo)(() => {
|
|
17
|
-
return {
|
|
18
|
-
height: 16,
|
|
19
|
-
};
|
|
20
|
-
}, []);
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", 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" }) }) }));
|
|
22
|
-
};
|
|
23
|
-
exports.RenderQueueRemoveItem = RenderQueueRemoveItem;
|