@remotion/studio 4.0.422 → 4.0.424

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 (369) hide show
  1. package/dist/FastRefreshProvider.js +1 -1
  2. package/dist/ResolveCompositionConfigInStudio.js +1 -1
  3. package/dist/Studio.js +6 -4
  4. package/dist/api/create-composition.js +2 -2
  5. package/dist/api/focus-default-props-path.d.ts +1 -1
  6. package/dist/api/get-zod-schema-from-primitive.d.ts +3 -2
  7. package/dist/api/get-zod-schema-from-primitive.js +3 -4
  8. package/dist/api/helpers/calc-new-props.d.ts +2 -2
  9. package/dist/api/play.d.ts +1 -1
  10. package/dist/api/save-render-output.d.ts +7 -0
  11. package/dist/api/save-render-output.js +45 -0
  12. package/dist/api/toggle.d.ts +1 -1
  13. package/dist/components/AskAiModal.js +3 -1
  14. package/dist/components/AssetSelector.js +21 -58
  15. package/dist/components/AssetSelectorItem.js +15 -9
  16. package/dist/components/AudioWaveform.js +5 -4
  17. package/dist/components/AudioWaveformBar.js +1 -1
  18. package/dist/components/Button.js +1 -1
  19. package/dist/components/Canvas.js +2 -1
  20. package/dist/components/CanvasIfSizeIsAvailable.js +1 -1
  21. package/dist/components/CanvasOrLoading.js +12 -6
  22. package/dist/components/CheckboardToggle.js +1 -1
  23. package/dist/components/Checkbox.js +3 -1
  24. package/dist/components/CheckerboardProvider.js +1 -1
  25. package/dist/components/CompSelectorRef.js +1 -1
  26. package/dist/components/CompositionContextButton.js +2 -2
  27. package/dist/components/CompositionSelector.js +4 -3
  28. package/dist/components/CompositionSelectorItem.js +6 -3
  29. package/dist/components/ContextMenu.js +3 -2
  30. package/dist/components/ControlButton.d.ts +1 -1
  31. package/dist/components/ControlButton.js +1 -1
  32. package/dist/components/CopyButton.js +3 -2
  33. package/dist/components/CurrentAsset.d.ts +3 -0
  34. package/dist/components/CurrentAsset.js +113 -0
  35. package/dist/components/CurrentComposition.js +3 -2
  36. package/dist/components/Editor.js +6 -1
  37. package/dist/components/EditorContent.js +6 -1
  38. package/dist/components/EditorContexts.js +3 -1
  39. package/dist/components/EditorGuides/Guide.js +1 -1
  40. package/dist/components/EditorGuides/index.js +2 -2
  41. package/dist/components/EditorRuler/Ruler.js +1 -1
  42. package/dist/components/EditorRuler/index.js +3 -1
  43. package/dist/components/ExplorerPanel.js +4 -1
  44. package/dist/components/FilePreview.js +8 -6
  45. package/dist/components/FpsCounter.js +1 -1
  46. package/dist/components/FullscreenToggle.js +1 -1
  47. package/dist/components/GlobalPropsEditorUpdateButton.js +3 -1
  48. package/dist/components/InitialCompositionLoader.d.ts +1 -2
  49. package/dist/components/InitialCompositionLoader.js +3 -3
  50. package/dist/components/InlineAction.js +1 -1
  51. package/dist/components/InlineDropdown.js +3 -2
  52. package/dist/components/InstallPackage.js +19 -9
  53. package/dist/components/InstallablePackage.js +5 -3
  54. package/dist/components/JSONViewer.js +1 -1
  55. package/dist/components/KeyboardShortcutsExplainer.js +91 -1
  56. package/dist/components/KnownBugs.js +4 -2
  57. package/dist/components/LoopToggle.js +1 -1
  58. package/dist/components/MediaVolumeProvider.js +1 -1
  59. package/dist/components/Menu/MenuDivider.js +1 -1
  60. package/dist/components/Menu/MenuItem.js +3 -2
  61. package/dist/components/Menu/MenuSubItem.js +4 -2
  62. package/dist/components/Menu/SubMenu.js +1 -1
  63. package/dist/components/MenuBuildIndicator.js +1 -1
  64. package/dist/components/MenuToolbar.js +5 -3
  65. package/dist/components/MobilePanel.d.ts +1 -1
  66. package/dist/components/MobilePanel.js +2 -1
  67. package/dist/components/ModalButton.js +1 -1
  68. package/dist/components/ModalContainer.js +1 -1
  69. package/dist/components/ModalFooter.js +1 -1
  70. package/dist/components/ModalHeader.js +3 -1
  71. package/dist/components/Modals.js +2 -2
  72. package/dist/components/ModalsProvider.js +1 -1
  73. package/dist/components/MuteToggle.js +1 -1
  74. package/dist/components/NewComposition/CancelButton.js +1 -1
  75. package/dist/components/NewComposition/CodemodFooter.js +5 -2
  76. package/dist/components/NewComposition/ComboBox.js +6 -2
  77. package/dist/components/NewComposition/DeleteComposition.js +10 -2
  78. package/dist/components/NewComposition/DiffPreview.js +5 -3
  79. package/dist/components/NewComposition/DismissableModal.js +1 -1
  80. package/dist/components/NewComposition/DuplicateComposition.js +28 -3
  81. package/dist/components/NewComposition/InputDragger.d.ts +1 -1
  82. package/dist/components/NewComposition/InputDragger.js +2 -2
  83. package/dist/components/NewComposition/MenuContent.js +3 -3
  84. package/dist/components/NewComposition/NewCompDuration.js +7 -2
  85. package/dist/components/NewComposition/RemInput.d.ts +2 -2
  86. package/dist/components/NewComposition/RemInput.js +2 -2
  87. package/dist/components/NewComposition/RemInputTypeColor.js +1 -1
  88. package/dist/components/NewComposition/RemTextarea.js +1 -1
  89. package/dist/components/NewComposition/RenameComposition.js +11 -2
  90. package/dist/components/NewComposition/ValidationMessage.js +4 -2
  91. package/dist/components/NoRegisterRoot.js +4 -1
  92. package/dist/components/Notifications/ColorDot.js +1 -1
  93. package/dist/components/Notifications/Notification.js +1 -1
  94. package/dist/components/Notifications/NotificationCenter.js +2 -2
  95. package/dist/components/Notifications/ServerDisconnected.js +2 -1
  96. package/dist/components/OpenEditorButton.js +2 -2
  97. package/dist/components/OptionsPanel.js +7 -4
  98. package/dist/components/OverrideInputProps.js +7 -2
  99. package/dist/components/PlayPause.js +3 -1
  100. package/dist/components/PlaybackRateSelector.js +2 -2
  101. package/dist/components/Preview.js +8 -8
  102. package/dist/components/PreviewToolbar.js +11 -1
  103. package/dist/components/QuickSwitcher/AlgoliaCredit.js +1 -1
  104. package/dist/components/QuickSwitcher/NoResults.js +1 -1
  105. package/dist/components/QuickSwitcher/QuickSwitcher.js +1 -1
  106. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +12 -3
  107. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +6 -3
  108. package/dist/components/RefreshCompositionOverlay.js +1 -1
  109. package/dist/components/RenderButton.js +26 -9
  110. package/dist/components/RenderModal/CliCopyButton.js +3 -3
  111. package/dist/components/RenderModal/ClientRenderProgress.js +18 -13
  112. package/dist/components/RenderModal/CrfSetting.d.ts +1 -2
  113. package/dist/components/RenderModal/CrfSetting.js +1 -1
  114. package/dist/components/RenderModal/DataEditor.js +15 -8
  115. package/dist/components/RenderModal/EnforceAudioTrackSetting.js +5 -1
  116. package/dist/components/RenderModal/EnvInput.js +4 -1
  117. package/dist/components/RenderModal/FrameRangeSetting.js +5 -1
  118. package/dist/components/RenderModal/GuiRenderStatus.js +15 -10
  119. package/dist/components/RenderModal/InfoBubble.js +3 -2
  120. package/dist/components/RenderModal/InfoTooltip.js +3 -2
  121. package/dist/components/RenderModal/InlineEyeIcon.js +2 -2
  122. package/dist/components/RenderModal/InlineRemoveButton.js +2 -2
  123. package/dist/components/RenderModal/JpegQualitySetting.js +1 -1
  124. package/dist/components/RenderModal/MultiRangeSlider.js +3 -1
  125. package/dist/components/RenderModal/MutedSetting.js +5 -1
  126. package/dist/components/RenderModal/NumberOfLoopsSetting.js +3 -1
  127. package/dist/components/RenderModal/NumberSetting.js +6 -2
  128. package/dist/components/RenderModal/OptionExplainer.js +14 -1
  129. package/dist/components/RenderModal/OptionExplainerBubble.js +1 -1
  130. package/dist/components/RenderModal/RenderModalAdvanced.js +66 -7
  131. package/dist/components/RenderModal/RenderModalAudio.js +21 -4
  132. package/dist/components/RenderModal/RenderModalBasic.js +18 -3
  133. package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +5 -3
  134. package/dist/components/RenderModal/RenderModalGif.js +6 -1
  135. package/dist/components/RenderModal/RenderModalHr.js +1 -1
  136. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +5 -2
  137. package/dist/components/RenderModal/RenderModalOutputName.js +8 -1
  138. package/dist/components/RenderModal/RenderModalPicture.js +30 -3
  139. package/dist/components/RenderModal/RenderStatusModal.js +12 -2
  140. package/dist/components/RenderModal/ResolveCompositionBeforeModal.js +6 -3
  141. package/dist/components/RenderModal/ScaleSetting.js +3 -2
  142. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +2 -2
  143. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -4
  144. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +31 -6
  145. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
  146. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -2
  147. package/dist/components/RenderModal/SchemaEditor/SchemaSaveButton.js +2 -2
  148. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +9 -5
  149. package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +3 -1
  150. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +9 -5
  151. package/dist/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +1 -1
  152. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +3 -1
  153. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +8 -2
  154. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +5 -1
  155. package/dist/components/RenderModal/SchemaEditor/ZodDefaultEditor.js +1 -1
  156. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +6 -4
  157. package/dist/components/RenderModal/SchemaEditor/ZodEffectEditor.js +3 -1
  158. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +4 -2
  159. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +6 -4
  160. package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +8 -2
  161. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +8 -6
  162. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +3 -1
  163. package/dist/components/RenderModal/SchemaEditor/ZodNullableEditor.js +1 -1
  164. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +5 -1
  165. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +6 -5
  166. package/dist/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +1 -1
  167. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +4 -1
  168. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +8 -5
  169. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +5 -1
  170. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +24 -24
  171. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +5 -1
  172. package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +9 -5
  173. package/dist/components/RenderModal/SchemaEditor/ZodTupleItemEditor.js +1 -1
  174. package/dist/components/RenderModal/SchemaEditor/ZodUnionEditor.js +5 -5
  175. package/dist/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -2
  176. package/dist/components/RenderModal/SchemaEditor/extract-enum-json-paths.d.ts +4 -4
  177. package/dist/components/RenderModal/SchemaEditor/local-state.js +1 -1
  178. package/dist/components/RenderModal/SeparateAudioOption.js +7 -2
  179. package/dist/components/RenderModal/ServerRenderModal.js +28 -6
  180. package/dist/components/RenderModal/WarningIndicatorButton.js +4 -2
  181. package/dist/components/RenderModal/WebRenderModal.js +35 -7
  182. package/dist/components/RenderModal/WebRenderModalAdvanced.js +11 -4
  183. package/dist/components/RenderModal/WebRenderModalAudio.js +12 -2
  184. package/dist/components/RenderModal/WebRenderModalBasic.js +23 -5
  185. package/dist/components/RenderModal/WebRenderModalLicense.js +24 -2
  186. package/dist/components/RenderModal/WebRenderModalLicenseKeyDetails.js +12 -1
  187. package/dist/components/RenderModal/WebRenderModalPicture.js +8 -1
  188. package/dist/components/RenderModal/WebRendererExperimentalBadge.js +3 -1
  189. package/dist/components/RenderModal/get-default-codecs.d.ts +7 -8
  190. package/dist/components/RenderModal/human-readable-audio-codecs.d.ts +1 -2
  191. package/dist/components/RenderModal/human-readable-codec.d.ts +1 -2
  192. package/dist/components/RenderModal/human-readable-loglevel.d.ts +1 -2
  193. package/dist/components/RenderModal/out-name-checker.d.ts +4 -5
  194. package/dist/components/RenderModal/quality-options.js +1 -1
  195. package/dist/components/RenderPreview.js +4 -4
  196. package/dist/components/RenderQueue/CircularProgress.js +1 -1
  197. package/dist/components/RenderQueue/ClientRenderQueueProcessor.d.ts +1 -0
  198. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +34 -5
  199. package/dist/components/RenderQueue/RenderQueueCancelledMessage.js +1 -1
  200. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -2
  201. package/dist/components/RenderQueue/RenderQueueDownloadItem.d.ts +5 -0
  202. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +35 -0
  203. package/dist/components/RenderQueue/RenderQueueError.js +1 -1
  204. package/dist/components/RenderQueue/RenderQueueItem.js +51 -16
  205. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -2
  206. package/dist/components/RenderQueue/RenderQueueItemStatus.js +10 -7
  207. package/dist/components/RenderQueue/RenderQueueOpenInFolder.d.ts +2 -2
  208. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -2
  209. package/dist/components/RenderQueue/RenderQueueOutputName.js +2 -9
  210. package/dist/components/RenderQueue/RenderQueueProgressMessage.js +4 -2
  211. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +6 -4
  212. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -2
  213. package/dist/components/RenderQueue/RenderQueueSavingMessage.d.ts +2 -0
  214. package/dist/components/RenderQueue/RenderQueueSavingMessage.js +13 -0
  215. package/dist/components/RenderQueue/SuccessIcon.js +1 -1
  216. package/dist/components/RenderQueue/actions.d.ts +21 -24
  217. package/dist/components/RenderQueue/client-side-render-types.d.ts +11 -9
  218. package/dist/components/RenderQueue/client-side-render-types.js +5 -0
  219. package/dist/components/RenderQueue/context.d.ts +6 -3
  220. package/dist/components/RenderQueue/context.js +39 -8
  221. package/dist/components/RenderQueue/index.js +11 -19
  222. package/dist/components/RendersTab.js +3 -1
  223. package/dist/components/ResetZoomButton.js +1 -1
  224. package/dist/components/RunningCalculateMetadata.js +5 -1
  225. package/dist/components/SegmentedControl.js +3 -3
  226. package/dist/components/SetTimelineInOutProvider.js +1 -1
  227. package/dist/components/ShowGuidesProvider.js +1 -1
  228. package/dist/components/ShowRulersProvider.js +1 -1
  229. package/dist/components/SidebarCollapserControls.js +5 -3
  230. package/dist/components/SidebarRenderButton.js +2 -2
  231. package/dist/components/SizeSelector.js +2 -2
  232. package/dist/components/Spinner.js +6 -4
  233. package/dist/components/Splitter/SplitterContainer.js +1 -1
  234. package/dist/components/Splitter/SplitterElement.js +3 -1
  235. package/dist/components/Splitter/SplitterHandle.js +1 -1
  236. package/dist/components/StaticFilePreview.js +5 -5
  237. package/dist/components/Tabs/index.js +2 -2
  238. package/dist/components/Tabs/vertical.js +1 -1
  239. package/dist/components/TextViewer.js +1 -1
  240. package/dist/components/TimeValue.js +3 -1
  241. package/dist/components/Timeline/LoopedIndicator.js +4 -2
  242. package/dist/components/Timeline/LoopedTimelineIndicators.js +5 -4
  243. package/dist/components/Timeline/MaxTimelineTracks.js +1 -1
  244. package/dist/components/Timeline/Timeline.js +5 -1
  245. package/dist/components/Timeline/TimelineCollapseToggle.js +2 -2
  246. package/dist/components/Timeline/TimelineDragHandler.js +5 -3
  247. package/dist/components/Timeline/TimelineInOutPointer.js +2 -2
  248. package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -2
  249. package/dist/components/Timeline/TimelineLayerEye.js +3 -3
  250. package/dist/components/Timeline/TimelineList.js +3 -2
  251. package/dist/components/Timeline/TimelineListItem.js +3 -1
  252. package/dist/components/Timeline/TimelineScrollable.js +1 -1
  253. package/dist/components/Timeline/TimelineSequence.js +6 -6
  254. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -1
  255. package/dist/components/Timeline/TimelineSlider.d.ts +1 -1
  256. package/dist/components/Timeline/TimelineSlider.js +6 -3
  257. package/dist/components/Timeline/TimelineSliderHandle.js +1 -1
  258. package/dist/components/Timeline/TimelineStack/index.js +5 -2
  259. package/dist/components/Timeline/TimelineTimeIndicators.js +5 -5
  260. package/dist/components/Timeline/TimelineTracks.js +6 -4
  261. package/dist/components/Timeline/TimelineVideoInfo.js +1 -1
  262. package/dist/components/Timeline/TimelineWidthProvider.js +1 -1
  263. package/dist/components/Timeline/TimelineZoomControls.js +3 -1
  264. package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -1
  265. package/dist/components/Timeline/timeline-scroll-logic.js +12 -8
  266. package/dist/components/TimelineInOutToggle.js +11 -7
  267. package/dist/components/TopPanel.js +5 -1
  268. package/dist/components/UpdateCheck.js +2 -2
  269. package/dist/components/UpdateModal/OpenIssueButton.js +2 -2
  270. package/dist/components/UpdateModal/UpdateModal.js +8 -1
  271. package/dist/components/VisualControls/ClickableFileName.js +1 -1
  272. package/dist/components/VisualControls/VisualControlHandle.js +3 -1
  273. package/dist/components/VisualControls/VisualControlHandleHeader.js +1 -1
  274. package/dist/components/VisualControls/VisualControlsContent.js +3 -2
  275. package/dist/components/ZoomGesturesProvider.js +1 -1
  276. package/dist/components/call-api.d.ts +1 -1
  277. package/dist/components/get-zod-if-possible.d.ts +3 -3
  278. package/dist/components/get-zod-if-possible.js +9 -9
  279. package/dist/components/layout.js +4 -4
  280. package/dist/components/use-static-files.d.ts +6 -0
  281. package/dist/components/use-static-files.js +63 -0
  282. package/dist/error-overlay/react-overlay/utils/parser.d.ts +1 -1
  283. package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +1 -1
  284. package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -1
  285. package/dist/error-overlay/remotion-overlay/CodeFrame.js +6 -4
  286. package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +1 -1
  287. package/dist/error-overlay/remotion-overlay/CompositionIdsDropdown.js +8 -3
  288. package/dist/error-overlay/remotion-overlay/DismissButton.js +1 -1
  289. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +19 -4
  290. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +8 -4
  291. package/dist/error-overlay/remotion-overlay/ErrorMessage.js +2 -1
  292. package/dist/error-overlay/remotion-overlay/ErrorTitle.js +7 -1
  293. package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
  294. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
  295. package/dist/error-overlay/remotion-overlay/Overlay.js +2 -2
  296. package/dist/error-overlay/remotion-overlay/Retry.js +1 -1
  297. package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
  298. package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -1
  299. package/dist/error-overlay/remotion-overlay/StackFrame.js +6 -2
  300. package/dist/error-overlay/remotion-overlay/Symbolicating.js +3 -1
  301. package/dist/error-overlay/remotion-overlay/carets.d.ts +1 -1
  302. package/dist/error-overlay/remotion-overlay/carets.js +2 -2
  303. package/dist/error-overlay/remotion-overlay/index.js +2 -2
  304. package/dist/esm/{chunk-4153e552.js → chunk-3g77e2p9.js} +4722 -19219
  305. package/dist/esm/internals.mjs +4722 -19219
  306. package/dist/esm/previewEntry.mjs +4747 -19244
  307. package/dist/esm/renderEntry.mjs +1 -1
  308. package/dist/helpers/client-id.js +5 -2
  309. package/dist/helpers/color-math.d.ts +1 -2
  310. package/dist/helpers/create-folder-tree.d.ts +2 -2
  311. package/dist/helpers/document-title.js +2 -2
  312. package/dist/helpers/editor-ruler.d.ts +3 -3
  313. package/dist/helpers/extract-frames.d.ts +1 -1
  314. package/dist/helpers/pick-color.js +5 -1
  315. package/dist/helpers/presets-labels.d.ts +1 -2
  316. package/dist/helpers/prores-labels.d.ts +1 -2
  317. package/dist/helpers/render-modal-sections.d.ts +1 -2
  318. package/dist/helpers/retry-payload.d.ts +2 -2
  319. package/dist/helpers/timeline-layout.d.ts +1 -1
  320. package/dist/helpers/use-asset-drag-events.d.ts +1 -1
  321. package/dist/helpers/use-menu-structure.d.ts +1 -1
  322. package/dist/helpers/use-menu-structure.js +11 -11
  323. package/dist/helpers/use-studio-canvas-dimensions.d.ts +1 -1
  324. package/dist/helpers/validate-new-comp-data.d.ts +2 -3
  325. package/dist/hot-middleware-client/client.d.ts +1 -1
  326. package/dist/hot-middleware-client/process-update.d.ts +8 -2
  327. package/dist/hot-middleware-client/process-update.js +2 -1
  328. package/dist/icons/Checkmark.js +1 -1
  329. package/dist/icons/audio.js +1 -1
  330. package/dist/icons/caret.js +3 -3
  331. package/dist/icons/certificate.d.ts +1 -1
  332. package/dist/icons/certificate.js +1 -1
  333. package/dist/icons/check-circle-filled.js +1 -1
  334. package/dist/icons/clipboard.js +1 -1
  335. package/dist/icons/data.js +1 -1
  336. package/dist/icons/ellipsis.js +1 -1
  337. package/dist/icons/file.js +1 -1
  338. package/dist/icons/folder.js +3 -3
  339. package/dist/icons/frame.js +1 -1
  340. package/dist/icons/gear.js +1 -1
  341. package/dist/icons/gif.js +1 -1
  342. package/dist/icons/jump-to-start.js +1 -1
  343. package/dist/icons/keys.js +3 -3
  344. package/dist/icons/media-volume.js +2 -2
  345. package/dist/icons/minus.js +1 -1
  346. package/dist/icons/pause.js +1 -1
  347. package/dist/icons/play.js +1 -1
  348. package/dist/icons/plus.js +1 -1
  349. package/dist/icons/render.js +1 -1
  350. package/dist/icons/step-back.js +1 -1
  351. package/dist/icons/step-forward.js +1 -1
  352. package/dist/icons/still.js +1 -1
  353. package/dist/icons/timelineInOutPointer.js +2 -2
  354. package/dist/icons/video.js +1 -1
  355. package/dist/index.js +16 -16
  356. package/dist/internals.d.ts +1 -1
  357. package/dist/previewEntry.js +2 -2
  358. package/dist/renderEntry.js +10 -8
  359. package/dist/state/folders.js +1 -1
  360. package/dist/state/highest-z-index.js +1 -1
  361. package/dist/state/in-out.js +4 -3
  362. package/dist/state/keybindings.js +1 -1
  363. package/dist/state/preview-size.js +1 -1
  364. package/dist/state/sidebar.js +1 -1
  365. package/dist/state/timeline-zoom.js +1 -1
  366. package/dist/state/z-index.js +2 -1
  367. package/dist/visual-controls/VisualControls.js +1 -1
  368. package/dist/visual-controls/get-current-edited-value.js +2 -1
  369. package/package.json +13 -12
@@ -45,7 +45,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
45
45
  return {
46
46
  label: (0, human_readable_loglevel_1.humanReadableLogLevel)(level),
47
47
  onClick: () => setLogLevel(level),
48
- leftItem: logLevel === level ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
48
+ leftItem: logLevel === level ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
49
49
  id: level,
50
50
  keyHint: null,
51
51
  quickSwitcherLabel: null,
@@ -60,7 +60,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
60
60
  {
61
61
  label: 'MP4',
62
62
  onClick: () => setContainerFormat('mp4'),
63
- leftItem: container === 'mp4' ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
63
+ leftItem: container === 'mp4' ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
64
64
  id: 'mp4',
65
65
  keyHint: null,
66
66
  quickSwitcherLabel: null,
@@ -71,7 +71,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
71
71
  {
72
72
  label: 'WebM',
73
73
  onClick: () => setContainerFormat('webm'),
74
- leftItem: container === 'webm' ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
74
+ leftItem: container === 'webm' ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
75
75
  id: 'webm',
76
76
  keyHint: null,
77
77
  quickSwitcherLabel: null,
@@ -92,7 +92,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
92
92
  return encodableVideoCodecs.map((c) => ({
93
93
  label: codecLabels[c],
94
94
  onClick: () => setCodec(c),
95
- leftItem: effectiveVideoCodec === c ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
95
+ leftItem: effectiveVideoCodec === c ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
96
96
  id: c,
97
97
  keyHint: null,
98
98
  quickSwitcherLabel: null,
@@ -101,6 +101,24 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
101
101
  value: c,
102
102
  }));
103
103
  }, [encodableVideoCodecs, effectiveVideoCodec, setCodec, codecLabels]);
104
- return ((0, jsx_runtime_1.jsxs)("div", { style: tabContainer, children: [renderMode === 'still' ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Format" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })] }), resolvedComposition.durationInFrames > 1 ? ((0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Frame" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(RemInput_1.RightAlignInput, { children: (0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })] })) : null] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_2.label, children: "Container" }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: containerOptions, selectedId: container, title: "Container" }) })] }), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Codec", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "videoCodecOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: codecOptions, selectedId: effectiveVideoCodec, title: "Codec" }) })] }), (0, jsx_runtime_1.jsx)(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, startFrame: startFrame !== null && startFrame !== void 0 ? startFrame : 0, endFrame: endFrame !== null && endFrame !== void 0 ? endFrame : resolvedComposition.durationInFrames - 1, setStartFrame: setStartFrame, setEndFrame: setEndFrame })] })), (0, jsx_runtime_1.jsx)(RenderModalOutputName_1.RenderModalOutputName, { existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: "Download name" }), (0, jsx_runtime_1.jsxs)("div", { style: layout_2.optionRow, children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_2.label, children: ["Log Level ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.5 }), (0, jsx_runtime_1.jsx)(OptionExplainerBubble_1.OptionExplainerBubble, { id: "logLevelOption" })] }), (0, jsx_runtime_1.jsx)("div", { style: layout_2.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })] })] }));
104
+ return (jsx_runtime_1.jsxs("div", { style: tabContainer, children: [renderMode === 'still' ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
105
+ jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
106
+ jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Format" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: imageFormatOptions, needsWrapping: true }) })
107
+ ] }), resolvedComposition.durationInFrames > 1 ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
108
+ jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Frame" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })
109
+ ] })) : null] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
110
+ jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
111
+ jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Container" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: containerOptions, selectedId: container, title: "Container" }) })
112
+ ] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
113
+ jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Codec",
114
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "videoCodecOption" })
115
+ ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codecOptions, selectedId: effectiveVideoCodec, title: "Codec" }) })
116
+ ] }), jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, startFrame: startFrame !== null && startFrame !== void 0 ? startFrame : 0, endFrame: endFrame !== null && endFrame !== void 0 ? endFrame : resolvedComposition.durationInFrames - 1, setStartFrame: setStartFrame, setEndFrame: setEndFrame })
117
+ ] })), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: window.remotion_isReadOnlyStudio ? 'Download name' : 'Output name' }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
118
+ jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Log Level ",
119
+ jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "logLevelOption" })
120
+ ] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })
121
+ ] })
122
+ ] }));
105
123
  };
106
124
  exports.WebRenderModalBasic = WebRenderModalBasic;
@@ -160,8 +160,30 @@ const WebRenderModalLicense = ({ licenseKey, setLicenseKey, initialPublicLicense
160
160
  const onLicenseKeyChange = (0, react_1.useCallback)((e) => {
161
161
  setLicenseKey(e.target.value);
162
162
  }, [setLicenseKey]);
163
- return ((0, jsx_runtime_1.jsxs)("div", { style: tabContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: descriptionStyle, children: ["Remotion is free if you are an individual or company with a headcount of 3 or less. See", ' ', (0, jsx_runtime_1.jsx)("a", { style: descriptionLink, href: "https://remotion.dev/license", children: "LICENSE.md" }), "."] }), (0, jsx_runtime_1.jsx)("div", { style: exports.row, children: (0, jsx_runtime_1.jsxs)("div", { style: justifyCenter, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: licenseKey === 'free-license', onChange: onFreeLicenseChange, name: "free-license", rounded: true }), (0, jsx_runtime_1.jsxs)("div", { style: checkboxLabel, onClick: onFreeLicenseChange, children: ["I am eligible for the Free License, ", "don't", " print a warning"] })] }) }), licenseKey === 'free-license' ? ((0, jsx_runtime_1.jsxs)("div", { style: paddedDescriptionStyle, children: ["Enjoy Remotion! Add the following to", ' ', (0, jsx_runtime_1.jsx)("code", { style: codeStyle, children: "remotion.config.ts" }), " to persist this setting:", (0, jsx_runtime_1.jsx)("div", { style: codeLine, children: "Config.setPublicLicenseKey('free-license');" })] })) : null, (0, jsx_runtime_1.jsx)("div", { style: exports.row, children: (0, jsx_runtime_1.jsxs)("div", { style: justifyCenter, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: licenseKey !== 'free-license' && licenseKey !== null, onChange: onCompanyLicenseChange, name: "company-license", rounded: true }), (0, jsx_runtime_1.jsx)("div", { style: checkboxLabel, onClick: onCompanyLicenseChange, children: "I have a Company License" })] }) }), licenseKey !== 'free-license' && licenseKey !== null ? ((0, jsx_runtime_1.jsxs)("div", { style: paddedDescriptionStyle, children: ["Add your public license key from", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.pro/dashboard", target: "_blank", style: descriptionLink, children: "remotion.pro" }), ' ', "below.", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: licenseKey, onChange: onLicenseKeyChange, placeholder: "remotion.pro public license key (starts with rm_pub_)", status: licenseValidation.valid || licenseKey.length === 0
163
+ return (jsx_runtime_1.jsxs("div", { style: tabContainer, children: [
164
+ jsx_runtime_1.jsxs("div", { style: descriptionStyle, children: ["Remotion is free if you are an individual or company with a headcount of 3 or less. See", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.dev/license", children: "LICENSE.md" }),
165
+ "."] }), jsx_runtime_1.jsx("div", { style: exports.row, children: jsx_runtime_1.jsxs("div", { style: justifyCenter, children: [
166
+ jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseKey === 'free-license', onChange: onFreeLicenseChange, name: "free-license", rounded: true }), jsx_runtime_1.jsxs("div", { style: checkboxLabel, onClick: onFreeLicenseChange, children: ["I am eligible for the Free License, ", "don't", " print a warning"] })
167
+ ] }) }), licenseKey === 'free-license' ? (jsx_runtime_1.jsxs("div", { style: paddedDescriptionStyle, children: ["Enjoy Remotion! Add the following to", ' ', jsx_runtime_1.jsx("code", { style: codeStyle, children: "remotion.config.ts" }),
168
+ " to persist this setting:",
169
+ jsx_runtime_1.jsx("div", { style: codeLine, children: "Config.setPublicLicenseKey('free-license');" })
170
+ ] })) : null, jsx_runtime_1.jsx("div", { style: exports.row, children: jsx_runtime_1.jsxs("div", { style: justifyCenter, children: [
171
+ jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: licenseKey !== 'free-license' && licenseKey !== null, onChange: onCompanyLicenseChange, name: "company-license", rounded: true }), jsx_runtime_1.jsx("div", { style: checkboxLabel, onClick: onCompanyLicenseChange, children: "I have a Company License" })
172
+ ] }) }), licenseKey !== 'free-license' && licenseKey !== null ? (jsx_runtime_1.jsxs("div", { style: paddedDescriptionStyle, children: ["Add your public license key from", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.pro/dashboard", target: "_blank", style: descriptionLink, children: "remotion.pro" }), ' ', "below.",
173
+ jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { value: licenseKey, onChange: onLicenseKeyChange, placeholder: "remotion.pro public license key (starts with rm_pub_)", status: licenseValidation.valid || licenseKey.length === 0
164
174
  ? 'ok'
165
- : 'error', rightAlign: false, style: inputStyle, autoFocus: true }), licenseValidation.message ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: licenseValidation.message, align: "flex-start", type: "error" })] })) : null, licenseValidation.valid && licenseKey.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), "Add the following to", ' ', (0, jsx_runtime_1.jsx)("code", { style: codeStyle, children: "remotion.config.ts" }), " to persist this setting:", (0, jsx_runtime_1.jsx)("div", { style: codeLineSmall, children: "Config.setPublicLicenseKey('" + licenseKey + "');" })] })) : null, isLoading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), "Loading license key details..."] })), licenseValidation.details && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(WebRenderModalLicenseKeyDetails_1.WebRenderModalLicenseKeyDetails, { details: licenseValidation.details })] }))] })) : null, licenseKey === null ? ((0, jsx_runtime_1.jsxs)("div", { style: descriptionStyle, children: ["If you are not eligible for the free license, you need to obtain a", ' ', (0, jsx_runtime_1.jsx)("a", { style: descriptionLink, target: "_blank", href: "https://remotion.pro/license", children: "Company License" }), "."] })) : null] }));
175
+ : 'error', rightAlign: false, style: inputStyle, autoFocus: true }), licenseValidation.message ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
176
+ jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: licenseValidation.message, align: "flex-start", type: "error" })
177
+ ] })) : null, licenseValidation.valid && licenseKey.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
178
+ jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }),
179
+ "Add the following to", ' ', jsx_runtime_1.jsx("code", { style: codeStyle, children: "remotion.config.ts" }),
180
+ " to persist this setting:",
181
+ jsx_runtime_1.jsx("div", { style: codeLineSmall, children: "Config.setPublicLicenseKey('" + licenseKey + "');" })
182
+ ] })) : null, isLoading && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
183
+ jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }),
184
+ "Loading license key details..."] })), licenseValidation.details && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
185
+ jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(WebRenderModalLicenseKeyDetails_1.WebRenderModalLicenseKeyDetails, { details: licenseValidation.details })
186
+ ] }))] })) : null, licenseKey === null ? (jsx_runtime_1.jsxs("div", { style: descriptionStyle, children: ["If you are not eligible for the free license, you need to obtain a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, target: "_blank", href: "https://remotion.pro/license", children: "Company License" }),
187
+ "."] })) : null] }));
166
188
  };
167
189
  exports.WebRenderModalLicense = WebRenderModalLicense;
@@ -44,6 +44,17 @@ const fetchLicenseKeyDetails = async (licenseKey) => {
44
44
  };
45
45
  exports.fetchLicenseKeyDetails = fetchLicenseKeyDetails;
46
46
  const WebRenderModalLicenseKeyDetails = ({ details }) => {
47
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: bulletStyle, children: [(0, jsx_runtime_1.jsx)(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), (0, jsx_runtime_1.jsxs)("div", { style: textStyle, children: ["Belongs to\u00A0", (0, jsx_runtime_1.jsx)("a", { href: `${PRO_HOST}/projects/${details.projectSlug}`, target: "_blank", style: linkStyle, children: details.projectName }), "\u00A0-\u00A0", (0, jsx_runtime_1.jsx)("a", { href: `${PRO_HOST}/projects/${details.projectSlug}/usage#client-renders-usage`, target: "_blank", style: linkStyle, children: "View usage" })] })] }), details.hasActiveSubscription ? ((0, jsx_runtime_1.jsxs)("div", { style: bulletStyle, children: [(0, jsx_runtime_1.jsx)(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), (0, jsx_runtime_1.jsx)("div", { style: textStyle, children: "Active Company License" })] })) : ((0, jsx_runtime_1.jsxs)("div", { style: bulletStyle, children: [(0, jsx_runtime_1.jsx)(ValidationMessage_1.WarningTriangle, { type: "warning", style: { ...icon, fill: colors_1.WARNING_COLOR } }), (0, jsx_runtime_1.jsx)("div", { style: textStyle, children: "No active Company License" })] }))] }));
47
+ return (jsx_runtime_1.jsxs("div", { children: [
48
+ jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
49
+ jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), jsx_runtime_1.jsxs("div", { style: textStyle, children: ["Belongs to\u00A0",
50
+ jsx_runtime_1.jsx("a", { href: `${PRO_HOST}/projects/${details.projectSlug}`, target: "_blank", style: linkStyle, children: details.projectName }),
51
+ "\u00A0-\u00A0",
52
+ jsx_runtime_1.jsx("a", { href: `${PRO_HOST}/projects/${details.projectSlug}/usage#client-renders-usage`, target: "_blank", style: linkStyle, children: "View usage" })
53
+ ] })
54
+ ] }), details.hasActiveSubscription ? (jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
55
+ jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { style: { ...icon, fill: colors_1.LIGHT_TEXT } }), jsx_runtime_1.jsx("div", { style: textStyle, children: "Active Company License" })
56
+ ] })) : (jsx_runtime_1.jsxs("div", { style: bulletStyle, children: [
57
+ jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { type: "warning", style: { ...icon, fill: colors_1.WARNING_COLOR } }), jsx_runtime_1.jsx("div", { style: textStyle, children: "No active Company License" })
58
+ ] }))] }));
48
59
  };
49
60
  exports.WebRenderModalLicenseKeyDetails = WebRenderModalLicenseKeyDetails;
@@ -17,6 +17,13 @@ const WebRenderModalPicture = ({ renderMode, videoBitrate, setVideoBitrate, keyf
17
17
  const onTransparentChanged = (0, react_1.useCallback)((e) => {
18
18
  setTransparent(e.target.checked);
19
19
  }, [setTransparent]);
20
- return ((0, jsx_runtime_1.jsxs)("div", { style: tabContainer, children: [(0, jsx_runtime_1.jsx)(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale, compositionWidth: compositionWidth, compositionHeight: compositionHeight }), renderMode !== 'video' ? null : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Quality" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { values: qualityOptions, selectedId: videoBitrate, title: "Quality" }) })] }), (0, jsx_runtime_1.jsx)(NumberSetting_1.NumberSetting, { name: "Keyframe Interval", formatter: (v) => `${v}s`, min: 1, max: 300, step: 1, value: keyframeIntervalInSeconds, onValueChanged: setKeyframeIntervalInSeconds }), (0, jsx_runtime_1.jsxs)("div", { style: layout_1.optionRow, children: [(0, jsx_runtime_1.jsx)("div", { style: layout_1.label, children: "Transparent" }), (0, jsx_runtime_1.jsx)("div", { style: layout_1.rightRow, children: (0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: transparent, onChange: onTransparentChanged, name: "transparent" }) })] })] }))] }));
20
+ return (jsx_runtime_1.jsxs("div", { style: tabContainer, children: [
21
+ jsx_runtime_1.jsx(ScaleSetting_1.ScaleSetting, { scale: scale, setScale: setScale, compositionWidth: compositionWidth, compositionHeight: compositionHeight }), renderMode !== 'video' ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
22
+ jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
23
+ jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Quality" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: qualityOptions, selectedId: videoBitrate, title: "Quality" }) })
24
+ ] }), jsx_runtime_1.jsx(NumberSetting_1.NumberSetting, { name: "Keyframe Interval", formatter: (v) => `${v}s`, min: 1, max: 300, step: 1, value: keyframeIntervalInSeconds, onValueChanged: setKeyframeIntervalInSeconds }), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
25
+ jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Transparent" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: transparent, onChange: onTransparentChanged, name: "transparent" }) })
26
+ ] })
27
+ ] }))] }));
21
28
  };
22
29
  exports.WebRenderModalPicture = WebRenderModalPicture;
@@ -28,6 +28,8 @@ const link = {
28
28
  fontSize: 14,
29
29
  };
30
30
  const WebRendererExperimentalBadge = () => {
31
- return ((0, jsx_runtime_1.jsxs)("div", { style: row, children: [(0, jsx_runtime_1.jsx)(ValidationMessage_1.WarningTriangle, { type: "warning", style: icon }), (0, jsx_runtime_1.jsxs)("div", { style: text, children: ["The Remotion Web Renderer is experimental.", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/remotion-dev/remotion/issues/5913", target: "_blank", rel: "noopener noreferrer", style: link, children: "Track progress on GitHub" }), ' ', "and discuss in the", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/discord", target: "_blank", rel: "noopener noreferrer", style: link, children: "#web-renderer" }), ' ', "channel on Discord."] })] }));
31
+ return (jsx_runtime_1.jsxs("div", { style: row, children: [
32
+ jsx_runtime_1.jsx(ValidationMessage_1.WarningTriangle, { type: "warning", style: icon }), jsx_runtime_1.jsxs("div", { style: text, children: ["The Remotion Web Renderer is experimental.", ' ', jsx_runtime_1.jsx("a", { href: "https://github.com/remotion-dev/remotion/issues/5913", target: "_blank", rel: "noopener noreferrer", style: link, children: "Track progress on GitHub" }), ' ', "and discuss in the", ' ', jsx_runtime_1.jsx("a", { href: "https://remotion.dev/discord", target: "_blank", rel: "noopener noreferrer", style: link, children: "#web-renderer" }), ' ', "channel on Discord."] })
33
+ ] }));
32
34
  };
33
35
  exports.WebRendererExperimentalBadge = WebRendererExperimentalBadge;
@@ -1,14 +1,13 @@
1
- import type { AudioCodec, Codec } from '@remotion/renderer';
2
1
  import type { RenderType } from './RenderModalAdvanced';
3
2
  export declare const getDefaultCodecs: ({ defaultConfigurationVideoCodec, compositionDefaultVideoCodec, renderType, defaultConfigurationAudioCodec, }: {
4
- defaultConfigurationVideoCodec: Codec | null;
5
- defaultConfigurationAudioCodec: AudioCodec | null;
6
- compositionDefaultVideoCodec: Codec | null;
3
+ defaultConfigurationVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
4
+ defaultConfigurationAudioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null;
5
+ compositionDefaultVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav" | null;
7
6
  renderType: RenderType;
8
7
  }) => {
9
- initialAudioCodec: AudioCodec | null;
10
- initialVideoCodec: Codec;
8
+ initialAudioCodec: "aac" | "mp3" | "opus" | "pcm-16" | null;
9
+ initialVideoCodec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
11
10
  initialRenderType: RenderType;
12
- initialVideoCodecForAudioTab: Codec;
13
- initialVideoCodecForVideoTab: Codec;
11
+ initialVideoCodecForAudioTab: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
12
+ initialVideoCodecForVideoTab: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
14
13
  };
@@ -1,2 +1 @@
1
- import type { AudioCodec } from '@remotion/renderer';
2
- export declare const humanReadableAudioCodec: (audioCodec: AudioCodec) => "AAC" | "MP3" | "Lossless" | "Opus" | undefined;
1
+ export declare const humanReadableAudioCodec: (audioCodec: "aac" | "mp3" | "opus" | "pcm-16") => "AAC" | "Lossless" | "MP3" | "Opus" | undefined;
@@ -1,2 +1 @@
1
- import type { Codec } from '@remotion/renderer';
2
- export declare const humanReadableCodec: (codec: Codec) => "AAC" | "MP3" | "GIF" | "H.264" | "H.264 (Matroska)" | "H.264 (Transport Stream)" | "H.265" | "ProRes" | "VP8" | "VP9" | "Waveform";
1
+ export declare const humanReadableCodec: (codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav") => "AAC" | "GIF" | "H.264" | "H.264 (Matroska)" | "H.264 (Transport Stream)" | "H.265" | "MP3" | "ProRes" | "VP8" | "VP9" | "Waveform";
@@ -1,2 +1 @@
1
- import type { LogLevel } from 'remotion';
2
- export declare const humanReadableLogLevel: (logLevel: LogLevel) => "Trace" | "Verbose" | "Info" | "Warn" | "Error";
1
+ export declare const humanReadableLogLevel: (logLevel: "error" | "info" | "trace" | "verbose" | "warn") => "Error" | "Info" | "Trace" | "Verbose" | "Warn";
@@ -1,11 +1,10 @@
1
- import type { AudioCodec, Codec, StillImageFormat } from '@remotion/renderer';
2
1
  import type { RenderType } from './RenderModalAdvanced';
3
2
  export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMode, stillImageFormat, separateAudioTo, }: {
4
3
  outName: string;
5
- codec: Codec;
6
- audioCodec: AudioCodec;
4
+ codec: "aac" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav";
5
+ audioCodec: "aac" | "mp3" | "opus" | "pcm-16";
7
6
  renderMode: RenderType;
8
- stillImageFormat: StillImageFormat | null;
7
+ stillImageFormat: "jpeg" | "pdf" | "png" | "webp" | null;
9
8
  separateAudioTo: string | null;
10
9
  }) => {
11
10
  valid: true;
@@ -15,5 +14,5 @@ export declare const validateOutnameGui: ({ outName, codec, audioCodec, renderMo
15
14
  };
16
15
  export declare const isValidSeparateAudioName: ({ audioCodec, separateAudioTo, }: {
17
16
  separateAudioTo: string;
18
- audioCodec: AudioCodec;
17
+ audioCodec: "aac" | "mp3" | "opus" | "pcm-16";
19
18
  }) => void;
@@ -14,7 +14,7 @@ const getQualityOptions = (selectedQuality, setQuality) => {
14
14
  return QUALITY_OPTIONS.map(({ value, label }) => ({
15
15
  label,
16
16
  onClick: () => setQuality(value),
17
- leftItem: selectedQuality === value ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
17
+ leftItem: selectedQuality === value ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
18
18
  id: value,
19
19
  keyHint: null,
20
20
  quickSwitcherLabel: null,
@@ -59,14 +59,14 @@ const RenderPreview = ({ path, assetMetadata, getBlob }) => {
59
59
  }, [getBlob]);
60
60
  const src = blobUrl !== null && blobUrl !== void 0 ? blobUrl : get_asset_metadata_1.remotion_outputsBase + path;
61
61
  if (connectionStatus === 'disconnected') {
62
- return (0, jsx_runtime_1.jsx)("div", { style: errMsgStyle, children: "Studio server disconnected" });
62
+ return jsx_runtime_1.jsx("div", { style: errMsgStyle, children: "Studio server disconnected" });
63
63
  }
64
64
  if (getBlob && blobError) {
65
- return ((0, jsx_runtime_1.jsxs)("div", { style: errMsgStyle, children: ["Failed to load preview: ", blobError.message] }));
65
+ return (jsx_runtime_1.jsxs("div", { style: errMsgStyle, children: ["Failed to load preview: ", blobError.message] }));
66
66
  }
67
67
  if (getBlob && !blobUrl) {
68
- return (0, jsx_runtime_1.jsx)("div", { style: msgStyle, children: "Loading preview..." });
68
+ return jsx_runtime_1.jsx("div", { style: msgStyle, children: "Loading preview..." });
69
69
  }
70
- return ((0, jsx_runtime_1.jsx)(FilePreview_1.FilePreview, { assetMetadata: assetMetadata, currentAsset: path, fileType: fileType, src: src }));
70
+ return (jsx_runtime_1.jsx(FilePreview_1.FilePreview, { assetMetadata: assetMetadata, currentAsset: path, fileType: fileType, src: src }));
71
71
  };
72
72
  exports.RenderPreview = RenderPreview;
@@ -13,6 +13,6 @@ const container = {
13
13
  const CircularProgress = ({ progress }) => {
14
14
  const r = exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH;
15
15
  const circumference = r * Math.PI * 2;
16
- return ((0, jsx_runtime_1.jsx)("svg", { style: container, viewBox: `0 0 ${exports.RENDER_STATUS_INDICATOR_SIZE} ${exports.RENDER_STATUS_INDICATOR_SIZE}`, children: (0, jsx_runtime_1.jsx)("circle", { r: exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH, stroke: colors_1.LIGHT_TEXT, fill: "none", strokeWidth: STROKE_WIDTH, cx: exports.RENDER_STATUS_INDICATOR_SIZE / 2, cy: exports.RENDER_STATUS_INDICATOR_SIZE / 2, strokeDasharray: `${circumference} ${circumference}`, strokeMiterlimit: 0, strokeDashoffset: (1 - progress) * circumference }) }));
16
+ return (jsx_runtime_1.jsx("svg", { style: container, viewBox: `0 0 ${exports.RENDER_STATUS_INDICATOR_SIZE} ${exports.RENDER_STATUS_INDICATOR_SIZE}`, children: jsx_runtime_1.jsx("circle", { r: exports.RENDER_STATUS_INDICATOR_SIZE / 2 - STROKE_WIDTH, stroke: colors_1.LIGHT_TEXT, fill: "none", strokeWidth: STROKE_WIDTH, cx: exports.RENDER_STATUS_INDICATOR_SIZE / 2, cy: exports.RENDER_STATUS_INDICATOR_SIZE / 2, strokeDasharray: `${circumference} ${circumference}`, strokeMiterlimit: 0, strokeDashoffset: (1 - progress) * circumference }) }));
17
17
  };
18
18
  exports.CircularProgress = CircularProgress;
@@ -1 +1,2 @@
1
+ export declare const downloadBlob: (blob: Blob, filename: string) => void;
1
2
  export declare const ClientRenderQueueProcessor: React.FC;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ClientRenderQueueProcessor = void 0;
3
+ exports.ClientRenderQueueProcessor = exports.downloadBlob = void 0;
4
4
  const web_renderer_1 = require("@remotion/web-renderer");
5
5
  const react_1 = require("react");
6
+ const save_render_output_1 = require("../../api/save-render-output");
6
7
  const context_1 = require("./context");
7
8
  const downloadBlob = (blob, filename) => {
8
9
  const url = URL.createObjectURL(blob);
@@ -15,8 +16,9 @@ const downloadBlob = (blob, filename) => {
15
16
  a.click();
16
17
  URL.revokeObjectURL(url);
17
18
  };
19
+ exports.downloadBlob = downloadBlob;
18
20
  const ClientRenderQueueProcessor = () => {
19
- const { getAbortController, getCompositionForJob, updateClientJobProgress, markClientJobDone, markClientJobFailed, markClientJobCancelled, setProcessJobCallback, } = (0, react_1.useContext)(context_1.RenderQueueContext);
21
+ const { getAbortController, getCompositionForJob, updateClientJobProgress, markClientJobSaving, markClientJobDone, markClientJobFailed, markClientJobCancelled, setProcessJobCallback, } = (0, react_1.useContext)(context_1.RenderQueueContext);
20
22
  const processStillJob = (0, react_1.useCallback)(async (job, signal) => {
21
23
  var _a, _b;
22
24
  const compositionRef = getCompositionForJob(job.id);
@@ -86,7 +88,6 @@ const ClientRenderQueueProcessor = () => {
86
88
  signal,
87
89
  onProgress: (progress) => {
88
90
  onProgress(job.id, {
89
- renderedFrames: progress.renderedFrames,
90
91
  encodedFrames: progress.encodedFrames,
91
92
  totalFrames,
92
93
  });
@@ -114,13 +115,40 @@ const ClientRenderQueueProcessor = () => {
114
115
  throw new Error(`Unknown job type`);
115
116
  }
116
117
  const blob = await result.getBlob();
117
- downloadBlob(blob, job.outName);
118
118
  const metadata = {
119
119
  width: result.width,
120
120
  height: result.height,
121
121
  sizeInBytes: blob.size,
122
122
  };
123
- markClientJobDone(job.id, result.getBlob, metadata);
123
+ markClientJobSaving(job.id);
124
+ const getBlob = () => Promise.resolve(blob);
125
+ const downloadAndFinish = () => {
126
+ (0, exports.downloadBlob)(blob, job.outName);
127
+ markClientJobDone(job.id, metadata, getBlob);
128
+ };
129
+ if (window.remotion_isReadOnlyStudio) {
130
+ downloadAndFinish();
131
+ }
132
+ else {
133
+ try {
134
+ await (0, save_render_output_1.saveOutputFile)({ blob, filePath: job.outName });
135
+ await (0, save_render_output_1.registerClientRender)({
136
+ id: job.id,
137
+ type: job.type,
138
+ compositionId: job.compositionId,
139
+ outName: job.outName,
140
+ startedAt: job.startedAt,
141
+ deletedOutputLocation: false,
142
+ metadata,
143
+ });
144
+ markClientJobDone(job.id, metadata);
145
+ }
146
+ catch (err) {
147
+ // eslint-disable-next-line no-console
148
+ console.error('Failed to save render output, falling back to browser download.', err);
149
+ downloadAndFinish();
150
+ }
151
+ }
124
152
  }
125
153
  catch (err) {
126
154
  if (abortController.signal.aborted) {
@@ -135,6 +163,7 @@ const ClientRenderQueueProcessor = () => {
135
163
  processStillJob,
136
164
  processVideoJob,
137
165
  updateClientJobProgress,
166
+ markClientJobSaving,
138
167
  markClientJobDone,
139
168
  markClientJobFailed,
140
169
  markClientJobCancelled,
@@ -10,6 +10,6 @@ const cancelledStyle = {
10
10
  cursor: 'default',
11
11
  };
12
12
  const RenderQueueCancelledMessage = () => {
13
- return (0, jsx_runtime_1.jsx)("span", { style: cancelledStyle, children: "Cancelled" });
13
+ return jsx_runtime_1.jsx("span", { style: cancelledStyle, children: "Cancelled" });
14
14
  };
15
15
  exports.RenderQueueCancelledMessage = RenderQueueCancelledMessage;
@@ -29,7 +29,7 @@ const supportsCopyingToClipboard = (job) => {
29
29
  exports.supportsCopyingToClipboard = supportsCopyingToClipboard;
30
30
  const RenderQueueCopyToClipboard = ({ job }) => {
31
31
  const renderCopyAction = (0, react_1.useCallback)((color) => {
32
- return (0, jsx_runtime_1.jsx)(clipboard_1.ClipboardIcon, { style: revealIconStyle, color: color });
32
+ return jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { style: revealIconStyle, color: color });
33
33
  }, []);
34
34
  const onClick = (0, react_1.useCallback)(async (e) => {
35
35
  e.stopPropagation();
@@ -52,6 +52,6 @@ const RenderQueueCopyToClipboard = ({ job }) => {
52
52
  (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 2000);
53
53
  }
54
54
  }, [job.outName]);
55
- return ((0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { title: "Copy to clipboard", renderAction: renderCopyAction, onClick: onClick }));
55
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: "Copy to clipboard", renderAction: renderCopyAction, onClick: onClick }));
56
56
  };
57
57
  exports.RenderQueueCopyToClipboard = RenderQueueCopyToClipboard;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { ClientRenderJob } from './client-side-render-types';
3
+ export declare const RenderQueueDownloadItem: React.FC<{
4
+ readonly job: ClientRenderJob;
5
+ }>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RenderQueueDownloadItem = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const InlineAction_1 = require("../InlineAction");
7
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
8
+ const ClientRenderQueueProcessor_1 = require("./ClientRenderQueueProcessor");
9
+ const RenderQueueDownloadItem = ({ job }) => {
10
+ const onClick = (0, react_1.useCallback)((e) => {
11
+ e.stopPropagation();
12
+ if (job.status !== 'done' || !job.getBlob) {
13
+ return;
14
+ }
15
+ job
16
+ .getBlob()
17
+ .then((blob) => {
18
+ (0, ClientRenderQueueProcessor_1.downloadBlob)(blob, job.outName);
19
+ })
20
+ .catch((err) => {
21
+ (0, NotificationCenter_1.showNotification)(`Could not download file: ${err.message}`, 2000);
22
+ });
23
+ }, [job]);
24
+ const icon = (0, react_1.useMemo)(() => {
25
+ return {
26
+ height: 12,
27
+ color: 'currentColor',
28
+ };
29
+ }, []);
30
+ const renderAction = (0, react_1.useCallback)((color) => {
31
+ return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" }) }));
32
+ }, [icon]);
33
+ return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, title: "Download" }));
34
+ };
35
+ exports.RenderQueueDownloadItem = RenderQueueDownloadItem;
@@ -21,6 +21,6 @@ const RenderQueueError = ({ job }) => {
21
21
  if (job.status !== 'failed') {
22
22
  throw new Error('should not have rendered this component');
23
23
  }
24
- return ((0, jsx_runtime_1.jsx)("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.error.message, children: job.error.message }));
24
+ return (jsx_runtime_1.jsx("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, title: job.error.message, children: job.error.message }));
25
25
  };
26
26
  exports.RenderQueueError = RenderQueueError;
@@ -7,9 +7,11 @@ const remotion_1 = require("remotion");
7
7
  const colors_1 = require("../../helpers/colors");
8
8
  const url_state_1 = require("../../helpers/url-state");
9
9
  const layout_1 = require("../layout");
10
+ const client_side_render_types_1 = require("./client-side-render-types");
10
11
  const context_1 = require("./context");
11
12
  const RenderQueueCancelledMessage_1 = require("./RenderQueueCancelledMessage");
12
13
  const RenderQueueCopyToClipboard_1 = require("./RenderQueueCopyToClipboard");
14
+ const RenderQueueDownloadItem_1 = require("./RenderQueueDownloadItem");
13
15
  const RenderQueueError_1 = require("./RenderQueueError");
14
16
  const RenderQueueItemCancelButton_1 = require("./RenderQueueItemCancelButton");
15
17
  const RenderQueueItemStatus_1 = require("./RenderQueueItemStatus");
@@ -18,6 +20,7 @@ const RenderQueueOutputName_1 = require("./RenderQueueOutputName");
18
20
  const RenderQueueProgressMessage_1 = require("./RenderQueueProgressMessage");
19
21
  const RenderQueueRemoveItem_1 = require("./RenderQueueRemoveItem");
20
22
  const RenderQueueRepeat_1 = require("./RenderQueueRepeat");
23
+ const RenderQueueSavingMessage_1 = require("./RenderQueueSavingMessage");
21
24
  const container = {
22
25
  padding: 12,
23
26
  display: 'flex',
@@ -69,24 +72,41 @@ const RenderQueueItem = ({ job, selected }) => {
69
72
  (_a = document
70
73
  .querySelector(`.${SELECTED_CLASSNAME}`)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({ behavior: 'smooth' });
71
74
  }, []);
75
+ const clientBlobInfo = (0, react_1.useMemo)(() => {
76
+ if (!isClientJob || job.status !== 'done' || !job.getBlob) {
77
+ return null;
78
+ }
79
+ return {
80
+ getBlob: job.getBlob,
81
+ width: job.metadata.width,
82
+ height: job.metadata.height,
83
+ sizeInBytes: job.metadata.sizeInBytes,
84
+ };
85
+ }, [isClientJob, job]);
72
86
  const onClick = (0, react_1.useCallback)(() => {
73
87
  if (job.status !== 'done') {
74
88
  return;
75
89
  }
76
- if (isClientJob) {
77
- const clientJob = job;
78
- setCanvasContent({
79
- type: 'output-blob',
80
- displayName: job.outName,
81
- getBlob: clientJob.getBlob,
82
- width: clientJob.metadata.width,
83
- height: clientJob.metadata.height,
84
- sizeInBytes: clientJob.metadata.sizeInBytes,
85
- });
90
+ // Cannot show folders
91
+ if (!isClientJob && job.type === 'sequence') {
86
92
  return;
87
93
  }
88
- // Cannot show folders
89
- if (job.type === 'sequence') {
94
+ if (clientBlobInfo) {
95
+ setCanvasContent((c) => {
96
+ const isAlreadySelected = c && c.type === 'output-blob' && c.displayName === job.outName;
97
+ if (isAlreadySelected && !selected) {
98
+ scrollCurrentIntoView();
99
+ return c;
100
+ }
101
+ return {
102
+ type: 'output-blob',
103
+ displayName: job.outName,
104
+ getBlob: clientBlobInfo.getBlob,
105
+ width: clientBlobInfo.width,
106
+ height: clientBlobInfo.height,
107
+ sizeInBytes: clientBlobInfo.sizeInBytes,
108
+ };
109
+ });
90
110
  return;
91
111
  }
92
112
  setCanvasContent((c) => {
@@ -98,14 +118,29 @@ const RenderQueueItem = ({ job, selected }) => {
98
118
  return { type: 'output', path: `/${job.outName}` };
99
119
  });
100
120
  (0, url_state_1.pushUrl)(`/outputs/${job.outName}`);
101
- }, [job, isClientJob, scrollCurrentIntoView, selected, setCanvasContent]);
121
+ }, [
122
+ job,
123
+ isClientJob,
124
+ clientBlobInfo,
125
+ scrollCurrentIntoView,
126
+ selected,
127
+ setCanvasContent,
128
+ ]);
102
129
  (0, react_1.useEffect)(() => {
103
130
  if (selected) {
104
131
  scrollCurrentIntoView();
105
132
  }
106
133
  }, [scrollCurrentIntoView, selected]);
107
- return ((0, jsx_runtime_1.jsxs)(layout_1.Row, { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, className: selected ? SELECTED_CLASSNAME : undefined, children: [(0, jsx_runtime_1.jsx)(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsxs)("div", { style: right, children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: job.compositionId }), (0, jsx_runtime_1.jsx)("div", { style: subtitle, children: job.status === 'done' ? ((0, jsx_runtime_1.jsx)(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? ((0, jsx_runtime_1.jsx)(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : job.status === 'cancelled' ? ((0, jsx_runtime_1.jsx)(RenderQueueCancelledMessage_1.RenderQueueCancelledMessage, {})) : null })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), !isClientJob && (0, RenderQueueCopyToClipboard_1.supportsCopyingToClipboard)(job) ? ((0, jsx_runtime_1.jsx)(RenderQueueCopyToClipboard_1.RenderQueueCopyToClipboard, { job: job })) : null, job.status === 'done' ||
108
- job.status === 'failed' ||
109
- job.status === 'cancelled' ? ((0, jsx_runtime_1.jsx)(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job })) : null, job.status === 'running' ? ((0, jsx_runtime_1.jsx)(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : ((0, jsx_runtime_1.jsx)(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' && !isClientJob ? ((0, jsx_runtime_1.jsx)(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job })) : null] }));
134
+ const canCopyToClipboard = job.status === 'done' &&
135
+ !isClientJob &&
136
+ (0, RenderQueueCopyToClipboard_1.supportsCopyingToClipboard)(job);
137
+ const canRepeat = (job.status === 'done' ||
138
+ job.status === 'failed' ||
139
+ job.status === 'cancelled') &&
140
+ !((0, context_1.isClientRenderJob)(job) && (0, client_side_render_types_1.isRestoredClientJob)(job));
141
+ return (jsx_runtime_1.jsxs(layout_1.Row, { onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: containerStyle, align: "center", onClick: onClick, className: selected ? SELECTED_CLASSNAME : undefined, children: [
142
+ jsx_runtime_1.jsx(RenderQueueItemStatus_1.RenderQueueItemStatus, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
143
+ jsx_runtime_1.jsx("div", { style: title, children: job.compositionId }), jsx_runtime_1.jsx("div", { style: subtitle, children: job.status === 'done' ? (jsx_runtime_1.jsx(RenderQueueOutputName_1.RenderQueueOutputName, { job: job })) : job.status === 'failed' ? (jsx_runtime_1.jsx(RenderQueueError_1.RenderQueueError, { job: job })) : job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueProgressMessage_1.RenderQueueProgressMessage, { job: job })) : job.status === 'saving' ? (jsx_runtime_1.jsx(RenderQueueSavingMessage_1.RenderQueueSavingMessage, {})) : job.status === 'cancelled' ? (jsx_runtime_1.jsx(RenderQueueCancelledMessage_1.RenderQueueCancelledMessage, {})) : null })
144
+ ] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canCopyToClipboard ? (jsx_runtime_1.jsx(RenderQueueCopyToClipboard_1.RenderQueueCopyToClipboard, { job: job })) : null, canRepeat ? jsx_runtime_1.jsx(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job }) : null, job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : (jsx_runtime_1.jsx(RenderQueueRemoveItem_1.RenderQueueRemoveItem, { job: job })), job.status === 'done' ? (clientBlobInfo ? (jsx_runtime_1.jsx(RenderQueueDownloadItem_1.RenderQueueDownloadItem, { job: job })) : (jsx_runtime_1.jsx(RenderQueueOpenInFolder_1.RenderQueueOpenInFinderItem, { job: job }))) : null] }));
110
145
  };
111
146
  exports.RenderQueueItem = RenderQueueItem;
@@ -27,8 +27,8 @@ const RenderQueueCancelButton = ({ job }) => {
27
27
  };
28
28
  }, []);
29
29
  const renderAction = (0, react_1.useCallback)((color) => {
30
- return ((0, jsx_runtime_1.jsx)("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: (0, jsx_runtime_1.jsx)("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
30
+ return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
31
31
  }, [icon]);
32
- return (0, jsx_runtime_1.jsx)(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
32
+ return jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick });
33
33
  };
34
34
  exports.RenderQueueCancelButton = RenderQueueCancelButton;