@remotion/studio 4.0.464 → 4.0.466
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/components/CompositionSelectorItem.js +16 -79
- package/dist/components/EditorContent.js +1 -3
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +35 -23
- package/dist/components/NewComposition/DeleteComposition.js +3 -1
- package/dist/components/NewComposition/DiffPreview.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +3 -1
- package/dist/components/NewComposition/MenuContent.js +1 -0
- package/dist/components/NewComposition/RenameComposition.js +4 -2
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/RenderModalAdvanced.d.ts +1 -11
- package/dist/components/RenderModal/RenderModalAdvanced.js +4 -50
- package/dist/components/RenderModal/RenderModalEncoding.d.ts +37 -0
- package/dist/components/RenderModal/RenderModalEncoding.js +165 -0
- package/dist/components/RenderModal/RenderModalPicture.d.ts +1 -22
- package/dist/components/RenderModal/RenderModalPicture.js +6 -84
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +16 -4
- package/dist/components/RenderQueue/actions.d.ts +4 -2
- package/dist/components/RenderQueue/actions.js +4 -2
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/Timeline.js +6 -4
- package/dist/components/Timeline/TimelineEffectFieldRow.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectGroupRow.js +70 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -1
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +123 -0
- package/dist/components/Timeline/TimelineSchemaField.js +2 -1
- package/dist/components/Timeline/TimelineStack/index.js +7 -47
- package/dist/components/Timeline/TimelineTimeIndicators.js +4 -11
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/TimelineVideoInfo.js +25 -8
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +22 -0
- package/dist/components/Timeline/get-timeline-video-info-widths.d.ts +9 -0
- package/dist/components/Timeline/get-timeline-video-info-widths.js +11 -0
- package/dist/components/Timeline/use-resolved-stack.d.ts +1 -0
- package/dist/components/Timeline/use-resolved-stack.js +10 -1
- package/dist/components/composition-menu-items.d.ts +12 -0
- package/dist/components/composition-menu-items.js +166 -0
- package/dist/esm/{chunk-mawnnpzg.js → chunk-sa3dm85y.js} +3843 -3284
- package/dist/esm/internals.mjs +3843 -3284
- package/dist/esm/previewEntry.mjs +3585 -3026
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/make-render-command.d.ts +2 -2
- package/dist/helpers/make-render-command.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +8 -0
- package/dist/helpers/open-in-editor.js +58 -1
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/render-modal-sections.js +35 -5
- package/dist/helpers/resolved-stack-to-symbolicated.d.ts +3 -0
- package/dist/helpers/resolved-stack-to-symbolicated.js +16 -0
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +1 -0
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
|
@@ -3,18 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CompositionSelectorItem = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
7
|
const colors_1 = require("../helpers/colors");
|
|
7
8
|
const is_composition_still_1 = require("../helpers/is-composition-still");
|
|
9
|
+
const noop_1 = require("../helpers/noop");
|
|
8
10
|
const sidebar_scroll_into_view_1 = require("../helpers/sidebar-scroll-into-view");
|
|
9
11
|
const folder_1 = require("../icons/folder");
|
|
10
12
|
const still_1 = require("../icons/still");
|
|
11
13
|
const video_1 = require("../icons/video");
|
|
12
14
|
const modals_1 = require("../state/modals");
|
|
15
|
+
const composition_menu_items_1 = require("./composition-menu-items");
|
|
13
16
|
const CompositionContextButton_1 = require("./CompositionContextButton");
|
|
14
17
|
const ContextMenu_1 = require("./ContextMenu");
|
|
15
18
|
const layout_1 = require("./layout");
|
|
16
|
-
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
17
19
|
const SidebarRenderButton_1 = require("./SidebarRenderButton");
|
|
20
|
+
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
18
21
|
const COMPOSITION_ITEM_HEIGHT = 32;
|
|
19
22
|
const itemStyle = {
|
|
20
23
|
paddingRight: 10,
|
|
@@ -103,88 +106,22 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
103
106
|
}
|
|
104
107
|
}, [onClick]);
|
|
105
108
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
109
|
+
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
110
|
+
.previewServerState.type;
|
|
111
|
+
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(item.type === 'composition' ? item.composition.stack : null);
|
|
106
112
|
const contextMenu = (0, react_1.useMemo)(() => {
|
|
107
113
|
if (item.type === 'composition') {
|
|
108
|
-
return
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
type: 'duplicate-comp',
|
|
117
|
-
compositionId: item.composition.id,
|
|
118
|
-
compositionType: item.composition.durationInFrames === 1
|
|
119
|
-
? 'still'
|
|
120
|
-
: 'composition',
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
quickSwitcherLabel: null,
|
|
124
|
-
subMenu: null,
|
|
125
|
-
type: 'item',
|
|
126
|
-
value: 'duplicate',
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
id: 'rename',
|
|
130
|
-
keyHint: null,
|
|
131
|
-
label: `Rename...`,
|
|
132
|
-
leftItem: null,
|
|
133
|
-
onClick: () => {
|
|
134
|
-
setSelectedModal({
|
|
135
|
-
type: 'rename-comp',
|
|
136
|
-
compositionId: item.composition.id,
|
|
137
|
-
});
|
|
138
|
-
},
|
|
139
|
-
quickSwitcherLabel: null,
|
|
140
|
-
subMenu: null,
|
|
141
|
-
type: 'item',
|
|
142
|
-
value: 'rename',
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: 'delete',
|
|
146
|
-
keyHint: null,
|
|
147
|
-
label: `Delete...`,
|
|
148
|
-
leftItem: null,
|
|
149
|
-
onClick: () => {
|
|
150
|
-
setSelectedModal({
|
|
151
|
-
type: 'delete-comp',
|
|
152
|
-
compositionId: item.composition.id,
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
quickSwitcherLabel: null,
|
|
156
|
-
subMenu: null,
|
|
157
|
-
type: 'item',
|
|
158
|
-
value: 'delete',
|
|
159
|
-
},
|
|
160
|
-
{
|
|
161
|
-
type: 'divider',
|
|
162
|
-
id: 'copy-id-divider',
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
id: 'copy-id',
|
|
166
|
-
keyHint: null,
|
|
167
|
-
label: `Copy ID`,
|
|
168
|
-
leftItem: null,
|
|
169
|
-
onClick: () => {
|
|
170
|
-
navigator.clipboard
|
|
171
|
-
.writeText(item.composition.id)
|
|
172
|
-
.catch((err) => {
|
|
173
|
-
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
174
|
-
})
|
|
175
|
-
.then(() => {
|
|
176
|
-
(0, NotificationCenter_1.showNotification)('Copied to clipboard', 1000);
|
|
177
|
-
});
|
|
178
|
-
},
|
|
179
|
-
quickSwitcherLabel: null,
|
|
180
|
-
subMenu: null,
|
|
181
|
-
type: 'item',
|
|
182
|
-
value: 'remove',
|
|
183
|
-
},
|
|
184
|
-
];
|
|
114
|
+
return (0, composition_menu_items_1.getCompositionMenuItems)({
|
|
115
|
+
closeMenu: noop_1.noop,
|
|
116
|
+
composition: item.composition,
|
|
117
|
+
connectionStatus,
|
|
118
|
+
resolvedLocation,
|
|
119
|
+
setSelectedModal,
|
|
120
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
121
|
+
});
|
|
185
122
|
}
|
|
186
123
|
return [];
|
|
187
|
-
}, [item, setSelectedModal]);
|
|
124
|
+
}, [connectionStatus, item, resolvedLocation, setSelectedModal]);
|
|
188
125
|
if (item.type === 'folder') {
|
|
189
126
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
190
127
|
jsx_runtime_1.jsxs("button", { style: style, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, tabIndex: tabIndex, onClick: onClick, type: "button", title: item.folderName, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: hovered || selected ? 'white' : colors_1.LIGHT_TEXT, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: label, children: item.folderName })
|
|
@@ -4,7 +4,6 @@ exports.EditorContent = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
8
7
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
9
8
|
const MenuToolbar_1 = require("./MenuToolbar");
|
|
10
9
|
const SplitterContainer_1 = require("./Splitter/SplitterContainer");
|
|
@@ -20,9 +19,8 @@ const container = {
|
|
|
20
19
|
height: 0,
|
|
21
20
|
};
|
|
22
21
|
const EditorContent = ({ readOnlyStudio, children }) => {
|
|
23
|
-
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
24
22
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
25
|
-
const showTimeline = canvasContent !== null &&
|
|
23
|
+
const showTimeline = canvasContent !== null && canvasContent.type === 'composition';
|
|
26
24
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
27
25
|
jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [
|
|
28
26
|
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SetStateAction } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
4
|
-
export type MenuId = 'remotion' | 'file' | 'view' | 'install' | 'tools' | 'help';
|
|
4
|
+
export type MenuId = 'remotion' | 'file' | 'view' | 'composition' | 'install' | 'tools' | 'help';
|
|
5
5
|
export type Menu = {
|
|
6
6
|
id: MenuId;
|
|
7
7
|
label: React.ReactNode;
|
|
@@ -26,6 +26,6 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
26
26
|
'connected';
|
|
27
27
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
28
28
|
modalContextType.type === 'server-render' &&
|
|
29
|
-
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
29
|
+
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
30
30
|
};
|
|
31
31
|
exports.Modals = Modals;
|
|
@@ -3,6 +3,7 @@ import React from 'react';
|
|
|
3
3
|
export declare const CodemodFooter: React.FC<{
|
|
4
4
|
readonly valid: boolean;
|
|
5
5
|
readonly codemod: RecastCodemod;
|
|
6
|
+
readonly stack: string | null;
|
|
6
7
|
readonly loadingNotification: React.ReactNode;
|
|
7
8
|
readonly successNotification: React.ReactNode;
|
|
8
9
|
readonly errorNotification: string;
|
|
@@ -4,33 +4,25 @@ exports.CodemodFooter = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ShortcutHint_1 = require("../../error-overlay/remotion-overlay/ShortcutHint");
|
|
7
|
+
const resolved_stack_to_symbolicated_1 = require("../../helpers/resolved-stack-to-symbolicated");
|
|
7
8
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
8
9
|
const modals_1 = require("../../state/modals");
|
|
9
10
|
const layout_1 = require("../layout");
|
|
10
11
|
const ModalButton_1 = require("../ModalButton");
|
|
11
12
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
12
13
|
const actions_1 = require("../RenderQueue/actions");
|
|
14
|
+
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
13
15
|
const DiffPreview_1 = require("./DiffPreview");
|
|
14
|
-
const CodemodFooter = ({ codemod, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, }) => {
|
|
16
|
+
const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, }) => {
|
|
17
|
+
var _a;
|
|
15
18
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
16
19
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
17
20
|
const [codemodStatus, setCanApplyCodemod] = (0, react_1.useState)({
|
|
18
21
|
type: 'loading',
|
|
19
22
|
});
|
|
20
|
-
const
|
|
21
|
-
(0, react_1.
|
|
22
|
-
|
|
23
|
-
(0, actions_1.getProjectInfo)(controller.signal)
|
|
24
|
-
.then((info) => {
|
|
25
|
-
setProjectInfo(info.projectInfo);
|
|
26
|
-
})
|
|
27
|
-
.catch((err) => {
|
|
28
|
-
(0, NotificationCenter_1.showNotification)(`Could not get project info: ${err.message}. Unable to duplicate composition`, 3000);
|
|
29
|
-
});
|
|
30
|
-
return () => {
|
|
31
|
-
controller.abort();
|
|
32
|
-
};
|
|
33
|
-
}, []);
|
|
23
|
+
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(stack);
|
|
24
|
+
const symbolicatedStack = (0, react_1.useMemo)(() => (0, resolved_stack_to_symbolicated_1.resolvedStackToSymbolicated)(resolvedLocation), [resolvedLocation]);
|
|
25
|
+
const relativeFilePath = (_a = symbolicatedStack === null || symbolicatedStack === void 0 ? void 0 : symbolicatedStack.originalFileName) !== null && _a !== void 0 ? _a : null;
|
|
34
26
|
const trigger = (0, react_1.useCallback)(() => {
|
|
35
27
|
setSubmitting(true);
|
|
36
28
|
setSelectedModal(null);
|
|
@@ -38,6 +30,7 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
38
30
|
(0, actions_1.applyCodemod)({
|
|
39
31
|
codemod,
|
|
40
32
|
dryRun: false,
|
|
33
|
+
symbolicatedStack,
|
|
41
34
|
signal: new AbortController().signal,
|
|
42
35
|
})
|
|
43
36
|
.then(() => {
|
|
@@ -54,11 +47,13 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
54
47
|
onSuccess,
|
|
55
48
|
setSelectedModal,
|
|
56
49
|
successNotification,
|
|
50
|
+
symbolicatedStack,
|
|
57
51
|
]);
|
|
58
52
|
const getCanApplyCodemod = (0, react_1.useCallback)(async (signal) => {
|
|
59
53
|
const res = await (0, actions_1.applyCodemod)({
|
|
60
54
|
codemod,
|
|
61
55
|
dryRun: true,
|
|
56
|
+
symbolicatedStack,
|
|
62
57
|
signal,
|
|
63
58
|
});
|
|
64
59
|
if (res.success) {
|
|
@@ -70,8 +65,25 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
70
65
|
error: res.reason,
|
|
71
66
|
});
|
|
72
67
|
}
|
|
73
|
-
}, [codemod]);
|
|
68
|
+
}, [codemod, symbolicatedStack]);
|
|
74
69
|
(0, react_1.useEffect)(() => {
|
|
70
|
+
if (!stack) {
|
|
71
|
+
setCanApplyCodemod({
|
|
72
|
+
type: 'fail',
|
|
73
|
+
error: 'Could not determine where this composition is defined',
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (!(0, use_resolved_stack_1.hasResolvedStack)(stack)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (!symbolicatedStack) {
|
|
81
|
+
setCanApplyCodemod({
|
|
82
|
+
type: 'fail',
|
|
83
|
+
error: 'Could not resolve the source location of this composition',
|
|
84
|
+
});
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
75
87
|
const abortController = new AbortController();
|
|
76
88
|
let aborted = false;
|
|
77
89
|
getCanApplyCodemod(abortController.signal)
|
|
@@ -80,16 +92,16 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
80
92
|
if (aborted) {
|
|
81
93
|
return;
|
|
82
94
|
}
|
|
83
|
-
(0, NotificationCenter_1.showNotification)(
|
|
95
|
+
(0, NotificationCenter_1.showNotification)(`${errorNotification}: ${err.message}`, 3000);
|
|
84
96
|
});
|
|
85
97
|
return () => {
|
|
86
98
|
aborted = true;
|
|
87
99
|
abortController.abort();
|
|
88
100
|
};
|
|
89
|
-
}, [getCanApplyCodemod]);
|
|
101
|
+
}, [errorNotification, getCanApplyCodemod, stack, symbolicatedStack]);
|
|
90
102
|
const disabled = !valid ||
|
|
91
103
|
submitting ||
|
|
92
|
-
|
|
104
|
+
symbolicatedStack === null ||
|
|
93
105
|
codemodStatus.type !== 'success';
|
|
94
106
|
const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
|
|
95
107
|
(0, react_1.useEffect)(() => {
|
|
@@ -100,7 +112,7 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
100
112
|
callback() {
|
|
101
113
|
trigger();
|
|
102
114
|
},
|
|
103
|
-
commandCtrlKey:
|
|
115
|
+
commandCtrlKey: false,
|
|
104
116
|
key: 'Enter',
|
|
105
117
|
event: 'keydown',
|
|
106
118
|
preventDefault: true,
|
|
@@ -112,9 +124,9 @@ const CodemodFooter = ({ codemod, valid, loadingNotification, successNotificatio
|
|
|
112
124
|
};
|
|
113
125
|
}, [disabled, registerKeybinding, trigger, valid]);
|
|
114
126
|
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
115
|
-
jsx_runtime_1.jsx(DiffPreview_1.CodemodDiffPreview, { status: codemodStatus }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(layout_1.Spacing, { block: true, x: 2 }), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: trigger, disabled: disabled, children: [
|
|
116
|
-
? submitLabel({ relativeRootPath:
|
|
117
|
-
: genericSubmitLabel, jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl:
|
|
127
|
+
jsx_runtime_1.jsx(DiffPreview_1.CodemodDiffPreview, { status: codemodStatus }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(layout_1.Spacing, { block: true, x: 2 }), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: trigger, disabled: disabled, children: [relativeFilePath
|
|
128
|
+
? submitLabel({ relativeRootPath: relativeFilePath })
|
|
129
|
+
: genericSubmitLabel, jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: false })
|
|
118
130
|
] })
|
|
119
131
|
] }));
|
|
120
132
|
};
|
|
@@ -16,11 +16,13 @@ const content = {
|
|
|
16
16
|
minWidth: 500,
|
|
17
17
|
};
|
|
18
18
|
const DeleteCompositionLoaded = ({ compositionId }) => {
|
|
19
|
+
var _a;
|
|
19
20
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
20
21
|
if (!context) {
|
|
21
22
|
throw new Error('Resolved composition context');
|
|
22
23
|
}
|
|
23
24
|
const { unresolved } = context;
|
|
25
|
+
const compositionStack = (_a = unresolved.stack) !== null && _a !== void 0 ? _a : null;
|
|
24
26
|
const codemod = (0, react_1.useMemo)(() => {
|
|
25
27
|
return {
|
|
26
28
|
type: 'delete-composition',
|
|
@@ -36,7 +38,7 @@ const DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
36
38
|
jsx_runtime_1.jsx("br", {}),
|
|
37
39
|
"The associated ",
|
|
38
40
|
jsx_runtime_1.jsx("code", { style: styles_1.inlineCodeSnippet, children: "component" }),
|
|
39
|
-
" will remain in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting', successNotification: `Deleted ${unresolved.id}`, genericSubmitLabel: `Delete`, submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`, codemod: codemod, valid: true, onSuccess: null }) })
|
|
41
|
+
" will remain in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting', successNotification: `Deleted ${unresolved.id}`, genericSubmitLabel: `Delete`, submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: true, onSuccess: null }) })
|
|
40
42
|
] })
|
|
41
43
|
] }));
|
|
42
44
|
};
|
|
@@ -11,7 +11,7 @@ const CodemodDiffPreview = ({ status }) => {
|
|
|
11
11
|
return (jsx_runtime_1.jsx("span", { style: { color: colors_1.FAIL_COLOR, fontSize: 13, lineHeight: 1.2 }, children: status.error }));
|
|
12
12
|
}
|
|
13
13
|
return (jsx_runtime_1.jsxs("div", { style: { lineHeight: 1.2 }, children: [
|
|
14
|
-
jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: "This will edit your
|
|
14
|
+
jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: "This will edit your codebase." }), jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsxs("span", { style: { color: colors_1.BLUE, fontSize: 13, lineHeight: 1.2 }, children: [status.diff.additions, " addition", status.diff.additions === 1 ? '' : 's', ","] }), ' ', jsx_runtime_1.jsxs("span", { style: {
|
|
15
15
|
color: colors_1.SELECTED_GUIDE,
|
|
16
16
|
fontSize: 13,
|
|
17
17
|
lineHeight: 1.2,
|
|
@@ -29,11 +29,13 @@ const comboBoxStyle = {
|
|
|
29
29
|
width: 190,
|
|
30
30
|
};
|
|
31
31
|
const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
32
|
+
var _a;
|
|
32
33
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
33
34
|
if (!context) {
|
|
34
35
|
throw new Error('Resolved composition context');
|
|
35
36
|
}
|
|
36
37
|
const { resolved, unresolved } = context;
|
|
38
|
+
const compositionStack = (_a = unresolved.stack) !== null && _a !== void 0 ? _a : null;
|
|
37
39
|
const [initialCompType] = (0, react_1.useState)(initialType);
|
|
38
40
|
const hadDimensionsDefined = unresolved.width && unresolved.height;
|
|
39
41
|
const hadFpsDefined = unresolved.fps !== undefined;
|
|
@@ -199,7 +201,7 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
199
201
|
] })
|
|
200
202
|
] })) : null, type === 'composition' && hadDurationDefined ? (jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
201
203
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "FPS" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
|
|
202
|
-
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, valid: valid, onSuccess: onDuplicateSuccess }) })
|
|
204
|
+
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', successNotification: `Duplicated ${unresolved.id} as ${newId}`, genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess }) })
|
|
203
205
|
] })
|
|
204
206
|
] }));
|
|
205
207
|
};
|
|
@@ -22,11 +22,13 @@ const content = {
|
|
|
22
22
|
minWidth: 500,
|
|
23
23
|
};
|
|
24
24
|
const RenameCompositionLoaded = () => {
|
|
25
|
+
var _a;
|
|
25
26
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
26
27
|
if (!context) {
|
|
27
28
|
throw new Error('Resolved composition context');
|
|
28
29
|
}
|
|
29
|
-
const { resolved } = context;
|
|
30
|
+
const { resolved, unresolved } = context;
|
|
31
|
+
const compositionStack = (_a = unresolved.stack) !== null && _a !== void 0 ? _a : null;
|
|
30
32
|
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
31
33
|
const [newId, setName] = (0, react_1.useState)(() => {
|
|
32
34
|
return resolved.result.id;
|
|
@@ -55,7 +57,7 @@ const RenameCompositionLoaded = () => {
|
|
|
55
57
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
56
58
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })
|
|
57
59
|
] })) : null] }) })
|
|
58
|
-
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition', successNotification: `Renamed to ${newId}`, genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, valid: valid, onSuccess: null }) })
|
|
60
|
+
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition', successNotification: `Renamed to ${newId}`, genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: null }) })
|
|
59
61
|
] })
|
|
60
62
|
] }));
|
|
61
63
|
};
|
|
@@ -195,6 +195,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
|
|
|
195
195
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
196
196
|
initialProResProfile: defaults.proResProfile,
|
|
197
197
|
initialx264Preset: defaults.x264Preset,
|
|
198
|
+
initialGopSize: defaults.gopSize,
|
|
198
199
|
initialPixelFormat: null,
|
|
199
200
|
initialAudioBitrate: defaults.audioBitrate,
|
|
200
201
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ChromeMode
|
|
2
|
-
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
1
|
+
import type { ChromeMode } from '@remotion/renderer';
|
|
3
2
|
import type { UiOpenGlOptions } from '@remotion/studio-shared';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
export type RenderType = 'still' | 'video' | 'audio' | 'sequence';
|
|
@@ -11,8 +10,6 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
11
10
|
readonly concurrency: number;
|
|
12
11
|
readonly delayRenderTimeout: number;
|
|
13
12
|
readonly setDelayRenderTimeout: React.Dispatch<React.SetStateAction<number>>;
|
|
14
|
-
readonly disallowParallelEncoding: boolean;
|
|
15
|
-
readonly setDisallowParallelEncoding: React.Dispatch<React.SetStateAction<boolean>>;
|
|
16
13
|
readonly setDisableWebSecurity: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
14
|
readonly setIgnoreCertificateErrors: React.Dispatch<React.SetStateAction<boolean>>;
|
|
18
15
|
readonly setHeadless: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -23,19 +20,12 @@ export declare const RenderModalAdvanced: React.FC<{
|
|
|
23
20
|
readonly setOpenGlOption: React.Dispatch<React.SetStateAction<UiOpenGlOptions>>;
|
|
24
21
|
readonly chromeModeOption: ChromeMode;
|
|
25
22
|
readonly setChromeModeOption: React.Dispatch<React.SetStateAction<ChromeMode>>;
|
|
26
|
-
readonly envVariables: [string, string][];
|
|
27
|
-
readonly setEnvVariables: React.Dispatch<React.SetStateAction<[string, string][]>>;
|
|
28
|
-
readonly x264Preset: X264Preset | null;
|
|
29
|
-
readonly setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
|
|
30
|
-
readonly hardwareAcceleration: HardwareAccelerationOption;
|
|
31
|
-
readonly setHardwareAcceleration: React.Dispatch<React.SetStateAction<HardwareAccelerationOption>>;
|
|
32
23
|
readonly offthreadVideoCacheSizeInBytes: number | null;
|
|
33
24
|
readonly setOffthreadVideoCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
34
25
|
readonly mediaCacheSizeInBytes: number | null;
|
|
35
26
|
readonly setMediaCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
36
27
|
readonly offthreadVideoThreads: number | null;
|
|
37
28
|
readonly setOffthreadVideoThreads: React.Dispatch<React.SetStateAction<number | null>>;
|
|
38
|
-
readonly codec: Codec;
|
|
39
29
|
readonly enableMultiProcessOnLinux: boolean;
|
|
40
30
|
readonly darkMode: boolean;
|
|
41
31
|
readonly setDarkMode: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -4,7 +4,6 @@ exports.RenderModalAdvanced = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
-
const presets_labels_1 = require("../../helpers/presets-labels");
|
|
8
7
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
9
8
|
const Checkbox_1 = require("../Checkbox");
|
|
10
9
|
const layout_1 = require("../layout");
|
|
@@ -14,13 +13,12 @@ const RemInput_1 = require("../NewComposition/RemInput");
|
|
|
14
13
|
const layout_2 = require("./layout");
|
|
15
14
|
const NumberSetting_1 = require("./NumberSetting");
|
|
16
15
|
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
17
|
-
const RenderModalEnvironmentVariables_1 = require("./RenderModalEnvironmentVariables");
|
|
18
16
|
const RenderModalHr_1 = require("./RenderModalHr");
|
|
19
17
|
const container = {
|
|
20
18
|
flex: 1,
|
|
21
19
|
overflowY: 'auto',
|
|
22
20
|
};
|
|
23
|
-
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, delayRenderTimeout, setDelayRenderTimeout,
|
|
21
|
+
const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setConcurrency, concurrency, delayRenderTimeout, setDelayRenderTimeout, setDisableWebSecurity, setIgnoreCertificateErrors, setHeadless, headless, ignoreCertificateErrors, disableWebSecurity, openGlOption, setOpenGlOption, setMediaCacheSizeInBytes, mediaCacheSizeInBytes, offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes, offthreadVideoThreads, setOffthreadVideoThreads, enableMultiProcessOnLinux, setChromiumMultiProcessOnLinux, setUserAgent, userAgent, beep, setBeep, repro, setRepro, chromeModeOption, setChromeModeOption, darkMode, setDarkMode, }) => {
|
|
24
22
|
const extendedOpenGlOptions = (0, react_1.useMemo)(() => {
|
|
25
23
|
return [
|
|
26
24
|
'angle',
|
|
@@ -64,9 +62,6 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
64
62
|
return null;
|
|
65
63
|
});
|
|
66
64
|
}, [setUserAgent]);
|
|
67
|
-
const onDisallowParallelEncodingChanged = (0, react_1.useCallback)((e) => {
|
|
68
|
-
setDisallowParallelEncoding(e.target.checked);
|
|
69
|
-
}, [setDisallowParallelEncoding]);
|
|
70
65
|
const onDisableWebSecurityChanged = (0, react_1.useCallback)((e) => {
|
|
71
66
|
setDisableWebSecurity(e.target.checked);
|
|
72
67
|
}, [setDisableWebSecurity]);
|
|
@@ -123,37 +118,6 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
123
118
|
};
|
|
124
119
|
});
|
|
125
120
|
}, [chromeModeOption, setChromeModeOption]);
|
|
126
|
-
const x264PresetOptions = (0, react_1.useMemo)(() => {
|
|
127
|
-
return client_1.BrowserSafeApis.x264PresetOptions.map((option) => {
|
|
128
|
-
return {
|
|
129
|
-
label: (0, presets_labels_1.labelx264Preset)(option),
|
|
130
|
-
onClick: () => setx264Preset(option),
|
|
131
|
-
key: option,
|
|
132
|
-
type: 'item',
|
|
133
|
-
id: option,
|
|
134
|
-
keyHint: null,
|
|
135
|
-
leftItem: x264Preset === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
136
|
-
quickSwitcherLabel: null,
|
|
137
|
-
subMenu: null,
|
|
138
|
-
value: option,
|
|
139
|
-
};
|
|
140
|
-
});
|
|
141
|
-
}, [setx264Preset, x264Preset]);
|
|
142
|
-
const hardwareAccelerationValues = (0, react_1.useMemo)(() => {
|
|
143
|
-
return client_1.BrowserSafeApis.hardwareAccelerationOptions.map((option) => {
|
|
144
|
-
return {
|
|
145
|
-
label: option,
|
|
146
|
-
onClick: () => setHardwareAcceleration(option),
|
|
147
|
-
leftItem: hardwareAcceleration === option ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
148
|
-
subMenu: null,
|
|
149
|
-
quickSwitcherLabel: null,
|
|
150
|
-
type: 'item',
|
|
151
|
-
id: option,
|
|
152
|
-
keyHint: null,
|
|
153
|
-
value: option,
|
|
154
|
-
};
|
|
155
|
-
});
|
|
156
|
-
}, [hardwareAcceleration, setHardwareAcceleration]);
|
|
157
121
|
const changeMediaCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
|
|
158
122
|
setMediaCacheSizeInBytes((prev) => {
|
|
159
123
|
if (prev === null) {
|
|
@@ -187,21 +151,11 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
187
151
|
return cb;
|
|
188
152
|
});
|
|
189
153
|
}, [setOffthreadVideoThreads]);
|
|
190
|
-
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })),
|
|
191
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["x264 Preset",
|
|
192
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "x264Option" })
|
|
193
|
-
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: x264Preset, selectedId: x264Preset, values: x264PresetOptions }) })
|
|
194
|
-
] })) : null, renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
195
|
-
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Hardware acceleration",
|
|
196
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "hardwareAccelerationOption" })
|
|
197
|
-
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: hardwareAcceleration, selectedId: hardwareAcceleration, values: hardwareAccelerationValues }) })
|
|
198
|
-
] })) : null, jsx_runtime_1.jsx(NumberSetting_1.NumberSetting
|
|
154
|
+
return (jsx_runtime_1.jsxs("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [renderMode === 'still' ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { min: minConcurrency, max: maxConcurrency, step: 1, name: "Concurrency", formatter: (w) => `${w}x`, onValueChanged: setConcurrency, value: concurrency })), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting
|
|
199
155
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
200
156
|
, {
|
|
201
157
|
// Also appears in packages/renderer/src/validate-puppeteer-timeout.ts
|
|
202
|
-
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, hint: "delayRenderTimeoutInMillisecondsOption", value: delayRenderTimeout }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
203
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "No parallel encoding" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: disallowParallelEncoding, onChange: onDisallowParallelEncodingChanged, name: "disallow-parallel-encoding" }) })
|
|
204
|
-
] }), renderMode === 'audio' ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
158
|
+
min: 7000, max: 900000, name: "delayRender() timeout", onValueChanged: setDelayRenderTimeout, formatter: (w) => `${w}ms`, step: 1000, hint: "delayRenderTimeoutInMillisecondsOption", value: delayRenderTimeout }), renderMode === 'audio' ? null : (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
205
159
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Custom @remotion/media cache size",
|
|
206
160
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "mediaCacheSizeInBytesOption" })
|
|
207
161
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: mediaCacheSizeInBytes !== null, onChange: toggleCustomMediaCacheSizeInBytes, name: "media-cache-size" }) })
|
|
@@ -250,7 +204,7 @@ const RenderModalAdvanced = ({ renderMode, maxConcurrency, minConcurrency, setCo
|
|
|
250
204
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Beep when finished ",
|
|
251
205
|
jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "beepOnFinishOption" })
|
|
252
206
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: beep, onChange: onPlayBeepSound, name: "beep-when-finished" }) })
|
|
253
|
-
] })
|
|
207
|
+
] })
|
|
254
208
|
] }));
|
|
255
209
|
};
|
|
256
210
|
exports.RenderModalAdvanced = RenderModalAdvanced;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ColorSpace, Codec, PixelFormat, X264Preset } from '@remotion/renderer';
|
|
2
|
+
import type { HardwareAccelerationOption } from '@remotion/renderer/client';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
5
|
+
import type { RenderType } from './RenderModalAdvanced';
|
|
6
|
+
declare const qualityControlModes: readonly ["crf", "bitrate"];
|
|
7
|
+
export type QualityControl = (typeof qualityControlModes)[number];
|
|
8
|
+
export declare const RenderModalEncoding: React.FC<{
|
|
9
|
+
readonly renderMode: RenderType;
|
|
10
|
+
readonly codec: Codec;
|
|
11
|
+
readonly qualityControlType: QualityControl | null;
|
|
12
|
+
readonly setQualityControl: React.Dispatch<React.SetStateAction<QualityControl>>;
|
|
13
|
+
readonly shouldDisplayQualityControlPicker: boolean;
|
|
14
|
+
readonly crf: number | null;
|
|
15
|
+
readonly minCrf: number;
|
|
16
|
+
readonly maxCrf: number;
|
|
17
|
+
readonly setCrf: React.Dispatch<React.SetStateAction<number>>;
|
|
18
|
+
readonly customTargetVideoBitrate: string;
|
|
19
|
+
readonly setCustomTargetVideoBitrateValue: React.Dispatch<React.SetStateAction<string>>;
|
|
20
|
+
readonly encodingBufferSize: string | null;
|
|
21
|
+
readonly setEncodingBufferSize: React.Dispatch<React.SetStateAction<string | null>>;
|
|
22
|
+
readonly encodingMaxRate: string | null;
|
|
23
|
+
readonly setEncodingMaxRate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
24
|
+
readonly pixelFormat: PixelFormat;
|
|
25
|
+
readonly pixelFormatOptions: ComboboxValue[];
|
|
26
|
+
readonly colorSpace: ColorSpace;
|
|
27
|
+
readonly setColorSpace: React.Dispatch<React.SetStateAction<ColorSpace>>;
|
|
28
|
+
readonly x264Preset: X264Preset | null;
|
|
29
|
+
readonly setx264Preset: React.Dispatch<React.SetStateAction<X264Preset>>;
|
|
30
|
+
readonly gopSize: number | null;
|
|
31
|
+
readonly setGopSize: React.Dispatch<React.SetStateAction<number | null>>;
|
|
32
|
+
readonly hardwareAcceleration: HardwareAccelerationOption;
|
|
33
|
+
readonly setHardwareAcceleration: React.Dispatch<React.SetStateAction<HardwareAccelerationOption>>;
|
|
34
|
+
readonly disallowParallelEncoding: boolean;
|
|
35
|
+
readonly setDisallowParallelEncoding: React.Dispatch<React.SetStateAction<boolean>>;
|
|
36
|
+
}>;
|
|
37
|
+
export {};
|