@remotion/studio 4.0.489 → 4.0.491
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Canvas.js +20 -2
- package/dist/components/CurrentComposition.js +4 -1
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/GlobalKeybindings.d.ts +1 -3
- package/dist/components/GlobalKeybindings.js +2 -9
- package/dist/components/InspectorLocationCopy.d.ts +7 -0
- package/dist/components/InspectorLocationCopy.js +65 -0
- package/dist/components/InspectorPanel/AlignmentControls.d.ts +5 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +205 -0
- package/dist/components/InspectorPanel/EasingInspector.js +8 -2
- package/dist/components/InspectorPanel/KeyframeSettings.d.ts +5 -0
- package/dist/components/InspectorPanel/KeyframeSettings.js +142 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -1
- package/dist/components/InspectorPanel/alignment-controls.d.ts +12 -0
- package/dist/components/InspectorPanel/alignment-controls.js +42 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +2 -2
- package/dist/components/KeyboardShortcutsExplainer.js +4 -0
- package/dist/components/MobilePanel.js +9 -3
- package/dist/components/Modals.js +1 -2
- package/dist/components/NewComposition/CancelButton.d.ts +1 -0
- package/dist/components/NewComposition/CancelButton.js +6 -2
- package/dist/components/OptionsPanel.js +4 -8
- package/dist/components/OutlineToggle.d.ts +3 -1
- package/dist/components/OutlineToggle.js +2 -2
- package/dist/components/Preview.js +1 -1
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/RenderButton.js +9 -33
- package/dist/components/RenderModal/WebRenderModal.js +3 -8
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +0 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +2 -9
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +0 -2
- package/dist/components/RenderQueue/client-side-render-types.d.ts +0 -1
- package/dist/components/RenderQueue/index.js +0 -9
- package/dist/components/SelectedOutlineElement.js +40 -38
- package/dist/components/SelectedOutlineOverlay.d.ts +7 -2
- package/dist/components/SelectedOutlineOverlay.js +249 -22
- package/dist/components/SnappingToggle.d.ts +3 -1
- package/dist/components/SnappingToggle.js +2 -2
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +20 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +304 -155
- package/dist/components/Timeline/TimelineEffectPropItem.js +9 -61
- package/dist/components/Timeline/TimelineFieldLabel.d.ts +1 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +8 -0
- package/dist/components/Timeline/TimelineFieldRowContent.js +16 -0
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRowChrome.js +2 -0
- package/dist/components/Timeline/TimelineSequence.js +2 -4
- package/dist/components/Timeline/TimelineSequenceItem.js +6 -9
- package/dist/components/Timeline/TimelineSequenceName.js +1 -3
- package/dist/components/Timeline/TimelineSequencePropItem.js +10 -59
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +18 -6
- package/dist/components/Timeline/TimelineTextContentField.js +12 -5
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +3 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +11 -4
- package/dist/components/Timeline/delete-selected-timeline-item.js +4 -5
- package/dist/components/Timeline/effects-clipboard.d.ts +14 -0
- package/dist/components/Timeline/effects-clipboard.js +68 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +37 -0
- package/dist/components/Timeline/get-timeline-media-start-frame.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-media-start-frame.js +15 -0
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -2
- package/dist/components/Timeline/sequence-props-subscription-store.js +4 -2
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +8 -1
- package/dist/components/Timeline/timeline-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-row-layout.js +1 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +10 -1
- package/dist/components/import-assets.d.ts +5 -0
- package/dist/components/import-assets.js +10 -2
- package/dist/components/selected-outline-measurement.d.ts +4 -0
- package/dist/components/selected-outline-measurement.js +3 -1
- package/dist/components/selected-outline-types.d.ts +1 -6
- package/dist/esm/{chunk-jrta3xaf.js → chunk-9wh9k3jj.js} +10393 -9551
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/internals.mjs +10393 -9551
- package/dist/esm/previewEntry.mjs +7603 -6761
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/format-file-location.d.ts +5 -0
- package/dist/helpers/format-file-location.js +9 -1
- package/dist/helpers/install-required-package.d.ts +1 -0
- package/dist/helpers/install-required-package.js +3 -2
- package/dist/helpers/retry-payload.js +0 -1
- package/dist/helpers/studio-runtime-config.d.ts +0 -1
- package/dist/helpers/studio-runtime-config.js +1 -6
- package/dist/helpers/use-menu-structure.js +15 -18
- package/dist/icons/align-bottom.d.ts +3 -0
- package/dist/icons/align-bottom.js +12 -0
- package/dist/icons/align-center-horizontal.d.ts +3 -0
- package/dist/icons/align-center-horizontal.js +12 -0
- package/dist/icons/align-center-vertical.d.ts +3 -0
- package/dist/icons/align-center-vertical.js +12 -0
- package/dist/icons/align-left.d.ts +3 -0
- package/dist/icons/align-left.js +12 -0
- package/dist/icons/align-right.d.ts +3 -0
- package/dist/icons/align-right.js +12 -0
- package/dist/icons/align-top.d.ts +3 -0
- package/dist/icons/align-top.js +12 -0
- package/dist/state/modals.d.ts +1 -3
- package/package.json +11 -11
- package/dist/components/RenderModal/WebRendererExperimentalBadge.d.ts +0 -1
- package/dist/components/RenderModal/WebRendererExperimentalBadge.js +0 -35
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +0 -15
- package/dist/components/Timeline/KeyframeSettingsModal.js +0 -151
- package/dist/helpers/show-browser-rendering.d.ts +0 -1
- package/dist/helpers/show-browser-rendering.js +0 -5
|
@@ -6,7 +6,6 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
|
-
const modals_1 = require("../../state/modals");
|
|
10
9
|
const call_api_1 = require("../call-api");
|
|
11
10
|
const ContextMenu_1 = require("../ContextMenu");
|
|
12
11
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
@@ -14,9 +13,8 @@ const get_animation_item_selection_for_frame_1 = require("./get-animation-item-s
|
|
|
14
13
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
15
14
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
16
15
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
17
|
-
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
18
16
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
19
|
-
const
|
|
17
|
+
const TimelineFieldRowContent_1 = require("./TimelineFieldRowContent");
|
|
20
18
|
const TimelineKeyframeControls_1 = require("./TimelineKeyframeControls");
|
|
21
19
|
const TimelineKeyframedValue_1 = require("./TimelineKeyframedValue");
|
|
22
20
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
@@ -214,9 +212,8 @@ const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFra
|
|
|
214
212
|
exports.TimelineEffectPropValue = TimelineEffectPropValue;
|
|
215
213
|
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
216
214
|
var _a;
|
|
217
|
-
var _b
|
|
215
|
+
var _b;
|
|
218
216
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
219
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
220
217
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
221
218
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
222
219
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
@@ -227,11 +224,10 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
227
224
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
228
225
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
229
226
|
const style = (0, react_1.useMemo)(() => {
|
|
230
|
-
return
|
|
231
|
-
|
|
232
|
-
height: field.rowHeight
|
|
233
|
-
|
|
234
|
-
}, [field.rowHeight]);
|
|
227
|
+
return field.typeName === 'text-content'
|
|
228
|
+
? fieldRowBase
|
|
229
|
+
: { ...fieldRowBase, height: field.rowHeight };
|
|
230
|
+
}, [field.rowHeight, field.typeName]);
|
|
235
231
|
const effectStatus = (0, react_1.useMemo)(() => remotion_1.Internals.getEffectPropStatusesCtx({
|
|
236
232
|
propStatuses,
|
|
237
233
|
nodePath,
|
|
@@ -302,33 +298,8 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
302
298
|
setPropStatuses,
|
|
303
299
|
validatedLocation.source,
|
|
304
300
|
]);
|
|
305
|
-
const onOpenKeyframeSettings = (0, react_1.useCallback)(() => {
|
|
306
|
-
var _a;
|
|
307
|
-
if (propStatus === null || !isKeyframedStatus(propStatus)) {
|
|
308
|
-
return;
|
|
309
|
-
}
|
|
310
|
-
setSelectedModal({
|
|
311
|
-
type: 'keyframe-settings',
|
|
312
|
-
fileName: validatedLocation.source,
|
|
313
|
-
nodePath,
|
|
314
|
-
fieldKey: field.key,
|
|
315
|
-
fieldLabel: (_a = field.description) !== null && _a !== void 0 ? _a : field.key,
|
|
316
|
-
status: propStatus,
|
|
317
|
-
schema: field.effectSchema,
|
|
318
|
-
effectIndex: field.effectIndex,
|
|
319
|
-
});
|
|
320
|
-
}, [
|
|
321
|
-
field.description,
|
|
322
|
-
field.effectIndex,
|
|
323
|
-
field.effectSchema,
|
|
324
|
-
field.key,
|
|
325
|
-
nodePath,
|
|
326
|
-
propStatus,
|
|
327
|
-
setSelectedModal,
|
|
328
|
-
validatedLocation.source,
|
|
329
|
-
]);
|
|
330
301
|
const contextMenuValues = (0, react_1.useMemo)(() => {
|
|
331
|
-
|
|
302
|
+
return [
|
|
332
303
|
{
|
|
333
304
|
type: 'item',
|
|
334
305
|
id: 'reset-effect-field',
|
|
@@ -342,28 +313,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
342
313
|
value: 'reset-effect-field',
|
|
343
314
|
},
|
|
344
315
|
];
|
|
345
|
-
|
|
346
|
-
values.push({
|
|
347
|
-
type: 'item',
|
|
348
|
-
id: 'keyframe-settings-effect-field',
|
|
349
|
-
keyHint: null,
|
|
350
|
-
label: 'Keyframe settings...',
|
|
351
|
-
leftItem: null,
|
|
352
|
-
disabled: previewServerState.type !== 'connected',
|
|
353
|
-
onClick: onOpenKeyframeSettings,
|
|
354
|
-
quickSwitcherLabel: null,
|
|
355
|
-
subMenu: null,
|
|
356
|
-
value: 'keyframe-settings-effect-field',
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
return values;
|
|
360
|
-
}, [
|
|
361
|
-
canShowReset,
|
|
362
|
-
onOpenKeyframeSettings,
|
|
363
|
-
onReset,
|
|
364
|
-
previewServerState,
|
|
365
|
-
propStatus,
|
|
366
|
-
]);
|
|
316
|
+
}, [canShowReset, onReset]);
|
|
367
317
|
const seekToDisplayFrame = (0, react_1.useCallback)((frame) => {
|
|
368
318
|
setFrame((current) => {
|
|
369
319
|
const next = { ...current, [videoConfig.id]: frame };
|
|
@@ -440,9 +390,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
440
390
|
sourceFrame,
|
|
441
391
|
validatedLocation.source,
|
|
442
392
|
]);
|
|
443
|
-
const row = (jsx_runtime_1.
|
|
444
|
-
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }), jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: sourceFrame }) })
|
|
445
|
-
] }));
|
|
393
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: sourceFrame }) }) }));
|
|
446
394
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
|
|
447
395
|
};
|
|
448
396
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -4,6 +4,7 @@ exports.TimelineFieldLabel = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
7
8
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
8
9
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
9
10
|
const fieldNameBase = {
|
|
@@ -16,12 +17,13 @@ const fieldNameBase = {
|
|
|
16
17
|
flex: 1,
|
|
17
18
|
minWidth: 0,
|
|
18
19
|
};
|
|
19
|
-
const TimelineFieldLabel = ({ rowDepth, selected, label }) => {
|
|
20
|
+
const TimelineFieldLabel = ({ rowDepth, selected, label, stacked = false }) => {
|
|
20
21
|
const labelRowStyle = (0, react_1.useMemo)(() => ({
|
|
21
22
|
...(0, timeline_field_row_layout_1.getTimelineFieldLabelRowStyle)(rowDepth),
|
|
22
23
|
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected, true),
|
|
24
|
+
...(stacked ? { flex: `0 0 ${timeline_layout_1.SCHEMA_FIELD_ROW_HEIGHT}px` } : null),
|
|
23
25
|
alignSelf: 'stretch',
|
|
24
|
-
}), [rowDepth, selected]);
|
|
26
|
+
}), [rowDepth, selected, stacked]);
|
|
25
27
|
const fieldNameStyle = (0, react_1.useMemo)(() => ({
|
|
26
28
|
...fieldNameBase,
|
|
27
29
|
color: (0, TimelineSelection_1.getTimelineColor)(selected, true),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
|
+
export declare const TimelineFieldRowContent: React.FC<{
|
|
4
|
+
readonly field: SchemaFieldInfo;
|
|
5
|
+
readonly rowDepth: number;
|
|
6
|
+
readonly selected: boolean;
|
|
7
|
+
readonly children: React.ReactNode;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineFieldRowContent = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
6
|
+
const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
|
|
7
|
+
const TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const label = (jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selected, label: (_a = field.description) !== null && _a !== void 0 ? _a : field.key, stacked: field.typeName === 'text-content' }));
|
|
10
|
+
const value = jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children });
|
|
11
|
+
if (field.typeName === 'text-content') {
|
|
12
|
+
return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [label, value] }));
|
|
13
|
+
}
|
|
14
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, value] }));
|
|
15
|
+
};
|
|
16
|
+
exports.TimelineFieldRowContent = TimelineFieldRowContent;
|
|
@@ -55,7 +55,7 @@ const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragE
|
|
|
55
55
|
return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineEnumField_1.TimelineEnumField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
|
|
56
56
|
}
|
|
57
57
|
if (field.typeName === 'text-content') {
|
|
58
|
-
return (jsx_runtime_1.jsx(
|
|
58
|
+
return (jsx_runtime_1.jsx(TimelineTextContentField_1.TimelineTextContentField, { effectiveValue: effectiveValue, field: field, nodePath: scaleLockNodePath, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }));
|
|
59
59
|
}
|
|
60
60
|
if (field.typeName === 'font-family') {
|
|
61
61
|
return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineFontFamilyField_1.TimelineFontFamilyField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
|
|
@@ -19,9 +19,11 @@ const leftChromeStyle = {
|
|
|
19
19
|
};
|
|
20
20
|
const keyframeControlsColumnBaseStyle = {
|
|
21
21
|
alignItems: 'center',
|
|
22
|
+
boxSizing: 'border-box',
|
|
22
23
|
display: 'flex',
|
|
23
24
|
flexShrink: 0,
|
|
24
25
|
justifyContent: 'flex-start',
|
|
26
|
+
paddingLeft: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
25
27
|
};
|
|
26
28
|
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, selectionItem, onSelect, showSelectedBackground, containsSelection, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, }) => {
|
|
27
29
|
const ref = (0, react_1.useRef)(null);
|
|
@@ -390,9 +390,7 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
|
|
|
390
390
|
overflow: 'hidden',
|
|
391
391
|
};
|
|
392
392
|
}, [marginLeft, s.type, width]);
|
|
393
|
-
const showRightEdgeDragHandle = (
|
|
394
|
-
!s.loopDisplay &&
|
|
395
|
-
!s.isInsideSeries &&
|
|
393
|
+
const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
|
|
396
394
|
nodePath !== null &&
|
|
397
395
|
validatedLocation !== null &&
|
|
398
396
|
durationCanUpdate;
|
|
@@ -410,7 +408,7 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
|
|
|
410
408
|
if (maxMediaDuration === null && !s.loopDisplay) {
|
|
411
409
|
return null;
|
|
412
410
|
}
|
|
413
|
-
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, children: [s.type === 'audio' ? (jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth,
|
|
411
|
+
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, children: [s.type === 'audio' ? (jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: width })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
|
|
414
412
|
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: onContextMenuOpen, children: sequence })) : (sequence);
|
|
415
413
|
};
|
|
416
414
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -535,18 +535,17 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
535
535
|
codeHiddenStatus !== undefined &&
|
|
536
536
|
codeHiddenStatus !== null &&
|
|
537
537
|
codeHiddenStatus.status === 'static';
|
|
538
|
-
const
|
|
538
|
+
const onShowInEditorDoubleClick = (0, react_1.useCallback)((e) => {
|
|
539
|
+
if (!canOpenInEditor) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
539
542
|
if ((0, TimelineSelection_1.isTimelineSelectionModifierEvent)(e)) {
|
|
540
543
|
e.stopPropagation();
|
|
541
544
|
return;
|
|
542
545
|
}
|
|
543
546
|
e.stopPropagation();
|
|
544
|
-
if (canRenameThisSequence) {
|
|
545
|
-
setIsRenaming(true);
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
547
|
openInEditor();
|
|
549
|
-
}, [
|
|
548
|
+
}, [canOpenInEditor, openInEditor]);
|
|
550
549
|
const canRenameSelectedSequence = canRenameThisSequence &&
|
|
551
550
|
selected &&
|
|
552
551
|
selectedItems.length === 1 &&
|
|
@@ -766,9 +765,7 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
766
765
|
clientId: previewServerState.clientId,
|
|
767
766
|
});
|
|
768
767
|
}, [canDropEffect, nodePath, previewServerState, validatedLocation]);
|
|
769
|
-
const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, onToggleExpand: onToggleExpand, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick:
|
|
770
|
-
? onSequenceDoubleClick
|
|
771
|
-
: undefined, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [
|
|
768
|
+
const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, onToggleExpand: onToggleExpand, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canOpenInEditor ? onShowInEditorDoubleClick : undefined, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [
|
|
772
769
|
jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: displayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), mediaSrc ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
773
770
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }),
|
|
774
771
|
" ",
|
|
@@ -66,9 +66,7 @@ const TimelineSequenceName = ({ displayName, fallbackDisplayName, selected, cont
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
input.focus();
|
|
69
|
-
|
|
70
|
-
const selectionEnd = basenameIndex > 0 ? basenameIndex : editableDisplayName.length;
|
|
71
|
-
input.setSelectionRange(0, selectionEnd);
|
|
69
|
+
input.select();
|
|
72
70
|
}, [editableDisplayName, editing]);
|
|
73
71
|
const save = (0, react_1.useCallback)(() => {
|
|
74
72
|
onSaveName(draftName).catch(() => undefined);
|
|
@@ -6,14 +6,12 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
|
-
const modals_1 = require("../../state/modals");
|
|
10
9
|
const ContextMenu_1 = require("../ContextMenu");
|
|
11
10
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
12
11
|
const get_animation_item_selection_for_frame_1 = require("./get-animation-item-selection-for-frame");
|
|
13
12
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
14
|
-
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
15
13
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
16
|
-
const
|
|
14
|
+
const TimelineFieldRowContent_1 = require("./TimelineFieldRowContent");
|
|
17
15
|
const TimelineKeyframeControls_1 = require("./TimelineKeyframeControls");
|
|
18
16
|
const TimelineKeyframedValue_1 = require("./TimelineKeyframedValue");
|
|
19
17
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
@@ -161,12 +159,11 @@ const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, pro
|
|
|
161
159
|
};
|
|
162
160
|
exports.TimelineSequenceKeyframedValue = TimelineSequenceKeyframedValue;
|
|
163
161
|
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
164
|
-
var _a
|
|
162
|
+
var _a;
|
|
165
163
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
166
164
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
167
165
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
168
166
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
169
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
170
167
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
171
168
|
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
172
169
|
const setFrame = remotion_1.Internals.useTimelineSetFrame();
|
|
@@ -192,11 +189,10 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
192
189
|
keyframable,
|
|
193
190
|
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
194
191
|
const style = (0, react_1.useMemo)(() => {
|
|
195
|
-
return
|
|
196
|
-
|
|
197
|
-
height: field.rowHeight
|
|
198
|
-
|
|
199
|
-
}, [field.rowHeight]);
|
|
192
|
+
return field.typeName === 'text-content'
|
|
193
|
+
? fieldRowBase
|
|
194
|
+
: { ...fieldRowBase, height: field.rowHeight };
|
|
195
|
+
}, [field.rowHeight, field.typeName]);
|
|
200
196
|
const canResetToDefault = (0, react_1.useMemo)(() => {
|
|
201
197
|
if (!propStatus || propStatus.status === 'computed') {
|
|
202
198
|
return false;
|
|
@@ -251,32 +247,8 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
251
247
|
validatedLocation.source,
|
|
252
248
|
propStatus,
|
|
253
249
|
]);
|
|
254
|
-
const onOpenKeyframeSettings = (0, react_1.useCallback)(() => {
|
|
255
|
-
var _a;
|
|
256
|
-
if (propStatus === null || !isKeyframedStatus(propStatus)) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
setSelectedModal({
|
|
260
|
-
type: 'keyframe-settings',
|
|
261
|
-
fileName: validatedLocation.source,
|
|
262
|
-
nodePath,
|
|
263
|
-
fieldKey: field.key,
|
|
264
|
-
fieldLabel: (_a = field.description) !== null && _a !== void 0 ? _a : field.key,
|
|
265
|
-
status: propStatus,
|
|
266
|
-
schema,
|
|
267
|
-
effectIndex: null,
|
|
268
|
-
});
|
|
269
|
-
}, [
|
|
270
|
-
propStatus,
|
|
271
|
-
field.description,
|
|
272
|
-
field.key,
|
|
273
|
-
nodePath,
|
|
274
|
-
schema,
|
|
275
|
-
setSelectedModal,
|
|
276
|
-
validatedLocation.source,
|
|
277
|
-
]);
|
|
278
250
|
const contextMenuValues = (0, react_1.useMemo)(() => {
|
|
279
|
-
|
|
251
|
+
return [
|
|
280
252
|
{
|
|
281
253
|
type: 'item',
|
|
282
254
|
id: 'reset-sequence-field',
|
|
@@ -290,28 +262,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
290
262
|
value: 'reset-sequence-field',
|
|
291
263
|
},
|
|
292
264
|
];
|
|
293
|
-
|
|
294
|
-
values.push({
|
|
295
|
-
type: 'item',
|
|
296
|
-
id: 'keyframe-settings-sequence-field',
|
|
297
|
-
keyHint: null,
|
|
298
|
-
label: 'Keyframe settings...',
|
|
299
|
-
leftItem: null,
|
|
300
|
-
disabled: previewServerState.type !== 'connected',
|
|
301
|
-
onClick: onOpenKeyframeSettings,
|
|
302
|
-
quickSwitcherLabel: null,
|
|
303
|
-
subMenu: null,
|
|
304
|
-
value: 'keyframe-settings-sequence-field',
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
return values;
|
|
308
|
-
}, [
|
|
309
|
-
canShowReset,
|
|
310
|
-
propStatus,
|
|
311
|
-
onOpenKeyframeSettings,
|
|
312
|
-
onReset,
|
|
313
|
-
previewServerState,
|
|
314
|
-
]);
|
|
265
|
+
}, [canShowReset, onReset]);
|
|
315
266
|
const seekToDisplayFrame = (0, react_1.useCallback)((frame) => {
|
|
316
267
|
setFrame((current) => {
|
|
317
268
|
const next = { ...current, [videoConfig.id]: frame };
|
|
@@ -389,8 +340,8 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
389
340
|
if (propStatus === null) {
|
|
390
341
|
return null;
|
|
391
342
|
}
|
|
392
|
-
const
|
|
393
|
-
|
|
343
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }));
|
|
344
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: fieldValue }) }));
|
|
394
345
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
|
|
395
346
|
};
|
|
396
347
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -8,6 +8,7 @@ export type TimelineSequenceDurationDragTarget = {
|
|
|
8
8
|
readonly fileName: string;
|
|
9
9
|
readonly initialDuration: number;
|
|
10
10
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
|
+
readonly schema: InteractivitySchema;
|
|
11
12
|
};
|
|
12
13
|
export type TimelineSequenceLeftEdgeDragTarget = {
|
|
13
14
|
readonly fileName: string;
|
|
@@ -32,6 +33,7 @@ type TimelineSequenceKeyframeDragTarget = {
|
|
|
32
33
|
type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarget & {
|
|
33
34
|
readonly effectIndex: number;
|
|
34
35
|
};
|
|
36
|
+
export declare const isTimelineSequenceDurationDraggable: (sequence: TSequence) => boolean;
|
|
35
37
|
export declare const getTimelineSequenceDurationDragValue: ({ initialDuration, deltaFrames, }: {
|
|
36
38
|
readonly initialDuration: number;
|
|
37
39
|
readonly deltaFrames: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = void 0;
|
|
3
|
+
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = exports.isTimelineSequenceDurationDraggable = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -81,12 +81,19 @@ const canUpdateTrimBefore = ({ propStatuses, nodePath, }) => {
|
|
|
81
81
|
const status = (_b = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a.trimBefore) === null || _b === void 0 ? void 0 : _b.status;
|
|
82
82
|
return status === 'static';
|
|
83
83
|
};
|
|
84
|
-
const
|
|
85
|
-
|
|
84
|
+
const isTimelineSequenceDurationDraggable = (sequence) => {
|
|
85
|
+
var _a;
|
|
86
|
+
const isInteractiveSeriesSequence = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) ===
|
|
87
|
+
'dev.remotion.remotion.Series.Sequence';
|
|
88
|
+
return ((sequence.type === 'sequence' ||
|
|
89
|
+
sequence.type === 'image' ||
|
|
90
|
+
sequence.type === 'audio' ||
|
|
91
|
+
sequence.type === 'video') &&
|
|
86
92
|
!sequence.loopDisplay &&
|
|
87
|
-
!sequence.isInsideSeries &&
|
|
93
|
+
(!sequence.isInsideSeries || isInteractiveSeriesSequence) &&
|
|
88
94
|
Boolean(sequence.controls));
|
|
89
95
|
};
|
|
96
|
+
exports.isTimelineSequenceDurationDraggable = isTimelineSequenceDurationDraggable;
|
|
90
97
|
const isLeftEdgeDraggableSequence = (sequence) => {
|
|
91
98
|
return (!sequence.isInsideSeries &&
|
|
92
99
|
Boolean(sequence.controls) &&
|
|
@@ -180,7 +187,7 @@ const getTimelineSequenceDurationDragChanges = ({ targets, deltaFrames, }) => {
|
|
|
180
187
|
fieldKey: 'durationInFrames',
|
|
181
188
|
value: nextValue,
|
|
182
189
|
defaultValue: null,
|
|
183
|
-
schema:
|
|
190
|
+
schema: target.schema,
|
|
184
191
|
},
|
|
185
192
|
];
|
|
186
193
|
});
|
|
@@ -266,19 +273,24 @@ const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedI
|
|
|
266
273
|
if (!track ||
|
|
267
274
|
!track.nodePathInfo ||
|
|
268
275
|
!originalSequence ||
|
|
269
|
-
!
|
|
276
|
+
!(0, exports.isTimelineSequenceDurationDraggable)(originalSequence)) {
|
|
270
277
|
return null;
|
|
271
278
|
}
|
|
272
279
|
const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
273
280
|
if (!canUpdateDurationInFrames({ propStatuses, nodePath })) {
|
|
274
281
|
return null;
|
|
275
282
|
}
|
|
283
|
+
const { controls } = originalSequence;
|
|
284
|
+
if (!controls) {
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
276
287
|
const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
|
|
277
288
|
if (!targets.has(key)) {
|
|
278
289
|
targets.set(key, {
|
|
279
290
|
fileName: nodePath.absolutePath,
|
|
280
291
|
initialDuration: originalSequence.duration,
|
|
281
292
|
nodePath,
|
|
293
|
+
schema: controls.schema,
|
|
282
294
|
});
|
|
283
295
|
}
|
|
284
296
|
}
|
|
@@ -5,6 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const RemTextarea_1 = require("../NewComposition/RemTextarea");
|
|
7
7
|
const focus_inspector_field_1 = require("./focus-inspector-field");
|
|
8
|
+
const textAreaStyle = {
|
|
9
|
+
boxSizing: 'border-box',
|
|
10
|
+
maxHeight: 160,
|
|
11
|
+
minHeight: 40,
|
|
12
|
+
minWidth: 0,
|
|
13
|
+
overflowY: 'auto',
|
|
14
|
+
width: '100%',
|
|
15
|
+
...{
|
|
16
|
+
fieldSizing: 'content',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
8
19
|
const TimelineTextContentField = ({ effectiveValue, field, nodePath, onDragEnd, onDragValueChange, onSave, propStatus, }) => {
|
|
9
20
|
var _a;
|
|
10
21
|
const inputRef = (0, react_1.useRef)(null);
|
|
@@ -91,10 +102,6 @@ const TimelineTextContentField = ({ effectiveValue, field, nodePath, onDragEnd,
|
|
|
91
102
|
event.currentTarget.blur();
|
|
92
103
|
}
|
|
93
104
|
}, []);
|
|
94
|
-
return (jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { ref: setInputRef, status: "ok", small: true, defaultValue: currentValue, onBlur: commitPending, onChange: onChange, onKeyDownCapture: onKeyDownCapture, style:
|
|
95
|
-
boxSizing: 'border-box',
|
|
96
|
-
height: 40,
|
|
97
|
-
width: 160,
|
|
98
|
-
} }, String((_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : '')));
|
|
105
|
+
return (jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { ref: setInputRef, status: "ok", small: true, defaultValue: currentValue, onBlur: commitPending, onChange: onChange, onKeyDownCapture: onKeyDownCapture, style: textAreaStyle }, String((_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : '')));
|
|
99
106
|
};
|
|
100
107
|
exports.TimelineTextContentField = TimelineTextContentField;
|
|
@@ -4,7 +4,9 @@ export declare const TimelineVideoInfo: React.FC<{
|
|
|
4
4
|
readonly src: string;
|
|
5
5
|
readonly visualizationWidth: number;
|
|
6
6
|
readonly naturalWidth: number;
|
|
7
|
-
readonly
|
|
7
|
+
readonly startMediaFrom: number;
|
|
8
|
+
readonly mediaFrameAtSequenceZero: number | null;
|
|
9
|
+
readonly sequenceFrameOffset: number;
|
|
8
10
|
readonly durationInFrames: number;
|
|
9
11
|
readonly playbackRate: number;
|
|
10
12
|
readonly volume: string | number;
|
|
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
10
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
11
|
+
const get_timeline_media_start_frame_1 = require("./get-timeline-media-start-frame");
|
|
11
12
|
const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
|
|
12
13
|
const timeline_video_filmstrip_times_1 = require("./timeline-video-filmstrip-times");
|
|
13
14
|
const outerStyle = {
|
|
@@ -25,11 +26,17 @@ const filmstripContainerStyle = {
|
|
|
25
26
|
fontFamily: 'Arial, Helvetica',
|
|
26
27
|
};
|
|
27
28
|
const MAX_FROZEN_FRAME_CACHE_DEVIATION = timeline_utils_1.WEBCODECS_TIMESCALE * 0.05;
|
|
28
|
-
const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth,
|
|
29
|
+
const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, durationInFrames, playbackRate, volume, doesVolumeChange, premountWidth, postmountWidth, loopDisplay, frozenMediaFrame, }) => {
|
|
29
30
|
const { fps } = (0, remotion_1.useVideoConfig)();
|
|
30
31
|
const ref = (0, react_1.useRef)(null);
|
|
31
32
|
const [error, setError] = (0, react_1.useState)(null);
|
|
32
33
|
const aspectRatio = (0, react_1.useRef)((0, timeline_utils_1.getAspectRatioFromCache)(src));
|
|
34
|
+
const mediaStartFrame = (0, get_timeline_media_start_frame_1.getTimelineMediaStartFrame)({
|
|
35
|
+
startMediaFrom,
|
|
36
|
+
mediaFrameAtSequenceZero,
|
|
37
|
+
sequenceFrameOffset,
|
|
38
|
+
playbackRate,
|
|
39
|
+
});
|
|
33
40
|
const { mediaVisualizationWidth, mediaNaturalWidth } = (0, react_1.useMemo)(() => {
|
|
34
41
|
return (0, get_timeline_video_info_widths_1.getTimelineVideoInfoWidths)({
|
|
35
42
|
visualizationWidth,
|
|
@@ -84,7 +91,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
84
91
|
: null;
|
|
85
92
|
};
|
|
86
93
|
const times = (0, timeline_video_filmstrip_times_1.getTimelineVideoFilmstripTimes)({
|
|
87
|
-
trimBefore,
|
|
94
|
+
trimBefore: mediaStartFrame,
|
|
88
95
|
durationInFrames,
|
|
89
96
|
playbackRate,
|
|
90
97
|
fps,
|
|
@@ -305,9 +312,9 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
305
312
|
loopDisplay,
|
|
306
313
|
mediaNaturalWidth,
|
|
307
314
|
mediaVisualizationWidth,
|
|
315
|
+
mediaStartFrame,
|
|
308
316
|
playbackRate,
|
|
309
317
|
src,
|
|
310
|
-
trimBefore,
|
|
311
318
|
]);
|
|
312
319
|
const audioWidth = mediaVisualizationWidth;
|
|
313
320
|
const filmstripStyle = (0, react_1.useMemo)(() => {
|
|
@@ -325,7 +332,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
325
332
|
};
|
|
326
333
|
}, [audioWidth, premountWidth]);
|
|
327
334
|
return (jsx_runtime_1.jsxs("div", { style: outerStyle, children: [
|
|
328
|
-
jsx_runtime_1.jsx("div", { ref: ref, style: filmstripStyle }), jsx_runtime_1.jsx("div", { style: audioStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: src, height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT, visualizationWidth: audioWidth, startFrom:
|
|
335
|
+
jsx_runtime_1.jsx("div", { ref: ref, style: filmstripStyle }), jsx_runtime_1.jsx("div", { style: audioStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: src, height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT, visualizationWidth: audioWidth, startFrom: mediaStartFrame, durationInFrames: durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, playbackRate: playbackRate, loopDisplay: loopDisplay }) })
|
|
329
336
|
] }));
|
|
330
337
|
};
|
|
331
338
|
exports.TimelineVideoInfo = TimelineVideoInfo;
|
|
@@ -88,15 +88,14 @@ const deleteEffects = (effects) => {
|
|
|
88
88
|
: effects.length === 1
|
|
89
89
|
? 'Removed effects from source file'
|
|
90
90
|
: 'Removed effects from source files', 2000);
|
|
91
|
+
return true;
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
return true;
|
|
93
|
+
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
94
|
+
return false;
|
|
96
95
|
})
|
|
97
96
|
.catch((err) => {
|
|
98
97
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
99
|
-
return
|
|
98
|
+
return false;
|
|
100
99
|
});
|
|
101
100
|
};
|
|
102
101
|
const deleteSelectedTimelineItem = ({ selection, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }) => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type EffectClipboardData } from '@remotion/studio-shared';
|
|
2
|
+
export type EffectsClipboardEnvelope = {
|
|
3
|
+
readonly envelopeVersion: 1;
|
|
4
|
+
readonly payload: EffectClipboardData;
|
|
5
|
+
readonly sourceIdentity: string | null;
|
|
6
|
+
readonly originalEffectIndices: number[];
|
|
7
|
+
};
|
|
8
|
+
export declare const makeEffectsClipboardHtml: (envelope: EffectsClipboardEnvelope) => string;
|
|
9
|
+
export declare const parseEffectsClipboardHtml: (html: string) => EffectsClipboardEnvelope | null;
|
|
10
|
+
export declare const writeEffectsClipboardEnvelope: (envelope: EffectsClipboardEnvelope) => Promise<void>;
|
|
11
|
+
export declare const readClipboardTextAndEffectsEnvelope: (clipboardData: DataTransfer) => {
|
|
12
|
+
readonly text: string;
|
|
13
|
+
readonly envelope: EffectsClipboardEnvelope | null;
|
|
14
|
+
};
|