@remotion/studio 4.0.499 → 4.0.501
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 +1 -1
- package/dist/api/delete-static-file.js +8 -3
- package/dist/api/rename-static-file.js +8 -0
- package/dist/api/watch-public-folder.js +2 -1
- package/dist/api/watch-static-file.js +2 -1
- package/dist/api/write-static-file.js +8 -3
- package/dist/components/AssetSelector.js +11 -7
- package/dist/components/AssetSelectorItem.d.ts +25 -0
- package/dist/components/AssetSelectorItem.js +116 -80
- package/dist/components/Canvas.js +6 -1
- package/dist/components/CaptionInspector.d.ts +10 -0
- package/dist/components/CaptionInspector.js +24 -0
- package/dist/components/CaptionTextEditor.d.ts +9 -0
- package/dist/components/CaptionTextEditor.js +132 -0
- package/dist/components/CompositionSelector.js +2 -32
- package/dist/components/ControlButton.js +1 -0
- package/dist/components/CurrentAsset.js +3 -2
- package/dist/components/EditorContexts.d.ts +0 -1
- package/dist/components/EditorContexts.js +2 -2
- package/dist/components/ExplorerPanel.js +2 -1
- package/dist/components/ExplorerPanelRef.d.ts +2 -0
- package/dist/components/FpsCounter.js +3 -3
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +9 -1
- package/dist/components/InitialCompositionLoader.d.ts +1 -1
- package/dist/components/InlineAction.d.ts +2 -1
- package/dist/components/InlineAction.js +3 -2
- package/dist/components/InlineCaptionInspector.d.ts +11 -0
- package/dist/components/InlineCaptionInspector.js +108 -0
- package/dist/components/InlineDropdown.d.ts +1 -1
- package/dist/components/InlineDropdown.js +3 -2
- package/dist/components/InspectorPanel/AlignmentControls.d.ts +2 -2
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +12 -9
- package/dist/components/InspectorPanel/CompositionMetadata.js +170 -57
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +2 -2
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +10 -10
- package/dist/components/InspectorPanel/common.d.ts +17 -4
- package/dist/components/InspectorPanel/common.js +60 -6
- package/dist/components/InspectorPanel/inspector-section-collapse.d.ts +22 -0
- package/dist/components/InspectorPanel/inspector-section-collapse.js +165 -0
- package/dist/components/InspectorPanel/styles.js +7 -1
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +3 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +91 -5
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -1
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.d.ts +2 -1
- package/dist/components/InspectorSequenceSection.js +279 -25
- package/dist/components/KeyboardShortcutsExplainer.js +4 -2
- package/dist/components/Menu/MenuItem.js +2 -1
- package/dist/components/MenuCompositionName.js +30 -7
- package/dist/components/MenuToolbar.d.ts +0 -1
- package/dist/components/MenuToolbar.js +15 -7
- package/dist/components/MobilePanel.d.ts +2 -1
- package/dist/components/MobilePanel.js +29 -25
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
- package/dist/components/NewComposition/DismissableModal.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +7 -0
- package/dist/components/NewComposition/InputDragger.js +119 -8
- package/dist/components/OutlineToggle.d.ts +1 -3
- package/dist/components/OutlineToggle.js +2 -2
- package/dist/components/PreviewToolbar.js +10 -4
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +7 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +45 -0
- package/dist/components/QuickSwitcher/NoResults.d.ts +1 -1
- package/dist/components/QuickSwitcher/NoResults.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.d.ts +10 -0
- package/dist/components/QuickSwitcher/QuickSwitcher.js +6 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.d.ts +10 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +95 -13
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +4 -0
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +11 -8
- package/dist/components/QuickSwitcher/asset-search.d.ts +9 -0
- package/dist/components/QuickSwitcher/asset-search.js +42 -0
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.d.ts +0 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +3 -14
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -2
- package/dist/components/SelectedOutlineCropControls.d.ts +8 -0
- package/dist/components/SelectedOutlineCropControls.js +299 -0
- package/dist/components/SelectedOutlineElement.js +84 -47
- package/dist/components/SelectedOutlineOverlay.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.js +147 -16
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +2 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +31 -3
- package/dist/components/ShowOutlinesProvider.js +4 -1
- package/dist/components/SidebarCollapserControls.d.ts +3 -1
- package/dist/components/SidebarCollapserControls.js +34 -29
- package/dist/components/SnappingToggle.d.ts +1 -3
- package/dist/components/SnappingToggle.js +2 -2
- package/dist/components/Timeline/Timeline.js +19 -5
- package/dist/components/Timeline/TimelineAssetField.d.ts +9 -1
- package/dist/components/Timeline/TimelineAssetField.js +53 -100
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +7 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +65 -38
- package/dist/components/Timeline/TimelineColorField.js +20 -1
- package/dist/components/Timeline/TimelineEffectPropItem.js +8 -77
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +8 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +2 -2
- package/dist/components/Timeline/TimelineKeyframeTracksContext.d.ts +3 -3
- package/dist/components/Timeline/TimelineList.d.ts +2 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.d.ts +7 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +10 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowChrome.js +4 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -7
- package/dist/components/Timeline/TimelineSelection.js +17 -12
- package/dist/components/Timeline/TimelineSequence.js +2 -9
- package/dist/components/Timeline/TimelineSequenceItem.js +61 -15
- package/dist/components/Timeline/TimelineSequencePropItem.js +36 -85
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +0 -1
- package/dist/components/Timeline/TimelineTrack.d.ts +2 -2
- package/dist/components/Timeline/TimelineTrack.js +4 -2
- package/dist/components/Timeline/TimelineTracks.d.ts +2 -2
- package/dist/components/Timeline/border-radius-representation.d.ts +16 -0
- package/dist/components/Timeline/border-radius-representation.js +60 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +1 -6
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +14 -12
- package/dist/components/Timeline/get-sequence-prop-reset-changes.d.ts +10 -0
- package/dist/components/Timeline/get-sequence-prop-reset-changes.js +33 -0
- package/dist/components/Timeline/reset-selected-timeline-props.js +20 -18
- package/dist/components/Timeline/save-effect-prop.d.ts +10 -0
- package/dist/components/Timeline/save-effect-prop.js +52 -1
- package/dist/components/Timeline/save-sequence-prop.d.ts +12 -1
- package/dist/components/Timeline/save-sequence-prop.js +25 -1
- package/dist/components/Timeline/should-show-track-in-timeline.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +17 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +4 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +9 -3
- package/dist/components/Timeline/use-timeline-asset-drop.js +4 -0
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -2
- package/dist/components/TopPanel.js +2 -2
- package/dist/components/UndoRedoButtons.js +42 -11
- package/dist/components/composition-drop-preview.js +1 -0
- package/dist/components/handle-drop.d.ts +3 -2
- package/dist/components/handle-drop.js +2 -1
- package/dist/components/import-assets.d.ts +4 -2
- package/dist/components/import-assets.js +20 -7
- package/dist/components/menu-toolbar-height.d.ts +1 -0
- package/dist/components/menu-toolbar-height.js +4 -0
- package/dist/components/selected-outline-drag.d.ts +41 -4
- package/dist/components/selected-outline-drag.js +179 -2
- package/dist/components/selected-outline-geometry.d.ts +1 -0
- package/dist/components/selected-outline-measurement.d.ts +11 -0
- package/dist/components/selected-outline-measurement.js +64 -3
- package/dist/components/selected-outline-types.d.ts +44 -1
- package/dist/components/selected-outline-types.js +21 -1
- package/dist/components/use-element-overwrite-confirmation.d.ts +2 -0
- package/dist/components/use-element-overwrite-confirmation.js +73 -0
- package/dist/components/use-static-files.js +7 -2
- package/dist/error-overlay/react-overlay/effects/resolve-file-source.js +13 -2
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -3
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -3
- package/dist/esm/{chunk-pk1zwsn1.js → chunk-n1kj09yv.js} +10618 -8002
- package/dist/esm/index.mjs +24 -8
- package/dist/esm/internals.mjs +10618 -8002
- package/dist/esm/previewEntry.mjs +40002 -37388
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/browser-studio-operations.d.ts +3 -0
- package/dist/helpers/browser-studio-operations.js +14 -0
- package/dist/helpers/calculate-timeline.d.ts +2 -2
- package/dist/helpers/calculate-timeline.js +8 -28
- package/dist/helpers/client-id.d.ts +0 -1
- package/dist/helpers/client-id.js +15 -10
- package/dist/helpers/download-blob.d.ts +1 -0
- package/dist/helpers/download-blob.js +15 -0
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +3 -10
- package/dist/helpers/get-timeline-sequence-sort-key.js +5 -13
- package/dist/helpers/inject-css.js +5 -3
- package/dist/helpers/interactivity-enabled.d.ts +1 -0
- package/dist/helpers/interactivity-enabled.js +7 -2
- package/dist/helpers/is-mac.d.ts +1 -0
- package/dist/helpers/is-mac.js +4 -0
- package/dist/helpers/open-in-editor.d.ts +5 -1
- package/dist/helpers/open-in-editor.js +39 -4
- package/dist/helpers/preview-server-events.js +46 -9
- package/dist/helpers/sort-by-nonce-history.js +97 -19
- package/dist/helpers/use-create-composition.js +8 -6
- package/dist/helpers/use-keybinding.js +2 -3
- package/dist/helpers/use-menu-structure.js +39 -1
- package/dist/hot-middleware-client/client.js +3 -3
- package/dist/icons/border-radius.d.ts +4 -0
- package/dist/icons/border-radius.js +8 -0
- package/dist/icons/caret.d.ts +1 -0
- package/dist/icons/caret.js +2 -2
- package/dist/icons/fullscreen.d.ts +4 -0
- package/dist/icons/fullscreen.js +6 -0
- package/dist/icons/pen.d.ts +5 -0
- package/dist/icons/pen.js +8 -0
- package/dist/previewEntry.js +1 -1
- package/dist/state/modals.d.ts +9 -0
- package/dist/state/timeline-sequence-hover.d.ts +17 -0
- package/dist/state/timeline-sequence-hover.js +33 -0
- package/package.json +13 -12
- package/dist/helpers/get-timeline-sequence-hash.d.ts +0 -6
- package/dist/helpers/get-timeline-sequence-hash.js +0 -33
|
@@ -24,7 +24,7 @@ const keyframeControlsColumnBaseStyle = {
|
|
|
24
24
|
flexShrink: 0,
|
|
25
25
|
justifyContent: 'flex-start',
|
|
26
26
|
};
|
|
27
|
-
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, selectionItem, onSelect, showSelectedBackground, containsSelection, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, }) => {
|
|
27
|
+
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, selectionItem, onSelect, showSelectedBackground, containsSelection, hovered = false, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
28
28
|
const ref = (0, react_1.useRef)(null);
|
|
29
29
|
const { basePadding, keyframeControlsPadding, rowBorderRadius, rowHorizontalMargin, } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
30
30
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
@@ -59,6 +59,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
59
59
|
showSelectedBackground,
|
|
60
60
|
selected,
|
|
61
61
|
containsSelection,
|
|
62
|
+
hovered,
|
|
62
63
|
});
|
|
63
64
|
const innerRowStyle = (0, react_1.useMemo)(() => ({
|
|
64
65
|
...rowBase,
|
|
@@ -89,8 +90,8 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
89
90
|
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
90
91
|
jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: keyframeControls ? (jsx_runtime_1.jsx("div", { style: keyframeControlsColumnStyle, children: keyframeControls })) : (jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] })) }), children] }));
|
|
91
92
|
if (outerStyle) {
|
|
92
|
-
return (jsx_runtime_1.jsx("div", { ref: ref, style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClick, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
93
|
+
return (jsx_runtime_1.jsx("div", { ref: ref, style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClick, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
93
94
|
}
|
|
94
|
-
return (jsx_runtime_1.jsx("div", { ref: ref, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClick, style: innerRowStyle, children: chrome }));
|
|
95
|
+
return (jsx_runtime_1.jsx("div", { ref: ref, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClick, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: innerRowStyle, children: chrome }));
|
|
95
96
|
};
|
|
96
97
|
exports.TimelineRowChrome = TimelineRowChrome;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import React, { type CSSProperties } from 'react';
|
|
2
2
|
import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses } from 'remotion';
|
|
3
|
-
import type { SequenceNodePathInfo,
|
|
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_HOVER_BACKGROUND = "rgba(255, 255, 255, 0.05)";
|
|
6
7
|
export declare const TIMELINE_SELECTED_LABEL_BACKGROUND = "#B0B0B0";
|
|
7
8
|
export declare const TIMELINE_SELECTED_LABEL_TEXT = "black";
|
|
8
9
|
export declare const TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
|
|
9
10
|
export declare const getTimelineSelectedLabelStyle: (selected: boolean, subcategory: boolean) => CSSProperties;
|
|
10
11
|
export declare const getTimelineColor: (selected: boolean, subcategory: boolean) => "black" | "rgba(255, 255, 255, 0.8)";
|
|
11
12
|
export declare const getTimelineSelectedTrackHighlightStyle: (timelineWidth: number, backgroundColor?: string) => CSSProperties;
|
|
12
|
-
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, }: {
|
|
13
|
+
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, hovered, }: {
|
|
13
14
|
readonly showSelectedBackground: boolean;
|
|
14
15
|
readonly selected: boolean;
|
|
15
16
|
readonly containsSelection: boolean;
|
|
17
|
+
readonly hovered: boolean;
|
|
16
18
|
}) => string | undefined;
|
|
17
19
|
export declare const TIMELINE_BACKGROUND = "#0F1113";
|
|
18
20
|
export declare const TIMELINE_TICKS_BACKGROUND = "rgb(31,36,40)";
|
|
@@ -145,23 +147,23 @@ type TimelineSelectionOptions = {
|
|
|
145
147
|
};
|
|
146
148
|
export declare const getTimelineSelectionFromNodePathInfo: (nodePathInfo: SequenceNodePathInfo | null) => TimelineSelection | null;
|
|
147
149
|
export declare const getTimelineSelectionKey: (item: TimelineSelection) => string;
|
|
148
|
-
export declare const getSelectableTimelineSequenceSelections: (tracks: readonly Pick<
|
|
150
|
+
export declare const getSelectableTimelineSequenceSelections: (tracks: readonly Pick<TimelineTrackData, "nodePathInfo">[]) => TimelineSelection[];
|
|
149
151
|
export declare const getSelectableTimelineItems: ({ getDragOverrides, getEffectDragOverrides, getIsExpanded, propStatuses, selectedItems, timeline, timelinePosition, }: {
|
|
150
152
|
readonly getDragOverrides: GetDragOverrides;
|
|
151
153
|
readonly getEffectDragOverrides: GetEffectDragOverrides;
|
|
152
154
|
readonly getIsExpanded: GetIsExpanded;
|
|
153
155
|
readonly propStatuses: PropStatuses;
|
|
154
156
|
readonly selectedItems: readonly TimelineSelection[];
|
|
155
|
-
readonly timeline: readonly
|
|
157
|
+
readonly timeline: readonly TimelineTrackData[];
|
|
156
158
|
readonly timelinePosition: number;
|
|
157
159
|
}) => TimelineSelection[];
|
|
158
160
|
export declare const getTimelineSequenceSelectionKey: (nodePathInfo: SequenceNodePathInfo) => string;
|
|
159
161
|
export declare const TimelineSelectAllKeybindings: React.FC<{
|
|
160
|
-
readonly timeline: readonly
|
|
162
|
+
readonly timeline: readonly TimelineTrackData[];
|
|
161
163
|
}>;
|
|
162
164
|
export declare const TimelineSelectableItemsProvider: React.FC<{
|
|
163
165
|
readonly children: React.ReactNode;
|
|
164
|
-
readonly timeline: readonly
|
|
166
|
+
readonly timeline: readonly TimelineTrackData[];
|
|
165
167
|
}>;
|
|
166
168
|
export declare const TimelineSelectionProvider: React.FC<{
|
|
167
169
|
readonly children: React.ReactNode;
|
|
@@ -213,5 +215,5 @@ export declare const useTimelineGuideSelection: (guideId: string) => {
|
|
|
213
215
|
selectionItem: TimelineSelection;
|
|
214
216
|
};
|
|
215
217
|
export declare const useTimelineRowContainsSelection: (nodePathInfo: SequenceNodePathInfo | null) => boolean;
|
|
216
|
-
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null) => string | undefined;
|
|
218
|
+
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null, hovered?: boolean) => string | undefined;
|
|
217
219
|
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.useTimelineFocusableItem = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = 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_SELECTED_BACKGROUND = void 0;
|
|
3
|
+
exports.useTimelineRowHighlightBackground = exports.useTimelineRowContainsSelection = exports.useTimelineGuideSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useTimelineFocusableItem = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = 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;
|
|
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");
|
|
@@ -21,6 +21,7 @@ const timeline_refs_1 = require("./timeline-refs");
|
|
|
21
21
|
const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
|
|
22
22
|
const TimelineDeleteKeybindings_1 = require("./TimelineDeleteKeybindings");
|
|
23
23
|
exports.TIMELINE_SELECTED_BACKGROUND = colors_1.TIMELINE_SELECTED_BACKGROUND_COLOR;
|
|
24
|
+
exports.TIMELINE_HOVER_BACKGROUND = colors_1.WHITE_ALPHA_05;
|
|
24
25
|
exports.TIMELINE_SELECTED_LABEL_BACKGROUND = colors_1.TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR;
|
|
25
26
|
exports.TIMELINE_SELECTED_LABEL_TEXT = colors_1.BLACK;
|
|
26
27
|
exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
|
|
@@ -54,10 +55,11 @@ const getTimelineSelectedTrackHighlightStyle = (timelineWidth, backgroundColor =
|
|
|
54
55
|
width: timelineWidth,
|
|
55
56
|
});
|
|
56
57
|
exports.getTimelineSelectedTrackHighlightStyle = getTimelineSelectedTrackHighlightStyle;
|
|
57
|
-
const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, containsSelection, }) => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, containsSelection, hovered, }) => {
|
|
59
|
+
if (showSelectedBackground && (selected || containsSelection)) {
|
|
60
|
+
return exports.TIMELINE_SELECTED_BACKGROUND;
|
|
61
|
+
}
|
|
62
|
+
return hovered ? exports.TIMELINE_HOVER_BACKGROUND : undefined;
|
|
61
63
|
};
|
|
62
64
|
exports.getTimelineRowHighlightBackground = getTimelineRowHighlightBackground;
|
|
63
65
|
exports.TIMELINE_BACKGROUND = colors_1.TIMELINE_BACKGROUND_COLOR;
|
|
@@ -595,9 +597,9 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
595
597
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
596
598
|
const timelineSelectionScope = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null;
|
|
597
599
|
const { expandParentTracks } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
598
|
-
const canSelect = (0, interactivity_enabled_1.
|
|
599
|
-
previewServerState.type === 'connected'
|
|
600
|
-
|
|
600
|
+
const canSelect = (0, interactivity_enabled_1.isStudioSelectionEnabled)() &&
|
|
601
|
+
(previewServerState.type === 'connected' ||
|
|
602
|
+
window.remotion_isReadOnlyStudio);
|
|
601
603
|
const [selectedItems, setSelectedItems] = (0, react_1.useState)([]);
|
|
602
604
|
const selectionAnchor = (0, react_1.useRef)(null);
|
|
603
605
|
const selectionScope = (0, react_1.useRef)(null);
|
|
@@ -614,7 +616,8 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
614
616
|
setSelectedItems([]);
|
|
615
617
|
}
|
|
616
618
|
}, [canSelect]);
|
|
617
|
-
const canSelectItem = (0, react_1.useCallback)((
|
|
619
|
+
const canSelectItem = (0, react_1.useCallback)((item) => canSelect &&
|
|
620
|
+
(!window.remotion_isReadOnlyStudio || item.type === 'sequence'), [canSelect]);
|
|
618
621
|
const getCurrentAvailableSelectionState = (0, react_1.useCallback)((currentSelectedItems) => {
|
|
619
622
|
if (selectionScope.current !== timelineSelectionScope) {
|
|
620
623
|
return exports.EMPTY_TIMELINE_SELECTION_STATE;
|
|
@@ -867,8 +870,9 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
867
870
|
]);
|
|
868
871
|
const currentSelection = (0, react_1.useRef)(value);
|
|
869
872
|
currentSelection.current = value;
|
|
870
|
-
return (jsx_runtime_1.jsx(CurrentTimelineSelectionContext.Provider, { value: currentSelection, children: jsx_runtime_1.jsxs(TimelineSelectionContext.Provider, { value: value, children: [children, jsx_runtime_1.jsx(TimelineEscapeKeybindings, {}),
|
|
871
|
-
|
|
873
|
+
return (jsx_runtime_1.jsx(CurrentTimelineSelectionContext.Provider, { value: currentSelection, children: jsx_runtime_1.jsxs(TimelineSelectionContext.Provider, { value: value, children: [children, jsx_runtime_1.jsx(TimelineEscapeKeybindings, {}), (0, interactivity_enabled_1.isStudioInteractivityEnabled)() ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
874
|
+
jsx_runtime_1.jsx(TimelineClipboardKeybindings_1.TimelineClipboardKeybindings, {}), jsx_runtime_1.jsx(TimelineDeleteKeybindings_1.TimelineDeleteKeybindings, {})
|
|
875
|
+
] })) : null] }) }));
|
|
872
876
|
};
|
|
873
877
|
exports.TimelineSelectionProvider = TimelineSelectionProvider;
|
|
874
878
|
const useTimelineSelection = () => {
|
|
@@ -1107,13 +1111,14 @@ const useTimelineRowContainsSelection = (nodePathInfo) => {
|
|
|
1107
1111
|
return containsSelection(nodePathInfo);
|
|
1108
1112
|
};
|
|
1109
1113
|
exports.useTimelineRowContainsSelection = useTimelineRowContainsSelection;
|
|
1110
|
-
const useTimelineRowHighlightBackground = (nodePathInfo) => {
|
|
1114
|
+
const useTimelineRowHighlightBackground = (nodePathInfo, hovered = false) => {
|
|
1111
1115
|
const { selected } = (0, exports.useTimelineRowSelection)(nodePathInfo);
|
|
1112
1116
|
const containsSelection = (0, exports.useTimelineRowContainsSelection)(nodePathInfo);
|
|
1113
1117
|
return (0, exports.getTimelineRowHighlightBackground)({
|
|
1114
1118
|
showSelectedBackground: true,
|
|
1115
1119
|
selected,
|
|
1116
1120
|
containsSelection,
|
|
1121
|
+
hovered,
|
|
1117
1122
|
});
|
|
1118
1123
|
};
|
|
1119
1124
|
exports.useTimelineRowHighlightBackground = useTimelineRowHighlightBackground;
|
|
@@ -291,10 +291,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
291
291
|
},
|
|
292
292
|
],
|
|
293
293
|
});
|
|
294
|
-
if (result.success) {
|
|
295
|
-
(0, NotificationCenter_1.showNotification)('Removed sequence from source file', 2000);
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
294
|
+
if (!result.success) {
|
|
298
295
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
299
296
|
}
|
|
300
297
|
}
|
|
@@ -341,9 +338,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
341
338
|
validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
|
|
342
339
|
});
|
|
343
340
|
const contextMenuValues = (0, react_1.useMemo)(() => {
|
|
344
|
-
if (!previewConnected) {
|
|
345
|
-
return [];
|
|
346
|
-
}
|
|
347
341
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
348
342
|
assetLinkInfo,
|
|
349
343
|
canOpenInEditor,
|
|
@@ -376,7 +370,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
376
370
|
onDuplicateSequenceFromSource,
|
|
377
371
|
openInEditor,
|
|
378
372
|
originalLocation,
|
|
379
|
-
previewConnected,
|
|
380
373
|
s,
|
|
381
374
|
selectAsset,
|
|
382
375
|
]);
|
|
@@ -462,6 +455,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
462
455
|
return null;
|
|
463
456
|
}
|
|
464
457
|
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (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, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
|
|
465
|
-
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: onContextMenuOpen, children: sequence })) : (sequence);
|
|
458
|
+
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: onContextMenuOpen, children: sequence })) : (sequence);
|
|
466
459
|
};
|
|
467
460
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -46,6 +46,7 @@ const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
|
|
|
46
46
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
47
47
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
48
48
|
const modals_1 = require("../../state/modals");
|
|
49
|
+
const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
|
|
49
50
|
const call_api_1 = require("../call-api");
|
|
50
51
|
const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
|
|
51
52
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
@@ -55,6 +56,7 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
|
55
56
|
const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
|
|
56
57
|
const layout_1 = require("../layout");
|
|
57
58
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
59
|
+
const selected_outline_types_1 = require("../selected-outline-types");
|
|
58
60
|
const use_select_asset_1 = require("../use-select-asset");
|
|
59
61
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
60
62
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
@@ -175,6 +177,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
175
177
|
var _a, _b, _c;
|
|
176
178
|
var _d, _e, _f;
|
|
177
179
|
const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
|
|
180
|
+
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
|
|
178
181
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
179
182
|
const previewConnected = previewServerState.type === 'connected';
|
|
180
183
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
@@ -186,7 +189,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
186
189
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
187
190
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
188
191
|
const { onSelect, selectable, selected, selectionItem } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
189
|
-
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
192
|
+
const { selectItem, selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
190
193
|
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
191
194
|
const [effectDropHovered, setEffectDropHovered] = (0, react_1.useState)(false);
|
|
192
195
|
const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
|
|
@@ -267,10 +270,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
267
270
|
},
|
|
268
271
|
],
|
|
269
272
|
});
|
|
270
|
-
if (result.success) {
|
|
271
|
-
(0, NotificationCenter_1.showNotification)('Removed sequence from source file', 2000);
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
273
|
+
if (!result.success) {
|
|
274
274
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
275
275
|
}
|
|
276
276
|
}
|
|
@@ -651,6 +651,29 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
651
651
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
652
652
|
previewInteractive &&
|
|
653
653
|
Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
|
|
654
|
+
const canCrop = (0, react_1.useMemo)(() => {
|
|
655
|
+
if (!previewInteractive ||
|
|
656
|
+
!sequence.controls ||
|
|
657
|
+
!nodePathInfo ||
|
|
658
|
+
!propStatusesForOverride ||
|
|
659
|
+
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
660
|
+
return false;
|
|
661
|
+
}
|
|
662
|
+
const activeSchema = remotion_1.Internals.flattenActiveSchema(sequence.controls.schema, (key) => {
|
|
663
|
+
var _a;
|
|
664
|
+
return (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.currentRuntimeValueDotNotation[key];
|
|
665
|
+
});
|
|
666
|
+
return (0, selected_outline_types_1.canEditSelectedOutlineCrop)({
|
|
667
|
+
schema: activeSchema,
|
|
668
|
+
propStatuses: propStatusesForOverride,
|
|
669
|
+
});
|
|
670
|
+
}, [
|
|
671
|
+
nodePathInfo,
|
|
672
|
+
previewInteractive,
|
|
673
|
+
propStatusesForOverride,
|
|
674
|
+
sequence.controls,
|
|
675
|
+
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
676
|
+
]);
|
|
654
677
|
const onAddEffect = (0, react_1.useCallback)(() => {
|
|
655
678
|
if (!canAddEffect ||
|
|
656
679
|
previewServerState.type !== 'connected' ||
|
|
@@ -671,10 +694,20 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
671
694
|
setSelectedModal,
|
|
672
695
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
673
696
|
]);
|
|
674
|
-
const
|
|
675
|
-
if (!
|
|
676
|
-
return
|
|
697
|
+
const onCrop = (0, react_1.useCallback)(() => {
|
|
698
|
+
if (!canCrop || !nodePathInfo) {
|
|
699
|
+
return;
|
|
677
700
|
}
|
|
701
|
+
selectItem({
|
|
702
|
+
type: 'sequence-prop',
|
|
703
|
+
nodePathInfo: {
|
|
704
|
+
...nodePathInfo,
|
|
705
|
+
auxiliaryKeys: ['controls', selected_outline_types_1.cropFieldKeys.left],
|
|
706
|
+
},
|
|
707
|
+
key: selected_outline_types_1.cropFieldKeys.left,
|
|
708
|
+
}, undefined, undefined, { reveal: true });
|
|
709
|
+
}, [canCrop, nodePathInfo, selectItem]);
|
|
710
|
+
const contextMenuValues = (0, react_1.useMemo)(() => {
|
|
678
711
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
679
712
|
assetLinkInfo,
|
|
680
713
|
canOpenInEditor,
|
|
@@ -706,12 +739,24 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
706
739
|
subMenu: null,
|
|
707
740
|
value: 'add-effect',
|
|
708
741
|
},
|
|
709
|
-
{
|
|
710
|
-
type: 'divider',
|
|
711
|
-
id: 'add-effect-divider',
|
|
712
|
-
},
|
|
713
742
|
]
|
|
714
743
|
: []),
|
|
744
|
+
{
|
|
745
|
+
type: 'item',
|
|
746
|
+
id: 'crop',
|
|
747
|
+
keyHint: null,
|
|
748
|
+
label: 'Crop',
|
|
749
|
+
leftItem: null,
|
|
750
|
+
disabled: !canCrop,
|
|
751
|
+
onClick: onCrop,
|
|
752
|
+
quickSwitcherLabel: null,
|
|
753
|
+
subMenu: null,
|
|
754
|
+
value: 'crop',
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
type: 'divider',
|
|
758
|
+
id: 'crop-divider',
|
|
759
|
+
},
|
|
715
760
|
{
|
|
716
761
|
type: 'item',
|
|
717
762
|
id: 'rename-sequence',
|
|
@@ -733,6 +778,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
733
778
|
}, [
|
|
734
779
|
assetLinkInfo,
|
|
735
780
|
canAddEffect,
|
|
781
|
+
canCrop,
|
|
736
782
|
canOpenInEditor,
|
|
737
783
|
canRenameThisSequence,
|
|
738
784
|
deleteDisabled,
|
|
@@ -742,13 +788,13 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
742
788
|
freezeFrameMenuItem,
|
|
743
789
|
nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
|
|
744
790
|
onAddEffect,
|
|
791
|
+
onCrop,
|
|
745
792
|
onDeleteSequenceFromSource,
|
|
746
793
|
onDisableSequenceInteractivity,
|
|
747
794
|
onDuplicateSequenceFromSource,
|
|
748
795
|
onRenameSequence,
|
|
749
796
|
openInEditor,
|
|
750
797
|
originalLocation,
|
|
751
|
-
previewConnected,
|
|
752
798
|
selectAsset,
|
|
753
799
|
sequence,
|
|
754
800
|
]);
|
|
@@ -810,7 +856,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
810
856
|
clientId: previewServerState.clientId,
|
|
811
857
|
});
|
|
812
858
|
}, [canDropEffect, nodePath, previewServerState, validatedLocation]);
|
|
813
|
-
const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, onToggleExpand: onToggleExpand, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
859
|
+
const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent && nodePathInfo !== null ? (jsx_runtime_1.jsx(TimelineSequenceExpandArrow, { disabled: !previewInteractive, isExpanded: isExpanded, nodePathInfo: nodePathInfo, onToggleExpand: onToggleExpand, sequence: sequence })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: rowStyle, selected: selected, selectable: selectable, selectionItem: selectionItem, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, 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: [
|
|
814
860
|
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 })
|
|
815
861
|
] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), mediaSrc ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
816
862
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }),
|
|
@@ -818,7 +864,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
818
864
|
jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
|
|
819
865
|
] })) : null] }) }));
|
|
820
866
|
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, sequenceDropRejection ? (jsx_runtime_1.jsx("div", { style: sequenceReorderRejectionStyle, children: sequenceDropRejection })) : null, trackRow] })) : (trackRow);
|
|
821
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selectable ? onSelect : null, children: draggableTrackRow })) : (draggableTrackRow), previewConnected &&
|
|
867
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selectable ? onSelect : null, children: draggableTrackRow })) : (draggableTrackRow), previewConnected &&
|
|
822
868
|
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
823
869
|
isExpanded &&
|
|
824
870
|
hasExpandableContent &&
|
|
@@ -6,9 +6,11 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
|
+
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
9
10
|
const ContextMenu_1 = require("../ContextMenu");
|
|
11
|
+
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
10
12
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
11
|
-
const
|
|
13
|
+
const get_sequence_prop_reset_changes_1 = require("./get-sequence-prop-reset-changes");
|
|
12
14
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
13
15
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
14
16
|
const TimelineFieldRowContent_1 = require("./TimelineFieldRowContent");
|
|
@@ -18,8 +20,17 @@ const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
|
18
20
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
19
21
|
const TimelineSchemaField_1 = require("./TimelineSchemaField");
|
|
20
22
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
21
|
-
const update_selected_easing_1 = require("./update-selected-easing");
|
|
22
23
|
const fieldRowBase = {};
|
|
24
|
+
const inlineSourceFieldRow = {
|
|
25
|
+
alignItems: 'stretch',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
minWidth: 0,
|
|
28
|
+
width: '100%',
|
|
29
|
+
};
|
|
30
|
+
const computedSourceFieldRow = {
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
paddingInline: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING,
|
|
33
|
+
};
|
|
23
34
|
const isKeyframedStatus = (status) => {
|
|
24
35
|
return status.status === 'keyframed';
|
|
25
36
|
};
|
|
@@ -167,9 +178,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
167
178
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
168
179
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
169
180
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
170
|
-
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
171
|
-
const setFrame = remotion_1.Internals.useTimelineSetFrame();
|
|
172
|
-
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
173
181
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
174
182
|
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
175
183
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
@@ -223,16 +231,14 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
223
231
|
(0, save_sequence_prop_1.saveSequenceProps)({
|
|
224
232
|
addedKeyframes: null,
|
|
225
233
|
movedKeyframes: null,
|
|
226
|
-
changes:
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
],
|
|
234
|
+
changes: (0, get_sequence_prop_reset_changes_1.getSequencePropResetChanges)({
|
|
235
|
+
fileName: validatedLocation.source,
|
|
236
|
+
nodePath,
|
|
237
|
+
fieldKey: field.key,
|
|
238
|
+
value: field.fieldSchema.default,
|
|
239
|
+
defaultValue,
|
|
240
|
+
schema,
|
|
241
|
+
}),
|
|
236
242
|
setPropStatuses,
|
|
237
243
|
clientId: previewServerState.clientId,
|
|
238
244
|
undoLabel: `Reset ${fieldLabel}`,
|
|
@@ -267,84 +273,29 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
267
273
|
},
|
|
268
274
|
];
|
|
269
275
|
}, [canShowReset, onReset]);
|
|
270
|
-
const seekToDisplayFrame = (0, react_1.useCallback)((frame) => {
|
|
271
|
-
setFrame((current) => {
|
|
272
|
-
const next = { ...current, [videoConfig.id]: frame };
|
|
273
|
-
remotion_1.Internals.persistCurrentFrame(next);
|
|
274
|
-
return next;
|
|
275
|
-
});
|
|
276
|
-
}, [setFrame, videoConfig.id]);
|
|
277
276
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
const keyframeSelection = {
|
|
282
|
-
type: 'keyframe',
|
|
283
|
-
nodePathInfo,
|
|
284
|
-
frame: sourceFrame + keyframeDisplayOffset,
|
|
285
|
-
};
|
|
286
|
-
if (propStatus.status === 'static') {
|
|
287
|
-
if (!keyframable || previewServerState.type !== 'connected') {
|
|
288
|
-
return;
|
|
289
|
-
}
|
|
290
|
-
const value = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
291
|
-
propStatus,
|
|
292
|
-
dragOverrideValue,
|
|
293
|
-
frame: sourceFrame,
|
|
294
|
-
defaultValue: field.fieldSchema.default,
|
|
295
|
-
shouldResortToDefaultValueIfUndefined: true,
|
|
296
|
-
});
|
|
297
|
-
event.stopPropagation();
|
|
298
|
-
(0, call_add_keyframe_1.callAddSequenceKeyframe)({
|
|
299
|
-
fileName: validatedLocation.source,
|
|
300
|
-
nodePath,
|
|
301
|
-
fieldKey: field.key,
|
|
302
|
-
sourceFrame,
|
|
303
|
-
value,
|
|
304
|
-
schema,
|
|
305
|
-
setPropStatuses,
|
|
306
|
-
clientId: previewServerState.clientId,
|
|
307
|
-
}).catch(() => undefined);
|
|
308
|
-
selectItems([keyframeSelection], { reveal: true });
|
|
309
|
-
seekToDisplayFrame(keyframeSelection.frame);
|
|
310
|
-
return;
|
|
311
|
-
}
|
|
312
|
-
const targetSelection = (0, get_animation_item_selection_for_frame_1.getAnimationItemSelectionForSourceFrame)({
|
|
313
|
-
includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(propStatus.interpolationFunction),
|
|
314
|
-
keyframeDisplayOffset,
|
|
315
|
-
keyframes: propStatus.keyframes,
|
|
316
|
-
nodePathInfo,
|
|
317
|
-
sourceFrame,
|
|
318
|
-
});
|
|
319
|
-
if (targetSelection === null) {
|
|
277
|
+
var _a;
|
|
278
|
+
if (!window.remotion_editorName ||
|
|
279
|
+
previewServerState.type !== 'connected') {
|
|
320
280
|
return;
|
|
321
281
|
}
|
|
322
282
|
event.stopPropagation();
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
}, [
|
|
328
|
-
dragOverrideValue,
|
|
329
|
-
field.fieldSchema.default,
|
|
330
|
-
field.key,
|
|
331
|
-
keyframeDisplayOffset,
|
|
332
|
-
keyframable,
|
|
333
|
-
nodePath,
|
|
334
|
-
nodePathInfo,
|
|
335
|
-
previewServerState,
|
|
336
|
-
propStatus,
|
|
337
|
-
schema,
|
|
338
|
-
seekToDisplayFrame,
|
|
339
|
-
selectItems,
|
|
340
|
-
setPropStatuses,
|
|
341
|
-
sourceFrame,
|
|
342
|
-
validatedLocation.source,
|
|
343
|
-
]);
|
|
283
|
+
(0, open_in_editor_1.openOriginalPositionInEditorAtProperty)({
|
|
284
|
+
originalPosition: validatedLocation,
|
|
285
|
+
property: (_a = field.key.split('.').at(-1)) !== null && _a !== void 0 ? _a : field.key,
|
|
286
|
+
}).catch(() => undefined);
|
|
287
|
+
}, [field.key, previewServerState.type, validatedLocation]);
|
|
344
288
|
if (propStatus === null) {
|
|
345
289
|
return null;
|
|
346
290
|
}
|
|
347
291
|
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }));
|
|
292
|
+
if (field.typeName === 'asset' && field.key === 'src') {
|
|
293
|
+
return (jsx_runtime_1.jsx("div", { style: {
|
|
294
|
+
...inlineSourceFieldRow,
|
|
295
|
+
...(propStatus.status === 'computed' ? computedSourceFieldRow : null),
|
|
296
|
+
...style,
|
|
297
|
+
}, children: fieldValue }));
|
|
298
|
+
}
|
|
348
299
|
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: fieldValue }) }));
|
|
349
300
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
|
|
350
301
|
};
|
|
@@ -107,7 +107,6 @@ const getMinimumSequenceDuration = ({ sequence, sequences, }) => {
|
|
|
107
107
|
return 1;
|
|
108
108
|
}
|
|
109
109
|
const siblings = (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(sequences.filter((candidate) => candidate.parent === sequence.parent &&
|
|
110
|
-
candidate.rootId === sequence.rootId &&
|
|
111
110
|
((0, exports.isTransitionSeriesSequence)(candidate) ||
|
|
112
111
|
isTransitionSeriesTransition(candidate))));
|
|
113
112
|
const sequenceIndex = siblings.findIndex((candidate) => candidate.id === sequence.id);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
3
|
export declare const TimelineTrack: React.NamedExoticComponent<{
|
|
4
|
-
readonly track:
|
|
4
|
+
readonly track: TimelineTrackData;
|
|
5
5
|
}>;
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const client_id_1 = require("../../helpers/client-id");
|
|
40
40
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
41
|
+
const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
|
|
41
42
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
42
43
|
const TimelineExpandedTrackKeyframes_1 = require("./TimelineExpandedTrackKeyframes");
|
|
43
44
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -49,7 +50,8 @@ const TimelineTrackUnmemoized = ({ track }) => {
|
|
|
49
50
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
50
51
|
const previewServerConnected = previewServerState.type === 'connected';
|
|
51
52
|
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
52
|
-
const
|
|
53
|
+
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(track.nodePathInfo);
|
|
54
|
+
const rowHighlightBackground = (0, TimelineSelection_1.useTimelineRowHighlightBackground)(track.nodePathInfo, hovered);
|
|
53
55
|
const layerStyle = (0, react_1.useMemo)(() => ({
|
|
54
56
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type),
|
|
55
57
|
marginBottom: timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
@@ -58,7 +60,7 @@ const TimelineTrackUnmemoized = ({ track }) => {
|
|
|
58
60
|
const showExpandedKeyframes = track.nodePathInfo !== null &&
|
|
59
61
|
previewServerConnected &&
|
|
60
62
|
getIsExpanded(track.nodePathInfo);
|
|
61
|
-
return (jsx_runtime_1.jsxs("div", { children: [
|
|
63
|
+
return (jsx_runtime_1.jsxs("div", { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: [
|
|
62
64
|
jsx_runtime_1.jsxs("div", { style: layerStyle, children: [rowHighlightBackground && timelineWidth !== null ? (jsx_runtime_1.jsx("div", { style: (0, TimelineSelection_1.getTimelineSelectedTrackHighlightStyle)(timelineWidth, rowHighlightBackground) })) : null, jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence, connectedCompositions: (_a = track.connectedCompositions) !== null && _a !== void 0 ? _a : [], nodePathInfo: track.nodePathInfo, sequenceFrameOffset: track.sequenceFrameOffset })
|
|
63
65
|
] }), showExpandedKeyframes && track.nodePathInfo ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset })) : null] }));
|
|
64
66
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
3
|
export declare const TimelineTracks: React.NamedExoticComponent<{
|
|
4
|
-
readonly timeline:
|
|
4
|
+
readonly timeline: TimelineTrackData[];
|
|
5
5
|
readonly hasBeenCut: boolean;
|
|
6
6
|
}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BORDER_RADIUS_LONGHAND_KEYS, BORDER_RADIUS_SHORTHAND_KEY } from '@remotion/studio-shared';
|
|
2
|
+
import type { CanUpdateSequencePropStatus, DragOverrideValue } from 'remotion';
|
|
3
|
+
export { BORDER_RADIUS_LONGHAND_KEYS, BORDER_RADIUS_SHORTHAND_KEY };
|
|
4
|
+
export type BorderRadiusConversion = {
|
|
5
|
+
readonly type: 'individual';
|
|
6
|
+
readonly value: number;
|
|
7
|
+
} | {
|
|
8
|
+
readonly type: 'shorthand';
|
|
9
|
+
readonly value: number;
|
|
10
|
+
};
|
|
11
|
+
export type BorderRadiusConversionChange = {
|
|
12
|
+
readonly fieldKey: string;
|
|
13
|
+
readonly value: number | undefined;
|
|
14
|
+
};
|
|
15
|
+
export declare const getBorderRadiusConversionChanges: (conversion: BorderRadiusConversion) => BorderRadiusConversionChange[];
|
|
16
|
+
export declare const getBorderRadiusConversion: (props: Record<string, CanUpdateSequencePropStatus> | undefined, dragOverrides?: Record<string, DragOverrideValue>) => BorderRadiusConversion | null;
|