@remotion/studio 4.0.519 → 4.0.521
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/api/shut-down-studio.d.ts +6 -0
- package/dist/api/shut-down-studio.js +23 -0
- package/dist/api/visual-control.js +2 -2
- package/dist/components/AudioWaveform.js +16 -7
- package/dist/components/Canvas.js +114 -48
- package/dist/components/CaptionInspector.d.ts +1 -0
- package/dist/components/CaptionInspector.js +43 -2
- package/dist/components/CaptionTextEditor.js +1 -1
- package/dist/components/CompositionSelector.js +41 -34
- package/dist/components/CompositionSelectorItem.d.ts +7 -0
- package/dist/components/CompositionSelectorItem.js +344 -73
- package/dist/components/CurrentCompositionSideEffects.js +5 -0
- package/dist/components/ElementInstallConfirmation.d.ts +2 -23
- package/dist/components/ElementInstallConfirmation.js +89 -65
- package/dist/components/ElementLibraryModal.js +3 -1
- package/dist/components/FpsCounter.js +1 -1
- package/dist/components/FramePersistor.js +1 -1
- package/dist/components/InlineCaptionInspector.js +37 -1
- package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -18
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
- package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
- package/dist/components/InspectorSequenceSection.js +1 -4
- package/dist/components/Menu/MenuSubItem.js +1 -1
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/ModalHeader.js +5 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/NewComposition.js +2 -2
- package/dist/components/PlayPause.js +2 -13
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +29 -15
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
- package/dist/components/QuickSwitcher/asset-search.d.ts +0 -1
- package/dist/components/QuickSwitcher/asset-search.js +1 -16
- package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
- package/dist/components/QuickSwitcher/composition-search.js +136 -0
- package/dist/components/RenderButton.js +2 -2
- package/dist/components/RenderModal/RenderStatusModal.js +7 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WebRenderModal.js +1 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -1
- package/dist/components/ResetZoomButton.js +17 -2
- package/dist/components/SelectedOutlineElement.js +10 -30
- package/dist/components/SettingsModal.js +8 -5
- package/dist/components/TimeValue.js +36 -7
- package/dist/components/Timeline/Timeline.d.ts +1 -1
- package/dist/components/Timeline/Timeline.js +33 -20
- package/dist/components/Timeline/TimelineAssetField.d.ts +0 -1
- package/dist/components/Timeline/TimelineAssetField.js +17 -9
- package/dist/components/Timeline/TimelineCollapseToggle.js +1 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
- package/dist/components/Timeline/TimelineDragHandler.js +18 -8
- package/dist/components/Timeline/TimelineFontWeightField.d.ts +11 -0
- package/dist/components/Timeline/TimelineFontWeightField.js +65 -0
- package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
- package/dist/components/Timeline/TimelineLayerChildren.d.ts +21 -0
- package/dist/components/Timeline/TimelineLayerChildren.js +129 -0
- package/dist/components/Timeline/TimelineNumberField.js +13 -5
- package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
- package/dist/components/Timeline/TimelineSequence.js +54 -73
- package/dist/components/Timeline/TimelineSequenceItem.js +16 -36
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +22 -10
- package/dist/components/Timeline/TimelineSlider.js +2 -2
- package/dist/components/Timeline/TimelineTickFormatProvider.d.ts +8 -0
- package/dist/components/Timeline/TimelineTickFormatProvider.js +16 -0
- package/dist/components/Timeline/TimelineTimeIndicators.js +7 -3
- package/dist/components/Timeline/TimelineVideoInfo.js +7 -3
- package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
- package/dist/components/Timeline/TimelineZoomControls.js +25 -8
- package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
- package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
- package/dist/components/UpdateStatusContext.d.ts +5 -0
- package/dist/components/UpdateStatusContext.js +53 -2
- package/dist/components/UpdatesSettings.js +25 -4
- package/dist/components/WebMcp.js +87 -8
- package/dist/components/ZoomPersistor.js +2 -2
- package/dist/components/composition-drag-data.d.ts +36 -0
- package/dist/components/composition-drag-data.js +232 -0
- package/dist/components/composition-selector-drag-data.d.ts +27 -0
- package/dist/components/composition-selector-drag-data.js +80 -0
- package/dist/components/drop-handler-data.d.ts +2 -1
- package/dist/components/drop-handler-data.js +6 -4
- package/dist/components/effect-drag-and-drop.d.ts +2 -5
- package/dist/components/handle-drop.js +6 -2
- package/dist/components/import-assets.d.ts +7 -14
- package/dist/components/import-assets.js +11 -1
- package/dist/components/parse-caption-file.d.ts +5 -0
- package/dist/components/parse-caption-file.js +63 -0
- package/dist/error-overlay/current-error.d.ts +13 -0
- package/dist/error-overlay/current-error.js +21 -0
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +5 -1
- package/dist/esm/chunk-emw4k5b0.js +99527 -0
- package/dist/esm/{chunk-1fkq5bfq.js → chunk-vkrvnx2h.js} +20116 -16283
- package/dist/esm/index.mjs +27 -9
- package/dist/esm/internals.mjs +17408 -13426
- package/dist/esm/previewEntry.mjs +17285 -13216
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/create-folder-tree.js +2 -5
- package/dist/helpers/document-title.d.ts +2 -0
- package/dist/helpers/document-title.js +14 -3
- package/dist/helpers/get-preview-file-type.js +22 -3
- package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
- package/dist/helpers/get-timeline-max-zoom.js +46 -29
- package/dist/helpers/inserted-element-selection.d.ts +2 -1
- package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
- package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
- package/dist/helpers/open-in-editor.js +2 -1
- package/dist/helpers/use-menu-structure.js +2 -2
- package/dist/helpers/use-runtime-values.d.ts +1 -1
- package/dist/helpers/use-runtime-values.js +5 -4
- package/dist/helpers/use-sync-external-store.d.ts +3 -0
- package/dist/helpers/use-sync-external-store.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/previewEntry.js +2 -0
- package/dist/state/modals.d.ts +16 -2
- package/dist/state/timeline-sequence-hover.js +3 -2
- package/dist/state/timeline-zoom.d.ts +0 -1
- package/dist/state/timeline-zoom.js +13 -6
- package/package.json +17 -17
- package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
- package/dist/helpers/sort-by-nonce-history.js +0 -6
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NewComposition = exports.NewCompositionFields = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const remotion_1 = require("remotion");
|
|
7
8
|
const get_static_files_1 = require("../../api/get-static-files");
|
|
@@ -9,7 +10,6 @@ const write_static_file_1 = require("../../api/write-static-file");
|
|
|
9
10
|
const colors_1 = require("../../helpers/colors");
|
|
10
11
|
const get_folder_id_1 = require("../../helpers/get-folder-id");
|
|
11
12
|
const install_required_package_1 = require("../../helpers/install-required-package");
|
|
12
|
-
const sort_by_nonce_history_1 = require("../../helpers/sort-by-nonce-history");
|
|
13
13
|
const use_create_composition_1 = require("../../helpers/use-create-composition");
|
|
14
14
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
15
15
|
const folder_1 = require("../../icons/folder");
|
|
@@ -83,7 +83,7 @@ const NewCompositionFields = ({ heightValidationMessage, inputRef, nameValidatio
|
|
|
83
83
|
? folders
|
|
84
84
|
.slice()
|
|
85
85
|
.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }))
|
|
86
|
-
: (0,
|
|
86
|
+
: (0, canvas_1.sortItemsByCommitOrder)(folders, (folder) => folder.order);
|
|
87
87
|
const appendFolders = (parent) => {
|
|
88
88
|
sortedFolders
|
|
89
89
|
.filter((folder) => folder.parent === parent)
|
|
@@ -79,19 +79,8 @@ const PlayPauseInner = ({ playbackRate, loop, bufferStateDelayInMilliseconds, mu
|
|
|
79
79
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
80
80
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
81
81
|
const [showBufferIndicator, setShowBufferState] = (0, react_1.useState)(false);
|
|
82
|
-
const { play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, emitter, getCurrentFrame,
|
|
83
|
-
const
|
|
84
|
-
(0, react_1.useEffect)(() => {
|
|
85
|
-
const onPlay = () => setPlaying(true);
|
|
86
|
-
const onPause = () => setPlaying(false);
|
|
87
|
-
setPlaying(isPlaying());
|
|
88
|
-
emitter.addEventListener('play', onPlay);
|
|
89
|
-
emitter.addEventListener('pause', onPause);
|
|
90
|
-
return () => {
|
|
91
|
-
emitter.removeEventListener('play', onPlay);
|
|
92
|
-
emitter.removeEventListener('pause', onPause);
|
|
93
|
-
};
|
|
94
|
-
}, [emitter, isPlaying]);
|
|
82
|
+
const { play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, emitter, getCurrentFrame, } = player_1.PlayerInternals.usePlayerMethods();
|
|
83
|
+
const playing = remotion_1.Internals.usePlaying();
|
|
95
84
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
96
85
|
(0, react_1.useEffect)(() => {
|
|
97
86
|
if (isStill) {
|
|
@@ -98,7 +98,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
98
98
|
!showCompositionControls ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
99
99
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.25 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SnappingToggle_1.SnappingToggle, {}) })
|
|
100
100
|
] }))] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), canvasContent && isFullscreenSupported ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, { hidden: isMobileLayout }) })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
|
|
101
|
-
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio, size: "compact", narrow: isMobileLayout }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
101
|
+
jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout ? null : jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio, size: "compact", narrow: isMobileLayout }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
102
102
|
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {})
|
|
103
103
|
] }));
|
|
104
104
|
};
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const colors_1 = require("../../helpers/colors");
|
|
8
|
+
const create_folder_tree_1 = require("../../helpers/create-folder-tree");
|
|
8
9
|
const get_preview_file_type_1 = require("../../helpers/get-preview-file-type");
|
|
9
10
|
const is_composition_still_1 = require("../../helpers/is-composition-still");
|
|
10
11
|
const url_state_1 = require("../../helpers/url-state");
|
|
@@ -19,6 +20,7 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
19
20
|
const use_static_files_1 = require("../use-static-files");
|
|
20
21
|
const algolia_search_1 = require("./algolia-search");
|
|
21
22
|
const asset_search_1 = require("./asset-search");
|
|
23
|
+
const composition_search_1 = require("./composition-search");
|
|
22
24
|
const fuzzy_search_1 = require("./fuzzy-search");
|
|
23
25
|
const NoResults_1 = require("./NoResults");
|
|
24
26
|
const QuickSwitcherResult_1 = require("./QuickSwitcherResult");
|
|
@@ -108,7 +110,9 @@ const mapModeToQuery = (mode) => {
|
|
|
108
110
|
throw new Error('no mode' + mode);
|
|
109
111
|
};
|
|
110
112
|
const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio, assetSelection, compositionSelection, }) => {
|
|
111
|
-
|
|
113
|
+
var _a;
|
|
114
|
+
var _b;
|
|
115
|
+
const { compositions, folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
112
116
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
113
117
|
const [state, setState] = (0, react_1.useState)(() => {
|
|
114
118
|
return {
|
|
@@ -201,37 +205,45 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio
|
|
|
201
205
|
...assetResults,
|
|
202
206
|
];
|
|
203
207
|
}
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
.
|
|
208
|
+
const tree = (0, create_folder_tree_1.createFolderTree)(compositions.filter((composition) => composition.id !== (compositionSelection === null || compositionSelection === void 0 ? void 0 : compositionSelection.excludeCompositionId)), folders, {});
|
|
209
|
+
return (0, composition_search_1.searchCompositionTree)({ items: tree, query: actualQuery }).map((result) => {
|
|
210
|
+
if (result.type === 'folder') {
|
|
211
|
+
return result;
|
|
212
|
+
}
|
|
213
|
+
const { composition } = result;
|
|
207
214
|
return {
|
|
208
|
-
id: 'composition-' +
|
|
209
|
-
title:
|
|
215
|
+
id: 'composition-' + composition.id,
|
|
216
|
+
title: composition.id,
|
|
210
217
|
type: 'composition',
|
|
218
|
+
composition,
|
|
219
|
+
level: result.level,
|
|
211
220
|
onSelected: () => {
|
|
212
221
|
var _a;
|
|
213
222
|
if (compositionSelection !== null) {
|
|
214
|
-
compositionSelection.onSelected(
|
|
223
|
+
compositionSelection.onSelected(composition);
|
|
215
224
|
setSelectedModal(null);
|
|
216
225
|
return;
|
|
217
226
|
}
|
|
218
|
-
selectComposition(
|
|
227
|
+
selectComposition(composition, true);
|
|
219
228
|
setSelectedModal(null);
|
|
220
|
-
const selector = `.__remotion-composition[data-compname="${
|
|
221
|
-
(_a = remotion_1.Internals.compositionSelectorRef.current) === null || _a === void 0 ? void 0 : _a.expandComposition(
|
|
229
|
+
const selector = `.__remotion-composition[data-compname="${composition.id}"]`;
|
|
230
|
+
(_a = remotion_1.Internals.compositionSelectorRef.current) === null || _a === void 0 ? void 0 : _a.expandComposition(composition.id);
|
|
222
231
|
waitForElm(selector).then(() => {
|
|
223
232
|
var _a;
|
|
224
233
|
(_a = document
|
|
225
234
|
.querySelector(selector)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ block: 'center' });
|
|
226
235
|
});
|
|
227
236
|
},
|
|
228
|
-
compositionType: (0, is_composition_still_1.isCompositionStill)(
|
|
237
|
+
compositionType: (0, is_composition_still_1.isCompositionStill)(composition)
|
|
238
|
+
? 'still'
|
|
239
|
+
: 'composition',
|
|
229
240
|
};
|
|
230
|
-
})
|
|
241
|
+
});
|
|
231
242
|
}, [
|
|
232
243
|
mode,
|
|
233
244
|
actualQuery,
|
|
234
245
|
compositions,
|
|
246
|
+
folders,
|
|
235
247
|
menuActions,
|
|
236
248
|
docResults,
|
|
237
249
|
assetSearch,
|
|
@@ -319,7 +331,9 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio
|
|
|
319
331
|
const onTextChange = (0, react_1.useCallback)((e) => {
|
|
320
332
|
setState({ query: e.target.value, selectedIndex: 0 });
|
|
321
333
|
}, []);
|
|
322
|
-
const
|
|
334
|
+
const selectableResults = resultsArray.filter(QuickSwitcherResult_1.isQuickSwitcherResultSelectable);
|
|
335
|
+
const selectedIndexRounded = (0, shared_1.loopIndex)(state.selectedIndex, selectableResults.length);
|
|
336
|
+
const selectedResultId = (_b = (_a = selectableResults[selectedIndexRounded]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : null;
|
|
323
337
|
const focusInput = (0, react_1.useCallback)(() => {
|
|
324
338
|
var _a;
|
|
325
339
|
if (!isTouchscreen) {
|
|
@@ -369,8 +383,8 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio
|
|
|
369
383
|
] })), jsx_runtime_1.jsx("div", { style: assetSelection === null && compositionSelection === null
|
|
370
384
|
? content
|
|
371
385
|
: contentWithoutModeSelector, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, type: "text", style: isTouchscreen ? touchscreenInput : input, autoFocus: !isTouchscreen, status: "ok", value: state.query, onChange: onTextChange, placeholder: placeholder, rightAlign: false }) }), jsx_runtime_1.jsx("div", { style: results, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: showEmptyDocSearch ||
|
|
372
|
-
showSearchLoadingState ? null : resultsArray.length === 0 ? (jsx_runtime_1.jsx(NoResults_1.QuickSwitcherNoResults, { mode: mode, query: actualQuery })) : (resultsArray.map((result
|
|
373
|
-
return (jsx_runtime_1.jsx(QuickSwitcherResult_1.QuickSwitcherResult, { selected:
|
|
386
|
+
showSearchLoadingState ? null : resultsArray.length === 0 ? (jsx_runtime_1.jsx(NoResults_1.QuickSwitcherNoResults, { mode: mode, query: actualQuery })) : (resultsArray.map((result) => {
|
|
387
|
+
return (jsx_runtime_1.jsx(QuickSwitcherResult_1.QuickSwitcherResult, { selected: selectedResultId === result.id, result: result }, result.id));
|
|
374
388
|
})) })
|
|
375
389
|
] }));
|
|
376
390
|
};
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { _InternalTypes } from 'remotion';
|
|
2
3
|
import type { AssetFileType } from '../../helpers/get-preview-file-type';
|
|
3
4
|
type QuickSwitcherResultDetail = {
|
|
4
5
|
type: 'asset';
|
|
5
6
|
fileType: AssetFileType;
|
|
6
7
|
} | {
|
|
7
8
|
type: 'composition';
|
|
9
|
+
composition: _InternalTypes['AnyComposition'];
|
|
8
10
|
compositionType: 'composition' | 'still';
|
|
11
|
+
level: number;
|
|
9
12
|
} | {
|
|
10
13
|
type: 'menu-item';
|
|
11
14
|
} | {
|
|
@@ -15,7 +18,17 @@ type QuickSwitcherResultDetail = {
|
|
|
15
18
|
titleLine: string;
|
|
16
19
|
subtitleLine: string;
|
|
17
20
|
};
|
|
18
|
-
export type TQuickSwitcherResult = {
|
|
21
|
+
export type TQuickSwitcherResult = ({
|
|
22
|
+
title: string;
|
|
23
|
+
id: string;
|
|
24
|
+
onSelected: () => void;
|
|
25
|
+
} & QuickSwitcherResultDetail) | {
|
|
26
|
+
title: string;
|
|
27
|
+
id: string;
|
|
28
|
+
type: 'folder';
|
|
29
|
+
level: number;
|
|
30
|
+
};
|
|
31
|
+
export declare const isQuickSwitcherResultSelectable: (result: TQuickSwitcherResult) => result is {
|
|
19
32
|
title: string;
|
|
20
33
|
id: string;
|
|
21
34
|
onSelected: () => void;
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QuickSwitcherResult = void 0;
|
|
3
|
+
exports.QuickSwitcherResult = exports.isQuickSwitcherResultSelectable = 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");
|
|
8
|
+
const noop_1 = require("../../helpers/noop");
|
|
7
9
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
10
|
+
const folder_1 = require("../../icons/folder");
|
|
8
11
|
const still_1 = require("../../icons/still");
|
|
9
12
|
const upload_1 = require("../../icons/upload");
|
|
10
13
|
const video_1 = require("../../icons/video");
|
|
14
|
+
const modals_1 = require("../../state/modals");
|
|
11
15
|
const AssetFileIcon_1 = require("../AssetFileIcon");
|
|
16
|
+
const composition_menu_items_1 = require("../composition-menu-items");
|
|
17
|
+
const ContextMenu_1 = require("../ContextMenu");
|
|
12
18
|
const layout_1 = require("../layout");
|
|
19
|
+
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
20
|
+
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
13
21
|
const shared_1 = require("./shared");
|
|
22
|
+
const isQuickSwitcherResultSelectable = (result) => {
|
|
23
|
+
return result.type !== 'folder';
|
|
24
|
+
};
|
|
25
|
+
exports.isQuickSwitcherResultSelectable = isQuickSwitcherResultSelectable;
|
|
14
26
|
const container = {
|
|
15
27
|
paddingLeft: 16,
|
|
16
28
|
paddingRight: 16,
|
|
@@ -48,10 +60,44 @@ const labelContainer = {
|
|
|
48
60
|
paddingBottom: 5,
|
|
49
61
|
};
|
|
50
62
|
const QuickSwitcherResult = ({ result, selected }) => {
|
|
63
|
+
var _a;
|
|
51
64
|
const [hovered, setIsHovered] = (0, react_1.useState)(false);
|
|
52
65
|
const ref = (0, react_1.useRef)(null);
|
|
53
66
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
67
|
+
const onSelected = result.type === 'folder' ? null : result.onSelected;
|
|
68
|
+
const composition = result.type === 'composition' ? result.composition : null;
|
|
69
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
70
|
+
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
71
|
+
.previewServerState.type;
|
|
72
|
+
const { defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
|
|
73
|
+
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)((_a = composition === null || composition === void 0 ? void 0 : composition.stack) !== null && _a !== void 0 ? _a : null);
|
|
74
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
75
|
+
if (composition === null) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
return (0, composition_menu_items_1.getCompositionContextMenuItems)({
|
|
79
|
+
closeMenu: noop_1.noop,
|
|
80
|
+
composition,
|
|
81
|
+
connectionStatus,
|
|
82
|
+
editorId: defaultEditorId,
|
|
83
|
+
editorName: defaultEditorName,
|
|
84
|
+
includeCompositionManagementItems: true,
|
|
85
|
+
resolvedLocation,
|
|
86
|
+
setSelectedModal,
|
|
87
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
88
|
+
});
|
|
89
|
+
}, [
|
|
90
|
+
composition,
|
|
91
|
+
connectionStatus,
|
|
92
|
+
defaultEditorId,
|
|
93
|
+
defaultEditorName,
|
|
94
|
+
resolvedLocation,
|
|
95
|
+
setSelectedModal,
|
|
96
|
+
]);
|
|
54
97
|
(0, react_1.useEffect)(() => {
|
|
98
|
+
if (result.type === 'folder') {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
55
101
|
const { current } = ref;
|
|
56
102
|
if (!current) {
|
|
57
103
|
return;
|
|
@@ -64,14 +110,14 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
64
110
|
current.removeEventListener('mouseenter', onMouseEnter);
|
|
65
111
|
current.removeEventListener('mouseleave', onMouseLeave);
|
|
66
112
|
};
|
|
67
|
-
}, []);
|
|
113
|
+
}, [result.type]);
|
|
68
114
|
(0, react_1.useEffect)(() => {
|
|
69
|
-
if (!selected) {
|
|
115
|
+
if (!selected || onSelected === null) {
|
|
70
116
|
return;
|
|
71
117
|
}
|
|
72
118
|
const binding = keybindings.registerKeybinding({
|
|
73
119
|
key: 'Enter',
|
|
74
|
-
callback:
|
|
120
|
+
callback: onSelected,
|
|
75
121
|
commandCtrlKey: false,
|
|
76
122
|
event: 'keydown',
|
|
77
123
|
preventDefault: true,
|
|
@@ -82,18 +128,23 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
82
128
|
return () => {
|
|
83
129
|
binding.unregister();
|
|
84
130
|
};
|
|
85
|
-
}, [keybindings,
|
|
131
|
+
}, [keybindings, onSelected, selected]);
|
|
86
132
|
(0, shared_1.useScrollIntoViewOnSelected)(ref, selected);
|
|
87
133
|
const style = (0, react_1.useMemo)(() => {
|
|
88
134
|
return {
|
|
89
135
|
...container,
|
|
90
|
-
|
|
136
|
+
paddingLeft: result.type === 'folder' || result.type === 'composition'
|
|
137
|
+
? 16 + result.level * 8
|
|
138
|
+
: container.paddingLeft,
|
|
139
|
+
backgroundColor: result.type !== 'folder' && (hovered || selected)
|
|
140
|
+
? colors_1.WHITE_ALPHA_06
|
|
141
|
+
: colors_1.TRANSPARENT,
|
|
91
142
|
};
|
|
92
|
-
}, [hovered, selected]);
|
|
143
|
+
}, [hovered, result, selected]);
|
|
93
144
|
const labelStyle = (0, react_1.useMemo)(() => {
|
|
94
145
|
return {
|
|
95
146
|
...(result.type === 'search-result' ? searchLabel : label),
|
|
96
|
-
color: result.type === 'search-result'
|
|
147
|
+
color: result.type === 'search-result' || result.type === 'folder'
|
|
97
148
|
? colors_1.LIGHT_TEXT
|
|
98
149
|
: selected || hovered
|
|
99
150
|
? colors_1.WHITE
|
|
@@ -101,7 +152,7 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
101
152
|
fontSize: shared_1.QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE,
|
|
102
153
|
};
|
|
103
154
|
}, [hovered, result.type, selected]);
|
|
104
|
-
|
|
155
|
+
const row = (jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: onSelected !== null && onSelected !== void 0 ? onSelected : undefined, children: [result.type === 'composition' ? (result.compositionType === 'still' ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle }))) : result.type === 'folder' ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: colors_1.LIGHT_TEXT, style: iconStyle })) : result.type === 'asset' ? (jsx_runtime_1.jsx(AssetFileIcon_1.AssetFileIcon, { fileType: result.fileType, color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: iconStyle })) : result.type === 'select-file' ? (jsx_runtime_1.jsx(upload_1.UploadIcon, { color: selected || hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT, style: selectFileIconStyle })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelContainer, children: result.type === 'search-result' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
105
156
|
jsx_runtime_1.jsx("div", {
|
|
106
157
|
// eslint-disable-next-line react/no-danger
|
|
107
158
|
dangerouslySetInnerHTML: {
|
|
@@ -113,5 +164,9 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
113
164
|
}, style: labelStyle })
|
|
114
165
|
] })) : (jsx_runtime_1.jsx("div", { style: labelStyle, children: result.title })) })
|
|
115
166
|
] }, result.id));
|
|
167
|
+
if (composition === null) {
|
|
168
|
+
return row;
|
|
169
|
+
}
|
|
170
|
+
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
116
171
|
};
|
|
117
172
|
exports.QuickSwitcherResult = QuickSwitcherResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.filterAssetsByType = void 0;
|
|
4
4
|
const get_preview_file_type_1 = require("../../helpers/get-preview-file-type");
|
|
5
5
|
const typeFilterRegex = /(^|\s)type:([^\s]+)/gi;
|
|
6
6
|
const filterAssetsByType = ({ assets, query, }) => {
|
|
@@ -26,18 +26,3 @@ const filterAssetsByType = ({ assets, query, }) => {
|
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
28
|
exports.filterAssetsByType = filterAssetsByType;
|
|
29
|
-
const componentAssetTypes = {
|
|
30
|
-
'dev.remotion.media.Audio': 'audio',
|
|
31
|
-
'dev.remotion.media.Video': 'video',
|
|
32
|
-
'dev.remotion.remotion.AnimatedImage': 'image',
|
|
33
|
-
'dev.remotion.remotion.CanvasImage': 'image',
|
|
34
|
-
'dev.remotion.remotion.Img': 'image',
|
|
35
|
-
};
|
|
36
|
-
const getAssetSearchQueryForComponent = (componentIdentity) => {
|
|
37
|
-
if (componentIdentity === null) {
|
|
38
|
-
return '';
|
|
39
|
-
}
|
|
40
|
-
const assetType = componentAssetTypes[componentIdentity];
|
|
41
|
-
return assetType ? `type:${assetType} ` : '';
|
|
42
|
-
};
|
|
43
|
-
exports.getAssetSearchQueryForComponent = getAssetSearchQueryForComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { _InternalTypes } from 'remotion';
|
|
2
|
+
import type { CompositionSelectorItemType } from '../CompositionSelectorItem';
|
|
3
|
+
export type CompositionSearchResult = {
|
|
4
|
+
readonly type: 'folder';
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly title: string;
|
|
7
|
+
readonly level: number;
|
|
8
|
+
} | {
|
|
9
|
+
readonly type: 'composition';
|
|
10
|
+
readonly composition: _InternalTypes['AnyComposition'];
|
|
11
|
+
readonly level: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const searchCompositionTree: ({ items, query, }: {
|
|
14
|
+
readonly items: CompositionSelectorItemType[];
|
|
15
|
+
readonly query: string;
|
|
16
|
+
}) => CompositionSearchResult[];
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchCompositionTree = void 0;
|
|
4
|
+
const normalizeSearchText = (text) => {
|
|
5
|
+
return text
|
|
6
|
+
.trim()
|
|
7
|
+
.toLowerCase()
|
|
8
|
+
.replace(/[\s/-]/g, '');
|
|
9
|
+
};
|
|
10
|
+
const getMatchScore = (query, candidate) => {
|
|
11
|
+
const normalizedCandidate = normalizeSearchText(candidate);
|
|
12
|
+
if (normalizedCandidate === query) {
|
|
13
|
+
return 400000 - normalizedCandidate.length;
|
|
14
|
+
}
|
|
15
|
+
if (normalizedCandidate.startsWith(query)) {
|
|
16
|
+
return 300000 - (normalizedCandidate.length - query.length);
|
|
17
|
+
}
|
|
18
|
+
const substringIndex = normalizedCandidate.indexOf(query);
|
|
19
|
+
if (substringIndex !== -1) {
|
|
20
|
+
return (200000 -
|
|
21
|
+
substringIndex * 100 -
|
|
22
|
+
(normalizedCandidate.length - query.length));
|
|
23
|
+
}
|
|
24
|
+
let previousIndex = -1;
|
|
25
|
+
let firstIndex = -1;
|
|
26
|
+
let gapCount = 0;
|
|
27
|
+
for (const character of query) {
|
|
28
|
+
const nextIndex = normalizedCandidate.indexOf(character, previousIndex + 1);
|
|
29
|
+
if (nextIndex === -1) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
if (firstIndex === -1) {
|
|
33
|
+
firstIndex = nextIndex;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
gapCount += nextIndex - previousIndex - 1;
|
|
37
|
+
}
|
|
38
|
+
previousIndex = nextIndex;
|
|
39
|
+
}
|
|
40
|
+
return (100000 -
|
|
41
|
+
gapCount * 100 -
|
|
42
|
+
firstIndex * 10 -
|
|
43
|
+
(normalizedCandidate.length - query.length));
|
|
44
|
+
};
|
|
45
|
+
const searchCompositionTree = ({ items, query, }) => {
|
|
46
|
+
const normalizedQuery = normalizeSearchText(query);
|
|
47
|
+
const filterAndRank = (treeItems, level, inheritedFolderScore) => {
|
|
48
|
+
const rankedItems = treeItems
|
|
49
|
+
.map((item, originalIndex) => {
|
|
50
|
+
if (item.type === 'composition') {
|
|
51
|
+
const compositionPath = [
|
|
52
|
+
item.composition.parentFolderName,
|
|
53
|
+
item.composition.folderName,
|
|
54
|
+
item.composition.id,
|
|
55
|
+
]
|
|
56
|
+
.filter(Boolean)
|
|
57
|
+
.join('/');
|
|
58
|
+
const idScore = normalizedQuery === ''
|
|
59
|
+
? 0
|
|
60
|
+
: getMatchScore(normalizedQuery, item.composition.id);
|
|
61
|
+
const compositionPathScore = normalizedQuery === ''
|
|
62
|
+
? 0
|
|
63
|
+
: getMatchScore(normalizedQuery, compositionPath);
|
|
64
|
+
const directScore = Math.max(idScore !== null && idScore !== void 0 ? idScore : -1, compositionPathScore !== null && compositionPathScore !== void 0 ? compositionPathScore : -1);
|
|
65
|
+
const score = Math.max(directScore, inheritedFolderScore !== null && inheritedFolderScore !== void 0 ? inheritedFolderScore : -1);
|
|
66
|
+
if (score === -1) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
result: {
|
|
71
|
+
type: 'composition',
|
|
72
|
+
composition: item.composition,
|
|
73
|
+
level,
|
|
74
|
+
score,
|
|
75
|
+
},
|
|
76
|
+
originalIndex,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
const fullPath = [item.parentName, item.folderName]
|
|
80
|
+
.filter(Boolean)
|
|
81
|
+
.join('/');
|
|
82
|
+
const nameScore = normalizedQuery === ''
|
|
83
|
+
? 0
|
|
84
|
+
: getMatchScore(normalizedQuery, item.folderName);
|
|
85
|
+
const pathScore = normalizedQuery === '' ? 0 : getMatchScore(normalizedQuery, fullPath);
|
|
86
|
+
const directFolderScore = Math.max(nameScore !== null && nameScore !== void 0 ? nameScore : -1, pathScore !== null && pathScore !== void 0 ? pathScore : -1);
|
|
87
|
+
const folderScore = Math.max(directFolderScore === -1 ? -1 : directFolderScore - 1, inheritedFolderScore !== null && inheritedFolderScore !== void 0 ? inheritedFolderScore : -1);
|
|
88
|
+
const children = filterAndRank(item.items, level + 1, folderScore === -1 ? null : folderScore);
|
|
89
|
+
if (children.length === 0) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
result: {
|
|
94
|
+
type: 'folder',
|
|
95
|
+
id: `folder-${fullPath}`,
|
|
96
|
+
title: item.folderName,
|
|
97
|
+
level,
|
|
98
|
+
score: Math.max(folderScore, ...children.map((child) => child.score)),
|
|
99
|
+
children,
|
|
100
|
+
},
|
|
101
|
+
originalIndex,
|
|
102
|
+
};
|
|
103
|
+
})
|
|
104
|
+
.filter((item) => item !== null);
|
|
105
|
+
if (normalizedQuery !== '') {
|
|
106
|
+
rankedItems.sort((a, b) => {
|
|
107
|
+
return (b.result.score - a.result.score || a.originalIndex - b.originalIndex);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
return rankedItems.map((item) => item.result);
|
|
111
|
+
};
|
|
112
|
+
const flatten = (rankedItems) => {
|
|
113
|
+
return rankedItems.flatMap((item) => {
|
|
114
|
+
if (item.type === 'composition') {
|
|
115
|
+
return [
|
|
116
|
+
{
|
|
117
|
+
type: 'composition',
|
|
118
|
+
composition: item.composition,
|
|
119
|
+
level: item.level,
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
}
|
|
123
|
+
return [
|
|
124
|
+
{
|
|
125
|
+
type: 'folder',
|
|
126
|
+
id: item.id,
|
|
127
|
+
title: item.title,
|
|
128
|
+
level: item.level,
|
|
129
|
+
},
|
|
130
|
+
...flatten(item.children),
|
|
131
|
+
];
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
return flatten(filterAndRank(items, 0, null));
|
|
135
|
+
};
|
|
136
|
+
exports.searchCompositionTree = searchCompositionTree;
|
|
@@ -282,7 +282,7 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
|
|
|
282
282
|
{
|
|
283
283
|
type: 'item',
|
|
284
284
|
id: 'client-render',
|
|
285
|
-
label: 'Render
|
|
285
|
+
label: 'Render in browser',
|
|
286
286
|
value: 'client-render',
|
|
287
287
|
onClick: () => handleRenderTypeChange('client-render'),
|
|
288
288
|
keyHint: null,
|
|
@@ -336,7 +336,7 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
|
|
|
336
336
|
? 'Render'
|
|
337
337
|
: renderType === 'render-command'
|
|
338
338
|
? 'Render via CLI'
|
|
339
|
-
: 'Render
|
|
339
|
+
: 'Render in browser';
|
|
340
340
|
const showRenderLabel = !narrow || renderType !== 'server-render';
|
|
341
341
|
const segments = (0, react_1.useMemo)(() => {
|
|
342
342
|
return [
|
|
@@ -41,6 +41,7 @@ const buttonRow = {
|
|
|
41
41
|
justifyContent: 'flex-end',
|
|
42
42
|
};
|
|
43
43
|
const RenderStatusModal = ({ jobId, }) => {
|
|
44
|
+
var _a;
|
|
44
45
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
45
46
|
const { jobs, removeClientJob, cancelClientJob } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
46
47
|
const job = jobs.find((j) => j.id === jobId);
|
|
@@ -88,9 +89,14 @@ const RenderStatusModal = ({ jobId, }) => {
|
|
|
88
89
|
if (job.status === 'idle') {
|
|
89
90
|
throw new Error('should not have rendered this modal');
|
|
90
91
|
}
|
|
92
|
+
const errorDetails = job.status === 'failed'
|
|
93
|
+
? ((_a = job.error.stack) === null || _a === void 0 ? void 0 : _a.split('\n')[0].includes(job.error.message))
|
|
94
|
+
? job.error.stack
|
|
95
|
+
: [job.error.message, job.error.stack].filter(Boolean).join('\n')
|
|
96
|
+
: null;
|
|
91
97
|
return (jsx_runtime_1.jsxs(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [
|
|
92
98
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${job.compositionId}` }), jsx_runtime_1.jsxs("div", { style: container, children: [job.status === 'failed' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
93
|
-
jsx_runtime_1.jsx("p", { children: "The render failed because of the following error:" }), jsx_runtime_1.jsx("div", { className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, style: codeBlock, children:
|
|
99
|
+
jsx_runtime_1.jsx("p", { children: "The render failed because of the following error:" }), jsx_runtime_1.jsx("div", { className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, style: codeBlock, children: errorDetails })
|
|
94
100
|
] })) : null, (job.status === 'done' || job.status === 'running') &&
|
|
95
101
|
(isClientJob ? (jsx_runtime_1.jsx(ClientRenderProgress_1.ClientRenderProgress, { job: job })) : (jsx_runtime_1.jsx(GuiRenderStatus_1.GuiRenderStatus, { job: job }))), jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsxs("div", { style: buttonRow, children: [job.status === 'running' ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: onClickOnCancel, children: "Cancel render" })) : (jsx_runtime_1.jsx(Button_1.Button, { onClick: onClickOnRemove, children: "Remove render" })), jsx_runtime_1.jsx(layout_1.Flex, {}), job.status === 'failed' ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: onRetry, children: "Retry" })) : null, jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onQuit, children: "Close" })
|
|
96
102
|
] })
|
|
@@ -981,7 +981,7 @@ const RenderModal = ({ readOnlyStudio, initialFrame, initialVideoImageFormat, in
|
|
|
981
981
|
});
|
|
982
982
|
}, [availablePixelFormats, pixelFormat]);
|
|
983
983
|
return (jsx_runtime_1.jsxs("div", { style: render_modals_1.outerModalStyle, children: [
|
|
984
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
984
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id} ${readOnlyStudio ? 'via CLI' : 'on the server'}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
985
985
|
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsxs(Button_1.Button, { autoFocus: true, onClick: trigger, disabled: renderDisabled, style: {
|
|
986
986
|
...render_modals_1.buttonStyle,
|
|
987
987
|
backgroundColor: outnameValidation.valid ? colors_1.BLUE : colors_1.BLUE_DISABLED,
|
|
@@ -416,7 +416,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
416
416
|
pageResponsiveness,
|
|
417
417
|
]);
|
|
418
418
|
return (jsx_runtime_1.jsxs("div", { style: render_modals_1.outerModalStyle, children: [
|
|
419
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
419
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id} in the browser` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
420
420
|
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsxs(Button_1.Button, { autoFocus: true, onClick: onAddToQueue, style: render_modals_1.buttonStyle, disabled: !outnameValidation.valid, children: ["Render ", renderMode, jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })
|
|
421
421
|
] })
|
|
422
422
|
] }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
@@ -85,7 +85,7 @@ const ClientRenderQueueProcessor = () => {
|
|
|
85
85
|
progress: progress.progress,
|
|
86
86
|
});
|
|
87
87
|
},
|
|
88
|
-
outputTarget:
|
|
88
|
+
outputTarget: null,
|
|
89
89
|
licenseKey: (_c = job.licenseKey) !== null && _c !== void 0 ? _c : undefined,
|
|
90
90
|
pageResponsiveness: job.pageResponsiveness,
|
|
91
91
|
allowHtmlInCanvas: job.allowHtmlInCanvas,
|
|
@@ -3,11 +3,26 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ResetZoomButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const button = {
|
|
8
|
+
appearance: 'none',
|
|
9
|
+
backgroundColor: colors_1.INPUT_BACKGROUND,
|
|
10
|
+
border: `1px solid ${colors_1.BLACK_ALPHA_60}`,
|
|
11
|
+
borderRadius: 4,
|
|
12
|
+
color: colors_1.WHITE,
|
|
13
|
+
flexDirection: 'row',
|
|
14
|
+
fontFamily: 'inherit',
|
|
15
|
+
fontSize: 14,
|
|
16
|
+
};
|
|
17
|
+
const buttonContainer = {
|
|
18
|
+
cursor: 'pointer',
|
|
19
|
+
fontSize: 14,
|
|
20
|
+
padding: 10,
|
|
21
|
+
};
|
|
7
22
|
const ResetZoomButton = ({ onClick }) => {
|
|
8
23
|
const onPointerDown = (0, react_1.useCallback)((event) => {
|
|
9
24
|
event.stopPropagation();
|
|
10
25
|
}, []);
|
|
11
|
-
return (jsx_runtime_1.jsx(
|
|
26
|
+
return (jsx_runtime_1.jsx("button", { style: button, type: "button", onClick: onClick, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("div", { className: "css-reset", style: buttonContainer, children: "Reset zoom" }) }));
|
|
12
27
|
};
|
|
13
28
|
exports.ResetZoomButton = ResetZoomButton;
|