@remotion/studio 4.0.522 → 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 (220) 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/CaptionInspector.js +74 -20
  6. package/dist/components/CheckboardToggle.js +8 -6
  7. package/dist/components/Checkbox.d.ts +1 -0
  8. package/dist/components/Checkbox.js +2 -2
  9. package/dist/components/CompositionContextButton.js +4 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -2
  11. package/dist/components/ConfigureLicenseModal.js +1 -1
  12. package/dist/components/CurrentAsset.js +40 -6
  13. package/dist/components/EditorContexts.js +3 -1
  14. package/dist/components/ElementInstallConfirmation.js +287 -135
  15. package/dist/components/FixComputedValueModal.js +38 -8
  16. package/dist/components/FullscreenToggle.js +9 -8
  17. package/dist/components/GlobalKeybindings.js +50 -49
  18. package/dist/components/HighlightedElementSource.d.ts +5 -0
  19. package/dist/components/HighlightedElementSource.js +78 -0
  20. package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
  21. package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
  22. package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
  23. package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
  24. package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
  25. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
  26. package/dist/components/InspectorPanel.js +4 -0
  27. package/dist/components/InspectorSequenceSection.js +64 -1
  28. package/dist/components/InstallPackage.js +4 -5
  29. package/dist/components/KeyboardShortcutsSettings.js +212 -33
  30. package/dist/components/MenuToolbar.js +7 -5
  31. package/dist/components/ModalContainer.d.ts +1 -0
  32. package/dist/components/ModalContainer.js +2 -2
  33. package/dist/components/Modals.js +3 -1
  34. package/dist/components/ModelManager.d.ts +16 -0
  35. package/dist/components/ModelManager.js +200 -0
  36. package/dist/components/ModelsSettings.d.ts +2 -0
  37. package/dist/components/ModelsSettings.js +133 -0
  38. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  39. package/dist/components/NewComposition/DismissableModal.js +2 -2
  40. package/dist/components/NewComposition/InputDragger.d.ts +2 -2
  41. package/dist/components/NewComposition/InputDragger.js +6 -6
  42. package/dist/components/NewComposition/NewFolder.js +11 -8
  43. package/dist/components/NewComposition/RenameFolder.js +17 -10
  44. package/dist/components/OptionalPackageModal.d.ts +11 -0
  45. package/dist/components/OptionalPackageModal.js +155 -0
  46. package/dist/components/PlayPause.js +4 -8
  47. package/dist/components/PlaybackKeyboardShortcutsManager.js +3 -6
  48. package/dist/components/PreviewToolbarOverflowButton.js +11 -2
  49. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
  50. package/dist/components/RadioButton.d.ts +1 -0
  51. package/dist/components/RadioButton.js +2 -2
  52. package/dist/components/RenderButton.js +5 -1
  53. package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
  54. package/dist/components/RenderModal/NumberSetting.js +2 -2
  55. package/dist/components/RenderModal/RenderModalBasic.js +1 -1
  56. package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
  57. package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
  58. package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
  59. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  60. package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
  61. package/dist/components/RenderQueue/CaptionQueueItem.js +129 -0
  62. package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
  64. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
  65. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
  66. package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
  67. package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
  68. package/dist/components/RenderQueue/VideoMattingQueueItem.js +129 -0
  69. package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
  70. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
  71. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
  72. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
  73. package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
  74. package/dist/components/RenderQueue/caption-job-types.js +7 -0
  75. package/dist/components/RenderQueue/context.d.ts +16 -0
  76. package/dist/components/RenderQueue/context.js +224 -11
  77. package/dist/components/RenderQueue/index.js +34 -10
  78. package/dist/components/RenderQueue/item-style.d.ts +1 -0
  79. package/dist/components/RenderQueue/item-style.js +2 -1
  80. package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
  81. package/dist/components/RenderQueue/load-model-for-job.js +14 -0
  82. package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
  83. package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
  84. package/dist/components/RendersTab.js +4 -4
  85. package/dist/components/SegmentedControl.d.ts +2 -2
  86. package/dist/components/SegmentedControl.js +38 -13
  87. package/dist/components/SelectedOutlinePolygon.js +8 -2
  88. package/dist/components/SettingsButton.d.ts +4 -0
  89. package/dist/components/SettingsButton.js +49 -0
  90. package/dist/components/SettingsModal.d.ts +1 -1
  91. package/dist/components/SettingsModal.js +3 -1
  92. package/dist/components/ShowOutlinesProvider.js +12 -0
  93. package/dist/components/SidebarCollapserControls.js +10 -11
  94. package/dist/components/SizeSelector.js +10 -2
  95. package/dist/components/SkillsSettings.js +2 -3
  96. package/dist/components/SnappingToggle.js +5 -2
  97. package/dist/components/Tabs/vertical.d.ts +1 -0
  98. package/dist/components/Tabs/vertical.js +2 -2
  99. package/dist/components/TimeValue.js +2 -3
  100. package/dist/components/Timeline/SequencePropsObserver.js +4 -0
  101. package/dist/components/Timeline/Timeline.js +2 -42
  102. package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
  103. package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
  104. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  105. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  106. package/dist/components/Timeline/TimelineRowChrome.js +11 -3
  107. package/dist/components/Timeline/TimelineSchemaField.js +8 -4
  108. package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
  109. package/dist/components/Timeline/TimelineSelection.js +55 -2
  110. package/dist/components/Timeline/TimelineSequence.js +75 -17
  111. package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
  112. package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
  113. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
  114. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
  115. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
  116. package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
  117. package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
  118. package/dist/components/TimelineInOutToggle.js +20 -17
  119. package/dist/components/Transcription/LazyModels.d.ts +1 -0
  120. package/dist/components/Transcription/LazyModels.js +5 -0
  121. package/dist/components/Transcription/Models.d.ts +6 -0
  122. package/dist/components/Transcription/Models.js +18 -0
  123. package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
  124. package/dist/components/Transcription/TranscriptionModal.js +428 -0
  125. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
  126. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
  127. package/dist/components/Transcription/caption-output-name.d.ts +2 -0
  128. package/dist/components/Transcription/caption-output-name.js +10 -0
  129. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
  130. package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
  131. package/dist/components/Transcription/whisper-languages.d.ts +2 -0
  132. package/dist/components/Transcription/whisper-languages.js +104 -0
  133. package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
  134. package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
  135. package/dist/components/UndoRedoButtons.js +13 -38
  136. package/dist/components/UpdatesSettings.js +8 -12
  137. package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
  138. package/dist/components/VideoMatting/LazyModels.js +5 -0
  139. package/dist/components/VideoMatting/Models.d.ts +6 -0
  140. package/dist/components/VideoMatting/Models.js +18 -0
  141. package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
  142. package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
  143. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
  144. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
  145. package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
  146. package/dist/components/VideoMatting/video-matting-capability.js +7 -0
  147. package/dist/components/WebMcp.js +439 -22
  148. package/dist/components/import-assets.d.ts +3 -2
  149. package/dist/components/import-assets.js +5 -9
  150. package/dist/components/keyboard-shortcuts.d.ts +17 -1
  151. package/dist/components/keyboard-shortcuts.js +177 -89
  152. package/dist/components/public-output-name.d.ts +5 -0
  153. package/dist/components/public-output-name.js +60 -0
  154. package/dist/components/use-model-cache-status.d.ts +7 -0
  155. package/dist/components/use-model-cache-status.js +35 -0
  156. package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
  157. package/dist/esm/HighlightedElementSource-jfc66k4p.mjs +1236 -0
  158. package/dist/esm/LazyModels-2trdm224.mjs +11 -0
  159. package/dist/esm/LazyModels-fjb5ckaq.mjs +11 -0
  160. package/dist/esm/TranscriptionModal-916jqhry.mjs +1011 -0
  161. package/dist/esm/VideoMattingModal-2tm79s9b.mjs +374 -0
  162. package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
  163. package/dist/esm/index-1x7bsdh6.mjs +261 -0
  164. package/dist/esm/index-3hgr6gjx.mjs +41 -0
  165. package/dist/esm/index-5qddp5h7.mjs +36 -0
  166. package/dist/esm/index-5zrb1ft4.mjs +39 -0
  167. package/dist/esm/index-6cvm9a65.mjs +45923 -0
  168. package/dist/esm/index-7tt71e8n.mjs +36 -0
  169. package/dist/esm/index-9x6e1dq0.mjs +428 -0
  170. package/dist/esm/index-cw0pnpg5.mjs +50 -0
  171. package/dist/esm/index-czwvnn9g.mjs +35 -0
  172. package/dist/esm/index-hy4xcgty.mjs +1366 -0
  173. package/dist/esm/{chunk-je0h1bgt.js → index-jg13hf2g.mjs} +3 -1
  174. package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
  175. package/dist/esm/index-sgtmgc4h.mjs +423 -0
  176. package/dist/esm/index-te66vvrp.mjs +142 -0
  177. package/dist/esm/index-v4tr1bft.mjs +20 -0
  178. package/dist/esm/index-x7t2y7ws.mjs +54194 -0
  179. package/dist/esm/index-xhe2m2qr.mjs +1146 -0
  180. package/dist/esm/index.mjs +45 -933
  181. package/dist/esm/internals.mjs +13 -114393
  182. package/dist/esm/previewEntry.mjs +387 -115050
  183. package/dist/esm/renderEntry.mjs +3 -3
  184. package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-14148845.mjs} +1 -1
  185. package/dist/helpers/drag-aware-double-click.d.ts +2 -1
  186. package/dist/helpers/drag-aware-double-click.js +12 -1
  187. package/dist/helpers/get-asset-metadata.d.ts +1 -0
  188. package/dist/helpers/get-asset-metadata.js +4 -0
  189. package/dist/helpers/hoverable.js +8 -0
  190. package/dist/helpers/inject-css.js +2 -0
  191. package/dist/helpers/optional-package-dependencies.d.ts +3 -0
  192. package/dist/helpers/optional-package-dependencies.js +24 -0
  193. package/dist/helpers/pointer-session.d.ts +6 -0
  194. package/dist/helpers/pointer-session.js +36 -14
  195. package/dist/helpers/prism-tomorrow.d.ts +1 -0
  196. package/dist/helpers/prism-tomorrow.js +151 -0
  197. package/dist/helpers/sequence-node-path-mutations.js +11 -0
  198. package/dist/helpers/slugify-name.d.ts +1 -0
  199. package/dist/helpers/slugify-name.js +14 -0
  200. package/dist/helpers/studio-runtime-config.d.ts +1 -0
  201. package/dist/helpers/studio-runtime-config.js +6 -1
  202. package/dist/helpers/use-keybinding.d.ts +9 -3
  203. package/dist/helpers/use-keybinding.js +8 -9
  204. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
  205. package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
  206. package/dist/helpers/use-menu-structure.js +58 -13
  207. package/dist/icons/input-props.d.ts +1 -1
  208. package/dist/icons/input-props.js +2 -2
  209. package/dist/icons/models.d.ts +4 -0
  210. package/dist/icons/models.js +7 -0
  211. package/dist/icons/separation.d.ts +4 -0
  212. package/dist/icons/separation.js +7 -0
  213. package/dist/icons/transcription.d.ts +4 -0
  214. package/dist/icons/transcription.js +7 -0
  215. package/dist/icons/upload.js +1 -1
  216. package/dist/state/modals.d.ts +14 -2
  217. package/package.json +34 -20
  218. package/dist/components/UpdateCheck.d.ts +0 -1
  219. package/dist/components/UpdateCheck.js +0 -79
  220. package/dist/esm/chunk-3netyjd9.js +0 -99793
@@ -4,14 +4,16 @@ exports.installPackages = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const call_api_1 = require("../components/call-api");
6
6
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
7
+ const optional_package_dependencies_1 = require("../helpers/optional-package-dependencies");
7
8
  const installPackages = async (dependencies) => {
8
9
  if (!(0, remotion_1.getRemotionEnvironment)().isStudio) {
9
10
  throw new Error('installPackages() is only available in the Studio');
10
11
  }
12
+ const dependenciesWithAuxiliaryPackages = (0, optional_package_dependencies_1.withRequiredAuxiliaryPackages)(dependencies);
11
13
  const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
12
14
  if (browserStudioOperations !== null) {
13
15
  const response = await browserStudioOperations.packageInstallation.installPackages({
14
- dependencies: [...dependencies],
16
+ dependencies: dependenciesWithAuxiliaryPackages,
15
17
  });
16
18
  if (!response.success) {
17
19
  const error = new Error(response.reason);
@@ -24,7 +26,7 @@ const installPackages = async (dependencies) => {
24
26
  throw new Error('installPackages() is not available in Read-Only Studio');
25
27
  }
26
28
  return (0, call_api_1.callApi)('/api/install-package', {
27
- dependencies: [...dependencies],
29
+ dependencies: dependenciesWithAuxiliaryPackages,
28
30
  });
29
31
  };
30
32
  exports.installPackages = installPackages;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare const AssetAudioVolume: React.FC<{
3
+ readonly src: string | null;
4
+ readonly waveformSampleRate: number | null;
5
+ }>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssetAudioVolume = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const timeline_utils_1 = require("@remotion/timeline-utils");
6
+ const react_1 = require("react");
7
+ const colors_1 = require("../helpers/colors");
8
+ const AssetAudioVolume = ({ src, waveformSampleRate }) => {
9
+ const [value, setValue] = (0, react_1.useState)('Calculating…');
10
+ (0, react_1.useEffect)(() => {
11
+ setValue('Calculating…');
12
+ if (src === null || waveformSampleRate === null) {
13
+ return;
14
+ }
15
+ return (0, timeline_utils_1.subscribeToWaveformPeaks)({
16
+ src,
17
+ waveformSampleRate,
18
+ onPeaks: (_peaks, final, averageVolume) => {
19
+ if (final) {
20
+ setValue((0, timeline_utils_1.formatAverageAudioVolume)(averageVolume));
21
+ }
22
+ },
23
+ onError: () => setValue('Unavailable'),
24
+ });
25
+ }, [src, waveformSampleRate]);
26
+ return (jsx_runtime_1.jsx("span", { style: {
27
+ fontFamily: 'sans-serif',
28
+ fontSize: 13,
29
+ lineHeight: '20px',
30
+ color: colors_1.LIGHT_TEXT,
31
+ }, title: "RMS level across all channels over the full audio track, including silence.", children: value }));
32
+ };
33
+ exports.AssetAudioVolume = AssetAudioVolume;
@@ -510,8 +510,7 @@ const Canvas = ({ canvasContent, size }) => {
510
510
  (0, react_1.useEffect)(() => {
511
511
  const resetBinding = keybindings.registerKeybinding({
512
512
  event: 'keydown',
513
- key: '0',
514
- commandCtrlKey: false,
513
+ action: 'resetZoom',
515
514
  callback: onReset,
516
515
  preventDefault: true,
517
516
  triggerIfInputFieldFocused: false,
@@ -519,8 +518,7 @@ const Canvas = ({ canvasContent, size }) => {
519
518
  });
520
519
  const zoomIn = keybindings.registerKeybinding({
521
520
  event: 'keydown',
522
- key: '+',
523
- commandCtrlKey: false,
521
+ action: 'zoomIn',
524
522
  callback: onZoomIn,
525
523
  preventDefault: true,
526
524
  triggerIfInputFieldFocused: false,
@@ -528,8 +526,7 @@ const Canvas = ({ canvasContent, size }) => {
528
526
  });
529
527
  const zoomOut = keybindings.registerKeybinding({
530
528
  event: 'keydown',
531
- key: '-',
532
- commandCtrlKey: false,
529
+ action: 'zoomOut',
533
530
  callback: onZoomOut,
534
531
  preventDefault: true,
535
532
  triggerIfInputFieldFocused: false,
@@ -773,6 +770,7 @@ const Canvas = ({ canvasContent, size }) => {
773
770
  try {
774
771
  const [newPreflight, currentPreflight] = await Promise.all([
775
772
  (0, element_install_api_1.prepareElementInstall)({
773
+ installationName: null,
776
774
  destination: {
777
775
  type: 'new-composition',
778
776
  compositionFile: null,
@@ -780,6 +778,7 @@ const Canvas = ({ canvasContent, size }) => {
780
778
  element: activeElementInstallRequest.element,
781
779
  }),
782
780
  (0, element_install_api_1.prepareElementInstall)({
781
+ installationName: null,
783
782
  destination: {
784
783
  type: 'current-composition',
785
784
  compositionFile: activeElementInstallRequest.compositionFile,
@@ -1,12 +1,47 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.CaptionInspector = void 0;
4
37
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
38
+ const react_1 = __importStar(require("react"));
6
39
  const colors_1 = require("../helpers/colors");
40
+ const hoverable_1 = require("../helpers/hoverable");
7
41
  const upload_1 = require("../icons/upload");
8
- const Button_1 = require("./Button");
42
+ const modals_1 = require("../state/modals");
9
43
  const CaptionTextEditor_1 = require("./CaptionTextEditor");
44
+ const InlineAction_1 = require("./InlineAction");
10
45
  const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
11
46
  const common_1 = require("./InspectorPanel/common");
12
47
  const styles_1 = require("./InspectorPanel/styles");
@@ -26,38 +61,57 @@ const readOnlyStatus = {
26
61
  const CaptionInspector = ({ captions, expanded, onTextChange, onTextSave, onTextCancel, onReplaceCaptions, onToggle, readOnly, readOnlyTitle, }) => {
27
62
  const fileInput = (0, react_1.useRef)(null);
28
63
  const [isImporting, setIsImporting] = (0, react_1.useState)(false);
29
- const importCaptions = (0, react_1.useCallback)(async (event) => {
30
- var _a;
31
- const file = (_a = event.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
32
- event.currentTarget.value = '';
33
- if (!file || onReplaceCaptions === null) {
64
+ const { setSelectedModal } = react_1.default.useContext(modals_1.SetSelectedModalContext);
65
+ const importCaptions = (0, react_1.useCallback)(async ({ fileName, contents, }) => {
66
+ if (onReplaceCaptions === null) {
34
67
  return;
35
68
  }
36
69
  setIsImporting(true);
37
70
  try {
38
71
  onReplaceCaptions((0, parse_caption_file_1.parseCaptionFile)({
39
- fileName: file.name,
40
- contents: await file.text(),
72
+ fileName,
73
+ contents: await contents,
41
74
  }));
42
75
  }
43
76
  catch (error) {
44
- (0, NotificationCenter_1.showNotification)(`Could not import ${file.name}: ${error instanceof Error ? error.message : String(error)}`, 5000);
77
+ (0, NotificationCenter_1.showNotification)(`Could not import ${fileName}: ${error instanceof Error ? error.message : String(error)}`, 5000);
45
78
  }
46
79
  finally {
47
80
  setIsImporting(false);
48
81
  }
49
82
  }, [onReplaceCaptions]);
83
+ const onFileSelected = (0, react_1.useCallback)((event) => {
84
+ var _a;
85
+ const file = (_a = event.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
86
+ event.currentTarget.value = '';
87
+ if (!file) {
88
+ return;
89
+ }
90
+ importCaptions({ fileName: file.name, contents: file.text() }).catch(() => undefined);
91
+ }, [importCaptions]);
92
+ const openCaptionSelection = (0, react_1.useCallback)(() => {
93
+ setSelectedModal({
94
+ type: 'quick-switcher',
95
+ mode: 'assets',
96
+ invocationTimestamp: Date.now(),
97
+ assetSelection: {
98
+ initialQuery: 'type:json',
99
+ onSelectFile: () => {
100
+ var _a;
101
+ return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
102
+ },
103
+ onSelected: (asset) => {
104
+ return importCaptions({
105
+ fileName: asset.name,
106
+ contents: fetch(asset.src).then((response) => response.text()),
107
+ }).catch(() => undefined);
108
+ },
109
+ },
110
+ compositionSelection: null,
111
+ });
112
+ }, [importCaptions, setSelectedModal]);
50
113
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
51
114
  jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderEnd, children: [onReplaceCaptions === null ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
52
- jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange: importCaptions, type: "file" }), jsx_runtime_1.jsxs(Button_1.Button, { buttonContainerStyle: {
53
- alignItems: 'center',
54
- display: 'flex',
55
- gap: 4,
56
- }, disabled: isImporting, onClick: () => {
57
- var _a;
58
- return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
59
- }, size: "condensed", title: importTooltip, children: [
60
- jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: colors_1.CURRENT_COLOR, focusable: "false", style: { height: 12, width: 12 } }), isImporting ? 'Importing…' : 'Import'] })
61
- ] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
115
+ jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange: onFileSelected, type: "file" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Import captions", className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME, disabled: isImporting, onClick: openCaptionSelection, renderAction: (color) => (jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: color, focusable: "false", style: { height: 14, width: 14 } })), title: importTooltip, variant: null })] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
62
116
  };
63
117
  exports.CaptionInspector = CaptionInspector;
@@ -6,14 +6,9 @@ const react_1 = require("react");
6
6
  const no_react_1 = require("remotion/no-react");
7
7
  const colors_1 = require("../helpers/colors");
8
8
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
+ const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
9
10
  const checkerboard_1 = require("../state/checkerboard");
10
11
  const ControlButton_1 = require("./ControlButton");
11
- const accessibilityLabel = [
12
- 'Show transparency as checkerboard',
13
- (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(T)',
14
- ]
15
- .filter(no_react_1.NoReactInternals.truthy)
16
- .join(' ');
17
12
  const CheckboardToggle = () => {
18
13
  const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
19
14
  const onClick = (0, react_1.useCallback)(() => {
@@ -21,6 +16,13 @@ const CheckboardToggle = () => {
21
16
  return !c;
22
17
  });
23
18
  }, [setCheckerboard]);
19
+ const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
20
+ const accessibilityLabel = [
21
+ 'Show transparency as checkerboard',
22
+ (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || shortcut === '' ? null : `(${shortcut})`,
23
+ ]
24
+ .filter(no_react_1.NoReactInternals.truthy)
25
+ .join(' ');
24
26
  return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, "aria-pressed": checkerboard, onClick: onClick, children: (color) => (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", focusable: "false", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: { width: 18, height: 18 }, fill: "none", children: [
25
27
  jsx_runtime_1.jsx("path", { fill: checkerboard ? colors_1.BLUE : color, d: "M256 48h184c13.3 0 24 10.7 24 24v184H256V48zM48 256h208v208H72c-13.3 0-24-10.7-24-24V256z" }), jsx_runtime_1.jsx("rect", { x: "48", y: "48", width: "416", height: "416", rx: "24", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" }), jsx_runtime_1.jsx("path", { d: "M256 48v416M48 256h416", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" })
26
28
  ] })) }));
@@ -8,6 +8,7 @@ export declare const Checkbox: React.FC<{
8
8
  readonly checked: boolean;
9
9
  readonly onChange: React.ChangeEventHandler<HTMLInputElement>;
10
10
  readonly name: string;
11
+ readonly inputId?: string;
11
12
  readonly disabled?: boolean;
12
13
  readonly variant?: CheckboxVariant;
13
14
  }>;
@@ -13,7 +13,7 @@ const CHECKMARK_SIZES = {
13
13
  default: 14,
14
14
  small: 13,
15
15
  };
16
- const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) => {
16
+ const Checkbox = ({ checked, onChange, disabled, inputId, name, variant = 'default' }) => {
17
17
  const size = SIZES[variant];
18
18
  const checkmarkSize = CHECKMARK_SIZES[variant];
19
19
  const background = (0, react_1.useMemo)(() => ({
@@ -47,7 +47,7 @@ const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) =>
47
47
  };
48
48
  }, [disabled, size]);
49
49
  return (jsx_runtime_1.jsxs("div", { style: background, children: [
50
- jsx_runtime_1.jsx("input", { style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
50
+ jsx_runtime_1.jsx("input", { id: inputId, style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
51
51
  ] }));
52
52
  };
53
53
  exports.Checkbox = Checkbox;
@@ -7,6 +7,7 @@ const client_id_1 = require("../helpers/client-id");
7
7
  const hoverable_1 = require("../helpers/hoverable");
8
8
  const ellipsis_1 = require("../icons/ellipsis");
9
9
  const InlineDropdown_1 = require("./InlineDropdown");
10
+ const layout_1 = require("./layout");
10
11
  const revealStyle = {
11
12
  display: 'flex',
12
13
  };
@@ -26,6 +27,8 @@ const CompositionContextButton = ({ visible, getItems, readOnlyStudio }) => {
26
27
  if (!visible || (connectionStatus !== 'connected' && !readOnlyStudio)) {
27
28
  return null;
28
29
  }
29
- return (jsx_runtime_1.jsx("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: revealStyle, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderAction, getItems: getItems, variant: null, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME }) }));
30
+ return (jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: revealStyle, children: [
31
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderAction, getItems: getItems, variant: null, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
32
+ ] }));
30
33
  };
31
34
  exports.CompositionContextButton = CompositionContextButton;
@@ -513,7 +513,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
513
513
  if (item.type === 'folder') {
514
514
  const folderPath = getFolderPath(item);
515
515
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
516
- jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
516
+ jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
517
517
  ] }) })
518
518
  ] }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderChildListDrop, children: item.items.map((childItem, index) => {
519
519
  return (jsx_runtime_1.jsx(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder, clearRootDragHover: clearRootDragHover, canReorder: canReorder, activeDragRef: activeDragRef, parentFolderPath: folderPath, previousSibling: index === 0 ? null : item.items[index - 1], nextSibling: index === item.items.length - 1
@@ -522,7 +522,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
522
522
  }) })) : null] }));
523
523
  }
524
524
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, type: "button", title: item.composition.id, className: `__remotion-composition __remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, "data-compname": item.composition.id, children: [
525
- jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
525
+ jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
526
526
  ] }) })
527
527
  ] }) }));
528
528
  };
@@ -171,7 +171,7 @@ const LicenseSettings = () => {
171
171
  const displayedError = error !== null && error !== void 0 ? error : settingsError;
172
172
  return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsxs("div", { style: content, children: [
173
173
  jsx_runtime_1.jsx(LicenseExplanation_1.LicenseExplanation, {}), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2 }), jsx_runtime_1.jsxs("div", { "aria-label": "License type", role: "radiogroup", children: [
174
- jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
174
+ jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', disabled: false, onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', disabled: false, onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
175
175
  jsx_runtime_1.jsxs("p", { style: description, children: ["Visit", ' ', jsx_runtime_1.jsxs("a", { style: externalDescriptionLink, href: "https://remotion.pro/license", target: "_blank", rel: "noopener noreferrer", children: ["remotion.pro/license",
176
176
  jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.BLUE, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
177
177
  ] }), ' ', "to obtain a license key. Then enter it here."] }), jsx_runtime_1.jsxs("label", { style: inputLabel, children: ["Public license key",
@@ -11,13 +11,18 @@ const colors_1 = require("../helpers/colors");
11
11
  const format_media_duration_1 = require("../helpers/format-media-duration");
12
12
  const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
13
13
  const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
14
+ const get_timeline_max_zoom_1 = require("../helpers/get-timeline-max-zoom");
14
15
  const open_in_remotion_convert_1 = require("../helpers/open-in-remotion-convert");
15
16
  const render_codec_label_1 = require("../helpers/render-codec-label");
16
17
  const use_image_metadata_1 = require("../helpers/use-image-metadata");
17
18
  const use_media_metadata_1 = require("../helpers/use-media-metadata");
18
19
  const folder_1 = require("../icons/folder");
19
20
  const remotion_convert_1 = require("../icons/remotion-convert");
21
+ const separation_1 = require("../icons/separation");
22
+ const transcription_1 = require("../icons/transcription");
20
23
  const trash_1 = require("../icons/trash");
24
+ const modals_1 = require("../state/modals");
25
+ const AssetAudioVolume_1 = require("./AssetAudioVolume");
21
26
  const InlineEditableTitle_1 = require("./InlineEditableTitle");
22
27
  const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
23
28
  const common_1 = require("./InspectorPanel/common");
@@ -139,10 +144,13 @@ const getCurrentAssetMediaSections = (mediaMetadata) => {
139
144
  };
140
145
  exports.getCurrentAssetMediaSections = getCurrentAssetMediaSections;
141
146
  const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio }) => {
142
- var _a, _b, _c;
147
+ var _a, _b, _c, _d, _e;
148
+ const { currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
149
+ const volumeMetadata = (currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === assetName ? currentAssetMetadata : null;
143
150
  const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
144
151
  .previewServerState.type;
145
152
  const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
153
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
146
154
  const staticFiles = (0, use_static_files_1.useStaticFiles)();
147
155
  const renameFile = (0, use_rename_static_file_1.useRenameStaticFile)({
148
156
  relativePath: assetName !== null && assetName !== void 0 ? assetName : '',
@@ -160,6 +168,32 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
160
168
  const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)(src);
161
169
  const imageSrc = (0, exports.getCurrentAssetImageMetadataSource)(assetName);
162
170
  const imageMetadata = (0, use_image_metadata_1.useImageMetadata)(imageSrc);
171
+ const mutationsDisabled = browserStudioOperations === null &&
172
+ (readOnlyStudio || connectionStatus !== 'connected');
173
+ const fileName = (_a = assetName === null || assetName === void 0 ? void 0 : assetName.split('/').pop()) !== null && _a !== void 0 ? _a : '';
174
+ const fileType = assetName ? (0, get_preview_file_type_1.getPreviewFileType)(assetName) : null;
175
+ const onTranscribe = (0, react_1.useCallback)(() => {
176
+ if (src === null || mutationsDisabled) {
177
+ return;
178
+ }
179
+ setSelectedModal({
180
+ type: 'transcribe',
181
+ src,
182
+ displayName: fileName,
183
+ audioStreamIndex: null,
184
+ requestInit: null,
185
+ });
186
+ }, [fileName, mutationsDisabled, setSelectedModal, src]);
187
+ const onTrackMatting = (0, react_1.useCallback)(() => {
188
+ if (src === null || fileType !== 'video' || mutationsDisabled) {
189
+ return;
190
+ }
191
+ setSelectedModal({
192
+ type: 'video-matting',
193
+ src,
194
+ displayName: fileName,
195
+ });
196
+ }, [fileName, fileType, mutationsDisabled, setSelectedModal, src]);
163
197
  const canRename = onAssetClick === undefined &&
164
198
  (browserStudioOperations !== null ||
165
199
  (connectionStatus === 'connected' && !readOnlyStudio));
@@ -187,7 +221,6 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
187
221
  if (!assetName) {
188
222
  return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT }));
189
223
  }
190
- const fileName = (_a = assetName.split('/').pop()) !== null && _a !== void 0 ? _a : assetName;
191
224
  const fileDetails = [];
192
225
  if (imageMetadata !== null) {
193
226
  fileDetails.push({
@@ -210,14 +243,15 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
210
243
  readOnlyStudio ||
211
244
  connectionStatus !== 'connected';
212
245
  const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
213
- const mutationsDisabled = browserStudioOperations === null &&
214
- (readOnlyStudio || connectionStatus !== 'connected');
215
246
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
216
247
  jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
217
248
  ? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
218
- : '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) })) })) : null, jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
249
+ : '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsxs("div", { style: assetMetadataStyle, children: [mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))), src ? (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Average volume", children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: jsx_runtime_1.jsx(AssetAudioVolume_1.AssetAudioVolume, { src: (_d = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _d !== void 0 ? _d : null, waveformSampleRate: volumeMetadata
250
+ ? Math.ceil(volumeMetadata.fps *
251
+ get_timeline_max_zoom_1.TIMELINE_FRAME_WIDTH_AT_MAX_ZOOM)
252
+ : null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(separation_1.SeparationIcon, { color: color, style: quickActionIconStyle })), children: "Separate foreground" })) : null, src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
219
253
  jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
220
- ] })) : null, fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] })
254
+ ] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] })
221
255
  ] }));
222
256
  };
223
257
  exports.AssetInfo = AssetInfo;
@@ -15,8 +15,10 @@ const ExpandedTracksProvider_1 = require("./ExpandedTracksProvider");
15
15
  const get_zod_if_possible_1 = require("./get-zod-if-possible");
16
16
  const MediaVolumeProvider_1 = require("./MediaVolumeProvider");
17
17
  const ModalsProvider_1 = require("./ModalsProvider");
18
+ const CaptionQueueProcessorLoader_1 = require("./RenderQueue/CaptionQueueProcessorLoader");
18
19
  const ClientRenderQueueProcessor_1 = require("./RenderQueue/ClientRenderQueueProcessor");
19
20
  const context_1 = require("./RenderQueue/context");
21
+ const VideoMattingQueueProcessorLoader_1 = require("./RenderQueue/VideoMattingQueueProcessorLoader");
20
22
  const SetTimelineInOutProvider_1 = require("./SetTimelineInOutProvider");
21
23
  const SettingsContext_1 = require("./SettingsContext");
22
24
  const ShowGuidesProvider_1 = require("./ShowGuidesProvider");
@@ -29,7 +31,7 @@ const ZoomGesturesProvider_1 = require("./ZoomGesturesProvider");
29
31
  const EditorContexts = ({ children }) => {
30
32
  return (jsx_runtime_1.jsx(get_zod_if_possible_1.ZodProvider, { children: jsx_runtime_1.jsx(VisualControls_1.VisualControlsProvider, { children: jsx_runtime_1.jsx(client_id_1.PreviewServerConnection, { children: jsx_runtime_1.jsxs(SettingsContext_1.SettingsProvider, { children: [
31
33
  jsx_runtime_1.jsx(VisualControlsUndoSync_1.VisualControlsUndoSync, {}), jsx_runtime_1.jsxs(context_1.RenderQueueContextProvider, { children: [
32
- jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowPixelGridProvider_1.ShowPixelGridProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
34
+ jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(CaptionQueueProcessorLoader_1.CaptionQueueProcessorLoader, {}), jsx_runtime_1.jsx(VideoMattingQueueProcessorLoader_1.VideoMattingQueueProcessorLoader, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowPixelGridProvider_1.ShowPixelGridProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
33
35
  ] })
34
36
  ] }) }) }) }));
35
37
  };