@remotion/studio 4.0.515 → 4.0.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +3 -9
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +7 -4
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +139 -46
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +3 -2
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +14 -7
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
- package/dist/components/InspectorPanel/common.d.ts +0 -12
- package/dist/components/InspectorPanel/common.js +3 -52
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InstallPackage.d.ts +2 -1
- package/dist/components/InstallPackage.js +60 -30
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +6 -5
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PreviewToolbar.js +5 -2
- package/dist/components/PreviewToolbarOverflowButton.js +30 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RenderButton.js +66 -183
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
- package/dist/components/RulersAndGuidesToggle.js +23 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +3 -4
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.js +2 -1
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +0 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +23 -10
- package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowChrome.js +3 -4
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.js +1 -1
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.js +5 -5
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +1 -4
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +1 -1
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
- package/dist/esm/{chunk-v5a8vpv4.js → chunk-w4244j4n.js} +17766 -17618
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +17765 -17617
- package/dist/esm/previewEntry.mjs +17570 -17422
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/calculate-timeline.js +2 -1
- package/dist/helpers/colors.d.ts +2 -0
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/get-asset-metadata.js +25 -16
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +3 -1
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +12 -5
- package/dist/helpers/use-menu-structure.js +32 -32
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/modals.d.ts +2 -5
- package/package.json +12 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -663,7 +663,7 @@ const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides,
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
|
-
const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
666
|
+
const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames, onDragEnd }) => {
|
|
667
667
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
668
668
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
669
669
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -679,6 +679,7 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
679
679
|
clearDragOverrides,
|
|
680
680
|
previewServerState,
|
|
681
681
|
overrideIdToNodePathMappings,
|
|
682
|
+
onDragEnd,
|
|
682
683
|
});
|
|
683
684
|
latestRef.current = {
|
|
684
685
|
nodePathInfo,
|
|
@@ -687,6 +688,7 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
687
688
|
clearDragOverrides,
|
|
688
689
|
previewServerState,
|
|
689
690
|
overrideIdToNodePathMappings,
|
|
691
|
+
onDragEnd,
|
|
690
692
|
};
|
|
691
693
|
const finishDrag = (0, react_1.useCallback)((commit) => {
|
|
692
694
|
const dragState = dragStateRef.current;
|
|
@@ -694,6 +696,7 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
694
696
|
return;
|
|
695
697
|
}
|
|
696
698
|
dragStateRef.current = null;
|
|
699
|
+
latestRef.current.onDragEnd(dragState.didMove);
|
|
697
700
|
document.body.style.userSelect = '';
|
|
698
701
|
document.body.style.webkitUserSelect = '';
|
|
699
702
|
(0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
|
|
@@ -764,6 +767,7 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
764
767
|
dragStateRef.current = {
|
|
765
768
|
initialClientX: e.clientX,
|
|
766
769
|
latestDeltaFrames: 0,
|
|
770
|
+
didMove: false,
|
|
767
771
|
pxPerFrame,
|
|
768
772
|
pointerId: e.pointerId,
|
|
769
773
|
button: e.button,
|
|
@@ -794,6 +798,9 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
794
798
|
const dx = e.clientX - dragState.initialClientX;
|
|
795
799
|
const deltaFrames = Math.round(dx / dragState.pxPerFrame);
|
|
796
800
|
dragState.latestDeltaFrames = deltaFrames;
|
|
801
|
+
if (deltaFrames !== 0) {
|
|
802
|
+
dragState.didMove = true;
|
|
803
|
+
}
|
|
797
804
|
for (const target of dragState.targets) {
|
|
798
805
|
const nextValues = (0, exports.getTimelineSequenceLeftEdgeDragValues)({
|
|
799
806
|
initialDuration: target.initialDuration,
|
|
@@ -854,7 +861,7 @@ const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, ti
|
|
|
854
861
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
|
|
855
862
|
};
|
|
856
863
|
exports.TimelineSequenceLeftEdgeDragHandle = react_1.default.memo(TimelineSequenceLeftEdgeDragHandleInner);
|
|
857
|
-
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
|
|
864
|
+
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, onDragEnd, }) => {
|
|
858
865
|
const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
859
866
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
860
867
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -862,7 +869,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
862
869
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
863
870
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
864
871
|
const { editorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
865
|
-
const
|
|
872
|
+
const stopPointerSessionRef = (0, react_1.useRef)(null);
|
|
866
873
|
const dragStateRef = (0, react_1.useRef)(null);
|
|
867
874
|
const latestRef = (0, react_1.useRef)({
|
|
868
875
|
nodePathInfo,
|
|
@@ -874,6 +881,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
874
881
|
previewServerState,
|
|
875
882
|
overrideIdToNodePathMappings,
|
|
876
883
|
editorSnapping,
|
|
884
|
+
onDragEnd,
|
|
877
885
|
});
|
|
878
886
|
latestRef.current = {
|
|
879
887
|
nodePathInfo,
|
|
@@ -885,6 +893,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
885
893
|
previewServerState,
|
|
886
894
|
overrideIdToNodePathMappings,
|
|
887
895
|
editorSnapping,
|
|
896
|
+
onDragEnd,
|
|
888
897
|
};
|
|
889
898
|
const finishDrag = (0, react_1.useCallback)((commit) => {
|
|
890
899
|
const dragState = dragStateRef.current;
|
|
@@ -892,9 +901,9 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
892
901
|
return;
|
|
893
902
|
}
|
|
894
903
|
dragStateRef.current = null;
|
|
904
|
+
latestRef.current.onDragEnd(dragState.didMove);
|
|
895
905
|
document.body.style.userSelect = '';
|
|
896
906
|
document.body.style.webkitUserSelect = '';
|
|
897
|
-
setDragging(false);
|
|
898
907
|
const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, clearEffectDragOverrides: latestClearEffect, previewServerState: latestServerState, } = latestRef.current;
|
|
899
908
|
const changes = (0, exports.getTimelineSequenceFromDragChanges)({
|
|
900
909
|
targets: dragState.targets,
|
|
@@ -945,7 +954,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
945
954
|
});
|
|
946
955
|
}, []);
|
|
947
956
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
948
|
-
var _a
|
|
957
|
+
var _a;
|
|
949
958
|
if (e.button !== 0) {
|
|
950
959
|
return;
|
|
951
960
|
}
|
|
@@ -970,115 +979,93 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
970
979
|
if (targets === null || targets.length === 0) {
|
|
971
980
|
return;
|
|
972
981
|
}
|
|
982
|
+
(_a = stopPointerSessionRef.current) === null || _a === void 0 ? void 0 : _a.call(stopPointerSessionRef);
|
|
973
983
|
e.preventDefault();
|
|
974
984
|
dragStateRef.current = {
|
|
975
985
|
initialClientX: e.clientX,
|
|
976
986
|
latestDeltaFrames: 0,
|
|
987
|
+
didMove: false,
|
|
977
988
|
pxPerFrame,
|
|
978
|
-
pointerId: e.pointerId,
|
|
979
|
-
button: e.button,
|
|
980
|
-
target: e.currentTarget,
|
|
981
989
|
targets,
|
|
982
990
|
};
|
|
983
|
-
(_b = (_a = e.currentTarget).setPointerCapture) === null || _b === void 0 ? void 0 : _b.call(_a, e.pointerId);
|
|
984
991
|
document.body.style.userSelect = 'none';
|
|
985
992
|
document.body.style.webkitUserSelect = 'none';
|
|
986
|
-
|
|
993
|
+
// Register before React commits so no pointer move can arrive before
|
|
994
|
+
// the global session listeners exist.
|
|
995
|
+
stopPointerSessionRef.current = (0, pointer_session_1.startCapturedPointerSession)({
|
|
996
|
+
event: e.nativeEvent,
|
|
997
|
+
captureTarget: e.currentTarget,
|
|
998
|
+
onMove: (moveEvent) => {
|
|
999
|
+
const dragState = dragStateRef.current;
|
|
1000
|
+
if (!dragState) {
|
|
1001
|
+
return;
|
|
1002
|
+
}
|
|
1003
|
+
const dx = moveEvent.clientX - dragState.initialClientX;
|
|
1004
|
+
const deltaFrames = (0, exports.getTimelineSequenceFromDragDelta)({
|
|
1005
|
+
deltaFrames: Math.round(dx / dragState.pxPerFrame),
|
|
1006
|
+
pxPerFrame: dragState.pxPerFrame,
|
|
1007
|
+
snappingEnabled: latestRef.current.editorSnapping,
|
|
1008
|
+
targets: dragState.targets,
|
|
1009
|
+
});
|
|
1010
|
+
dragState.latestDeltaFrames = deltaFrames;
|
|
1011
|
+
if (deltaFrames !== 0) {
|
|
1012
|
+
dragState.didMove = true;
|
|
1013
|
+
}
|
|
1014
|
+
for (const target of dragState.targets) {
|
|
1015
|
+
const nextFrom = (0, exports.getTimelineSequenceFromDragValue)({
|
|
1016
|
+
initialFrom: target.initialFrom,
|
|
1017
|
+
deltaFrames,
|
|
1018
|
+
});
|
|
1019
|
+
latestRef.current.setDragOverrides(target.nodePath, 'from', remotion_1.Internals.makeStaticDragOverride(nextFrom));
|
|
1020
|
+
for (const keyframeTarget of target.sequenceKeyframes) {
|
|
1021
|
+
latestRef.current.setDragOverrides(keyframeTarget.nodePath, keyframeTarget.fieldKey, {
|
|
1022
|
+
type: 'keyframed',
|
|
1023
|
+
status: shiftKeyframedStatus({
|
|
1024
|
+
status: keyframeTarget.status,
|
|
1025
|
+
deltaFrames,
|
|
1026
|
+
isDescendant: keyframeTarget.isDescendant,
|
|
1027
|
+
}),
|
|
1028
|
+
});
|
|
1029
|
+
}
|
|
1030
|
+
for (const keyframeTarget of target.effectKeyframes) {
|
|
1031
|
+
latestRef.current.setEffectDragOverrides(keyframeTarget.nodePath, keyframeTarget.effectIndex, keyframeTarget.fieldKey, {
|
|
1032
|
+
type: 'keyframed',
|
|
1033
|
+
status: shiftKeyframedStatus({
|
|
1034
|
+
status: keyframeTarget.status,
|
|
1035
|
+
deltaFrames,
|
|
1036
|
+
isDescendant: keyframeTarget.isDescendant,
|
|
1037
|
+
}),
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
onEnd: (reason, endEvent) => {
|
|
1043
|
+
stopPointerSessionRef.current = null;
|
|
1044
|
+
finishDrag((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
1045
|
+
endEvent !== null);
|
|
1046
|
+
},
|
|
1047
|
+
});
|
|
987
1048
|
}, [
|
|
988
1049
|
currentSelection,
|
|
1050
|
+
finishDrag,
|
|
989
1051
|
propStatusesRef,
|
|
990
1052
|
sequencesRef,
|
|
991
1053
|
timelineDurationInFrames,
|
|
992
1054
|
windowWidth,
|
|
993
1055
|
]);
|
|
994
1056
|
(0, react_1.useEffect)(() => {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
const dragState = dragStateRef.current;
|
|
1000
|
-
if (!dragState || e.pointerId !== dragState.pointerId) {
|
|
1001
|
-
return;
|
|
1002
|
-
}
|
|
1003
|
-
const dx = e.clientX - dragState.initialClientX;
|
|
1004
|
-
const deltaFrames = (0, exports.getTimelineSequenceFromDragDelta)({
|
|
1005
|
-
deltaFrames: Math.round(dx / dragState.pxPerFrame),
|
|
1006
|
-
pxPerFrame: dragState.pxPerFrame,
|
|
1007
|
-
snappingEnabled: latestRef.current.editorSnapping,
|
|
1008
|
-
targets: dragState.targets,
|
|
1009
|
-
});
|
|
1010
|
-
dragState.latestDeltaFrames = deltaFrames;
|
|
1011
|
-
for (const target of dragState.targets) {
|
|
1012
|
-
const nextFrom = (0, exports.getTimelineSequenceFromDragValue)({
|
|
1013
|
-
initialFrom: target.initialFrom,
|
|
1014
|
-
deltaFrames,
|
|
1015
|
-
});
|
|
1016
|
-
latestRef.current.setDragOverrides(target.nodePath, 'from', remotion_1.Internals.makeStaticDragOverride(nextFrom));
|
|
1017
|
-
for (const keyframeTarget of target.sequenceKeyframes) {
|
|
1018
|
-
latestRef.current.setDragOverrides(keyframeTarget.nodePath, keyframeTarget.fieldKey, {
|
|
1019
|
-
type: 'keyframed',
|
|
1020
|
-
status: shiftKeyframedStatus({
|
|
1021
|
-
status: keyframeTarget.status,
|
|
1022
|
-
deltaFrames,
|
|
1023
|
-
isDescendant: keyframeTarget.isDescendant,
|
|
1024
|
-
}),
|
|
1025
|
-
});
|
|
1026
|
-
}
|
|
1027
|
-
for (const keyframeTarget of target.effectKeyframes) {
|
|
1028
|
-
latestRef.current.setEffectDragOverrides(keyframeTarget.nodePath, keyframeTarget.effectIndex, keyframeTarget.fieldKey, {
|
|
1029
|
-
type: 'keyframed',
|
|
1030
|
-
status: shiftKeyframedStatus({
|
|
1031
|
-
status: keyframeTarget.status,
|
|
1032
|
-
deltaFrames,
|
|
1033
|
-
isDescendant: keyframeTarget.isDescendant,
|
|
1034
|
-
}),
|
|
1035
|
-
});
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
};
|
|
1039
|
-
const onUp = (e) => {
|
|
1040
|
-
const dragState = dragStateRef.current;
|
|
1041
|
-
if (!dragState || e.pointerId !== dragState.pointerId) {
|
|
1042
|
-
return;
|
|
1043
|
-
}
|
|
1044
|
-
finishDrag(true);
|
|
1045
|
-
};
|
|
1046
|
-
const onCancel = (e) => {
|
|
1047
|
-
const dragState = dragStateRef.current;
|
|
1048
|
-
if (!dragState || e.pointerId !== dragState.pointerId) {
|
|
1049
|
-
return;
|
|
1050
|
-
}
|
|
1051
|
-
finishDrag(false);
|
|
1057
|
+
return () => {
|
|
1058
|
+
var _a;
|
|
1059
|
+
(_a = stopPointerSessionRef.current) === null || _a === void 0 ? void 0 : _a.call(stopPointerSessionRef);
|
|
1060
|
+
stopPointerSessionRef.current = null;
|
|
1052
1061
|
};
|
|
1053
|
-
|
|
1054
|
-
if (!activeDragState) {
|
|
1055
|
-
return;
|
|
1056
|
-
}
|
|
1057
|
-
return (0, pointer_session_1.startCapturedPointerSession)({
|
|
1058
|
-
event: activeDragState,
|
|
1059
|
-
captureTarget: activeDragState.target,
|
|
1060
|
-
onMove,
|
|
1061
|
-
onEnd: (reason, endEvent) => {
|
|
1062
|
-
if ((reason === 'pointerup' || reason === 'buttons-released') &&
|
|
1063
|
-
endEvent) {
|
|
1064
|
-
onUp(endEvent);
|
|
1065
|
-
}
|
|
1066
|
-
else if (endEvent) {
|
|
1067
|
-
onCancel(endEvent);
|
|
1068
|
-
}
|
|
1069
|
-
else {
|
|
1070
|
-
finishDrag(false);
|
|
1071
|
-
}
|
|
1072
|
-
},
|
|
1073
|
-
});
|
|
1074
|
-
}, [dragging, finishDrag]);
|
|
1062
|
+
}, []);
|
|
1075
1063
|
return {
|
|
1076
|
-
dragging,
|
|
1077
1064
|
onPointerDown,
|
|
1078
1065
|
};
|
|
1079
1066
|
};
|
|
1080
1067
|
exports.useTimelineSequenceFromDrag = useTimelineSequenceFromDrag;
|
|
1081
|
-
const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
1068
|
+
const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames, onDragEnd }) => {
|
|
1082
1069
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
1083
1070
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
1084
1071
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -1095,6 +1082,7 @@ const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, t
|
|
|
1095
1082
|
clearDragOverrides,
|
|
1096
1083
|
previewServerState,
|
|
1097
1084
|
overrideIdToNodePathMappings,
|
|
1085
|
+
onDragEnd,
|
|
1098
1086
|
});
|
|
1099
1087
|
latestRef.current = {
|
|
1100
1088
|
nodePathInfo,
|
|
@@ -1103,6 +1091,7 @@ const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, t
|
|
|
1103
1091
|
clearDragOverrides,
|
|
1104
1092
|
previewServerState,
|
|
1105
1093
|
overrideIdToNodePathMappings,
|
|
1094
|
+
onDragEnd,
|
|
1106
1095
|
};
|
|
1107
1096
|
const finishDrag = (0, react_1.useCallback)((commit) => {
|
|
1108
1097
|
const dragState = dragStateRef.current;
|
|
@@ -1110,6 +1099,7 @@ const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, t
|
|
|
1110
1099
|
return;
|
|
1111
1100
|
}
|
|
1112
1101
|
dragStateRef.current = null;
|
|
1102
|
+
latestRef.current.onDragEnd(dragState.didMove);
|
|
1113
1103
|
document.body.style.userSelect = '';
|
|
1114
1104
|
document.body.style.webkitUserSelect = '';
|
|
1115
1105
|
(0, ForceSpecificCursor_1.stopForcingSpecificCursor)();
|
|
@@ -1178,6 +1168,7 @@ const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, t
|
|
|
1178
1168
|
dragStateRef.current = {
|
|
1179
1169
|
initialClientX: e.clientX,
|
|
1180
1170
|
latestDeltaFrames: 0,
|
|
1171
|
+
didMove: false,
|
|
1181
1172
|
pxPerFrame,
|
|
1182
1173
|
pointerId: e.pointerId,
|
|
1183
1174
|
button: e.button,
|
|
@@ -1211,6 +1202,9 @@ const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, t
|
|
|
1211
1202
|
const dx = e.clientX - dragState.initialClientX;
|
|
1212
1203
|
const deltaFrames = Math.round(dx / dragState.pxPerFrame);
|
|
1213
1204
|
dragState.latestDeltaFrames = deltaFrames;
|
|
1205
|
+
if (deltaFrames !== 0) {
|
|
1206
|
+
dragState.didMove = true;
|
|
1207
|
+
}
|
|
1214
1208
|
for (const target of dragState.targets) {
|
|
1215
1209
|
latestRef.current.setDragOverrides(target.nodePath, 'durationInFrames', remotion_1.Internals.makeStaticDragOverride((0, exports.getTimelineSequenceDurationDragValue)({
|
|
1216
1210
|
initialDuration: target.initialDuration,
|
|
@@ -65,7 +65,7 @@ const TimelineTrackUnmemoized = ({ track }) => {
|
|
|
65
65
|
previewServerConnected &&
|
|
66
66
|
getIsExpanded(track.nodePathInfo);
|
|
67
67
|
return (jsx_runtime_1.jsxs("div", { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: [
|
|
68
|
-
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 : emptyConnectedCompositions, nodePathInfo: track.nodePathInfo, sequenceFrameOffset: track.sequenceFrameOffset })
|
|
68
|
+
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, cascadedStart: track.cascadedStart, localStart: track.localStart, connectedCompositions: (_a = track.connectedCompositions) !== null && _a !== void 0 ? _a : emptyConnectedCompositions, nodePathInfo: track.nodePathInfo, sequenceFrameOffset: track.sequenceFrameOffset })
|
|
69
69
|
] }), showExpandedKeyframes && track.nodePathInfo ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset })) : null] }));
|
|
70
70
|
};
|
|
71
71
|
exports.TimelineTrack = react_1.default.memo(TimelineTrackUnmemoized);
|
|
@@ -10,14 +10,10 @@ const TimelineSchemaField_1 = require("./TimelineSchemaField");
|
|
|
10
10
|
const transform_origin_utils_1 = require("./transform-origin-utils");
|
|
11
11
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
12
12
|
const leftDraggerStyle = {
|
|
13
|
-
paddingBottom: 2,
|
|
14
13
|
paddingLeft: 0,
|
|
15
|
-
paddingTop: 2,
|
|
16
14
|
};
|
|
17
15
|
const rightDraggerStyle = {
|
|
18
|
-
paddingBottom: 2,
|
|
19
16
|
paddingRight: 0,
|
|
20
|
-
paddingTop: 2,
|
|
21
17
|
};
|
|
22
18
|
const containerStyle = {
|
|
23
19
|
display: 'flex',
|
|
@@ -9,14 +9,10 @@ const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
|
9
9
|
const timeline_translate_utils_1 = require("./timeline-translate-utils");
|
|
10
10
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
11
11
|
const leftDraggerStyle = {
|
|
12
|
-
paddingBottom: 2,
|
|
13
12
|
paddingLeft: 0,
|
|
14
|
-
paddingTop: 2,
|
|
15
13
|
};
|
|
16
14
|
const rightDraggerStyle = {
|
|
17
|
-
paddingBottom: 2,
|
|
18
15
|
paddingRight: 0,
|
|
19
|
-
paddingTop: 2,
|
|
20
16
|
};
|
|
21
17
|
const containerStyle = {
|
|
22
18
|
display: 'flex',
|
|
@@ -115,12 +115,14 @@ const TimelineVirtualizationProvider = ({ children, hasBeenCut, isStill, timelin
|
|
|
115
115
|
virtualizer.measure();
|
|
116
116
|
}, [trackHeights, virtualizer]);
|
|
117
117
|
(0, react_1.useEffect)(() => {
|
|
118
|
+
var _a;
|
|
118
119
|
if (revealRequest === null) {
|
|
119
120
|
return;
|
|
120
121
|
}
|
|
121
122
|
const key = getSelectionTrackKey(revealRequest.item);
|
|
122
123
|
const index = key === null ? undefined : layout.rootTrackIndexes.get(key);
|
|
123
|
-
if (index !== undefined
|
|
124
|
+
if (index !== undefined &&
|
|
125
|
+
((_a = virtualizer.getOffsetForIndex(index, 'auto')) === null || _a === void 0 ? void 0 : _a[1]) !== 'auto') {
|
|
124
126
|
virtualizer.scrollToIndex(index, { align: 'center' });
|
|
125
127
|
}
|
|
126
128
|
}, [layout.rootTrackIndexes, revealRequest, virtualizer]);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.duplicateSelectedTimelineItems = exports.isDuplicatableEffectSelection = exports.isDuplicatableSequenceRowSelection = exports.duplicateSequencesFromSource = void 0;
|
|
4
4
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
5
|
-
const
|
|
5
|
+
const duplicate_jsx_node_api_1 = require("../duplicate-jsx-node-api");
|
|
6
6
|
const effect_operations_api_1 = require("../effect-operations-api");
|
|
7
7
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
8
|
const confirmDuplicatingProgrammaticallyDuplicatedSequences = (nodePathInfos, confirm) => {
|
|
@@ -28,7 +28,7 @@ const confirmDuplicatingProgrammaticallyDuplicatedSequences = (nodePathInfos, co
|
|
|
28
28
|
};
|
|
29
29
|
const duplicateSequence = (nodePathInfo) => {
|
|
30
30
|
const nodePath = nodePathInfo.sequenceSubscriptionKey;
|
|
31
|
-
return (0,
|
|
31
|
+
return (0, duplicate_jsx_node_api_1.duplicateJsxNode)({
|
|
32
32
|
fileName: nodePath.absolutePath,
|
|
33
33
|
nodePath: nodePath.nodePath,
|
|
34
34
|
});
|
|
@@ -49,11 +49,7 @@ const duplicateSequencesFromSource = (nodePathInfos, confirm) => {
|
|
|
49
49
|
const failedResult = results.find((result) => !result.success);
|
|
50
50
|
if (failedResult && !failedResult.success) {
|
|
51
51
|
(0, NotificationCenter_1.showNotification)(failedResult.reason, 4000);
|
|
52
|
-
return;
|
|
53
52
|
}
|
|
54
|
-
(0, NotificationCenter_1.showNotification)(toDuplicate.length === 1
|
|
55
|
-
? 'Duplicated sequence in source file'
|
|
56
|
-
: 'Duplicated sequences in source files', 2000);
|
|
57
53
|
})
|
|
58
54
|
.catch((err) => {
|
|
59
55
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
@@ -75,12 +71,7 @@ const duplicateEffectsFromSource = (effects) => {
|
|
|
75
71
|
};
|
|
76
72
|
}))
|
|
77
73
|
.then((result) => {
|
|
78
|
-
if (result.success) {
|
|
79
|
-
(0, NotificationCenter_1.showNotification)(effects.length === 1
|
|
80
|
-
? 'Duplicated effect in source file'
|
|
81
|
-
: 'Duplicated effects in source files', 2000);
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
74
|
+
if (!result.success) {
|
|
84
75
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
85
76
|
}
|
|
86
77
|
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCopyContextForAgentsMenuItem = void 0;
|
|
4
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
5
|
+
const getCopyContextForAgentsMenuItem = ({ contextForAgents, }) => {
|
|
6
|
+
return {
|
|
7
|
+
type: 'item',
|
|
8
|
+
id: 'copy-context-for-agents',
|
|
9
|
+
keyHint: null,
|
|
10
|
+
label: 'Copy context for agents',
|
|
11
|
+
leftItem: null,
|
|
12
|
+
disabled: !contextForAgents,
|
|
13
|
+
onClick: () => {
|
|
14
|
+
if (!contextForAgents) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
navigator.clipboard.writeText(contextForAgents).catch((err) => {
|
|
18
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
quickSwitcherLabel: null,
|
|
22
|
+
subMenu: null,
|
|
23
|
+
value: 'copy-context-for-agents',
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
exports.getCopyContextForAgentsMenuItem = getCopyContextForAgentsMenuItem;
|
|
@@ -7,6 +7,7 @@ const get_open_in_menu_items_1 = require("../get-open-in-menu-items");
|
|
|
7
7
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
8
|
const actions_1 = require("../RenderQueue/actions");
|
|
9
9
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
10
|
+
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
10
11
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
11
12
|
const normalizeMenuDividers = (items) => {
|
|
12
13
|
var _a;
|
|
@@ -115,25 +116,7 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
|
|
|
115
116
|
value: 'open-in-another-app',
|
|
116
117
|
}
|
|
117
118
|
: null,
|
|
118
|
-
{
|
|
119
|
-
type: 'item',
|
|
120
|
-
id: 'copy-context-for-agents',
|
|
121
|
-
keyHint: null,
|
|
122
|
-
label: 'Copy context for agents',
|
|
123
|
-
leftItem: null,
|
|
124
|
-
disabled: !contextForAgents,
|
|
125
|
-
onClick: () => {
|
|
126
|
-
if (!contextForAgents) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
navigator.clipboard.writeText(contextForAgents).catch((err) => {
|
|
130
|
-
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
quickSwitcherLabel: null,
|
|
134
|
-
subMenu: null,
|
|
135
|
-
value: 'copy-context-for-agents',
|
|
136
|
-
},
|
|
119
|
+
(0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({ contextForAgents }),
|
|
137
120
|
assetLinkInfo
|
|
138
121
|
? {
|
|
139
122
|
type: 'item',
|
|
@@ -4,6 +4,10 @@ type TimelineSequenceVisibleLayout = {
|
|
|
4
4
|
readonly cropLeft: number;
|
|
5
5
|
readonly leftEdgeVisible: boolean;
|
|
6
6
|
readonly rightEdgeVisible: boolean;
|
|
7
|
+
readonly negativeStart: {
|
|
8
|
+
readonly left: number;
|
|
9
|
+
readonly width: number;
|
|
10
|
+
} | null;
|
|
7
11
|
readonly premount: {
|
|
8
12
|
readonly left: number;
|
|
9
13
|
readonly width: number;
|
|
@@ -19,9 +23,10 @@ type TimelineSequenceVisibleLayout = {
|
|
|
19
23
|
readonly fullWidth: number;
|
|
20
24
|
} | null;
|
|
21
25
|
};
|
|
22
|
-
export declare const getTimelineSequenceVisibleLayout: ({ marginLeft, width, premountWidth, postmountWidth, renderWindowLeft, renderWindowWidth, }: {
|
|
26
|
+
export declare const getTimelineSequenceVisibleLayout: ({ marginLeft, width, negativeStartWidth, premountWidth, postmountWidth, renderWindowLeft, renderWindowWidth, }: {
|
|
23
27
|
readonly marginLeft: number;
|
|
24
28
|
readonly width: number;
|
|
29
|
+
readonly negativeStartWidth: number;
|
|
25
30
|
readonly premountWidth: number;
|
|
26
31
|
readonly postmountWidth: number;
|
|
27
32
|
readonly renderWindowLeft: number;
|
|
@@ -12,7 +12,7 @@ const getVisibleSection = ({ sectionStart, sectionEnd, cropStart, cropEnd, }) =>
|
|
|
12
12
|
width: end - start,
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
const getTimelineSequenceVisibleLayout = ({ marginLeft, width, premountWidth, postmountWidth, renderWindowLeft, renderWindowWidth, }) => {
|
|
15
|
+
const getTimelineSequenceVisibleLayout = ({ marginLeft, width, negativeStartWidth, premountWidth, postmountWidth, renderWindowLeft, renderWindowWidth, }) => {
|
|
16
16
|
const itemStart = marginLeft;
|
|
17
17
|
const itemEnd = marginLeft + width;
|
|
18
18
|
const renderWindowEnd = renderWindowLeft + renderWindowWidth;
|
|
@@ -23,7 +23,8 @@ const getTimelineSequenceVisibleLayout = ({ marginLeft, width, premountWidth, po
|
|
|
23
23
|
}
|
|
24
24
|
const cropStart = visibleStart - itemStart;
|
|
25
25
|
const cropEnd = visibleEnd - itemStart;
|
|
26
|
-
const
|
|
26
|
+
const premountStart = negativeStartWidth;
|
|
27
|
+
const mediaStart = negativeStartWidth + premountWidth;
|
|
27
28
|
const mediaEnd = Math.max(mediaStart, width - postmountWidth);
|
|
28
29
|
const media = getVisibleSection({
|
|
29
30
|
sectionStart: mediaStart,
|
|
@@ -37,9 +38,15 @@ const getTimelineSequenceVisibleLayout = ({ marginLeft, width, premountWidth, po
|
|
|
37
38
|
cropLeft: cropStart,
|
|
38
39
|
leftEdgeVisible: visibleStart === itemStart,
|
|
39
40
|
rightEdgeVisible: visibleEnd === itemEnd,
|
|
40
|
-
|
|
41
|
+
negativeStart: getVisibleSection({
|
|
41
42
|
sectionStart: 0,
|
|
42
|
-
sectionEnd:
|
|
43
|
+
sectionEnd: negativeStartWidth,
|
|
44
|
+
cropStart,
|
|
45
|
+
cropEnd,
|
|
46
|
+
}),
|
|
47
|
+
premount: getVisibleSection({
|
|
48
|
+
sectionStart: premountStart,
|
|
49
|
+
sectionEnd: premountStart + premountWidth,
|
|
43
50
|
cropStart,
|
|
44
51
|
cropEnd,
|
|
45
52
|
}),
|
|
@@ -97,7 +97,6 @@ const splitTimelineSequenceFromSource = ({ nodePathInfo, splitFrame, }) => {
|
|
|
97
97
|
})
|
|
98
98
|
.then((result) => {
|
|
99
99
|
if (result.success) {
|
|
100
|
-
(0, NotificationCenter_1.showNotification)('Split sequence', 2000);
|
|
101
100
|
return true;
|
|
102
101
|
}
|
|
103
102
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { type SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
|
+
export declare const TIMELINE_STACKED_FIELD_HEADER_HEIGHT = 14;
|
|
3
4
|
export declare const isTimelineFieldStacked: ({ field, transform3DMode, }: {
|
|
4
5
|
readonly field: SchemaFieldInfo;
|
|
5
6
|
readonly transform3DMode: boolean;
|
|
6
7
|
}) => boolean;
|
|
7
8
|
export declare const getTimelineFieldLabelRowStyle: (depth: number, basePadding?: number | undefined) => React.CSSProperties;
|
|
8
9
|
export declare const timelineFieldValueColumnStyle: React.CSSProperties;
|
|
9
|
-
export declare const timelineCompactStackedFieldValueColumnStyle: React.CSSProperties;
|
|
10
10
|
export declare const timelineStackedFieldContentStyle: React.CSSProperties;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.timelineStackedFieldContentStyle = exports.
|
|
3
|
+
exports.timelineStackedFieldContentStyle = exports.timelineFieldValueColumnStyle = exports.getTimelineFieldLabelRowStyle = exports.isTimelineFieldStacked = exports.TIMELINE_STACKED_FIELD_HEADER_HEIGHT = void 0;
|
|
4
4
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
5
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
6
|
+
exports.TIMELINE_STACKED_FIELD_HEADER_HEIGHT = 14;
|
|
6
7
|
const isTimelineFieldStacked = ({ field, transform3DMode, }) => {
|
|
7
8
|
return (field.typeName === 'text-content' ||
|
|
8
9
|
(transform3DMode &&
|
|
@@ -31,16 +32,12 @@ exports.timelineFieldValueColumnStyle = {
|
|
|
31
32
|
minWidth: 0,
|
|
32
33
|
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
33
34
|
};
|
|
34
|
-
exports.timelineCompactStackedFieldValueColumnStyle = {
|
|
35
|
-
...exports.timelineFieldValueColumnStyle,
|
|
36
|
-
marginBottom: -3,
|
|
37
|
-
position: 'relative',
|
|
38
|
-
top: -3,
|
|
39
|
-
};
|
|
40
35
|
exports.timelineStackedFieldContentStyle = {
|
|
41
36
|
alignSelf: 'stretch',
|
|
37
|
+
boxSizing: 'border-box',
|
|
42
38
|
display: 'flex',
|
|
43
39
|
flex: 1,
|
|
44
40
|
flexDirection: 'column',
|
|
45
41
|
minWidth: 0,
|
|
42
|
+
paddingBlock: 3,
|
|
46
43
|
};
|