@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
@@ -15,7 +15,6 @@ const SizeSelector_1 = require("../components/SizeSelector");
15
15
  const use_resolved_stack_1 = require("../components/Timeline/use-resolved-stack");
16
16
  const TimelineInOutToggle_1 = require("../components/TimelineInOutToggle");
17
17
  const use_default_editor_info_1 = require("../components/use-default-editor-info");
18
- const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
19
18
  const Checkmark_1 = require("../icons/Checkmark");
20
19
  const canvas_ref_1 = require("../state/canvas-ref");
21
20
  const checkerboard_1 = require("../state/checkerboard");
@@ -37,6 +36,7 @@ const open_in_editor_1 = require("./open-in-editor");
37
36
  const pick_color_1 = require("./pick-color");
38
37
  const studio_runtime_config_1 = require("./studio-runtime-config");
39
38
  const use_keybinding_1 = require("./use-keybinding");
39
+ const use_keyboard_shortcut_label_1 = require("./use-keyboard-shortcut-label");
40
40
  const openExternal = (link) => {
41
41
  window.open(link, '_blank');
42
42
  };
@@ -186,7 +186,7 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, editorName, editorId, previewS
186
186
  quickSwitcherLabel: null,
187
187
  };
188
188
  };
189
- const getRenderMenuItems = ({ closeMenu, previewServerState, readOnlyStudio, }) => {
189
+ const getRenderMenuItems = ({ closeMenu, previewServerState, readOnlyStudio, renderShortcut, }) => {
190
190
  return [
191
191
  readOnlyStudio
192
192
  ? null
@@ -204,7 +204,9 @@ const getRenderMenuItems = ({ closeMenu, previewServerState, readOnlyStudio, })
204
204
  renderButton.click();
205
205
  },
206
206
  type: 'item',
207
- keyHint: 'R',
207
+ keyHint: (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
208
+ ? null
209
+ : renderShortcut || null,
208
210
  leftItem: null,
209
211
  subMenu: null,
210
212
  quickSwitcherLabel: 'Render...',
@@ -244,6 +246,17 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
244
246
  const { type } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
245
247
  const { defaultEditorId, defaultEditorName } = (0, use_default_editor_info_1.useEditorOpening)(type === 'connected');
246
248
  const keyboardShortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
249
+ const resetZoomShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('resetZoom');
250
+ const toggleSnappingShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleSnapping');
251
+ const checkerboardShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
252
+ const quickSwitcherShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('quickSwitcher');
253
+ const setInPointShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('setInPoint');
254
+ const setOutPointShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('setOutPoint');
255
+ const clearInOutPointsShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('clearInOutPoints');
256
+ const goToFrameShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('goToFrame');
257
+ const renderShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('render');
258
+ const askAIShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('askAI');
259
+ const showKeyboardShortcutsShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('showKeyboardShortcuts');
247
260
  const studioAskAIEnabled = (0, studio_runtime_config_1.getStudioAskAIEnabled)();
248
261
  const { setSidebarCollapsedState, sidebarCollapsedStateLeft, sidebarCollapsedStateRight, } = (0, react_1.useContext)(sidebar_1.SidebarContext);
249
262
  const sizes = (0, react_1.useMemo)(() => (0, SizeSelector_1.getUniqueSizes)(size), [size]);
@@ -393,7 +406,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
393
406
  preselectIndex: sizePreselectIndex,
394
407
  items: sizes.map((newSize) => ({
395
408
  id: String(newSize.size),
396
- keyHint: newSize.size === 1 ? '0' : null,
409
+ keyHint: newSize.size === 1 && !keyboardShortcutsDisabled
410
+ ? resetZoomShortcut || null
411
+ : null,
397
412
  label: (0, SizeSelector_1.getPreviewSizeLabel)(newSize),
398
413
  leftItem: String(newSize.size) === String(size.size) ? (jsx_runtime_1.jsx(Checkmark_1.Checkmark, {})) : null,
399
414
  onClick: () => {
@@ -475,7 +490,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
475
490
  },
476
491
  {
477
492
  id: 'enable-snapping',
478
- keyHint: keyboardShortcutsDisabled ? null : 'Shift+M',
493
+ keyHint: keyboardShortcutsDisabled
494
+ ? null
495
+ : toggleSnappingShortcut || null,
479
496
  label: 'Enable Snapping',
480
497
  onClick: () => {
481
498
  closeMenu();
@@ -610,7 +627,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
610
627
  },
611
628
  {
612
629
  id: 'checkerboard',
613
- keyHint: 'T',
630
+ keyHint: keyboardShortcutsDisabled
631
+ ? null
632
+ : checkerboardShortcut || null,
614
633
  label: 'Transparency as checkerboard',
615
634
  onClick: () => {
616
635
  closeMenu();
@@ -630,7 +649,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
630
649
  },
631
650
  {
632
651
  id: 'quick-switcher',
633
- keyHint: `${ShortcutHint_1.cmdOrCtrlCharacter}+K`,
652
+ keyHint: keyboardShortcutsDisabled
653
+ ? null
654
+ : quickSwitcherShortcut || null,
634
655
  label: 'Quick Switcher',
635
656
  onClick: () => {
636
657
  closeMenu();
@@ -654,7 +675,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
654
675
  },
655
676
  {
656
677
  id: 'in-mark',
657
- keyHint: 'I',
678
+ keyHint: keyboardShortcutsDisabled
679
+ ? null
680
+ : setInPointShortcut || null,
658
681
  label: 'In Mark',
659
682
  leftItem: null,
660
683
  onClick: () => {
@@ -669,7 +692,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
669
692
  },
670
693
  {
671
694
  id: 'out-mark',
672
- keyHint: 'O',
695
+ keyHint: keyboardShortcutsDisabled
696
+ ? null
697
+ : setOutPointShortcut || null,
673
698
  label: 'Out Mark',
674
699
  leftItem: null,
675
700
  onClick: () => {
@@ -684,7 +709,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
684
709
  },
685
710
  {
686
711
  id: 'x-mark',
687
- keyHint: 'X',
712
+ keyHint: keyboardShortcutsDisabled
713
+ ? null
714
+ : clearInOutPointsShortcut || null,
688
715
  label: 'Clear In/Out Marks',
689
716
  leftItem: null,
690
717
  onClick: () => {
@@ -699,7 +726,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
699
726
  },
700
727
  {
701
728
  id: 'goto-time',
702
- keyHint: 'G',
729
+ keyHint: keyboardShortcutsDisabled
730
+ ? null
731
+ : goToFrameShortcut || null,
703
732
  label: 'Go to frame',
704
733
  leftItem: null,
705
734
  onClick: () => {
@@ -744,6 +773,7 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
744
773
  closeMenu,
745
774
  previewServerState: type,
746
775
  readOnlyStudio,
776
+ renderShortcut,
747
777
  }),
748
778
  ...(0, composition_menu_items_1.getCompositionMenuItems)({
749
779
  closeMenu,
@@ -775,7 +805,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
775
805
  (_a = AskAiModal_1.askAiModalRef.current) === null || _a === void 0 ? void 0 : _a.toggle();
776
806
  },
777
807
  leftItem: null,
778
- keyHint: `${ShortcutHint_1.cmdOrCtrlCharacter}+I`,
808
+ keyHint: keyboardShortcutsDisabled
809
+ ? null
810
+ : askAIShortcut || null,
779
811
  subMenu: null,
780
812
  type: 'item',
781
813
  quickSwitcherLabel: 'Ask AI',
@@ -845,7 +877,9 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
845
877
  initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
846
878
  });
847
879
  },
848
- keyHint: '?',
880
+ keyHint: keyboardShortcutsDisabled
881
+ ? null
882
+ : showKeyboardShortcutsShortcut || null,
849
883
  leftItem: null,
850
884
  subMenu: null,
851
885
  type: 'item',
@@ -1022,6 +1056,17 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
1022
1056
  defaultEditorName,
1023
1057
  keyboardShortcutsDisabled,
1024
1058
  studioAskAIEnabled,
1059
+ askAIShortcut,
1060
+ checkerboardShortcut,
1061
+ clearInOutPointsShortcut,
1062
+ goToFrameShortcut,
1063
+ quickSwitcherShortcut,
1064
+ renderShortcut,
1065
+ resetZoomShortcut,
1066
+ setInPointShortcut,
1067
+ setOutPointShortcut,
1068
+ showKeyboardShortcutsShortcut,
1069
+ toggleSnappingShortcut,
1025
1070
  browserStudioOperations,
1026
1071
  size.size,
1027
1072
  setSize,
@@ -1,2 +1,2 @@
1
1
  import type { SVGProps } from 'react';
2
- export declare const InputPropsIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const InputPropsIcon: ({ color, ...props }: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InputPropsIcon = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const colors_1 = require("../helpers/colors");
6
- const InputPropsIcon = (props) => {
7
- return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", ...props, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR_LOWERCASE, d: "M144 32c-44.2 0-80 35.8-80 80v53.5c0 12.7-5.1 24.9-14.1 33.9L4.7 244.7C1.7 247.7 0 251.8 0 256s1.7 8.3 4.7 11.3L50 312.6c9 9 14.1 21.2 14.1 33.9V400c0 44.2 35.8 80 80 80h64c8.8 0 16-7.2 16-16s-7.2-16-16-16h-64c-26.5 0-48-21.5-48-48v-53.5c0-21.2-8.4-41.6-23.4-56.6L38.6 256l34-33.9c15-15 23.4-35.4 23.4-56.6V112c0-26.5 21.5-48 48-48h64c8.8 0 16-7.2 16-16s-7.2-16-16-16h-64zm288 0h-64c-8.8 0-16 7.2-16 16s7.2 16 16 16h64c26.5 0 48 21.5 48 48v53.5c0 21.2 8.4 41.6 23.4 56.6l33.9 33.9-33.9 33.9c-15 15-23.4 35.4-23.4 56.6V400c0 26.5-21.5 48-48 48h-64c-8.8 0-16 7.2-16 16s7.2 16 16 16h64c44.2 0 80-35.8 80-80v-53.5c0-12.7 5.1-24.9 14.1-33.9l45.3-45.3c3-3 4.7-7.1 4.7-11.3s-1.7-8.3-4.7-11.3l-45.3-45.3c-9-9-14.1-21.2-14.1-33.9V112c0-44.2-35.8-80-80-80z" }) }));
6
+ const InputPropsIcon = ({ color, ...props }) => {
7
+ return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", ...props, children: jsx_runtime_1.jsx("path", { fill: color !== null && color !== void 0 ? color : colors_1.CURRENT_COLOR_LOWERCASE, d: "M144 32c-44.2 0-80 35.8-80 80v53.5c0 12.7-5.1 24.9-14.1 33.9L4.7 244.7C1.7 247.7 0 251.8 0 256s1.7 8.3 4.7 11.3L50 312.6c9 9 14.1 21.2 14.1 33.9V400c0 44.2 35.8 80 80 80h64c8.8 0 16-7.2 16-16s-7.2-16-16-16h-64c-26.5 0-48-21.5-48-48v-53.5c0-21.2-8.4-41.6-23.4-56.6L38.6 256l34-33.9c15-15 23.4-35.4 23.4-56.6V112c0-26.5 21.5-48 48-48h64c8.8 0 16-7.2 16-16s-7.2-16-16-16h-64zm288 0h-64c-8.8 0-16 7.2-16 16s7.2 16 16 16h64c26.5 0 48 21.5 48 48v53.5c0 21.2 8.4 41.6 23.4 56.6l33.9 33.9-33.9 33.9c-15 15-23.4 35.4-23.4 56.6V400c0 26.5-21.5 48-48 48h-64c-8.8 0-16 7.2-16 16s7.2 16 16 16h64c44.2 0 80-35.8 80-80v-53.5c0-12.7 5.1-24.9 14.1-33.9l45.3-45.3c3-3 4.7-7.1 4.7-11.3s-1.7-8.3-4.7-11.3l-45.3-45.3c-9-9-14.1-21.2-14.1-33.9V112c0-44.2-35.8-80-80-80z" }) }));
8
8
  };
9
9
  exports.InputPropsIcon = InputPropsIcon;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const ModelsIcon: ({ color, ...props }: SVGProps<SVGSVGElement> & {
3
+ readonly color?: string | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelsIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../helpers/colors");
6
+ const ModelsIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: jsx_runtime_1.jsx("path", { d: "M176 16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-16c-35.3 0-64 28.7-64 64v16H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v64H16c-8.8 0-16 7.2-16 16s7.2 16 16 16h48v16c0 35.3 28.7 64 64 64h16v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h64v48c0 8.8 7.2 16 16 16s16-7.2 16-16v-48h16c35.3 0 64-28.7 64-64v-16h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-64h48c8.8 0 16-7.2 16-16s-7.2-16-16-16h-48v-16c0-35.3-28.7-64-64-64h-16V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16c0-8.8-7.2-16-16-16s-16 7.2-16 16v48h-64V16ZM416 128v256c0 17.7-14.3 32-32 32H128c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32h256c17.7 0 32 14.3 32 32ZM192 160c-17.7 0-32 14.3-32 32v128c0 17.7 14.3 32 32 32h128c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32H192Zm128 32v128H192V192h128Z", fill: color !== null && color !== void 0 ? color : colors_1.CURRENT_COLOR_LOWERCASE }) }));
7
+ exports.ModelsIcon = ModelsIcon;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const SeparationIcon: ({ color, ...props }: SVGProps<SVGSVGElement> & {
3
+ readonly color?: string | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SeparationIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../helpers/colors");
6
+ const SeparationIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 512", ...props, children: jsx_runtime_1.jsx("path", { d: "M0 64c0 29.8 20.4 54.9 48 62v100c-27.6 7.1-48 32.2-48 62 0 35.3 28.7 64 64 64 29.8 0 54.9-20.4 62-48h196c7.1 27.6 32.2 48 62 48 35.3 0 64-28.7 64-64 0-29.8-20.4-54.9-48-62V126c27.6-7.1 48-32.2 48-62 0-35.3-28.7-64-64-64-29.8 0-54.9 20.4-62 48H126C118.9 20.4 93.8 0 64 0 28.7 0 0 28.7 0 64Zm322 16c5.8 22.5 23.5 40.2 46 46v100c-22.5 5.8-40.2 23.5-46 46H126c-5.8-22.5-23.5-40.2-46-46V126c22.5-5.8 40.2-23.5 46-46h196Zm174 128h-16v32h34c5.8 22.5 23.5 40.2 46 46v100c-22.5 5.8-40.2 23.5-46 46H318c-5.8-22.5-23.5-40.2-46-46v-34h-32v34c-27.6 7.1-48 32.2-48 62 0 35.3 28.7 64 64 64 29.8 0 54.9-20.4 62-48h196c7.1 27.6 32.2 48 62 48 35.3 0 64-28.7 64-64 0-29.8-20.4-54.9-48-62V286c27.6-7.1 48-32.2 48-62 0-35.3-28.7-64-64-64-29.8 0-54.9 20.4-62 48h-18Zm80 48a32 32 0 1 1 0-64 32 32 0 1 1 0 64ZM544 448a32 32 0 1 1 64 0 32 32 0 1 1-64 0ZM256 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64Zm96-192a32 32 0 1 1 64 0 32 32 0 1 1-64 0ZM64 320a32 32 0 1 1 0-64 32 32 0 1 1 0 64ZM352 64a32 32 0 1 1 64 0 32 32 0 1 1-64 0ZM64 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64Z", fill: color !== null && color !== void 0 ? color : colors_1.CURRENT_COLOR_LOWERCASE }) }));
7
+ exports.SeparationIcon = SeparationIcon;
@@ -0,0 +1,4 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const TranscriptionIcon: ({ color, ...props }: SVGProps<SVGSVGElement> & {
3
+ readonly color?: string | undefined;
4
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TranscriptionIcon = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../helpers/colors");
6
+ const TranscriptionIcon = ({ color, ...props }) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", ...props, children: jsx_runtime_1.jsx("path", { d: "M448 96c17.7 0 32 14.3 32 32v256c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32V128c0-17.7 14.3-32 32-32h384ZM64 64C28.7 64 0 92.7 0 128v256c0 35.3 28.7 64 64 64h384c35.3 0 64-28.7 64-64V128c0-35.3-28.7-64-64-64H64Zm88 128h32c13.3 0 24 10.7 24 24 0 8.8 7.2 16 16 16s16-7.2 16-16c0-30.9-25.1-56-56-56h-32c-30.9 0-56 25.1-56 56v80c0 30.9 25.1 56 56 56h32c30.9 0 56-25.1 56-56 0-8.8-7.2-16-16-16s-16 7.2-16 16c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24v-80c0-13.3 10.7-24 24-24Zm152 24c0-13.3 10.7-24 24-24h32c13.3 0 24 10.7 24 24 0 8.8 7.2 16 16 16s16-7.2 16-16c0-30.9-25.1-56-56-56h-32c-30.9 0-56 25.1-56 56v80c0 30.9 25.1 56 56 56h32c30.9 0 56-25.1 56-56 0-8.8-7.2-16-16-16s-16 7.2-16 16c0 13.3-10.7 24-24 24h-32c-13.3 0-24-10.7-24-24v-80Z", fill: color !== null && color !== void 0 ? color : colors_1.CURRENT_COLOR_LOWERCASE }) }));
7
+ exports.TranscriptionIcon = TranscriptionIcon;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UploadIcon = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const UploadIcon = ({ color, ...props }) => {
6
- return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", children: jsx_runtime_1.jsx("path", { fill: color, d: "M192 96L320 96L320 192C320 227.3 348.7 256 384 256L480 256L480 512C480 529.7 465.7 544 448 544L192 544C174.3 544 160 529.7 160 512L160 128C160 110.3 174.3 96 192 96zM352 109.3L466.7 224L384 224C366.3 224 352 209.7 352 192L352 109.3zM192 64C156.7 64 128 92.7 128 128L128 512C128 547.3 156.7 576 192 576L448 576C483.3 576 512 547.3 512 512L512 250.5C512 233.5 505.3 217.2 493.3 205.2L370.7 82.7C358.7 70.7 342.5 64 325.5 64L192 64zM304 488C304 496.8 311.2 504 320 504C328.8 504 336 496.8 336 488L336 432L392 432C400.8 432 408 424.8 408 416C408 407.2 400.8 400 392 400L336 400L336 344C336 335.2 328.8 328 320 328C311.2 328 304 335.2 304 344L304 400L248 400C239.2 400 232 407.2 232 416C232 424.8 239.2 432 248 432L304 432L304 488z" }) }));
6
+ return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M240 54.6L240 336c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-281.4-84.7 84.7c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l112-112c6.2-6.2 16.4-6.2 22.6 0l112 112c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L240 54.6zM160 320l-96 0c-17.7 0-32 14.3-32 32l0 64c0 17.7 14.3 32 32 32l320 0c17.7 0 32-14.3 32-32l0-64c0-17.7-14.3-32-32-32l-96 0 0-32 96 0c35.3 0 64 28.7 64 64l0 64c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64l0-64c0-35.3 28.7-64 64-64l96 0 0 32zm160 64a24 24 0 1 1 48 0 24 24 0 1 1-48 0z" }) }));
7
7
  };
8
8
  exports.UploadIcon = UploadIcon;
@@ -109,6 +109,18 @@ export type AddEffectModalState = {
109
109
  nodePath: SequencePropsSubscriptionKey;
110
110
  clientId: string;
111
111
  };
112
+ export type TranscriptionModalState = {
113
+ type: 'transcribe';
114
+ src: string;
115
+ displayName: string;
116
+ audioStreamIndex: number | null;
117
+ requestInit: Omit<RequestInit, 'signal'> | null;
118
+ };
119
+ export type VideoMattingModalState = {
120
+ type: 'video-matting';
121
+ src: string;
122
+ displayName: string;
123
+ };
112
124
  export type CanvasCaptureImport = {
113
125
  readonly data: CanvasCaptureData;
114
126
  readonly durationInSeconds: number;
@@ -167,7 +179,7 @@ export type ModalState = {
167
179
  type: 'input-props-override';
168
180
  } | {
169
181
  type: 'settings';
170
- initialTab: 'apps' | 'rendering' | 'studio' | 'packages' | 'shortcuts' | 'skills' | 'updates' | 'license';
182
+ initialTab: 'apps' | 'rendering' | 'studio' | 'packages' | 'models' | 'shortcuts' | 'skills' | 'updates' | 'license';
171
183
  initialPublicLicenseKey: string | null;
172
184
  } | RenderModalState | WebRenderModalState | {
173
185
  type: 'render-progress';
@@ -194,7 +206,7 @@ export type ModalState = {
194
206
  type: 'element-library';
195
207
  name: string;
196
208
  url: string;
197
- } | ElementInstallModalState | AddEffectModalState | ConfirmationDialogState | SvgImportDialogState;
209
+ } | ElementInstallModalState | AddEffectModalState | TranscriptionModalState | VideoMattingModalState | ConfirmationDialogState | SvgImportDialogState;
198
210
  export type SetSelectedModalContextType = {
199
211
  setSelectedModal: React.Dispatch<React.SetStateAction<ModalState | null>>;
200
212
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
4
4
  },
5
5
  "name": "@remotion/studio",
6
- "version": "4.0.522",
6
+ "version": "4.0.523",
7
7
  "description": "APIs for interacting with the Remotion Studio",
8
8
  "main": "dist",
9
9
  "scripts": {
@@ -20,40 +20,54 @@
20
20
  "url": "https://github.com/remotion-dev/remotion/issues"
21
21
  },
22
22
  "peerDependencies": {
23
+ "@remotion/video-matting": "4.0.523",
24
+ "@remotion/whisper-webgpu": "4.0.523",
23
25
  "react": ">=16.8.0",
24
26
  "react-dom": ">=16.8.0"
25
27
  },
28
+ "peerDependenciesMeta": {
29
+ "@remotion/video-matting": {
30
+ "optional": true
31
+ },
32
+ "@remotion/whisper-webgpu": {
33
+ "optional": true
34
+ }
35
+ },
26
36
  "dependencies": {
27
- "@tanstack/react-virtual": "3.14.9",
28
- "@remotion/canvas": "4.0.522",
29
- "@remotion/studio-protocol": "4.0.522",
30
- "@remotion/studio-codemods": "4.0.522",
31
- "semver": "7.5.3",
32
- "remotion": "4.0.522",
33
- "@remotion/captions": "4.0.522",
34
- "@remotion/media": "4.0.522",
35
- "@remotion/player": "4.0.522",
36
- "@remotion/media-utils": "4.0.522",
37
- "@remotion/renderer": "4.0.522",
38
- "@remotion/web-renderer": "4.0.522",
39
- "@remotion/studio-shared": "4.0.522",
40
- "@remotion/timeline-utils": "4.0.522",
41
- "@remotion/zod-types": "4.0.522",
42
37
  "@jridgewell/trace-mapping": "0.3.31",
38
+ "@remotion/canvas": "4.0.523",
39
+ "@remotion/captions": "4.0.523",
40
+ "@remotion/media": "4.0.523",
41
+ "@remotion/media-utils": "4.0.523",
42
+ "@remotion/player": "4.0.523",
43
+ "@remotion/renderer": "4.0.523",
44
+ "@remotion/studio-codemods": "4.0.523",
45
+ "@remotion/studio-protocol": "4.0.523",
46
+ "@remotion/studio-shared": "4.0.523",
47
+ "@remotion/timeline-utils": "4.0.523",
48
+ "@remotion/web-renderer": "4.0.523",
49
+ "@remotion/zod-types": "4.0.523",
50
+ "@tanstack/react-virtual": "3.14.9",
43
51
  "mediabunny": "1.55.5",
44
52
  "memfs": "3.4.3",
45
53
  "open": "8.4.2",
54
+ "prismjs": "1.30.0",
55
+ "remotion": "4.0.523",
56
+ "semver": "7.5.3",
46
57
  "zod": "4.5.4"
47
58
  },
48
59
  "devDependencies": {
49
60
  "@happy-dom/global-registrator": "14.5.1",
50
- "react": "19.2.3",
51
- "react-dom": "19.2.3",
61
+ "@remotion/eslint-config-internal": "4.0.523",
62
+ "@remotion/video-matting": "4.0.523",
63
+ "@remotion/whisper-webgpu": "4.0.523",
52
64
  "@testing-library/react": "16.1.0",
65
+ "@types/prismjs": "1.26.4",
53
66
  "@types/semver": "7.5.3",
54
- "@remotion/eslint-config-internal": "4.0.522",
67
+ "@typescript/native-preview": "7.0.0-dev.20260217.1",
55
68
  "eslint": "9.19.0",
56
- "@typescript/native-preview": "7.0.0-dev.20260217.1"
69
+ "react": "19.2.3",
70
+ "react-dom": "19.2.3"
57
71
  },
58
72
  "publishConfig": {
59
73
  "access": "public"
@@ -1 +0,0 @@
1
- export declare const UpdateCheck: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateCheck = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const colors_1 = require("../helpers/colors");
7
- const modals_1 = require("../state/modals");
8
- const z_index_1 = require("../state/z-index");
9
- const InlineAction_1 = require("./InlineAction");
10
- const UpdateStatusContext_1 = require("./UpdateStatusContext");
11
- const buttonStyle = {
12
- appearance: 'none',
13
- border: 'none',
14
- fontWeight: 'bold',
15
- backgroundColor: colors_1.TRANSPARENT,
16
- cursor: 'pointer',
17
- fontSize: 14,
18
- display: 'inline-flex',
19
- justifyContent: 'center',
20
- marginLeft: 8,
21
- };
22
- const updateIconContainer = {
23
- alignItems: 'center',
24
- display: 'flex',
25
- flexShrink: 0,
26
- };
27
- const UpdateCheck = () => {
28
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
29
- const { tabIndex } = (0, z_index_1.useZIndex)();
30
- const { info, knownBugs } = (0, UpdateStatusContext_1.useUpdateStatus)();
31
- const [hovered, setHovered] = (0, react_1.useState)(false);
32
- const hasBugfixesAvailable = (0, react_1.useMemo)(() => {
33
- return Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) && knownBugs && knownBugs.length > 0);
34
- }, [info === null || info === void 0 ? void 0 : info.updateAvailable, knownBugs]);
35
- const openModal = (0, react_1.useCallback)(() => {
36
- var _a;
37
- var _b;
38
- setSelectedModal({
39
- type: 'settings',
40
- initialTab: 'updates',
41
- initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
42
- });
43
- }, [setSelectedModal]);
44
- const dynButtonStyle = (0, react_1.useMemo)(() => {
45
- return {
46
- ...buttonStyle,
47
- color: hovered
48
- ? colors_1.WHITE
49
- : hasBugfixesAvailable
50
- ? colors_1.WARNING_COLOR
51
- : colors_1.WHITE_ALPHA_80,
52
- };
53
- }, [hasBugfixesAvailable, hovered]);
54
- const onPointerEnter = (0, react_1.useCallback)(() => {
55
- setHovered(true);
56
- }, []);
57
- const onPointerLeave = (0, react_1.useCallback)(() => {
58
- setHovered(false);
59
- }, []);
60
- const renderUpdateIcon = (0, react_1.useCallback)((color) => {
61
- return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
62
- height: 16,
63
- width: 16,
64
- color,
65
- flexShrink: 0,
66
- }, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z" }) }));
67
- }, []);
68
- if (!info) {
69
- return null;
70
- }
71
- if (!info.updateAvailable && !info.skillsUpdateAvailable) {
72
- return null;
73
- }
74
- if (!hasBugfixesAvailable) {
75
- return (jsx_runtime_1.jsx("div", { style: updateIconContainer, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openModal, renderAction: renderUpdateIcon, unhoveredColor: colors_1.WHITE_ALPHA_80, title: "Update available" }) }));
76
- }
77
- return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: dynButtonStyle, onClick: openModal, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, type: "button", title: "Bugfixes available", children: "Bugfixes available" }));
78
- };
79
- exports.UpdateCheck = UpdateCheck;