@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
|
@@ -47,16 +47,16 @@ const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
|
47
47
|
const use_max_media_duration_1 = require("../../helpers/use-max-media-duration");
|
|
48
48
|
const modals_1 = require("../../state/modals");
|
|
49
49
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
50
|
-
const call_api_1 = require("../call-api");
|
|
51
50
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
52
51
|
const ContextMenu_1 = require("../ContextMenu");
|
|
52
|
+
const delete_jsx_node_api_1 = require("../delete-jsx-node-api");
|
|
53
53
|
const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
|
|
54
54
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
55
55
|
const use_select_asset_1 = require("../use-select-asset");
|
|
56
56
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
57
57
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
58
58
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
59
|
-
const
|
|
59
|
+
const get_timeline_sequence_visible_layout_1 = require("./get-timeline-sequence-visible-layout");
|
|
60
60
|
const imperative_state_1 = require("./imperative-state");
|
|
61
61
|
const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
|
|
62
62
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
@@ -65,6 +65,7 @@ const TimelineSelection_1 = require("./TimelineSelection");
|
|
|
65
65
|
const TimelineSequenceFrame_1 = require("./TimelineSequenceFrame");
|
|
66
66
|
const TimelineSequenceRightEdgeDragHandle_1 = require("./TimelineSequenceRightEdgeDragHandle");
|
|
67
67
|
const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
|
|
68
|
+
const TimelineViewport_1 = require("./TimelineViewport");
|
|
68
69
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
69
70
|
const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
|
|
70
71
|
const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
|
|
@@ -75,8 +76,8 @@ const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFr
|
|
|
75
76
|
}
|
|
76
77
|
return (jsx_runtime_1.jsx(TimelineSequenceInner, { windowWidth: windowWidth, s: s, connectedCompositions: connectedCompositions, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset }));
|
|
77
78
|
};
|
|
78
|
-
const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames,
|
|
79
|
-
var _a, _b;
|
|
79
|
+
const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, postmount, style, children, nodePathInfo, sequenceFrameOffset, fromCanUpdate, frozenFrame, onMoveDragPointerDown, onDoubleClick, }) => {
|
|
80
|
+
var _a, _b, _c;
|
|
80
81
|
const ref = (0, react_1.useRef)(null);
|
|
81
82
|
const { onSelect, selectable, selected, selectionItem } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
82
83
|
(0, TimelineSelection_1.useTimelineMarqueeSelectableItem)(selectionItem, ref);
|
|
@@ -118,8 +119,9 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premountWidt
|
|
|
118
119
|
opacity: isInRange ? 1 : 0.5,
|
|
119
120
|
};
|
|
120
121
|
}, [isInRange, style]);
|
|
121
|
-
return (jsx_runtime_1.jsxs("div", { ref: ref, [TimelineSelection_1.TIMELINE_MARQUEE_ITEM_ATTR]: true, style: actualStyle, title: s.displayName, onPointerDown: selectable ? onPointerDown : undefined, onDoubleClick: onDoubleClick, children: [
|
|
122
|
-
|
|
122
|
+
return (jsx_runtime_1.jsxs("div", { ref: ref, [TimelineSelection_1.TIMELINE_MARQUEE_ITEM_ATTR]: true, style: actualStyle, title: s.displayName, onPointerDown: selectable ? onPointerDown : undefined, onDoubleClick: onDoubleClick, children: [premount ? (jsx_runtime_1.jsx("div", { style: {
|
|
123
|
+
left: premount.left,
|
|
124
|
+
width: premount.width,
|
|
123
125
|
height: '100%',
|
|
124
126
|
background: `repeating-linear-gradient(
|
|
125
127
|
-45deg,
|
|
@@ -129,8 +131,9 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premountWidt
|
|
|
129
131
|
${isPremounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 4px
|
|
130
132
|
)`,
|
|
131
133
|
position: 'absolute',
|
|
132
|
-
} })) : null,
|
|
133
|
-
|
|
134
|
+
} })) : null, postmount ? (jsx_runtime_1.jsx("div", { style: {
|
|
135
|
+
left: postmount.left,
|
|
136
|
+
width: postmount.width,
|
|
134
137
|
height: '100%',
|
|
135
138
|
background: `repeating-linear-gradient(
|
|
136
139
|
-45deg,
|
|
@@ -140,13 +143,12 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premountWidt
|
|
|
140
143
|
${isPostmounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 4px
|
|
141
144
|
)`,
|
|
142
145
|
position: 'absolute',
|
|
143
|
-
right: 0,
|
|
144
146
|
} })) : null, children, s.type !== 'audio' &&
|
|
145
147
|
s.type !== 'video' &&
|
|
146
148
|
s.type !== 'image' &&
|
|
147
149
|
s.loopDisplay === undefined &&
|
|
148
150
|
(isInRange || isPremounting || isPostmounting) ? (jsx_runtime_1.jsx("div", { style: {
|
|
149
|
-
paddingLeft: 5 + (
|
|
151
|
+
paddingLeft: 5 + ((_c = premount === null || premount === void 0 ? void 0 : premount.width) !== null && _c !== void 0 ? _c : 0),
|
|
150
152
|
height: '100%',
|
|
151
153
|
display: 'flex',
|
|
152
154
|
alignItems: 'center',
|
|
@@ -159,6 +161,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
159
161
|
var _a, _b, _c;
|
|
160
162
|
var _d, _e, _f, _g, _h, _j;
|
|
161
163
|
const video = remotion_1.Internals.useVideo();
|
|
164
|
+
const renderWindow = (0, react_1.useContext)(TimelineViewport_1.TimelineViewportContext);
|
|
162
165
|
const maxMediaDuration = (0, use_max_media_duration_1.useMaxMediaDuration)(s, (_d = video === null || video === void 0 ? void 0 : video.fps) !== null && _d !== void 0 ? _d : 30);
|
|
163
166
|
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
164
167
|
const extendVideoLastFrame = (0, is_video_with_last_frame_hold_1.isVideoWithLastFrameHold)(s);
|
|
@@ -270,7 +273,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
270
273
|
}
|
|
271
274
|
}
|
|
272
275
|
try {
|
|
273
|
-
const result = await (0,
|
|
276
|
+
const result = await (0, delete_jsx_node_api_1.deleteJsxNode)({
|
|
274
277
|
nodes: [
|
|
275
278
|
{
|
|
276
279
|
fileName: validatedLocation.source,
|
|
@@ -403,7 +406,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
403
406
|
const displayDurationInFrames = s.loopDisplay
|
|
404
407
|
? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes
|
|
405
408
|
: s.duration;
|
|
406
|
-
const { marginLeft, width,
|
|
409
|
+
const { marginLeft, width, premountWidth, postmountWidth } = (0, react_1.useMemo)(() => {
|
|
407
410
|
return (0, get_timeline_sequence_layout_1.getTimelineSequenceLayout)({
|
|
408
411
|
durationInFrames: displayDurationInFrames,
|
|
409
412
|
startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
|
|
@@ -421,21 +424,30 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
421
424
|
video,
|
|
422
425
|
windowWidth,
|
|
423
426
|
]);
|
|
424
|
-
const
|
|
425
|
-
|
|
426
|
-
|
|
427
|
+
const visibleLayout = (0, react_1.useMemo)(() => {
|
|
428
|
+
if (renderWindow === null) {
|
|
429
|
+
return null;
|
|
430
|
+
}
|
|
431
|
+
return (0, get_timeline_sequence_visible_layout_1.getTimelineSequenceVisibleLayout)({
|
|
432
|
+
marginLeft,
|
|
433
|
+
width,
|
|
427
434
|
premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0,
|
|
428
435
|
postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0,
|
|
436
|
+
renderWindowLeft: renderWindow.left - timeline_layout_1.TIMELINE_PADDING,
|
|
437
|
+
renderWindowWidth: renderWindow.width,
|
|
429
438
|
});
|
|
430
|
-
}, [postmountWidth, premountWidth, width]);
|
|
439
|
+
}, [marginLeft, postmountWidth, premountWidth, renderWindow, width]);
|
|
431
440
|
const mediaVisualizationStyle = (0, react_1.useMemo)(() => {
|
|
441
|
+
var _a, _b;
|
|
442
|
+
var _c, _d;
|
|
432
443
|
return {
|
|
433
|
-
width:
|
|
434
|
-
marginLeft:
|
|
444
|
+
width: (_c = (_a = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.media) === null || _a === void 0 ? void 0 : _a.width) !== null && _c !== void 0 ? _c : 0,
|
|
445
|
+
marginLeft: (_d = (_b = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.media) === null || _b === void 0 ? void 0 : _b.left) !== null && _d !== void 0 ? _d : 0,
|
|
435
446
|
height: '100%',
|
|
436
447
|
};
|
|
437
|
-
}, [
|
|
448
|
+
}, [visibleLayout]);
|
|
438
449
|
const style = (0, react_1.useMemo)(() => {
|
|
450
|
+
var _a, _b;
|
|
439
451
|
return {
|
|
440
452
|
background: s.type === 'audio'
|
|
441
453
|
? colors_1.TIMELINE_AUDIO_GRADIENT
|
|
@@ -445,15 +457,24 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
445
457
|
? colors_1.TIMELINE_IMAGE_GRADIENT
|
|
446
458
|
: colors_1.BLUE,
|
|
447
459
|
border: `${get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH}px solid ${colors_1.WHITE_ALPHA_20}`,
|
|
448
|
-
|
|
460
|
+
borderLeftColor: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible)
|
|
461
|
+
? colors_1.WHITE_ALPHA_20
|
|
462
|
+
: colors_1.TRANSPARENT,
|
|
463
|
+
borderRightColor: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible)
|
|
464
|
+
? colors_1.WHITE_ALPHA_20
|
|
465
|
+
: colors_1.TRANSPARENT,
|
|
466
|
+
borderTopLeftRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible) ? 2 : 0,
|
|
467
|
+
borderBottomLeftRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible) ? 2 : 0,
|
|
468
|
+
borderTopRightRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible) ? 2 : 0,
|
|
469
|
+
borderBottomRightRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible) ? 2 : 0,
|
|
449
470
|
position: 'absolute',
|
|
450
471
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(s.type),
|
|
451
|
-
marginLeft,
|
|
452
|
-
width,
|
|
472
|
+
marginLeft: (_a = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.marginLeft) !== null && _a !== void 0 ? _a : 0,
|
|
473
|
+
width: (_b = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.width) !== null && _b !== void 0 ? _b : 0,
|
|
453
474
|
color: colors_1.WHITE,
|
|
454
475
|
overflow: 'hidden',
|
|
455
476
|
};
|
|
456
|
-
}, [
|
|
477
|
+
}, [s.type, visibleLayout]);
|
|
457
478
|
const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
|
|
458
479
|
nodePath !== null &&
|
|
459
480
|
validatedLocation !== null &&
|
|
@@ -464,10 +485,23 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
464
485
|
((0, TimelineSequenceRightEdgeDragHandle_1.isCascadingSequence)(s) || fromCanUpdate) &&
|
|
465
486
|
durationCanUpdate &&
|
|
466
487
|
trimBeforeCanUpdate;
|
|
467
|
-
if (maxMediaDuration === null && !s.loopDisplay) {
|
|
488
|
+
if ((maxMediaDuration === null && !s.loopDisplay) || visibleLayout === null) {
|
|
468
489
|
return null;
|
|
469
490
|
}
|
|
470
|
-
const
|
|
491
|
+
const frameIncrement = (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2) / video.durationInFrames;
|
|
492
|
+
const mediaDisplayOffsetInFrames = visibleLayout.media
|
|
493
|
+
? visibleLayout.media.offset / frameIncrement
|
|
494
|
+
: 0;
|
|
495
|
+
const mediaDisplayDurationInFrames = visibleLayout.media
|
|
496
|
+
? visibleLayout.media.width / frameIncrement
|
|
497
|
+
: 0;
|
|
498
|
+
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premount: visibleLayout.premount, postmount: visibleLayout.postmount, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, muted: s.muted, visualizationWidth: visibleLayout.media.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' && visibleLayout.media ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, playbackRate: s.playbackRate, volume: s.volume, muted: s.muted, doesVolumeChange: s.doesVolumeChange, marginLeft: visibleLayout.media.left, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, offsetInPixels: visibleLayout.media.offset }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes, fullWidth: width, visibleOffset: visibleLayout.cropLeft, visibleWidth: visibleLayout.width })), showLeftEdgeDragHandle &&
|
|
499
|
+
visibleLayout.leftEdgeVisible &&
|
|
500
|
+
nodePathInfo &&
|
|
501
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle &&
|
|
502
|
+
visibleLayout.rightEdgeVisible &&
|
|
503
|
+
nodePathInfo &&
|
|
504
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
|
|
471
505
|
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
|
|
472
506
|
};
|
|
473
507
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
export declare const TimelineSequenceItem: React.NamedExoticComponent<{
|
|
5
|
-
readonly
|
|
5
|
+
readonly afterDropLineOffset: number;
|
|
6
6
|
readonly sequence: TSequence;
|
|
7
7
|
readonly connectedCompositions: readonly import("remotion").AnyComposition[];
|
|
8
8
|
readonly nestedDepth: number;
|
|
@@ -49,15 +49,16 @@ const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
|
49
49
|
const modals_1 = require("../../state/modals");
|
|
50
50
|
const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
|
|
51
51
|
const transform_3d_mode_1 = require("../../state/transform-3d-mode");
|
|
52
|
-
const call_api_1 = require("../call-api");
|
|
53
52
|
const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
|
|
54
53
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
55
54
|
const ContextMenu_1 = require("../ContextMenu");
|
|
55
|
+
const delete_jsx_node_api_1 = require("../delete-jsx-node-api");
|
|
56
56
|
const effect_drag_and_drop_1 = require("../effect-drag-and-drop");
|
|
57
57
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
58
58
|
const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
|
|
59
59
|
const layout_1 = require("../layout");
|
|
60
60
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
61
|
+
const reorder_sequence_api_1 = require("../reorder-sequence-api");
|
|
61
62
|
const selected_outline_types_1 = require("../selected-outline-types");
|
|
62
63
|
const use_select_asset_1 = require("../use-select-asset");
|
|
63
64
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
@@ -134,7 +135,9 @@ const sequenceReorderLineBase = {
|
|
|
134
135
|
};
|
|
135
136
|
const sequenceReorderAfterLineWrapper = {
|
|
136
137
|
height: 0,
|
|
137
|
-
|
|
138
|
+
left: 0,
|
|
139
|
+
position: 'absolute',
|
|
140
|
+
right: 0,
|
|
138
141
|
};
|
|
139
142
|
const sequenceReorderAfterLine = {
|
|
140
143
|
...sequenceReorderLineBase,
|
|
@@ -173,7 +176,7 @@ const getSequenceReorderDragData = (dataTransfer) => {
|
|
|
173
176
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
174
177
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
175
178
|
};
|
|
176
|
-
const TimelineSequenceItemInner = ({
|
|
179
|
+
const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
|
|
177
180
|
var _a, _b;
|
|
178
181
|
var _c, _d, _e, _f;
|
|
179
182
|
const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
|
|
@@ -187,7 +190,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
187
190
|
const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
|
|
188
191
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
189
192
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
190
|
-
const { onSelect, selectable, selected
|
|
193
|
+
const { onSelect, selectable, selected } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
191
194
|
const { selectItem, selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
192
195
|
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
193
196
|
const [effectDropHovered, setEffectDropHovered] = (0, react_1.useState)(false);
|
|
@@ -257,7 +260,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
257
260
|
}
|
|
258
261
|
}
|
|
259
262
|
try {
|
|
260
|
-
const result = await (0,
|
|
263
|
+
const result = await (0, delete_jsx_node_api_1.deleteJsxNode)({
|
|
261
264
|
nodes: [
|
|
262
265
|
{
|
|
263
266
|
fileName: validatedLocation.source,
|
|
@@ -428,7 +431,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
428
431
|
setSequenceDropIndicator(null);
|
|
429
432
|
currentSequenceDrag = null;
|
|
430
433
|
try {
|
|
431
|
-
const result = await (0,
|
|
434
|
+
const result = await (0, reorder_sequence_api_1.reorderSequence)({
|
|
432
435
|
fileName: validatedLocation.source,
|
|
433
436
|
sourceNodePath: dropTarget.dragData.nodePath,
|
|
434
437
|
targetNodePath: nodePath,
|
|
@@ -905,7 +908,7 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
905
908
|
clientId: previewServerState.clientId,
|
|
906
909
|
});
|
|
907
910
|
}, [canDropEffect, nodePath, previewServerState, validatedLocation]);
|
|
908
|
-
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, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable,
|
|
911
|
+
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, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, hovered: hovered, isFieldRow: false, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
909
912
|
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: (0, TimelineSelection_1.getTimelineColor)(false, false), composition: connectedCompositions[0], style: connectedCompositionIconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
910
913
|
] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), numberOfHiddenDuplicates > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
911
914
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineDuplicateCount_1.TimelineDuplicateCount, { count: numberOfHiddenDuplicates })
|
|
@@ -914,12 +917,15 @@ const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDept
|
|
|
914
917
|
" ",
|
|
915
918
|
jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
|
|
916
919
|
] })) : null] }) }));
|
|
917
|
-
const draggableTrackRow = canHandleSequenceDrag ? (jsx_runtime_1.jsxs("div", { draggable: canReorderSequence, onDragStart: onSequenceDragStart, onDragEnd: onSequenceDragEnd, onDragOver: onSequenceDragOver, onDragLeave: onSequenceDragLeave, onDrop: onSequenceDrop, style: sequenceReorderWrapper, children: [sequenceReorderLineStyle ? (jsx_runtime_1.jsx("div", { style: sequenceReorderLineStyle })) : null, trackRow
|
|
920
|
+
const draggableTrackRow = canHandleSequenceDrag ? (jsx_runtime_1.jsxs("div", { draggable: canReorderSequence, onDragStart: onSequenceDragStart, onDragEnd: onSequenceDragEnd, onDragOver: onSequenceDragOver, onDragLeave: onSequenceDragLeave, onDrop: onSequenceDrop, style: sequenceReorderWrapper, children: [sequenceReorderLineStyle ? (jsx_runtime_1.jsx("div", { style: sequenceReorderLineStyle })) : null, trackRow, sequenceDropIndicator === 'after' ? (jsx_runtime_1.jsx("div", { style: {
|
|
921
|
+
...sequenceReorderAfterLineWrapper,
|
|
922
|
+
top: afterDropLineOffset,
|
|
923
|
+
}, children: jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLine }) })) : null] })) : (trackRow);
|
|
918
924
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableTrackRow })) : (draggableTrackRow), previewConnected &&
|
|
919
925
|
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
920
926
|
isExpanded &&
|
|
921
927
|
hasExpandableContent &&
|
|
922
928
|
nodePathInfo &&
|
|
923
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset })) : null
|
|
929
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset })) : null] }));
|
|
924
930
|
};
|
|
925
931
|
exports.TimelineSequenceItem = react_1.default.memo(TimelineSequenceItemInner);
|
|
@@ -27,6 +27,7 @@ export declare const TimelineSequencePropItem: React.FC<{
|
|
|
27
27
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
28
28
|
readonly schema: InteractivitySchema;
|
|
29
29
|
readonly keyframeDisplayOffset: number;
|
|
30
|
-
readonly keyframeControlsMode
|
|
30
|
+
readonly keyframeControlsMode: TimelineKeyframeControlsMode;
|
|
31
|
+
readonly runtimeValue: unknown;
|
|
31
32
|
}>;
|
|
32
33
|
export {};
|
|
@@ -42,8 +42,10 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
42
42
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
43
43
|
const ContextMenu_1 = require("../ContextMenu");
|
|
44
44
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
45
|
+
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
45
46
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
46
47
|
const get_sequence_prop_reset_changes_1 = require("./get-sequence-prop-reset-changes");
|
|
48
|
+
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
47
49
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
48
50
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
49
51
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
@@ -173,7 +175,11 @@ const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStat
|
|
|
173
175
|
};
|
|
174
176
|
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
175
177
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
176
|
-
|
|
178
|
+
const resolvedKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
179
|
+
propStatus: props.propStatus,
|
|
180
|
+
keyframeDisplayOffset,
|
|
181
|
+
});
|
|
182
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: timelinePosition - resolvedKeyframeDisplayOffset }));
|
|
177
183
|
};
|
|
178
184
|
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
179
185
|
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
@@ -230,12 +236,13 @@ const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
|
230
236
|
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
231
237
|
};
|
|
232
238
|
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
233
|
-
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode
|
|
239
|
+
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode, runtimeValue, }) => {
|
|
234
240
|
var _a;
|
|
235
241
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
236
242
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
237
243
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
238
244
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
245
|
+
const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
239
246
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
240
247
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
241
248
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
@@ -336,20 +343,20 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
336
343
|
}, [canShowReset, onReset, selection]);
|
|
337
344
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
338
345
|
var _a;
|
|
339
|
-
if (!
|
|
340
|
-
previewServerState.type !== 'connected') {
|
|
346
|
+
if (!canOpenInEditor || !defaultEditorId) {
|
|
341
347
|
return;
|
|
342
348
|
}
|
|
343
349
|
event.stopPropagation();
|
|
344
350
|
(0, open_in_editor_1.openOriginalPositionInEditorAtProperty)({
|
|
351
|
+
editorId: defaultEditorId,
|
|
345
352
|
originalPosition: validatedLocation,
|
|
346
353
|
property: (_a = field.key.split('.').at(-1)) !== null && _a !== void 0 ? _a : field.key,
|
|
347
354
|
}).catch(() => undefined);
|
|
348
|
-
}, [field.key,
|
|
355
|
+
}, [canOpenInEditor, defaultEditorId, field.key, validatedLocation]);
|
|
349
356
|
if (propStatus === null) {
|
|
350
357
|
return null;
|
|
351
358
|
}
|
|
352
|
-
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset })) : 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 }));
|
|
359
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset })) : 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, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
353
360
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
354
361
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
355
362
|
...inlineSourceFieldRow,
|
|
@@ -357,7 +364,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
357
364
|
...style,
|
|
358
365
|
}, children: fieldValue }));
|
|
359
366
|
}
|
|
360
|
-
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,
|
|
367
|
+
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, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, isFieldRow: true, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, keyframeControls: keyframeControls, children: fieldValue }) }));
|
|
361
368
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
362
369
|
};
|
|
363
370
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -32,7 +32,10 @@ export type TimelineSequenceFromDragTarget = {
|
|
|
32
32
|
readonly sequenceKeyframes: TimelineSequenceKeyframeDragTarget[];
|
|
33
33
|
};
|
|
34
34
|
type TimelineSequenceKeyframeDragTarget = {
|
|
35
|
+
readonly fileName: string;
|
|
35
36
|
readonly fieldKey: string;
|
|
37
|
+
readonly isDescendant: boolean;
|
|
38
|
+
readonly nodePath: SequencePropsSubscriptionKey;
|
|
36
39
|
readonly schema: InteractivitySchema;
|
|
37
40
|
readonly status: CanUpdateSequencePropStatusKeyframed;
|
|
38
41
|
};
|