@remotion/studio 4.0.525 → 4.0.527

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.
Files changed (195) hide show
  1. package/dist/api/focus-default-props-path.js +7 -1
  2. package/dist/api/restart-studio.d.ts +1 -1
  3. package/dist/api/restart-studio.js +1 -1
  4. package/dist/components/AgentPrompt.d.ts +6 -0
  5. package/dist/components/AgentPrompt.js +107 -0
  6. package/dist/components/AssetFileIcon.js +2 -0
  7. package/dist/components/AssetSelectorItem.d.ts +1 -23
  8. package/dist/components/AssetSelectorItem.js +10 -200
  9. package/dist/components/Canvas.js +109 -44
  10. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  11. package/dist/components/CanvasOrLoading.js +10 -2
  12. package/dist/components/CaptionInspector.js +9 -3
  13. package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
  14. package/dist/components/CodeFrame.js +77 -0
  15. package/dist/components/CompositionSelectorItem.js +7 -17
  16. package/dist/components/CurrentAsset.js +6 -4
  17. package/dist/components/ElementInstallConfirmation.js +69 -38
  18. package/dist/components/FilePreview.js +4 -0
  19. package/dist/components/FixComputedValueModal.js +64 -96
  20. package/dist/components/GenerateWithAgentModal.d.ts +9 -0
  21. package/dist/components/GenerateWithAgentModal.js +39 -0
  22. package/dist/components/InitialCompositionLoader.js +1 -1
  23. package/dist/components/InlineDropdown.js +26 -2
  24. package/dist/components/InlineEditableTitle.js +3 -0
  25. package/dist/components/InspectorOpenInEditor.js +8 -4
  26. package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
  27. package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
  28. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
  29. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +20 -8
  30. package/dist/components/InspectorPanel/CompositionInspector.js +32 -15
  31. package/dist/components/InspectorPanel/CompositionMetadata.js +7 -0
  32. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
  33. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
  34. package/dist/components/InspectorPanel/GuideInspector.js +2 -3
  35. package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
  36. package/dist/components/InspectorPanel/MultiSequenceInspector.js +34 -2
  37. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +45 -4
  38. package/dist/components/InspectorPanel/common.d.ts +4 -0
  39. package/dist/components/InspectorPanel/common.js +15 -2
  40. package/dist/components/InspectorPanel/styles.d.ts +0 -3
  41. package/dist/components/InspectorPanel/styles.js +3 -27
  42. package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
  43. package/dist/components/InspectorPanel/use-composition-actions.js +16 -0
  44. package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
  45. package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
  46. package/dist/components/InspectorSequenceSection.js +44 -35
  47. package/dist/components/InspectorSourceLocation.js +4 -0
  48. package/dist/components/KeyboardShortcutsSettings.js +12 -4
  49. package/dist/components/LutPreview.d.ts +4 -0
  50. package/dist/components/LutPreview.js +192 -0
  51. package/dist/components/MenuBuildIndicator.js +1 -0
  52. package/dist/components/MenuCompositionName.js +4 -9
  53. package/dist/components/Modals.js +3 -6
  54. package/dist/components/ModelsSettings.js +15 -4
  55. package/dist/components/NewComposition/CancelButton.js +1 -1
  56. package/dist/components/Notifications/NotificationCenter.d.ts +0 -1
  57. package/dist/components/Notifications/NotificationCenter.js +1 -22
  58. package/dist/components/Preview.js +3 -0
  59. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  60. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  61. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
  62. package/dist/components/RadioButton.js +1 -0
  63. package/dist/components/RenderModal/DataEditor.js +4 -1
  64. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
  65. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
  66. package/dist/components/RenderModal/WebRenderModal.js +10 -2
  67. package/dist/components/RenderQueue/CaptionQueueItem.js +5 -2
  68. package/dist/components/RenderQueue/CaptionQueueProcessor.js +35 -8
  69. package/dist/components/RenderQueue/VideoMattingQueueItem.js +1 -0
  70. package/dist/components/RenderQueue/caption-job-types.d.ts +6 -0
  71. package/dist/components/RenderQueue/index.js +1 -0
  72. package/dist/components/RendersTab.js +4 -0
  73. package/dist/components/SelectedOutlineElement.js +6 -0
  74. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  75. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  76. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  77. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  78. package/dist/components/SettingsButton.js +11 -2
  79. package/dist/components/SettingsModal.d.ts +1 -2
  80. package/dist/components/SettingsModal.js +24 -6
  81. package/dist/components/SettingsModalFooter.js +17 -3
  82. package/dist/components/SkillsSettings.d.ts +5 -0
  83. package/dist/components/SkillsSettings.js +29 -26
  84. package/dist/components/Timeline/Timeline.js +10 -11
  85. package/dist/components/Timeline/TimelineAssetField.js +81 -51
  86. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  87. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  88. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  89. package/dist/components/Timeline/TimelineExpandedRow.js +1 -0
  90. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  91. package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
  92. package/dist/components/Timeline/TimelineKeyframeControls.js +16 -1
  93. package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
  94. package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
  95. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
  96. package/dist/components/Timeline/TimelineLayerEye.js +6 -3
  97. package/dist/components/Timeline/TimelineList.js +9 -3
  98. package/dist/components/Timeline/TimelineSchemaField.js +2 -6
  99. package/dist/components/Timeline/TimelineSelection.d.ts +14 -3
  100. package/dist/components/Timeline/TimelineSelection.js +91 -49
  101. package/dist/components/Timeline/TimelineSequence.js +28 -2
  102. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  103. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
  104. package/dist/components/Timeline/TimelineSequenceItem.js +45 -13
  105. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  106. package/dist/components/Timeline/TimelineViewport.js +10 -1
  107. package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
  108. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  109. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -2
  110. package/dist/components/Timeline/get-sequence-context-menu-items.js +143 -46
  111. package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
  112. package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
  113. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  114. package/dist/components/Timeline/split-selected-timeline-item.js +58 -35
  115. package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
  116. package/dist/components/Timeline/timeline-display-groups.js +66 -0
  117. package/dist/components/Timeline/use-timeline-asset-drop.js +21 -21
  118. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  119. package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
  120. package/dist/components/TimelineCombobox.js +1 -0
  121. package/dist/components/Transcription/TranscriptionModal.js +16 -11
  122. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  123. package/dist/components/UpdateStatusContext.d.ts +2 -2
  124. package/dist/components/UpdateStatusContext.js +6 -7
  125. package/dist/components/UpdatesSettings.js +6 -6
  126. package/dist/components/WebMcp.js +41 -41
  127. package/dist/components/asset-context-menu.d.ts +32 -0
  128. package/dist/components/asset-context-menu.js +242 -0
  129. package/dist/components/composition-drop-preview.d.ts +9 -2
  130. package/dist/components/composition-drop-preview.js +7 -4
  131. package/dist/components/composition-menu-items.d.ts +4 -6
  132. package/dist/components/composition-menu-items.js +191 -75
  133. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  134. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  135. package/dist/components/get-open-in-menu-items.d.ts +6 -5
  136. package/dist/components/get-open-in-menu-items.js +22 -16
  137. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  138. package/dist/components/keyboard-shortcuts.js +3 -1
  139. package/dist/components/public-output-name.d.ts +1 -0
  140. package/dist/components/public-output-name.js +7 -3
  141. package/dist/components/selected-outline-order.js +18 -12
  142. package/dist/components/use-open-in-menu-apps.d.ts +14 -0
  143. package/dist/components/use-open-in-menu-apps.js +33 -0
  144. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
  145. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
  146. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
  147. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
  148. package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
  149. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-npa6szn1.mjs} +39 -8
  150. package/dist/esm/{LazyModels-gfmpcy4h.mjs → LazyModels-nh3c8h9p.mjs} +4 -3
  151. package/dist/esm/{LazyModels-m1rf06wh.mjs → LazyModels-rr5v8h5y.mjs} +4 -3
  152. package/dist/esm/{TranscriptionModal-8pvrehg4.mjs → TranscriptionModal-79m5wgcj.mjs} +25 -17
  153. package/dist/esm/{VideoMattingModal-fefbzgka.mjs → VideoMattingModal-31pew0xj.mjs} +9 -6
  154. package/dist/esm/index-21hxsfaa.mjs +239 -0
  155. package/dist/esm/{index-s848rffx.mjs → index-4zen9prq.mjs} +5438 -4686
  156. package/dist/esm/index-5t2dwxsk.mjs +530 -0
  157. package/dist/esm/{index-vsxrxfpj.mjs → index-614tdz2q.mjs} +1 -1
  158. package/dist/esm/{index-0x13f28h.mjs → index-9xxg6218.mjs} +20 -541
  159. package/dist/esm/{index-hbezgbbq.mjs → index-ac5550e7.mjs} +1 -1
  160. package/dist/esm/{index-41kqns5c.mjs → index-e855w59j.mjs} +15 -92
  161. package/dist/esm/{index-tzxb8808.mjs → index-n5gmcvhz.mjs} +8 -8
  162. package/dist/esm/{index-ggqpre9v.mjs → index-ppspzgn9.mjs} +4963 -4178
  163. package/dist/esm/{index-jrw61pkj.mjs → index-r0ejh5sy.mjs} +1 -1
  164. package/dist/esm/index-r1gr3j3a.mjs +80 -0
  165. package/dist/esm/{index-mww32xc8.mjs → index-s7qa3xbw.mjs} +6 -4
  166. package/dist/esm/{index-1089795y.mjs → index-vxwg66ar.mjs} +7 -22
  167. package/dist/esm/index.mjs +13 -6
  168. package/dist/esm/internals.mjs +10 -7
  169. package/dist/esm/previewEntry.mjs +10 -7
  170. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-qrp05g62.mjs} +1 -1
  171. package/dist/helpers/client-id.d.ts +1 -0
  172. package/dist/helpers/client-id.js +8 -4
  173. package/dist/helpers/copy-text.js +1 -16
  174. package/dist/helpers/cube-lut.d.ts +12 -0
  175. package/dist/helpers/cube-lut.js +160 -0
  176. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  177. package/dist/helpers/get-preview-file-type.js +3 -0
  178. package/dist/helpers/hoverable.js +2 -1
  179. package/dist/helpers/open-in-editor.d.ts +5 -2
  180. package/dist/helpers/open-in-editor.js +13 -5
  181. package/dist/helpers/settings-tab-availability.d.ts +14 -0
  182. package/dist/helpers/settings-tab-availability.js +35 -0
  183. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  184. package/dist/helpers/use-keybinding.d.ts +1 -1
  185. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  186. package/dist/helpers/use-menu-structure.js +31 -21
  187. package/dist/icons/lut.d.ts +4 -0
  188. package/dist/icons/lut.js +6 -0
  189. package/dist/icons/sparkles.d.ts +4 -0
  190. package/dist/icons/sparkles.js +6 -0
  191. package/dist/state/modals.d.ts +17 -2
  192. package/dist/state/timeline-zoom.js +4 -0
  193. package/package.json +19 -19
  194. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  195. package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
@@ -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");
@@ -182,6 +183,7 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
182
183
  displayName: fileName,
183
184
  audioStreamIndex: null,
184
185
  requestInit: null,
186
+ target: null,
185
187
  });
186
188
  }, [fileName, mutationsDisabled, setSelectedModal, src]);
187
189
  const onTrackMatting = (0, react_1.useCallback)(() => {
@@ -246,12 +248,12 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
246
248
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
247
249
  jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
248
250
  ? `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(common_1.InspectorSection, { header: "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(common_1.InspectorSection, { header: "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(common_1.InspectorSection, { header: "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
251
+ : '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
252
  ? Math.ceil(volumeMetadata.fps *
251
253
  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(common_1.InspectorSectionHeader, { children: "Actions" }), 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",
253
- 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" }) })
254
- ] })) : 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" })] })
254
+ : 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 && (mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.hasAudioTrack) !== false ? (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",
255
+ 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" }) })
256
+ ] })) : 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
257
  ] }));
256
258
  };
257
259
  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, _b, _c, _d, _e, _f;
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 = (_a = folderSymbolicatedStack === null || folderSymbolicatedStack === void 0 ? void 0 : folderSymbolicatedStack.originalFileName) !== null && _a !== void 0 ? _a : null;
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 = (_b = request.element.slug.split('/').at(-1)) !== null && _b !== void 0 ? _b : '';
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 [preparation, setPreparation] = (0, react_1.useState)(null);
413
- const currentPreparation = (preparation === null || preparation === void 0 ? void 0 : preparation.basePlan) === selectedPlan &&
414
- (preparation === null || preparation === void 0 ? void 0 : preparation.refresh) === refreshPlan &&
415
- (preparation === null || preparation === void 0 ? void 0 : preparation.requestedName) === requestedName
416
- ? preparation
417
- : null;
418
- const preparedInstallation = (_c = currentPreparation === null || currentPreparation === void 0 ? void 0 : currentPreparation.installation) !== null && _c !== void 0 ? _c : null;
419
- const planError = (_d = currentPreparation === null || currentPreparation === void 0 ? void 0 : currentPreparation.error) !== null && _d !== void 0 ? _d : null;
420
- const installationName = (_e = requestedName !== null && requestedName !== void 0 ? requestedName : preparedInstallation === null || preparedInstallation === void 0 ? void 0 : preparedInstallation.name) !== null && _e !== void 0 ? _e : elementBaseName;
421
- const [existingInstallation, setExistingInstallation] = (0, react_1.useState)(null);
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
- : ((_f = preparedInstallation === null || preparedInstallation === void 0 ? void 0 : preparedInstallation.plan) !== null && _f !== void 0 ? _f : null);
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
- setExistingInstallation((previous) => (previous === null || previous === void 0 ? void 0 : previous.basePlan) === selectedPlan &&
466
- previous.refresh === refreshPlan
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
- setPreparation({
476
- basePlan: selectedPlan,
477
- refresh: refreshPlan,
478
- requestedName,
479
- installation: prepared,
480
- error: null,
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
- setPreparation({
487
- basePlan: selectedPlan,
488
- refresh: refreshPlan,
489
- requestedName,
490
- installation: null,
491
- error: error instanceof Error ? error.message : String(error),
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
- ] }), activePlan ? (jsx_runtime_1.jsxs("dl", { style: requestSourceStyle, children: [
628
- jsx_runtime_1.jsx("dt", { style: sectionTitleStyle, children: "Destination" }), jsx_runtime_1.jsx("dd", { style: requestSourceDescriptionStyle, children: activePlan.filePath })
629
- ] })) : null, jsx_runtime_1.jsxs("div", { style: destinationControlStyle, children: [
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 copy_text_1 = require("../helpers/copy-text");
8
- const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
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 NotificationCenter_1 = require("./Notifications/NotificationCenter");
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 commandField = {
40
- alignItems: 'flex-start',
41
- background: colors_1.BLACK_ALPHA_30,
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 skillsIcon = {
65
- display: 'inline-block',
66
- height: 18,
67
- width: 18,
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 { codingAgentInfo } = (0, SettingsContext_1.useSettings)();
86
- const skillName = '/remotion-interactivity';
87
- const promptDetails = ` ${state.context} make "${state.prop}" interactive`;
88
- const prompt = `${skillName}${promptDetails}`;
89
- const installCommand = 'npx remotion skills add';
90
- const hasCodingAgent = ((_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) !== null && _a !== void 0 ? _a : 0) > 0;
91
- const { copied: promptCopied, markCopied: markPromptCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
92
- const { copied: installCommandCopied, markCopied: markInstallCommandCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
93
- const onCopyPrompt = (0, react_1.useCallback)(() => {
94
- (0, copy_text_1.copyText)(prompt)
95
- .then(markPromptCopied)
96
- .catch((err) => {
97
- (0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
98
- });
99
- }, [markPromptCopied, prompt]);
100
- const onCopyInstallCommand = (0, react_1.useCallback)(() => {
101
- (0, copy_text_1.copyText)(installCommand)
102
- .then(markInstallCommandCopied)
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
- (0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
83
+ if (!cancelled) {
84
+ setSourcePreview({
85
+ type: 'error',
86
+ message: err instanceof Error ? err.message : String(err),
87
+ });
88
+ }
105
89
  });
106
- }, [installCommand, markInstallCommandCopied]);
107
- const renderPromptCopyAction = (0, react_1.useCallback)((color) => {
108
- return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: promptCopied, color: color, style: copyIcon });
109
- }, [promptCopied]);
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: [state.remotionInteractivitySkillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
115
- jsx_runtime_1.jsx("div", { style: text, children: "First, install the Remotion Agent Skills:" }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
116
- jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyInstallCommand, renderAction: renderInstallCommandCopyAction, title: "Copy command" })
117
- ] })
118
- ] })), jsx_runtime_1.jsx("div", { style: {
119
- ...text,
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,9 @@
1
+ import React from 'react';
2
+ import type { ModalState } from '../state/modals';
3
+ type State = Extract<ModalState, {
4
+ type: 'generate-with-agent';
5
+ }>;
6
+ export declare const GenerateWithAgentModal: React.FC<{
7
+ readonly state: State;
8
+ }>;
9
+ export {};
@@ -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;
@@ -95,7 +95,7 @@ const InitialCompositionLoader = () => {
95
95
  if (!compositionListIsReady) {
96
96
  return;
97
97
  }
98
- if (compositions.length > 0) {
98
+ if (compositions.length > 0 && !window.remotion_isReadOnlyStudio) {
99
99
  selectComposition(compositions[0], true);
100
100
  }
101
101
  else {
@@ -13,6 +13,7 @@ const mobile_layout_1 = require("../helpers/mobile-layout");
13
13
  const noop_1 = require("../helpers/noop");
14
14
  const z_index_1 = require("../state/z-index");
15
15
  const InlineAction_1 = require("./InlineAction");
16
+ const menu_tree_context_1 = require("./Menu/menu-tree-context");
16
17
  const portals_1 = require("./Menu/portals");
17
18
  const styles_1 = require("./Menu/styles");
18
19
  const MenuContent_1 = require("./NewComposition/MenuContent");
@@ -23,6 +24,7 @@ const container = {
23
24
  const InlineDropdown = ({ values, getItems, onOpenChange, unhoveredColor, ...props }) => {
24
25
  var _a, _b;
25
26
  const ref = (0, react_1.useRef)(null);
27
+ const [menuTreeId] = (0, react_1.useState)(menu_tree_context_1.getNextMenuTreeId);
26
28
  const [opened, setOpened] = (0, react_1.useState)({ type: 'not-open' });
27
29
  const { currentZIndex } = (0, z_index_1.useZIndex)();
28
30
  const size = player_1.PlayerInternals.useElementSize(ref, {
@@ -96,9 +98,31 @@ const InlineDropdown = ({ values, getItems, onOpenChange, unhoveredColor, ...pro
96
98
  setOpened({ type: 'not-open' });
97
99
  onOpenChange === null || onOpenChange === void 0 ? void 0 : onOpenChange(false);
98
100
  }, [onOpenChange]);
101
+ (0, react_1.useEffect)(() => {
102
+ if (opened.type === 'not-open') {
103
+ return;
104
+ }
105
+ const dismissWithoutClickThrough = (event) => {
106
+ if (event.button !== 0) {
107
+ return;
108
+ }
109
+ const target = event.target;
110
+ if ((0, menu_tree_context_1.isNodeInMenuTree)(target, menuTreeId)) {
111
+ return;
112
+ }
113
+ event.preventDefault();
114
+ event.stopPropagation();
115
+ event.stopImmediatePropagation();
116
+ onHide();
117
+ };
118
+ window.addEventListener('pointerdown', dismissWithoutClickThrough, true);
119
+ return () => {
120
+ window.removeEventListener('pointerdown', dismissWithoutClickThrough, true);
121
+ };
122
+ }, [menuTreeId, onHide, opened.type]);
99
123
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
100
- jsx_runtime_1.jsx("div", { ref: ref, style: container, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props }) }), portalStyle && opened.type === 'open'
101
- ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: (_b = (_a = opened.values) !== null && _a !== void 0 ? _a : values) !== null && _b !== void 0 ? _b : [], onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
124
+ jsx_runtime_1.jsx("div", { ref: ref, style: container, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, unhoveredColor: opened.type === 'open' ? colors_1.WHITE : unhoveredColor, ...props, "aria-expanded": opened.type === 'open' }) }), portalStyle && opened.type === 'open'
125
+ ? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { "data-remotion-menu-tree-id": menuTreeId, style: portalStyle, onPointerDown: (event) => event.stopPropagation(), children: jsx_runtime_1.jsx(menu_tree_context_1.MenuTreeContext.Provider, { value: menuTreeId, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: (_b = (_a = opened.values) !== null && _a !== void 0 ? _a : values) !== null && _b !== void 0 ? _b : [], onHide: onHide, leaveLeftSpace: true, preselectIndex: false, topItemCanBeUnselected: false, fixedHeight: null }) }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
102
126
  : null] }));
103
127
  };
104
128
  exports.InlineDropdown = InlineDropdown;
@@ -35,6 +35,8 @@ const titleGridItem = {
35
35
  minWidth: 0,
36
36
  overflow: 'hidden',
37
37
  textOverflow: 'ellipsis',
38
+ userSelect: 'none',
39
+ WebkitUserSelect: 'none',
38
40
  whiteSpace: 'nowrap',
39
41
  };
40
42
  const titleInput = {
@@ -52,6 +54,7 @@ const titleInput = {
52
54
  outline: 'none',
53
55
  overflow: 'hidden',
54
56
  padding: 0,
57
+ userSelect: 'text',
55
58
  WebkitAppearance: 'none',
56
59
  width: '100%',
57
60
  };
@@ -78,14 +78,16 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
78
78
  ]);
79
79
  const menuItems = (0, react_1.useMemo)(() => {
80
80
  const items = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
81
+ canOpenDesktopApps: canConfigureApps,
81
82
  codingAgentInfo,
82
83
  editorDisabled: location === null || !canOpenInEditor,
83
84
  editorInfo,
84
85
  excludeCodingAgentId: null,
85
86
  excludeEditorId: defaultEditorId,
87
+ excludeGitSource: defaultOpenInTarget === 'git-source',
86
88
  fileManagerDisabled: !(location === null || location === void 0 ? void 0 : location.source) || previewServerState.type !== 'connected',
87
89
  folder: locationType === 'folder',
88
- location,
90
+ gitSourceDisabled: location === null,
89
91
  onConfigureApps: configureDefaultApps,
90
92
  onOpenInCodingAgent: (codingAgentId, codingAgentName) => {
91
93
  openWithCodingAgent(codingAgentId, codingAgentName).catch(() => undefined);
@@ -112,6 +114,9 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
112
114
  (0, NotificationCenter_1.showNotification)(`Could not open Git client: ${err.message}`, 2000);
113
115
  });
114
116
  },
117
+ onOpenInGitSource: () => {
118
+ (0, get_git_menu_item_1.openGitSource)({ folder: locationType === 'folder', location });
119
+ },
115
120
  onOpenInTerminal: (terminalId) => {
116
121
  if (!(location === null || location === void 0 ? void 0 : location.source) || locationType !== 'folder') {
117
122
  return;
@@ -127,11 +132,10 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
127
132
  });
128
133
  },
129
134
  });
130
- return defaultOpenInTarget === 'git-source'
131
- ? items.filter((item) => item.id !== 'open-in-github')
132
- : items;
135
+ return items;
133
136
  }, [
134
137
  codingAgentInfo,
138
+ canConfigureApps,
135
139
  canOpenInEditor,
136
140
  configureDefaultApps,
137
141
  defaultEditorId,
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare const CollapsibleInspectorSection: React.FC<{
3
+ readonly children: React.ReactNode;
4
+ readonly collapsible: boolean;
5
+ readonly label: string;
6
+ readonly sectionId: string;
7
+ }>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CollapsibleInspectorSection = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const CollapsibleInspectorSectionHeader_1 = require("./CollapsibleInspectorSectionHeader");
6
+ const common_1 = require("./common");
7
+ const use_inspector_section_expanded_1 = require("./use-inspector-section-expanded");
8
+ const CollapsibleInspectorSection = ({ children, collapsible, label, sectionId }) => {
9
+ const [expanded, setExpanded] = (0, use_inspector_section_expanded_1.useInspectorSectionExpanded)(sectionId);
10
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
11
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: null, expanded: expanded, label: label, onToggle: collapsible ? () => setExpanded(!expanded) : null }) }), jsx_runtime_1.jsx(common_1.InspectorSectionBody, { expanded: !collapsible || expanded, children: children })
12
+ ] }));
13
+ };
14
+ exports.CollapsibleInspectorSection = CollapsibleInspectorSection;
@@ -3,5 +3,5 @@ export declare const CollapsibleInspectorSectionHeader: React.FC<{
3
3
  readonly action: React.ReactNode;
4
4
  readonly expanded: boolean;
5
5
  readonly label: string;
6
- readonly onToggle: () => void;
6
+ readonly onToggle: (() => void) | null;
7
7
  }>;