@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
|
@@ -60,7 +60,6 @@ const promptHeader = {
|
|
|
60
60
|
justifyContent: 'space-between',
|
|
61
61
|
};
|
|
62
62
|
const skillRowContainer = {
|
|
63
|
-
borderTop: colors_1.BORDER_WHITE_ALPHA_12,
|
|
64
63
|
marginTop: 10,
|
|
65
64
|
};
|
|
66
65
|
const skillError = { marginTop: 10 };
|
|
@@ -87,7 +86,7 @@ const AgentPrompt = ({ availableText, promptDetails, skillId }) => {
|
|
|
87
86
|
const renderPromptCopy = (0, react_1.useCallback)((color) => (jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: promptCopied, color: color, style: copyIcon })), [promptCopied]);
|
|
88
87
|
const renderInstallCopy = (0, react_1.useCallback)((color) => (jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: installCopied, color: color, style: copyIcon })), [installCopied]);
|
|
89
88
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [skillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
90
|
-
jsx_runtime_1.jsx("div", { style: text, children: "Install the Agent Skill first:" }), canInstallSkill && skill ? (jsx_runtime_1.jsx("div", { "aria-label": "Remotion Agent Skills", role: "list", style: skillRowContainer, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillSettingsRow, {
|
|
89
|
+
jsx_runtime_1.jsx("div", { style: text, children: "Install the Agent Skill first:" }), canInstallSkill && skill ? (jsx_runtime_1.jsx("div", { "aria-label": "Remotion Agent Skills", role: "list", style: skillRowContainer, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillSettingsRow, { skill: skill }) })) : (jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
91
90
|
jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: () => copy(installCommand, markInstallCopied), renderAction: renderInstallCopy, style: copyAction, title: "Copy command", variant: null })
|
|
92
91
|
] })), skillActionError ? (jsx_runtime_1.jsx("div", { style: skillError, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: skillActionError, type: "error" }) })) : null] })), jsx_runtime_1.jsxs("div", { style: { ...promptHeader, marginTop: skillAvailable ? 0 : 16 }, children: [
|
|
93
92
|
jsx_runtime_1.jsx("div", { style: text, children: skillAvailable
|
|
@@ -40,6 +40,8 @@ const react_1 = __importStar(require("react"));
|
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
41
|
const colors_1 = require("../helpers/colors");
|
|
42
42
|
const get_timeline_max_zoom_1 = require("../helpers/get-timeline-max-zoom");
|
|
43
|
+
const resolve_studio_color_1 = require("../helpers/resolve-studio-color");
|
|
44
|
+
const studio_pixel_ratio_1 = require("../helpers/studio-pixel-ratio");
|
|
43
45
|
const timeline_layout_1 = require("../helpers/timeline-layout");
|
|
44
46
|
const EMPTY_PEAKS = new Float32Array(0);
|
|
45
47
|
const getContainerStyle = (height) => {
|
|
@@ -66,7 +68,7 @@ const parseVolume = (volume) => {
|
|
|
66
68
|
}
|
|
67
69
|
return volume.split(',').map((v) => Number(v));
|
|
68
70
|
};
|
|
69
|
-
const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayOffsetInFrames, displayDurationInFrames, visualizationWidth, volume, doesVolumeChange, muted, playbackRate, loopDisplay, }) => {
|
|
71
|
+
const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayOffsetInFrames, displayDurationInFrames, visualizationWidth, volume, doesVolumeChange, muted, playbackRate, loopDisplay, loopDisplayOffsetInFrames, }) => {
|
|
70
72
|
const [peaks, setPeaks] = (0, react_1.useState)(null);
|
|
71
73
|
const [error, setError] = (0, react_1.useState)(null);
|
|
72
74
|
const vidConf = remotion_1.Internals.useUnsafeVideoConfig();
|
|
@@ -85,16 +87,9 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
85
87
|
return (0, timeline_utils_1.getVisibleWaveformVolume)({
|
|
86
88
|
displayDurationInFrames,
|
|
87
89
|
displayOffsetInFrames,
|
|
88
|
-
loopDisplay,
|
|
89
90
|
volume: parsedVolume,
|
|
90
91
|
});
|
|
91
|
-
}, [
|
|
92
|
-
displayDurationInFrames,
|
|
93
|
-
displayOffsetInFrames,
|
|
94
|
-
loopDisplay,
|
|
95
|
-
muted,
|
|
96
|
-
parsedVolume,
|
|
97
|
-
]);
|
|
92
|
+
}, [displayDurationInFrames, displayOffsetInFrames, muted, parsedVolume]);
|
|
98
93
|
// Layout effect so that a cache hit sets the peaks synchronously and the
|
|
99
94
|
// waveform is painted on the very first frame after mounting.
|
|
100
95
|
(0, react_1.useLayoutEffect)(() => {
|
|
@@ -113,7 +108,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
113
108
|
}
|
|
114
109
|
return (0, timeline_utils_1.sliceVisibleWaveformPeaks)({
|
|
115
110
|
displayDurationInFrames,
|
|
116
|
-
displayOffsetInFrames,
|
|
111
|
+
displayOffsetInFrames: displayOffsetInFrames + loopDisplayOffsetInFrames,
|
|
117
112
|
durationInFrames,
|
|
118
113
|
fps: vidConf.fps,
|
|
119
114
|
loopDisplay,
|
|
@@ -127,6 +122,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
127
122
|
displayOffsetInFrames,
|
|
128
123
|
durationInFrames,
|
|
129
124
|
loopDisplay,
|
|
125
|
+
loopDisplayOffsetInFrames,
|
|
130
126
|
peaks,
|
|
131
127
|
playbackRate,
|
|
132
128
|
startFrom,
|
|
@@ -141,7 +137,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
141
137
|
if (!canvasElement) {
|
|
142
138
|
return;
|
|
143
139
|
}
|
|
144
|
-
const pixelRatio =
|
|
140
|
+
const pixelRatio = (0, studio_pixel_ratio_1.getStudioPixelRatio)();
|
|
145
141
|
const h = Math.ceil(height * pixelRatio);
|
|
146
142
|
const w = Math.ceil(visualizationWidth * pixelRatio);
|
|
147
143
|
const drawingWidth = visualizationWidth * pixelRatio;
|
|
@@ -152,7 +148,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
152
148
|
(0, timeline_utils_1.drawBars)({
|
|
153
149
|
canvas: canvasElement,
|
|
154
150
|
peaks: portionPeaks !== null && portionPeaks !== void 0 ? portionPeaks : EMPTY_PEAKS,
|
|
155
|
-
color: colors_1.WHITE_ALPHA_60,
|
|
151
|
+
color: (0, resolve_studio_color_1.resolveStudioColor)(colors_1.WHITE_ALPHA_60, getComputedStyle(canvasElement)),
|
|
156
152
|
volume: visibleVolume,
|
|
157
153
|
width: drawingWidth,
|
|
158
154
|
});
|
|
@@ -165,7 +161,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
165
161
|
if (!volumeCanvasElement) {
|
|
166
162
|
return;
|
|
167
163
|
}
|
|
168
|
-
const pixelRatio =
|
|
164
|
+
const pixelRatio = (0, studio_pixel_ratio_1.getStudioPixelRatio)();
|
|
169
165
|
const h = Math.ceil(height * pixelRatio);
|
|
170
166
|
const w = Math.ceil(visualizationWidth * pixelRatio);
|
|
171
167
|
const drawingWidth = visualizationWidth * pixelRatio;
|
|
@@ -195,7 +191,7 @@ const AudioWaveformInner = ({ src, height, startFrom, durationInFrames, displayO
|
|
|
195
191
|
context.lineTo(x, y);
|
|
196
192
|
}
|
|
197
193
|
});
|
|
198
|
-
context.strokeStyle = colors_1.WHITE_ALPHA_70;
|
|
194
|
+
context.strokeStyle = (0, resolve_studio_color_1.resolveStudioColor)(colors_1.WHITE_ALPHA_70, getComputedStyle(volumeCanvasElement));
|
|
199
195
|
context.lineWidth = pixelRatio;
|
|
200
196
|
context.stroke();
|
|
201
197
|
}, [height, shouldRenderVolumeOverlay, visibleVolume, visualizationWidth]);
|
|
@@ -45,6 +45,7 @@ const layout_1 = require("./layout");
|
|
|
45
45
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
46
46
|
const Preview_1 = require("./Preview");
|
|
47
47
|
const ResetZoomButton_1 = require("./ResetZoomButton");
|
|
48
|
+
const SelectedOutlineSnapIndicators_1 = require("./SelectedOutlineSnapIndicators");
|
|
48
49
|
const SvgImportDialog_1 = require("./SvgImportDialog");
|
|
49
50
|
const imperative_state_1 = require("./Timeline/imperative-state");
|
|
50
51
|
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
@@ -143,7 +144,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
143
144
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
144
145
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
145
146
|
const areRulersVisible = (0, use_is_ruler_visible_1.useIsRulerVisible)();
|
|
146
|
-
const { editorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
147
|
+
const { editorShowGuides, guidesList } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
147
148
|
const { editorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
148
149
|
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
149
150
|
const { setCurrentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
@@ -873,36 +874,46 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
873
874
|
}
|
|
874
875
|
const metadata = getCanvasDragPreviewMetadata((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.types) !== null && _b !== void 0 ? _b : []);
|
|
875
876
|
if (((metadata === null || metadata === void 0 ? void 0 : metadata.type) !== 'composition' && (metadata === null || metadata === void 0 ? void 0 : metadata.type) !== 'element') ||
|
|
876
|
-
metadata.
|
|
877
|
-
|
|
877
|
+
(metadata.type === 'composition' &&
|
|
878
|
+
(metadata.width === undefined || metadata.height === undefined))) {
|
|
878
879
|
setCompositionDropPreview(null);
|
|
879
880
|
return;
|
|
880
881
|
}
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
882
|
+
const isFullscreenElement = metadata.type === 'element' &&
|
|
883
|
+
(metadata.width === undefined || metadata.height === undefined);
|
|
884
|
+
let dropPosition = isFullscreenElement
|
|
885
|
+
? {
|
|
886
|
+
centerX: contentDimensions.width / 2,
|
|
887
|
+
centerY: contentDimensions.height / 2,
|
|
888
|
+
}
|
|
889
|
+
: getDropPosition({
|
|
890
|
+
addFitPadding,
|
|
891
|
+
clientX: event.clientX,
|
|
892
|
+
clientY: event.clientY,
|
|
893
|
+
contentDimensions,
|
|
894
|
+
unbounded: metadata.type === 'composition',
|
|
895
|
+
previewSize,
|
|
896
|
+
size,
|
|
897
|
+
});
|
|
890
898
|
if (dropPosition === null) {
|
|
891
899
|
setCompositionDropPreview(null);
|
|
892
900
|
return;
|
|
893
901
|
}
|
|
894
|
-
const compositionDimensions =
|
|
895
|
-
|
|
896
|
-
height: metadata.height
|
|
897
|
-
|
|
898
|
-
if (
|
|
902
|
+
const compositionDimensions = metadata.width === undefined || metadata.height === undefined
|
|
903
|
+
? contentDimensions
|
|
904
|
+
: { width: metadata.width, height: metadata.height };
|
|
905
|
+
let snapPoints = [];
|
|
906
|
+
if (!isFullscreenElement &&
|
|
899
907
|
editorSnapping &&
|
|
900
908
|
!event.metaKey &&
|
|
901
909
|
!event.ctrlKey) {
|
|
902
|
-
|
|
910
|
+
const snapped = (0, composition_drop_preview_1.snapCompositionDropPosition)({
|
|
903
911
|
compositionDimensions,
|
|
904
912
|
destinationDimensions: contentDimensions,
|
|
905
913
|
dropPosition,
|
|
914
|
+
guides: editorShowGuides
|
|
915
|
+
? guidesList.filter((guide) => guide.compositionId === currentCompositionId)
|
|
916
|
+
: [],
|
|
906
917
|
scale: calculateCanvasScale({
|
|
907
918
|
addFitPadding,
|
|
908
919
|
canvasSize: size,
|
|
@@ -911,6 +922,8 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
911
922
|
previewSize: previewSize.size,
|
|
912
923
|
}),
|
|
913
924
|
});
|
|
925
|
+
dropPosition = snapped.dropPosition;
|
|
926
|
+
snapPoints = snapped.snapPoints;
|
|
914
927
|
}
|
|
915
928
|
setCompositionDropPreview((currentPreview) => {
|
|
916
929
|
if ((currentPreview === null || currentPreview === void 0 ? void 0 : currentPreview.compositionDimensions.width) ===
|
|
@@ -918,13 +931,17 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
918
931
|
currentPreview.compositionDimensions.height ===
|
|
919
932
|
compositionDimensions.height &&
|
|
920
933
|
currentPreview.dropPosition.centerX === dropPosition.centerX &&
|
|
921
|
-
currentPreview.dropPosition.centerY === dropPosition.centerY
|
|
934
|
+
currentPreview.dropPosition.centerY === dropPosition.centerY &&
|
|
935
|
+
currentPreview.snapPoints.length === snapPoints.length &&
|
|
936
|
+
snapPoints.every((snapPoint, index) => {
|
|
937
|
+
const currentPoint = currentPreview.snapPoints[index];
|
|
938
|
+
return (currentPoint.edge === snapPoint.edge &&
|
|
939
|
+
currentPoint.target.type === snapPoint.target.type &&
|
|
940
|
+
currentPoint.target.position === snapPoint.target.position);
|
|
941
|
+
})) {
|
|
922
942
|
return currentPreview;
|
|
923
943
|
}
|
|
924
|
-
return {
|
|
925
|
-
compositionDimensions,
|
|
926
|
-
dropPosition,
|
|
927
|
-
};
|
|
944
|
+
return { compositionDimensions, dropPosition, snapPoints };
|
|
928
945
|
});
|
|
929
946
|
}, [
|
|
930
947
|
addFitPadding,
|
|
@@ -932,7 +949,10 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
932
949
|
cannotAddSequence,
|
|
933
950
|
canReceiveElementInstallRequest,
|
|
934
951
|
contentDimensions,
|
|
952
|
+
currentCompositionId,
|
|
953
|
+
editorShowGuides,
|
|
935
954
|
editorSnapping,
|
|
955
|
+
guidesList,
|
|
936
956
|
isAddingAsset,
|
|
937
957
|
previewSize,
|
|
938
958
|
size,
|
|
@@ -1020,7 +1040,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
1020
1040
|
size,
|
|
1021
1041
|
});
|
|
1022
1042
|
if (dropPosition !== null &&
|
|
1023
|
-
|
|
1043
|
+
((metadata === null || metadata === void 0 ? void 0 : metadata.type) === 'composition' || (metadata === null || metadata === void 0 ? void 0 : metadata.type) === 'element') &&
|
|
1024
1044
|
metadata.width !== undefined &&
|
|
1025
1045
|
metadata.height !== undefined &&
|
|
1026
1046
|
contentDimensions !== null &&
|
|
@@ -1035,6 +1055,9 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
1035
1055
|
},
|
|
1036
1056
|
destinationDimensions: contentDimensions,
|
|
1037
1057
|
dropPosition,
|
|
1058
|
+
guides: editorShowGuides
|
|
1059
|
+
? guidesList.filter((guide) => guide.compositionId === currentCompositionId)
|
|
1060
|
+
: [],
|
|
1038
1061
|
scale: calculateCanvasScale({
|
|
1039
1062
|
addFitPadding,
|
|
1040
1063
|
canvasSize: size,
|
|
@@ -1042,7 +1065,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
1042
1065
|
compositionWidth: contentDimensions.width,
|
|
1043
1066
|
previewSize: previewSize.size,
|
|
1044
1067
|
}),
|
|
1045
|
-
});
|
|
1068
|
+
}).dropPosition;
|
|
1046
1069
|
}
|
|
1047
1070
|
await (0, handle_drop_1.handleDrop)({
|
|
1048
1071
|
chooseSvgImportMode,
|
|
@@ -1070,7 +1093,9 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
1070
1093
|
config,
|
|
1071
1094
|
contentDimensions,
|
|
1072
1095
|
currentCompositionId,
|
|
1096
|
+
editorShowGuides,
|
|
1073
1097
|
editorSnapping,
|
|
1098
|
+
guidesList,
|
|
1074
1099
|
isAddingAsset,
|
|
1075
1100
|
previewSize,
|
|
1076
1101
|
size,
|
|
@@ -1213,7 +1238,44 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
1213
1238
|
zIndex: 1,
|
|
1214
1239
|
};
|
|
1215
1240
|
}, [compositionDropPreview, contentDimensions, previewSize, size]);
|
|
1241
|
+
const compositionDropSnapLines = (0, react_1.useMemo)(() => {
|
|
1242
|
+
if (compositionDropPreview === null ||
|
|
1243
|
+
compositionDropPreview.snapPoints.length === 0 ||
|
|
1244
|
+
contentDimensions === null ||
|
|
1245
|
+
contentDimensions === 'none') {
|
|
1246
|
+
return null;
|
|
1247
|
+
}
|
|
1248
|
+
const scale = calculateCanvasScale({
|
|
1249
|
+
addFitPadding,
|
|
1250
|
+
canvasSize: size,
|
|
1251
|
+
compositionHeight: contentDimensions.height,
|
|
1252
|
+
compositionWidth: contentDimensions.width,
|
|
1253
|
+
previewSize: previewSize.size,
|
|
1254
|
+
});
|
|
1255
|
+
const left = size.width / 2 -
|
|
1256
|
+
(contentDimensions.width * scale) / 2 -
|
|
1257
|
+
previewSize.translation.x;
|
|
1258
|
+
const top = size.height / 2 -
|
|
1259
|
+
(contentDimensions.height * scale) / 2 -
|
|
1260
|
+
previewSize.translation.y;
|
|
1261
|
+
return (jsx_runtime_1.jsx("svg", { "aria-hidden": "true", "data-testid": "canvas-drop-snap-lines", style: {
|
|
1262
|
+
position: 'absolute',
|
|
1263
|
+
left,
|
|
1264
|
+
top,
|
|
1265
|
+
width: contentDimensions.width * scale,
|
|
1266
|
+
height: contentDimensions.height * scale,
|
|
1267
|
+
pointerEvents: 'none',
|
|
1268
|
+
overflow: 'visible',
|
|
1269
|
+
zIndex: 2,
|
|
1270
|
+
}, children: jsx_runtime_1.jsx(SelectedOutlineSnapIndicators_1.SelectedOutlineSnapLines, { compositionHeight: contentDimensions.height, compositionWidth: contentDimensions.width, scale: scale, snapPoints: compositionDropPreview.snapPoints }) }));
|
|
1271
|
+
}, [
|
|
1272
|
+
addFitPadding,
|
|
1273
|
+
compositionDropPreview,
|
|
1274
|
+
contentDimensions,
|
|
1275
|
+
previewSize,
|
|
1276
|
+
size,
|
|
1277
|
+
]);
|
|
1216
1278
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
1217
|
-
jsx_runtime_1.jsxs("div", { ref: canvas_ref_1.canvasRef, style: getContainerStyle(editorZoomGestures), children: [size ? (jsx_runtime_1.jsx(Preview_1.VideoPreview, { canvasContent: canvasContent, contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, onRetryAssetMetadata: fetchMetadata })) : null, compositionDropPreviewStyle === null ? null : (jsx_runtime_1.jsx("div", { className: "css-reset", "data-testid": "composition-drop-preview", style: compositionDropPreviewStyle })), isFit ? null : (jsx_runtime_1.jsx("div", { style: resetZoom, className: "css-reset", children: jsx_runtime_1.jsx(ResetZoomButton_1.ResetZoomButton, { onClick: onReset }) })), editorShowGuides && canvasContent.type === 'composition' && (jsx_runtime_1.jsx(EditorGuides_1.default, { canvasSize: size, contentDimensions: contentDimensions, assetMetadata: assetResolution }))] }), areRulersVisible && (jsx_runtime_1.jsx(EditorRuler_1.EditorRulers, { canCreateGuides: canvasContent.type === 'composition', contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, containerRef: canvas_ref_1.canvasRef }))] }));
|
|
1279
|
+
jsx_runtime_1.jsxs("div", { ref: canvas_ref_1.canvasRef, style: getContainerStyle(editorZoomGestures), children: [size ? (jsx_runtime_1.jsx(Preview_1.VideoPreview, { canvasContent: canvasContent, contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, onRetryAssetMetadata: fetchMetadata })) : null, compositionDropPreviewStyle === null ? null : (jsx_runtime_1.jsx("div", { className: "css-reset", "data-testid": "composition-drop-preview", style: compositionDropPreviewStyle })), compositionDropSnapLines, isFit ? null : (jsx_runtime_1.jsx("div", { style: resetZoom, className: "css-reset", children: jsx_runtime_1.jsx(ResetZoomButton_1.ResetZoomButton, { onClick: onReset }) })), editorShowGuides && canvasContent.type === 'composition' && (jsx_runtime_1.jsx(EditorGuides_1.default, { canvasSize: size, contentDimensions: contentDimensions, assetMetadata: assetResolution }))] }), areRulersVisible && (jsx_runtime_1.jsx(EditorRuler_1.EditorRulers, { canCreateGuides: canvasContent.type === 'composition', contentDimensions: contentDimensions, canvasSize: size, assetMetadata: assetResolution, containerRef: canvas_ref_1.canvasRef }))] }));
|
|
1218
1280
|
};
|
|
1219
1281
|
exports.Canvas = Canvas;
|
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const modals_1 = require("../state/modals");
|
|
6
6
|
const canvas_capture_drop_1 = require("./canvas-capture-drop");
|
|
7
7
|
const drop_handler_data_1 = require("./drop-handler-data");
|
|
8
|
+
const canvasCaptureMessagePrefix = 'remotion-canvas-capture';
|
|
8
9
|
const CanvasCaptureDropHandler = ({ readOnlyStudio }) => {
|
|
9
10
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
10
11
|
const onDragOver = (0, react_1.useCallback)((event) => {
|
|
@@ -37,6 +38,68 @@ const CanvasCaptureDropHandler = ({ readOnlyStudio }) => {
|
|
|
37
38
|
document.removeEventListener('drop', onDrop);
|
|
38
39
|
};
|
|
39
40
|
}, [onDragOver, onDrop]);
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
if (readOnlyStudio) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const handoffWindow = window.remotion_browserStudio && window.parent !== window
|
|
46
|
+
? window.parent
|
|
47
|
+
: window;
|
|
48
|
+
const captureId = new URL(handoffWindow.location.href).searchParams.get('canvas-capture');
|
|
49
|
+
if (!captureId) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
let incoming = null;
|
|
53
|
+
const onMessage = async (event) => {
|
|
54
|
+
if (event.source !== handoffWindow ||
|
|
55
|
+
event.origin !== handoffWindow.location.origin ||
|
|
56
|
+
typeof event.data !== 'object' ||
|
|
57
|
+
event.data === null ||
|
|
58
|
+
event.data.captureId !== captureId) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (event.data.type === `${canvasCaptureMessagePrefix}-start` &&
|
|
62
|
+
typeof event.data.filename === 'string' &&
|
|
63
|
+
typeof event.data.mimeType === 'string' &&
|
|
64
|
+
Number.isSafeInteger(event.data.chunks) &&
|
|
65
|
+
event.data.chunks >= 0) {
|
|
66
|
+
incoming = {
|
|
67
|
+
captureId,
|
|
68
|
+
filename: event.data.filename,
|
|
69
|
+
mimeType: event.data.mimeType,
|
|
70
|
+
chunks: Array.from({ length: event.data.chunks }, () => null),
|
|
71
|
+
};
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (event.data.type === `${canvasCaptureMessagePrefix}-chunk` &&
|
|
75
|
+
incoming &&
|
|
76
|
+
Number.isSafeInteger(event.data.index) &&
|
|
77
|
+
event.data.index >= 0 &&
|
|
78
|
+
event.data.index < incoming.chunks.length &&
|
|
79
|
+
typeof event.data.data === 'string') {
|
|
80
|
+
const binary = atob(event.data.data);
|
|
81
|
+
const buffer = new ArrayBuffer(binary.length);
|
|
82
|
+
const bytes = new Uint8Array(buffer);
|
|
83
|
+
for (let index = 0; index < binary.length; index++) {
|
|
84
|
+
bytes[index] = binary.charCodeAt(index);
|
|
85
|
+
}
|
|
86
|
+
incoming.chunks[event.data.index] = buffer;
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (event.data.type === `${canvasCaptureMessagePrefix}-complete` &&
|
|
90
|
+
incoming &&
|
|
91
|
+
incoming.chunks.every((chunk) => chunk !== null)) {
|
|
92
|
+
const file = new File(incoming.chunks, incoming.filename, {
|
|
93
|
+
type: incoming.mimeType,
|
|
94
|
+
});
|
|
95
|
+
incoming = null;
|
|
96
|
+
await (0, canvas_capture_drop_1.handleCanvasCaptureDrop)({ files: [file], setSelectedModal });
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
handoffWindow.addEventListener('message', onMessage);
|
|
100
|
+
handoffWindow.postMessage({ type: `${canvasCaptureMessagePrefix}-ready`, captureId }, handoffWindow.location.origin);
|
|
101
|
+
return () => handoffWindow.removeEventListener('message', onMessage);
|
|
102
|
+
}, [readOnlyStudio, setSelectedModal]);
|
|
40
103
|
return null;
|
|
41
104
|
};
|
|
42
105
|
exports.CanvasCaptureDropHandler = CanvasCaptureDropHandler;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const ErrorLoader_1 = require("../error-overlay/remotion-overlay/ErrorLoader");
|
|
8
8
|
const colors_1 = require("../helpers/colors");
|
|
9
|
+
const url_state_1 = require("../helpers/url-state");
|
|
9
10
|
const composition_list_1 = require("../state/composition-list");
|
|
10
11
|
const timeline_zoom_1 = require("../state/timeline-zoom");
|
|
11
12
|
const Canvas_1 = require("./Canvas");
|
|
@@ -26,6 +27,10 @@ const container = {
|
|
|
26
27
|
backgroundColor: colors_1.BACKGROUND,
|
|
27
28
|
flexDirection: 'column',
|
|
28
29
|
};
|
|
30
|
+
const welcomeLabel = {
|
|
31
|
+
...RunningCalculateMetadata_1.loaderLabel,
|
|
32
|
+
textAlign: 'center',
|
|
33
|
+
};
|
|
29
34
|
const CanvasOrLoading = ({ size }) => {
|
|
30
35
|
const resolved = remotion_1.Internals.useResolvedVideoConfig(null);
|
|
31
36
|
const { setZoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
@@ -53,8 +58,11 @@ const CanvasOrLoading = ({ size }) => {
|
|
|
53
58
|
if (compositionListState !== 'ready') {
|
|
54
59
|
return null;
|
|
55
60
|
}
|
|
56
|
-
const
|
|
57
|
-
|
|
61
|
+
const route = (0, url_state_1.getRoute)();
|
|
62
|
+
if (route === '') {
|
|
63
|
+
return (jsx_runtime_1.jsx("div", { style: container, className: "css-reset", children: jsx_runtime_1.jsx("div", { style: welcomeLabel, children: "Select a composition to get started." }) }));
|
|
64
|
+
}
|
|
65
|
+
return (jsx_runtime_1.jsx("div", { style: container, className: "css-reset", children: jsx_runtime_1.jsxs("div", { style: RunningCalculateMetadata_1.loaderLabel, children: ["Composition with ID ", decodeURIComponent(route.substring(1)), " not found."] }) }));
|
|
58
66
|
}
|
|
59
67
|
const content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
60
68
|
jsx_runtime_1.jsx(ZoomPersistor_1.ZoomPersistor, {}), jsx_runtime_1.jsx(Canvas_1.Canvas, { size: size, canvasContent: canvasContent }), (resolved === null || resolved === void 0 ? void 0 : resolved.type) === 'success-and-refreshing' ? (jsx_runtime_1.jsx(RefreshCompositionOverlay_1.RefreshCompositionOverlay, {})) : null] }));
|
|
@@ -61,7 +61,7 @@ const CodeFrame = ({ source, lineNumberWidth, fontSize, horizontalMargin }) => {
|
|
|
61
61
|
display: 'block',
|
|
62
62
|
fontFamily: 'monospace',
|
|
63
63
|
fontSize,
|
|
64
|
-
color:
|
|
64
|
+
color: colors_1.PRISM_VARIABLE_COLOR,
|
|
65
65
|
whiteSpace: 'pre',
|
|
66
66
|
tabSize: 2,
|
|
67
67
|
backgroundColor: colors_1.TRANSPARENT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const CHECKER_BACKGROUND_IMAGE: string;
|
|
2
2
|
export declare const CHECKER_BACKGROUND_SIZE = "8px 8px";
|
|
3
3
|
export declare const CHECKER_BACKGROUND_POSITION = "0 0, 0 4px, 4px -4px, -4px 0";
|
|
4
|
-
export declare const CHECKER_BACKGROUND_COLOR = "
|
|
4
|
+
export declare const CHECKER_BACKGROUND_COLOR = "var(--remotion-studio-color-picker-checker-background-color)";
|
|
@@ -16,9 +16,9 @@ const open_in_remotion_convert_1 = require("../helpers/open-in-remotion-convert"
|
|
|
16
16
|
const render_codec_label_1 = require("../helpers/render-codec-label");
|
|
17
17
|
const use_image_metadata_1 = require("../helpers/use-image-metadata");
|
|
18
18
|
const use_media_metadata_1 = require("../helpers/use-media-metadata");
|
|
19
|
+
const background_removal_1 = require("../icons/background-removal");
|
|
19
20
|
const folder_1 = require("../icons/folder");
|
|
20
21
|
const remotion_convert_1 = require("../icons/remotion-convert");
|
|
21
|
-
const separation_1 = require("../icons/separation");
|
|
22
22
|
const transcription_1 = require("../icons/transcription");
|
|
23
23
|
const trash_1 = require("../icons/trash");
|
|
24
24
|
const modals_1 = require("../state/modals");
|
|
@@ -183,6 +183,7 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
183
183
|
displayName: fileName,
|
|
184
184
|
audioStreamIndex: null,
|
|
185
185
|
requestInit: null,
|
|
186
|
+
target: null,
|
|
186
187
|
});
|
|
187
188
|
}, [fileName, mutationsDisabled, setSelectedModal, src]);
|
|
188
189
|
const onTrackMatting = (0, react_1.useCallback)(() => {
|
|
@@ -193,6 +194,7 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
193
194
|
type: 'video-matting',
|
|
194
195
|
src,
|
|
195
196
|
displayName: fileName,
|
|
197
|
+
target: null,
|
|
196
198
|
});
|
|
197
199
|
}, [fileName, fileType, mutationsDisabled, setSelectedModal, src]);
|
|
198
200
|
const canRename = onAssetClick === undefined &&
|
|
@@ -250,7 +252,7 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
250
252
|
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "File", sectionId: "asset-file", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Video", sectionId: "asset-video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: mediaSections.audio.length > 0, label: "Audio", sectionId: "asset-audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsxs("div", { style: assetMetadataStyle, children: [mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))), src ? (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Average volume", children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: jsx_runtime_1.jsx(AssetAudioVolume_1.AssetAudioVolume, { src: (_d = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _d !== void 0 ? _d : null, waveformSampleRate: volumeMetadata
|
|
251
253
|
? Math.ceil(volumeMetadata.fps *
|
|
252
254
|
get_timeline_max_zoom_1.TIMELINE_FRAME_WIDTH_AT_MAX_ZOOM)
|
|
253
|
-
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "asset-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(
|
|
255
|
+
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "asset-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src && (mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.hasAudioTrack) !== false ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(background_removal_1.BackgroundRemovalIcon, { color: color, style: quickActionIconStyle })), children: "Remove background" })) : null, src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
254
256
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
255
257
|
] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] }) })
|
|
256
258
|
] }));
|
|
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
|
|
|
7
7
|
const editor_guide_selection_1 = require("../../helpers/editor-guide-selection");
|
|
8
8
|
const editor_ruler_1 = require("../../helpers/editor-ruler");
|
|
9
9
|
const ruler_canvas_size_1 = require("../../helpers/ruler-canvas-size");
|
|
10
|
+
const studio_pixel_ratio_1 = require("../../helpers/studio-pixel-ratio");
|
|
10
11
|
const editor_guides_1 = require("../../state/editor-guides");
|
|
11
12
|
const ForceSpecificCursor_1 = require("../ForceSpecificCursor");
|
|
12
13
|
const should_clear_selection_on_pointer_down_1 = require("../Timeline/should-clear-selection-on-pointer-down");
|
|
@@ -35,6 +36,7 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
35
36
|
orientation,
|
|
36
37
|
size,
|
|
37
38
|
});
|
|
39
|
+
const pixelRatio = (0, studio_pixel_ratio_1.getStudioPixelRatio)();
|
|
38
40
|
(0, react_1.useEffect)(() => {
|
|
39
41
|
(0, editor_ruler_1.drawMarkingOnRulerCanvas)({
|
|
40
42
|
scale,
|
|
@@ -45,8 +47,8 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
45
47
|
orientation,
|
|
46
48
|
rulerCanvasRef,
|
|
47
49
|
guideHighlight,
|
|
48
|
-
canvasHeight: rulerHeight *
|
|
49
|
-
canvasWidth: rulerWidth *
|
|
50
|
+
canvasHeight: rulerHeight * pixelRatio,
|
|
51
|
+
canvasWidth: rulerWidth * pixelRatio,
|
|
50
52
|
});
|
|
51
53
|
}, [
|
|
52
54
|
scale,
|
|
@@ -59,6 +61,7 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
59
61
|
size,
|
|
60
62
|
rulerHeight,
|
|
61
63
|
rulerWidth,
|
|
64
|
+
pixelRatio,
|
|
62
65
|
]);
|
|
63
66
|
const rulerStyle = (0, react_1.useMemo)(() => ({
|
|
64
67
|
position: 'absolute',
|
|
@@ -107,6 +110,6 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
107
110
|
onPointerSessionStart,
|
|
108
111
|
canCreateGuides,
|
|
109
112
|
]);
|
|
110
|
-
return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth *
|
|
113
|
+
return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth * pixelRatio, height: rulerHeight * pixelRatio, style: rulerStyle, "aria-label": `${isVerticalRuler ? 'Vertical' : 'Horizontal'} ruler`, "aria-readonly": !canCreateGuides, [should_clear_selection_on_pointer_down_1.PREVENT_CLEAR_SELECTION_ON_POINTER_DOWN_ATTR]: 'true', onPointerDown: onPointerDown }));
|
|
111
114
|
};
|
|
112
115
|
exports.default = Ruler;
|