@remotion/studio 4.0.526 → 4.0.528

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/Canvas.js +88 -26
  5. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  6. package/dist/components/CanvasOrLoading.js +10 -2
  7. package/dist/components/CodeFrame.js +1 -1
  8. package/dist/components/ColorPicker/checker.d.ts +1 -1
  9. package/dist/components/CompositionSelectorItem.js +1 -0
  10. package/dist/components/CurrentAsset.js +4 -2
  11. package/dist/components/EditorRuler/Ruler.js +6 -3
  12. package/dist/components/EffectPickerModal.js +69 -43
  13. package/dist/components/ElementInstallConfirmation.js +3 -3
  14. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  15. package/dist/components/ElementLibrariesSettings.js +200 -0
  16. package/dist/components/InitialCompositionLoader.js +4 -2
  17. package/dist/components/InlineDropdown.js +26 -2
  18. package/dist/components/InlineEditableTitle.js +1 -0
  19. package/dist/components/InspectorOpenInEditor.js +13 -0
  20. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  21. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
  22. package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
  23. package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
  24. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  25. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
  26. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  27. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  28. package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
  29. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  30. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  31. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
  32. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  33. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  34. package/dist/components/InspectorPanel/common.js +1 -0
  35. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  36. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  37. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  38. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  39. package/dist/components/InspectorPanel/styles.js +2 -0
  40. package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  42. package/dist/components/InspectorSequenceSection.js +7 -5
  43. package/dist/components/InspectorSourceLocation.js +3 -0
  44. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  45. package/dist/components/Menu/styles.d.ts +2 -2
  46. package/dist/components/MenuBuildIndicator.js +1 -0
  47. package/dist/components/Modals.js +7 -6
  48. package/dist/components/ModelManager.js +10 -9
  49. package/dist/components/NewComposition/CancelButton.js +11 -5
  50. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  51. package/dist/components/NewComposition/InputDragger.js +28 -9
  52. package/dist/components/NewComposition/NewComposition.js +7 -6
  53. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  54. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  55. package/dist/components/Preview.js +4 -0
  56. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  57. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  58. package/dist/components/RadioButton.js +1 -0
  59. package/dist/components/RenderModal/DataEditor.js +4 -1
  60. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  61. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  62. package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
  64. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  65. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  66. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  67. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  68. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  69. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  70. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  71. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  72. package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
  73. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  74. package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
  75. package/dist/components/RenderQueue/context.d.ts +4 -0
  76. package/dist/components/RenderQueue/context.js +58 -8
  77. package/dist/components/RenderQueue/index.js +3 -3
  78. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  79. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  80. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  81. package/dist/components/RendersTab.js +2 -0
  82. package/dist/components/SelectedOutlineCropControls.js +2 -1
  83. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  84. package/dist/components/SelectedOutlineElement.js +9 -3
  85. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  86. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  87. package/dist/components/SelectedOutlineOverlay.js +152 -106
  88. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  89. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  90. package/dist/components/SelectedOutlinePolygon.js +21 -46
  91. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  92. package/dist/components/SelectedOutlineRenderer.js +32 -136
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  95. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  96. package/dist/components/SelectedOutlineUvControls.js +12 -7
  97. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  98. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  99. package/dist/components/SettingsModal.js +30 -3
  100. package/dist/components/SettingsModalFooter.d.ts +1 -0
  101. package/dist/components/SettingsModalFooter.js +7 -3
  102. package/dist/components/ShowOutlinesProvider.js +1 -1
  103. package/dist/components/SkillsSettings.d.ts +0 -1
  104. package/dist/components/SkillsSettings.js +13 -14
  105. package/dist/components/Splitter/SplitterElement.js +1 -2
  106. package/dist/components/TimeValue.js +1 -1
  107. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  108. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  109. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  111. package/dist/components/Timeline/TimelineColorField.js +1 -1
  112. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  113. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  114. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  115. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  116. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  117. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  118. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  119. package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
  120. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  122. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  123. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  124. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  125. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  126. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  127. package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
  128. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  129. package/dist/components/Timeline/TimelineList.js +1 -1
  130. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  131. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  132. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  133. package/dist/components/Timeline/TimelineSelection.js +16 -9
  134. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  135. package/dist/components/Timeline/TimelineSequence.js +65 -21
  136. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  137. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  138. package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
  139. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  140. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  141. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  142. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  143. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  144. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  145. package/dist/components/Timeline/TimelineTrack.js +1 -1
  146. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  147. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  148. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  149. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  150. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  151. package/dist/components/Timeline/TimelineViewport.js +10 -1
  152. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  153. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  154. package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
  155. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  156. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  157. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  158. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  159. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  160. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  161. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  162. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  163. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
  164. package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
  165. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  166. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  167. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  168. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  169. package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
  170. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  171. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  172. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  173. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  174. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  175. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  176. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  177. package/dist/components/TimelineCombobox.js +1 -0
  178. package/dist/components/Transcription/Models.js +1 -1
  179. package/dist/components/Transcription/TranscriptionModal.js +18 -11
  180. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  181. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  182. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  183. package/dist/components/UpdatesSettings.js +2 -0
  184. package/dist/components/VideoMatting/Models.js +1 -1
  185. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  186. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  187. package/dist/components/WebMcp.js +23 -40
  188. package/dist/components/composition-drop-preview.d.ts +9 -2
  189. package/dist/components/composition-drop-preview.js +8 -4
  190. package/dist/components/composition-menu-items.js +4 -4
  191. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  192. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  193. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  194. package/dist/components/effect-drag-and-drop.js +19 -4
  195. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  196. package/dist/components/get-open-in-menu-items.js +24 -8
  197. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  198. package/dist/components/keyboard-shortcuts.js +3 -1
  199. package/dist/components/public-output-name.d.ts +1 -0
  200. package/dist/components/public-output-name.js +7 -3
  201. package/dist/components/selected-outline-drag.d.ts +1 -6
  202. package/dist/components/selected-outline-drag.js +22 -6
  203. package/dist/components/selected-outline-geometry.d.ts +2 -18
  204. package/dist/components/selected-outline-measurement.d.ts +23 -41
  205. package/dist/components/selected-outline-measurement.js +14 -252
  206. package/dist/components/selected-outline-order.d.ts +4 -11
  207. package/dist/components/selected-outline-order.js +2 -254
  208. package/dist/components/selected-outline-snap.d.ts +1 -1
  209. package/dist/components/selected-outline-snap.js +2 -1
  210. package/dist/components/selected-outline-types.d.ts +18 -28
  211. package/dist/components/selected-outline-uv.d.ts +4 -4
  212. package/dist/components/selected-outline-uv.js +6 -111
  213. package/dist/components/sequence-props-api.js +0 -10
  214. package/dist/components/use-selected-outline-control-target.js +12 -21
  215. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  216. package/dist/components/wrap-jsx-node-api.js +13 -0
  217. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  218. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  219. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
  220. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  221. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  222. package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
  223. package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
  224. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  225. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  226. package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
  227. package/dist/esm/index-890dd9b3.mjs +768 -0
  228. package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
  229. package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
  230. package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
  231. package/dist/esm/index-dfy1t576.mjs +129 -0
  232. package/dist/esm/index-dh3zk2hv.mjs +220 -0
  233. package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
  234. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  235. package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
  236. package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
  237. package/dist/esm/index-t7tbt980.mjs +103 -0
  238. package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
  239. package/dist/esm/index-wqc43mw0.mjs +158 -0
  240. package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
  241. package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
  242. package/dist/esm/index.mjs +4 -4
  243. package/dist/esm/internals.mjs +13 -10
  244. package/dist/esm/previewEntry.mjs +18 -12
  245. package/dist/esm/renderEntry.mjs +5 -1
  246. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
  247. package/dist/helpers/calculate-timeline.d.ts +5 -1
  248. package/dist/helpers/calculate-timeline.js +1 -1
  249. package/dist/helpers/checkerboard-background.d.ts +2 -2
  250. package/dist/helpers/colors.d.ts +132 -112
  251. package/dist/helpers/colors.js +117 -95
  252. package/dist/helpers/copy-text.js +1 -16
  253. package/dist/helpers/create-folder-tree.js +2 -1
  254. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  255. package/dist/helpers/editor-ruler.js +23 -12
  256. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  257. package/dist/helpers/get-connected-compositions.js +1 -1
  258. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  259. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  260. package/dist/helpers/get-sequence-visible-range.js +2 -5
  261. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  262. package/dist/helpers/get-timeline-nestedness.js +1 -1
  263. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  264. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  265. package/dist/helpers/hoverable.js +6 -5
  266. package/dist/helpers/inject-css.js +5 -7
  267. package/dist/helpers/open-in-editor.js +1 -1
  268. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  269. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  270. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  271. package/dist/helpers/resolve-studio-color.js +11 -0
  272. package/dist/helpers/studio-css-variables.d.ts +1 -0
  273. package/dist/helpers/studio-css-variables.js +105 -0
  274. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  275. package/dist/helpers/studio-pixel-ratio.js +7 -0
  276. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  277. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  278. package/dist/helpers/timeline-node-path-key.js +2 -2
  279. package/dist/helpers/use-keybinding.d.ts +1 -1
  280. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  281. package/dist/helpers/use-menu-structure.js +15 -9
  282. package/dist/helpers/use-runtime-values.js +2 -28
  283. package/dist/hot-middleware-client/client.js +5 -3
  284. package/dist/icons/align-center-horizontal.js +2 -1
  285. package/dist/icons/align-left.js +2 -1
  286. package/dist/icons/align-right.js +2 -1
  287. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  288. package/dist/icons/background-removal.js +9 -0
  289. package/dist/icons/wrap.d.ts +4 -0
  290. package/dist/icons/wrap.js +10 -0
  291. package/dist/previewEntry.js +2 -0
  292. package/dist/renderEntry.js +2 -0
  293. package/dist/state/modals.d.ts +20 -1
  294. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  295. package/dist/state/timeline-sequence-hover.js +6 -67
  296. package/dist/state/timeline-zoom.js +4 -0
  297. package/package.json +20 -19
  298. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  299. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  300. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  301. package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
  302. package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
  303. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  304. package/dist/esm/index-k426ye99.mjs +0 -139
  305. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  306. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  307. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  308. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  309. package/dist/icons/separation.js +0 -7
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  ModelManager
3
- } from "./index-g7k2dvar.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-g7k2dvar.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
  }), []);
@@ -4,24 +4,26 @@ import {
4
4
  getFileManagerName,
5
5
  label,
6
6
  optionRow,
7
- rightRow,
7
+ rightRow
8
+ } from "./index-x6r9bn12.mjs";
9
+ import {
8
10
  showNotification
9
- } from "./index-bs39wngg.mjs";
11
+ } from "./index-dh3zk2hv.mjs";
10
12
  import {
11
13
  openInFileExplorer
12
- } from "./index-eb5txqp6.mjs";
14
+ } from "./index-s6qya2gg.mjs";
13
15
  import {
14
16
  getBrowserStudioOperations
15
- } from "./index-cw0pnpg5.mjs";
17
+ } from "./index-dfy1t576.mjs";
16
18
  import {
17
19
  Column,
18
20
  InlineAction,
19
21
  Spacing,
20
22
  ValidationMessage
21
- } from "./index-cdy8v54v.mjs";
23
+ } from "./index-890dd9b3.mjs";
22
24
  import {
23
25
  WHITE
24
- } from "./index-k426ye99.mjs";
26
+ } from "./index-wqc43mw0.mjs";
25
27
 
26
28
  // src/components/RenderModal/RenderModalOutputName.tsx
27
29
  import { useCallback } from "react";
@@ -0,0 +1,129 @@
1
+ // src/helpers/inserted-element-selection.ts
2
+ var pendingSelection = null;
3
+ var listeners = new Set;
4
+ var requestInsertedElementSelection = (selection) => {
5
+ pendingSelection = selection;
6
+ for (const listener of listeners) {
7
+ listener();
8
+ }
9
+ };
10
+ var clearInsertedElementSelection = (selection) => {
11
+ if (pendingSelection !== selection) {
12
+ return;
13
+ }
14
+ pendingSelection = null;
15
+ for (const listener of listeners) {
16
+ listener();
17
+ }
18
+ };
19
+ var subscribeToInsertedElementSelection = (listener) => {
20
+ listeners.add(listener);
21
+ return () => listeners.delete(listener);
22
+ };
23
+ var getInsertedElementSelection = () => pendingSelection;
24
+
25
+ // src/helpers/sequence-node-path-mutations.ts
26
+ var pendingMutations = [];
27
+ var seenMutationIds = new Set;
28
+ var queueSequenceNodePathMutation = (mutation) => {
29
+ if (seenMutationIds.has(mutation.mutationId)) {
30
+ return;
31
+ }
32
+ seenMutationIds.add(mutation.mutationId);
33
+ pendingMutations.push(mutation);
34
+ if (mutation.timelineSelection !== null) {
35
+ requestInsertedElementSelection({
36
+ compositionId: mutation.timelineSelection.compositionId,
37
+ nodePath: {
38
+ absolutePath: mutation.timelineSelection.absolutePath,
39
+ nodePath: mutation.timelineSelection.nodePath
40
+ },
41
+ notification: null
42
+ });
43
+ }
44
+ };
45
+ var queueSequenceNodePathMutationFromApiResponse = (response) => {
46
+ if (typeof response !== "object" || response === null || !("nodePathMutation" in response)) {
47
+ return;
48
+ }
49
+ const { nodePathMutation } = response;
50
+ if (typeof nodePathMutation !== "object" || nodePathMutation === null || !("mutationId" in nodePathMutation) || typeof nodePathMutation.mutationId !== "string") {
51
+ return;
52
+ }
53
+ queueSequenceNodePathMutation(nodePathMutation);
54
+ };
55
+ var takePendingSequenceNodePathMutations = () => pendingMutations.splice(0);
56
+
57
+ // src/components/call-api.ts
58
+ var callApi = (endpoint, body, signal) => {
59
+ return new Promise((resolve, reject) => {
60
+ fetch(endpoint, {
61
+ method: "post",
62
+ headers: {
63
+ "content-type": "application/json"
64
+ },
65
+ signal,
66
+ body: JSON.stringify(body)
67
+ }).then((res) => res.json()).then((data) => {
68
+ if (data.success) {
69
+ queueSequenceNodePathMutationFromApiResponse(data.data);
70
+ resolve(data.data);
71
+ } else {
72
+ reject(new Error(data.error));
73
+ }
74
+ }).catch((err) => {
75
+ reject(err);
76
+ });
77
+ });
78
+ };
79
+
80
+ // src/helpers/browser-studio-operations.ts
81
+ var BROWSER_STUDIO_OPERATIONS_READY_EVENT = "remotion-browser-studio-operations-ready";
82
+ var getBrowserStudioOperations = () => {
83
+ if (typeof window === "undefined") {
84
+ return null;
85
+ }
86
+ return window.remotion_browserStudio ?? null;
87
+ };
88
+ var getBrowserStudioKeyframeOperations = () => getBrowserStudioOperations()?.keyframes ?? null;
89
+ var getBrowserStudioEffectOperations = () => getBrowserStudioOperations()?.effects ?? null;
90
+ var canUseKeyframeOperations = () => !window.remotion_isReadOnlyStudio || getBrowserStudioKeyframeOperations() !== null;
91
+ var canUseEffectOperations = () => !window.remotion_isReadOnlyStudio || getBrowserStudioEffectOperations() !== null;
92
+ var canInstallPackages = () => {
93
+ const browserStudioOperations = getBrowserStudioOperations();
94
+ if (browserStudioOperations !== null) {
95
+ return true;
96
+ }
97
+ return !window.remotion_isReadOnlyStudio;
98
+ };
99
+
100
+ // src/api/write-static-file.ts
101
+ var writeStaticFile = async ({
102
+ contents,
103
+ filePath
104
+ }) => {
105
+ if (filePath.includes("\\")) {
106
+ return Promise.reject(new Error("File path cannot contain backslashes"));
107
+ }
108
+ const browserStudioOperations = getBrowserStudioOperations();
109
+ if (browserStudioOperations) {
110
+ return browserStudioOperations.writeStaticFile({ contents, filePath });
111
+ }
112
+ if (window.remotion_isReadOnlyStudio) {
113
+ throw new Error("writeStaticFile() is not available in read-only Studio");
114
+ }
115
+ const url = new URL(`${window.remotion_staticBase}/api/add-asset`, window.location.origin);
116
+ url.search = new URLSearchParams({
117
+ filePath
118
+ }).toString();
119
+ const response = await fetch(url, {
120
+ method: "POST",
121
+ body: contents
122
+ });
123
+ if (!response.ok) {
124
+ const jsonResponse = await response.json();
125
+ throw new Error(jsonResponse.error);
126
+ }
127
+ };
128
+
129
+ export { requestInsertedElementSelection, clearInsertedElementSelection, subscribeToInsertedElementSelection, getInsertedElementSelection, queueSequenceNodePathMutation, takePendingSequenceNodePathMutations, callApi, BROWSER_STUDIO_OPERATIONS_READY_EVENT, getBrowserStudioOperations, getBrowserStudioEffectOperations, canUseKeyframeOperations, canUseEffectOperations, canInstallPackages, writeStaticFile };
@@ -0,0 +1,220 @@
1
+ import {
2
+ callApi,
3
+ getBrowserStudioOperations
4
+ } from "./index-dfy1t576.mjs";
5
+ import {
6
+ getPortal,
7
+ useZIndex
8
+ } from "./index-qve7mdfp.mjs";
9
+ import {
10
+ NOTIFICATION_BACKGROUND,
11
+ NOTIFICATION_BORDER,
12
+ NOTIFICATION_SHADOW,
13
+ TRANSPARENT,
14
+ WHITE_HEX
15
+ } from "./index-wqc43mw0.mjs";
16
+
17
+ // src/components/Notifications/NotificationCenter.tsx
18
+ import {
19
+ createRef,
20
+ useCallback,
21
+ useImperativeHandle,
22
+ useState
23
+ } from "react";
24
+ import ReactDOM from "react-dom";
25
+
26
+ // src/components/Notifications/Notification.tsx
27
+ import { useEffect } from "react";
28
+ import { jsx } from "react/jsx-runtime";
29
+ var notification = {
30
+ backgroundColor: NOTIFICATION_BACKGROUND,
31
+ color: WHITE_HEX,
32
+ fontFamily: "Arial, Helvetica, sans-serif",
33
+ display: "inline-flex",
34
+ padding: "6px 14px",
35
+ borderRadius: 6,
36
+ fontSize: 13,
37
+ border: NOTIFICATION_BORDER,
38
+ boxShadow: NOTIFICATION_SHADOW,
39
+ marginTop: 3,
40
+ marginBottom: 3,
41
+ alignItems: "center"
42
+ };
43
+ var Notification = ({ children, id, duration, created, onRemove }) => {
44
+ useEffect(() => {
45
+ if (duration === null) {
46
+ return;
47
+ }
48
+ const timeout = setTimeout(() => {
49
+ onRemove(id);
50
+ }, duration - (Date.now() - created));
51
+ return () => {
52
+ clearTimeout(timeout);
53
+ };
54
+ }, [created, duration, id, onRemove]);
55
+ return /* @__PURE__ */ jsx("div", {
56
+ className: "css-reset",
57
+ style: notification,
58
+ children
59
+ });
60
+ };
61
+
62
+ // src/components/Notifications/NotificationCenter.tsx
63
+ import { jsx as jsx2 } from "react/jsx-runtime";
64
+ var container = {
65
+ position: "absolute",
66
+ justifyContent: "center",
67
+ alignItems: "center",
68
+ display: "flex",
69
+ width: "100%",
70
+ flexDirection: "column",
71
+ paddingTop: 40,
72
+ pointerEvents: "none",
73
+ backgroundColor: TRANSPARENT
74
+ };
75
+ var notificationCenter = createRef();
76
+ var showNotification = (content, durationInMs) => {
77
+ return notificationCenter.current.addNotification({
78
+ content,
79
+ duration: durationInMs,
80
+ created: Date.now(),
81
+ id: String(Math.random()).replace("0.", "")
82
+ });
83
+ };
84
+ var NotificationCenter = () => {
85
+ const [notifications, setNotifications] = useState([]);
86
+ const { currentZIndex } = useZIndex();
87
+ const onRemove = useCallback((id) => {
88
+ setNotifications((not) => {
89
+ return not.filter((n) => n.id !== id);
90
+ });
91
+ }, []);
92
+ const addNotification = useCallback((notification2) => {
93
+ setNotifications((previousNotifications) => {
94
+ return [...previousNotifications, notification2];
95
+ });
96
+ return {
97
+ dismiss: () => {
98
+ setNotifications((oldNotifications) => {
99
+ return oldNotifications.filter((notificationToFilter) => notificationToFilter.id !== notification2.id);
100
+ });
101
+ },
102
+ replaceContent: (newContent, durationInMs) => {
103
+ setNotifications((oldNotifications) => {
104
+ return oldNotifications.map((notificationToMap) => {
105
+ if (notificationToMap.id === notification2.id) {
106
+ return {
107
+ ...notificationToMap,
108
+ duration: durationInMs,
109
+ content: newContent,
110
+ created: Date.now()
111
+ };
112
+ }
113
+ return notificationToMap;
114
+ });
115
+ });
116
+ }
117
+ };
118
+ }, []);
119
+ useImperativeHandle(notificationCenter, () => {
120
+ return {
121
+ addNotification
122
+ };
123
+ }, [addNotification]);
124
+ return ReactDOM.createPortal(/* @__PURE__ */ jsx2("div", {
125
+ style: container,
126
+ children: notifications.map((n) => {
127
+ return /* @__PURE__ */ jsx2(Notification, {
128
+ created: n.created,
129
+ duration: n.duration,
130
+ id: n.id,
131
+ onRemove,
132
+ children: n.content
133
+ }, n.id);
134
+ })
135
+ }), getPortal(currentZIndex + 1));
136
+ };
137
+
138
+ // src/api/install-package.ts
139
+ import { getRemotionEnvironment } from "remotion";
140
+
141
+ // src/helpers/optional-package-dependencies.ts
142
+ import { extraPackages } from "@remotion/studio-shared";
143
+ var TRANSFORMERS_PACKAGE = "@huggingface/transformers";
144
+ var packagesRequiringTransformers = new Set([
145
+ "@remotion/whisper-webgpu",
146
+ "@remotion/video-matting"
147
+ ]);
148
+ var withRequiredAuxiliaryPackages = (dependencies) => {
149
+ if (!dependencies.some((dependency) => packagesRequiringTransformers.has(dependency.name)) || dependencies.some((dependency) => dependency.name === TRANSFORMERS_PACKAGE)) {
150
+ return [...dependencies];
151
+ }
152
+ const transformers = extraPackages.find((pkg) => pkg.name === TRANSFORMERS_PACKAGE);
153
+ if (!transformers) {
154
+ throw new Error(`No recommended version found for ${TRANSFORMERS_PACKAGE}`);
155
+ }
156
+ return [
157
+ ...dependencies,
158
+ { name: transformers.name, version: transformers.version }
159
+ ];
160
+ };
161
+
162
+ // src/api/install-package.ts
163
+ var installPackages = async (dependencies) => {
164
+ if (!getRemotionEnvironment().isStudio) {
165
+ throw new Error("installPackages() is only available in the Studio");
166
+ }
167
+ const dependenciesWithAuxiliaryPackages = withRequiredAuxiliaryPackages(dependencies);
168
+ const browserStudioOperations = getBrowserStudioOperations();
169
+ if (browserStudioOperations !== null) {
170
+ const response = await browserStudioOperations.packageInstallation.installPackages({
171
+ dependencies: dependenciesWithAuxiliaryPackages
172
+ });
173
+ if (!response.success) {
174
+ const error = new Error(response.reason);
175
+ error.stack = response.stack;
176
+ throw error;
177
+ }
178
+ return {};
179
+ }
180
+ if (window.remotion_isReadOnlyStudio) {
181
+ throw new Error("installPackages() is not available in Read-Only Studio");
182
+ }
183
+ return callApi("/api/install-package", {
184
+ dependencies: dependenciesWithAuxiliaryPackages
185
+ });
186
+ };
187
+
188
+ // src/helpers/install-required-package.ts
189
+ var installQueue = Promise.resolve();
190
+ var uniqueDependencies = (dependencies) => Array.from(new Map(dependencies.map((dependency) => [dependency.name, dependency])).values());
191
+ var getMissingPackages = (dependencies) => {
192
+ const installedPackages = window.remotion_installedPackages ?? [];
193
+ return uniqueDependencies(dependencies).filter((dependency) => dependency.version !== null || !installedPackages.includes(dependency.name));
194
+ };
195
+ var addInstalledPackages = (dependencies) => {
196
+ const installedPackages = window.remotion_installedPackages ?? [];
197
+ window.remotion_installedPackages = Array.from(new Set([
198
+ ...installedPackages,
199
+ ...uniqueDependencies(dependencies).map((dependency) => dependency.name)
200
+ ]));
201
+ };
202
+ var formatPackageList = (dependencies) => dependencies.length === 1 ? dependencies[0].name : `${dependencies.length} packages`;
203
+ var installRequiredPackages = async (dependencies) => {
204
+ const runInstall = async () => {
205
+ const missingPackages = getMissingPackages(dependencies);
206
+ if (missingPackages.length === 0)
207
+ return;
208
+ showNotification(`Installing ${formatPackageList(missingPackages)}...`, 3000);
209
+ await installPackages(missingPackages);
210
+ addInstalledPackages(missingPackages);
211
+ showNotification(`Installed ${formatPackageList(missingPackages)}`, 3000);
212
+ };
213
+ const queuedInstall = installQueue.then(runInstall, runInstall);
214
+ installQueue = queuedInstall.catch(() => {
215
+ return;
216
+ });
217
+ await queuedInstall;
218
+ };
219
+
220
+ export { showNotification, NotificationCenter, TRANSFORMERS_PACKAGE, withRequiredAuxiliaryPackages, installPackages, getMissingPackages, installRequiredPackages };