@remotion/studio 4.0.526 → 4.0.528

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 (309) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/Canvas.js +88 -26
  5. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  6. package/dist/components/CanvasOrLoading.js +10 -2
  7. package/dist/components/CodeFrame.js +1 -1
  8. package/dist/components/ColorPicker/checker.d.ts +1 -1
  9. package/dist/components/CompositionSelectorItem.js +1 -0
  10. package/dist/components/CurrentAsset.js +4 -2
  11. package/dist/components/EditorRuler/Ruler.js +6 -3
  12. package/dist/components/EffectPickerModal.js +69 -43
  13. package/dist/components/ElementInstallConfirmation.js +3 -3
  14. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  15. package/dist/components/ElementLibrariesSettings.js +200 -0
  16. package/dist/components/InitialCompositionLoader.js +4 -2
  17. package/dist/components/InlineDropdown.js +26 -2
  18. package/dist/components/InlineEditableTitle.js +1 -0
  19. package/dist/components/InspectorOpenInEditor.js +13 -0
  20. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  21. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
  22. package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
  23. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  24. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  25. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
  26. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  27. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  28. package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
  29. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  31. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
  32. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  33. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  34. package/dist/components/InspectorPanel/common.js +1 -0
  35. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  36. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  37. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  38. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  39. package/dist/components/InspectorPanel/styles.js +2 -0
  40. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  42. package/dist/components/InspectorSequenceSection.js +7 -5
  43. package/dist/components/InspectorSourceLocation.js +3 -0
  44. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  45. package/dist/components/Menu/styles.d.ts +2 -2
  46. package/dist/components/MenuBuildIndicator.js +1 -0
  47. package/dist/components/Modals.js +7 -6
  48. package/dist/components/ModelManager.js +10 -9
  49. package/dist/components/NewComposition/CancelButton.js +11 -5
  50. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  51. package/dist/components/NewComposition/InputDragger.js +28 -9
  52. package/dist/components/NewComposition/NewComposition.js +7 -6
  53. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  54. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  55. package/dist/components/Preview.js +4 -0
  56. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  57. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  58. package/dist/components/RadioButton.js +1 -0
  59. package/dist/components/RenderModal/DataEditor.js +4 -1
  60. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  61. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  62. package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
  64. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  65. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  66. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  67. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  68. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  69. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  70. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  71. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  72. package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
  73. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  74. package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
  75. package/dist/components/RenderQueue/context.d.ts +4 -0
  76. package/dist/components/RenderQueue/context.js +58 -8
  77. package/dist/components/RenderQueue/index.js +3 -3
  78. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  79. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  80. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  81. package/dist/components/RendersTab.js +2 -0
  82. package/dist/components/SelectedOutlineCropControls.js +2 -1
  83. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  84. package/dist/components/SelectedOutlineElement.js +9 -3
  85. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  86. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  87. package/dist/components/SelectedOutlineOverlay.js +152 -106
  88. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  89. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  90. package/dist/components/SelectedOutlinePolygon.js +21 -46
  91. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  92. package/dist/components/SelectedOutlineRenderer.js +32 -136
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  95. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  96. package/dist/components/SelectedOutlineUvControls.js +12 -7
  97. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  98. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  99. package/dist/components/SettingsModal.js +30 -3
  100. package/dist/components/SettingsModalFooter.d.ts +1 -0
  101. package/dist/components/SettingsModalFooter.js +7 -3
  102. package/dist/components/ShowOutlinesProvider.js +1 -1
  103. package/dist/components/SkillsSettings.d.ts +0 -1
  104. package/dist/components/SkillsSettings.js +13 -14
  105. package/dist/components/Splitter/SplitterElement.js +1 -2
  106. package/dist/components/TimeValue.js +1 -1
  107. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  108. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  109. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  111. package/dist/components/Timeline/TimelineColorField.js +1 -1
  112. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  113. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  114. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  115. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  116. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  117. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  118. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  119. package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
  120. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  122. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  124. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  125. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  126. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
  128. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  129. package/dist/components/Timeline/TimelineList.js +1 -1
  130. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  131. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  132. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  133. package/dist/components/Timeline/TimelineSelection.js +16 -9
  134. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  135. package/dist/components/Timeline/TimelineSequence.js +65 -21
  136. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
  139. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  140. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  141. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  142. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  143. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  144. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  145. package/dist/components/Timeline/TimelineTrack.js +1 -1
  146. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  147. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  148. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  149. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  150. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  151. package/dist/components/Timeline/TimelineViewport.js +10 -1
  152. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  153. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  154. package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
  155. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  156. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  157. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  158. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  159. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  160. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  161. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  162. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  163. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  164. package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
  165. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  166. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  167. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  168. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  169. package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
  170. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  171. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  172. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  173. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  174. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  175. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  176. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  177. package/dist/components/TimelineCombobox.js +1 -0
  178. package/dist/components/Transcription/Models.js +1 -1
  179. package/dist/components/Transcription/TranscriptionModal.js +18 -11
  180. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  181. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  182. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  183. package/dist/components/UpdatesSettings.js +2 -0
  184. package/dist/components/VideoMatting/Models.js +1 -1
  185. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  186. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  187. package/dist/components/WebMcp.js +23 -40
  188. package/dist/components/composition-drop-preview.d.ts +9 -2
  189. package/dist/components/composition-drop-preview.js +8 -4
  190. package/dist/components/composition-menu-items.js +4 -4
  191. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  192. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  193. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  194. package/dist/components/effect-drag-and-drop.js +19 -4
  195. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  196. package/dist/components/get-open-in-menu-items.js +24 -8
  197. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  198. package/dist/components/keyboard-shortcuts.js +3 -1
  199. package/dist/components/public-output-name.d.ts +1 -0
  200. package/dist/components/public-output-name.js +7 -3
  201. package/dist/components/selected-outline-drag.d.ts +1 -6
  202. package/dist/components/selected-outline-drag.js +22 -6
  203. package/dist/components/selected-outline-geometry.d.ts +2 -18
  204. package/dist/components/selected-outline-measurement.d.ts +23 -41
  205. package/dist/components/selected-outline-measurement.js +14 -252
  206. package/dist/components/selected-outline-order.d.ts +4 -11
  207. package/dist/components/selected-outline-order.js +2 -254
  208. package/dist/components/selected-outline-snap.d.ts +1 -1
  209. package/dist/components/selected-outline-snap.js +2 -1
  210. package/dist/components/selected-outline-types.d.ts +18 -28
  211. package/dist/components/selected-outline-uv.d.ts +4 -4
  212. package/dist/components/selected-outline-uv.js +6 -111
  213. package/dist/components/sequence-props-api.js +0 -10
  214. package/dist/components/use-selected-outline-control-target.js +12 -21
  215. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  216. package/dist/components/wrap-jsx-node-api.js +13 -0
  217. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  218. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  219. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
  220. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  221. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  222. package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
  223. package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
  224. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  225. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  226. package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
  227. package/dist/esm/index-890dd9b3.mjs +768 -0
  228. package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
  229. package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
  230. package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
  231. package/dist/esm/index-dfy1t576.mjs +129 -0
  232. package/dist/esm/index-dh3zk2hv.mjs +220 -0
  233. package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
  234. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  235. package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
  236. package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
  237. package/dist/esm/index-t7tbt980.mjs +103 -0
  238. package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
  239. package/dist/esm/index-wqc43mw0.mjs +158 -0
  240. package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
  241. package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
  242. package/dist/esm/index.mjs +4 -4
  243. package/dist/esm/internals.mjs +13 -10
  244. package/dist/esm/previewEntry.mjs +18 -12
  245. package/dist/esm/renderEntry.mjs +5 -1
  246. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
  247. package/dist/helpers/calculate-timeline.d.ts +5 -1
  248. package/dist/helpers/calculate-timeline.js +1 -1
  249. package/dist/helpers/checkerboard-background.d.ts +2 -2
  250. package/dist/helpers/colors.d.ts +132 -112
  251. package/dist/helpers/colors.js +117 -95
  252. package/dist/helpers/copy-text.js +1 -16
  253. package/dist/helpers/create-folder-tree.js +2 -1
  254. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  255. package/dist/helpers/editor-ruler.js +23 -12
  256. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  257. package/dist/helpers/get-connected-compositions.js +1 -1
  258. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  259. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  260. package/dist/helpers/get-sequence-visible-range.js +2 -5
  261. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  262. package/dist/helpers/get-timeline-nestedness.js +1 -1
  263. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  264. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  265. package/dist/helpers/hoverable.js +6 -5
  266. package/dist/helpers/inject-css.js +5 -7
  267. package/dist/helpers/open-in-editor.js +1 -1
  268. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  269. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  270. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  271. package/dist/helpers/resolve-studio-color.js +11 -0
  272. package/dist/helpers/studio-css-variables.d.ts +1 -0
  273. package/dist/helpers/studio-css-variables.js +105 -0
  274. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  275. package/dist/helpers/studio-pixel-ratio.js +7 -0
  276. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  277. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  278. package/dist/helpers/timeline-node-path-key.js +2 -2
  279. package/dist/helpers/use-keybinding.d.ts +1 -1
  280. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  281. package/dist/helpers/use-menu-structure.js +15 -9
  282. package/dist/helpers/use-runtime-values.js +2 -28
  283. package/dist/hot-middleware-client/client.js +5 -3
  284. package/dist/icons/align-center-horizontal.js +2 -1
  285. package/dist/icons/align-left.js +2 -1
  286. package/dist/icons/align-right.js +2 -1
  287. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  288. package/dist/icons/background-removal.js +9 -0
  289. package/dist/icons/wrap.d.ts +4 -0
  290. package/dist/icons/wrap.js +10 -0
  291. package/dist/previewEntry.js +2 -0
  292. package/dist/renderEntry.js +2 -0
  293. package/dist/state/modals.d.ts +20 -1
  294. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  295. package/dist/state/timeline-sequence-hover.js +6 -67
  296. package/dist/state/timeline-zoom.js +4 -0
  297. package/package.json +20 -19
  298. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  299. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  300. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  301. package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
  302. package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
  303. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  304. package/dist/esm/index-k426ye99.mjs +0 -139
  305. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  306. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  307. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  308. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  309. package/dist/icons/separation.js +0 -7
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.wrapJsxNode = void 0;
4
+ const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
5
+ const call_api_1 = require("./call-api");
6
+ const wrapJsxNode = (request) => {
7
+ const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
8
+ if (browserStudioOperations) {
9
+ return browserStudioOperations.wrapJsxNode(request);
10
+ }
11
+ return (0, call_api_1.callApi)('/api/wrap-jsx-node', request);
12
+ };
13
+ exports.wrapJsxNode = wrapJsxNode;
@@ -7,9 +7,13 @@ const AppLaunchButton_1 = require("../../components/AppLaunchButton");
7
7
  const NotificationCenter_1 = require("../../components/Notifications/NotificationCenter");
8
8
  const SettingsContext_1 = require("../../components/SettingsContext");
9
9
  const use_configure_default_apps_1 = require("../../components/use-configure-default-apps");
10
+ const colors_1 = require("../../helpers/colors");
11
+ const copy_text_1 = require("../../helpers/copy-text");
10
12
  const open_in_editor_1 = require("../../helpers/open-in-editor");
11
13
  const use_keybinding_1 = require("../../helpers/use-keybinding");
14
+ const clipboard_1 = require("../../icons/clipboard");
12
15
  const editor_1 = require("../../icons/editor");
16
+ const format_location_1 = require("./format-location");
13
17
  const ShortcutHint_1 = require("./ShortcutHint");
14
18
  const menuLabel = {
15
19
  color: 'inherit',
@@ -17,10 +21,14 @@ const menuLabel = {
17
21
  fontSize: 13,
18
22
  lineHeight: '16px',
19
23
  };
24
+ const copyIcon = { height: 16, width: 16 };
20
25
  const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, size }) => {
21
26
  const { editorInfo } = (0, SettingsContext_1.useSettings)();
22
27
  const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
23
28
  const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
29
+ const sourcePath = stack.originalFileName
30
+ ? (0, format_location_1.formatLocation)(stack.originalFileName)
31
+ : null;
24
32
  const openWithEditor = (0, react_1.useCallback)(async (selectedEditorId, selectedEditorName) => {
25
33
  try {
26
34
  const response = await (0, open_in_editor_1.openInEditor)(stack, selectedEditorId);
@@ -35,6 +43,16 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, s
35
43
  const openPreferredEditor = (0, react_1.useCallback)(() => {
36
44
  openWithEditor(editorId, editorName).catch(() => undefined);
37
45
  }, [editorId, editorName, openWithEditor]);
46
+ const copyPath = (0, react_1.useCallback)(() => {
47
+ if (sourcePath === null) {
48
+ return;
49
+ }
50
+ (0, copy_text_1.copyText)(sourcePath)
51
+ .then(() => (0, NotificationCenter_1.showNotification)('Copied path', 1500))
52
+ .catch((err) => {
53
+ (0, NotificationCenter_1.showNotification)(`Could not copy path: ${err.message}`, 2000);
54
+ });
55
+ }, [sourcePath]);
38
56
  (0, react_1.useEffect)(() => {
39
57
  if (!canHaveKeyboardShortcuts) {
40
58
  return;
@@ -66,8 +84,33 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, s
66
84
  type: 'item',
67
85
  value: editor.id,
68
86
  }));
69
- return editorItems;
70
- }, [editorId, editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors, openWithEditor]);
87
+ if (sourcePath === null) {
88
+ return editorItems;
89
+ }
90
+ return [
91
+ ...editorItems,
92
+ ...(editorItems.length > 0
93
+ ? [{ type: 'divider', id: 'copy-path-divider' }]
94
+ : []),
95
+ {
96
+ id: 'copy-path',
97
+ keyHint: null,
98
+ label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Copy path" }),
99
+ leftItem: jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: colors_1.LIGHT_TEXT, style: copyIcon }),
100
+ onClick: copyPath,
101
+ quickSwitcherLabel: null,
102
+ subMenu: null,
103
+ type: 'item',
104
+ value: 'copy-path',
105
+ },
106
+ ];
107
+ }, [
108
+ copyPath,
109
+ editorId,
110
+ editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors,
111
+ openWithEditor,
112
+ sourcePath,
113
+ ]);
71
114
  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
115
  jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: size === 'default' ? 14 : 18 }),
73
116
  "Open in ", editorName, canHaveKeyboardShortcuts ? (jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "o", cmdOrCtrl: true })) : null] }));
@@ -13,7 +13,15 @@ const format_location_1 = require("./format-location");
13
13
  const location = {
14
14
  color: colors_1.LIGHT_TEXT,
15
15
  fontFamily: 'monospace',
16
- overflowWrap: 'anywhere',
16
+ textAlign: 'left',
17
+ whiteSpace: 'nowrap',
18
+ };
19
+ const locationMask = 'linear-gradient(to right, black calc(100% - 20px), transparent)';
20
+ const locationContainer = {
21
+ ...location,
22
+ maskImage: locationMask,
23
+ overflow: 'hidden',
24
+ WebkitMaskImage: locationMask,
17
25
  };
18
26
  const header = {
19
27
  paddingTop: 10,
@@ -39,6 +47,27 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
39
47
  !((_b = s.originalFileName) === null || _b === void 0 ? void 0 : _b.startsWith('webpack/'))) ||
40
48
  isFirst;
41
49
  });
50
+ const locationRef = (0, react_1.useRef)(null);
51
+ const [locationOverflows, setLocationOverflows] = (0, react_1.useState)(false);
52
+ const fileLocation = s.originalFileName
53
+ ? `${(0, format_location_1.formatLocation)(s.originalFileName)}:${s.originalLineNumber}`
54
+ : null;
55
+ (0, react_1.useLayoutEffect)(() => {
56
+ const element = locationRef.current;
57
+ if (!element) {
58
+ return;
59
+ }
60
+ const update = () => {
61
+ setLocationOverflows(element.scrollWidth > element.clientWidth);
62
+ };
63
+ update();
64
+ const observer = new ResizeObserver(update);
65
+ observer.observe(element);
66
+ if (element.firstElementChild) {
67
+ observer.observe(element.firstElementChild);
68
+ }
69
+ return () => observer.disconnect();
70
+ }, [fileLocation, fontSize]);
42
71
  const canOpenFileLocation = Boolean(editorId && s.originalFileName);
43
72
  const onOpenFileLocation = (0, react_1.useCallback)(() => {
44
73
  if (!canOpenFileLocation) {
@@ -64,7 +93,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
64
93
  paddingLeft: horizontalSpacing,
65
94
  paddingRight: horizontalSpacing,
66
95
  }, children: [
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: {
96
+ jsx_runtime_1.jsxs("div", { style: left, children: [functionName === null ? null : (jsx_runtime_1.jsx("div", { style: { ...fnName, fontSize }, children: functionName })), fileLocation ? (jsx_runtime_1.jsx("div", { ref: locationRef, style: { ...locationContainer, fontSize }, title: locationOverflows ? fileLocation : undefined, children: canOpenFileLocation ? (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onOpenFileLocation, style: {
68
97
  ...location,
69
98
  ...(0, hoverable_1.hoverableStyle)({
70
99
  idleBackground: colors_1.TRANSPARENT,
@@ -78,7 +107,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
78
107
  cursor: 'default',
79
108
  fontSize,
80
109
  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 &&
110
+ }, children: fileLocation })) : (fileLocation) })) : null] }), headerAction, collapsible &&
82
111
  s.originalScriptCode &&
83
112
  s.originalScriptCode.length > 0 ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: toggleCodeFrame, children: jsx_runtime_1.jsx("div", { style: {
84
113
  display: 'flex',
@@ -1,12 +1,20 @@
1
1
  import {
2
2
  loadModelForJob
3
- } from "./index-v4tr1bft.mjs";
3
+ } from "./index-09txs1bj.mjs";
4
+ import {
5
+ installRequiredPackages
6
+ } from "./index-dh3zk2hv.mjs";
4
7
  import {
5
8
  RenderQueueContext
6
- } from "./index-9x6e1dq0.mjs";
9
+ } from "./index-hqxc6tzp.mjs";
7
10
  import {
11
+ callApi,
12
+ getBrowserStudioOperations,
8
13
  writeStaticFile
9
- } from "./index-cw0pnpg5.mjs";
14
+ } from "./index-dfy1t576.mjs";
15
+ import"./index-qve7mdfp.mjs";
16
+ import"./index-5zrb1ft4.mjs";
17
+ import"./index-wqc43mw0.mjs";
10
18
  import"./index-rcv7qkt5.mjs";
11
19
 
12
20
  // src/components/RenderQueue/CaptionQueueProcessor.tsx
@@ -14,6 +22,7 @@ import {
14
22
  canUseWhisperWebGpu,
15
23
  clearStaleModels,
16
24
  disposeWhisperModel,
25
+ downloadWhisperModel,
17
26
  isWhisperModelCached,
18
27
  loadWhisperModel,
19
28
  toCaptions,
@@ -36,13 +45,24 @@ var resampleMediaTo16Khz = async ({
36
45
  src,
37
46
  audioStreamIndex,
38
47
  requestInit,
39
- onProgress
48
+ onProgress,
49
+ signal
40
50
  }) => {
51
+ signal.throwIfAborted();
41
52
  const input = new Input({
42
53
  formats: ALL_FORMATS,
43
54
  source: new UrlSource(src, requestInit === null ? {} : { requestInit })
44
55
  });
45
56
  const waveformChunks = [];
57
+ let conversion = null;
58
+ let cancellation = null;
59
+ const onAbort = () => {
60
+ cancellation = conversion?.cancel().catch(() => {
61
+ return;
62
+ }) ?? null;
63
+ input.dispose();
64
+ };
65
+ signal.addEventListener("abort", onAbort, { once: true });
46
66
  try {
47
67
  onProgress(0);
48
68
  const audioTracks = await input.getAudioTracks();
@@ -58,7 +78,8 @@ var resampleMediaTo16Khz = async ({
58
78
  format: new WavOutputFormat,
59
79
  target: new NullTarget
60
80
  });
61
- const conversion = await Conversion.init({
81
+ signal.throwIfAborted();
82
+ conversion = await Conversion.init({
62
83
  input,
63
84
  output,
64
85
  tracks: "all",
@@ -72,6 +93,7 @@ var resampleMediaTo16Khz = async ({
72
93
  forceTranscode: true,
73
94
  numberOfChannels: 1,
74
95
  process: (sample) => {
96
+ signal.throwIfAborted();
75
97
  const floats = new Float32Array(sample.allocationSize({ format: "f32", planeIndex: 0 }) / Float32Array.BYTES_PER_ELEMENT);
76
98
  sample.copyTo(floats, { format: "f32", planeIndex: 0 });
77
99
  waveformChunks.push({
@@ -85,13 +107,22 @@ var resampleMediaTo16Khz = async ({
85
107
  };
86
108
  }
87
109
  });
110
+ signal.throwIfAborted();
88
111
  if (!conversion.isValid) {
89
112
  throw new Error("The audio track cannot be decoded in this browser. Try converting the media to WAV first.");
90
113
  }
91
114
  conversion.onProgress = (progress) => onProgress(progress);
92
115
  await conversion.execute();
116
+ signal.throwIfAborted();
93
117
  onProgress(1);
94
118
  } finally {
119
+ signal.removeEventListener("abort", onAbort);
120
+ await cancellation;
121
+ if (signal.aborted && conversion && cancellation === null) {
122
+ await conversion.cancel().catch(() => {
123
+ return;
124
+ });
125
+ }
95
126
  input.dispose();
96
127
  }
97
128
  const waveformLength = waveformChunks.reduce((maximum, chunk) => Math.max(maximum, chunk.startFrame + chunk.waveform.length), 0);
@@ -113,17 +144,23 @@ var CaptionQueueProcessor = () => {
113
144
  updateCaptionJobProgress,
114
145
  markCaptionJobDone,
115
146
  markCaptionJobFailed,
147
+ markCaptionJobCancelled,
148
+ markCaptionJobSaving,
149
+ getAbortController,
116
150
  setProcessCaptionJobCallback
117
151
  } = useContext(RenderQueueContext);
118
152
  const processJob = useCallback(async (job) => {
153
+ const { signal } = getAbortController(job.id);
119
154
  let captionCount = null;
120
155
  let processingError = null;
121
156
  try {
157
+ signal.throwIfAborted();
122
158
  updateCaptionJobProgress(job.id, {
123
159
  message: "Checking WebGPU support...",
124
160
  value: 0
125
161
  });
126
162
  const support = await canUseWhisperWebGpu();
163
+ signal.throwIfAborted();
127
164
  if (!support.supported) {
128
165
  throw new Error(support.detailedReason);
129
166
  }
@@ -132,15 +169,21 @@ var CaptionQueueProcessor = () => {
132
169
  value: 0.02
133
170
  });
134
171
  await clearStaleModels();
172
+ signal.throwIfAborted();
135
173
  await loadModelForJob({
174
+ signal,
136
175
  model: job.model,
137
176
  progressStart: 0.03,
138
177
  progressSpan: 0.27,
139
178
  isModelCached: (model) => isWhisperModelCached({ model }),
140
- loadModel: (model, onProgress) => loadWhisperModel({
141
- model,
142
- onProgress: (progress) => onProgress(progress.progress)
143
- }),
179
+ loadModel: async (model, onProgress) => {
180
+ await downloadWhisperModel({
181
+ signal,
182
+ model,
183
+ onProgress: (progress) => onProgress(progress.progress)
184
+ });
185
+ await loadWhisperModel({ model, signal });
186
+ },
144
187
  updateProgress: (progress) => updateCaptionJobProgress(job.id, progress)
145
188
  });
146
189
  updateCaptionJobProgress(job.id, {
@@ -148,6 +191,7 @@ var CaptionQueueProcessor = () => {
148
191
  value: 0.3
149
192
  });
150
193
  const channelWaveform = await resampleMediaTo16Khz({
194
+ signal,
151
195
  src: job.src,
152
196
  audioStreamIndex: job.audioStreamIndex,
153
197
  requestInit: job.requestInit,
@@ -163,6 +207,7 @@ var CaptionQueueProcessor = () => {
163
207
  value: 0.5
164
208
  });
165
209
  const transcription = await transcribe({
210
+ signal,
166
211
  channelWaveform,
167
212
  model: job.model,
168
213
  task: job.task,
@@ -179,14 +224,37 @@ var CaptionQueueProcessor = () => {
179
224
  const { captions } = toCaptions({
180
225
  whisperWebGpuOutput: transcription
181
226
  });
182
- updateCaptionJobProgress(job.id, {
183
- message: `Saving ${job.outName}...`,
184
- value: 0.95
185
- });
186
- await writeStaticFile({
187
- contents: JSON.stringify(captions, null, 2),
188
- filePath: job.outName
189
- });
227
+ signal.throwIfAborted();
228
+ markCaptionJobSaving(job.id);
229
+ if (job.target === null) {
230
+ updateCaptionJobProgress(job.id, {
231
+ message: `Saving ${job.outName}...`,
232
+ value: 0.95
233
+ });
234
+ await writeStaticFile({
235
+ contents: JSON.stringify(captions, null, 2),
236
+ filePath: job.outName
237
+ });
238
+ } else {
239
+ updateCaptionJobProgress(job.id, {
240
+ message: "Adding Basic captions...",
241
+ value: 0.95
242
+ });
243
+ await installRequiredPackages([
244
+ { name: "@remotion/captions", version: null }
245
+ ]);
246
+ const request = {
247
+ fileName: job.target.fileName,
248
+ nodePath: job.target.nodePath.nodePath,
249
+ durationInFrames: job.target.durationInFrames,
250
+ captions
251
+ };
252
+ const browserStudioOperations = getBrowserStudioOperations();
253
+ const response = browserStudioOperations ? await browserStudioOperations.insertBasicCaptions(request) : await callApi("/api/insert-basic-captions", request);
254
+ if (!response.success) {
255
+ throw new Error(response.reason);
256
+ }
257
+ }
190
258
  captionCount = captions.length;
191
259
  } catch (error) {
192
260
  processingError = error instanceof Error ? error : new Error(String(error));
@@ -194,12 +262,21 @@ var CaptionQueueProcessor = () => {
194
262
  try {
195
263
  await disposeWhisperModel({ model: job.model });
196
264
  } catch {}
197
- if (processingError) {
265
+ if (signal.aborted) {
266
+ markCaptionJobCancelled(job.id);
267
+ } else if (processingError) {
198
268
  markCaptionJobFailed(job.id, processingError);
199
269
  } else {
200
270
  markCaptionJobDone(job.id, captionCount ?? 0);
201
271
  }
202
- }, [markCaptionJobDone, markCaptionJobFailed, updateCaptionJobProgress]);
272
+ }, [
273
+ getAbortController,
274
+ markCaptionJobCancelled,
275
+ markCaptionJobDone,
276
+ markCaptionJobFailed,
277
+ markCaptionJobSaving,
278
+ updateCaptionJobProgress
279
+ ]);
203
280
  useEffect(() => {
204
281
  setProcessCaptionJobCallback(processJob);
205
282
  return () => setProcessCaptionJobCallback(null);
@@ -0,0 +1,12 @@
1
+ import {
2
+ Models
3
+ } from "./index-9q9w8v9p.mjs";
4
+ import"./index-t7xnxdf8.mjs";
5
+ import"./index-890dd9b3.mjs";
6
+ import"./index-qve7mdfp.mjs";
7
+ import"./index-5zrb1ft4.mjs";
8
+ import"./index-wqc43mw0.mjs";
9
+ import"./index-rcv7qkt5.mjs";
10
+ export {
11
+ Models as default
12
+ };
@@ -0,0 +1,12 @@
1
+ import {
2
+ Models
3
+ } from "./index-8nt6a0mw.mjs";
4
+ import"./index-t7xnxdf8.mjs";
5
+ import"./index-890dd9b3.mjs";
6
+ import"./index-qve7mdfp.mjs";
7
+ import"./index-5zrb1ft4.mjs";
8
+ import"./index-wqc43mw0.mjs";
9
+ import"./index-rcv7qkt5.mjs";
10
+ export {
11
+ Models as default
12
+ };
@@ -2,11 +2,10 @@ import {
2
2
  useModelCacheStatus
3
3
  } from "./index-7tt71e8n.mjs";
4
4
  import {
5
- GearIcon,
6
5
  NumberSetting,
7
6
  getDefaultCaptionOutputName,
8
7
  validateCaptionOutputName
9
- } from "./index-f97r9e2g.mjs";
8
+ } from "./index-xac20sv4.mjs";
10
9
  import {
11
10
  Button,
12
11
  Checkbox,
@@ -14,9 +13,9 @@ import {
14
13
  Combobox,
15
14
  DismissableModal,
16
15
  ExpandedFolderIconSolid,
16
+ GearIcon,
17
17
  InfoBubble,
18
18
  ModalHeader,
19
- ModelsIcon,
20
19
  RemotionInput,
21
20
  RenderModalHr,
22
21
  SetSelectedModalContext,
@@ -30,24 +29,28 @@ import {
30
29
  optionsSidebarTabs,
31
30
  persistSelectedOptionsSidebarPanel,
32
31
  rightRow,
33
- showNotification,
34
32
  useStaticFiles
35
- } from "./index-bs39wngg.mjs";
33
+ } from "./index-x6r9bn12.mjs";
34
+ import {
35
+ showNotification
36
+ } from "./index-dh3zk2hv.mjs";
36
37
  import {
37
38
  RenderQueueContext
38
- } from "./index-9x6e1dq0.mjs";
39
+ } from "./index-hqxc6tzp.mjs";
39
40
  import {
40
41
  openInFileExplorer
41
- } from "./index-eb5txqp6.mjs";
42
+ } from "./index-s6qya2gg.mjs";
42
43
  import {
43
44
  getBrowserStudioOperations
44
- } from "./index-cw0pnpg5.mjs";
45
+ } from "./index-dfy1t576.mjs";
46
+ import"./index-t7tbt980.mjs";
45
47
  import {
46
48
  Models
47
- } from "./index-5gd8k9yv.mjs";
48
- import"./index-g7k2dvar.mjs";
49
+ } from "./index-9q9w8v9p.mjs";
50
+ import"./index-t7xnxdf8.mjs";
49
51
  import {
50
52
  InlineAction,
53
+ ModelsIcon,
51
54
  Spacing,
52
55
  VERTICAL_SCROLLBAR_CLASSNAME,
53
56
  ValidationMessage,
@@ -61,13 +64,14 @@ import {
61
64
  leftSidebar,
62
65
  optionsPanel,
63
66
  outerModalStyle
64
- } from "./index-cdy8v54v.mjs";
67
+ } from "./index-890dd9b3.mjs";
68
+ import"./index-qve7mdfp.mjs";
65
69
  import"./index-5zrb1ft4.mjs";
66
70
  import {
67
71
  BLUE_DISABLED,
68
72
  LIGHT_TEXT,
69
73
  WHITE
70
- } from "./index-k426ye99.mjs";
74
+ } from "./index-wqc43mw0.mjs";
71
75
  import"./index-rcv7qkt5.mjs";
72
76
 
73
77
  // src/components/Transcription/TranscriptionModal.tsx
@@ -770,7 +774,8 @@ var TranscriptionModal = ({
770
774
  audioStreamIndex,
771
775
  displayName,
772
776
  requestInit,
773
- src
777
+ src,
778
+ target
774
779
  }) => {
775
780
  const [tab, setTab] = useState("transcribe");
776
781
  const isModelCached = useCallback((model) => isWhisperModelCached({ model }), []);
@@ -811,8 +816,8 @@ var TranscriptionModal = ({
811
816
  };
812
817
  }, []);
813
818
  const normalizedOutName = outName.normalize("NFC").toLowerCase();
814
- const queuedOutputExists = captionJobs.some((job) => (job.status === "idle" || job.status === "running") && job.outName.normalize("NFC").toLowerCase() === normalizedOutName);
815
- const outputValidationMessage = validateCaptionOutputName(outName) ?? (queuedOutputExists ? "Another caption job is already using this output file" : null);
819
+ const queuedOutputExists = captionJobs.some((job) => job.target === null && (job.status === "idle" || job.status === "running" || job.status === "saving") && job.outName.normalize("NFC").toLowerCase() === normalizedOutName);
820
+ const outputValidationMessage = target === null ? validateCaptionOutputName(outName) ?? (queuedOutputExists ? "Another caption job is already using this output file" : null) : null;
816
821
  const exists = staticFiles.some((file) => file.name.normalize("NFC").toLowerCase() === normalizedOutName);
817
822
  const chunkValidationMessage = strideLengthInSeconds * 2 >= chunkLengthInSeconds ? "Stride length must be less than half of chunk length" : null;
818
823
  const decodingValidationMessage = !Number.isFinite(temperature) ? "Temperature must be a finite number greater than 0" : temperature <= 0 ? "Temperature must be greater than 0" : !Number.isInteger(topK) || topK < 0 ? "Top K must be a non-negative integer" : !Number.isFinite(repetitionPenalty) ? "Repetition penalty must be a finite number greater than 0" : repetitionPenalty <= 0 ? "Repetition penalty must be greater than 0" : !Number.isInteger(noRepeatNgramSize) || noRepeatNgramSize < 0 ? "No-repeat n-gram size must be a non-negative integer" : null;
@@ -834,7 +839,8 @@ var TranscriptionModal = ({
834
839
  displayName,
835
840
  audioStreamIndex,
836
841
  requestInit,
837
- outName,
842
+ outName: target === null ? outName : "Basic captions",
843
+ target,
838
844
  model: selectedModel,
839
845
  language: modelInfo.multilingual ? selectedLanguage : null,
840
846
  task: modelInfo.supportsTranslation ? selectedTask : "transcribe",
@@ -861,6 +867,7 @@ var TranscriptionModal = ({
861
867
  forceFullSequences,
862
868
  noRepeatNgramSize,
863
869
  outName,
870
+ target,
864
871
  repetitionPenalty,
865
872
  requestInit,
866
873
  src,
@@ -873,13 +880,14 @@ var TranscriptionModal = ({
873
880
  temperature,
874
881
  topK
875
882
  ]);
883
+ const title = target === null ? `Transcribe ${displayName}` : "Generate captions";
876
884
  return /* @__PURE__ */ jsx(DismissableModal, {
877
- ariaLabel: `Transcribe ${displayName}`,
885
+ ariaLabel: title,
878
886
  children: /* @__PURE__ */ jsxs("div", {
879
887
  style: transcriptionModalStyle,
880
888
  children: [
881
889
  /* @__PURE__ */ jsx(ModalHeader, {
882
- title: `Transcribe ${displayName}`
890
+ title
883
891
  }),
884
892
  /* @__PURE__ */ jsxs("div", {
885
893
  style: container,
@@ -895,7 +903,7 @@ var TranscriptionModal = ({
895
903
  ...buttonStyle,
896
904
  backgroundColor: canTranscribe ? buttonStyle.backgroundColor : BLUE_DISABLED
897
905
  },
898
- children: "Transcribe"
906
+ children: target === null ? "Transcribe" : "Generate captions"
899
907
  })
900
908
  ]
901
909
  }),
@@ -951,13 +959,13 @@ var TranscriptionModal = ({
951
959
  style: tab === "transcribe" ? settingsPanel : hiddenPanel,
952
960
  className: VERTICAL_SCROLLBAR_CLASSNAME,
953
961
  children: [
954
- /* @__PURE__ */ jsx(OutputSettings, {
962
+ target === null ? /* @__PURE__ */ jsx(OutputSettings, {
955
963
  exists,
956
964
  onOutNameChange,
957
965
  outName,
958
966
  validationMessage: outputValidationMessage
959
- }),
960
- /* @__PURE__ */ jsx(RenderModalHr, {}),
967
+ }) : null,
968
+ target === null ? /* @__PURE__ */ jsx(RenderModalHr, {}) : null,
961
969
  /* @__PURE__ */ jsx(ModelSettings, {
962
970
  cachedModels,
963
971
  selectedLanguage,