@remotion/cli 4.0.12 → 4.0.15
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/editor/components/AssetSelector.d.ts +2 -0
- package/dist/editor/components/AssetSelector.js +85 -0
- package/dist/editor/components/AssetSelectorItem.d.ts +6 -0
- package/dist/editor/components/AssetSelectorItem.js +125 -0
- package/dist/editor/components/CompositionSelector.js +3 -3
- package/dist/editor/components/CopyButton.js +8 -2
- package/dist/editor/components/ExplorerPanel.d.ts +8 -0
- package/dist/editor/components/ExplorerPanel.js +67 -0
- package/dist/editor/components/InlineAction.d.ts +1 -0
- package/dist/editor/components/InlineAction.js +2 -2
- package/dist/editor/components/OptionsPanel.d.ts +8 -0
- package/dist/editor/components/OptionsPanel.js +112 -0
- package/dist/editor/components/RenderModal/CliCopyButton.js +2 -1
- package/dist/editor/components/RenderModal/MultiRangeSlider.js +4 -7
- package/dist/editor/components/RenderModal/RenderModal.js +7 -7
- package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/editor/components/TopPanel.js +4 -8
- package/dist/editor/components/UpdateModal/UpdateModal.js +4 -1
- package/dist/editor/helpers/copy-text.d.ts +1 -1
- package/dist/editor/helpers/copy-text.js +15 -10
- package/dist/editor/helpers/pick-color.js +12 -7
- package/dist/editor/icons/clipboard.d.ts +4 -0
- package/dist/editor/icons/clipboard.js +6 -0
- package/dist/editor/icons/file.d.ts +3 -1
- package/dist/editor/icons/file.js +1 -1
- package/dist/editor/icons/folder.d.ts +3 -0
- package/dist/editor/icons/folder.js +5 -1
- package/dist/event-source-events.d.ts +1 -0
- package/dist/event-source.js +1 -0
- package/dist/handle-common-errors.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/make-on-download.d.ts +12 -0
- package/dist/make-on-download.js +40 -0
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/preview-server/public-folder.js +3 -0
- package/dist/preview-server/render-queue/process-still.js +1 -1
- package/dist/preview-server/routes.js +1 -0
- package/dist/progress-bar.js +2 -7
- package/dist/render-flows/render.js +17 -25
- package/dist/render-flows/still.d.ts +2 -2
- package/dist/render-flows/still.js +30 -40
- package/dist/still.js +1 -1
- package/dist/studio.js +8 -1
- package/dist/upgrade.d.ts +1 -1
- package/dist/upgrade.js +11 -4
- package/package.json +8 -8
- package/styles/styles.css +7 -17
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudrunCommand: (remotionRoot: string, args: string[]) => Promise<never>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cloudrunCommand = void 0;
|
|
4
|
+
const log_1 = require("./log");
|
|
5
|
+
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
6
|
+
const update_available_1 = require("./preview-server/update-available");
|
|
7
|
+
const cloudrunCommand = async (remotionRoot, args) => {
|
|
8
|
+
try {
|
|
9
|
+
const path = require.resolve('@remotion/cloudrun', {
|
|
10
|
+
paths: [remotionRoot],
|
|
11
|
+
});
|
|
12
|
+
const { CloudrunInternals } = require(path);
|
|
13
|
+
await CloudrunInternals.executeCommand(args, remotionRoot);
|
|
14
|
+
process.exit(0);
|
|
15
|
+
}
|
|
16
|
+
catch (err) {
|
|
17
|
+
const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot, undefined);
|
|
18
|
+
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
19
|
+
log_1.Log.error(err);
|
|
20
|
+
log_1.Log.error('Remotion CloudRun is not installed.');
|
|
21
|
+
log_1.Log.info('');
|
|
22
|
+
log_1.Log.info('You can install it using:');
|
|
23
|
+
log_1.Log.info(`${installCommand} @remotion/cloudrun@${(0, update_available_1.getRemotionVersion)()}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.cloudrunCommand = cloudrunCommand;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.AssetSelector = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const remotion_1 = require("remotion");
|
|
30
|
+
const event_source_1 = require("../../event-source");
|
|
31
|
+
const colors_1 = require("../helpers/colors");
|
|
32
|
+
const z_index_1 = require("../state/z-index");
|
|
33
|
+
const AssetSelectorItem_1 = require("./AssetSelectorItem");
|
|
34
|
+
const styles_1 = require("./Menu/styles");
|
|
35
|
+
const container = {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
flexDirection: 'column',
|
|
38
|
+
flex: 1,
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
41
|
+
};
|
|
42
|
+
// Some redundancy with packages/cli/src/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.tsx
|
|
43
|
+
const emptyState = {
|
|
44
|
+
display: 'flex',
|
|
45
|
+
flex: 1,
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
textAlign: 'center',
|
|
49
|
+
padding: '0 12px',
|
|
50
|
+
};
|
|
51
|
+
const label = {
|
|
52
|
+
color: colors_1.LIGHT_TEXT,
|
|
53
|
+
lineHeight: 1.5,
|
|
54
|
+
fontSize: 14,
|
|
55
|
+
};
|
|
56
|
+
const list = {
|
|
57
|
+
overflowY: 'auto',
|
|
58
|
+
paddingTop: 4,
|
|
59
|
+
paddingBottom: 4,
|
|
60
|
+
};
|
|
61
|
+
const AssetSelector = () => {
|
|
62
|
+
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
63
|
+
const [{ publicFolderExists, staticFiles }, setState] = react_1.default.useState(() => {
|
|
64
|
+
return {
|
|
65
|
+
staticFiles: (0, remotion_1.getStaticFiles)(),
|
|
66
|
+
publicFolderExists: window.remotion_publicFolderExists,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
(0, react_1.useEffect)(() => {
|
|
70
|
+
const onUpdate = () => {
|
|
71
|
+
setState({
|
|
72
|
+
staticFiles: (0, remotion_1.getStaticFiles)(),
|
|
73
|
+
publicFolderExists: window.remotion_publicFolderExists,
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const unsub = (0, event_source_1.subscribeToEvent)('new-public-folder', onUpdate);
|
|
77
|
+
return () => {
|
|
78
|
+
unsub();
|
|
79
|
+
};
|
|
80
|
+
}, []);
|
|
81
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: staticFiles.length === 0 ? (publicFolderExists ? ((0, jsx_runtime_1.jsx)("div", { style: emptyState, children: (0, jsx_runtime_1.jsxs)("div", { style: label, children: ["To add assets, place a file in the", ' ', (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: "public" }), " folder of your project."] }) })) : ((0, jsx_runtime_1.jsx)("div", { style: emptyState, children: (0, jsx_runtime_1.jsxs)("div", { style: label, children: ["To add assets, create a folder called", ' ', (0, jsx_runtime_1.jsx)("code", { style: styles_1.inlineCodeSnippet, children: "public" }), " in the root of your project and place a file in it."] }) }))) : ((0, jsx_runtime_1.jsx)("div", { className: "__remotion-vertical-scrollbar", style: list, children: staticFiles.map((file) => {
|
|
82
|
+
return ((0, jsx_runtime_1.jsx)(AssetSelectorItem_1.AssetSelectorItem, { item: file, tabIndex: tabIndex }, `${file.src}`));
|
|
83
|
+
}) })) }));
|
|
84
|
+
};
|
|
85
|
+
exports.AssetSelector = AssetSelector;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.AssetSelectorItem = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const colors_1 = require("../helpers/colors");
|
|
30
|
+
const copy_text_1 = require("../helpers/copy-text");
|
|
31
|
+
const clipboard_1 = require("../icons/clipboard");
|
|
32
|
+
const file_1 = require("../icons/file");
|
|
33
|
+
const folder_1 = require("../icons/folder");
|
|
34
|
+
const InlineAction_1 = require("./InlineAction");
|
|
35
|
+
const layout_1 = require("./layout");
|
|
36
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
37
|
+
const actions_1 = require("./RenderQueue/actions");
|
|
38
|
+
const ASSET_ITEM_HEIGHT = 32;
|
|
39
|
+
const itemStyle = {
|
|
40
|
+
paddingRight: 10,
|
|
41
|
+
paddingTop: 6,
|
|
42
|
+
paddingBottom: 6,
|
|
43
|
+
fontSize: 13,
|
|
44
|
+
display: 'flex',
|
|
45
|
+
textDecoration: 'none',
|
|
46
|
+
cursor: 'default',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
marginBottom: 1,
|
|
49
|
+
appearance: 'none',
|
|
50
|
+
border: 'none',
|
|
51
|
+
width: '100%',
|
|
52
|
+
textAlign: 'left',
|
|
53
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
54
|
+
height: ASSET_ITEM_HEIGHT,
|
|
55
|
+
};
|
|
56
|
+
const labelStyle = {
|
|
57
|
+
textAlign: 'left',
|
|
58
|
+
textDecoration: 'none',
|
|
59
|
+
fontSize: 13,
|
|
60
|
+
flex: '1 1 0%',
|
|
61
|
+
whiteSpace: 'nowrap',
|
|
62
|
+
overflow: 'hidden',
|
|
63
|
+
textOverflow: 'ellipsis',
|
|
64
|
+
};
|
|
65
|
+
const iconStyle = {
|
|
66
|
+
width: 18,
|
|
67
|
+
height: 18,
|
|
68
|
+
flexShrink: 0,
|
|
69
|
+
};
|
|
70
|
+
const revealIconStyle = {
|
|
71
|
+
height: 12,
|
|
72
|
+
color: 'currentColor',
|
|
73
|
+
};
|
|
74
|
+
const AssetSelectorItem = ({ item, tabIndex }) => {
|
|
75
|
+
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
76
|
+
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
77
|
+
setHovered(true);
|
|
78
|
+
}, []);
|
|
79
|
+
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
80
|
+
setHovered(false);
|
|
81
|
+
}, []);
|
|
82
|
+
const style = (0, react_1.useMemo)(() => {
|
|
83
|
+
return {
|
|
84
|
+
...itemStyle,
|
|
85
|
+
paddingLeft: 12,
|
|
86
|
+
color: colors_1.LIGHT_TEXT,
|
|
87
|
+
};
|
|
88
|
+
}, []);
|
|
89
|
+
const label = (0, react_1.useMemo)(() => {
|
|
90
|
+
return {
|
|
91
|
+
...labelStyle,
|
|
92
|
+
color: colors_1.LIGHT_TEXT,
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
const renderFileExplorerAction = (0, react_1.useCallback)((color) => {
|
|
96
|
+
return (0, jsx_runtime_1.jsx)(folder_1.ExpandedFolderIconSolid, { style: revealIconStyle, color: color });
|
|
97
|
+
}, []);
|
|
98
|
+
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
99
|
+
return (0, jsx_runtime_1.jsx)(clipboard_1.ClipboardIcon, { style: revealIconStyle, color: color });
|
|
100
|
+
}, []);
|
|
101
|
+
const revealInExplorer = react_1.default.useCallback(() => {
|
|
102
|
+
(0, actions_1.openInFileExplorer)({
|
|
103
|
+
directory: window.remotion_publicFolderExists + '/' + item.name,
|
|
104
|
+
}).catch((err) => {
|
|
105
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not open file: ${err.message}`);
|
|
106
|
+
});
|
|
107
|
+
}, [item.name]);
|
|
108
|
+
const copyToClipboard = (0, react_1.useCallback)(() => {
|
|
109
|
+
(0, copy_text_1.copyText)(`staticFile("${item.name}")`)
|
|
110
|
+
.then(() => {
|
|
111
|
+
var _a;
|
|
112
|
+
(_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
|
|
113
|
+
content: `Copied 'staticFile("${item.name}")' to clipboard`,
|
|
114
|
+
created: Date.now(),
|
|
115
|
+
duration: 1000,
|
|
116
|
+
id: String(Math.random()),
|
|
117
|
+
});
|
|
118
|
+
})
|
|
119
|
+
.catch((err) => {
|
|
120
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
|
|
121
|
+
});
|
|
122
|
+
}, [item.name]);
|
|
123
|
+
return ((0, jsx_runtime_1.jsx)(layout_1.Row, { align: "center", children: (0, jsx_runtime_1.jsxs)("div", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, title: item.name, children: [(0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: iconStyle, color: colors_1.LIGHT_TEXT }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: label, children: item.name }), hovered ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { title: "Copy staticFile() name", renderAction: renderCopyAction, onClick: copyToClipboard }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { title: "Open in Explorer", renderAction: renderFileExplorerAction, onClick: revealInExplorer })] })) : null] }) }));
|
|
124
|
+
};
|
|
125
|
+
exports.AssetSelectorItem = AssetSelectorItem;
|
|
@@ -12,10 +12,10 @@ const CompositionSelectorItem_1 = require("./CompositionSelectorItem");
|
|
|
12
12
|
const CurrentComposition_1 = require("./CurrentComposition");
|
|
13
13
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
14
14
|
const container = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
width: '100%',
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
18
17
|
flex: 1,
|
|
18
|
+
overflow: 'hidden',
|
|
19
19
|
backgroundColor: colors_1.BACKGROUND,
|
|
20
20
|
};
|
|
21
21
|
const list = {
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const Button_1 = require("../../preview-server/error-overlay/remotion-overlay/Button");
|
|
7
7
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
8
|
const layout_1 = require("./layout");
|
|
9
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
9
10
|
const iconStyle = {
|
|
10
11
|
width: 16,
|
|
11
12
|
height: 16,
|
|
@@ -22,8 +23,13 @@ const labelStyle = {
|
|
|
22
23
|
const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
|
|
23
24
|
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
24
25
|
const onClick = (0, react_1.useCallback)(() => {
|
|
25
|
-
(0, copy_text_1.copyText)(textToCopy)
|
|
26
|
-
|
|
26
|
+
(0, copy_text_1.copyText)(textToCopy)
|
|
27
|
+
.then(() => {
|
|
28
|
+
setCopied(Date.now());
|
|
29
|
+
})
|
|
30
|
+
.catch((err) => {
|
|
31
|
+
(0, NotificationCenter_1.sendErrorNotification)(`Could not copy: ${err.message}`);
|
|
32
|
+
});
|
|
27
33
|
}, [textToCopy]);
|
|
28
34
|
(0, react_1.useEffect)(() => {
|
|
29
35
|
if (!copied) {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type OptionsSidebarPanel = 'compositions' | 'assets';
|
|
3
|
+
export declare const persistSelectedOptionsSidebarPanel: (panel: OptionsSidebarPanel) => void;
|
|
4
|
+
export declare const optionsSidebarTabs: import("react").RefObject<{
|
|
5
|
+
selectRendersPanel: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const ExplorerPanel: React.FC<{}>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExplorerPanel = exports.optionsSidebarTabs = exports.persistSelectedOptionsSidebarPanel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const AssetSelector_1 = require("./AssetSelector");
|
|
9
|
+
const CompositionSelector_1 = require("./CompositionSelector");
|
|
10
|
+
const Tabs_1 = require("./Tabs");
|
|
11
|
+
const container = {
|
|
12
|
+
height: '100%',
|
|
13
|
+
width: '100%',
|
|
14
|
+
maxWidth: '100%',
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
flex: 1,
|
|
18
|
+
};
|
|
19
|
+
const localStorageKey = 'remotion.sidebarPanel';
|
|
20
|
+
const getSelectedPanel = () => {
|
|
21
|
+
const panel = localStorage.getItem(localStorageKey);
|
|
22
|
+
if (panel === 'assets') {
|
|
23
|
+
return 'assets';
|
|
24
|
+
}
|
|
25
|
+
return 'compositions';
|
|
26
|
+
};
|
|
27
|
+
const tabsContainer = {
|
|
28
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
29
|
+
};
|
|
30
|
+
const persistSelectedOptionsSidebarPanel = (panel) => {
|
|
31
|
+
localStorage.setItem(localStorageKey, panel);
|
|
32
|
+
};
|
|
33
|
+
exports.persistSelectedOptionsSidebarPanel = persistSelectedOptionsSidebarPanel;
|
|
34
|
+
exports.optionsSidebarTabs = (0, react_1.createRef)();
|
|
35
|
+
const ExplorerPanel = () => {
|
|
36
|
+
const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
|
|
37
|
+
const onCompositionsSelected = (0, react_1.useCallback)(() => {
|
|
38
|
+
setPanel('compositions');
|
|
39
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('compositions');
|
|
40
|
+
}, []);
|
|
41
|
+
const onAssetsSelected = (0, react_1.useCallback)(() => {
|
|
42
|
+
setPanel('assets');
|
|
43
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('assets');
|
|
44
|
+
}, []);
|
|
45
|
+
(0, react_1.useImperativeHandle)(exports.optionsSidebarTabs, () => {
|
|
46
|
+
return {
|
|
47
|
+
selectRendersPanel: () => {
|
|
48
|
+
setPanel('assets');
|
|
49
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('assets');
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}, []);
|
|
53
|
+
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
54
|
+
const composition = (0, react_1.useMemo)(() => {
|
|
55
|
+
for (const comp of compositions) {
|
|
56
|
+
if (comp.id === currentComposition) {
|
|
57
|
+
return comp;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}, [compositions, currentComposition]);
|
|
62
|
+
if (composition === null) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), (0, jsx_runtime_1.jsx)(Tabs_1.Tab, { selected: panel === 'assets', onClick: onAssetsSelected, children: "Assets" })] }) }), panel === 'compositions' ? (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) : (0, jsx_runtime_1.jsx)(AssetSelector_1.AssetSelector, {})] }));
|
|
66
|
+
};
|
|
67
|
+
exports.ExplorerPanel = ExplorerPanel;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const z_index_1 = require("../state/z-index");
|
|
8
|
-
const InlineAction = ({ renderAction, onClick, disabled }) => {
|
|
8
|
+
const InlineAction = ({ renderAction, onClick, disabled, title }) => {
|
|
9
9
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
10
10
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
11
11
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
@@ -29,6 +29,6 @@ const InlineAction = ({ renderAction, onClick, disabled }) => {
|
|
|
29
29
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
30
30
|
};
|
|
31
31
|
}, [disabled, hovered]);
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)("a", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, children: renderAction(hovered ? 'white' : colors_1.LIGHT_TEXT) }));
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)("a", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ? 'white' : colors_1.LIGHT_TEXT) }));
|
|
33
33
|
};
|
|
34
34
|
exports.InlineAction = InlineAction;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type OptionsSidebarPanel = 'input-props' | 'renders';
|
|
3
|
+
export declare const persistSelectedOptionsSidebarPanel: (panel: OptionsSidebarPanel) => void;
|
|
4
|
+
export declare const optionsSidebarTabs: React.RefObject<{
|
|
5
|
+
selectRendersPanel: () => void;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const OptionsPanel: React.FC<{}>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OptionsPanel = exports.optionsSidebarTabs = exports.persistSelectedOptionsSidebarPanel = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const ShortcutHint_1 = require("../../preview-server/error-overlay/remotion-overlay/ShortcutHint");
|
|
8
|
+
const colors_1 = require("../helpers/colors");
|
|
9
|
+
const DataEditor_1 = require("./RenderModal/DataEditor");
|
|
10
|
+
const deep_equal_1 = require("./RenderModal/SchemaEditor/deep-equal");
|
|
11
|
+
const RenderQueue_1 = require("./RenderQueue");
|
|
12
|
+
const RendersTab_1 = require("./RendersTab");
|
|
13
|
+
const Tabs_1 = require("./Tabs");
|
|
14
|
+
const container = {
|
|
15
|
+
height: '100%',
|
|
16
|
+
width: '100%',
|
|
17
|
+
position: 'absolute',
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexDirection: 'column',
|
|
20
|
+
};
|
|
21
|
+
const circle = {
|
|
22
|
+
width: 8,
|
|
23
|
+
height: 8,
|
|
24
|
+
borderRadius: 4,
|
|
25
|
+
};
|
|
26
|
+
const localStorageKey = 'remotion.sidebarPanel';
|
|
27
|
+
const getSelectedPanel = () => {
|
|
28
|
+
const panel = localStorage.getItem(localStorageKey);
|
|
29
|
+
if (panel === 'renders') {
|
|
30
|
+
return 'renders';
|
|
31
|
+
}
|
|
32
|
+
return 'input-props';
|
|
33
|
+
};
|
|
34
|
+
const tabsContainer = {
|
|
35
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
36
|
+
};
|
|
37
|
+
const persistSelectedOptionsSidebarPanel = (panel) => {
|
|
38
|
+
localStorage.setItem(localStorageKey, panel);
|
|
39
|
+
};
|
|
40
|
+
exports.persistSelectedOptionsSidebarPanel = persistSelectedOptionsSidebarPanel;
|
|
41
|
+
exports.optionsSidebarTabs = (0, react_1.createRef)();
|
|
42
|
+
const OptionsPanel = () => {
|
|
43
|
+
const { props, updateProps } = (0, react_1.useContext)(remotion_1.Internals.EditorPropsContext);
|
|
44
|
+
const [saving, setSaving] = (0, react_1.useState)(false);
|
|
45
|
+
const [panel, setPanel] = (0, react_1.useState)(() => getSelectedPanel());
|
|
46
|
+
const onPropsSelected = (0, react_1.useCallback)(() => {
|
|
47
|
+
setPanel('input-props');
|
|
48
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('input-props');
|
|
49
|
+
}, []);
|
|
50
|
+
const onRendersSelected = (0, react_1.useCallback)(() => {
|
|
51
|
+
setPanel('renders');
|
|
52
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('renders');
|
|
53
|
+
}, []);
|
|
54
|
+
(0, react_1.useImperativeHandle)(exports.optionsSidebarTabs, () => {
|
|
55
|
+
return {
|
|
56
|
+
selectRendersPanel: () => {
|
|
57
|
+
setPanel('renders');
|
|
58
|
+
(0, exports.persistSelectedOptionsSidebarPanel)('renders');
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
const { compositions, currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
63
|
+
const circleStyle = (0, react_1.useMemo)(() => {
|
|
64
|
+
const onTabColor = saving ? colors_1.LIGHT_TEXT : 'white';
|
|
65
|
+
return {
|
|
66
|
+
...circle,
|
|
67
|
+
backgroundColor: panel === 'input-props' ? onTabColor : colors_1.LIGHT_TEXT,
|
|
68
|
+
cursor: 'help',
|
|
69
|
+
};
|
|
70
|
+
}, [panel, saving]);
|
|
71
|
+
const composition = (0, react_1.useMemo)(() => {
|
|
72
|
+
for (const comp of compositions) {
|
|
73
|
+
if (comp.id === currentComposition) {
|
|
74
|
+
return comp;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}, [compositions, currentComposition]);
|
|
79
|
+
const saveToolTip = (0, react_1.useMemo)(() => {
|
|
80
|
+
return process.env.KEYBOARD_SHORTCUTS_ENABLED
|
|
81
|
+
? `Save using ${ShortcutHint_1.cmdOrCtrlCharacter}+S`
|
|
82
|
+
: 'There are unsaved changes';
|
|
83
|
+
}, []);
|
|
84
|
+
const setInputProps = (0, react_1.useCallback)((newProps) => {
|
|
85
|
+
if (composition === null) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
updateProps({
|
|
89
|
+
id: composition.id,
|
|
90
|
+
defaultProps: composition.defaultProps,
|
|
91
|
+
newProps,
|
|
92
|
+
});
|
|
93
|
+
}, [composition, updateProps]);
|
|
94
|
+
const actualProps = (0, react_1.useMemo)(() => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
if (composition === null) {
|
|
97
|
+
return {};
|
|
98
|
+
}
|
|
99
|
+
return (_b = (_a = props[composition.id]) !== null && _a !== void 0 ? _a : composition.defaultProps) !== null && _b !== void 0 ? _b : {};
|
|
100
|
+
}, [composition, props]);
|
|
101
|
+
const unsavedChangesExist = (0, react_1.useMemo)(() => {
|
|
102
|
+
if (composition === null || composition.defaultProps === undefined) {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
return !(0, deep_equal_1.deepEqual)(composition.defaultProps, actualProps);
|
|
106
|
+
}, [actualProps, composition]);
|
|
107
|
+
if (composition === null) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, className: "css-reset", children: [(0, jsx_runtime_1.jsx)("div", { style: tabsContainer, children: (0, jsx_runtime_1.jsxs)(Tabs_1.Tabs, { children: [(0, jsx_runtime_1.jsxs)(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onPropsSelected, style: { justifyContent: 'space-between' }, children: ["Props", unsavedChangesExist ? ((0, jsx_runtime_1.jsx)("div", { title: saveToolTip, style: circleStyle })) : null] }), (0, jsx_runtime_1.jsx)(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })] }) }), panel === 'renders' ? ((0, jsx_runtime_1.jsx)(RenderQueue_1.RenderQueue, {})) : ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { unresolvedComposition: composition, inputProps: actualProps, setInputProps: setInputProps, mayShowSaveButton: true, propsEditType: "default-props", saving: saving, setSaving: setSaving }, composition.id))] }));
|
|
111
|
+
};
|
|
112
|
+
exports.OptionsPanel = OptionsPanel;
|
|
@@ -4,6 +4,7 @@ exports.CliCopyButton = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const clipboard_1 = require("../../icons/clipboard");
|
|
7
8
|
const svgStyle = {
|
|
8
9
|
width: 16,
|
|
9
10
|
height: 16,
|
|
@@ -32,7 +33,7 @@ const CliCopyButton = ({ valueToCopy, }) => {
|
|
|
32
33
|
const fillColor = (0, react_1.useMemo)(() => {
|
|
33
34
|
return hovered ? 'white' : colors_1.LIGHT_TEXT;
|
|
34
35
|
}, [hovered]);
|
|
35
|
-
const clipboardIcon = (
|
|
36
|
+
const clipboardIcon = (0, jsx_runtime_1.jsx)(clipboard_1.ClipboardIcon, { color: fillColor, style: svgStyle });
|
|
36
37
|
const checkSvg = ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", style: svgStyle, children: (0, jsx_runtime_1.jsx)("path", { fill: fillColor, d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }) }));
|
|
37
38
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
38
39
|
setHovered(true);
|
|
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
|
|
|
7
7
|
const container = {
|
|
8
8
|
borderColor: 'black',
|
|
9
9
|
borderStyle: 'solid',
|
|
10
|
+
borderWidth: '2px',
|
|
10
11
|
height: 39,
|
|
11
12
|
width: 220,
|
|
12
13
|
position: 'relative',
|
|
@@ -15,16 +16,12 @@ const container = {
|
|
|
15
16
|
marginRight: 8,
|
|
16
17
|
borderRadius: 2,
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
position: 'relative',
|
|
20
|
-
height: 38,
|
|
21
|
-
width: 220,
|
|
22
|
-
};
|
|
19
|
+
// blue slider
|
|
23
20
|
const sliderRange = {
|
|
24
21
|
position: 'absolute',
|
|
25
22
|
top: 0,
|
|
26
23
|
backgroundColor: colors_1.BLUE,
|
|
27
|
-
height:
|
|
24
|
+
height: 35,
|
|
28
25
|
};
|
|
29
26
|
const MultiRangeSlider = ({ min, max, start, end, step, onLeftThumbDrag, onRightThumbDrag, }) => {
|
|
30
27
|
const getPercent = (0, react_1.useCallback)((value) => Math.round(((value - min) / (max - min)) * 100), [min, max]);
|
|
@@ -45,6 +42,6 @@ const MultiRangeSlider = ({ min, max, start, end, step, onLeftThumbDrag, onRight
|
|
|
45
42
|
const value = Math.max(Number(event.target.value), start + 1);
|
|
46
43
|
onRightThumbDrag(value);
|
|
47
44
|
}, [onRightThumbDrag, start]);
|
|
48
|
-
return ((0, jsx_runtime_1.
|
|
45
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("input", { type: "range", min: min, max: max, value: start, step: step, onChange: onChangeLeft, className: "__remotion_thumb" }), (0, jsx_runtime_1.jsx)("input", { type: "range", min: min, max: max, value: end, step: step, onChange: onChangeRight, className: "__remotion_thumb" }), (0, jsx_runtime_1.jsx)("div", { style: rangeStyle })] }));
|
|
49
46
|
};
|
|
50
47
|
exports.MultiRangeSlider = MultiRangeSlider;
|
|
@@ -24,8 +24,8 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
|
24
24
|
const styles_1 = require("../Menu/styles");
|
|
25
25
|
const ModalContainer_1 = require("../ModalContainer");
|
|
26
26
|
const ModalHeader_1 = require("../ModalHeader");
|
|
27
|
+
const OptionsPanel_1 = require("../OptionsPanel");
|
|
27
28
|
const actions_1 = require("../RenderQueue/actions");
|
|
28
|
-
const RightPanel_1 = require("../RightPanel");
|
|
29
29
|
const SegmentedControl_1 = require("../SegmentedControl");
|
|
30
30
|
const Spinner_1 = require("../Spinner");
|
|
31
31
|
const vertical_1 = require("../Tabs/vertical");
|
|
@@ -63,7 +63,7 @@ const container = {
|
|
|
63
63
|
padding: '12px 16px',
|
|
64
64
|
borderBottom: '1px solid black',
|
|
65
65
|
};
|
|
66
|
-
const
|
|
66
|
+
const optionsPanel = {
|
|
67
67
|
display: 'flex',
|
|
68
68
|
width: '100%',
|
|
69
69
|
};
|
|
@@ -311,8 +311,8 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
311
311
|
const onClickStill = (0, react_1.useCallback)(() => {
|
|
312
312
|
var _a;
|
|
313
313
|
setSidebarCollapsedState({ left: null, right: 'expanded' });
|
|
314
|
-
(0,
|
|
315
|
-
(_a =
|
|
314
|
+
(0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
|
|
315
|
+
(_a = OptionsPanel_1.optionsSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
316
316
|
dispatchIfMounted({ type: 'start' });
|
|
317
317
|
(0, actions_1.addStillRenderJob)({
|
|
318
318
|
compositionId: resolvedComposition.id,
|
|
@@ -361,8 +361,8 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
361
361
|
const onClickVideo = (0, react_1.useCallback)(() => {
|
|
362
362
|
var _a;
|
|
363
363
|
setSidebarCollapsedState({ left: null, right: 'expanded' });
|
|
364
|
-
(0,
|
|
365
|
-
(_a =
|
|
364
|
+
(0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
|
|
365
|
+
(_a = OptionsPanel_1.optionsSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
|
|
366
366
|
dispatchIfMounted({ type: 'start' });
|
|
367
367
|
(0, actions_1.addVideoRenderJob)({
|
|
368
368
|
compositionId: resolvedComposition.id,
|
|
@@ -585,7 +585,7 @@ const RenderModal = ({ initialFrame, initialVideoImageFormat, initialStillImageF
|
|
|
585
585
|
return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: `Render ${resolvedComposition.id}` }), (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: {
|
|
586
586
|
...buttonStyle,
|
|
587
587
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
588
|
-
}, 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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:
|
|
588
|
+
}, 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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)(vertical_1.VerticalTab, { 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: optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(RenderModalBasic_1.RenderModalBasic, { codec: codec, resolvedComposition: resolvedComposition, 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, videoImageFormat: videoImageFormat, stillImageFormat: stillImageFormat, shouldDisplayQualityControlPicker: supportsBothQualityControls })) : 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)(DataEditor_1.DataEditor, { inputProps: inputProps, setInputProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving })) : ((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 })) })] })] }));
|
|
589
589
|
};
|
|
590
590
|
const RenderModalWithLoader = (props) => {
|
|
591
591
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|