@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.
Files changed (230) 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/ActionTooltip.d.ts +2 -0
  5. package/dist/components/ActionTooltip.js +14 -4
  6. package/dist/components/AgentPrompt.d.ts +6 -0
  7. package/dist/components/AgentPrompt.js +107 -0
  8. package/dist/components/AppLaunchButton.js +2 -0
  9. package/dist/components/AssetFileIcon.js +2 -0
  10. package/dist/components/AssetSelectorItem.d.ts +1 -23
  11. package/dist/components/AssetSelectorItem.js +10 -200
  12. package/dist/components/AssetSelectorModal.d.ts +6 -0
  13. package/dist/components/AssetSelectorModal.js +174 -0
  14. package/dist/components/Canvas.js +21 -4
  15. package/dist/components/CaptionInspector.js +9 -3
  16. package/dist/components/CheckboardToggle.js +2 -1
  17. package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
  18. package/dist/components/CodeFrame.js +77 -0
  19. package/dist/components/ColorPicker/AlphaSlider.js +1 -1
  20. package/dist/components/ColorPicker/HueSlider.js +1 -1
  21. package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
  22. package/dist/components/CompositionSelector.js +1 -0
  23. package/dist/components/CompositionSelectorItem.js +7 -17
  24. package/dist/components/CurrentAsset.js +5 -4
  25. package/dist/components/EditorGuides/Guide.js +1 -1
  26. package/dist/components/ElementInstallConfirmation.js +100 -61
  27. package/dist/components/FilePreview.js +4 -0
  28. package/dist/components/FixComputedValueModal.js +64 -96
  29. package/dist/components/FullscreenToggle.js +1 -1
  30. package/dist/components/GenerateWithAgentModal.d.ts +9 -0
  31. package/dist/components/GenerateWithAgentModal.js +39 -0
  32. package/dist/components/GlobalKeybindings.js +14 -0
  33. package/dist/components/InlineEditableTitle.js +2 -0
  34. package/dist/components/InspectorLocationCopy.js +1 -1
  35. package/dist/components/InspectorOpenInEditor.d.ts +1 -0
  36. package/dist/components/InspectorOpenInEditor.js +25 -18
  37. package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
  38. package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
  39. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
  40. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +19 -8
  41. package/dist/components/InspectorPanel/CompositionInspector.js +30 -13
  42. package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
  43. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  44. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
  45. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
  46. package/dist/components/InspectorPanel/GuideInspector.js +2 -3
  47. package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
  48. package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -1
  49. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
  50. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -3
  51. package/dist/components/InspectorPanel/common.d.ts +4 -0
  52. package/dist/components/InspectorPanel/common.js +14 -2
  53. package/dist/components/InspectorPanel/styles.d.ts +0 -3
  54. package/dist/components/InspectorPanel/styles.js +1 -27
  55. package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
  56. package/dist/components/InspectorPanel/use-composition-actions.js +15 -0
  57. package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
  58. package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
  59. package/dist/components/InspectorSequenceSection.js +61 -43
  60. package/dist/components/InspectorSourceLocation.js +1 -0
  61. package/dist/components/KeyboardShortcutsSettings.js +12 -4
  62. package/dist/components/LoopToggle.js +2 -1
  63. package/dist/components/LutPreview.d.ts +4 -0
  64. package/dist/components/LutPreview.js +192 -0
  65. package/dist/components/Menu/MenuItem.js +1 -2
  66. package/dist/components/MenuBuildIndicator.js +1 -1
  67. package/dist/components/MenuCompositionName.js +4 -9
  68. package/dist/components/Modals.js +4 -6
  69. package/dist/components/ModelsSettings.js +15 -4
  70. package/dist/components/MuteToggle.js +2 -1
  71. package/dist/components/NewComposition/CodemodFooter.js +1 -0
  72. package/dist/components/NewComposition/DeleteComposition.js +42 -6
  73. package/dist/components/NewComposition/DeleteFolder.js +1 -0
  74. package/dist/components/NewComposition/DuplicateComposition.js +5 -0
  75. package/dist/components/NewComposition/InputDragger.js +2 -2
  76. package/dist/components/NewComposition/NewFolder.js +29 -2
  77. package/dist/components/NewComposition/RenameFolder.js +1 -0
  78. package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
  79. package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
  80. package/dist/components/OutlineToggle.js +2 -1
  81. package/dist/components/PlayPause.js +1 -1
  82. package/dist/components/Preview.js +0 -3
  83. package/dist/components/PreviewToolbar.js +3 -6
  84. package/dist/components/PreviewToolbarOverflowButton.js +2 -1
  85. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  86. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
  87. package/dist/components/RenderButton.js +40 -4
  88. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
  89. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
  90. package/dist/components/RenderModal/WebRenderModal.js +10 -2
  91. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  92. package/dist/components/RenderModal/render-modals.js +3 -0
  93. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +1 -1
  94. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +1 -1
  95. package/dist/components/RenderQueue/actions.d.ts +2 -1
  96. package/dist/components/RenderQueue/actions.js +2 -1
  97. package/dist/components/RendersTab.js +2 -0
  98. package/dist/components/RulersAndGuidesToggle.js +2 -1
  99. package/dist/components/SegmentedButton.d.ts +1 -0
  100. package/dist/components/SegmentedButton.js +9 -3
  101. package/dist/components/SelectedOutlineElement.js +22 -6
  102. package/dist/components/SelectedOutlinePolygon.js +4 -2
  103. package/dist/components/SettingsButton.js +11 -2
  104. package/dist/components/SettingsContext.d.ts +8 -0
  105. package/dist/components/SettingsContext.js +57 -2
  106. package/dist/components/SettingsModal.d.ts +1 -2
  107. package/dist/components/SettingsModal.js +27 -6
  108. package/dist/components/SettingsModalFooter.js +17 -3
  109. package/dist/components/SidebarCollapserControls.js +1 -1
  110. package/dist/components/SkillsSettings.d.ts +5 -0
  111. package/dist/components/SkillsSettings.js +49 -15
  112. package/dist/components/SnappingToggle.js +2 -1
  113. package/dist/components/Splitter/SplitterHandle.js +1 -2
  114. package/dist/components/Tabs/vertical.d.ts +1 -1
  115. package/dist/components/Tabs/vertical.js +16 -2
  116. package/dist/components/Timeline/EasingEditorModal.js +2 -2
  117. package/dist/components/Timeline/Timeline.js +10 -11
  118. package/dist/components/Timeline/TimelineAssetField.js +178 -9
  119. package/dist/components/Timeline/TimelineDragHandler.js +1 -2
  120. package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineEffectItem.js +2 -2
  122. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  124. package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
  125. package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
  126. package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +15 -1
  128. package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
  129. package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
  130. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
  131. package/dist/components/Timeline/TimelineLayerEye.js +6 -3
  132. package/dist/components/Timeline/TimelineList.js +9 -3
  133. package/dist/components/Timeline/TimelineSchemaField.js +10 -7
  134. package/dist/components/Timeline/TimelineSelection.d.ts +17 -4
  135. package/dist/components/Timeline/TimelineSelection.js +121 -52
  136. package/dist/components/Timeline/TimelineSequence.js +8 -8
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +29 -23
  139. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
  140. package/dist/components/Timeline/TimelineTranslateField.js +25 -12
  141. package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
  142. package/dist/components/Timeline/TimelineZoomControls.js +1 -1
  143. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  144. package/dist/components/Timeline/get-sequence-context-menu-items.js +152 -51
  145. package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
  146. package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
  147. package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
  148. package/dist/components/Timeline/timeline-display-groups.js +66 -0
  149. package/dist/components/Timeline/timeline-field-display-utils.js +4 -2
  150. package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
  151. package/dist/components/Timeline/timeline-translate-utils.js +53 -12
  152. package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
  153. package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
  154. package/dist/components/Timeline/use-timeline-asset-drop.js +20 -6
  155. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  156. package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
  157. package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
  158. package/dist/components/TimelineCombobox.js +1 -0
  159. package/dist/components/UndoRedoButtons.js +11 -0
  160. package/dist/components/UpdateStatusContext.d.ts +2 -2
  161. package/dist/components/UpdateStatusContext.js +6 -7
  162. package/dist/components/UpdatesSettings.js +6 -6
  163. package/dist/components/WebMcp.js +40 -41
  164. package/dist/components/asset-context-menu.d.ts +32 -0
  165. package/dist/components/asset-context-menu.js +242 -0
  166. package/dist/components/composition-menu-items.d.ts +4 -6
  167. package/dist/components/composition-menu-items.js +212 -42
  168. package/dist/components/folder-menu-items.js +44 -0
  169. package/dist/components/get-open-in-menu-items.d.ts +6 -5
  170. package/dist/components/get-open-in-menu-items.js +16 -10
  171. package/dist/components/import-assets.d.ts +24 -1
  172. package/dist/components/import-assets.js +3 -1
  173. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  174. package/dist/components/keyboard-shortcuts.js +5 -0
  175. package/dist/components/selected-outline-order.js +18 -12
  176. package/dist/components/use-open-in-menu-apps.d.ts +14 -0
  177. package/dist/components/use-open-in-menu-apps.js +33 -0
  178. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
  179. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
  180. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
  181. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
  182. package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
  183. package/dist/esm/{LazyModels-hc33szyn.mjs → LazyModels-mtggyjye.mjs} +3 -3
  184. package/dist/esm/{LazyModels-sg40rjw6.mjs → LazyModels-nk7py0zt.mjs} +3 -3
  185. package/dist/esm/{TranscriptionModal-3ctnxpt6.mjs → TranscriptionModal-ymnx1c7m.mjs} +6 -6
  186. package/dist/esm/{VideoMattingModal-b0r7e60n.mjs → VideoMattingModal-05vpczks.mjs} +6 -6
  187. package/dist/esm/{index-er3mh6em.mjs → index-0gewwxse.mjs} +7031 -5834
  188. package/dist/esm/{index-q5xv20xx.mjs → index-4dsz9035.mjs} +8 -8
  189. package/dist/esm/{index-wbmp5srk.mjs → index-5bfxbpca.mjs} +1 -1
  190. package/dist/esm/{index-e3zwf3e7.mjs → index-5gd8k9yv.mjs} +1 -1
  191. package/dist/esm/{index-c37kme2v.mjs → index-bs39wngg.mjs} +4929 -3801
  192. package/dist/esm/{index-yfrysr5f.mjs → index-cdy8v54v.mjs} +17 -3
  193. package/dist/esm/{index-9qtvmwtx.mjs → index-eb5txqp6.mjs} +12 -9
  194. package/dist/esm/{index-q2epbw93.mjs → index-f97r9e2g.mjs} +4 -21
  195. package/dist/esm/{index-2j3d1g81.mjs → index-g7k2dvar.mjs} +1 -1
  196. package/dist/esm/{index-1b9skrrd.mjs → index-x40wwfmt.mjs} +3 -3
  197. package/dist/esm/index.mjs +12 -6
  198. package/dist/esm/internals.mjs +7 -7
  199. package/dist/esm/previewEntry.mjs +7 -7
  200. package/dist/helpers/client-id.d.ts +1 -0
  201. package/dist/helpers/client-id.js +8 -4
  202. package/dist/helpers/cube-lut.d.ts +12 -0
  203. package/dist/helpers/cube-lut.js +160 -0
  204. package/dist/helpers/get-git-menu-item.d.ts +4 -0
  205. package/dist/helpers/get-git-menu-item.js +8 -1
  206. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  207. package/dist/helpers/get-preview-file-type.js +3 -0
  208. package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
  209. package/dist/helpers/get-sequence-double-click-action.js +2 -2
  210. package/dist/helpers/open-in-editor.d.ts +5 -2
  211. package/dist/helpers/open-in-editor.js +12 -4
  212. package/dist/helpers/pointer-session.d.ts +1 -0
  213. package/dist/helpers/pointer-session.js +10 -1
  214. package/dist/helpers/settings-tab-availability.d.ts +14 -0
  215. package/dist/helpers/settings-tab-availability.js +35 -0
  216. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  217. package/dist/helpers/use-create-composition.js +5 -0
  218. package/dist/helpers/use-keybinding.d.ts +1 -1
  219. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  220. package/dist/helpers/use-media-metadata.js +5 -1
  221. package/dist/helpers/use-menu-structure.js +21 -13
  222. package/dist/helpers/use-rename-composition.js +6 -1
  223. package/dist/icons/lut.d.ts +4 -0
  224. package/dist/icons/lut.js +6 -0
  225. package/dist/icons/sparkles.d.ts +4 -0
  226. package/dist/icons/sparkles.js +6 -0
  227. package/dist/state/modals.d.ts +25 -3
  228. package/dist/state/z-index.js +1 -3
  229. package/package.json +19 -19
  230. package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
@@ -4,7 +4,6 @@ exports.getOpenInMenuItems = exports.getConfigureDefaultAppsMenuItems = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const no_react_1 = require("remotion/no-react");
6
6
  const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
7
- const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
8
7
  const editor_1 = require("../icons/editor");
9
8
  const finder_1 = require("../icons/finder");
10
9
  const git_client_1 = require("../icons/git-client");
@@ -39,11 +38,11 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
39
38
  ];
40
39
  };
41
40
  exports.getConfigureDefaultAppsMenuItems = getConfigureDefaultAppsMenuItems;
42
- const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, location, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInTerminal, }) => {
41
+ const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }) => {
43
42
  var _a, _b, _c, _d;
44
- const showFinder = window.remotion_fileSystemPlatform === 'darwin';
43
+ const showFinder = canOpenDesktopApps && window.remotion_fileSystemPlatform === 'darwin';
45
44
  const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
46
- const editors = ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : [])
45
+ const editors = (canOpenDesktopApps ? ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : []) : [])
47
46
  .filter((editor) => editor.id !== excludeEditorId)
48
47
  .map((editor) => ({
49
48
  disabled: editorDisabled,
@@ -61,7 +60,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
61
60
  type: 'item',
62
61
  value: editor.id,
63
62
  }));
64
- const codingAgents = ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : [])
63
+ const codingAgents = (canOpenDesktopApps ? ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : []) : [])
65
64
  .filter((codingAgent) => codingAgent.id !== excludeCodingAgentId)
66
65
  .map((codingAgent) => ({
67
66
  id: `open-in-coding-agent-${codingAgent.id}`,
@@ -74,16 +73,23 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
74
73
  type: 'item',
75
74
  value: `coding-agent-${codingAgent.id}`,
76
75
  }));
77
- const terminals = folder ? ((_c = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedTerminals) !== null && _c !== void 0 ? _c : []) : [];
78
- const gitClients = folder ? ((_d = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedGitClients) !== null && _d !== void 0 ? _d : []) : [];
79
- const gitHubItem = window.remotion_gitSource
76
+ const terminals = canOpenDesktopApps && folder
77
+ ? ((_c = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedTerminals) !== null && _c !== void 0 ? _c : [])
78
+ : [];
79
+ const gitClients = canOpenDesktopApps && folder
80
+ ? ((_d = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedGitClients) !== null && _d !== void 0 ? _d : [])
81
+ : [];
82
+ const gitHubItem = window.remotion_gitSource && !excludeGitSource
80
83
  ? {
84
+ disabled: gitSourceDisabled,
81
85
  id: 'open-in-github',
82
86
  keyHint: null,
83
87
  label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "GitHub.com" }),
84
- leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 18 }),
88
+ leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 16 }),
85
89
  onClick: () => {
86
- (0, get_git_menu_item_1.openGitSource)({ folder, location });
90
+ if (!gitSourceDisabled) {
91
+ onOpenInGitSource();
92
+ }
87
93
  },
88
94
  quickSwitcherLabel: null,
89
95
  subMenu: null,
@@ -156,7 +156,7 @@ export declare const insertComposition: ({ composition, compositionFile, composi
156
156
  from: number | null;
157
157
  preferCompositionStart: boolean | null;
158
158
  }) => Promise<void>;
159
- export declare const insertElement: ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, }: {
159
+ export declare const insertElement: ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, undoRedoNavigation, newComposition, }: {
160
160
  installationName: string | null;
161
161
  compositionFile: string;
162
162
  compositionId: string;
@@ -165,4 +165,27 @@ export declare const insertElement: ({ installationName, compositionFile, compos
165
165
  position: InsertableCompositionElementPosition | null;
166
166
  from: number | null;
167
167
  overwriteExisting: boolean;
168
+ undoRedoNavigation: import("@remotion/studio-shared").UndoRedoNavigation | null;
169
+ newComposition: {
170
+ codemod: {
171
+ type: "new-composition";
172
+ newId: string;
173
+ componentName: string;
174
+ componentImportPath: string;
175
+ folderName: string | null;
176
+ parentName: string | null;
177
+ newHeight: number;
178
+ newWidth: number;
179
+ newFps: number;
180
+ newDurationInFrames: number;
181
+ canvasCapture: {
182
+ readonly videoFileName: string;
183
+ readonly videoHeight: number;
184
+ readonly videoWidth: number;
185
+ readonly keyframeFps: number;
186
+ readonly data: import("@remotion/studio-shared").CanvasCaptureData;
187
+ } | null;
188
+ };
189
+ symbolicatedStack: import("@remotion/studio-shared").SymbolicatedStackFrame | null;
190
+ } | null;
168
191
  }) => Promise<boolean>;
@@ -875,7 +875,7 @@ const insertComposition = async ({ composition, compositionFile, compositionId,
875
875
  }
876
876
  };
877
877
  exports.insertComposition = insertComposition;
878
- const insertElement = async ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, }) => {
878
+ const insertElement = async ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, undoRedoNavigation, newComposition, }) => {
879
879
  try {
880
880
  if ((0, browser_studio_operations_1.getBrowserStudioOperations)() === null) {
881
881
  await (0, install_required_package_1.installRequiredPackages)(element.dependencies);
@@ -889,6 +889,8 @@ const insertElement = async ({ installationName, compositionFile, compositionId,
889
889
  from,
890
890
  overwriteExisting,
891
891
  position,
892
+ undoRedoNavigation,
893
+ newComposition,
892
894
  });
893
895
  if (!response.success) {
894
896
  const reason = response.type === 'error'
@@ -12,15 +12,15 @@ export type KeyboardShortcutGroup = {
12
12
  export declare const defaultKeyboardShortcuts: Record<StudioKeyboardShortcutAction, readonly StudioKeyboardShortcut[]>;
13
13
  export declare const keyboardShortcutGroups: readonly KeyboardShortcutGroup[];
14
14
  export declare const askAIKeyboardShortcutGroup: KeyboardShortcutGroup;
15
- export declare const getKeyboardShortcutsForAction: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", configured?: Partial<Record<"askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", StudioKeyboardShortcutValue>> | null) => readonly StudioKeyboardShortcut[];
15
+ export declare const getKeyboardShortcutsForAction: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", configured?: Partial<Record<"askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", StudioKeyboardShortcutValue>> | null) => readonly StudioKeyboardShortcut[];
16
16
  export declare const keyboardEventMatchesShortcut: ({ event, shortcut: value, }: {
17
17
  readonly event: KeyboardEvent;
18
18
  readonly shortcut: StudioKeyboardShortcut;
19
19
  }) => boolean;
20
20
  export declare const keyboardShortcutsOverlap: (first: StudioKeyboardShortcut, second: StudioKeyboardShortcut) => boolean;
21
- export declare const keyboardEventMatchesAction: (event: KeyboardEvent, action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => boolean;
21
+ export declare const keyboardEventMatchesAction: (event: KeyboardEvent, action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => boolean;
22
22
  export declare const formatKeyboardShortcut: (value: StudioKeyboardShortcut) => readonly string[];
23
23
  export declare const formatKeyboardShortcutForAria: (value: StudioKeyboardShortcut) => string;
24
- export declare const getKeyboardShortcutLabel: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
25
- export declare const getKeyboardShortcutAriaKeyShortcuts: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
24
+ export declare const getKeyboardShortcutLabel: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
25
+ export declare const getKeyboardShortcutAriaKeyShortcuts: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
26
26
  export declare const shortcutFromKeyboardEvent: (event: KeyboardEvent) => StudioKeyboardShortcut | null;
@@ -50,6 +50,7 @@ exports.defaultKeyboardShortcuts = {
50
50
  cutEffects: [{ key: 'x', commandOrControl: true }],
51
51
  deleteSelection: [{ key: 'Backspace' }, { key: 'Delete' }],
52
52
  askAI: [{ key: 'i', commandOrControl: true }],
53
+ pickColor: [{ key: 'c', shift: true }],
53
54
  };
54
55
  exports.keyboardShortcutGroups = [
55
56
  {
@@ -116,6 +117,10 @@ exports.keyboardShortcutGroups = [
116
117
  shortcut('Reset zoom', 'resetZoom'),
117
118
  ],
118
119
  },
120
+ {
121
+ name: 'Tools',
122
+ shortcuts: [shortcut('Color Picker', 'pickColor')],
123
+ },
119
124
  {
120
125
  name: 'Props Editor',
121
126
  shortcuts: [shortcut('Undo', 'undo'), shortcut('Redo', 'redo')],
@@ -44,9 +44,7 @@ const getOutlineBounds = (outline) => {
44
44
  minY: Math.min(...ys),
45
45
  };
46
46
  };
47
- const outlineBoundsOverlap = (a, b) => {
48
- const aBounds = getOutlineBounds(a);
49
- const bBounds = getOutlineBounds(b);
47
+ const outlineBoundsOverlap = (aBounds, bBounds) => {
50
48
  return (aBounds.minX <= bBounds.maxX + outlineBoundsOverlapTolerance &&
51
49
  aBounds.maxX + outlineBoundsOverlapTolerance >= bBounds.minX &&
52
50
  aBounds.minY <= bBounds.maxY + outlineBoundsOverlapTolerance &&
@@ -177,13 +175,26 @@ const orderOutlineGroup = ({ outlines, parentBySequenceId, targetsByKey, }) => {
177
175
  // For unrelated overlapping outlines, put broader hit targets below
178
176
  // smaller ones so a large selected sequence cannot swallow clicks on
179
177
  // a more specific element in the same canvas area.
178
+ const bounds = outlines.map(getOutlineBounds);
179
+ const areas = outlines.map(getOutlineHitArea);
180
180
  for (let i = 0; i < outlines.length; i++) {
181
+ const a = outlines[i];
182
+ const aTarget = targetsByKey.get(a.key);
183
+ if (aTarget === undefined) {
184
+ continue;
185
+ }
181
186
  for (let j = i + 1; j < outlines.length; j++) {
182
- const a = outlines[i];
187
+ if (!outlineBoundsOverlap(bounds[i], bounds[j])) {
188
+ continue;
189
+ }
190
+ const aArea = areas[i];
191
+ const bArea = areas[j];
192
+ if (Math.abs(aArea - bArea) <= outlineAreaEqualityTolerance) {
193
+ continue;
194
+ }
183
195
  const b = outlines[j];
184
- const aTarget = targetsByKey.get(a.key);
185
196
  const bTarget = targetsByKey.get(b.key);
186
- if (aTarget === undefined || bTarget === undefined) {
197
+ if (bTarget === undefined) {
187
198
  continue;
188
199
  }
189
200
  const aAncestorOfB = isAncestorTarget({
@@ -196,12 +207,7 @@ const orderOutlineGroup = ({ outlines, parentBySequenceId, targetsByKey, }) => {
196
207
  descendant: aTarget,
197
208
  parentBySequenceId,
198
209
  });
199
- if (aAncestorOfB || bAncestorOfA || !outlineBoundsOverlap(a, b)) {
200
- continue;
201
- }
202
- const aArea = getOutlineHitArea(a);
203
- const bArea = getOutlineHitArea(b);
204
- if (Math.abs(aArea - bArea) <= outlineAreaEqualityTolerance) {
210
+ if (aAncestorOfB || bAncestorOfA) {
205
211
  continue;
206
212
  }
207
213
  if (aArea > bArea) {
@@ -0,0 +1,14 @@
1
+ import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
2
+ export type OpenInMenuApps = {
3
+ readonly canOpenDesktopApps: boolean;
4
+ readonly canOpenInEditor: boolean;
5
+ readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
6
+ readonly defaultEditorId: EditorPickerId | null;
7
+ readonly defaultEditorName: string | null;
8
+ readonly editorInfo: GetDefaultEditorInfoResponse | null;
9
+ readonly onConfigureApps: (() => void) | null;
10
+ };
11
+ export declare const useOpenInMenuApps: () => {
12
+ connectionStatus: "connected" | "disconnected" | "init";
13
+ openInApps: OpenInMenuApps;
14
+ };
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useOpenInMenuApps = void 0;
4
+ const react_1 = require("react");
5
+ const client_id_1 = require("../helpers/client-id");
6
+ const use_configure_default_apps_1 = require("./use-configure-default-apps");
7
+ const use_default_editor_info_1 = require("./use-default-editor-info");
8
+ const useOpenInMenuApps = () => {
9
+ const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
10
+ .previewServerState.type;
11
+ const { canConfigureApps, canOpenInEditor, defaultEditorId, defaultEditorName, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(connectionStatus === 'connected');
12
+ const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
13
+ const onConfigureApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
14
+ const openInApps = (0, react_1.useMemo)(() => ({
15
+ canOpenDesktopApps: canConfigureApps,
16
+ canOpenInEditor,
17
+ codingAgentInfo,
18
+ defaultEditorId,
19
+ defaultEditorName,
20
+ editorInfo,
21
+ onConfigureApps,
22
+ }), [
23
+ canOpenInEditor,
24
+ canConfigureApps,
25
+ codingAgentInfo,
26
+ defaultEditorId,
27
+ defaultEditorName,
28
+ editorInfo,
29
+ onConfigureApps,
30
+ ]);
31
+ return { connectionStatus, openInApps };
32
+ };
33
+ exports.useOpenInMenuApps = useOpenInMenuApps;
@@ -123,7 +123,7 @@ const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButto
123
123
  canOpenInEditor &&
124
124
  defaultEditorId &&
125
125
  defaultEditorName ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
126
- jsx_runtime_1.jsx(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, editorId: defaultEditorId, editorName: defaultEditorName, stack: stackFrames[0] }), jsx_runtime_1.jsx("div", { style: spacer })
126
+ jsx_runtime_1.jsx(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, editorId: defaultEditorId, editorName: defaultEditorName, size: "default", stack: stackFrames[0] }), jsx_runtime_1.jsx("div", { style: spacer })
127
127
  ] })) : null, jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Fix with", prompt: fixWithAgentPrompt, size: "default", style: codingAgentButton }), jsx_runtime_1.jsx(CopyStackTrace_1.CopyStackTrace, { errorText: errorTextForCopy }), jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(SearchGitHubIssues_1.SearchGithubIssues, { canHaveKeyboardShortcuts: keyboardShortcuts, message: display.error.message }), jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(AskOnDiscord_1.AskOnDiscord, { canHaveKeyboardShortcuts: keyboardShortcuts }), onRetry ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
128
128
  jsx_runtime_1.jsx("div", { style: spacer }), jsx_runtime_1.jsx(Retry_1.RetryButton, { onClick: onRetry, label: calculateMetadata ? 'Retry calculateMetadata()' : 'Retry' })
129
129
  ] })) : null] }), calculateMetadata ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
@@ -133,7 +133,7 @@ const ErrorDisplay = ({ display, keyboardShortcuts, onRetry, canHaveDismissButto
133
133
  ] })) : null, stackFrames.length > 0 ? (jsx_runtime_1.jsx("div", { style: stack, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: stackFrames.map((s, i) => {
134
134
  return (jsx_runtime_1.jsx(StackFrame_1.StackElement
135
135
  // eslint-disable-next-line react/no-array-index-key
136
- , { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)', editorId: canOpenInEditor ? defaultEditorId : null }, i));
136
+ , { collapsible: true, isFirst: i === 0, s: s, fontSize: 14, headerAction: null, horizontalSpacing: 14, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)', editorId: canOpenInEditor ? defaultEditorId : null }, i));
137
137
  }) })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
138
138
  jsx_runtime_1.jsx("pre", { "aria-label": "Unsymbolicated stack trace", className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, style: rawStack, children: (_a = display.error.stack) !== null && _a !== void 0 ? _a : 'Check the Terminal and browser console for error messages.' }), symbolicationFailure ? (jsx_runtime_1.jsx("div", { style: symbolicationFailureStyle, children: symbolicationFailure })) : null] }))] }));
139
139
  };
@@ -5,4 +5,5 @@ export declare const OpenInEditor: React.FC<{
5
5
  readonly canHaveKeyboardShortcuts: boolean;
6
6
  readonly editorId: EditorPickerId;
7
7
  readonly editorName: string;
8
+ readonly size: 'compact' | 'default';
8
9
  }>;
@@ -17,7 +17,7 @@ const menuLabel = {
17
17
  fontSize: 13,
18
18
  lineHeight: '16px',
19
19
  };
20
- const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName }) => {
20
+ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, size }) => {
21
21
  const { editorInfo } = (0, SettingsContext_1.useSettings)();
22
22
  const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
23
23
  const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
@@ -68,8 +68,8 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName })
68
68
  }));
69
69
  return editorItems;
70
70
  }, [editorId, editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors, openWithEditor]);
71
- return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: "error-overlay-open-in-editor", ariaLabel: `Open in ${editorName}`, disabled: false, menuAriaLabel: "Open in another app", menuButtonId: "error-overlay-open-in-another-app", menuItems: menuItems, onConfigureApps: configureDefaultApps, onClick: openPreferredEditor, size: "default", style: null, title: `Open in ${editorName}`, children: [
72
- jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: 14 }),
71
+ return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: "error-overlay-open-in-editor", ariaLabel: `Open in ${editorName}`, disabled: false, menuAriaLabel: "Open in another app", menuButtonId: "error-overlay-open-in-another-app", menuItems: menuItems, onConfigureApps: configureDefaultApps, onClick: openPreferredEditor, size: size, style: null, title: `Open in ${editorName}`, children: [
72
+ jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: size === 'default' ? 14 : 18 }),
73
73
  "Open in ", editorName, canHaveKeyboardShortcuts ? (jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "o", cmdOrCtrl: true })) : null] }));
74
74
  };
75
75
  exports.OpenInEditor = OpenInEditor;
@@ -4,6 +4,10 @@ export declare const StackElement: React.FC<{
4
4
  readonly s: SymbolicatedStackFrame;
5
5
  readonly lineNumberWidth: number;
6
6
  readonly isFirst: boolean;
7
- readonly defaultFunctionName: string;
7
+ readonly defaultFunctionName: string | null;
8
8
  readonly editorId: EditorPickerId | null;
9
+ readonly collapsible: boolean;
10
+ readonly fontSize: number;
11
+ readonly horizontalSpacing: number;
12
+ readonly headerAction: React.ReactNode;
9
13
  }>;
@@ -4,22 +4,20 @@ exports.StackElement = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const Button_1 = require("../../components/Button");
7
+ const CodeFrame_1 = require("../../components/CodeFrame");
7
8
  const colors_1 = require("../../helpers/colors");
9
+ const hoverable_1 = require("../../helpers/hoverable");
8
10
  const open_in_editor_1 = require("../../helpers/open-in-editor");
9
11
  const caret_1 = require("../../icons/caret");
10
- const CodeFrame_1 = require("./CodeFrame");
11
12
  const format_location_1 = require("./format-location");
12
13
  const location = {
13
14
  color: colors_1.LIGHT_TEXT,
14
15
  fontFamily: 'monospace',
15
- fontSize: 14,
16
16
  overflowWrap: 'anywhere',
17
17
  };
18
18
  const header = {
19
- paddingLeft: 14,
20
19
  paddingTop: 10,
21
20
  paddingBottom: 10,
22
- paddingRight: 14,
23
21
  display: 'flex',
24
22
  flexDirection: 'row',
25
23
  alignItems: 'center',
@@ -30,11 +28,10 @@ const left = {
30
28
  minWidth: 0,
31
29
  };
32
30
  const fnName = {
33
- fontSize: 14,
34
31
  lineHeight: 1.5,
35
32
  marginBottom: 3,
36
33
  };
37
- const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editorId }) => {
34
+ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editorId, collapsible, fontSize, horizontalSpacing, headerAction, }) => {
38
35
  var _a;
39
36
  const [showCodeFrame, setShowCodeFrame] = (0, react_1.useState)(() => {
40
37
  var _a, _b;
@@ -42,7 +39,6 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
42
39
  !((_b = s.originalFileName) === null || _b === void 0 ? void 0 : _b.startsWith('webpack/'))) ||
43
40
  isFirst;
44
41
  });
45
- const [locationHovered, setLocationHovered] = (0, react_1.useState)(false);
46
42
  const canOpenFileLocation = Boolean(editorId && s.originalFileName);
47
43
  const onOpenFileLocation = (0, react_1.useCallback)(() => {
48
44
  if (!canOpenFileLocation) {
@@ -59,26 +55,37 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
59
55
  const toggleCodeFrame = (0, react_1.useCallback)(() => {
60
56
  setShowCodeFrame((f) => !f);
61
57
  }, []);
58
+ const functionName = (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName;
59
+ const shouldShowCodeFrame = collapsible ? showCodeFrame : true;
62
60
  return (jsx_runtime_1.jsxs("div", { className: "css-reset", children: [
63
61
  jsx_runtime_1.jsxs("div", { style: {
64
62
  ...header,
65
- borderBottom: showCodeFrame ? 'none' : colors_1.BORDER_WHITE_ALPHA_12,
63
+ borderBottom: shouldShowCodeFrame ? 'none' : colors_1.BORDER_WHITE_ALPHA_12,
64
+ paddingLeft: horizontalSpacing,
65
+ paddingRight: horizontalSpacing,
66
66
  }, children: [
67
- jsx_runtime_1.jsxs("div", { style: left, children: [
68
- jsx_runtime_1.jsx("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? (jsx_runtime_1.jsx("div", { style: location, children: canOpenFileLocation ? (jsx_runtime_1.jsxs("span", { onClick: onOpenFileLocation, onPointerEnter: () => {
69
- setLocationHovered(true);
70
- }, onPointerLeave: () => {
71
- setLocationHovered(false);
72
- }, style: {
67
+ jsx_runtime_1.jsxs("div", { style: left, children: [functionName === null ? null : (jsx_runtime_1.jsx("div", { style: { ...fnName, fontSize }, children: functionName })), s.originalFileName ? (jsx_runtime_1.jsx("div", { style: { ...location, fontSize }, children: canOpenFileLocation ? (jsx_runtime_1.jsxs("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onOpenFileLocation, style: {
73
68
  ...location,
74
- color: locationHovered ? colors_1.WHITE : colors_1.LIGHT_TEXT,
75
- cursor: 'pointer',
76
- }, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: toggleCodeFrame, children: jsx_runtime_1.jsx("div", { style: {
69
+ ...(0, hoverable_1.hoverableStyle)({
70
+ idleBackground: colors_1.TRANSPARENT,
71
+ hoverBackground: colors_1.TRANSPARENT,
72
+ idleColor: colors_1.LIGHT_TEXT,
73
+ hoverColor: colors_1.WHITE,
74
+ }),
75
+ appearance: 'none',
76
+ border: 'none',
77
+ color: undefined,
78
+ cursor: 'default',
79
+ fontSize,
80
+ padding: 0,
81
+ }, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) })) : null] }), headerAction, collapsible &&
82
+ s.originalScriptCode &&
83
+ s.originalScriptCode.length > 0 ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: toggleCodeFrame, children: jsx_runtime_1.jsx("div", { style: {
77
84
  display: 'flex',
78
- transform: showCodeFrame ? undefined : 'rotate(-90deg)',
85
+ transform: shouldShowCodeFrame ? undefined : 'rotate(-90deg)',
79
86
  }, children: jsx_runtime_1.jsx(caret_1.CaretDown, {}) }) })) : null] }), jsx_runtime_1.jsx("div", { children: s.originalScriptCode &&
80
87
  s.originalScriptCode.length > 0 &&
81
- showCodeFrame ? (jsx_runtime_1.jsx(CodeFrame_1.CodeFrame, { lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })
88
+ shouldShowCodeFrame ? (jsx_runtime_1.jsx(CodeFrame_1.CodeFrame, { fontSize: fontSize, horizontalMargin: horizontalSpacing, lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })
82
89
  ] }));
83
90
  };
84
91
  exports.StackElement = StackElement;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Models
3
- } from "./index-e3zwf3e7.mjs";
4
- import"./index-2j3d1g81.mjs";
5
- import"./index-yfrysr5f.mjs";
3
+ } from "./index-5gd8k9yv.mjs";
4
+ import"./index-g7k2dvar.mjs";
5
+ import"./index-cdy8v54v.mjs";
6
6
  import"./index-5zrb1ft4.mjs";
7
7
  import"./index-k426ye99.mjs";
8
8
  import"./index-rcv7qkt5.mjs";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Models
3
- } from "./index-wbmp5srk.mjs";
4
- import"./index-2j3d1g81.mjs";
5
- import"./index-yfrysr5f.mjs";
3
+ } from "./index-5bfxbpca.mjs";
4
+ import"./index-g7k2dvar.mjs";
5
+ import"./index-cdy8v54v.mjs";
6
6
  import"./index-5zrb1ft4.mjs";
7
7
  import"./index-k426ye99.mjs";
8
8
  import"./index-rcv7qkt5.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  NumberSetting,
7
7
  getDefaultCaptionOutputName,
8
8
  validateCaptionOutputName
9
- } from "./index-q2epbw93.mjs";
9
+ } from "./index-f97r9e2g.mjs";
10
10
  import {
11
11
  Button,
12
12
  Checkbox,
@@ -32,20 +32,20 @@ import {
32
32
  rightRow,
33
33
  showNotification,
34
34
  useStaticFiles
35
- } from "./index-c37kme2v.mjs";
35
+ } from "./index-bs39wngg.mjs";
36
36
  import {
37
37
  RenderQueueContext
38
38
  } from "./index-9x6e1dq0.mjs";
39
39
  import {
40
40
  openInFileExplorer
41
- } from "./index-9qtvmwtx.mjs";
41
+ } from "./index-eb5txqp6.mjs";
42
42
  import {
43
43
  getBrowserStudioOperations
44
44
  } from "./index-cw0pnpg5.mjs";
45
45
  import {
46
46
  Models
47
- } from "./index-e3zwf3e7.mjs";
48
- import"./index-2j3d1g81.mjs";
47
+ } from "./index-5gd8k9yv.mjs";
48
+ import"./index-g7k2dvar.mjs";
49
49
  import {
50
50
  InlineAction,
51
51
  Spacing,
@@ -61,7 +61,7 @@ import {
61
61
  leftSidebar,
62
62
  optionsPanel,
63
63
  outerModalStyle
64
- } from "./index-yfrysr5f.mjs";
64
+ } from "./index-cdy8v54v.mjs";
65
65
  import"./index-5zrb1ft4.mjs";
66
66
  import {
67
67
  BLUE_DISABLED,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-7tt71e8n.mjs";
4
4
  import {
5
5
  RenderModalOutputName
6
- } from "./index-1b9skrrd.mjs";
6
+ } from "./index-x40wwfmt.mjs";
7
7
  import {
8
8
  Button,
9
9
  Checkmark,
@@ -25,16 +25,16 @@ import {
25
25
  rightRow,
26
26
  useStaticFiles,
27
27
  validatePublicOutputName
28
- } from "./index-c37kme2v.mjs";
28
+ } from "./index-bs39wngg.mjs";
29
29
  import {
30
30
  RenderQueueContext
31
31
  } from "./index-9x6e1dq0.mjs";
32
- import"./index-9qtvmwtx.mjs";
32
+ import"./index-eb5txqp6.mjs";
33
33
  import"./index-cw0pnpg5.mjs";
34
34
  import {
35
35
  Models
36
- } from "./index-wbmp5srk.mjs";
37
- import"./index-2j3d1g81.mjs";
36
+ } from "./index-5bfxbpca.mjs";
37
+ import"./index-g7k2dvar.mjs";
38
38
  import {
39
39
  VERTICAL_SCROLLBAR_CLASSNAME,
40
40
  ValidationMessage,
@@ -48,7 +48,7 @@ import {
48
48
  leftSidebar,
49
49
  optionsPanel,
50
50
  outerModalStyle
51
- } from "./index-yfrysr5f.mjs";
51
+ } from "./index-cdy8v54v.mjs";
52
52
  import"./index-5zrb1ft4.mjs";
53
53
  import {
54
54
  BLUE_DISABLED