@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,355 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RenderingSettings = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const client_1 = require("@remotion/renderer/client");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const presets_labels_1 = require("../helpers/presets-labels");
|
|
8
|
+
const prores_labels_1 = require("../helpers/prores-labels");
|
|
9
|
+
const Checkmark_1 = require("../icons/Checkmark");
|
|
10
|
+
const styles_1 = require("./InspectorPanel/styles");
|
|
11
|
+
const layout_1 = require("./layout");
|
|
12
|
+
const ComboBox_1 = require("./NewComposition/ComboBox");
|
|
13
|
+
const RemInput_1 = require("./NewComposition/RemInput");
|
|
14
|
+
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
15
|
+
const CrfSetting_1 = require("./RenderModal/CrfSetting");
|
|
16
|
+
const human_readable_codec_1 = require("./RenderModal/human-readable-codec");
|
|
17
|
+
const layout_2 = require("./RenderModal/layout");
|
|
18
|
+
const NumberSetting_1 = require("./RenderModal/NumberSetting");
|
|
19
|
+
const RenderModalHr_1 = require("./RenderModal/RenderModalHr");
|
|
20
|
+
const SegmentedControl_1 = require("./SegmentedControl");
|
|
21
|
+
const SettingsContext_1 = require("./SettingsContext");
|
|
22
|
+
const use_auto_save_config_1 = require("./use-auto-save-config");
|
|
23
|
+
const container = {
|
|
24
|
+
display: 'flex',
|
|
25
|
+
flex: 1,
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
minWidth: 0,
|
|
28
|
+
};
|
|
29
|
+
const dividerLabel = {
|
|
30
|
+
...styles_1.sectionHeader,
|
|
31
|
+
margin: 0,
|
|
32
|
+
padding: '4px 16px',
|
|
33
|
+
};
|
|
34
|
+
const fullWidth = {
|
|
35
|
+
boxSizing: 'border-box',
|
|
36
|
+
width: 180,
|
|
37
|
+
};
|
|
38
|
+
const REMOTION_DEFAULT = 'remotion-default';
|
|
39
|
+
const DEFAULT_CODEC = 'h264';
|
|
40
|
+
const DEFAULT_STILL_IMAGE_FORMAT = 'png';
|
|
41
|
+
const DEFAULT_VIDEO_IMAGE_FORMAT = 'jpeg';
|
|
42
|
+
const DEFAULT_PRO_RES_PROFILE = 'hq';
|
|
43
|
+
const DEFAULT_X264_PRESET = 'medium';
|
|
44
|
+
const RenderingSettings = () => {
|
|
45
|
+
var _a;
|
|
46
|
+
const { error: settingsError, renderDefaults, revision } = (0, SettingsContext_1.useSettings)();
|
|
47
|
+
const [codec, setCodec] = (0, react_1.useState)(null);
|
|
48
|
+
const [scale, setScale] = (0, react_1.useState)(1);
|
|
49
|
+
const [stillImageFormat, setStillImageFormat] = (0, react_1.useState)(null);
|
|
50
|
+
const [videoImageFormat, setVideoImageFormat] = (0, react_1.useState)(null);
|
|
51
|
+
const [proResProfile, setProResProfile] = (0, react_1.useState)(null);
|
|
52
|
+
const [x264Preset, setX264Preset] = (0, react_1.useState)(null);
|
|
53
|
+
const [qualityMode, setQualityMode] = (0, react_1.useState)('crf');
|
|
54
|
+
const [crf, setCrf] = (0, react_1.useState)(18);
|
|
55
|
+
const [videoBitrate, setVideoBitrate] = (0, react_1.useState)('1M');
|
|
56
|
+
const [audioCodec, setAudioCodec] = (0, react_1.useState)(null);
|
|
57
|
+
const [concurrency, setConcurrency] = (0, react_1.useState)(1);
|
|
58
|
+
const [editedSetters, setEditedSetters] = (0, react_1.useState)(() => new Set());
|
|
59
|
+
const [syncedRevision, setSyncedRevision] = (0, react_1.useState)(-1);
|
|
60
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
61
|
+
(0, react_1.useEffect)(() => {
|
|
62
|
+
var _a, _b, _c, _d, _e;
|
|
63
|
+
var _f, _g, _h, _j, _k, _l, _m, _o;
|
|
64
|
+
if (renderDefaults === null) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
setCodec((_f = (_a = renderDefaults.configFileRenderDefaults) === null || _a === void 0 ? void 0 : _a.codec) !== null && _f !== void 0 ? _f : null);
|
|
68
|
+
setScale(renderDefaults.scale);
|
|
69
|
+
setStillImageFormat((_g = (_b = renderDefaults.configFileRenderDefaults) === null || _b === void 0 ? void 0 : _b.stillImageFormat) !== null && _g !== void 0 ? _g : null);
|
|
70
|
+
setVideoImageFormat((_h = (_c = renderDefaults.configFileRenderDefaults) === null || _c === void 0 ? void 0 : _c.videoImageFormat) !== null && _h !== void 0 ? _h : null);
|
|
71
|
+
setProResProfile((_j = (_d = renderDefaults.configFileRenderDefaults) === null || _d === void 0 ? void 0 : _d.proResProfile) !== null && _j !== void 0 ? _j : null);
|
|
72
|
+
setX264Preset((_k = (_e = renderDefaults.configFileRenderDefaults) === null || _e === void 0 ? void 0 : _e.x264Preset) !== null && _k !== void 0 ? _k : null);
|
|
73
|
+
setQualityMode(renderDefaults.videoBitrate === null ? 'crf' : 'bitrate');
|
|
74
|
+
setCrf((_m = (_l = renderDefaults.crf) !== null && _l !== void 0 ? _l : client_1.BrowserSafeApis.getDefaultCrfForCodec(renderDefaults.codec)) !== null && _m !== void 0 ? _m : 18);
|
|
75
|
+
setVideoBitrate((_o = renderDefaults.videoBitrate) !== null && _o !== void 0 ? _o : '1M');
|
|
76
|
+
setAudioCodec(renderDefaults.audioCodec);
|
|
77
|
+
setConcurrency(renderDefaults.concurrency);
|
|
78
|
+
setEditedSetters(new Set());
|
|
79
|
+
setSyncedRevision(revision);
|
|
80
|
+
setError(null);
|
|
81
|
+
}, [renderDefaults, revision]);
|
|
82
|
+
const markEdited = (0, react_1.useCallback)((setter) => {
|
|
83
|
+
setEditedSetters((current) => new Set(current).add(setter));
|
|
84
|
+
}, []);
|
|
85
|
+
const selectCodec = (0, react_1.useCallback)((value) => {
|
|
86
|
+
setCodec(value);
|
|
87
|
+
markEdited('setCodec');
|
|
88
|
+
}, [markEdited]);
|
|
89
|
+
const selectStillImageFormat = (0, react_1.useCallback)((value) => {
|
|
90
|
+
setStillImageFormat(value);
|
|
91
|
+
markEdited('setStillImageFormat');
|
|
92
|
+
}, [markEdited]);
|
|
93
|
+
const selectVideoImageFormat = (0, react_1.useCallback)((value) => {
|
|
94
|
+
setVideoImageFormat(value);
|
|
95
|
+
markEdited('setVideoImageFormat');
|
|
96
|
+
}, [markEdited]);
|
|
97
|
+
const selectProResProfile = (0, react_1.useCallback)((value) => {
|
|
98
|
+
setProResProfile(value);
|
|
99
|
+
markEdited('setProResProfile');
|
|
100
|
+
}, [markEdited]);
|
|
101
|
+
const selectX264Preset = (0, react_1.useCallback)((value) => {
|
|
102
|
+
setX264Preset(value);
|
|
103
|
+
markEdited('setX264Preset');
|
|
104
|
+
}, [markEdited]);
|
|
105
|
+
const selectQualityMode = (0, react_1.useCallback)((value) => {
|
|
106
|
+
setQualityMode(value);
|
|
107
|
+
markEdited('setCrf');
|
|
108
|
+
markEdited('setVideoBitrate');
|
|
109
|
+
}, [markEdited]);
|
|
110
|
+
const changeCrf = (0, react_1.useCallback)((value) => {
|
|
111
|
+
setCrf(value);
|
|
112
|
+
markEdited('setCrf');
|
|
113
|
+
markEdited('setVideoBitrate');
|
|
114
|
+
}, [markEdited]);
|
|
115
|
+
const selectAudioCodec = (0, react_1.useCallback)((value) => {
|
|
116
|
+
setAudioCodec(value);
|
|
117
|
+
markEdited('setAudioCodec');
|
|
118
|
+
}, [markEdited]);
|
|
119
|
+
const changeScale = (0, react_1.useCallback)((value) => {
|
|
120
|
+
setScale(value);
|
|
121
|
+
markEdited('setScale');
|
|
122
|
+
}, [markEdited]);
|
|
123
|
+
const changeConcurrency = (0, react_1.useCallback)((value) => {
|
|
124
|
+
setConcurrency(value);
|
|
125
|
+
markEdited('setConcurrency');
|
|
126
|
+
}, [markEdited]);
|
|
127
|
+
const makeValues = ({ options, selected, setSelected, labelValue = (value) => value, }) => options.map((value) => ({
|
|
128
|
+
id: value,
|
|
129
|
+
key: value,
|
|
130
|
+
keyHint: null,
|
|
131
|
+
label: labelValue(value),
|
|
132
|
+
leftItem: selected === value ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
133
|
+
onClick: () => setSelected(value),
|
|
134
|
+
quickSwitcherLabel: null,
|
|
135
|
+
subMenu: null,
|
|
136
|
+
type: 'item',
|
|
137
|
+
value,
|
|
138
|
+
}));
|
|
139
|
+
const makeRemotionDefaultValue = ({ labelValue, onClick, selected, }) => [
|
|
140
|
+
{
|
|
141
|
+
id: REMOTION_DEFAULT,
|
|
142
|
+
keyHint: null,
|
|
143
|
+
label: `Default (${labelValue})`,
|
|
144
|
+
leftItem: selected ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
145
|
+
onClick,
|
|
146
|
+
quickSwitcherLabel: null,
|
|
147
|
+
subMenu: null,
|
|
148
|
+
type: 'item',
|
|
149
|
+
value: REMOTION_DEFAULT,
|
|
150
|
+
},
|
|
151
|
+
{ id: `${REMOTION_DEFAULT}-divider`, type: 'divider' },
|
|
152
|
+
];
|
|
153
|
+
const codecValues = (0, react_1.useMemo)(() => [
|
|
154
|
+
...makeRemotionDefaultValue({
|
|
155
|
+
labelValue: (0, human_readable_codec_1.humanReadableCodec)(DEFAULT_CODEC),
|
|
156
|
+
onClick: () => selectCodec(null),
|
|
157
|
+
selected: codec === null,
|
|
158
|
+
}),
|
|
159
|
+
...makeValues({
|
|
160
|
+
options: client_1.BrowserSafeApis.validCodecs.filter((value) => value !== 'mp3' && value !== 'wav' && value !== 'aac'),
|
|
161
|
+
selected: codec,
|
|
162
|
+
setSelected: selectCodec,
|
|
163
|
+
labelValue: human_readable_codec_1.humanReadableCodec,
|
|
164
|
+
}),
|
|
165
|
+
], [codec, selectCodec]);
|
|
166
|
+
const stillFormatValues = (0, react_1.useMemo)(() => [
|
|
167
|
+
...makeRemotionDefaultValue({
|
|
168
|
+
labelValue: DEFAULT_STILL_IMAGE_FORMAT.toUpperCase(),
|
|
169
|
+
onClick: () => selectStillImageFormat(null),
|
|
170
|
+
selected: stillImageFormat === null,
|
|
171
|
+
}),
|
|
172
|
+
...makeValues({
|
|
173
|
+
options: client_1.BrowserSafeApis.validStillImageFormats,
|
|
174
|
+
selected: stillImageFormat,
|
|
175
|
+
setSelected: selectStillImageFormat,
|
|
176
|
+
labelValue: (value) => value.toUpperCase(),
|
|
177
|
+
}),
|
|
178
|
+
], [selectStillImageFormat, stillImageFormat]);
|
|
179
|
+
const videoFormatValues = (0, react_1.useMemo)(() => [
|
|
180
|
+
...makeRemotionDefaultValue({
|
|
181
|
+
labelValue: DEFAULT_VIDEO_IMAGE_FORMAT.toUpperCase(),
|
|
182
|
+
onClick: () => selectVideoImageFormat(null),
|
|
183
|
+
selected: videoImageFormat === null,
|
|
184
|
+
}),
|
|
185
|
+
...makeValues({
|
|
186
|
+
options: client_1.BrowserSafeApis.validVideoImageFormats,
|
|
187
|
+
selected: videoImageFormat,
|
|
188
|
+
setSelected: selectVideoImageFormat,
|
|
189
|
+
labelValue: (value) => value.toUpperCase(),
|
|
190
|
+
}),
|
|
191
|
+
], [selectVideoImageFormat, videoImageFormat]);
|
|
192
|
+
const profileValues = (0, react_1.useMemo)(() => [
|
|
193
|
+
...makeRemotionDefaultValue({
|
|
194
|
+
labelValue: (0, prores_labels_1.labelProResProfile)(DEFAULT_PRO_RES_PROFILE),
|
|
195
|
+
onClick: () => selectProResProfile(null),
|
|
196
|
+
selected: proResProfile === null,
|
|
197
|
+
}),
|
|
198
|
+
...makeValues({
|
|
199
|
+
options: client_1.BrowserSafeApis.proResProfileOptions,
|
|
200
|
+
selected: proResProfile,
|
|
201
|
+
setSelected: selectProResProfile,
|
|
202
|
+
labelValue: prores_labels_1.labelProResProfile,
|
|
203
|
+
}),
|
|
204
|
+
], [proResProfile, selectProResProfile]);
|
|
205
|
+
const presetValues = (0, react_1.useMemo)(() => [
|
|
206
|
+
...makeRemotionDefaultValue({
|
|
207
|
+
labelValue: (0, presets_labels_1.labelx264Preset)(DEFAULT_X264_PRESET),
|
|
208
|
+
onClick: () => selectX264Preset(null),
|
|
209
|
+
selected: x264Preset === null,
|
|
210
|
+
}),
|
|
211
|
+
...makeValues({
|
|
212
|
+
options: client_1.BrowserSafeApis.x264PresetOptions,
|
|
213
|
+
selected: x264Preset,
|
|
214
|
+
setSelected: selectX264Preset,
|
|
215
|
+
labelValue: presets_labels_1.labelx264Preset,
|
|
216
|
+
}),
|
|
217
|
+
], [selectX264Preset, x264Preset]);
|
|
218
|
+
const audioCodecValues = (0, react_1.useMemo)(() => {
|
|
219
|
+
return [
|
|
220
|
+
...makeRemotionDefaultValue({
|
|
221
|
+
labelValue: 'Automatic',
|
|
222
|
+
onClick: () => selectAudioCodec(null),
|
|
223
|
+
selected: audioCodec === null,
|
|
224
|
+
}),
|
|
225
|
+
...makeValues({
|
|
226
|
+
options: client_1.BrowserSafeApis.validAudioCodecs,
|
|
227
|
+
selected: audioCodec,
|
|
228
|
+
setSelected: selectAudioCodec,
|
|
229
|
+
labelValue: (value) => value.toUpperCase(),
|
|
230
|
+
}),
|
|
231
|
+
];
|
|
232
|
+
}, [audioCodec, selectAudioCodec]);
|
|
233
|
+
const qualityModeValues = (0, react_1.useMemo)(() => {
|
|
234
|
+
return ['crf', 'bitrate'].map((value) => ({
|
|
235
|
+
key: value,
|
|
236
|
+
label: value === 'crf' ? 'CRF' : 'Bitrate',
|
|
237
|
+
onClick: () => selectQualityMode(value),
|
|
238
|
+
selected: qualityMode === value,
|
|
239
|
+
}));
|
|
240
|
+
}, [qualityMode, selectQualityMode]);
|
|
241
|
+
const resolvedCodec = codec !== null && codec !== void 0 ? codec : DEFAULT_CODEC;
|
|
242
|
+
const updates = (0, react_1.useMemo)(() => {
|
|
243
|
+
const allUpdates = [
|
|
244
|
+
codec === null
|
|
245
|
+
? { setter: 'setCodec', type: 'delete' }
|
|
246
|
+
: { setter: 'setCodec', type: 'set', value: codec },
|
|
247
|
+
{ setter: 'setScale', type: 'set', value: scale },
|
|
248
|
+
stillImageFormat === null
|
|
249
|
+
? { setter: 'setStillImageFormat', type: 'delete' }
|
|
250
|
+
: {
|
|
251
|
+
setter: 'setStillImageFormat',
|
|
252
|
+
type: 'set',
|
|
253
|
+
value: stillImageFormat,
|
|
254
|
+
},
|
|
255
|
+
videoImageFormat === null
|
|
256
|
+
? { setter: 'setVideoImageFormat', type: 'delete' }
|
|
257
|
+
: {
|
|
258
|
+
setter: 'setVideoImageFormat',
|
|
259
|
+
type: 'set',
|
|
260
|
+
value: videoImageFormat,
|
|
261
|
+
},
|
|
262
|
+
qualityMode === 'crf'
|
|
263
|
+
? { setter: 'setCrf', type: 'set', value: crf }
|
|
264
|
+
: { setter: 'setCrf', type: 'delete' },
|
|
265
|
+
qualityMode === 'bitrate'
|
|
266
|
+
? { setter: 'setVideoBitrate', type: 'set', value: videoBitrate.trim() }
|
|
267
|
+
: { setter: 'setVideoBitrate', type: 'delete' },
|
|
268
|
+
...(resolvedCodec === 'prores'
|
|
269
|
+
? [
|
|
270
|
+
proResProfile === null
|
|
271
|
+
? { setter: 'setProResProfile', type: 'delete' }
|
|
272
|
+
: {
|
|
273
|
+
setter: 'setProResProfile',
|
|
274
|
+
type: 'set',
|
|
275
|
+
value: proResProfile,
|
|
276
|
+
},
|
|
277
|
+
]
|
|
278
|
+
: []),
|
|
279
|
+
...(resolvedCodec === 'h264'
|
|
280
|
+
? [
|
|
281
|
+
x264Preset === null
|
|
282
|
+
? { setter: 'setX264Preset', type: 'delete' }
|
|
283
|
+
: {
|
|
284
|
+
setter: 'setX264Preset',
|
|
285
|
+
type: 'set',
|
|
286
|
+
value: x264Preset,
|
|
287
|
+
},
|
|
288
|
+
]
|
|
289
|
+
: []),
|
|
290
|
+
audioCodec === null
|
|
291
|
+
? { setter: 'setAudioCodec', type: 'delete' }
|
|
292
|
+
: { setter: 'setAudioCodec', type: 'set', value: audioCodec },
|
|
293
|
+
{ setter: 'setConcurrency', type: 'set', value: concurrency },
|
|
294
|
+
];
|
|
295
|
+
return allUpdates.filter((update) => editedSetters.has(update.setter));
|
|
296
|
+
}, [
|
|
297
|
+
audioCodec,
|
|
298
|
+
codec,
|
|
299
|
+
concurrency,
|
|
300
|
+
crf,
|
|
301
|
+
editedSetters,
|
|
302
|
+
proResProfile,
|
|
303
|
+
qualityMode,
|
|
304
|
+
resolvedCodec,
|
|
305
|
+
scale,
|
|
306
|
+
stillImageFormat,
|
|
307
|
+
videoImageFormat,
|
|
308
|
+
videoBitrate,
|
|
309
|
+
x264Preset,
|
|
310
|
+
]);
|
|
311
|
+
const ready = renderDefaults !== null && syncedRevision === revision;
|
|
312
|
+
(0, use_auto_save_config_1.useAutoSaveConfig)({
|
|
313
|
+
enabled: ready,
|
|
314
|
+
onError: setError,
|
|
315
|
+
ready,
|
|
316
|
+
syncRevision: syncedRevision,
|
|
317
|
+
updates,
|
|
318
|
+
});
|
|
319
|
+
const onVideoBitrateChange = (event) => {
|
|
320
|
+
setVideoBitrate(event.target.value);
|
|
321
|
+
};
|
|
322
|
+
const onVideoBitrateBlur = () => {
|
|
323
|
+
markEdited('setCrf');
|
|
324
|
+
markEdited('setVideoBitrate');
|
|
325
|
+
};
|
|
326
|
+
if (renderDefaults === null) {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
330
|
+
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Output" }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
331
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Default codec" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codecValues, selectedId: codec !== null && codec !== void 0 ? codec : REMOTION_DEFAULT, title: "Codec" }) })
|
|
332
|
+
] }), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "Scale", value: scale, onValueChanged: changeScale, min: 0.1, step: 0.1 }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
333
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Still image format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: stillFormatValues, selectedId: stillImageFormat !== null && stillImageFormat !== void 0 ? stillImageFormat : REMOTION_DEFAULT, title: "Still image format" }) })
|
|
334
|
+
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
335
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Video frame format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: videoFormatValues, selectedId: videoImageFormat !== null && videoImageFormat !== void 0 ? videoImageFormat : REMOTION_DEFAULT, title: "Video frame format" }) })
|
|
336
|
+
] }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Encoding" }), client_1.BrowserSafeApis.codecSupportsCrf(resolvedCodec) &&
|
|
337
|
+
client_1.BrowserSafeApis.codecSupportsVideoBitrate(resolvedCodec) ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
338
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Quality control" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: qualityModeValues, needsWrapping: true }) })
|
|
339
|
+
] })) : null, qualityMode === 'crf' &&
|
|
340
|
+
client_1.BrowserSafeApis.codecSupportsCrf(resolvedCodec) &&
|
|
341
|
+
client_1.BrowserSafeApis.getValidCrfRanges(resolvedCodec) ? (jsx_runtime_1.jsx(CrfSetting_1.CrfSetting, { crf: crf, setCrf: changeCrf, min: client_1.BrowserSafeApis.getValidCrfRanges(resolvedCodec)[0], max: client_1.BrowserSafeApis.getValidCrfRanges(resolvedCodec)[1], option: "crfOption" })) : null, qualityMode === 'bitrate' &&
|
|
342
|
+
client_1.BrowserSafeApis.codecSupportsVideoBitrate(resolvedCodec) ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
343
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Video bitrate" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { style: { ...layout_2.input, ...fullWidth }, value: videoBitrate, onChange: onVideoBitrateChange, onBlur: onVideoBitrateBlur, status: "ok", rightAlign: true }) })
|
|
344
|
+
] })) : null, resolvedCodec === 'prores' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
345
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ProRes profile" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: profileValues, selectedId: proResProfile !== null && proResProfile !== void 0 ? proResProfile : REMOTION_DEFAULT, title: "ProRes profile" }) })
|
|
346
|
+
] })) : null, resolvedCodec === 'h264' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
347
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "x264 preset" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: presetValues, selectedId: x264Preset !== null && x264Preset !== void 0 ? x264Preset : REMOTION_DEFAULT, title: "x264 preset" }) })
|
|
348
|
+
] })) : null, jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Audio" }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
349
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Audio codec" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioCodecValues, selectedId: audioCodec !== null && audioCodec !== void 0 ? audioCodec : REMOTION_DEFAULT, title: "Audio codec" }) })
|
|
350
|
+
] }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Performance" }), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "Concurrency", value: concurrency, onValueChanged: changeConcurrency, min: renderDefaults.minConcurrency, max: renderDefaults.maxConcurrency, step: 1 }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
351
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: (_a = error !== null && error !== void 0 ? error : settingsError) !== null && _a !== void 0 ? _a : '', align: "flex-start", type: "error" }) })
|
|
352
|
+
] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
|
|
353
|
+
] }));
|
|
354
|
+
};
|
|
355
|
+
exports.RenderingSettings = RenderingSettings;
|
|
@@ -46,8 +46,8 @@ const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
|
46
46
|
const modals_1 = require("../state/modals");
|
|
47
47
|
const timeline_sequence_hover_1 = require("../state/timeline-sequence-hover");
|
|
48
48
|
const transform_3d_mode_1 = require("../state/transform-3d-mode");
|
|
49
|
-
const call_api_1 = require("./call-api");
|
|
50
49
|
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
50
|
+
const delete_jsx_node_api_1 = require("./delete-jsx-node-api");
|
|
51
51
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
52
52
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
53
53
|
const selected_outline_control_layout_1 = require("./selected-outline-control-layout");
|
|
@@ -68,8 +68,7 @@ const use_select_asset_1 = require("./use-select-asset");
|
|
|
68
68
|
const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth, dragging, getAllDragOutlines, getAllDragTargets, getAllRotationDragTargets, getAllScaleDragTargets, getLatestTargetByKey, layoutTarget, outline, onDraggingChange, onContextMenuOpenChange, onSnapPointsChange, onSelect, scale, }) => {
|
|
69
69
|
var _a;
|
|
70
70
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
71
|
-
const canConfigureApps = (0, use_default_editor_info_1.
|
|
72
|
-
const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)(canConfigureApps);
|
|
71
|
+
const { canConfigureApps, canOpenInEditor: editorAvailable, defaultEditorId, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
73
72
|
const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
|
|
74
73
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
75
74
|
const updateResolvedStackTrace = (0, react_1.useContext)(remotion_1.Internals.SequenceStackTracesUpdateContext);
|
|
@@ -138,8 +137,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
138
137
|
});
|
|
139
138
|
const action = (0, get_sequence_double_click_action_1.getSequenceDoubleClickAction)({
|
|
140
139
|
button,
|
|
141
|
-
canOpenInEditor:
|
|
142
|
-
Boolean(window.remotion_editorName),
|
|
140
|
+
canOpenInEditor: editorAvailable,
|
|
143
141
|
numberOfConnectedCompositions: connectedCompositions.length,
|
|
144
142
|
});
|
|
145
143
|
if (action === null) {
|
|
@@ -151,10 +149,10 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
151
149
|
}
|
|
152
150
|
const openTargetInEditor = async () => {
|
|
153
151
|
const originalLocation = await resolveOriginalLocation(doubleClickTarget);
|
|
154
|
-
if (originalLocation === null) {
|
|
152
|
+
if (originalLocation === null || defaultEditorId === null) {
|
|
155
153
|
return;
|
|
156
154
|
}
|
|
157
|
-
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation,
|
|
155
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, defaultEditorId);
|
|
158
156
|
};
|
|
159
157
|
openTargetInEditor().catch((err) => {
|
|
160
158
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
@@ -162,7 +160,8 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
162
160
|
return true;
|
|
163
161
|
}, [
|
|
164
162
|
compositions,
|
|
165
|
-
|
|
163
|
+
defaultEditorId,
|
|
164
|
+
editorAvailable,
|
|
166
165
|
resolveOriginalLocation,
|
|
167
166
|
selectComposition,
|
|
168
167
|
]);
|
|
@@ -185,7 +184,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
185
184
|
? contextMenuTarget.sequence.src
|
|
186
185
|
: null;
|
|
187
186
|
const assetLinkInfo = mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null;
|
|
188
|
-
const canOpenInEditor = Boolean(
|
|
187
|
+
const canOpenInEditor = Boolean(originalLocation && editorAvailable);
|
|
189
188
|
const sourceEditingEnabled = (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
190
189
|
const disableInteractivityDisabled = !sourceEditingEnabled || !contextMenuTarget.sequence.showInTimeline;
|
|
191
190
|
const sourceEditDisabled = !sourceEditingEnabled ||
|
|
@@ -235,7 +234,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
235
234
|
}
|
|
236
235
|
}
|
|
237
236
|
try {
|
|
238
|
-
const result = await (0,
|
|
237
|
+
const result = await (0, delete_jsx_node_api_1.deleteJsxNode)({
|
|
239
238
|
nodes: [
|
|
240
239
|
{
|
|
241
240
|
fileName: nodePath.absolutePath,
|
|
@@ -281,10 +280,11 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
281
280
|
});
|
|
282
281
|
},
|
|
283
282
|
openInEditor: (editorId) => {
|
|
284
|
-
|
|
283
|
+
const resolvedEditorId = editorId !== null && editorId !== void 0 ? editorId : defaultEditorId;
|
|
284
|
+
if (!originalLocation || !resolvedEditorId || !editorAvailable) {
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
|
-
(0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation,
|
|
287
|
+
(0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, resolvedEditorId).catch((err) => {
|
|
288
288
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
289
289
|
});
|
|
290
290
|
},
|
|
@@ -383,6 +383,8 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
383
383
|
editorInfo,
|
|
384
384
|
getTarget,
|
|
385
385
|
onSelect,
|
|
386
|
+
defaultEditorId,
|
|
387
|
+
editorAvailable,
|
|
386
388
|
previewServerState,
|
|
387
389
|
resolveOriginalLocation,
|
|
388
390
|
setManuallyEnabled,
|
|
@@ -391,7 +393,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
391
393
|
setPropStatuses,
|
|
392
394
|
]);
|
|
393
395
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
394
|
-
jsx_runtime_1.jsx(SelectedOutlinePolygon_1.SelectedOutlinePolygon, { compositionHeight: compositionHeight, compositionWidth: compositionWidth, dragging: dragging, getAllDragOutlines: getAllDragOutlines, getAllDragTargets: getAllDragTargets, getLayoutTarget: getLayoutTarget, getTarget: getTarget, hasTarget: layoutTarget !== undefined, hovered: hovered, outline: outline, onContextMenuOpen: onContextMenuOpen, onContextMenuOpenChange: onContextMenuOpenChange, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSnapPointsChange: onSnapPointsChange, onSelect: onSelect, onDoubleClickTarget: onDoubleClickTarget, scale: scale, showSelectedOutline: (_a = layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.showSelectedOutline) !== null && _a !== void 0 ? _a : false }), (layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForRotation) && (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.rotationDrag) ? (jsx_runtime_1.jsx(SelectedOutlineCanvasRotation_1.SelectedOutlineCanvasRotation, { getLatestTargetByKey: getLatestTargetByKey, layoutTarget: layoutTarget, onDraggingChange: onDraggingChange, outline: outline })) : null, jsx_runtime_1.jsx(SelectedOutlineCropControls_1.SelectedOutlineCropControls, { outline: outline, onDraggingChange: onDraggingChange, target: controlTarget }), (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.cropDrag) === null &&
|
|
396
|
+
jsx_runtime_1.jsx(SelectedOutlinePolygon_1.SelectedOutlinePolygon, { compositionHeight: compositionHeight, compositionWidth: compositionWidth, directlySelected: (layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selected) === true, dragging: dragging, getAllDragOutlines: getAllDragOutlines, getAllDragTargets: getAllDragTargets, getLayoutTarget: getLayoutTarget, getTarget: getTarget, hasTarget: layoutTarget !== undefined, hovered: hovered, outline: outline, onContextMenuOpen: onContextMenuOpen, onContextMenuOpenChange: onContextMenuOpenChange, onDraggingChange: onDraggingChange, onHoverChange: onHoverChange, onSnapPointsChange: onSnapPointsChange, onSelect: onSelect, onDoubleClickTarget: onDoubleClickTarget, scale: scale, showSelectedOutline: (_a = layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.showSelectedOutline) !== null && _a !== void 0 ? _a : false }), (layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.selectedForRotation) && (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.rotationDrag) ? (jsx_runtime_1.jsx(SelectedOutlineCanvasRotation_1.SelectedOutlineCanvasRotation, { getLatestTargetByKey: getLatestTargetByKey, layoutTarget: layoutTarget, onDraggingChange: onDraggingChange, outline: outline })) : null, jsx_runtime_1.jsx(SelectedOutlineCropControls_1.SelectedOutlineCropControls, { outline: outline, onDraggingChange: onDraggingChange, target: controlTarget }), (controlTarget === null || controlTarget === void 0 ? void 0 : controlTarget.cropDrag) === null &&
|
|
395
397
|
((layoutTarget === null || layoutTarget === void 0 ? void 0 : layoutTarget.containsSelection) || hovered)
|
|
396
398
|
? controlLayout.scaleEdges.map((edge) => (jsx_runtime_1.jsx(SelectedOutlineScaleEdgeLine_1.SelectedOutlineScaleEdgeLine, { getAllScaleDragTargets: getAllScaleDragTargets, dragging: dragging, edge: edge, hitWidth: edge === 'top' || edge === 'bottom'
|
|
397
399
|
? controlLayout.scaleHitWidth.horizontal
|
|
@@ -55,6 +55,7 @@ Object.defineProperty(exports, "orderOutlinesForRendering", { enumerable: true,
|
|
|
55
55
|
const selected_outline_types_1 = require("./selected-outline-types");
|
|
56
56
|
const SelectedOutlineKeyboardControls_1 = require("./SelectedOutlineKeyboardControls");
|
|
57
57
|
const SelectedOutlineRenderer_1 = require("./SelectedOutlineRenderer");
|
|
58
|
+
const get_timeline_keyframes_1 = require("./Timeline/get-timeline-keyframes");
|
|
58
59
|
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
59
60
|
const transform_3d_mode_2 = require("./Timeline/transform-3d-mode");
|
|
60
61
|
const selected_outline_drag_2 = require("./selected-outline-drag");
|
|
@@ -181,7 +182,12 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
181
182
|
}
|
|
182
183
|
const { controls } = sequence;
|
|
183
184
|
const nodePropStatuses = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
|
|
184
|
-
const
|
|
185
|
+
const firstKeyframedStatus = Object.values(nodePropStatuses !== null && nodePropStatuses !== void 0 ? nodePropStatuses : {}).find((status) => status.status === 'keyframed');
|
|
186
|
+
const nodeKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
187
|
+
propStatus: firstKeyframedStatus,
|
|
188
|
+
keyframeDisplayOffset,
|
|
189
|
+
});
|
|
190
|
+
const sourceFrame = targetTimelinePosition - nodeKeyframeDisplayOffset;
|
|
185
191
|
const dragOverrides = (_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {};
|
|
186
192
|
const runtimeValues = controls
|
|
187
193
|
? ((_b = runtimeValuesByStore.get(controls.runtimeValues)) !== null && _b !== void 0 ? _b : controls.runtimeValues.getSnapshot())
|
|
@@ -257,7 +263,7 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
257
263
|
key,
|
|
258
264
|
containsSelection,
|
|
259
265
|
crop,
|
|
260
|
-
keyframeDisplayOffset,
|
|
266
|
+
keyframeDisplayOffset: nodeKeyframeDisplayOffset,
|
|
261
267
|
nodePathInfo,
|
|
262
268
|
ref: sequence.refForOutline,
|
|
263
269
|
selected,
|
|
@@ -316,7 +322,11 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
316
322
|
const transformOriginSourceFrame = (selectedTransformOriginInfo === null || selectedTransformOriginInfo === void 0 ? void 0 : selectedTransformOriginInfo.displayFrame) === null ||
|
|
317
323
|
(selectedTransformOriginInfo === null || selectedTransformOriginInfo === void 0 ? void 0 : selectedTransformOriginInfo.displayFrame) === undefined
|
|
318
324
|
? sourceFrame
|
|
319
|
-
: selectedTransformOriginInfo.displayFrame -
|
|
325
|
+
: selectedTransformOriginInfo.displayFrame -
|
|
326
|
+
(0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
327
|
+
propStatus: transformOriginPropStatus,
|
|
328
|
+
keyframeDisplayOffset,
|
|
329
|
+
});
|
|
320
330
|
const canTransformOriginStatus = (transformOriginPropStatus === null || transformOriginPropStatus === void 0 ? void 0 : transformOriginPropStatus.status) === 'static' ||
|
|
321
331
|
((transformOriginPropStatus === null || transformOriginPropStatus === void 0 ? void 0 : transformOriginPropStatus.status) === 'keyframed' &&
|
|
322
332
|
transformOriginPropStatus.interpolationFunction === 'interpolate');
|
|
@@ -333,7 +343,7 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
333
343
|
const cropSourceFrame = (selectedCropInfo === null || selectedCropInfo === void 0 ? void 0 : selectedCropInfo.displayFrame) === null ||
|
|
334
344
|
(selectedCropInfo === null || selectedCropInfo === void 0 ? void 0 : selectedCropInfo.displayFrame) === undefined
|
|
335
345
|
? sourceFrame
|
|
336
|
-
: selectedCropInfo.displayFrame -
|
|
346
|
+
: selectedCropInfo.displayFrame - nodeKeyframeDisplayOffset;
|
|
337
347
|
const canCropDrag = previewInteractive &&
|
|
338
348
|
selectedForCrop &&
|
|
339
349
|
controls !== null &&
|
|
@@ -364,7 +374,10 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
364
374
|
propStatus,
|
|
365
375
|
clientId: connectedClientId,
|
|
366
376
|
fieldDefault: fieldSchema.default,
|
|
367
|
-
keyframeDisplayOffset,
|
|
377
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
378
|
+
propStatus,
|
|
379
|
+
keyframeDisplayOffset,
|
|
380
|
+
}),
|
|
368
381
|
nodePath,
|
|
369
382
|
schema: controls.schema,
|
|
370
383
|
}
|
|
@@ -375,7 +388,10 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
375
388
|
clientId: connectedClientId,
|
|
376
389
|
fieldDefault: scaleFieldSchema.default,
|
|
377
390
|
fieldSchema: scaleFieldSchema,
|
|
378
|
-
keyframeDisplayOffset,
|
|
391
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
392
|
+
propStatus: scalePropStatus,
|
|
393
|
+
keyframeDisplayOffset,
|
|
394
|
+
}),
|
|
379
395
|
linked: getScaleLockState({
|
|
380
396
|
nodePath,
|
|
381
397
|
fieldKey: selected_outline_types_1.scaleFieldKey,
|
|
@@ -401,7 +417,10 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
401
417
|
clientId: connectedClientId,
|
|
402
418
|
fieldDefault: rotationFieldSchema.default,
|
|
403
419
|
fieldSchema: rotationFieldSchema,
|
|
404
|
-
keyframeDisplayOffset,
|
|
420
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
421
|
+
propStatus: rotationPropStatus,
|
|
422
|
+
keyframeDisplayOffset,
|
|
423
|
+
}),
|
|
405
424
|
nodePath,
|
|
406
425
|
schema: controls.schema,
|
|
407
426
|
transform3DMode,
|
|
@@ -411,7 +430,10 @@ const calculateOutlineTargets = ({ connectedClientId, editorShowOutlines, getDra
|
|
|
411
430
|
transformOriginDrag: canTransformOriginDrag
|
|
412
431
|
? {
|
|
413
432
|
clientId: connectedClientId,
|
|
414
|
-
keyframeDisplayOffset,
|
|
433
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
434
|
+
propStatus: transformOriginPropStatus,
|
|
435
|
+
keyframeDisplayOffset,
|
|
436
|
+
}),
|
|
415
437
|
nodePath,
|
|
416
438
|
originDefault: transformOriginFieldSchema.default,
|
|
417
439
|
originPropStatus: transformOriginPropStatus,
|
|
@@ -6,6 +6,7 @@ import type { TimelineSelection, TimelineSelectionInteraction } from './Timeline
|
|
|
6
6
|
export declare const SelectedOutlinePolygon: React.NamedExoticComponent<{
|
|
7
7
|
readonly compositionHeight: number;
|
|
8
8
|
readonly compositionWidth: number;
|
|
9
|
+
readonly directlySelected: boolean;
|
|
9
10
|
readonly dragging: boolean;
|
|
10
11
|
readonly getAllDragOutlines: () => readonly SelectedOutline[];
|
|
11
12
|
readonly getAllDragTargets: () => readonly SelectedOutlineDragTarget[];
|