@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
|
@@ -7,6 +7,7 @@ const selected_outline_geometry_1 = require("./selected-outline-geometry");
|
|
|
7
7
|
const selected_outline_measurement_1 = require("./selected-outline-measurement");
|
|
8
8
|
const selected_outline_types_1 = require("./selected-outline-types");
|
|
9
9
|
const selected_outline_uv_1 = require("./selected-outline-uv");
|
|
10
|
+
const get_timeline_keyframes_1 = require("./Timeline/get-timeline-keyframes");
|
|
10
11
|
const timeline_field_utils_1 = require("./Timeline/timeline-field-utils");
|
|
11
12
|
const timeline_rotation_utils_1 = require("./Timeline/timeline-rotation-utils");
|
|
12
13
|
const timeline_translate_utils_1 = require("./Timeline/timeline-translate-utils");
|
|
@@ -27,7 +28,12 @@ const getSelectedOutlineDragStates = ({ dragTargets, getDragOverrides, timelineP
|
|
|
27
28
|
return dragTargets.map((target) => {
|
|
28
29
|
var _a;
|
|
29
30
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.translateFieldKey];
|
|
30
|
-
const sourceFrame =
|
|
31
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
32
|
+
displayFrame: timelinePosition,
|
|
33
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
34
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
35
|
+
propStatus: target.propStatus,
|
|
36
|
+
});
|
|
31
37
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
32
38
|
propStatus: target.propStatus,
|
|
33
39
|
dragOverrideValue,
|
|
@@ -193,7 +199,7 @@ const getSelectedOutlineCropDragChanges = ({ dimensions, target, values, }) => {
|
|
|
193
199
|
fileName: target.nodePath.absolutePath,
|
|
194
200
|
nodePath: target.nodePath,
|
|
195
201
|
fieldKey,
|
|
196
|
-
sourceFrame: target.sourceFrame,
|
|
202
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, field.propStatus),
|
|
197
203
|
value,
|
|
198
204
|
schema: target.schema,
|
|
199
205
|
clientId: target.clientId,
|
|
@@ -318,7 +324,12 @@ const getSelectedOutlineScaleDragStates = ({ dragTargets, getDragOverrides, time
|
|
|
318
324
|
return dragTargets.map((target) => {
|
|
319
325
|
var _a;
|
|
320
326
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.scaleFieldKey];
|
|
321
|
-
const sourceFrame =
|
|
327
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
328
|
+
displayFrame: timelinePosition,
|
|
329
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
330
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
331
|
+
propStatus: target.propStatus,
|
|
332
|
+
});
|
|
322
333
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
323
334
|
propStatus: target.propStatus,
|
|
324
335
|
dragOverrideValue,
|
|
@@ -427,7 +438,12 @@ const getSelectedOutlineRotationDragStates = ({ dragTargets, getDragOverrides, t
|
|
|
427
438
|
return dragTargets.map((target) => {
|
|
428
439
|
var _a;
|
|
429
440
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.rotateFieldKey];
|
|
430
|
-
const sourceFrame =
|
|
441
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
442
|
+
displayFrame: timelinePosition,
|
|
443
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
444
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
445
|
+
propStatus: target.propStatus,
|
|
446
|
+
});
|
|
431
447
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
432
448
|
propStatus: target.propStatus,
|
|
433
449
|
dragOverrideValue,
|
|
@@ -627,7 +643,7 @@ const getSelectedOutlineTransformOriginDragChanges = ({ target, startTranslate,
|
|
|
627
643
|
fileName: target.nodePath.absolutePath,
|
|
628
644
|
nodePath: target.nodePath,
|
|
629
645
|
fieldKey: selected_outline_types_1.transformOriginFieldKey,
|
|
630
|
-
sourceFrame: target.sourceFrame,
|
|
646
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, target.originPropStatus),
|
|
631
647
|
value: origin,
|
|
632
648
|
schema: target.schema,
|
|
633
649
|
});
|
|
@@ -666,7 +682,7 @@ const getSelectedOutlineTransformOriginDragChanges = ({ target, startTranslate,
|
|
|
666
682
|
fileName: target.nodePath.absolutePath,
|
|
667
683
|
nodePath: target.nodePath,
|
|
668
684
|
fieldKey: selected_outline_types_1.translateFieldKey,
|
|
669
|
-
sourceFrame: target.sourceFrame,
|
|
685
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, target.translatePropStatus),
|
|
670
686
|
value: translate,
|
|
671
687
|
schema: target.schema,
|
|
672
688
|
});
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly y: number;
|
|
4
|
-
};
|
|
5
|
-
export type SelectedOutline = {
|
|
6
|
-
readonly key: string;
|
|
7
|
-
readonly dimensions: {
|
|
8
|
-
readonly width: number;
|
|
9
|
-
readonly height: number;
|
|
10
|
-
} | null;
|
|
11
|
-
readonly uncroppedPoints: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint] | null;
|
|
12
|
-
readonly points: readonly [
|
|
13
|
-
OutlinePoint,
|
|
14
|
-
OutlinePoint,
|
|
15
|
-
OutlinePoint,
|
|
16
|
-
OutlinePoint
|
|
17
|
-
];
|
|
18
|
-
};
|
|
1
|
+
import type { CanvasOutlinePoint as OutlinePoint } from '@remotion/canvas';
|
|
2
|
+
export type { CanvasOutline as SelectedOutline, CanvasOutlinePoint as OutlinePoint, } from '@remotion/canvas';
|
|
19
3
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
20
4
|
export declare const mix: (from: number, to: number, progress: number) => number;
|
|
21
5
|
export declare const mixPoint: (from: OutlinePoint, to: OutlinePoint, progress: number) => OutlinePoint;
|
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import type { OverrideIdToNodePaths, TSequence } from 'remotion';
|
|
2
2
|
import type { OutlinePoint, SelectedOutline } from './selected-outline-geometry';
|
|
3
|
-
|
|
3
|
+
export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlKey, }: {
|
|
4
|
+
readonly shiftKey: boolean;
|
|
5
|
+
readonly metaKey: boolean;
|
|
6
|
+
readonly ctrlKey: boolean;
|
|
7
|
+
}) => import("@remotion/canvas").CanvasSelectionInteraction, getSelectedSequenceKeys: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>, getSequenceKeysContainingSelection: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>, cropOutlinePoints: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], crop: import("@remotion/canvas").CanvasOutlineCrop) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], getTransformedSvgViewportPoints: ({ viewport, ctm, containerRect, }: {
|
|
8
|
+
readonly viewport: {
|
|
9
|
+
readonly x: number;
|
|
10
|
+
readonly y: number;
|
|
11
|
+
readonly width: number;
|
|
12
|
+
readonly height: number;
|
|
13
|
+
};
|
|
14
|
+
readonly ctm: {
|
|
15
|
+
readonly a: number;
|
|
16
|
+
readonly b: number;
|
|
17
|
+
readonly c: number;
|
|
18
|
+
readonly d: number;
|
|
19
|
+
readonly e: number;
|
|
20
|
+
readonly f: number;
|
|
21
|
+
};
|
|
22
|
+
readonly containerRect: Pick<DOMRect, "left" | "top">;
|
|
23
|
+
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], measureOutlineTargets: (container: Element, targets: readonly import("@remotion/canvas").CanvasOutlineTarget[]) => SelectedOutline[];
|
|
4
24
|
export declare const pointToString: (point: OutlinePoint) => string;
|
|
5
25
|
export declare const midpoint: (from: OutlinePoint, to: OutlinePoint) => OutlinePoint;
|
|
6
26
|
export declare const getOutlineCenter: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint]) => OutlinePoint;
|
|
@@ -28,31 +48,6 @@ export declare const getSelectedOutlineRotationPivot: ({ dimensions, points, tra
|
|
|
28
48
|
readonly points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
29
49
|
readonly transformOriginValue: string;
|
|
30
50
|
}) => OutlinePoint;
|
|
31
|
-
type SvgViewport = {
|
|
32
|
-
readonly x: number;
|
|
33
|
-
readonly y: number;
|
|
34
|
-
readonly width: number;
|
|
35
|
-
readonly height: number;
|
|
36
|
-
};
|
|
37
|
-
type SvgScreenCtm = Pick<DOMMatrixReadOnly, 'a' | 'b' | 'c' | 'd' | 'e' | 'f'>;
|
|
38
|
-
export declare const getTransformedSvgViewportPoints: ({ viewport, ctm, containerRect, }: {
|
|
39
|
-
readonly viewport: SvgViewport;
|
|
40
|
-
readonly ctm: SvgScreenCtm;
|
|
41
|
-
readonly containerRect: Pick<DOMRect, "left" | "top">;
|
|
42
|
-
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
43
|
-
export declare const cropOutlinePoints: (points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint], crop: {
|
|
44
|
-
readonly left: number;
|
|
45
|
-
readonly right: number;
|
|
46
|
-
readonly top: number;
|
|
47
|
-
readonly bottom: number;
|
|
48
|
-
}) => readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
49
|
-
export declare const getSelectedSequenceKeys: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>;
|
|
50
|
-
export declare const getSequenceKeysContainingSelection: (selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[]) => Set<string>;
|
|
51
|
-
export declare const getOutlineSelectionInteraction: ({ shiftKey, metaKey, ctrlKey, }: {
|
|
52
|
-
readonly shiftKey: boolean;
|
|
53
|
-
readonly metaKey: boolean;
|
|
54
|
-
readonly ctrlKey: boolean;
|
|
55
|
-
}) => import("@remotion/canvas").CanvasSelectionInteraction;
|
|
56
51
|
type SelectedEffectFields = {
|
|
57
52
|
allFields: boolean;
|
|
58
53
|
fieldKeys: Set<string>;
|
|
@@ -77,19 +72,6 @@ export declare const getSequencesWithSelectableOutlines: ({ sequences, overrideI
|
|
|
77
72
|
readonly sequences: readonly TSequence[];
|
|
78
73
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
79
74
|
readonly compositions?: readonly import("remotion").AnyComposition[] | undefined;
|
|
80
|
-
readonly timelinePosition: number;
|
|
81
|
-
}) =>
|
|
82
|
-
export declare const measureOutlines: (container: SVGSVGElement, targets: readonly SelectedOutlineLayoutTarget[], hoveredTimelineNodePathKey: string | null) => SelectedOutline[];
|
|
83
|
-
export declare const measureOutlineTargets: (container: Element, targets: readonly {
|
|
84
|
-
readonly crop: {
|
|
85
|
-
readonly left: number;
|
|
86
|
-
readonly right: number;
|
|
87
|
-
readonly top: number;
|
|
88
|
-
readonly bottom: number;
|
|
89
|
-
};
|
|
90
|
-
readonly includeOutsideContainer: boolean;
|
|
91
|
-
readonly key: string;
|
|
92
|
-
readonly ref: import("react").RefObject<Element | null>;
|
|
93
|
-
}[]) => SelectedOutline[];
|
|
94
|
-
export declare const outlinesAreEqual: (a: readonly SelectedOutline[], b: readonly SelectedOutline[]) => boolean;
|
|
75
|
+
readonly timelinePosition: number | null;
|
|
76
|
+
}) => import("@remotion/canvas").CanvasSelectableOutline[];
|
|
95
77
|
export {};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSequencesWithSelectableOutlines = exports.getSelectedRotationInfo = exports.getSelectedTransformOriginInfo = exports.getSelectedCropInfo = exports.getSelectedEffectFieldsBySequenceKey = exports.getSelectedOutlineRotationPivot = exports.getSelectedOutlineRotationCornerInfo = exports.getRotationCursor = exports.getSelectedOutlineRotationDeltaDegrees = exports.getAngleDegrees = exports.vectorBetween = exports.vectorLength = exports.dot = exports.getOutlineCenter = exports.midpoint = exports.pointToString = exports.measureOutlineTargets = exports.getTransformedSvgViewportPoints = exports.cropOutlinePoints = exports.getSequenceKeysContainingSelection = exports.getSelectedSequenceKeys = exports.getOutlineSelectionInteraction = void 0;
|
|
4
|
+
const canvas_1 = require("@remotion/canvas");
|
|
4
5
|
const calculate_timeline_1 = require("../helpers/calculate-timeline");
|
|
5
6
|
const colors_1 = require("../helpers/colors");
|
|
6
|
-
const
|
|
7
|
-
const get_box_quads_ponyfill_1 = require("../helpers/get-box-quads-ponyfill");
|
|
8
|
-
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
7
|
+
const studio_css_variables_1 = require("../helpers/studio-css-variables");
|
|
9
8
|
const selected_outline_geometry_1 = require("./selected-outline-geometry");
|
|
10
9
|
const selected_outline_types_1 = require("./selected-outline-types");
|
|
11
10
|
const selected_outline_uv_1 = require("./selected-outline-uv");
|
|
12
11
|
const parse_keyframe_field_from_node_path_1 = require("./Timeline/parse-keyframe-field-from-node-path");
|
|
13
12
|
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
14
13
|
const transform_origin_utils_1 = require("./Timeline/transform-origin-utils");
|
|
14
|
+
const { getCanvasSelectableOutlines } = canvas_1.CanvasInternals;
|
|
15
|
+
({ getCanvasOutlineSelectionInteraction: exports.getOutlineSelectionInteraction, getCanvasSelectedSequenceKeys: exports.getSelectedSequenceKeys, getCanvasSequenceKeysContainingSelection: exports.getSequenceKeysContainingSelection, cropCanvasOutlinePoints: exports.cropOutlinePoints, getTransformedSvgViewportPoints: exports.getTransformedSvgViewportPoints, measureCanvasOutlineTargets: exports.measureOutlineTargets } = canvas_1.CanvasInternals);
|
|
15
16
|
const pointToString = (point) => `${point.x},${point.y}`;
|
|
16
17
|
exports.pointToString = pointToString;
|
|
17
18
|
const midpoint = (from, to) => {
|
|
@@ -56,7 +57,7 @@ const getRotationCursor = (rotation) => {
|
|
|
56
57
|
? ''
|
|
57
58
|
: `<g transform="rotate(${normalizedRotation} 32 32)">`;
|
|
58
59
|
const transformEnd = normalizedRotation === 0 ? '' : '</g>';
|
|
59
|
-
const svg = `<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">${transform}<g transform="scale(0.876712329)" filter="url(#filter0_d_1_14)"><path d="M10.9111 17.7687C10.3413 18.3701 10.367 19.3195 10.9684 19.8893L20.7687 29.1738C21.3701 29.7436 22.3195 29.7179 22.8893 29.1165C23.459 28.5151 23.4334 27.5657 22.832 26.996L14.1206 18.7431L22.3735 10.0316C22.9432 9.43022 22.9176 8.48082 22.3162 7.91107C21.7148 7.34133 20.7654 7.36699 20.1956 7.96839L10.9111 17.7687ZM49.3923 58.3118C49.9509 58.9235 50.8996 58.9667 51.5114 58.4081L61.481 49.3055C62.0927 48.7469 62.1359 47.7981 61.5773 47.1863C61.0187 46.5745 60.0699 46.5314 59.4581 47.09L50.5963 55.1812L42.5051 46.3194C41.9465 45.7076 40.9977 45.6645 40.386 46.2231C39.7742 46.7817 39.7311 47.7304 40.2896 48.3422L49.3923 58.3118ZM12.6747 18.7431L13 19.8893C22.1283 19.6426 30.7584 21.4283 37.8564 26.6927C44.8518 31.8809 49.734 39.8538 49 56H50.5963H51.5114C52.2774 39.1461 47.6482 30.2198 39.6436 24.2831C31.7416 18.4224 22.3717 17.2467 13 17.5L12.6747 18.7431Z" fill="${colors_1.BLACK}"/><path d="M19.1064 6.93652C20.2459 5.73379 22.1448 5.68278 23.3477 6.82227C24.5505 7.96181 24.6022 9.86076 23.4629 11.0635L18.7373 16.0508C26.3487 16.4239 33.9128 18.1651 40.5371 23.0781C44.7339 26.1907 48.0794 30.1189 50.2568 35.4834C51.9666 39.6958 52.9327 44.7395 53.0742 50.8867L58.4463 45.9824C59.6697 44.8654 61.5673 44.9514 62.6846 46.1748C63.8018 47.3985 63.7155 49.296 62.4922 50.4131L52.5225 59.5156C51.337 60.5979 49.5196 60.5507 48.3916 59.4346L48.2842 59.3232L39.1816 49.3535C38.0648 48.1301 38.1507 46.2324 39.374 45.1152C40.5975 43.9979 42.4961 44.0841 43.6133 45.3076L47.4756 49.5381C47.1908 44.7613 46.2876 40.9448 44.9482 37.8291C43.0666 33.4521 40.2851 30.3614 36.9629 27.8975C31.8259 24.0875 25.8071 22.1663 19.2891 21.5732L23.8633 25.9072C25.0662 27.0468 25.1178 28.9457 23.9785 30.1484C22.8746 31.3135 21.0576 31.3982 19.8516 30.3662L19.7373 30.2627L9.93652 20.9785C8.73384 19.839 8.6828 17.9401 9.82227 16.7373L19.1064 6.93652Z" stroke="${colors_1.WHITE}" stroke-width="3"/></g>${transformEnd}<defs><filter id="filter0_d_1_14" x="0" y="0" width="72.4696" height="72.3004" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="3"/><feGaussianBlur stdDeviation="3.75"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_14"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_14" result="shape"/></filter></defs></svg>`;
|
|
60
|
+
const svg = `<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><style>${studio_css_variables_1.studioCssVariables}</style>${transform}<g transform="scale(0.876712329)" filter="url(#filter0_d_1_14)"><path d="M10.9111 17.7687C10.3413 18.3701 10.367 19.3195 10.9684 19.8893L20.7687 29.1738C21.3701 29.7436 22.3195 29.7179 22.8893 29.1165C23.459 28.5151 23.4334 27.5657 22.832 26.996L14.1206 18.7431L22.3735 10.0316C22.9432 9.43022 22.9176 8.48082 22.3162 7.91107C21.7148 7.34133 20.7654 7.36699 20.1956 7.96839L10.9111 17.7687ZM49.3923 58.3118C49.9509 58.9235 50.8996 58.9667 51.5114 58.4081L61.481 49.3055C62.0927 48.7469 62.1359 47.7981 61.5773 47.1863C61.0187 46.5745 60.0699 46.5314 59.4581 47.09L50.5963 55.1812L42.5051 46.3194C41.9465 45.7076 40.9977 45.6645 40.386 46.2231C39.7742 46.7817 39.7311 47.7304 40.2896 48.3422L49.3923 58.3118ZM12.6747 18.7431L13 19.8893C22.1283 19.6426 30.7584 21.4283 37.8564 26.6927C44.8518 31.8809 49.734 39.8538 49 56H50.5963H51.5114C52.2774 39.1461 47.6482 30.2198 39.6436 24.2831C31.7416 18.4224 22.3717 17.2467 13 17.5L12.6747 18.7431Z" fill="${colors_1.BLACK}"/><path d="M19.1064 6.93652C20.2459 5.73379 22.1448 5.68278 23.3477 6.82227C24.5505 7.96181 24.6022 9.86076 23.4629 11.0635L18.7373 16.0508C26.3487 16.4239 33.9128 18.1651 40.5371 23.0781C44.7339 26.1907 48.0794 30.1189 50.2568 35.4834C51.9666 39.6958 52.9327 44.7395 53.0742 50.8867L58.4463 45.9824C59.6697 44.8654 61.5673 44.9514 62.6846 46.1748C63.8018 47.3985 63.7155 49.296 62.4922 50.4131L52.5225 59.5156C51.337 60.5979 49.5196 60.5507 48.3916 59.4346L48.2842 59.3232L39.1816 49.3535C38.0648 48.1301 38.1507 46.2324 39.374 45.1152C40.5975 43.9979 42.4961 44.0841 43.6133 45.3076L47.4756 49.5381C47.1908 44.7613 46.2876 40.9448 44.9482 37.8291C43.0666 33.4521 40.2851 30.3614 36.9629 27.8975C31.8259 24.0875 25.8071 22.1663 19.2891 21.5732L23.8633 25.9072C25.0662 27.0468 25.1178 28.9457 23.9785 30.1484C22.8746 31.3135 21.0576 31.3982 19.8516 30.3662L19.7373 30.2627L9.93652 20.9785C8.73384 19.839 8.6828 17.9401 9.82227 16.7373L19.1064 6.93652Z" stroke="${colors_1.WHITE}" stroke-width="3"/></g>${transformEnd}<defs><filter id="filter0_d_1_14" x="0" y="0" width="72.4696" height="72.3004" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/><feOffset dy="3"/><feGaussianBlur stdDeviation="3.75"/><feComposite in2="hardAlpha" operator="out"/><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1_14"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1_14" result="shape"/></filter></defs></svg>`;
|
|
60
61
|
return `url("data:image/svg+xml,${encodeURIComponent(svg)}") 12 12, alias`;
|
|
61
62
|
};
|
|
62
63
|
exports.getRotationCursor = getRotationCursor;
|
|
@@ -108,145 +109,6 @@ const getSelectedOutlineRotationPivot = ({ dimensions, points, transformOriginVa
|
|
|
108
109
|
return (0, selected_outline_uv_1.getUvHandlePosition)(points, uv);
|
|
109
110
|
};
|
|
110
111
|
exports.getSelectedOutlineRotationPivot = getSelectedOutlineRotationPivot;
|
|
111
|
-
const rectToPoints = (elementRect, containerRect) => {
|
|
112
|
-
const left = elementRect.left - containerRect.left;
|
|
113
|
-
const top = elementRect.top - containerRect.top;
|
|
114
|
-
const right = elementRect.right - containerRect.left;
|
|
115
|
-
const bottom = elementRect.bottom - containerRect.top;
|
|
116
|
-
return [
|
|
117
|
-
{ x: left, y: top },
|
|
118
|
-
{ x: right, y: top },
|
|
119
|
-
{ x: right, y: bottom },
|
|
120
|
-
{ x: left, y: bottom },
|
|
121
|
-
];
|
|
122
|
-
};
|
|
123
|
-
const getTransformedSvgViewportPoints = ({ viewport, ctm, containerRect, }) => {
|
|
124
|
-
const transformPoint = (x, y) => ({
|
|
125
|
-
x: ctm.a * x + ctm.c * y + ctm.e - containerRect.left,
|
|
126
|
-
y: ctm.b * x + ctm.d * y + ctm.f - containerRect.top,
|
|
127
|
-
});
|
|
128
|
-
const left = viewport.x;
|
|
129
|
-
const top = viewport.y;
|
|
130
|
-
const right = viewport.x + viewport.width;
|
|
131
|
-
const bottom = viewport.y + viewport.height;
|
|
132
|
-
return [
|
|
133
|
-
transformPoint(left, top),
|
|
134
|
-
transformPoint(right, top),
|
|
135
|
-
transformPoint(right, bottom),
|
|
136
|
-
transformPoint(left, bottom),
|
|
137
|
-
];
|
|
138
|
-
};
|
|
139
|
-
exports.getTransformedSvgViewportPoints = getTransformedSvgViewportPoints;
|
|
140
|
-
const quadToPoints = (quad, containerRect) => {
|
|
141
|
-
// `getBoxQuads`/the ponyfill returns the quad in viewport coordinates.
|
|
142
|
-
// The overlay <svg> is unscaled (the canvas `scale()`/pan live on a sibling
|
|
143
|
-
// container, not the svg), so 1 user unit == 1 px and we only need to move
|
|
144
|
-
// the quad into the svg's local space by subtracting its viewport origin.
|
|
145
|
-
// We deliberately do not pass `relativeTo` to the ponyfill: when the target
|
|
146
|
-
// is not an ancestor of the element, the polyfill cannot resolve the
|
|
147
|
-
// coordinate space and leaves the quad in viewport coordinates.
|
|
148
|
-
return [
|
|
149
|
-
{ x: quad.p1.x - containerRect.left, y: quad.p1.y - containerRect.top },
|
|
150
|
-
{ x: quad.p2.x - containerRect.left, y: quad.p2.y - containerRect.top },
|
|
151
|
-
{ x: quad.p3.x - containerRect.left, y: quad.p3.y - containerRect.top },
|
|
152
|
-
{ x: quad.p4.x - containerRect.left, y: quad.p4.y - containerRect.top },
|
|
153
|
-
];
|
|
154
|
-
};
|
|
155
|
-
const isSvgSvgElement = (element) => {
|
|
156
|
-
var _a;
|
|
157
|
-
const ownerSvgSvgElement = (_a = element.ownerDocument.defaultView) === null || _a === void 0 ? void 0 : _a.SVGSVGElement;
|
|
158
|
-
return ((typeof SVGSVGElement !== 'undefined' &&
|
|
159
|
-
element instanceof SVGSVGElement) ||
|
|
160
|
-
(ownerSvgSvgElement !== undefined && element instanceof ownerSvgSvgElement));
|
|
161
|
-
};
|
|
162
|
-
const getSvgSvgElementViewport = (element) => {
|
|
163
|
-
const viewBox = element.viewBox.baseVal;
|
|
164
|
-
if (viewBox.width > 0 && viewBox.height > 0) {
|
|
165
|
-
return {
|
|
166
|
-
x: viewBox.x,
|
|
167
|
-
y: viewBox.y,
|
|
168
|
-
width: viewBox.width,
|
|
169
|
-
height: viewBox.height,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
x: 0,
|
|
174
|
-
y: 0,
|
|
175
|
-
width: element.width.baseVal.value,
|
|
176
|
-
height: element.height.baseVal.value,
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
const getSvgSvgElementOutlinePoints = (element, containerRect) => {
|
|
180
|
-
const ctm = element.getScreenCTM();
|
|
181
|
-
const viewport = getSvgSvgElementViewport(element);
|
|
182
|
-
if (ctm === null || (viewport.width === 0 && viewport.height === 0)) {
|
|
183
|
-
return null;
|
|
184
|
-
}
|
|
185
|
-
return (0, exports.getTransformedSvgViewportPoints)({
|
|
186
|
-
viewport,
|
|
187
|
-
ctm,
|
|
188
|
-
containerRect,
|
|
189
|
-
});
|
|
190
|
-
};
|
|
191
|
-
const getElementOutlinePoints = (element, containerRect, includeOutsideContainer) => {
|
|
192
|
-
const elementRect = element.getBoundingClientRect();
|
|
193
|
-
if (elementRect.width === 0 && elementRect.height === 0) {
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
if (!includeOutsideContainer &&
|
|
197
|
-
(elementRect.right <= containerRect.left ||
|
|
198
|
-
elementRect.left >= containerRect.right ||
|
|
199
|
-
elementRect.bottom <= containerRect.top ||
|
|
200
|
-
elementRect.top >= containerRect.bottom)) {
|
|
201
|
-
return null;
|
|
202
|
-
}
|
|
203
|
-
if (isSvgSvgElement(element)) {
|
|
204
|
-
return getSvgSvgElementOutlinePoints(element, containerRect);
|
|
205
|
-
}
|
|
206
|
-
const quads = (0, get_box_quads_ponyfill_1.getBoxQuadsPonyfill)(element, {
|
|
207
|
-
box: 'border',
|
|
208
|
-
});
|
|
209
|
-
const quad = quads === null || quads === void 0 ? void 0 : quads[0];
|
|
210
|
-
if (!quad) {
|
|
211
|
-
return rectToPoints(elementRect, containerRect);
|
|
212
|
-
}
|
|
213
|
-
return quadToPoints(quad, containerRect);
|
|
214
|
-
};
|
|
215
|
-
const cropOutlinePoints = (points, crop) => {
|
|
216
|
-
if (crop.left === 0 &&
|
|
217
|
-
crop.right === 0 &&
|
|
218
|
-
crop.top === 0 &&
|
|
219
|
-
crop.bottom === 0) {
|
|
220
|
-
return points;
|
|
221
|
-
}
|
|
222
|
-
const { left, top } = crop;
|
|
223
|
-
const right = 1 - crop.right;
|
|
224
|
-
const bottom = 1 - crop.bottom;
|
|
225
|
-
return [
|
|
226
|
-
(0, selected_outline_uv_1.getUvHandlePosition)(points, [left, top]),
|
|
227
|
-
(0, selected_outline_uv_1.getUvHandlePosition)(points, [right, top]),
|
|
228
|
-
(0, selected_outline_uv_1.getUvHandlePosition)(points, [right, bottom]),
|
|
229
|
-
(0, selected_outline_uv_1.getUvHandlePosition)(points, [left, bottom]),
|
|
230
|
-
];
|
|
231
|
-
};
|
|
232
|
-
exports.cropOutlinePoints = cropOutlinePoints;
|
|
233
|
-
const getSelectedSequenceKeys = (selectedItems) => {
|
|
234
|
-
return new Set(selectedItems
|
|
235
|
-
.filter((item) => item.type === 'sequence')
|
|
236
|
-
.map((item) => (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(item.nodePathInfo)));
|
|
237
|
-
};
|
|
238
|
-
exports.getSelectedSequenceKeys = getSelectedSequenceKeys;
|
|
239
|
-
const getSequenceKeysContainingSelection = (selectedItems) => {
|
|
240
|
-
return new Set(selectedItems
|
|
241
|
-
.filter((item) => item.type !== 'guide')
|
|
242
|
-
.map((item) => (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(item.nodePathInfo)));
|
|
243
|
-
};
|
|
244
|
-
exports.getSequenceKeysContainingSelection = getSequenceKeysContainingSelection;
|
|
245
|
-
const getOutlineSelectionInteraction = ({ shiftKey, metaKey, ctrlKey, }) => ({
|
|
246
|
-
shiftKey,
|
|
247
|
-
toggleKey: metaKey || ctrlKey,
|
|
248
|
-
});
|
|
249
|
-
exports.getOutlineSelectionInteraction = getOutlineSelectionInteraction;
|
|
250
112
|
const getKeyframeOrEasingField = (item) => {
|
|
251
113
|
if (item.type !== 'keyframe' && item.type !== 'easing') {
|
|
252
114
|
return null;
|
|
@@ -389,114 +251,14 @@ const getSelectedRotationInfo = (selectedItems) => {
|
|
|
389
251
|
};
|
|
390
252
|
exports.getSelectedRotationInfo = getSelectedRotationInfo;
|
|
391
253
|
const getSequencesWithSelectableOutlines = ({ sequences, overrideIdsToNodePaths, compositions = [], timelinePosition, }) => {
|
|
392
|
-
return (
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
}
|
|
401
|
-
return (track.sequence.showInTimeline &&
|
|
402
|
-
timelinePosition >= track.sequence.from &&
|
|
403
|
-
timelinePosition < track.sequence.from + track.sequence.duration &&
|
|
404
|
-
track.nodePathInfo.auxiliaryKeys.length === 0);
|
|
405
|
-
})
|
|
406
|
-
.filter((track) => track.sequence.refForOutline !== null)
|
|
407
|
-
.sort((a, b) => a.depth - b.depth)
|
|
408
|
-
.map((track) => {
|
|
409
|
-
if (track.nodePathInfo === null) {
|
|
410
|
-
throw new Error('Expected selected outline to have a node path');
|
|
411
|
-
}
|
|
412
|
-
return {
|
|
413
|
-
depth: track.depth,
|
|
414
|
-
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
415
|
-
key: (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(track.nodePathInfo),
|
|
416
|
-
nodePathInfo: track.nodePathInfo,
|
|
417
|
-
sequence: track.sequence,
|
|
418
|
-
};
|
|
254
|
+
return getCanvasSelectableOutlines({
|
|
255
|
+
tracks: (0, calculate_timeline_1.calculateTimeline)({
|
|
256
|
+
sequences: [...sequences],
|
|
257
|
+
overrideIdsToNodePaths,
|
|
258
|
+
compositions,
|
|
259
|
+
}),
|
|
260
|
+
timelinePosition,
|
|
261
|
+
resolveSequenceNodePathInfo: null,
|
|
419
262
|
});
|
|
420
263
|
};
|
|
421
264
|
exports.getSequencesWithSelectableOutlines = getSequencesWithSelectableOutlines;
|
|
422
|
-
const measureOutlines = (container, targets, hoveredTimelineNodePathKey) => {
|
|
423
|
-
return (0, exports.measureOutlineTargets)(container, targets.map((target) => ({
|
|
424
|
-
crop: target.crop,
|
|
425
|
-
includeOutsideContainer: target.showSelectedOutline ||
|
|
426
|
-
(0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(target.nodePathInfo.sequenceSubscriptionKey) === hoveredTimelineNodePathKey,
|
|
427
|
-
key: target.key,
|
|
428
|
-
ref: target.ref,
|
|
429
|
-
})));
|
|
430
|
-
};
|
|
431
|
-
exports.measureOutlines = measureOutlines;
|
|
432
|
-
const measureOutlineTargets = (container, targets) => {
|
|
433
|
-
// Reuse shared ancestor geometry within this synchronous batch only.
|
|
434
|
-
(0, get_box_quads_polyfill_internals_js_1.useCache)();
|
|
435
|
-
const containerRect = container.getBoundingClientRect();
|
|
436
|
-
const outlines = [];
|
|
437
|
-
for (const target of targets) {
|
|
438
|
-
const element = target.ref.current;
|
|
439
|
-
if (element === null) {
|
|
440
|
-
continue;
|
|
441
|
-
}
|
|
442
|
-
const uncroppedPoints = getElementOutlinePoints(element, containerRect, target.includeOutsideContainer);
|
|
443
|
-
if (uncroppedPoints === null) {
|
|
444
|
-
continue;
|
|
445
|
-
}
|
|
446
|
-
const points = (0, exports.cropOutlinePoints)(uncroppedPoints, target.crop);
|
|
447
|
-
outlines.push({
|
|
448
|
-
key: target.key,
|
|
449
|
-
dimensions: element instanceof HTMLElement
|
|
450
|
-
? {
|
|
451
|
-
width: element.offsetWidth,
|
|
452
|
-
height: element.offsetHeight,
|
|
453
|
-
}
|
|
454
|
-
: element instanceof SVGSVGElement
|
|
455
|
-
? {
|
|
456
|
-
width: element.width.baseVal.value,
|
|
457
|
-
height: element.height.baseVal.value,
|
|
458
|
-
}
|
|
459
|
-
: null,
|
|
460
|
-
uncroppedPoints,
|
|
461
|
-
points,
|
|
462
|
-
});
|
|
463
|
-
}
|
|
464
|
-
return outlines;
|
|
465
|
-
};
|
|
466
|
-
exports.measureOutlineTargets = measureOutlineTargets;
|
|
467
|
-
const outlinesAreEqual = (a, b) => {
|
|
468
|
-
var _a, _b, _c, _d;
|
|
469
|
-
if (a.length !== b.length) {
|
|
470
|
-
return false;
|
|
471
|
-
}
|
|
472
|
-
for (let i = 0; i < a.length; i++) {
|
|
473
|
-
if (a[i].key !== b[i].key) {
|
|
474
|
-
return false;
|
|
475
|
-
}
|
|
476
|
-
if (((_a = a[i].dimensions) === null || _a === void 0 ? void 0 : _a.width) !== ((_b = b[i].dimensions) === null || _b === void 0 ? void 0 : _b.width) ||
|
|
477
|
-
((_c = a[i].dimensions) === null || _c === void 0 ? void 0 : _c.height) !== ((_d = b[i].dimensions) === null || _d === void 0 ? void 0 : _d.height)) {
|
|
478
|
-
return false;
|
|
479
|
-
}
|
|
480
|
-
const aUncropped = a[i].uncroppedPoints;
|
|
481
|
-
const bUncropped = b[i].uncroppedPoints;
|
|
482
|
-
if ((aUncropped === null) !== (bUncropped === null)) {
|
|
483
|
-
return false;
|
|
484
|
-
}
|
|
485
|
-
if (aUncropped !== null && bUncropped !== null) {
|
|
486
|
-
for (let j = 0; j < aUncropped.length; j++) {
|
|
487
|
-
if (Math.abs(aUncropped[j].x - bUncropped[j].x) > 0.01 ||
|
|
488
|
-
Math.abs(aUncropped[j].y - bUncropped[j].y) > 0.01) {
|
|
489
|
-
return false;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
for (let j = 0; j < a[i].points.length; j++) {
|
|
494
|
-
if (Math.abs(a[i].points[j].x - b[i].points[j].x) > 0.01 ||
|
|
495
|
-
Math.abs(a[i].points[j].y - b[i].points[j].y) > 0.01) {
|
|
496
|
-
return false;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
return true;
|
|
501
|
-
};
|
|
502
|
-
exports.outlinesAreEqual = outlinesAreEqual;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import type { SelectedOutline } from './selected-outline-geometry';
|
|
2
|
-
import type { SelectedOutlineLayoutTarget } from './selected-outline-types';
|
|
3
|
-
type OutlineSequenceParent = {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly parent: string | null;
|
|
6
|
-
};
|
|
7
1
|
export declare const orderOutlinesForRendering: ({ outlines, sequences, targetsByKey, }: {
|
|
8
|
-
readonly outlines: readonly
|
|
9
|
-
readonly sequences: readonly
|
|
10
|
-
readonly targetsByKey: ReadonlyMap<string,
|
|
11
|
-
}) => readonly
|
|
12
|
-
export {};
|
|
2
|
+
readonly outlines: readonly import("@remotion/canvas").CanvasOutline[];
|
|
3
|
+
readonly sequences: readonly import("@remotion/canvas").CanvasOutlineSequenceParent[];
|
|
4
|
+
readonly targetsByKey: ReadonlyMap<string, import("@remotion/canvas").CanvasOutlineOrderTarget>;
|
|
5
|
+
}) => readonly import("@remotion/canvas").CanvasOutline[];
|