@remotion/studio 4.0.514 → 4.0.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/install-package.js +14 -1
- package/dist/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +3 -9
- package/dist/components/AssetSelectorItem.d.ts +3 -1
- package/dist/components/AssetSelectorItem.js +41 -42
- package/dist/components/AudioWaveform.js +17 -139
- package/dist/components/Canvas.js +7 -4
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +139 -46
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +3 -2
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +41 -12
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
- package/dist/components/InspectorPanel/common.d.ts +0 -12
- package/dist/components/InspectorPanel/common.js +3 -52
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InstallPackage.d.ts +3 -2
- package/dist/components/InstallPackage.js +90 -28
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +12 -4
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PreviewToolbar.js +5 -2
- package/dist/components/PreviewToolbarOverflowButton.js +30 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RenderButton.js +66 -183
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/GuiRenderStatus.js +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +3 -3
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderModal/WebRenderModal.js +4 -2
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +3 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -7
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
- package/dist/components/RulersAndGuidesToggle.js +23 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineCanvasRotation.d.ts +1 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +11 -4
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +4 -4
- package/dist/components/SelectedOutlinePolygon.js +20 -17
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.js +2 -1
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +0 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +13 -12
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +45 -15
- package/dist/components/Timeline/TimelineEffectPropItem.js +21 -4
- package/dist/components/Timeline/TimelineExpandArrowButton.js +10 -7
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +4 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +8 -5
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +1 -1
- package/dist/components/Timeline/TimelineRowChrome.js +41 -6
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +8 -3
- package/dist/components/Timeline/TimelineSelection.js +7 -5
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.js +11 -8
- package/dist/components/Timeline/TimelineSequenceName.js +1 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +5 -2
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +4 -2
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +6 -2
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +7 -14
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/save-effect-prop.js +3 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +7 -7
- package/dist/components/effect-operations-api.d.ts +8 -0
- package/dist/components/effect-operations-api.js +52 -0
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +1 -1
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/error-overlay/remotion-overlay/log-studio-error.js +4 -0
- package/dist/esm/{chunk-r46yxrjr.js → chunk-4bxz1d3g.js} +4 -3
- package/dist/esm/{chunk-xn2q7eem.js → chunk-w4244j4n.js} +14747 -14549
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +14747 -14549
- package/dist/esm/previewEntry.mjs +14557 -14359
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/browser-studio-operations.d.ts +3 -0
- package/dist/helpers/browser-studio-operations.js +18 -1
- package/dist/helpers/calculate-timeline.js +2 -1
- package/dist/helpers/colors.d.ts +3 -1
- package/dist/helpers/colors.js +7 -3
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/get-asset-metadata.js +25 -16
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +7 -3
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +49 -25
- package/dist/helpers/use-menu-structure.js +54 -67
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/cloud-download.d.ts +4 -0
- package/dist/icons/cloud-download.js +8 -0
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/modals.d.ts +2 -5
- package/package.json +12 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -3,6 +3,7 @@ import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses }
|
|
|
3
3
|
import type { SequenceNodePathInfo, TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
import { type GetIsExpanded } from '../ExpandedTracksProvider';
|
|
5
5
|
export declare const TIMELINE_SELECTED_BACKGROUND = "#3B3F42";
|
|
6
|
+
export declare const TIMELINE_EXPANDED_SELECTED_BACKGROUND = "rgb(31,36,40)";
|
|
6
7
|
export declare const TIMELINE_HOVER_BACKGROUND = "rgba(255, 255, 255, 0.05)";
|
|
7
8
|
export declare const TIMELINE_SELECTED_LABEL_BACKGROUND = "#B0B0B0";
|
|
8
9
|
export declare const TIMELINE_SELECTED_LABEL_TEXT = "black";
|
|
@@ -10,13 +11,14 @@ export declare const TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
|
|
|
10
11
|
export declare const getTimelineSelectedLabelStyle: (selected: boolean, subcategory: boolean) => CSSProperties;
|
|
11
12
|
export declare const getTimelineColor: (selected: boolean, subcategory: boolean) => "black" | "rgba(255, 255, 255, 0.8)";
|
|
12
13
|
export declare const getTimelineSelectedTrackHighlightStyle: (timelineWidth: number, backgroundColor?: string) => CSSProperties;
|
|
13
|
-
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, hovered, }: {
|
|
14
|
+
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, hovered, selectedBackground, }: {
|
|
14
15
|
readonly showSelectedBackground: boolean;
|
|
15
16
|
readonly selected: boolean;
|
|
16
17
|
readonly containsSelection: boolean;
|
|
17
18
|
readonly hovered: boolean;
|
|
19
|
+
readonly selectedBackground: string;
|
|
18
20
|
}) => string | undefined;
|
|
19
|
-
export declare const TIMELINE_BACKGROUND = "#
|
|
21
|
+
export declare const TIMELINE_BACKGROUND = "#15181B";
|
|
20
22
|
export declare const TIMELINE_TICKS_BACKGROUND = "rgb(31,36,40)";
|
|
21
23
|
export type TimelineSelection = {
|
|
22
24
|
readonly type: 'guide';
|
|
@@ -222,5 +224,8 @@ export declare const useTimelineGuideSelection: (guideId: string) => {
|
|
|
222
224
|
selectionItem: TimelineSelection;
|
|
223
225
|
};
|
|
224
226
|
export declare const useTimelineRowContainsSelection: (nodePathInfo: SequenceNodePathInfo | null) => boolean;
|
|
225
|
-
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null, hovered
|
|
227
|
+
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null, { hovered, selectedBackground, }: {
|
|
228
|
+
readonly hovered: boolean;
|
|
229
|
+
readonly selectedBackground: string;
|
|
230
|
+
}) => string | undefined;
|
|
226
231
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTimelineRowHighlightBackground = exports.useTimelineRowContainsSelection = exports.useTimelineGuideSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = exports.getTimelineSequenceSelectionForEscape = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineItems = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionKey = exports.getTimelineSelectionFromNodePathInfo = exports.TimelineSelectionOrderProvider = exports.extendTimelineMarqueeSelection = exports.getTimelineMarqueeSelection = exports.timelineMarqueeRectsIntersect = exports.getClampedTimelineMarqueePoint = exports.getNormalizedTimelineMarqueeRect = exports.getAvailableTimelineSelectionState = exports.getTimelineSelectionAfterInteraction = exports.EMPTY_TIMELINE_SELECTION_STATE = exports.shouldSelectTimelineRowOnPointerDown = exports.isTimelineSelectionModifierEvent = exports.TIMELINE_TICKS_BACKGROUND = exports.TIMELINE_BACKGROUND = exports.getTimelineRowHighlightBackground = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_HOVER_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = void 0;
|
|
3
|
+
exports.useTimelineRowHighlightBackground = exports.useTimelineRowContainsSelection = exports.useTimelineGuideSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = exports.getTimelineSequenceSelectionForEscape = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineItems = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionKey = exports.getTimelineSelectionFromNodePathInfo = exports.TimelineSelectionOrderProvider = exports.extendTimelineMarqueeSelection = exports.getTimelineMarqueeSelection = exports.timelineMarqueeRectsIntersect = exports.getClampedTimelineMarqueePoint = exports.getNormalizedTimelineMarqueeRect = exports.getAvailableTimelineSelectionState = exports.getTimelineSelectionAfterInteraction = exports.EMPTY_TIMELINE_SELECTION_STATE = exports.shouldSelectTimelineRowOnPointerDown = exports.isTimelineSelectionModifierEvent = exports.TIMELINE_TICKS_BACKGROUND = exports.TIMELINE_BACKGROUND = exports.getTimelineRowHighlightBackground = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_HOVER_BACKGROUND = exports.TIMELINE_EXPANDED_SELECTED_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = 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");
|
|
@@ -26,6 +26,7 @@ const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
|
26
26
|
const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
|
|
27
27
|
const TimelineDeleteKeybindings_1 = require("./TimelineDeleteKeybindings");
|
|
28
28
|
exports.TIMELINE_SELECTED_BACKGROUND = colors_1.TIMELINE_SELECTED_BACKGROUND_COLOR;
|
|
29
|
+
exports.TIMELINE_EXPANDED_SELECTED_BACKGROUND = colors_1.BACKGROUND;
|
|
29
30
|
exports.TIMELINE_HOVER_BACKGROUND = colors_1.WHITE_ALPHA_05;
|
|
30
31
|
exports.TIMELINE_SELECTED_LABEL_BACKGROUND = colors_1.TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR;
|
|
31
32
|
exports.TIMELINE_SELECTED_LABEL_TEXT = colors_1.BLACK;
|
|
@@ -60,9 +61,9 @@ const getTimelineSelectedTrackHighlightStyle = (timelineWidth, backgroundColor =
|
|
|
60
61
|
width: timelineWidth,
|
|
61
62
|
});
|
|
62
63
|
exports.getTimelineSelectedTrackHighlightStyle = getTimelineSelectedTrackHighlightStyle;
|
|
63
|
-
const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, containsSelection, hovered, }) => {
|
|
64
|
+
const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, containsSelection, hovered, selectedBackground, }) => {
|
|
64
65
|
if (showSelectedBackground && (selected || containsSelection)) {
|
|
65
|
-
return
|
|
66
|
+
return selectedBackground;
|
|
66
67
|
}
|
|
67
68
|
return hovered ? exports.TIMELINE_HOVER_BACKGROUND : undefined;
|
|
68
69
|
};
|
|
@@ -1055,7 +1056,7 @@ const useTimelineRowSelection = (nodePathInfo) => {
|
|
|
1055
1056
|
if (selectionItem === null) {
|
|
1056
1057
|
return;
|
|
1057
1058
|
}
|
|
1058
|
-
selectItem(selectionItem, interaction, selectableTimelineItemsRef.current
|
|
1059
|
+
selectItem(selectionItem, interaction, selectableTimelineItemsRef.current);
|
|
1059
1060
|
}, [selectItem, selectableTimelineItemsRef, selectionItem]);
|
|
1060
1061
|
return {
|
|
1061
1062
|
onSelect,
|
|
@@ -1134,7 +1135,7 @@ const useTimelineRowContainsSelection = (nodePathInfo) => {
|
|
|
1134
1135
|
return containsSelection(nodePathInfo);
|
|
1135
1136
|
};
|
|
1136
1137
|
exports.useTimelineRowContainsSelection = useTimelineRowContainsSelection;
|
|
1137
|
-
const useTimelineRowHighlightBackground = (nodePathInfo, hovered
|
|
1138
|
+
const useTimelineRowHighlightBackground = (nodePathInfo, { hovered, selectedBackground, }) => {
|
|
1138
1139
|
const { selected } = (0, exports.useTimelineRowSelection)(nodePathInfo);
|
|
1139
1140
|
const containsSelection = (0, exports.useTimelineRowContainsSelection)(nodePathInfo);
|
|
1140
1141
|
return (0, exports.getTimelineRowHighlightBackground)({
|
|
@@ -1142,6 +1143,7 @@ const useTimelineRowHighlightBackground = (nodePathInfo, hovered = false) => {
|
|
|
1142
1143
|
selected,
|
|
1143
1144
|
containsSelection,
|
|
1144
1145
|
hovered,
|
|
1146
|
+
selectedBackground,
|
|
1145
1147
|
});
|
|
1146
1148
|
};
|
|
1147
1149
|
exports.useTimelineRowHighlightBackground = useTimelineRowHighlightBackground;
|
|
@@ -6,4 +6,6 @@ export declare const TimelineSequence: React.NamedExoticComponent<{
|
|
|
6
6
|
readonly connectedCompositions: readonly import("remotion").AnyComposition[];
|
|
7
7
|
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
8
8
|
readonly sequenceFrameOffset: number;
|
|
9
|
+
readonly cascadedStart: number;
|
|
10
|
+
readonly localStart: number;
|
|
9
11
|
}>;
|
|
@@ -39,6 +39,7 @@ const react_1 = __importStar(require("react"));
|
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
40
|
const client_id_1 = require("../../helpers/client-id");
|
|
41
41
|
const colors_1 = require("../../helpers/colors");
|
|
42
|
+
const drag_aware_double_click_1 = require("../../helpers/drag-aware-double-click");
|
|
42
43
|
const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
|
|
43
44
|
const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-sequence-layout");
|
|
44
45
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
@@ -69,17 +70,58 @@ const TimelineViewport_1 = require("./TimelineViewport");
|
|
|
69
70
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
70
71
|
const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
|
|
71
72
|
const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
|
|
72
|
-
const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
|
|
73
|
+
const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset, cascadedStart, localStart, }) => {
|
|
73
74
|
const windowWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
74
75
|
if (windowWidth === null) {
|
|
75
76
|
return null;
|
|
76
77
|
}
|
|
77
|
-
return (jsx_runtime_1.jsx(TimelineSequenceInner, { windowWidth: windowWidth, s: s, connectedCompositions: connectedCompositions, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset }));
|
|
78
|
+
return (jsx_runtime_1.jsx(TimelineSequenceInner, { windowWidth: windowWidth, s: s, connectedCompositions: connectedCompositions, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, cascadedStart: cascadedStart, localStart: localStart }));
|
|
78
79
|
};
|
|
79
|
-
const
|
|
80
|
-
|
|
80
|
+
const TimelineSequenceNegativeStartInner = ({ left, width, leftEdgeVisible, clipped }) => {
|
|
81
|
+
const outerStyle = (0, react_1.useMemo)(() => {
|
|
82
|
+
return {
|
|
83
|
+
backgroundColor: clipped ? colors_1.TIMELINE_BACKGROUND_COLOR : undefined,
|
|
84
|
+
height: '100%',
|
|
85
|
+
left,
|
|
86
|
+
minWidth: 2,
|
|
87
|
+
pointerEvents: 'none',
|
|
88
|
+
position: 'absolute',
|
|
89
|
+
top: 0,
|
|
90
|
+
width,
|
|
91
|
+
};
|
|
92
|
+
}, [clipped, left, width]);
|
|
93
|
+
const innerStyle = (0, react_1.useMemo)(() => {
|
|
94
|
+
const showLeftEdge = leftEdgeVisible && !clipped;
|
|
95
|
+
const maskImage = clipped
|
|
96
|
+
? 'linear-gradient(to right, transparent, black 20%)'
|
|
97
|
+
: undefined;
|
|
98
|
+
return {
|
|
99
|
+
backgroundColor: colors_1.TIMELINE_NEGATIVE_START_BACKGROUND_COLOR,
|
|
100
|
+
border: `${get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH}px solid ${colors_1.TIMELINE_NEGATIVE_START_BORDER_COLOR}`,
|
|
101
|
+
borderBottomLeftRadius: showLeftEdge ? 2 : 0,
|
|
102
|
+
borderLeft: showLeftEdge
|
|
103
|
+
? `${get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH}px solid ${colors_1.TIMELINE_NEGATIVE_START_BORDER_COLOR}`
|
|
104
|
+
: 'none',
|
|
105
|
+
borderRight: 'none',
|
|
106
|
+
borderTopLeftRadius: showLeftEdge ? 2 : 0,
|
|
107
|
+
boxSizing: 'border-box',
|
|
108
|
+
height: '100%',
|
|
109
|
+
maskImage,
|
|
110
|
+
position: 'absolute',
|
|
111
|
+
top: 0,
|
|
112
|
+
WebkitMaskImage: maskImage,
|
|
113
|
+
width: '100%',
|
|
114
|
+
};
|
|
115
|
+
}, [clipped, leftEdgeVisible]);
|
|
116
|
+
return (jsx_runtime_1.jsx("div", { style: outerStyle, children: jsx_runtime_1.jsx("div", { style: innerStyle }) }));
|
|
117
|
+
};
|
|
118
|
+
const TimelineSequenceNegativeStart = react_1.default.memo(TimelineSequenceNegativeStartInner);
|
|
119
|
+
const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, postmount, negativeStart, leftEdgeVisible, negativeStartClipped, style, children, nodePathInfo, sequenceFrameOffset, fromCanUpdate, frozenFrame, onMoveDragPointerDown, onPointerDownCapture, onDoubleClick, }) => {
|
|
120
|
+
var _a, _b, _c, _d;
|
|
81
121
|
const ref = (0, react_1.useRef)(null);
|
|
82
122
|
const { onSelect, selectable, selected, selectionItem } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
123
|
+
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
124
|
+
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
83
125
|
(0, TimelineSelection_1.useTimelineMarqueeSelectableItem)(selectionItem, ref);
|
|
84
126
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
85
127
|
if (e.button === 0) {
|
|
@@ -113,13 +155,19 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, po
|
|
|
113
155
|
const isPostmounting = relativeFrameWithPostmount >= 0 &&
|
|
114
156
|
relativeFrameWithPostmount < ((_b = s.postmountDisplay) !== null && _b !== void 0 ? _b : 0) &&
|
|
115
157
|
!isInRange;
|
|
158
|
+
const negativeStartEnd = negativeStart
|
|
159
|
+
? negativeStart.left + negativeStart.width
|
|
160
|
+
: 0;
|
|
116
161
|
const actualStyle = (0, react_1.useMemo)(() => {
|
|
162
|
+
const hasSelectedTrack = selectedItems.some((item) => item.type !== 'guide');
|
|
117
163
|
return {
|
|
118
164
|
...style,
|
|
119
|
-
|
|
165
|
+
background: negativeStart ? colors_1.TRANSPARENT : style.background,
|
|
166
|
+
border: negativeStart ? 'none' : style.border,
|
|
167
|
+
opacity: hasSelectedTrack && !selected && !containsSelection ? 0.75 : 1,
|
|
120
168
|
};
|
|
121
|
-
}, [
|
|
122
|
-
|
|
169
|
+
}, [containsSelection, negativeStart, selected, selectedItems, style]);
|
|
170
|
+
const content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [premount ? (jsx_runtime_1.jsx("div", { style: {
|
|
123
171
|
left: premount.left,
|
|
124
172
|
width: premount.width,
|
|
125
173
|
height: '100%',
|
|
@@ -148,20 +196,46 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premount, po
|
|
|
148
196
|
s.type !== 'image' &&
|
|
149
197
|
s.loopDisplay === undefined &&
|
|
150
198
|
(isInRange || isPremounting || isPostmounting) ? (jsx_runtime_1.jsx("div", { style: {
|
|
151
|
-
paddingLeft: 5 + ((_c = premount === null || premount === void 0 ? void 0 : premount.width) !== null &&
|
|
199
|
+
paddingLeft: 5 + ((_c = negativeStart === null || negativeStart === void 0 ? void 0 : negativeStart.width) !== null && _c !== void 0 ? _c : 0) + ((_d = premount === null || premount === void 0 ? void 0 : premount.width) !== null && _d !== void 0 ? _d : 0),
|
|
152
200
|
height: '100%',
|
|
153
201
|
display: 'flex',
|
|
154
202
|
alignItems: 'center',
|
|
155
203
|
}, children: jsx_runtime_1.jsx(TimelineSequenceFrame_1.TimelineSequenceFrame, { premounted: isPremounting, postmounted: isPostmounting ? s.duration - 1 : null, roundedFrame: roundedFrame, frozenFrame: frozenFrame }) })) : null] }));
|
|
204
|
+
return (jsx_runtime_1.jsx("div", { ref: ref, [TimelineSelection_1.TIMELINE_MARQUEE_ITEM_ATTR]: true, style: actualStyle, title: s.displayName, onPointerDownCapture: onPointerDownCapture, onPointerDown: selectable ? onPointerDown : undefined, onDoubleClick: onDoubleClick, children: negativeStart ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
205
|
+
jsx_runtime_1.jsx(TimelineSequenceNegativeStart, { left: negativeStart.left, width: negativeStart.width, leftEdgeVisible: leftEdgeVisible, clipped: negativeStartClipped }), jsx_runtime_1.jsx("div", { style: {
|
|
206
|
+
background: style.background,
|
|
207
|
+
border: style.border,
|
|
208
|
+
borderBottomLeftRadius: 0,
|
|
209
|
+
borderBottomRightRadius: style.borderBottomRightRadius,
|
|
210
|
+
borderLeft: 'none',
|
|
211
|
+
borderRightColor: style.borderRightColor,
|
|
212
|
+
borderTopLeftRadius: 0,
|
|
213
|
+
borderTopRightRadius: style.borderTopRightRadius,
|
|
214
|
+
boxSizing: 'border-box',
|
|
215
|
+
height: '100%',
|
|
216
|
+
left: negativeStartEnd,
|
|
217
|
+
overflow: 'hidden',
|
|
218
|
+
position: 'absolute',
|
|
219
|
+
top: 0,
|
|
220
|
+
width: `calc(100% - ${negativeStartEnd}px)`,
|
|
221
|
+
}, children: jsx_runtime_1.jsx("div", { style: {
|
|
222
|
+
height: '100%',
|
|
223
|
+
left: -negativeStartEnd,
|
|
224
|
+
position: 'absolute',
|
|
225
|
+
top: 0,
|
|
226
|
+
width: style.width,
|
|
227
|
+
}, children: content }) })
|
|
228
|
+
] })) : (content) }));
|
|
156
229
|
};
|
|
157
|
-
const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePathInfo, sequenceFrameOffset, }) => {
|
|
230
|
+
const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePathInfo, sequenceFrameOffset, cascadedStart, localStart, }) => {
|
|
158
231
|
// If a duration is 1, it is essentially a still and it should have width 0
|
|
159
232
|
// Some compositions may not be longer than their media duration,
|
|
160
233
|
// if that is the case, it needs to be asynchronously determined
|
|
161
234
|
var _a, _b, _c;
|
|
162
|
-
var _d, _e, _f, _g, _h, _j;
|
|
235
|
+
var _d, _e, _f, _g, _h, _j, _k;
|
|
163
236
|
const video = remotion_1.Internals.useVideo();
|
|
164
237
|
const renderWindow = (0, react_1.useContext)(TimelineViewport_1.TimelineViewportContext);
|
|
238
|
+
const dragAwareDoubleClick = (0, react_1.useMemo)(() => (0, drag_aware_double_click_1.createDragAwareDoubleClickTracker)(), []);
|
|
165
239
|
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);
|
|
166
240
|
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
167
241
|
const extendVideoLastFrame = (0, is_video_with_last_frame_hold_1.isVideoWithLastFrameHold)(s);
|
|
@@ -215,6 +289,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
215
289
|
button: e.button,
|
|
216
290
|
canOpenInEditor,
|
|
217
291
|
numberOfConnectedCompositions: connectedCompositions.length,
|
|
292
|
+
sequenceWasDragged: dragAwareDoubleClick.consumePointerGestureWasDragged(),
|
|
218
293
|
});
|
|
219
294
|
if (action === null) {
|
|
220
295
|
return;
|
|
@@ -233,6 +308,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
233
308
|
}, [
|
|
234
309
|
canOpenInEditor,
|
|
235
310
|
connectedCompositions,
|
|
311
|
+
dragAwareDoubleClick,
|
|
236
312
|
openInEditor,
|
|
237
313
|
s,
|
|
238
314
|
selectComposition,
|
|
@@ -399,6 +475,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
399
475
|
nodePathInfo,
|
|
400
476
|
windowWidth,
|
|
401
477
|
timelineDurationInFrames: (_g = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _g !== void 0 ? _g : 1,
|
|
478
|
+
onDragEnd: dragAwareDoubleClick.endPointerGesture,
|
|
402
479
|
});
|
|
403
480
|
if (!video) {
|
|
404
481
|
throw new TypeError('Expected video config');
|
|
@@ -406,10 +483,11 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
406
483
|
const displayDurationInFrames = s.loopDisplay
|
|
407
484
|
? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes
|
|
408
485
|
: s.duration;
|
|
409
|
-
const { marginLeft, width, premountWidth, postmountWidth } = (0, react_1.useMemo)(() => {
|
|
486
|
+
const { marginLeft, width, negativeStartWidth, negativeStartClipped, premountWidth, postmountWidth, } = (0, react_1.useMemo)(() => {
|
|
410
487
|
return (0, get_timeline_sequence_layout_1.getTimelineSequenceLayout)({
|
|
411
488
|
durationInFrames: displayDurationInFrames,
|
|
412
489
|
startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
|
|
490
|
+
cascadedStart,
|
|
413
491
|
startFromMedia: s.type === 'sequence' || s.type === 'image' ? 0 : s.startMediaFrom,
|
|
414
492
|
maxMediaDuration: effectiveMaxMediaDuration,
|
|
415
493
|
video,
|
|
@@ -418,6 +496,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
418
496
|
postmountDisplay: s.postmountDisplay,
|
|
419
497
|
});
|
|
420
498
|
}, [
|
|
499
|
+
cascadedStart,
|
|
421
500
|
displayDurationInFrames,
|
|
422
501
|
effectiveMaxMediaDuration,
|
|
423
502
|
s,
|
|
@@ -431,12 +510,20 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
431
510
|
return (0, get_timeline_sequence_visible_layout_1.getTimelineSequenceVisibleLayout)({
|
|
432
511
|
marginLeft,
|
|
433
512
|
width,
|
|
513
|
+
negativeStartWidth,
|
|
434
514
|
premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0,
|
|
435
515
|
postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0,
|
|
436
516
|
renderWindowLeft: renderWindow.left - timeline_layout_1.TIMELINE_PADDING,
|
|
437
517
|
renderWindowWidth: renderWindow.width,
|
|
438
518
|
});
|
|
439
|
-
}, [
|
|
519
|
+
}, [
|
|
520
|
+
marginLeft,
|
|
521
|
+
negativeStartWidth,
|
|
522
|
+
postmountWidth,
|
|
523
|
+
premountWidth,
|
|
524
|
+
renderWindow,
|
|
525
|
+
width,
|
|
526
|
+
]);
|
|
440
527
|
const mediaVisualizationStyle = (0, react_1.useMemo)(() => {
|
|
441
528
|
var _a, _b;
|
|
442
529
|
var _c, _d;
|
|
@@ -446,6 +533,9 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
446
533
|
height: '100%',
|
|
447
534
|
};
|
|
448
535
|
}, [visibleLayout]);
|
|
536
|
+
const showLeftBorderRadius = (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible) === true &&
|
|
537
|
+
localStart >= 0 &&
|
|
538
|
+
((_h = s.trimBefore) !== null && _h !== void 0 ? _h : 0) === 0;
|
|
449
539
|
const style = (0, react_1.useMemo)(() => {
|
|
450
540
|
var _a, _b;
|
|
451
541
|
return {
|
|
@@ -457,14 +547,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
457
547
|
? colors_1.TIMELINE_IMAGE_GRADIENT
|
|
458
548
|
: colors_1.BLUE,
|
|
459
549
|
border: `${get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH}px solid ${colors_1.WHITE_ALPHA_20}`,
|
|
460
|
-
borderLeftColor: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible)
|
|
550
|
+
borderLeftColor: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible) && !negativeStartClipped
|
|
461
551
|
? colors_1.WHITE_ALPHA_20
|
|
462
552
|
: colors_1.TRANSPARENT,
|
|
463
553
|
borderRightColor: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible)
|
|
464
554
|
? colors_1.WHITE_ALPHA_20
|
|
465
555
|
: colors_1.TRANSPARENT,
|
|
466
|
-
borderTopLeftRadius:
|
|
467
|
-
borderBottomLeftRadius:
|
|
556
|
+
borderTopLeftRadius: showLeftBorderRadius ? 2 : 0,
|
|
557
|
+
borderBottomLeftRadius: showLeftBorderRadius ? 2 : 0,
|
|
468
558
|
borderTopRightRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible) ? 2 : 0,
|
|
469
559
|
borderBottomRightRadius: (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible) ? 2 : 0,
|
|
470
560
|
position: 'absolute',
|
|
@@ -474,7 +564,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
474
564
|
color: colors_1.WHITE,
|
|
475
565
|
overflow: 'hidden',
|
|
476
566
|
};
|
|
477
|
-
}, [s.type, visibleLayout]);
|
|
567
|
+
}, [negativeStartClipped, s.type, showLeftBorderRadius, visibleLayout]);
|
|
478
568
|
const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
|
|
479
569
|
nodePath !== null &&
|
|
480
570
|
validatedLocation !== null &&
|
|
@@ -495,13 +585,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
495
585
|
const mediaDisplayDurationInFrames = visibleLayout.media
|
|
496
586
|
? visibleLayout.media.width / frameIncrement
|
|
497
587
|
: 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,
|
|
588
|
+
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premount: visibleLayout.premount, postmount: visibleLayout.postmount, negativeStart: visibleLayout.negativeStart, leftEdgeVisible: visibleLayout.leftEdgeVisible, negativeStartClipped: negativeStartClipped, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onPointerDownCapture: dragAwareDoubleClick.beginPointerGesture, 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, 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
589
|
visibleLayout.leftEdgeVisible &&
|
|
590
|
+
negativeStartWidth === 0 &&
|
|
500
591
|
nodePathInfo &&
|
|
501
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (
|
|
592
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null, showRightEdgeDragHandle &&
|
|
502
593
|
visibleLayout.rightEdgeVisible &&
|
|
503
594
|
nodePathInfo &&
|
|
504
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (
|
|
595
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_k = video.durationInFrames) !== null && _k !== void 0 ? _k : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null] }));
|
|
505
596
|
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
|
|
506
597
|
};
|
|
507
598
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
40
|
const are_sequence_node_path_infos_equal_1 = require("../../helpers/are-sequence-node-path-infos-equal");
|
|
41
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
41
42
|
const client_id_1 = require("../../helpers/client-id");
|
|
42
43
|
const colors_1 = require("../../helpers/colors");
|
|
43
44
|
const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
|
|
@@ -83,6 +84,7 @@ const labelContainerStyle = {
|
|
|
83
84
|
alignItems: 'center',
|
|
84
85
|
alignSelf: 'stretch',
|
|
85
86
|
display: 'flex',
|
|
87
|
+
flex: 1,
|
|
86
88
|
flexDirection: 'row',
|
|
87
89
|
minWidth: 0,
|
|
88
90
|
};
|
|
@@ -184,6 +186,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
184
186
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
185
187
|
const previewConnected = previewServerState.type === 'connected';
|
|
186
188
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
189
|
+
const canMutateEffects = previewConnected && (0, interactivity_enabled_1.isStudioSelectionEnabled)() && (0, browser_studio_operations_1.canUseEffectOperations)();
|
|
187
190
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
188
191
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
189
192
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
@@ -438,10 +441,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
438
441
|
position: dropTarget.position,
|
|
439
442
|
clientId: previewServerState.clientId,
|
|
440
443
|
});
|
|
441
|
-
if (result.success) {
|
|
442
|
-
(0, NotificationCenter_1.showNotification)('Reordered sequence', 2000);
|
|
443
|
-
}
|
|
444
|
-
else {
|
|
444
|
+
if (!result.success) {
|
|
445
445
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
446
446
|
}
|
|
447
447
|
}
|
|
@@ -550,6 +550,9 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
550
550
|
button: e.button,
|
|
551
551
|
canOpenInEditor,
|
|
552
552
|
numberOfConnectedCompositions: connectedCompositions.length,
|
|
553
|
+
// The track list row reorders via native drag-and-drop, which
|
|
554
|
+
// already suppresses `dblclick` after a drag.
|
|
555
|
+
sequenceWasDragged: false,
|
|
553
556
|
});
|
|
554
557
|
if (action === null) {
|
|
555
558
|
return;
|
|
@@ -620,7 +623,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
620
623
|
setIsRenaming(true);
|
|
621
624
|
}, [canRenameThisSequence]);
|
|
622
625
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
623
|
-
|
|
626
|
+
canMutateEffects &&
|
|
624
627
|
Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
|
|
625
628
|
const canCrop = (0, use_runtime_values_1.useRuntimeValueSelector)({
|
|
626
629
|
controls: sequence.controls,
|
|
@@ -850,7 +853,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
850
853
|
setPropStatuses,
|
|
851
854
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
852
855
|
]);
|
|
853
|
-
const canDropEffect =
|
|
856
|
+
const canDropEffect = canMutateEffects &&
|
|
854
857
|
nodePath !== null &&
|
|
855
858
|
validatedLocation !== null &&
|
|
856
859
|
((_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.supportsEffects) === true;
|
|
@@ -908,9 +911,9 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
908
911
|
clientId: previewServerState.clientId,
|
|
909
912
|
});
|
|
910
913
|
}, [canDropEffect, nodePath, previewServerState, validatedLocation]);
|
|
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:
|
|
914
|
+
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: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: rowStyle, selected: selected, selectable: selectable, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, hovered: hovered, 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: [
|
|
912
915
|
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 })
|
|
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: [
|
|
916
|
+
] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, sequence: sequence })) : null, numberOfHiddenDuplicates > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
914
917
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineDuplicateCount_1.TimelineDuplicateCount, { count: numberOfHiddenDuplicates })
|
|
915
918
|
] })) : null, mediaSrc ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
916
919
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }),
|
|
@@ -24,7 +24,7 @@ const TimelineSequenceName = ({ displayName, fallbackDisplayName, selected, cont
|
|
|
24
24
|
alignSelf: 'stretch',
|
|
25
25
|
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected, false),
|
|
26
26
|
display: 'inline-flex',
|
|
27
|
-
flexShrink:
|
|
27
|
+
flexShrink: 1,
|
|
28
28
|
fontFamily: 'inherit',
|
|
29
29
|
fontSize: 12,
|
|
30
30
|
lineHeight: 'normal',
|
|
@@ -39,11 +39,13 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
41
|
const client_id_1 = require("../../helpers/client-id");
|
|
42
|
+
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
42
43
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
43
44
|
const ContextMenu_1 = require("../ContextMenu");
|
|
44
45
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
45
46
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
46
47
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
48
|
+
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
47
49
|
const get_sequence_prop_reset_changes_1 = require("./get-sequence-prop-reset-changes");
|
|
48
50
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
49
51
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
@@ -327,6 +329,17 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
327
329
|
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
328
330
|
}
|
|
329
331
|
return [
|
|
332
|
+
(0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
|
|
333
|
+
contextForAgents: (0, format_file_location_1.formatContextForAgents)({
|
|
334
|
+
location: validatedLocation,
|
|
335
|
+
name: `Property "${field.key}"`,
|
|
336
|
+
root: window.remotion_cwd,
|
|
337
|
+
}),
|
|
338
|
+
}),
|
|
339
|
+
{
|
|
340
|
+
type: 'divider',
|
|
341
|
+
id: 'copy-context-for-agents-divider',
|
|
342
|
+
},
|
|
330
343
|
{
|
|
331
344
|
type: 'item',
|
|
332
345
|
id: 'reset-sequence-field',
|
|
@@ -340,7 +353,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
340
353
|
value: 'reset-sequence-field',
|
|
341
354
|
},
|
|
342
355
|
];
|
|
343
|
-
}, [canShowReset, onReset, selection]);
|
|
356
|
+
}, [canShowReset, field.key, onReset, selection, validatedLocation]);
|
|
344
357
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
345
358
|
var _a;
|
|
346
359
|
if (!canOpenInEditor || !defaultEditorId) {
|
|
@@ -364,7 +377,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
364
377
|
...style,
|
|
365
378
|
}, children: fieldValue }));
|
|
366
379
|
}
|
|
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,
|
|
380
|
+
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, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: fieldValue }) }));
|
|
368
381
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
369
382
|
};
|
|
370
383
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -128,18 +128,20 @@ export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticCompon
|
|
|
128
128
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
129
129
|
readonly windowWidth: number;
|
|
130
130
|
readonly timelineDurationInFrames: number;
|
|
131
|
+
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
131
132
|
}>;
|
|
132
|
-
export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth, timelineDurationInFrames, }: {
|
|
133
|
+
export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth, timelineDurationInFrames, onDragEnd, }: {
|
|
133
134
|
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
134
135
|
readonly windowWidth: number;
|
|
135
136
|
readonly timelineDurationInFrames: number;
|
|
137
|
+
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
136
138
|
}) => {
|
|
137
|
-
dragging: boolean;
|
|
138
139
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
139
140
|
};
|
|
140
141
|
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
141
142
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
142
143
|
readonly windowWidth: number;
|
|
143
144
|
readonly timelineDurationInFrames: number;
|
|
145
|
+
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
144
146
|
}>;
|
|
145
147
|
export {};
|