@remotion/studio 4.0.524 → 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/ActionTooltip.d.ts +2 -0
- package/dist/components/ActionTooltip.js +14 -4
- package/dist/components/AgentPrompt.d.ts +6 -0
- package/dist/components/AgentPrompt.js +107 -0
- package/dist/components/AppLaunchButton.js +2 -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/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +21 -4
- package/dist/components/CaptionInspector.js +9 -3
- package/dist/components/CheckboardToggle.js +2 -1
- package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
- package/dist/components/CodeFrame.js +77 -0
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +7 -17
- package/dist/components/CurrentAsset.js +5 -4
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +100 -61
- package/dist/components/FilePreview.js +4 -0
- package/dist/components/FixComputedValueModal.js +64 -96
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/GenerateWithAgentModal.d.ts +9 -0
- package/dist/components/GenerateWithAgentModal.js +39 -0
- package/dist/components/GlobalKeybindings.js +14 -0
- package/dist/components/InlineEditableTitle.js +2 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +25 -18
- 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/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -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/SequenceInspectorHeader.js +4 -12
- 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 +61 -43
- package/dist/components/InspectorSourceLocation.js +1 -0
- package/dist/components/KeyboardShortcutsSettings.js +12 -4
- package/dist/components/LoopToggle.js +2 -1
- package/dist/components/LutPreview.d.ts +4 -0
- package/dist/components/LutPreview.js +192 -0
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +4 -9
- package/dist/components/Modals.js +4 -6
- package/dist/components/ModelsSettings.js +15 -4
- package/dist/components/MuteToggle.js +2 -1
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewFolder.js +29 -2
- package/dist/components/NewComposition/RenameFolder.js +1 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/OutlineToggle.js +2 -1
- package/dist/components/PlayPause.js +1 -1
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +3 -6
- package/dist/components/PreviewToolbarOverflowButton.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
- package/dist/components/RenderButton.js +40 -4
- 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/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/RulersAndGuidesToggle.js +2 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +22 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsButton.js +11 -2
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.d.ts +1 -2
- package/dist/components/SettingsModal.js +27 -6
- package/dist/components/SettingsModalFooter.js +17 -3
- package/dist/components/SidebarCollapserControls.js +1 -1
- package/dist/components/SkillsSettings.d.ts +5 -0
- package/dist/components/SkillsSettings.js +49 -15
- package/dist/components/SnappingToggle.js +2 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/Timeline.js +10 -11
- package/dist/components/Timeline/TimelineAssetField.js +178 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- 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 +10 -7
- package/dist/components/Timeline/TimelineSelection.d.ts +17 -4
- package/dist/components/Timeline/TimelineSelection.js +121 -52
- package/dist/components/Timeline/TimelineSequence.js +8 -8
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +29 -23
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
- package/dist/components/Timeline/TimelineZoomControls.js +1 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +152 -51
- 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/timeline-field-display-utils.js +4 -2
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +20 -6
- 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/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/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 +212 -42
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.d.ts +6 -5
- package/dist/components/get-open-in-menu-items.js +16 -10
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +5 -0
- package/dist/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-hc33szyn.mjs → LazyModels-mtggyjye.mjs} +3 -3
- package/dist/esm/{LazyModels-sg40rjw6.mjs → LazyModels-nk7py0zt.mjs} +3 -3
- package/dist/esm/{TranscriptionModal-3ctnxpt6.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
- package/dist/esm/{VideoMattingModal-b0r7e60n.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
- package/dist/esm/{index-er3mh6em.mjs → index-0gewwxse.mjs} +7031 -5834
- package/dist/esm/{index-q5xv20xx.mjs → index-4dsz9035.mjs} +8 -8
- package/dist/esm/{index-wbmp5srk.mjs → index-5bfxbpca.mjs} +1 -1
- package/dist/esm/{index-e3zwf3e7.mjs → index-5gd8k9yv.mjs} +1 -1
- package/dist/esm/{index-c37kme2v.mjs → index-bs39wngg.mjs} +4929 -3801
- package/dist/esm/{index-yfrysr5f.mjs → index-cdy8v54v.mjs} +17 -3
- package/dist/esm/{index-9qtvmwtx.mjs → index-eb5txqp6.mjs} +12 -9
- package/dist/esm/{index-q2epbw93.mjs → index-f97r9e2g.mjs} +4 -21
- package/dist/esm/{index-2j3d1g81.mjs → index-g7k2dvar.mjs} +1 -1
- package/dist/esm/{index-1b9skrrd.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-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +3 -0
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/open-in-editor.d.ts +5 -2
- package/dist/helpers/open-in-editor.js +12 -4
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/settings-tab-availability.d.ts +14 -0
- package/dist/helpers/settings-tab-availability.js +35 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.js +5 -0
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +21 -13
- package/dist/helpers/use-rename-composition.js +6 -1
- 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 +25 -3
- package/dist/state/z-index.js +1 -3
- package/package.json +19 -19
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
|
@@ -10,12 +10,14 @@ const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint")
|
|
|
10
10
|
const colors_1 = require("../helpers/colors");
|
|
11
11
|
const hoverable_1 = require("../helpers/hoverable");
|
|
12
12
|
const resolved_stack_to_symbolicated_1 = require("../helpers/resolved-stack-to-symbolicated");
|
|
13
|
+
const url_state_1 = require("../helpers/url-state");
|
|
13
14
|
const use_create_composition_1 = require("../helpers/use-create-composition");
|
|
14
15
|
const validate_new_comp_data_1 = require("../helpers/validate-new-comp-data");
|
|
15
16
|
const z_index_1 = require("../state/z-index");
|
|
16
17
|
const Button_1 = require("./Button");
|
|
17
18
|
const element_install_api_1 = require("./element-install-api");
|
|
18
19
|
const import_assets_1 = require("./import-assets");
|
|
20
|
+
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
19
21
|
const layout_1 = require("./layout");
|
|
20
22
|
const LazySyntaxHighlightedSource_1 = require("./LazySyntaxHighlightedSource");
|
|
21
23
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
@@ -27,7 +29,6 @@ const ModalHeader_1 = require("./ModalHeader");
|
|
|
27
29
|
const NewComposition_1 = require("./NewComposition/NewComposition");
|
|
28
30
|
const RemInput_1 = require("./NewComposition/RemInput");
|
|
29
31
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
30
|
-
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
31
32
|
const RadioButton_1 = require("./RadioButton");
|
|
32
33
|
const SegmentedControl_1 = require("./SegmentedControl");
|
|
33
34
|
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
@@ -249,11 +250,13 @@ const ElementLibraryAddConfirmation = ({ displayName, origin, url }) => {
|
|
|
249
250
|
};
|
|
250
251
|
exports.ElementLibraryAddConfirmation = ElementLibraryAddConfirmation;
|
|
251
252
|
const ElementInstallConfirmation = ({ state }) => {
|
|
252
|
-
var _a
|
|
253
|
+
var _a;
|
|
254
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
253
255
|
const { currentPlan, missingPackages, newPlan, onClose, request, sourceIsUnverified, sourceLabel, } = state;
|
|
254
256
|
const sourcePreview = (0, react_1.useMemo)(() => makeSourceControlsVisible(request.element.sourceCode), [request.element.sourceCode]);
|
|
255
257
|
const config = remotion_1.Internals.useUnsafeVideoConfig();
|
|
256
258
|
const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
259
|
+
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
257
260
|
const currentCompositionMetadata = config === null ||
|
|
258
261
|
(canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) !== 'composition' ||
|
|
259
262
|
canvasContent.compositionId !== request.compositionId
|
|
@@ -297,7 +300,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
297
300
|
const selectedFolderStack = newCompositionValues.folder.stack;
|
|
298
301
|
const resolvedFolderLocation = (0, use_resolved_stack_1.useResolvedStack)(selectedFolderStack);
|
|
299
302
|
const folderSymbolicatedStack = (0, react_1.useMemo)(() => (0, resolved_stack_to_symbolicated_1.resolvedStackToSymbolicated)(resolvedFolderLocation), [resolvedFolderLocation]);
|
|
300
|
-
const folderCompositionFile = (
|
|
303
|
+
const folderCompositionFile = (_b = folderSymbolicatedStack === null || folderSymbolicatedStack === void 0 ? void 0 : folderSymbolicatedStack.originalFileName) !== null && _b !== void 0 ? _b : null;
|
|
301
304
|
const [newCompositionPlanState, setNewCompositionPlanState] = (0, react_1.useState)({
|
|
302
305
|
folderStack: null,
|
|
303
306
|
type: 'ready',
|
|
@@ -369,7 +372,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
369
372
|
canceled = true;
|
|
370
373
|
};
|
|
371
374
|
}, [folderCompositionFile, newPlan, request.element, selectedFolderStack]);
|
|
372
|
-
const { compositionId: newCompositionId,
|
|
375
|
+
const { codemod: newCompositionCodemod, compositionId: newCompositionId, heightValidationMessage, nameValidationMessage, valid: newCompositionValuesAreValid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
|
|
373
376
|
canvasCapture: null,
|
|
374
377
|
compositions,
|
|
375
378
|
durationInFrames: newCompositionValues.durationInFrames,
|
|
@@ -386,7 +389,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
386
389
|
? activeNewCompositionPlanState.plan
|
|
387
390
|
: null;
|
|
388
391
|
const selectedPlan = mode === 'current-composition' ? currentPlan : selectedNewCompositionPlan;
|
|
389
|
-
const elementBaseName = (
|
|
392
|
+
const elementBaseName = (_c = request.element.slug.split('/').at(-1)) !== null && _c !== void 0 ? _c : '';
|
|
390
393
|
const [refreshPlan, setRefreshPlan] = (0, react_1.useState)(0);
|
|
391
394
|
const [input, setInput] = (0, react_1.useState)({
|
|
392
395
|
basePlan: selectedPlan,
|
|
@@ -407,28 +410,42 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
407
410
|
});
|
|
408
411
|
}
|
|
409
412
|
const requestedName = input.name;
|
|
410
|
-
const [
|
|
411
|
-
const currentPreparation = (
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
-
const
|
|
418
|
-
const
|
|
419
|
-
|
|
420
|
-
const existingDestination = (existingInstallation === null || existingInstallation === void 0 ? void 0 : existingInstallation.basePlan) === selectedPlan &&
|
|
421
|
-
(existingInstallation === null || existingInstallation === void 0 ? void 0 : existingInstallation.refresh) === refreshPlan
|
|
422
|
-
? existingInstallation
|
|
423
|
-
: 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;
|
|
424
423
|
const overwriteExisting = existingDestination !== null &&
|
|
425
424
|
input.overwritePlan === existingDestination.plan;
|
|
426
425
|
const activePlan = overwriteExisting
|
|
427
426
|
? existingDestination.plan
|
|
428
|
-
: ((
|
|
429
|
-
const [
|
|
430
|
-
const
|
|
431
|
-
|
|
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]);
|
|
432
449
|
(0, react_1.useEffect)(() => {
|
|
433
450
|
if (selectedPlan === null) {
|
|
434
451
|
return;
|
|
@@ -463,34 +480,44 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
463
480
|
plan: result.plan,
|
|
464
481
|
};
|
|
465
482
|
if (result.plan.expectedFileState.exists) {
|
|
466
|
-
|
|
467
|
-
|
|
483
|
+
setExistingInstallations((previous) => previous.some((installation) => installation.basePlan === selectedPlan &&
|
|
484
|
+
installation.refresh === refreshPlan)
|
|
468
485
|
? previous
|
|
469
|
-
: prepared);
|
|
486
|
+
: [...previous, prepared]);
|
|
470
487
|
if (requestedName === null) {
|
|
471
488
|
candidate = `${elementBaseName}-copy${copyNumber === 1 ? '' : `-${copyNumber}`}`;
|
|
472
489
|
copyNumber++;
|
|
473
490
|
continue;
|
|
474
491
|
}
|
|
475
492
|
}
|
|
476
|
-
|
|
477
|
-
basePlan
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
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
|
+
]);
|
|
483
505
|
return;
|
|
484
506
|
}
|
|
485
507
|
})().catch((error) => {
|
|
486
508
|
if (!canceled) {
|
|
487
|
-
|
|
488
|
-
basePlan
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
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
|
+
]);
|
|
494
521
|
}
|
|
495
522
|
});
|
|
496
523
|
return () => {
|
|
@@ -521,7 +548,7 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
521
548
|
: requestedName !== null))) &&
|
|
522
549
|
(mode === 'current-composition'
|
|
523
550
|
? currentPlan !== null
|
|
524
|
-
:
|
|
551
|
+
: newCompositionValuesAreValid &&
|
|
525
552
|
folderTargetIsReady &&
|
|
526
553
|
selectedNewCompositionPlan !== null);
|
|
527
554
|
const submit = (0, react_1.useCallback)(async () => {
|
|
@@ -530,18 +557,6 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
530
557
|
return;
|
|
531
558
|
}
|
|
532
559
|
setSubmitting(true);
|
|
533
|
-
if (mode === 'new-composition' && !compositionAlreadyCreated) {
|
|
534
|
-
const created = await createComposition({
|
|
535
|
-
signal: new AbortController().signal,
|
|
536
|
-
symbolicatedStack: selectedFolderStack === null ? null : folderSymbolicatedStack,
|
|
537
|
-
});
|
|
538
|
-
if (!created.success) {
|
|
539
|
-
(0, NotificationCenter_1.showNotification)(`Could not create composition: ${created.reason}`, 4000);
|
|
540
|
-
setSubmitting(false);
|
|
541
|
-
return;
|
|
542
|
-
}
|
|
543
|
-
setCreatedComposition(creationKey);
|
|
544
|
-
}
|
|
545
560
|
const installed = await (0, import_assets_1.insertElement)({
|
|
546
561
|
installationName: overwriteExisting
|
|
547
562
|
? ((_a = existingDestination === null || existingDestination === void 0 ? void 0 : existingDestination.name) !== null && _a !== void 0 ? _a : installationName)
|
|
@@ -556,9 +571,29 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
556
571
|
from: mode === 'new-composition' ? null : request.from,
|
|
557
572
|
overwriteExisting,
|
|
558
573
|
position: mode === 'new-composition' ? null : request.position,
|
|
574
|
+
undoRedoNavigation: mode === 'new-composition'
|
|
575
|
+
? {
|
|
576
|
+
undoRoute: (0, url_state_1.getRoute)(),
|
|
577
|
+
redoRoute: `/${newCompositionId}`,
|
|
578
|
+
}
|
|
579
|
+
: null,
|
|
580
|
+
newComposition: mode === 'new-composition'
|
|
581
|
+
? {
|
|
582
|
+
codemod: newCompositionCodemod,
|
|
583
|
+
symbolicatedStack: selectedFolderStack === null ? null : folderSymbolicatedStack,
|
|
584
|
+
}
|
|
585
|
+
: null,
|
|
559
586
|
});
|
|
560
|
-
if (installed)
|
|
587
|
+
if (installed) {
|
|
588
|
+
if (mode === 'new-composition') {
|
|
589
|
+
selectComposition({
|
|
590
|
+
id: newCompositionId,
|
|
591
|
+
folderName: newCompositionValues.folder.folderName,
|
|
592
|
+
parentFolderName: newCompositionValues.folder.parentName,
|
|
593
|
+
}, true);
|
|
594
|
+
}
|
|
561
595
|
onClose();
|
|
596
|
+
}
|
|
562
597
|
else {
|
|
563
598
|
setSubmitting(false);
|
|
564
599
|
setRefreshPlan((value) => value + 1);
|
|
@@ -566,19 +601,20 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
566
601
|
}, [
|
|
567
602
|
activePlan,
|
|
568
603
|
existingDestination,
|
|
569
|
-
compositionAlreadyCreated,
|
|
570
|
-
creationKey,
|
|
571
604
|
installationName,
|
|
572
605
|
overwriteExisting,
|
|
573
606
|
canSubmit,
|
|
574
|
-
createComposition,
|
|
575
607
|
folderSymbolicatedStack,
|
|
576
608
|
mode,
|
|
609
|
+
newCompositionCodemod,
|
|
577
610
|
newCompositionId,
|
|
578
611
|
onClose,
|
|
579
612
|
request,
|
|
580
613
|
selectedFolderStack,
|
|
581
614
|
selectedPlan,
|
|
615
|
+
selectComposition,
|
|
616
|
+
newCompositionValues.folder.folderName,
|
|
617
|
+
newCompositionValues.folder.parentName,
|
|
582
618
|
]);
|
|
583
619
|
const cancel = (0, react_1.useCallback)(() => {
|
|
584
620
|
if (!submitting) {
|
|
@@ -616,14 +652,17 @@ const ElementInstallConfirmation = ({ state }) => {
|
|
|
616
652
|
jsx_runtime_1.jsx("dt", { style: sectionTitleStyle, children: "From" }), jsx_runtime_1.jsx("dd", { style: sourceIsUnverified
|
|
617
653
|
? unverifiedRequestSourceStyle
|
|
618
654
|
: requestSourceDescriptionStyle, children: sourceLabel })
|
|
619
|
-
] }),
|
|
620
|
-
|
|
621
|
-
|
|
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: [
|
|
622
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" }) })
|
|
623
662
|
] }), currentPlan === null ? (jsx_runtime_1.jsxs("div", { style: warningStyle, role: "status", children: [
|
|
624
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."] })
|
|
625
664
|
] })) : null, mode === 'new-composition' ? (jsx_runtime_1.jsxs("section", { style: { ...sectionStyle, marginInline: -16 }, "aria-label": "New composition settings", children: [
|
|
626
|
-
jsx_runtime_1.jsx(NewComposition_1.NewCompositionFields, { compositionId: newCompositionId, heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage:
|
|
665
|
+
jsx_runtime_1.jsx(NewComposition_1.NewCompositionFields, { compositionId: newCompositionId, heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: nameValidationMessage, setValues: setNewCompositionValues, values: newCompositionValues, widthValidationMessage: widthValidationMessage }), (activeNewCompositionPlanState === null || activeNewCompositionPlanState === void 0 ? void 0 : activeNewCompositionPlanState.type) === 'error' ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: activeNewCompositionPlanState.reason, type: "error" })) : null] })) : null, jsx_runtime_1.jsx("section", { style: sectionStyle, "aria-label": "Element implementation", children: existingDestination ? (jsx_runtime_1.jsxs("div", { role: "radiogroup", "aria-label": "Existing Element file", style: sectionStyle, children: [
|
|
627
666
|
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: !overwriteExisting, disabled: submitting, onClick: () => setInput((previous) => ({ ...previous, overwritePlan: null })), children: "Create a copy" }), !overwriteExisting ? (jsx_runtime_1.jsxs("div", { style: {
|
|
628
667
|
...sectionStyle,
|
|
629
668
|
paddingLeft: 28,
|
|
@@ -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;
|
|
@@ -42,6 +42,6 @@ const FullScreenToggle = ({ hidden }) => {
|
|
|
42
42
|
f.unregister();
|
|
43
43
|
};
|
|
44
44
|
}, [keybindings, onClick]);
|
|
45
|
-
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label:
|
|
45
|
+
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Fullscreen", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }) }));
|
|
46
46
|
};
|
|
47
47
|
exports.FullScreenToggle = FullScreenToggle;
|
|
@@ -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;
|
|
@@ -5,6 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const calculate_timeline_1 = require("../helpers/calculate-timeline");
|
|
7
7
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
8
|
+
const pick_color_1 = require("../helpers/pick-color");
|
|
8
9
|
const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
|
|
9
10
|
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
10
11
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
@@ -184,6 +185,18 @@ const GlobalKeybindings = () => {
|
|
|
184
185
|
preventDefault: true,
|
|
185
186
|
})
|
|
186
187
|
: null;
|
|
188
|
+
const colorPicker = 'EyeDropper' in window
|
|
189
|
+
? keybindings.registerKeybinding({
|
|
190
|
+
event: 'keydown',
|
|
191
|
+
action: 'pickColor',
|
|
192
|
+
callback: () => {
|
|
193
|
+
(0, pick_color_1.pickColor)();
|
|
194
|
+
},
|
|
195
|
+
triggerIfInputFieldFocused: false,
|
|
196
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
197
|
+
preventDefault: true,
|
|
198
|
+
})
|
|
199
|
+
: null;
|
|
187
200
|
const sequencePropKeys = sequencePropShortcuts.map(({ action, fieldKey }) => keybindings.registerKeybinding({
|
|
188
201
|
event: 'keydown',
|
|
189
202
|
action,
|
|
@@ -274,6 +287,7 @@ const GlobalKeybindings = () => {
|
|
|
274
287
|
cmdKKey.unregister();
|
|
275
288
|
cmdSKey.unregister();
|
|
276
289
|
cmdIKey === null || cmdIKey === void 0 ? void 0 : cmdIKey.unregister();
|
|
290
|
+
colorPicker === null || colorPicker === void 0 ? void 0 : colorPicker.unregister();
|
|
277
291
|
pageDown.unregister();
|
|
278
292
|
pageUp.unregister();
|
|
279
293
|
shiftMKey.unregister();
|
|
@@ -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
|
};
|
|
@@ -69,6 +69,6 @@ const InspectorLocationCopy = ({ children, location, name, openInEditorLocation
|
|
|
69
69
|
opacity: showAction ? 1 : 0,
|
|
70
70
|
pointerEvents: showAction ? 'auto' : 'none',
|
|
71
71
|
}, children: [
|
|
72
|
-
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy context for agents" })) : null] })) : null] }));
|
|
72
|
+
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation, showTooltips: false }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy context for agents" })) : null] })) : null] }));
|
|
73
73
|
};
|
|
74
74
|
exports.InspectorLocationCopy = InspectorLocationCopy;
|