@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
@@ -5,10 +5,13 @@ const no_react_1 = require("remotion/no-react");
5
5
  const format_file_location_1 = require("../helpers/format-file-location");
6
6
  const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
7
7
  const open_in_editor_1 = require("../helpers/open-in-editor");
8
+ const get_open_in_menu_items_1 = require("./get-open-in-menu-items");
8
9
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
9
10
  const open_in_new_window_1 = require("./open-in-new-window");
10
- const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, includeCompositionManagementItems, editorId, editorName, }) => {
11
+ const actions_1 = require("./RenderQueue/actions");
12
+ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, includeCompositionManagementItems, openInApps, }) => {
11
13
  var _a;
14
+ const { canOpenDesktopApps, canOpenInEditor, codingAgentInfo, defaultEditorId, defaultEditorName, editorInfo, onConfigureApps, } = openInApps;
12
15
  const fileLocation = (0, format_file_location_1.formatFileLocation)({
13
16
  location: resolvedLocation,
14
17
  root: window.remotion_cwd,
@@ -18,121 +21,234 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
18
21
  name: (_a = composition === null || composition === void 0 ? void 0 : composition.id) !== null && _a !== void 0 ? _a : null,
19
22
  root: window.remotion_cwd,
20
23
  });
21
- const showInEditorDisabled = !editorId ||
22
- !composition ||
23
- connectionStatus !== 'connected' ||
24
- !resolvedLocation;
25
- const openComponentInEditorDisabled = showInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
24
+ const openCompositionInEditorDisabled = !defaultEditorId || !composition || !canOpenInEditor || !resolvedLocation;
25
+ const openComponentInEditorDisabled = openCompositionInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
26
26
  const gitSourceName = window.remotion_gitSource
27
27
  ? (0, get_git_menu_item_1.getGitSourceName)(window.remotion_gitSource)
28
28
  : null;
29
+ const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
30
+ const defaultOpenInName = defaultOpenInTarget === 'editor' ? defaultEditorName : gitSourceName;
29
31
  const openCompositionInGitSourceDisabled = !composition || !resolvedLocation;
30
32
  const openComponentInGitSourceDisabled = openCompositionInGitSourceDisabled ||
31
33
  !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) ||
32
34
  (!readOnlyStudio && connectionStatus !== 'connected');
33
35
  const copyFileLocationDisabled = !composition || !fileLocation;
36
+ const openWithCodingAgent = async (codingAgentId, codingAgentName) => {
37
+ try {
38
+ const response = await (0, open_in_editor_1.openInCodingAgent)(codingAgentId, codingAgentId === 'copilot' ? null : contextForAgents);
39
+ if (!response.success) {
40
+ (0, NotificationCenter_1.showNotification)(`Could not open ${codingAgentName}`, 2000);
41
+ }
42
+ }
43
+ catch (err) {
44
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
45
+ }
46
+ };
47
+ const openCompositionWithEditor = async (editorId) => {
48
+ closeMenu();
49
+ if (!composition || !resolvedLocation) {
50
+ return;
51
+ }
52
+ try {
53
+ await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, editorId);
54
+ }
55
+ catch (err) {
56
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
57
+ }
58
+ };
59
+ const openComponentWithEditor = async (editorId) => {
60
+ closeMenu();
61
+ if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
62
+ return;
63
+ }
64
+ try {
65
+ await (0, open_in_editor_1.openCompositionComponentInEditor)({
66
+ compositionFile: resolvedLocation.source,
67
+ compositionId: composition.id,
68
+ editorId,
69
+ });
70
+ }
71
+ catch (err) {
72
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
73
+ }
74
+ };
75
+ const openComponentInGitSource = async () => {
76
+ closeMenu();
77
+ if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
78
+ return;
79
+ }
80
+ try {
81
+ const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
82
+ compositionFile: resolvedLocation.source,
83
+ compositionId: composition.id,
84
+ });
85
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location: info.location });
86
+ }
87
+ catch (err) {
88
+ (0, NotificationCenter_1.showNotification)(err.message, 2000);
89
+ }
90
+ };
91
+ const openCompositionInFileExplorer = () => {
92
+ if (!(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
93
+ return;
94
+ }
95
+ (0, actions_1.openInFileExplorer)({ directory: resolvedLocation.source }).catch((err) => {
96
+ (0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
97
+ });
98
+ };
99
+ const openComponentInFileExplorer = async () => {
100
+ if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
101
+ return;
102
+ }
103
+ try {
104
+ const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
105
+ compositionFile: resolvedLocation.source,
106
+ compositionId: composition.id,
107
+ });
108
+ await (0, actions_1.openInFileExplorer)({ directory: info.location.source });
109
+ }
110
+ catch (err) {
111
+ (0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
112
+ }
113
+ };
114
+ const commonOpenInMenuItems = {
115
+ canOpenDesktopApps,
116
+ codingAgentInfo,
117
+ editorInfo,
118
+ excludeCodingAgentId: null,
119
+ excludeEditorId: defaultOpenInTarget === 'editor' ? defaultEditorId : null,
120
+ excludeGitSource: defaultOpenInTarget === 'git-source',
121
+ folder: false,
122
+ onConfigureApps,
123
+ onOpenInCodingAgent: (codingAgentId, name) => {
124
+ openWithCodingAgent(codingAgentId, name).catch(() => undefined);
125
+ },
126
+ onOpenInGitClient: () => undefined,
127
+ onOpenInTerminal: null,
128
+ };
129
+ const compositionOpenInMenuItems = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
130
+ ...commonOpenInMenuItems,
131
+ editorDisabled: openCompositionInEditorDisabled,
132
+ fileManagerDisabled: !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) || connectionStatus !== 'connected',
133
+ gitSourceDisabled: openCompositionInGitSourceDisabled,
134
+ onOpenInEditor: (editorId) => {
135
+ openCompositionWithEditor(editorId).catch(() => undefined);
136
+ },
137
+ onOpenInFileExplorer: openCompositionInFileExplorer,
138
+ onOpenInGitSource: () => {
139
+ closeMenu();
140
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
141
+ },
142
+ });
143
+ const componentOpenInMenuItems = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
144
+ ...commonOpenInMenuItems,
145
+ editorDisabled: openComponentInEditorDisabled,
146
+ fileManagerDisabled: !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) || connectionStatus !== 'connected',
147
+ gitSourceDisabled: openComponentInGitSourceDisabled,
148
+ onOpenInEditor: (editorId) => {
149
+ openComponentWithEditor(editorId).catch(() => undefined);
150
+ },
151
+ onOpenInFileExplorer: () => {
152
+ openComponentInFileExplorer().catch(() => undefined);
153
+ },
154
+ onOpenInGitSource: () => {
155
+ openComponentInGitSource().catch(() => undefined);
156
+ },
157
+ });
158
+ const hasOpenInItems = defaultOpenInName !== null ||
159
+ compositionOpenInMenuItems.length > 0 ||
160
+ componentOpenInMenuItems.length > 0;
34
161
  return [
35
- editorName
162
+ defaultOpenInTarget && defaultOpenInName
36
163
  ? {
37
- id: 'show-in-editor',
164
+ id: defaultOpenInTarget === 'editor'
165
+ ? 'show-in-editor'
166
+ : 'open-composition-in-git-source',
38
167
  keyHint: null,
39
- label: `Open composition in ${editorName}`,
168
+ label: `Open composition in ${defaultOpenInName}`,
40
169
  leftItem: null,
41
- onClick: async () => {
42
- closeMenu();
43
- if (!composition || !resolvedLocation || !editorId) {
44
- return;
45
- }
46
- try {
47
- await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, editorId);
170
+ onClick: () => {
171
+ if (defaultOpenInTarget === 'editor' && defaultEditorId !== null) {
172
+ openCompositionWithEditor(defaultEditorId).catch(() => undefined);
48
173
  }
49
- catch (err) {
50
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
174
+ else if (defaultOpenInTarget === 'git-source') {
175
+ closeMenu();
176
+ (0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
51
177
  }
52
178
  },
53
- quickSwitcherLabel: `Open composition in ${editorName}`,
179
+ quickSwitcherLabel: `Composition: Open in ${defaultOpenInName}`,
54
180
  subMenu: null,
55
181
  type: 'item',
56
- value: 'show-in-editor',
57
- disabled: showInEditorDisabled,
182
+ value: defaultOpenInTarget === 'editor'
183
+ ? 'show-in-editor'
184
+ : 'open-composition-in-git-source',
185
+ disabled: defaultOpenInTarget === 'editor'
186
+ ? openCompositionInEditorDisabled
187
+ : openCompositionInGitSourceDisabled,
58
188
  }
59
189
  : null,
60
- editorName
190
+ compositionOpenInMenuItems.length > 0
61
191
  ? {
62
- id: 'open-component-in-editor',
192
+ id: 'open-composition-in-another-app',
63
193
  keyHint: null,
64
- label: `Open component in ${editorName}`,
194
+ label: 'Open composition in...',
65
195
  leftItem: null,
66
- onClick: async () => {
67
- closeMenu();
68
- if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) || !editorId) {
69
- return;
70
- }
71
- try {
72
- await (0, open_in_editor_1.openCompositionComponentInEditor)({
73
- compositionFile: resolvedLocation.source,
74
- compositionId: composition.id,
75
- editorId,
76
- });
77
- }
78
- catch (err) {
79
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
80
- }
196
+ onClick: () => undefined,
197
+ quickSwitcherLabel: 'Composition',
198
+ subMenu: {
199
+ items: compositionOpenInMenuItems,
200
+ leaveLeftSpace: true,
201
+ preselectIndex: false,
81
202
  },
82
- quickSwitcherLabel: `Open composition component in ${editorName}`,
83
- subMenu: null,
84
203
  type: 'item',
85
- value: 'open-component-in-editor',
86
- disabled: openComponentInEditorDisabled,
204
+ value: 'open-composition-in-another-app',
87
205
  }
88
206
  : null,
89
- gitSourceName
207
+ defaultOpenInTarget && defaultOpenInName
90
208
  ? {
91
- id: 'open-composition-in-git-source',
209
+ id: defaultOpenInTarget === 'editor'
210
+ ? 'open-component-in-editor'
211
+ : 'open-component-in-git-source',
92
212
  keyHint: null,
93
- label: `Open composition in ${gitSourceName}`,
213
+ label: `Open component in ${defaultOpenInName}`,
94
214
  leftItem: null,
95
215
  onClick: () => {
96
- closeMenu();
97
- (0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
216
+ if (defaultOpenInTarget === 'editor' && defaultEditorId !== null) {
217
+ openComponentWithEditor(defaultEditorId).catch(() => undefined);
218
+ }
219
+ else if (defaultOpenInTarget === 'git-source') {
220
+ openComponentInGitSource().catch(() => undefined);
221
+ }
98
222
  },
99
- quickSwitcherLabel: `Open composition in ${gitSourceName}`,
223
+ quickSwitcherLabel: `Component: Open in ${defaultOpenInName}`,
100
224
  subMenu: null,
101
225
  type: 'item',
102
- value: 'open-composition-in-git-source',
103
- disabled: openCompositionInGitSourceDisabled,
226
+ value: defaultOpenInTarget === 'editor'
227
+ ? 'open-component-in-editor'
228
+ : 'open-component-in-git-source',
229
+ disabled: defaultOpenInTarget === 'editor'
230
+ ? openComponentInEditorDisabled
231
+ : openComponentInGitSourceDisabled,
104
232
  }
105
233
  : null,
106
- gitSourceName
234
+ componentOpenInMenuItems.length > 0
107
235
  ? {
108
- id: 'open-component-in-git-source',
236
+ id: 'open-component-in-another-app',
109
237
  keyHint: null,
110
- label: `Open component in ${gitSourceName}`,
238
+ label: 'Open component in...',
111
239
  leftItem: null,
112
- onClick: async () => {
113
- closeMenu();
114
- if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
115
- return;
116
- }
117
- try {
118
- const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
119
- compositionFile: resolvedLocation.source,
120
- compositionId: composition.id,
121
- });
122
- (0, get_git_menu_item_1.openGitSource)({ folder: false, location: info.location });
123
- }
124
- catch (err) {
125
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
126
- }
240
+ onClick: () => undefined,
241
+ quickSwitcherLabel: 'Component',
242
+ subMenu: {
243
+ items: componentOpenInMenuItems,
244
+ leaveLeftSpace: true,
245
+ preselectIndex: false,
127
246
  },
128
- quickSwitcherLabel: `Open composition component in ${gitSourceName}`,
129
- subMenu: null,
130
247
  type: 'item',
131
- value: 'open-component-in-git-source',
132
- disabled: openComponentInGitSourceDisabled,
248
+ value: 'open-component-in-another-app',
133
249
  }
134
250
  : null,
135
- (editorName || gitSourceName) && includeCompositionManagementItems
251
+ hasOpenInItems && includeCompositionManagementItems
136
252
  ? {
137
253
  type: 'divider',
138
254
  id: 'show-in-editor-divider',
@@ -208,7 +324,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
208
324
  disabled: !composition || readOnlyStudio,
209
325
  }
210
326
  : null,
211
- editorName || gitSourceName || includeCompositionManagementItems
327
+ hasOpenInItems || includeCompositionManagementItems
212
328
  ? {
213
329
  type: 'divider',
214
330
  id: 'copy-actions-divider',
@@ -0,0 +1,2 @@
1
+ import type { DeleteJsxNodesRequest, DeleteJsxNodesResponse } from '@remotion/studio-shared';
2
+ export declare const deleteJsxNodes: (request: DeleteJsxNodesRequest) => Promise<DeleteJsxNodesResponse>;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteJsxNode = void 0;
3
+ exports.deleteJsxNodes = void 0;
4
4
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
5
5
  const call_api_1 = require("./call-api");
6
- const deleteJsxNode = (request) => {
6
+ const deleteJsxNodes = (request) => {
7
7
  const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
8
8
  return browserStudioOperations
9
- ? browserStudioOperations.deleteJsxNode(request)
10
- : (0, call_api_1.callApi)('/api/delete-jsx-node', request);
9
+ ? browserStudioOperations.deleteJsxNodes(request)
10
+ : (0, call_api_1.callApi)('/api/delete-jsx-nodes', request);
11
11
  };
12
- exports.deleteJsxNode = deleteJsxNode;
12
+ exports.deleteJsxNodes = deleteJsxNodes;
@@ -1,24 +1,25 @@
1
- import type { TerminalId } from '@remotion/studio-shared';
2
- import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
3
- import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
1
+ import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse, TerminalId } from '@remotion/studio-shared';
4
2
  import type { ComboboxValue } from './NewComposition/ComboBox';
5
3
  export declare const getConfigureDefaultAppsMenuItems: ({ hasPreviousItems, onConfigureApps, }: {
6
4
  readonly hasPreviousItems: boolean;
7
5
  readonly onConfigureApps: (() => void) | null;
8
6
  }) => ComboboxValue[];
9
- export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder, location, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInTerminal, }: {
7
+ export declare const getOpenInMenuItems: ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }: {
8
+ readonly canOpenDesktopApps: boolean;
10
9
  readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
11
10
  readonly editorDisabled: boolean;
12
11
  readonly editorInfo: GetDefaultEditorInfoResponse | null;
13
12
  readonly excludeCodingAgentId: "claude-code" | "codex" | "copilot" | "cursor" | null;
14
13
  readonly excludeEditorId: EditorPickerId | null;
14
+ readonly excludeGitSource: boolean;
15
15
  readonly fileManagerDisabled: boolean;
16
16
  readonly folder: boolean;
17
- readonly location: OriginalPosition | null;
17
+ readonly gitSourceDisabled: boolean;
18
18
  readonly onConfigureApps: (() => void) | null;
19
19
  readonly onOpenInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string) => void;
20
20
  readonly onOpenInEditor: (editorId: EditorPickerId) => void;
21
21
  readonly onOpenInFileExplorer: () => void;
22
22
  readonly onOpenInGitClient: (gitClientId: "github-desktop") => void;
23
+ readonly onOpenInGitSource: () => void;
23
24
  readonly onOpenInTerminal: ((terminalId: TerminalId) => void) | null;
24
25
  }) => ComboboxValue[];
@@ -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");
@@ -31,7 +30,7 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
31
30
  label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Configure default apps..." }),
32
31
  leftItem: null,
33
32
  onClick: onConfigureApps,
34
- quickSwitcherLabel: null,
33
+ quickSwitcherLabel: 'Configure default apps...',
35
34
  subMenu: null,
36
35
  type: 'item',
37
36
  value: 'change-default-apps',
@@ -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,
@@ -56,12 +55,12 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
56
55
  onOpenInEditor(editor.id);
57
56
  }
58
57
  },
59
- quickSwitcherLabel: null,
58
+ quickSwitcherLabel: `Open in ${editor.name}`,
60
59
  subMenu: null,
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}`,
@@ -69,23 +68,30 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
69
68
  label: jsx_runtime_1.jsx("span", { style: menuLabel, children: codingAgent.name }),
70
69
  leftItem: jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: codingAgent.id, size: 18 }),
71
70
  onClick: () => onOpenInCodingAgent(codingAgent.id, codingAgent.nameWithType),
72
- quickSwitcherLabel: null,
71
+ quickSwitcherLabel: `Open in ${codingAgent.nameWithType}`,
73
72
  subMenu: null,
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
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
- quickSwitcherLabel: null,
94
+ quickSwitcherLabel: 'Open in GitHub.com',
89
95
  subMenu: null,
90
96
  type: 'item',
91
97
  value: 'github',
@@ -105,7 +111,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
105
111
  onOpenInFileExplorer();
106
112
  }
107
113
  },
108
- quickSwitcherLabel: null,
114
+ quickSwitcherLabel: `Open in ${fileManagerName}`,
109
115
  subMenu: null,
110
116
  type: 'item',
111
117
  value: 'file-explorer',
@@ -150,7 +156,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
150
156
  label: jsx_runtime_1.jsx("span", { style: menuLabel, children: terminal.name }),
151
157
  leftItem: jsx_runtime_1.jsx(terminal_1.TerminalIcon, { terminalId: terminal.id, size: 18 }),
152
158
  onClick: () => onOpenInTerminal === null || onOpenInTerminal === void 0 ? void 0 : onOpenInTerminal(terminal.id),
153
- quickSwitcherLabel: null,
159
+ quickSwitcherLabel: `Open in ${terminal.name}`,
154
160
  subMenu: null,
155
161
  type: 'item',
156
162
  value: `terminal-${terminal.id}`,
@@ -170,7 +176,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
170
176
  label: jsx_runtime_1.jsx("span", { style: menuLabel, children: gitClient.name }),
171
177
  leftItem: jsx_runtime_1.jsx(git_client_1.GitClientIcon, { gitClientId: gitClient.id, size: 18 }),
172
178
  onClick: () => onOpenInGitClient(gitClient.id),
173
- quickSwitcherLabel: null,
179
+ quickSwitcherLabel: `Open in ${gitClient.name}`,
174
180
  subMenu: null,
175
181
  type: 'item',
176
182
  value: `git-client-${gitClient.id}`,
@@ -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" | "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[];
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" | "splitSequences" | "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" | "splitSequences" | "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" | "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;
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" | "splitSequences" | "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" | "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;
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" | "splitSequences" | "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" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
26
26
  export declare const shortcutFromKeyboardEvent: (event: KeyboardEvent) => StudioKeyboardShortcut | null;
@@ -45,7 +45,8 @@ exports.defaultKeyboardShortcuts = {
45
45
  selectOpacityProp: [{ key: 't' }],
46
46
  selectRotateProp: [{ key: 'r', shift: false }],
47
47
  selectScaleProp: [{ key: 's' }],
48
- duplicateSequences: [{ key: 'd', commandOrControl: true }],
48
+ duplicateSequences: [{ key: 'd', commandOrControl: true, shift: false }],
49
+ splitSequences: [{ key: 'd', commandOrControl: true, shift: true }],
49
50
  copyEffectsAndValues: [{ key: 'c', commandOrControl: true }],
50
51
  cutEffects: [{ key: 'x', commandOrControl: true }],
51
52
  deleteSelection: [{ key: 'Backspace' }, { key: 'Delete' }],
@@ -136,6 +137,7 @@ exports.keyboardShortcutGroups = [
136
137
  shortcut('Select rotate prop', 'selectRotateProp'),
137
138
  shortcut('Select scale prop', 'selectScaleProp'),
138
139
  shortcut('Duplicate sequences', 'duplicateSequences'),
140
+ shortcut('Split sequences at playhead', 'splitSequences'),
139
141
  shortcut('Copy effects / values', 'copyEffectsAndValues'),
140
142
  shortcut('Cut effects', 'cutEffects'),
141
143
  fixedShortcut('Paste effects / values', [[is_mac_1.isMac ? '⌘' : 'Ctrl', 'V']], 'Handled by the browser clipboard event'),
@@ -1,3 +1,4 @@
1
+ export declare const getMediaFileName: (src: string, displayName: string) => string;
1
2
  export declare const getDefaultOutputBaseName: (src: string, displayName: string, fallbackName: string) => string;
2
3
  export declare const validatePublicOutputName: ({ extension, outName, }: {
3
4
  extension: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.validatePublicOutputName = exports.getDefaultOutputBaseName = void 0;
3
+ exports.validatePublicOutputName = exports.getDefaultOutputBaseName = exports.getMediaFileName = void 0;
4
4
  const invalidCharacters = ['?', '*', '+', ':', '%'];
5
- const getDefaultOutputBaseName = (src, displayName, fallbackName) => {
5
+ const getMediaFileName = (src, displayName) => {
6
6
  var _a;
7
7
  let pathname = displayName;
8
8
  if (!/^(data|blob):/i.test(src.trimStart())) {
@@ -24,7 +24,11 @@ const getDefaultOutputBaseName = (src, displayName, fallbackName) => {
24
24
  catch (_c) {
25
25
  // Keep the encoded name if it contains an invalid escape sequence.
26
26
  }
27
- return (decoded
27
+ return decoded;
28
+ };
29
+ exports.getMediaFileName = getMediaFileName;
30
+ const getDefaultOutputBaseName = (src, displayName, fallbackName) => {
31
+ return ((0, exports.getMediaFileName)(src, displayName)
28
32
  .replace(/\.[^/.]+$/, '')
29
33
  .replace(/[^a-zA-Z0-9-_ ]/g, '-')
30
34
  .trim()