@remotion/studio 4.0.526 → 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/Canvas.js +88 -26
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentAsset.js +4 -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 +4 -2
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +1 -0
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/common.js +1 -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/InspectorPanel/styles.js +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/InspectorSourceLocation.js +3 -0
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +11 -5
- 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 +4 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- 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 +19 -7
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
- 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 +25 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +3 -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/RendersTab.js +2 -0
- 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/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- 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/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -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/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +40 -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 +65 -21
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +46 -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/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- 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 +9 -95
- 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-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
- 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.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
- 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/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +18 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -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 +23 -40
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +8 -4
- package/dist/components/composition-menu-items.js +4 -4
- package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
- package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
- 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 +24 -8
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +3 -1
- package/dist/components/public-output-name.d.ts +1 -0
- package/dist/components/public-output-name.js +7 -3
- 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-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
- package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
- 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-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/index-890dd9b3.mjs +768 -0
- package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
- package/dist/esm/index-dfy1t576.mjs +129 -0
- package/dist/esm/index-dh3zk2hv.mjs +220 -0
- package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
- package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
- package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/internals.mjs +13 -10
- package/dist/esm/previewEntry.mjs +18 -12
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -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/copy-text.js +1 -16
- 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 +6 -5
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/open-in-editor.js +1 -1
- 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/studio-runtime-config.d.ts +1 -1
- 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-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +15 -9
- 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 +20 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/dist/state/timeline-zoom.js +4 -0
- 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/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
- package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
- 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
|
@@ -31,6 +31,7 @@ const computedContainerStyle = {
|
|
|
31
31
|
...InputDragger_1.inputDraggerContainerStyle,
|
|
32
32
|
textAlign: 'right',
|
|
33
33
|
userSelect: 'none',
|
|
34
|
+
WebkitUserSelect: 'none',
|
|
34
35
|
};
|
|
35
36
|
const computedValueStyle = {
|
|
36
37
|
color: colors_1.WHITE_ALPHA_40,
|
|
@@ -39,10 +40,12 @@ const computedValueStyle = {
|
|
|
39
40
|
fontStyle: 'italic',
|
|
40
41
|
lineHeight: '20px',
|
|
41
42
|
userSelect: 'none',
|
|
43
|
+
WebkitUserSelect: 'none',
|
|
42
44
|
};
|
|
43
45
|
const metadataFormatterStyle = {
|
|
44
46
|
fontSize: 13,
|
|
45
47
|
userSelect: 'none',
|
|
48
|
+
WebkitUserSelect: 'none',
|
|
46
49
|
};
|
|
47
50
|
const metadataDraggerStyles = {
|
|
48
51
|
durationInFrames: {
|
|
@@ -113,6 +116,7 @@ const metadataLabelText = {
|
|
|
113
116
|
overflow: 'hidden',
|
|
114
117
|
textOverflow: 'ellipsis',
|
|
115
118
|
userSelect: 'none',
|
|
119
|
+
WebkitUserSelect: 'none',
|
|
116
120
|
whiteSpace: 'nowrap',
|
|
117
121
|
};
|
|
118
122
|
const dimensionPresets = [
|
|
@@ -113,6 +113,7 @@ const EasingInspector = ({ selection }) => {
|
|
|
113
113
|
}
|
|
114
114
|
return (0, easing_inspector_selection_1.getEasingSelectionFromCurrentKeyframes)({
|
|
115
115
|
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
116
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
116
117
|
nodePathInfo: selection.nodePathInfo,
|
|
117
118
|
propStatus: easingUpdate.propStatus,
|
|
118
119
|
segmentIndex: easingUpdate.segmentIndex,
|
|
@@ -123,6 +124,7 @@ const EasingInspector = ({ selection }) => {
|
|
|
123
124
|
: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
124
125
|
propStatus: easingUpdate.propStatus,
|
|
125
126
|
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
127
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
126
128
|
});
|
|
127
129
|
const state = (0, react_1.useMemo)(() => {
|
|
128
130
|
if (initialEasing === null || currentEasingSelection === null) {
|
|
@@ -154,7 +156,8 @@ const EasingInspector = ({ selection }) => {
|
|
|
154
156
|
previewServerState.type !== 'connected') {
|
|
155
157
|
return;
|
|
156
158
|
}
|
|
157
|
-
const sourceFrame = timelinePosition - easingKeyframeDisplayOffset
|
|
159
|
+
const sourceFrame = (timelinePosition - easingKeyframeDisplayOffset) *
|
|
160
|
+
track.keyframePlaybackRate;
|
|
158
161
|
const value = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
159
162
|
propStatus: easingUpdate.propStatus,
|
|
160
163
|
dragOverrideValue: easingDetails.dragOverrideValue,
|
|
@@ -208,7 +211,8 @@ const EasingInspector = ({ selection }) => {
|
|
|
208
211
|
const renderHeader = (0, react_1.useCallback)(() => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
209
212
|
jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: fieldLabel }), easingUpdate === null || track === null ? null : (jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: currentEasingSelection !== null && currentEasingSelection !== void 0 ? currentEasingSelection : selection, includeEasings: true, keyframes: easingUpdate.propStatus.keyframes.map((keyframe) => ({
|
|
210
213
|
...keyframe,
|
|
211
|
-
frame: keyframe.frame +
|
|
214
|
+
frame: keyframe.frame / track.keyframePlaybackRate +
|
|
215
|
+
easingKeyframeDisplayOffset,
|
|
212
216
|
})), nodePathInfo: selection.nodePathInfo }))] })), [
|
|
213
217
|
currentEasingSelection,
|
|
214
218
|
easingUpdate,
|
|
@@ -45,6 +45,7 @@ const elementLibraryDropdownLabelStyle = {
|
|
|
45
45
|
textAlign: 'left',
|
|
46
46
|
textOverflow: 'ellipsis',
|
|
47
47
|
userSelect: 'none',
|
|
48
|
+
WebkitUserSelect: 'none',
|
|
48
49
|
whiteSpace: 'nowrap',
|
|
49
50
|
};
|
|
50
51
|
const elementLibraryDropdownCaretStyle = {
|
|
@@ -81,7 +82,7 @@ const ElementLibraryButton = () => {
|
|
|
81
82
|
segmentId: 'element-library',
|
|
82
83
|
selectedId: null,
|
|
83
84
|
style: elementLibraryDropdownSegmentStyle,
|
|
84
|
-
title: 'Choose an Element
|
|
85
|
+
title: 'Choose an Element Library to browse inside Studio.',
|
|
85
86
|
tooltipLabel: null,
|
|
86
87
|
type: 'menu',
|
|
87
88
|
values: [
|
|
@@ -98,7 +98,7 @@ const TimelineNavigatorItem = ({ extendLineLeft, extendLineRight, item, onSelect
|
|
|
98
98
|
};
|
|
99
99
|
const KeyframeEasingNavigator = ({ currentSelection, includeEasings, keyframes, nodePathInfo }) => {
|
|
100
100
|
const { isSelected, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
101
|
-
const setFrame = remotion_1.Internals.
|
|
101
|
+
const setFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
|
|
102
102
|
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
103
103
|
const items = (0, react_1.useMemo)(() => (0, keyframe_easing_navigator_items_1.getKeyframeEasingNavigatorItems)({
|
|
104
104
|
includeEasings,
|
|
@@ -12,9 +12,7 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
|
12
12
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
13
13
|
const call_delete_keyframe_1 = require("../Timeline/call-delete-keyframe");
|
|
14
14
|
const call_move_keyframe_1 = require("../Timeline/call-move-keyframe");
|
|
15
|
-
const get_easing_selection_after_keyframe_delete_1 = require("../Timeline/get-easing-selection-after-keyframe-delete");
|
|
16
15
|
const get_timeline_keyframes_1 = require("../Timeline/get-timeline-keyframes");
|
|
17
|
-
const imperative_state_1 = require("../Timeline/imperative-state");
|
|
18
16
|
const parse_keyframe_field_from_node_path_1 = require("../Timeline/parse-keyframe-field-from-node-path");
|
|
19
17
|
const TimelineEffectPropItem_1 = require("../Timeline/TimelineEffectPropItem");
|
|
20
18
|
const TimelineSelection_1 = require("../Timeline/TimelineSelection");
|
|
@@ -80,7 +78,7 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
80
78
|
return null;
|
|
81
79
|
}
|
|
82
80
|
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
83
|
-
const { keyframeDisplayOffset } = track;
|
|
81
|
+
const { keyframeDisplayOffset, keyframePlaybackRate } = track;
|
|
84
82
|
if (keyframeField.type === 'sequence') {
|
|
85
83
|
const sequenceFields = (0, timeline_layout_1.getFieldsToShow)({
|
|
86
84
|
schema: track.sequence.controls.schema,
|
|
@@ -100,18 +98,25 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
100
98
|
field: sequenceField,
|
|
101
99
|
fieldLabel: (_d = sequenceField.description) !== null && _d !== void 0 ? _d : sequenceField.key,
|
|
102
100
|
fileName: nodePath.absolutePath,
|
|
101
|
+
keyframePlaybackRate,
|
|
103
102
|
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
104
103
|
propStatus: sequencePropStatus,
|
|
105
104
|
keyframeDisplayOffset,
|
|
105
|
+
keyframePlaybackRate,
|
|
106
106
|
}),
|
|
107
107
|
nodePath,
|
|
108
108
|
propStatus: sequencePropStatus,
|
|
109
109
|
schema: track.sequence.controls.schema,
|
|
110
|
-
sourceFrame:
|
|
111
|
-
|
|
110
|
+
sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
111
|
+
displayFrame: selection.frame,
|
|
112
|
+
propStatus: sequencePropStatus,
|
|
113
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
112
114
|
propStatus: sequencePropStatus,
|
|
113
115
|
keyframeDisplayOffset,
|
|
116
|
+
keyframePlaybackRate,
|
|
114
117
|
}),
|
|
118
|
+
keyframePlaybackRate,
|
|
119
|
+
}),
|
|
115
120
|
};
|
|
116
121
|
}
|
|
117
122
|
const effect = track.sequence.effects[keyframeField.effectIndex];
|
|
@@ -143,18 +148,25 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
143
148
|
field: effectField,
|
|
144
149
|
fieldLabel: (_g = effectField.description) !== null && _g !== void 0 ? _g : effectField.key,
|
|
145
150
|
fileName: nodePath.absolutePath,
|
|
151
|
+
keyframePlaybackRate,
|
|
146
152
|
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
147
153
|
propStatus: effectPropStatus,
|
|
148
154
|
keyframeDisplayOffset,
|
|
155
|
+
keyframePlaybackRate,
|
|
149
156
|
}),
|
|
150
157
|
nodePath,
|
|
151
158
|
propStatus: effectPropStatus,
|
|
152
159
|
schema: effect.schema,
|
|
153
|
-
sourceFrame:
|
|
154
|
-
|
|
160
|
+
sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
161
|
+
displayFrame: selection.frame,
|
|
162
|
+
propStatus: effectPropStatus,
|
|
163
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
155
164
|
propStatus: effectPropStatus,
|
|
156
165
|
keyframeDisplayOffset,
|
|
166
|
+
keyframePlaybackRate,
|
|
157
167
|
}),
|
|
168
|
+
keyframePlaybackRate,
|
|
169
|
+
}),
|
|
158
170
|
validatedLocation: {
|
|
159
171
|
source: nodePath.absolutePath,
|
|
160
172
|
line: 1,
|
|
@@ -188,9 +200,11 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
188
200
|
if (details === null) {
|
|
189
201
|
return;
|
|
190
202
|
}
|
|
191
|
-
const toFrame = (0,
|
|
203
|
+
const toFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
192
204
|
displayFrame,
|
|
193
205
|
keyframeDisplayOffset: details.keyframeDisplayOffset,
|
|
206
|
+
keyframePlaybackRate: details.keyframePlaybackRate,
|
|
207
|
+
propStatus: details.propStatus,
|
|
194
208
|
});
|
|
195
209
|
if (displayFrame === selection.frame || toFrame === details.sourceFrame) {
|
|
196
210
|
clearFrameDragOverride(details);
|
|
@@ -227,9 +241,11 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
227
241
|
durationInFrames: videoConfig.durationInFrames,
|
|
228
242
|
frame: value,
|
|
229
243
|
});
|
|
230
|
-
const toFrame = (0,
|
|
244
|
+
const toFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
231
245
|
displayFrame,
|
|
232
246
|
keyframeDisplayOffset: details.keyframeDisplayOffset,
|
|
247
|
+
keyframePlaybackRate: details.keyframePlaybackRate,
|
|
248
|
+
propStatus: details.propStatus,
|
|
233
249
|
});
|
|
234
250
|
setDraftFrame(displayFrame);
|
|
235
251
|
clearFrameDragOverride(details);
|
|
@@ -289,19 +305,7 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
289
305
|
if (details === null || previewServerState.type !== 'connected') {
|
|
290
306
|
return;
|
|
291
307
|
}
|
|
292
|
-
|
|
293
|
-
? (0, get_easing_selection_after_keyframe_delete_1.getEasingSelectionAfterKeyframeDelete)({
|
|
294
|
-
deletedSourceFrames: [details.sourceFrame],
|
|
295
|
-
keyframeDisplayOffset: details.keyframeDisplayOffset,
|
|
296
|
-
nodePathInfo: selection.nodePathInfo,
|
|
297
|
-
propStatus: details.propStatus,
|
|
298
|
-
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
299
|
-
})
|
|
300
|
-
: null;
|
|
301
|
-
if (easingSelection !== null) {
|
|
302
|
-
selectItems([easingSelection], { reveal: true });
|
|
303
|
-
}
|
|
304
|
-
else if (parentSelection !== null) {
|
|
308
|
+
if (parentSelection !== null) {
|
|
305
309
|
selectItems([parentSelection], { reveal: true });
|
|
306
310
|
}
|
|
307
311
|
if (details.type === 'sequence') {
|
|
@@ -331,7 +335,6 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
331
335
|
parentSelection,
|
|
332
336
|
previewServerState,
|
|
333
337
|
selectItems,
|
|
334
|
-
selection.nodePathInfo,
|
|
335
338
|
setPropStatuses,
|
|
336
339
|
]);
|
|
337
340
|
if (details === null || track === null) {
|
|
@@ -340,7 +343,8 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
340
343
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
341
344
|
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: details.fieldLabel }), jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: selection, includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction), keyframes: details.propStatus.keyframes.map((keyframe) => ({
|
|
342
345
|
...keyframe,
|
|
343
|
-
frame: keyframe.frame
|
|
346
|
+
frame: keyframe.frame / details.keyframePlaybackRate +
|
|
347
|
+
details.keyframeDisplayOffset,
|
|
344
348
|
})), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
|
|
345
349
|
jsx_runtime_1.jsxs("div", { style: styles_1.detailsBeforeInlineAction, children: [
|
|
346
350
|
jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorRow, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: details.fieldLabel, children: jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame, runtimeValueStore: null })) }) }) })
|
|
@@ -7,11 +7,14 @@ const react_1 = require("react");
|
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
10
|
+
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
10
11
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
12
|
+
const scissors_1 = require("../../icons/scissors");
|
|
11
13
|
const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
|
|
12
14
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
13
15
|
const layout_1 = require("../layout");
|
|
14
16
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
17
|
+
const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
|
|
15
18
|
const TimelineRowLayoutContext_1 = require("../Timeline/TimelineRowLayoutContext");
|
|
16
19
|
const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
|
|
17
20
|
const common_1 = require("./common");
|
|
@@ -28,8 +31,14 @@ const selectionCountStyle = {
|
|
|
28
31
|
textOverflow: 'ellipsis',
|
|
29
32
|
whiteSpace: 'nowrap',
|
|
30
33
|
};
|
|
34
|
+
const actionIconStyle = {
|
|
35
|
+
display: 'block',
|
|
36
|
+
height: 16,
|
|
37
|
+
width: 16,
|
|
38
|
+
};
|
|
31
39
|
const MultiSequenceInspector = ({ selections, readOnlyStudio }) => {
|
|
32
40
|
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
41
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
33
42
|
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
34
43
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
35
44
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
@@ -93,11 +102,33 @@ const MultiSequenceInspector = ({ selections, readOnlyStudio }) => {
|
|
|
93
102
|
});
|
|
94
103
|
return ((_a = allFields[0]) !== null && _a !== void 0 ? _a : []).filter((field) => allFields.every((candidate) => candidate.some((other) => other.key === field.key && other.fieldSchema === field.fieldSchema)));
|
|
95
104
|
}, [getDragOverrides, propStatuses, runtimeValues, targets]);
|
|
105
|
+
const canSplit = !readOnlyStudio && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
106
|
+
const onSplit = (0, react_1.useCallback)(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
if (!canSplit) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
(_a = (0, split_selected_timeline_item_1.splitSelectedTimelineItems)({
|
|
112
|
+
selections,
|
|
113
|
+
sequences,
|
|
114
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
115
|
+
propStatuses,
|
|
116
|
+
splitFrame: timelinePosition,
|
|
117
|
+
})) === null || _a === void 0 ? void 0 : _a.catch(() => undefined);
|
|
118
|
+
}, [
|
|
119
|
+
canSplit,
|
|
120
|
+
overrideIdToNodePathMappings,
|
|
121
|
+
propStatuses,
|
|
122
|
+
selections,
|
|
123
|
+
sequences,
|
|
124
|
+
timelinePosition,
|
|
125
|
+
]);
|
|
96
126
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
97
127
|
jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { padding: "4px 0", children: jsx_runtime_1.jsxs("div", { style: selectionCountStyle, children: [selections.length, " sequences selected"] }) }), jsx_runtime_1.jsx("div", { role: "separator", style: styles_1.sequenceHeaderDivider }), targets === null ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence controls unavailable" })) : fields.length === 0 ? (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "No shared controls" })) : (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: timeline_layout_1.SCHEMA_FIELD_GROUPS.map((group) => {
|
|
98
128
|
const groupedFields = fields.filter((field) => field.group === group.id);
|
|
99
129
|
return groupedFields.length === 0 ? null : (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: group.label, sectionId: `multi-sequence-${group.id}`, children: groupedFields.map((field) => (jsx_runtime_1.jsx(MultiSequenceField_1.MultiSequenceField, { field: field, targets: targets, readOnlyStudio: readOnlyStudio }, JSON.stringify(targets.map((target) => target.nodePath)) +
|
|
100
130
|
field.key))) }, group.id));
|
|
101
|
-
}) }))
|
|
131
|
+
}) })), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "multi-sequence-actions", children: jsx_runtime_1.jsx(common_1.InspectorQuickActionsSection, { children: jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canSplit, onClick: onSplit, title: canSplit ? undefined : 'Studio is read-only', renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split selected" }) }) })
|
|
132
|
+
] }));
|
|
102
133
|
};
|
|
103
134
|
exports.MultiSequenceInspector = MultiSequenceInspector;
|
|
@@ -63,7 +63,7 @@ const NumericAxis = ({ field, values, axis, onPreview, onSave, onClear }) => {
|
|
|
63
63
|
}
|
|
64
64
|
}, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : coordinates[0], "aria-label": axis === null
|
|
65
65
|
? ((_d = field.description) !== null && _d !== void 0 ? _d : field.key)
|
|
66
|
-
: `Offset ${['X', 'Y', 'Z'][axis]}`, title: "Type to set all values; drag to adjust each value", status: "ok", small: true, rightAlign: false, min: min, max: max, step: step, snapToStep: axis === null, dragDecimalPlaces: decimalPlaces, dragSensitivity: axis === null ? 1 : 3, buttonStyle: { paddingLeft: 0 }, style: { width: 70 }, formatter: (value) => mixed && dragValue === null
|
|
66
|
+
: `Offset ${['X', 'Y', 'Z'][axis]}`, title: "Type to set all values; drag to adjust each value", status: "ok", small: true, rightAlign: false, min: min, max: max, step: step, allowStepMismatch: true, integerOnly: schema.type === 'number' && schema.integer === true, snapToStep: axis === null, dragDecimalPlaces: decimalPlaces, dragSensitivity: axis === null ? 1 : 3, buttonStyle: { paddingLeft: 0 }, style: { width: 70 }, formatter: (value) => mixed && dragValue === null
|
|
67
67
|
? 'Mixed'
|
|
68
68
|
: (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({ fieldSchema: schema, value }), onTextChange: noop_1.noop, onValueChange: (value, source) => {
|
|
69
69
|
var _a;
|
|
@@ -6,7 +6,9 @@ type SequenceInspectorSourceLocation = {
|
|
|
6
6
|
readonly openFileLocation: () => void;
|
|
7
7
|
readonly validatedLocation: CodePosition | null;
|
|
8
8
|
};
|
|
9
|
-
export declare const useSequenceInspectorSourceLocation: (sequence: import("remotion").TSequence
|
|
9
|
+
export declare const useSequenceInspectorSourceLocation: (sequence: import("remotion").TSequence & {
|
|
10
|
+
loopDisplay: import("@remotion/canvas").TimelineLoopDisplay | undefined;
|
|
11
|
+
}) => SequenceInspectorSourceLocation;
|
|
10
12
|
export declare const SequenceInspectorHeader: React.FC<{
|
|
11
13
|
readonly sourceLocation: SequenceInspectorSourceLocation;
|
|
12
14
|
readonly track: TimelineTrackData;
|
|
@@ -6,15 +6,20 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
8
8
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
9
|
+
const use_media_metadata_1 = require("../../helpers/use-media-metadata");
|
|
9
10
|
const audio_1 = require("../../icons/audio");
|
|
11
|
+
const background_removal_1 = require("../../icons/background-removal");
|
|
10
12
|
const duplicate_1 = require("../../icons/duplicate");
|
|
11
13
|
const scissors_1 = require("../../icons/scissors");
|
|
12
14
|
const snowflake_1 = require("../../icons/snowflake");
|
|
15
|
+
const transcription_1 = require("../../icons/transcription");
|
|
13
16
|
const trash_1 = require("../../icons/trash");
|
|
17
|
+
const modals_1 = require("../../state/modals");
|
|
14
18
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
15
19
|
const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
|
|
16
20
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
17
21
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
22
|
+
const public_output_name_1 = require("../public-output-name");
|
|
18
23
|
const split_video_from_audio_api_1 = require("../split-video-from-audio-api");
|
|
19
24
|
const duplicate_selected_timeline_item_1 = require("../Timeline/duplicate-selected-timeline-item");
|
|
20
25
|
const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
|
|
@@ -26,6 +31,7 @@ const CollapsibleInspectorSection_1 = require("./CollapsibleInspectorSection");
|
|
|
26
31
|
const common_1 = require("./common");
|
|
27
32
|
const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
|
|
28
33
|
const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
|
|
34
|
+
const SequenceWrapAction_1 = require("./SequenceWrapAction");
|
|
29
35
|
const styles_1 = require("./styles");
|
|
30
36
|
const use_track_for_selection_1 = require("./use-track-for-selection");
|
|
31
37
|
const actionIconStyle = {
|
|
@@ -70,8 +76,10 @@ const SplitSequenceQuickAction = ({ selection, track }) => {
|
|
|
70
76
|
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canSplit, onClick: onSplit, title: disabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split clip" }));
|
|
71
77
|
};
|
|
72
78
|
const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
|
|
79
|
+
var _a;
|
|
73
80
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
74
81
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
82
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
75
83
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
76
84
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
77
85
|
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
@@ -90,6 +98,66 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
|
|
|
90
98
|
validatedSource,
|
|
91
99
|
});
|
|
92
100
|
const sourceActionsDisabled = previewServerState.type !== 'connected' || !(0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
101
|
+
const mediaSequence = track.sequence.type === 'video' || track.sequence.type === 'audio'
|
|
102
|
+
? track.sequence
|
|
103
|
+
: null;
|
|
104
|
+
const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)((_a = mediaSequence === null || mediaSequence === void 0 ? void 0 : mediaSequence.src) !== null && _a !== void 0 ? _a : null);
|
|
105
|
+
const transcriptionDisabledReason = sourceActionsDisabled
|
|
106
|
+
? 'Studio is read-only'
|
|
107
|
+
: selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
|
|
108
|
+
? 'Programmatically duplicated media cannot be transcribed from source'
|
|
109
|
+
: undefined;
|
|
110
|
+
const videoMattingDisabledReason = sourceActionsDisabled
|
|
111
|
+
? 'Studio is read-only'
|
|
112
|
+
: selection.nodePathInfo.numberOfSequencesWithThisNodePath > 1
|
|
113
|
+
? 'Programmatically duplicated videos cannot have their background removed from source'
|
|
114
|
+
: undefined;
|
|
115
|
+
const onGenerateCaptions = (0, react_1.useCallback)(() => {
|
|
116
|
+
if (transcriptionDisabledReason !== undefined || mediaSequence === null) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
120
|
+
setSelectedModal({
|
|
121
|
+
type: 'transcribe',
|
|
122
|
+
src: mediaSequence.src,
|
|
123
|
+
displayName: (0, public_output_name_1.getMediaFileName)(mediaSequence.src, mediaSequence.displayName),
|
|
124
|
+
audioStreamIndex: null,
|
|
125
|
+
requestInit: null,
|
|
126
|
+
target: {
|
|
127
|
+
fileName: nodePath.absolutePath,
|
|
128
|
+
nodePath,
|
|
129
|
+
durationInFrames: Number.isFinite(mediaSequence.duration)
|
|
130
|
+
? mediaSequence.duration
|
|
131
|
+
: null,
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
}, [
|
|
135
|
+
selection.nodePathInfo,
|
|
136
|
+
setSelectedModal,
|
|
137
|
+
mediaSequence,
|
|
138
|
+
transcriptionDisabledReason,
|
|
139
|
+
]);
|
|
140
|
+
const onRemoveBackground = (0, react_1.useCallback)(() => {
|
|
141
|
+
if (videoMattingDisabledReason !== undefined ||
|
|
142
|
+
track.sequence.type !== 'video') {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
|
|
146
|
+
setSelectedModal({
|
|
147
|
+
type: 'video-matting',
|
|
148
|
+
src: track.sequence.src,
|
|
149
|
+
displayName: (0, public_output_name_1.getMediaFileName)(track.sequence.src, track.sequence.displayName),
|
|
150
|
+
target: {
|
|
151
|
+
fileName: nodePath.absolutePath,
|
|
152
|
+
nodePath,
|
|
153
|
+
},
|
|
154
|
+
});
|
|
155
|
+
}, [
|
|
156
|
+
selection.nodePathInfo,
|
|
157
|
+
setSelectedModal,
|
|
158
|
+
track.sequence,
|
|
159
|
+
videoMattingDisabledReason,
|
|
160
|
+
]);
|
|
93
161
|
const onDuplicate = (0, react_1.useCallback)(() => {
|
|
94
162
|
if (sourceActionsDisabled) {
|
|
95
163
|
return;
|
|
@@ -125,7 +193,7 @@ const SequenceSourceQuickActions = ({ selection, track, validatedSource }) => {
|
|
|
125
193
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
126
194
|
});
|
|
127
195
|
}, [selection.nodePathInfo, splitVideoFromAudioDisabledReason]);
|
|
128
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: splitVideoFromAudioDisabledReason !== undefined, onClick: onSplitVideoFromAudio, title: splitVideoFromAudioDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(audio_1.AudioIcon, { style: actionIconStyle, color: color })), children: "Split video from audio" })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
|
|
196
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: videoMattingDisabledReason !== undefined, onClick: onRemoveBackground, title: videoMattingDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(background_removal_1.BackgroundRemovalIcon, { style: actionIconStyle, color: color })), children: "Remove background" })) : null, track.sequence.type === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: splitVideoFromAudioDisabledReason !== undefined, onClick: onSplitVideoFromAudio, title: splitVideoFromAudioDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(audio_1.AudioIcon, { style: actionIconStyle, color: color })), children: "Split video from audio" })) : null, mediaSequence !== null && (mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.hasAudioTrack) !== false ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: transcriptionDisabledReason !== undefined, onClick: onGenerateCaptions, title: transcriptionDisabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { style: actionIconStyle, color: color })), children: "Generate captions" })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(SequenceWrapAction_1.SequenceWrapAction, { nodePathInfo: selection.nodePathInfo, sequence: track.sequence, sourceActionsDisabled: sourceActionsDisabled }), jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
|
|
129
197
|
};
|
|
130
198
|
const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
|
|
131
199
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -170,7 +238,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
|
|
|
170
238
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
|
|
171
239
|
}
|
|
172
240
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
|
|
173
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "sequence-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
|
|
241
|
+
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, keyframePlaybackRate: track.keyframePlaybackRate, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "sequence-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
|
|
174
242
|
jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
|
|
175
243
|
] }) })
|
|
176
244
|
] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
+
import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
|
+
export declare const SequenceWrapAction: React.FC<{
|
|
5
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
6
|
+
readonly sequence: TimelineTrackData['sequence'];
|
|
7
|
+
readonly sourceActionsDisabled: boolean;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SequenceWrapAction = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
|
+
const caret_1 = require("../../icons/caret");
|
|
9
|
+
const wrap_1 = require("../../icons/wrap");
|
|
10
|
+
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
11
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
12
|
+
const SegmentedButton_1 = require("../SegmentedButton");
|
|
13
|
+
const wrap_jsx_node_api_1 = require("../wrap-jsx-node-api");
|
|
14
|
+
const wrapperNames = ['AbsoluteFill', 'Sequence', 'HtmlInCanvas'];
|
|
15
|
+
const buttonStyle = {
|
|
16
|
+
borderRadius: 4,
|
|
17
|
+
height: 28,
|
|
18
|
+
margin: '0 4px',
|
|
19
|
+
width: 'calc(100% - 8px)',
|
|
20
|
+
};
|
|
21
|
+
const segmentStyle = {
|
|
22
|
+
fontSize: 13,
|
|
23
|
+
gap: 8,
|
|
24
|
+
justifyContent: 'flex-start',
|
|
25
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
|
|
26
|
+
width: '100%',
|
|
27
|
+
};
|
|
28
|
+
const iconStyle = { height: 22, width: 22 };
|
|
29
|
+
const iconContainerStyle = {
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
height: 22,
|
|
32
|
+
marginLeft: -2,
|
|
33
|
+
marginRight: -2,
|
|
34
|
+
width: 22,
|
|
35
|
+
};
|
|
36
|
+
const labelStyle = {
|
|
37
|
+
flex: 1,
|
|
38
|
+
fontFamily: 'sans-serif',
|
|
39
|
+
fontSize: 13,
|
|
40
|
+
lineHeight: '18px',
|
|
41
|
+
minWidth: 0,
|
|
42
|
+
overflow: 'hidden',
|
|
43
|
+
textAlign: 'left',
|
|
44
|
+
textOverflow: 'ellipsis',
|
|
45
|
+
userSelect: 'none',
|
|
46
|
+
WebkitUserSelect: 'none',
|
|
47
|
+
whiteSpace: 'nowrap',
|
|
48
|
+
};
|
|
49
|
+
const caretStyle = {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexShrink: 0,
|
|
52
|
+
height: 12,
|
|
53
|
+
width: 12,
|
|
54
|
+
};
|
|
55
|
+
const SequenceWrapAction = ({ nodePathInfo, sequence, sourceActionsDisabled }) => {
|
|
56
|
+
const { width, height } = (0, remotion_1.useVideoConfig)();
|
|
57
|
+
const nodePathKey = JSON.stringify(nodePathInfo.sequenceSubscriptionKey);
|
|
58
|
+
const [eligibility, setEligibility] = (0, react_1.useState)(null);
|
|
59
|
+
const [busy, setBusy] = (0, react_1.useState)(false);
|
|
60
|
+
(0, react_1.useEffect)(() => {
|
|
61
|
+
setEligibility(null);
|
|
62
|
+
if (sourceActionsDisabled) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
let cancelled = false;
|
|
66
|
+
const nodePath = JSON.parse(nodePathKey);
|
|
67
|
+
(0, wrap_jsx_node_api_1.wrapJsxNode)({
|
|
68
|
+
fileName: nodePath.absolutePath,
|
|
69
|
+
nodePath: nodePath.nodePath,
|
|
70
|
+
wrapper: null,
|
|
71
|
+
width: null,
|
|
72
|
+
height: null,
|
|
73
|
+
})
|
|
74
|
+
.then((result) => {
|
|
75
|
+
if (!cancelled && result.success) {
|
|
76
|
+
setEligibility({
|
|
77
|
+
canWrap: result.canWrap,
|
|
78
|
+
canWrapHtmlInCanvas: result.canWrapHtmlInCanvas,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
})
|
|
82
|
+
.catch(() => undefined);
|
|
83
|
+
return () => {
|
|
84
|
+
cancelled = true;
|
|
85
|
+
};
|
|
86
|
+
}, [nodePathKey, sequence, sourceActionsDisabled]);
|
|
87
|
+
const onWrap = (0, react_1.useCallback)((wrapper) => {
|
|
88
|
+
if (busy || sourceActionsDisabled || !(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrap)) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
setBusy(true);
|
|
92
|
+
const nodePath = JSON.parse(nodePathKey);
|
|
93
|
+
(0, wrap_jsx_node_api_1.wrapJsxNode)({
|
|
94
|
+
fileName: nodePath.absolutePath,
|
|
95
|
+
nodePath: nodePath.nodePath,
|
|
96
|
+
wrapper,
|
|
97
|
+
width,
|
|
98
|
+
height,
|
|
99
|
+
})
|
|
100
|
+
.then((result) => {
|
|
101
|
+
if (!result.success) {
|
|
102
|
+
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
.catch((error) => {
|
|
106
|
+
(0, NotificationCenter_1.showNotification)(error.message, 4000);
|
|
107
|
+
})
|
|
108
|
+
.finally(() => setBusy(false));
|
|
109
|
+
}, [busy, eligibility, height, nodePathKey, sourceActionsDisabled, width]);
|
|
110
|
+
const values = (0, react_1.useMemo)(() => wrapperNames.map((wrapper) => ({
|
|
111
|
+
type: 'item',
|
|
112
|
+
id: wrapper,
|
|
113
|
+
label: `<${wrapper}>`,
|
|
114
|
+
value: wrapper,
|
|
115
|
+
onClick: () => onWrap(wrapper),
|
|
116
|
+
keyHint: null,
|
|
117
|
+
leftItem: null,
|
|
118
|
+
subMenu: null,
|
|
119
|
+
quickSwitcherLabel: null,
|
|
120
|
+
disabled: busy ||
|
|
121
|
+
(wrapper === 'HtmlInCanvas' &&
|
|
122
|
+
(!(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrapHtmlInCanvas) || !(0, remotion_1.isHtmlInCanvasSupported)())),
|
|
123
|
+
})), [busy, eligibility, onWrap]);
|
|
124
|
+
const segments = (0, react_1.useMemo)(() => [
|
|
125
|
+
{
|
|
126
|
+
ariaLabel: 'Wrap',
|
|
127
|
+
buttonId: null,
|
|
128
|
+
disabled: busy,
|
|
129
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
130
|
+
leaveLeftSpace: false,
|
|
131
|
+
onOpenChange: null,
|
|
132
|
+
renderContent: (color) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
133
|
+
jsx_runtime_1.jsx("span", { style: iconContainerStyle, children: jsx_runtime_1.jsx(wrap_1.WrapIcon, { color: color, style: iconStyle }) }), jsx_runtime_1.jsx("span", { style: labelStyle, children: "Wrap" }), jsx_runtime_1.jsx("span", { style: caretStyle, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }) })
|
|
134
|
+
] })),
|
|
135
|
+
segmentId: 'wrap',
|
|
136
|
+
selectedId: null,
|
|
137
|
+
style: segmentStyle,
|
|
138
|
+
title: nodePathInfo.numberOfSequencesWithThisNodePath > 1
|
|
139
|
+
? `Wrap all ${nodePathInfo.numberOfSequencesWithThisNodePath} instances of this JSX element`
|
|
140
|
+
: 'Wrap this JSX element',
|
|
141
|
+
tooltipLabel: null,
|
|
142
|
+
type: 'menu',
|
|
143
|
+
values,
|
|
144
|
+
},
|
|
145
|
+
], [busy, nodePathInfo.numberOfSequencesWithThisNodePath, values]);
|
|
146
|
+
if (!(eligibility === null || eligibility === void 0 ? void 0 : eligibility.canWrap) || sourceActionsDisabled) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return (jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: buttonStyle, title: null }));
|
|
150
|
+
};
|
|
151
|
+
exports.SequenceWrapAction = SequenceWrapAction;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CanUpdateSequencePropStatusKeyframed } from 'remotion';
|
|
2
2
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
-
export declare const getEasingSelectionFromCurrentKeyframes: ({ keyframeDisplayOffset, nodePathInfo, propStatus, segmentIndex, }: {
|
|
3
|
+
export declare const getEasingSelectionFromCurrentKeyframes: ({ keyframeDisplayOffset, keyframePlaybackRate, nodePathInfo, propStatus, segmentIndex, }: {
|
|
4
4
|
readonly keyframeDisplayOffset: number;
|
|
5
|
+
readonly keyframePlaybackRate: number;
|
|
5
6
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
6
7
|
readonly propStatus: CanUpdateSequencePropStatusKeyframed;
|
|
7
8
|
readonly segmentIndex: number;
|