@remotion/studio 4.0.521 → 4.0.523

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 (264) hide show
  1. package/dist/api/install-package.js +4 -2
  2. package/dist/components/AssetAudioVolume.d.ts +5 -0
  3. package/dist/components/AssetAudioVolume.js +33 -0
  4. package/dist/components/Canvas.js +5 -6
  5. package/dist/components/CanvasIfSizeIsAvailable.js +7 -0
  6. package/dist/components/CaptionInspector.js +74 -20
  7. package/dist/components/CheckboardToggle.js +8 -6
  8. package/dist/components/Checkbox.d.ts +1 -0
  9. package/dist/components/Checkbox.js +2 -2
  10. package/dist/components/CompositionContextButton.js +4 -1
  11. package/dist/components/CompositionSelectorItem.js +2 -2
  12. package/dist/components/ConfigureLicenseModal.js +1 -1
  13. package/dist/components/CopyButton.js +7 -14
  14. package/dist/components/CurrentAsset.js +40 -6
  15. package/dist/components/Editor.js +6 -5
  16. package/dist/components/EditorContent.js +1 -1
  17. package/dist/components/EditorContexts.js +3 -1
  18. package/dist/components/ElementInstallConfirmation.js +290 -136
  19. package/dist/components/FixComputedValueModal.js +56 -16
  20. package/dist/components/FullscreenToggle.js +9 -8
  21. package/dist/components/GlobalKeybindings.js +50 -49
  22. package/dist/components/HighlightedElementSource.d.ts +5 -0
  23. package/dist/components/HighlightedElementSource.js +78 -0
  24. package/dist/components/InspectorLocationCopy.js +10 -5
  25. package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
  26. package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
  27. package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
  28. package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
  29. package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
  30. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
  31. package/dist/components/InspectorPanel.js +4 -0
  32. package/dist/components/InspectorSequenceSection.js +64 -1
  33. package/dist/components/InstallPackage.js +4 -5
  34. package/dist/components/KeyboardShortcutsSettings.js +212 -33
  35. package/dist/components/MenuBuildIndicator.js +7 -2
  36. package/dist/components/MenuCompositionName.js +62 -6
  37. package/dist/components/MenuToolbar.js +7 -5
  38. package/dist/components/ModalContainer.d.ts +1 -0
  39. package/dist/components/ModalContainer.js +2 -2
  40. package/dist/components/Modals.js +3 -1
  41. package/dist/components/ModelManager.d.ts +16 -0
  42. package/dist/components/ModelManager.js +200 -0
  43. package/dist/components/ModelsSettings.d.ts +2 -0
  44. package/dist/components/ModelsSettings.js +133 -0
  45. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  46. package/dist/components/NewComposition/DismissableModal.js +2 -2
  47. package/dist/components/NewComposition/InputDragger.d.ts +2 -2
  48. package/dist/components/NewComposition/InputDragger.js +6 -6
  49. package/dist/components/NewComposition/NewFolder.js +11 -8
  50. package/dist/components/NewComposition/RenameFolder.js +17 -10
  51. package/dist/components/OptionalPackageModal.d.ts +11 -0
  52. package/dist/components/OptionalPackageModal.js +155 -0
  53. package/dist/components/PlayPause.js +4 -8
  54. package/dist/components/PlaybackKeyboardShortcutsManager.js +3 -6
  55. package/dist/components/PreviewToolbarOverflowButton.js +11 -2
  56. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
  57. package/dist/components/RadioButton.d.ts +1 -0
  58. package/dist/components/RadioButton.js +2 -2
  59. package/dist/components/RenderButton.js +5 -1
  60. package/dist/components/RenderModal/CliCopyButton.js +13 -27
  61. package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
  62. package/dist/components/RenderModal/NumberSetting.js +2 -2
  63. package/dist/components/RenderModal/RenderModalBasic.js +1 -1
  64. package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
  65. package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
  66. package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
  67. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  68. package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
  69. package/dist/components/RenderQueue/CaptionQueueItem.js +129 -0
  70. package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
  71. package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
  72. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
  73. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
  74. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +7 -4
  75. package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
  76. package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
  77. package/dist/components/RenderQueue/VideoMattingQueueItem.js +129 -0
  78. package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
  79. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
  80. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
  81. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
  82. package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
  83. package/dist/components/RenderQueue/caption-job-types.js +7 -0
  84. package/dist/components/RenderQueue/context.d.ts +16 -0
  85. package/dist/components/RenderQueue/context.js +224 -11
  86. package/dist/components/RenderQueue/index.js +34 -10
  87. package/dist/components/RenderQueue/item-style.d.ts +1 -0
  88. package/dist/components/RenderQueue/item-style.js +2 -1
  89. package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
  90. package/dist/components/RenderQueue/load-model-for-job.js +14 -0
  91. package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
  92. package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
  93. package/dist/components/RendersTab.js +4 -4
  94. package/dist/components/SegmentedControl.d.ts +2 -2
  95. package/dist/components/SegmentedControl.js +38 -13
  96. package/dist/components/SelectedOutlinePolygon.js +8 -2
  97. package/dist/components/SettingsButton.d.ts +4 -0
  98. package/dist/components/SettingsButton.js +49 -0
  99. package/dist/components/SettingsModal.d.ts +1 -1
  100. package/dist/components/SettingsModal.js +3 -1
  101. package/dist/components/ShowOutlinesProvider.js +12 -0
  102. package/dist/components/SidebarCollapserControls.js +21 -16
  103. package/dist/components/SizeSelector.js +10 -2
  104. package/dist/components/SkillsSettings.js +11 -8
  105. package/dist/components/SnappingToggle.js +5 -2
  106. package/dist/components/Splitter/SplitterContainer.js +63 -10
  107. package/dist/components/Splitter/SplitterContext.d.ts +3 -0
  108. package/dist/components/Splitter/SplitterContext.js +5 -1
  109. package/dist/components/Splitter/SplitterElement.js +11 -2
  110. package/dist/components/Splitter/SplitterHandle.d.ts +1 -0
  111. package/dist/components/Splitter/SplitterHandle.js +55 -25
  112. package/dist/components/Tabs/vertical.d.ts +1 -0
  113. package/dist/components/Tabs/vertical.js +2 -2
  114. package/dist/components/TimeValue.js +2 -3
  115. package/dist/components/Timeline/SequencePropsObserver.js +4 -0
  116. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -1
  117. package/dist/components/Timeline/SubscribeToNodePaths.js +2 -1
  118. package/dist/components/Timeline/Timeline.js +17 -46
  119. package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
  120. package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
  121. package/dist/components/Timeline/TimelineDragHandler.js +11 -6
  122. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  123. package/dist/components/Timeline/TimelinePinchZoom.js +6 -30
  124. package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -7
  125. package/dist/components/Timeline/TimelineRowChrome.js +11 -3
  126. package/dist/components/Timeline/TimelineSchemaField.js +8 -4
  127. package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
  128. package/dist/components/Timeline/TimelineSelection.js +55 -2
  129. package/dist/components/Timeline/TimelineSequence.js +148 -25
  130. package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
  131. package/dist/components/Timeline/TimelineSequenceItem.js +220 -112
  132. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +35 -5
  133. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +233 -138
  134. package/dist/components/Timeline/TimelineSlider.js +1 -4
  135. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
  136. package/dist/components/Timeline/TimelineWidthProvider.js +2 -5
  137. package/dist/components/Timeline/TimelineZoomControls.js +20 -20
  138. package/dist/components/Timeline/get-sequence-split-menu-item.d.ts +11 -0
  139. package/dist/components/Timeline/get-sequence-split-menu-item.js +55 -0
  140. package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
  141. package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
  142. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -2
  143. package/dist/components/Timeline/use-sequence-props-subscription.js +4 -10
  144. package/dist/components/TimelineInOutToggle.js +20 -17
  145. package/dist/components/TopPanel.js +3 -19
  146. package/dist/components/Transcription/LazyModels.d.ts +1 -0
  147. package/dist/components/Transcription/LazyModels.js +5 -0
  148. package/dist/components/Transcription/Models.d.ts +6 -0
  149. package/dist/components/Transcription/Models.js +18 -0
  150. package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
  151. package/dist/components/Transcription/TranscriptionModal.js +428 -0
  152. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
  153. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
  154. package/dist/components/Transcription/caption-output-name.d.ts +2 -0
  155. package/dist/components/Transcription/caption-output-name.js +10 -0
  156. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
  157. package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
  158. package/dist/components/Transcription/whisper-languages.d.ts +2 -0
  159. package/dist/components/Transcription/whisper-languages.js +104 -0
  160. package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
  161. package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
  162. package/dist/components/UndoRedoButtons.js +13 -38
  163. package/dist/components/UpdatesSettings.js +17 -17
  164. package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
  165. package/dist/components/VideoMatting/LazyModels.js +5 -0
  166. package/dist/components/VideoMatting/Models.d.ts +6 -0
  167. package/dist/components/VideoMatting/Models.js +18 -0
  168. package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
  169. package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
  170. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
  171. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
  172. package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
  173. package/dist/components/VideoMatting/video-matting-capability.js +7 -0
  174. package/dist/components/WebMcp.js +439 -22
  175. package/dist/components/ZoomPersistor.js +6 -3
  176. package/dist/components/composition-menu-items.js +1 -1
  177. package/dist/components/import-assets.d.ts +3 -2
  178. package/dist/components/import-assets.js +5 -9
  179. package/dist/components/keyboard-shortcuts.d.ts +17 -1
  180. package/dist/components/keyboard-shortcuts.js +177 -89
  181. package/dist/components/public-output-name.d.ts +5 -0
  182. package/dist/components/public-output-name.js +60 -0
  183. package/dist/components/use-model-cache-status.d.ts +7 -0
  184. package/dist/components/use-model-cache-status.js +35 -0
  185. package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
  186. package/dist/esm/HighlightedElementSource-jfc66k4p.mjs +1236 -0
  187. package/dist/esm/LazyModels-2trdm224.mjs +11 -0
  188. package/dist/esm/LazyModels-fjb5ckaq.mjs +11 -0
  189. package/dist/esm/TranscriptionModal-916jqhry.mjs +1011 -0
  190. package/dist/esm/VideoMattingModal-2tm79s9b.mjs +374 -0
  191. package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
  192. package/dist/esm/index-1x7bsdh6.mjs +261 -0
  193. package/dist/esm/index-3hgr6gjx.mjs +41 -0
  194. package/dist/esm/index-5qddp5h7.mjs +36 -0
  195. package/dist/esm/index-5zrb1ft4.mjs +39 -0
  196. package/dist/esm/index-6cvm9a65.mjs +45923 -0
  197. package/dist/esm/index-7tt71e8n.mjs +36 -0
  198. package/dist/esm/index-9x6e1dq0.mjs +428 -0
  199. package/dist/esm/index-cw0pnpg5.mjs +50 -0
  200. package/dist/esm/index-czwvnn9g.mjs +35 -0
  201. package/dist/esm/index-hy4xcgty.mjs +1366 -0
  202. package/dist/esm/{chunk-je0h1bgt.js → index-jg13hf2g.mjs} +3 -1
  203. package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
  204. package/dist/esm/index-sgtmgc4h.mjs +423 -0
  205. package/dist/esm/index-te66vvrp.mjs +142 -0
  206. package/dist/esm/index-v4tr1bft.mjs +20 -0
  207. package/dist/esm/index-x7t2y7ws.mjs +54194 -0
  208. package/dist/esm/index-xhe2m2qr.mjs +1146 -0
  209. package/dist/esm/index.mjs +45 -933
  210. package/dist/esm/internals.mjs +13 -114127
  211. package/dist/esm/previewEntry.mjs +387 -114784
  212. package/dist/esm/renderEntry.mjs +3 -3
  213. package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-14148845.mjs} +1 -1
  214. package/dist/helpers/copy-text.js +1 -2
  215. package/dist/helpers/drag-aware-double-click.d.ts +2 -1
  216. package/dist/helpers/drag-aware-double-click.js +12 -1
  217. package/dist/helpers/get-asset-metadata.d.ts +1 -0
  218. package/dist/helpers/get-asset-metadata.js +4 -0
  219. package/dist/helpers/hoverable.js +8 -0
  220. package/dist/helpers/inject-css.js +2 -0
  221. package/dist/helpers/optional-package-dependencies.d.ts +3 -0
  222. package/dist/helpers/optional-package-dependencies.js +24 -0
  223. package/dist/helpers/pointer-session.d.ts +6 -0
  224. package/dist/helpers/pointer-session.js +36 -14
  225. package/dist/helpers/prism-tomorrow.d.ts +1 -0
  226. package/dist/helpers/prism-tomorrow.js +151 -0
  227. package/dist/helpers/sequence-node-path-mutations.js +11 -0
  228. package/dist/helpers/slugify-name.d.ts +1 -0
  229. package/dist/helpers/slugify-name.js +14 -0
  230. package/dist/helpers/studio-runtime-config.d.ts +1 -0
  231. package/dist/helpers/studio-runtime-config.js +6 -1
  232. package/dist/helpers/use-copy-feedback.d.ts +4 -0
  233. package/dist/helpers/use-copy-feedback.js +19 -0
  234. package/dist/helpers/use-keybinding.d.ts +9 -3
  235. package/dist/helpers/use-keybinding.js +8 -9
  236. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
  237. package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
  238. package/dist/helpers/use-menu-structure.js +58 -13
  239. package/dist/icons/copy.d.ts +5 -0
  240. package/dist/icons/copy.js +12 -0
  241. package/dist/icons/input-props.d.ts +1 -1
  242. package/dist/icons/input-props.js +2 -2
  243. package/dist/icons/models.d.ts +4 -0
  244. package/dist/icons/models.js +7 -0
  245. package/dist/icons/separation.d.ts +4 -0
  246. package/dist/icons/separation.js +7 -0
  247. package/dist/icons/transcription.d.ts +4 -0
  248. package/dist/icons/transcription.js +7 -0
  249. package/dist/icons/upload.js +1 -1
  250. package/dist/state/canvas-ref.d.ts +1 -0
  251. package/dist/state/canvas-ref.js +2 -1
  252. package/dist/state/modals.d.ts +14 -2
  253. package/dist/state/sidebar.d.ts +3 -0
  254. package/dist/state/sidebar.js +6 -1
  255. package/dist/state/timeline-zoom.d.ts +1 -1
  256. package/dist/state/timeline-zoom.js +3 -3
  257. package/dist/visual-controls/VisualControls.js +4 -0
  258. package/package.json +34 -20
  259. package/dist/components/UpdateCheck.d.ts +0 -1
  260. package/dist/components/UpdateCheck.js +0 -79
  261. package/dist/esm/chunk-emw4k5b0.js +0 -99527
  262. package/dist/esm/chunk-vkrvnx2h.js +0 -99378
  263. package/dist/helpers/use-max-media-duration.d.ts +0 -2
  264. package/dist/helpers/use-max-media-duration.js +0 -61
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WHISPER_LANGUAGES = void 0;
4
+ exports.WHISPER_LANGUAGES = [
5
+ ['af', 'Afrikaans'],
6
+ ['sq', 'Albanian'],
7
+ ['am', 'Amharic'],
8
+ ['ar', 'Arabic'],
9
+ ['hy', 'Armenian'],
10
+ ['as', 'Assamese'],
11
+ ['az', 'Azerbaijani'],
12
+ ['ba', 'Bashkir'],
13
+ ['eu', 'Basque'],
14
+ ['be', 'Belarusian'],
15
+ ['bn', 'Bengali'],
16
+ ['bs', 'Bosnian'],
17
+ ['br', 'Breton'],
18
+ ['bg', 'Bulgarian'],
19
+ ['my', 'Burmese'],
20
+ ['ca', 'Catalan'],
21
+ ['zh', 'Chinese'],
22
+ ['hr', 'Croatian'],
23
+ ['cs', 'Czech'],
24
+ ['da', 'Danish'],
25
+ ['nl', 'Dutch'],
26
+ ['en', 'English'],
27
+ ['et', 'Estonian'],
28
+ ['fo', 'Faroese'],
29
+ ['fi', 'Finnish'],
30
+ ['fr', 'French'],
31
+ ['gl', 'Galician'],
32
+ ['ka', 'Georgian'],
33
+ ['de', 'German'],
34
+ ['el', 'Greek'],
35
+ ['gu', 'Gujarati'],
36
+ ['ht', 'Haitian Creole'],
37
+ ['ha', 'Hausa'],
38
+ ['haw', 'Hawaiian'],
39
+ ['he', 'Hebrew'],
40
+ ['hi', 'Hindi'],
41
+ ['hu', 'Hungarian'],
42
+ ['is', 'Icelandic'],
43
+ ['id', 'Indonesian'],
44
+ ['it', 'Italian'],
45
+ ['ja', 'Japanese'],
46
+ ['jw', 'Javanese'],
47
+ ['kn', 'Kannada'],
48
+ ['kk', 'Kazakh'],
49
+ ['km', 'Khmer'],
50
+ ['ko', 'Korean'],
51
+ ['lo', 'Lao'],
52
+ ['la', 'Latin'],
53
+ ['lv', 'Latvian'],
54
+ ['ln', 'Lingala'],
55
+ ['lt', 'Lithuanian'],
56
+ ['lb', 'Luxembourgish'],
57
+ ['mk', 'Macedonian'],
58
+ ['mg', 'Malagasy'],
59
+ ['ms', 'Malay'],
60
+ ['ml', 'Malayalam'],
61
+ ['mt', 'Maltese'],
62
+ ['mi', 'Maori'],
63
+ ['mr', 'Marathi'],
64
+ ['mn', 'Mongolian'],
65
+ ['ne', 'Nepali'],
66
+ ['no', 'Norwegian'],
67
+ ['nn', 'Nynorsk'],
68
+ ['oc', 'Occitan'],
69
+ ['ps', 'Pashto'],
70
+ ['fa', 'Persian'],
71
+ ['pl', 'Polish'],
72
+ ['pt', 'Portuguese'],
73
+ ['pa', 'Punjabi'],
74
+ ['ro', 'Romanian'],
75
+ ['ru', 'Russian'],
76
+ ['sa', 'Sanskrit'],
77
+ ['sr', 'Serbian'],
78
+ ['sn', 'Shona'],
79
+ ['sd', 'Sindhi'],
80
+ ['si', 'Sinhala'],
81
+ ['sk', 'Slovak'],
82
+ ['sl', 'Slovenian'],
83
+ ['so', 'Somali'],
84
+ ['es', 'Spanish'],
85
+ ['su', 'Sundanese'],
86
+ ['sw', 'Swahili'],
87
+ ['sv', 'Swedish'],
88
+ ['tl', 'Tagalog'],
89
+ ['tg', 'Tajik'],
90
+ ['ta', 'Tamil'],
91
+ ['tt', 'Tatar'],
92
+ ['te', 'Telugu'],
93
+ ['th', 'Thai'],
94
+ ['bo', 'Tibetan'],
95
+ ['tr', 'Turkish'],
96
+ ['tk', 'Turkmen'],
97
+ ['uk', 'Ukrainian'],
98
+ ['ur', 'Urdu'],
99
+ ['uz', 'Uzbek'],
100
+ ['vi', 'Vietnamese'],
101
+ ['cy', 'Welsh'],
102
+ ['yi', 'Yiddish'],
103
+ ['yo', 'Yoruba'],
104
+ ];
@@ -0,0 +1,2 @@
1
+ export declare const WHISPER_WEBGPU_PACKAGE = "@remotion/whisper-webgpu";
2
+ export declare const isWhisperWebGpuInstalled: () => boolean;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isWhisperWebGpuInstalled = exports.WHISPER_WEBGPU_PACKAGE = void 0;
4
+ const OptionalPackageModal_1 = require("../OptionalPackageModal");
5
+ exports.WHISPER_WEBGPU_PACKAGE = '@remotion/whisper-webgpu';
6
+ const isWhisperWebGpuInstalled = () => (0, OptionalPackageModal_1.isOptionalPackageInstalled)(exports.WHISPER_WEBGPU_PACKAGE);
7
+ exports.isWhisperWebGpuInstalled = isWhisperWebGpuInstalled;
@@ -3,12 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UndoRedoButtons = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
7
6
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
8
7
  const client_id_1 = require("../helpers/client-id");
9
8
  const colors_1 = require("../helpers/colors");
10
- const is_mac_1 = require("../helpers/is-mac");
11
9
  const use_keybinding_1 = require("../helpers/use-keybinding");
10
+ const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
12
11
  const redo_1 = require("../icons/redo");
13
12
  const undo_1 = require("../icons/undo");
14
13
  const call_api_1 = require("./call-api");
@@ -73,12 +72,8 @@ const UndoRedoButtons = () => {
73
72
  // remains open. Keep undo and redo available in that higher z-index context.
74
73
  const undo = keybindings.registerKeybinding({
75
74
  event: 'keydown',
76
- key: 'z',
77
- commandCtrlKey: true,
78
- callback: (e) => {
79
- if (e.shiftKey) {
80
- return;
81
- }
75
+ action: 'undo',
76
+ callback: () => {
82
77
  if (undoFile) {
83
78
  onUndo();
84
79
  }
@@ -87,14 +82,10 @@ const UndoRedoButtons = () => {
87
82
  triggerIfInputFieldFocused: false,
88
83
  keepRegisteredWhenNotHighestContext: true,
89
84
  });
90
- const redoWithShiftZ = keybindings.registerKeybinding({
85
+ const redo = keybindings.registerKeybinding({
91
86
  event: 'keydown',
92
- key: 'z',
93
- commandCtrlKey: true,
94
- callback: (e) => {
95
- if (!e.shiftKey) {
96
- return;
97
- }
87
+ action: 'redo',
88
+ callback: () => {
98
89
  if (redoFile) {
99
90
  onRedo();
100
91
  }
@@ -103,35 +94,19 @@ const UndoRedoButtons = () => {
103
94
  triggerIfInputFieldFocused: false,
104
95
  keepRegisteredWhenNotHighestContext: true,
105
96
  });
106
- const redoWithY = is_mac_1.isMac
107
- ? null
108
- : keybindings.registerKeybinding({
109
- event: 'keydown',
110
- key: 'y',
111
- commandCtrlKey: true,
112
- callback: () => {
113
- if (redoFile) {
114
- onRedo();
115
- }
116
- },
117
- preventDefault: true,
118
- triggerIfInputFieldFocused: false,
119
- keepRegisteredWhenNotHighestContext: true,
120
- });
121
97
  return () => {
122
98
  undo.unregister();
123
- redoWithShiftZ.unregister();
124
- redoWithY === null || redoWithY === void 0 ? void 0 : redoWithY.unregister();
99
+ redo.unregister();
125
100
  };
126
101
  }, [keybindings, onRedo, onUndo, redoFile, undoFile]);
127
- const undoTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
102
+ const undoShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('undo');
103
+ const redoShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('redo');
104
+ const undoTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || undoShortcut === ''
128
105
  ? 'Undo'
129
- : `Undo (${ShortcutHint_1.cmdOrCtrlCharacter}+Z)`;
130
- const redoTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
106
+ : `Undo (${undoShortcut})`;
107
+ const redoTooltip = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || redoShortcut === ''
131
108
  ? 'Redo'
132
- : is_mac_1.isMac
133
- ? `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Shift+Z)`
134
- : `Redo (${ShortcutHint_1.cmdOrCtrlCharacter}+Y)`;
109
+ : `Redo (${redoShortcut})`;
135
110
  const renderUndo = (0, react_1.useCallback)((color) => {
136
111
  return jsx_runtime_1.jsx(undo_1.UndoIcon, { style: iconStyle, color: color });
137
112
  }, []);
@@ -5,7 +5,8 @@ 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 copy_text_1 = require("../helpers/copy-text");
8
- const clipboard_1 = require("../icons/clipboard");
8
+ const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
9
+ const copy_1 = require("../icons/copy");
9
10
  const InlineAction_1 = require("./InlineAction");
10
11
  const KnownBugs_1 = require("./KnownBugs");
11
12
  const ModalButton_1 = require("./ModalButton");
@@ -165,10 +166,10 @@ const RenderedReleaseNotes = ({ release }) => {
165
166
  resizeObserver.current = observer;
166
167
  }, []);
167
168
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
168
- jsx_runtime_1.jsxs("div", { style: releaseNotesTitle, children: [release.version, formattedReleaseDate === null
169
+ jsx_runtime_1.jsxs("div", { style: releaseNotesTitle, children: ["v", release.version, formattedReleaseDate === null
169
170
  ? null
170
171
  : ` \u2013\u00a0${formattedReleaseDate}`] }), document === null ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Release notes could not be loaded.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: `https://github.com/remotion-dev/remotion/releases/tag/v${release.version}`, children: "View them on GitHub" }),
171
- "."] })) : (jsx_runtime_1.jsx("iframe", { ref: frameRef, onLoad: onLoad, sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", scrolling: "no", srcDoc: document, style: { ...releaseNotesFrame, height }, title: `Release notes for Remotion ${release.version}` }))] }));
172
+ "."] })) : (jsx_runtime_1.jsx("iframe", { ref: frameRef, onLoad: onLoad, sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", scrolling: "no", srcDoc: document, style: { ...releaseNotesFrame, height }, title: `Release notes for Remotion v${release.version}` }))] }));
172
173
  };
173
174
  const UpdatesSettings = () => {
174
175
  const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
@@ -213,17 +214,20 @@ const UpdatesSettings = () => {
213
214
  const updateActionType = (remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.remotionUpgradeSkillAvailable)
214
215
  ? 'skill'
215
216
  : 'command';
217
+ const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
216
218
  const onClick = (0, react_1.useCallback)(() => {
217
219
  if (updateAction === null) {
218
220
  return;
219
221
  }
220
- (0, copy_text_1.copyText)(updateAction).catch((err) => {
222
+ (0, copy_text_1.copyText)(updateAction)
223
+ .then(markCopied)
224
+ .catch((err) => {
221
225
  (0, NotificationCenter_1.showNotification)('Could not copy: ' + err.message, 2000);
222
226
  });
223
- }, [updateAction]);
227
+ }, [markCopied, updateAction]);
224
228
  const renderCopyAction = (0, react_1.useCallback)((color) => {
225
- return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: color, style: copyIcon });
226
- }, []);
229
+ return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: color, style: copyIcon });
230
+ }, [copied]);
227
231
  const onUpgrade = (0, react_1.useCallback)(() => {
228
232
  if (info) {
229
233
  upgrade(info.latestVersion);
@@ -251,20 +255,16 @@ const UpdatesSettings = () => {
251
255
  }
252
256
  if (!info.updateAvailable && !info.skillsUpdateAvailable) {
253
257
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
254
- jsx_runtime_1.jsxs("div", { style: title, children: ["You", "'re", " up to date."] }), jsx_runtime_1.jsxs("div", { style: text, children: ["Remotion ", info.currentVersion, " and your Remotion Agent Skills are up to date."] })
258
+ jsx_runtime_1.jsxs("div", { style: title, children: ["You", "'re", " up to date."] }), jsx_runtime_1.jsxs("div", { style: text, children: ["Remotion v", info.currentVersion, " and your Remotion Agent Skills are up to date."] })
255
259
  ] }));
256
260
  }
257
- return (jsx_runtime_1.jsxs("div", { style: container, children: [info.updateAvailable && info.packageManager !== 'unknown' ? (jsx_runtime_1.jsxs("div", { style: { paddingTop: 12 }, children: [
258
- jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onUpgrade, children: ["Upgrade to ", info.latestVersion] }), jsx_runtime_1.jsx("div", { style: { ...text, marginTop: 8 }, children: "You will need to restart Studio after upgrading." })
259
- ] })) : null, upgradeError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: upgradeError, type: "error", align: "flex-start" })) : null, hasKnownBugs && info.updateAvailable ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
260
- jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version ", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs !== null && knownBugs !== void 0 ? knownBugs : [] }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.jsxs("div", { style: text, children: ["Or run the following ", updateActionType, ":"] })
261
- ] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["A new Remotion update is available. You can also run the following", ' ', updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs("div", { style: commandField, children: [
261
+ return (jsx_runtime_1.jsxs("div", { style: container, children: [info.updateAvailable ? (jsx_runtime_1.jsx("div", { style: title, children: "A new Remotion update is available." })) : null, info.updateAvailable && info.packageManager !== 'unknown' ? (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onUpgrade, children: ["Upgrade to v", info.latestVersion] }) })) : null, upgradeError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: upgradeError, type: "error", align: "flex-start" })) : null, hasKnownBugs && info.updateAvailable ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
262
+ jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version v", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs !== null && knownBugs !== void 0 ? knownBugs : [] }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.jsxs("div", { style: text, children: ["Or run the following ", updateActionType, ":"] })
263
+ ] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["You can also run the following ", updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs("div", { style: commandField, children: [
262
264
  jsx_runtime_1.jsx("pre", { style: code, children: updateAction }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onClick, renderAction: renderCopyAction, title: "Copy command" })
263
- ] }), info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["This will update Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, info.skillsUpdateAvailable
264
- ? ' and update your project Remotion Agent Skills.'
265
- : '.'] })) : null, info.updateAvailable ? ((releaseNotes === null || releaseNotes === void 0 ? void 0 : releaseNotes.currentVersion) === info.currentVersion &&
265
+ ] }), info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["You", "'re", " currently running Remotion v", info.currentVersion, "."] })) : null, info.updateAvailable ? ((releaseNotes === null || releaseNotes === void 0 ? void 0 : releaseNotes.currentVersion) === info.currentVersion &&
266
266
  releaseNotes.latestVersion === info.latestVersion ? (releaseNotes.releases.length === 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
267
- jsx_runtime_1.jsx("div", { style: releaseNotesTitle, children: info.latestVersion }), jsx_runtime_1.jsxs("div", { style: text, children: ["Release notes could not be loaded.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "View them on GitHub" }),
267
+ jsx_runtime_1.jsxs("div", { style: releaseNotesTitle, children: ["v", info.latestVersion] }), jsx_runtime_1.jsxs("div", { style: text, children: ["Release notes could not be loaded.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "View them on GitHub" }),
268
268
  "."] })
269
269
  ] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [releaseNotes.releases.map((release) => (jsx_runtime_1.jsx(RenderedReleaseNotes, { release: release }, release.version))), releaseNotes.hasMore ? (jsx_runtime_1.jsxs("div", { style: { ...text, paddingTop: 12 }, children: ["Showing the 5 most recent releases.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "View all releases on GitHub" }),
270
270
  "."] })) : null] }))) : (jsx_runtime_1.jsx("div", { style: text, children: "Loading release notes..." }))) : null] }));
@@ -0,0 +1 @@
1
+ export { Models as default } from './Models';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = void 0;
4
+ const Models_1 = require("./Models");
5
+ Object.defineProperty(exports, "default", { enumerable: true, get: function () { return Models_1.Models; } });
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const Models: React.FC<{
3
+ readonly description: string | null;
4
+ readonly indent: boolean;
5
+ readonly visible: boolean;
6
+ }>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Models = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const video_matting_1 = require("@remotion/video-matting");
6
+ const react_1 = require("react");
7
+ const ModelManager_1 = require("../ModelManager");
8
+ const AVAILABLE_MODELS = (0, video_matting_1.getAvailableModels)();
9
+ const Models = ({ description, indent, visible }) => {
10
+ const isModelCached = (0, react_1.useCallback)((model) => (0, video_matting_1.isVideoMattingModelCached)({ model }), []);
11
+ const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.loadVideoMattingModel)({
12
+ model,
13
+ onProgress: (progress) => onProgress(progress.progress),
14
+ }), []);
15
+ const removeModel = (0, react_1.useCallback)((model) => (0, video_matting_1.removeVideoMattingModel)({ model }), []);
16
+ return (jsx_runtime_1.jsx(ModelManager_1.ModelManager, { ariaLabel: "Video matting models", availableModels: AVAILABLE_MODELS, description: description, indent: indent, isModelCached: isModelCached, loadModel: loadModel, prepare: null, removeModel: removeModel, visible: visible }));
17
+ };
18
+ exports.Models = Models;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { VideoMattingModalState } from '../../state/modals';
3
+ export declare const VideoMattingModal: React.FC<VideoMattingModalState>;
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VideoMattingModal = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const studio_shared_1 = require("@remotion/studio-shared");
6
+ const video_matting_1 = require("@remotion/video-matting");
7
+ const react_1 = require("react");
8
+ const colors_1 = require("../../helpers/colors");
9
+ const Checkmark_1 = require("../../icons/Checkmark");
10
+ const models_1 = require("../../icons/models");
11
+ const separation_1 = require("../../icons/separation");
12
+ const modals_1 = require("../../state/modals");
13
+ const sidebar_1 = require("../../state/sidebar");
14
+ const Button_1 = require("../Button");
15
+ const is_menu_item_1 = require("../Menu/is-menu-item");
16
+ const ModalHeader_1 = require("../ModalHeader");
17
+ const ComboBox_1 = require("../NewComposition/ComboBox");
18
+ const DismissableModal_1 = require("../NewComposition/DismissableModal");
19
+ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
20
+ const options_sidebar_tabs_1 = require("../options-sidebar-tabs");
21
+ const OptionsPanel_1 = require("../OptionsPanel");
22
+ const public_output_name_1 = require("../public-output-name");
23
+ const layout_1 = require("../RenderModal/layout");
24
+ const render_modals_1 = require("../RenderModal/render-modals");
25
+ const RenderModalHr_1 = require("../RenderModal/RenderModalHr");
26
+ const RenderModalOutputName_1 = require("../RenderModal/RenderModalOutputName");
27
+ const context_1 = require("../RenderQueue/context");
28
+ const vertical_1 = require("../Tabs/vertical");
29
+ const use_model_cache_status_1 = require("../use-model-cache-status");
30
+ const use_static_files_1 = require("../use-static-files");
31
+ const Models_1 = require("./Models");
32
+ const MODELS = (0, video_matting_1.getAvailableModels)();
33
+ const controlStyle = { width: 330, maxWidth: '100%' };
34
+ const panelStyle = {
35
+ ...render_modals_1.optionsPanel,
36
+ flexDirection: 'column',
37
+ paddingTop: 16,
38
+ };
39
+ const modalStyle = {
40
+ ...render_modals_1.outerModalStyle,
41
+ height: 'auto',
42
+ maxHeight: 'calc(100vh - 40px)',
43
+ minHeight: render_modals_1.outerModalStyle.height,
44
+ outline: 'none',
45
+ };
46
+ const modalLayout = {
47
+ ...render_modals_1.horizontalLayout,
48
+ flex: '1 1 auto',
49
+ };
50
+ const hiddenPanel = { display: 'none' };
51
+ const validationStyle = { padding: '0 16px 8px' };
52
+ const makeOptions = ({ items, selected, setSelected, }) => items.map(({ id, label: optionLabel }) => ({
53
+ type: 'item',
54
+ id,
55
+ value: id,
56
+ label: optionLabel,
57
+ leftItem: id === selected ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
58
+ keyHint: null,
59
+ quickSwitcherLabel: null,
60
+ subMenu: null,
61
+ disabled: false,
62
+ onClick: () => setSelected(id),
63
+ }));
64
+ const VideoMattingModal = ({ displayName, src, }) => {
65
+ var _a, _b;
66
+ const [tab, setTab] = (0, react_1.useState)('separate');
67
+ const isModelCached = (0, react_1.useCallback)((selectedModel) => (0, video_matting_1.isVideoMattingModelCached)({ model: selectedModel }), []);
68
+ const cachedModels = (0, use_model_cache_status_1.useModelCacheStatus)({
69
+ isModelCached,
70
+ models: MODELS,
71
+ refreshKey: tab,
72
+ });
73
+ const baseName = (0, react_1.useMemo)(() => (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video'), [displayName, src]);
74
+ const [baseOutName, setBaseOutName] = (0, react_1.useState)(`${baseName}-base.webm`);
75
+ const [foregroundOutName, setForegroundOutName] = (0, react_1.useState)(`${baseName}-foreground.webm`);
76
+ const [model, setModel] = (0, react_1.useState)('ben2-base');
77
+ const [audio, setAudio] = (0, react_1.useState)('base');
78
+ const [videoBitrate, setVideoBitrate] = (0, react_1.useState)('very-high');
79
+ const [support, setSupport] = (0, react_1.useState)({ type: 'checking' });
80
+ const staticFiles = (0, use_static_files_1.useStaticFiles)();
81
+ const { addVideoMattingJob, videoMattingJobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
82
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
83
+ const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
84
+ (0, react_1.useEffect)(() => {
85
+ let cancelled = false;
86
+ setSupport({ type: 'checking' });
87
+ (0, video_matting_1.canUseVideoMatting)({ model }).then((result) => {
88
+ if (!cancelled) {
89
+ setSupport(result.supported
90
+ ? { type: 'supported' }
91
+ : { type: 'unsupported', message: result.detailedReason });
92
+ }
93
+ });
94
+ return () => {
95
+ cancelled = true;
96
+ };
97
+ }, [model]);
98
+ const normalizedBase = baseOutName.normalize('NFC').toLowerCase();
99
+ const normalizedForeground = foregroundOutName.normalize('NFC').toLowerCase();
100
+ const duplicateOutput = normalizedBase === normalizedForeground;
101
+ const queuedOutputs = new Set(videoMattingJobs
102
+ .filter((job) => job.status === 'idle' || job.status === 'running')
103
+ .flatMap((job) => [job.baseOutName, job.foregroundOutName])
104
+ .map((name) => name.normalize('NFC').toLowerCase()));
105
+ const baseError = (_a = (0, public_output_name_1.validatePublicOutputName)({ extension: '.webm', outName: baseOutName })) !== null && _a !== void 0 ? _a : (duplicateOutput
106
+ ? 'Base and foreground outputs must be different'
107
+ : queuedOutputs.has(normalizedBase)
108
+ ? 'Another video matting job is using this output file'
109
+ : null);
110
+ const foregroundError = (_b = (0, public_output_name_1.validatePublicOutputName)({
111
+ extension: '.webm',
112
+ outName: foregroundOutName,
113
+ })) !== null && _b !== void 0 ? _b : (duplicateOutput
114
+ ? 'Base and foreground outputs must be different'
115
+ : queuedOutputs.has(normalizedForeground)
116
+ ? 'Another video matting job is using this output file'
117
+ : null);
118
+ const baseExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedBase);
119
+ const foregroundExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedForeground);
120
+ const canSubmit = support.type === 'supported' &&
121
+ baseError === null &&
122
+ foregroundError === null;
123
+ const modelOptions = (0, react_1.useMemo)(() => makeOptions({
124
+ items: MODELS.map((item) => ({
125
+ id: item.name,
126
+ label: `${item.name} · ${(0, studio_shared_1.formatBytes)(item.webGpuDownloadSize)}${cachedModels.has(item.name) ? ' · Downloaded' : ''}`,
127
+ })),
128
+ selected: model,
129
+ setSelected: setModel,
130
+ }), [cachedModels, model]);
131
+ const audioOptions = (0, react_1.useMemo)(() => makeOptions({
132
+ items: [
133
+ { id: 'base', label: 'Background layer' },
134
+ { id: 'foreground', label: 'Foreground layer' },
135
+ { id: 'both', label: 'Both layers' },
136
+ { id: 'none', label: 'No audio' },
137
+ ],
138
+ selected: audio,
139
+ setSelected: setAudio,
140
+ }), [audio]);
141
+ const qualityOptions = (0, react_1.useMemo)(() => makeOptions({
142
+ items: ['very-low', 'low', 'medium', 'high', 'very-high'].map((id) => ({
143
+ id: id,
144
+ label: id
145
+ .split('-')
146
+ .map((part) => part[0].toUpperCase() + part.slice(1))
147
+ .join(' '),
148
+ })),
149
+ selected: videoBitrate,
150
+ setSelected: setVideoBitrate,
151
+ }), [videoBitrate]);
152
+ const submit = (0, react_1.useCallback)(() => {
153
+ var _a;
154
+ if (!canSubmit)
155
+ return;
156
+ addVideoMattingJob({
157
+ src,
158
+ displayName,
159
+ baseOutName,
160
+ foregroundOutName,
161
+ model,
162
+ audio,
163
+ videoBitrate,
164
+ });
165
+ setSidebarCollapsedState({ left: null, right: 'expanded' });
166
+ (0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
167
+ (_a = options_sidebar_tabs_1.optionsSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectRendersPanel();
168
+ setSelectedModal(null);
169
+ }, [
170
+ addVideoMattingJob,
171
+ audio,
172
+ baseOutName,
173
+ canSubmit,
174
+ displayName,
175
+ foregroundOutName,
176
+ model,
177
+ setSelectedModal,
178
+ setSidebarCollapsedState,
179
+ src,
180
+ videoBitrate,
181
+ ]);
182
+ return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: `Track matting ${displayName}`, children: jsx_runtime_1.jsxs("div", { style: modalStyle, children: [
183
+ jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Track matting ${displayName}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
184
+ jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSubmit, onClick: submit, title: support.type === 'unsupported' ? support.message : undefined, style: {
185
+ ...render_modals_1.buttonStyle,
186
+ backgroundColor: canSubmit
187
+ ? render_modals_1.buttonStyle.backgroundColor
188
+ : colors_1.BLUE_DISABLED,
189
+ }, children: "Separate" })
190
+ ] }), jsx_runtime_1.jsxs("div", { style: modalLayout, children: [
191
+ jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('separate'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(separation_1.SeparationIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'separate', style: render_modals_1.horizontalTab, children: "Separate" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'models', style: render_modals_1.horizontalTab, children: "Models" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'separate' ? panelStyle : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
192
+ jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "Base video output file", existingOutputPath: window.remotion_publicFolderExists
193
+ ? `${window.remotion_publicFolderExists}/${baseOutName}`
194
+ : null, existence: baseExists, inputStyle: layout_1.input, label: "Base output in public/", onValueChange: (event) => setBaseOutName(event.target.value), outName: baseOutName, validationMessage: baseError }), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "Foreground video output file", existingOutputPath: window.remotion_publicFolderExists
195
+ ? `${window.remotion_publicFolderExists}/${foregroundOutName}`
196
+ : null, existence: foregroundExists, inputStyle: layout_1.input, label: "Foreground output in public/", onValueChange: (event) => setForegroundOutName(event.target.value), outName: foregroundOutName, validationMessage: foregroundError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
197
+ jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Model" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: model, title: "Model", style: controlStyle }) })
198
+ ] }), support.type === 'unsupported' ? (jsx_runtime_1.jsx("div", { style: validationStyle, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: support.message, type: "error" }) })) : null, jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
199
+ jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Audio" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioOptions, selectedId: audio, title: "Audio", style: controlStyle }) })
200
+ ] }), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
201
+ jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Video quality" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: qualityOptions, selectedId: String(videoBitrate), title: "Video quality", style: controlStyle }) })
202
+ ] })
203
+ ] }), jsx_runtime_1.jsx(Models_1.Models, { description: 'Models are downloaded automatically when needed.\nYou can also manage the browser cache here.', indent: true, visible: tab === 'models' })
204
+ ] })
205
+ ] }) }));
206
+ };
207
+ exports.VideoMattingModal = VideoMattingModal;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { VideoMattingModalState } from '../../state/modals';
3
+ export declare const VideoMattingModalWithOptionalPackage: React.FC<{
4
+ readonly state: VideoMattingModalState;
5
+ }>;
@@ -0,0 +1,46 @@
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.VideoMattingModalWithOptionalPackage = 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 video_matting_capability_1 = require("./video-matting-capability");
41
+ const LazyVideoMattingModal = react_1.default.lazy(async () => {
42
+ const { VideoMattingModal } = await Promise.resolve().then(() => __importStar(require('./VideoMattingModal')));
43
+ return { default: VideoMattingModal };
44
+ });
45
+ const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "Track matting", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyVideoMattingModal, { ...state }) }) }));
46
+ exports.VideoMattingModalWithOptionalPackage = VideoMattingModalWithOptionalPackage;
@@ -0,0 +1,2 @@
1
+ export declare const VIDEO_MATTING_PACKAGE = "@remotion/video-matting";
2
+ export declare const isVideoMattingInstalled: () => boolean;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isVideoMattingInstalled = exports.VIDEO_MATTING_PACKAGE = void 0;
4
+ const OptionalPackageModal_1 = require("../OptionalPackageModal");
5
+ exports.VIDEO_MATTING_PACKAGE = '@remotion/video-matting';
6
+ const isVideoMattingInstalled = () => (0, OptionalPackageModal_1.isOptionalPackageInstalled)(exports.VIDEO_MATTING_PACKAGE);
7
+ exports.isVideoMattingInstalled = isVideoMattingInstalled;