@remotion/studio 4.0.505 → 4.0.506
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/install-package.d.ts +2 -3
- package/dist/api/install-package.js +1 -3
- package/dist/api/visual-control.d.ts +3 -0
- package/dist/api/visual-control.js +3 -0
- package/dist/components/AssetSelectorItem.js +1 -1
- package/dist/components/Canvas.js +2 -0
- package/dist/components/CompositionSelector.js +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -1
- package/dist/components/ConfigureDefaultEditorModal.d.ts +3 -1
- package/dist/components/ConfigureDefaultEditorModal.js +90 -32
- package/dist/components/ConfigureLicenseModal.d.ts +2 -1
- package/dist/components/ConfigureLicenseModal.js +40 -32
- package/dist/components/ConfirmationDialog.js +2 -2
- package/dist/components/Editor.js +2 -0
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/GlobalKeybindings.js +3 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -2
- package/dist/components/InlineDropdown.d.ts +2 -1
- package/dist/components/InlineDropdown.js +10 -4
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +33 -9
- package/dist/components/InspectorPanel/AlignmentControls.js +5 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +15 -1
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +7 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +5 -1
- package/dist/components/InspectorPanel/common.d.ts +1 -0
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/use-composition-actions.js +4 -1
- package/dist/components/InspectorSequenceSection.js +4 -4
- package/dist/components/InstallPackage.js +1 -1
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/MenuToolbar.js +1 -1
- package/dist/components/ModalFooter.d.ts +1 -0
- package/dist/components/ModalFooter.js +6 -2
- package/dist/components/ModalHeader.js +1 -1
- package/dist/components/Modals.js +18 -7
- package/dist/components/ModalsProvider.js +5 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -1
- package/dist/components/NewComposition/DismissableModal.js +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +1 -1
- package/dist/components/OverrideInputProps.js +1 -1
- package/dist/components/PlayPause.js +2 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.js +7 -5
- package/dist/components/PreviewToolbarOverflowButton.js +4 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.d.ts +3 -3
- package/dist/components/RenderButton.js +42 -7
- package/dist/components/RenderModal/RenderStatusModal.js +1 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WebRenderModal.js +3 -2
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -1
- package/dist/components/SelectedOutlineElement.js +1 -1
- package/dist/components/SelectedOutlineOverlay.js +62 -19
- package/dist/components/SettingsModal.d.ts +7 -0
- package/dist/components/SettingsModal.js +50 -0
- package/dist/components/SettingsModalFooter.d.ts +4 -0
- package/dist/components/SettingsModalFooter.js +46 -0
- package/dist/components/SidebarRenderButton.js +1 -1
- package/dist/components/SvgImportDialog.js +2 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -0
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineEffectPropItem.js +5 -3
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +4 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineFontFamilyField.js +3 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineSelection.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +28 -34
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +1 -1
- package/dist/components/Timeline/reset-selected-timeline-props.js +1 -1
- package/dist/components/Timeline/should-subscribe-to-sequence-props.d.ts +1 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +2 -2
- package/dist/components/Timeline/timeline-asset-link.js +2 -2
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +5 -0
- package/dist/components/Timeline/use-timeline-height.js +20 -0
- package/dist/components/TimelineInOutToggle.js +5 -1
- package/dist/components/TopPanel.js +16 -0
- package/dist/components/UpdateCheck.js +1 -1
- package/dist/components/effect-drag-and-drop.js +1 -1
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +12 -2
- package/dist/components/import-assets.d.ts +18 -6
- package/dist/components/import-assets.js +76 -32
- package/dist/esm/{chunk-7pgk8h5m.js → chunk-b49ec3nz.js} +8334 -7701
- package/dist/esm/internals.mjs +8334 -7701
- package/dist/esm/previewEntry.mjs +8343 -7710
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.d.ts +3 -1
- package/dist/helpers/client-id.js +21 -4
- package/dist/helpers/install-required-package.d.ts +3 -3
- package/dist/helpers/install-required-package.js +1 -6
- package/dist/helpers/studio-fit-padding.d.ts +1 -1
- package/dist/helpers/studio-fit-padding.js +1 -1
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -2
- package/dist/helpers/use-menu-structure.js +23 -33
- package/dist/helpers/use-runtime-values.d.ts +11 -0
- package/dist/helpers/use-runtime-values.js +76 -0
- package/dist/icons/apps.d.ts +2 -0
- package/dist/icons/apps.js +7 -0
- package/dist/icons/browse-elements.d.ts +4 -0
- package/dist/icons/browse-elements.js +10 -0
- package/dist/state/modals.d.ts +5 -6
- package/dist/state/modals.js +5 -3
- package/package.json +12 -12
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare const installPackages: (dependencies: (string | ElementDependency)[]) => Promise<InstallPackageResponse>;
|
|
1
|
+
import type { InstallPackageResponse, PackageInstallSpec } from '@remotion/studio-shared';
|
|
2
|
+
export declare const installPackages: (dependencies: readonly PackageInstallSpec[]) => Promise<InstallPackageResponse>;
|
|
@@ -11,9 +11,7 @@ const installPackages = (dependencies) => {
|
|
|
11
11
|
throw new Error('installPackages() is not available in Read-Only Studio');
|
|
12
12
|
}
|
|
13
13
|
return (0, call_api_1.callApi)('/api/install-package', {
|
|
14
|
-
dependencies: dependencies
|
|
15
|
-
? { name: dependency, version: null }
|
|
16
|
-
: dependency),
|
|
14
|
+
dependencies: [...dependencies],
|
|
17
15
|
});
|
|
18
16
|
};
|
|
19
17
|
exports.installPackages = installPackages;
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { type VisualControlRef } from '../visual-controls/VisualControls';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated Remotion Studio now has integrated interactivity for most components, and we will further develop this interactivity rather than visual controls.
|
|
4
|
+
*/
|
|
2
5
|
export declare const visualControl: VisualControlRef['globalVisualControl'];
|
|
@@ -5,6 +5,9 @@ const react_1 = require("react");
|
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const visual_control_store_1 = require("../visual-controls/visual-control-store");
|
|
7
7
|
const VisualControls_1 = require("../visual-controls/VisualControls");
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Remotion Studio now has integrated interactivity for most components, and we will further develop this interactivity rather than visual controls.
|
|
10
|
+
*/
|
|
8
11
|
const visualControl = (key, value, schema) => {
|
|
9
12
|
// Subscribe to store changes so the calling component
|
|
10
13
|
// re-renders when a visual control value is edited in the sidebar.
|
|
@@ -260,7 +260,7 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
|
|
|
260
260
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
261
261
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
262
262
|
const [isDragging, setIsDragging] = (0, react_1.useState)(false);
|
|
263
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
263
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
264
264
|
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
265
265
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
266
266
|
.previewServerState.type;
|
|
@@ -869,6 +869,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
869
869
|
event,
|
|
870
870
|
fps: config.fps,
|
|
871
871
|
from: (0, imperative_state_1.getCurrentFrame)(),
|
|
872
|
+
preferCompositionStart: true,
|
|
872
873
|
});
|
|
873
874
|
}
|
|
874
875
|
finally {
|
|
@@ -966,6 +967,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
966
967
|
destinationDimensions: contentDimensions === 'none' ? null : contentDimensions,
|
|
967
968
|
dropPosition,
|
|
968
969
|
from: null,
|
|
970
|
+
preferCompositionStart: null,
|
|
969
971
|
svgImportMode,
|
|
970
972
|
});
|
|
971
973
|
}
|
|
@@ -87,7 +87,7 @@ const getAutoScrollSpeed = ({ clientY, element, }) => {
|
|
|
87
87
|
const CompositionSelector = () => {
|
|
88
88
|
const { compositions, canvasContent, folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
89
89
|
const { foldersExpanded } = (0, react_1.useContext)(persist_open_folders_1.ExpandedFoldersContext);
|
|
90
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
90
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
91
91
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
92
92
|
.previewServerState.type;
|
|
93
93
|
const getRootContextMenuItems = (0, react_1.useCallback)(() => {
|
|
@@ -116,7 +116,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
116
116
|
onClick(evt);
|
|
117
117
|
}
|
|
118
118
|
}, [onClick]);
|
|
119
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
119
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
120
120
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
121
121
|
.previewServerState.type;
|
|
122
122
|
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(item.type === 'composition' ? item.composition.stack : item.folder.stack);
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DefaultEditorSettings = 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
7
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
8
8
|
const custom_editor_1 = require("../icons/custom-editor");
|
|
9
|
-
const modals_1 = require("../state/modals");
|
|
10
9
|
const call_api_1 = require("./call-api");
|
|
11
10
|
const layout_1 = require("./layout");
|
|
12
11
|
const ModalButton_1 = require("./ModalButton");
|
|
13
|
-
const ModalContainer_1 = require("./ModalContainer");
|
|
14
|
-
const ModalFooter_1 = require("./ModalFooter");
|
|
15
|
-
const ModalHeader_1 = require("./ModalHeader");
|
|
16
12
|
const ComboBox_1 = require("./NewComposition/ComboBox");
|
|
17
13
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
14
|
+
const SettingsModalFooter_1 = require("./SettingsModalFooter");
|
|
15
|
+
const container = {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flex: 1,
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
};
|
|
18
21
|
const content = {
|
|
22
|
+
flex: 1,
|
|
19
23
|
padding: 16,
|
|
20
|
-
width: 440,
|
|
21
|
-
maxWidth: 'calc(100vw - 40px)',
|
|
22
24
|
};
|
|
23
25
|
const description = {
|
|
24
26
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -27,6 +29,13 @@ const description = {
|
|
|
27
29
|
lineHeight: 1.5,
|
|
28
30
|
margin: 0,
|
|
29
31
|
};
|
|
32
|
+
const title = {
|
|
33
|
+
color: colors_1.WHITE,
|
|
34
|
+
fontFamily: 'sans-serif',
|
|
35
|
+
fontSize: 14,
|
|
36
|
+
lineHeight: 1.5,
|
|
37
|
+
margin: 0,
|
|
38
|
+
};
|
|
30
39
|
const comboBoxStyle = {
|
|
31
40
|
boxSizing: 'border-box',
|
|
32
41
|
width: '100%',
|
|
@@ -53,10 +62,11 @@ const customEditorName = {
|
|
|
53
62
|
lineHeight: 'inherit',
|
|
54
63
|
};
|
|
55
64
|
const NO_PREFERENCE_ID = 'no-preference';
|
|
56
|
-
const
|
|
57
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
65
|
+
const DefaultEditorSettings = ({ onSaved }) => {
|
|
58
66
|
const [editorInfo, setEditorInfo] = (0, react_1.useState)(null);
|
|
67
|
+
const [codingAgentInfo, setCodingAgentInfo] = (0, react_1.useState)(null);
|
|
59
68
|
const [selectedEditor, setSelectedEditor] = (0, react_1.useState)(null);
|
|
69
|
+
const [selectedCodingAgent, setSelectedCodingAgent] = (0, react_1.useState)(null);
|
|
60
70
|
const [isSubmitting, setIsSubmitting] = (0, react_1.useState)(false);
|
|
61
71
|
const [error, setError] = (0, react_1.useState)(null);
|
|
62
72
|
const editorValues = (0, react_1.useMemo)(() => {
|
|
@@ -95,17 +105,56 @@ const ConfigureDefaultEditorModal = () => {
|
|
|
95
105
|
});
|
|
96
106
|
return [noPreference, ...installedEditors];
|
|
97
107
|
}, [editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors, selectedEditor]);
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
108
|
+
const codingAgentValues = (0, react_1.useMemo)(() => {
|
|
109
|
+
var _a;
|
|
110
|
+
const noPreference = {
|
|
111
|
+
id: NO_PREFERENCE_ID,
|
|
112
|
+
keyHint: null,
|
|
113
|
+
label: 'No preference',
|
|
114
|
+
leftItem: selectedCodingAgent === null ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
115
|
+
onClick: () => {
|
|
116
|
+
setSelectedCodingAgent(null);
|
|
117
|
+
setError(null);
|
|
118
|
+
},
|
|
119
|
+
quickSwitcherLabel: null,
|
|
120
|
+
subMenu: null,
|
|
121
|
+
type: 'item',
|
|
122
|
+
value: NO_PREFERENCE_ID,
|
|
123
|
+
};
|
|
124
|
+
const installedCodingAgents = ((_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _a !== void 0 ? _a : []).map((codingAgent) => {
|
|
125
|
+
return {
|
|
126
|
+
id: codingAgent.id,
|
|
127
|
+
keyHint: null,
|
|
128
|
+
label: codingAgent.name,
|
|
129
|
+
leftItem: selectedCodingAgent === codingAgent.id ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
130
|
+
onClick: () => {
|
|
131
|
+
setSelectedCodingAgent(codingAgent.id);
|
|
132
|
+
setError(null);
|
|
133
|
+
},
|
|
134
|
+
quickSwitcherLabel: null,
|
|
135
|
+
subMenu: null,
|
|
136
|
+
type: 'item',
|
|
137
|
+
value: codingAgent.id,
|
|
138
|
+
};
|
|
139
|
+
});
|
|
140
|
+
return [noPreference, ...installedCodingAgents];
|
|
141
|
+
}, [codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents, selectedCodingAgent]);
|
|
101
142
|
(0, react_1.useEffect)(() => {
|
|
102
143
|
const controller = new AbortController();
|
|
103
|
-
|
|
104
|
-
.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
144
|
+
Promise.all([
|
|
145
|
+
(0, call_api_1.callApi)('/api/default-editor-info', {}, controller.signal),
|
|
146
|
+
(0, call_api_1.callApi)('/api/default-coding-agent-info', {}, controller.signal),
|
|
147
|
+
])
|
|
148
|
+
.then(([editorResponse, codingAgentResponse]) => {
|
|
149
|
+
setEditorInfo(editorResponse);
|
|
150
|
+
setSelectedEditor(editorResponse.defaultEditor !== null &&
|
|
151
|
+
editorResponse.installedEditors.some(({ id }) => id === editorResponse.defaultEditor)
|
|
152
|
+
? editorResponse.defaultEditor
|
|
153
|
+
: null);
|
|
154
|
+
setCodingAgentInfo(codingAgentResponse);
|
|
155
|
+
setSelectedCodingAgent(codingAgentResponse.defaultCodingAgent !== null &&
|
|
156
|
+
codingAgentResponse.installedCodingAgents.some(({ id }) => id === codingAgentResponse.defaultCodingAgent)
|
|
157
|
+
? codingAgentResponse.defaultCodingAgent
|
|
109
158
|
: null);
|
|
110
159
|
})
|
|
111
160
|
.catch((err) => {
|
|
@@ -117,35 +166,44 @@ const ConfigureDefaultEditorModal = () => {
|
|
|
117
166
|
return () => controller.abort();
|
|
118
167
|
}, []);
|
|
119
168
|
const submit = (0, react_1.useCallback)(async () => {
|
|
120
|
-
if (editorInfo === null) {
|
|
169
|
+
if (editorInfo === null || codingAgentInfo === null) {
|
|
121
170
|
return;
|
|
122
171
|
}
|
|
123
172
|
setIsSubmitting(true);
|
|
124
173
|
setError(null);
|
|
125
174
|
try {
|
|
126
|
-
const
|
|
175
|
+
const editorResponse = await (0, call_api_1.callApi)('/api/update-default-editor', {
|
|
127
176
|
defaultEditor: selectedEditor,
|
|
128
177
|
});
|
|
129
|
-
if (!
|
|
130
|
-
setError(
|
|
178
|
+
if (!editorResponse.success) {
|
|
179
|
+
setError(editorResponse.reason);
|
|
180
|
+
setIsSubmitting(false);
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const codingAgentResponse = await (0, call_api_1.callApi)('/api/update-default-coding-agent', { defaultCodingAgent: selectedCodingAgent });
|
|
184
|
+
if (!codingAgentResponse.success) {
|
|
185
|
+
setError(codingAgentResponse.reason);
|
|
131
186
|
setIsSubmitting(false);
|
|
132
187
|
return;
|
|
133
188
|
}
|
|
134
|
-
|
|
189
|
+
onSaved();
|
|
135
190
|
}
|
|
136
191
|
catch (err) {
|
|
137
192
|
setError(err.message);
|
|
138
193
|
setIsSubmitting(false);
|
|
139
194
|
}
|
|
140
|
-
}, [
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
195
|
+
}, [
|
|
196
|
+
codingAgentInfo,
|
|
197
|
+
editorInfo,
|
|
198
|
+
onSaved,
|
|
199
|
+
selectedCodingAgent,
|
|
200
|
+
selectedEditor,
|
|
201
|
+
]);
|
|
202
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
203
|
+
jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
204
|
+
jsx_runtime_1.jsx("p", { style: title, children: "Default editor" }), jsx_runtime_1.jsx("p", { style: description, children: "Used when Remotion Studio opens source files." }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), editorInfo === null && error === null ? (jsx_runtime_1.jsx("p", { style: description, children: "Loading installed editors..." })) : null, (editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors.length) === 0 ? (jsx_runtime_1.jsx("p", { style: description, children: "No supported editors were found on this computer." })) : null, editorInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: editorValues, selectedId: selectedEditor !== null && selectedEditor !== void 0 ? selectedEditor : NO_PREFERENCE_ID, style: comboBoxStyle, title: "Default editor" })), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true }), jsx_runtime_1.jsx("p", { style: title, children: "Default coding agent" }), jsx_runtime_1.jsx("p", { style: description, children: "Used when Remotion Studio hands a project to a coding agent." }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), codingAgentInfo === null && error === null ? (jsx_runtime_1.jsx("p", { style: description, children: "Loading installed coding agents..." })) : null, (codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) === 0 ? (jsx_runtime_1.jsx("p", { style: description, children: "No supported coding agents were found on this computer." })) : null, codingAgentInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codingAgentValues, selectedId: selectedCodingAgent !== null && selectedCodingAgent !== void 0 ? selectedCodingAgent : NO_PREFERENCE_ID, style: comboBoxStyle, title: "Default coding agent" })), error ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
147
205
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1.5 }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: error, align: "flex-start", type: "error" })
|
|
148
|
-
] })) : null] }), jsx_runtime_1.jsx(
|
|
206
|
+
] })) : null] }), jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { children: jsx_runtime_1.jsx(ModalButton_1.ModalButton, { onClick: submit, disabled: isSubmitting || editorInfo === null || codingAgentInfo === null, children: isSubmitting ? 'Saving...' : 'Save and reload' }) })
|
|
149
207
|
] }));
|
|
150
208
|
};
|
|
151
|
-
exports.
|
|
209
|
+
exports.DefaultEditorSettings = DefaultEditorSettings;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LicenseSettings = 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 modals_1 = require("../state/modals");
|
|
8
7
|
const call_api_1 = require("./call-api");
|
|
9
8
|
const Checkbox_1 = require("./Checkbox");
|
|
10
9
|
const layout_1 = require("./layout");
|
|
11
10
|
const LicenseKeyValidation_1 = require("./LicenseKeyValidation");
|
|
12
11
|
const ModalButton_1 = require("./ModalButton");
|
|
13
|
-
const ModalContainer_1 = require("./ModalContainer");
|
|
14
|
-
const ModalFooter_1 = require("./ModalFooter");
|
|
15
|
-
const ModalHeader_1 = require("./ModalHeader");
|
|
16
12
|
const RemInput_1 = require("./NewComposition/RemInput");
|
|
17
13
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
14
|
+
const SettingsModalFooter_1 = require("./SettingsModalFooter");
|
|
15
|
+
const container = {
|
|
16
|
+
display: 'flex',
|
|
17
|
+
flex: 1,
|
|
18
|
+
flexDirection: 'column',
|
|
19
|
+
minWidth: 0,
|
|
20
|
+
};
|
|
18
21
|
const content = {
|
|
22
|
+
flex: 1,
|
|
19
23
|
padding: 16,
|
|
20
|
-
width: 540,
|
|
21
|
-
maxWidth: 'calc(100vw - 40px)',
|
|
22
24
|
};
|
|
23
25
|
const description = {
|
|
24
26
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -26,7 +28,6 @@ const description = {
|
|
|
26
28
|
fontSize: 14,
|
|
27
29
|
lineHeight: 1.5,
|
|
28
30
|
margin: 0,
|
|
29
|
-
marginTop: 10,
|
|
30
31
|
};
|
|
31
32
|
const descriptionLink = {
|
|
32
33
|
color: colors_1.WHITE,
|
|
@@ -59,8 +60,7 @@ const inputLabel = {
|
|
|
59
60
|
marginBottom: 6,
|
|
60
61
|
marginTop: 10,
|
|
61
62
|
};
|
|
62
|
-
const
|
|
63
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
63
|
+
const LicenseSettings = ({ initialPublicLicenseKey, onSaved }) => {
|
|
64
64
|
const initialLicenseType = initialPublicLicenseKey === 'free-license'
|
|
65
65
|
? 'free'
|
|
66
66
|
: initialPublicLicenseKey === null
|
|
@@ -73,17 +73,16 @@ const ConfigureLicenseModal = ({ initialPublicLicenseKey }) => {
|
|
|
73
73
|
const [isValidatingLicenseKey, setIsValidatingLicenseKey] = (0, react_1.useState)(false);
|
|
74
74
|
const [remoteValidationMessage, setRemoteValidationMessage] = (0, react_1.useState)(null);
|
|
75
75
|
const [licenseKeyDetails, setLicenseKeyDetails] = (0, react_1.useState)(null);
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
}, [setSelectedModal]);
|
|
79
|
-
const chooseFreeLicense = (0, react_1.useCallback)(() => {
|
|
80
|
-
setLicenseType('free');
|
|
81
|
-
setError(null);
|
|
82
|
-
}, []);
|
|
83
|
-
const chooseCompanyLicense = (0, react_1.useCallback)(() => {
|
|
84
|
-
setLicenseType('company');
|
|
76
|
+
const toggleLicenseType = (0, react_1.useCallback)((newLicenseType) => {
|
|
77
|
+
setLicenseType((currentLicenseType) => currentLicenseType === newLicenseType ? null : newLicenseType);
|
|
85
78
|
setError(null);
|
|
86
79
|
}, []);
|
|
80
|
+
const toggleFreeLicense = (0, react_1.useCallback)(() => {
|
|
81
|
+
toggleLicenseType('free');
|
|
82
|
+
}, [toggleLicenseType]);
|
|
83
|
+
const toggleCompanyLicense = (0, react_1.useCallback)(() => {
|
|
84
|
+
toggleLicenseType('company');
|
|
85
|
+
}, [toggleLicenseType]);
|
|
87
86
|
const publicLicenseKey = (0, react_1.useMemo)(() => {
|
|
88
87
|
if (licenseType === 'free') {
|
|
89
88
|
return 'free-license';
|
|
@@ -153,20 +152,29 @@ const ConfigureLicenseModal = ({ initialPublicLicenseKey }) => {
|
|
|
153
152
|
setIsSubmitting(false);
|
|
154
153
|
return;
|
|
155
154
|
}
|
|
156
|
-
|
|
155
|
+
onSaved();
|
|
157
156
|
}
|
|
158
157
|
catch (err) {
|
|
159
158
|
setError(err.message);
|
|
160
159
|
setIsSubmitting(false);
|
|
161
160
|
}
|
|
162
|
-
}, [companyLicenseKeyIsValid,
|
|
163
|
-
return (jsx_runtime_1.jsxs(
|
|
164
|
-
jsx_runtime_1.
|
|
165
|
-
jsx_runtime_1.jsxs("p", { style: description, children: ["Remotion is free if you are an individual or company with a headcount of 3 or less.
|
|
166
|
-
|
|
167
|
-
jsx_runtime_1.jsx(
|
|
168
|
-
|
|
169
|
-
|
|
161
|
+
}, [companyLicenseKeyIsValid, licenseType, onSaved, publicLicenseKey]);
|
|
162
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
163
|
+
jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
164
|
+
jsx_runtime_1.jsxs("p", { style: description, children: ["Remotion is free to use if you are an individual or company with a headcount of 3 or less.",
|
|
165
|
+
jsx_runtime_1.jsx("br", {}),
|
|
166
|
+
"If used in an organization with 4 people or more, a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.pro/license", children: "Company License" }), ' needs to be obtained.'] }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2 }), jsx_runtime_1.jsxs("div", { style: checkboxRow, onClick: (event) => {
|
|
167
|
+
if (!(event.target instanceof HTMLInputElement)) {
|
|
168
|
+
toggleFreeLicense();
|
|
169
|
+
}
|
|
170
|
+
}, children: [
|
|
171
|
+
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseType === 'free', onChange: toggleFreeLicense, name: "free-license", rounded: true }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: checkboxLabel, children: "I am eligible for the Free License" })
|
|
172
|
+
] }), jsx_runtime_1.jsxs("div", { style: checkboxRow, onClick: (event) => {
|
|
173
|
+
if (!(event.target instanceof HTMLInputElement)) {
|
|
174
|
+
toggleCompanyLicense();
|
|
175
|
+
}
|
|
176
|
+
}, children: [
|
|
177
|
+
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseType === 'company', onChange: toggleCompanyLicense, name: "company-license", rounded: true }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: checkboxLabel, children: "I need a Company License" })
|
|
170
178
|
] }), licenseType === 'company' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
171
179
|
jsx_runtime_1.jsxs("p", { style: description, children: ["Visit", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.pro/license", children: "remotion.pro/license" }), ' ', "to obtain a license key. Enter the public license key from", ' "License Keys".'] }), jsx_runtime_1.jsxs("label", { style: inputLabel, children: ["Public license key",
|
|
172
180
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { status: localLicenseKeyValidation.message ||
|
|
@@ -186,9 +194,9 @@ const ConfigureLicenseModal = ({ initialPublicLicenseKey }) => {
|
|
|
186
194
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1 }), jsx_runtime_1.jsx("p", { style: description, children: "Loading license key details..." })
|
|
187
195
|
] })) : null, licenseKeyDetails ? (jsx_runtime_1.jsx(LicenseKeyValidation_1.LicenseKeyDetailsDisplay, { details: licenseKeyDetails })) : null] })) : null, error ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
188
196
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1.5 }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: error, align: "flex-start", type: "error" })
|
|
189
|
-
] })) : null] }), jsx_runtime_1.jsx(
|
|
190
|
-
|
|
191
|
-
|
|
197
|
+
] })) : null] }), jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { children: jsx_runtime_1.jsx(ModalButton_1.ModalButton, { onClick: submit, disabled: isSubmitting ||
|
|
198
|
+
publicLicenseKey.length === 0 ||
|
|
199
|
+
(licenseType === 'company' && !companyLicenseKeyIsValid), autoFocus: licenseType !== 'company', children: isSubmitting ? 'Submitting...' : 'Submit and reload' }) })
|
|
192
200
|
] }));
|
|
193
201
|
};
|
|
194
|
-
exports.
|
|
202
|
+
exports.LicenseSettings = LicenseSettings;
|
|
@@ -23,7 +23,7 @@ const footerStyle = {
|
|
|
23
23
|
minWidth: 0,
|
|
24
24
|
};
|
|
25
25
|
const useConfirmationDialog = () => {
|
|
26
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
26
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
27
27
|
return (0, react_1.useCallback)((options) => {
|
|
28
28
|
return new Promise((resolve) => {
|
|
29
29
|
var _a, _b;
|
|
@@ -50,7 +50,7 @@ const useConfirmationDialog = () => {
|
|
|
50
50
|
};
|
|
51
51
|
exports.useConfirmationDialog = useConfirmationDialog;
|
|
52
52
|
const ConfirmationDialog = ({ state }) => {
|
|
53
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
53
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
54
54
|
const settledRef = (0, react_1.useRef)(false);
|
|
55
55
|
const closeCurrentModal = (0, react_1.useCallback)(() => {
|
|
56
56
|
setSelectedModal((modal) => (modal === null || modal === void 0 ? void 0 : modal.type) === 'confirmation-dialog' && modal.id === state.id
|
|
@@ -38,6 +38,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
38
38
|
const player_1 = require("@remotion/player");
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
|
+
const client_id_1 = require("../helpers/client-id");
|
|
41
42
|
const colors_1 = require("../helpers/colors");
|
|
42
43
|
const noop_1 = require("../helpers/noop");
|
|
43
44
|
const studio_fit_padding_1 = require("../helpers/studio-fit-padding");
|
|
@@ -62,6 +63,7 @@ const background = {
|
|
|
62
63
|
position: 'absolute',
|
|
63
64
|
};
|
|
64
65
|
const Editor = ({ Root, readOnlyStudio }) => {
|
|
66
|
+
(0, client_id_1.useStudioConfigRevision)();
|
|
65
67
|
const [drawElement, setDrawElement] = (0, react_1.useState)(null);
|
|
66
68
|
const size = player_1.PlayerInternals.useElementSize(drawElement, {
|
|
67
69
|
triggerOnWindowResize: false,
|
|
@@ -155,7 +155,7 @@ const EffectPickerResult = ({ item, selected, onSelected }) => {
|
|
|
155
155
|
] }) }));
|
|
156
156
|
};
|
|
157
157
|
const EffectPickerContent = ({ state }) => {
|
|
158
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
158
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
159
159
|
const [aboutEffectsHovered, setAboutEffectsHovered] = (0, react_1.useState)(false);
|
|
160
160
|
const [query, setQuery] = (0, react_1.useState)('');
|
|
161
161
|
const [selectedIndex, setSelectedIndex] = (0, react_1.useState)(0);
|
|
@@ -24,7 +24,7 @@ const sequencePropShortcuts = {
|
|
|
24
24
|
const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
25
25
|
const GlobalKeybindings = () => {
|
|
26
26
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
27
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.
|
|
27
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
28
28
|
const { setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
29
29
|
const { setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
30
30
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
@@ -58,7 +58,8 @@ const GlobalKeybindings = () => {
|
|
|
58
58
|
if (!(track === null || track === void 0 ? void 0 : track.sequence.controls)) {
|
|
59
59
|
return false;
|
|
60
60
|
}
|
|
61
|
-
const { schema,
|
|
61
|
+
const { schema, runtimeValues } = track.sequence.controls;
|
|
62
|
+
const currentRuntimeValueDotNotation = runtimeValues.getSnapshot();
|
|
62
63
|
if (!hasOwnProperty(schema, fieldKey) &&
|
|
63
64
|
!hasOwnProperty(currentRuntimeValueDotNotation, fieldKey)) {
|
|
64
65
|
return false;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Caption } from '@remotion/captions';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type {
|
|
3
|
+
import type { SequencePropsSubscriptionKey, SequenceRegistrationControls } from 'remotion';
|
|
4
4
|
import type { CodePosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
5
5
|
export declare const InlineCaptionInspector: React.FC<{
|
|
6
6
|
readonly captions: Caption[];
|
|
7
|
-
readonly controls:
|
|
7
|
+
readonly controls: SequenceRegistrationControls;
|
|
8
8
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
9
9
|
readonly readOnlyStudio: boolean;
|
|
10
10
|
readonly validatedLocation: CodePosition;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type InlineActionProps } from './InlineAction';
|
|
2
2
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
3
|
-
export declare const InlineDropdown: ({ values, getItems, unhoveredColor, ...props }: Omit<InlineActionProps, "onClick"> & {
|
|
3
|
+
export declare const InlineDropdown: ({ values, getItems, onOpenChange, unhoveredColor, ...props }: Omit<InlineActionProps, "onClick"> & {
|
|
4
4
|
readonly values?: ComboboxValue[] | undefined;
|
|
5
5
|
readonly getItems?: (() => ComboboxValue[]) | undefined;
|
|
6
|
+
readonly onOpenChange?: ((open: boolean) => void) | undefined;
|
|
6
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,11 @@ const InlineAction_1 = require("./InlineAction");
|
|
|
16
16
|
const portals_1 = require("./Menu/portals");
|
|
17
17
|
const styles_1 = require("./Menu/styles");
|
|
18
18
|
const MenuContent_1 = require("./NewComposition/MenuContent");
|
|
19
|
-
const
|
|
19
|
+
const container = {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
height: 24,
|
|
22
|
+
};
|
|
23
|
+
const InlineDropdown = ({ values, getItems, onOpenChange, unhoveredColor, ...props }) => {
|
|
20
24
|
var _a, _b;
|
|
21
25
|
const ref = (0, react_1.useRef)(null);
|
|
22
26
|
const [opened, setOpened] = (0, react_1.useState)({ type: 'not-open' });
|
|
@@ -40,7 +44,8 @@ const InlineDropdown = ({ values, getItems, unhoveredColor, ...props }) => {
|
|
|
40
44
|
top: e.clientY,
|
|
41
45
|
values: invocationValues,
|
|
42
46
|
});
|
|
43
|
-
|
|
47
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(true);
|
|
48
|
+
}, [getItems, onOpenChange]);
|
|
44
49
|
const spaceToBottom = (0, react_1.useMemo)(() => {
|
|
45
50
|
if (size && opened.type === 'open') {
|
|
46
51
|
return size.windowSize.height - opened.top;
|
|
@@ -89,9 +94,10 @@ const InlineDropdown = ({ values, getItems, unhoveredColor, ...props }) => {
|
|
|
89
94
|
}, [opened, size, isMobileLayout, spaceToTop, spaceToBottom]);
|
|
90
95
|
const onHide = (0, react_1.useCallback)(() => {
|
|
91
96
|
setOpened({ type: 'not-open' });
|
|
92
|
-
|
|
97
|
+
onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
|
|
98
|
+
}, [onOpenChange]);
|
|
93
99
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
94
|
-
jsx_runtime_1.jsx("div", { ref: ref, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props }) }), portalStyle && opened.type === 'open'
|
|
100
|
+
jsx_runtime_1.jsx("div", { ref: ref, style: container, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props }) }), portalStyle && opened.type === 'open'
|
|
95
101
|
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: (_b = (_a = opened.values) !== null && _a !== void 0 ? _a : values) !== null && _b !== void 0 ? _b : [], onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
96
102
|
: null] }));
|
|
97
103
|
};
|