@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
@@ -55,13 +55,10 @@ const TimelineSliderInner = () => {
55
55
  const ref = (0, react_1.useRef)(null);
56
56
  const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
57
57
  const { zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
58
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
59
58
  if (timelineWidth === null) {
60
59
  throw new Error('Unexpectedly did not have timeline width');
61
60
  }
62
- const zoomLevel = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
63
- ? ((_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : null)
64
- : null;
61
+ const zoomLevel = (_a = zoomMap[videoConfig.id]) !== null && _a !== void 0 ? _a : null;
65
62
  (0, react_1.useLayoutEffect)(() => {
66
63
  var _a;
67
64
  const el = ref.current;
@@ -295,6 +295,7 @@ const TimelineTimeIndicatorsInner = react_1.default.memo(({ windowWidth, duratio
295
295
  return {
296
296
  ...container,
297
297
  width: windowWidth,
298
+ minWidth: '100%',
298
299
  overflow: 'hidden',
299
300
  pointerEvents: 'none',
300
301
  };
@@ -15,7 +15,6 @@ const TimelineWidthProvider = ({ children }) => {
15
15
  shouldApplyCssTransforms: true,
16
16
  });
17
17
  const { zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
18
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
19
18
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
20
19
  const width = (0, react_1.useMemo)(() => {
21
20
  var _a, _b;
@@ -28,12 +27,10 @@ const TimelineWidthProvider = ({ children }) => {
28
27
  const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
29
28
  durationInFrames,
30
29
  timelineViewportWidth: scrollableWidth,
31
- zoom: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
32
- ? ((_f = zoomMap[canvasContent.compositionId]) !== null && _f !== void 0 ? _f : null)
33
- : null,
30
+ zoom: videoConfig ? ((_f = zoomMap[videoConfig.id]) !== null && _f !== void 0 ? _f : null) : null,
34
31
  });
35
32
  return (0, get_timeline_max_zoom_1.getTimelineWidth)({ durationInFrames, zoom });
36
- }, [canvasContent, size === null || size === void 0 ? void 0 : size.width, videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames, zoomMap]);
33
+ }, [size === null || size === void 0 ? void 0 : size.width, videoConfig, zoomMap]);
37
34
  return (jsx_runtime_1.jsx(exports.TimelineWidthContext.Provider, { value: width, children: children }));
38
35
  };
39
36
  exports.TimelineWidthProvider = TimelineWidthProvider;
@@ -59,32 +59,29 @@ const buttonStyle = {
59
59
  };
60
60
  const TimelineZoomSlider = ({ maxWidth, minZoom, timelineViewportWidth }) => {
61
61
  var _a, _b;
62
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
63
62
  const { setZoom, zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
64
63
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
65
64
  const { tabIndex } = (0, z_index_1.useZIndex)();
66
- const isStill = (0, is_current_selected_still_1.useIsStill)();
65
+ const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
67
66
  const onChange = (0, react_1.useCallback)((e) => {
68
- if (canvasContent === null || canvasContent.type !== 'composition') {
67
+ if (videoConfig === null) {
69
68
  return;
70
69
  }
71
- setZoom(canvasContent.compositionId, () => (0, get_timeline_max_zoom_1.sliderValueToTimelineZoom)({
70
+ setZoom(videoConfig.id, () => (0, get_timeline_max_zoom_1.sliderValueToTimelineZoom)({
72
71
  sliderValue: Number(e.target.value),
73
72
  minZoom,
74
73
  }), {
75
74
  anchorFrame: null,
76
75
  anchorContentX: null,
77
76
  });
78
- }, [canvasContent, minZoom, setZoom]);
79
- if (isStill ||
80
- canvasContent === null ||
81
- canvasContent.type !== 'composition') {
77
+ }, [minZoom, setZoom, videoConfig]);
78
+ if (!isVideoComposition || videoConfig === null) {
82
79
  return null;
83
80
  }
84
81
  const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
85
82
  durationInFrames: (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 1,
86
83
  timelineViewportWidth,
87
- zoom: (_b = zoomMap[canvasContent.compositionId]) !== null && _b !== void 0 ? _b : null,
84
+ zoom: (_b = zoomMap[videoConfig.id]) !== null && _b !== void 0 ? _b : null,
88
85
  });
89
86
  const roundedZoom = Math.round(zoom * 100) / 100;
90
87
  return (jsx_runtime_1.jsx("input", { style: maxWidth === undefined ? undefined : { maxWidth }, title: `Timeline zoom (${roundedZoom}px/frame)`, alt: `Timeline zoom (${roundedZoom}px/frame)`, type: "range", min: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.min, max: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.max, step: get_timeline_max_zoom_1.TIMELINE_ZOOM_SLIDER_PROPS.step, value: (0, get_timeline_max_zoom_1.timelineZoomToSliderValue)({ zoom, minZoom }), onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }));
@@ -92,7 +89,6 @@ const TimelineZoomSlider = ({ maxWidth, minZoom, timelineViewportWidth }) => {
92
89
  const TimelineZoomControlsInner = ({ sliderMaxWidth }) => {
93
90
  var _a;
94
91
  var _b, _c, _d;
95
- const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
96
92
  const { setZoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
97
93
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
98
94
  const timelineSize = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
@@ -105,21 +101,25 @@ const TimelineZoomControlsInner = ({ sliderMaxWidth }) => {
105
101
  timelineViewportWidth,
106
102
  });
107
103
  const onMinusClicked = (0, react_1.useCallback)(() => {
108
- if (canvasContent === null || canvasContent.type !== 'composition') {
104
+ if (videoConfig === null) {
109
105
  return;
110
106
  }
111
- setZoom(canvasContent.compositionId, (z) => z / TIMELINE_ZOOM_BUTTON_FACTOR, { anchorFrame: null, anchorContentX: null });
112
- }, [canvasContent, setZoom]);
107
+ setZoom(videoConfig.id, (z) => z / TIMELINE_ZOOM_BUTTON_FACTOR, {
108
+ anchorFrame: null,
109
+ anchorContentX: null,
110
+ });
111
+ }, [setZoom, videoConfig]);
113
112
  const onPlusClicked = (0, react_1.useCallback)(() => {
114
- if (canvasContent === null || canvasContent.type !== 'composition') {
113
+ if (videoConfig === null) {
115
114
  return;
116
115
  }
117
- setZoom(canvasContent.compositionId, (z) => z * TIMELINE_ZOOM_BUTTON_FACTOR, { anchorFrame: null, anchorContentX: null });
118
- }, [canvasContent, setZoom]);
119
- const isStill = (0, is_current_selected_still_1.useIsStill)();
120
- if (isStill ||
121
- canvasContent === null ||
122
- canvasContent.type !== 'composition') {
116
+ setZoom(videoConfig.id, (z) => z * TIMELINE_ZOOM_BUTTON_FACTOR, {
117
+ anchorFrame: null,
118
+ anchorContentX: null,
119
+ });
120
+ }, [setZoom, videoConfig]);
121
+ const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
122
+ if (!isVideoComposition || videoConfig === null) {
123
123
  return null;
124
124
  }
125
125
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
@@ -0,0 +1,11 @@
1
+ import type { CanUpdateSequencePropStatus, TSequence } from 'remotion';
2
+ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
+ import type { ComboboxValue } from '../NewComposition/ComboBox';
4
+ export declare const getSequenceSplitMenuItem: ({ nodePathInfo, sequence, propStatuses, splitFrame, canEditSource, hasMultipleSelection, }: {
5
+ readonly nodePathInfo: SequenceNodePathInfo | null;
6
+ readonly sequence: TSequence;
7
+ readonly propStatuses: Record<string, CanUpdateSequencePropStatus> | undefined;
8
+ readonly splitFrame: number;
9
+ readonly canEditSource: boolean;
10
+ readonly hasMultipleSelection: boolean;
11
+ }) => ComboboxValue | null;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSequenceSplitMenuItem = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
6
+ const getSequenceSplitMenuItem = ({ nodePathInfo, sequence, propStatuses, splitFrame, canEditSource, hasMultipleSelection, }) => {
7
+ if (hasMultipleSelection) {
8
+ return null;
9
+ }
10
+ const eligibility = nodePathInfo
11
+ ? (0, split_selected_timeline_item_1.getTimelineSequenceSplitEligibility)({
12
+ selection: { type: 'sequence', nodePathInfo },
13
+ sequence,
14
+ propStatuses,
15
+ splitFrame,
16
+ })
17
+ : {
18
+ canSplit: false,
19
+ reason: 'Sequence has no editable source node',
20
+ };
21
+ const disabledReason = !canEditSource
22
+ ? 'Sequence source is unavailable'
23
+ : propStatuses === undefined
24
+ ? 'Waiting for sequence prop status'
25
+ : eligibility.canSplit
26
+ ? null
27
+ : eligibility.reason;
28
+ return {
29
+ type: 'item',
30
+ id: 'split-sequence',
31
+ label: (jsx_runtime_1.jsx("span", { style: {
32
+ fontFamily: 'inherit',
33
+ fontSize: 'inherit',
34
+ lineHeight: 'inherit',
35
+ color: 'inherit',
36
+ }, title: disabledReason !== null && disabledReason !== void 0 ? disabledReason : 'Split at the playhead', children: "Split clip" })),
37
+ value: 'split-sequence',
38
+ keyHint: null,
39
+ leftItem: null,
40
+ quickSwitcherLabel: null,
41
+ subMenu: null,
42
+ disabled: disabledReason !== null,
43
+ onClick: () => {
44
+ if (disabledReason !== null || !eligibility.canSplit) {
45
+ return;
46
+ }
47
+ // Keep the frame used to enable the menu item, even during playback.
48
+ (0, split_selected_timeline_item_1.splitTimelineSequenceFromSource)({
49
+ nodePathInfo: eligibility.nodePathInfo,
50
+ splitFrame,
51
+ }).catch(() => undefined);
52
+ },
53
+ };
54
+ };
55
+ exports.getSequenceSplitMenuItem = getSequenceSplitMenuItem;
@@ -0,0 +1,2 @@
1
+ import type { ComboboxValue } from '../NewComposition/ComboBox';
2
+ export declare const useAssetTimelineContextMenu: () => ComboboxValue[] | null;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAssetTimelineContextMenu = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
7
+ const client_id_1 = require("../../helpers/client-id");
8
+ const get_file_manager_name_1 = require("../../helpers/get-file-manager-name");
9
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
10
+ const actions_1 = require("../RenderQueue/actions");
11
+ const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
12
+ const useAssetTimelineContextMenu = () => {
13
+ const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
14
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
15
+ return (0, react_1.useMemo)(() => {
16
+ if ((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) !== 'asset') {
17
+ return null;
18
+ }
19
+ const copyContextItem = (0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
20
+ contextForAgents: window.remotion_publicFolderExists
21
+ ? `Asset: ${window.remotion_publicFolderExists}/${canvasContent.asset}`
22
+ : `Asset: staticFile(${JSON.stringify(canvasContent.asset)})`,
23
+ });
24
+ if ((0, browser_studio_operations_1.getBrowserStudioOperations)() !== null) {
25
+ return [copyContextItem];
26
+ }
27
+ return [
28
+ {
29
+ type: 'item',
30
+ id: 'open-asset-in-explorer',
31
+ label: `Show in ${(0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform)}`,
32
+ keyHint: null,
33
+ leftItem: null,
34
+ quickSwitcherLabel: null,
35
+ subMenu: null,
36
+ value: 'open-asset-in-explorer',
37
+ disabled: Boolean(window.remotion_isReadOnlyStudio) ||
38
+ !window.remotion_publicFolderExists ||
39
+ previewServerState.type !== 'connected',
40
+ onClick: () => {
41
+ (0, actions_1.openInFileExplorer)({
42
+ directory: window.remotion_publicFolderExists + '/' + canvasContent.asset,
43
+ }).catch((err) => {
44
+ (0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
45
+ });
46
+ },
47
+ },
48
+ copyContextItem,
49
+ ];
50
+ }, [canvasContent, previewServerState.type]);
51
+ };
52
+ exports.useAssetTimelineContextMenu = useAssetTimelineContextMenu;
@@ -1,6 +1,6 @@
1
- import type { InteractivitySchema } from 'remotion';
1
+ import type { InteractivitySchema, VideoConfigValues } from 'remotion';
2
2
  import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
3
- export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }: {
3
+ export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, videoConfigValues, }: {
4
4
  overrideId: string;
5
5
  componentIdentity: string | null;
6
6
  schema: InteractivitySchema;
@@ -8,4 +8,5 @@ export declare const useSequencePropsSubscription: ({ originalLocation, override
8
8
  originalLocation: OriginalPosition | null;
9
9
  preferMappedNodePath: boolean;
10
10
  stack: string | null;
11
+ videoConfigValues: VideoConfigValues | null;
11
12
  }) => void;
@@ -8,7 +8,7 @@ const client_id_1 = require("../../helpers/client-id");
8
8
  const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
9
9
  const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
10
10
  const should_subscribe_to_source_file_1 = require("./should-subscribe-to-source-file");
11
- const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, }) => {
11
+ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentIdentity, schema, effects, preferMappedNodePath, stack, videoConfigValues, }) => {
12
12
  var _a, _b, _c;
13
13
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
14
14
  const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
@@ -20,7 +20,6 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
20
20
  const overrideIdToNodePathMappingsRef = (0, react_1.useRef)(overrideIdToNodePathMappings);
21
21
  overrideIdToNodePathMappingsRef.current = overrideIdToNodePathMappings;
22
22
  const clientId = state.type === 'connected' ? state.clientId : undefined;
23
- const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
24
23
  const effectsSignature = (0, react_1.useMemo)(() => effects.map((effect) => (0, studio_shared_1.getAllSchemaKeys)(effect).join('\0')).join('\0\0'), [effects]);
25
24
  const validatedLocation = (0, react_1.useMemo)(() => {
26
25
  var _a;
@@ -51,7 +50,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
51
50
  !locationLine ||
52
51
  locationColumn === null ||
53
52
  !schema ||
54
- videoConfig === null) {
53
+ videoConfigValues === null) {
55
54
  return;
56
55
  }
57
56
  const nodePathAtResubscribe = (_a = overrideIdToNodePathMappingsRef.current[overrideId]) !== null && _a !== void 0 ? _a : null;
@@ -67,12 +66,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
67
66
  : null,
68
67
  clientId,
69
68
  stack,
70
- videoConfigValues: {
71
- durationInFrames: videoConfig.durationInFrames,
72
- fps: videoConfig.fps,
73
- height: videoConfig.height,
74
- width: videoConfig.width,
75
- },
69
+ videoConfigValues,
76
70
  applyOnce: (result) => {
77
71
  if (!result.success) {
78
72
  return;
@@ -119,7 +113,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, componentI
119
113
  setPropStatuses,
120
114
  setOverrideIdToNodePath,
121
115
  stack,
122
- videoConfig,
116
+ videoConfigValues,
123
117
  ]);
124
118
  };
125
119
  exports.useSequencePropsSubscription = useSequencePropsSubscription;
@@ -6,18 +6,23 @@ const player_1 = require("@remotion/player");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
8
  const no_react_1 = require("remotion/no-react");
9
+ const client_id_1 = require("../helpers/client-id");
9
10
  const colors_1 = require("../helpers/colors");
10
11
  const use_keybinding_1 = require("../helpers/use-keybinding");
11
12
  const timelineInOutPointer_1 = require("../icons/timelineInOutPointer");
12
13
  const in_out_1 = require("../state/in-out");
13
14
  const ControlButton_1 = require("./ControlButton");
14
- const getTooltipText = (pointType, key) => [
15
- `Mark ${pointType}`,
16
- (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : `(${key})`,
17
- '- right click to clear',
18
- ]
19
- .filter(no_react_1.NoReactInternals.truthy)
20
- .join(' ');
15
+ const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
16
+ const getTooltipText = (pointType, action) => {
17
+ const shortcut = (0, keyboard_shortcuts_1.getKeyboardShortcutLabel)(action);
18
+ return [
19
+ `Mark ${pointType}`,
20
+ (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || shortcut === '' ? null : `(${shortcut})`,
21
+ '- right click to clear',
22
+ ]
23
+ .filter(no_react_1.NoReactInternals.truthy)
24
+ .join(' ');
25
+ };
21
26
  const style = {
22
27
  width: 17,
23
28
  height: 17,
@@ -29,6 +34,7 @@ exports.inOutHandles = (0, react_1.createRef)();
29
34
  exports.defaultInOutValue = { inFrame: null, outFrame: null };
30
35
  const TimelineInOutPointToggle = () => {
31
36
  var _a;
37
+ (0, client_id_1.useStudioConfigRevision)();
32
38
  const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
33
39
  const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
34
40
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
@@ -195,34 +201,31 @@ const TimelineInOutPointToggle = () => {
195
201
  return;
196
202
  }
197
203
  const iKey = keybindings.registerKeybinding({
198
- event: 'keypress',
199
- key: 'i',
204
+ event: 'keydown',
205
+ action: 'setInPoint',
200
206
  callback: (e) => {
201
207
  onInMark(e);
202
208
  },
203
- commandCtrlKey: false,
204
209
  preventDefault: true,
205
210
  triggerIfInputFieldFocused: false,
206
211
  keepRegisteredWhenNotHighestContext: false,
207
212
  });
208
213
  const oKey = keybindings.registerKeybinding({
209
- event: 'keypress',
210
- key: 'o',
214
+ event: 'keydown',
215
+ action: 'setOutPoint',
211
216
  callback: (e) => {
212
217
  onOutMark(e);
213
218
  },
214
- commandCtrlKey: false,
215
219
  preventDefault: true,
216
220
  triggerIfInputFieldFocused: false,
217
221
  keepRegisteredWhenNotHighestContext: false,
218
222
  });
219
223
  const xKey = keybindings.registerKeybinding({
220
- event: 'keypress',
221
- key: 'x',
224
+ event: 'keydown',
225
+ action: 'clearInOutPoints',
222
226
  callback: () => {
223
227
  onInOutClear(confId);
224
228
  },
225
- commandCtrlKey: false,
226
229
  preventDefault: true,
227
230
  triggerIfInputFieldFocused: false,
228
231
  keepRegisteredWhenNotHighestContext: false,
@@ -246,7 +249,7 @@ const TimelineInOutPointToggle = () => {
246
249
  };
247
250
  }, [confId, onInMark, onInOutClear, onOutMark]);
248
251
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
249
- jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), style: buttonStyle, onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? color : colors_1.BLUE, style: style })) }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), style: buttonStyle, onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? color : colors_1.BLUE, style: style })) })
252
+ jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('In', 'setInPoint'), "aria-label": getTooltipText('In', 'setInPoint'), style: buttonStyle, onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? color : colors_1.BLUE, style: style })) }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'setOutPoint'), "aria-label": getTooltipText('Out', 'setOutPoint'), style: buttonStyle, onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? color : colors_1.BLUE, style: style })) })
250
253
  ] }));
251
254
  };
252
255
  exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
@@ -35,7 +35,6 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.TopPanel = exports.useResponsiveSidebarStatus = void 0;
37
37
  const jsx_runtime_1 = require("react/jsx-runtime");
38
- const player_1 = require("@remotion/player");
39
38
  const react_1 = __importStar(require("react"));
40
39
  const remotion_1 = require("remotion");
41
40
  const mobile_layout_1 = require("../helpers/mobile-layout");
@@ -87,7 +86,7 @@ const useResponsiveSidebarStatus = () => {
87
86
  };
88
87
  exports.useResponsiveSidebarStatus = useResponsiveSidebarStatus;
89
88
  const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInMilliseconds }) => {
90
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
89
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight, setSidebarCollapsedDuringDrag, } = (0, react_1.useContext)(sidebar_1.SidebarContext);
91
90
  const rulersAreVisible = (0, use_is_ruler_visible_1.useIsRulerVisible)();
92
91
  const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
93
92
  const actualStateLeft = (0, exports.useResponsiveSidebarStatus)();
@@ -97,21 +96,6 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
97
96
  }
98
97
  return 'expanded';
99
98
  }, [sidebarCollapsedStateRight]);
100
- const previousSidebarState = (0, react_1.useRef)({
101
- left: actualStateLeft,
102
- right: actualStateRight,
103
- });
104
- (0, react_1.useLayoutEffect)(() => {
105
- if (previousSidebarState.current.left === actualStateLeft &&
106
- previousSidebarState.current.right === actualStateRight) {
107
- return;
108
- }
109
- previousSidebarState.current = {
110
- left: actualStateLeft,
111
- right: actualStateRight,
112
- };
113
- player_1.PlayerInternals.updateAllElementsSizes();
114
- }, [actualStateLeft, actualStateRight]);
115
99
  (0, react_1.useEffect)(() => {
116
100
  onMounted();
117
101
  }, [onMounted]);
@@ -130,8 +114,8 @@ const TopPanelInner = ({ readOnlyStudio, onMounted, drawRef, bufferStateDelayInM
130
114
  return (jsx_runtime_1.jsx(ObserveDefaultPropsContext_1.ObserveDefaultProps, { compositionId: (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition'
131
115
  ? canvasContent.compositionId
132
116
  : null, readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsxs("div", { style: container, children: [
133
- jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : null, actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, minAntiFlexerSize: MIN_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
134
- jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })
117
+ jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, maxFlexerSize: MAX_SIDEBAR_WIDTH, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx(ExplorerPanel_1.ExplorerPanel, { readOnlyStudio: readOnlyStudio }) })) : null, actualStateLeft === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft, onCollapseDuringDrag: setSidebarCollapsedDuringDrag })) : null, jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: MAX_SIDEBAR_WIDTH, minAntiFlexerSize: MIN_SIDEBAR_WIDTH, id: "canvas-to-right-sidebar", orientation: "vertical", children: [
118
+ jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: jsx_runtime_1.jsx("div", { ref: drawRef, style: canvasContainerStyle, children: jsx_runtime_1.jsx(CanvasIfSizeIsAvailable_1.CanvasIfSizeIsAvailable, {}) }) }), actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight, onCollapseDuringDrag: setSidebarCollapsedDuringDrag })) : null, actualStateRight === 'expanded' ? (jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: jsx_runtime_1.jsx(OptionsPanel_1.OptionsPanel, { readOnlyStudio: readOnlyStudio }) })) : null] }) })
135
119
  ] }) }), jsx_runtime_1.jsx(PreviewToolbar_1.PreviewToolbar, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CurrentCompositionSideEffects_1.TitleUpdater, {})
136
120
  ] }) }));
137
121
  };
@@ -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 whisper_webgpu_1 = require("@remotion/whisper-webgpu");
6
+ const react_1 = require("react");
7
+ const ModelManager_1 = require("../ModelManager");
8
+ const AVAILABLE_MODELS = (0, whisper_webgpu_1.getAvailableModels)();
9
+ const Models = ({ description, indent, visible }) => {
10
+ const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
11
+ const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, whisper_webgpu_1.loadWhisperModel)({
12
+ model,
13
+ onProgress: (progress) => onProgress(progress.progress),
14
+ }), []);
15
+ const removeModel = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.removeWhisperModel)({ model }), []);
16
+ return (jsx_runtime_1.jsx(ModelManager_1.ModelManager, { ariaLabel: "Whisper models", availableModels: AVAILABLE_MODELS, description: description, indent: indent, isModelCached: isModelCached, loadModel: loadModel, prepare: whisper_webgpu_1.clearStaleModels, removeModel: removeModel, visible: visible }));
17
+ };
18
+ exports.Models = Models;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { TranscriptionModalState } from '../../state/modals';
3
+ export declare const TranscriptionModal: React.FC<TranscriptionModalState>;