@remotion/studio 4.0.423 → 4.0.425
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/FastRefreshProvider.js +1 -1
- package/dist/ResolveCompositionConfigInStudio.js +1 -1
- package/dist/Studio.js +6 -4
- package/dist/api/create-composition.js +2 -2
- package/dist/api/focus-default-props-path.d.ts +1 -1
- package/dist/api/get-zod-schema-from-primitive.d.ts +3 -2
- package/dist/api/get-zod-schema-from-primitive.js +3 -4
- package/dist/api/helpers/calc-new-props.d.ts +2 -2
- package/dist/api/play.d.ts +1 -1
- package/dist/api/toggle.d.ts +1 -1
- package/dist/components/AskAiModal.js +3 -1
- package/dist/components/AssetSelector.js +21 -58
- package/dist/components/AssetSelectorItem.js +15 -9
- package/dist/components/AudioWaveform.js +5 -4
- package/dist/components/AudioWaveformBar.js +1 -1
- package/dist/components/Button.js +1 -1
- package/dist/components/Canvas.js +2 -1
- package/dist/components/CanvasIfSizeIsAvailable.js +1 -1
- package/dist/components/CanvasOrLoading.js +12 -6
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.js +3 -1
- package/dist/components/CheckerboardProvider.js +1 -1
- package/dist/components/CompSelectorRef.js +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +4 -3
- package/dist/components/CompositionSelectorItem.js +6 -3
- package/dist/components/ContextMenu.js +3 -2
- package/dist/components/ControlButton.d.ts +1 -1
- package/dist/components/ControlButton.js +1 -1
- package/dist/components/CopyButton.js +3 -2
- package/dist/components/CurrentAsset.d.ts +3 -0
- package/dist/components/CurrentAsset.js +113 -0
- package/dist/components/CurrentComposition.js +3 -2
- package/dist/components/Editor.js +6 -1
- package/dist/components/EditorContent.js +6 -1
- package/dist/components/EditorContexts.js +3 -1
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/EditorGuides/index.js +2 -2
- package/dist/components/EditorRuler/Ruler.js +1 -1
- package/dist/components/EditorRuler/index.js +3 -1
- package/dist/components/ExplorerPanel.js +4 -1
- package/dist/components/FilePreview.js +8 -6
- package/dist/components/FpsCounter.js +1 -1
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/GlobalPropsEditorUpdateButton.js +3 -1
- package/dist/components/InitialCompositionLoader.d.ts +1 -2
- package/dist/components/InitialCompositionLoader.js +3 -3
- package/dist/components/InlineAction.js +1 -1
- package/dist/components/InlineDropdown.js +3 -2
- package/dist/components/InstallPackage.js +19 -9
- package/dist/components/InstallablePackage.js +5 -3
- package/dist/components/JSONViewer.js +1 -1
- package/dist/components/KeyboardShortcutsExplainer.js +91 -1
- package/dist/components/KnownBugs.js +4 -2
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/MediaVolumeProvider.js +1 -1
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Menu/MenuItem.js +3 -2
- package/dist/components/Menu/MenuSubItem.js +4 -2
- package/dist/components/Menu/SubMenu.js +1 -1
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +5 -3
- package/dist/components/MobilePanel.d.ts +1 -1
- package/dist/components/MobilePanel.js +2 -1
- package/dist/components/ModalButton.js +1 -1
- package/dist/components/ModalContainer.js +1 -1
- package/dist/components/ModalFooter.js +1 -1
- package/dist/components/ModalHeader.js +3 -1
- package/dist/components/Modals.js +2 -2
- package/dist/components/ModalsProvider.js +1 -1
- package/dist/components/MuteToggle.js +1 -1
- package/dist/components/NewComposition/CancelButton.js +1 -1
- package/dist/components/NewComposition/CodemodFooter.js +5 -2
- package/dist/components/NewComposition/ComboBox.js +6 -2
- package/dist/components/NewComposition/DeleteComposition.js +10 -2
- package/dist/components/NewComposition/DiffPreview.js +5 -3
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +28 -3
- package/dist/components/NewComposition/InputDragger.d.ts +1 -1
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/MenuContent.js +3 -3
- package/dist/components/NewComposition/NewCompDuration.js +7 -2
- package/dist/components/NewComposition/RemInput.d.ts +2 -2
- package/dist/components/NewComposition/RemInput.js +2 -2
- package/dist/components/NewComposition/RemInputTypeColor.js +1 -1
- package/dist/components/NewComposition/RemTextarea.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +11 -2
- package/dist/components/NewComposition/ValidationMessage.js +4 -2
- package/dist/components/NoRegisterRoot.js +4 -1
- package/dist/components/Notifications/ColorDot.js +1 -1
- package/dist/components/Notifications/Notification.js +1 -1
- package/dist/components/Notifications/NotificationCenter.js +2 -2
- package/dist/components/Notifications/ServerDisconnected.js +2 -1
- package/dist/components/OpenEditorButton.js +2 -2
- package/dist/components/OptionsPanel.js +7 -4
- package/dist/components/OverrideInputProps.js +7 -2
- package/dist/components/PlayPause.js +3 -1
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/Preview.js +8 -8
- package/dist/components/PreviewToolbar.js +11 -1
- package/dist/components/QuickSwitcher/AlgoliaCredit.js +1 -1
- package/dist/components/QuickSwitcher/NoResults.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcher.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +12 -3
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +6 -3
- package/dist/components/RefreshCompositionOverlay.js +1 -1
- package/dist/components/RenderButton.js +26 -9
- package/dist/components/RenderModal/CliCopyButton.js +3 -3
- package/dist/components/RenderModal/ClientRenderProgress.js +16 -14
- package/dist/components/RenderModal/CrfSetting.d.ts +1 -2
- package/dist/components/RenderModal/CrfSetting.js +1 -1
- package/dist/components/RenderModal/DataEditor.js +15 -8
- package/dist/components/RenderModal/EnforceAudioTrackSetting.js +5 -1
- package/dist/components/RenderModal/EnvInput.js +4 -1
- package/dist/components/RenderModal/FrameRangeSetting.js +5 -1
- package/dist/components/RenderModal/GuiRenderStatus.js +15 -10
- package/dist/components/RenderModal/InfoBubble.js +3 -2
- package/dist/components/RenderModal/InfoTooltip.js +3 -2
- package/dist/components/RenderModal/InlineEyeIcon.js +2 -2
- package/dist/components/RenderModal/InlineRemoveButton.js +2 -2
- package/dist/components/RenderModal/JpegQualitySetting.js +1 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +3 -1
- package/dist/components/RenderModal/MutedSetting.js +5 -1
- package/dist/components/RenderModal/NumberOfLoopsSetting.js +3 -1
- package/dist/components/RenderModal/NumberSetting.js +6 -2
- package/dist/components/RenderModal/OptionExplainer.js +14 -1
- package/dist/components/RenderModal/OptionExplainerBubble.js +1 -1
- package/dist/components/RenderModal/RenderModalAdvanced.js +66 -7
- package/dist/components/RenderModal/RenderModalAudio.js +21 -4
- package/dist/components/RenderModal/RenderModalBasic.js +18 -3
- package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +5 -3
- package/dist/components/RenderModal/RenderModalGif.js +6 -1
- package/dist/components/RenderModal/RenderModalHr.js +1 -1
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +5 -2
- package/dist/components/RenderModal/RenderModalOutputName.js +8 -1
- package/dist/components/RenderModal/RenderModalPicture.js +30 -3
- package/dist/components/RenderModal/RenderStatusModal.js +8 -2
- package/dist/components/RenderModal/ResolveCompositionBeforeModal.js +6 -3
- package/dist/components/RenderModal/ScaleSetting.js +3 -2
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +31 -6
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaSaveButton.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +9 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +9 -5
- package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +8 -2
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +5 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +6 -4
- package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +4 -2
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +6 -4
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +8 -2
- package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +8 -6
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +5 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +6 -5
- package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +8 -5
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +5 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +24 -24
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +5 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +9 -5
- package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.js +5 -5
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
- package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +4 -4
- package/dist/components/RenderModal/SchemaEditor/local-state.js +1 -1
- package/dist/components/RenderModal/SeparateAudioOption.js +7 -2
- package/dist/components/RenderModal/ServerRenderModal.js +27 -5
- package/dist/components/RenderModal/WarningIndicatorButton.js +4 -2
- package/dist/components/RenderModal/WebRenderModal.js +29 -6
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +11 -4
- package/dist/components/RenderModal/WebRenderModalAudio.js +12 -2
- package/dist/components/RenderModal/WebRenderModalBasic.js +23 -5
- package/dist/components/RenderModal/WebRenderModalLicense.js +24 -2
- package/dist/components/RenderModal/WebRenderModalLicenseKeyDetails.js +12 -1
- package/dist/components/RenderModal/WebRenderModalPicture.js +8 -1
- package/dist/components/RenderModal/WebRendererExperimentalBadge.js +3 -1
- package/dist/components/RenderModal/get-default-codecs.d.ts +7 -8
- package/dist/components/RenderModal/human-readable-audio-codecs.d.ts +1 -2
- package/dist/components/RenderModal/human-readable-codec.d.ts +1 -2
- package/dist/components/RenderModal/human-readable-loglevel.d.ts +1 -2
- package/dist/components/RenderModal/out-name-checker.d.ts +4 -5
- package/dist/components/RenderModal/quality-options.js +1 -1
- package/dist/components/RenderPreview.js +4 -4
- package/dist/components/RenderQueue/CircularProgress.js +1 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +0 -1
- package/dist/components/RenderQueue/RenderQueueCancelledMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -2
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +4 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -2
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +8 -8
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -2
- package/dist/components/RenderQueue/RenderQueueOutputName.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +4 -2
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -2
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -2
- package/dist/components/RenderQueue/RenderQueueSavingMessage.js +1 -1
- package/dist/components/RenderQueue/SuccessIcon.js +1 -1
- package/dist/components/RenderQueue/actions.d.ts +21 -24
- package/dist/components/RenderQueue/client-side-render-types.d.ts +0 -1
- package/dist/components/RenderQueue/context.js +2 -2
- package/dist/components/RenderQueue/index.js +10 -5
- package/dist/components/RendersTab.js +3 -1
- package/dist/components/ResetZoomButton.js +1 -1
- package/dist/components/RunningCalculateMetadata.js +5 -1
- package/dist/components/SegmentedControl.js +3 -3
- package/dist/components/SetTimelineInOutProvider.js +1 -1
- package/dist/components/ShowGuidesProvider.js +1 -1
- package/dist/components/ShowRulersProvider.js +1 -1
- package/dist/components/SidebarCollapserControls.js +5 -3
- package/dist/components/SidebarRenderButton.js +2 -2
- package/dist/components/SizeSelector.js +2 -2
- package/dist/components/Spinner.js +6 -4
- package/dist/components/Splitter/SplitterContainer.js +1 -1
- package/dist/components/Splitter/SplitterElement.js +3 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -1
- package/dist/components/StaticFilePreview.js +5 -5
- package/dist/components/Tabs/index.js +4 -2
- package/dist/components/Tabs/vertical.js +3 -1
- package/dist/components/TextViewer.js +1 -1
- package/dist/components/TimeValue.js +3 -3
- package/dist/components/Timeline/LoopedIndicator.js +4 -2
- package/dist/components/Timeline/LoopedTimelineIndicators.js +5 -4
- package/dist/components/Timeline/MaxTimelineTracks.js +1 -1
- package/dist/components/Timeline/Timeline.js +5 -1
- package/dist/components/Timeline/TimelineCollapseToggle.js +2 -2
- package/dist/components/Timeline/TimelineDragHandler.js +11 -3
- package/dist/components/Timeline/TimelineInOutPointer.js +2 -2
- package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -2
- package/dist/components/Timeline/TimelineLayerEye.js +3 -3
- package/dist/components/Timeline/TimelineList.js +3 -2
- package/dist/components/Timeline/TimelineListItem.js +3 -1
- package/dist/components/Timeline/TimelineScrollable.js +1 -1
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -1
- package/dist/components/Timeline/TimelineSlider.d.ts +1 -1
- package/dist/components/Timeline/TimelineSlider.js +6 -3
- package/dist/components/Timeline/TimelineSliderHandle.js +1 -1
- package/dist/components/Timeline/TimelineStack/index.js +5 -2
- package/dist/components/Timeline/TimelineTimeIndicators.js +5 -5
- package/dist/components/Timeline/TimelineTracks.js +6 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +1 -1
- package/dist/components/Timeline/TimelineWidthProvider.js +1 -1
- package/dist/components/Timeline/TimelineZoomControls.js +3 -1
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -1
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -8
- package/dist/components/TimelineInOutToggle.js +11 -7
- package/dist/components/TopPanel.js +5 -1
- package/dist/components/UpdateCheck.js +2 -2
- package/dist/components/UpdateModal/OpenIssueButton.js +2 -2
- package/dist/components/UpdateModal/UpdateModal.js +8 -1
- package/dist/components/VisualControls/ClickableFileName.js +1 -1
- package/dist/components/VisualControls/VisualControlHandle.js +3 -1
- package/dist/components/VisualControls/VisualControlHandleHeader.js +1 -1
- package/dist/components/VisualControls/VisualControlsContent.js +3 -2
- package/dist/components/ZoomGesturesProvider.js +1 -1
- package/dist/components/call-api.d.ts +1 -1
- package/dist/components/get-zod-if-possible.d.ts +3 -3
- package/dist/components/get-zod-if-possible.js +9 -9
- package/dist/components/layout.js +4 -4
- package/dist/components/use-static-files.d.ts +6 -0
- package/dist/components/use-static-files.js +63 -0
- package/dist/error-overlay/react-overlay/utils/parser.d.ts +1 -1
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +1 -1
- package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -1
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +6 -4
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +1 -1
- package/dist/error-overlay/remotion-overlay/CompositionIdsDropdown.js +8 -3
- package/dist/error-overlay/remotion-overlay/DismissButton.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +19 -4
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +8 -4
- package/dist/error-overlay/remotion-overlay/ErrorMessage.js +2 -1
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +7 -1
- package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/Overlay.js +2 -2
- package/dist/error-overlay/remotion-overlay/Retry.js +1 -1
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +6 -2
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +3 -1
- package/dist/error-overlay/remotion-overlay/carets.d.ts +1 -1
- package/dist/error-overlay/remotion-overlay/carets.js +2 -2
- package/dist/error-overlay/remotion-overlay/index.js +2 -2
- package/dist/esm/{chunk-112w480k.js → chunk-5wcqz8k8.js} +4017 -19439
- package/dist/esm/internals.mjs +4017 -19439
- package/dist/esm/previewEntry.mjs +4057 -19472
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.js +1 -1
- package/dist/helpers/color-math.d.ts +1 -2
- package/dist/helpers/create-folder-tree.d.ts +2 -2
- package/dist/helpers/document-title.js +2 -2
- package/dist/helpers/editor-ruler.d.ts +3 -3
- package/dist/helpers/extract-frames.d.ts +1 -1
- package/dist/helpers/inject-css.js +2 -1
- package/dist/helpers/pick-color.js +5 -1
- package/dist/helpers/presets-labels.d.ts +1 -2
- package/dist/helpers/prores-labels.d.ts +1 -2
- package/dist/helpers/render-modal-sections.d.ts +1 -2
- package/dist/helpers/timeline-layout.d.ts +1 -1
- package/dist/helpers/use-asset-drag-events.d.ts +1 -1
- package/dist/helpers/use-menu-structure.d.ts +1 -1
- package/dist/helpers/use-menu-structure.js +11 -11
- package/dist/helpers/use-studio-canvas-dimensions.d.ts +1 -1
- package/dist/helpers/validate-new-comp-data.d.ts +2 -3
- package/dist/hot-middleware-client/client.d.ts +1 -1
- package/dist/hot-middleware-client/process-update.d.ts +8 -2
- package/dist/hot-middleware-client/process-update.js +2 -1
- package/dist/icons/Checkmark.js +1 -1
- package/dist/icons/audio.js +1 -1
- package/dist/icons/caret.js +3 -3
- package/dist/icons/certificate.d.ts +1 -1
- package/dist/icons/certificate.js +1 -1
- package/dist/icons/check-circle-filled.js +1 -1
- package/dist/icons/clipboard.js +1 -1
- package/dist/icons/data.js +1 -1
- package/dist/icons/ellipsis.js +1 -1
- package/dist/icons/file.js +1 -1
- package/dist/icons/folder.js +3 -3
- package/dist/icons/frame.js +1 -1
- package/dist/icons/gear.js +1 -1
- package/dist/icons/gif.js +1 -1
- package/dist/icons/jump-to-start.js +1 -1
- package/dist/icons/keys.js +3 -3
- package/dist/icons/media-volume.js +2 -2
- package/dist/icons/minus.js +1 -1
- package/dist/icons/pause.js +1 -1
- package/dist/icons/play.js +1 -1
- package/dist/icons/plus.js +1 -1
- package/dist/icons/render.js +1 -1
- package/dist/icons/step-back.js +1 -1
- package/dist/icons/step-forward.js +1 -1
- package/dist/icons/still.js +1 -1
- package/dist/icons/timelineInOutPointer.js +2 -2
- package/dist/icons/video.js +1 -1
- package/dist/index.js +16 -16
- package/dist/internals.d.ts +1 -1
- package/dist/previewEntry.d.ts +5 -0
- package/dist/previewEntry.js +13 -4
- package/dist/renderEntry.js +10 -8
- package/dist/state/folders.js +1 -1
- package/dist/state/highest-z-index.js +1 -1
- package/dist/state/in-out.js +4 -3
- package/dist/state/keybindings.js +1 -1
- package/dist/state/preview-size.js +1 -1
- package/dist/state/sidebar.js +1 -1
- package/dist/state/timeline-zoom.js +1 -1
- package/dist/state/z-index.js +2 -1
- package/dist/visual-controls/VisualControls.js +1 -1
- package/dist/visual-controls/get-current-edited-value.js +2 -1
- package/package.json +14 -13
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CurrentAsset = exports.CURRENT_ASSET_HEIGHT = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
+
const mediabunny_1 = require("mediabunny");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const remotion_1 = require("remotion");
|
|
9
|
+
const colors_1 = require("../helpers/colors");
|
|
10
|
+
const use_static_files_1 = require("./use-static-files");
|
|
11
|
+
exports.CURRENT_ASSET_HEIGHT = 80;
|
|
12
|
+
const container = {
|
|
13
|
+
height: exports.CURRENT_ASSET_HEIGHT,
|
|
14
|
+
display: 'block',
|
|
15
|
+
borderBottom: `1px solid ${colors_1.BORDER_COLOR}`,
|
|
16
|
+
padding: 12,
|
|
17
|
+
color: 'white',
|
|
18
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
19
|
+
};
|
|
20
|
+
const title = {
|
|
21
|
+
fontWeight: 'bold',
|
|
22
|
+
fontSize: 12,
|
|
23
|
+
whiteSpace: 'nowrap',
|
|
24
|
+
lineHeight: '18px',
|
|
25
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
26
|
+
};
|
|
27
|
+
const subtitle = {
|
|
28
|
+
fontSize: 12,
|
|
29
|
+
opacity: 0.8,
|
|
30
|
+
whiteSpace: 'nowrap',
|
|
31
|
+
lineHeight: '18px',
|
|
32
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
33
|
+
};
|
|
34
|
+
const row = {
|
|
35
|
+
display: 'flex',
|
|
36
|
+
flexDirection: 'row',
|
|
37
|
+
lineHeight: '18px',
|
|
38
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
39
|
+
};
|
|
40
|
+
const formatDuration = (seconds) => {
|
|
41
|
+
const h = Math.floor(seconds / 3600);
|
|
42
|
+
const m = Math.floor((seconds % 3600) / 60);
|
|
43
|
+
const s = seconds % 60;
|
|
44
|
+
const sFixed = s.toFixed(2).padStart(5, '0');
|
|
45
|
+
if (h > 0) {
|
|
46
|
+
return `${h}:${String(m).padStart(2, '0')}:${sFixed}`;
|
|
47
|
+
}
|
|
48
|
+
return `${String(m).padStart(2, '0')}:${sFixed}`;
|
|
49
|
+
};
|
|
50
|
+
const CurrentAsset = () => {
|
|
51
|
+
var _a;
|
|
52
|
+
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
53
|
+
const assetName = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' ? canvasContent.asset : null;
|
|
54
|
+
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
55
|
+
const sizeInBytes = (0, react_1.useMemo)(() => {
|
|
56
|
+
var _a;
|
|
57
|
+
if (!assetName) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
const file = staticFiles.find((f) => f.name === assetName);
|
|
61
|
+
return (_a = file === null || file === void 0 ? void 0 : file.sizeInBytes) !== null && _a !== void 0 ? _a : null;
|
|
62
|
+
}, [assetName, staticFiles]);
|
|
63
|
+
const [mediaMetadata, setMediaMetadata] = (0, react_1.useState)(null);
|
|
64
|
+
(0, react_1.useEffect)(() => {
|
|
65
|
+
setMediaMetadata(null);
|
|
66
|
+
if (!assetName) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const url = (0, remotion_1.staticFile)(assetName);
|
|
70
|
+
const input = new mediabunny_1.Input({
|
|
71
|
+
formats: mediabunny_1.ALL_FORMATS,
|
|
72
|
+
source: new mediabunny_1.UrlSource(url),
|
|
73
|
+
});
|
|
74
|
+
Promise.all([
|
|
75
|
+
input.computeDuration(),
|
|
76
|
+
input.getFormat(),
|
|
77
|
+
input.getPrimaryVideoTrack(),
|
|
78
|
+
])
|
|
79
|
+
.then(([duration, format, videoTrack]) => {
|
|
80
|
+
var _a, _b;
|
|
81
|
+
setMediaMetadata({
|
|
82
|
+
duration,
|
|
83
|
+
format: format.name,
|
|
84
|
+
width: (_a = videoTrack === null || videoTrack === void 0 ? void 0 : videoTrack.displayWidth) !== null && _a !== void 0 ? _a : null,
|
|
85
|
+
height: (_b = videoTrack === null || videoTrack === void 0 ? void 0 : videoTrack.displayHeight) !== null && _b !== void 0 ? _b : null,
|
|
86
|
+
});
|
|
87
|
+
})
|
|
88
|
+
.catch(() => {
|
|
89
|
+
// InputDisposedError (user navigated away) and
|
|
90
|
+
// non-media files (e.g. .png, .json) — ignore silently
|
|
91
|
+
});
|
|
92
|
+
return () => {
|
|
93
|
+
input.dispose();
|
|
94
|
+
};
|
|
95
|
+
}, [assetName]);
|
|
96
|
+
if (!assetName) {
|
|
97
|
+
return jsx_runtime_1.jsx("div", { style: container });
|
|
98
|
+
}
|
|
99
|
+
const fileName = (_a = assetName.split('/').pop()) !== null && _a !== void 0 ? _a : assetName;
|
|
100
|
+
const subtitleParts = [];
|
|
101
|
+
if (sizeInBytes !== null) {
|
|
102
|
+
subtitleParts.push((0, studio_shared_1.formatBytes)(sizeInBytes));
|
|
103
|
+
}
|
|
104
|
+
if (mediaMetadata) {
|
|
105
|
+
subtitleParts.push(mediaMetadata.format);
|
|
106
|
+
if (mediaMetadata.width !== null && mediaMetadata.height !== null) {
|
|
107
|
+
subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs("div", { children: [
|
|
111
|
+
jsx_runtime_1.jsx("div", { style: title, children: fileName }), subtitleParts.length > 0 ? (jsx_runtime_1.jsx("div", { style: subtitle, children: subtitleParts.join(' · ') })) : null, mediaMetadata ? (jsx_runtime_1.jsx("div", { style: subtitle, children: formatDuration(mediaMetadata.duration) })) : null] }) }) }));
|
|
112
|
+
};
|
|
113
|
+
exports.CurrentAsset = CurrentAsset;
|
|
@@ -38,8 +38,9 @@ const row = {
|
|
|
38
38
|
const CurrentComposition = () => {
|
|
39
39
|
const video = remotion_1.Internals.useVideo();
|
|
40
40
|
if (!video) {
|
|
41
|
-
return
|
|
41
|
+
return jsx_runtime_1.jsx("div", { style: container });
|
|
42
42
|
}
|
|
43
|
-
return (
|
|
43
|
+
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs("div", { children: [
|
|
44
|
+
jsx_runtime_1.jsx("div", { style: title, children: video.id }), jsx_runtime_1.jsxs("div", { style: subtitle, children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx("div", { style: subtitle, children: "Still" })) : (jsx_runtime_1.jsxs("div", { style: subtitle, children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] }) }) }));
|
|
44
45
|
};
|
|
45
46
|
exports.CurrentComposition = CurrentComposition;
|
|
@@ -96,6 +96,11 @@ const Editor = ({ Root, readOnlyStudio }) => {
|
|
|
96
96
|
const MemoRoot = (0, react_1.useMemo)(() => {
|
|
97
97
|
return react_1.default.memo(Root);
|
|
98
98
|
}, [Root]);
|
|
99
|
-
return (
|
|
99
|
+
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsxs(timeline_zoom_1.TimelineZoomContext, { children: [
|
|
100
|
+
jsx_runtime_1.jsx(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: jsx_runtime_1.jsxs("div", { style: background, children: [canvasMounted ? jsx_runtime_1.jsx(MemoRoot, {}) : null, jsx_runtime_1.jsxs(remotion_1.Internals.CanUseRemotionHooksProvider, { children: [
|
|
101
|
+
jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: canvas_ref_1.drawRef, bufferStateDelayInMilliseconds: exports.BUFFER_STATE_DELAY_IN_MILLISECONDS, onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }), jsx_runtime_1.jsx(GlobalKeybindings_1.GlobalKeybindings, {})
|
|
102
|
+
] })
|
|
103
|
+
] }) }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
|
|
104
|
+
] }) }));
|
|
100
105
|
};
|
|
101
106
|
exports.Editor = Editor;
|
|
@@ -23,6 +23,11 @@ const EditorContent = ({ readOnlyStudio, children }) => {
|
|
|
23
23
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
24
24
|
// Preventing multiple renders so the update check doesn't get rendered twice and needs to be aborted
|
|
25
25
|
const onlyTopPanel = canvasContent === null || isStill || canvasContent.type !== 'composition';
|
|
26
|
-
return (
|
|
26
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
27
|
+
jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [
|
|
28
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), onlyTopPanel ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
29
|
+
jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(Timeline_1.Timeline, {}) })
|
|
30
|
+
] }))] })
|
|
31
|
+
] }));
|
|
27
32
|
};
|
|
28
33
|
exports.EditorContent = EditorContent;
|
|
@@ -21,6 +21,8 @@ const ShowGuidesProvider_1 = require("./ShowGuidesProvider");
|
|
|
21
21
|
const ShowRulersProvider_1 = require("./ShowRulersProvider");
|
|
22
22
|
const ZoomGesturesProvider_1 = require("./ZoomGesturesProvider");
|
|
23
23
|
const EditorContexts = ({ children, readOnlyStudio }) => {
|
|
24
|
-
return (
|
|
24
|
+
return (jsx_runtime_1.jsx(get_zod_if_possible_1.ZodProvider, { children: jsx_runtime_1.jsx(VisualControls_1.VisualControlsProvider, { children: jsx_runtime_1.jsx(client_id_1.PreviewServerConnection, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs(context_1.RenderQueueContextProvider, { children: [
|
|
25
|
+
jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) })
|
|
26
|
+
] }) }) }) }));
|
|
25
27
|
};
|
|
26
28
|
exports.EditorContexts = EditorContexts;
|
|
@@ -79,7 +79,7 @@ const GuideComp = ({ guide, canvasDimensions, scale }) => {
|
|
|
79
79
|
},
|
|
80
80
|
];
|
|
81
81
|
}, [guide.id, setGuidesList]);
|
|
82
|
-
return (
|
|
82
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: values, children: jsx_runtime_1.jsx("div", { style: guideStyle, onMouseDown: onMouseDown, className: "__remotion_editor_guide", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: guideContentStyle, className: [
|
|
83
83
|
'__remotion_editor_guide_content',
|
|
84
84
|
selectedGuideId === guide.id || hoveredGuideId === guide.id
|
|
85
85
|
? '__remotion_editor_guide_selected'
|
|
@@ -25,8 +25,8 @@ const EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
|
|
|
25
25
|
return guide.compositionId === canvasContent.compositionId;
|
|
26
26
|
});
|
|
27
27
|
}, [canvasContent.compositionId, guidesList]);
|
|
28
|
-
return (
|
|
29
|
-
return (
|
|
28
|
+
return (jsx_runtime_1.jsx(jsx_runtime_1.Fragment, { children: guidesForThisComposition.map((guide) => {
|
|
29
|
+
return (jsx_runtime_1.jsx(Guide_1.default, { guide: guide, canvasDimensions: canvasDimensions, scale: scale }, guide.id));
|
|
30
30
|
}) }));
|
|
31
31
|
};
|
|
32
32
|
exports.default = EditorGuides;
|
|
@@ -103,6 +103,6 @@ const Ruler = ({ scale, points, originOffset, startMarking, size, markingGaps, o
|
|
|
103
103
|
setCursor(isVerticalRuler ? 'ew-resize' : 'ns-resize');
|
|
104
104
|
}
|
|
105
105
|
}, [selectedGuideId, isVerticalRuler]);
|
|
106
|
-
return (
|
|
106
|
+
return (jsx_runtime_1.jsx("canvas", { ref: rulerCanvasRef, width: rulerWidth * window.devicePixelRatio, height: rulerHeight * window.devicePixelRatio, style: rulerStyle, onPointerDown: onMouseDown, onPointerEnter: changeCursor, onPointerLeave: changeCursor }));
|
|
107
107
|
};
|
|
108
108
|
exports.default = Ruler;
|
|
@@ -162,6 +162,8 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}, [selectedGuideId, onMouseMove, onMouseUp]);
|
|
165
|
-
return (
|
|
165
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
166
|
+
jsx_runtime_1.jsx("div", { style: originBlockStyles }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.left, size: canvasSize }), jsx_runtime_1.jsx(Ruler_1.default, { orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, markingGaps: rulerMarkingGaps, originOffset: canvasPosition.top, size: canvasSize })
|
|
167
|
+
] }));
|
|
166
168
|
};
|
|
167
169
|
exports.EditorRulers = EditorRulers;
|
|
@@ -53,6 +53,9 @@ const ExplorerPanel = ({ readOnlyStudio }) => {
|
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
}, []);
|
|
56
|
-
return (
|
|
56
|
+
return (jsx_runtime_1.jsx(CompSelectorRef_1.CompSelectorRef, { children: jsx_runtime_1.jsxs("div", { style: container, className: "css-reset", children: [
|
|
57
|
+
jsx_runtime_1.jsx("div", { style: tabsContainer, children: jsx_runtime_1.jsxs(Tabs_1.Tabs, { children: [
|
|
58
|
+
jsx_runtime_1.jsx(Tabs_1.Tab, { selected: panel === 'compositions', onClick: onCompositionsSelected, children: "Compositions" }), jsx_runtime_1.jsx(Tabs_1.Tab, { selected: panel === 'assets', onClick: onAssetsSelected, children: "Assets" })
|
|
59
|
+
] }) }), panel === 'compositions' ? (jsx_runtime_1.jsx(CompositionSelector_1.CompositionSelector, {})) : (jsx_runtime_1.jsx(AssetSelector_1.AssetSelector, { readOnlyStudio: readOnlyStudio }))] }) }));
|
|
57
60
|
};
|
|
58
61
|
exports.ExplorerPanel = ExplorerPanel;
|
|
@@ -21,20 +21,22 @@ const FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
|
|
|
21
21
|
throw new Error('expected to have assetMetadata, got "not-found"');
|
|
22
22
|
}
|
|
23
23
|
if (fileType === 'audio') {
|
|
24
|
-
return
|
|
24
|
+
return jsx_runtime_1.jsx("audio", { src: src, controls: true });
|
|
25
25
|
}
|
|
26
26
|
if (fileType === 'video') {
|
|
27
|
-
return
|
|
27
|
+
return jsx_runtime_1.jsx("video", { src: src, controls: true });
|
|
28
28
|
}
|
|
29
29
|
if (fileType === 'image') {
|
|
30
|
-
return
|
|
30
|
+
return jsx_runtime_1.jsx("img", { src: src });
|
|
31
31
|
}
|
|
32
32
|
if (fileType === 'json') {
|
|
33
|
-
return
|
|
33
|
+
return jsx_runtime_1.jsx(JSONViewer_1.JSONViewer, { src: src });
|
|
34
34
|
}
|
|
35
35
|
if (fileType === 'txt') {
|
|
36
|
-
return
|
|
36
|
+
return jsx_runtime_1.jsx(TextViewer_1.TextViewer, { src: src });
|
|
37
37
|
}
|
|
38
|
-
return (
|
|
38
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
39
|
+
jsx_runtime_1.jsx("div", { style: msgStyle, children: currentAsset }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 0.5 }), jsx_runtime_1.jsxs("div", { style: msgStyle, children: ["Size: ", (0, studio_shared_1.formatBytes)(assetMetadata.size), " "] })
|
|
40
|
+
] }));
|
|
39
41
|
};
|
|
40
42
|
exports.FilePreview = FilePreview;
|
|
@@ -70,6 +70,6 @@ const FpsCounter = ({ playbackSpeed }) => {
|
|
|
70
70
|
if (videoConfig === null) {
|
|
71
71
|
return null;
|
|
72
72
|
}
|
|
73
|
-
return
|
|
73
|
+
return jsx_runtime_1.jsxs("div", { style: style, children: [fps.toFixed(1), " FPS"] });
|
|
74
74
|
};
|
|
75
75
|
exports.FpsCounter = FpsCounter;
|
|
@@ -43,6 +43,6 @@ const FullScreenToggle = () => {
|
|
|
43
43
|
f.unregister();
|
|
44
44
|
};
|
|
45
45
|
}, [keybindings, onClick]);
|
|
46
|
-
return (
|
|
46
|
+
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { style: { width: 18, height: 18 }, viewBox: "0 0 448 512", fill: "#fff", children: jsx_runtime_1.jsx("path", { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" }) }) }));
|
|
47
47
|
};
|
|
48
48
|
exports.FullScreenToggle = FullScreenToggle;
|
|
@@ -71,6 +71,8 @@ const GlobalPropsEditorUpdateButton = ({ compositionId, currentDefaultProps }) =
|
|
|
71
71
|
},
|
|
72
72
|
}));
|
|
73
73
|
}, [compositionId]);
|
|
74
|
-
return (
|
|
74
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
75
|
+
jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), jsx_runtime_1.jsx(SchemaSaveButton_1.SchemaSaveButton, { disabled: disabled, onClick: onClicked })
|
|
76
|
+
] }));
|
|
75
77
|
};
|
|
76
78
|
exports.GlobalPropsEditorUpdateButton = GlobalPropsEditorUpdateButton;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { _InternalTypes } from 'remotion';
|
|
3
2
|
export declare const useSelectAsset: () => (asset: string) => void;
|
|
4
|
-
export declare const useSelectComposition: () => (c:
|
|
3
|
+
export declare const useSelectComposition: () => (c: import("remotion").AnyComposition, push: boolean) => void;
|
|
5
4
|
export declare const InitialCompositionLoader: React.FC;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InitialCompositionLoader = exports.useSelectComposition = exports.useSelectAsset = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
|
-
const get_static_files_1 = require("../api/get-static-files");
|
|
7
6
|
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
8
7
|
const url_state_1 = require("../helpers/url-state");
|
|
9
8
|
const folders_1 = require("../state/folders");
|
|
@@ -11,6 +10,7 @@ const sidebar_1 = require("../state/sidebar");
|
|
|
11
10
|
const CompositionSelector_1 = require("./CompositionSelector");
|
|
12
11
|
const ExplorerPanel_1 = require("./ExplorerPanel");
|
|
13
12
|
const load_canvas_content_from_url_1 = require("./load-canvas-content-from-url");
|
|
13
|
+
const use_static_files_1 = require("./use-static-files");
|
|
14
14
|
const useSelectAsset = () => {
|
|
15
15
|
const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
16
16
|
const { setAssetFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
|
|
@@ -75,6 +75,7 @@ const InitialCompositionLoader = () => {
|
|
|
75
75
|
const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
76
76
|
const selectComposition = (0, exports.useSelectComposition)();
|
|
77
77
|
const selectAsset = (0, exports.useSelectAsset)();
|
|
78
|
+
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
78
79
|
(0, react_1.useEffect)(() => {
|
|
79
80
|
if (canvasContent) {
|
|
80
81
|
return;
|
|
@@ -117,7 +118,6 @@ const InitialCompositionLoader = () => {
|
|
|
117
118
|
return;
|
|
118
119
|
}
|
|
119
120
|
if (newCanvas && newCanvas.type === 'asset') {
|
|
120
|
-
const staticFiles = (0, get_static_files_1.getStaticFiles)();
|
|
121
121
|
const exists = staticFiles.find((file) => {
|
|
122
122
|
return file.name === newCanvas.asset;
|
|
123
123
|
});
|
|
@@ -130,7 +130,7 @@ const InitialCompositionLoader = () => {
|
|
|
130
130
|
};
|
|
131
131
|
window.addEventListener('popstate', onchange);
|
|
132
132
|
return () => window.removeEventListener('popstate', onchange);
|
|
133
|
-
}, [compositions, selectComposition, setCanvasContent]);
|
|
133
|
+
}, [compositions, selectComposition, setCanvasContent, staticFiles]);
|
|
134
134
|
return null;
|
|
135
135
|
};
|
|
136
136
|
exports.InitialCompositionLoader = InitialCompositionLoader;
|
|
@@ -29,6 +29,6 @@ const InlineAction = ({ renderAction, onClick, disabled, title, }) => {
|
|
|
29
29
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
30
30
|
};
|
|
31
31
|
}, [disabled, hovered]);
|
|
32
|
-
return (
|
|
32
|
+
return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ? 'white' : colors_1.LIGHT_TEXT) }));
|
|
33
33
|
};
|
|
34
34
|
exports.InlineAction = InlineAction;
|
|
@@ -78,8 +78,9 @@ const InlineDropdown = ({ values, ...props }) => {
|
|
|
78
78
|
const onHide = (0, react_1.useCallback)(() => {
|
|
79
79
|
setOpened({ type: 'not-open' });
|
|
80
80
|
}, []);
|
|
81
|
-
return (
|
|
82
|
-
|
|
81
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
82
|
+
jsx_runtime_1.jsx("div", { ref: ref, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, ...props }) }), portalStyle
|
|
83
|
+
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: values, onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
83
84
|
: null] }));
|
|
84
85
|
};
|
|
85
86
|
exports.InlineDropdown = InlineDropdown;
|
|
@@ -103,10 +103,12 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
103
103
|
enter.unregister();
|
|
104
104
|
};
|
|
105
105
|
}, [disabled, onClick, registerKeybinding]);
|
|
106
|
-
return (
|
|
106
|
+
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { children: [
|
|
107
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Install packages" }), jsx_runtime_1.jsx("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: state.type === 'done' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installed package", selectedPackages.length === 1 ? '' : 's', ' ', "successfully. Restart the server to complete."] })) : state.type === 'restarting' ? (jsx_runtime_1.jsx("div", { style: text, children: "Restarting the Studio server..." })) : state.type === 'installing' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installing package", selectedPackages.length === 1 ? '' : 's', ". Check your terminal for progress."] })) : (jsx_runtime_1.jsxs("div", { style: text, children: [Object.entries(studio_shared_1.installableMap)
|
|
107
108
|
.filter(([, install]) => install)
|
|
108
109
|
.map(([pkgShort]) => {
|
|
109
|
-
var _a
|
|
110
|
+
var _a;
|
|
111
|
+
var _b;
|
|
110
112
|
const pkg = pkgShort === 'core' ? 'remotion' : `@remotion/${pkgShort}`;
|
|
111
113
|
const isInstalled = (_b = (_a = window.remotion_installedPackages) === null || _a === void 0 ? void 0 : _a.includes(pkg)) !== null && _b !== void 0 ? _b : false;
|
|
112
114
|
const link = studio_shared_1.apiDocs[pkgShort];
|
|
@@ -117,24 +119,32 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
117
119
|
if (!description) {
|
|
118
120
|
throw new Error('No description for ' + pkg);
|
|
119
121
|
}
|
|
120
|
-
return (
|
|
122
|
+
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
123
|
+
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: map[pkg], name: pkg, onChange: () => {
|
|
121
124
|
setMap((prev) => ({ ...prev, [pkg]: !prev[pkg] }));
|
|
122
|
-
}, disabled: !canSelectPackages || isInstalled }),
|
|
125
|
+
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), jsx_runtime_1.jsx(InstallablePackage_1.InstallablePackageComp, { description: description, isInstalled: isInstalled, link: link, pkg: pkg })
|
|
126
|
+
] }, pkg));
|
|
123
127
|
}), studio_shared_1.extraPackages.map((extraPkg) => {
|
|
124
|
-
var _a
|
|
128
|
+
var _a;
|
|
129
|
+
var _b;
|
|
125
130
|
const isInstalled = (_b = (_a = window.remotion_installedPackages) === null || _a === void 0 ? void 0 : _a.includes(extraPkg.name)) !== null && _b !== void 0 ? _b : false;
|
|
126
|
-
return (
|
|
131
|
+
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
132
|
+
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: map[extraPkg.name], name: extraPkg.name, onChange: () => {
|
|
127
133
|
setMap((prev) => ({
|
|
128
134
|
...prev,
|
|
129
135
|
[extraPkg.name]: !prev[extraPkg.name],
|
|
130
136
|
}));
|
|
131
|
-
}, disabled: !canSelectPackages || isInstalled }),
|
|
132
|
-
|
|
137
|
+
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), jsx_runtime_1.jsx(InstallablePackage_1.InstallablePackageComp, { description: extraPkg.description, isInstalled: isInstalled, link: extraPkg.docsUrl, pkg: `${extraPkg.name}@${extraPkg.version}` })
|
|
138
|
+
] }, extraPkg.name));
|
|
139
|
+
})] })) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [state.type === 'idle' ? (jsx_runtime_1.jsxs("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: ["This will install ", selectedPackages.length, " package", selectedPackages.length === 1 ? '' : 's', jsx_runtime_1.jsx("br", {}),
|
|
140
|
+
"using ", packageManager, ", Remotion v", remotion_1.VERSION] })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onClick, disabled: disabled, children: [state.type === 'restarting'
|
|
133
141
|
? 'Restarting...'
|
|
134
142
|
: state.type === 'installing'
|
|
135
143
|
? 'Installing...'
|
|
136
144
|
: state.type === 'done'
|
|
137
145
|
? 'Restart Server'
|
|
138
|
-
: 'Install', disabled ? null :
|
|
146
|
+
: 'Install', disabled ? null : jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })
|
|
147
|
+
] }) })
|
|
148
|
+
] }));
|
|
139
149
|
};
|
|
140
150
|
exports.InstallPackageModal = InstallPackageModal;
|
|
@@ -5,15 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const colors_1 = require("../helpers/colors");
|
|
6
6
|
const FONT_SIZE = 13;
|
|
7
7
|
const InstallablePackageComp = ({ isInstalled, pkg, link, description }) => {
|
|
8
|
-
return (
|
|
8
|
+
return (jsx_runtime_1.jsxs("div", { style: {
|
|
9
9
|
fontSize: FONT_SIZE,
|
|
10
10
|
lineHeight: 1.2,
|
|
11
11
|
paddingBottom: 4,
|
|
12
12
|
paddingTop: 4,
|
|
13
|
-
}, children: [
|
|
13
|
+
}, children: [
|
|
14
|
+
jsx_runtime_1.jsx("a", { href: link, style: {
|
|
14
15
|
fontSize: FONT_SIZE,
|
|
15
16
|
color: colors_1.TEXT_COLOR,
|
|
16
17
|
textDecoration: 'none',
|
|
17
|
-
}, target: "_blank", children: pkg }), ' ', isInstalled ? (
|
|
18
|
+
}, target: "_blank", children: pkg }), ' ', isInstalled ? (jsx_runtime_1.jsx("span", { style: { opacity: 0.3, fontSize: 'inherit' }, children: "(installed)" })) : null, jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: FONT_SIZE }, children: description })
|
|
19
|
+
] }));
|
|
18
20
|
};
|
|
19
21
|
exports.InstallablePackageComp = InstallablePackageComp;
|
|
@@ -19,7 +19,7 @@ const JSONViewer = ({ src }) => {
|
|
|
19
19
|
setJson(JSON.stringify(jsonRes, null, 2));
|
|
20
20
|
});
|
|
21
21
|
}, [src]);
|
|
22
|
-
return (
|
|
22
|
+
return (jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { value: json !== null && json !== void 0 ? json : undefined, status: "ok", onChange: () => {
|
|
23
23
|
return null;
|
|
24
24
|
}, style: jsonStyle }));
|
|
25
25
|
};
|