@remotion/studio 4.0.484 → 4.0.486
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/ResolveCompositionConfigInStudio.js +42 -0
- package/dist/components/AssetSelector.js +1 -1
- package/dist/components/AssetSelectorItem.js +9 -9
- package/dist/components/AudioWaveform.js +3 -3
- package/dist/components/Button.js +2 -2
- package/dist/components/Canvas.js +28 -0
- package/dist/components/CanvasOrLoading.js +1 -1
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ColorPicker/AlphaSlider.js +4 -3
- package/dist/components/ColorPicker/ColorPicker.js +4 -4
- package/dist/components/ColorPicker/ColorPickerPopup.js +10 -10
- package/dist/components/ColorPicker/HueSlider.js +4 -3
- package/dist/components/ColorPicker/SaturationValueArea.js +5 -4
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/ColorPicker/checker.js +3 -3
- package/dist/components/CompactExplanation.js +3 -3
- package/dist/components/CompositionSelector.js +141 -5
- package/dist/components/CompositionSelectorItem.d.ts +1 -0
- package/dist/components/CompositionSelectorItem.js +103 -11
- package/dist/components/ContextMenu.js +75 -1
- package/dist/components/CopyButton.js +3 -2
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +15 -2
- package/dist/components/CurrentComposition.js +3 -2
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/FilePreview.js +2 -1
- package/dist/components/FpsCounter.js +3 -2
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +0 -12
- package/dist/components/InlineAction.js +2 -2
- package/dist/components/InlineCompositionName.d.ts +7 -0
- package/dist/components/InlineCompositionName.js +58 -0
- package/dist/components/InlineEditableTitle.d.ts +8 -0
- package/dist/components/InlineEditableTitle.js +134 -0
- package/dist/components/InspectorInfoHeader.js +2 -2
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +17 -30
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/styles.js +5 -5
- package/dist/components/InspectorPanel.d.ts +1 -0
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.js +35 -2
- package/dist/components/InstallablePackage.js +1 -1
- package/dist/components/KeyboardShortcutsExplainer.js +5 -5
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSubItem.js +1 -1
- package/dist/components/Menu/styles.js +3 -3
- package/dist/components/MenuToolbar.js +2 -2
- package/dist/components/ModalButton.js +1 -1
- package/dist/components/ModalContainer.js +3 -3
- package/dist/components/ModalFooter.js +2 -1
- package/dist/components/ModalHeader.js +3 -2
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CancelButton.js +4 -3
- package/dist/components/NewComposition/CodemodFooter.d.ts +7 -1
- package/dist/components/NewComposition/CodemodFooter.js +17 -12
- package/dist/components/NewComposition/ComboBox.js +3 -3
- package/dist/components/NewComposition/DeleteComposition.js +7 -1
- package/dist/components/NewComposition/DeleteFolder.js +7 -1
- package/dist/components/NewComposition/DuplicateComposition.js +17 -10
- package/dist/components/NewComposition/InputAndValidationContainer.d.ts +3 -0
- package/dist/components/NewComposition/InputAndValidationContainer.js +15 -0
- package/dist/components/NewComposition/InputDragger.js +11 -3
- package/dist/components/NewComposition/MenuContent.js +1 -1
- package/dist/components/NewComposition/NewCompDuration.js +7 -6
- package/dist/components/NewComposition/NewComposition.d.ts +5 -1
- package/dist/components/NewComposition/NewComposition.js +31 -85
- package/dist/components/NewComposition/NewFolder.d.ts +5 -0
- package/dist/components/NewComposition/NewFolder.js +86 -0
- package/dist/components/NewComposition/RemInput.js +3 -3
- package/dist/components/NewComposition/RemTextarea.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +13 -14
- package/dist/components/NewComposition/RenameFolder.js +9 -2
- package/dist/components/NewComposition/RenameStaticFile.js +22 -60
- package/dist/components/NewComposition/ValidationMessage.js +10 -2
- package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
- package/dist/components/NewComposition/use-rename-static-file.js +90 -0
- package/dist/components/NoRegisterRoot.js +3 -2
- package/dist/components/Notifications/ColorDot.js +3 -2
- package/dist/components/Notifications/Notification.js +4 -4
- package/dist/components/Notifications/NotificationCenter.js +2 -1
- package/dist/components/Notifications/ServerDisconnected.js +5 -4
- package/dist/components/OptionsPanel.d.ts +0 -3
- package/dist/components/OptionsPanel.js +8 -4
- package/dist/components/OutlineToggle.js +1 -1
- package/dist/components/PlayPause.js +4 -3
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
- package/dist/components/RefreshCompositionOverlay.js +2 -1
- package/dist/components/RenderButton.js +9 -9
- package/dist/components/RenderModal/CliCopyButton.js +1 -1
- package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
- package/dist/components/RenderModal/DataEditor.js +1 -1
- package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
- package/dist/components/RenderModal/InfoBubble.js +2 -2
- package/dist/components/RenderModal/InfoTooltip.js +3 -3
- package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
- package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
- package/dist/components/RenderModal/OptionExplainer.js +2 -2
- package/dist/components/RenderModal/RenderModalHr.js +2 -1
- package/dist/components/RenderModal/RenderStatusModal.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
- package/dist/components/RenderModal/ServerRenderModal.js +5 -4
- package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
- package/dist/components/RenderModal/WebRenderModal.js +2 -1
- package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
- package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
- package/dist/components/RenderModal/render-modals.js +3 -3
- package/dist/components/RenderPreview.js +1 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/index.js +1 -1
- package/dist/components/RendersTab.js +2 -2
- package/dist/components/SegmentedControl.js +3 -3
- package/dist/components/SelectedOutlineElement.d.ts +5 -0
- package/dist/components/SelectedOutlineElement.js +52 -10
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +16 -4
- package/dist/components/SelectedOutlineUvControls.js +5 -5
- package/dist/components/SidebarCollapserControls.js +5 -4
- package/dist/components/Splitter/SplitterElement.js +2 -1
- package/dist/components/StaticFilePreview.js +1 -1
- package/dist/components/Tabs/index.js +3 -3
- package/dist/components/Tabs/vertical.js +3 -3
- package/dist/components/TextViewer.js +2 -1
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/EasingEditorModal.js +8 -8
- package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
- package/dist/components/Timeline/LoopedIndicator.js +2 -2
- package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
- package/dist/components/Timeline/TimelineArrayField.js +6 -5
- package/dist/components/Timeline/TimelineColorField.js +2 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +34 -1
- package/dist/components/Timeline/TimelineEffectItem.js +3 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
- package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
- package/dist/components/Timeline/TimelineImageInfo.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointerHandle.js +4 -5
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +3 -2
- package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +3 -3
- package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +8 -0
- package/dist/components/Timeline/TimelineRotationField.js +4 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
- package/dist/components/Timeline/TimelineSchemaField.js +47 -7
- package/dist/components/Timeline/TimelineScrollable.js +3 -2
- package/dist/components/Timeline/TimelineSelection.js +7 -6
- package/dist/components/Timeline/TimelineSequence.js +17 -20
- package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
- package/dist/components/Timeline/TimelineSequenceItem.js +27 -108
- package/dist/components/Timeline/TimelineSequenceName.js +3 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +8 -4
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
- package/dist/components/Timeline/TimelineSlider.js +2 -1
- package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
- package/dist/components/Timeline/TimelineTextContentField.d.ts +12 -0
- package/dist/components/Timeline/TimelineTextContentField.js +100 -0
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
- package/dist/components/Timeline/TimelineWidthProvider.js +18 -3
- package/dist/components/Timeline/TimelineZoomControls.js +4 -3
- package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
- package/dist/components/Timeline/call-move-keyframe.js +14 -3
- package/dist/components/Timeline/focus-inspector-field.d.ts +16 -0
- package/dist/components/Timeline/focus-inspector-field.js +49 -0
- package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
- package/dist/components/Timeline/google-fonts-list.js +1512 -0
- package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
- package/dist/components/Timeline/save-sequence-prop.js +63 -19
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +38 -0
- package/dist/components/Timeline/split-selected-timeline-item.js +156 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +2 -0
- package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +1 -0
- package/dist/components/Timeline/use-rename-sequence.d.ts +30 -0
- package/dist/components/Timeline/use-rename-sequence.js +115 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -1
- package/dist/components/Timeline/use-timeline-height.js +1 -0
- package/dist/components/TimelineInOutToggle.js +1 -1
- package/dist/components/UpdateCheck.js +2 -2
- package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
- package/dist/components/VisualControls/ClickableFileName.js +2 -2
- package/dist/components/composition-menu-items.js +3 -0
- package/dist/components/effect-drag-and-drop.js +1 -0
- package/dist/components/folder-menu-items.js +20 -0
- package/dist/components/import-assets.d.ts +7 -1
- package/dist/components/import-assets.js +55 -1
- package/dist/components/options-sidebar-tabs.d.ts +4 -0
- package/dist/components/options-sidebar-tabs.js +5 -0
- package/dist/components/selected-outline-measurement.js +2 -1
- package/dist/components/selected-outline-types.d.ts +6 -1
- package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
- package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
- package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
- package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
- package/dist/error-overlay/remotion-overlay/carets.js +3 -2
- package/dist/esm/{chunk-9erwh79m.js → chunk-975rp13y.js} +11165 -7032
- package/dist/esm/chunk-jefhcs5z.js +164 -0
- package/dist/esm/internals.mjs +11166 -6999
- package/dist/esm/previewEntry.mjs +10697 -6526
- package/dist/esm/renderEntry.mjs +8 -5
- package/dist/helpers/checkerboard-background.js +4 -12
- package/dist/helpers/colors.d.ts +99 -7
- package/dist/helpers/colors.js +118 -10
- package/dist/helpers/inject-css.js +85 -83
- package/dist/helpers/render-codec-label.d.ts +1 -1
- package/dist/helpers/timeline-layout.d.ts +7 -4
- package/dist/helpers/timeline-layout.js +3 -1
- package/dist/helpers/use-create-composition.d.ts +35 -0
- package/dist/helpers/use-create-composition.js +111 -0
- package/dist/helpers/use-menu-structure.js +31 -3
- package/dist/helpers/use-rename-composition.d.ts +16 -0
- package/dist/helpers/use-rename-composition.js +49 -0
- package/dist/helpers/validate-folder-rename.js +2 -10
- package/dist/helpers/validate-new-folder-name.d.ts +5 -0
- package/dist/helpers/validate-new-folder-name.js +16 -0
- package/dist/hot-middleware-client/client.js +3 -2
- package/dist/icons/Checkmark.js +2 -1
- package/dist/icons/audio.js +2 -1
- package/dist/icons/caret.js +2 -2
- package/dist/icons/certificate.js +2 -1
- package/dist/icons/data.js +2 -1
- package/dist/icons/eyedropper.js +2 -1
- package/dist/icons/file.js +2 -1
- package/dist/icons/frame.js +2 -1
- package/dist/icons/gear.js +2 -1
- package/dist/icons/gif.js +2 -1
- package/dist/icons/jump-to-start.js +2 -1
- package/dist/icons/keys.js +4 -3
- package/dist/icons/media-volume.js +1 -1
- package/dist/icons/minus.js +2 -1
- package/dist/icons/pause.js +2 -1
- package/dist/icons/play.js +2 -1
- package/dist/icons/redo.js +2 -1
- package/dist/icons/step-back.js +2 -1
- package/dist/icons/step-forward.js +2 -1
- package/dist/icons/undo.js +2 -1
- package/dist/previewEntry.js +2 -1
- package/dist/renderEntry.js +4 -3
- package/dist/state/modals.d.ts +7 -0
- package/dist/state/timeline-zoom.js +17 -14
- package/dist/state/z-index.d.ts +1 -0
- package/dist/state/z-index.js +11 -2
- package/package.json +12 -12
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const eyeIcon = {
|
|
8
8
|
width: 12,
|
|
9
|
-
color:
|
|
9
|
+
color: colors_1.CURRENT_COLOR,
|
|
10
10
|
pointerEvents: 'none',
|
|
11
11
|
};
|
|
12
12
|
const effectIcon = {
|
|
@@ -22,7 +22,7 @@ exports.timelineLayerIconContainer = {
|
|
|
22
22
|
height: 16,
|
|
23
23
|
width: 16,
|
|
24
24
|
borderRadius: 2,
|
|
25
|
-
backgroundColor:
|
|
25
|
+
backgroundColor: colors_1.BLACK_ALPHA_40,
|
|
26
26
|
display: 'inline-flex',
|
|
27
27
|
justifyContent: 'center',
|
|
28
28
|
alignItems: 'center',
|
|
@@ -39,7 +39,7 @@ const TimelineLayerEye = ({ onInvoked, hidden, type }) => {
|
|
|
39
39
|
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 10 14", fill: "none", style: speakerIcon, children: jsx_runtime_1.jsx("path", { d: "M9.40938 0.0869018C9.76875 0.249402 10 0.605652 10 0.999402V12.9994C10 13.3932 9.76875 13.7494 9.40938 13.9119C9.05 14.0744 8.62813 14.0088 8.33438 13.7463L4.11875 9.9994H2C0.896875 9.9994 0 9.10253 0 7.9994V5.9994C0 4.89628 0.896875 3.9994 2 3.9994H4.11875L8.33438 0.252527C8.62813 -0.0099732 9.05 -0.0724732 9.40938 0.0869018Z", fill: color }) }));
|
|
40
40
|
}
|
|
41
41
|
if (type === 'effect') {
|
|
42
|
-
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 16 16", fill: "none", style: effectIcon, children: jsx_runtime_1.jsx("path", { d: "M4.405 4.48C4.575 3.82 4.865 3.325 5.275 2.995C5.695 2.665 6.25 2.5 6.94 2.5H9.235V4.06H7.045C6.555 4.06 6.235 4.3 6.085 4.78L5.83 5.68H7.975V7.255H5.395L3.805 13H2.02L3.625 7.255H1.96V5.68H4.075L4.405 4.48ZM8.57102 9.085L6.87602 5.68H8.79602L9.86102 7.99L11.991 5.68H14.331L10.686 9.415L12.426 13H10.491L9.35102 10.585L7.02602 13H4.68602L8.57102 9.085Z", fill:
|
|
42
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 16 16", fill: "none", style: effectIcon, children: jsx_runtime_1.jsx("path", { d: "M4.405 4.48C4.575 3.82 4.865 3.325 5.275 2.995C5.695 2.665 6.25 2.5 6.94 2.5H9.235V4.06H7.045C6.555 4.06 6.235 4.3 6.085 4.78L5.83 5.68H7.975V7.255H5.395L3.805 13H2.02L3.625 7.255H1.96V5.68H4.075L4.405 4.48ZM8.57102 9.085L6.87602 5.68H8.79602L9.86102 7.99L11.991 5.68H14.331L10.686 9.415L12.426 13H10.491L9.35102 10.585L7.02602 13H4.68602L8.57102 9.085Z", fill: colors_1.WHITE }) }));
|
|
43
43
|
}
|
|
44
44
|
return (jsx_runtime_1.jsx("svg", { style: eyeIcon, viewBox: "0 0 24 16", fill: "none", children: jsx_runtime_1.jsx("path", { d: "M24 7.551C24 7.551 19.748 16 12.015 16C4.835 16 0 7.551 0 7.551C0 7.551 4.446 0 12.015 0C19.709 0 24 7.551 24 7.551ZM17 8C17 5.243 14.757 3 12 3C9.243 3 7 5.243 7 8C7 10.757 9.243 13 12 13C14.757 13 17 10.757 17 8Z", fill: color }) }));
|
|
45
45
|
}, [hidden, type]);
|
|
@@ -12,14 +12,14 @@ const lineStyle = {
|
|
|
12
12
|
textOverflow: 'ellipsis',
|
|
13
13
|
minWidth: 0,
|
|
14
14
|
fontSize: 12,
|
|
15
|
-
color: colors_1.
|
|
15
|
+
color: colors_1.WHITE_ALPHA_30,
|
|
16
16
|
display: 'inline-block',
|
|
17
17
|
};
|
|
18
18
|
const useAssetLink = (src) => {
|
|
19
19
|
const linkInfo = (0, react_1.useMemo)(() => (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(src), [src]);
|
|
20
20
|
const fileNameStyle = (0, react_1.useMemo)(() => ({
|
|
21
21
|
...lineStyle,
|
|
22
|
-
color: colors_1.
|
|
22
|
+
color: colors_1.WHITE_ALPHA_30,
|
|
23
23
|
textDecoration: 'none',
|
|
24
24
|
display: 'inline-block',
|
|
25
25
|
overflow: 'hidden',
|
|
@@ -5,9 +5,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const TimelineBooleanField_1 = require("./TimelineBooleanField");
|
|
6
6
|
const TimelineColorField_1 = require("./TimelineColorField");
|
|
7
7
|
const TimelineEnumField_1 = require("./TimelineEnumField");
|
|
8
|
+
const TimelineFontFamilyField_1 = require("./TimelineFontFamilyField");
|
|
8
9
|
const TimelineNumberField_1 = require("./TimelineNumberField");
|
|
9
10
|
const TimelineRotationField_1 = require("./TimelineRotationField");
|
|
10
11
|
const TimelineScaleField_1 = require("./TimelineScaleField");
|
|
12
|
+
const TimelineTextContentField_1 = require("./TimelineTextContentField");
|
|
11
13
|
const TimelineTransformOriginField_1 = require("./TimelineTransformOriginField");
|
|
12
14
|
const TimelineTranslateField_1 = require("./TimelineTranslateField");
|
|
13
15
|
const TimelineUvCoordinateField_1 = require("./TimelineUvCoordinateField");
|
|
@@ -52,6 +54,12 @@ const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragE
|
|
|
52
54
|
if (field.typeName === 'enum') {
|
|
53
55
|
return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineEnumField_1.TimelineEnumField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
|
|
54
56
|
}
|
|
57
|
+
if (field.typeName === 'text-content') {
|
|
58
|
+
return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineTextContentField_1.TimelineTextContentField, { effectiveValue: effectiveValue, field: field, nodePath: scaleLockNodePath, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
|
|
59
|
+
}
|
|
60
|
+
if (field.typeName === 'font-family') {
|
|
61
|
+
return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineFontFamilyField_1.TimelineFontFamilyField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
|
|
62
|
+
}
|
|
55
63
|
throw new Error(`Unsupported field type: ${field.typeName}`);
|
|
56
64
|
};
|
|
57
65
|
exports.TimelinePrimitiveFieldValue = TimelinePrimitiveFieldValue;
|
|
@@ -4,8 +4,8 @@ exports.TimelineRotationField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
|
-
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
8
7
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
8
|
+
const timeline_rotation_field_utils_1 = require("./timeline-rotation-field-utils");
|
|
9
9
|
const timeline_rotation_utils_1 = require("./timeline-rotation-utils");
|
|
10
10
|
const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
11
11
|
var _a, _b;
|
|
@@ -67,11 +67,12 @@ const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDr
|
|
|
67
67
|
}
|
|
68
68
|
}, [propStatus, onSave, serializeValue]);
|
|
69
69
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
70
|
-
return (0,
|
|
70
|
+
return (0, timeline_rotation_field_utils_1.formatTimelineRotationFieldValue)({
|
|
71
|
+
decimalPlaces,
|
|
71
72
|
fieldSchema: field.fieldSchema,
|
|
72
73
|
value: v,
|
|
73
74
|
});
|
|
74
|
-
}, [field.fieldSchema]);
|
|
75
|
+
}, [decimalPlaces, field.fieldSchema]);
|
|
75
76
|
return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }));
|
|
76
77
|
};
|
|
77
78
|
exports.TimelineRotationField = TimelineRotationField;
|
|
@@ -76,7 +76,7 @@ const LinkToggle = ({ linked, onToggle }) => {
|
|
|
76
76
|
e.stopPropagation();
|
|
77
77
|
onToggle();
|
|
78
78
|
}, [onToggle]);
|
|
79
|
-
return (jsx_runtime_1.jsx("button", { type: "button", style: toggleStyle, onPointerDown: onPointerDown, title: linked ? 'Unlink scale axes' : 'Link scale axes', "aria-label": linked ? 'Unlink scale axes' : 'Link scale axes', children: linked ? (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", style: linkIconStyle, children: jsx_runtime_1.jsx("path", { fill:
|
|
79
|
+
return (jsx_runtime_1.jsx("button", { type: "button", style: toggleStyle, onPointerDown: onPointerDown, title: linked ? 'Unlink scale axes' : 'Link scale axes', "aria-label": linked ? 'Unlink scale axes' : 'Link scale axes', children: linked ? (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", style: linkIconStyle, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR_LOWERCASE, d: "M32 320C32 214 118 128 224 128L288 128L288 192L224 192C153.3 192 96 249.3 96 320C96 390.7 153.3 448 224 448L288 448L288 512L224 512C118 512 32 426 32 320zM608 320C608 426 522 512 416 512L352 512L352 448L416 448C486.7 448 544 390.7 544 320C544 249.3 486.7 192 416 192L352 192L352 128L416 128C522 128 608 214 608 320zM224 288L448 288L448 352L192 352L192 288L224 288z" }) })) : null }));
|
|
80
80
|
};
|
|
81
81
|
const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, scaleLockNodePath, }) => {
|
|
82
82
|
var _a, _b;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusStatic, SequencePropsSubscriptionKey } from 'remotion';
|
|
3
3
|
import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
|
|
4
|
+
export declare const TIMELINE_COMPUTED_EFFECT_FIX_LINK = "https://www.remotion.dev/docs/studio/interactivity-best-practices#keep-effects-editable";
|
|
4
5
|
export declare const UnsupportedStatus: React.FC<{
|
|
5
6
|
readonly label: string;
|
|
7
|
+
readonly fixHref?: string;
|
|
6
8
|
}>;
|
|
7
9
|
export declare const TimelineNonEditableStatus: React.FC<{
|
|
8
10
|
readonly propStatus: CanUpdateSequencePropStatusFalse;
|
|
@@ -1,24 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus = void 0;
|
|
6
|
+
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus = exports.TIMELINE_COMPUTED_EFFECT_FIX_LINK = void 0;
|
|
4
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const colors_1 = require("../../helpers/colors");
|
|
5
10
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
6
11
|
const TimelineArrayField_1 = require("./TimelineArrayField");
|
|
7
12
|
const TimelinePrimitiveFieldValue_1 = require("./TimelinePrimitiveFieldValue");
|
|
13
|
+
const INTERACTIVITY_BEST_PRACTICES_DOCS = 'https://www.remotion.dev/docs/studio/interactivity-best-practices';
|
|
14
|
+
const TIMELINE_COMPUTED_VALUE_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-editable-values-visible`;
|
|
15
|
+
exports.TIMELINE_COMPUTED_EFFECT_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-effects-editable`;
|
|
16
|
+
const unsupportedStatusWrapper = {
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
display: 'inline-flex',
|
|
19
|
+
gap: 4,
|
|
20
|
+
userSelect: 'none',
|
|
21
|
+
WebkitUserSelect: 'none',
|
|
22
|
+
};
|
|
8
23
|
const unsupportedLabel = {
|
|
9
|
-
color:
|
|
24
|
+
color: colors_1.WHITE_ALPHA_40,
|
|
10
25
|
fontSize: 12,
|
|
11
26
|
fontStyle: 'italic',
|
|
12
|
-
userSelect: 'none',
|
|
13
|
-
WebkitUserSelect: 'none',
|
|
14
27
|
};
|
|
15
|
-
const
|
|
16
|
-
|
|
28
|
+
const fixLinkBase = {
|
|
29
|
+
color: colors_1.LIGHT_TEXT,
|
|
30
|
+
display: 'inline-block',
|
|
31
|
+
fontSize: 10,
|
|
32
|
+
fontStyle: 'normal',
|
|
33
|
+
fontWeight: 600,
|
|
34
|
+
lineHeight: 1,
|
|
35
|
+
textDecoration: 'none',
|
|
36
|
+
width: 17,
|
|
37
|
+
};
|
|
38
|
+
const UnsupportedStatus = ({ label, fixHref }) => {
|
|
39
|
+
const [hovered, setHovered] = react_1.default.useState(false);
|
|
40
|
+
const [focused, setFocused] = react_1.default.useState(false);
|
|
41
|
+
const visible = hovered || focused;
|
|
42
|
+
const fixLink = react_1.default.useMemo(() => {
|
|
43
|
+
return {
|
|
44
|
+
...fixLinkBase,
|
|
45
|
+
opacity: visible ? 1 : 0,
|
|
46
|
+
pointerEvents: visible ? 'auto' : 'none',
|
|
47
|
+
};
|
|
48
|
+
}, [visible]);
|
|
49
|
+
const stopMousePropagation = (event) => {
|
|
50
|
+
event.stopPropagation();
|
|
51
|
+
};
|
|
52
|
+
const stopPointerPropagation = (event) => {
|
|
53
|
+
event.stopPropagation();
|
|
54
|
+
};
|
|
55
|
+
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
56
|
+
jsx_runtime_1.jsx("span", { style: unsupportedLabel, children: label }), fixHref ? (jsx_runtime_1.jsx("a", { href: fixHref, target: "_blank", rel: "noreferrer", style: fixLink, title: "Open docs to fix computed Studio values", onClick: stopMousePropagation, onDoubleClick: stopMousePropagation, onPointerDown: stopPointerPropagation, onFocus: () => setFocused(true), onBlur: () => setFocused(false), tabIndex: visible ? 0 : -1, children: "Fix" })) : null] }));
|
|
17
57
|
};
|
|
18
58
|
exports.UnsupportedStatus = UnsupportedStatus;
|
|
19
59
|
const TimelineNonEditableStatus = ({ propStatus }) => {
|
|
20
60
|
if (propStatus.status === 'computed') {
|
|
21
|
-
return (jsx_runtime_1.jsx(
|
|
61
|
+
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: (0, get_timeline_keyframes_1.getComputedStatusLabel)(propStatus), fixHref: TIMELINE_COMPUTED_VALUE_FIX_LINK }));
|
|
22
62
|
}
|
|
23
63
|
};
|
|
24
64
|
exports.TimelineNonEditableStatus = TimelineNonEditableStatus;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineScrollable = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
7
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
7
8
|
const timeline_refs_1 = require("./timeline-refs");
|
|
8
9
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -15,8 +16,8 @@ const outer = {
|
|
|
15
16
|
backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
|
|
16
17
|
};
|
|
17
18
|
const marqueeStyle = {
|
|
18
|
-
backgroundColor:
|
|
19
|
-
border:
|
|
19
|
+
backgroundColor: colors_1.TIMELINE_MARQUEE_BLUE_ALPHA_16,
|
|
20
|
+
border: colors_1.BORDER_TIMELINE_MARQUEE_BLUE,
|
|
20
21
|
boxSizing: 'border-box',
|
|
21
22
|
pointerEvents: 'none',
|
|
22
23
|
position: 'fixed',
|
|
@@ -18,9 +18,9 @@ const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
|
18
18
|
const timeline_refs_1 = require("./timeline-refs");
|
|
19
19
|
const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
|
|
20
20
|
const TimelineDeleteKeybindings_1 = require("./TimelineDeleteKeybindings");
|
|
21
|
-
exports.TIMELINE_SELECTED_BACKGROUND =
|
|
22
|
-
exports.TIMELINE_SELECTED_LABEL_BACKGROUND =
|
|
23
|
-
exports.TIMELINE_SELECTED_LABEL_TEXT =
|
|
21
|
+
exports.TIMELINE_SELECTED_BACKGROUND = colors_1.TIMELINE_SELECTED_BACKGROUND_COLOR;
|
|
22
|
+
exports.TIMELINE_SELECTED_LABEL_BACKGROUND = colors_1.TIMELINE_SELECTED_LABEL_BACKGROUND_COLOR;
|
|
23
|
+
exports.TIMELINE_SELECTED_LABEL_TEXT = colors_1.BLACK;
|
|
24
24
|
exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
|
|
25
25
|
const getTimelineSelectedLabelStyle = (selected, subcategory) => {
|
|
26
26
|
return {
|
|
@@ -29,7 +29,7 @@ const getTimelineSelectedLabelStyle = (selected, subcategory) => {
|
|
|
29
29
|
...(selected
|
|
30
30
|
? {
|
|
31
31
|
backgroundColor: subcategory
|
|
32
|
-
?
|
|
32
|
+
? colors_1.WHITE_ALPHA_10
|
|
33
33
|
: exports.TIMELINE_SELECTED_LABEL_BACKGROUND,
|
|
34
34
|
}
|
|
35
35
|
: {}),
|
|
@@ -39,7 +39,7 @@ exports.getTimelineSelectedLabelStyle = getTimelineSelectedLabelStyle;
|
|
|
39
39
|
const getTimelineColor = (selected, subcategory) => {
|
|
40
40
|
return selected && !subcategory
|
|
41
41
|
? exports.TIMELINE_SELECTED_LABEL_TEXT
|
|
42
|
-
:
|
|
42
|
+
: colors_1.WHITE_ALPHA_80;
|
|
43
43
|
};
|
|
44
44
|
exports.getTimelineColor = getTimelineColor;
|
|
45
45
|
const getTimelineSelectedTrackHighlightStyle = (timelineWidth, backgroundColor = exports.TIMELINE_SELECTED_BACKGROUND) => ({
|
|
@@ -58,7 +58,7 @@ const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, c
|
|
|
58
58
|
: undefined;
|
|
59
59
|
};
|
|
60
60
|
exports.getTimelineRowHighlightBackground = getTimelineRowHighlightBackground;
|
|
61
|
-
exports.TIMELINE_BACKGROUND =
|
|
61
|
+
exports.TIMELINE_BACKGROUND = colors_1.TIMELINE_BACKGROUND_COLOR;
|
|
62
62
|
exports.TIMELINE_TICKS_BACKGROUND = colors_1.BACKGROUND;
|
|
63
63
|
const isTimelineSelectionModifierEvent = ({ shiftKey, metaKey, ctrlKey, }) => {
|
|
64
64
|
return shiftKey || metaKey || ctrlKey;
|
|
@@ -404,6 +404,7 @@ const getSelectableTimelineItems = ({ getDragOverrides, getEffectDragOverrides,
|
|
|
404
404
|
getDragOverrides,
|
|
405
405
|
getEffectDragOverrides,
|
|
406
406
|
propStatuses,
|
|
407
|
+
includeTextContent: false,
|
|
407
408
|
});
|
|
408
409
|
const filteredTree = (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
|
|
409
410
|
nodes: tree,
|
|
@@ -63,9 +63,6 @@ const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
|
|
|
63
63
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
64
64
|
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
65
65
|
const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
|
|
66
|
-
const AUDIO_GRADIENT = 'linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)';
|
|
67
|
-
const VIDEO_GRADIENT = 'linear-gradient(to top, #8e44ad, #9b59b6)';
|
|
68
|
-
const IMAGE_GRADIENT = 'linear-gradient(to top, #2980b9, #3498db)';
|
|
69
66
|
const TimelineSequenceFn = ({ s, nodePathInfo, sequenceFrameOffset }) => {
|
|
70
67
|
const windowWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
71
68
|
if (windowWidth === null) {
|
|
@@ -120,23 +117,23 @@ const TimelineSequenceCurrentFrame = ({ s, displayDurationInFrames, premountWidt
|
|
|
120
117
|
width: premountWidth,
|
|
121
118
|
height: '100%',
|
|
122
119
|
background: `repeating-linear-gradient(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
120
|
+
-45deg,
|
|
121
|
+
${colors_1.TRANSPARENT},
|
|
122
|
+
${colors_1.TRANSPARENT} 2px,
|
|
123
|
+
${isPremounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 2px,
|
|
124
|
+
${isPremounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 4px
|
|
125
|
+
)`,
|
|
129
126
|
position: 'absolute',
|
|
130
127
|
} })) : null, postmountWidth ? (jsx_runtime_1.jsx("div", { style: {
|
|
131
128
|
width: postmountWidth,
|
|
132
129
|
height: '100%',
|
|
133
130
|
background: `repeating-linear-gradient(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
131
|
+
-45deg,
|
|
132
|
+
${colors_1.TRANSPARENT},
|
|
133
|
+
${colors_1.TRANSPARENT} 2px,
|
|
134
|
+
${isPostmounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 2px,
|
|
135
|
+
${isPostmounting ? colors_1.WHITE_ALPHA_50 : colors_1.WHITE_ALPHA_20} 4px
|
|
136
|
+
)`,
|
|
140
137
|
position: 'absolute',
|
|
141
138
|
right: 0,
|
|
142
139
|
} })) : null, children, s.type !== 'audio' &&
|
|
@@ -370,19 +367,19 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
|
|
|
370
367
|
const style = (0, react_1.useMemo)(() => {
|
|
371
368
|
return {
|
|
372
369
|
background: s.type === 'audio'
|
|
373
|
-
?
|
|
370
|
+
? colors_1.TIMELINE_AUDIO_GRADIENT
|
|
374
371
|
: s.type === 'video'
|
|
375
|
-
?
|
|
372
|
+
? colors_1.TIMELINE_VIDEO_GRADIENT
|
|
376
373
|
: s.type === 'image'
|
|
377
|
-
?
|
|
374
|
+
? colors_1.TIMELINE_IMAGE_GRADIENT
|
|
378
375
|
: colors_1.BLUE,
|
|
379
|
-
border: get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH
|
|
376
|
+
border: `${get_timeline_sequence_layout_1.SEQUENCE_BORDER_WIDTH}px solid ${colors_1.WHITE_ALPHA_20}`,
|
|
380
377
|
borderRadius: 2,
|
|
381
378
|
position: 'absolute',
|
|
382
379
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(s.type),
|
|
383
380
|
marginLeft,
|
|
384
381
|
width,
|
|
385
|
-
color:
|
|
382
|
+
color: colors_1.WHITE,
|
|
386
383
|
overflow: 'hidden',
|
|
387
384
|
};
|
|
388
385
|
}, [marginLeft, s.type, width]);
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineSequenceFrame = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
5
6
|
const relativeFrameStyle = {
|
|
6
7
|
alignItems: 'center',
|
|
7
8
|
display: 'flex',
|
|
8
9
|
fontSize: 11,
|
|
9
10
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
10
11
|
gap: 4,
|
|
11
|
-
color:
|
|
12
|
+
color: colors_1.WHITE,
|
|
12
13
|
opacity: 0.5,
|
|
13
14
|
whiteSpace: 'nowrap',
|
|
14
15
|
pointerEvents: 'none',
|
|
@@ -20,7 +21,7 @@ const snowflakeStyle = {
|
|
|
20
21
|
width: 12,
|
|
21
22
|
};
|
|
22
23
|
const FreezeFrameIcon = () => {
|
|
23
|
-
return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: snowflakeStyle, fill:
|
|
24
|
+
return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: snowflakeStyle, fill: colors_1.CURRENT_COLOR, children: jsx_runtime_1.jsx("path", { d: "M288 32l0-32-64 0 0 88.4-64-64-39.6 39.6 103.6 103.6 0 56.4-56.4 0-103.6-103.6-39.6 39.6 64 64-88.4 0 0 64 88.4 0c-33.5 33.5-54.9 54.9-64 64L64 391.6c2.5-2.5 37.1-37.1 103.6-103.6l56.4 0 0 56.4C157.5 410.9 122.9 445.5 120.4 448L160 487.6c9.1-9.1 30.5-30.5 64-64l0 88.4 64 0 0-88.4 64 64 39.6-39.6-103.6-103.6 0-56.4 56.4 0 103.6 103.6 39.6-39.6-64-64 88.4 0 0-64-88.4 0c33.5-33.5 54.9-54.9 64-64L448 120.4c-2.5 2.5-37.1 37.1-103.6 103.6l-56.4 0 0-56.4C354.5 101.1 389.1 66.5 391.6 64L352 24.4c-9.1 9.1-30.5 30.5-64 64L288 32z" }) }));
|
|
24
25
|
};
|
|
25
26
|
const TimelineSequenceFrame = ({ roundedFrame, frozenFrame, premounted, postmounted }) => {
|
|
26
27
|
return (jsx_runtime_1.jsxs("div", { style: relativeFrameStyle, children: [frozenFrame === null ? null : jsx_runtime_1.jsx(FreezeFrameIcon, {}), frozenFrame !== null && frozenFrame !== void 0 ? frozenFrame : (premounted
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
40
|
const client_id_1 = require("../../helpers/client-id");
|
|
41
|
+
const colors_1 = require("../../helpers/colors");
|
|
41
42
|
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
42
43
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
43
44
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
@@ -63,6 +64,7 @@ const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
|
63
64
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
64
65
|
const TimelineSequenceName_1 = require("./TimelineSequenceName");
|
|
65
66
|
const use_open_sequence_in_editor_1 = require("./use-open-sequence-in-editor");
|
|
67
|
+
const use_rename_sequence_1 = require("./use-rename-sequence");
|
|
66
68
|
const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
|
|
67
69
|
const use_timeline_expanded_tree_1 = require("./use-timeline-expanded-tree");
|
|
68
70
|
const labelContainerStyle = {
|
|
@@ -73,29 +75,17 @@ const labelContainerStyle = {
|
|
|
73
75
|
minWidth: 0,
|
|
74
76
|
};
|
|
75
77
|
const effectDropHighlight = {
|
|
76
|
-
backgroundColor:
|
|
77
|
-
outline:
|
|
78
|
+
backgroundColor: colors_1.TIMELINE_DROP_BLUE_ALPHA_16,
|
|
79
|
+
outline: colors_1.BORDER_TIMELINE_DROP_BLUE,
|
|
78
80
|
outlineOffset: -1,
|
|
79
81
|
};
|
|
80
82
|
const SEQUENCE_REORDER_MIME_TYPE = 'application/remotion-sequence-reorder';
|
|
81
|
-
const getSequenceNameSaveAction = ({ editedName, currentDisplayName, fallbackDisplayName, hasStaticNameProp, }) => {
|
|
82
|
-
if (!hasStaticNameProp &&
|
|
83
|
-
(editedName === '' || editedName === fallbackDisplayName)) {
|
|
84
|
-
return { type: 'noop' };
|
|
85
|
-
}
|
|
86
|
-
if (hasStaticNameProp && editedName === currentDisplayName) {
|
|
87
|
-
return { type: 'noop' };
|
|
88
|
-
}
|
|
89
|
-
return {
|
|
90
|
-
type: 'save',
|
|
91
|
-
defaultValue: editedName === '' ? JSON.stringify('') : null,
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
83
|
let currentSequenceDrag = null;
|
|
95
84
|
const TimelineSequenceExpandArrow = ({ disabled, isExpanded, nodePathInfo, onToggleExpand, sequence }) => {
|
|
96
85
|
const { filteredTree } = (0, use_timeline_expanded_tree_1.useTimelineExpandedTree)({
|
|
97
86
|
sequence,
|
|
98
87
|
nodePathInfo,
|
|
88
|
+
includeTextContent: false,
|
|
99
89
|
});
|
|
100
90
|
if (filteredTree.length === 0) {
|
|
101
91
|
return jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {});
|
|
@@ -106,7 +96,7 @@ const sequenceReorderWrapper = {
|
|
|
106
96
|
position: 'relative',
|
|
107
97
|
};
|
|
108
98
|
const sequenceReorderLineBase = {
|
|
109
|
-
backgroundColor:
|
|
99
|
+
backgroundColor: colors_1.TIMELINE_BLUE,
|
|
110
100
|
height: 2,
|
|
111
101
|
left: 0,
|
|
112
102
|
pointerEvents: 'none',
|
|
@@ -115,10 +105,10 @@ const sequenceReorderLineBase = {
|
|
|
115
105
|
zIndex: 1,
|
|
116
106
|
};
|
|
117
107
|
const sequenceReorderRejectionStyle = {
|
|
118
|
-
backgroundColor:
|
|
119
|
-
border:
|
|
108
|
+
backgroundColor: colors_1.BLACK_ALPHA_85,
|
|
109
|
+
border: colors_1.BORDER_WHITE_ALPHA_20,
|
|
120
110
|
borderRadius: 4,
|
|
121
|
-
color:
|
|
111
|
+
color: colors_1.WHITE,
|
|
122
112
|
fontSize: 11,
|
|
123
113
|
lineHeight: 1.2,
|
|
124
114
|
maxWidth: 260,
|
|
@@ -163,14 +153,13 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
|
163
153
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
164
154
|
};
|
|
165
155
|
const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, trackIndex, }) => {
|
|
166
|
-
var _a, _b, _c
|
|
167
|
-
var _e, _f
|
|
168
|
-
const nodePath = (
|
|
156
|
+
var _a, _b, _c;
|
|
157
|
+
var _d, _e, _f;
|
|
158
|
+
const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
|
|
169
159
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
170
160
|
const previewConnected = previewServerState.type === 'connected';
|
|
171
161
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
172
162
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
173
|
-
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
174
163
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
175
164
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
176
165
|
const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
|
|
@@ -201,9 +190,17 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
201
190
|
column: (_a = originalLocation.column) !== null && _a !== void 0 ? _a : 0,
|
|
202
191
|
};
|
|
203
192
|
}, [originalLocation]);
|
|
193
|
+
const { canRename: canRenameThisSequence, displayName, fallbackDisplayName, propStatusesForOverride, saveName, } = (0, use_rename_sequence_1.useRenameSequence)({
|
|
194
|
+
clientId: previewServerState.type === 'connected'
|
|
195
|
+
? previewServerState.clientId
|
|
196
|
+
: null,
|
|
197
|
+
nodePathInfo,
|
|
198
|
+
sequence,
|
|
199
|
+
validatedLocation,
|
|
200
|
+
});
|
|
204
201
|
const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
|
|
205
202
|
const nodePathKey = (0, react_1.useMemo)(() => nodePath ? remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath) : null, [nodePath]);
|
|
206
|
-
const parentId = (
|
|
203
|
+
const parentId = (_e = sequence.parent) !== null && _e !== void 0 ? _e : null;
|
|
207
204
|
const canReorderSequence = previewConnected &&
|
|
208
205
|
Boolean(nodePath && nodePathKey && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) &&
|
|
209
206
|
(nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) === 1;
|
|
@@ -450,13 +447,7 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
450
447
|
}
|
|
451
448
|
toggleTrack(nodePathInfo);
|
|
452
449
|
}, [nodePathInfo, toggleTrack]);
|
|
453
|
-
const propStatusesForOverride = (0, react_1.useMemo)(() => {
|
|
454
|
-
return nodePath
|
|
455
|
-
? remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)
|
|
456
|
-
: undefined;
|
|
457
|
-
}, [propStatuses, nodePath]);
|
|
458
450
|
const codeHiddenStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.hidden;
|
|
459
|
-
const codeNameStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.name;
|
|
460
451
|
const isItemHidden = (0, react_1.useMemo)(() => {
|
|
461
452
|
var _a;
|
|
462
453
|
const propStatus = codeHiddenStatus && codeHiddenStatus.status === 'static'
|
|
@@ -466,26 +457,6 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
466
457
|
const effective = (propStatus !== null && propStatus !== void 0 ? propStatus : runtimeValue);
|
|
467
458
|
return effective !== null && effective !== void 0 ? effective : false;
|
|
468
459
|
}, [codeHiddenStatus, (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.currentRuntimeValueDotNotation]);
|
|
469
|
-
const fallbackDisplayName = (_g = (_b = sequence.controls) === null || _b === void 0 ? void 0 : _b.componentName) !== null && _g !== void 0 ? _g : '<Sequence>';
|
|
470
|
-
const staticNamePropValue = (codeNameStatus === null || codeNameStatus === void 0 ? void 0 : codeNameStatus.status) === 'static' &&
|
|
471
|
-
typeof codeNameStatus.codeValue === 'string'
|
|
472
|
-
? codeNameStatus.codeValue
|
|
473
|
-
: null;
|
|
474
|
-
const hasStaticNameProp = staticNamePropValue !== null;
|
|
475
|
-
const displayName = (0, react_1.useMemo)(() => {
|
|
476
|
-
if (staticNamePropValue !== null) {
|
|
477
|
-
return staticNamePropValue;
|
|
478
|
-
}
|
|
479
|
-
if ((codeNameStatus === null || codeNameStatus === void 0 ? void 0 : codeNameStatus.status) === 'static') {
|
|
480
|
-
return fallbackDisplayName;
|
|
481
|
-
}
|
|
482
|
-
return sequence.displayName;
|
|
483
|
-
}, [
|
|
484
|
-
codeNameStatus === null || codeNameStatus === void 0 ? void 0 : codeNameStatus.status,
|
|
485
|
-
fallbackDisplayName,
|
|
486
|
-
sequence.displayName,
|
|
487
|
-
staticNamePropValue,
|
|
488
|
-
]);
|
|
489
460
|
const onToggleVisibility = (0, react_1.useCallback)((type) => {
|
|
490
461
|
if (!sequence.controls ||
|
|
491
462
|
!nodePath ||
|
|
@@ -531,7 +502,7 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
531
502
|
const inner = (0, react_1.useMemo)(() => {
|
|
532
503
|
return {
|
|
533
504
|
height: timeline_layout_1.TIMELINE_LIST_ITEM_ROW_HEIGHT,
|
|
534
|
-
color:
|
|
505
|
+
color: colors_1.WHITE,
|
|
535
506
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
536
507
|
wordBreak: 'break-all',
|
|
537
508
|
textAlign: 'left',
|
|
@@ -554,14 +525,6 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
554
525
|
codeHiddenStatus !== undefined &&
|
|
555
526
|
codeHiddenStatus !== null &&
|
|
556
527
|
codeHiddenStatus.status === 'static';
|
|
557
|
-
const canRenameThisSequence = previewServerState.type === 'connected' &&
|
|
558
|
-
!window.remotion_isReadOnlyStudio &&
|
|
559
|
-
Boolean(sequence.controls) &&
|
|
560
|
-
nodePath !== null &&
|
|
561
|
-
validatedLocation !== null &&
|
|
562
|
-
codeNameStatus !== undefined &&
|
|
563
|
-
codeNameStatus !== null &&
|
|
564
|
-
codeNameStatus.status === 'static';
|
|
565
528
|
const onSequenceDoubleClick = (0, react_1.useCallback)((e) => {
|
|
566
529
|
if ((0, TimelineSelection_1.isTimelineSelectionModifierEvent)(e)) {
|
|
567
530
|
e.stopPropagation();
|
|
@@ -577,58 +540,14 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
577
540
|
const canRenameSelectedSequence = canRenameThisSequence &&
|
|
578
541
|
selected &&
|
|
579
542
|
selectedItems.length === 1 &&
|
|
580
|
-
((
|
|
543
|
+
((_b = selectedItems[0]) === null || _b === void 0 ? void 0 : _b.type) === 'sequence';
|
|
581
544
|
const onCancelRenaming = (0, react_1.useCallback)(() => {
|
|
582
545
|
setIsRenaming(false);
|
|
583
546
|
}, []);
|
|
584
547
|
const onSaveName = (0, react_1.useCallback)(async (name) => {
|
|
585
|
-
if (!canRenameThisSequence ||
|
|
586
|
-
previewServerState.type !== 'connected' ||
|
|
587
|
-
!sequence.controls ||
|
|
588
|
-
!nodePath ||
|
|
589
|
-
!validatedLocation) {
|
|
590
|
-
setIsRenaming(false);
|
|
591
|
-
return;
|
|
592
|
-
}
|
|
593
|
-
const action = getSequenceNameSaveAction({
|
|
594
|
-
editedName: name,
|
|
595
|
-
currentDisplayName: displayName,
|
|
596
|
-
fallbackDisplayName,
|
|
597
|
-
hasStaticNameProp,
|
|
598
|
-
});
|
|
599
|
-
if (action.type === 'noop') {
|
|
600
|
-
setIsRenaming(false);
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
const savePromise = (0, save_sequence_prop_1.saveSequenceProps)({
|
|
604
|
-
changes: [
|
|
605
|
-
{
|
|
606
|
-
fileName: validatedLocation.source,
|
|
607
|
-
nodePath,
|
|
608
|
-
fieldKey: 'name',
|
|
609
|
-
value: name,
|
|
610
|
-
defaultValue: action.defaultValue,
|
|
611
|
-
schema: sequence.controls.schema,
|
|
612
|
-
},
|
|
613
|
-
],
|
|
614
|
-
setPropStatuses,
|
|
615
|
-
clientId: previewServerState.clientId,
|
|
616
|
-
undoLabel: 'Rename sequence',
|
|
617
|
-
redoLabel: 'Rename sequence again',
|
|
618
|
-
});
|
|
619
548
|
setIsRenaming(false);
|
|
620
|
-
await
|
|
621
|
-
}, [
|
|
622
|
-
canRenameThisSequence,
|
|
623
|
-
displayName,
|
|
624
|
-
fallbackDisplayName,
|
|
625
|
-
hasStaticNameProp,
|
|
626
|
-
nodePath,
|
|
627
|
-
previewServerState,
|
|
628
|
-
sequence.controls,
|
|
629
|
-
setPropStatuses,
|
|
630
|
-
validatedLocation,
|
|
631
|
-
]);
|
|
549
|
+
await saveName(name);
|
|
550
|
+
}, [saveName]);
|
|
632
551
|
react_1.default.useEffect(() => {
|
|
633
552
|
if (!canRenameSelectedSequence || !process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
634
553
|
setIsRenaming(false);
|
|
@@ -673,7 +592,7 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
673
592
|
sequenceFrameOffset,
|
|
674
593
|
setPropStatuses,
|
|
675
594
|
timelinePosition,
|
|
676
|
-
validatedSource: (
|
|
595
|
+
validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
|
|
677
596
|
});
|
|
678
597
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
679
598
|
previewServerState.type === 'connected' &&
|
|
@@ -780,7 +699,7 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
780
699
|
const canDropEffect = previewServerState.type === 'connected' &&
|
|
781
700
|
nodePath !== null &&
|
|
782
701
|
validatedLocation !== null &&
|
|
783
|
-
((
|
|
702
|
+
((_c = sequence.controls) === null || _c === void 0 ? void 0 : _c.supportsEffects) === true;
|
|
784
703
|
const sequenceReorderLineStyle = (0, react_1.useMemo)(() => {
|
|
785
704
|
if (!sequenceDropIndicator) {
|
|
786
705
|
return null;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineSequenceName = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
7
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
7
8
|
const MAX_DISPLAY_NAME_LENGTH = 1000;
|
|
8
9
|
const MAX_RENAME_INPUT_WIDTH = 240;
|
|
@@ -38,7 +39,7 @@ const TimelineSequenceName = ({ displayName, fallbackDisplayName, selected, cont
|
|
|
38
39
|
const inputStyle = (0, react_1.useMemo)(() => {
|
|
39
40
|
return {
|
|
40
41
|
...style,
|
|
41
|
-
background:
|
|
42
|
+
background: colors_1.TRANSPARENT,
|
|
42
43
|
border: 0,
|
|
43
44
|
color: (0, TimelineSelection_1.getTimelineColor)(false, false),
|
|
44
45
|
fontFamily: 'inherit',
|
|
@@ -94,7 +95,7 @@ const TimelineSequenceName = ({ displayName, fallbackDisplayName, selected, cont
|
|
|
94
95
|
}, [save]);
|
|
95
96
|
if (editing) {
|
|
96
97
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
97
|
-
jsx_runtime_1.jsx("style", { children: `.${RENAME_INPUT_CLASS_NAME}::selection { background:
|
|
98
|
+
jsx_runtime_1.jsx("style", { children: `.${RENAME_INPUT_CLASS_NAME}::selection { background: ${colors_1.WHITE_ALPHA_72}; color: ${colors_1.BLACK}; }` }), jsx_runtime_1.jsx("input", { ref: inputRef, className: RENAME_INPUT_CLASS_NAME, value: draftName, onChange: (e) => setDraftName(e.target.value), onBlur: onBlur, onKeyDown: onKeyDown, size: Math.max(1, draftName.length), style: inputStyle })
|
|
98
99
|
] }));
|
|
99
100
|
}
|
|
100
101
|
return (jsx_runtime_1.jsx("div", { title: text, style: style, children: text }));
|