@remotion/studio 4.0.527 → 4.0.528
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/components/AgentPrompt.js +1 -2
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CurrentAsset.js +3 -2
- package/dist/components/EditorRuler/Ruler.js +6 -3
- package/dist/components/EffectPickerModal.js +69 -43
- package/dist/components/ElementInstallConfirmation.js +3 -3
- package/dist/components/ElementLibrariesSettings.d.ts +2 -0
- package/dist/components/ElementLibrariesSettings.js +200 -0
- package/dist/components/InitialCompositionLoader.js +3 -1
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +30 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
- package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
- package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
- package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +10 -4
- package/dist/components/NewComposition/InputDragger.d.ts +3 -1
- package/dist/components/NewComposition/InputDragger.js +28 -9
- package/dist/components/NewComposition/NewComposition.js +7 -6
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/Preview.js +3 -2
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +14 -5
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +30 -7
- package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobError.js +24 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +24 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +3 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +2 -3
- package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
- package/dist/components/RenderQueue/load-model-for-job.js +5 -1
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
- package/dist/components/SelectedOutlineCropControls.js +2 -1
- package/dist/components/SelectedOutlineEditingHandles.js +9 -2
- package/dist/components/SelectedOutlineElement.js +9 -3
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
- package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
- package/dist/components/SelectedOutlineOverlay.js +152 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +433 -0
- package/dist/components/SelectedOutlinePolygon.js +21 -46
- package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
- package/dist/components/SelectedOutlineRenderer.js +32 -136
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SettingsModal.js +30 -3
- package/dist/components/SettingsModalFooter.d.ts +1 -0
- package/dist/components/SettingsModalFooter.js +7 -3
- package/dist/components/ShowOutlinesProvider.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +13 -14
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +39 -28
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
- package/dist/components/Timeline/TimelineSelection.js +16 -9
- package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
- package/dist/components/Timeline/TimelineSequence.js +39 -21
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +18 -8
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
- package/dist/components/Timeline/TimelineTextContentField.js +27 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
- package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
- package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
- package/dist/components/Timeline/delete-selected-timeline-item.js +7 -93
- package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
- package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
- package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
- package/dist/components/Timeline/get-node-keyframes.js +6 -4
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
- package/dist/components/Timeline/keyframe-clipboard.js +17 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +4 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +3 -1
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
- package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
- package/dist/components/UpdatesSettings.js +2 -0
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +22 -40
- package/dist/components/composition-drop-preview.js +1 -0
- package/dist/components/effect-drag-and-drop.d.ts +13 -5
- package/dist/components/effect-drag-and-drop.js +19 -4
- package/dist/components/get-open-in-menu-items.d.ts +2 -1
- package/dist/components/get-open-in-menu-items.js +17 -1
- package/dist/components/selected-outline-drag.d.ts +1 -6
- package/dist/components/selected-outline-drag.js +22 -6
- package/dist/components/selected-outline-geometry.d.ts +2 -18
- package/dist/components/selected-outline-measurement.d.ts +23 -41
- package/dist/components/selected-outline-measurement.js +14 -252
- package/dist/components/selected-outline-order.d.ts +4 -11
- package/dist/components/selected-outline-order.js +2 -254
- package/dist/components/selected-outline-snap.d.ts +1 -1
- package/dist/components/selected-outline-snap.js +2 -1
- package/dist/components/selected-outline-types.d.ts +18 -28
- package/dist/components/selected-outline-uv.d.ts +4 -4
- package/dist/components/selected-outline-uv.js +6 -111
- package/dist/components/sequence-props-api.js +0 -10
- package/dist/components/use-selected-outline-control-target.js +12 -21
- package/dist/components/wrap-jsx-node-api.d.ts +2 -0
- package/dist/components/wrap-jsx-node-api.js +13 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-npa6szn1.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +63 -17
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-79m5wgcj.mjs → TranscriptionModal-e18bzbkb.mjs} +15 -15
- package/dist/esm/{VideoMattingModal-31pew0xj.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -65
- package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
- package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
- package/dist/esm/{index-n5gmcvhz.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/{index-5t2dwxsk.mjs → index-890dd9b3.mjs} +259 -21
- package/dist/esm/{index-ac5550e7.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-614tdz2q.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-s7qa3xbw.mjs → index-c2wabcdt.mjs} +6 -6
- package/dist/esm/{index-r1gr3j3a.mjs → index-dfy1t576.mjs} +50 -1
- package/dist/esm/{index-21hxsfaa.mjs → index-dh3zk2hv.mjs} +6 -25
- package/dist/esm/{index-4zen9prq.mjs → index-dpyss74p.mjs} +6563 -5485
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-9xxg6218.mjs → index-qve7mdfp.mjs} +19 -1
- package/dist/esm/{index-e855w59j.mjs → index-s6qya2gg.mjs} +3 -5
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-r0ejh5sy.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-ppspzgn9.mjs → index-x6r9bn12.mjs} +4026 -4761
- package/dist/esm/{index-vxwg66ar.mjs → index-xac20sv4.mjs} +44 -57
- package/dist/esm/index.mjs +4 -5
- package/dist/esm/internals.mjs +13 -13
- package/dist/esm/previewEntry.mjs +18 -15
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/helpers/calculate-timeline.d.ts +5 -1
- package/dist/helpers/calculate-timeline.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- package/dist/helpers/create-folder-tree.js +2 -1
- package/dist/helpers/editor-guide-selection.d.ts +1 -1
- package/dist/helpers/editor-ruler.js +23 -12
- package/dist/helpers/get-connected-compositions.d.ts +6 -1
- package/dist/helpers/get-connected-compositions.js +1 -1
- package/dist/helpers/get-sequence-double-click-action.js +1 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
- package/dist/helpers/get-sequence-visible-range.js +2 -5
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
- package/dist/helpers/get-timeline-nestedness.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
- package/dist/helpers/hoverable.js +4 -4
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
- package/dist/helpers/prism-vsc-dark-plus.js +52 -51
- package/dist/helpers/resolve-studio-color.d.ts +1 -0
- package/dist/helpers/resolve-studio-color.js +11 -0
- package/dist/helpers/studio-css-variables.d.ts +1 -0
- package/dist/helpers/studio-css-variables.js +105 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- package/dist/helpers/timeline-node-path-key.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-runtime-values.js +2 -28
- package/dist/hot-middleware-client/client.js +5 -3
- package/dist/icons/align-center-horizontal.js +2 -1
- package/dist/icons/align-left.js +2 -1
- package/dist/icons/align-right.js +2 -1
- package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
- package/dist/icons/background-removal.js +9 -0
- package/dist/icons/wrap.d.ts +4 -0
- package/dist/icons/wrap.js +10 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/modals.d.ts +15 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/package.json +20 -19
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
- package/dist/esm/LazyModels-nh3c8h9p.mjs +0 -12
- package/dist/esm/LazyModels-rr5v8h5y.mjs +0 -12
- package/dist/esm/index-cw0pnpg5.mjs +0 -50
- package/dist/esm/index-k426ye99.mjs +0 -139
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
- package/dist/icons/separation.js +0 -7
- /package/dist/esm/{resolve-composition-component-location-qrp05g62.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +0 -0
|
@@ -37,6 +37,7 @@ exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = void
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_dom_1 = require("react-dom");
|
|
40
41
|
const remotion_1 = require("remotion");
|
|
41
42
|
const client_id_1 = require("../../helpers/client-id");
|
|
42
43
|
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
@@ -46,6 +47,7 @@ const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
|
46
47
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
47
48
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
48
49
|
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
50
|
+
const get_playback_rate_keyframe_changes_1 = require("./get-playback-rate-keyframe-changes");
|
|
49
51
|
const get_sequence_prop_reset_changes_1 = require("./get-sequence-prop-reset-changes");
|
|
50
52
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
51
53
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
@@ -87,9 +89,105 @@ const isResettableStatus = ({ status, defaultValue, }) => {
|
|
|
87
89
|
const effectiveCodeValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : defaultValue;
|
|
88
90
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
89
91
|
};
|
|
90
|
-
const
|
|
92
|
+
const getPlaybackRateAdjustedDuration = ({ durationInFrames, previousPlaybackRate, playbackRate, }) => {
|
|
93
|
+
const adjustedDuration = (durationInFrames * previousPlaybackRate) / playbackRate;
|
|
94
|
+
if (!Number.isFinite(adjustedDuration) || adjustedDuration <= 0) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const nearestInteger = Math.round(adjustedDuration);
|
|
98
|
+
return nearestInteger > 0 &&
|
|
99
|
+
Math.abs(adjustedDuration - nearestInteger) <=
|
|
100
|
+
Number.EPSILON * Math.max(1, Math.abs(adjustedDuration)) * 2
|
|
101
|
+
? nearestInteger
|
|
102
|
+
: adjustedDuration;
|
|
103
|
+
};
|
|
104
|
+
const Value = ({ field, nodePath, validatedLocation, schema, propStatus, durationPropStatus, }) => {
|
|
105
|
+
const playbackRateBaseline = (0, react_1.useRef)(null);
|
|
106
|
+
const previewedKeyframes = (0, react_1.useRef)([]);
|
|
107
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
108
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
109
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
110
|
+
const getPlaybackRateChanges = (0, react_1.useCallback)((value) => {
|
|
111
|
+
var _a;
|
|
112
|
+
if (field.key !== 'playbackRate' ||
|
|
113
|
+
nodePath === null ||
|
|
114
|
+
typeof value !== 'number') {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
const currentStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatusesRef.current, nodePath)) === null || _a === void 0 ? void 0 : _a.playbackRate;
|
|
118
|
+
const previousPlaybackRate = (currentStatus === null || currentStatus === void 0 ? void 0 : currentStatus.status) === 'static' &&
|
|
119
|
+
typeof currentStatus.codeValue === 'number'
|
|
120
|
+
? currentStatus.codeValue
|
|
121
|
+
: field.fieldSchema.default;
|
|
122
|
+
if (typeof previousPlaybackRate !== 'number') {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
126
|
+
nodePath,
|
|
127
|
+
sequences: sequencesRef.current,
|
|
128
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
129
|
+
propStatuses: propStatusesRef.current,
|
|
130
|
+
previousPlaybackRate,
|
|
131
|
+
playbackRate: value,
|
|
132
|
+
});
|
|
133
|
+
}, [
|
|
134
|
+
field.fieldSchema.default,
|
|
135
|
+
field.key,
|
|
136
|
+
nodePath,
|
|
137
|
+
overrideIdToNodePathMappings,
|
|
138
|
+
propStatusesRef,
|
|
139
|
+
sequencesRef,
|
|
140
|
+
]);
|
|
141
|
+
const getAdjustedDuration = (0, react_1.useCallback)((playbackRate) => {
|
|
142
|
+
if (field.key !== 'playbackRate' ||
|
|
143
|
+
!schema.durationInFrames ||
|
|
144
|
+
(durationPropStatus === null || durationPropStatus === void 0 ? void 0 : durationPropStatus.status) !== 'static' ||
|
|
145
|
+
typeof durationPropStatus.codeValue !== 'number' ||
|
|
146
|
+
!Number.isFinite(durationPropStatus.codeValue) ||
|
|
147
|
+
typeof playbackRate !== 'number' ||
|
|
148
|
+
!Number.isFinite(playbackRate) ||
|
|
149
|
+
playbackRate <= 0) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
const currentPlaybackRate = typeof propStatus.codeValue === 'number'
|
|
153
|
+
? propStatus.codeValue
|
|
154
|
+
: field.fieldSchema.default;
|
|
155
|
+
if (typeof currentPlaybackRate !== 'number' ||
|
|
156
|
+
!Number.isFinite(currentPlaybackRate) ||
|
|
157
|
+
currentPlaybackRate <= 0) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const currentDuration = durationPropStatus.codeValue;
|
|
161
|
+
let baseline = playbackRateBaseline.current;
|
|
162
|
+
// Keep the first duration and rate across successive rate edits. A change
|
|
163
|
+
// to either prop outside this control starts a new baseline.
|
|
164
|
+
if (baseline === null ||
|
|
165
|
+
!((currentDuration === baseline.durationInFrames &&
|
|
166
|
+
currentPlaybackRate === baseline.playbackRate) ||
|
|
167
|
+
(currentDuration === baseline.lastSavedDurationInFrames &&
|
|
168
|
+
currentPlaybackRate === baseline.lastSavedPlaybackRate))) {
|
|
169
|
+
baseline = {
|
|
170
|
+
durationInFrames: currentDuration,
|
|
171
|
+
playbackRate: currentPlaybackRate,
|
|
172
|
+
lastSavedDurationInFrames: currentDuration,
|
|
173
|
+
lastSavedPlaybackRate: currentPlaybackRate,
|
|
174
|
+
};
|
|
175
|
+
playbackRateBaseline.current = baseline;
|
|
176
|
+
}
|
|
177
|
+
return getPlaybackRateAdjustedDuration({
|
|
178
|
+
durationInFrames: baseline.durationInFrames,
|
|
179
|
+
previousPlaybackRate: baseline.playbackRate,
|
|
180
|
+
playbackRate,
|
|
181
|
+
});
|
|
182
|
+
}, [
|
|
183
|
+
durationPropStatus,
|
|
184
|
+
field.fieldSchema.default,
|
|
185
|
+
field.key,
|
|
186
|
+
propStatus.codeValue,
|
|
187
|
+
schema.durationInFrames,
|
|
188
|
+
]);
|
|
91
189
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
92
|
-
const { setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
190
|
+
const { setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
93
191
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
94
192
|
var _a;
|
|
95
193
|
return nodePath === null
|
|
@@ -119,6 +217,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
119
217
|
: null;
|
|
120
218
|
const stringifiedValue = JSON.stringify(value);
|
|
121
219
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
220
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
221
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
122
222
|
if (value === propStatus.codeValue) {
|
|
123
223
|
return Promise.resolve();
|
|
124
224
|
}
|
|
@@ -126,9 +226,19 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
126
226
|
propStatus.codeValue === undefined) {
|
|
127
227
|
return Promise.resolve();
|
|
128
228
|
}
|
|
129
|
-
|
|
229
|
+
if (adjustedDuration !== null && playbackRateBaseline.current) {
|
|
230
|
+
playbackRateBaseline.current.lastSavedDurationInFrames =
|
|
231
|
+
adjustedDuration;
|
|
232
|
+
playbackRateBaseline.current.lastSavedPlaybackRate = value;
|
|
233
|
+
}
|
|
234
|
+
return (0, react_dom_1.unstable_batchedUpdates)(() => (0, save_sequence_prop_1.saveSequenceProps)({
|
|
130
235
|
addedKeyframes: null,
|
|
131
|
-
movedKeyframes:
|
|
236
|
+
movedKeyframes: keyframeChanges
|
|
237
|
+
? {
|
|
238
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
239
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
240
|
+
}
|
|
241
|
+
: null,
|
|
132
242
|
changes: [
|
|
133
243
|
{
|
|
134
244
|
fileName: validatedLocation.source,
|
|
@@ -139,12 +249,24 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
139
249
|
schema,
|
|
140
250
|
sourceEdit: options === null || options === void 0 ? void 0 : options.sourceEdit,
|
|
141
251
|
},
|
|
252
|
+
...(adjustedDuration === null
|
|
253
|
+
? []
|
|
254
|
+
: [
|
|
255
|
+
{
|
|
256
|
+
fileName: validatedLocation.source,
|
|
257
|
+
nodePath,
|
|
258
|
+
fieldKey: 'durationInFrames',
|
|
259
|
+
value: adjustedDuration,
|
|
260
|
+
defaultValue: null,
|
|
261
|
+
schema,
|
|
262
|
+
},
|
|
263
|
+
]),
|
|
142
264
|
],
|
|
143
265
|
setPropStatuses,
|
|
144
266
|
clientId,
|
|
145
267
|
undoLabel: `Update ${fieldLabel}`,
|
|
146
268
|
redoLabel: `Update ${fieldLabel} again`,
|
|
147
|
-
});
|
|
269
|
+
}));
|
|
148
270
|
}, [
|
|
149
271
|
propStatus,
|
|
150
272
|
clientId,
|
|
@@ -152,6 +274,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
152
274
|
field.fieldSchema.default,
|
|
153
275
|
field.fieldSchema.type,
|
|
154
276
|
field.key,
|
|
277
|
+
getAdjustedDuration,
|
|
278
|
+
getPlaybackRateChanges,
|
|
155
279
|
nodePath,
|
|
156
280
|
schema,
|
|
157
281
|
setPropStatuses,
|
|
@@ -161,27 +285,79 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
161
285
|
if (nodePath === null) {
|
|
162
286
|
throw new Error('Cannot drag value');
|
|
163
287
|
}
|
|
164
|
-
|
|
165
|
-
|
|
288
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
289
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
290
|
+
(0, react_dom_1.unstable_batchedUpdates)(() => {
|
|
291
|
+
var _a;
|
|
292
|
+
for (const preview of previewedKeyframes.current) {
|
|
293
|
+
if (preview.effectIndex === null) {
|
|
294
|
+
clearDragOverrides(preview.nodePath);
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
previewedKeyframes.current = (_a = keyframeChanges === null || keyframeChanges === void 0 ? void 0 : keyframeChanges.previews) !== null && _a !== void 0 ? _a : [];
|
|
301
|
+
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeStaticDragOverride(value));
|
|
302
|
+
if (adjustedDuration !== null) {
|
|
303
|
+
setDragOverrides(nodePath, 'durationInFrames', remotion_1.Internals.makeStaticDragOverride(adjustedDuration));
|
|
304
|
+
}
|
|
305
|
+
for (const preview of previewedKeyframes.current) {
|
|
306
|
+
if (preview.effectIndex === null) {
|
|
307
|
+
setDragOverrides(preview.nodePath, preview.fieldKey, {
|
|
308
|
+
type: 'keyframed',
|
|
309
|
+
status: preview.status,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
setEffectDragOverrides(preview.nodePath, preview.effectIndex, preview.fieldKey, { type: 'keyframed', status: preview.status });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}, [
|
|
318
|
+
clearDragOverrides,
|
|
319
|
+
clearEffectDragOverrides,
|
|
320
|
+
setDragOverrides,
|
|
321
|
+
setEffectDragOverrides,
|
|
322
|
+
nodePath,
|
|
323
|
+
field.key,
|
|
324
|
+
getAdjustedDuration,
|
|
325
|
+
getPlaybackRateChanges,
|
|
326
|
+
]);
|
|
166
327
|
const onDragEnd = (0, react_1.useCallback)(() => {
|
|
167
328
|
if (nodePath === null) {
|
|
168
329
|
throw new Error('Cannot clear drag value');
|
|
169
330
|
}
|
|
170
331
|
clearDragOverrides(nodePath);
|
|
171
|
-
|
|
332
|
+
for (const preview of previewedKeyframes.current) {
|
|
333
|
+
if (preview.effectIndex === null) {
|
|
334
|
+
clearDragOverrides(preview.nodePath);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
previewedKeyframes.current = [];
|
|
341
|
+
}, [clearDragOverrides, clearEffectDragOverrides, nodePath]);
|
|
172
342
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
173
343
|
};
|
|
174
344
|
const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStatus, sourceFrame, dragOverrideValue, onSave, onDragValueChangeAtFrame, onDragEnd, }) => {
|
|
175
345
|
const onDragValueChange = (0, react_1.useCallback)((value) => onDragValueChangeAtFrame(value, sourceFrame), [onDragValueChangeAtFrame, sourceFrame]);
|
|
176
346
|
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
177
347
|
};
|
|
178
|
-
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
348
|
+
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, keyframePlaybackRate, ...props }) => {
|
|
179
349
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
180
350
|
const resolvedKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
181
351
|
propStatus: props.propStatus,
|
|
182
352
|
keyframeDisplayOffset,
|
|
353
|
+
keyframePlaybackRate,
|
|
183
354
|
});
|
|
184
|
-
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame:
|
|
355
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
356
|
+
displayFrame: timelinePosition,
|
|
357
|
+
keyframeDisplayOffset: resolvedKeyframeDisplayOffset,
|
|
358
|
+
keyframePlaybackRate,
|
|
359
|
+
propStatus: props.propStatus,
|
|
360
|
+
}) }));
|
|
185
361
|
};
|
|
186
362
|
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
187
363
|
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
@@ -235,17 +411,21 @@ const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
|
235
411
|
onDragValueChangeAtFrame: onKeyframedDragValueChangeAtFrame,
|
|
236
412
|
onDragEnd: onKeyframedDragEnd,
|
|
237
413
|
};
|
|
238
|
-
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
414
|
+
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset, keyframePlaybackRate: props.keyframePlaybackRate }));
|
|
239
415
|
};
|
|
240
416
|
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
241
|
-
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode, runtimeValue, }) => {
|
|
242
|
-
var _a;
|
|
417
|
+
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframePlaybackRate, keyframeControlsMode, runtimeValue, }) => {
|
|
418
|
+
var _a, _b;
|
|
243
419
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
420
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
421
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
422
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
244
423
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
245
424
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
246
425
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
247
426
|
const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
248
427
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
428
|
+
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
249
429
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
250
430
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
251
431
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -264,7 +444,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
264
444
|
propStatus,
|
|
265
445
|
selected: selection.selected,
|
|
266
446
|
keyframable,
|
|
267
|
-
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
447
|
+
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
268
448
|
const style = (0, react_1.useMemo)(() => {
|
|
269
449
|
return (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode })
|
|
270
450
|
? fieldRowBase
|
|
@@ -295,17 +475,70 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
295
475
|
? JSON.stringify(field.fieldSchema.default)
|
|
296
476
|
: null;
|
|
297
477
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
478
|
+
const previousPlaybackRate = field.key === 'playbackRate' &&
|
|
479
|
+
propStatus.status === 'static' &&
|
|
480
|
+
typeof propStatus.codeValue === 'number'
|
|
481
|
+
? propStatus.codeValue
|
|
482
|
+
: null;
|
|
483
|
+
const nextPlaybackRate = field.fieldSchema.default;
|
|
484
|
+
const canRetime = previousPlaybackRate !== null &&
|
|
485
|
+
Number.isFinite(previousPlaybackRate) &&
|
|
486
|
+
previousPlaybackRate > 0 &&
|
|
487
|
+
typeof nextPlaybackRate === 'number' &&
|
|
488
|
+
Number.isFinite(nextPlaybackRate) &&
|
|
489
|
+
nextPlaybackRate > 0;
|
|
490
|
+
const keyframeChanges = canRetime
|
|
491
|
+
? (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
492
|
+
nodePath,
|
|
493
|
+
sequences: sequencesRef.current,
|
|
494
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
495
|
+
propStatuses: propStatusesRef.current,
|
|
496
|
+
previousPlaybackRate,
|
|
497
|
+
playbackRate: nextPlaybackRate,
|
|
498
|
+
})
|
|
499
|
+
: null;
|
|
500
|
+
const durationStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames;
|
|
501
|
+
const adjustedDuration = canRetime &&
|
|
502
|
+
schema.durationInFrames &&
|
|
503
|
+
(durationStatus === null || durationStatus === void 0 ? void 0 : durationStatus.status) === 'static' &&
|
|
504
|
+
typeof durationStatus.codeValue === 'number' &&
|
|
505
|
+
Number.isFinite(durationStatus.codeValue)
|
|
506
|
+
? getPlaybackRateAdjustedDuration({
|
|
507
|
+
durationInFrames: durationStatus.codeValue,
|
|
508
|
+
previousPlaybackRate,
|
|
509
|
+
playbackRate: nextPlaybackRate,
|
|
510
|
+
})
|
|
511
|
+
: null;
|
|
298
512
|
(0, save_sequence_prop_1.saveSequenceProps)({
|
|
299
513
|
addedKeyframes: null,
|
|
300
|
-
movedKeyframes:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
514
|
+
movedKeyframes: keyframeChanges
|
|
515
|
+
? {
|
|
516
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
517
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
518
|
+
}
|
|
519
|
+
: null,
|
|
520
|
+
changes: [
|
|
521
|
+
...(0, get_sequence_prop_reset_changes_1.getSequencePropResetChanges)({
|
|
522
|
+
fileName: validatedLocation.source,
|
|
523
|
+
nodePath,
|
|
524
|
+
fieldKey: field.key,
|
|
525
|
+
value: field.fieldSchema.default,
|
|
526
|
+
defaultValue,
|
|
527
|
+
schema,
|
|
528
|
+
}),
|
|
529
|
+
...(adjustedDuration !== null
|
|
530
|
+
? [
|
|
531
|
+
{
|
|
532
|
+
fileName: validatedLocation.source,
|
|
533
|
+
nodePath,
|
|
534
|
+
fieldKey: 'durationInFrames',
|
|
535
|
+
value: adjustedDuration,
|
|
536
|
+
defaultValue: null,
|
|
537
|
+
schema,
|
|
538
|
+
},
|
|
539
|
+
]
|
|
540
|
+
: []),
|
|
541
|
+
],
|
|
309
542
|
setPropStatuses,
|
|
310
543
|
clientId: previewServerState.clientId,
|
|
311
544
|
undoLabel: `Reset ${fieldLabel}`,
|
|
@@ -318,8 +551,12 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
318
551
|
field.fieldSchema.default,
|
|
319
552
|
field.key,
|
|
320
553
|
nodePath,
|
|
554
|
+
overrideIdToNodePathMappings,
|
|
321
555
|
previewServerState,
|
|
556
|
+
propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames,
|
|
557
|
+
propStatusesRef,
|
|
322
558
|
schema,
|
|
559
|
+
sequencesRef,
|
|
323
560
|
setPropStatuses,
|
|
324
561
|
validatedLocation.source,
|
|
325
562
|
propStatus,
|
|
@@ -369,7 +606,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
369
606
|
if (propStatus === null) {
|
|
370
607
|
return null;
|
|
371
608
|
}
|
|
372
|
-
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, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
609
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, durationPropStatus: (_b = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames) !== null && _b !== void 0 ? _b : null, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
373
610
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
374
611
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
375
612
|
...inlineSourceFieldRow,
|
|
@@ -377,7 +614,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
377
614
|
...style,
|
|
378
615
|
}, children: fieldValue }));
|
|
379
616
|
}
|
|
380
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection:
|
|
617
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected || containsSelection, children: fieldValue }) }));
|
|
381
618
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
382
619
|
};
|
|
383
620
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CanUpdateSequencePropStatus,
|
|
2
|
+
import type { CanUpdateSequencePropStatus, InteractivitySchema, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
import type { MoveEffectKeyframeChange, MoveSequenceKeyframeChange } from './call-move-keyframe';
|
|
5
|
+
import { type TimelineSequenceEffectKeyframeDragTarget, type TimelineSequenceKeyframeDragTarget } from './get-keyframed-sequence-drag-targets';
|
|
5
6
|
import { type SaveSequencePropChange } from './save-sequence-prop';
|
|
6
7
|
export declare const timelineSequenceFromDragSnapThresholdPx = 10;
|
|
7
8
|
export type TimelineSequenceMediaDurationDragLimits = {
|
|
@@ -23,6 +24,7 @@ export declare const getTimelineSequenceMediaDurationDragLimits: ({ cascadedStar
|
|
|
23
24
|
readonly timelineDurationInFrames: number;
|
|
24
25
|
}) => TimelineSequenceMediaDurationDragLimits | null;
|
|
25
26
|
export type TimelineSequenceDurationDragTarget = {
|
|
27
|
+
readonly parentPlaybackRate: number;
|
|
26
28
|
readonly fileName: string;
|
|
27
29
|
readonly initialDuration: number;
|
|
28
30
|
readonly maximumDuration: number;
|
|
@@ -31,6 +33,7 @@ export type TimelineSequenceDurationDragTarget = {
|
|
|
31
33
|
readonly schema: InteractivitySchema;
|
|
32
34
|
};
|
|
33
35
|
export type TimelineSequenceLeftEdgeDragTarget = {
|
|
36
|
+
readonly parentPlaybackRate: number;
|
|
34
37
|
readonly fileName: string;
|
|
35
38
|
readonly initialDuration: number;
|
|
36
39
|
readonly initialFrom: number;
|
|
@@ -42,6 +45,7 @@ export type TimelineSequenceLeftEdgeDragTarget = {
|
|
|
42
45
|
readonly schema: InteractivitySchema;
|
|
43
46
|
};
|
|
44
47
|
export type TimelineSequenceFromDragTarget = {
|
|
48
|
+
readonly parentPlaybackRate: number;
|
|
45
49
|
readonly canSnapToTimelineStart: boolean;
|
|
46
50
|
readonly minimumDeltaFrames: number;
|
|
47
51
|
readonly initialTimelineStart: number;
|
|
@@ -51,17 +55,6 @@ export type TimelineSequenceFromDragTarget = {
|
|
|
51
55
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
52
56
|
readonly sequenceKeyframes: TimelineSequenceKeyframeDragTarget[];
|
|
53
57
|
};
|
|
54
|
-
type TimelineSequenceKeyframeDragTarget = {
|
|
55
|
-
readonly fileName: string;
|
|
56
|
-
readonly fieldKey: string;
|
|
57
|
-
readonly isDescendant: boolean;
|
|
58
|
-
readonly nodePath: SequencePropsSubscriptionKey;
|
|
59
|
-
readonly schema: InteractivitySchema;
|
|
60
|
-
readonly status: CanUpdateSequencePropStatusKeyframed;
|
|
61
|
-
};
|
|
62
|
-
type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarget & {
|
|
63
|
-
readonly effectIndex: number;
|
|
64
|
-
};
|
|
65
58
|
export declare const isTransitionSeriesSequence: (sequence: TSequence) => boolean;
|
|
66
59
|
export declare const isCascadingSequence: (sequence: TSequence) => boolean;
|
|
67
60
|
export declare const isTimelineSequenceDurationDraggable: (sequence: TSequence) => boolean;
|
|
@@ -149,9 +142,12 @@ export declare const getTimelineSequenceFromDragTargets: ({ draggedNodePathInfo,
|
|
|
149
142
|
readonly propStatuses: PropStatuses;
|
|
150
143
|
}) => TimelineSequenceFromDragTarget[] | null;
|
|
151
144
|
export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticComponent<{
|
|
145
|
+
readonly cursor: "e-resize" | "ew-resize";
|
|
152
146
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
153
147
|
readonly windowWidth: number;
|
|
154
148
|
readonly timelineDurationInFrames: number;
|
|
149
|
+
readonly initialEdgeFrame: number;
|
|
150
|
+
readonly fps: number;
|
|
155
151
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
156
152
|
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
157
153
|
readonly selected: boolean;
|
|
@@ -165,12 +161,14 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
165
161
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
166
162
|
};
|
|
167
163
|
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
164
|
+
readonly cursor: "ew-resize" | "w-resize";
|
|
168
165
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
169
166
|
readonly mediaDurationDragLimits: TimelineSequenceMediaDurationDragLimits | null;
|
|
170
167
|
readonly windowWidth: number;
|
|
171
168
|
readonly timelineDurationInFrames: number;
|
|
169
|
+
readonly initialEdgeFrame: number;
|
|
170
|
+
readonly fps: number;
|
|
172
171
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
173
172
|
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
174
173
|
readonly selected: boolean;
|
|
175
174
|
}>;
|
|
176
|
-
export {};
|