@remotion/studio 4.0.512 → 4.0.514
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/Studio.js +2 -1
- package/dist/components/AskAiModal.js +1 -1
- package/dist/components/AssetSelector.js +2 -0
- package/dist/components/AssetSelectorItem.js +1 -2
- package/dist/components/AudioWaveform.d.ts +3 -0
- package/dist/components/AudioWaveform.js +55 -67
- package/dist/components/Canvas.js +40 -5
- package/dist/components/CanvasOrLoading.js +5 -0
- package/dist/components/CompositionSelector.js +2 -0
- package/dist/components/CompositionSelectorItem.js +14 -1
- package/dist/components/ConfigureDefaultEditorModal.js +17 -11
- package/dist/components/Editor.js +16 -1
- package/dist/components/ElementInstallConfirmation.d.ts +1 -0
- package/dist/components/ElementInstallConfirmation.js +4 -2
- package/dist/components/FixComputedValueModal.d.ts +9 -0
- package/dist/components/FixComputedValueModal.js +217 -0
- package/dist/components/InitialCompositionLoader.js +19 -0
- package/dist/components/InlineDropdown.js +4 -4
- package/dist/components/InspectorInfoHeader.js +3 -3
- package/dist/components/InspectorOpenInEditor.js +26 -24
- package/dist/components/InspectorPanel/AlignmentControls.js +13 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +11 -1
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +12 -8
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +13 -2
- package/dist/components/InspectorPanel/EasingInspector.js +12 -3
- package/dist/components/InspectorPanel/KeyframeInspector.js +21 -7
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +35 -6
- package/dist/components/InspectorPanel/common.d.ts +5 -5
- package/dist/components/InspectorPanel/common.js +8 -8
- package/dist/components/InspectorPanel/easing-inspector-selection.js +7 -2
- package/dist/components/InspectorPanel/inspector-section-collapse.d.ts +1 -0
- package/dist/components/InspectorPanel/styles.d.ts +1 -1
- package/dist/components/InspectorPanel/styles.js +4 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -1
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +10 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +7 -2
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +16 -0
- package/dist/components/NewComposition/duplicate-composition-api.js +16 -0
- package/dist/components/NoRegisterRoot.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +4 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/QuickSwitcher/fuzzy-search.js +1 -1
- package/dist/components/RefreshCompositionOverlay.js +1 -1
- package/dist/components/RenderButton.js +6 -3
- package/dist/components/RenderModal/WebRenderModal.js +6 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +9 -2
- package/dist/components/RenderModal/render-modals.js +5 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +5 -1
- package/dist/components/RenderQueue/actions.js +12 -2
- package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
- package/dist/components/RenderingSettings.d.ts +2 -0
- package/dist/components/RenderingSettings.js +355 -0
- package/dist/components/SelectedOutlineElement.js +15 -13
- package/dist/components/SelectedOutlineOverlay.js +30 -8
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +53 -9
- package/dist/components/SettingsContext.d.ts +4 -1
- package/dist/components/SettingsContext.js +9 -2
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +10 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/StudioSettings.d.ts +2 -0
- package/dist/components/StudioSettings.js +185 -0
- package/dist/components/Timeline/LoopedIndicator.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +3 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +22 -14
- package/dist/components/Timeline/Timeline.js +11 -9
- package/dist/components/Timeline/TimelineArrayField.js +1 -0
- package/dist/components/Timeline/TimelineAssetField.d.ts +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +62 -76
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +4 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +25 -14
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +0 -4
- package/dist/components/Timeline/TimelineHeightContainer.js +4 -4
- package/dist/components/Timeline/TimelineImageInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineImageInfo.js +3 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +31 -8
- package/dist/components/Timeline/TimelineKeyframedValue.js +1 -0
- package/dist/components/Timeline/TimelineList.d.ts +1 -5
- package/dist/components/Timeline/TimelineList.js +14 -9
- package/dist/components/Timeline/TimelinePinchZoom.js +5 -5
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -2
- package/dist/components/Timeline/TimelineRowChrome.js +12 -5
- package/dist/components/Timeline/TimelineSchemaField.d.ts +7 -3
- package/dist/components/Timeline/TimelineSchemaField.js +71 -13
- package/dist/components/Timeline/TimelineScrollable.js +3 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +5 -2
- package/dist/components/Timeline/TimelineSelection.js +90 -103
- package/dist/components/Timeline/TimelineSequence.js +59 -25
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +15 -9
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +14 -7
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -27
- package/dist/components/Timeline/TimelineSlider.js +42 -33
- package/dist/components/Timeline/TimelineTimeIndicators.js +90 -98
- package/dist/components/Timeline/TimelineTracks.d.ts +0 -2
- package/dist/components/Timeline/TimelineTracks.js +11 -4
- package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +151 -61
- package/dist/components/Timeline/TimelineViewport.d.ts +12 -0
- package/dist/components/Timeline/TimelineViewport.js +62 -0
- package/dist/components/Timeline/TimelineVirtualization.d.ts +22 -0
- package/dist/components/Timeline/TimelineVirtualization.js +144 -0
- package/dist/components/Timeline/TimelineZoomControls.js +16 -8
- package/dist/components/Timeline/call-add-keyframe.js +31 -3
- package/dist/components/Timeline/call-delete-keyframe.js +13 -3
- package/dist/components/Timeline/call-move-keyframe.d.ts +2 -1
- package/dist/components/Timeline/call-move-keyframe.js +81 -18
- package/dist/components/Timeline/call-update-keyframe-settings.js +31 -3
- package/dist/components/Timeline/delete-selected-keyframe.d.ts +0 -8
- package/dist/components/Timeline/delete-selected-keyframe.js +23 -44
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +0 -8
- package/dist/components/Timeline/delete-selected-timeline-item.js +18 -44
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +8 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.js +10 -8
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +5 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +16 -10
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +30 -0
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +61 -0
- package/dist/components/Timeline/keyframe-clipboard.js +9 -2
- package/dist/components/Timeline/split-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +24 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +127 -4
- package/dist/components/Timeline/use-open-sequence-in-apps.js +8 -8
- package/dist/components/Timeline/use-timeline-height.d.ts +3 -5
- package/dist/components/Timeline/use-timeline-height.js +16 -18
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +14 -4
- package/dist/components/UpdateCheck.d.ts +2 -10
- package/dist/components/UpdateCheck.js +8 -2
- package/dist/components/VisualControls/ClickableFileName.js +13 -6
- package/dist/components/VisualControls/VisualControlHandle.js +8 -0
- package/dist/components/composition-menu-items.d.ts +6 -1
- package/dist/components/composition-menu-items.js +9 -6
- package/dist/components/delete-jsx-node-api.d.ts +2 -0
- package/dist/components/delete-jsx-node-api.js +12 -0
- package/dist/components/element-install-api.d.ts +3 -0
- package/dist/components/element-install-api.js +19 -0
- package/dist/components/folder-menu-items.d.ts +4 -1
- package/dist/components/folder-menu-items.js +4 -5
- package/dist/components/get-open-in-menu-items.d.ts +1 -1
- package/dist/components/get-open-in-menu-items.js +15 -13
- package/dist/components/import-assets.js +20 -9
- package/dist/components/reorder-sequence-api.d.ts +2 -0
- package/dist/components/reorder-sequence-api.js +12 -0
- package/dist/components/sequence-props-api.js +44 -3
- package/dist/components/split-jsx-sequence-api.d.ts +2 -0
- package/dist/components/split-jsx-sequence-api.js +12 -0
- package/dist/components/split-video-from-audio-api.d.ts +2 -0
- package/dist/components/split-video-from-audio-api.js +12 -0
- package/dist/components/use-default-editor-info.d.ts +8 -0
- package/dist/components/use-default-editor-info.js +25 -9
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +10 -3
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +3 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +6 -6
- package/dist/error-overlay/remotion-overlay/Overlay.js +14 -12
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +2 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +7 -4
- package/dist/esm/{chunk-s8gwjng0.js → chunk-xn2q7eem.js} +11983 -8035
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/internals.mjs +11983 -8035
- package/dist/esm/previewEntry.mjs +13059 -9107
- package/dist/esm/renderEntry.mjs +2 -3
- package/dist/helpers/browser-studio-operations.d.ts +2 -0
- package/dist/helpers/browser-studio-operations.js +10 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +26 -0
- package/dist/helpers/get-timeline-max-zoom.js +45 -0
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/open-in-editor.d.ts +6 -4
- package/dist/helpers/open-in-editor.js +4 -4
- package/dist/helpers/render-codec-label.d.ts +1 -1
- package/dist/helpers/retry-payload.js +1 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/studio-runtime-config.js +2 -3
- package/dist/helpers/timeline-layout.d.ts +3 -1
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/url-state.js +3 -2
- package/dist/helpers/use-menu-structure.js +12 -11
- package/dist/helpers/use-runtime-values.d.ts +2 -1
- package/dist/helpers/use-runtime-values.js +7 -3
- package/dist/icons/remotion-triangle.d.ts +2 -0
- package/dist/icons/remotion-triangle.js +7 -0
- package/dist/renderEntry.js +1 -1
- package/dist/state/composition-list.d.ts +13 -0
- package/dist/state/composition-list.js +21 -0
- package/dist/state/modals.d.ts +7 -1
- package/dist/state/timeline-zoom.d.ts +1 -2
- package/dist/state/timeline-zoom.js +9 -5
- package/package.json +14 -13
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DuplicateCompositionResponse, SymbolicatedStackFrame } from '@remotion/studio-shared';
|
|
2
|
+
export declare const duplicateComposition: ({ codemod, dryRun, signal, symbolicatedStack, }: {
|
|
3
|
+
codemod: {
|
|
4
|
+
type: "duplicate-composition";
|
|
5
|
+
idToDuplicate: string;
|
|
6
|
+
newId: string;
|
|
7
|
+
newHeight: number | null;
|
|
8
|
+
newWidth: number | null;
|
|
9
|
+
newFps: number | null;
|
|
10
|
+
newDurationInFrames: number | null;
|
|
11
|
+
tag: "Composition" | "Still";
|
|
12
|
+
};
|
|
13
|
+
dryRun: boolean;
|
|
14
|
+
signal: AbortSignal;
|
|
15
|
+
symbolicatedStack: SymbolicatedStackFrame | null;
|
|
16
|
+
}) => Promise<DuplicateCompositionResponse>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.duplicateComposition = void 0;
|
|
4
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
5
|
+
const actions_1 = require("../RenderQueue/actions");
|
|
6
|
+
const duplicateComposition = ({ codemod, dryRun, signal, symbolicatedStack, }) => {
|
|
7
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
8
|
+
if (browserStudioOperations === null) {
|
|
9
|
+
return (0, actions_1.applyCodemod)({ codemod, dryRun, signal, symbolicatedStack }).then((result) => (result.success ? result : { ...result, stack: '' }));
|
|
10
|
+
}
|
|
11
|
+
return browserStudioOperations.duplicateComposition({
|
|
12
|
+
codemod,
|
|
13
|
+
dryRun,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
exports.duplicateComposition = duplicateComposition;
|
|
@@ -36,7 +36,7 @@ const NoRegisterRoot = () => {
|
|
|
36
36
|
if (!show) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
return (jsx_runtime_1.jsxs(remotion_1.
|
|
39
|
+
return (jsx_runtime_1.jsxs(remotion_1.Internals.AbsoluteFillElement, { style: container, children: [
|
|
40
40
|
jsx_runtime_1.jsx("div", { style: label, children: "Waiting for registerRoot() to get called." }), jsx_runtime_1.jsxs("div", { style: label, children: ["Learn more:", ' ', jsx_runtime_1.jsx("a", { target: '_blank', style: link, href: "https://www.remotion.dev/docs/register-root", children: "remotion.dev/docs/register-root" })
|
|
41
41
|
] })
|
|
42
42
|
] }));
|
|
@@ -8,12 +8,13 @@ const colors_1 = require("../../helpers/colors");
|
|
|
8
8
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
9
9
|
const modals_1 = require("../../state/modals");
|
|
10
10
|
const quickSwitcherArea = {
|
|
11
|
-
padding: '4px
|
|
11
|
+
padding: '4px 0 4px 4px',
|
|
12
12
|
borderBottom: `1px solid ${colors_1.BLACK_HEX}`,
|
|
13
|
+
overflowY: 'auto',
|
|
13
14
|
};
|
|
14
15
|
const quickSwitcherTrigger = {
|
|
15
16
|
backgroundColor: colors_1.WHITE_ALPHA_06,
|
|
16
|
-
borderRadius:
|
|
17
|
+
borderRadius: 4,
|
|
17
18
|
padding: '4px 10px',
|
|
18
19
|
color: colors_1.LIGHT_TEXT,
|
|
19
20
|
fontSize: 12,
|
|
@@ -40,6 +41,6 @@ const ExplorerQuickSwitcherTrigger = ({ mode, showShortcut, tabIndex }) => {
|
|
|
40
41
|
compositionSelection: null,
|
|
41
42
|
});
|
|
42
43
|
}, [mode, setSelectedModal]);
|
|
43
|
-
return (jsx_runtime_1.jsx("div", { style: quickSwitcherArea, children: jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, children: ["Search...", showShortcut && !(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? (jsx_runtime_1.jsxs("span", { style: shortcutLabel, children: [ShortcutHint_1.cmdOrCtrlCharacter, "+K"] })) : null] }) }));
|
|
44
|
+
return (jsx_runtime_1.jsx("div", { style: quickSwitcherArea, className: "__remotion-vertical-scrollbar", children: jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, children: ["Search...", showShortcut && !(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? (jsx_runtime_1.jsxs("span", { style: shortcutLabel, children: [ShortcutHint_1.cmdOrCtrlCharacter, "+K"] })) : null] }) }));
|
|
44
45
|
};
|
|
45
46
|
exports.ExplorerQuickSwitcherTrigger = ExplorerQuickSwitcherTrigger;
|
|
@@ -353,6 +353,7 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio
|
|
|
353
353
|
const container = (0, react_1.useMemo)(() => {
|
|
354
354
|
return {
|
|
355
355
|
width: showKeyboardShortcuts ? 800 : 400,
|
|
356
|
+
maxWidth: 'calc(100vw - 40px)',
|
|
356
357
|
};
|
|
357
358
|
}, [showKeyboardShortcuts]);
|
|
358
359
|
const results = (0, react_1.useMemo)(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fuzzySearch = fuzzySearch;
|
|
4
4
|
function fuzzySearch(query, dataset) {
|
|
5
|
-
const q = query
|
|
5
|
+
const q = query.trim().toLowerCase().replace(/[\s-]/g, '');
|
|
6
6
|
const matchingIndices = [];
|
|
7
7
|
if (q.length === 0) {
|
|
8
8
|
for (let i = 0; i < dataset.length; i++) {
|
|
@@ -15,6 +15,6 @@ const shadow = {
|
|
|
15
15
|
boxShadow: colors_1.SHADOW_BLACK,
|
|
16
16
|
};
|
|
17
17
|
const RefreshCompositionOverlay = () => {
|
|
18
|
-
return (jsx_runtime_1.jsx(remotion_1.
|
|
18
|
+
return (jsx_runtime_1.jsx(remotion_1.Internals.AbsoluteFillElement, { style: exports.container, children: jsx_runtime_1.jsx("div", { style: shadow, children: jsx_runtime_1.jsx(RunningCalculateMetadata_1.RunningCalculateMetadata, {}) }) }));
|
|
19
19
|
};
|
|
20
20
|
exports.RefreshCompositionOverlay = RefreshCompositionOverlay;
|
|
@@ -42,6 +42,7 @@ const player_1 = require("@remotion/player");
|
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
44
44
|
const remotion_1 = require("remotion");
|
|
45
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
45
46
|
const client_id_1 = require("../helpers/client-id");
|
|
46
47
|
const colors_1 = require("../helpers/colors");
|
|
47
48
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
@@ -200,18 +201,19 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
|
|
|
200
201
|
}, [refresh]);
|
|
201
202
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
202
203
|
.previewServerState.type;
|
|
203
|
-
const
|
|
204
|
+
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
205
|
+
const canServerRender = connectionStatus === 'connected' && !isBrowserStudio;
|
|
204
206
|
const renderType = (0, react_1.useMemo)(() => {
|
|
205
207
|
if (readOnlyStudio) {
|
|
206
208
|
return preferredRenderType === 'render-command'
|
|
207
209
|
? 'render-command'
|
|
208
210
|
: 'client-render';
|
|
209
211
|
}
|
|
210
|
-
if (connectionStatus === 'disconnected') {
|
|
212
|
+
if (connectionStatus === 'disconnected' || isBrowserStudio) {
|
|
211
213
|
return 'client-render';
|
|
212
214
|
}
|
|
213
215
|
return preferredRenderType;
|
|
214
|
-
}, [connectionStatus, preferredRenderType, readOnlyStudio]);
|
|
216
|
+
}, [connectionStatus, isBrowserStudio, preferredRenderType, readOnlyStudio]);
|
|
215
217
|
const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? '' : '(R)';
|
|
216
218
|
const tooltip = renderType === 'render-command'
|
|
217
219
|
? 'Copy a CLI command to render this composition ' + shortcut
|
|
@@ -325,6 +327,7 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
|
|
|
325
327
|
initialTransparent: null,
|
|
326
328
|
initialMuted: null,
|
|
327
329
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
330
|
+
initialAllowHtmlInCanvas: defaults.allowHtmlInCanvas,
|
|
328
331
|
initialPageResponsiveness: 'medium',
|
|
329
332
|
});
|
|
330
333
|
}, [video, setSelectedModal, props, inFrame, outFrame, getCurrentFrame]);
|
|
@@ -79,7 +79,7 @@ const validateOutnameForStill = ({ outName, stillImageFormat, }) => {
|
|
|
79
79
|
// TODO: Shortcut: Shift + R
|
|
80
80
|
// TODO: Apply defaultCodec
|
|
81
81
|
// TODO: Apply defaultOutName
|
|
82
|
-
const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialPageResponsiveness, }) => {
|
|
82
|
+
const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialStillImageFormat, initialDefaultOutName, initialScale, initialDelayRenderTimeout, initialMediaCacheSizeInBytes, initialContainer, initialVideoCodec, initialAudioCodec, initialAudioBitrate, initialVideoBitrate, initialHardwareAcceleration, initialKeyframeIntervalInSeconds, initialTransparent, initialMuted, initialAllowHtmlInCanvas, initialPageResponsiveness, }) => {
|
|
83
83
|
var _a;
|
|
84
84
|
const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
|
|
85
85
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
@@ -127,6 +127,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
127
127
|
const [transparent, setTransparent] = (0, react_1.useState)(initialTransparent !== null && initialTransparent !== void 0 ? initialTransparent : false);
|
|
128
128
|
const [muted, setMuted] = (0, react_1.useState)(initialMuted !== null && initialMuted !== void 0 ? initialMuted : false);
|
|
129
129
|
const [scale, setScale] = (0, react_1.useState)(initialScale !== null && initialScale !== void 0 ? initialScale : 1);
|
|
130
|
+
const [allowHtmlInCanvas, setAllowHtmlInCanvas] = (0, react_1.useState)(initialAllowHtmlInCanvas !== null && initialAllowHtmlInCanvas !== void 0 ? initialAllowHtmlInCanvas : false);
|
|
130
131
|
const [pageResponsiveness, setPageResponsiveness] = (0, react_1.useState)(initialPageResponsiveness !== null && initialPageResponsiveness !== void 0 ? initialPageResponsiveness : 'medium');
|
|
131
132
|
const encodableAudioCodecs = (0, use_encodable_audio_codecs_1.useEncodableAudioCodecs)(container);
|
|
132
133
|
const encodableVideoCodecs = (0, use_encodable_video_codecs_1.useEncodableVideoCodecs)(container);
|
|
@@ -340,6 +341,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
340
341
|
logLevel,
|
|
341
342
|
licenseKey: publicLicenseKey,
|
|
342
343
|
scale,
|
|
344
|
+
allowHtmlInCanvas,
|
|
343
345
|
}, compositionRef);
|
|
344
346
|
}
|
|
345
347
|
else {
|
|
@@ -366,6 +368,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
366
368
|
logLevel,
|
|
367
369
|
licenseKey: publicLicenseKey,
|
|
368
370
|
scale,
|
|
371
|
+
allowHtmlInCanvas,
|
|
369
372
|
pageResponsiveness,
|
|
370
373
|
}, compositionRef);
|
|
371
374
|
}
|
|
@@ -407,6 +410,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
407
410
|
addClientStillJob,
|
|
408
411
|
addClientVideoJob,
|
|
409
412
|
scale,
|
|
413
|
+
allowHtmlInCanvas,
|
|
410
414
|
pageResponsiveness,
|
|
411
415
|
]);
|
|
412
416
|
return (jsx_runtime_1.jsxs("div", { style: render_modals_1.outerModalStyle, children: [
|
|
@@ -422,7 +426,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
422
426
|
canUpdate: false,
|
|
423
427
|
reason: 'render dialogue',
|
|
424
428
|
determined: false,
|
|
425
|
-
} })) : tab === 'picture' ? (jsx_runtime_1.jsx(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent, scale: scale, setScale: setScale, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(WebRenderModalAudio_1.WebRenderModalAudio, { renderMode: renderMode, muted: muted, setMuted: setMuted, audioCodec: audioCodec, setAudioCodec: setAudioCodec, audioBitrate: audioBitrate, setAudioBitrate: setAudioBitrate, container: container, encodableCodecs: encodableAudioCodecs, effectiveAudioCodec: effectiveAudioCodec })) : tab === 'advanced' ? (jsx_runtime_1.jsx(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, pageResponsiveness: pageResponsiveness, setPageResponsiveness: setPageResponsiveness })) : null })
|
|
429
|
+
} })) : tab === 'picture' ? (jsx_runtime_1.jsx(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent, scale: scale, setScale: setScale, compositionWidth: resolvedComposition.width, compositionHeight: resolvedComposition.height })) : tab === 'audio' ? (jsx_runtime_1.jsx(WebRenderModalAudio_1.WebRenderModalAudio, { renderMode: renderMode, muted: muted, setMuted: setMuted, audioCodec: audioCodec, setAudioCodec: setAudioCodec, audioBitrate: audioBitrate, setAudioBitrate: setAudioBitrate, container: container, encodableCodecs: encodableAudioCodecs, effectiveAudioCodec: effectiveAudioCodec })) : tab === 'advanced' ? (jsx_runtime_1.jsx(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration, allowHtmlInCanvas: allowHtmlInCanvas, setAllowHtmlInCanvas: setAllowHtmlInCanvas, pageResponsiveness: pageResponsiveness, setPageResponsiveness: setPageResponsiveness })) : null })
|
|
426
430
|
] })
|
|
427
431
|
] }));
|
|
428
432
|
};
|
|
@@ -9,6 +9,8 @@ type WebRenderModalAdvancedProps = {
|
|
|
9
9
|
readonly setMediaCacheSizeInBytes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
10
10
|
readonly hardwareAcceleration: 'no-preference' | 'prefer-hardware' | 'prefer-software';
|
|
11
11
|
readonly setHardwareAcceleration: (value: 'no-preference' | 'prefer-hardware' | 'prefer-software') => void;
|
|
12
|
+
readonly allowHtmlInCanvas: boolean;
|
|
13
|
+
readonly setAllowHtmlInCanvas: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
14
|
readonly pageResponsiveness: WebRendererPageResponsiveness;
|
|
13
15
|
readonly setPageResponsiveness: React.Dispatch<React.SetStateAction<WebRendererPageResponsiveness>>;
|
|
14
16
|
};
|
|
@@ -30,7 +30,7 @@ const PageResponsivenessDescription = () => {
|
|
|
30
30
|
" to give the browser more chances to update."] })
|
|
31
31
|
] }));
|
|
32
32
|
};
|
|
33
|
-
const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRenderTimeout, mediaCacheSizeInBytes, setMediaCacheSizeInBytes, hardwareAcceleration, setHardwareAcceleration, pageResponsiveness, setPageResponsiveness, }) => {
|
|
33
|
+
const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRenderTimeout, mediaCacheSizeInBytes, setMediaCacheSizeInBytes, hardwareAcceleration, setHardwareAcceleration, allowHtmlInCanvas, setAllowHtmlInCanvas, pageResponsiveness, setPageResponsiveness, }) => {
|
|
34
34
|
const toggleCustomMediaCacheSizeInBytes = (0, react_1.useCallback)(() => {
|
|
35
35
|
setMediaCacheSizeInBytes((previous) => {
|
|
36
36
|
if (previous === null) {
|
|
@@ -39,6 +39,9 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
|
|
|
39
39
|
return null;
|
|
40
40
|
});
|
|
41
41
|
}, [setMediaCacheSizeInBytes]);
|
|
42
|
+
const toggleAllowHtmlInCanvas = (0, react_1.useCallback)(() => {
|
|
43
|
+
setAllowHtmlInCanvas((previous) => !previous);
|
|
44
|
+
}, [setAllowHtmlInCanvas]);
|
|
42
45
|
const changeMediaCacheSizeInBytes = (0, react_1.useCallback)((cb) => {
|
|
43
46
|
setMediaCacheSizeInBytes((prev) => {
|
|
44
47
|
if (prev === null) {
|
|
@@ -160,7 +163,11 @@ const WebRenderModalAdvanced = ({ renderMode, delayRenderTimeout, setDelayRender
|
|
|
160
163
|
] }), 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" }) })
|
|
161
164
|
] }), mediaCacheSizeInBytes === null ? null : (jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "@remotion/media cache size", formatter: (w) => `${w} bytes`, min: 0, max: 10000000000, step: 10 * 1024 * 1024, value: mediaCacheSizeInBytes, onValueChanged: changeMediaCacheSizeInBytes })), renderMode === 'video' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
162
165
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Hardware Acceleration" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: hardwareAccelerationOptions, selectedId: hardwareAcceleration, title: "Hardware Acceleration" }) })
|
|
163
|
-
] })) : null,
|
|
166
|
+
] })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
167
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Allow HTML-in-canvas ",
|
|
168
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "allowHtmlInCanvas", id: "allowHtmlInCanvasOption" })
|
|
169
|
+
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: allowHtmlInCanvas, onChange: toggleAllowHtmlInCanvas, name: "allow-html-in-canvas" }) })
|
|
170
|
+
] }), renderMode === 'still' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
164
171
|
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
165
172
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Page Responsiveness ",
|
|
166
173
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererCustomOptionExplainerBubble, { apiName: "pageResponsiveness", description: jsx_runtime_1.jsx(PageResponsivenessDescription, {}), docLink: "https://www.remotion.dev/docs/client-side-rendering/page-responsiveness", name: "Page responsiveness" })
|
|
@@ -20,15 +20,19 @@ exports.container = {
|
|
|
20
20
|
exports.optionsPanel = {
|
|
21
21
|
display: 'flex',
|
|
22
22
|
flex: 1,
|
|
23
|
+
minHeight: 0,
|
|
23
24
|
minWidth: 0,
|
|
25
|
+
overflowY: 'auto',
|
|
24
26
|
};
|
|
25
27
|
exports.horizontalLayout = {
|
|
26
28
|
display: 'flex',
|
|
27
29
|
flexDirection: 'row',
|
|
28
|
-
overflowY: 'auto',
|
|
29
30
|
flex: 1,
|
|
31
|
+
minHeight: 0,
|
|
32
|
+
overflow: 'hidden',
|
|
30
33
|
};
|
|
31
34
|
exports.leftSidebar = {
|
|
35
|
+
flexShrink: 0,
|
|
32
36
|
padding: 6,
|
|
33
37
|
};
|
|
34
38
|
exports.horizontalTab = {
|
|
@@ -4,6 +4,7 @@ exports.ClientRenderQueueProcessor = void 0;
|
|
|
4
4
|
const web_renderer_1 = require("@remotion/web-renderer");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const save_render_output_1 = require("../../api/save-render-output");
|
|
7
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
7
8
|
const download_blob_1 = require("../../helpers/download-blob");
|
|
8
9
|
const context_1 = require("./context");
|
|
9
10
|
const ClientRenderQueueProcessor = () => {
|
|
@@ -33,6 +34,7 @@ const ClientRenderQueueProcessor = () => {
|
|
|
33
34
|
licenseKey: (_b = job.licenseKey) !== null && _b !== void 0 ? _b : undefined,
|
|
34
35
|
scale: job.scale,
|
|
35
36
|
signal,
|
|
37
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas,
|
|
36
38
|
})).blob({ format: job.imageFormat });
|
|
37
39
|
return {
|
|
38
40
|
getBlob: () => Promise.resolve(blob),
|
|
@@ -86,6 +88,7 @@ const ClientRenderQueueProcessor = () => {
|
|
|
86
88
|
outputTarget: 'web-fs',
|
|
87
89
|
licenseKey: (_c = job.licenseKey) !== null && _c !== void 0 ? _c : undefined,
|
|
88
90
|
pageResponsiveness: job.pageResponsiveness,
|
|
91
|
+
allowHtmlInCanvas: job.allowHtmlInCanvas,
|
|
89
92
|
});
|
|
90
93
|
return {
|
|
91
94
|
getBlob,
|
|
@@ -118,7 +121,8 @@ const ClientRenderQueueProcessor = () => {
|
|
|
118
121
|
(0, download_blob_1.downloadBlob)(blob, job.outName);
|
|
119
122
|
markClientJobDone(job.id, metadata, getBlob);
|
|
120
123
|
};
|
|
121
|
-
if (window.remotion_isReadOnlyStudio
|
|
124
|
+
if (window.remotion_isReadOnlyStudio ||
|
|
125
|
+
(0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
|
|
122
126
|
downloadAndFinish();
|
|
123
127
|
}
|
|
124
128
|
else {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applyVisualControlChange = exports.callUpdateDefaultPropsApi = exports.getProjectInfo = exports.updateAvailable = exports.cancelRenderJob = exports.removeRenderJob = exports.applyCodemod = exports.openInFileExplorer = exports.subscribeToFileExistenceWatcher = exports.unsubscribeFromFileExistenceWatcher = exports.addVideoRenderJob = exports.addSequenceRenderJob = exports.addStillRenderJob = void 0;
|
|
4
4
|
const no_react_1 = require("remotion/no-react");
|
|
5
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
5
6
|
const call_api_1 = require("../call-api");
|
|
6
7
|
const addStillRenderJob = ({ compositionId, outName, imageFormat, jpegQuality, frame, scale, logLevel, chromiumOptions, delayRenderTimeout, envVariables, inputProps, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, multiProcessOnLinux, beepOnFinish, metadata, chromeMode, mediaCacheSizeInBytes, licenseKey, }) => {
|
|
7
8
|
return (0, call_api_1.callApi)('/api/render', {
|
|
@@ -142,6 +143,10 @@ const applyCodemod = ({ codemod, dryRun, symbolicatedStack, signal, }) => {
|
|
|
142
143
|
dryRun,
|
|
143
144
|
symbolicatedStack,
|
|
144
145
|
};
|
|
146
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
147
|
+
if (browserStudioOperations !== null) {
|
|
148
|
+
return browserStudioOperations.applyCodemod(body);
|
|
149
|
+
}
|
|
145
150
|
return (0, call_api_1.callApi)('/api/apply-codemod', body, signal);
|
|
146
151
|
};
|
|
147
152
|
exports.applyCodemod = applyCodemod;
|
|
@@ -166,7 +171,7 @@ const getProjectInfo = (signal) => {
|
|
|
166
171
|
};
|
|
167
172
|
exports.getProjectInfo = getProjectInfo;
|
|
168
173
|
const callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
|
|
169
|
-
|
|
174
|
+
const body = {
|
|
170
175
|
compositionId,
|
|
171
176
|
defaultProps: no_react_1.NoReactInternals.serializeJSONWithSpecialTypes({
|
|
172
177
|
data: defaultProps,
|
|
@@ -174,7 +179,12 @@ const callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
|
|
|
174
179
|
staticBase: window.remotion_staticBase,
|
|
175
180
|
}).serializedString,
|
|
176
181
|
enumPaths,
|
|
177
|
-
}
|
|
182
|
+
};
|
|
183
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
184
|
+
if (browserStudioOperations !== null) {
|
|
185
|
+
return browserStudioOperations.updateDefaultProps(body);
|
|
186
|
+
}
|
|
187
|
+
return (0, call_api_1.callApi)('/api/update-default-props', body);
|
|
178
188
|
};
|
|
179
189
|
exports.callUpdateDefaultPropsApi = callUpdateDefaultPropsApi;
|
|
180
190
|
const applyVisualControlChange = ({ fileName, changes, }) => {
|