@remotion/studio 4.0.527 → 4.0.528

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/CodeFrame.js +1 -1
  5. package/dist/components/ColorPicker/checker.d.ts +1 -1
  6. package/dist/components/CurrentAsset.js +3 -2
  7. package/dist/components/EditorRuler/Ruler.js +6 -3
  8. package/dist/components/EffectPickerModal.js +69 -43
  9. package/dist/components/ElementInstallConfirmation.js +3 -3
  10. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  11. package/dist/components/ElementLibrariesSettings.js +200 -0
  12. package/dist/components/InitialCompositionLoader.js +3 -1
  13. package/dist/components/InspectorOpenInEditor.js +13 -0
  14. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  15. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -1
  16. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  17. package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -1
  18. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  19. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  20. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  21. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  22. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +30 -2
  23. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  24. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  25. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  26. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  27. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  28. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  29. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  30. package/dist/components/InspectorSequenceSection.js +7 -5
  31. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  32. package/dist/components/Menu/styles.d.ts +2 -2
  33. package/dist/components/Modals.js +7 -6
  34. package/dist/components/ModelManager.js +10 -9
  35. package/dist/components/NewComposition/CancelButton.js +10 -4
  36. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  37. package/dist/components/NewComposition/InputDragger.js +28 -9
  38. package/dist/components/NewComposition/NewComposition.js +7 -6
  39. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  40. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  41. package/dist/components/Preview.js +3 -2
  42. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  43. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  44. package/dist/components/RenderQueue/CaptionQueueItem.js +14 -5
  45. package/dist/components/RenderQueue/CaptionQueueProcessor.js +30 -7
  46. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  47. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  48. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  49. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  50. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  51. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  52. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  53. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  54. package/dist/components/RenderQueue/VideoMattingQueueItem.js +24 -27
  55. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  56. package/dist/components/RenderQueue/caption-job-types.d.ts +3 -1
  57. package/dist/components/RenderQueue/context.d.ts +4 -0
  58. package/dist/components/RenderQueue/context.js +58 -8
  59. package/dist/components/RenderQueue/index.js +2 -3
  60. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  61. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  62. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  63. package/dist/components/SelectedOutlineCropControls.js +2 -1
  64. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  65. package/dist/components/SelectedOutlineElement.js +9 -3
  66. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  67. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  68. package/dist/components/SelectedOutlineOverlay.js +152 -106
  69. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  70. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  71. package/dist/components/SelectedOutlinePolygon.js +21 -46
  72. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  73. package/dist/components/SelectedOutlineRenderer.js +32 -136
  74. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  75. package/dist/components/SelectedOutlineUvControls.js +12 -7
  76. package/dist/components/SettingsModal.js +30 -3
  77. package/dist/components/SettingsModalFooter.d.ts +1 -0
  78. package/dist/components/SettingsModalFooter.js +7 -3
  79. package/dist/components/ShowOutlinesProvider.js +1 -1
  80. package/dist/components/SkillsSettings.d.ts +0 -1
  81. package/dist/components/SkillsSettings.js +13 -14
  82. package/dist/components/Splitter/SplitterElement.js +1 -2
  83. package/dist/components/TimeValue.js +1 -1
  84. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  85. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  86. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  87. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  88. package/dist/components/Timeline/TimelineColorField.js +1 -1
  89. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  90. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  91. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  92. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  93. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  94. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  95. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  96. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  97. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  98. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  99. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  100. package/dist/components/Timeline/TimelineKeyframeControls.js +39 -28
  101. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  102. package/dist/components/Timeline/TimelineList.js +1 -1
  103. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  104. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  105. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  106. package/dist/components/Timeline/TimelineSelection.js +16 -9
  107. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  108. package/dist/components/Timeline/TimelineSequence.js +39 -21
  109. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  110. package/dist/components/Timeline/TimelineSequenceItem.js +18 -8
  111. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  112. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  113. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  114. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  115. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  116. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  117. package/dist/components/Timeline/TimelineTrack.js +1 -1
  118. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  119. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  120. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  122. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  123. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  124. package/dist/components/Timeline/delete-selected-timeline-item.js +7 -93
  125. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  126. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  127. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  128. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  129. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  130. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  131. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  132. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  133. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  134. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  135. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  136. package/dist/components/Timeline/split-selected-timeline-item.js +4 -1
  137. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  138. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  139. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  140. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  141. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  142. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  143. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  144. package/dist/components/Transcription/Models.js +1 -1
  145. package/dist/components/Transcription/TranscriptionModal.js +3 -1
  146. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  147. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  148. package/dist/components/UpdatesSettings.js +2 -0
  149. package/dist/components/VideoMatting/Models.js +1 -1
  150. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  151. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  152. package/dist/components/WebMcp.js +22 -40
  153. package/dist/components/composition-drop-preview.js +1 -0
  154. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  155. package/dist/components/effect-drag-and-drop.js +19 -4
  156. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  157. package/dist/components/get-open-in-menu-items.js +17 -1
  158. package/dist/components/selected-outline-drag.d.ts +1 -6
  159. package/dist/components/selected-outline-drag.js +22 -6
  160. package/dist/components/selected-outline-geometry.d.ts +2 -18
  161. package/dist/components/selected-outline-measurement.d.ts +23 -41
  162. package/dist/components/selected-outline-measurement.js +14 -252
  163. package/dist/components/selected-outline-order.d.ts +4 -11
  164. package/dist/components/selected-outline-order.js +2 -254
  165. package/dist/components/selected-outline-snap.d.ts +1 -1
  166. package/dist/components/selected-outline-snap.js +2 -1
  167. package/dist/components/selected-outline-types.d.ts +18 -28
  168. package/dist/components/selected-outline-uv.d.ts +4 -4
  169. package/dist/components/selected-outline-uv.js +6 -111
  170. package/dist/components/sequence-props-api.js +0 -10
  171. package/dist/components/use-selected-outline-control-target.js +12 -21
  172. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  173. package/dist/components/wrap-jsx-node-api.js +13 -0
  174. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  175. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  176. package/dist/esm/{CaptionQueueProcessor-npa6szn1.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +63 -17
  177. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  178. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  179. package/dist/esm/{TranscriptionModal-79m5wgcj.mjs → TranscriptionModal-e18bzbkb.mjs} +15 -15
  180. package/dist/esm/{VideoMattingModal-31pew0xj.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -65
  181. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  182. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  183. package/dist/esm/{index-n5gmcvhz.mjs → index-5ycb9e9q.mjs} +2 -4
  184. package/dist/esm/{index-5t2dwxsk.mjs → index-890dd9b3.mjs} +259 -21
  185. package/dist/esm/{index-ac5550e7.mjs → index-8nt6a0mw.mjs} +3 -3
  186. package/dist/esm/{index-614tdz2q.mjs → index-9q9w8v9p.mjs} +3 -3
  187. package/dist/esm/{index-s7qa3xbw.mjs → index-c2wabcdt.mjs} +6 -6
  188. package/dist/esm/{index-r1gr3j3a.mjs → index-dfy1t576.mjs} +50 -1
  189. package/dist/esm/{index-21hxsfaa.mjs → index-dh3zk2hv.mjs} +6 -25
  190. package/dist/esm/{index-4zen9prq.mjs → index-dpyss74p.mjs} +6563 -5485
  191. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  192. package/dist/esm/{index-9xxg6218.mjs → index-qve7mdfp.mjs} +19 -1
  193. package/dist/esm/{index-e855w59j.mjs → index-s6qya2gg.mjs} +3 -5
  194. package/dist/esm/index-t7tbt980.mjs +103 -0
  195. package/dist/esm/{index-r0ejh5sy.mjs → index-t7xnxdf8.mjs} +44 -26
  196. package/dist/esm/index-wqc43mw0.mjs +158 -0
  197. package/dist/esm/{index-ppspzgn9.mjs → index-x6r9bn12.mjs} +4026 -4761
  198. package/dist/esm/{index-vxwg66ar.mjs → index-xac20sv4.mjs} +44 -57
  199. package/dist/esm/index.mjs +4 -5
  200. package/dist/esm/internals.mjs +13 -13
  201. package/dist/esm/previewEntry.mjs +18 -15
  202. package/dist/esm/renderEntry.mjs +5 -1
  203. package/dist/helpers/calculate-timeline.d.ts +5 -1
  204. package/dist/helpers/calculate-timeline.js +1 -1
  205. package/dist/helpers/checkerboard-background.d.ts +2 -2
  206. package/dist/helpers/colors.d.ts +132 -112
  207. package/dist/helpers/colors.js +117 -95
  208. package/dist/helpers/create-folder-tree.js +2 -1
  209. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  210. package/dist/helpers/editor-ruler.js +23 -12
  211. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  212. package/dist/helpers/get-connected-compositions.js +1 -1
  213. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  214. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  215. package/dist/helpers/get-sequence-visible-range.js +2 -5
  216. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  217. package/dist/helpers/get-timeline-nestedness.js +1 -1
  218. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  219. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  220. package/dist/helpers/hoverable.js +4 -4
  221. package/dist/helpers/inject-css.js +5 -7
  222. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  223. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  224. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  225. package/dist/helpers/resolve-studio-color.js +11 -0
  226. package/dist/helpers/studio-css-variables.d.ts +1 -0
  227. package/dist/helpers/studio-css-variables.js +105 -0
  228. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  229. package/dist/helpers/studio-pixel-ratio.js +7 -0
  230. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  231. package/dist/helpers/timeline-node-path-key.js +2 -2
  232. package/dist/helpers/use-runtime-values.js +2 -28
  233. package/dist/hot-middleware-client/client.js +5 -3
  234. package/dist/icons/align-center-horizontal.js +2 -1
  235. package/dist/icons/align-left.js +2 -1
  236. package/dist/icons/align-right.js +2 -1
  237. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  238. package/dist/icons/background-removal.js +9 -0
  239. package/dist/icons/wrap.d.ts +4 -0
  240. package/dist/icons/wrap.js +10 -0
  241. package/dist/previewEntry.js +2 -0
  242. package/dist/renderEntry.js +2 -0
  243. package/dist/state/modals.d.ts +15 -1
  244. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  245. package/dist/state/timeline-sequence-hover.js +6 -67
  246. package/package.json +20 -19
  247. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  248. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  249. package/dist/esm/LazyModels-nh3c8h9p.mjs +0 -12
  250. package/dist/esm/LazyModels-rr5v8h5y.mjs +0 -12
  251. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  252. package/dist/esm/index-k426ye99.mjs +0 -139
  253. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  254. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  255. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  256. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  257. package/dist/icons/separation.js +0 -7
  258. /package/dist/esm/{resolve-composition-component-location-qrp05g62.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +0 -0
@@ -1,99 +1,142 @@
1
1
  import {
2
2
  loadModelForJob
3
- } from "./index-v4tr1bft.mjs";
3
+ } from "./index-09txs1bj.mjs";
4
4
  import {
5
5
  RenderQueueContext
6
- } from "./index-9x6e1dq0.mjs";
6
+ } from "./index-hqxc6tzp.mjs";
7
7
  import {
8
+ callApi,
9
+ getBrowserStudioOperations,
8
10
  writeStaticFile
9
- } from "./index-cw0pnpg5.mjs";
11
+ } from "./index-dfy1t576.mjs";
10
12
  import"./index-rcv7qkt5.mjs";
11
13
 
12
14
  // src/components/RenderQueue/VideoMattingQueueProcessor.tsx
13
15
  import {
14
16
  canUseVideoMatting,
15
17
  disposeVideoMattingModel,
18
+ downloadVideoMattingModel,
16
19
  isVideoMattingModelCached,
17
20
  loadVideoMattingModel,
18
- separateVideoLayers
21
+ VideoMattingInternals
19
22
  } from "@remotion/video-matting";
20
23
  import { useCallback, useContext, useEffect } from "react";
21
24
  var VideoMattingQueueProcessor = () => {
22
25
  const {
23
26
  markVideoMattingJobDone,
24
27
  markVideoMattingJobFailed,
28
+ markVideoMattingJobCancelled,
29
+ markVideoMattingJobSaving,
30
+ getAbortController,
25
31
  setProcessVideoMattingJobCallback,
26
32
  updateVideoMattingJobProgress
27
33
  } = useContext(RenderQueueContext);
28
34
  const processJob = useCallback(async (job) => {
29
- let outputs = null;
35
+ const { signal } = getAbortController(job.id);
36
+ let output = null;
30
37
  let processingError = null;
31
38
  try {
39
+ signal.throwIfAborted();
32
40
  updateVideoMattingJobProgress(job.id, {
33
41
  detail: null,
34
42
  message: "Checking WebGPU support...",
35
43
  value: 0
36
44
  });
37
45
  const support = await canUseVideoMatting({ model: job.model });
46
+ signal.throwIfAborted();
38
47
  if (!support.supported) {
39
48
  throw new Error(support.detailedReason);
40
49
  }
41
50
  await loadModelForJob({
51
+ signal,
42
52
  model: job.model,
43
53
  progressStart: 0,
44
54
  progressSpan: 0.2,
45
55
  isModelCached: (model) => isVideoMattingModelCached({ model }),
46
- loadModel: (model, onProgress) => loadVideoMattingModel({
47
- model,
48
- onProgress: (progress) => onProgress(progress.progress)
49
- }),
56
+ loadModel: async (model, onProgress) => {
57
+ await downloadVideoMattingModel({
58
+ signal,
59
+ model,
60
+ onProgress: (progress) => onProgress(progress.progress)
61
+ });
62
+ await loadVideoMattingModel({ model, signal });
63
+ },
50
64
  updateProgress: (progress) => updateVideoMattingJobProgress(job.id, {
51
65
  ...progress,
52
66
  detail: null
53
67
  })
54
68
  });
55
- outputs = await separateVideoLayers({
69
+ const mattingOptions = {
70
+ signal,
56
71
  src: job.src,
57
72
  model: job.model,
58
- audio: job.audio,
59
73
  videoBitrate: job.videoBitrate,
60
74
  onProgress: (progress) => {
61
75
  updateVideoMattingJobProgress(job.id, {
62
76
  detail: progress.stage === "finalizing" ? `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? "frame" : "frames"}` : `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? "frame" : "frames"} · ${Math.round(progress.progress * 100)}%`,
63
- message: progress.stage === "finalizing" ? "Finalizing video layers..." : "Separating foreground...",
77
+ message: progress.stage === "finalizing" ? "Finalizing video..." : "Removing background...",
64
78
  value: 0.2 + (progress.progress ?? 1) * 0.65
65
79
  });
66
80
  }
81
+ };
82
+ output = await VideoMattingInternals.removeVideoBackground({
83
+ ...mattingOptions,
84
+ audio: job.audio
67
85
  });
86
+ if (output === null) {
87
+ throw new Error("Video matting produced no output.");
88
+ }
89
+ signal.throwIfAborted();
68
90
  updateVideoMattingJobProgress(job.id, {
69
91
  detail: null,
70
- message: "Saving video layers...",
92
+ message: "Saving video...",
71
93
  value: 0.88
72
94
  });
73
- const [base, foreground] = await Promise.all([
74
- outputs.base.getBlob(),
75
- outputs.foreground.getBlob()
76
- ]);
77
- await Promise.all([
78
- base.arrayBuffer().then((contents) => writeStaticFile({ contents, filePath: job.baseOutName })),
79
- foreground.arrayBuffer().then((contents) => writeStaticFile({ contents, filePath: job.foregroundOutName }))
80
- ]);
95
+ const video = await output.video.getBlob();
96
+ signal.throwIfAborted();
97
+ markVideoMattingJobSaving(job.id);
98
+ await video.arrayBuffer().then((contents) => writeStaticFile({ contents, filePath: job.outName }));
99
+ if (job.target !== null) {
100
+ updateVideoMattingJobProgress(job.id, {
101
+ detail: null,
102
+ message: "Replacing video source...",
103
+ value: 0.97
104
+ });
105
+ const browserStudioOperations = getBrowserStudioOperations();
106
+ const request = {
107
+ fileName: job.target.fileName,
108
+ nodePath: job.target.nodePath.nodePath,
109
+ src: job.outName
110
+ };
111
+ const replaceSource = browserStudioOperations?.replaceVideoSource;
112
+ if (browserStudioOperations && !replaceSource) {
113
+ throw new Error("Browser Studio cannot replace the video source.");
114
+ }
115
+ const response = replaceSource ? await replaceSource(request) : await callApi("/api/replace-video-source", request);
116
+ if (!response.success) {
117
+ throw new Error(response.reason);
118
+ }
119
+ }
81
120
  } catch (error) {
82
121
  processingError = error instanceof Error ? error : new Error(String(error));
83
122
  }
123
+ if (output) {
124
+ await Promise.allSettled([output.video.dispose()]);
125
+ }
84
126
  try {
85
- await Promise.all([
86
- outputs?.base.dispose(),
87
- outputs?.foreground.dispose()
88
- ]);
89
127
  await disposeVideoMattingModel({ model: job.model });
90
128
  } catch {}
91
- if (processingError) {
129
+ if (signal.aborted) {
130
+ markVideoMattingJobCancelled(job.id);
131
+ } else if (processingError) {
92
132
  markVideoMattingJobFailed(job.id, processingError);
93
133
  } else {
94
134
  markVideoMattingJobDone(job.id);
95
135
  }
96
136
  }, [
137
+ getAbortController,
138
+ markVideoMattingJobCancelled,
139
+ markVideoMattingJobSaving,
97
140
  markVideoMattingJobDone,
98
141
  markVideoMattingJobFailed,
99
142
  updateVideoMattingJobProgress
@@ -3,18 +3,23 @@ var loadModelForJob = async ({
3
3
  isModelCached,
4
4
  loadModel,
5
5
  model,
6
+ signal,
6
7
  progressSpan,
7
8
  progressStart,
8
9
  updateProgress
9
10
  }) => {
11
+ signal.throwIfAborted();
10
12
  const cached = await isModelCached(model);
13
+ signal.throwIfAborted();
11
14
  await loadModel(model, (progress) => {
15
+ signal.throwIfAborted();
12
16
  const percentage = progress === null ? "" : ` ${Math.round(progress * 100)}%`;
13
17
  updateProgress({
14
18
  message: `${cached ? "Loading" : "Downloading"} ${model}${percentage}`,
15
19
  value: progressStart + (progress ?? 0) * progressSpan
16
20
  });
17
21
  });
22
+ signal.throwIfAborted();
18
23
  };
19
24
 
20
25
  export { loadModelForJob };
@@ -1,9 +1,7 @@
1
1
  import {
2
- callApi
3
- } from "./index-r1gr3j3a.mjs";
4
- import {
2
+ callApi,
5
3
  getBrowserStudioOperations
6
- } from "./index-cw0pnpg5.mjs";
4
+ } from "./index-dfy1t576.mjs";
7
5
 
8
6
  // src/api/pause.ts
9
7
  import { Internals } from "remotion";
@@ -1,21 +1,28 @@
1
1
  import {
2
2
  HigherZIndex,
3
+ getPortal,
3
4
  useZIndex
4
- } from "./index-9xxg6218.mjs";
5
+ } from "./index-qve7mdfp.mjs";
5
6
  import {
6
7
  BACKGROUND,
7
8
  BLUE,
8
9
  BORDER_BLACK,
9
10
  CURRENT_COLOR,
11
+ CURRENT_COLOR_LOWERCASE,
10
12
  FAIL_COLOR,
11
13
  LIGHT_TEXT,
12
14
  SHADOW_BLACK,
15
+ SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM,
16
+ SHADOW_BLACK_ALPHA_50_TOWARDS_TOP,
17
+ TIMELINE_BACKGROUND_COLOR,
13
18
  TRANSPARENT,
14
19
  WARNING_COLOR,
15
20
  WHITE,
21
+ WHITE_ALPHA_10,
16
22
  WHITE_ALPHA_20,
23
+ WHITE_ALPHA_90,
17
24
  getBackgroundFromHoverState
18
- } from "./index-k426ye99.mjs";
25
+ } from "./index-wqc43mw0.mjs";
19
26
 
20
27
  // src/components/layout.tsx
21
28
  import { useMemo } from "react";
@@ -84,10 +91,10 @@ var HOVERABLE_CLASS_NAME = "__remotion-hoverable";
84
91
  var HOVER_GROUP_CLASS_NAME = "__remotion-hover-group";
85
92
  var HOVER_GROUP_REVEAL_CLASS_NAME = "__remotion-hover-group-reveal";
86
93
  var FOCUS_VISIBLE_ONLY_CLASS_NAME = "__remotion-focus-visible-only";
87
- var BG_VARIABLE = "--remotion-hoverable-bg";
88
- var HOVER_BG_VARIABLE = "--remotion-hoverable-hover-bg";
89
- var COLOR_VARIABLE = "--remotion-hoverable-color";
90
- var HOVER_COLOR_VARIABLE = "--remotion-hoverable-hover-color";
94
+ var BG_VARIABLE = "--remotion-studio-hoverable-bg";
95
+ var HOVER_BG_VARIABLE = "--remotion-studio-hoverable-hover-bg";
96
+ var COLOR_VARIABLE = "--remotion-studio-hoverable-color";
97
+ var HOVER_COLOR_VARIABLE = "--remotion-studio-hoverable-hover-color";
91
98
  var NO_HOVER_BACKGROUND_STYLE = {
92
99
  [HOVER_BG_VARIABLE]: TRANSPARENT
93
100
  };
@@ -433,9 +440,240 @@ var flexer = {
433
440
  flex: 1
434
441
  };
435
442
 
443
+ // src/icons/models.tsx
444
+ import { jsx as jsx5 } from "react/jsx-runtime";
445
+ var ModelsIcon = ({
446
+ color,
447
+ ...props
448
+ }) => /* @__PURE__ */ jsx5("svg", {
449
+ xmlns: "http://www.w3.org/2000/svg",
450
+ viewBox: "0 0 512 512",
451
+ ...props,
452
+ children: /* @__PURE__ */ jsx5("path", {
453
+ d: "M176 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-16c-35.3 0-64 28.7-64 64v16H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v16c0 35.3 28.7 64 64 64h16v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h16c35.3 0 64-28.7 64-64v-16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-16c0-35.3-28.7-64-64-64h-16V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16ZM416 128v256c0 17.7-14.3 32-32 32H128c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32h256c17.7 0 32 14.3 32 32ZM192 160c-17.7 0-32 14.3-32 32v128c0 17.7 14.3 32 32 32h128c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32H192Zm128 32v128H192V192h128Z",
454
+ fill: color ?? CURRENT_COLOR_LOWERCASE
455
+ })
456
+ });
457
+
458
+ // src/components/Menu/styles.ts
459
+ var MENU_VERTICAL_PADDING = 4;
460
+ var SUBMENU_LEFT_INSET = -8;
461
+ var MAX_MENU_WIDTH = 400;
462
+ var MAX_MOBILE_MENU_WIDTH = 300;
463
+ var menuContainer = {
464
+ backgroundColor: BACKGROUND,
465
+ position: "fixed",
466
+ color: WHITE,
467
+ userSelect: "none",
468
+ WebkitUserSelect: "none"
469
+ };
470
+ var SHADOW_TOWARDS_BOTTOM = SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM;
471
+ var SHADOW_TOWARDS_TOP = SHADOW_BLACK_ALPHA_50_TOWARDS_TOP;
472
+ var menuContainerTowardsBottom = {
473
+ ...menuContainer,
474
+ boxShadow: SHADOW_TOWARDS_BOTTOM
475
+ };
476
+ var menuContainerTowardsTop = {
477
+ ...menuContainer,
478
+ boxShadow: SHADOW_TOWARDS_TOP
479
+ };
480
+ var fullScreenOverlay = {
481
+ position: "fixed",
482
+ top: 0,
483
+ left: 0,
484
+ right: 0,
485
+ bottom: 0
486
+ };
487
+ var outerPortal = {
488
+ position: "fixed"
489
+ };
490
+ var inlineCodeSnippet = {
491
+ fontSize: 14,
492
+ color: BLUE,
493
+ fontFamily: "monospace"
494
+ };
495
+
496
+ // src/components/ActionTooltip.tsx
497
+ import {
498
+ useCallback as useCallback3,
499
+ useEffect,
500
+ useLayoutEffect,
501
+ useRef,
502
+ useState
503
+ } from "react";
504
+ import { createPortal } from "react-dom";
505
+ import { jsx as jsx6, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
506
+ var defaultTriggerStyle = { display: "inline-flex" };
507
+ var tooltipStyle = {
508
+ position: "fixed",
509
+ display: "flex",
510
+ alignItems: "center",
511
+ gap: 6,
512
+ backgroundColor: TIMELINE_BACKGROUND_COLOR,
513
+ color: WHITE_ALPHA_90,
514
+ borderRadius: 6,
515
+ padding: "6px 8px",
516
+ fontSize: 12,
517
+ lineHeight: "16px",
518
+ whiteSpace: "pre-wrap",
519
+ overflowWrap: "anywhere",
520
+ maxWidth: "calc(100vw - 16px)",
521
+ boxShadow: SHADOW_TOWARDS_TOP,
522
+ pointerEvents: "none"
523
+ };
524
+ var labelStyle = {
525
+ font: "inherit",
526
+ color: "inherit",
527
+ minWidth: 0
528
+ };
529
+ var shortcutStyle = {
530
+ ...labelStyle,
531
+ backgroundColor: WHITE_ALPHA_10,
532
+ borderRadius: 3,
533
+ padding: "0 4px",
534
+ minWidth: 16,
535
+ textAlign: "center",
536
+ whiteSpace: "nowrap",
537
+ flexShrink: 0
538
+ };
539
+ var visibleTooltipCount = 0;
540
+ var lastTooltipHiddenAt = null;
541
+ var TOOLTIP_SKIP_DELAY_WINDOW = 300;
542
+ var ActionTooltip = ({
543
+ label: label2,
544
+ shortcut,
545
+ delay,
546
+ dismissOnClick,
547
+ side = "top",
548
+ triggerStyle,
549
+ children
550
+ }) => {
551
+ const triggerRef = useRef(null);
552
+ const tooltipRef = useRef(null);
553
+ const timer = useRef(null);
554
+ const [visible, setVisible] = useState(false);
555
+ const [position, setPosition] = useState(null);
556
+ const { currentZIndex } = useZIndex();
557
+ useLayoutEffect(() => {
558
+ if (!visible) {
559
+ return;
560
+ }
561
+ visibleTooltipCount++;
562
+ return () => {
563
+ visibleTooltipCount--;
564
+ lastTooltipHiddenAt = Date.now();
565
+ };
566
+ }, [visible]);
567
+ const hide = useCallback3(() => {
568
+ if (timer.current !== null) {
569
+ clearTimeout(timer.current);
570
+ timer.current = null;
571
+ }
572
+ setVisible(false);
573
+ setPosition(null);
574
+ }, []);
575
+ const show = useCallback3(() => {
576
+ if (timer.current !== null) {
577
+ clearTimeout(timer.current);
578
+ timer.current = null;
579
+ }
580
+ setVisible(true);
581
+ }, []);
582
+ const onPointerEnter = useCallback3((event) => {
583
+ if (event.pointerType === "touch" || timer.current !== null || !event.currentTarget.contains(event.target)) {
584
+ return;
585
+ }
586
+ if (!delay || visibleTooltipCount > 0 || lastTooltipHiddenAt !== null && Date.now() - lastTooltipHiddenAt < TOOLTIP_SKIP_DELAY_WINDOW) {
587
+ show();
588
+ return;
589
+ }
590
+ timer.current = setTimeout(show, delay);
591
+ }, [delay, show]);
592
+ useEffect(() => {
593
+ const onKeyDown = (event) => {
594
+ if (event.key === "Escape") {
595
+ hide();
596
+ }
597
+ };
598
+ window.addEventListener("keydown", onKeyDown);
599
+ window.addEventListener("blur", hide);
600
+ window.addEventListener("resize", hide);
601
+ window.addEventListener("scroll", hide, true);
602
+ return () => {
603
+ if (timer.current !== null) {
604
+ clearTimeout(timer.current);
605
+ }
606
+ window.removeEventListener("keydown", onKeyDown);
607
+ window.removeEventListener("blur", hide);
608
+ window.removeEventListener("resize", hide);
609
+ window.removeEventListener("scroll", hide, true);
610
+ };
611
+ }, [hide]);
612
+ useLayoutEffect(() => {
613
+ if (!visible || !triggerRef.current || !tooltipRef.current) {
614
+ return;
615
+ }
616
+ const trigger = triggerRef.current.getBoundingClientRect();
617
+ const tooltip = tooltipRef.current.getBoundingClientRect();
618
+ if (side === "right") {
619
+ const right = trigger.right + 4;
620
+ setPosition({
621
+ left: right + tooltip.width <= window.innerWidth - 8 ? right : Math.max(8, trigger.left - tooltip.width - 4),
622
+ top: Math.max(8, Math.min(trigger.top + (trigger.height - tooltip.height) / 2, window.innerHeight - tooltip.height - 8))
623
+ });
624
+ return;
625
+ }
626
+ const above = trigger.top - tooltip.height - 4;
627
+ setPosition({
628
+ left: Math.max(8, Math.min(trigger.left + (trigger.width - tooltip.width) / 2, window.innerWidth - tooltip.width - 8)),
629
+ top: Math.max(8, Math.min(above >= 8 ? above : trigger.bottom + 4, window.innerHeight - tooltip.height - 8))
630
+ });
631
+ }, [label2, shortcut, side, visible]);
632
+ return /* @__PURE__ */ jsxs2(Fragment2, {
633
+ children: [
634
+ /* @__PURE__ */ jsx6("span", {
635
+ ref: triggerRef,
636
+ style: { ...defaultTriggerStyle, ...triggerStyle },
637
+ onPointerEnter,
638
+ onPointerLeave: hide,
639
+ onPointerDownCapture: dismissOnClick ? hide : undefined,
640
+ onClickCapture: dismissOnClick ? hide : undefined,
641
+ onFocus: (event) => {
642
+ if (event.currentTarget.contains(event.target)) {
643
+ show();
644
+ }
645
+ },
646
+ onBlur: hide,
647
+ children
648
+ }),
649
+ visible ? createPortal(/* @__PURE__ */ jsxs2("div", {
650
+ ref: tooltipRef,
651
+ role: "tooltip",
652
+ className: "css-reset",
653
+ style: {
654
+ ...tooltipStyle,
655
+ left: position?.left ?? 0,
656
+ top: position?.top ?? 0,
657
+ visibility: position ? "visible" : "hidden"
658
+ },
659
+ children: [
660
+ /* @__PURE__ */ jsx6("span", {
661
+ style: labelStyle,
662
+ children: label2
663
+ }),
664
+ shortcut ? /* @__PURE__ */ jsx6("kbd", {
665
+ style: shortcutStyle,
666
+ children: shortcut
667
+ }) : null
668
+ ]
669
+ }), getPortal(currentZIndex)) : null
670
+ ]
671
+ });
672
+ };
673
+
436
674
  // src/components/Spinner.tsx
437
675
  import { useMemo as useMemo4 } from "react";
438
- import { jsx as jsx5, jsxs as jsxs2, Fragment as Fragment2 } from "react/jsx-runtime";
676
+ import { jsx as jsx7, jsxs as jsxs3, Fragment as Fragment3 } from "react/jsx-runtime";
439
677
  var viewBox = 100;
440
678
  var lines = 8;
441
679
  var className = "__remotion_spinner_line";
@@ -448,9 +686,9 @@ var Spinner = ({ size, duration, color = LIGHT_TEXT }) => {
448
686
  height: size
449
687
  };
450
688
  }, [size]);
451
- return /* @__PURE__ */ jsxs2(Fragment2, {
689
+ return /* @__PURE__ */ jsxs3(Fragment3, {
452
690
  children: [
453
- /* @__PURE__ */ jsx5("style", {
691
+ /* @__PURE__ */ jsx7("style", {
454
692
  type: "text/css",
455
693
  children: `
456
694
  @keyframes ${remotionSpinnerAnimation} {
@@ -467,11 +705,11 @@ var Spinner = ({ size, duration, color = LIGHT_TEXT }) => {
467
705
  }
468
706
  `
469
707
  }),
470
- /* @__PURE__ */ jsx5("svg", {
708
+ /* @__PURE__ */ jsx7("svg", {
471
709
  style: style2,
472
710
  viewBox: `0 0 ${viewBox} ${viewBox}`,
473
711
  children: new Array(lines).fill(true).map((_, index) => {
474
- return /* @__PURE__ */ jsx5("path", {
712
+ return /* @__PURE__ */ jsx7("path", {
475
713
  className,
476
714
  style: {
477
715
  rotate: `${index * Math.PI * 2 / lines}rad`,
@@ -488,13 +726,13 @@ var Spinner = ({ size, duration, color = LIGHT_TEXT }) => {
488
726
  };
489
727
 
490
728
  // src/icons/trash.tsx
491
- import { jsx as jsx6 } from "react/jsx-runtime";
729
+ import { jsx as jsx8 } from "react/jsx-runtime";
492
730
  var TrashIcon = ({ color, ...props }) => {
493
- return /* @__PURE__ */ jsx6("svg", {
731
+ return /* @__PURE__ */ jsx8("svg", {
494
732
  xmlns: "http://www.w3.org/2000/svg",
495
733
  viewBox: "0 0 448 512",
496
734
  ...props,
497
- children: /* @__PURE__ */ jsx6("path", {
735
+ children: /* @__PURE__ */ jsx8("path", {
498
736
  fill: color,
499
737
  d: "M160.5 27.4C162.5 20.6 168.8 16 175.8 16h96.4c7.1 0 13.3 4.6 15.3 11.4l11 36.6h-149l11-36.6zM116.1 64H16C7.2 64 0 71.2 0 80s7.2 16 16 16h416c8.8 0 16-7.2 16-16s-7.2-16-16-16H331.9l-13.7-45.8C312.1-2.1 293.4-16 272.2-16h-96.4c-21.2 0-39.9 13.9-46 34.2L116.1 64zM28.7 144l22.9 308.7c2.5 33.4 30.3 59.3 63.8 59.3h217.1c33.5 0 61.3-25.9 63.8-59.3L419.2 144h-32.1l-22.7 306.4c-1.2 16.7-15.2 29.6-31.9 29.6H115.4c-16.8 0-30.7-12.9-31.9-29.6L60.8 144H28.7z"
500
738
  })
@@ -502,13 +740,13 @@ var TrashIcon = ({ color, ...props }) => {
502
740
  };
503
741
 
504
742
  // src/icons/cloud-download.tsx
505
- import { jsx as jsx7 } from "react/jsx-runtime";
743
+ import { jsx as jsx9 } from "react/jsx-runtime";
506
744
  var CloudDownloadIcon = ({ color, ...props }) => {
507
- return /* @__PURE__ */ jsx7("svg", {
745
+ return /* @__PURE__ */ jsx9("svg", {
508
746
  ...props,
509
747
  xmlns: "http://www.w3.org/2000/svg",
510
748
  viewBox: "0 0 576 512",
511
- children: /* @__PURE__ */ jsx7("path", {
749
+ children: /* @__PURE__ */ jsx9("path", {
512
750
  fill: color,
513
751
  d: "M128 176c0-61.9 50.1-112 112-112 39.3 0 73.8 20.2 93.8 50.8 4.4 6.7 13.1 9.1 20.3 5.7 11.4-5.5 24.3-8.5 37.9-8.5 48.6 0 88 39.4 88 88 0 14.1-3.3 27.4-9.2 39.2-2 4.1-2.2 8.9-.5 13.1s5.2 7.6 9.5 9.1c37.4 13.1 64.2 48.8 64.2 90.6 0 53-43 96-96 96l-304 0c-61.9 0-112-50.1-112-112 0-53.7 37.8-98.6 88.2-109.5 4.3-.9 8.1-3.6 10.3-7.4s2.9-8.3 1.7-12.6c-2.7-9.7-4.2-19.9-4.2-30.5zM240 32c-79.5 0-144 64.5-144 144 0 8 .7 15.9 1.9 23.5-56.9 19.2-97.9 73-97.9 136.5 0 79.5 64.5 144 144 144l304 0c70.7 0 128-57.3 128-128 0-49.9-28.5-93-70.1-114.2 3.9-11.9 6.1-24.6 6.1-37.8 0-66.3-53.7-120-120-120-13.7 0-26.9 2.3-39.2 6.5-26.4-33.2-67.1-54.5-112.8-54.5zM371.3 307.3c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L304 329.4 304 208c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 121.4-44.7-44.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l72 72c6.2 6.2 16.4 6.2 22.6 0l72-72z"
514
752
  })
@@ -516,15 +754,15 @@ var CloudDownloadIcon = ({ color, ...props }) => {
516
754
  };
517
755
 
518
756
  // src/icons/check-circle-filled.tsx
519
- import { jsx as jsx8 } from "react/jsx-runtime";
520
- var CheckCircleFilled = (props) => /* @__PURE__ */ jsx8("svg", {
757
+ import { jsx as jsx10 } from "react/jsx-runtime";
758
+ var CheckCircleFilled = (props) => /* @__PURE__ */ jsx10("svg", {
521
759
  xmlns: "http://www.w3.org/2000/svg",
522
760
  style: { width: 14, height: 14 },
523
761
  viewBox: "0 0 512 512",
524
762
  ...props,
525
- children: /* @__PURE__ */ jsx8("path", {
763
+ children: /* @__PURE__ */ jsx10("path", {
526
764
  d: "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zM374 145.7c-10.7-7.8-25.7-5.4-33.5 5.3L221.1 315.2 169 263.1c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l72 72c5 5 11.8 7.5 18.8 7s13.4-4.1 17.5-9.8L379.3 179.2c7.8-10.7 5.4-25.7-5.3-33.5z"
527
765
  })
528
766
  });
529
767
 
530
- export { SPACING_UNIT, COMPACT_CONTROL_ROW_HEIGHT, COMPACT_INLINE_ROW_HEIGHT, Spacing, Flex, Row, Column, getMaxModalWidth, getMaxModalHeight, ModalContainer, HOVERABLE_CLASS_NAME, HOVER_GROUP_CLASS_NAME, HOVER_GROUP_REVEAL_CLASS_NAME, FOCUS_VISIBLE_ONLY_CLASS_NAME, NO_HOVER_BACKGROUND_STYLE, hoverableStyle, makeHoverableCSS, InlineAction, MENU_INITIATOR_CLASSNAME, MENU_ITEM_CLASSNAME, HORIZONTAL_SCROLLBAR_CLASSNAME, VERTICAL_SCROLLBAR_CLASSNAME, isMenuItem, Spinner, TrashIcon, WarningTriangle, ValidationMessage, CloudDownloadIcon, CheckCircleFilled, outerModalStyle, container2 as container, optionsPanel, horizontalLayout, leftSidebar, horizontalTab, iconContainer, icon, buttonStyle, flexer };
768
+ export { SPACING_UNIT, COMPACT_CONTROL_ROW_HEIGHT, COMPACT_INLINE_ROW_HEIGHT, Spacing, Flex, Row, Column, getMaxModalWidth, getMaxModalHeight, ModalContainer, HOVERABLE_CLASS_NAME, HOVER_GROUP_CLASS_NAME, HOVER_GROUP_REVEAL_CLASS_NAME, FOCUS_VISIBLE_ONLY_CLASS_NAME, NO_HOVER_BACKGROUND_STYLE, hoverableStyle, makeHoverableCSS, InlineAction, MENU_VERTICAL_PADDING, SUBMENU_LEFT_INSET, MAX_MENU_WIDTH, MAX_MOBILE_MENU_WIDTH, SHADOW_TOWARDS_BOTTOM, SHADOW_TOWARDS_TOP, menuContainerTowardsBottom, menuContainerTowardsTop, fullScreenOverlay, outerPortal, inlineCodeSnippet, MENU_INITIATOR_CLASSNAME, MENU_ITEM_CLASSNAME, HORIZONTAL_SCROLLBAR_CLASSNAME, VERTICAL_SCROLLBAR_CLASSNAME, isMenuItem, ActionTooltip, Spinner, TrashIcon, WarningTriangle, ValidationMessage, CloudDownloadIcon, CheckCircleFilled, outerModalStyle, container2 as container, optionsPanel, horizontalLayout, leftSidebar, horizontalTab, iconContainer, icon, buttonStyle, flexer, ModelsIcon };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ModelManager
3
- } from "./index-r0ejh5sy.mjs";
3
+ } from "./index-t7xnxdf8.mjs";
4
4
 
5
5
  // src/components/VideoMatting/Models.tsx
6
6
  import {
7
+ downloadVideoMattingModel,
7
8
  getAvailableModels,
8
9
  isVideoMattingModelCached,
9
- loadVideoMattingModel,
10
10
  removeVideoMattingModel
11
11
  } from "@remotion/video-matting";
12
12
  import { useCallback } from "react";
@@ -14,7 +14,7 @@ import { jsx } from "react/jsx-runtime";
14
14
  var AVAILABLE_MODELS = getAvailableModels();
15
15
  var Models = ({ description, indent, visible }) => {
16
16
  const isModelCached = useCallback((model) => isVideoMattingModelCached({ model }), []);
17
- const loadModel = useCallback((model, onProgress) => loadVideoMattingModel({
17
+ const loadModel = useCallback((model, onProgress) => downloadVideoMattingModel({
18
18
  model,
19
19
  onProgress: (progress) => onProgress(progress.progress)
20
20
  }), []);
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ModelManager
3
- } from "./index-r0ejh5sy.mjs";
3
+ } from "./index-t7xnxdf8.mjs";
4
4
 
5
5
  // src/components/Transcription/Models.tsx
6
6
  import {
7
7
  clearStaleModels,
8
+ downloadWhisperModel,
8
9
  getAvailableModels,
9
10
  isWhisperModelCached,
10
- loadWhisperModel,
11
11
  removeWhisperModel
12
12
  } from "@remotion/whisper-webgpu";
13
13
  import { useCallback } from "react";
@@ -15,7 +15,7 @@ import { jsx } from "react/jsx-runtime";
15
15
  var AVAILABLE_MODELS = getAvailableModels();
16
16
  var Models = ({ description, indent, visible }) => {
17
17
  const isModelCached = useCallback((model) => isWhisperModelCached({ model }), []);
18
- const loadModel = useCallback((model, onProgress) => loadWhisperModel({
18
+ const loadModel = useCallback((model, onProgress) => downloadWhisperModel({
19
19
  model,
20
20
  onProgress: (progress) => onProgress(progress.progress)
21
21
  }), []);
@@ -5,25 +5,25 @@ import {
5
5
  label,
6
6
  optionRow,
7
7
  rightRow
8
- } from "./index-ppspzgn9.mjs";
8
+ } from "./index-x6r9bn12.mjs";
9
9
  import {
10
10
  showNotification
11
- } from "./index-21hxsfaa.mjs";
11
+ } from "./index-dh3zk2hv.mjs";
12
12
  import {
13
13
  openInFileExplorer
14
- } from "./index-e855w59j.mjs";
14
+ } from "./index-s6qya2gg.mjs";
15
15
  import {
16
16
  getBrowserStudioOperations
17
- } from "./index-cw0pnpg5.mjs";
17
+ } from "./index-dfy1t576.mjs";
18
18
  import {
19
19
  Column,
20
20
  InlineAction,
21
21
  Spacing,
22
22
  ValidationMessage
23
- } from "./index-5t2dwxsk.mjs";
23
+ } from "./index-890dd9b3.mjs";
24
24
  import {
25
25
  WHITE
26
- } from "./index-k426ye99.mjs";
26
+ } from "./index-wqc43mw0.mjs";
27
27
 
28
28
  // src/components/RenderModal/RenderModalOutputName.tsx
29
29
  import { useCallback } from "react";