@remotion/cli 4.0.0-alpha4 → 4.0.0-alpha6

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 (489) hide show
  1. package/dist/ansi/ansi-diff.d.ts +2 -1
  2. package/dist/ansi/ansi-diff.js +14 -20
  3. package/dist/ansi/ansi-split.d.ts +1 -0
  4. package/dist/ansi/ansi-split.js +16 -3
  5. package/dist/benchmark.js +64 -23
  6. package/dist/better-opn/index.js +3 -3
  7. package/dist/cloudrun-command.d.ts +1 -0
  8. package/dist/cloudrun-command.js +27 -0
  9. package/dist/codemods/update-default-props.d.ts +5 -0
  10. package/dist/codemods/update-default-props.js +143 -0
  11. package/dist/color-math.d.ts +2 -0
  12. package/dist/color-math.js +13 -0
  13. package/dist/composition-prompts.d.ts +3 -4
  14. package/dist/composition-prompts.js +0 -1
  15. package/dist/compositions.js +10 -4
  16. package/dist/config/bitrate.d.ts +2 -2
  17. package/dist/config/bitrate.js +2 -2
  18. package/dist/config/browser.d.ts +1 -3
  19. package/dist/config/browser.js +2 -12
  20. package/dist/config/codec.d.ts +0 -4
  21. package/dist/config/codec.js +1 -21
  22. package/dist/config/image-format.d.ts +5 -3
  23. package/dist/config/image-format.js +32 -10
  24. package/dist/config/index.d.ts +255 -14
  25. package/dist/config/index.js +16 -49
  26. package/dist/config/jpeg-quality.d.ts +2 -0
  27. package/dist/config/jpeg-quality.js +17 -0
  28. package/dist/config/public-dir.d.ts +1 -1
  29. package/dist/config/scale.d.ts +2 -1
  30. package/dist/convert-entry-point-to-serve-url.d.ts +1 -0
  31. package/dist/convert-entry-point-to-serve-url.js +15 -0
  32. package/dist/determine-image-format.d.ts +5 -4
  33. package/dist/determine-image-format.js +17 -4
  34. package/dist/download-progress.d.ts +2 -2
  35. package/dist/download-progress.js +12 -3
  36. package/dist/editor/components/Canvas.js +3 -0
  37. package/dist/editor/components/Checkbox.d.ts +6 -0
  38. package/dist/editor/components/Checkbox.js +42 -0
  39. package/dist/editor/components/CheckerboardProvider.d.ts +4 -0
  40. package/dist/editor/components/CheckerboardProvider.js +24 -0
  41. package/dist/editor/components/CompositionSelector.js +2 -4
  42. package/dist/editor/components/CompositionSelectorItem.d.ts +3 -3
  43. package/dist/editor/components/CompositionSelectorItem.js +24 -6
  44. package/dist/editor/components/CurrentComposition.js +4 -19
  45. package/dist/editor/components/CurrentCompositionSideEffects.d.ts +3 -0
  46. package/dist/editor/components/CurrentCompositionSideEffects.js +51 -0
  47. package/dist/editor/components/Editor.js +2 -11
  48. package/dist/editor/components/EditorContent.js +1 -1
  49. package/dist/editor/components/EditorContexts.js +10 -86
  50. package/dist/editor/components/GlobalKeybindings.js +4 -0
  51. package/dist/editor/components/InitialCompositionLoader.d.ts +2 -2
  52. package/dist/editor/components/InlineAction.d.ts +7 -0
  53. package/dist/editor/components/InlineAction.js +31 -0
  54. package/dist/editor/components/KeyboardShortcutsExplainer.js +5 -4
  55. package/dist/editor/components/MediaVolumeProvider.d.ts +4 -0
  56. package/dist/editor/components/MediaVolumeProvider.js +25 -0
  57. package/dist/editor/components/Menu/MenuSubItem.d.ts +0 -1
  58. package/dist/editor/components/Menu/MenuSubItem.js +15 -3
  59. package/dist/editor/components/Menu/is-menu-item.d.ts +2 -0
  60. package/dist/editor/components/Menu/is-menu-item.js +3 -1
  61. package/dist/editor/components/Menu/styles.d.ts +4 -0
  62. package/dist/editor/components/Menu/styles.js +13 -4
  63. package/dist/editor/components/MenuToolbar.js +16 -3
  64. package/dist/editor/components/ModalContainer.d.ts +2 -0
  65. package/dist/editor/components/ModalContainer.js +12 -3
  66. package/dist/editor/components/ModalHeader.js +6 -2
  67. package/dist/editor/components/Modals.d.ts +2 -0
  68. package/dist/editor/components/Modals.js +23 -0
  69. package/dist/editor/components/ModalsProvider.d.ts +4 -0
  70. package/dist/editor/components/ModalsProvider.js +17 -0
  71. package/dist/editor/components/NewComposition/CancelButton.js +3 -0
  72. package/dist/editor/components/NewComposition/ComboBox.js +23 -15
  73. package/dist/editor/components/NewComposition/InputDragger.d.ts +4 -0
  74. package/dist/editor/components/NewComposition/InputDragger.js +12 -7
  75. package/dist/editor/components/NewComposition/MenuContent.js +14 -1
  76. package/dist/editor/components/NewComposition/NewCompDuration.js +2 -2
  77. package/dist/editor/components/NewComposition/NewComposition.js +8 -5
  78. package/dist/editor/components/NewComposition/RemInput.d.ts +14 -2
  79. package/dist/editor/components/NewComposition/RemInput.js +24 -9
  80. package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +7 -0
  81. package/dist/editor/components/NewComposition/RemInputTypeColor.js +53 -0
  82. package/dist/editor/components/NewComposition/RemTextarea.d.ts +7 -0
  83. package/dist/editor/components/NewComposition/RemTextarea.js +92 -0
  84. package/dist/editor/components/NewComposition/ValidationMessage.d.ts +2 -0
  85. package/dist/editor/components/NewComposition/ValidationMessage.js +18 -8
  86. package/dist/editor/components/Notifications/NotificationCenter.d.ts +1 -0
  87. package/dist/editor/components/Notifications/NotificationCenter.js +11 -1
  88. package/dist/editor/components/Notifications/ServerDisconnected.d.ts +0 -4
  89. package/dist/editor/components/Notifications/ServerDisconnected.js +4 -14
  90. package/dist/editor/components/PlayPause.js +6 -0
  91. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +3 -0
  92. package/dist/editor/components/PlaybackRateSelector.d.ts +0 -2
  93. package/dist/editor/components/PlaybackRateSelector.js +5 -6
  94. package/dist/editor/components/PlayerEmitterContext.d.ts +4 -0
  95. package/dist/editor/components/PlayerEmitterContext.js +11 -0
  96. package/dist/editor/components/Preview.d.ts +0 -1
  97. package/dist/editor/components/Preview.js +4 -4
  98. package/dist/editor/components/PreviewToolbar.js +2 -2
  99. package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +8 -3
  100. package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +4 -2
  101. package/dist/editor/components/QuickSwitcher/algolia-search.d.ts +0 -27
  102. package/dist/editor/components/QuickSwitcher/algolia-search.js +2 -3
  103. package/dist/editor/components/RenderButton.d.ts +2 -0
  104. package/dist/editor/components/RenderButton.js +103 -0
  105. package/dist/editor/components/RenderModal/CliCopyButton.d.ts +4 -0
  106. package/dist/editor/components/RenderModal/CliCopyButton.js +55 -0
  107. package/dist/editor/components/RenderModal/CrfSetting.d.ts +15 -0
  108. package/dist/editor/components/RenderModal/CrfSetting.js +42 -0
  109. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +8 -0
  110. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +16 -0
  111. package/dist/editor/components/RenderModal/EnvInput.d.ts +11 -0
  112. package/dist/editor/components/RenderModal/EnvInput.js +74 -0
  113. package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +8 -0
  114. package/dist/editor/components/RenderModal/FrameRangeSetting.js +42 -0
  115. package/dist/editor/components/RenderModal/GuiRenderStatus.d.ts +5 -0
  116. package/dist/editor/components/RenderModal/GuiRenderStatus.js +78 -0
  117. package/dist/editor/components/RenderModal/InfoBubble.d.ts +5 -0
  118. package/dist/editor/components/RenderModal/InfoBubble.js +115 -0
  119. package/dist/editor/components/RenderModal/InfoTooltip.d.ts +5 -0
  120. package/dist/editor/components/RenderModal/InfoTooltip.js +41 -0
  121. package/dist/editor/components/RenderModal/InlineEyeIcon.d.ts +5 -0
  122. package/dist/editor/components/RenderModal/InlineEyeIcon.js +17 -0
  123. package/dist/editor/components/RenderModal/InlineRemoveButton.d.ts +4 -0
  124. package/dist/editor/components/RenderModal/InlineRemoveButton.js +17 -0
  125. package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +5 -0
  126. package/dist/editor/components/RenderModal/JpegQualitySetting.js +12 -0
  127. package/dist/editor/components/RenderModal/MutedSetting.d.ts +8 -0
  128. package/dist/editor/components/RenderModal/MutedSetting.js +16 -0
  129. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +5 -0
  130. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +26 -0
  131. package/dist/editor/components/RenderModal/NumberSetting.d.ts +12 -0
  132. package/dist/editor/components/RenderModal/NumberSetting.js +29 -0
  133. package/dist/editor/components/RenderModal/OptionExplainer.d.ts +5 -0
  134. package/dist/editor/components/RenderModal/OptionExplainer.js +55 -0
  135. package/dist/editor/components/RenderModal/RenderModal.d.ts +35 -0
  136. package/dist/editor/components/RenderModal/RenderModal.js +597 -0
  137. package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +26 -0
  138. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +61 -0
  139. package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +17 -0
  140. package/dist/editor/components/RenderModal/RenderModalAudio.js +46 -0
  141. package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +23 -0
  142. package/dist/editor/components/RenderModal/RenderModalBasic.js +79 -0
  143. package/dist/editor/components/RenderModal/RenderModalData.d.ts +20 -0
  144. package/dist/editor/components/RenderModal/RenderModalData.js +249 -0
  145. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.d.ts +5 -0
  146. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +55 -0
  147. package/dist/editor/components/RenderModal/RenderModalGif.d.ts +9 -0
  148. package/dist/editor/components/RenderModal/RenderModalGif.js +19 -0
  149. package/dist/editor/components/RenderModal/RenderModalHr.d.ts +2 -0
  150. package/dist/editor/components/RenderModal/RenderModalHr.js +18 -0
  151. package/dist/editor/components/RenderModal/RenderModalInput.d.ts +10 -0
  152. package/dist/editor/components/RenderModal/RenderModalInput.js +13 -0
  153. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.d.ts +15 -0
  154. package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +109 -0
  155. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +28 -0
  156. package/dist/editor/components/RenderModal/RenderModalPicture.js +54 -0
  157. package/dist/editor/components/RenderModal/RenderStatusModal.d.ts +4 -0
  158. package/dist/editor/components/RenderModal/RenderStatusModal.js +72 -0
  159. package/dist/editor/components/RenderModal/ScaleSetting.d.ts +5 -0
  160. package/dist/editor/components/RenderModal/ScaleSetting.js +17 -0
  161. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +13 -0
  162. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +39 -0
  163. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +2 -0
  164. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +15 -0
  165. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -0
  166. package/dist/editor/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +59 -0
  167. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +16 -0
  168. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +40 -0
  169. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.d.ts +4 -0
  170. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +17 -0
  171. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +5 -0
  172. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +17 -0
  173. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +15 -0
  174. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +84 -0
  175. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +14 -0
  176. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +28 -0
  177. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +13 -0
  178. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +27 -0
  179. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.d.ts +15 -0
  180. package/dist/editor/components/RenderModal/SchemaEditor/ZodColorEditor.js +116 -0
  181. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +15 -0
  182. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +76 -0
  183. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +15 -0
  184. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +55 -0
  185. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +15 -0
  186. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +72 -0
  187. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +5 -0
  188. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -0
  189. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +9 -0
  190. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +27 -0
  191. package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.d.ts +15 -0
  192. package/dist/editor/components/RenderModal/SchemaEditor/ZodNullableEditor.js +10 -0
  193. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +15 -0
  194. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +88 -0
  195. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +15 -0
  196. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +64 -0
  197. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.d.ts +15 -0
  198. package/dist/editor/components/RenderModal/SchemaEditor/ZodOptionalEditor.js +10 -0
  199. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.d.ts +16 -0
  200. package/dist/editor/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +52 -0
  201. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +15 -0
  202. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +48 -0
  203. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +15 -0
  204. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +84 -0
  205. package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.d.ts +15 -0
  206. package/dist/editor/components/RenderModal/SchemaEditor/ZodUnionEditor.js +49 -0
  207. package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.d.ts +2 -0
  208. package/dist/editor/components/RenderModal/SchemaEditor/create-zod-values.js +158 -0
  209. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +6 -0
  210. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +24 -0
  211. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.d.ts +2 -0
  212. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.js +15 -0
  213. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.d.ts +1 -0
  214. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.js +2 -0
  215. package/dist/editor/components/RenderModal/WarningIndicatorButton.d.ts +6 -0
  216. package/dist/editor/components/RenderModal/WarningIndicatorButton.js +49 -0
  217. package/dist/editor/components/RenderModal/get-render-modal-warnings.d.ts +15 -0
  218. package/dist/editor/components/RenderModal/get-render-modal-warnings.js +34 -0
  219. package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +2 -0
  220. package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +18 -0
  221. package/dist/editor/components/RenderModal/human-readable-codec.d.ts +2 -0
  222. package/dist/editor/components/RenderModal/human-readable-codec.js +36 -0
  223. package/dist/editor/components/RenderModal/layout.d.ts +7 -0
  224. package/dist/editor/components/RenderModal/layout.js +45 -0
  225. package/dist/editor/components/RenderModal/out-name-checker.d.ts +14 -0
  226. package/dist/editor/components/RenderModal/out-name-checker.js +80 -0
  227. package/dist/editor/components/RenderQueue/CircularProgress.d.ts +5 -0
  228. package/dist/editor/components/RenderQueue/CircularProgress.js +18 -0
  229. package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +5 -0
  230. package/dist/editor/components/RenderQueue/RenderQueueError.js +26 -0
  231. package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +5 -0
  232. package/dist/editor/components/RenderQueue/RenderQueueItem.js +40 -0
  233. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +5 -0
  234. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +26 -0
  235. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +5 -0
  236. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +43 -0
  237. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.d.ts +5 -0
  238. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +26 -0
  239. package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +5 -0
  240. package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +26 -0
  241. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +5 -0
  242. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +26 -0
  243. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +5 -0
  244. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +37 -0
  245. package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +5 -0
  246. package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +26 -0
  247. package/dist/editor/components/RenderQueue/SuccessIcon.d.ts +2 -0
  248. package/dist/editor/components/RenderQueue/SuccessIcon.js +14 -0
  249. package/dist/editor/components/RenderQueue/actions.d.ts +58 -0
  250. package/dist/editor/components/RenderQueue/actions.js +120 -0
  251. package/dist/editor/components/RenderQueue/context.d.ts +18 -0
  252. package/dist/editor/components/RenderQueue/context.js +49 -0
  253. package/dist/editor/components/RenderQueue/index.d.ts +2 -0
  254. package/dist/editor/components/RenderQueue/index.js +43 -0
  255. package/dist/editor/components/RenderQueue/item-style.d.ts +2 -0
  256. package/dist/editor/components/RenderQueue/item-style.js +21 -0
  257. package/dist/editor/components/RendersTab.d.ts +6 -0
  258. package/dist/editor/components/RendersTab.js +43 -0
  259. package/dist/editor/components/RightPanel.d.ts +8 -0
  260. package/dist/editor/components/RightPanel.js +76 -0
  261. package/dist/editor/components/SegmentedControl.d.ts +11 -0
  262. package/dist/editor/components/SegmentedControl.js +62 -0
  263. package/dist/editor/components/SetTimelineInOutProvider.d.ts +4 -0
  264. package/dist/editor/components/SetTimelineInOutProvider.js +19 -0
  265. package/dist/editor/components/SidebarCollapserControls.d.ts +2 -0
  266. package/dist/editor/components/SidebarCollapserControls.js +135 -0
  267. package/dist/editor/components/SidebarRenderButton.d.ts +6 -0
  268. package/dist/editor/components/SidebarRenderButton.js +85 -0
  269. package/dist/editor/components/SizeSelector.d.ts +0 -1
  270. package/dist/editor/components/SizeSelector.js +3 -3
  271. package/dist/editor/components/Splitter/SplitterHandle.d.ts +1 -2
  272. package/dist/editor/components/Splitter/SplitterHandle.js +15 -7
  273. package/dist/editor/components/Tabs/index.d.ts +11 -0
  274. package/dist/editor/components/Tabs/index.js +58 -0
  275. package/dist/editor/components/Tabs/vertical.d.ts +7 -0
  276. package/dist/editor/components/Tabs/vertical.js +43 -0
  277. package/dist/editor/components/Timeline/MaxTimelineTracks.js +1 -1
  278. package/dist/editor/components/Timeline/Timeline.js +1 -1
  279. package/dist/editor/components/Timeline/TimelineCollapseToggle.d.ts +1 -0
  280. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +4 -5
  281. package/dist/editor/components/Timeline/TimelineListItem.js +2 -1
  282. package/dist/editor/components/Timeline/TimelineScrollable.js +2 -1
  283. package/dist/editor/components/Timeline/TimelineSequence.js +2 -14
  284. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +2 -1
  285. package/dist/editor/components/Timeline/TimelineZoomControls.js +2 -5
  286. package/dist/editor/components/Timeline/imperative-state.d.ts +0 -4
  287. package/dist/editor/components/Timeline/imperative-state.js +13 -13
  288. package/dist/editor/components/Timeline/is-collapsed.js +2 -3
  289. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +0 -1
  290. package/dist/editor/components/Timeline/timeline-scroll-logic.js +5 -6
  291. package/dist/editor/components/TimelineInOutToggle.js +3 -0
  292. package/dist/editor/components/TopPanel.d.ts +1 -0
  293. package/dist/editor/components/TopPanel.js +30 -16
  294. package/dist/editor/components/ZoomGesturesProvider.d.ts +4 -0
  295. package/dist/editor/components/ZoomGesturesProvider.js +24 -0
  296. package/dist/editor/components/ZoomPersistor.d.ts +0 -1
  297. package/dist/editor/components/ZoomPersistor.js +2 -3
  298. package/dist/editor/components/get-zod-if-possible.d.ts +10 -0
  299. package/dist/editor/components/get-zod-if-possible.js +79 -0
  300. package/dist/editor/components/layout.d.ts +3 -1
  301. package/dist/editor/components/layout.js +9 -7
  302. package/dist/editor/helpers/calculate-timeline.d.ts +0 -4
  303. package/dist/editor/helpers/client-id.d.ts +17 -0
  304. package/dist/editor/helpers/client-id.js +46 -0
  305. package/dist/editor/helpers/colors.d.ts +4 -2
  306. package/dist/editor/helpers/colors.js +7 -4
  307. package/dist/editor/helpers/convert-env-variables.d.ts +2 -0
  308. package/dist/editor/helpers/convert-env-variables.js +20 -0
  309. package/dist/editor/helpers/create-folder-tree.d.ts +2 -3
  310. package/dist/editor/helpers/create-folder-tree.js +3 -4
  311. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +2 -2
  312. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
  313. package/dist/editor/helpers/is-composition-still.d.ts +2 -2
  314. package/dist/editor/helpers/is-composition-still.js +3 -0
  315. package/dist/editor/helpers/prores-labels.d.ts +2 -0
  316. package/dist/editor/helpers/prores-labels.js +25 -0
  317. package/dist/editor/helpers/render-modal-sections.d.ts +10 -0
  318. package/dist/editor/helpers/render-modal-sections.js +32 -0
  319. package/dist/editor/helpers/use-breakpoint.d.ts +1 -0
  320. package/dist/editor/helpers/use-breakpoint.js +17 -0
  321. package/dist/editor/helpers/use-file-existence.d.ts +1 -0
  322. package/dist/editor/helpers/use-file-existence.js +66 -0
  323. package/dist/editor/helpers/use-keybinding.d.ts +1 -0
  324. package/dist/editor/helpers/use-keybinding.js +9 -0
  325. package/dist/editor/helpers/use-menu-structure.js +99 -51
  326. package/dist/editor/helpers/validate-new-comp-data.d.ts +2 -2
  327. package/dist/editor/icons/Checkmark.js +1 -1
  328. package/dist/editor/icons/audio.d.ts +2 -0
  329. package/dist/editor/icons/audio.js +6 -0
  330. package/dist/editor/icons/caret.d.ts +4 -1
  331. package/dist/editor/icons/caret.js +17 -1
  332. package/dist/editor/icons/data.d.ts +2 -0
  333. package/dist/editor/icons/data.js +8 -0
  334. package/dist/editor/icons/file.d.ts +2 -0
  335. package/dist/editor/icons/file.js +6 -0
  336. package/dist/editor/icons/folder.d.ts +6 -2
  337. package/dist/editor/icons/folder.js +4 -4
  338. package/dist/editor/icons/frame.d.ts +2 -0
  339. package/dist/editor/icons/frame.js +6 -0
  340. package/dist/editor/icons/gear.d.ts +2 -0
  341. package/dist/editor/icons/gear.js +6 -0
  342. package/dist/editor/icons/gif.d.ts +2 -0
  343. package/dist/editor/icons/gif.js +6 -0
  344. package/dist/editor/icons/render.d.ts +9 -0
  345. package/dist/editor/icons/render.js +12 -0
  346. package/dist/editor/icons/still.d.ts +3 -1
  347. package/dist/editor/icons/still.js +2 -2
  348. package/dist/editor/icons/video.d.ts +5 -0
  349. package/dist/editor/icons/video.js +8 -0
  350. package/dist/editor/state/keybindings.d.ts +2 -1
  351. package/dist/editor/state/modals.d.ts +38 -0
  352. package/dist/editor/state/preview-size.d.ts +0 -1
  353. package/dist/editor/state/preview-size.js +3 -4
  354. package/dist/editor/state/sidebar.d.ts +7 -3
  355. package/dist/editor/state/sidebar.js +42 -13
  356. package/dist/editor/state/timeline-ref.d.ts +2 -1
  357. package/dist/editor/state/z-index.d.ts +0 -5
  358. package/dist/editor/state/z-index.js +16 -6
  359. package/dist/entry-point.js +17 -17
  360. package/dist/event-source-events.d.ts +15 -0
  361. package/dist/event-source.d.ts +2 -0
  362. package/dist/event-source.js +31 -5
  363. package/dist/ffmpeg.d.ts +2 -0
  364. package/dist/ffmpeg.js +26 -0
  365. package/dist/file-watcher.d.ts +9 -0
  366. package/dist/file-watcher.js +35 -0
  367. package/dist/get-cli-options.d.ts +3 -12
  368. package/dist/get-cli-options.js +11 -64
  369. package/dist/get-composition-id.d.ts +7 -3
  370. package/dist/get-composition-id.js +17 -3
  371. package/dist/get-composition-with-dimension-override.d.ts +5 -4
  372. package/dist/get-composition-with-dimension-override.js +6 -2
  373. package/dist/get-config-file-name.d.ts +0 -2
  374. package/dist/get-config-file-name.js +11 -11
  375. package/dist/get-default-out-name.d.ts +5 -0
  376. package/dist/get-default-out-name.js +10 -0
  377. package/dist/get-env.d.ts +1 -1
  378. package/dist/get-env.js +48 -57
  379. package/dist/get-filename.d.ts +5 -1
  380. package/dist/get-filename.js +6 -4
  381. package/dist/get-final-output-codec.d.ts +2 -1
  382. package/dist/get-final-output-codec.js +4 -1
  383. package/dist/get-input-props.d.ts +1 -5
  384. package/dist/get-input-props.js +18 -20
  385. package/dist/get-network-address.js +2 -2
  386. package/dist/image-formats.d.ts +5 -2
  387. package/dist/image-formats.js +16 -6
  388. package/dist/index.d.ts +91 -22
  389. package/dist/index.js +16 -13
  390. package/dist/list-of-remotion-packages.js +1 -0
  391. package/dist/load-config.js +9 -9
  392. package/dist/log.d.ts +14 -0
  393. package/dist/log.js +24 -8
  394. package/dist/parse-command-line.d.ts +5 -5
  395. package/dist/parse-command-line.js +6 -14
  396. package/dist/preview-server/api-routes.d.ts +4 -0
  397. package/dist/preview-server/api-routes.js +21 -0
  398. package/dist/preview-server/api-types.d.ts +25 -0
  399. package/dist/preview-server/api-types.js +2 -0
  400. package/dist/preview-server/dev-middleware/compatible-api.d.ts +2 -2
  401. package/dist/preview-server/dev-middleware/middleware.d.ts +1 -2
  402. package/dist/preview-server/dev-middleware/middleware.js +8 -9
  403. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +5 -5
  404. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +17 -17
  405. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +1 -0
  406. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +8 -4
  407. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +12 -8
  408. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +2 -1
  409. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +1 -0
  410. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +1 -0
  411. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -0
  412. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.js +16 -1
  413. package/dist/preview-server/file-existence-watchers.d.ts +13 -0
  414. package/dist/preview-server/file-existence-watchers.js +62 -0
  415. package/dist/preview-server/get-absolute-public-dir.js +3 -3
  416. package/dist/preview-server/get-package-manager.js +3 -3
  417. package/dist/preview-server/handler.d.ts +9 -0
  418. package/dist/preview-server/handler.js +34 -0
  419. package/dist/preview-server/hot-middleware/client.js +2 -2
  420. package/dist/preview-server/hot-middleware/index.d.ts +1 -1
  421. package/dist/preview-server/hot-middleware/index.js +2 -2
  422. package/dist/preview-server/live-events.d.ts +3 -1
  423. package/dist/preview-server/live-events.js +22 -2
  424. package/dist/preview-server/parse-body.d.ts +2 -0
  425. package/dist/preview-server/parse-body.js +16 -0
  426. package/dist/preview-server/project-info.js +5 -5
  427. package/dist/preview-server/public-folder.d.ts +0 -5
  428. package/dist/preview-server/public-folder.js +11 -12
  429. package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +10 -0
  430. package/dist/preview-server/render-queue/get-default-video-contexts.js +13 -0
  431. package/dist/preview-server/render-queue/job.d.ts +138 -0
  432. package/dist/preview-server/render-queue/job.js +2 -0
  433. package/dist/preview-server/render-queue/make-retry-payload.d.ts +3 -0
  434. package/dist/preview-server/render-queue/make-retry-payload.js +91 -0
  435. package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +1 -0
  436. package/dist/preview-server/render-queue/open-directory-in-finder.js +43 -0
  437. package/dist/preview-server/render-queue/process-still.d.ts +8 -0
  438. package/dist/preview-server/render-queue/process-still.js +46 -0
  439. package/dist/preview-server/render-queue/process-video.d.ts +8 -0
  440. package/dist/preview-server/render-queue/process-video.js +63 -0
  441. package/dist/preview-server/render-queue/queue.d.ts +9 -0
  442. package/dist/preview-server/render-queue/queue.js +212 -0
  443. package/dist/preview-server/routes/add-render.d.ts +3 -0
  444. package/dist/preview-server/routes/add-render.js +76 -0
  445. package/dist/preview-server/routes/can-update-default-props.d.ts +4 -0
  446. package/dist/preview-server/routes/can-update-default-props.js +39 -0
  447. package/dist/preview-server/routes/cancel-render.d.ts +3 -0
  448. package/dist/preview-server/routes/cancel-render.js +9 -0
  449. package/dist/preview-server/routes/open-in-file-explorer.d.ts +3 -0
  450. package/dist/preview-server/routes/open-in-file-explorer.js +8 -0
  451. package/dist/preview-server/routes/remove-render.d.ts +3 -0
  452. package/dist/preview-server/routes/remove-render.js +9 -0
  453. package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +3 -0
  454. package/dist/preview-server/routes/subscribe-to-file-existence.js +13 -0
  455. package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +3 -0
  456. package/dist/preview-server/routes/unsubscribe-from-file-existence.js +13 -0
  457. package/dist/preview-server/routes/update-default-props.d.ts +3 -0
  458. package/dist/preview-server/routes/update-default-props.js +24 -0
  459. package/dist/preview-server/routes.d.ts +3 -2
  460. package/dist/preview-server/routes.js +79 -21
  461. package/dist/preview-server/serve-static.d.ts +1 -1
  462. package/dist/preview-server/serve-static.js +7 -7
  463. package/dist/preview-server/start-server.js +3 -2
  464. package/dist/preview.js +12 -25
  465. package/dist/previewEntry.js +2 -3
  466. package/dist/print-compositions.d.ts +2 -2
  467. package/dist/print-error.js +4 -2
  468. package/dist/print-help.js +4 -8
  469. package/dist/progress-bar.d.ts +17 -37
  470. package/dist/progress-bar.js +102 -41
  471. package/dist/progress-types.d.ts +32 -0
  472. package/dist/progress-types.js +17 -0
  473. package/dist/render-flows/render.d.ts +47 -0
  474. package/dist/render-flows/render.js +293 -0
  475. package/dist/render-flows/still.d.ts +29 -0
  476. package/dist/render-flows/still.js +174 -0
  477. package/dist/render.js +42 -232
  478. package/dist/required-chromium-options.d.ts +3 -0
  479. package/dist/required-chromium-options.js +2 -0
  480. package/dist/resolve-from.js +5 -5
  481. package/dist/select-composition.d.ts +2 -1
  482. package/dist/setup-cache.d.ts +12 -9
  483. package/dist/setup-cache.js +29 -20
  484. package/dist/still.js +25 -130
  485. package/dist/upgrade.js +2 -2
  486. package/dist/user-passed-output-location.js +2 -7
  487. package/dist/versions.js +2 -2
  488. package/package.json +22 -7
  489. package/styles/styles.css +13 -3
@@ -14,18 +14,22 @@ const button = {
14
14
  color: 'white',
15
15
  flexDirection: 'row',
16
16
  };
17
- const buttonContainer = {
18
- padding: 10,
19
- cursor: 'pointer',
20
- fontSize: 14,
21
- };
22
- const Button = ({ children, onClick, disabled, style }) => {
17
+ const ButtonRefForwardFunction = ({ children, onClick, title, disabled, style, id, autoFocus, buttonContainerStyle, }, ref) => {
23
18
  const combined = (0, react_1.useMemo)(() => {
24
19
  return {
25
20
  ...button,
26
21
  ...(style !== null && style !== void 0 ? style : {}),
27
22
  };
28
23
  }, [style]);
29
- return ((0, jsx_runtime_1.jsx)("button", { style: combined, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: buttonContainer, children: children }) }));
24
+ const buttonContainer = (0, react_1.useMemo)(() => {
25
+ return {
26
+ padding: 10,
27
+ cursor: disabled ? 'inherit' : 'pointer',
28
+ fontSize: 14,
29
+ opacity: disabled ? 0.7 : 1,
30
+ ...(buttonContainerStyle !== null && buttonContainerStyle !== void 0 ? buttonContainerStyle : {}),
31
+ };
32
+ }, [buttonContainerStyle, disabled]);
33
+ return ((0, jsx_runtime_1.jsx)("button", { ref: ref, id: id, style: combined, type: "button", disabled: disabled, onClick: onClick, autoFocus: autoFocus, title: title, children: (0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: buttonContainer, children: children }) }));
30
34
  };
31
- exports.Button = Button;
35
+ exports.Button = (0, react_1.forwardRef)(ButtonRefForwardFunction);
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ErrorDisplay = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const is_menu_item_1 = require("../../../editor/components/Menu/is-menu-item");
6
7
  const map_error_to_react_stack_1 = require("../react-overlay/effects/map-error-to-react-stack");
7
8
  const AskOnDiscord_1 = require("./AskOnDiscord");
8
9
  const ErrorTitle_1 = require("./ErrorTitle");
@@ -39,7 +40,7 @@ const ErrorDisplay = ({ display, keyboardShortcuts }) => {
39
40
  }, [display.error]);
40
41
  const lineNumberWidth = String(highestLineNumber).length;
41
42
  const helpLink = (0, get_help_link_1.getHelpLink)(message);
42
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message }), helpLink ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HelpLink_1.HelpLink, { link: helpLink, canHaveKeyboardShortcuts: keyboardShortcuts }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, display.stackFrames.length > 0 && window.remotion_editorName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, stack: display.stackFrames[0] }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(SearchGitHubIssues_1.SearchGithubIssues, { canHaveKeyboardShortcuts: keyboardShortcuts, message: display.error.message }), (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(AskOnDiscord_1.AskOnDiscord, { canHaveKeyboardShortcuts: keyboardShortcuts }), (0, jsx_runtime_1.jsx)("div", { style: stack, children: display.stackFrames.map((s, i) => {
43
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message }), helpLink ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(HelpLink_1.HelpLink, { link: helpLink, canHaveKeyboardShortcuts: keyboardShortcuts }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, display.stackFrames.length > 0 && window.remotion_editorName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OpenInEditor_1.OpenInEditor, { canHaveKeyboardShortcuts: keyboardShortcuts, stack: display.stackFrames[0] }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(SearchGitHubIssues_1.SearchGithubIssues, { canHaveKeyboardShortcuts: keyboardShortcuts, message: display.error.message }), (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(AskOnDiscord_1.AskOnDiscord, { canHaveKeyboardShortcuts: keyboardShortcuts }), (0, jsx_runtime_1.jsx)("div", { style: stack, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: display.stackFrames.map((s, i) => {
43
44
  return ((0, jsx_runtime_1.jsx)(StackFrame_1.StackElement
44
45
  // eslint-disable-next-line react/no-array-index-key
45
46
  , { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)' }, i));
@@ -28,6 +28,7 @@ const HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
28
28
  callback: onEditor,
29
29
  commandCtrlKey: true,
30
30
  preventDefault: true,
31
+ triggerIfInputFieldFocused: false,
31
32
  });
32
33
  return () => unregister();
33
34
  }, [canHaveKeyboardShortcuts, openLink, registerKeybinding]);
@@ -81,6 +81,7 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts }) => {
81
81
  callback: onEditor,
82
82
  commandCtrlKey: true,
83
83
  preventDefault: true,
84
+ triggerIfInputFieldFocused: false,
84
85
  });
85
86
  return () => unregister();
86
87
  }, [canHaveKeyboardShortcuts, openInBrowser, registerKeybinding]);
@@ -24,6 +24,7 @@ const SearchGithubIssues = ({ message, canHaveKeyboardShortcuts }) => {
24
24
  callback: onEditor,
25
25
  commandCtrlKey: true,
26
26
  preventDefault: true,
27
+ triggerIfInputFieldFocused: false,
27
28
  });
28
29
  return () => unregister();
29
30
  }, [canHaveKeyboardShortcuts, openInBrowser, registerKeybinding]);
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ShortcutHint = exports.cmdOrCtrlCharacter = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const use_keybinding_1 = require("../../../editor/helpers/use-keybinding");
5
7
  exports.cmdOrCtrlCharacter = window.navigator.platform.startsWith('Mac')
6
8
  ? '⌘'
7
9
  : 'Ctrl';
@@ -9,8 +11,21 @@ const container = {
9
11
  display: 'inline-block',
10
12
  marginLeft: 6,
11
13
  opacity: 0.6,
14
+ verticalAlign: 'middle',
12
15
  };
13
16
  const ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
14
- return ((0, jsx_runtime_1.jsxs)("span", { style: container, children: [cmdOrCtrl ? `${exports.cmdOrCtrlCharacter}+` : '', keyToPress.toUpperCase()] }));
17
+ const style = (0, react_1.useMemo)(() => {
18
+ if (keyToPress === '↵') {
19
+ return {
20
+ display: 'inline-block',
21
+ transform: `translateY(2px)`,
22
+ };
23
+ }
24
+ return {};
25
+ }, [keyToPress]);
26
+ if ((0, use_keybinding_1.areKeyboardShortcutsDisabled)()) {
27
+ return null;
28
+ }
29
+ return ((0, jsx_runtime_1.jsxs)("span", { style: container, children: [cmdOrCtrl ? `${exports.cmdOrCtrlCharacter}` : '', (0, jsx_runtime_1.jsx)("span", { style: style, children: keyToPress.toUpperCase() })] }));
15
30
  };
16
31
  exports.ShortcutHint = ShortcutHint;
@@ -0,0 +1,13 @@
1
+ export declare const subscribeToFileExistenceWatchers: ({ file: relativeFile, remotionRoot, clientId, }: {
2
+ file: string;
3
+ remotionRoot: string;
4
+ clientId: string;
5
+ }) => {
6
+ exists: boolean;
7
+ };
8
+ export declare const unsubscribeFromFileExistenceWatchers: ({ file, remotionRoot, clientId, }: {
9
+ file: string;
10
+ remotionRoot: string;
11
+ clientId: string;
12
+ }) => void;
13
+ export declare const unsubscribeClientFileExistenceWatchers: (clientId: string) => void;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.unsubscribeClientFileExistenceWatchers = exports.unsubscribeFromFileExistenceWatchers = exports.subscribeToFileExistenceWatchers = void 0;
7
+ const node_path_1 = __importDefault(require("node:path"));
8
+ const file_watcher_1 = require("../file-watcher");
9
+ const live_events_1 = require("./live-events");
10
+ const fileExistenceWatchers = {};
11
+ const subscribeToFileExistenceWatchers = ({ file: relativeFile, remotionRoot, clientId, }) => {
12
+ const file = node_path_1.default.resolve(remotionRoot, relativeFile);
13
+ const { unwatch, exists } = (0, file_watcher_1.installFileWatcher)({
14
+ file,
15
+ onChange: (type) => {
16
+ if (type === 'created') {
17
+ (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
18
+ listener.sendEventToClient({
19
+ type: 'watched-file-undeleted',
20
+ // Must be relative file because that's what the client expects
21
+ file: relativeFile,
22
+ });
23
+ });
24
+ }
25
+ if (type === 'deleted') {
26
+ (0, live_events_1.waitForLiveEventsListener)().then((listener) => {
27
+ listener.sendEventToClient({
28
+ type: 'watched-file-deleted',
29
+ // Must be relative file because that's what the client expects
30
+ file: relativeFile,
31
+ });
32
+ });
33
+ }
34
+ },
35
+ });
36
+ if (!fileExistenceWatchers[clientId]) {
37
+ fileExistenceWatchers[clientId] = {};
38
+ }
39
+ fileExistenceWatchers[clientId][file] = unwatch;
40
+ return { exists };
41
+ };
42
+ exports.subscribeToFileExistenceWatchers = subscribeToFileExistenceWatchers;
43
+ const unsubscribeFromFileExistenceWatchers = ({ file, remotionRoot, clientId, }) => {
44
+ var _a, _b;
45
+ const actualPath = node_path_1.default.resolve(remotionRoot, file);
46
+ if (!fileExistenceWatchers[clientId]) {
47
+ return;
48
+ }
49
+ (_b = (_a = fileExistenceWatchers[clientId])[actualPath]) === null || _b === void 0 ? void 0 : _b.call(_a);
50
+ delete fileExistenceWatchers[clientId][actualPath];
51
+ };
52
+ exports.unsubscribeFromFileExistenceWatchers = unsubscribeFromFileExistenceWatchers;
53
+ const unsubscribeClientFileExistenceWatchers = (clientId) => {
54
+ if (!fileExistenceWatchers[clientId]) {
55
+ return;
56
+ }
57
+ Object.values(fileExistenceWatchers[clientId]).forEach((unwatch) => {
58
+ unwatch();
59
+ });
60
+ delete fileExistenceWatchers[clientId];
61
+ };
62
+ exports.unsubscribeClientFileExistenceWatchers = unsubscribeClientFileExistenceWatchers;
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getAbsolutePublicDir = void 0;
7
- const path_1 = __importDefault(require("path"));
7
+ const node_path_1 = __importDefault(require("node:path"));
8
8
  const getAbsolutePublicDir = ({ userPassedPublicDir, remotionRoot, }) => {
9
9
  const publicDir = userPassedPublicDir
10
- ? path_1.default.resolve(remotionRoot, userPassedPublicDir)
11
- : path_1.default.join(remotionRoot, 'public');
10
+ ? node_path_1.default.resolve(remotionRoot, userPassedPublicDir)
11
+ : node_path_1.default.join(remotionRoot, 'public');
12
12
  return publicDir;
13
13
  };
14
14
  exports.getAbsolutePublicDir = getAbsolutePublicDir;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getPackageManager = exports.lockFilePaths = void 0;
7
- const fs_1 = __importDefault(require("fs"));
8
- const path_1 = __importDefault(require("path"));
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
9
  exports.lockFilePaths = [
10
10
  {
11
11
  path: 'package-lock.json',
@@ -36,7 +36,7 @@ const getPackageManager = (remotionRoot, packageManager) => {
36
36
  }
37
37
  return manager;
38
38
  }
39
- const existingPkgManagers = exports.lockFilePaths.filter((p) => fs_1.default.existsSync(path_1.default.join(remotionRoot, p.path)));
39
+ const existingPkgManagers = exports.lockFilePaths.filter((p) => node_fs_1.default.existsSync(node_path_1.default.join(remotionRoot, p.path)));
40
40
  if (existingPkgManagers.length === 0) {
41
41
  return 'unknown';
42
42
  }
@@ -0,0 +1,9 @@
1
+ import type { IncomingMessage, ServerResponse } from 'node:http';
2
+ import type { ApiHandler } from './api-types';
3
+ export declare const handleRequest: <Req, Res>({ remotionRoot, request, response, entryPoint, handler, }: {
4
+ remotionRoot: string;
5
+ request: IncomingMessage;
6
+ response: ServerResponse;
7
+ entryPoint: string;
8
+ handler: ApiHandler<Req, Res>;
9
+ }) => Promise<void>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.handleRequest = void 0;
4
+ const parse_body_1 = require("./parse-body");
5
+ const handleRequest = async ({ remotionRoot, request, response, entryPoint, handler, }) => {
6
+ if (request.method === 'OPTIONS') {
7
+ response.statusCode = 200;
8
+ response.end();
9
+ return;
10
+ }
11
+ response.setHeader('content-type', 'application/json');
12
+ response.writeHead(200);
13
+ try {
14
+ const body = (await (0, parse_body_1.parseRequestBody)(request));
15
+ const outputData = await handler({
16
+ entryPoint,
17
+ remotionRoot,
18
+ request,
19
+ response,
20
+ input: body,
21
+ });
22
+ response.end(JSON.stringify({
23
+ success: true,
24
+ data: outputData,
25
+ }));
26
+ }
27
+ catch (err) {
28
+ response.end(JSON.stringify({
29
+ success: false,
30
+ error: err.message,
31
+ }));
32
+ }
33
+ };
34
+ exports.handleRequest = handleRequest;
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  * https://github.com/webpack-contrib/webpack-hot-middleware#readme
7
7
  * and rewritten in TypeScript. This file is MIT licensed
8
8
  */
9
+ const ansi_split_1 = require("../../ansi/ansi-split");
9
10
  const process_update_1 = require("./process-update");
10
- const strip_ansi_1 = require("./strip-ansi");
11
11
  const types_1 = require("./types");
12
12
  if (typeof window === 'undefined') {
13
13
  // do nothing
@@ -107,7 +107,7 @@ function createReporter() {
107
107
  }
108
108
  const newProblems = obj[type]
109
109
  .map((msg) => {
110
- return (0, strip_ansi_1.stripAnsi)(msg);
110
+ return (0, ansi_split_1.stripAnsi)(msg);
111
111
  })
112
112
  .join('\n');
113
113
  if (previousProblems === newProblems) {
@@ -4,7 +4,7 @@
4
4
  * and rewritten in TypeScript. This file is MIT licensed
5
5
  */
6
6
  import type { webpack } from '@remotion/bundler';
7
- import type { IncomingMessage, ServerResponse } from 'http';
7
+ import type { IncomingMessage, ServerResponse } from 'node:http';
8
8
  declare global {
9
9
  const __webpack_hash__: unknown;
10
10
  interface HotNotifierInfo {
@@ -6,12 +6,12 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.webpackHotMiddleware = void 0;
9
- const url_1 = require("url");
9
+ const node_url_1 = require("node:url");
10
10
  const log_1 = require("../../log");
11
11
  const types_1 = require("./types");
12
12
  const pathMatch = function (url, path) {
13
13
  try {
14
- return (0, url_1.parse)(url).pathname === path;
14
+ return (0, node_url_1.parse)(url).pathname === path;
15
15
  }
16
16
  catch (e) {
17
17
  return false;
@@ -1,8 +1,10 @@
1
1
  /// <reference types="node" />
2
- import type { IncomingMessage, ServerResponse } from 'http';
2
+ import type { IncomingMessage, ServerResponse } from 'node:http';
3
3
  import type { EventSourceEvent } from '../event-source-events';
4
4
  export declare type LiveEventsServer = {
5
5
  sendEventToClient: (event: EventSourceEvent) => void;
6
6
  router: (request: IncomingMessage, response: ServerResponse) => void;
7
7
  };
8
8
  export declare const makeLiveEventsRouter: () => LiveEventsServer;
9
+ export declare const waitForLiveEventsListener: () => Promise<LiveEventsServer>;
10
+ export declare const setLiveEventsListener: (listener: LiveEventsServer) => void;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.makeLiveEventsRouter = void 0;
3
+ exports.setLiveEventsListener = exports.waitForLiveEventsListener = exports.makeLiveEventsRouter = void 0;
4
+ const file_existence_watchers_1 = require("./file-existence-watchers");
4
5
  const serializeMessage = (message) => {
5
6
  return `data: ${JSON.stringify(message)}\n\n`;
6
7
  };
@@ -17,14 +18,15 @@ const makeLiveEventsRouter = () => {
17
18
  response.end();
18
19
  return;
19
20
  }
20
- response.write(serializeMessage({ type: 'init' }));
21
21
  const clientId = String(Math.random());
22
+ response.write(serializeMessage({ type: 'init', clientId }));
22
23
  const newClient = {
23
24
  id: clientId,
24
25
  response,
25
26
  };
26
27
  clients.push(newClient);
27
28
  request.on('close', () => {
29
+ (0, file_existence_watchers_1.unsubscribeClientFileExistenceWatchers)(clientId);
28
30
  clients = clients.filter((client) => client.id !== clientId);
29
31
  });
30
32
  };
@@ -39,3 +41,21 @@ const makeLiveEventsRouter = () => {
39
41
  };
40
42
  };
41
43
  exports.makeLiveEventsRouter = makeLiveEventsRouter;
44
+ let liveEventsListener = null;
45
+ const waiters = [];
46
+ const waitForLiveEventsListener = () => {
47
+ if (liveEventsListener) {
48
+ return Promise.resolve(liveEventsListener);
49
+ }
50
+ return new Promise((resolve) => {
51
+ waiters.push((list) => {
52
+ resolve(list);
53
+ });
54
+ });
55
+ };
56
+ exports.waitForLiveEventsListener = waitForLiveEventsListener;
57
+ const setLiveEventsListener = (listener) => {
58
+ liveEventsListener = listener;
59
+ waiters.forEach((w) => w(listener));
60
+ };
61
+ exports.setLiveEventsListener = setLiveEventsListener;
@@ -0,0 +1,2 @@
1
+ import type { IncomingMessage } from 'node:http';
2
+ export declare const parseRequestBody: (req: IncomingMessage) => Promise<unknown>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseRequestBody = void 0;
4
+ const parseRequestBody = async (req) => {
5
+ const body = await new Promise((_resolve) => {
6
+ let data = '';
7
+ req.on('data', (chunk) => {
8
+ data += chunk;
9
+ });
10
+ req.on('end', () => {
11
+ _resolve(data.toString());
12
+ });
13
+ });
14
+ return JSON.parse(body);
15
+ };
16
+ exports.parseRequestBody = parseRequestBody;
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getProjectInfo = void 0;
7
- const fs_1 = require("fs");
8
- const path_1 = __importDefault(require("path"));
7
+ const node_fs_1 = require("node:fs");
8
+ const node_path_1 = __importDefault(require("node:path"));
9
9
  const getProjectInfo = (remotionRoot) => {
10
10
  var _a;
11
11
  const pathsToLookFor = [
@@ -17,13 +17,13 @@ const getProjectInfo = (remotionRoot) => {
17
17
  'src/Video.tsx',
18
18
  'src/Video.jsx',
19
19
  ].map((p) => {
20
- return path_1.default.join(remotionRoot, p);
20
+ return node_path_1.default.join(remotionRoot, p);
21
21
  });
22
- const videoFile = (_a = pathsToLookFor.find((p) => (0, fs_1.existsSync)(p))) !== null && _a !== void 0 ? _a : null;
22
+ const videoFile = (_a = pathsToLookFor.find((p) => (0, node_fs_1.existsSync)(p))) !== null && _a !== void 0 ? _a : null;
23
23
  return Promise.resolve({
24
24
  videoFile,
25
25
  relativeVideoFile: videoFile
26
- ? path_1.default.relative(remotionRoot, videoFile)
26
+ ? node_path_1.default.relative(remotionRoot, videoFile)
27
27
  : null,
28
28
  });
29
29
  };
@@ -9,9 +9,4 @@ export declare const fetchFolder: ({ publicDir, staticHash, }: {
9
9
  publicDir: string;
10
10
  staticHash: string;
11
11
  }) => void;
12
- export declare const watchPublicFolder: ({ publicDir, onUpdate, staticHash, }: {
13
- publicDir: string;
14
- onUpdate: () => void;
15
- staticHash: string;
16
- }) => void;
17
12
  export declare const getFiles: () => StaticFile[];
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getFiles = exports.watchPublicFolder = exports.fetchFolder = exports.initPublicFolderWatch = void 0;
6
+ exports.getFiles = exports.fetchFolder = exports.initPublicFolderWatch = void 0;
7
7
  const bundler_1 = require("@remotion/bundler");
8
- const fs_1 = require("fs");
9
- const path_1 = __importDefault(require("path"));
8
+ const node_fs_1 = require("node:fs");
9
+ const node_path_1 = __importDefault(require("node:path"));
10
10
  const env_supports_fs_recursive_1 = require("./env-supports-fs-recursive");
11
11
  let files = [];
12
12
  const initPublicFolderWatch = ({ publicDir, onUpdate, staticHash, }) => {
13
13
  (0, exports.fetchFolder)({ publicDir, staticHash });
14
- (0, exports.watchPublicFolder)({ publicDir, onUpdate, staticHash });
14
+ watchPublicFolder({ publicDir, onUpdate, staticHash });
15
15
  };
16
16
  exports.initPublicFolderWatch = initPublicFolderWatch;
17
17
  const fetchFolder = ({ publicDir, staticHash, }) => {
@@ -23,17 +23,17 @@ const fetchFolder = ({ publicDir, staticHash, }) => {
23
23
  }).map((f) => {
24
24
  return {
25
25
  ...f,
26
- name: f.name.split(path_1.default.sep).join('/'),
26
+ name: f.name.split(node_path_1.default.sep).join('/'),
27
27
  };
28
28
  });
29
29
  };
30
30
  exports.fetchFolder = fetchFolder;
31
31
  const watchPublicFolder = ({ publicDir, onUpdate, staticHash, }) => {
32
- if (!(0, fs_1.existsSync)(publicDir)) {
33
- const parentDir = path_1.default.dirname(publicDir);
32
+ if (!(0, node_fs_1.existsSync)(publicDir)) {
33
+ const parentDir = node_path_1.default.dirname(publicDir);
34
34
  const onDirChange = () => {
35
- if ((0, fs_1.existsSync)(publicDir)) {
36
- (0, exports.watchPublicFolder)({
35
+ if ((0, node_fs_1.existsSync)(publicDir)) {
36
+ watchPublicFolder({
37
37
  publicDir,
38
38
  onUpdate,
39
39
  staticHash,
@@ -41,15 +41,14 @@ const watchPublicFolder = ({ publicDir, onUpdate, staticHash, }) => {
41
41
  watcher.close();
42
42
  }
43
43
  };
44
- const watcher = (0, fs_1.watch)(parentDir, {}, onDirChange);
44
+ const watcher = (0, node_fs_1.watch)(parentDir, {}, onDirChange);
45
45
  return;
46
46
  }
47
- (0, fs_1.watch)(publicDir, { recursive: (0, env_supports_fs_recursive_1.envSupportsFsRecursive)() }, () => {
47
+ (0, node_fs_1.watch)(publicDir, { recursive: (0, env_supports_fs_recursive_1.envSupportsFsRecursive)() }, () => {
48
48
  (0, exports.fetchFolder)({ publicDir, staticHash });
49
49
  onUpdate();
50
50
  });
51
51
  };
52
- exports.watchPublicFolder = watchPublicFolder;
53
52
  const getFiles = () => {
54
53
  return files;
55
54
  };
@@ -0,0 +1,10 @@
1
+ import type { Codec } from '@remotion/renderer';
2
+ import type { RenderType } from '../../editor/components/RenderModal/RenderModalAdvanced';
3
+ export declare const getDefaultCodecs: ({ defaultCodec, isStill, }: {
4
+ defaultCodec: Codec;
5
+ isStill: boolean;
6
+ }) => {
7
+ initialAudioCodec: Codec;
8
+ initialVideoCodec: Codec;
9
+ initialRenderType: RenderType;
10
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultCodecs = void 0;
4
+ const client_1 = require("@remotion/renderer/client");
5
+ const getDefaultCodecs = ({ defaultCodec, isStill, }) => {
6
+ const isAudioCodec = client_1.BrowserSafeApis.isAudioCodec(defaultCodec);
7
+ return {
8
+ initialAudioCodec: isAudioCodec ? defaultCodec : 'mp3',
9
+ initialVideoCodec: isAudioCodec ? 'h264' : defaultCodec,
10
+ initialRenderType: isStill ? 'still' : isAudioCodec ? 'audio' : 'video',
11
+ };
12
+ };
13
+ exports.getDefaultCodecs = getDefaultCodecs;