@remotion/studio 4.0.524 → 4.0.525
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ActionTooltip.d.ts +2 -0
- package/dist/components/ActionTooltip.js +14 -4
- package/dist/components/AppLaunchButton.js +2 -0
- package/dist/components/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +15 -1
- package/dist/components/CheckboardToggle.js +2 -1
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +31 -23
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/GlobalKeybindings.js +14 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +18 -15
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
- package/dist/components/InspectorSequenceSection.js +18 -9
- package/dist/components/LoopToggle.js +2 -1
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +2 -1
- package/dist/components/MuteToggle.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewFolder.js +29 -2
- package/dist/components/NewComposition/RenameFolder.js +1 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +22 -1
- package/dist/components/OutlineToggle.js +2 -1
- package/dist/components/PlayPause.js +1 -1
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +3 -6
- package/dist/components/PreviewToolbarOverflowButton.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.js +40 -4
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RulersAndGuidesToggle.js +2 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +16 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.js +4 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/SidebarCollapserControls.js +1 -1
- package/dist/components/SkillsSettings.js +35 -4
- package/dist/components/SnappingToggle.js +2 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +148 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineSchemaField.js +8 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +3 -1
- package/dist/components/Timeline/TimelineSelection.js +32 -5
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -10
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineZoomControls.js +1 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +22 -6
- package/dist/components/Timeline/timeline-field-display-utils.js +4 -2
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +17 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/composition-menu-items.js +56 -2
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.js +1 -1
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +5 -0
- package/dist/esm/{LazyModels-hc33szyn.mjs → LazyModels-gfmpcy4h.mjs} +3 -3
- package/dist/esm/{LazyModels-sg40rjw6.mjs → LazyModels-m1rf06wh.mjs} +3 -3
- package/dist/esm/{TranscriptionModal-3ctnxpt6.mjs → TranscriptionModal-8pvrehg4.mjs} +6 -6
- package/dist/esm/{VideoMattingModal-b0r7e60n.mjs → VideoMattingModal-fefbzgka.mjs} +6 -6
- package/dist/esm/{index-yfrysr5f.mjs → index-0x13f28h.mjs} +17 -3
- package/dist/esm/{index-q2epbw93.mjs → index-1089795y.mjs} +2 -2
- package/dist/esm/{index-9qtvmwtx.mjs → index-41kqns5c.mjs} +4 -2
- package/dist/esm/{index-c37kme2v.mjs → index-ggqpre9v.mjs} +2202 -1719
- package/dist/esm/{index-wbmp5srk.mjs → index-hbezgbbq.mjs} +1 -1
- package/dist/esm/{index-2j3d1g81.mjs → index-jrw61pkj.mjs} +1 -1
- package/dist/esm/{index-1b9skrrd.mjs → index-mww32xc8.mjs} +3 -3
- package/dist/esm/{index-er3mh6em.mjs → index-s848rffx.mjs} +7123 -6588
- package/dist/esm/{index-q5xv20xx.mjs → index-tzxb8808.mjs} +1 -1
- package/dist/esm/{index-e3zwf3e7.mjs → index-vsxrxfpj.mjs} +1 -1
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internals.mjs +7 -7
- package/dist/esm/previewEntry.mjs +7 -7
- package/dist/helpers/get-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.js +5 -0
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +5 -1
- package/dist/helpers/use-rename-composition.js +6 -1
- package/dist/state/modals.d.ts +13 -1
- package/dist/state/z-index.js +1 -3
- package/package.json +19 -19
|
@@ -104,6 +104,9 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
104
104
|
}, [initialPublicLicenseKey, setPublicLicenseKey]);
|
|
105
105
|
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
106
106
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Settings", onClose: dismiss }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
107
|
-
jsx_runtime_1.jsxs("div", { style: settingsLeftSidebar, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'studio', onClick: () => selectTab('studio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(remotion_triangle_1.RemotionTriangleIcon, { color: color, style: render_modals_1.icon }) })), children: "Studio" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'rendering', onClick: () => selectTab('rendering'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: render_modals_1.icon }) })), children: "Defaults" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'shortcuts', onClick: () => selectTab('shortcuts'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(keyboard_1.KeyboardIcon, { color: color, style: keyboardIcon }) })), children: "Shortcuts" }), showPackages ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'packages', onClick: () => selectTab('packages'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(package_1.PackageIcon, { color: color, style: render_modals_1.icon }) })), children: "Packages" })) : null, isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'skills', onClick: () => selectTab('skills'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: color, style: skillsIcon }) })), children: "Skills" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => selectTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'apps', onClick: () => selectTab('apps'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(apps_1.AppsIcon, { color: color, style: appsIcon }) })), children: "Apps" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => selectTab('license'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(license_1.LicenseIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })), showUpdates ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'updates', onClick: () => selectTab('updates'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: render_modals_1.icon }) })), children: "Updates" })) : null] }), openedTabs.includes('packages') ? (jsx_runtime_1.jsx("div", { style: tab === 'packages' ? render_modals_1.optionsPanel : hiddenPanel, children: jsx_runtime_1.jsx(InstallPackage_1.InstallPackageSettings, { footerContainer: packagesFooterContainer, packageManager: packageManager }) })) : null, openedTabs.includes('apps') ? (jsx_runtime_1.jsx("div", { style: tab === 'apps' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.DefaultEditorSettings, {}) })) : null, openedTabs.includes('models') ? (jsx_runtime_1.jsx("div", { style: tab === 'models' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ModelsSettings_1.ModelsSettings, {}) })) : null, openedTabs.includes('license') ? (jsx_runtime_1.jsx("div", { style: tab === 'license' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureLicenseModal_1.LicenseSettings, {}) })) : null, openedTabs.includes('skills') ? (jsx_runtime_1.jsx("div", { style: tab === 'skills' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillsSettings, {}) })) : null, openedTabs.includes('shortcuts') ? (jsx_runtime_1.jsx("div", { style: tab === 'shortcuts' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(KeyboardShortcutsSettings_1.KeyboardShortcutsSettings, {}) })) : null, openedTabs.includes('rendering') ? (jsx_runtime_1.jsx("div", { style: tab === 'rendering' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(RenderingSettings_1.RenderingSettings, {}) })) : null, openedTabs.includes('studio') ? (jsx_runtime_1.jsx("div", { style: tab === 'studio' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(StudioSettings_1.StudioSettings, {}) })) : null, showUpdates && openedTabs.includes('updates') ? (jsx_runtime_1.jsx("div", { style: tab === 'updates' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(UpdatesSettings_1.UpdatesSettings, {}) })) : null] }), tab === 'packages' ? (jsx_runtime_1.jsx("div", { ref: setPackagesFooterContainer })) : isBrowserStudio ||
|
|
107
|
+
jsx_runtime_1.jsxs("div", { style: settingsLeftSidebar, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'studio', onClick: () => selectTab('studio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(remotion_triangle_1.RemotionTriangleIcon, { color: color, style: render_modals_1.icon }) })), children: "Studio" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'rendering', onClick: () => selectTab('rendering'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: render_modals_1.icon }) })), children: "Defaults" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'shortcuts', onClick: () => selectTab('shortcuts'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(keyboard_1.KeyboardIcon, { color: color, style: keyboardIcon }) })), children: "Shortcuts" }), showPackages ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'packages', onClick: () => selectTab('packages'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(package_1.PackageIcon, { color: color, style: render_modals_1.icon }) })), children: "Packages" })) : null, isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'skills', onClick: () => selectTab('skills'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: color, style: skillsIcon }) })), children: "Skills" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => selectTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'apps', onClick: () => selectTab('apps'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(apps_1.AppsIcon, { color: color, style: appsIcon }) })), children: "Apps" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => selectTab('license'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(license_1.LicenseIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })), showUpdates ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'updates', onClick: () => selectTab('updates'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: render_modals_1.icon }) })), children: "Updates" })) : null] }), openedTabs.includes('packages') ? (jsx_runtime_1.jsx("div", { style: tab === 'packages' ? render_modals_1.optionsPanel : hiddenPanel, children: jsx_runtime_1.jsx(InstallPackage_1.InstallPackageSettings, { footerContainer: packagesFooterContainer, packageManager: packageManager }) })) : null, openedTabs.includes('apps') ? (jsx_runtime_1.jsx("div", { style: tab === 'apps' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.DefaultEditorSettings, {}) })) : null, openedTabs.includes('models') ? (jsx_runtime_1.jsx("div", { style: tab === 'models' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ModelsSettings_1.ModelsSettings, {}) })) : null, openedTabs.includes('license') ? (jsx_runtime_1.jsx("div", { style: tab === 'license' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureLicenseModal_1.LicenseSettings, {}) })) : null, openedTabs.includes('skills') ? (jsx_runtime_1.jsx("div", { style: tab === 'skills' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillsSettings, {}) })) : null, openedTabs.includes('shortcuts') ? (jsx_runtime_1.jsx("div", { style: tab === 'shortcuts' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(KeyboardShortcutsSettings_1.KeyboardShortcutsSettings, {}) })) : null, openedTabs.includes('rendering') ? (jsx_runtime_1.jsx("div", { style: tab === 'rendering' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(RenderingSettings_1.RenderingSettings, {}) })) : null, openedTabs.includes('studio') ? (jsx_runtime_1.jsx("div", { style: tab === 'studio' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(StudioSettings_1.StudioSettings, {}) })) : null, showUpdates && openedTabs.includes('updates') ? (jsx_runtime_1.jsx("div", { style: tab === 'updates' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(UpdatesSettings_1.UpdatesSettings, {}) })) : null] }), tab === 'packages' ? (jsx_runtime_1.jsx("div", { ref: setPackagesFooterContainer })) : isBrowserStudio ||
|
|
108
|
+
tab === 'models' ||
|
|
109
|
+
tab === 'updates' ||
|
|
110
|
+
tab === 'skills' ? null : (jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { showLicenseFaq: tab === 'license' }))] }) }));
|
|
108
111
|
};
|
|
109
112
|
exports.SettingsModal = SettingsModal;
|
|
@@ -52,7 +52,7 @@ const SettingsModalFooter = ({ showLicenseFaq }) => {
|
|
|
52
52
|
}, []);
|
|
53
53
|
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsxs("div", { style: footerRow, children: [
|
|
54
54
|
jsx_runtime_1.jsxs("div", { style: configFileHint, children: ["Changes save to",
|
|
55
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }) })
|
|
55
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }), showTooltips: false })
|
|
56
56
|
] }), showLicenseFaq ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: openLicenseFaq, style: { flex: 'none', width: 'fit-content' }, title: "Open the Remotion License FAQ in a new tab", children: ["License FAQ",
|
|
57
57
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
58
58
|
] })) : null] }) }));
|
|
@@ -143,6 +143,6 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
143
143
|
const toggleRightAction = (0, react_1.useCallback)((color) => {
|
|
144
144
|
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "right", style: colorStyle(color), children: jsx_runtime_1.jsx("div", { style: rightIcon(color) }) }));
|
|
145
145
|
}, [colorStyle, rightIcon]);
|
|
146
|
-
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: label, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: side === 'left' ? toggleLeft : toggleRight, renderAction: side === 'left' ? toggleLeftAction : toggleRightAction, style: side === 'left' ? { marginRight: 4 } : undefined, "aria-label": label, "aria-expanded": expanded, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined }) }));
|
|
146
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: label, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: side === 'left' ? toggleLeft : toggleRight, renderAction: side === 'left' ? toggleLeftAction : toggleRightAction, unhoveredColor: colors_1.WHITE_ALPHA_80, style: side === 'left' ? { marginRight: 4 } : undefined, "aria-label": label, "aria-expanded": expanded, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined }) }));
|
|
147
147
|
};
|
|
148
148
|
exports.SidebarCollapserControl = SidebarCollapserControl;
|
|
@@ -3,15 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SkillsSettings = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
7
|
const colors_1 = require("../helpers/colors");
|
|
7
8
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
9
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
10
|
const check_circle_filled_1 = require("../icons/check-circle-filled");
|
|
11
|
+
const cloud_download_1 = require("../icons/cloud-download");
|
|
10
12
|
const copy_1 = require("../icons/copy");
|
|
13
|
+
const trash_1 = require("../icons/trash");
|
|
11
14
|
const InlineAction_1 = require("./InlineAction");
|
|
12
15
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
13
16
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
14
17
|
const SettingsContext_1 = require("./SettingsContext");
|
|
18
|
+
const Spinner_1 = require("./Spinner");
|
|
15
19
|
const INSTALL_COMMAND = 'npx remotion skills add';
|
|
16
20
|
const container = {
|
|
17
21
|
alignSelf: 'flex-start',
|
|
@@ -87,13 +91,28 @@ const status = {
|
|
|
87
91
|
lineHeight: 1.4,
|
|
88
92
|
whiteSpace: 'nowrap',
|
|
89
93
|
};
|
|
94
|
+
const actionIcon = {
|
|
95
|
+
height: 14,
|
|
96
|
+
width: 14,
|
|
97
|
+
};
|
|
98
|
+
const actionSlot = {
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
display: 'inline-flex',
|
|
101
|
+
flexShrink: 0,
|
|
102
|
+
height: 24,
|
|
103
|
+
justifyContent: 'center',
|
|
104
|
+
width: 24,
|
|
105
|
+
};
|
|
90
106
|
const loading = {
|
|
91
107
|
...description,
|
|
92
108
|
marginTop: 14,
|
|
93
109
|
};
|
|
94
110
|
const SkillsSettings = () => {
|
|
95
111
|
var _a;
|
|
96
|
-
const { error, remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
112
|
+
const { error, remotionSkillsInfo, installSkill, removeSkill, skillAction, skillActionError, } = (0, SettingsContext_1.useSettings)();
|
|
113
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
114
|
+
const canInstall = !window.remotion_isReadOnlyStudio &&
|
|
115
|
+
previewServerState.type === 'connected';
|
|
97
116
|
const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
98
117
|
const installedSkills = (0, react_1.useMemo)(() => {
|
|
99
118
|
var _a;
|
|
@@ -110,23 +129,35 @@ const SkillsSettings = () => {
|
|
|
110
129
|
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
111
130
|
return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: color, style: copyIcon });
|
|
112
131
|
}, [copied]);
|
|
113
|
-
|
|
132
|
+
const renderInstallAction = (0, react_1.useCallback)((color) => {
|
|
133
|
+
return jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIcon });
|
|
134
|
+
}, []);
|
|
135
|
+
const renderRemoveAction = (0, react_1.useCallback)((color) => {
|
|
136
|
+
return jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: actionIcon });
|
|
137
|
+
}, []);
|
|
138
|
+
const actionInProgress = skillAction !== null;
|
|
139
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [remotionSkillsInfo === null && error === null ? (jsx_runtime_1.jsx("p", { style: loading, children: "Checking installed skills..." })) : null, remotionSkillsInfo === null && error ? (jsx_runtime_1.jsx("div", { style: { marginTop: 14 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: error, align: "flex-start", type: "error" }) })) : null, missingSkills > 0 && canInstall ? (jsx_runtime_1.jsx("p", { style: description, children: "Install skills in this project to use them with your coding agent." })) : null, skillActionError ? (jsx_runtime_1.jsx("div", { style: { marginTop: 14 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: skillActionError, align: "flex-start", type: "error" }) })) : null, missingSkills > 0 && !canInstall ? (jsx_runtime_1.jsxs("div", { children: [
|
|
114
140
|
jsx_runtime_1.jsx("p", { style: description, children: "Not all skills are installed. Run this command in the project directory, then reload Studio and restart your coding agent." }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
115
141
|
jsx_runtime_1.jsx("pre", { style: command, children: INSTALL_COMMAND }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy install command" })
|
|
116
142
|
] })
|
|
117
143
|
] })) : null, remotionSkillsInfo ? (jsx_runtime_1.jsx("div", { style: list, role: "list", "aria-label": "Remotion Agent Skills", children: remotionSkillsInfo.skills.map((skill, index) => {
|
|
118
144
|
const installed = skill.installedInProject || skill.installedGlobally;
|
|
145
|
+
const processingThisSkill = (skillAction === null || skillAction === void 0 ? void 0 : skillAction.skill) === skill.name;
|
|
119
146
|
const installedLocation = skill.installedInProject && skill.installedGlobally
|
|
120
147
|
? 'Project and global'
|
|
121
148
|
: skill.installedInProject
|
|
122
149
|
? 'Project'
|
|
123
150
|
: skill.installedGlobally
|
|
124
151
|
? 'Global'
|
|
125
|
-
:
|
|
152
|
+
: null;
|
|
126
153
|
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: index === remotionSkillsInfo.skills.length - 1
|
|
127
154
|
? lastSkillRow
|
|
128
155
|
: skillRow, children: [
|
|
129
|
-
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), jsx_runtime_1.jsx("span", { style: status, children:
|
|
156
|
+
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), processingThisSkill ? (jsx_runtime_1.jsx("span", { style: status, children: skillAction.type === 'installing'
|
|
157
|
+
? 'Installing…'
|
|
158
|
+
: 'Removing…' })) : installedLocation ? (jsx_runtime_1.jsx("span", { style: status, children: installedLocation })) : null, installed ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : null, processingThisSkill ? (jsx_runtime_1.jsx("span", { style: actionSlot, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 }) })) : installed && canInstall ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: skill.installedInProject
|
|
159
|
+
? `Remove ${skill.name} from this project`
|
|
160
|
+
: `Remove ${skill.name} globally`, disabled: actionInProgress, onClick: () => removeSkill(skill.name), renderAction: renderRemoveAction, variant: null })) : canInstall ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: `Install ${skill.name} in this project`, disabled: actionInProgress, onClick: () => installSkill(skill.name), renderAction: renderInstallAction, variant: null })) : null] }, skill.name));
|
|
130
161
|
}) })) : null] }));
|
|
131
162
|
};
|
|
132
163
|
exports.SkillsSettings = SkillsSettings;
|
|
@@ -10,6 +10,7 @@ const magnet_1 = require("../icons/magnet");
|
|
|
10
10
|
const editor_snapping_1 = require("../state/editor-snapping");
|
|
11
11
|
const ActionTooltip_1 = require("./ActionTooltip");
|
|
12
12
|
const ControlButton_1 = require("./ControlButton");
|
|
13
|
+
const buttonStyle = { width: 26 };
|
|
13
14
|
const SnappingToggle = () => {
|
|
14
15
|
const { editorSnapping, setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
15
16
|
const onClick = (0, react_1.useCallback)(() => {
|
|
@@ -21,6 +22,6 @@ const SnappingToggle = () => {
|
|
|
21
22
|
? 'Disable snapping'
|
|
22
23
|
: 'Enable snapping';
|
|
23
24
|
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
24
|
-
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label:
|
|
25
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Snapping", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-pressed": editorSnapping, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, style: buttonStyle, children: (color) => (jsx_runtime_1.jsx(magnet_1.MagnetIcon, { style: { width: 18, height: 18, transform: 'translateY(1px)' }, color: editorSnapping ? colors_1.BLUE : color, "aria-hidden": "true", focusable: "false" })) }) }));
|
|
25
26
|
};
|
|
26
27
|
exports.SnappingToggle = SnappingToggle;
|
|
@@ -116,8 +116,7 @@ const SplitterHandle = ({ allowToCollapse, onCollapse, onCollapseDuringDrag }) =
|
|
|
116
116
|
onMove: onPointerMove,
|
|
117
117
|
onEnd: (reason, endEvent) => {
|
|
118
118
|
var _a, _b;
|
|
119
|
-
if ((
|
|
120
|
-
endEvent) {
|
|
119
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
121
120
|
lastFlex = getNewValue(endEvent, true);
|
|
122
121
|
lastCollapsedSide = getCollapsedSide(endEvent);
|
|
123
122
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const VerticalTab: React.FC<{
|
|
3
|
-
readonly children:
|
|
3
|
+
readonly children: string;
|
|
4
4
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
readonly renderIcon?: (color: string) => React.ReactNode;
|
|
6
6
|
readonly style?: React.CSSProperties;
|
|
@@ -4,7 +4,10 @@ exports.VerticalTab = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const use_breakpoint_1 = require("../../helpers/use-breakpoint");
|
|
7
8
|
const z_index_1 = require("../../state/z-index");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
10
|
+
const compactTabBreakpoint = 700;
|
|
8
11
|
const selectorButton = {
|
|
9
12
|
border: 'none',
|
|
10
13
|
flex: 1,
|
|
@@ -19,9 +22,15 @@ const selectorButton = {
|
|
|
19
22
|
userSelect: 'none',
|
|
20
23
|
WebkitUserSelect: 'none',
|
|
21
24
|
};
|
|
25
|
+
const compactSelectorButton = {
|
|
26
|
+
width: 42,
|
|
27
|
+
paddingLeft: 12,
|
|
28
|
+
paddingRight: 4,
|
|
29
|
+
};
|
|
22
30
|
const VerticalTab = ({ children, onClick, renderIcon, style, selected, autoFocus }) => {
|
|
23
31
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
24
32
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
33
|
+
const isCompact = (0, use_breakpoint_1.useBreakpoint)(compactTabBreakpoint);
|
|
25
34
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
26
35
|
setHovered(true);
|
|
27
36
|
}, []);
|
|
@@ -36,8 +45,13 @@ const VerticalTab = ({ children, onClick, renderIcon, style, selected, autoFocus
|
|
|
36
45
|
color,
|
|
37
46
|
boxShadow: 'none',
|
|
38
47
|
...style,
|
|
48
|
+
...(isCompact ? compactSelectorButton : null),
|
|
39
49
|
};
|
|
40
|
-
}, [color, hovered, selected, style]);
|
|
41
|
-
|
|
50
|
+
}, [color, hovered, isCompact, selected, style]);
|
|
51
|
+
const button = (jsx_runtime_1.jsxs("button", { "aria-label": children, autoFocus: autoFocus, style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: [renderIcon ? renderIcon(color) : null, isCompact ? null : children] }));
|
|
52
|
+
if (!isCompact) {
|
|
53
|
+
return button;
|
|
54
|
+
}
|
|
55
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: children, shortcut: null, delay: 800, dismissOnClick: true, side: "right", children: button }));
|
|
42
56
|
};
|
|
43
57
|
exports.VerticalTab = VerticalTab;
|
|
@@ -687,8 +687,8 @@ const EasingEditor = ({ state, renderHeader }) => {
|
|
|
687
687
|
onMove: (moveEvent) => {
|
|
688
688
|
updateHandleFromPointer(handle, moveEvent);
|
|
689
689
|
},
|
|
690
|
-
onEnd: (reason) => {
|
|
691
|
-
if (
|
|
690
|
+
onEnd: (reason, endEvent) => {
|
|
691
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
692
692
|
commitEasing(serializeBezier(bezierRef.current), liveOverrideVersionRef.current);
|
|
693
693
|
}
|
|
694
694
|
else {
|
|
@@ -6,6 +6,8 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const no_react_1 = require("remotion/no-react");
|
|
8
8
|
const write_static_file_1 = require("../../api/write-static-file");
|
|
9
|
+
const colors_1 = require("../../helpers/colors");
|
|
10
|
+
const hoverable_1 = require("../../helpers/hoverable");
|
|
9
11
|
const pen_1 = require("../../icons/pen");
|
|
10
12
|
const modals_1 = require("../../state/modals");
|
|
11
13
|
const import_assets_1 = require("../import-assets");
|
|
@@ -13,6 +15,7 @@ const InlineAction_1 = require("../InlineAction");
|
|
|
13
15
|
const common_1 = require("../InspectorPanel/common");
|
|
14
16
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
15
17
|
const use_static_files_1 = require("../use-static-files");
|
|
18
|
+
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
16
19
|
const penIcon = {
|
|
17
20
|
display: 'block',
|
|
18
21
|
height: 14,
|
|
@@ -37,6 +40,72 @@ const assetTypeToAccept = {
|
|
|
37
40
|
video: 'video/*',
|
|
38
41
|
image: 'image/*',
|
|
39
42
|
};
|
|
43
|
+
const imageAssetField = {
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
display: 'flex',
|
|
46
|
+
flex: 1,
|
|
47
|
+
gap: 8,
|
|
48
|
+
minWidth: 0,
|
|
49
|
+
padding: '4px 12px',
|
|
50
|
+
};
|
|
51
|
+
const thumbnailButton = {
|
|
52
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
53
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
54
|
+
hoverBackground: colors_1.TRANSPARENT,
|
|
55
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
56
|
+
hoverColor: colors_1.WHITE,
|
|
57
|
+
}),
|
|
58
|
+
appearance: 'none',
|
|
59
|
+
border: 'none',
|
|
60
|
+
cursor: 'default',
|
|
61
|
+
flexShrink: 0,
|
|
62
|
+
height: 40,
|
|
63
|
+
margin: 0,
|
|
64
|
+
padding: 0,
|
|
65
|
+
width: 40,
|
|
66
|
+
};
|
|
67
|
+
const thumbnail = {
|
|
68
|
+
display: 'block',
|
|
69
|
+
height: '100%',
|
|
70
|
+
objectFit: 'contain',
|
|
71
|
+
width: '100%',
|
|
72
|
+
};
|
|
73
|
+
const imageAssetInfo = {
|
|
74
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
75
|
+
idleBackground: colors_1.TRANSPARENT,
|
|
76
|
+
hoverBackground: colors_1.TRANSPARENT,
|
|
77
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
78
|
+
hoverColor: colors_1.WHITE,
|
|
79
|
+
}),
|
|
80
|
+
appearance: 'none',
|
|
81
|
+
border: 'none',
|
|
82
|
+
display: 'flex',
|
|
83
|
+
flex: 1,
|
|
84
|
+
flexDirection: 'column',
|
|
85
|
+
gap: 2,
|
|
86
|
+
margin: 0,
|
|
87
|
+
minWidth: 0,
|
|
88
|
+
padding: 0,
|
|
89
|
+
textAlign: 'left',
|
|
90
|
+
};
|
|
91
|
+
const imageAssetName = {
|
|
92
|
+
color: colors_1.WHITE,
|
|
93
|
+
fontFamily: 'sans-serif',
|
|
94
|
+
fontSize: 12,
|
|
95
|
+
lineHeight: '16px',
|
|
96
|
+
overflow: 'hidden',
|
|
97
|
+
textOverflow: 'ellipsis',
|
|
98
|
+
whiteSpace: 'nowrap',
|
|
99
|
+
};
|
|
100
|
+
const imageAssetSource = {
|
|
101
|
+
color: colors_1.LIGHT_TEXT,
|
|
102
|
+
fontFamily: 'sans-serif',
|
|
103
|
+
fontSize: 11,
|
|
104
|
+
lineHeight: '14px',
|
|
105
|
+
overflow: 'hidden',
|
|
106
|
+
textOverflow: 'ellipsis',
|
|
107
|
+
whiteSpace: 'nowrap',
|
|
108
|
+
};
|
|
40
109
|
exports.AssetSelectionContext = (0, react_1.createContext)({
|
|
41
110
|
getSourceAction: () => null,
|
|
42
111
|
sourceAction: null,
|
|
@@ -49,6 +118,7 @@ const toFileToken = (name) => {
|
|
|
49
118
|
};
|
|
50
119
|
exports.toFileToken = toFileToken;
|
|
51
120
|
const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
121
|
+
var _a, _b;
|
|
52
122
|
if (field.fieldSchema.type !== 'asset') {
|
|
53
123
|
throw new Error('TimelineAssetField rendered for non-asset field');
|
|
54
124
|
}
|
|
@@ -73,6 +143,15 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
73
143
|
onDragEnd();
|
|
74
144
|
});
|
|
75
145
|
}, [propStatus.codeValue, onDragValueChange, onSave, onDragEnd]);
|
|
146
|
+
const onSelectUrl = (0, react_1.useCallback)((url) => {
|
|
147
|
+
if (url === propStatus.codeValue) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
onDragValueChange(url);
|
|
151
|
+
onSave(url).finally(() => {
|
|
152
|
+
onDragEnd();
|
|
153
|
+
});
|
|
154
|
+
}, [propStatus.codeValue, onDragValueChange, onDragEnd, onSave]);
|
|
76
155
|
const selectFile = (0, react_1.useCallback)(async () => {
|
|
77
156
|
const [file] = await (0, import_assets_1.pickFilesToImport)({
|
|
78
157
|
multiple: false,
|
|
@@ -103,25 +182,85 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
103
182
|
}
|
|
104
183
|
}, [assetType, onSelect, staticFiles]);
|
|
105
184
|
const openAssetSelection = (0, react_1.useCallback)(() => {
|
|
185
|
+
const assetSelection = {
|
|
186
|
+
initialQuery,
|
|
187
|
+
onSelectFile: () => {
|
|
188
|
+
selectFile().catch(() => undefined);
|
|
189
|
+
},
|
|
190
|
+
onSelected: (asset) => onSelect(asset.name, asset.src),
|
|
191
|
+
};
|
|
192
|
+
if (assetType !== undefined) {
|
|
193
|
+
const linkInfo = typeof effectiveValue === 'string'
|
|
194
|
+
? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(effectiveValue)
|
|
195
|
+
: null;
|
|
196
|
+
setSelectedModal({
|
|
197
|
+
type: 'asset-selection',
|
|
198
|
+
assetType,
|
|
199
|
+
initialUrl: (linkInfo === null || linkInfo === void 0 ? void 0 : linkInfo.kind) === 'remote' ? linkInfo.href : null,
|
|
200
|
+
invocationTimestamp: Date.now(),
|
|
201
|
+
assetSelection,
|
|
202
|
+
onSelectedUrl: onSelectUrl,
|
|
203
|
+
});
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
106
206
|
setSelectedModal({
|
|
107
207
|
type: 'quick-switcher',
|
|
108
208
|
mode: 'assets',
|
|
109
209
|
invocationTimestamp: Date.now(),
|
|
110
|
-
assetSelection
|
|
111
|
-
initialQuery,
|
|
112
|
-
onSelectFile: () => {
|
|
113
|
-
selectFile().catch(() => undefined);
|
|
114
|
-
},
|
|
115
|
-
onSelected: (asset) => onSelect(asset.name, asset.src),
|
|
116
|
-
},
|
|
210
|
+
assetSelection,
|
|
117
211
|
compositionSelection: null,
|
|
118
212
|
});
|
|
119
|
-
}, [
|
|
213
|
+
}, [
|
|
214
|
+
assetType,
|
|
215
|
+
effectiveValue,
|
|
216
|
+
initialQuery,
|
|
217
|
+
onSelect,
|
|
218
|
+
onSelectUrl,
|
|
219
|
+
selectFile,
|
|
220
|
+
setSelectedModal,
|
|
221
|
+
]);
|
|
120
222
|
const action = (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openAssetSelection, disabled: window.remotion_isReadOnlyStudio, title: "Change source", renderAction: (color) => jsx_runtime_1.jsx(pen_1.PenIcon, { color: color, style: penIcon }) }));
|
|
223
|
+
if (assetType === 'image' && typeof effectiveValue === 'string') {
|
|
224
|
+
const linkInfo = (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(effectiveValue);
|
|
225
|
+
if (linkInfo !== null) {
|
|
226
|
+
let name;
|
|
227
|
+
let source;
|
|
228
|
+
let previewSrc;
|
|
229
|
+
if (linkInfo.kind === 'local') {
|
|
230
|
+
name = (_a = linkInfo.assetPath.split('/').pop()) !== null && _a !== void 0 ? _a : linkInfo.assetPath;
|
|
231
|
+
source = 'Project asset';
|
|
232
|
+
previewSrc = (0, remotion_1.staticFile)(linkInfo.assetPath);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
previewSrc = linkInfo.href.startsWith('//')
|
|
236
|
+
? `https:${linkInfo.href}`
|
|
237
|
+
: linkInfo.href;
|
|
238
|
+
try {
|
|
239
|
+
const url = new URL(previewSrc);
|
|
240
|
+
const encodedName = url.pathname.split('/').filter(Boolean).pop();
|
|
241
|
+
name = encodedName ? decodeURIComponent(encodedName) : url.hostname;
|
|
242
|
+
source = url.hostname;
|
|
243
|
+
}
|
|
244
|
+
catch (_c) {
|
|
245
|
+
name = 'Remote image';
|
|
246
|
+
source = linkInfo.href;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
const title = (_b = inlineSourceAction === null || inlineSourceAction === void 0 ? void 0 : inlineSourceAction.title) !== null && _b !== void 0 ? _b : linkInfo.title;
|
|
250
|
+
return (jsx_runtime_1.jsxs("div", { style: imageAssetField, children: [
|
|
251
|
+
jsx_runtime_1.jsx("button", { "aria-label": `Replace ${name}`, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, disabled: window.remotion_isReadOnlyStudio, onClick: openAssetSelection, style: thumbnailButton, title: title, type: "button", children: jsx_runtime_1.jsx("img", { alt: "", src: previewSrc, style: thumbnail }) }), jsx_runtime_1.jsxs("button", { "aria-label": `Replace ${name}`, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, disabled: window.remotion_isReadOnlyStudio, onClick: openAssetSelection, style: imageAssetInfo, title: title, type: "button", children: [
|
|
252
|
+
jsx_runtime_1.jsx("span", { style: imageAssetName, children: name }), jsx_runtime_1.jsx("span", { style: imageAssetSource, children: source })
|
|
253
|
+
] }), action] }));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
121
256
|
if (inlineSourceAction === null) {
|
|
122
257
|
return action;
|
|
123
258
|
}
|
|
124
259
|
return (jsx_runtime_1.jsxs("div", { style: sourceActions, children: [
|
|
125
|
-
jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction,
|
|
260
|
+
jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction, disabled: assetType === undefined
|
|
261
|
+
? inlineSourceAction.disabled
|
|
262
|
+
: window.remotion_isReadOnlyStudio, onClick: assetType === undefined
|
|
263
|
+
? inlineSourceAction.onClick
|
|
264
|
+
: openAssetSelection, size: "compact", style: standaloneSourceActionStyle }), action] }));
|
|
126
265
|
};
|
|
127
266
|
exports.TimelineAssetField = TimelineAssetField;
|
|
@@ -279,8 +279,7 @@ const TimelineDragHandlerInner = () => {
|
|
|
279
279
|
captureTarget: dragging.target,
|
|
280
280
|
onMove: onPointerMoveScrubbing,
|
|
281
281
|
onEnd: (reason, endEvent) => {
|
|
282
|
-
if ((
|
|
283
|
-
endEvent) {
|
|
282
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
284
283
|
onPointerUpScrubbing(endEvent);
|
|
285
284
|
}
|
|
286
285
|
else {
|
|
@@ -13,6 +13,7 @@ export declare const TimelineEffectItem: React.FC<{
|
|
|
13
13
|
readonly validatedLocation: CodePosition;
|
|
14
14
|
readonly rowDepth: number;
|
|
15
15
|
readonly labelNextToToggle: boolean;
|
|
16
|
+
readonly revealInInspector: boolean;
|
|
16
17
|
readonly getIsExpanded: GetIsExpanded;
|
|
17
18
|
readonly toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
|
|
18
19
|
}>;
|
|
@@ -75,7 +75,7 @@ const getEffectReorderDragData = (dataTransfer) => {
|
|
|
75
75
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
76
76
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
77
77
|
};
|
|
78
|
-
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, getIsExpanded, toggleTrack, }) => {
|
|
78
|
+
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, revealInInspector, getIsExpanded, toggleTrack, }) => {
|
|
79
79
|
var _a;
|
|
80
80
|
var _b;
|
|
81
81
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -83,7 +83,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
83
83
|
const canMutateEffects = (0, browser_studio_operations_1.canUseEffectOperations)();
|
|
84
84
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
85
85
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
86
|
-
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
86
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo, revealInInspector);
|
|
87
87
|
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
88
88
|
const [dropIndicator, setDropIndicator] = (0, react_1.useState)(null);
|
|
89
89
|
const effectStatus = (0, react_1.useMemo)(() => remotion_1.Internals.getEffectPropStatusesCtx({
|
|
@@ -19,5 +19,6 @@ export declare const TimelineEffectPropItem: React.FC<{
|
|
|
19
19
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
20
20
|
readonly keyframeDisplayOffset: number;
|
|
21
21
|
readonly keyframeControlsMode: TimelineKeyframeControlsMode;
|
|
22
|
+
readonly revealInInspector: boolean;
|
|
22
23
|
readonly runtimeValueStore: RuntimeValueStore | null;
|
|
23
24
|
}>;
|
|
@@ -232,7 +232,7 @@ const TimelineEffectPropValueAtCurrentFrame = ({ field, nodePath, validatedLocat
|
|
|
232
232
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
233
233
|
return (jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: timelinePosition - keyframeDisplayOffset, runtimeValueStore: runtimeValueStore }));
|
|
234
234
|
};
|
|
235
|
-
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode, runtimeValueStore, }) => {
|
|
235
|
+
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode, revealInInspector, runtimeValueStore, }) => {
|
|
236
236
|
var _a;
|
|
237
237
|
var _b;
|
|
238
238
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -240,7 +240,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
240
240
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
241
241
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
242
242
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
243
|
-
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
243
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo, revealInInspector);
|
|
244
244
|
const style = (0, react_1.useMemo)(() => {
|
|
245
245
|
return field.typeName === 'text-content'
|
|
246
246
|
? fieldRowBase
|
|
@@ -40,7 +40,7 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
40
40
|
if (node.effectInfo) {
|
|
41
41
|
return (
|
|
42
42
|
// A single effect
|
|
43
|
-
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, labelNextToToggle: isInspector, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
43
|
+
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, labelNextToToggle: isInspector, revealInInspector: !isInspector, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
44
44
|
}
|
|
45
45
|
// Group like "Effects"
|
|
46
46
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
@@ -50,7 +50,7 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
50
50
|
}
|
|
51
51
|
if (node.field) {
|
|
52
52
|
if (node.field.kind === 'effect-field') {
|
|
53
|
-
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: isInspector ? rowDepth - 1 : rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValueStore: node.runtimeValueStore }));
|
|
53
|
+
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: isInspector ? rowDepth - 1 : rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, revealInInspector: !isInspector, runtimeValueStore: node.runtimeValueStore }));
|
|
54
54
|
}
|
|
55
55
|
if (node.field.kind === 'sequence-field') {
|
|
56
56
|
return (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequencePropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValue: node.runtimeValue }));
|
|
@@ -279,8 +279,7 @@ const TimelineInOutDragHandlerInner = () => {
|
|
|
279
279
|
captureTarget: inOutDragging.target,
|
|
280
280
|
onMove: onPointerMoveInOut,
|
|
281
281
|
onEnd: (reason, endEvent) => {
|
|
282
|
-
if ((
|
|
283
|
-
endEvent) {
|
|
282
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
284
283
|
onPointerUpInOut(endEvent);
|
|
285
284
|
}
|
|
286
285
|
else {
|
|
@@ -47,6 +47,8 @@ const unsupportedStatusWrapper = {
|
|
|
47
47
|
alignItems: 'center',
|
|
48
48
|
display: 'inline-flex',
|
|
49
49
|
gap: 4,
|
|
50
|
+
maxWidth: '100%',
|
|
51
|
+
minWidth: 0,
|
|
50
52
|
userSelect: 'none',
|
|
51
53
|
WebkitUserSelect: 'none',
|
|
52
54
|
};
|
|
@@ -62,7 +64,11 @@ const computedValue = {
|
|
|
62
64
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
63
65
|
fontSize: 12,
|
|
64
66
|
lineHeight: '18px',
|
|
67
|
+
minWidth: 0,
|
|
68
|
+
overflow: 'hidden',
|
|
65
69
|
pointerEvents: 'none',
|
|
70
|
+
textOverflow: 'ellipsis',
|
|
71
|
+
whiteSpace: 'nowrap',
|
|
66
72
|
};
|
|
67
73
|
const fixLinkBase = {
|
|
68
74
|
...(0, hoverable_1.hoverableStyle)({
|
|
@@ -72,6 +78,7 @@ const fixLinkBase = {
|
|
|
72
78
|
hoverColor: colors_1.WHITE,
|
|
73
79
|
}),
|
|
74
80
|
display: 'inline-block',
|
|
81
|
+
flexShrink: 0,
|
|
75
82
|
fontSize: 10,
|
|
76
83
|
fontStyle: 'normal',
|
|
77
84
|
fontWeight: 600,
|
|
@@ -101,7 +108,7 @@ const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
|
101
108
|
const stopPointerPropagation = (event) => {
|
|
102
109
|
event.stopPropagation();
|
|
103
110
|
};
|
|
104
|
-
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
111
|
+
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), title: formattedValue && typeof label === 'string' ? label : undefined, children: [
|
|
105
112
|
jsx_runtime_1.jsx("span", { style: formattedValue ? computedValue : unsupportedLabel, inert: formattedValue, children: label }), onFix ? (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME} ${hoverable_1.HOVERABLE_CLASS_NAME}`, style: fixLink, title: "Fix computed Studio value", onClick: (event) => {
|
|
106
113
|
stopMousePropagation(event);
|
|
107
114
|
onFix();
|
|
@@ -91,6 +91,7 @@ export declare const extendTimelineMarqueeSelection: ({ currentSelection, marque
|
|
|
91
91
|
}) => readonly CanvasSelectionItem[];
|
|
92
92
|
type TimelineSelectionContextValue = {
|
|
93
93
|
readonly canSelect: boolean;
|
|
94
|
+
readonly inspectorRevealRequest: TimelineSelectionRevealRequest | null;
|
|
94
95
|
readonly revealRequest: TimelineSelectionRevealRequest | null;
|
|
95
96
|
readonly selectedItems: readonly TimelineSelection[];
|
|
96
97
|
readonly isSelected: (item: TimelineSelection) => boolean;
|
|
@@ -111,6 +112,7 @@ export declare const TimelineSelectionOrderProvider: React.FC<{
|
|
|
111
112
|
}>;
|
|
112
113
|
type TimelineSelectionOptions = {
|
|
113
114
|
readonly reveal?: boolean;
|
|
115
|
+
readonly revealInInspector?: boolean;
|
|
114
116
|
};
|
|
115
117
|
type TimelineSelectionRevealRequest = {
|
|
116
118
|
readonly item: TimelineSelection;
|
|
@@ -152,7 +154,7 @@ export declare const useTimelineMarqueeSelection: () => {
|
|
|
152
154
|
onPointerDownCapture: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
153
155
|
};
|
|
154
156
|
export declare const useTimelineMarqueeSelectableItem: (item: CanvasSelectionItem | null, ref: React.RefObject<Element | null>) => void;
|
|
155
|
-
export declare const useTimelineRowSelection: (nodePathInfo: SequenceNodePathInfo | null) => {
|
|
157
|
+
export declare const useTimelineRowSelection: (nodePathInfo: SequenceNodePathInfo | null, revealInInspector?: boolean) => {
|
|
156
158
|
onSelect: (interaction?: CanvasSelectionInteraction | undefined) => void;
|
|
157
159
|
selectable: boolean;
|
|
158
160
|
selectionItem: CanvasSelectionItem | null;
|