@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
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CodeFrame = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
6
|
+
const LazySyntaxHighlightedSource_1 = require("./LazySyntaxHighlightedSource");
|
|
7
|
+
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
8
|
+
const frame = {
|
|
9
|
+
backgroundColor: colors_1.ERROR_CODE_FRAME_BACKGROUND,
|
|
10
|
+
borderRadius: 6,
|
|
11
|
+
display: 'flex',
|
|
12
|
+
marginBottom: 20,
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
};
|
|
15
|
+
const sourceContainer = {
|
|
16
|
+
flex: 1,
|
|
17
|
+
minWidth: 0,
|
|
18
|
+
overflowX: 'auto',
|
|
19
|
+
overscrollBehaviorX: 'none',
|
|
20
|
+
};
|
|
21
|
+
const lineNumberColumn = {
|
|
22
|
+
flexShrink: 0,
|
|
23
|
+
width: 60,
|
|
24
|
+
};
|
|
25
|
+
const lineNumber = {
|
|
26
|
+
whiteSpace: 'pre',
|
|
27
|
+
paddingRight: 12,
|
|
28
|
+
color: 'inherit',
|
|
29
|
+
lineHeight: 1.7,
|
|
30
|
+
width: 60,
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
display: 'flex',
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
justifyContent: 'flex-end',
|
|
35
|
+
fontFamily: 'monospace',
|
|
36
|
+
};
|
|
37
|
+
const CodeFrame = ({ source, lineNumberWidth, fontSize, horizontalMargin }) => {
|
|
38
|
+
return (jsx_runtime_1.jsxs("div", { style: {
|
|
39
|
+
...frame,
|
|
40
|
+
marginLeft: horizontalMargin,
|
|
41
|
+
marginRight: horizontalMargin,
|
|
42
|
+
}, children: [
|
|
43
|
+
jsx_runtime_1.jsx("div", { style: lineNumberColumn, children: source.map((s, j) => {
|
|
44
|
+
return (jsx_runtime_1.jsx("div", { style: {
|
|
45
|
+
...lineNumber,
|
|
46
|
+
fontSize,
|
|
47
|
+
backgroundColor: s.highlight
|
|
48
|
+
? colors_1.ERROR_CODE_FRAME_BACKGROUND
|
|
49
|
+
: colors_1.ERROR_CODE_FRAME_LINE_BACKGROUND,
|
|
50
|
+
backgroundImage: s.highlight
|
|
51
|
+
? `linear-gradient(${colors_1.SELECTED_BACKGROUND}, ${colors_1.SELECTED_BACKGROUND})`
|
|
52
|
+
: undefined,
|
|
53
|
+
color: s.highlight ? colors_1.WHITE : colors_1.WHITE_ALPHA_40,
|
|
54
|
+
}, children: String(s.lineNumber).padStart(lineNumberWidth, ' ') }, j));
|
|
55
|
+
}) }), jsx_runtime_1.jsx("div", { style: sourceContainer, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: { minWidth: '100%', width: 'max-content' }, children: source.map((s, j) => {
|
|
56
|
+
return (jsx_runtime_1.jsx("div", { style: {
|
|
57
|
+
backgroundColor: s.highlight
|
|
58
|
+
? colors_1.SELECTED_BACKGROUND
|
|
59
|
+
: colors_1.TRANSPARENT,
|
|
60
|
+
}, children: jsx_runtime_1.jsx("code", { className: "language-tsx", style: {
|
|
61
|
+
display: 'block',
|
|
62
|
+
fontFamily: 'monospace',
|
|
63
|
+
fontSize,
|
|
64
|
+
color: '#9cdcfe',
|
|
65
|
+
whiteSpace: 'pre',
|
|
66
|
+
tabSize: 2,
|
|
67
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
68
|
+
lineHeight: 1.7,
|
|
69
|
+
paddingRight: 12,
|
|
70
|
+
paddingLeft: 12,
|
|
71
|
+
paddingTop: 0,
|
|
72
|
+
paddingBottom: 0,
|
|
73
|
+
}, children: jsx_runtime_1.jsx(LazySyntaxHighlightedSource_1.LazySyntaxHighlightedSource, { source: s.content }) }) }, j));
|
|
74
|
+
}) }) })
|
|
75
|
+
] }));
|
|
76
|
+
};
|
|
77
|
+
exports.CodeFrame = CodeFrame;
|
|
@@ -4,7 +4,6 @@ exports.CompositionSelectorItem = 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");
|
|
8
7
|
const colors_1 = require("../helpers/colors");
|
|
9
8
|
const hoverable_1 = require("../helpers/hoverable");
|
|
10
9
|
const noop_1 = require("../helpers/noop");
|
|
@@ -23,7 +22,7 @@ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
|
23
22
|
const actions_1 = require("./RenderQueue/actions");
|
|
24
23
|
const SidebarRenderButton_1 = require("./SidebarRenderButton");
|
|
25
24
|
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
26
|
-
const
|
|
25
|
+
const use_open_in_menu_apps_1 = require("./use-open-in-menu-apps");
|
|
27
26
|
const itemStyle = {
|
|
28
27
|
paddingRight: 2,
|
|
29
28
|
paddingTop: 5,
|
|
@@ -193,9 +192,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
193
192
|
}
|
|
194
193
|
}, [onClick]);
|
|
195
194
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
196
|
-
const connectionStatus = (0,
|
|
197
|
-
.previewServerState.type;
|
|
198
|
-
const { defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
|
|
195
|
+
const { connectionStatus, openInApps } = (0, use_open_in_menu_apps_1.useOpenInMenuApps)();
|
|
199
196
|
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(item.type === 'composition' ? item.composition.stack : item.folder.stack);
|
|
200
197
|
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
201
198
|
if (item.type === 'composition') {
|
|
@@ -203,9 +200,8 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
203
200
|
closeMenu: noop_1.noop,
|
|
204
201
|
composition: item.composition,
|
|
205
202
|
connectionStatus,
|
|
206
|
-
editorId: defaultEditorId,
|
|
207
|
-
editorName: defaultEditorName,
|
|
208
203
|
includeCompositionManagementItems: true,
|
|
204
|
+
openInApps,
|
|
209
205
|
resolvedLocation,
|
|
210
206
|
setSelectedModal,
|
|
211
207
|
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
@@ -214,21 +210,14 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
214
210
|
return (0, folder_menu_items_1.getFolderMenuItems)({
|
|
215
211
|
closeMenu: noop_1.noop,
|
|
216
212
|
connectionStatus,
|
|
217
|
-
editorId: defaultEditorId,
|
|
218
|
-
editorName: defaultEditorName,
|
|
213
|
+
editorId: openInApps.defaultEditorId,
|
|
214
|
+
editorName: openInApps.defaultEditorName,
|
|
219
215
|
folder: item.folder,
|
|
220
216
|
resolvedLocation,
|
|
221
217
|
setSelectedModal,
|
|
222
218
|
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
223
219
|
});
|
|
224
|
-
}, [
|
|
225
|
-
connectionStatus,
|
|
226
|
-
defaultEditorId,
|
|
227
|
-
defaultEditorName,
|
|
228
|
-
item,
|
|
229
|
-
resolvedLocation,
|
|
230
|
-
setSelectedModal,
|
|
231
|
-
]);
|
|
220
|
+
}, [connectionStatus, item, openInApps, resolvedLocation, setSelectedModal]);
|
|
232
221
|
const onItemDragStart = (0, react_1.useCallback)((event) => {
|
|
233
222
|
var _a, _b, _c, _d, _e;
|
|
234
223
|
if (window.remotion_isReadOnlyStudio) {
|
|
@@ -25,6 +25,7 @@ const modals_1 = require("../state/modals");
|
|
|
25
25
|
const AssetAudioVolume_1 = require("./AssetAudioVolume");
|
|
26
26
|
const InlineEditableTitle_1 = require("./InlineEditableTitle");
|
|
27
27
|
const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
|
|
28
|
+
const CollapsibleInspectorSection_1 = require("./InspectorPanel/CollapsibleInspectorSection");
|
|
28
29
|
const common_1 = require("./InspectorPanel/common");
|
|
29
30
|
const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
30
31
|
const layout_1 = require("./layout");
|
|
@@ -246,12 +247,12 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
246
247
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
247
248
|
jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
|
|
248
249
|
? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
|
|
249
|
-
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(
|
|
250
|
+
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "File", sectionId: "asset-file", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Video", sectionId: "asset-video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: mediaSections.audio.length > 0, label: "Audio", sectionId: "asset-audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsxs("div", { style: assetMetadataStyle, children: [mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))), src ? (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Average volume", children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: jsx_runtime_1.jsx(AssetAudioVolume_1.AssetAudioVolume, { src: (_d = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _d !== void 0 ? _d : null, waveformSampleRate: volumeMetadata
|
|
250
251
|
? Math.ceil(volumeMetadata.fps *
|
|
251
252
|
get_timeline_max_zoom_1.TIMELINE_FRAME_WIDTH_AT_MAX_ZOOM)
|
|
252
|
-
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "asset-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(separation_1.SeparationIcon, { color: color, style: quickActionIconStyle })), children: "Separate foreground" })) : null, src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
254
|
+
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, 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" }) })
|
|
255
|
+
] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] }) })
|
|
255
256
|
] }));
|
|
256
257
|
};
|
|
257
258
|
exports.AssetInfo = AssetInfo;
|
|
@@ -250,7 +250,8 @@ const ElementLibraryAddConfirmation = ({ displayName, origin, url }) => {
|
|
|
250
250
|
};
|
|
251
251
|
exports.ElementLibraryAddConfirmation = ElementLibraryAddConfirmation;
|
|
252
252
|
const ElementInstallConfirmation = ({ state }) => {
|
|
253
|
-
var _a
|
|
253
|
+
var _a;
|
|
254
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
254
255
|
const { currentPlan, missingPackages, newPlan, onClose, request, sourceIsUnverified, sourceLabel, } = state;
|
|
255
256
|
const sourcePreview = (0, react_1.useMemo)(() => makeSourceControlsVisible(request.element.sourceCode), [request.element.sourceCode]);
|
|
256
257
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
@@ -299,7 +300,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
299
300
|
const selectedFolderStack = newCompositionValues.folder.stack;
|
|
300
301
|
const resolvedFolderLocation = (0, use_resolved_stack_1.useResolvedStack)(selectedFolderStack);
|
|
301
302
|
const folderSymbolicatedStack = (0, react_1.useMemo)(() => (0, resolved_stack_to_symbolicated_1.resolvedStackToSymbolicated)(resolvedFolderLocation), [resolvedFolderLocation]);
|
|
302
|
-
const folderCompositionFile = (
|
|
303
|
+
const folderCompositionFile = (_b = folderSymbolicatedStack === null || folderSymbolicatedStack === void 0 ? void 0 : folderSymbolicatedStack.originalFileName) !== null && _b !== void 0 ? _b : null;
|
|
303
304
|
const [newCompositionPlanState, setNewCompositionPlanState] = (0, react_1.useState)({
|
|
304
305
|
folderStack: null,
|
|
305
306
|
type: 'ready',
|
|
@@ -388,7 +389,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
388
389
|
? activeNewCompositionPlanState.plan
|
|
389
390
|
: null;
|
|
390
391
|
const selectedPlan = mode === 'current-composition' ? currentPlan : selectedNewCompositionPlan;
|
|
391
|
-
const elementBaseName = (
|
|
392
|
+
const elementBaseName = (_c = request.element.slug.split('/').at(-1)) !== null && _c !== void 0 ? _c : '';
|
|
392
393
|
const [refreshPlan, setRefreshPlan] = (0, react_1.useState)(0);
|
|
393
394
|
const [input, setInput] = (0, react_1.useState)({
|
|
394
395
|
basePlan: selectedPlan,
|
|
@@ -409,25 +410,42 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
409
410
|
});
|
|
410
411
|
}
|
|
411
412
|
const requestedName = input.name;
|
|
412
|
-
const [
|
|
413
|
-
const currentPreparation = (
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
const
|
|
421
|
-
|
|
422
|
-
const existingDestination = (existingInstallation === null || existingInstallation === void 0 ? void 0 : existingInstallation.basePlan) === selectedPlan &&
|
|
423
|
-
(existingInstallation === null || existingInstallation === void 0 ? void 0 : existingInstallation.refresh) === refreshPlan
|
|
424
|
-
? existingInstallation
|
|
425
|
-
: null;
|
|
413
|
+
const [preparations, setPreparations] = (0, react_1.useState)([]);
|
|
414
|
+
const currentPreparation = (_d = preparations.find((preparation) => preparation.basePlan === selectedPlan &&
|
|
415
|
+
preparation.refresh === refreshPlan &&
|
|
416
|
+
preparation.requestedName === requestedName)) !== null && _d !== void 0 ? _d : null;
|
|
417
|
+
const preparedInstallation = (_e = currentPreparation === null || currentPreparation === void 0 ? void 0 : currentPreparation.installation) !== null && _e !== void 0 ? _e : null;
|
|
418
|
+
const planError = (_f = currentPreparation === null || currentPreparation === void 0 ? void 0 : currentPreparation.error) !== null && _f !== void 0 ? _f : null;
|
|
419
|
+
const installationName = (_g = requestedName !== null && requestedName !== void 0 ? requestedName : preparedInstallation === null || preparedInstallation === void 0 ? void 0 : preparedInstallation.name) !== null && _g !== void 0 ? _g : elementBaseName;
|
|
420
|
+
const [existingInstallations, setExistingInstallations] = (0, react_1.useState)([]);
|
|
421
|
+
const existingDestination = (_h = existingInstallations.find((installation) => installation.basePlan === selectedPlan &&
|
|
422
|
+
installation.refresh === refreshPlan)) !== null && _h !== void 0 ? _h : null;
|
|
426
423
|
const overwriteExisting = existingDestination !== null &&
|
|
427
424
|
input.overwritePlan === existingDestination.plan;
|
|
428
425
|
const activePlan = overwriteExisting
|
|
429
426
|
? existingDestination.plan
|
|
430
|
-
: ((
|
|
427
|
+
: ((_j = preparedInstallation === null || preparedInstallation === void 0 ? void 0 : preparedInstallation.plan) !== null && _j !== void 0 ? _j : null);
|
|
428
|
+
const [displayedPlans, setDisplayedPlans] = (0, react_1.useState)([]);
|
|
429
|
+
const rememberedDisplayedPlan = (_k = (_a = displayedPlans.find((displayed) => displayed.basePlan === selectedPlan &&
|
|
430
|
+
displayed.refresh === refreshPlan)) === null || _a === void 0 ? void 0 : _a.plan) !== null && _k !== void 0 ? _k : null;
|
|
431
|
+
const displayedPlan = (_l = activePlan !== null && activePlan !== void 0 ? activePlan : rememberedDisplayedPlan) !== null && _l !== void 0 ? _l : selectedPlan;
|
|
432
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
433
|
+
if (activePlan === null || selectedPlan === null) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
setDisplayedPlans((previous) => {
|
|
437
|
+
const existing = previous.find((displayed) => displayed.basePlan === selectedPlan &&
|
|
438
|
+
displayed.refresh === refreshPlan);
|
|
439
|
+
if ((existing === null || existing === void 0 ? void 0 : existing.plan) === activePlan) {
|
|
440
|
+
return previous;
|
|
441
|
+
}
|
|
442
|
+
return [
|
|
443
|
+
...previous.filter((displayed) => displayed.basePlan !== selectedPlan ||
|
|
444
|
+
displayed.refresh !== refreshPlan),
|
|
445
|
+
{ basePlan: selectedPlan, refresh: refreshPlan, plan: activePlan },
|
|
446
|
+
];
|
|
447
|
+
});
|
|
448
|
+
}, [activePlan, refreshPlan, selectedPlan]);
|
|
431
449
|
(0, react_1.useEffect)(() => {
|
|
432
450
|
if (selectedPlan === null) {
|
|
433
451
|
return;
|
|
@@ -462,34 +480,44 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
462
480
|
plan: result.plan,
|
|
463
481
|
};
|
|
464
482
|
if (result.plan.expectedFileState.exists) {
|
|
465
|
-
|
|
466
|
-
|
|
483
|
+
setExistingInstallations((previous) => previous.some((installation) => installation.basePlan === selectedPlan &&
|
|
484
|
+
installation.refresh === refreshPlan)
|
|
467
485
|
? previous
|
|
468
|
-
: prepared);
|
|
486
|
+
: [...previous, prepared]);
|
|
469
487
|
if (requestedName === null) {
|
|
470
488
|
candidate = `${elementBaseName}-copy${copyNumber === 1 ? '' : `-${copyNumber}`}`;
|
|
471
489
|
copyNumber++;
|
|
472
490
|
continue;
|
|
473
491
|
}
|
|
474
492
|
}
|
|
475
|
-
|
|
476
|
-
basePlan
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
493
|
+
setPreparations((previous) => [
|
|
494
|
+
...previous.filter((preparation) => preparation.basePlan !== selectedPlan ||
|
|
495
|
+
preparation.refresh !== refreshPlan ||
|
|
496
|
+
preparation.requestedName !== requestedName),
|
|
497
|
+
{
|
|
498
|
+
basePlan: selectedPlan,
|
|
499
|
+
refresh: refreshPlan,
|
|
500
|
+
requestedName,
|
|
501
|
+
installation: prepared,
|
|
502
|
+
error: null,
|
|
503
|
+
},
|
|
504
|
+
]);
|
|
482
505
|
return;
|
|
483
506
|
}
|
|
484
507
|
})().catch((error) => {
|
|
485
508
|
if (!canceled) {
|
|
486
|
-
|
|
487
|
-
basePlan
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
509
|
+
setPreparations((previous) => [
|
|
510
|
+
...previous.filter((preparation) => preparation.basePlan !== selectedPlan ||
|
|
511
|
+
preparation.refresh !== refreshPlan ||
|
|
512
|
+
preparation.requestedName !== requestedName),
|
|
513
|
+
{
|
|
514
|
+
basePlan: selectedPlan,
|
|
515
|
+
refresh: refreshPlan,
|
|
516
|
+
requestedName,
|
|
517
|
+
installation: null,
|
|
518
|
+
error: error instanceof Error ? error.message : String(error),
|
|
519
|
+
},
|
|
520
|
+
]);
|
|
493
521
|
}
|
|
494
522
|
});
|
|
495
523
|
return () => {
|
|
@@ -624,9 +652,12 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
624
652
|
jsx_runtime_1.jsx("dt", { style: sectionTitleStyle, children: "From" }), jsx_runtime_1.jsx("dd", { style: sourceIsUnverified
|
|
625
653
|
? unverifiedRequestSourceStyle
|
|
626
654
|
: requestSourceDescriptionStyle, children: sourceLabel })
|
|
627
|
-
] }),
|
|
628
|
-
|
|
629
|
-
|
|
655
|
+
] }), jsx_runtime_1.jsxs("dl", { style: {
|
|
656
|
+
...requestSourceStyle,
|
|
657
|
+
visibility: displayedPlan === null ? 'hidden' : 'visible',
|
|
658
|
+
}, "aria-hidden": displayedPlan === null, children: [
|
|
659
|
+
jsx_runtime_1.jsx("dt", { style: sectionTitleStyle, children: "Destination" }), jsx_runtime_1.jsx("dd", { style: requestSourceDescriptionStyle, children: (_m = displayedPlan === null || displayedPlan === void 0 ? void 0 : displayedPlan.filePath) !== null && _m !== void 0 ? _m : '\u00A0' })
|
|
660
|
+
] }), jsx_runtime_1.jsxs("div", { style: destinationControlStyle, children: [
|
|
630
661
|
jsx_runtime_1.jsx("div", { style: sectionTitleStyle, children: "Add to" }), jsx_runtime_1.jsx("div", { "aria-label": "Add to", role: "group", style: { marginLeft: 'auto' }, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: destinationOptions, needsWrapping: false, size: "medium" }) })
|
|
631
662
|
] }), currentPlan === null ? (jsx_runtime_1.jsxs("div", { style: warningStyle, role: "status", children: [
|
|
632
663
|
jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { style: warningIconStyle }), jsx_runtime_1.jsxs("p", { style: warningDescriptionStyle, children: ["Studio could not find a safe place in \u201C", request.compositionId, "\u201D to insert the Element. Install it into a new composition instead."] })
|
|
@@ -7,6 +7,7 @@ const react_1 = require("react");
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const JSONViewer_1 = require("./JSONViewer");
|
|
9
9
|
const layout_1 = require("./layout");
|
|
10
|
+
const LutPreview_1 = require("./LutPreview");
|
|
10
11
|
const TextViewer_1 = require("./TextViewer");
|
|
11
12
|
const msgStyle = {
|
|
12
13
|
fontSize: 13,
|
|
@@ -104,6 +105,9 @@ const FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
|
|
|
104
105
|
if (fileType === 'font') {
|
|
105
106
|
return jsx_runtime_1.jsx(FontPreview, { src: src });
|
|
106
107
|
}
|
|
108
|
+
if (fileType === 'lut') {
|
|
109
|
+
return jsx_runtime_1.jsx(LutPreview_1.LutPreview, { src: src }, src);
|
|
110
|
+
}
|
|
107
111
|
if (fileType === 'json') {
|
|
108
112
|
return jsx_runtime_1.jsx(JSONViewer_1.JSONViewer, { src: src });
|
|
109
113
|
}
|
|
@@ -3,19 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FixComputedValueModal = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const resolve_file_source_1 = require("../error-overlay/react-overlay/effects/resolve-file-source");
|
|
7
|
+
const OpenInEditor_1 = require("../error-overlay/remotion-overlay/OpenInEditor");
|
|
8
|
+
const StackFrame_1 = require("../error-overlay/remotion-overlay/StackFrame");
|
|
9
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
10
|
const colors_1 = require("../helpers/colors");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const copy_1 = require("../icons/copy");
|
|
10
|
-
const skills_1 = require("../icons/skills");
|
|
11
|
-
const CodingAgentButton_1 = require("./CodingAgentButton");
|
|
12
|
-
const InlineAction_1 = require("./InlineAction");
|
|
11
|
+
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
12
|
+
const AgentPrompt_1 = require("./AgentPrompt");
|
|
13
13
|
const ModalContainer_1 = require("./ModalContainer");
|
|
14
|
-
const ModalFooter_1 = require("./ModalFooter");
|
|
15
14
|
const ModalHeader_1 = require("./ModalHeader");
|
|
16
15
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
17
|
-
const
|
|
18
|
-
const SettingsContext_1 = require("./SettingsContext");
|
|
16
|
+
const use_default_editor_info_1 = require("./use-default-editor-info");
|
|
19
17
|
const panelStyle = {
|
|
20
18
|
borderRadius: 6,
|
|
21
19
|
display: 'flex',
|
|
@@ -36,99 +34,69 @@ const text = {
|
|
|
36
34
|
fontSize: 14,
|
|
37
35
|
lineHeight: 1.5,
|
|
38
36
|
};
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
borderRadius: 6,
|
|
43
|
-
boxSizing: 'border-box',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
gap: 8,
|
|
46
|
-
marginTop: 10,
|
|
47
|
-
padding: '8px 8px 8px 10px',
|
|
48
|
-
width: '100%',
|
|
49
|
-
};
|
|
50
|
-
const code = {
|
|
51
|
-
color: colors_1.WHITE,
|
|
52
|
-
flex: 1,
|
|
53
|
-
fontFamily: 'monospace',
|
|
54
|
-
fontSize: 13,
|
|
55
|
-
lineHeight: 1.5,
|
|
56
|
-
margin: 0,
|
|
57
|
-
minWidth: 0,
|
|
58
|
-
overflowWrap: 'anywhere',
|
|
59
|
-
whiteSpace: 'pre-wrap',
|
|
60
|
-
};
|
|
61
|
-
const copyAction = {
|
|
62
|
-
flexShrink: 0,
|
|
37
|
+
const sourcePreviewContainer = {
|
|
38
|
+
marginBottom: 16,
|
|
39
|
+
marginTop: 4,
|
|
63
40
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
marginRight: 6,
|
|
69
|
-
verticalAlign: 'middle',
|
|
70
|
-
};
|
|
71
|
-
const copyIcon = {
|
|
72
|
-
flexShrink: 0,
|
|
73
|
-
height: 12,
|
|
74
|
-
width: 12,
|
|
75
|
-
};
|
|
76
|
-
const footer = {
|
|
77
|
-
display: 'flex',
|
|
78
|
-
flex: 'none',
|
|
79
|
-
minWidth: 0,
|
|
80
|
-
padding: '12px 16px',
|
|
81
|
-
justifyContent: 'flex-end',
|
|
41
|
+
const sourcePreviewStatus = {
|
|
42
|
+
...text,
|
|
43
|
+
marginBottom: 16,
|
|
44
|
+
marginTop: 10,
|
|
82
45
|
};
|
|
83
46
|
const FixComputedValueModal = ({ state }) => {
|
|
84
47
|
var _a;
|
|
85
|
-
const {
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
(
|
|
102
|
-
|
|
48
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
49
|
+
const { canOpenInEditor, defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
50
|
+
const [sourcePreview, setSourcePreview] = (0, react_1.useState)({
|
|
51
|
+
type: 'loading',
|
|
52
|
+
});
|
|
53
|
+
const promptLocation = sourcePreview.type === 'loaded'
|
|
54
|
+
? `${sourcePreview.stack.originalFileName}:${sourcePreview.stack.originalLineNumber}:${sourcePreview.stack.originalColumnNumber}`
|
|
55
|
+
: `${state.location.source}:${state.location.line}:${state.location.column}`;
|
|
56
|
+
const promptDetails = ` ${promptLocation} make "${state.prop}" interactive`;
|
|
57
|
+
const canOpenSourceInEditor = sourcePreview.type === 'loaded' &&
|
|
58
|
+
canOpenInEditor &&
|
|
59
|
+
defaultEditorId !== null &&
|
|
60
|
+
defaultEditorName !== null;
|
|
61
|
+
(0, react_1.useEffect)(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
let cancelled = false;
|
|
64
|
+
setSourcePreview({ type: 'loading' });
|
|
65
|
+
(0, open_in_editor_1.findOriginalPositionInFileAtProperty)({
|
|
66
|
+
originalPosition: state.location,
|
|
67
|
+
property: (_a = state.prop.split('.').at(-1)) !== null && _a !== void 0 ? _a : state.prop,
|
|
68
|
+
})
|
|
69
|
+
.then((position) => {
|
|
70
|
+
return (0, resolve_file_source_1.resolveFileSource)({
|
|
71
|
+
columnNumber: position.column,
|
|
72
|
+
fileName: position.source,
|
|
73
|
+
lineNumber: position.line,
|
|
74
|
+
message: `Computed value "${state.prop}"`,
|
|
75
|
+
}, 1);
|
|
76
|
+
})
|
|
77
|
+
.then((stack) => {
|
|
78
|
+
if (!cancelled) {
|
|
79
|
+
setSourcePreview({ type: 'loaded', stack });
|
|
80
|
+
}
|
|
81
|
+
})
|
|
103
82
|
.catch((err) => {
|
|
104
|
-
(
|
|
83
|
+
if (!cancelled) {
|
|
84
|
+
setSourcePreview({
|
|
85
|
+
type: 'error',
|
|
86
|
+
message: err instanceof Error ? err.message : String(err),
|
|
87
|
+
});
|
|
88
|
+
}
|
|
105
89
|
});
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
const renderInstallCommandCopyAction = (0, react_1.useCallback)((color) => {
|
|
111
|
-
return (jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: installCommandCopied, color: color, style: copyIcon }));
|
|
112
|
-
}, [installCommandCopied]);
|
|
90
|
+
return () => {
|
|
91
|
+
cancelled = true;
|
|
92
|
+
};
|
|
93
|
+
}, [state.location, state.prop]);
|
|
113
94
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
114
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Fix computed value" }), jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
marginTop: state.remotionInteractivitySkillAvailable ? 0 : 16,
|
|
121
|
-
}, children: state.remotionInteractivitySkillAvailable
|
|
122
|
-
? 'Paste this prompt into your coding agent to make this value editable in Studio:'
|
|
123
|
-
: 'Then, paste this prompt into your coding agent:' }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
124
|
-
jsx_runtime_1.jsxs("pre", { style: code, children: [
|
|
125
|
-
jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: colors_1.BLUE, style: skillsIcon, "aria-hidden": true }), jsx_runtime_1.jsx("span", { style: {
|
|
126
|
-
color: colors_1.BLUE,
|
|
127
|
-
fontFamily: 'inherit',
|
|
128
|
-
fontSize: 'inherit',
|
|
129
|
-
lineHeight: 'inherit',
|
|
130
|
-
}, children: skillName }), promptDetails] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyPrompt, renderAction: renderPromptCopyAction, title: "Copy prompt" })
|
|
131
|
-
] })
|
|
132
|
-
] }), hasCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Open in", prompt: prompt, size: "compact", style: null }) })) : null] }));
|
|
95
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Fix computed value" }), jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
96
|
+
jsx_runtime_1.jsx("div", { style: text, children: "This value cannot be interactively edited because it is computed:" }), sourcePreview.type === 'loaded' ? (jsx_runtime_1.jsx("div", { style: sourcePreviewContainer, children: jsx_runtime_1.jsx(StackFrame_1.StackElement, { collapsible: false, defaultFunctionName: null, editorId: canOpenInEditor ? defaultEditorId : null, fontSize: 13, headerAction: canOpenSourceInEditor ? (jsx_runtime_1.jsx(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: false, editorId: defaultEditorId, editorName: defaultEditorName, size: "compact", stack: sourcePreview.stack })) : null, horizontalSpacing: 0, isFirst: true, lineNumberWidth: String(Math.max(0, ...((_a = sourcePreview.stack.originalScriptCode) !== null && _a !== void 0 ? _a : []).map((line) => line.lineNumber))).length, s: sourcePreview.stack }) })) : (jsx_runtime_1.jsx("div", { style: sourcePreviewStatus, children: sourcePreview.type === 'loading'
|
|
97
|
+
? 'Loading code preview...'
|
|
98
|
+
: `Could not load code preview: ${sourcePreview.message}` })), jsx_runtime_1.jsx(AgentPrompt_1.AgentPrompt, { availableText: "Use this prompt to make this value editable:", promptDetails: promptDetails, skillId: "remotion-interactivity" })
|
|
99
|
+
] })
|
|
100
|
+
] }));
|
|
133
101
|
};
|
|
134
102
|
exports.FixComputedValueModal = FixComputedValueModal;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GenerateWithAgentModal = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
6
|
+
const format_file_location_1 = require("../helpers/format-file-location");
|
|
7
|
+
const AgentPrompt_1 = require("./AgentPrompt");
|
|
8
|
+
const ModalContainer_1 = require("./ModalContainer");
|
|
9
|
+
const ModalHeader_1 = require("./ModalHeader");
|
|
10
|
+
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
11
|
+
const panelStyle = {
|
|
12
|
+
borderRadius: 6,
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
maxHeight: (0, ModalContainer_1.getMaxModalHeight)(800),
|
|
16
|
+
minWidth: 0,
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
width: (0, ModalContainer_1.getMaxModalWidth)(560),
|
|
19
|
+
};
|
|
20
|
+
const container = { padding: 16 };
|
|
21
|
+
const text = {
|
|
22
|
+
color: colors_1.LIGHT_TEXT,
|
|
23
|
+
fontFamily: 'sans-serif',
|
|
24
|
+
fontSize: 14,
|
|
25
|
+
lineHeight: 1.5,
|
|
26
|
+
marginBottom: 16,
|
|
27
|
+
};
|
|
28
|
+
const GenerateWithAgentModal = ({ state, }) => {
|
|
29
|
+
const location = (0, format_file_location_1.formatFileLocation)({
|
|
30
|
+
location: state.location,
|
|
31
|
+
root: window.remotion_cwd,
|
|
32
|
+
});
|
|
33
|
+
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
34
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Generate with agent" }), jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
35
|
+
jsx_runtime_1.jsx("div", { style: text, children: "Ask a coding agent to generate content in this composition." }), jsx_runtime_1.jsx(AgentPrompt_1.AgentPrompt, { availableText: "Start your prompt with:", promptDetails: location ? ` ${location}` : '', skillId: "remotion-markup" })
|
|
36
|
+
] })
|
|
37
|
+
] }));
|
|
38
|
+
};
|
|
39
|
+
exports.GenerateWithAgentModal = GenerateWithAgentModal;
|
|
@@ -35,6 +35,7 @@ const titleGridItem = {
|
|
|
35
35
|
minWidth: 0,
|
|
36
36
|
overflow: 'hidden',
|
|
37
37
|
textOverflow: 'ellipsis',
|
|
38
|
+
userSelect: 'none',
|
|
38
39
|
whiteSpace: 'nowrap',
|
|
39
40
|
};
|
|
40
41
|
const titleInput = {
|
|
@@ -52,6 +53,7 @@ const titleInput = {
|
|
|
52
53
|
outline: 'none',
|
|
53
54
|
overflow: 'hidden',
|
|
54
55
|
padding: 0,
|
|
56
|
+
userSelect: 'text',
|
|
55
57
|
WebkitAppearance: 'none',
|
|
56
58
|
width: '100%',
|
|
57
59
|
};
|