@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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEasingSelectionFromCurrentKeyframes = void 0;
|
|
4
4
|
const get_timeline_keyframes_1 = require("../Timeline/get-timeline-keyframes");
|
|
5
|
-
const getEasingSelectionFromCurrentKeyframes = ({ keyframeDisplayOffset, nodePathInfo, propStatus, segmentIndex, }) => {
|
|
5
|
+
const getEasingSelectionFromCurrentKeyframes = ({ keyframeDisplayOffset, keyframePlaybackRate, nodePathInfo, propStatus, segmentIndex, }) => {
|
|
6
6
|
const fromKeyframe = propStatus.keyframes[segmentIndex];
|
|
7
7
|
const toKeyframe = propStatus.keyframes[segmentIndex + 1];
|
|
8
8
|
if (!fromKeyframe || !toKeyframe) {
|
|
@@ -11,12 +11,13 @@ const getEasingSelectionFromCurrentKeyframes = ({ keyframeDisplayOffset, nodePat
|
|
|
11
11
|
const resolvedKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
12
12
|
propStatus,
|
|
13
13
|
keyframeDisplayOffset,
|
|
14
|
+
keyframePlaybackRate,
|
|
14
15
|
});
|
|
15
16
|
return {
|
|
16
17
|
type: 'easing',
|
|
17
18
|
nodePathInfo,
|
|
18
|
-
fromFrame: fromKeyframe.frame + resolvedKeyframeDisplayOffset,
|
|
19
|
-
toFrame: toKeyframe.frame + resolvedKeyframeDisplayOffset,
|
|
19
|
+
fromFrame: fromKeyframe.frame / keyframePlaybackRate + resolvedKeyframeDisplayOffset,
|
|
20
|
+
toFrame: toKeyframe.frame / keyframePlaybackRate + resolvedKeyframeDisplayOffset,
|
|
20
21
|
segmentIndex,
|
|
21
22
|
};
|
|
22
23
|
};
|
|
@@ -2,7 +2,8 @@ export declare const clampInspectorKeyframeDisplayFrame: ({ durationInFrames, fr
|
|
|
2
2
|
readonly durationInFrames: number;
|
|
3
3
|
readonly frame: number;
|
|
4
4
|
}) => number;
|
|
5
|
-
export declare const getInspectorKeyframeSourceFrame: ({ displayFrame, keyframeDisplayOffset, }: {
|
|
5
|
+
export declare const getInspectorKeyframeSourceFrame: ({ displayFrame, keyframeDisplayOffset, keyframePlaybackRate, }: {
|
|
6
6
|
readonly displayFrame: number;
|
|
7
7
|
readonly keyframeDisplayOffset: number;
|
|
8
|
+
readonly keyframePlaybackRate: number;
|
|
8
9
|
}) => number;
|
|
@@ -8,7 +8,7 @@ const clampInspectorKeyframeDisplayFrame = ({ durationInFrames, frame, }) => {
|
|
|
8
8
|
return Math.min(Math.max(Math.round(frame), 0), durationInFrames - 1);
|
|
9
9
|
};
|
|
10
10
|
exports.clampInspectorKeyframeDisplayFrame = clampInspectorKeyframeDisplayFrame;
|
|
11
|
-
const getInspectorKeyframeSourceFrame = ({ displayFrame, keyframeDisplayOffset, }) => {
|
|
12
|
-
return displayFrame - keyframeDisplayOffset;
|
|
11
|
+
const getInspectorKeyframeSourceFrame = ({ displayFrame, keyframeDisplayOffset, keyframePlaybackRate, }) => {
|
|
12
|
+
return (displayFrame - keyframeDisplayOffset) * keyframePlaybackRate;
|
|
13
13
|
};
|
|
14
14
|
exports.getInspectorKeyframeSourceFrame = getInspectorKeyframeSourceFrame;
|
|
@@ -40,6 +40,7 @@ exports.sectionHeader = {
|
|
|
40
40
|
lineHeight: '24px',
|
|
41
41
|
padding: `4px 0 4px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
42
42
|
userSelect: 'none',
|
|
43
|
+
WebkitUserSelect: 'none',
|
|
43
44
|
};
|
|
44
45
|
exports.inspectorSectionBody = {
|
|
45
46
|
display: 'flex',
|
|
@@ -144,6 +145,7 @@ exports.detailLabel = {
|
|
|
144
145
|
overflow: 'hidden',
|
|
145
146
|
textOverflow: 'ellipsis',
|
|
146
147
|
userSelect: 'none',
|
|
148
|
+
WebkitUserSelect: 'none',
|
|
147
149
|
whiteSpace: 'nowrap',
|
|
148
150
|
};
|
|
149
151
|
exports.detailValue = {
|
|
@@ -59,6 +59,7 @@ const useCompositionActions = () => {
|
|
|
59
59
|
const canInsertComposition = canShowInsertComposition && !isAddingComposition;
|
|
60
60
|
const canShowGenerateWithAgent = previewInteractive &&
|
|
61
61
|
!window.remotion_isReadOnlyStudio &&
|
|
62
|
+
browserStudioOperations === null &&
|
|
62
63
|
currentCompositionId !== null;
|
|
63
64
|
const insertSolid = (0, react_1.useCallback)(async () => {
|
|
64
65
|
if (!canInsertSolid ||
|
|
@@ -14,6 +14,7 @@ export declare const InspectorSequenceSection: React.FC<{
|
|
|
14
14
|
readonly validatedLocation: CodePosition;
|
|
15
15
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
16
16
|
readonly keyframeDisplayOffset: number;
|
|
17
|
+
readonly keyframePlaybackRate: number;
|
|
17
18
|
readonly renderTransformControls: () => React.ReactNode;
|
|
18
19
|
}>;
|
|
19
20
|
export {};
|
|
@@ -200,7 +200,7 @@ const hasSequenceControls = (sequence) => {
|
|
|
200
200
|
return sequence.controls !== null;
|
|
201
201
|
};
|
|
202
202
|
exports.hasSequenceControls = hasSequenceControls;
|
|
203
|
-
const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation, nodePathInfo, keyframeDisplayOffset, renderTransformControls, }) => {
|
|
203
|
+
const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation, nodePathInfo, keyframeDisplayOffset, keyframePlaybackRate, renderTransformControls, }) => {
|
|
204
204
|
var _a;
|
|
205
205
|
var _b;
|
|
206
206
|
const { tree, propStatuses, runtimeValues } = (0, use_timeline_expanded_tree_1.useTimelineExpandedTree)({
|
|
@@ -209,7 +209,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
209
209
|
includeTextContent: true,
|
|
210
210
|
includeSourceControls: true,
|
|
211
211
|
});
|
|
212
|
-
const { inspectorRevealRequest, selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
212
|
+
const { inspectorRevealRequest, selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
213
213
|
const selectedEffect = selectedItems.length === 1 &&
|
|
214
214
|
(selectedItems[0].type === 'sequence-effect' ||
|
|
215
215
|
selectedItems[0].type === 'sequence-effect-prop')
|
|
@@ -521,14 +521,16 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
521
521
|
type: 'add-effect',
|
|
522
522
|
clientId: previewServerState.clientId,
|
|
523
523
|
fileName: validatedLocation.source,
|
|
524
|
-
|
|
524
|
+
nodePathInfo,
|
|
525
|
+
selectItems,
|
|
525
526
|
});
|
|
526
527
|
}, [
|
|
527
528
|
canAddEffect,
|
|
528
|
-
nodePathInfo
|
|
529
|
+
nodePathInfo,
|
|
529
530
|
previewServerState,
|
|
530
531
|
setAdditionalSectionExpanded,
|
|
531
532
|
setSelectedModal,
|
|
533
|
+
selectItems,
|
|
532
534
|
validatedLocation.source,
|
|
533
535
|
]);
|
|
534
536
|
const onConvertBorderRadius = (0, react_1.useCallback)(() => {
|
|
@@ -575,7 +577,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
575
577
|
: 'Show 3D transform controls', hoveredColor: show3DTransformControls ? colors_1.BLUE : undefined, unhoveredColor: show3DTransformControls ? colors_1.BLUE : colors_1.LIGHT_TEXT, renderAction: (color) => (jsx_runtime_1.jsx(cube_1.CubeIcon, { color: color, style: transform3DToggleIcon })) }));
|
|
576
578
|
const effectsHeader = (jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) }), expanded: effectsExpanded, label: "Effects", onToggle: hasEffects ? () => toggleAdditionalSection('effects') : null }));
|
|
577
579
|
const renderRow = ({ node, depth }) => {
|
|
578
|
-
return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
|
|
580
|
+
return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
|
|
579
581
|
};
|
|
580
582
|
const renderControlGroupHeader = (group) => {
|
|
581
583
|
const expanded = isControlGroupExpanded(group);
|
|
@@ -28,11 +28,13 @@ const sourceLocationStyle = {
|
|
|
28
28
|
textDecoration: 'none',
|
|
29
29
|
textOverflow: 'ellipsis',
|
|
30
30
|
userSelect: 'none',
|
|
31
|
+
WebkitUserSelect: 'none',
|
|
31
32
|
whiteSpace: 'nowrap',
|
|
32
33
|
width: 'fit-content',
|
|
33
34
|
};
|
|
34
35
|
const quickActionStyle = {
|
|
35
36
|
userSelect: 'none',
|
|
37
|
+
WebkitUserSelect: 'none',
|
|
36
38
|
};
|
|
37
39
|
const sourceLocationLabelStyle = {
|
|
38
40
|
color: 'inherit',
|
|
@@ -44,6 +46,7 @@ const sourceLocationLabelStyle = {
|
|
|
44
46
|
overflow: 'hidden',
|
|
45
47
|
textOverflow: 'ellipsis',
|
|
46
48
|
userSelect: 'none',
|
|
49
|
+
WebkitUserSelect: 'none',
|
|
47
50
|
whiteSpace: 'nowrap',
|
|
48
51
|
};
|
|
49
52
|
const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size = 'default' }) => {
|
|
@@ -3,8 +3,8 @@ export declare const MENU_VERTICAL_PADDING = 4;
|
|
|
3
3
|
export declare const SUBMENU_LEFT_INSET = -8;
|
|
4
4
|
export declare const MAX_MENU_WIDTH = 400;
|
|
5
5
|
export declare const MAX_MOBILE_MENU_WIDTH = 300;
|
|
6
|
-
export declare const SHADOW_TOWARDS_BOTTOM = "0 2px 8px
|
|
7
|
-
export declare const SHADOW_TOWARDS_TOP = "0 -2px 8px
|
|
6
|
+
export declare const SHADOW_TOWARDS_BOTTOM = "0 2px 8px var(--remotion-studio-black-alpha-50)";
|
|
7
|
+
export declare const SHADOW_TOWARDS_TOP = "0 -2px 8px var(--remotion-studio-black-alpha-50)";
|
|
8
8
|
export declare const menuContainerTowardsBottom: React.CSSProperties;
|
|
9
9
|
export declare const menuContainerTowardsTop: React.CSSProperties;
|
|
10
10
|
export declare const fullScreenOverlay: React.CSSProperties;
|
|
@@ -33,6 +33,7 @@ const QuickSwitcher_1 = __importDefault(require("./QuickSwitcher/QuickSwitcher")
|
|
|
33
33
|
const RenderStatusModal_1 = require("./RenderModal/RenderStatusModal");
|
|
34
34
|
const ServerRenderModal_1 = require("./RenderModal/ServerRenderModal");
|
|
35
35
|
const WebRenderModal_1 = require("./RenderModal/WebRenderModal");
|
|
36
|
+
const QueueJobErrorModal_1 = require("./RenderQueue/QueueJobErrorModal");
|
|
36
37
|
const SettingsModal_1 = require("./SettingsModal");
|
|
37
38
|
const SvgImportDialog_1 = require("./SvgImportDialog");
|
|
38
39
|
const TranscriptionModalWithOptionalWhisper_1 = require("./Transcription/TranscriptionModalWithOptionalWhisper");
|
|
@@ -70,16 +71,16 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
70
71
|
}
|
|
71
72
|
(async () => {
|
|
72
73
|
const confirmed = await confirm({
|
|
73
|
-
title: 'Add Element
|
|
74
|
+
title: 'Add Element Library',
|
|
74
75
|
message: (jsx_runtime_1.jsx(ElementInstallConfirmation_1.ElementLibraryAddConfirmation, { displayName: event.displayName, origin: event.origin, url: event.url })),
|
|
75
|
-
confirmLabel: 'Add
|
|
76
|
+
confirmLabel: 'Add Element Library',
|
|
76
77
|
cancelLabel: 'Cancel',
|
|
77
78
|
});
|
|
78
79
|
if (!confirmed) {
|
|
79
80
|
return;
|
|
80
81
|
}
|
|
81
82
|
if (previewServerState.type !== 'connected') {
|
|
82
|
-
(0, NotificationCenter_1.showNotification)('Could not add
|
|
83
|
+
(0, NotificationCenter_1.showNotification)('Could not add Element Library: Studio disconnected', 4000);
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
86
|
try {
|
|
@@ -96,17 +97,17 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
96
97
|
],
|
|
97
98
|
});
|
|
98
99
|
if (!result.success) {
|
|
99
|
-
(0, NotificationCenter_1.showNotification)(`Could not add
|
|
100
|
+
(0, NotificationCenter_1.showNotification)(`Could not add Element Library: ${result.reason}`, 4000);
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
catch (error) {
|
|
103
|
-
(0, NotificationCenter_1.showNotification)(`Could not add
|
|
104
|
+
(0, NotificationCenter_1.showNotification)(`Could not add Element Library: ${error.message}`, 4000);
|
|
104
105
|
}
|
|
105
106
|
})();
|
|
106
107
|
});
|
|
107
108
|
}, [confirm, isBrowserStudio, previewServerState, subscribeToEvent]);
|
|
108
109
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack, canvasCapture: modalContextType.canvasCapture })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'settings' ? (jsx_runtime_1.jsx(SettingsModal_1.SettingsModal, { initialTab: modalContextType.initialTab, initialPublicLicenseKey: modalContextType.initialPublicLicenseKey }, `${modalContextType.initialTab}-${modalContextType.initialPublicLicenseKey}`)) : null, modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
109
110
|
modalContextType.type === 'server-render' &&
|
|
110
|
-
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'transcribe' ? (jsx_runtime_1.jsx(TranscriptionModalWithOptionalWhisper_1.TranscriptionModalWithOptionalWhisper, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'video-matting' ? (jsx_runtime_1.jsx(VideoMattingModalWithOptionalPackage_1.VideoMattingModalWithOptionalPackage, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === 'generate-with-agent' ? (jsx_runtime_1.jsx(GenerateWithAgentModal_1.GenerateWithAgentModal, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'asset-selection' ? (jsx_runtime_1.jsx(AssetSelectorModal_1.AssetSelectorModal, { readOnlyStudio: readOnlyStudio, state: modalContextType })) : null, modalContextType && modalContextType.type === 'element-library' && (jsx_runtime_1.jsx(ElementLibraryModal_1.ElementLibraryModal, { name: modalContextType.name, url: modalContextType.url })), modalContextType && modalContextType.type === 'element-install' && (jsx_runtime_1.jsx(ElementInstallConfirmation_1.ElementInstallConfirmation, { state: modalContextType })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
111
|
+
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'queue-job-error' ? (jsx_runtime_1.jsx(QueueJobErrorModal_1.QueueJobErrorModal, { title: modalContextType.title, error: modalContextType.error })) : null, modalContextType && modalContextType.type === 'transcribe' ? (jsx_runtime_1.jsx(TranscriptionModalWithOptionalWhisper_1.TranscriptionModalWithOptionalWhisper, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'video-matting' ? (jsx_runtime_1.jsx(VideoMattingModalWithOptionalPackage_1.VideoMattingModalWithOptionalPackage, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === 'generate-with-agent' ? (jsx_runtime_1.jsx(GenerateWithAgentModal_1.GenerateWithAgentModal, { state: modalContextType })) : null, modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'asset-selection' ? (jsx_runtime_1.jsx(AssetSelectorModal_1.AssetSelectorModal, { readOnlyStudio: readOnlyStudio, state: modalContextType })) : null, modalContextType && modalContextType.type === 'element-library' && (jsx_runtime_1.jsx(ElementLibraryModal_1.ElementLibraryModal, { name: modalContextType.name, url: modalContextType.url })), modalContextType && modalContextType.type === 'element-install' && (jsx_runtime_1.jsx(ElementInstallConfirmation_1.ElementInstallConfirmation, { state: modalContextType })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
111
112
|
};
|
|
112
113
|
exports.Modals = Modals;
|
|
@@ -7,7 +7,9 @@ const react_1 = require("react");
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const check_circle_filled_1 = require("../icons/check-circle-filled");
|
|
9
9
|
const cloud_download_1 = require("../icons/cloud-download");
|
|
10
|
+
const models_1 = require("../icons/models");
|
|
10
11
|
const trash_1 = require("../icons/trash");
|
|
12
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
11
13
|
const InlineAction_1 = require("./InlineAction");
|
|
12
14
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
13
15
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
@@ -40,15 +42,14 @@ const descriptionStyle = {
|
|
|
40
42
|
const list = { marginTop: 14 };
|
|
41
43
|
const modelRow = {
|
|
42
44
|
alignItems: 'center',
|
|
43
|
-
borderBottom: colors_1.BORDER_WHITE_ALPHA_12,
|
|
44
45
|
display: 'flex',
|
|
45
46
|
gap: 10,
|
|
46
47
|
minHeight: 38,
|
|
47
|
-
padding: '0 10px',
|
|
48
48
|
};
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
const modelIcon = {
|
|
50
|
+
flexShrink: 0,
|
|
51
|
+
height: 16,
|
|
52
|
+
width: 16,
|
|
52
53
|
};
|
|
53
54
|
const statusIcon = {
|
|
54
55
|
flexShrink: 0,
|
|
@@ -56,7 +57,7 @@ const statusIcon = {
|
|
|
56
57
|
width: 14,
|
|
57
58
|
};
|
|
58
59
|
const modelName = {
|
|
59
|
-
color: colors_1.
|
|
60
|
+
color: colors_1.LIGHT_TEXT,
|
|
60
61
|
flex: 1,
|
|
61
62
|
fontFamily: 'monospace',
|
|
62
63
|
fontSize: 13,
|
|
@@ -175,7 +176,7 @@ const ModelManager = ({ ariaLabel, availableModels, description, indent, isModel
|
|
|
175
176
|
return jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: actionIcon });
|
|
176
177
|
}, []);
|
|
177
178
|
const actionInProgress = actionState.type === 'downloading' || actionState.type === 'removing';
|
|
178
|
-
return (jsx_runtime_1.jsx("div", { style: visible ? modelPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsxs("div", { style: indent ? container : flushContainer, children: [description === null ? null : (jsx_runtime_1.jsx("p", { style: descriptionStyle, children: description })), cacheCheckError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: cacheCheckError, type: "error" })) : null, jsx_runtime_1.jsx("div", { style: description === null ? undefined : list, role: "list", "aria-label": ariaLabel, children: availableModels.map((model
|
|
179
|
+
return (jsx_runtime_1.jsx("div", { style: visible ? modelPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsxs("div", { style: indent ? container : flushContainer, children: [description === null ? null : (jsx_runtime_1.jsx("p", { style: descriptionStyle, children: description })), cacheCheckError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: cacheCheckError, type: "error" })) : null, jsx_runtime_1.jsx("div", { style: description === null ? undefined : list, role: "list", "aria-label": ariaLabel, children: availableModels.map((model) => {
|
|
179
180
|
var _a;
|
|
180
181
|
const cached = (_a = cachedModels === null || cachedModels === void 0 ? void 0 : cachedModels.has(model.name)) !== null && _a !== void 0 ? _a : false;
|
|
181
182
|
const processingThisModel = actionState.type !== 'idle' &&
|
|
@@ -192,8 +193,8 @@ const ModelManager = ({ ariaLabel, availableModels, description, indent, isModel
|
|
|
192
193
|
: actionState.type === 'error' && actionState.model === model.name
|
|
193
194
|
? actionState.message
|
|
194
195
|
: (0, studio_shared_1.formatBytes)(model.webGpuDownloadSize);
|
|
195
|
-
return (jsx_runtime_1.jsxs("div", { role: "listitem", style:
|
|
196
|
-
jsx_runtime_1.jsx("span", { style: modelName, children: model.name }), jsx_runtime_1.jsx("span", { style: status, title: modelStatus, children: modelStatus }), cached ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : null, processingThisModel ? (jsx_runtime_1.jsx("span", { style: actionSlot, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 }) })) : cached ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: actionInProgress, onClick: () => remove(model.name), renderAction: renderRemoveIcon,
|
|
196
|
+
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: modelRow, children: [
|
|
197
|
+
jsx_runtime_1.jsx(models_1.ModelsIcon, { "aria-hidden": true, color: colors_1.LIGHT_TEXT, style: modelIcon }), jsx_runtime_1.jsx("span", { style: modelName, children: model.name }), jsx_runtime_1.jsx("span", { style: status, title: modelStatus, children: modelStatus }), cached ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : null, processingThisModel ? (jsx_runtime_1.jsx("span", { style: actionSlot, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 }) })) : cached ? (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Uninstall", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": `Remove ${model.name}`, title: "", disabled: actionInProgress, onClick: () => remove(model.name), renderAction: renderRemoveIcon, variant: null }) })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Install", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": `Download ${model.name}`, title: "", disabled: cachedModels === null || actionInProgress, onClick: () => downloadModel(model.name), renderAction: renderDownloadIcon, variant: null }) }))] }, model.name));
|
|
197
198
|
}) })
|
|
198
199
|
] }) }));
|
|
199
200
|
};
|
|
@@ -3,23 +3,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CancelButton = exports.CancelIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
6
7
|
const z_index_1 = require("../../state/z-index");
|
|
7
8
|
const style = {
|
|
8
9
|
appearance: 'none',
|
|
9
10
|
border: 'none',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
cursor: 'pointer',
|
|
11
|
+
borderRadius: 4,
|
|
12
|
+
cursor: 'default',
|
|
13
13
|
display: 'inline-flex',
|
|
14
14
|
justifyContent: 'center',
|
|
15
15
|
alignItems: 'center',
|
|
16
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
17
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
18
|
+
hoverBackground: colors_1.WHITE_ALPHA_06,
|
|
19
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
20
|
+
hoverColor: colors_1.WHITE,
|
|
21
|
+
}),
|
|
16
22
|
};
|
|
17
23
|
const CancelIcon = (props) => {
|
|
18
|
-
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0
|
|
24
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 640 640", ...props, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, d: "M507.3 155.3C513.5 149.1 513.5 138.9 507.3 132.7C501.1 126.5 490.9 126.5 484.7 132.7L320 297.4L155.3 132.7C149.1 126.5 138.9 126.5 132.7 132.7C126.5 138.9 126.5 149.1 132.7 155.3L297.4 320L132.7 484.7C126.5 490.9 126.5 501.1 132.7 507.3C138.9 513.5 149.1 513.5 155.3 507.3L320 342.6L484.7 507.3C490.9 513.5 501.1 513.5 507.3 507.3C513.5 501.1 513.5 490.9 507.3 484.7L342.6 320L507.3 155.3z" }) }));
|
|
19
25
|
};
|
|
20
26
|
exports.CancelIcon = CancelIcon;
|
|
21
27
|
const CancelButton = ({ onPress, ...props }) => {
|
|
22
28
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
23
|
-
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: jsx_runtime_1.jsx(exports.CancelIcon, { ...props }) }));
|
|
29
|
+
return (jsx_runtime_1.jsx("button", { "aria-label": "Close dialog", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: jsx_runtime_1.jsx(exports.CancelIcon, { ...props }) }));
|
|
24
30
|
};
|
|
25
31
|
exports.CancelButton = CancelButton;
|
|
@@ -22,11 +22,12 @@ export declare const isInputDraggerValueAlignedToStep: ({ min, step, value, }: {
|
|
|
22
22
|
readonly step: string | number | undefined;
|
|
23
23
|
readonly value: number;
|
|
24
24
|
}) => boolean;
|
|
25
|
-
export declare const validateInputDraggerValue: ({ max, min, step, value, }: {
|
|
25
|
+
export declare const validateInputDraggerValue: ({ max, min, step, value, integerOnly, }: {
|
|
26
26
|
readonly max: string | number | undefined;
|
|
27
27
|
readonly min: string | number | undefined;
|
|
28
28
|
readonly step: string | number | undefined;
|
|
29
29
|
readonly value: string;
|
|
30
|
+
readonly integerOnly?: boolean | undefined;
|
|
30
31
|
}) => InputDraggerValidationResult;
|
|
31
32
|
export declare const deriveInputDraggerArrowValue: ({ direction, max, min, step, value, }: {
|
|
32
33
|
readonly direction: -1 | 1;
|
|
@@ -67,6 +68,7 @@ export declare const InputDragger: React.ForwardRefExoticComponent<InputHTMLAttr
|
|
|
67
68
|
readonly rightAlign: boolean;
|
|
68
69
|
readonly small?: boolean | undefined;
|
|
69
70
|
readonly allowStepMismatch?: boolean | undefined;
|
|
71
|
+
readonly integerOnly?: boolean | undefined;
|
|
70
72
|
readonly snapToStep?: boolean | undefined;
|
|
71
73
|
readonly dragDecimalPlaces?: number | undefined;
|
|
72
74
|
readonly dragSensitivity?: number | undefined;
|
|
@@ -236,7 +236,7 @@ const isInputDraggerValueAlignedToStep = ({ min, step, value, }) => {
|
|
|
236
236
|
return Math.abs(stepsFromBase - Math.round(stepsFromBase)) <= tolerance;
|
|
237
237
|
};
|
|
238
238
|
exports.isInputDraggerValueAlignedToStep = isInputDraggerValueAlignedToStep;
|
|
239
|
-
const validateInputDraggerValue = ({ max, min, step, value, }) => {
|
|
239
|
+
const validateInputDraggerValue = ({ max, min, step, value, integerOnly = false, }) => {
|
|
240
240
|
const parsed = (0, exports.parseInputDraggerNumber)(value);
|
|
241
241
|
if (parsed === null) {
|
|
242
242
|
return {
|
|
@@ -258,6 +258,12 @@ const validateInputDraggerValue = ({ max, min, step, value, }) => {
|
|
|
258
258
|
message: `Value must be less than or equal to ${numericMax}.`,
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
|
+
if (integerOnly && !Number.isInteger(parsed)) {
|
|
262
|
+
return {
|
|
263
|
+
valid: false,
|
|
264
|
+
message: 'Value must be an integer.',
|
|
265
|
+
};
|
|
266
|
+
}
|
|
261
267
|
if (!(0, exports.isInputDraggerValueAlignedToStep)({ min, step, value: parsed })) {
|
|
262
268
|
return {
|
|
263
269
|
valid: false,
|
|
@@ -324,7 +330,7 @@ const deriveInputDraggerValueDiff = ({ dragSensitivity, step, xDistance, }) => {
|
|
|
324
330
|
return (0, remotion_1.interpolate)(xDistance, [-5, -4, 0, 4, 5], [-step * dragSensitivity, 0, 0, 0, step * dragSensitivity]);
|
|
325
331
|
};
|
|
326
332
|
exports.deriveInputDraggerValueDiff = deriveInputDraggerValueDiff;
|
|
327
|
-
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), formatterStyle, formatterSubtitle, formatterSubtitleStyle, buttonStyle, style: inputStyle, status, rightAlign, small, allowStepMismatch = false, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
|
|
333
|
+
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), formatterStyle, formatterSubtitle, formatterSubtitleStyle, buttonStyle, style: inputStyle, status, rightAlign, small, allowStepMismatch = false, integerOnly = false, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
|
|
328
334
|
const [inputFallback, setInputFallback] = (0, react_1.useState)(false);
|
|
329
335
|
const [dragging, setDragging] = (0, react_1.useState)(false);
|
|
330
336
|
const fallbackRef = (0, react_1.useRef)(null);
|
|
@@ -336,9 +342,9 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
336
342
|
step: _step,
|
|
337
343
|
});
|
|
338
344
|
}, [_min, _step, snapToStep]);
|
|
339
|
-
const validationStep = allowStepMismatch ? 'any' : deriveStep;
|
|
345
|
+
const validationStep = allowStepMismatch || integerOnly ? 'any' : deriveStep;
|
|
340
346
|
const span = (0, react_1.useMemo)(() => ({
|
|
341
|
-
color: dragging ?
|
|
347
|
+
color: dragging ? colors_1.BLUE_HOVERED : colors_1.BLUE,
|
|
342
348
|
cursor: 'ew-resize',
|
|
343
349
|
userSelect: 'none',
|
|
344
350
|
WebkitUserSelect: 'none',
|
|
@@ -380,6 +386,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
380
386
|
e.target.setCustomValidity('');
|
|
381
387
|
const parsed = (0, exports.parseInputDraggerNumber)(e.target.value);
|
|
382
388
|
if (parsed !== null &&
|
|
389
|
+
(!integerOnly || Number.isInteger(parsed)) &&
|
|
383
390
|
(0, exports.isInputDraggerValueInRange)({
|
|
384
391
|
max: _max,
|
|
385
392
|
min: _min,
|
|
@@ -387,7 +394,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
387
394
|
})) {
|
|
388
395
|
onValueChange(parsed, 'input');
|
|
389
396
|
}
|
|
390
|
-
}, [_max, _min, onValueChange]);
|
|
397
|
+
}, [_max, _min, integerOnly, onValueChange]);
|
|
391
398
|
const onBlur = (0, react_1.useCallback)(() => {
|
|
392
399
|
if (!fallbackRef.current) {
|
|
393
400
|
return;
|
|
@@ -402,6 +409,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
402
409
|
min: _min,
|
|
403
410
|
step: validationStep,
|
|
404
411
|
value: newValue,
|
|
412
|
+
integerOnly,
|
|
405
413
|
});
|
|
406
414
|
if (validation.valid) {
|
|
407
415
|
fallbackRef.current.setCustomValidity('');
|
|
@@ -412,7 +420,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
412
420
|
fallbackRef.current.setCustomValidity(validation.message);
|
|
413
421
|
fallbackRef.current.reportValidity();
|
|
414
422
|
}
|
|
415
|
-
}, [_max, _min, onEscape, onValueChangeEnd, validationStep]);
|
|
423
|
+
}, [_max, _min, integerOnly, onEscape, onValueChangeEnd, validationStep]);
|
|
416
424
|
const onInputKeyDown = (0, react_1.useCallback)((e) => {
|
|
417
425
|
var _a;
|
|
418
426
|
if (e.key === 'Tab') {
|
|
@@ -432,17 +440,22 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
432
440
|
min: _min,
|
|
433
441
|
value,
|
|
434
442
|
});
|
|
435
|
-
const
|
|
443
|
+
const steppedValue = (0, exports.deriveInputDraggerArrowValue)({
|
|
436
444
|
direction: e.key === 'ArrowUp' ? 1 : -1,
|
|
437
445
|
max: _max,
|
|
438
446
|
min: _min,
|
|
439
447
|
step: deriveStep,
|
|
440
448
|
value: currentValue,
|
|
441
449
|
});
|
|
450
|
+
const nextValue = integerOnly ? Math.round(steppedValue) : steppedValue;
|
|
451
|
+
if (integerOnly &&
|
|
452
|
+
!(0, exports.isInputDraggerValueInRange)({ max: _max, min: _min, value: nextValue })) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
442
455
|
e.currentTarget.value = String(nextValue);
|
|
443
456
|
e.currentTarget.setCustomValidity('');
|
|
444
457
|
onValueChange(nextValue, 'input');
|
|
445
|
-
}, [_max, _min, deriveStep, onValueChange, value]);
|
|
458
|
+
}, [_max, _min, deriveStep, integerOnly, onValueChange, value]);
|
|
446
459
|
const roundToStep = (val, stepSize) => {
|
|
447
460
|
const factor = 1 / stepSize;
|
|
448
461
|
return Math.ceil(val * factor) / factor;
|
|
@@ -478,11 +491,16 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
478
491
|
xDistance,
|
|
479
492
|
});
|
|
480
493
|
const newValue = Math.min(max, Math.max(min, dragStartValue + diff));
|
|
481
|
-
const
|
|
494
|
+
const steppedValue = snapToStep
|
|
482
495
|
? roundToStep(newValue, step)
|
|
483
496
|
: dragDecimalPlaces === undefined
|
|
484
497
|
? newValue
|
|
485
498
|
: roundToDecimalPlaces(newValue, dragDecimalPlaces);
|
|
499
|
+
const nextValue = integerOnly ? Math.round(steppedValue) : steppedValue;
|
|
500
|
+
if (integerOnly &&
|
|
501
|
+
!(0, exports.isInputDraggerValueInRange)({ max: _max, min: _min, value: nextValue })) {
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
486
504
|
lastDragValue = nextValue;
|
|
487
505
|
onValueChange(nextValue, 'drag');
|
|
488
506
|
};
|
|
@@ -508,6 +526,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
508
526
|
_min,
|
|
509
527
|
_max,
|
|
510
528
|
value,
|
|
529
|
+
integerOnly,
|
|
511
530
|
onValueChange,
|
|
512
531
|
onValueChangeEnd,
|
|
513
532
|
snapToStep,
|
|
@@ -28,6 +28,7 @@ const NewCompDuration_1 = require("./NewCompDuration");
|
|
|
28
28
|
const RemInput_1 = require("./RemInput");
|
|
29
29
|
const SlugPreview_1 = require("./SlugPreview");
|
|
30
30
|
const ValidationMessage_1 = require("./ValidationMessage");
|
|
31
|
+
const { sortItemsByCommitOrder } = canvas_1.CanvasInternals;
|
|
31
32
|
const content = {
|
|
32
33
|
padding: 12,
|
|
33
34
|
paddingRight: 12,
|
|
@@ -62,9 +63,9 @@ const folderLabelTextStyle = {
|
|
|
62
63
|
textOverflow: 'ellipsis',
|
|
63
64
|
whiteSpace: 'nowrap',
|
|
64
65
|
};
|
|
65
|
-
const FolderDropdownLabel = ({
|
|
66
|
+
const FolderDropdownLabel = ({ folderName, indentation }) => {
|
|
66
67
|
return (jsx_runtime_1.jsxs("div", { style: folderLabelStyle, children: [
|
|
67
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: indentation * 1.5 }),
|
|
68
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: indentation * 1.5 }), folderName === null ? (jsx_runtime_1.jsx("div", { style: folderIconStyle })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.LIGHT_TEXT, style: folderIconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("span", { style: folderLabelTextStyle, children: folderName !== null && folderName !== void 0 ? folderName : 'None' })
|
|
68
69
|
] }));
|
|
69
70
|
};
|
|
70
71
|
const rootFolderId = 'new-composition-root-folder';
|
|
@@ -84,7 +85,7 @@ const NewCompositionFields = ({ compositionId, heightValidationMessage, inputRef
|
|
|
84
85
|
? folders
|
|
85
86
|
.slice()
|
|
86
87
|
.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }))
|
|
87
|
-
:
|
|
88
|
+
: sortItemsByCommitOrder(folders, (folder) => folder.order);
|
|
88
89
|
const appendFolders = (parent) => {
|
|
89
90
|
sortedFolders
|
|
90
91
|
.filter((folder) => folder.parent === parent)
|
|
@@ -98,7 +99,7 @@ const NewCompositionFields = ({ compositionId, heightValidationMessage, inputRef
|
|
|
98
99
|
{
|
|
99
100
|
id: rootFolderId,
|
|
100
101
|
keyHint: null,
|
|
101
|
-
label: jsx_runtime_1.jsx(FolderDropdownLabel, {
|
|
102
|
+
label: jsx_runtime_1.jsx(FolderDropdownLabel, { folderName: null, indentation: 0 }),
|
|
102
103
|
leftItem: values.folder.folderName === null ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
103
104
|
onClick: () => {
|
|
104
105
|
setValues((current) => ({
|
|
@@ -135,7 +136,7 @@ const NewCompositionFields = ({ compositionId, heightValidationMessage, inputRef
|
|
|
135
136
|
return {
|
|
136
137
|
id,
|
|
137
138
|
keyHint: null,
|
|
138
|
-
label: (jsx_runtime_1.jsx(FolderDropdownLabel, {
|
|
139
|
+
label: (jsx_runtime_1.jsx(FolderDropdownLabel, { folderName: folder.name, indentation: indentation })),
|
|
139
140
|
leftItem: selectedFolderId === id ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
140
141
|
onClick: () => {
|
|
141
142
|
setValues((current) => ({
|
|
@@ -147,7 +148,7 @@ const NewCompositionFields = ({ compositionId, heightValidationMessage, inputRef
|
|
|
147
148
|
},
|
|
148
149
|
}));
|
|
149
150
|
},
|
|
150
|
-
quickSwitcherLabel:
|
|
151
|
+
quickSwitcherLabel: folder.name,
|
|
151
152
|
subMenu: null,
|
|
152
153
|
type: 'item',
|
|
153
154
|
value: id,
|
|
@@ -13,6 +13,6 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
13
13
|
status: "error" | "ok" | "warning";
|
|
14
14
|
isFocused: boolean;
|
|
15
15
|
isHovered: boolean;
|
|
16
|
-
}) => "
|
|
16
|
+
}) => "var(--remotion-studio-black-alpha-60)" | "var(--remotion-studio-fail-color)" | "var(--remotion-studio-warning-color)" | "var(--remotion-studio-white-alpha-05)" | "var(--remotion-studio-white-alpha-15)";
|
|
17
17
|
export declare const RemotionInput: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
18
18
|
export {};
|
|
@@ -8,7 +8,7 @@ const getLabelToMatch = (value) => {
|
|
|
8
8
|
if (typeof value.label === 'string') {
|
|
9
9
|
return value.label;
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return value.quickSwitcherLabel;
|
|
12
12
|
};
|
|
13
13
|
const findTypeaheadMenuItem = ({ query, values, }) => {
|
|
14
14
|
const normalizedQuery = query.trim().toLowerCase();
|
|
@@ -47,6 +47,10 @@ const PIXEL_GRID_MIN_SCALE = 4;
|
|
|
47
47
|
const containerStyle = (options) => {
|
|
48
48
|
return {
|
|
49
49
|
transform: `scale(${options.scale})`,
|
|
50
|
+
// Keep the scaled composition on its own layer so the checkerboard does
|
|
51
|
+
// not bleed through its edges at fractional preview scales. Using
|
|
52
|
+
// 'transform' caches the rasterization scale and blurs content after zooming.
|
|
53
|
+
willChange: 'opacity',
|
|
50
54
|
marginLeft: options.xCorrection,
|
|
51
55
|
marginTop: options.yCorrection,
|
|
52
56
|
width: options.width,
|