@remotion/studio 4.0.504 → 4.0.506
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.d.ts +2 -3
- package/dist/api/install-package.js +1 -3
- package/dist/api/visual-control.d.ts +3 -0
- package/dist/api/visual-control.js +3 -0
- package/dist/components/AssetSelectorItem.js +3 -3
- package/dist/components/AudioWaveform.d.ts +1 -1
- package/dist/components/AudioWaveform.js +36 -3
- package/dist/components/Canvas.js +2 -0
- package/dist/components/CompositionContextButton.d.ts +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +3 -3
- package/dist/components/CompositionSelectorItem.js +5 -5
- package/dist/components/ConfigureDefaultEditorModal.d.ts +3 -1
- package/dist/components/ConfigureDefaultEditorModal.js +90 -32
- package/dist/components/ConfigureLicenseModal.d.ts +2 -1
- package/dist/components/ConfigureLicenseModal.js +40 -32
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/ContextMenu.d.ts +5 -7
- package/dist/components/ContextMenu.js +54 -21
- package/dist/components/Editor.js +2 -0
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EffectPickerModal.js +3 -3
- package/dist/components/GlobalKeybindings.js +3 -2
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +14 -13
- package/dist/components/InlineCaptionInspector.d.ts +2 -2
- package/dist/components/InlineDropdown.d.ts +4 -2
- package/dist/components/InlineDropdown.js +23 -6
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +33 -9
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -3
- package/dist/components/InspectorPanel/EasingInspector.js +7 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.d.ts +1 -0
- package/dist/components/InspectorPanel/common.js +25 -35
- package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
- package/dist/components/InspectorSequenceSection.js +5 -5
- package/dist/components/InstallPackage.js +1 -1
- package/dist/components/Menu/MenuItem.js +16 -12
- package/dist/components/MenuBuildIndicator.js +12 -58
- package/dist/components/MenuCompositionName.js +3 -63
- package/dist/components/MenuToolbar.js +22 -2
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +6 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/Modals.js +18 -7
- package/dist/components/ModalsProvider.js +5 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -1
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +5 -4
- package/dist/components/NewComposition/MenuContent.d.ts +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +1 -1
- package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
- package/dist/components/OverrideInputProps.js +1 -1
- package/dist/components/PlayPause.js +3 -2
- package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
- package/dist/components/PlaybackRateSelector.js +3 -9
- package/dist/components/PreviewToolbar.js +7 -4
- package/dist/components/PreviewToolbarOverflowButton.js +4 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.d.ts +3 -2
- package/dist/components/RenderButton.js +95 -43
- package/dist/components/RenderModal/RenderStatusModal.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WebRenderModal.js +3 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineElement.js +10 -11
- package/dist/components/SelectedOutlineOverlay.js +67 -20
- package/dist/components/SettingsModal.d.ts +7 -0
- package/dist/components/SettingsModal.js +50 -0
- package/dist/components/SettingsModalFooter.d.ts +4 -0
- package/dist/components/SettingsModalFooter.js +46 -0
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SizeSelector.js +3 -9
- package/dist/components/SvgImportDialog.js +2 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/Timeline.js +5 -4
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +6 -3
- package/dist/components/Timeline/TimelineEffectItem.js +6 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +11 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +32 -1
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +4 -2
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +30 -28
- package/dist/components/Timeline/TimelineList.d.ts +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequence.js +34 -28
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +61 -56
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +39 -6
- package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +2 -2
- package/dist/components/Timeline/TimelineZoomControls.js +39 -12
- package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
- package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +2 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +5 -0
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-height.js +23 -2
- package/dist/components/TimelineCombobox.d.ts +11 -0
- package/dist/components/TimelineCombobox.js +181 -0
- package/dist/components/TimelineInOutToggle.js +5 -1
- package/dist/components/TopPanel.js +22 -7
- package/dist/components/UpdateCheck.js +1 -1
- package/dist/components/effect-drag-and-drop.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +12 -2
- package/dist/components/import-assets.d.ts +18 -6
- package/dist/components/import-assets.js +76 -32
- package/dist/components/selected-outline-types.d.ts +1 -1
- package/dist/esm/{chunk-43m68z1k.js → chunk-b49ec3nz.js} +12436 -11482
- package/dist/esm/internals.mjs +12436 -11482
- package/dist/esm/previewEntry.mjs +9671 -8717
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.d.ts +3 -1
- package/dist/helpers/client-id.js +21 -4
- package/dist/helpers/hoverable.d.ts +11 -0
- package/dist/helpers/hoverable.js +70 -0
- package/dist/helpers/inject-css.js +3 -0
- package/dist/helpers/install-required-package.d.ts +3 -3
- package/dist/helpers/install-required-package.js +1 -6
- package/dist/helpers/studio-fit-padding.d.ts +1 -1
- package/dist/helpers/studio-fit-padding.js +1 -1
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -2
- package/dist/helpers/use-is-fullscreen.d.ts +1 -0
- package/dist/helpers/use-is-fullscreen.js +25 -0
- package/dist/helpers/use-menu-structure.js +26 -43
- package/dist/helpers/use-runtime-values.d.ts +11 -0
- package/dist/helpers/use-runtime-values.js +76 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/apps.js +7 -0
- package/dist/icons/browse-elements.d.ts +4 -0
- package/dist/icons/browse-elements.js +10 -0
- package/dist/icons/canvas-zoom.d.ts +10 -0
- package/dist/icons/canvas-zoom.js +21 -0
- package/dist/icons/playback-rate.d.ts +5 -0
- package/dist/icons/playback-rate.js +31 -0
- package/dist/icons/search.d.ts +5 -0
- package/dist/icons/search.js +10 -0
- package/dist/state/modals.d.ts +5 -6
- package/dist/state/modals.js +5 -3
- package/package.json +12 -12
|
@@ -45,6 +45,7 @@ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
|
45
45
|
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
|
+
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
48
49
|
const modals_1 = require("../../state/modals");
|
|
49
50
|
const timeline_sequence_hover_1 = require("../../state/timeline-sequence-hover");
|
|
50
51
|
const call_api_1 = require("../call-api");
|
|
@@ -61,6 +62,7 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
61
62
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
62
63
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
63
64
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
65
|
+
const imperative_state_1 = require("./imperative-state");
|
|
64
66
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
65
67
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
66
68
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
@@ -173,10 +175,10 @@ const getSequenceReorderDragData = (dataTransfer) => {
|
|
|
173
175
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
174
176
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
175
177
|
};
|
|
176
|
-
const
|
|
177
|
-
var _a, _b
|
|
178
|
-
var
|
|
179
|
-
const nodePath = (
|
|
178
|
+
const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
|
|
179
|
+
var _a, _b;
|
|
180
|
+
var _c, _d;
|
|
181
|
+
const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
|
|
180
182
|
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
|
|
181
183
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
182
184
|
const previewConnected = previewServerState.type === 'connected';
|
|
@@ -184,7 +186,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
184
186
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
185
187
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
186
188
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
187
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
189
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
188
190
|
const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
|
|
189
191
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
190
192
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
@@ -195,7 +197,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
195
197
|
const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
|
|
196
198
|
const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
|
|
197
199
|
const [sequenceDropRejection, setSequenceDropRejection] = (0, react_1.useState)(null);
|
|
198
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
199
200
|
const { canOpenInEditor, editorInfo, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
200
201
|
const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
|
|
201
202
|
location: originalLocation,
|
|
@@ -227,7 +228,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
227
228
|
: displayName;
|
|
228
229
|
const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
|
|
229
230
|
const nodePathKey = (0, react_1.useMemo)(() => nodePath ? remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
|
|
230
|
-
const parentId = (
|
|
231
|
+
const parentId = (_d = sequence.parent) !== null && _d !== void 0 ? _d : null;
|
|
231
232
|
const canReorderSequence = previewInteractive &&
|
|
232
233
|
Boolean(nodePath && nodePathKey && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) &&
|
|
233
234
|
(nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) === 1;
|
|
@@ -469,7 +470,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
469
470
|
sequence.type === 'image'
|
|
470
471
|
? sequence.src
|
|
471
472
|
: null;
|
|
472
|
-
const assetLinkInfo = (0, react_1.useMemo)(() => (mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null), [mediaSrc]);
|
|
473
473
|
const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
|
|
474
474
|
const onToggleExpand = (0, react_1.useCallback)(() => {
|
|
475
475
|
if (nodePathInfo === null) {
|
|
@@ -478,15 +478,14 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
478
478
|
toggleTrack(nodePathInfo);
|
|
479
479
|
}, [nodePathInfo, toggleTrack]);
|
|
480
480
|
const codeHiddenStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.hidden;
|
|
481
|
+
const runtimeHidden = (0, use_runtime_values_1.useRuntimeValue)(sequence.controls, 'hidden');
|
|
481
482
|
const isItemHidden = (0, react_1.useMemo)(() => {
|
|
482
|
-
var _a;
|
|
483
483
|
const propStatus = codeHiddenStatus && codeHiddenStatus.status === 'static'
|
|
484
484
|
? codeHiddenStatus.codeValue
|
|
485
485
|
: undefined;
|
|
486
|
-
const
|
|
487
|
-
const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeValue);
|
|
486
|
+
const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeHidden);
|
|
488
487
|
return effective !== null && effective !== void 0 ? effective : false;
|
|
489
|
-
}, [codeHiddenStatus,
|
|
488
|
+
}, [codeHiddenStatus, runtimeHidden]);
|
|
490
489
|
const onToggleVisibility = (0, react_1.useCallback)((type) => {
|
|
491
490
|
if (!sequence.controls ||
|
|
492
491
|
!nodePath ||
|
|
@@ -573,6 +572,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
573
572
|
}
|
|
574
573
|
e.stopPropagation();
|
|
575
574
|
if (action === 'open-connected-composition') {
|
|
575
|
+
const timelinePosition = (0, imperative_state_1.getCurrentFrame)();
|
|
576
576
|
selectComposition(connectedCompositions[0], true, (0, get_sequence_double_click_action_1.getConnectedCompositionFrame)({
|
|
577
577
|
timelinePosition,
|
|
578
578
|
sequence,
|
|
@@ -588,13 +588,12 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
588
588
|
selectComposition,
|
|
589
589
|
sequence,
|
|
590
590
|
sequenceFrameOffset,
|
|
591
|
-
timelinePosition,
|
|
592
591
|
]);
|
|
593
592
|
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
594
593
|
const canRenameSelectedSequence = canRenameThisSequence &&
|
|
595
594
|
selected &&
|
|
596
595
|
selectedItems.length === 1 &&
|
|
597
|
-
((
|
|
596
|
+
((_a = selectedItems[0]) === null || _a === void 0 ? void 0 : _a.type) === 'sequence';
|
|
598
597
|
const onCancelRenaming = (0, react_1.useCallback)(() => {
|
|
599
598
|
setIsRenaming(false);
|
|
600
599
|
}, []);
|
|
@@ -636,44 +635,26 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
636
635
|
}
|
|
637
636
|
setIsRenaming(true);
|
|
638
637
|
}, [canRenameThisSequence]);
|
|
639
|
-
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.useSequenceFreezeFrameMenuItem)({
|
|
640
|
-
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
641
|
-
? previewServerState.clientId
|
|
642
|
-
: null,
|
|
643
|
-
nodePath,
|
|
644
|
-
propStatusesForOverride,
|
|
645
|
-
sequence,
|
|
646
|
-
sequenceFrameOffset,
|
|
647
|
-
setPropStatuses,
|
|
648
|
-
timelinePosition,
|
|
649
|
-
validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
|
|
650
|
-
});
|
|
651
638
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
652
639
|
previewInteractive &&
|
|
653
640
|
Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
|
|
654
|
-
const canCrop = (0,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
!
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
nodePathInfo,
|
|
672
|
-
previewInteractive,
|
|
673
|
-
propStatusesForOverride,
|
|
674
|
-
sequence.controls,
|
|
675
|
-
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
676
|
-
]);
|
|
641
|
+
const canCrop = (0, use_runtime_values_1.useRuntimeValueSelector)({
|
|
642
|
+
controls: sequence.controls,
|
|
643
|
+
selector: (runtimeValues) => {
|
|
644
|
+
if (!previewInteractive ||
|
|
645
|
+
!sequence.controls ||
|
|
646
|
+
!nodePathInfo ||
|
|
647
|
+
!propStatusesForOverride ||
|
|
648
|
+
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
const activeSchema = remotion_1.Internals.flattenActiveSchema(sequence.controls.schema, (key) => runtimeValues[key]);
|
|
652
|
+
return (0, selected_outline_types_1.canEditSelectedOutlineCrop)({
|
|
653
|
+
schema: activeSchema,
|
|
654
|
+
propStatuses: propStatusesForOverride,
|
|
655
|
+
});
|
|
656
|
+
},
|
|
657
|
+
});
|
|
677
658
|
const onAddEffect = (0, react_1.useCallback)(() => {
|
|
678
659
|
if (!canAddEffect ||
|
|
679
660
|
previewServerState.type !== 'connected' ||
|
|
@@ -707,9 +688,25 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
707
688
|
key: selected_outline_types_1.cropFieldKeys.left,
|
|
708
689
|
}, undefined, undefined, { reveal: true });
|
|
709
690
|
}, [canCrop, nodePathInfo, selectItem]);
|
|
710
|
-
const
|
|
691
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
692
|
+
var _a;
|
|
693
|
+
if (selectable) {
|
|
694
|
+
onSelect({ shiftKey: false, toggleKey: false });
|
|
695
|
+
}
|
|
696
|
+
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
|
|
697
|
+
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
698
|
+
? previewServerState.clientId
|
|
699
|
+
: null,
|
|
700
|
+
nodePath,
|
|
701
|
+
propStatusesForOverride,
|
|
702
|
+
sequence,
|
|
703
|
+
sequenceFrameOffset,
|
|
704
|
+
setPropStatuses,
|
|
705
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
706
|
+
validatedSource: (_a = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _a !== void 0 ? _a : null,
|
|
707
|
+
});
|
|
711
708
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
712
|
-
assetLinkInfo,
|
|
709
|
+
assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
|
|
713
710
|
canOpenInEditor,
|
|
714
711
|
deleteDisabled,
|
|
715
712
|
disableInteractivityDisabled,
|
|
@@ -781,7 +778,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
781
778
|
: [],
|
|
782
779
|
});
|
|
783
780
|
}, [
|
|
784
|
-
assetLinkInfo,
|
|
785
781
|
canAddEffect,
|
|
786
782
|
canCrop,
|
|
787
783
|
canOpenInEditor,
|
|
@@ -791,7 +787,8 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
791
787
|
duplicateDisabled,
|
|
792
788
|
editorInfo,
|
|
793
789
|
fileLocation,
|
|
794
|
-
|
|
790
|
+
mediaSrc,
|
|
791
|
+
nodePath,
|
|
795
792
|
nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
|
|
796
793
|
onAddEffect,
|
|
797
794
|
onCrop,
|
|
@@ -799,15 +796,23 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
799
796
|
onDisableSequenceInteractivity,
|
|
800
797
|
onDuplicateSequenceFromSource,
|
|
801
798
|
onRenameSequence,
|
|
799
|
+
onSelect,
|
|
802
800
|
openInEditor,
|
|
803
801
|
originalLocation,
|
|
802
|
+
previewInteractive,
|
|
803
|
+
previewServerState,
|
|
804
|
+
propStatusesForOverride,
|
|
804
805
|
selectAsset,
|
|
806
|
+
selectable,
|
|
805
807
|
sequence,
|
|
808
|
+
sequenceFrameOffset,
|
|
809
|
+
setPropStatuses,
|
|
810
|
+
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
806
811
|
]);
|
|
807
812
|
const canDropEffect = previewInteractive &&
|
|
808
813
|
nodePath !== null &&
|
|
809
814
|
validatedLocation !== null &&
|
|
810
|
-
((
|
|
815
|
+
((_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.supportsEffects) === true;
|
|
811
816
|
const sequenceReorderLineStyle = (0, react_1.useMemo)(() => {
|
|
812
817
|
if (sequenceDropIndicator !== 'before') {
|
|
813
818
|
return null;
|
|
@@ -870,11 +875,11 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
870
875
|
jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
|
|
871
876
|
] })) : null] }) }));
|
|
872
877
|
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);
|
|
873
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, {
|
|
878
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableTrackRow })) : (draggableTrackRow), previewConnected &&
|
|
874
879
|
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
875
880
|
isExpanded &&
|
|
876
881
|
hasExpandableContent &&
|
|
877
882
|
nodePathInfo &&
|
|
878
883
|
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset })) : null, children, sequenceDropIndicator === 'after' ? (jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLineWrapper, children: jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLine }) })) : null] }));
|
|
879
884
|
};
|
|
880
|
-
exports.TimelineSequenceItem =
|
|
885
|
+
exports.TimelineSequenceItem = react_1.default.memo(TimelineSequenceItemInner);
|
|
@@ -4,14 +4,21 @@ import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-s
|
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
6
6
|
import { type TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
7
|
-
|
|
7
|
+
type TimelineSequenceKeyframedValueBaseProps = {
|
|
8
8
|
readonly field: SchemaFieldInfo;
|
|
9
9
|
readonly fileName: string;
|
|
10
10
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
11
|
readonly schema: InteractivitySchema;
|
|
12
12
|
readonly propStatus: CanUpdateSequencePropStatusKeyframed;
|
|
13
|
+
};
|
|
14
|
+
type TimelineSequenceKeyframedValueProps = TimelineSequenceKeyframedValueBaseProps & ({
|
|
13
15
|
readonly sourceFrame: number;
|
|
14
|
-
|
|
16
|
+
readonly keyframeDisplayOffset?: never;
|
|
17
|
+
} | {
|
|
18
|
+
readonly sourceFrame?: never;
|
|
19
|
+
readonly keyframeDisplayOffset: number;
|
|
20
|
+
});
|
|
21
|
+
export declare const TimelineSequenceKeyframedValue: React.NamedExoticComponent<TimelineSequenceKeyframedValueProps>;
|
|
15
22
|
export declare const TimelineSequencePropItem: React.FC<{
|
|
16
23
|
readonly field: SchemaFieldInfo;
|
|
17
24
|
readonly validatedLocation: CodePosition;
|
|
@@ -22,3 +29,4 @@ export declare const TimelineSequencePropItem: React.FC<{
|
|
|
22
29
|
readonly keyframeDisplayOffset: number;
|
|
23
30
|
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
24
31
|
}>;
|
|
32
|
+
export {};
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
42
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
@@ -132,7 +165,16 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
132
165
|
}, [clearDragOverrides, nodePath]);
|
|
133
166
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
134
167
|
};
|
|
135
|
-
const
|
|
168
|
+
const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStatus, sourceFrame, dragOverrideValue, onSave, onDragValueChangeAtFrame, onDragEnd, }) => {
|
|
169
|
+
const onDragValueChange = (0, react_1.useCallback)((value) => onDragValueChangeAtFrame(value, sourceFrame), [onDragValueChangeAtFrame, sourceFrame]);
|
|
170
|
+
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
171
|
+
};
|
|
172
|
+
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
173
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
174
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: timelinePosition - keyframeDisplayOffset }));
|
|
175
|
+
};
|
|
176
|
+
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
177
|
+
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
136
178
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
137
179
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
138
180
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -158,19 +200,28 @@ const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, pro
|
|
|
158
200
|
clientId,
|
|
159
201
|
});
|
|
160
202
|
}, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
|
|
161
|
-
const
|
|
203
|
+
const onKeyframedDragValueChangeAtFrame = (0, react_1.useCallback)((value, sourceFrame) => {
|
|
162
204
|
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
|
|
163
205
|
status: propStatus,
|
|
164
206
|
frame: sourceFrame,
|
|
165
207
|
value,
|
|
166
208
|
}));
|
|
167
|
-
}, [propStatus, field.key, nodePath, setDragOverrides
|
|
209
|
+
}, [propStatus, field.key, nodePath, setDragOverrides]);
|
|
168
210
|
const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
|
|
169
211
|
clearDragOverrides(nodePath);
|
|
170
212
|
}, [clearDragOverrides, nodePath]);
|
|
171
|
-
|
|
213
|
+
const valueProps = {
|
|
214
|
+
field,
|
|
215
|
+
nodePath,
|
|
216
|
+
propStatus,
|
|
217
|
+
dragOverrideValue,
|
|
218
|
+
onSave: onSaveKeyframed,
|
|
219
|
+
onDragValueChangeAtFrame: onKeyframedDragValueChangeAtFrame,
|
|
220
|
+
onDragEnd: onKeyframedDragEnd,
|
|
221
|
+
};
|
|
222
|
+
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
172
223
|
};
|
|
173
|
-
exports.TimelineSequenceKeyframedValue =
|
|
224
|
+
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
174
225
|
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
175
226
|
var _a;
|
|
176
227
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -178,8 +229,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
178
229
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
179
230
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
180
231
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
181
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
182
|
-
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
183
232
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
184
233
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
185
234
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
@@ -257,7 +306,10 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
257
306
|
validatedLocation.source,
|
|
258
307
|
propStatus,
|
|
259
308
|
]);
|
|
260
|
-
const
|
|
309
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
310
|
+
if (selection.selectable) {
|
|
311
|
+
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
312
|
+
}
|
|
261
313
|
return [
|
|
262
314
|
{
|
|
263
315
|
type: 'item',
|
|
@@ -272,7 +324,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
272
324
|
value: 'reset-sequence-field',
|
|
273
325
|
},
|
|
274
326
|
];
|
|
275
|
-
}, [canShowReset, onReset]);
|
|
327
|
+
}, [canShowReset, onReset, selection]);
|
|
276
328
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
277
329
|
var _a;
|
|
278
330
|
if (!window.remotion_editorName ||
|
|
@@ -288,7 +340,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
288
340
|
if (propStatus === null) {
|
|
289
341
|
return null;
|
|
290
342
|
}
|
|
291
|
-
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus,
|
|
343
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }));
|
|
292
344
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
293
345
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
294
346
|
...inlineSourceFieldRow,
|
|
@@ -297,6 +349,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
297
349
|
}, children: fieldValue }));
|
|
298
350
|
}
|
|
299
351
|
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 }) }));
|
|
300
|
-
return
|
|
352
|
+
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
301
353
|
};
|
|
302
354
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -121,7 +121,7 @@ export declare const getTimelineSequenceFromDragTargets: ({ draggedNodePathInfo,
|
|
|
121
121
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
122
122
|
readonly propStatuses: PropStatuses;
|
|
123
123
|
}) => TimelineSequenceFromDragTarget[] | null;
|
|
124
|
-
export declare const TimelineSequenceLeftEdgeDragHandle: React.
|
|
124
|
+
export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticComponent<{
|
|
125
125
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
126
126
|
readonly windowWidth: number;
|
|
127
127
|
readonly timelineDurationInFrames: number;
|
|
@@ -134,7 +134,7 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
134
134
|
dragging: boolean;
|
|
135
135
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
136
136
|
};
|
|
137
|
-
export declare const TimelineSequenceRightEdgeDragHandle: React.
|
|
137
|
+
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
138
138
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
139
139
|
readonly windowWidth: number;
|
|
140
140
|
readonly timelineDurationInFrames: number;
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragDelta = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = exports.isTimelineSequenceLeftEdgeDraggable = exports.canResizeTimelineSequenceDuration = exports.isTimelineSequenceDurationDraggable = exports.isCascadingSequence = exports.isTransitionSeriesSequence = exports.timelineSequenceFromDragSnapThresholdPx = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const no_react_1 = require("remotion/no-react");
|
|
9
42
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
@@ -162,7 +195,7 @@ const getTrimBeforePlaybackRate = (sequence) => {
|
|
|
162
195
|
!playbackRateComponentIdentities.has(componentIdentity)) {
|
|
163
196
|
return 1;
|
|
164
197
|
}
|
|
165
|
-
const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.
|
|
198
|
+
const runtimePlaybackRate = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.runtimeValues.getSnapshot().playbackRate;
|
|
166
199
|
return typeof runtimePlaybackRate === 'number' ? runtimePlaybackRate : 1;
|
|
167
200
|
};
|
|
168
201
|
const isFromDraggableSequence = (sequence) => {
|
|
@@ -531,7 +564,7 @@ const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides,
|
|
|
531
564
|
}
|
|
532
565
|
}
|
|
533
566
|
};
|
|
534
|
-
const
|
|
567
|
+
const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
535
568
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
536
569
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
537
570
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -721,7 +754,7 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
721
754
|
};
|
|
722
755
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
|
|
723
756
|
};
|
|
724
|
-
exports.TimelineSequenceLeftEdgeDragHandle =
|
|
757
|
+
exports.TimelineSequenceLeftEdgeDragHandle = react_1.default.memo(TimelineSequenceLeftEdgeDragHandleInner);
|
|
725
758
|
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
|
|
726
759
|
const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
727
760
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
@@ -944,7 +977,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
944
977
|
};
|
|
945
978
|
};
|
|
946
979
|
exports.useTimelineSequenceFromDrag = useTimelineSequenceFromDrag;
|
|
947
|
-
const
|
|
980
|
+
const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
948
981
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
949
982
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
950
983
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -1128,4 +1161,4 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
1128
1161
|
};
|
|
1129
1162
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to change duration", style: style, onPointerDown: onPointerDown }));
|
|
1130
1163
|
};
|
|
1131
|
-
exports.TimelineSequenceRightEdgeDragHandle =
|
|
1164
|
+
exports.TimelineSequenceRightEdgeDragHandle = react_1.default.memo(TimelineSequenceRightEdgeDragHandleInner);
|
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineTimeIndicators = exports.getTimelineTickScale = exports.getNiceSecondInterval = exports.TimelineTimePadding = exports.TimelineTimePlaceholders = exports.TIMELINE_TIME_INDICATOR_HEIGHT = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const remotion_1 = require("remotion");
|
|
7
40
|
const colors_1 = require("../../helpers/colors");
|
|
8
41
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -171,7 +204,7 @@ const TimelineTimeIndicators = () => {
|
|
|
171
204
|
return (jsx_runtime_1.jsx(TimelineTimeIndicatorsInner, { durationInFrames: video.durationInFrames, fps: video.fps, windowWidth: sliderTrack }));
|
|
172
205
|
};
|
|
173
206
|
exports.TimelineTimeIndicators = TimelineTimeIndicators;
|
|
174
|
-
const TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
207
|
+
const TimelineTimeIndicatorsInner = react_1.default.memo(({ windowWidth, durationInFrames, fps }) => {
|
|
175
208
|
const ref = (0, react_1.useRef)(null);
|
|
176
209
|
(0, react_1.useEffect)(() => {
|
|
177
210
|
const currentRef = ref.current;
|
|
@@ -271,4 +304,4 @@ const TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) =>
|
|
|
271
304
|
return (jsx_runtime_1.jsx("div", { ref: ref, style: style, children: ticks.map((t) => {
|
|
272
305
|
return (jsx_runtime_1.jsx("div", { style: t.style, children: t.showTime ? (jsx_runtime_1.jsx("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame, fps) })) : null }, t.frame));
|
|
273
306
|
}) }));
|
|
274
|
-
};
|
|
307
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LoopDisplay } from 'remotion';
|
|
3
|
-
export declare const TimelineVideoInfo: React.
|
|
3
|
+
export declare const TimelineVideoInfo: React.NamedExoticComponent<{
|
|
4
4
|
readonly src: string;
|
|
5
5
|
readonly visualizationWidth: number;
|
|
6
6
|
readonly naturalWidth: number;
|