@remotion/studio 4.0.485 → 4.0.486
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/ResolveCompositionConfigInStudio.js +42 -0
- package/dist/components/AssetSelector.js +1 -1
- package/dist/components/AssetSelectorItem.js +9 -9
- package/dist/components/AudioWaveform.js +3 -3
- package/dist/components/Button.js +2 -2
- package/dist/components/Canvas.js +28 -0
- package/dist/components/CanvasOrLoading.js +1 -1
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ColorPicker/AlphaSlider.js +4 -3
- package/dist/components/ColorPicker/ColorPicker.js +4 -4
- package/dist/components/ColorPicker/ColorPickerPopup.js +10 -10
- package/dist/components/ColorPicker/HueSlider.js +4 -3
- package/dist/components/ColorPicker/SaturationValueArea.js +5 -4
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/ColorPicker/checker.js +3 -3
- package/dist/components/CompactExplanation.js +3 -3
- package/dist/components/CompositionSelector.js +141 -5
- package/dist/components/CompositionSelectorItem.d.ts +1 -0
- package/dist/components/CompositionSelectorItem.js +103 -11
- package/dist/components/CopyButton.js +3 -2
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +15 -2
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/FilePreview.js +2 -1
- package/dist/components/FpsCounter.js +3 -2
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +0 -12
- package/dist/components/InlineAction.js +2 -2
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +12 -7
- package/dist/components/InspectorInfoHeader.js +2 -2
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/styles.js +3 -3
- package/dist/components/InspectorPanel.d.ts +1 -0
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.js +1 -1
- package/dist/components/InstallablePackage.js +1 -1
- package/dist/components/KeyboardShortcutsExplainer.js +5 -5
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSubItem.js +1 -1
- package/dist/components/Menu/styles.js +3 -3
- package/dist/components/MenuToolbar.js +2 -2
- package/dist/components/ModalButton.js +1 -1
- package/dist/components/ModalContainer.js +3 -3
- package/dist/components/ModalFooter.js +2 -1
- package/dist/components/ModalHeader.js +3 -2
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CancelButton.js +4 -3
- package/dist/components/NewComposition/ComboBox.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +11 -3
- package/dist/components/NewComposition/MenuContent.js +1 -1
- package/dist/components/NewComposition/NewComposition.js +4 -1
- package/dist/components/NewComposition/NewFolder.d.ts +5 -0
- package/dist/components/NewComposition/NewFolder.js +86 -0
- package/dist/components/NewComposition/RemInput.js +3 -3
- package/dist/components/NewComposition/RemTextarea.js +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +20 -59
- package/dist/components/NewComposition/ValidationMessage.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
- package/dist/components/NewComposition/use-rename-static-file.js +90 -0
- package/dist/components/NoRegisterRoot.js +3 -2
- package/dist/components/Notifications/ColorDot.js +3 -2
- package/dist/components/Notifications/Notification.js +4 -4
- package/dist/components/Notifications/NotificationCenter.js +2 -1
- package/dist/components/Notifications/ServerDisconnected.js +5 -4
- package/dist/components/OptionsPanel.js +1 -1
- package/dist/components/OutlineToggle.js +1 -1
- package/dist/components/PlayPause.js +4 -3
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
- package/dist/components/RefreshCompositionOverlay.js +2 -1
- package/dist/components/RenderButton.js +9 -9
- package/dist/components/RenderModal/CliCopyButton.js +1 -1
- package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
- package/dist/components/RenderModal/DataEditor.js +1 -1
- package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
- package/dist/components/RenderModal/InfoBubble.js +2 -2
- package/dist/components/RenderModal/InfoTooltip.js +3 -3
- package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
- package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
- package/dist/components/RenderModal/OptionExplainer.js +2 -2
- package/dist/components/RenderModal/RenderModalHr.js +2 -1
- package/dist/components/RenderModal/RenderStatusModal.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
- package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
- package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
- package/dist/components/RenderModal/render-modals.js +3 -3
- package/dist/components/RenderPreview.js +1 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/index.js +1 -1
- package/dist/components/RendersTab.js +2 -2
- package/dist/components/SegmentedControl.js +3 -3
- package/dist/components/SelectedOutlineElement.d.ts +5 -0
- package/dist/components/SelectedOutlineElement.js +7 -7
- package/dist/components/SelectedOutlineOverlay.js +1 -1
- package/dist/components/SelectedOutlineUvControls.js +5 -5
- package/dist/components/SidebarCollapserControls.js +5 -4
- package/dist/components/Splitter/SplitterElement.js +2 -1
- package/dist/components/StaticFilePreview.js +1 -1
- package/dist/components/Tabs/index.js +3 -3
- package/dist/components/Tabs/vertical.js +3 -3
- package/dist/components/TextViewer.js +2 -1
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/EasingEditorModal.js +8 -8
- package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
- package/dist/components/Timeline/LoopedIndicator.js +2 -2
- package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
- package/dist/components/Timeline/TimelineArrayField.js +6 -5
- package/dist/components/Timeline/TimelineColorField.js +2 -1
- package/dist/components/Timeline/TimelineEffectItem.js +3 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
- package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
- package/dist/components/Timeline/TimelineImageInfo.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -4
- package/dist/components/Timeline/TimelineKeyframeControls.js +2 -2
- package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +3 -3
- package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
- package/dist/components/Timeline/TimelineRotationField.js +4 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
- package/dist/components/Timeline/TimelineSchemaField.js +47 -7
- package/dist/components/Timeline/TimelineScrollable.js +3 -2
- package/dist/components/Timeline/TimelineSelection.js +6 -6
- package/dist/components/Timeline/TimelineSequence.js +17 -20
- package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
- package/dist/components/Timeline/TimelineSequenceItem.js +8 -7
- package/dist/components/Timeline/TimelineSequenceName.js +3 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +2 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
- package/dist/components/Timeline/TimelineSlider.js +2 -1
- package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
- package/dist/components/Timeline/TimelineZoomControls.js +4 -3
- package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
- package/dist/components/Timeline/call-move-keyframe.js +14 -3
- package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
- package/dist/components/Timeline/google-fonts-list.js +1512 -0
- package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
- package/dist/components/Timeline/save-sequence-prop.js +63 -19
- package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
- package/dist/components/TimelineInOutToggle.js +1 -1
- package/dist/components/UpdateCheck.js +2 -2
- package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
- package/dist/components/VisualControls/ClickableFileName.js +2 -2
- package/dist/components/effect-drag-and-drop.js +1 -0
- package/dist/components/import-assets.d.ts +7 -1
- package/dist/components/import-assets.js +55 -1
- package/dist/components/selected-outline-measurement.js +2 -1
- package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
- package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
- package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
- package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
- package/dist/error-overlay/remotion-overlay/carets.js +3 -2
- package/dist/esm/{chunk-103pp4n7.js → chunk-975rp13y.js} +9143 -6061
- package/dist/esm/chunk-jefhcs5z.js +164 -0
- package/dist/esm/internals.mjs +9144 -6028
- package/dist/esm/previewEntry.mjs +8335 -5215
- package/dist/esm/renderEntry.mjs +8 -5
- package/dist/helpers/checkerboard-background.js +4 -12
- package/dist/helpers/colors.d.ts +99 -7
- package/dist/helpers/colors.js +118 -10
- package/dist/helpers/inject-css.js +85 -83
- package/dist/helpers/timeline-layout.d.ts +4 -2
- package/dist/helpers/use-menu-structure.js +31 -3
- package/dist/helpers/validate-folder-rename.js +2 -10
- package/dist/helpers/validate-new-folder-name.d.ts +5 -0
- package/dist/helpers/validate-new-folder-name.js +16 -0
- package/dist/hot-middleware-client/client.js +3 -2
- package/dist/icons/Checkmark.js +2 -1
- package/dist/icons/audio.js +2 -1
- package/dist/icons/caret.js +2 -2
- package/dist/icons/certificate.js +2 -1
- package/dist/icons/data.js +2 -1
- package/dist/icons/eyedropper.js +2 -1
- package/dist/icons/file.js +2 -1
- package/dist/icons/frame.js +2 -1
- package/dist/icons/gear.js +2 -1
- package/dist/icons/gif.js +2 -1
- package/dist/icons/jump-to-start.js +2 -1
- package/dist/icons/keys.js +4 -3
- package/dist/icons/media-volume.js +1 -1
- package/dist/icons/minus.js +2 -1
- package/dist/icons/pause.js +2 -1
- package/dist/icons/play.js +2 -1
- package/dist/icons/redo.js +2 -1
- package/dist/icons/step-back.js +2 -1
- package/dist/icons/step-forward.js +2 -1
- package/dist/icons/undo.js +2 -1
- package/dist/previewEntry.js +2 -1
- package/dist/renderEntry.js +4 -3
- package/dist/state/modals.d.ts +4 -0
- package/package.json +11 -11
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = void 0;
|
|
3
|
+
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const no_react_1 = require("remotion/no-react");
|
|
9
9
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
10
10
|
const client_id_1 = require("../../helpers/client-id");
|
|
11
|
+
const colors_1 = require("../../helpers/colors");
|
|
11
12
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
12
13
|
const ForceSpecificCursor_1 = require("../ForceSpecificCursor");
|
|
13
14
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
@@ -22,6 +23,49 @@ const baseStyle = {
|
|
|
22
23
|
zIndex: 1,
|
|
23
24
|
touchAction: 'none',
|
|
24
25
|
};
|
|
26
|
+
const getKeyframedSequenceDragTargets = ({ nodePath, sequence, propStatuses, }) => {
|
|
27
|
+
var _a;
|
|
28
|
+
const status = propStatuses[remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath)];
|
|
29
|
+
if (status === null || status === undefined || !status.canUpdate) {
|
|
30
|
+
return { effectKeyframes: [], sequenceKeyframes: [] };
|
|
31
|
+
}
|
|
32
|
+
const sequenceSchema = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.schema;
|
|
33
|
+
const sequenceKeyframes = sequenceSchema === undefined
|
|
34
|
+
? []
|
|
35
|
+
: Object.entries(status.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed'
|
|
36
|
+
? [{ fieldKey, schema: sequenceSchema, status: propStatus }]
|
|
37
|
+
: []);
|
|
38
|
+
const effectKeyframes = status.effects.flatMap((effectStatus) => {
|
|
39
|
+
var _a;
|
|
40
|
+
if (!effectStatus.canUpdate) {
|
|
41
|
+
return [];
|
|
42
|
+
}
|
|
43
|
+
const effectSchema = (_a = sequence.effects[effectStatus.effectIndex]) === null || _a === void 0 ? void 0 : _a.schema;
|
|
44
|
+
if (effectSchema === undefined) {
|
|
45
|
+
return [];
|
|
46
|
+
}
|
|
47
|
+
return Object.entries(effectStatus.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed'
|
|
48
|
+
? [
|
|
49
|
+
{
|
|
50
|
+
effectIndex: effectStatus.effectIndex,
|
|
51
|
+
fieldKey,
|
|
52
|
+
schema: effectSchema,
|
|
53
|
+
status: propStatus,
|
|
54
|
+
},
|
|
55
|
+
]
|
|
56
|
+
: []);
|
|
57
|
+
});
|
|
58
|
+
return { effectKeyframes, sequenceKeyframes };
|
|
59
|
+
};
|
|
60
|
+
const shiftKeyframedStatus = ({ status, deltaFrames, }) => {
|
|
61
|
+
return {
|
|
62
|
+
...status,
|
|
63
|
+
keyframes: status.keyframes.map((keyframe) => ({
|
|
64
|
+
...keyframe,
|
|
65
|
+
frame: keyframe.frame + deltaFrames,
|
|
66
|
+
})),
|
|
67
|
+
};
|
|
68
|
+
};
|
|
25
69
|
const canUpdateDurationInFrames = ({ propStatuses, nodePath, }) => {
|
|
26
70
|
var _a, _b;
|
|
27
71
|
const status = (_b = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a.durationInFrames) === null || _b === void 0 ? void 0 : _b.status;
|
|
@@ -166,6 +210,31 @@ const getTimelineSequenceFromDragChanges = ({ targets, deltaFrames, }) => {
|
|
|
166
210
|
});
|
|
167
211
|
};
|
|
168
212
|
exports.getTimelineSequenceFromDragChanges = getTimelineSequenceFromDragChanges;
|
|
213
|
+
const getTimelineSequenceFromDragKeyframeMoves = ({ targets, deltaFrames, }) => {
|
|
214
|
+
if (deltaFrames === 0) {
|
|
215
|
+
return { effectKeyframes: [], sequenceKeyframes: [] };
|
|
216
|
+
}
|
|
217
|
+
return {
|
|
218
|
+
sequenceKeyframes: targets.flatMap((target) => target.sequenceKeyframes.flatMap((keyframeTarget) => keyframeTarget.status.keyframes.map((keyframe) => ({
|
|
219
|
+
fileName: target.fileName,
|
|
220
|
+
nodePath: target.nodePath,
|
|
221
|
+
fieldKey: keyframeTarget.fieldKey,
|
|
222
|
+
fromFrame: keyframe.frame,
|
|
223
|
+
toFrame: keyframe.frame + deltaFrames,
|
|
224
|
+
schema: keyframeTarget.schema,
|
|
225
|
+
})))),
|
|
226
|
+
effectKeyframes: targets.flatMap((target) => target.effectKeyframes.flatMap((keyframeTarget) => keyframeTarget.status.keyframes.map((keyframe) => ({
|
|
227
|
+
fileName: target.fileName,
|
|
228
|
+
nodePath: target.nodePath,
|
|
229
|
+
effectIndex: keyframeTarget.effectIndex,
|
|
230
|
+
fieldKey: keyframeTarget.fieldKey,
|
|
231
|
+
fromFrame: keyframe.frame,
|
|
232
|
+
toFrame: keyframe.frame + deltaFrames,
|
|
233
|
+
schema: keyframeTarget.schema,
|
|
234
|
+
})))),
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
exports.getTimelineSequenceFromDragKeyframeMoves = getTimelineSequenceFromDragKeyframeMoves;
|
|
169
238
|
const findSequenceTrack = ({ tracks, nodePathInfo, }) => {
|
|
170
239
|
const key = (0, studio_shared_1.stringifySequenceExpandedRowKey)(nodePathInfo.sequenceSubscriptionKey);
|
|
171
240
|
return tracks.find((candidate) => {
|
|
@@ -301,10 +370,17 @@ const getTimelineSequenceFromDragTargets = ({ draggedNodePathInfo, selectedItems
|
|
|
301
370
|
}
|
|
302
371
|
const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
|
|
303
372
|
if (!targets.has(key)) {
|
|
373
|
+
const { effectKeyframes, sequenceKeyframes } = getKeyframedSequenceDragTargets({
|
|
374
|
+
nodePath,
|
|
375
|
+
sequence: originalSequence,
|
|
376
|
+
propStatuses,
|
|
377
|
+
});
|
|
304
378
|
targets.set(key, {
|
|
379
|
+
effectKeyframes,
|
|
305
380
|
fileName: nodePath.absolutePath,
|
|
306
381
|
initialFrom: originalSequence.from,
|
|
307
382
|
nodePath,
|
|
383
|
+
sequenceKeyframes,
|
|
308
384
|
});
|
|
309
385
|
}
|
|
310
386
|
}
|
|
@@ -321,9 +397,13 @@ const clearDurationDragOverrides = ({ clearDragOverrides, targets, }) => {
|
|
|
321
397
|
clearDragOverrides(target.nodePath);
|
|
322
398
|
}
|
|
323
399
|
};
|
|
324
|
-
const clearFromDragOverrides = ({ clearDragOverrides, targets, }) => {
|
|
400
|
+
const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides, targets, }) => {
|
|
325
401
|
for (const target of targets) {
|
|
326
402
|
clearDragOverrides(target.nodePath);
|
|
403
|
+
const effectIndexes = new Set(target.effectKeyframes.map((keyframe) => keyframe.effectIndex));
|
|
404
|
+
for (const effectIndex of effectIndexes) {
|
|
405
|
+
clearEffectDragOverrides(target.nodePath, effectIndex);
|
|
406
|
+
}
|
|
327
407
|
}
|
|
328
408
|
};
|
|
329
409
|
const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
@@ -494,13 +574,13 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
494
574
|
const style = {
|
|
495
575
|
...baseStyle,
|
|
496
576
|
left: 0,
|
|
497
|
-
background:
|
|
577
|
+
background: colors_1.TRANSPARENT,
|
|
498
578
|
};
|
|
499
579
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
|
|
500
580
|
};
|
|
501
581
|
exports.TimelineSequenceLeftEdgeDragHandle = TimelineSequenceLeftEdgeDragHandle;
|
|
502
582
|
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
|
|
503
|
-
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
583
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
504
584
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
505
585
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
506
586
|
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
@@ -513,6 +593,8 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
513
593
|
setPropStatuses,
|
|
514
594
|
setDragOverrides,
|
|
515
595
|
clearDragOverrides,
|
|
596
|
+
setEffectDragOverrides,
|
|
597
|
+
clearEffectDragOverrides,
|
|
516
598
|
previewServerState,
|
|
517
599
|
overrideIdToNodePathMappings,
|
|
518
600
|
});
|
|
@@ -521,6 +603,8 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
521
603
|
setPropStatuses,
|
|
522
604
|
setDragOverrides,
|
|
523
605
|
clearDragOverrides,
|
|
606
|
+
setEffectDragOverrides,
|
|
607
|
+
clearEffectDragOverrides,
|
|
524
608
|
previewServerState,
|
|
525
609
|
overrideIdToNodePathMappings,
|
|
526
610
|
};
|
|
@@ -533,26 +617,39 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
533
617
|
if (!dragState) {
|
|
534
618
|
return;
|
|
535
619
|
}
|
|
536
|
-
const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
|
|
620
|
+
const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, clearEffectDragOverrides: latestClearEffect, previewServerState: latestServerState, } = latestRef.current;
|
|
537
621
|
const changes = (0, exports.getTimelineSequenceFromDragChanges)({
|
|
538
622
|
targets: dragState.targets,
|
|
539
623
|
deltaFrames: dragState.latestDeltaFrames,
|
|
540
624
|
});
|
|
625
|
+
const keyframeMoves = (0, exports.getTimelineSequenceFromDragKeyframeMoves)({
|
|
626
|
+
targets: dragState.targets,
|
|
627
|
+
deltaFrames: dragState.latestDeltaFrames,
|
|
628
|
+
});
|
|
541
629
|
if (!commit ||
|
|
542
630
|
latestServerState.type !== 'connected' ||
|
|
543
|
-
changes.length === 0
|
|
631
|
+
(changes.length === 0 &&
|
|
632
|
+
keyframeMoves.sequenceKeyframes.length === 0 &&
|
|
633
|
+
keyframeMoves.effectKeyframes.length === 0)) {
|
|
544
634
|
clearFromDragOverrides({
|
|
545
635
|
clearDragOverrides: latestClear,
|
|
636
|
+
clearEffectDragOverrides: latestClearEffect,
|
|
546
637
|
targets: dragState.targets,
|
|
547
638
|
});
|
|
548
639
|
return;
|
|
549
640
|
}
|
|
550
641
|
const savePromise = (0, save_sequence_prop_1.saveSequenceProps)({
|
|
551
642
|
changes,
|
|
643
|
+
movedKeyframes: {
|
|
644
|
+
sequenceKeyframes: keyframeMoves.sequenceKeyframes,
|
|
645
|
+
effectKeyframes: keyframeMoves.effectKeyframes,
|
|
646
|
+
},
|
|
552
647
|
setPropStatuses: latestSetPropStatuses,
|
|
553
648
|
clientId: latestServerState.clientId,
|
|
554
|
-
undoLabel:
|
|
555
|
-
|
|
649
|
+
undoLabel: dragState.targets.length > 1
|
|
650
|
+
? 'Move selected sequences'
|
|
651
|
+
: 'Move sequence',
|
|
652
|
+
redoLabel: dragState.targets.length > 1
|
|
556
653
|
? 'Move selected sequences back'
|
|
557
654
|
: 'Move sequence back',
|
|
558
655
|
});
|
|
@@ -563,6 +660,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
563
660
|
.finally(() => {
|
|
564
661
|
clearFromDragOverrides({
|
|
565
662
|
clearDragOverrides: latestClear,
|
|
663
|
+
clearEffectDragOverrides: latestClearEffect,
|
|
566
664
|
targets: dragState.targets,
|
|
567
665
|
});
|
|
568
666
|
});
|
|
@@ -623,10 +721,29 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
623
721
|
const deltaFrames = Math.round(dx / dragState.pxPerFrame);
|
|
624
722
|
dragState.latestDeltaFrames = deltaFrames;
|
|
625
723
|
for (const target of dragState.targets) {
|
|
626
|
-
|
|
724
|
+
const nextFrom = (0, exports.getTimelineSequenceFromDragValue)({
|
|
627
725
|
initialFrom: target.initialFrom,
|
|
628
726
|
deltaFrames,
|
|
629
|
-
})
|
|
727
|
+
});
|
|
728
|
+
latestRef.current.setDragOverrides(target.nodePath, 'from', remotion_1.Internals.makeStaticDragOverride(nextFrom));
|
|
729
|
+
for (const keyframeTarget of target.sequenceKeyframes) {
|
|
730
|
+
latestRef.current.setDragOverrides(target.nodePath, keyframeTarget.fieldKey, {
|
|
731
|
+
type: 'keyframed',
|
|
732
|
+
status: shiftKeyframedStatus({
|
|
733
|
+
status: keyframeTarget.status,
|
|
734
|
+
deltaFrames,
|
|
735
|
+
}),
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
for (const keyframeTarget of target.effectKeyframes) {
|
|
739
|
+
latestRef.current.setEffectDragOverrides(target.nodePath, keyframeTarget.effectIndex, keyframeTarget.fieldKey, {
|
|
740
|
+
type: 'keyframed',
|
|
741
|
+
status: shiftKeyframedStatus({
|
|
742
|
+
status: keyframeTarget.status,
|
|
743
|
+
deltaFrames,
|
|
744
|
+
}),
|
|
745
|
+
});
|
|
746
|
+
}
|
|
630
747
|
}
|
|
631
748
|
};
|
|
632
749
|
const onUp = (e) => {
|
|
@@ -829,7 +946,7 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
829
946
|
const style = {
|
|
830
947
|
...baseStyle,
|
|
831
948
|
right: 0,
|
|
832
|
-
background:
|
|
949
|
+
background: colors_1.TRANSPARENT,
|
|
833
950
|
};
|
|
834
951
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to change duration", style: style, onPointerDown: onPointerDown }));
|
|
835
952
|
};
|
|
@@ -4,6 +4,7 @@ exports.TimelineSlider = exports.redrawTimelineSliderFast = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
7
8
|
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
8
9
|
const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
9
10
|
const imperative_state_1 = require("./imperative-state");
|
|
@@ -21,7 +22,7 @@ const line = {
|
|
|
21
22
|
height: '100vh',
|
|
22
23
|
width: PLAYHEAD_LINE_WIDTH,
|
|
23
24
|
position: 'fixed',
|
|
24
|
-
backgroundColor:
|
|
25
|
+
backgroundColor: colors_1.TIMELINE_PLAYHEAD_COLOR,
|
|
25
26
|
};
|
|
26
27
|
const PLAYHEAD_CENTER_OFFSET = PLAYHEAD_LINE_WIDTH / 2;
|
|
27
28
|
const getTimelineSliderTransform = ({ durationInFrames, frame, width, }) => {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineSliderHandle = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
5
6
|
const container = {
|
|
6
7
|
width: 20,
|
|
7
8
|
height: 20,
|
|
@@ -9,6 +10,6 @@ const container = {
|
|
|
9
10
|
marginLeft: -8,
|
|
10
11
|
};
|
|
11
12
|
const TimelineSliderHandle = () => {
|
|
12
|
-
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("svg", { width: 17, viewBox: "0 0 159 212", children: jsx_runtime_1.jsx("path", { d: "M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z", fill:
|
|
13
|
+
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("svg", { width: 17, viewBox: "0 0 159 212", children: jsx_runtime_1.jsx("path", { d: "M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z", fill: colors_1.TIMELINE_PLAYHEAD_COLOR }) }) }));
|
|
13
14
|
};
|
|
14
15
|
exports.TimelineSliderHandle = TimelineSliderHandle;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
9
10
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
10
11
|
const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
|
|
@@ -17,7 +18,7 @@ const outerStyle = {
|
|
|
17
18
|
};
|
|
18
19
|
const filmstripContainerStyle = {
|
|
19
20
|
height: timeline_layout_1.TIMELINE_LAYER_FILMSTRIP_HEIGHT,
|
|
20
|
-
backgroundColor:
|
|
21
|
+
backgroundColor: colors_1.BLACK_ALPHA_30,
|
|
21
22
|
display: 'flex',
|
|
22
23
|
borderTopLeftRadius: 2,
|
|
23
24
|
fontSize: 10,
|
|
@@ -4,6 +4,7 @@ exports.TimelineZoomControls = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
7
8
|
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
8
9
|
const minus_1 = require("../../icons/minus");
|
|
9
10
|
const plus_1 = require("../../icons/plus");
|
|
@@ -12,7 +13,7 @@ const z_index_1 = require("../../state/z-index");
|
|
|
12
13
|
const ControlButton_1 = require("../ControlButton");
|
|
13
14
|
const layout_1 = require("../layout");
|
|
14
15
|
const container = {
|
|
15
|
-
color:
|
|
16
|
+
color: colors_1.BLACK,
|
|
16
17
|
flexDirection: 'row',
|
|
17
18
|
display: 'flex',
|
|
18
19
|
alignItems: 'center',
|
|
@@ -21,7 +22,7 @@ const buttonStyle = {
|
|
|
21
22
|
fontSize: 24,
|
|
22
23
|
};
|
|
23
24
|
const iconStyle = {
|
|
24
|
-
color:
|
|
25
|
+
color: colors_1.WHITE,
|
|
25
26
|
width: 14,
|
|
26
27
|
};
|
|
27
28
|
const TimelineZoomControls = () => {
|
|
@@ -58,7 +59,7 @@ const TimelineZoomControls = () => {
|
|
|
58
59
|
}
|
|
59
60
|
const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
|
|
60
61
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
61
|
-
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("input", { title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: 'range', min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: jsx_runtime_1.jsx(plus_1.Plus, { color:
|
|
62
|
+
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("input", { title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: 'range', min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: jsx_runtime_1.jsx(plus_1.Plus, { color: colors_1.CURRENT_COLOR_LOWERCASE, style: iconStyle }) })
|
|
62
63
|
] }));
|
|
63
64
|
};
|
|
64
65
|
exports.TimelineZoomControls = TimelineZoomControls;
|
|
@@ -11,6 +11,11 @@ export type MoveSequenceKeyframeChange = {
|
|
|
11
11
|
export type MoveEffectKeyframeChange = MoveSequenceKeyframeChange & {
|
|
12
12
|
effectIndex: number;
|
|
13
13
|
};
|
|
14
|
+
export declare const applyOptimisticKeyframeMoves: ({ sequenceKeyframes, effectKeyframes, setPropStatuses, }: {
|
|
15
|
+
sequenceKeyframes: MoveSequenceKeyframeChange[];
|
|
16
|
+
effectKeyframes: MoveEffectKeyframeChange[];
|
|
17
|
+
setPropStatuses: SetPropStatuses;
|
|
18
|
+
}) => void;
|
|
14
19
|
export declare const callMoveKeyframes: ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }: {
|
|
15
20
|
sequenceKeyframes: MoveSequenceKeyframeChange[];
|
|
16
21
|
effectKeyframes: MoveEffectKeyframeChange[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callMoveKeyframes = void 0;
|
|
3
|
+
exports.callMoveKeyframes = exports.applyOptimisticKeyframeMoves = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
5
|
const call_api_1 = require("../call-api");
|
|
6
6
|
const groupByNodePath = (keyframes) => {
|
|
@@ -14,9 +14,9 @@ const groupByNodePath = (keyframes) => {
|
|
|
14
14
|
}
|
|
15
15
|
return [...groups.values()];
|
|
16
16
|
};
|
|
17
|
-
const
|
|
17
|
+
const applyOptimisticKeyframeMoves = ({ sequenceKeyframes, effectKeyframes, setPropStatuses, }) => {
|
|
18
18
|
if (sequenceKeyframes.length === 0 && effectKeyframes.length === 0) {
|
|
19
|
-
return
|
|
19
|
+
return;
|
|
20
20
|
}
|
|
21
21
|
for (const keyframes of groupByNodePath(sequenceKeyframes)) {
|
|
22
22
|
const [firstKeyframe] = keyframes;
|
|
@@ -47,6 +47,17 @@ const callMoveKeyframes = ({ sequenceKeyframes, effectKeyframes, setPropStatuses
|
|
|
47
47
|
})),
|
|
48
48
|
}));
|
|
49
49
|
}
|
|
50
|
+
};
|
|
51
|
+
exports.applyOptimisticKeyframeMoves = applyOptimisticKeyframeMoves;
|
|
52
|
+
const callMoveKeyframes = ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }) => {
|
|
53
|
+
if (sequenceKeyframes.length === 0 && effectKeyframes.length === 0) {
|
|
54
|
+
return Promise.resolve();
|
|
55
|
+
}
|
|
56
|
+
(0, exports.applyOptimisticKeyframeMoves)({
|
|
57
|
+
sequenceKeyframes,
|
|
58
|
+
effectKeyframes,
|
|
59
|
+
setPropStatuses,
|
|
60
|
+
});
|
|
50
61
|
return (0, call_api_1.callApi)('/api/move-keyframes', {
|
|
51
62
|
sequenceKeyframes: sequenceKeyframes.map((keyframe) => ({
|
|
52
63
|
fileName: keyframe.fileName,
|