@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
|
@@ -6,19 +6,17 @@ const studio_shared_1 = require("@remotion/studio-shared");
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
9
|
-
const effects_1 = require("../icons/effects");
|
|
10
9
|
const external_link_1 = require("../icons/external-link");
|
|
11
10
|
const modals_1 = require("../state/modals");
|
|
12
11
|
const ContextMenu_1 = require("./ContextMenu");
|
|
13
12
|
const effect_drag_and_drop_1 = require("./effect-drag-and-drop");
|
|
14
13
|
const effect_picker_search_1 = require("./effect-picker-search");
|
|
15
|
-
const layout_1 = require("./layout");
|
|
16
14
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
17
15
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
18
16
|
const RemInput_1 = require("./NewComposition/RemInput");
|
|
19
17
|
const shared_1 = require("./QuickSwitcher/shared");
|
|
20
18
|
const container = {
|
|
21
|
-
width:
|
|
19
|
+
width: 440,
|
|
22
20
|
};
|
|
23
21
|
const panelStyle = {
|
|
24
22
|
borderRadius: 6,
|
|
@@ -68,9 +66,13 @@ const aboutEffectsIcon = {
|
|
|
68
66
|
width: 12,
|
|
69
67
|
};
|
|
70
68
|
const resultList = {
|
|
71
|
-
height:
|
|
69
|
+
height: 420,
|
|
70
|
+
display: 'grid',
|
|
71
|
+
gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
|
|
72
|
+
alignContent: 'start',
|
|
73
|
+
gap: 4,
|
|
72
74
|
overflowY: 'auto',
|
|
73
|
-
|
|
75
|
+
padding: '0 12px 10px',
|
|
74
76
|
};
|
|
75
77
|
const noResults = {
|
|
76
78
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -80,40 +82,34 @@ const noResults = {
|
|
|
80
82
|
const resultContainer = {
|
|
81
83
|
cursor: 'default',
|
|
82
84
|
display: 'flex',
|
|
83
|
-
flexDirection: '
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
marginBottom: 1,
|
|
88
|
-
marginLeft: 4,
|
|
89
|
-
marginRight: 4,
|
|
85
|
+
flexDirection: 'column',
|
|
86
|
+
gap: 1,
|
|
87
|
+
padding: '3px 3px 1px',
|
|
88
|
+
minWidth: 0,
|
|
90
89
|
borderRadius: 4,
|
|
91
90
|
};
|
|
92
|
-
const
|
|
93
|
-
width:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
flex: 1,
|
|
99
|
-
minWidth: 0,
|
|
91
|
+
const previewFrame = {
|
|
92
|
+
width: '100%',
|
|
93
|
+
aspectRatio: '3 / 2',
|
|
94
|
+
position: 'relative',
|
|
95
|
+
backgroundColor: colors_1.WHITE_ALPHA_06,
|
|
96
|
+
borderRadius: 3,
|
|
100
97
|
overflow: 'hidden',
|
|
101
|
-
paddingTop: 5,
|
|
102
|
-
paddingBottom: 5,
|
|
103
98
|
};
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
99
|
+
const preview = {
|
|
100
|
+
position: 'absolute',
|
|
101
|
+
inset: 0,
|
|
102
|
+
width: '100%',
|
|
103
|
+
height: '100%',
|
|
104
|
+
objectFit: 'cover',
|
|
109
105
|
};
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
flexShrink: 0,
|
|
106
|
+
const label = {
|
|
107
|
+
fontSize: shared_1.QUICK_SWITCHER_RESULT_LABEL_FONT_SIZE - 2,
|
|
108
|
+
overflowWrap: 'anywhere',
|
|
114
109
|
};
|
|
115
110
|
const EffectPickerResult = ({ item, selected, onSelected }) => {
|
|
116
111
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
112
|
+
const [previewLoaded, setPreviewLoaded] = (0, react_1.useState)(false);
|
|
117
113
|
const ref = (0, react_1.useRef)(null);
|
|
118
114
|
(0, shared_1.useScrollIntoViewOnSelected)(ref, selected);
|
|
119
115
|
const style = (0, react_1.useMemo)(() => {
|
|
@@ -151,7 +147,10 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
|
|
|
151
147
|
];
|
|
152
148
|
}, [item]);
|
|
153
149
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { ref: ref, style: style, onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: [
|
|
154
|
-
jsx_runtime_1.jsx(
|
|
150
|
+
jsx_runtime_1.jsx("div", { style: previewFrame, children: jsx_runtime_1.jsx("img", { src: `https://www.remotion.dev${(0, studio_shared_1.getEffectPreviewSource)(item)}`, alt: (0, studio_shared_1.getEffectPreviewAlt)(item), style: {
|
|
151
|
+
...preview,
|
|
152
|
+
visibility: previewLoaded ? 'visible' : 'hidden',
|
|
153
|
+
}, loading: "lazy", onLoad: () => setPreviewLoaded(true) }) }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.label })
|
|
155
154
|
] }) }));
|
|
156
155
|
};
|
|
157
156
|
const EffectPickerContent = ({ state }) => {
|
|
@@ -171,15 +170,22 @@ const EffectPickerContent = ({ state }) => {
|
|
|
171
170
|
clientId: state.clientId,
|
|
172
171
|
effect: item.effect,
|
|
173
172
|
fileName: state.fileName,
|
|
174
|
-
|
|
173
|
+
nodePathInfo: state.nodePathInfo,
|
|
174
|
+
selectItems: state.selectItems,
|
|
175
175
|
});
|
|
176
|
-
}, [
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
176
|
+
}, [
|
|
177
|
+
setSelectedModal,
|
|
178
|
+
state.clientId,
|
|
179
|
+
state.fileName,
|
|
180
|
+
state.nodePathInfo,
|
|
181
|
+
state.selectItems,
|
|
182
|
+
]);
|
|
183
|
+
const moveSelection = (0, react_1.useCallback)((offset) => {
|
|
184
|
+
if (results.length === 0) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
setSelectedIndex((i) => (((i + offset) % results.length) + results.length) % results.length);
|
|
188
|
+
}, [results.length]);
|
|
183
189
|
const onEnter = (0, react_1.useCallback)(() => {
|
|
184
190
|
if (selectedIndexRounded === -1) {
|
|
185
191
|
return;
|
|
@@ -189,7 +195,7 @@ const EffectPickerContent = ({ state }) => {
|
|
|
189
195
|
(0, react_1.useEffect)(() => {
|
|
190
196
|
const downBinding = keybindings.registerKeybinding({
|
|
191
197
|
key: 'ArrowDown',
|
|
192
|
-
callback:
|
|
198
|
+
callback: () => moveSelection(3),
|
|
193
199
|
commandCtrlKey: false,
|
|
194
200
|
event: 'keydown',
|
|
195
201
|
preventDefault: true,
|
|
@@ -198,7 +204,25 @@ const EffectPickerContent = ({ state }) => {
|
|
|
198
204
|
});
|
|
199
205
|
const upBinding = keybindings.registerKeybinding({
|
|
200
206
|
key: 'ArrowUp',
|
|
201
|
-
callback:
|
|
207
|
+
callback: () => moveSelection(-3),
|
|
208
|
+
commandCtrlKey: false,
|
|
209
|
+
event: 'keydown',
|
|
210
|
+
preventDefault: true,
|
|
211
|
+
triggerIfInputFieldFocused: true,
|
|
212
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
213
|
+
});
|
|
214
|
+
const rightBinding = keybindings.registerKeybinding({
|
|
215
|
+
key: 'ArrowRight',
|
|
216
|
+
callback: () => moveSelection(1),
|
|
217
|
+
commandCtrlKey: false,
|
|
218
|
+
event: 'keydown',
|
|
219
|
+
preventDefault: true,
|
|
220
|
+
triggerIfInputFieldFocused: true,
|
|
221
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
222
|
+
});
|
|
223
|
+
const leftBinding = keybindings.registerKeybinding({
|
|
224
|
+
key: 'ArrowLeft',
|
|
225
|
+
callback: () => moveSelection(-1),
|
|
202
226
|
commandCtrlKey: false,
|
|
203
227
|
event: 'keydown',
|
|
204
228
|
preventDefault: true,
|
|
@@ -217,9 +241,11 @@ const EffectPickerContent = ({ state }) => {
|
|
|
217
241
|
return () => {
|
|
218
242
|
downBinding.unregister();
|
|
219
243
|
upBinding.unregister();
|
|
244
|
+
rightBinding.unregister();
|
|
245
|
+
leftBinding.unregister();
|
|
220
246
|
enterBinding.unregister();
|
|
221
247
|
};
|
|
222
|
-
}, [keybindings,
|
|
248
|
+
}, [keybindings, moveSelection, onEnter]);
|
|
223
249
|
const onTextChange = (0, react_1.useCallback)((e) => {
|
|
224
250
|
setQuery(e.target.value);
|
|
225
251
|
setSelectedIndex(0);
|
|
@@ -234,15 +234,15 @@ const makeSourceControlsVisible = (sourceCode) => {
|
|
|
234
234
|
};
|
|
235
235
|
const ElementLibraryAddConfirmation = ({ displayName, origin, url }) => {
|
|
236
236
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
237
|
-
jsx_runtime_1.jsxs("dl", { style: metadataStyle, "aria-label": "
|
|
237
|
+
jsx_runtime_1.jsxs("dl", { style: metadataStyle, "aria-label": "Element Library details", children: [displayName === null ? null : (jsx_runtime_1.jsxs("div", { style: metadataRowStyle, children: [
|
|
238
238
|
jsx_runtime_1.jsx("dt", { style: metadataTermStyle, children: "Display name" }), jsx_runtime_1.jsx("dd", { style: metadataDescriptionStyle, children: displayName })
|
|
239
239
|
] })), jsx_runtime_1.jsxs("div", { style: metadataRowStyle, children: [
|
|
240
240
|
jsx_runtime_1.jsx("dt", { style: metadataTermStyle, children: "Request source" }), jsx_runtime_1.jsx("dd", { style: metadataDescriptionStyle, children: origin })
|
|
241
241
|
] }), jsx_runtime_1.jsxs("div", { style: metadataRowStyle, children: [
|
|
242
|
-
jsx_runtime_1.jsx("dt", { style: metadataTermStyle, children: "
|
|
242
|
+
jsx_runtime_1.jsx("dt", { style: metadataTermStyle, children: "Element Library URL" }), jsx_runtime_1.jsx("dd", { style: metadataDescriptionStyle, children: jsx_runtime_1.jsx("code", { style: codeStyle, children: url }) })
|
|
243
243
|
] })
|
|
244
244
|
] }), jsx_runtime_1.jsxs("div", { style: warningStyle, children: [
|
|
245
|
-
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: warningIconStyle }), jsx_runtime_1.jsxs("p", { style: warningDescriptionStyle, children: ["This adds the
|
|
245
|
+
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: warningIconStyle }), jsx_runtime_1.jsxs("p", { style: warningDescriptionStyle, children: ["This adds the Element Library to", ' ', jsx_runtime_1.jsx("strong", { style: browseElementsStyle, children: "Browse Elements" }),
|
|
246
246
|
" when nothing is selected on the canvas. It is saved in", ' ', jsx_runtime_1.jsx("code", { style: codeStyle, children: "remotion.config.ts" }),
|
|
247
247
|
"."] })
|
|
248
248
|
] })
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElementLibrariesSettings = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const browse_elements_1 = require("../icons/browse-elements");
|
|
9
|
+
const trash_1 = require("../icons/trash");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
11
|
+
const Button_1 = require("./Button");
|
|
12
|
+
const call_api_1 = require("./call-api");
|
|
13
|
+
const InlineAction_1 = require("./InlineAction");
|
|
14
|
+
const styles_1 = require("./InspectorPanel/styles");
|
|
15
|
+
const RemInput_1 = require("./NewComposition/RemInput");
|
|
16
|
+
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
17
|
+
const SettingsContext_1 = require("./SettingsContext");
|
|
18
|
+
const Spinner_1 = require("./Spinner");
|
|
19
|
+
const REMOTION_ELEMENTS_URL = 'https://www.remotion.dev/elements';
|
|
20
|
+
const container = {
|
|
21
|
+
alignSelf: 'flex-start',
|
|
22
|
+
boxSizing: 'border-box',
|
|
23
|
+
flex: 1,
|
|
24
|
+
minWidth: 0,
|
|
25
|
+
width: '100%',
|
|
26
|
+
};
|
|
27
|
+
const description = {
|
|
28
|
+
color: colors_1.LIGHT_TEXT,
|
|
29
|
+
fontSize: 13,
|
|
30
|
+
lineHeight: 1.5,
|
|
31
|
+
margin: '16px 16px 12px',
|
|
32
|
+
};
|
|
33
|
+
const addLibraryHeading = {
|
|
34
|
+
...styles_1.sectionHeader,
|
|
35
|
+
margin: '12px 0 0',
|
|
36
|
+
padding: '4px 16px',
|
|
37
|
+
};
|
|
38
|
+
const libraryRow = {
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
display: 'flex',
|
|
41
|
+
gap: 10,
|
|
42
|
+
minHeight: 38,
|
|
43
|
+
padding: '4px 16px',
|
|
44
|
+
};
|
|
45
|
+
const libraryIcon = {
|
|
46
|
+
flexShrink: 0,
|
|
47
|
+
height: 22,
|
|
48
|
+
width: 22,
|
|
49
|
+
};
|
|
50
|
+
const libraryDetails = {
|
|
51
|
+
alignItems: 'flex-start',
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flex: 1,
|
|
54
|
+
flexDirection: 'column',
|
|
55
|
+
minWidth: 0,
|
|
56
|
+
};
|
|
57
|
+
const libraryName = {
|
|
58
|
+
fontSize: 13,
|
|
59
|
+
maxWidth: '100%',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
textOverflow: 'ellipsis',
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
};
|
|
64
|
+
const libraryUrlStyle = {
|
|
65
|
+
cursor: 'pointer',
|
|
66
|
+
fontSize: 12,
|
|
67
|
+
maxWidth: '100%',
|
|
68
|
+
minWidth: 0,
|
|
69
|
+
outline: 'none',
|
|
70
|
+
overflow: 'hidden',
|
|
71
|
+
textDecoration: 'none',
|
|
72
|
+
textOverflow: 'ellipsis',
|
|
73
|
+
whiteSpace: 'nowrap',
|
|
74
|
+
};
|
|
75
|
+
const inputRow = {
|
|
76
|
+
display: 'flex',
|
|
77
|
+
gap: 8,
|
|
78
|
+
padding: '4px 16px',
|
|
79
|
+
};
|
|
80
|
+
const input = {
|
|
81
|
+
flex: 1,
|
|
82
|
+
minWidth: 0,
|
|
83
|
+
};
|
|
84
|
+
const message = {
|
|
85
|
+
padding: '4px 16px',
|
|
86
|
+
};
|
|
87
|
+
const trashIcon = {
|
|
88
|
+
height: 14,
|
|
89
|
+
width: 14,
|
|
90
|
+
};
|
|
91
|
+
const ElementLibrariesSettings = () => {
|
|
92
|
+
var _a;
|
|
93
|
+
const { studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
|
|
94
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
95
|
+
const [url, setUrl] = (0, react_1.useState)('');
|
|
96
|
+
const [displayName, setDisplayName] = (0, react_1.useState)('');
|
|
97
|
+
const [busy, setBusy] = (0, react_1.useState)(null);
|
|
98
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
99
|
+
const [hoveredUrl, setHoveredUrl] = (0, react_1.useState)(null);
|
|
100
|
+
const libraries = ((_a = studioRuntimeConfig === null || studioRuntimeConfig === void 0 ? void 0 : studioRuntimeConfig.elementLibraries) !== null && _a !== void 0 ? _a : []).filter((library) => library.url !== REMOTION_ELEMENTS_URL);
|
|
101
|
+
let normalizedUrl = null;
|
|
102
|
+
try {
|
|
103
|
+
const parsedUrl = new URL(url.trim());
|
|
104
|
+
if (parsedUrl.protocol === 'http:' || parsedUrl.protocol === 'https:') {
|
|
105
|
+
normalizedUrl = parsedUrl.href;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
catch (_b) {
|
|
109
|
+
// Keep the Add button disabled until a valid URL is entered.
|
|
110
|
+
}
|
|
111
|
+
const duplicate = normalizedUrl === REMOTION_ELEMENTS_URL ||
|
|
112
|
+
libraries.some((library) => library.url === normalizedUrl);
|
|
113
|
+
const canSave = previewServerState.type === 'connected' && busy === null;
|
|
114
|
+
const addLibrary = (0, react_1.useCallback)(async () => {
|
|
115
|
+
if (!canSave || normalizedUrl === null || duplicate) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
setBusy('add');
|
|
119
|
+
setError(null);
|
|
120
|
+
try {
|
|
121
|
+
const response = await (0, call_api_1.callApi)('/api/update-config', {
|
|
122
|
+
clientId: previewServerState.clientId,
|
|
123
|
+
updates: [
|
|
124
|
+
{
|
|
125
|
+
setter: 'addElementLibrary',
|
|
126
|
+
type: 'set',
|
|
127
|
+
value: displayName.trim()
|
|
128
|
+
? { url: normalizedUrl, displayName: displayName.trim() }
|
|
129
|
+
: { url: normalizedUrl },
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
});
|
|
133
|
+
if (!response.success) {
|
|
134
|
+
setError(response.reason);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
setUrl('');
|
|
138
|
+
setDisplayName('');
|
|
139
|
+
}
|
|
140
|
+
catch (err) {
|
|
141
|
+
setError(err.message);
|
|
142
|
+
}
|
|
143
|
+
finally {
|
|
144
|
+
setBusy(null);
|
|
145
|
+
}
|
|
146
|
+
}, [canSave, displayName, duplicate, normalizedUrl, previewServerState]);
|
|
147
|
+
const removeLibrary = (0, react_1.useCallback)(async (libraryUrl) => {
|
|
148
|
+
if (previewServerState.type !== 'connected' || busy !== null) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
setBusy(libraryUrl);
|
|
152
|
+
setError(null);
|
|
153
|
+
try {
|
|
154
|
+
const response = await (0, call_api_1.callApi)('/api/update-config', {
|
|
155
|
+
clientId: previewServerState.clientId,
|
|
156
|
+
updates: [
|
|
157
|
+
{
|
|
158
|
+
setter: 'addElementLibrary',
|
|
159
|
+
type: 'delete',
|
|
160
|
+
value: libraryUrl,
|
|
161
|
+
},
|
|
162
|
+
],
|
|
163
|
+
});
|
|
164
|
+
if (!response.success) {
|
|
165
|
+
setError(response.reason);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
catch (err) {
|
|
169
|
+
setError(err.message);
|
|
170
|
+
}
|
|
171
|
+
finally {
|
|
172
|
+
setBusy(null);
|
|
173
|
+
}
|
|
174
|
+
}, [busy, previewServerState]);
|
|
175
|
+
const renderTrash = (0, react_1.useCallback)((color) => {
|
|
176
|
+
return jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: trashIcon });
|
|
177
|
+
}, []);
|
|
178
|
+
return (jsx_runtime_1.jsxs("section", { style: container, children: [
|
|
179
|
+
jsx_runtime_1.jsx("p", { style: description, children: "Add libraries to browse their elements in Studio." }), jsx_runtime_1.jsxs("div", { role: "list", "aria-label": "Element Libraries", children: [
|
|
180
|
+
jsx_runtime_1.jsxs("div", { role: "listitem", style: libraryRow, children: [
|
|
181
|
+
jsx_runtime_1.jsx(browse_elements_1.BrowseElementsIcon, { "aria-hidden": true, color: colors_1.LIGHT_TEXT, style: libraryIcon }), jsx_runtime_1.jsxs("div", { style: libraryDetails, children: [
|
|
182
|
+
jsx_runtime_1.jsx("div", { style: libraryName, children: "Remotion Elements" }), jsx_runtime_1.jsx("a", { href: REMOTION_ELEMENTS_URL, target: "_blank", rel: "noopener noreferrer", style: {
|
|
183
|
+
...libraryUrlStyle,
|
|
184
|
+
color: hoveredUrl === REMOTION_ELEMENTS_URL ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
185
|
+
}, onMouseEnter: () => setHoveredUrl(REMOTION_ELEMENTS_URL), onMouseLeave: () => setHoveredUrl(null), children: REMOTION_ELEMENTS_URL.replace(/^https?:\/\//, '') })
|
|
186
|
+
] })
|
|
187
|
+
] }), libraries.map((library) => {
|
|
188
|
+
var _a, _b;
|
|
189
|
+
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: libraryRow, children: [
|
|
190
|
+
jsx_runtime_1.jsx(browse_elements_1.BrowseElementsIcon, { "aria-hidden": true, color: colors_1.LIGHT_TEXT, style: libraryIcon }), jsx_runtime_1.jsxs("div", { style: libraryDetails, children: [
|
|
191
|
+
jsx_runtime_1.jsx("div", { style: libraryName, children: (_a = library.displayName) !== null && _a !== void 0 ? _a : new URL(library.url).host }), jsx_runtime_1.jsx("a", { href: library.url, target: "_blank", rel: "noopener noreferrer", style: {
|
|
192
|
+
...libraryUrlStyle,
|
|
193
|
+
color: hoveredUrl === library.url ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
194
|
+
}, onMouseEnter: () => setHoveredUrl(library.url), onMouseLeave: () => setHoveredUrl(null), children: library.url.replace(/^https?:\/\//, '') })
|
|
195
|
+
] }), busy === library.url ? (jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Remove", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": `Remove ${(_b = library.displayName) !== null && _b !== void 0 ? _b : library.url}`, title: "", disabled: !canSave, onClick: () => removeLibrary(library.url), renderAction: renderTrash, variant: null }) }))] }, library.url));
|
|
196
|
+
})] }), jsx_runtime_1.jsx("h3", { style: addLibraryHeading, children: "Add new library" }), jsx_runtime_1.jsxs("div", { style: inputRow, children: [
|
|
197
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": "Element Library URL", placeholder: "https://example.com/elements", status: "ok", rightAlign: false, style: input, value: url, onChange: (event) => setUrl(event.target.value) }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": "Element Library name", placeholder: "Name (optional)", status: "ok", rightAlign: false, style: input, value: displayName, onChange: (event) => setDisplayName(event.target.value) })
|
|
198
|
+
] }), jsx_runtime_1.jsx("div", { style: inputRow, children: jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSave || normalizedUrl === null || duplicate, onClick: addLibrary, size: "compact", children: busy === 'add' ? 'Adding…' : '+ Add Element Library' }) }), duplicate ? (jsx_runtime_1.jsx("div", { style: message, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "This library is already added." }) })) : null, error ? (jsx_runtime_1.jsx("div", { style: message, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "error", message: error }) })) : null] }));
|
|
199
|
+
};
|
|
200
|
+
exports.ElementLibrariesSettings = ElementLibrariesSettings;
|
|
@@ -15,7 +15,9 @@ const use_static_files_1 = require("./use-static-files");
|
|
|
15
15
|
const useSelectComposition = () => {
|
|
16
16
|
const { setCompositionFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
|
|
17
17
|
const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
18
|
-
|
|
18
|
+
// A supplied frame is explicit navigation (for example, opening a nested
|
|
19
|
+
// composition at its sequence's frame). Plain selection does not seek.
|
|
20
|
+
const setFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
|
|
19
21
|
return (0, react_1.useCallback)((c, push, frame = null) => {
|
|
20
22
|
var _a;
|
|
21
23
|
if (push) {
|
|
@@ -95,7 +97,7 @@ const InitialCompositionLoader = () => {
|
|
|
95
97
|
if (!compositionListIsReady) {
|
|
96
98
|
return;
|
|
97
99
|
}
|
|
98
|
-
if (compositions.length > 0) {
|
|
100
|
+
if (compositions.length > 0 && !window.remotion_isReadOnlyStudio) {
|
|
99
101
|
selectComposition(compositions[0], true);
|
|
100
102
|
}
|
|
101
103
|
else {
|
|
@@ -13,6 +13,7 @@ const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
|
13
13
|
const noop_1 = require("../helpers/noop");
|
|
14
14
|
const z_index_1 = require("../state/z-index");
|
|
15
15
|
const InlineAction_1 = require("./InlineAction");
|
|
16
|
+
const menu_tree_context_1 = require("./Menu/menu-tree-context");
|
|
16
17
|
const portals_1 = require("./Menu/portals");
|
|
17
18
|
const styles_1 = require("./Menu/styles");
|
|
18
19
|
const MenuContent_1 = require("./NewComposition/MenuContent");
|
|
@@ -23,6 +24,7 @@ const container = {
|
|
|
23
24
|
const InlineDropdown = ({ values, getItems, onOpenChange, unhoveredColor, ...props }) => {
|
|
24
25
|
var _a, _b;
|
|
25
26
|
const ref = (0, react_1.useRef)(null);
|
|
27
|
+
const [menuTreeId] = (0, react_1.useState)(menu_tree_context_1.getNextMenuTreeId);
|
|
26
28
|
const [opened, setOpened] = (0, react_1.useState)({ type: 'not-open' });
|
|
27
29
|
const { currentZIndex } = (0, z_index_1.useZIndex)();
|
|
28
30
|
const size = player_1.PlayerInternals.useElementSize(ref, {
|
|
@@ -96,9 +98,31 @@ const InlineDropdown = ({ values, getItems, onOpenChange, unhoveredColor, ...pro
|
|
|
96
98
|
setOpened({ type: 'not-open' });
|
|
97
99
|
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
|
|
98
100
|
}, [onOpenChange]);
|
|
101
|
+
(0, react_1.useEffect)(() => {
|
|
102
|
+
if (opened.type === 'not-open') {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const dismissWithoutClickThrough = (event) => {
|
|
106
|
+
if (event.button !== 0) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
const target = event.target;
|
|
110
|
+
if ((0, menu_tree_context_1.isNodeInMenuTree)(target, menuTreeId)) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
event.preventDefault();
|
|
114
|
+
event.stopPropagation();
|
|
115
|
+
event.stopImmediatePropagation();
|
|
116
|
+
onHide();
|
|
117
|
+
};
|
|
118
|
+
window.addEventListener('pointerdown', dismissWithoutClickThrough, true);
|
|
119
|
+
return () => {
|
|
120
|
+
window.removeEventListener('pointerdown', dismissWithoutClickThrough, true);
|
|
121
|
+
};
|
|
122
|
+
}, [menuTreeId, onHide, opened.type]);
|
|
99
123
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
100
|
-
jsx_runtime_1.jsx("div", { ref: ref, style: container, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props }) }), portalStyle && opened.type === 'open'
|
|
101
|
-
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: (_b = (_a = opened.values) !== null && _a !== void 0 ? _a : values) !== null && _b !== void 0 ? _b : [], onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
124
|
+
jsx_runtime_1.jsx("div", { ref: ref, style: container, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props, "aria-expanded": opened.type === 'open' }) }), portalStyle && opened.type === 'open'
|
|
125
|
+
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { "data-remotion-menu-tree-id": menuTreeId, style: portalStyle, onPointerDown: (event) => event.stopPropagation(), children: jsx_runtime_1.jsx(menu_tree_context_1.MenuTreeContext.Provider, { value: menuTreeId, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: (_b = (_a = opened.values) !== null && _a !== void 0 ? _a : values) !== null && _b !== void 0 ? _b : [], onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
102
126
|
: null] }));
|
|
103
127
|
};
|
|
104
128
|
exports.InlineDropdown = InlineDropdown;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
7
|
const client_id_1 = require("../helpers/client-id");
|
|
8
8
|
const colors_1 = require("../helpers/colors");
|
|
9
|
+
const copy_text_1 = require("../helpers/copy-text");
|
|
9
10
|
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
10
11
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
11
12
|
const caret_1 = require("../icons/caret");
|
|
@@ -57,6 +58,16 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
57
58
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
58
59
|
}
|
|
59
60
|
}, [contextForAgents]);
|
|
61
|
+
const copyPath = (0, react_1.useCallback)(() => {
|
|
62
|
+
if (!(location === null || location === void 0 ? void 0 : location.source)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
(0, copy_text_1.copyText)(location.source)
|
|
66
|
+
.then(() => (0, NotificationCenter_1.showNotification)('Copied path', 1500))
|
|
67
|
+
.catch((err) => {
|
|
68
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy path: ${err.message}`, 2000);
|
|
69
|
+
});
|
|
70
|
+
}, [location]);
|
|
60
71
|
const defaultAppName = defaultOpenInTarget === 'git-source'
|
|
61
72
|
? 'GitHub'
|
|
62
73
|
: (defaultEditorName !== null && defaultEditorName !== void 0 ? defaultEditorName : 'default editor');
|
|
@@ -89,6 +100,7 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
89
100
|
folder: locationType === 'folder',
|
|
90
101
|
gitSourceDisabled: location === null,
|
|
91
102
|
onConfigureApps: configureDefaultApps,
|
|
103
|
+
onCopyPath: locationType === 'folder' && (location === null || location === void 0 ? void 0 : location.source) ? copyPath : undefined,
|
|
92
104
|
onOpenInCodingAgent: (codingAgentId, codingAgentName) => {
|
|
93
105
|
openWithCodingAgent(codingAgentId, codingAgentName).catch(() => undefined);
|
|
94
106
|
},
|
|
@@ -138,6 +150,7 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
138
150
|
canConfigureApps,
|
|
139
151
|
canOpenInEditor,
|
|
140
152
|
configureDefaultApps,
|
|
153
|
+
copyPath,
|
|
141
154
|
defaultEditorId,
|
|
142
155
|
defaultOpenInTarget,
|
|
143
156
|
editorInfo,
|
|
@@ -78,11 +78,16 @@ const AlignmentControls = ({ track }) => {
|
|
|
78
78
|
const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
79
79
|
const nodePropStatuses = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
|
|
80
80
|
const firstKeyframedStatus = Object.values(nodePropStatuses !== null && nodePropStatuses !== void 0 ? nodePropStatuses : {}).find((status) => status.status === 'keyframed');
|
|
81
|
-
const sourceFrame =
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
82
|
+
displayFrame: timelinePosition,
|
|
83
|
+
propStatus: firstKeyframedStatus !== null && firstKeyframedStatus !== void 0 ? firstKeyframedStatus : null,
|
|
84
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
85
|
+
propStatus: firstKeyframedStatus !== null && firstKeyframedStatus !== void 0 ? firstKeyframedStatus : null,
|
|
84
86
|
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
85
|
-
|
|
87
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
88
|
+
}),
|
|
89
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
90
|
+
});
|
|
86
91
|
const dragOverrides = (_b = getDragOverrides(nodePath)) !== null && _b !== void 0 ? _b : {};
|
|
87
92
|
const activeSchema = (0, selected_outline_drag_1.getSelectedOutlineActiveSchema)({
|
|
88
93
|
schema: track.sequence.controls.schema,
|
|
@@ -170,7 +175,16 @@ const AlignmentControls = ({ track }) => {
|
|
|
170
175
|
fileName: nodePath.absolutePath,
|
|
171
176
|
nodePath,
|
|
172
177
|
fieldKey: selected_outline_types_1.translateFieldKey,
|
|
173
|
-
sourceFrame,
|
|
178
|
+
sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
179
|
+
displayFrame: timelinePosition,
|
|
180
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
181
|
+
propStatus,
|
|
182
|
+
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
183
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
184
|
+
}),
|
|
185
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
186
|
+
propStatus,
|
|
187
|
+
}),
|
|
174
188
|
value: newValue,
|
|
175
189
|
schema: track.sequence.controls.schema,
|
|
176
190
|
setPropStatuses,
|
|
@@ -197,11 +211,16 @@ const AlignmentControls = ({ track }) => {
|
|
|
197
211
|
const renderNodePath = track.nodePathInfo.sequenceSubscriptionKey;
|
|
198
212
|
const renderNodePropStatuses = remotion_1.Internals.getPropStatusesCtx(propStatuses, renderNodePath);
|
|
199
213
|
const firstRenderKeyframedStatus = Object.values(renderNodePropStatuses !== null && renderNodePropStatuses !== void 0 ? renderNodePropStatuses : {}).find((status) => status.status === 'keyframed');
|
|
200
|
-
const renderSourceFrame =
|
|
201
|
-
|
|
202
|
-
|
|
214
|
+
const renderSourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
215
|
+
displayFrame: timelinePosition,
|
|
216
|
+
propStatus: firstRenderKeyframedStatus !== null && firstRenderKeyframedStatus !== void 0 ? firstRenderKeyframedStatus : null,
|
|
217
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
218
|
+
propStatus: firstRenderKeyframedStatus !== null && firstRenderKeyframedStatus !== void 0 ? firstRenderKeyframedStatus : null,
|
|
203
219
|
keyframeDisplayOffset: track.keyframeDisplayOffset,
|
|
204
|
-
|
|
220
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
221
|
+
}),
|
|
222
|
+
keyframePlaybackRate: track.keyframePlaybackRate,
|
|
223
|
+
});
|
|
205
224
|
const renderDragOverrides = (_a = getDragOverrides(renderNodePath)) !== null && _a !== void 0 ? _a : {};
|
|
206
225
|
const renderActiveSchema = (0, selected_outline_drag_1.getSelectedOutlineActiveSchema)({
|
|
207
226
|
schema: track.sequence.controls.schema,
|
|
@@ -19,6 +19,7 @@ const sectionTitle = {
|
|
|
19
19
|
textAlign: 'left',
|
|
20
20
|
textOverflow: 'ellipsis',
|
|
21
21
|
userSelect: 'none',
|
|
22
|
+
WebkitUserSelect: 'none',
|
|
22
23
|
whiteSpace: 'nowrap',
|
|
23
24
|
};
|
|
24
25
|
const staticSectionTitle = {
|
|
@@ -28,7 +29,7 @@ const staticSectionTitle = {
|
|
|
28
29
|
const collapsibleSectionHeaderButton = {
|
|
29
30
|
...sectionTitle,
|
|
30
31
|
appearance: 'none',
|
|
31
|
-
backgroundColor:
|
|
32
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
32
33
|
border: 'none',
|
|
33
34
|
borderRadius: 3,
|
|
34
35
|
cursor: 'default',
|
|
@@ -163,14 +163,14 @@ const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, read
|
|
|
163
163
|
defaultProps: currentDefaultProps,
|
|
164
164
|
mode: defaultPropsMode,
|
|
165
165
|
propsEditType: 'default-props',
|
|
166
|
-
showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
|
|
166
|
+
showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection && !readOnlyStudio,
|
|
167
167
|
});
|
|
168
|
-
if (
|
|
168
|
+
if (!canShowDefaultPropsSection) {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
171
171
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.compositionDefaultPropsSection, children: [
|
|
172
172
|
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: expanded ? (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
|
|
173
|
-
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" }), defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null] })) : null, expanded: expanded, label:
|
|
173
|
+
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" }), defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null] })) : null, expanded: expanded, label: readOnlyStudio ? 'Props' : 'Default Props', onToggle: () => setExpanded(!expanded) }) }), jsx_runtime_1.jsxs(common_1.InspectorSectionBody, { expanded: expanded, children: [defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
|
|
174
174
|
] })
|
|
175
175
|
] }));
|
|
176
176
|
};
|