@remotion/studio 4.0.525 → 4.0.526
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/api/focus-default-props-path.js +7 -1
- package/dist/api/restart-studio.d.ts +1 -1
- package/dist/api/restart-studio.js +1 -1
- package/dist/components/AgentPrompt.d.ts +6 -0
- package/dist/components/AgentPrompt.js +107 -0
- package/dist/components/AssetFileIcon.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +1 -23
- package/dist/components/AssetSelectorItem.js +10 -200
- package/dist/components/Canvas.js +21 -18
- package/dist/components/CaptionInspector.js +9 -3
- package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
- package/dist/components/CodeFrame.js +77 -0
- package/dist/components/CompositionSelectorItem.js +6 -17
- package/dist/components/CurrentAsset.js +5 -4
- package/dist/components/ElementInstallConfirmation.js +69 -38
- package/dist/components/FilePreview.js +4 -0
- package/dist/components/FixComputedValueModal.js +64 -96
- package/dist/components/GenerateWithAgentModal.d.ts +9 -0
- package/dist/components/GenerateWithAgentModal.js +39 -0
- package/dist/components/InlineEditableTitle.js +2 -0
- package/dist/components/InspectorOpenInEditor.js +8 -4
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +19 -8
- package/dist/components/InspectorPanel/CompositionInspector.js +30 -13
- package/dist/components/InspectorPanel/CompositionMetadata.js +3 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/GuideInspector.js +2 -3
- package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
- package/dist/components/InspectorPanel/common.d.ts +4 -0
- package/dist/components/InspectorPanel/common.js +14 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +1 -27
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +15 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
- package/dist/components/InspectorSequenceSection.js +44 -35
- package/dist/components/InspectorSourceLocation.js +1 -0
- package/dist/components/KeyboardShortcutsSettings.js +12 -4
- package/dist/components/LutPreview.d.ts +4 -0
- package/dist/components/LutPreview.js +192 -0
- package/dist/components/MenuCompositionName.js +4 -9
- package/dist/components/Modals.js +3 -6
- package/dist/components/ModelsSettings.js +15 -4
- package/dist/components/Notifications/NotificationCenter.d.ts +0 -1
- package/dist/components/Notifications/NotificationCenter.js +1 -22
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
- package/dist/components/RenderModal/WebRenderModal.js +10 -2
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineElement.js +6 -0
- package/dist/components/SettingsButton.js +11 -2
- package/dist/components/SettingsModal.d.ts +1 -2
- package/dist/components/SettingsModal.js +24 -6
- package/dist/components/SettingsModalFooter.js +17 -3
- package/dist/components/SkillsSettings.d.ts +5 -0
- package/dist/components/SkillsSettings.js +29 -26
- package/dist/components/Timeline/Timeline.js +10 -11
- package/dist/components/Timeline/TimelineAssetField.js +81 -51
- package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +15 -1
- package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
- package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
- package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +6 -3
- package/dist/components/Timeline/TimelineList.js +9 -3
- package/dist/components/Timeline/TimelineSchemaField.js +2 -6
- package/dist/components/Timeline/TimelineSelection.d.ts +14 -3
- package/dist/components/Timeline/TimelineSelection.js +91 -49
- package/dist/components/Timeline/TimelineSequence.js +2 -2
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +17 -13
- package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +130 -45
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
- package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
- package/dist/components/Timeline/timeline-display-groups.js +66 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +21 -21
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
- package/dist/components/UpdateStatusContext.d.ts +2 -2
- package/dist/components/UpdateStatusContext.js +6 -7
- package/dist/components/UpdatesSettings.js +6 -6
- package/dist/components/WebMcp.js +40 -41
- package/dist/components/asset-context-menu.d.ts +32 -0
- package/dist/components/asset-context-menu.js +242 -0
- package/dist/components/composition-menu-items.d.ts +4 -6
- package/dist/components/composition-menu-items.js +191 -75
- package/dist/components/get-open-in-menu-items.d.ts +6 -5
- package/dist/components/get-open-in-menu-items.js +15 -9
- package/dist/components/selected-outline-order.js +18 -12
- package/dist/components/use-open-in-menu-apps.d.ts +14 -0
- package/dist/components/use-open-in-menu-apps.js +33 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
- package/dist/esm/{LazyModels-gfmpcy4h.mjs → LazyModels-mtggyjye.mjs} +3 -3
- package/dist/esm/{LazyModels-m1rf06wh.mjs → LazyModels-nk7py0zt.mjs} +3 -3
- package/dist/esm/{TranscriptionModal-8pvrehg4.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
- package/dist/esm/{VideoMattingModal-fefbzgka.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
- package/dist/esm/{index-s848rffx.mjs → index-0gewwxse.mjs} +5330 -4668
- package/dist/esm/{index-tzxb8808.mjs → index-4dsz9035.mjs} +8 -8
- package/dist/esm/{index-hbezgbbq.mjs → index-5bfxbpca.mjs} +1 -1
- package/dist/esm/{index-vsxrxfpj.mjs → index-5gd8k9yv.mjs} +1 -1
- package/dist/esm/{index-ggqpre9v.mjs → index-bs39wngg.mjs} +4216 -3571
- package/dist/esm/{index-0x13f28h.mjs → index-cdy8v54v.mjs} +1 -1
- package/dist/esm/{index-41kqns5c.mjs → index-eb5txqp6.mjs} +8 -7
- package/dist/esm/{index-1089795y.mjs → index-f97r9e2g.mjs} +4 -21
- package/dist/esm/{index-jrw61pkj.mjs → index-g7k2dvar.mjs} +1 -1
- package/dist/esm/{index-mww32xc8.mjs → index-x40wwfmt.mjs} +3 -3
- package/dist/esm/index.mjs +12 -6
- package/dist/esm/internals.mjs +7 -7
- package/dist/esm/previewEntry.mjs +7 -7
- package/dist/helpers/client-id.d.ts +1 -0
- package/dist/helpers/client-id.js +8 -4
- package/dist/helpers/cube-lut.d.ts +12 -0
- package/dist/helpers/cube-lut.js +160 -0
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +3 -0
- package/dist/helpers/open-in-editor.d.ts +5 -2
- package/dist/helpers/open-in-editor.js +12 -4
- package/dist/helpers/settings-tab-availability.d.ts +14 -0
- package/dist/helpers/settings-tab-availability.js +35 -0
- package/dist/helpers/use-menu-structure.js +16 -12
- package/dist/icons/lut.d.ts +4 -0
- package/dist/icons/lut.js +6 -0
- package/dist/icons/sparkles.d.ts +4 -0
- package/dist/icons/sparkles.js +6 -0
- package/dist/state/modals.d.ts +12 -2
- package/package.json +19 -19
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.QuickSwitcherResult = exports.isQuickSwitcherResultSelectable = 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");
|
|
7
6
|
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const noop_1 = require("../../helpers/noop");
|
|
9
8
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
@@ -17,7 +16,7 @@ const composition_menu_items_1 = require("../composition-menu-items");
|
|
|
17
16
|
const ContextMenu_1 = require("../ContextMenu");
|
|
18
17
|
const layout_1 = require("../layout");
|
|
19
18
|
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
20
|
-
const
|
|
19
|
+
const use_open_in_menu_apps_1 = require("../use-open-in-menu-apps");
|
|
21
20
|
const shared_1 = require("./shared");
|
|
22
21
|
const isQuickSwitcherResultSelectable = (result) => {
|
|
23
22
|
return result.type !== 'folder';
|
|
@@ -67,9 +66,7 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
67
66
|
const onSelected = result.type === 'folder' ? null : result.onSelected;
|
|
68
67
|
const composition = result.type === 'composition' ? result.composition : null;
|
|
69
68
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
70
|
-
const connectionStatus = (0,
|
|
71
|
-
.previewServerState.type;
|
|
72
|
-
const { defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
|
|
69
|
+
const { connectionStatus, openInApps } = (0, use_open_in_menu_apps_1.useOpenInMenuApps)();
|
|
73
70
|
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)((_a = composition === null || composition === void 0 ? void 0 : composition.stack) !== null && _a !== void 0 ? _a : null);
|
|
74
71
|
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
75
72
|
if (composition === null) {
|
|
@@ -79,9 +76,8 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
79
76
|
closeMenu: noop_1.noop,
|
|
80
77
|
composition,
|
|
81
78
|
connectionStatus,
|
|
82
|
-
editorId: defaultEditorId,
|
|
83
|
-
editorName: defaultEditorName,
|
|
84
79
|
includeCompositionManagementItems: true,
|
|
80
|
+
openInApps,
|
|
85
81
|
resolvedLocation,
|
|
86
82
|
setSelectedModal,
|
|
87
83
|
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
@@ -89,8 +85,7 @@ const QuickSwitcherResult = ({ result, selected }) => {
|
|
|
89
85
|
}, [
|
|
90
86
|
composition,
|
|
91
87
|
connectionStatus,
|
|
92
|
-
|
|
93
|
-
defaultEditorName,
|
|
88
|
+
openInApps,
|
|
94
89
|
resolvedLocation,
|
|
95
90
|
setSelectedModal,
|
|
96
91
|
]);
|
|
@@ -2,3 +2,4 @@ import React from 'react';
|
|
|
2
2
|
export declare const DEFAULT_PROPS_PATH_CLASSNAME = "__remotion-default-props-editor-label";
|
|
3
3
|
export declare const DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME = "__remotion-default-props-editor-label-active";
|
|
4
4
|
export declare const defaultPropsEditorScrollableAreaRef: React.RefObject<HTMLDivElement | null>;
|
|
5
|
+
export declare const expandDefaultPropsEditorRef: React.RefObject<((onExpanded: () => void) => void) | null>;
|
|
@@ -3,8 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.defaultPropsEditorScrollableAreaRef = exports.DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME = exports.DEFAULT_PROPS_PATH_CLASSNAME = void 0;
|
|
6
|
+
exports.expandDefaultPropsEditorRef = exports.defaultPropsEditorScrollableAreaRef = exports.DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME = exports.DEFAULT_PROPS_PATH_CLASSNAME = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
exports.DEFAULT_PROPS_PATH_CLASSNAME = '__remotion-default-props-editor-label';
|
|
9
9
|
exports.DEFAULT_PROPS_PATH_ACTIVE_CLASSNAME = '__remotion-default-props-editor-label-active';
|
|
10
10
|
exports.defaultPropsEditorScrollableAreaRef = react_1.default.createRef();
|
|
11
|
+
exports.expandDefaultPropsEditorRef = react_1.default.createRef();
|
|
@@ -7,6 +7,8 @@ const web_renderer_1 = require("@remotion/web-renderer");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const ShortcutHint_1 = require("../../error-overlay/remotion-overlay/ShortcutHint");
|
|
9
9
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
10
|
+
const client_id_1 = require("../../helpers/client-id");
|
|
11
|
+
const settings_tab_availability_1 = require("../../helpers/settings-tab-availability");
|
|
10
12
|
const audio_1 = require("../../icons/audio");
|
|
11
13
|
const certificate_1 = require("../../icons/certificate");
|
|
12
14
|
const file_1 = require("../../icons/file");
|
|
@@ -86,6 +88,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
86
88
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
87
89
|
const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
88
90
|
const { addClientStillJob, addClientVideoJob } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
91
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
89
92
|
if (!context) {
|
|
90
93
|
throw new Error('Should not be able to render without resolving comp first');
|
|
91
94
|
}
|
|
@@ -107,6 +110,11 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
107
110
|
: 'still');
|
|
108
111
|
const [tab, setTab] = (0, react_1.useState)('general');
|
|
109
112
|
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
113
|
+
const canEditConfig = (0, settings_tab_availability_1.canEditStudioConfig)({
|
|
114
|
+
isBrowserStudio,
|
|
115
|
+
previewServerConnected: previewServerState.type === 'connected',
|
|
116
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
117
|
+
});
|
|
110
118
|
const [imageFormat, setImageFormat] = (0, react_1.useState)(() => initialStillImageFormat !== null && initialStillImageFormat !== void 0 ? initialStillImageFormat : 'png');
|
|
111
119
|
const [frame, setFrame] = (0, react_1.useState)(() => initialFrame);
|
|
112
120
|
const [logLevel, setLogLevel] = (0, react_1.useState)(() => initialLogLevel);
|
|
@@ -420,11 +428,11 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
|
|
|
420
428
|
jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsxs(Button_1.Button, { autoFocus: true, onClick: onAddToQueue, style: render_modals_1.buttonStyle, disabled: !outnameValidation.valid, children: ["Render ", renderMode, jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })
|
|
421
429
|
] })
|
|
422
430
|
] }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
423
|
-
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(file_1.FileIcon, { color: color, style: render_modals_1.icon }) })), children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(input_props_1.InputPropsIcon, { color: color, style: render_modals_1.icon }) })), children: "Input Props" }), renderMode !== 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: render_modals_1.icon }) })), children: "Picture" })) : null, renderMode === 'video' || renderMode === 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(audio_1.AudioIcon, { color: color, style: render_modals_1.icon }) })), children: "Audio" })) : null, jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Other" }),
|
|
431
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(file_1.FileIcon, { color: color, style: render_modals_1.icon }) })), children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(input_props_1.InputPropsIcon, { color: color, style: render_modals_1.icon }) })), children: "Input Props" }), renderMode !== 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: render_modals_1.icon }) })), children: "Picture" })) : null, renderMode === 'video' || renderMode === 'audio' ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(audio_1.AudioIcon, { color: color, style: render_modals_1.icon }) })), children: "Audio" })) : null, jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Other" }), canEditConfig ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: false, onClick: () => setSelectedModal({
|
|
424
432
|
type: 'settings',
|
|
425
433
|
initialTab: 'license',
|
|
426
434
|
initialPublicLicenseKey: publicLicenseKey,
|
|
427
|
-
}), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { color: color, style: render_modals_1.icon }) })), children: "License" }))] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, setCodec: setCodecWithContainer, encodableVideoCodecs: encodableVideoCodecs, effectiveVideoCodec: effectiveVideoCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
|
|
435
|
+
}), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(certificate_1.CertificateIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })) : null] }), jsx_runtime_1.jsx("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? (jsx_runtime_1.jsx(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, setCodec: setCodecWithContainer, encodableVideoCodecs: encodableVideoCodecs, effectiveVideoCodec: effectiveVideoCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, propsEditType: "input-props", canSaveDefaultProps: {
|
|
428
436
|
canUpdate: false,
|
|
429
437
|
reason: 'render dialogue',
|
|
430
438
|
determined: false,
|
|
@@ -14,6 +14,7 @@ const row = {
|
|
|
14
14
|
color: 'inherit',
|
|
15
15
|
alignItems: 'center',
|
|
16
16
|
flex: 1,
|
|
17
|
+
userSelect: 'none',
|
|
17
18
|
};
|
|
18
19
|
const badge = {
|
|
19
20
|
height: 16,
|
|
@@ -23,6 +24,7 @@ const badge = {
|
|
|
23
24
|
display: 'inline-flex',
|
|
24
25
|
justifyContent: 'center',
|
|
25
26
|
alignItems: 'center',
|
|
27
|
+
userSelect: 'none',
|
|
26
28
|
};
|
|
27
29
|
const RendersTab = ({ selected, onClick }) => {
|
|
28
30
|
const { jobs, captionJobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
@@ -140,6 +140,8 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
140
140
|
selectComposition,
|
|
141
141
|
]);
|
|
142
142
|
const onContextMenuOpen = react_1.default.useCallback(async () => {
|
|
143
|
+
var _a;
|
|
144
|
+
var _b;
|
|
143
145
|
const contextMenuTarget = getTarget();
|
|
144
146
|
if (contextMenuTarget === undefined) {
|
|
145
147
|
return false;
|
|
@@ -170,10 +172,14 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
170
172
|
previewServerState.type === 'connected';
|
|
171
173
|
const canCrop = contextMenuTarget.canCrop && !sourceEditDisabled;
|
|
172
174
|
const canRotate = !sourceEditDisabled;
|
|
175
|
+
const outlineElement = (_b = (_a = contextMenuTarget.sequence.refForOutline) === null || _a === void 0 ? void 0 : _a.current) !== null && _b !== void 0 ? _b : null;
|
|
173
176
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
174
177
|
assetLinkInfo,
|
|
175
178
|
canOpenInEditor,
|
|
176
179
|
codingAgentInfo,
|
|
180
|
+
copyImageElement: contextMenuTarget.sequence.type === 'image'
|
|
181
|
+
? outlineElement
|
|
182
|
+
: (0, get_sequence_context_menu_items_1.findCopyableFrameElement)(outlineElement),
|
|
177
183
|
deleteDisabled: sourceEditDisabled,
|
|
178
184
|
disableInteractivityDisabled,
|
|
179
185
|
duplicateDisabled: sourceEditDisabled || isProgrammaticallyDuplicated,
|
|
@@ -4,7 +4,9 @@ exports.SettingsButton = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
|
+
const client_id_1 = require("../helpers/client-id");
|
|
7
8
|
const colors_1 = require("../helpers/colors");
|
|
9
|
+
const settings_tab_availability_1 = require("../helpers/settings-tab-availability");
|
|
8
10
|
const gear_1 = require("../icons/gear");
|
|
9
11
|
const modals_1 = require("../state/modals");
|
|
10
12
|
const ActionTooltip_1 = require("./ActionTooltip");
|
|
@@ -12,11 +14,18 @@ const InlineAction_1 = require("./InlineAction");
|
|
|
12
14
|
const UpdateStatusContext_1 = require("./UpdateStatusContext");
|
|
13
15
|
const SettingsButton = ({ showUpdates }) => {
|
|
14
16
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
17
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
15
18
|
const { info, knownBugs } = (0, UpdateStatusContext_1.useUpdateStatus)();
|
|
16
19
|
const updateAvailable = showUpdates &&
|
|
17
20
|
Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) || (info === null || info === void 0 ? void 0 : info.skillsUpdateAvailable));
|
|
18
21
|
const hasBugfixesAvailable = showUpdates &&
|
|
19
22
|
Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) && knownBugs && knownBugs.length > 0);
|
|
23
|
+
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
24
|
+
const canEditConfig = (0, settings_tab_availability_1.canEditStudioConfig)({
|
|
25
|
+
isBrowserStudio,
|
|
26
|
+
previewServerConnected: previewServerState.type === 'connected',
|
|
27
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
28
|
+
});
|
|
20
29
|
const openModal = (0, react_1.useCallback)(() => {
|
|
21
30
|
var _a;
|
|
22
31
|
var _b;
|
|
@@ -24,12 +33,12 @@ const SettingsButton = ({ showUpdates }) => {
|
|
|
24
33
|
type: 'settings',
|
|
25
34
|
initialTab: updateAvailable
|
|
26
35
|
? 'updates'
|
|
27
|
-
:
|
|
36
|
+
: canEditConfig
|
|
28
37
|
? 'studio'
|
|
29
38
|
: 'shortcuts',
|
|
30
39
|
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
31
40
|
});
|
|
32
|
-
}, [setSelectedModal, updateAvailable]);
|
|
41
|
+
}, [canEditConfig, setSelectedModal, updateAvailable]);
|
|
33
42
|
const renderGearIcon = (0, react_1.useCallback)((color) => {
|
|
34
43
|
return jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, width: 16, height: 16 });
|
|
35
44
|
}, []);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type SettingsTab
|
|
2
|
+
import { type SettingsTab } from '../helpers/settings-tab-availability';
|
|
3
3
|
export declare const SettingsModal: React.FC<{
|
|
4
4
|
readonly initialTab: SettingsTab;
|
|
5
5
|
readonly initialPublicLicenseKey: string | null;
|
|
6
6
|
}>;
|
|
7
|
-
export {};
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
7
|
const can_show_updates_1 = require("../helpers/can-show-updates");
|
|
8
8
|
const client_id_1 = require("../helpers/client-id");
|
|
9
|
+
const settings_tab_availability_1 = require("../helpers/settings-tab-availability");
|
|
9
10
|
const apps_1 = require("../icons/apps");
|
|
10
11
|
const cloud_download_1 = require("../icons/cloud-download");
|
|
11
12
|
const keyboard_1 = require("../icons/keyboard");
|
|
@@ -77,8 +78,20 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
77
78
|
const packageManager = window.remotion_packageManager === 'unknown'
|
|
78
79
|
? null
|
|
79
80
|
: window.remotion_packageManager;
|
|
80
|
-
const
|
|
81
|
-
const
|
|
81
|
+
const previewServerConnected = previewServerState.type === 'connected';
|
|
82
|
+
const canEditConfig = (0, settings_tab_availability_1.canEditStudioConfig)({
|
|
83
|
+
isBrowserStudio,
|
|
84
|
+
previewServerConnected,
|
|
85
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
86
|
+
});
|
|
87
|
+
const availableTabs = (0, react_1.useMemo)(() => (0, settings_tab_availability_1.getAvailableSettingsTabs)({
|
|
88
|
+
isBrowserStudio,
|
|
89
|
+
packageManagerAvailable: packageManager !== null,
|
|
90
|
+
previewServerConnected,
|
|
91
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
92
|
+
showUpdates,
|
|
93
|
+
}), [isBrowserStudio, packageManager, previewServerConnected, showUpdates]);
|
|
94
|
+
const safeInitialTab = (0, settings_tab_availability_1.getSafeSettingsTab)(initialTab, availableTabs);
|
|
82
95
|
const [tab, setTab] = (0, react_1.useState)(safeInitialTab);
|
|
83
96
|
const [openedTabs, setOpenedTabs] = (0, react_1.useState)([safeInitialTab]);
|
|
84
97
|
const [packagesFooterContainer, setPackagesFooterContainer] = (0, react_1.useState)(null);
|
|
@@ -95,16 +108,21 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
95
108
|
});
|
|
96
109
|
}, []);
|
|
97
110
|
(0, react_1.useLayoutEffect)(() => {
|
|
98
|
-
|
|
99
|
-
|
|
111
|
+
const safeTab = (0, settings_tab_availability_1.getSafeSettingsTab)(tab, availableTabs);
|
|
112
|
+
if (safeTab !== tab) {
|
|
113
|
+
selectTab(safeTab);
|
|
100
114
|
}
|
|
101
|
-
}, [
|
|
115
|
+
}, [availableTabs, selectTab, tab]);
|
|
102
116
|
(0, react_1.useEffect)(() => {
|
|
103
117
|
setPublicLicenseKey(initialPublicLicenseKey);
|
|
104
118
|
}, [initialPublicLicenseKey, setPublicLicenseKey]);
|
|
105
119
|
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
106
120
|
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: [
|
|
121
|
+
jsx_runtime_1.jsxs("div", { style: settingsLeftSidebar, children: [availableTabs.includes('studio') ? (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" })) : null, availableTabs.includes('rendering') ? (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" })) : null, 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" }), availableTabs.includes('packages') ? (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, availableTabs.includes('skills') ? (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" })) : null, availableTabs.includes('models') ? (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" })) : null, availableTabs.includes('apps') ? (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" })) : null, availableTabs.includes('license') ? (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" })) : null, availableTabs.includes('updates') ? (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] }), availableTabs.includes('packages') &&
|
|
122
|
+
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, availableTabs.includes('apps') && 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, availableTabs.includes('models') && 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, availableTabs.includes('license') &&
|
|
123
|
+
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, availableTabs.includes('skills') && 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, availableTabs.includes('rendering') &&
|
|
124
|
+
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, availableTabs.includes('studio') && 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, availableTabs.includes('updates') &&
|
|
125
|
+
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 })) : !canEditConfig ||
|
|
108
126
|
tab === 'models' ||
|
|
109
127
|
tab === 'updates' ||
|
|
110
128
|
tab === 'skills' ? null : (jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { showLicenseFaq: tab === 'license' }))] }) }));
|
|
@@ -3,17 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SettingsModalFooter = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const restart_studio_1 = require("../api/restart-studio");
|
|
7
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
8
|
const colors_1 = require("../helpers/colors");
|
|
7
9
|
const InspectorOpenInEditor_1 = require("./InspectorOpenInEditor");
|
|
8
10
|
const common_1 = require("./InspectorPanel/common");
|
|
9
11
|
const layout_1 = require("./layout");
|
|
12
|
+
const ModalButton_1 = require("./ModalButton");
|
|
10
13
|
const ModalFooter_1 = require("./ModalFooter");
|
|
14
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
11
15
|
const footer = {
|
|
12
16
|
flex: 'none',
|
|
13
17
|
};
|
|
14
18
|
const footerRow = {
|
|
15
19
|
alignItems: 'center',
|
|
16
20
|
display: 'flex',
|
|
21
|
+
height: 28,
|
|
17
22
|
justifyContent: 'space-between',
|
|
18
23
|
};
|
|
19
24
|
const configFileHint = {
|
|
@@ -40,6 +45,8 @@ const externalLinkIndicator = {
|
|
|
40
45
|
width: 12,
|
|
41
46
|
};
|
|
42
47
|
const SettingsModalFooter = ({ showLicenseFaq }) => {
|
|
48
|
+
const { restartRequired } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
49
|
+
const [restarting, setRestarting] = (0, react_1.useState)(false);
|
|
43
50
|
const configFileLocation = (0, react_1.useMemo)(() => {
|
|
44
51
|
return {
|
|
45
52
|
source: 'remotion.config.ts',
|
|
@@ -50,10 +57,17 @@ const SettingsModalFooter = ({ showLicenseFaq }) => {
|
|
|
50
57
|
const openLicenseFaq = (0, react_1.useCallback)(() => {
|
|
51
58
|
window.open('https://www.remotion.dev/docs/license/faq', '_blank', 'noopener,noreferrer');
|
|
52
59
|
}, []);
|
|
60
|
+
const restart = (0, react_1.useCallback)(() => {
|
|
61
|
+
setRestarting(true);
|
|
62
|
+
(0, restart_studio_1.restartStudio)().catch((error) => {
|
|
63
|
+
setRestarting(false);
|
|
64
|
+
(0, NotificationCenter_1.showNotification)(`Could not restart Studio: ${error.message}`, 4000);
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
53
67
|
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsxs("div", { style: footerRow, children: [
|
|
54
|
-
jsx_runtime_1.
|
|
55
|
-
|
|
56
|
-
|
|
68
|
+
jsx_runtime_1.jsx("div", { style: configFileHint, children: restartRequired ? ('Restart the server to apply changes') : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["Changes save to",
|
|
69
|
+
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 })
|
|
70
|
+
] })) }), restartRequired ? (jsx_runtime_1.jsx(ModalButton_1.ModalButton, { disabled: restarting, onClick: restart, size: "compact", title: "Restart Studio to apply config file changes", children: restarting ? 'Restarting...' : 'Restart Studio' })) : 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
71
|
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
72
|
] })) : null] }) }));
|
|
59
73
|
};
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import type { GetRemotionSkillsInfoResponse } from '@remotion/studio-shared';
|
|
1
2
|
import React from 'react';
|
|
3
|
+
export declare const SkillSettingsRow: React.FC<{
|
|
4
|
+
readonly isLast: boolean;
|
|
5
|
+
readonly skill: GetRemotionSkillsInfoResponse['skills'][number];
|
|
6
|
+
}>;
|
|
2
7
|
export declare const SkillsSettings: React.FC;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SkillsSettings = void 0;
|
|
3
|
+
exports.SkillsSettings = exports.SkillSettingsRow = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const client_id_1 = require("../helpers/client-id");
|
|
@@ -107,9 +107,35 @@ const loading = {
|
|
|
107
107
|
...description,
|
|
108
108
|
marginTop: 14,
|
|
109
109
|
};
|
|
110
|
+
const SkillSettingsRow = ({ isLast, skill }) => {
|
|
111
|
+
const { installSkill, removeSkill, skillAction } = (0, SettingsContext_1.useSettings)();
|
|
112
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
113
|
+
const canInstall = !window.remotion_isReadOnlyStudio &&
|
|
114
|
+
previewServerState.type === 'connected';
|
|
115
|
+
const installed = skill.installedInProject || skill.installedGlobally;
|
|
116
|
+
const processingThisSkill = (skillAction === null || skillAction === void 0 ? void 0 : skillAction.skill) === skill.name;
|
|
117
|
+
const installedLocation = skill.installedInProject && skill.installedGlobally
|
|
118
|
+
? 'Project and global'
|
|
119
|
+
: skill.installedInProject
|
|
120
|
+
? 'Project'
|
|
121
|
+
: skill.installedGlobally
|
|
122
|
+
? 'Global'
|
|
123
|
+
: null;
|
|
124
|
+
const renderInstallAction = (0, react_1.useCallback)((color) => {
|
|
125
|
+
return jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIcon });
|
|
126
|
+
}, []);
|
|
127
|
+
const renderRemoveAction = (0, react_1.useCallback)((color) => {
|
|
128
|
+
return jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: actionIcon });
|
|
129
|
+
}, []);
|
|
130
|
+
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: isLast ? lastSkillRow : skillRow, children: [
|
|
131
|
+
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), processingThisSkill ? (jsx_runtime_1.jsx("span", { style: status, children: skillAction.type === 'installing' ? 'Installing…' : '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
|
|
132
|
+
? `Remove ${skill.name} from this project`
|
|
133
|
+
: `Remove ${skill.name} globally`, disabled: skillAction !== null, onClick: () => removeSkill(skill.name), renderAction: renderRemoveAction, variant: null })) : canInstall ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: `Install ${skill.name} in this project`, disabled: skillAction !== null, onClick: () => installSkill(skill.name), renderAction: renderInstallAction, variant: null })) : null] }));
|
|
134
|
+
};
|
|
135
|
+
exports.SkillSettingsRow = SkillSettingsRow;
|
|
110
136
|
const SkillsSettings = () => {
|
|
111
137
|
var _a;
|
|
112
|
-
const { error, remotionSkillsInfo,
|
|
138
|
+
const { error, remotionSkillsInfo, skillActionError } = (0, SettingsContext_1.useSettings)();
|
|
113
139
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
114
140
|
const canInstall = !window.remotion_isReadOnlyStudio &&
|
|
115
141
|
previewServerState.type === 'connected';
|
|
@@ -129,35 +155,12 @@ const SkillsSettings = () => {
|
|
|
129
155
|
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
130
156
|
return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: color, style: copyIcon });
|
|
131
157
|
}, [copied]);
|
|
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
158
|
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: [
|
|
140
159
|
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: [
|
|
141
160
|
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" })
|
|
142
161
|
] })
|
|
143
162
|
] })) : null, remotionSkillsInfo ? (jsx_runtime_1.jsx("div", { style: list, role: "list", "aria-label": "Remotion Agent Skills", children: remotionSkillsInfo.skills.map((skill, index) => {
|
|
144
|
-
|
|
145
|
-
const processingThisSkill = (skillAction === null || skillAction === void 0 ? void 0 : skillAction.skill) === skill.name;
|
|
146
|
-
const installedLocation = skill.installedInProject && skill.installedGlobally
|
|
147
|
-
? 'Project and global'
|
|
148
|
-
: skill.installedInProject
|
|
149
|
-
? 'Project'
|
|
150
|
-
: skill.installedGlobally
|
|
151
|
-
? 'Global'
|
|
152
|
-
: null;
|
|
153
|
-
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: index === remotionSkillsInfo.skills.length - 1
|
|
154
|
-
? lastSkillRow
|
|
155
|
-
: skillRow, 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));
|
|
163
|
+
return (jsx_runtime_1.jsx(exports.SkillSettingsRow, { isLast: index === remotionSkillsInfo.skills.length - 1, skill: skill }, skill.name));
|
|
161
164
|
}) })) : null] }));
|
|
162
165
|
};
|
|
163
166
|
exports.SkillsSettings = SkillsSettings;
|
|
@@ -47,7 +47,6 @@ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
|
47
47
|
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
48
48
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
49
49
|
const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
|
|
50
|
-
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
51
50
|
const use_sync_external_store_1 = require("../../helpers/use-sync-external-store");
|
|
52
51
|
const call_api_1 = require("../call-api");
|
|
53
52
|
const ContextMenu_1 = require("../ContextMenu");
|
|
@@ -62,6 +61,7 @@ const should_show_track_in_timeline_1 = require("./should-show-track-in-timeline
|
|
|
62
61
|
const should_subscribe_to_sequence_props_1 = require("./should-subscribe-to-sequence-props");
|
|
63
62
|
const SubscribeToNodePaths_1 = require("./SubscribeToNodePaths");
|
|
64
63
|
const timeline_asset_drop_context_1 = require("./timeline-asset-drop-context");
|
|
64
|
+
const timeline_display_groups_1 = require("./timeline-display-groups");
|
|
65
65
|
const timeline_refs_1 = require("./timeline-refs");
|
|
66
66
|
const TimelineDragHandler_1 = require("./TimelineDragHandler");
|
|
67
67
|
const TimelineHeightContainer_1 = require("./TimelineHeightContainer");
|
|
@@ -248,11 +248,11 @@ const TimelineInner = () => {
|
|
|
248
248
|
if (videoConfigIsNull) {
|
|
249
249
|
return [];
|
|
250
250
|
}
|
|
251
|
-
return (0, calculate_timeline_1.calculateTimeline)({
|
|
251
|
+
return (0, timeline_display_groups_1.addTimelineDisplayGroups)((0, calculate_timeline_1.calculateTimeline)({
|
|
252
252
|
sequences,
|
|
253
253
|
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
254
254
|
compositions,
|
|
255
|
-
});
|
|
255
|
+
}));
|
|
256
256
|
}, [
|
|
257
257
|
sequences,
|
|
258
258
|
videoConfigIsNull,
|
|
@@ -277,16 +277,15 @@ const TimelineInner = () => {
|
|
|
277
277
|
// Keep `filtered` complete so a future toggle can show every programmatic
|
|
278
278
|
// instance without recalculating the timeline or losing its instance index.
|
|
279
279
|
const collapsed = (0, react_1.useMemo)(() => {
|
|
280
|
-
const
|
|
280
|
+
const seenDisplayGroups = new Set();
|
|
281
281
|
return filtered.filter((track) => {
|
|
282
|
-
if (track.
|
|
282
|
+
if (track.displayGroup === null) {
|
|
283
283
|
return true;
|
|
284
284
|
}
|
|
285
|
-
|
|
286
|
-
if (seenNodePaths.has(key)) {
|
|
285
|
+
if (seenDisplayGroups.has(track.displayGroup.key)) {
|
|
287
286
|
return false;
|
|
288
287
|
}
|
|
289
|
-
|
|
288
|
+
seenDisplayGroups.add(track.displayGroup.key);
|
|
290
289
|
return true;
|
|
291
290
|
});
|
|
292
291
|
}, [filtered]);
|
|
@@ -294,7 +293,7 @@ const TimelineInner = () => {
|
|
|
294
293
|
const pendingInsertedElementSelection = (0, use_sync_external_store_1.useSyncExternalStore)(inserted_element_selection_1.subscribeToInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection);
|
|
295
294
|
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
296
295
|
const pendingSelectionStart = (0, react_1.useRef)(null);
|
|
297
|
-
const
|
|
296
|
+
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
298
297
|
(0, react_1.useLayoutEffect)(() => {
|
|
299
298
|
var _a;
|
|
300
299
|
if (pendingInsertedElementSelection === null) {
|
|
@@ -342,17 +341,17 @@ const TimelineInner = () => {
|
|
|
342
341
|
if (insertedTrack.nodePathInfo === null) {
|
|
343
342
|
return;
|
|
344
343
|
}
|
|
345
|
-
selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
|
|
344
|
+
currentSelection.current.selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
|
|
346
345
|
(0, inserted_element_selection_1.clearInsertedElementSelection)(pendingInsertedElementSelection);
|
|
347
346
|
if (pendingInsertedElementSelection.notification !== null) {
|
|
348
347
|
(0, NotificationCenter_1.showNotification)(pendingInsertedElementSelection.notification, 3000);
|
|
349
348
|
}
|
|
350
349
|
}, [
|
|
351
350
|
canvasContent,
|
|
351
|
+
currentSelection,
|
|
352
352
|
fastRefreshes,
|
|
353
353
|
layerChildrenValue,
|
|
354
354
|
pendingInsertedElementSelection,
|
|
355
|
-
selectItems,
|
|
356
355
|
timeline,
|
|
357
356
|
]);
|
|
358
357
|
const maxTimelineTracks = (0, studio_runtime_config_1.getStudioMaxTimelineTracks)();
|