@remotion/studio 4.0.522 → 4.0.524

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 (259) hide show
  1. package/dist/api/install-package.js +4 -2
  2. package/dist/components/ActionTooltip.d.ts +9 -0
  3. package/dist/components/ActionTooltip.js +143 -0
  4. package/dist/components/AssetAudioVolume.d.ts +5 -0
  5. package/dist/components/AssetAudioVolume.js +33 -0
  6. package/dist/components/Canvas.js +8 -8
  7. package/dist/components/CaptionInspector.js +74 -20
  8. package/dist/components/CheckboardToggle.js +9 -10
  9. package/dist/components/Checkbox.d.ts +1 -0
  10. package/dist/components/Checkbox.js +2 -2
  11. package/dist/components/CompositionContextButton.js +4 -1
  12. package/dist/components/CompositionSelectorItem.js +2 -2
  13. package/dist/components/ConfigureLicenseModal.js +1 -1
  14. package/dist/components/CurrentAsset.js +40 -6
  15. package/dist/components/EditorContexts.js +3 -1
  16. package/dist/components/ElementInstallConfirmation.js +254 -137
  17. package/dist/components/FixComputedValueModal.js +38 -8
  18. package/dist/components/FullscreenToggle.js +8 -10
  19. package/dist/components/GlobalKeybindings.js +107 -49
  20. package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
  21. package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
  22. package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
  23. package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
  24. package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
  25. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
  26. package/dist/components/InspectorPanel.js +4 -0
  27. package/dist/components/InspectorSequenceSection.js +69 -6
  28. package/dist/components/InstallPackage.js +4 -5
  29. package/dist/components/KeyboardShortcutsSettings.js +212 -33
  30. package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
  31. package/dist/components/LazySyntaxHighlightedSource.js +43 -0
  32. package/dist/components/LoopToggle.js +8 -2
  33. package/dist/components/MenuToolbar.js +11 -7
  34. package/dist/components/ModalContainer.d.ts +1 -0
  35. package/dist/components/ModalContainer.js +2 -2
  36. package/dist/components/Modals.js +3 -1
  37. package/dist/components/ModelManager.d.ts +16 -0
  38. package/dist/components/ModelManager.js +200 -0
  39. package/dist/components/ModelsSettings.d.ts +2 -0
  40. package/dist/components/ModelsSettings.js +133 -0
  41. package/dist/components/MuteToggle.d.ts +1 -0
  42. package/dist/components/MuteToggle.js +16 -6
  43. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  44. package/dist/components/NewComposition/DismissableModal.js +2 -2
  45. package/dist/components/NewComposition/InputDragger.d.ts +2 -2
  46. package/dist/components/NewComposition/InputDragger.js +6 -6
  47. package/dist/components/NewComposition/NewComposition.d.ts +1 -0
  48. package/dist/components/NewComposition/NewComposition.js +5 -4
  49. package/dist/components/NewComposition/NewFolder.js +9 -8
  50. package/dist/components/NewComposition/RenameComposition.js +3 -2
  51. package/dist/components/NewComposition/RenameFolder.js +15 -10
  52. package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
  53. package/dist/components/NewComposition/SlugPreview.js +18 -0
  54. package/dist/components/OptionalPackageModal.d.ts +11 -0
  55. package/dist/components/OptionalPackageModal.js +155 -0
  56. package/dist/components/OutlineToggle.js +16 -10
  57. package/dist/components/PlayPause.js +11 -9
  58. package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
  59. package/dist/components/PlaybackKeyboardShortcutsManager.js +39 -7
  60. package/dist/components/PlaybackRateSelector.js +2 -2
  61. package/dist/components/PreviewToolbar.js +1 -1
  62. package/dist/components/PreviewToolbarOverflowButton.js +19 -4
  63. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
  64. package/dist/components/RadioButton.d.ts +1 -0
  65. package/dist/components/RadioButton.js +2 -2
  66. package/dist/components/RenderButton.js +5 -1
  67. package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
  68. package/dist/components/RenderModal/NumberSetting.js +2 -2
  69. package/dist/components/RenderModal/RenderModalBasic.js +1 -1
  70. package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
  71. package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
  72. package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
  73. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  74. package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
  75. package/dist/components/RenderQueue/CaptionQueueItem.js +130 -0
  76. package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
  77. package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
  78. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
  79. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
  80. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
  81. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
  82. package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
  83. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  84. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  85. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  86. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
  87. package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
  88. package/dist/components/RenderQueue/VideoMattingQueueItem.js +130 -0
  89. package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
  90. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
  91. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
  92. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
  93. package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
  94. package/dist/components/RenderQueue/caption-job-types.js +7 -0
  95. package/dist/components/RenderQueue/context.d.ts +16 -0
  96. package/dist/components/RenderQueue/context.js +224 -11
  97. package/dist/components/RenderQueue/index.js +34 -10
  98. package/dist/components/RenderQueue/item-style.d.ts +1 -0
  99. package/dist/components/RenderQueue/item-style.js +2 -1
  100. package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
  101. package/dist/components/RenderQueue/load-model-for-job.js +14 -0
  102. package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
  103. package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
  104. package/dist/components/RendersTab.js +4 -4
  105. package/dist/components/RulersAndGuidesToggle.js +7 -1
  106. package/dist/components/SegmentedControl.d.ts +2 -2
  107. package/dist/components/SegmentedControl.js +38 -13
  108. package/dist/components/SelectedOutlinePolygon.js +8 -2
  109. package/dist/components/SettingsButton.d.ts +4 -0
  110. package/dist/components/SettingsButton.js +51 -0
  111. package/dist/components/SettingsModal.d.ts +1 -1
  112. package/dist/components/SettingsModal.js +3 -1
  113. package/dist/components/ShowOutlinesProvider.js +12 -0
  114. package/dist/components/SidebarCollapserControls.js +17 -21
  115. package/dist/components/SizeSelector.js +12 -4
  116. package/dist/components/SkillsSettings.js +2 -3
  117. package/dist/components/SnappingToggle.js +9 -8
  118. package/dist/components/StudioSettings.js +32 -18
  119. package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
  120. package/dist/components/SyntaxHighlightedSource.js +78 -0
  121. package/dist/components/Tabs/vertical.d.ts +1 -0
  122. package/dist/components/Tabs/vertical.js +2 -2
  123. package/dist/components/TimeValue.js +2 -3
  124. package/dist/components/Timeline/SequencePropsObserver.js +4 -0
  125. package/dist/components/Timeline/Timeline.js +49 -81
  126. package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
  127. package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
  128. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  129. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  130. package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
  131. package/dist/components/Timeline/TimelineRowChrome.js +11 -3
  132. package/dist/components/Timeline/TimelineSchemaField.js +8 -4
  133. package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
  134. package/dist/components/Timeline/TimelineSelection.js +55 -2
  135. package/dist/components/Timeline/TimelineSequence.js +75 -17
  136. package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
  137. package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
  138. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
  139. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
  140. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
  141. package/dist/components/Timeline/TimelineZoomControls.js +2 -1
  142. package/dist/components/Timeline/timeline-field-display-utils.js +8 -5
  143. package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
  144. package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
  145. package/dist/components/TimelineCombobox.d.ts +1 -0
  146. package/dist/components/TimelineCombobox.js +8 -4
  147. package/dist/components/TimelineInOutToggle.js +14 -18
  148. package/dist/components/Transcription/LazyModels.d.ts +1 -0
  149. package/dist/components/Transcription/LazyModels.js +5 -0
  150. package/dist/components/Transcription/Models.d.ts +6 -0
  151. package/dist/components/Transcription/Models.js +18 -0
  152. package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
  153. package/dist/components/Transcription/TranscriptionModal.js +428 -0
  154. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
  155. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
  156. package/dist/components/Transcription/caption-output-name.d.ts +2 -0
  157. package/dist/components/Transcription/caption-output-name.js +10 -0
  158. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
  159. package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
  160. package/dist/components/Transcription/whisper-languages.d.ts +2 -0
  161. package/dist/components/Transcription/whisper-languages.js +104 -0
  162. package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
  163. package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
  164. package/dist/components/UndoRedoButtons.js +13 -38
  165. package/dist/components/UpdatesSettings.js +8 -12
  166. package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
  167. package/dist/components/VideoMatting/LazyModels.js +5 -0
  168. package/dist/components/VideoMatting/Models.d.ts +6 -0
  169. package/dist/components/VideoMatting/Models.js +18 -0
  170. package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
  171. package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
  172. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
  173. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
  174. package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
  175. package/dist/components/VideoMatting/video-matting-capability.js +7 -0
  176. package/dist/components/WebMcp.js +439 -22
  177. package/dist/components/handle-drop.js +3 -2
  178. package/dist/components/import-assets.d.ts +3 -2
  179. package/dist/components/import-assets.js +5 -9
  180. package/dist/components/keyboard-shortcuts.d.ts +17 -1
  181. package/dist/components/keyboard-shortcuts.js +191 -89
  182. package/dist/components/public-output-name.d.ts +5 -0
  183. package/dist/components/public-output-name.js +60 -0
  184. package/dist/components/use-model-cache-status.d.ts +7 -0
  185. package/dist/components/use-model-cache-status.js +35 -0
  186. package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
  187. package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
  188. package/dist/esm/LazyModels-hc33szyn.mjs +11 -0
  189. package/dist/esm/LazyModels-sg40rjw6.mjs +11 -0
  190. package/dist/esm/SyntaxHighlightedSource-3xks91rz.mjs +1236 -0
  191. package/dist/esm/TranscriptionModal-3ctnxpt6.mjs +1011 -0
  192. package/dist/esm/VideoMattingModal-b0r7e60n.mjs +374 -0
  193. package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
  194. package/dist/esm/index-1b9skrrd.mjs +142 -0
  195. package/dist/esm/index-2j3d1g81.mjs +261 -0
  196. package/dist/esm/index-5zrb1ft4.mjs +39 -0
  197. package/dist/esm/index-7tt71e8n.mjs +36 -0
  198. package/dist/esm/index-9qtvmwtx.mjs +1366 -0
  199. package/dist/esm/index-9x6e1dq0.mjs +428 -0
  200. package/dist/esm/index-c37kme2v.mjs +46209 -0
  201. package/dist/esm/index-cw0pnpg5.mjs +50 -0
  202. package/dist/esm/index-e3zwf3e7.mjs +36 -0
  203. package/dist/esm/index-er3mh6em.mjs +54688 -0
  204. package/dist/esm/{chunk-je0h1bgt.js → index-k426ye99.mjs} +4 -1
  205. package/dist/esm/index-q2epbw93.mjs +423 -0
  206. package/dist/esm/index-q5xv20xx.mjs +41 -0
  207. package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
  208. package/dist/esm/index-v4tr1bft.mjs +20 -0
  209. package/dist/esm/index-wbmp5srk.mjs +35 -0
  210. package/dist/esm/index-yfrysr5f.mjs +1154 -0
  211. package/dist/esm/index.mjs +45 -933
  212. package/dist/esm/internals.mjs +13 -114393
  213. package/dist/esm/previewEntry.mjs +387 -115050
  214. package/dist/esm/renderEntry.mjs +5 -5
  215. package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-bt2d6qxq.mjs} +1 -1
  216. package/dist/helpers/colors.d.ts +1 -0
  217. package/dist/helpers/colors.js +4 -3
  218. package/dist/helpers/drag-aware-double-click.d.ts +2 -1
  219. package/dist/helpers/drag-aware-double-click.js +12 -1
  220. package/dist/helpers/get-asset-metadata.d.ts +1 -0
  221. package/dist/helpers/get-asset-metadata.js +4 -0
  222. package/dist/helpers/hoverable.js +8 -0
  223. package/dist/helpers/inject-css.js +2 -0
  224. package/dist/helpers/optional-package-dependencies.d.ts +3 -0
  225. package/dist/helpers/optional-package-dependencies.js +24 -0
  226. package/dist/helpers/pointer-session.d.ts +6 -0
  227. package/dist/helpers/pointer-session.js +36 -14
  228. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
  229. package/dist/helpers/prism-vsc-dark-plus.js +305 -0
  230. package/dist/helpers/sequence-node-path-mutations.js +11 -0
  231. package/dist/helpers/slugify-name.d.ts +1 -0
  232. package/dist/helpers/slugify-name.js +14 -0
  233. package/dist/helpers/studio-runtime-config.d.ts +1 -0
  234. package/dist/helpers/studio-runtime-config.js +6 -1
  235. package/dist/helpers/use-create-composition.d.ts +1 -0
  236. package/dist/helpers/use-create-composition.js +12 -7
  237. package/dist/helpers/use-keybinding.d.ts +9 -3
  238. package/dist/helpers/use-keybinding.js +8 -9
  239. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
  240. package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
  241. package/dist/helpers/use-menu-structure.js +59 -14
  242. package/dist/helpers/use-rename-composition.d.ts +1 -0
  243. package/dist/helpers/use-rename-composition.js +11 -5
  244. package/dist/icons/input-props.d.ts +1 -1
  245. package/dist/icons/input-props.js +2 -2
  246. package/dist/icons/models.d.ts +4 -0
  247. package/dist/icons/models.js +7 -0
  248. package/dist/icons/separation.d.ts +4 -0
  249. package/dist/icons/separation.js +7 -0
  250. package/dist/icons/skills.js +1 -1
  251. package/dist/icons/transcription.d.ts +4 -0
  252. package/dist/icons/transcription.js +7 -0
  253. package/dist/icons/upload.js +1 -1
  254. package/dist/renderEntry.js +2 -2
  255. package/dist/state/modals.d.ts +14 -2
  256. package/package.json +35 -21
  257. package/dist/components/UpdateCheck.d.ts +0 -1
  258. package/dist/components/UpdateCheck.js +0 -79
  259. package/dist/esm/chunk-3netyjd9.js +0 -99793
@@ -42,6 +42,7 @@ const browser_studio_operations_1 = require("../helpers/browser-studio-operation
42
42
  const client_id_1 = require("../helpers/client-id");
43
43
  const colors_1 = require("../helpers/colors");
44
44
  const use_keybinding_1 = require("../helpers/use-keybinding");
45
+ const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
45
46
  const caret_1 = require("../icons/caret");
46
47
  const render_1 = require("../icons/render");
47
48
  const in_out_1 = require("../state/in-out");
@@ -128,7 +129,10 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
128
129
  }
129
130
  return preferredRenderType;
130
131
  }, [connectionStatus, isBrowserStudio, preferredRenderType, readOnlyStudio]);
131
- const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? '' : '(R)';
132
+ const renderShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('render');
133
+ const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || renderShortcut === ''
134
+ ? ''
135
+ : `(${renderShortcut})`;
132
136
  const tooltip = renderType === 'render-command'
133
137
  ? 'Copy a CLI command to render this composition ' + shortcut
134
138
  : 'Export the current composition ' + shortcut;
@@ -1,5 +1,9 @@
1
1
  import type { AvailableOptions } from '@remotion/renderer/client';
2
2
  import React from 'react';
3
+ type NumberSettingHint = AvailableOptions | {
4
+ readonly content: React.ReactNode;
5
+ readonly title: string;
6
+ };
3
7
  export declare const NumberSetting: React.FC<{
4
8
  readonly name: string;
5
9
  readonly value: number;
@@ -8,5 +12,6 @@ export declare const NumberSetting: React.FC<{
8
12
  readonly min: number;
9
13
  readonly step: number;
10
14
  readonly formatter?: (value: string | number) => string;
11
- readonly hint?: AvailableOptions;
15
+ readonly hint?: NumberSettingHint;
12
16
  }>;
17
+ export {};
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const layout_1 = require("../layout");
7
7
  const InputDragger_1 = require("../NewComposition/InputDragger");
8
8
  const RemInput_1 = require("../NewComposition/RemInput");
9
+ const InfoBubble_1 = require("./InfoBubble");
9
10
  const layout_2 = require("./layout");
10
11
  const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
11
12
  const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, formatter }) => {
@@ -23,8 +24,7 @@ const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, form
23
24
  }, [onValueChanged]);
24
25
  return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
25
26
  jsx_runtime_1.jsxs("div", { style: layout_2.label, children: [name, hint ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
26
- jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: hint })
27
- ] })) : null] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
27
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), typeof hint === 'string' ? (jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: hint })) : (jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: hint.title, children: hint.content }))] })) : null] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), "aria-label": `${name}: ${formatter ? formatter(value) : value}`, onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
28
28
  .map((f) => (f !== null && f !== undefined ? f : ''))
29
29
  .join('-'), min: min, max: max, formatter: formatter, status: "ok", rightAlign: true }) }) })
30
30
  ] }));
@@ -101,7 +101,7 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
101
101
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Frame" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })
102
102
  ] })) : null, renderMode === 'video' && codec === 'prores' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
103
103
  jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ProRes profile" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: 'proResProfile', selectedId: proResProfile, values: proResProfileOptions }) })
104
- ] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), showOutputName ? (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage, label: renderMode === 'sequence' ? 'Folder name' : 'Output name' })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
104
+ ] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), showOutputName ? (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage, label: renderMode === 'sequence' ? 'Folder name' : 'Output name' })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
105
105
  jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Log Level ",
106
106
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "logLevelOption" })
107
107
  ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })
@@ -1,5 +1,7 @@
1
1
  import React from 'react';
2
2
  type Props = {
3
+ readonly ariaLabel: string | null;
4
+ readonly existingOutputPath: string | null;
3
5
  readonly existence: boolean;
4
6
  readonly inputStyle: React.CSSProperties;
5
7
  readonly outName: string;
@@ -7,5 +9,5 @@ type Props = {
7
9
  readonly validationMessage: string | null;
8
10
  readonly label: string;
9
11
  };
10
- export declare const RenderModalOutputName: ({ existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const RenderModalOutputName: ({ ariaLabel, existingOutputPath, existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }: Props) => import("react/jsx-runtime").JSX.Element;
11
13
  export {};
@@ -38,12 +38,12 @@ const outputNameInputContainer = {
38
38
  minWidth: 0,
39
39
  maxWidth: 280,
40
40
  };
41
- const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }) => {
41
+ const RenderModalOutputName = ({ ariaLabel, existingOutputPath, existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }) => {
42
42
  const openExistingOutput = (0, react_1.useCallback)(() => {
43
- (0, actions_1.openInFileExplorer)({ directory: outName }).catch((err) => {
43
+ (0, actions_1.openInFileExplorer)({ directory: existingOutputPath !== null && existingOutputPath !== void 0 ? existingOutputPath : outName }).catch((err) => {
44
44
  (0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
45
45
  });
46
- }, [outName]);
46
+ }, [existingOutputPath, outName]);
47
47
  const renderOpenIcon = (0, react_1.useCallback)((color) => {
48
48
  return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: openIconStyle, color: color });
49
49
  }, []);
@@ -51,7 +51,7 @@ const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange,
51
51
  const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
52
52
  return (jsx_runtime_1.jsxs("div", { style: outputNameRow, children: [
53
53
  jsx_runtime_1.jsx(layout_1.Column, { children: jsx_runtime_1.jsx("div", { style: layout_2.label, children: labelText }) }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs("div", { style: outputNameInputContainer, children: [
54
- jsx_runtime_1.jsx(RemInput_1.RemotionInput, { status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange, rightAlign: true }), validationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
54
+ jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : undefined, status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange, rightAlign: true }), validationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
55
55
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage, type: 'error' })
56
56
  ] })) : existence ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
57
57
  jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: jsx_runtime_1.jsxs("span", { style: existsMessageStyle, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openExistingOutput, renderAction: renderOpenIcon, title: `Open in ${fileManagerName}` })), "Exists, will be overwritten"] }), type: 'warning' })
@@ -24,7 +24,7 @@ const SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCo
24
24
  }
25
25
  return null;
26
26
  }, [audioCodec, separateAudioTo]);
27
- return (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: existence, inputStyle: layout_2.input, onValueChange: onValueChange, outName: separateAudioTo, label: 'Separate audio to', validationMessage: validationMessage }));
27
+ return (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: existence, inputStyle: layout_2.input, onValueChange: onValueChange, outName: separateAudioTo, label: 'Separate audio to', validationMessage: validationMessage }));
28
28
  };
29
29
  exports.SeparateAudioOptionInput = SeparateAudioOptionInput;
30
30
  const SeparateAudioOption = ({ separateAudioTo, setSeparateAudioTo, audioCodec, outName }) => {
@@ -121,7 +121,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
121
121
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "codec", id: "videoCodecOption" })
122
122
  ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codecOptions, selectedId: effectiveVideoCodec, title: "Codec" }) })
123
123
  ] })) : null, jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, startFrame: startFrame !== null && startFrame !== void 0 ? startFrame : 0, endFrame: endFrame !== null && endFrame !== void 0 ? endFrame : resolvedComposition.durationInFrames - 1, setStartFrame: setStartFrame, setEndFrame: setEndFrame })
124
- ] })), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: window.remotion_isReadOnlyStudio ? 'Download name' : 'Output name' }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
124
+ ] })), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: window.remotion_isReadOnlyStudio ? 'Download name' : 'Output name' }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
125
125
  jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Log Level ",
126
126
  jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "logLevel", id: "logLevelOption" })
127
127
  ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { CaptionJob } from './caption-job-types';
3
+ export declare const CaptionQueueItem: React.FC<{
4
+ readonly job: CaptionJob;
5
+ readonly selected: boolean;
6
+ }>;
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CaptionQueueItem = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const url_state_1 = require("../../helpers/url-state");
8
+ const ActionTooltip_1 = require("../ActionTooltip");
9
+ const InlineAction_1 = require("../InlineAction");
10
+ const layout_1 = require("../layout");
11
+ const use_select_asset_1 = require("../use-select-asset");
12
+ const CircularProgress_1 = require("./CircularProgress");
13
+ const context_1 = require("./context");
14
+ const item_style_1 = require("./item-style");
15
+ const SuccessIcon_1 = require("./SuccessIcon");
16
+ const container = {
17
+ padding: 12,
18
+ display: 'flex',
19
+ flexDirection: 'row',
20
+ paddingBottom: 10,
21
+ paddingRight: 4,
22
+ marginBottom: 1,
23
+ marginLeft: 4,
24
+ borderRadius: 4,
25
+ width: 'calc(100% - 4px)',
26
+ };
27
+ const title = {
28
+ fontSize: 13,
29
+ lineHeight: 1,
30
+ };
31
+ const right = {
32
+ flex: 1,
33
+ display: 'flex',
34
+ flexDirection: 'column',
35
+ overflow: 'hidden',
36
+ };
37
+ const subtitleContainer = {
38
+ maxWidth: '100%',
39
+ flex: 1,
40
+ display: 'flex',
41
+ overflow: 'hidden',
42
+ };
43
+ const subtitle = {
44
+ ...item_style_1.renderQueueItemSubtitleStyle,
45
+ cursor: 'default',
46
+ };
47
+ const statusIcon = {
48
+ height: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
49
+ width: CircularProgress_1.RENDER_STATUS_INDICATOR_SIZE,
50
+ };
51
+ const removeIcon = {
52
+ height: 16,
53
+ color: colors_1.CURRENT_COLOR,
54
+ };
55
+ const CaptionJobStatus = ({ job }) => {
56
+ if (job.status === 'running') {
57
+ return (jsx_runtime_1.jsx("div", { style: statusIcon, role: "progressbar", "aria-label": "Caption job progress", "aria-valuetext": job.progress.message, "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(job.progress.value * 100), children: jsx_runtime_1.jsx(CircularProgress_1.CircularProgress, { progress: Math.max(0.07, job.progress.value) }) }));
58
+ }
59
+ if (job.status === 'done') {
60
+ return jsx_runtime_1.jsx(SuccessIcon_1.SuccessIcon, {});
61
+ }
62
+ if (job.status === 'failed') {
63
+ return (jsx_runtime_1.jsx("svg", { style: statusIcon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.FAIL_COLOR, d: "M0 160V352L160 512H352L512 352V160L352 0H160L0 160zm353.9 32l-17 17-47 47 47 47 17 17L320 353.9l-17-17-47-47-47 47-17 17L158.1 320l17-17 47-47-47-47-17-17L192 158.1l17 17 47 47 47-47 17-17L353.9 192z" }) }));
64
+ }
65
+ return (jsx_runtime_1.jsx("svg", { style: statusIcon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.LIGHT_TEXT, d: "M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256zM232 120V256c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2V120c0-13.3-10.7-24-24-24s-24 10.7-24 24z" }) }));
66
+ };
67
+ const CaptionQueueItem = ({ job, selected }) => {
68
+ const [hovered, setHovered] = (0, react_1.useState)(false);
69
+ const { removeCaptionJob } = (0, react_1.useContext)(context_1.RenderQueueContext);
70
+ const selectAsset = (0, use_select_asset_1.useSelectAsset)();
71
+ const isHoverable = job.status === 'done';
72
+ const containerStyle = (0, react_1.useMemo)(() => {
73
+ return {
74
+ ...container,
75
+ backgroundColor: (0, colors_1.getBackgroundFromHoverState)({
76
+ hovered: isHoverable && hovered,
77
+ selected,
78
+ }),
79
+ userSelect: 'none',
80
+ WebkitUserSelect: 'none',
81
+ };
82
+ }, [hovered, isHoverable, selected]);
83
+ const onPointerEnter = (0, react_1.useCallback)(() => {
84
+ setHovered(true);
85
+ }, []);
86
+ const onPointerLeave = (0, react_1.useCallback)(() => {
87
+ setHovered(false);
88
+ }, []);
89
+ const scrollCurrentIntoView = (0, react_1.useCallback)(() => {
90
+ var _a;
91
+ (_a = document
92
+ .querySelector(`.${item_style_1.RENDER_QUEUE_ITEM_SELECTED_CLASSNAME}`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
93
+ }, []);
94
+ const onClick = (0, react_1.useCallback)(() => {
95
+ if (job.status !== 'done') {
96
+ return;
97
+ }
98
+ selectAsset(job.outName);
99
+ (0, url_state_1.pushUrl)(`/assets/${job.outName}`);
100
+ }, [job, selectAsset]);
101
+ (0, react_1.useEffect)(() => {
102
+ if (selected) {
103
+ scrollCurrentIntoView();
104
+ }
105
+ }, [scrollCurrentIntoView, selected]);
106
+ const onRemove = (0, react_1.useCallback)((event) => {
107
+ event.stopPropagation();
108
+ removeCaptionJob(job.id);
109
+ }, [job.id, removeCaptionJob]);
110
+ const renderRemoveAction = (0, react_1.useCallback)((color) => {
111
+ return (jsx_runtime_1.jsx("svg", { style: removeIcon, viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }) }));
112
+ }, []);
113
+ const message = (0, react_1.useMemo)(() => {
114
+ if (job.status === 'idle') {
115
+ return 'Queued for transcription';
116
+ }
117
+ if (job.status === 'running') {
118
+ return job.progress.message;
119
+ }
120
+ if (job.status === 'failed') {
121
+ return job.error.message;
122
+ }
123
+ return job.outName;
124
+ }, [job]);
125
+ return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, style: containerStyle, align: "center", onClick: onClick, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, className: selected ? item_style_1.RENDER_QUEUE_ITEM_SELECTED_CLASSNAME : undefined, children: [
126
+ jsx_runtime_1.jsx(CaptionJobStatus, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
127
+ jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { style: subtitleContainer, children: jsx_runtime_1.jsx("span", { style: subtitle, title: message, children: message }) })
128
+ ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), job.status === 'running' ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemoveAction, onClick: onRemove, "aria-label": "Clear", variant: null }) }))] }));
129
+ };
130
+ exports.CaptionQueueItem = CaptionQueueItem;
@@ -0,0 +1 @@
1
+ export declare const CaptionQueueProcessor: React.FC;
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CaptionQueueProcessor = void 0;
4
+ const whisper_webgpu_1 = require("@remotion/whisper-webgpu");
5
+ const react_1 = require("react");
6
+ const write_static_file_1 = require("../../api/write-static-file");
7
+ const resample_media_to_16_khz_1 = require("../Transcription/resample-media-to-16-khz");
8
+ const context_1 = require("./context");
9
+ const load_model_for_job_1 = require("./load-model-for-job");
10
+ const CaptionQueueProcessor = () => {
11
+ const { updateCaptionJobProgress, markCaptionJobDone, markCaptionJobFailed, setProcessCaptionJobCallback, } = (0, react_1.useContext)(context_1.RenderQueueContext);
12
+ const processJob = (0, react_1.useCallback)(async (job) => {
13
+ let captionCount = null;
14
+ let processingError = null;
15
+ try {
16
+ updateCaptionJobProgress(job.id, {
17
+ message: 'Checking WebGPU support...',
18
+ value: 0,
19
+ });
20
+ const support = await (0, whisper_webgpu_1.canUseWhisperWebGpu)();
21
+ if (!support.supported) {
22
+ throw new Error(support.detailedReason);
23
+ }
24
+ updateCaptionJobProgress(job.id, {
25
+ message: `Checking ${job.model}...`,
26
+ value: 0.02,
27
+ });
28
+ await (0, whisper_webgpu_1.clearStaleModels)();
29
+ await (0, load_model_for_job_1.loadModelForJob)({
30
+ model: job.model,
31
+ progressStart: 0.03,
32
+ progressSpan: 0.27,
33
+ isModelCached: (model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }),
34
+ loadModel: (model, onProgress) => (0, whisper_webgpu_1.loadWhisperModel)({
35
+ model,
36
+ onProgress: (progress) => onProgress(progress.progress),
37
+ }),
38
+ updateProgress: (progress) => updateCaptionJobProgress(job.id, progress),
39
+ });
40
+ updateCaptionJobProgress(job.id, {
41
+ message: `Preparing ${job.displayName}...`,
42
+ value: 0.3,
43
+ });
44
+ const channelWaveform = await (0, resample_media_to_16_khz_1.resampleMediaTo16Khz)({
45
+ src: job.src,
46
+ audioStreamIndex: job.audioStreamIndex,
47
+ requestInit: job.requestInit,
48
+ onProgress: (progress) => {
49
+ updateCaptionJobProgress(job.id, {
50
+ message: `Preparing ${job.displayName}...`,
51
+ value: 0.3 + progress * 0.2,
52
+ });
53
+ },
54
+ });
55
+ updateCaptionJobProgress(job.id, {
56
+ message: `Transcribing ${job.displayName}...`,
57
+ value: 0.5,
58
+ });
59
+ const transcription = await (0, whisper_webgpu_1.transcribe)({
60
+ channelWaveform,
61
+ model: job.model,
62
+ task: job.task,
63
+ chunkLengthInSeconds: job.chunkLengthInSeconds,
64
+ strideLengthInSeconds: job.strideLengthInSeconds,
65
+ forceFullSequences: job.forceFullSequences,
66
+ doSample: job.doSample,
67
+ temperature: job.temperature,
68
+ topK: job.topK,
69
+ repetitionPenalty: job.repetitionPenalty,
70
+ noRepeatNgramSize: job.noRepeatNgramSize,
71
+ ...(job.language === null ? {} : { language: job.language }),
72
+ });
73
+ const { captions } = (0, whisper_webgpu_1.toCaptions)({
74
+ whisperWebGpuOutput: transcription,
75
+ });
76
+ updateCaptionJobProgress(job.id, {
77
+ message: `Saving ${job.outName}...`,
78
+ value: 0.95,
79
+ });
80
+ await (0, write_static_file_1.writeStaticFile)({
81
+ contents: JSON.stringify(captions, null, 2),
82
+ filePath: job.outName,
83
+ });
84
+ captionCount = captions.length;
85
+ }
86
+ catch (error) {
87
+ processingError =
88
+ error instanceof Error ? error : new Error(String(error));
89
+ }
90
+ try {
91
+ await (0, whisper_webgpu_1.disposeWhisperModel)({ model: job.model });
92
+ }
93
+ catch (_a) {
94
+ // The pipeline is removed from the in-memory registry before disposal.
95
+ // A cleanup failure should not hide a successfully written caption file.
96
+ }
97
+ if (processingError) {
98
+ markCaptionJobFailed(job.id, processingError);
99
+ }
100
+ else {
101
+ markCaptionJobDone(job.id, captionCount !== null && captionCount !== void 0 ? captionCount : 0);
102
+ }
103
+ }, [markCaptionJobDone, markCaptionJobFailed, updateCaptionJobProgress]);
104
+ (0, react_1.useEffect)(() => {
105
+ setProcessCaptionJobCallback(processJob);
106
+ return () => setProcessCaptionJobCallback(null);
107
+ }, [processJob, setProcessCaptionJobCallback]);
108
+ return null;
109
+ };
110
+ exports.CaptionQueueProcessor = CaptionQueueProcessor;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const CaptionQueueProcessorLoader: React.FC;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.CaptionQueueProcessorLoader = void 0;
37
+ const jsx_runtime_1 = require("react/jsx-runtime");
38
+ const react_1 = __importStar(require("react"));
39
+ const OptionalPackageModal_1 = require("../OptionalPackageModal");
40
+ const whisper_webgpu_capability_1 = require("../Transcription/whisper-webgpu-capability");
41
+ const context_1 = require("./context");
42
+ const LazyCaptionQueueProcessor = react_1.default.lazy(async () => {
43
+ const { CaptionQueueProcessor } = await Promise.resolve().then(() => __importStar(require('./CaptionQueueProcessor')));
44
+ return { default: CaptionQueueProcessor };
45
+ });
46
+ const CaptionQueueProcessorLoader = () => {
47
+ const { captionJobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
48
+ const installed = (0, OptionalPackageModal_1.useOptionalPackageInstalled)(whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE);
49
+ if (!installed || captionJobs.length === 0) {
50
+ return null;
51
+ }
52
+ return (jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyCaptionQueueProcessor, {}) }));
53
+ };
54
+ exports.CaptionQueueProcessorLoader = CaptionQueueProcessorLoader;
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
7
7
  const get_asset_metadata_1 = require("../../helpers/get-asset-metadata");
8
8
  const use_copy_feedback_1 = require("../../helpers/use-copy-feedback");
9
9
  const copy_1 = require("../../icons/copy");
10
+ const ActionTooltip_1 = require("../ActionTooltip");
10
11
  const InlineAction_1 = require("../InlineAction");
11
12
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
12
13
  const revealIconStyle = {
@@ -56,6 +57,6 @@ const RenderQueueCopyToClipboard = ({ job }) => {
56
57
  (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 2000);
57
58
  }
58
59
  }, [job.outName, markCopied]);
59
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, title: "Copy to clipboard", renderAction: renderCopyAction, onClick: onClick }));
60
+ return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Copy to clipboard", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Copy to clipboard", variant: null, renderAction: renderCopyAction, onClick: onClick }) }));
60
61
  };
61
62
  exports.RenderQueueCopyToClipboard = RenderQueueCopyToClipboard;
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
7
7
  const download_blob_1 = require("../../helpers/download-blob");
8
+ const ActionTooltip_1 = require("../ActionTooltip");
8
9
  const InlineAction_1 = require("../InlineAction");
9
10
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
10
11
  const RenderQueueDownloadItem = ({ job }) => {
@@ -31,6 +32,6 @@ const RenderQueueDownloadItem = ({ job }) => {
31
32
  const renderAction = (0, react_1.useCallback)((color) => {
32
33
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" }) }));
33
34
  }, [icon]);
34
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, renderAction: renderAction, onClick: onClick, title: "Download" }));
35
+ return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Download", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Download", variant: null, renderAction: renderAction, onClick: onClick }) }));
35
36
  };
36
37
  exports.RenderQueueDownloadItem = RenderQueueDownloadItem;
@@ -10,6 +10,7 @@ const url_state_1 = require("../../helpers/url-state");
10
10
  const layout_1 = require("../layout");
11
11
  const client_side_render_types_1 = require("./client-side-render-types");
12
12
  const context_1 = require("./context");
13
+ const item_style_1 = require("./item-style");
13
14
  const RenderQueueCancelledMessage_1 = require("./RenderQueueCancelledMessage");
14
15
  const RenderQueueCopyToClipboard_1 = require("./RenderQueueCopyToClipboard");
15
16
  const RenderQueueDownloadItem_1 = require("./RenderQueueDownloadItem");
@@ -50,7 +51,6 @@ const subtitle = {
50
51
  display: 'flex',
51
52
  overflow: 'hidden',
52
53
  };
53
- const SELECTED_CLASSNAME = '__remotion_selected_classname';
54
54
  const RenderQueueItem = ({ job, selected }) => {
55
55
  const [hovered, setHovered] = (0, react_1.useState)(false);
56
56
  const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
@@ -78,7 +78,7 @@ const RenderQueueItem = ({ job, selected }) => {
78
78
  const scrollCurrentIntoView = (0, react_1.useCallback)(() => {
79
79
  var _a;
80
80
  (_a = document
81
- .querySelector(`.${SELECTED_CLASSNAME}`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
81
+ .querySelector(`.${item_style_1.RENDER_QUEUE_ITEM_SELECTED_CLASSNAME}`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
82
82
  }, []);
83
83
  const clientBlobInfo = (0, react_1.useMemo)(() => {
84
84
  if (!isClientJob || job.status !== 'done' || !job.getBlob) {
@@ -146,7 +146,7 @@ const RenderQueueItem = ({ job, selected }) => {
146
146
  job.status === 'failed' ||
147
147
  job.status === 'cancelled') &&
148
148
  !((0, context_1.isClientRenderJob)(job) && (0, client_side_render_types_1.isRestoredClientJob)(job));
149
- return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, draggable: canDrag, onDragStart: onDragStart, onDragEnd: onDragEnd, className: selected ? SELECTED_CLASSNAME : undefined, children: [
149
+ return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, draggable: canDrag, onDragStart: onDragStart, onDragEnd: onDragEnd, className: selected ? item_style_1.RENDER_QUEUE_ITEM_SELECTED_CLASSNAME : undefined, children: [
150
150
  jsx_runtime_1.jsx(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
151
151
  jsx_runtime_1.jsx("div", { style: title, children: job.compositionId }), jsx_runtime_1.jsx("div", { style: subtitle, children: job.status === 'done' ? (jsx_runtime_1.jsx(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? (jsx_runtime_1.jsx(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : job.status === 'saving' ? (jsx_runtime_1.jsx(RenderQueueSavingMessage_1.RenderQueueSavingMessage, {})) : job.status === 'cancelled' ? (jsx_runtime_1.jsx(RenderQueueCancelledMessage_1.RenderQueueCancelledMessage, {})) : null })
152
152
  ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), !isDragging ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [canCopyToClipboard ? (jsx_runtime_1.jsx(RenderQueueCopyToClipboard_1.RenderQueueCopyToClipboard, { job: job })) : null, canRepeat ? jsx_runtime_1.jsx(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job }) : null, job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : isBrowserStudio ? null : (jsx_runtime_1.jsx(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' ? (clientBlobInfo ? (jsx_runtime_1.jsx(RenderQueueDownloadItem_1.RenderQueueDownloadItem, { job: job })) : isBrowserStudio ? null : (jsx_runtime_1.jsx(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job }))) : null] })) : null] }));
@@ -4,6 +4,7 @@ exports.RenderQueueCancelButton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
7
+ const ActionTooltip_1 = require("../ActionTooltip");
7
8
  const InlineAction_1 = require("../InlineAction");
8
9
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
9
10
  const actions_1 = require("./actions");
@@ -30,6 +31,6 @@ const RenderQueueCancelButton = ({ job }) => {
30
31
  const renderAction = (0, react_1.useCallback)((color) => {
31
32
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
32
33
  }, [icon]);
33
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
34
+ return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Cancel render", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Cancel render", renderAction: renderAction, onClick: onClick, variant: null }) }));
34
35
  };
35
36
  exports.RenderQueueCancelButton = RenderQueueCancelButton;
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
7
  const colors_1 = require("../../helpers/colors");
8
8
  const folder_1 = require("../../icons/folder");
9
+ const ActionTooltip_1 = require("../ActionTooltip");
9
10
  const InlineAction_1 = require("../InlineAction");
10
11
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
11
12
  const actions_1 = require("./actions");
@@ -26,6 +27,6 @@ const RenderQueueOpenInFinderItem = ({ job }) => {
26
27
  const renderAction = (0, react_1.useCallback)((color) => {
27
28
  return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
28
29
  }, [icon]);
29
- return isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
30
+ return isBrowserStudio ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Open in Folder", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Open in Folder", renderAction: renderAction, onClick: onClick, variant: null }) }));
30
31
  };
31
32
  exports.RenderQueueOpenInFinderItem = RenderQueueOpenInFinderItem;
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const save_render_output_1 = require("../../api/save-render-output");
8
8
  const colors_1 = require("../../helpers/colors");
9
+ const ActionTooltip_1 = require("../ActionTooltip");
9
10
  const InlineAction_1 = require("../InlineAction");
10
11
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
11
12
  const actions_1 = require("./actions");
@@ -41,6 +42,6 @@ const RenderQueueRemoveItem = ({ job }) => {
41
42
  const renderAction = (0, react_1.useCallback)((color) => {
42
43
  return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }) }));
43
44
  }, [icon]);
44
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, title: "Remove", variant: null }));
45
+ return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Clear", renderAction: renderAction, onClick: onClick, variant: null }) }));
45
46
  };
46
47
  exports.RenderQueueRemoveItem = RenderQueueRemoveItem;
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
7
7
  const retry_payload_1 = require("../../helpers/retry-payload");
8
8
  const modals_1 = require("../../state/modals");
9
+ const ActionTooltip_1 = require("../ActionTooltip");
9
10
  const InlineAction_1 = require("../InlineAction");
10
11
  const context_1 = require("./context");
11
12
  const RenderQueueRepeatItem = ({ job }) => {
@@ -31,6 +32,6 @@ const RenderQueueRepeatItem = ({ job }) => {
31
32
  const renderAction = (0, react_1.useCallback)((color) => {
32
33
  return (jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z" }) }));
33
34
  }, [icon]);
34
- return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, renderAction: renderAction, variant: null }));
35
+ return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Retry", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Retry", onClick: onClick, renderAction: renderAction, variant: null }) }));
35
36
  };
36
37
  exports.RenderQueueRepeatItem = RenderQueueRepeatItem;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { VideoMattingJob } from './video-matting-job-types';
3
+ export declare const VideoMattingQueueItem: React.FC<{
4
+ readonly job: VideoMattingJob;
5
+ readonly selected: boolean;
6
+ }>;