@remotion/cli 4.0.0-2x.1 → 4.0.0-alpha.111

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 (929) hide show
  1. package/LICENSE.md +8 -8
  2. package/dist/ansi/ansi-diff.d.ts +2 -1
  3. package/dist/ansi/ansi-diff.js +14 -20
  4. package/dist/ansi/ansi-regex.d.ts +0 -0
  5. package/dist/ansi/ansi-regex.js +0 -0
  6. package/dist/ansi/ansi-split.d.ts +0 -0
  7. package/dist/ansi/ansi-split.js +0 -0
  8. package/dist/benchmark.d.ts +1 -0
  9. package/dist/benchmark.js +220 -0
  10. package/dist/better-opn/index.d.ts +6 -0
  11. package/dist/better-opn/index.js +202 -0
  12. package/dist/chalk/index.d.ts +0 -0
  13. package/dist/chalk/index.js +0 -0
  14. package/dist/cleanup-before-quit.d.ts +3 -0
  15. package/dist/cleanup-before-quit.js +23 -0
  16. package/dist/code-frame.d.ts +0 -0
  17. package/dist/code-frame.js +23 -11
  18. package/dist/codemods/update-default-props.d.ts +5 -0
  19. package/dist/codemods/update-default-props.js +129 -0
  20. package/dist/composition-prompts.d.ts +8 -0
  21. package/dist/composition-prompts.js +26 -0
  22. package/dist/compositions.d.ts +1 -1
  23. package/dist/compositions.js +31 -52
  24. package/dist/config/audio-codec.d.ts +3 -0
  25. package/dist/config/audio-codec.js +20 -0
  26. package/dist/config/bitrate.d.ts +4 -0
  27. package/dist/config/bitrate.js +21 -0
  28. package/dist/config/browser-executable.d.ts +3 -0
  29. package/dist/config/browser-executable.js +12 -0
  30. package/dist/config/browser.d.ts +3 -0
  31. package/dist/config/browser.js +18 -0
  32. package/dist/config/chromium-flags.d.ts +9 -0
  33. package/dist/config/chromium-flags.js +33 -0
  34. package/dist/config/codec.d.ts +3 -0
  35. package/dist/config/codec.js +20 -0
  36. package/dist/config/concurrency.d.ts +3 -0
  37. package/dist/config/concurrency.js +12 -0
  38. package/dist/config/crf.d.ts +3 -0
  39. package/dist/config/crf.js +15 -0
  40. package/dist/config/enforce-audio-track.d.ts +2 -0
  41. package/dist/config/enforce-audio-track.js +13 -0
  42. package/dist/config/entry-point.d.ts +2 -0
  43. package/dist/config/entry-point.js +12 -0
  44. package/dist/config/env-file.d.ts +2 -0
  45. package/dist/config/env-file.js +10 -0
  46. package/dist/config/every-nth-frame.d.ts +2 -0
  47. package/dist/config/every-nth-frame.js +12 -0
  48. package/dist/config/ffmpeg-override.d.ts +3 -0
  49. package/dist/config/ffmpeg-override.js +12 -0
  50. package/dist/config/frame-range.d.ts +4 -0
  51. package/dist/config/frame-range.js +35 -0
  52. package/dist/config/height.d.ts +2 -0
  53. package/dist/config/height.js +14 -0
  54. package/dist/config/image-format.d.ts +5 -0
  55. package/dist/config/image-format.js +49 -0
  56. package/dist/config/image-sequence.d.ts +3 -0
  57. package/dist/config/image-sequence.js +15 -0
  58. package/dist/config/index.d.ts +289 -0
  59. package/dist/config/index.js +177 -0
  60. package/dist/config/keyboard-shortcuts.d.ts +2 -0
  61. package/dist/config/keyboard-shortcuts.js +12 -0
  62. package/dist/config/log.d.ts +3 -0
  63. package/dist/config/log.js +12 -0
  64. package/dist/config/max-timeline-tracks.d.ts +2 -0
  65. package/dist/config/max-timeline-tracks.js +24 -0
  66. package/dist/config/muted.d.ts +2 -0
  67. package/dist/config/muted.js +13 -0
  68. package/dist/config/number-of-gif-loops.d.ts +3 -0
  69. package/dist/config/number-of-gif-loops.js +15 -0
  70. package/dist/config/number-of-shared-audio-tags.d.ts +2 -0
  71. package/dist/config/number-of-shared-audio-tags.js +12 -0
  72. package/dist/config/open-browser.d.ts +2 -0
  73. package/dist/config/open-browser.js +15 -0
  74. package/dist/config/output-location.d.ts +2 -0
  75. package/dist/config/output-location.js +16 -0
  76. package/dist/config/override-webpack.d.ts +5 -0
  77. package/dist/config/override-webpack.js +14 -0
  78. package/dist/config/overwrite.d.ts +4 -0
  79. package/dist/config/overwrite.js +13 -0
  80. package/dist/config/pixel-format.d.ts +3 -0
  81. package/dist/config/pixel-format.js +16 -0
  82. package/dist/config/preview-server.d.ts +2 -0
  83. package/dist/config/preview-server.js +20 -0
  84. package/dist/config/prores-profile.d.ts +3 -0
  85. package/dist/config/prores-profile.js +12 -0
  86. package/dist/config/public-dir.d.ts +2 -0
  87. package/dist/config/public-dir.js +12 -0
  88. package/dist/config/quality.d.ts +2 -0
  89. package/dist/config/quality.js +17 -0
  90. package/dist/config/scale.d.ts +3 -0
  91. package/dist/config/scale.js +15 -0
  92. package/dist/config/still-frame.d.ts +2 -0
  93. package/dist/config/still-frame.js +16 -0
  94. package/dist/config/timeout.d.ts +2 -0
  95. package/dist/config/timeout.js +17 -0
  96. package/dist/config/webpack-caching.d.ts +3 -0
  97. package/dist/config/webpack-caching.js +16 -0
  98. package/dist/config/webpack-poll.d.ts +2 -0
  99. package/dist/config/webpack-poll.js +16 -0
  100. package/dist/config/width.d.ts +2 -0
  101. package/dist/config/width.js +16 -0
  102. package/dist/convert-entry-point-to-serve-url.d.ts +1 -0
  103. package/dist/convert-entry-point-to-serve-url.js +15 -0
  104. package/dist/determine-image-format.d.ts +12 -0
  105. package/dist/determine-image-format.js +61 -0
  106. package/dist/download-progress.d.ts +3 -2
  107. package/dist/download-progress.js +21 -6
  108. package/dist/editor/components/AudioWaveform.d.ts +1 -0
  109. package/dist/editor/components/AudioWaveform.js +10 -3
  110. package/dist/editor/components/AudioWaveformBar.d.ts +0 -0
  111. package/dist/editor/components/AudioWaveformBar.js +0 -0
  112. package/dist/editor/components/Canvas.d.ts +0 -0
  113. package/dist/editor/components/Canvas.js +206 -1
  114. package/dist/editor/components/CheckboardToggle.d.ts +0 -0
  115. package/dist/editor/components/CheckboardToggle.js +8 -1
  116. package/dist/editor/components/Checkbox.d.ts +6 -0
  117. package/dist/editor/components/Checkbox.js +42 -0
  118. package/dist/editor/components/ClipboardIcon.d.ts +0 -0
  119. package/dist/editor/components/ClipboardIcon.js +0 -0
  120. package/dist/editor/components/CollapsableOptions.d.ts +6 -0
  121. package/dist/editor/components/CollapsableOptions.js +35 -0
  122. package/dist/editor/components/CollapsedSidebarExpander.d.ts +5 -0
  123. package/dist/editor/components/{CollapsedCompositionSelector.js → CollapsedSidebarExpander.js} +9 -8
  124. package/dist/editor/components/CompositionSelector.d.ts +0 -0
  125. package/dist/editor/components/CompositionSelector.js +4 -4
  126. package/dist/editor/components/CompositionSelectorItem.d.ts +3 -3
  127. package/dist/editor/components/CompositionSelectorItem.js +27 -7
  128. package/dist/editor/components/ControlButton.d.ts +0 -0
  129. package/dist/editor/components/ControlButton.js +0 -0
  130. package/dist/editor/components/CopyButton.d.ts +0 -0
  131. package/dist/editor/components/CopyButton.js +4 -17
  132. package/dist/editor/components/CurrentComposition.d.ts +0 -0
  133. package/dist/editor/components/CurrentComposition.js +9 -19
  134. package/dist/editor/components/CurrentCompositionSideEffects.d.ts +3 -0
  135. package/dist/editor/components/CurrentCompositionSideEffects.js +51 -0
  136. package/dist/editor/components/Editor.d.ts +0 -0
  137. package/dist/editor/components/Editor.js +5 -96
  138. package/dist/editor/components/EditorContent.d.ts +0 -0
  139. package/dist/editor/components/EditorContent.js +1 -1
  140. package/dist/editor/components/EditorContexts.d.ts +4 -0
  141. package/dist/editor/components/EditorContexts.js +85 -0
  142. package/dist/editor/components/FpsCounter.d.ts +0 -0
  143. package/dist/editor/components/FpsCounter.js +0 -0
  144. package/dist/editor/components/FramePersistor.d.ts +0 -0
  145. package/dist/editor/components/FramePersistor.js +0 -0
  146. package/dist/editor/components/GlobalKeybindings.d.ts +0 -0
  147. package/dist/editor/components/GlobalKeybindings.js +49 -11
  148. package/dist/editor/components/InitialCompositionLoader.d.ts +2 -2
  149. package/dist/editor/components/InitialCompositionLoader.js +30 -4
  150. package/dist/editor/components/InlineAction.d.ts +5 -0
  151. package/dist/editor/components/InlineAction.js +35 -0
  152. package/dist/editor/components/KeyboardShortcutsExplainer.d.ts +2 -0
  153. package/dist/editor/components/KeyboardShortcutsExplainer.js +57 -0
  154. package/dist/editor/components/LoopToggle.d.ts +0 -0
  155. package/dist/editor/components/LoopToggle.js +0 -0
  156. package/dist/editor/components/Menu/MenuDivider.d.ts +0 -0
  157. package/dist/editor/components/Menu/MenuDivider.js +0 -0
  158. package/dist/editor/components/Menu/MenuItem.d.ts +3 -2
  159. package/dist/editor/components/Menu/MenuItem.js +21 -4
  160. package/dist/editor/components/Menu/MenuSubItem.d.ts +0 -0
  161. package/dist/editor/components/Menu/MenuSubItem.js +5 -3
  162. package/dist/editor/components/Menu/SubMenu.d.ts +0 -0
  163. package/dist/editor/components/Menu/SubMenu.js +0 -0
  164. package/dist/editor/components/Menu/is-menu-item.d.ts +5 -0
  165. package/dist/editor/components/Menu/is-menu-item.js +14 -0
  166. package/dist/editor/components/Menu/portals.d.ts +0 -0
  167. package/dist/editor/components/Menu/portals.js +0 -0
  168. package/dist/editor/components/Menu/styles.d.ts +5 -2
  169. package/dist/editor/components/Menu/styles.js +12 -5
  170. package/dist/editor/components/MenuBuildIndicator.d.ts +0 -0
  171. package/dist/editor/components/MenuBuildIndicator.js +0 -0
  172. package/dist/editor/components/MenuToolbar.d.ts +0 -0
  173. package/dist/editor/components/MenuToolbar.js +5 -422
  174. package/dist/editor/components/ModalContainer.d.ts +0 -0
  175. package/dist/editor/components/ModalContainer.js +0 -0
  176. package/dist/editor/components/ModalHeader.d.ts +0 -0
  177. package/dist/editor/components/ModalHeader.js +6 -2
  178. package/dist/editor/components/Modals.d.ts +2 -0
  179. package/dist/editor/components/Modals.js +23 -0
  180. package/dist/editor/components/MuteToggle.d.ts +0 -0
  181. package/dist/editor/components/MuteToggle.js +0 -0
  182. package/dist/editor/components/NewComposition/CancelButton.d.ts +0 -0
  183. package/dist/editor/components/NewComposition/CancelButton.js +3 -0
  184. package/dist/editor/components/NewComposition/ComboBox.d.ts +2 -1
  185. package/dist/editor/components/NewComposition/ComboBox.js +50 -5
  186. package/dist/editor/components/NewComposition/CopyHint.d.ts +0 -0
  187. package/dist/editor/components/NewComposition/CopyHint.js +0 -0
  188. package/dist/editor/components/NewComposition/InputDragger.d.ts +4 -0
  189. package/dist/editor/components/NewComposition/InputDragger.js +33 -9
  190. package/dist/editor/components/NewComposition/MenuContent.d.ts +0 -0
  191. package/dist/editor/components/NewComposition/MenuContent.js +60 -8
  192. package/dist/editor/components/NewComposition/NewCompAspectRatio.d.ts +0 -0
  193. package/dist/editor/components/NewComposition/NewCompAspectRatio.js +0 -0
  194. package/dist/editor/components/NewComposition/NewCompCode.d.ts +0 -0
  195. package/dist/editor/components/NewComposition/NewCompCode.js +0 -0
  196. package/dist/editor/components/NewComposition/NewCompDuration.d.ts +0 -0
  197. package/dist/editor/components/NewComposition/NewCompDuration.js +5 -3
  198. package/dist/editor/components/NewComposition/NewComposition.d.ts +0 -0
  199. package/dist/editor/components/NewComposition/NewComposition.js +8 -5
  200. package/dist/editor/components/NewComposition/RemInput.d.ts +14 -1
  201. package/dist/editor/components/NewComposition/RemInput.js +24 -10
  202. package/dist/editor/components/NewComposition/RemTextarea.d.ts +7 -0
  203. package/dist/editor/components/NewComposition/RemTextarea.js +92 -0
  204. package/dist/editor/components/NewComposition/ToggleAspectRatio.d.ts +0 -0
  205. package/dist/editor/components/NewComposition/ToggleAspectRatio.js +0 -0
  206. package/dist/editor/components/NewComposition/ValidationMessage.d.ts +2 -0
  207. package/dist/editor/components/NewComposition/ValidationMessage.js +16 -6
  208. package/dist/editor/components/NewComposition/new-comp-layout.d.ts +0 -0
  209. package/dist/editor/components/NewComposition/new-comp-layout.js +0 -0
  210. package/dist/editor/components/NewComposition/render-aspect-ratio.d.ts +0 -0
  211. package/dist/editor/components/NewComposition/render-aspect-ratio.js +0 -0
  212. package/dist/editor/components/NoRegisterRoot.d.ts +0 -0
  213. package/dist/editor/components/NoRegisterRoot.js +0 -0
  214. package/dist/editor/components/Notifications/ColorDot.d.ts +4 -0
  215. package/dist/editor/components/Notifications/ColorDot.js +22 -0
  216. package/dist/editor/components/Notifications/Notification.d.ts +8 -0
  217. package/dist/editor/components/Notifications/Notification.js +31 -0
  218. package/dist/editor/components/Notifications/NotificationCenter.d.ts +14 -0
  219. package/dist/editor/components/Notifications/NotificationCenter.js +50 -0
  220. package/dist/editor/components/Notifications/ServerDisconnected.d.ts +6 -0
  221. package/dist/editor/components/Notifications/ServerDisconnected.js +50 -0
  222. package/dist/editor/components/PlayPause.d.ts +0 -0
  223. package/dist/editor/components/PlayPause.js +111 -29
  224. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts +0 -0
  225. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +30 -21
  226. package/dist/editor/components/PlaybackRatePersistor.d.ts +0 -0
  227. package/dist/editor/components/PlaybackRatePersistor.js +0 -0
  228. package/dist/editor/components/PlaybackRateSelector.d.ts +0 -0
  229. package/dist/editor/components/PlaybackRateSelector.js +6 -0
  230. package/dist/editor/components/Preview.d.ts +1 -0
  231. package/dist/editor/components/Preview.js +17 -9
  232. package/dist/editor/components/PreviewToolbar.d.ts +0 -0
  233. package/dist/editor/components/PreviewToolbar.js +5 -3
  234. package/dist/editor/components/QuickSwitcher/AlgoliaCredit.d.ts +2 -0
  235. package/dist/editor/components/QuickSwitcher/AlgoliaCredit.js +11 -0
  236. package/dist/editor/components/QuickSwitcher/NoResults.d.ts +6 -0
  237. package/dist/editor/components/QuickSwitcher/NoResults.js +20 -0
  238. package/dist/editor/components/QuickSwitcher/QuickSwitcher.d.ts +7 -0
  239. package/dist/editor/components/QuickSwitcher/QuickSwitcher.js +16 -0
  240. package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.d.ts +6 -0
  241. package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +273 -0
  242. package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.d.ts +21 -0
  243. package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +111 -0
  244. package/dist/editor/components/QuickSwitcher/algolia-search.d.ts +29 -0
  245. package/dist/editor/components/QuickSwitcher/algolia-search.js +63 -0
  246. package/dist/editor/components/QuickSwitcher/fuzzy-search.d.ts +2 -0
  247. package/dist/editor/components/QuickSwitcher/fuzzy-search.js +26 -0
  248. package/dist/editor/components/RenderButton.d.ts +6 -0
  249. package/dist/editor/components/RenderButton.js +74 -0
  250. package/dist/editor/components/RenderModal/CliCopyButton.d.ts +4 -0
  251. package/dist/editor/components/RenderModal/CliCopyButton.js +22 -0
  252. package/dist/editor/components/RenderModal/CrfSetting.d.ts +16 -0
  253. package/dist/editor/components/RenderModal/CrfSetting.js +43 -0
  254. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.d.ts +8 -0
  255. package/dist/editor/components/RenderModal/EnforceAudioTrackSetting.js +16 -0
  256. package/dist/editor/components/RenderModal/EnvInput.d.ts +11 -0
  257. package/dist/editor/components/RenderModal/EnvInput.js +74 -0
  258. package/dist/editor/components/RenderModal/FrameRangeSetting.d.ts +8 -0
  259. package/dist/editor/components/RenderModal/FrameRangeSetting.js +42 -0
  260. package/dist/editor/components/RenderModal/GuiRenderStatus.d.ts +5 -0
  261. package/dist/editor/components/RenderModal/GuiRenderStatus.js +78 -0
  262. package/dist/editor/components/RenderModal/InfoBubble.d.ts +5 -0
  263. package/dist/editor/components/RenderModal/InfoBubble.js +115 -0
  264. package/dist/editor/components/RenderModal/InfoTooltip.d.ts +5 -0
  265. package/dist/editor/components/RenderModal/InfoTooltip.js +40 -0
  266. package/dist/editor/components/RenderModal/InlineEyeIcon.d.ts +5 -0
  267. package/dist/editor/components/RenderModal/InlineEyeIcon.js +14 -0
  268. package/dist/editor/components/RenderModal/InlineRemoveButton.d.ts +4 -0
  269. package/dist/editor/components/RenderModal/InlineRemoveButton.js +12 -0
  270. package/dist/editor/components/RenderModal/JpegQualitySetting.d.ts +5 -0
  271. package/dist/editor/components/RenderModal/JpegQualitySetting.js +12 -0
  272. package/dist/editor/components/RenderModal/MutedSetting.d.ts +8 -0
  273. package/dist/editor/components/RenderModal/MutedSetting.js +16 -0
  274. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.d.ts +5 -0
  275. package/dist/editor/components/RenderModal/NumberOfLoopsSetting.js +26 -0
  276. package/dist/editor/components/RenderModal/NumberSetting.d.ts +12 -0
  277. package/dist/editor/components/RenderModal/NumberSetting.js +29 -0
  278. package/dist/editor/components/RenderModal/OptionExplainer.d.ts +5 -0
  279. package/dist/editor/components/RenderModal/OptionExplainer.js +45 -0
  280. package/dist/editor/components/RenderModal/RenderModal.d.ts +34 -0
  281. package/dist/editor/components/RenderModal/RenderModal.js +566 -0
  282. package/dist/editor/components/RenderModal/RenderModalAdvanced.d.ts +26 -0
  283. package/dist/editor/components/RenderModal/RenderModalAdvanced.js +59 -0
  284. package/dist/editor/components/RenderModal/RenderModalAudio.d.ts +17 -0
  285. package/dist/editor/components/RenderModal/RenderModalAudio.js +48 -0
  286. package/dist/editor/components/RenderModal/RenderModalBasic.d.ts +23 -0
  287. package/dist/editor/components/RenderModal/RenderModalBasic.js +79 -0
  288. package/dist/editor/components/RenderModal/RenderModalData.d.ts +9 -0
  289. package/dist/editor/components/RenderModal/RenderModalData.js +61 -0
  290. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.d.ts +5 -0
  291. package/dist/editor/components/RenderModal/RenderModalEnvironmentVariables.js +55 -0
  292. package/dist/editor/components/RenderModal/RenderModalGif.d.ts +9 -0
  293. package/dist/editor/components/RenderModal/RenderModalGif.js +19 -0
  294. package/dist/editor/components/RenderModal/RenderModalHr.d.ts +2 -0
  295. package/dist/editor/components/RenderModal/RenderModalHr.js +18 -0
  296. package/dist/editor/components/RenderModal/RenderModalInput.d.ts +10 -0
  297. package/dist/editor/components/RenderModal/RenderModalInput.js +13 -0
  298. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.d.ts +9 -0
  299. package/dist/editor/components/RenderModal/RenderModalJSONInputPropsEditor.js +96 -0
  300. package/dist/editor/components/RenderModal/RenderModalPicture.d.ts +28 -0
  301. package/dist/editor/components/RenderModal/RenderModalPicture.js +56 -0
  302. package/dist/editor/components/RenderModal/RenderStatusModal.d.ts +4 -0
  303. package/dist/editor/components/RenderModal/RenderStatusModal.js +72 -0
  304. package/dist/editor/components/RenderModal/ScaleSetting.d.ts +5 -0
  305. package/dist/editor/components/RenderModal/ScaleSetting.js +17 -0
  306. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +12 -0
  307. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +70 -0
  308. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.d.ts +2 -0
  309. package/dist/editor/components/RenderModal/SchemaEditor/SchemaEmptyStateGraphic.js +15 -0
  310. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +15 -0
  311. package/dist/editor/components/RenderModal/SchemaEditor/SchemaLabel.js +43 -0
  312. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.d.ts +4 -0
  313. package/dist/editor/components/RenderModal/SchemaEditor/SchemaResetButton.js +12 -0
  314. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.d.ts +4 -0
  315. package/dist/editor/components/RenderModal/SchemaEditor/SchemaSaveButton.js +12 -0
  316. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.d.ts +14 -0
  317. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayEditor.js +70 -0
  318. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.d.ts +13 -0
  319. package/dist/editor/components/RenderModal/SchemaEditor/ZodArrayItemEditor.js +28 -0
  320. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +12 -0
  321. package/dist/editor/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +27 -0
  322. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.d.ts +14 -0
  323. package/dist/editor/components/RenderModal/SchemaEditor/ZodDateEditor.js +76 -0
  324. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.d.ts +14 -0
  325. package/dist/editor/components/RenderModal/SchemaEditor/ZodEffectEditor.js +51 -0
  326. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +14 -0
  327. package/dist/editor/components/RenderModal/SchemaEditor/ZodEnumEditor.js +68 -0
  328. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +5 -0
  329. package/dist/editor/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -0
  330. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.d.ts +8 -0
  331. package/dist/editor/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +23 -0
  332. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.d.ts +14 -0
  333. package/dist/editor/components/RenderModal/SchemaEditor/ZodNumberEditor.js +89 -0
  334. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.d.ts +14 -0
  335. package/dist/editor/components/RenderModal/SchemaEditor/ZodObjectEditor.js +57 -0
  336. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.d.ts +14 -0
  337. package/dist/editor/components/RenderModal/SchemaEditor/ZodStringEditor.js +43 -0
  338. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.d.ts +14 -0
  339. package/dist/editor/components/RenderModal/SchemaEditor/ZodSwitch.js +61 -0
  340. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.d.ts +2 -0
  341. package/dist/editor/components/RenderModal/SchemaEditor/date-serialization.js +21 -0
  342. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.d.ts +2 -0
  343. package/dist/editor/components/RenderModal/SchemaEditor/get-schema-label.js +15 -0
  344. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.d.ts +1 -0
  345. package/dist/editor/components/RenderModal/SchemaEditor/zod-types.js +2 -0
  346. package/dist/editor/components/RenderModal/human-readable-audio-codecs.d.ts +2 -0
  347. package/dist/editor/components/RenderModal/human-readable-audio-codecs.js +18 -0
  348. package/dist/editor/components/RenderModal/human-readable-codec.d.ts +2 -0
  349. package/dist/editor/components/RenderModal/human-readable-codec.js +36 -0
  350. package/dist/editor/components/RenderModal/layout.d.ts +7 -0
  351. package/dist/editor/components/RenderModal/layout.js +46 -0
  352. package/dist/editor/components/RenderModal/out-name-checker.d.ts +15 -0
  353. package/dist/editor/components/RenderModal/out-name-checker.js +79 -0
  354. package/dist/editor/components/RenderQueue/CircularProgress.d.ts +5 -0
  355. package/dist/editor/components/RenderQueue/CircularProgress.js +18 -0
  356. package/dist/editor/components/RenderQueue/RenderQueueError.d.ts +5 -0
  357. package/dist/editor/components/RenderQueue/RenderQueueError.js +26 -0
  358. package/dist/editor/components/RenderQueue/RenderQueueItem.d.ts +5 -0
  359. package/dist/editor/components/RenderQueue/RenderQueueItem.js +40 -0
  360. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.d.ts +5 -0
  361. package/dist/editor/components/RenderQueue/RenderQueueItemCancelButton.js +22 -0
  362. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.d.ts +5 -0
  363. package/dist/editor/components/RenderQueue/RenderQueueItemStatus.js +43 -0
  364. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.d.ts +5 -0
  365. package/dist/editor/components/RenderQueue/RenderQueueOpenInFolder.js +22 -0
  366. package/dist/editor/components/RenderQueue/RenderQueueOutputName.d.ts +5 -0
  367. package/dist/editor/components/RenderQueue/RenderQueueOutputName.js +26 -0
  368. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.d.ts +5 -0
  369. package/dist/editor/components/RenderQueue/RenderQueueProgressMessage.js +26 -0
  370. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.d.ts +5 -0
  371. package/dist/editor/components/RenderQueue/RenderQueueRemoveItem.js +33 -0
  372. package/dist/editor/components/RenderQueue/RenderQueueRepeat.d.ts +5 -0
  373. package/dist/editor/components/RenderQueue/RenderQueueRepeat.js +22 -0
  374. package/dist/editor/components/RenderQueue/SuccessIcon.d.ts +2 -0
  375. package/dist/editor/components/RenderQueue/SuccessIcon.js +14 -0
  376. package/dist/editor/components/RenderQueue/actions.d.ts +59 -0
  377. package/dist/editor/components/RenderQueue/actions.js +114 -0
  378. package/dist/editor/components/RenderQueue/context.d.ts +18 -0
  379. package/dist/editor/components/RenderQueue/context.js +49 -0
  380. package/dist/editor/components/RenderQueue/index.d.ts +2 -0
  381. package/dist/editor/components/RenderQueue/index.js +19 -0
  382. package/dist/editor/components/RenderQueue/item-style.d.ts +2 -0
  383. package/dist/editor/components/RenderQueue/item-style.js +21 -0
  384. package/dist/editor/components/RenderToolbarIcon.d.ts +2 -0
  385. package/dist/editor/components/RenderToolbarIcon.js +84 -0
  386. package/dist/editor/components/RendersTab.d.ts +6 -0
  387. package/dist/editor/components/RendersTab.js +43 -0
  388. package/dist/editor/components/ResetZoomButton.d.ts +4 -0
  389. package/dist/editor/components/ResetZoomButton.js +9 -0
  390. package/dist/editor/components/RightPanel.d.ts +8 -0
  391. package/dist/editor/components/RightPanel.js +82 -0
  392. package/dist/editor/components/SegmentedControl.d.ts +16 -0
  393. package/dist/editor/components/SegmentedControl.js +63 -0
  394. package/dist/editor/components/SizeSelector.d.ts +2 -1
  395. package/dist/editor/components/SizeSelector.js +59 -18
  396. package/dist/editor/components/Splitter/SplitterContainer.d.ts +0 -0
  397. package/dist/editor/components/Splitter/SplitterContainer.js +0 -0
  398. package/dist/editor/components/Splitter/SplitterContext.d.ts +0 -0
  399. package/dist/editor/components/Splitter/SplitterContext.js +0 -0
  400. package/dist/editor/components/Splitter/SplitterElement.d.ts +0 -0
  401. package/dist/editor/components/Splitter/SplitterElement.js +1 -0
  402. package/dist/editor/components/Splitter/SplitterHandle.d.ts +1 -1
  403. package/dist/editor/components/Splitter/SplitterHandle.js +9 -1
  404. package/dist/editor/components/Tabs/index.d.ts +11 -0
  405. package/dist/editor/components/Tabs/index.js +51 -0
  406. package/dist/editor/components/TimeValue.d.ts +0 -0
  407. package/dist/editor/components/TimeValue.js +9 -5
  408. package/dist/editor/components/Timeline/LoopedIndicator.d.ts +0 -0
  409. package/dist/editor/components/Timeline/LoopedIndicator.js +0 -0
  410. package/dist/editor/components/Timeline/LoopedTimelineIndicators.d.ts +0 -0
  411. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +0 -0
  412. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
  413. package/dist/editor/components/Timeline/MaxTimelineTracks.js +7 -5
  414. package/dist/editor/components/Timeline/Timeline.d.ts +0 -0
  415. package/dist/editor/components/Timeline/Timeline.js +22 -9
  416. package/dist/editor/components/Timeline/TimelineCollapseToggle.d.ts +1 -0
  417. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +4 -5
  418. package/dist/editor/components/Timeline/TimelineDragHandler.d.ts +0 -0
  419. package/dist/editor/components/Timeline/TimelineDragHandler.js +123 -25
  420. package/dist/editor/components/Timeline/TimelineInOutPointer.d.ts +0 -0
  421. package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -1
  422. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.d.ts +0 -0
  423. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +0 -0
  424. package/dist/editor/components/Timeline/TimelineList.d.ts +0 -0
  425. package/dist/editor/components/Timeline/TimelineList.js +7 -4
  426. package/dist/editor/components/Timeline/TimelineListItem.d.ts +1 -0
  427. package/dist/editor/components/Timeline/TimelineListItem.js +11 -5
  428. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.d.ts +2 -0
  429. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +76 -0
  430. package/dist/editor/components/Timeline/TimelineScrollable.d.ts +4 -0
  431. package/dist/editor/components/Timeline/TimelineScrollable.js +26 -0
  432. package/dist/editor/components/Timeline/TimelineSequence.d.ts +0 -0
  433. package/dist/editor/components/Timeline/TimelineSequence.js +2 -14
  434. package/dist/editor/components/Timeline/TimelineSequenceFrame.d.ts +0 -0
  435. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +2 -1
  436. package/dist/editor/components/Timeline/TimelineSlider.d.ts +3 -0
  437. package/dist/editor/components/Timeline/TimelineSlider.js +35 -2
  438. package/dist/editor/components/Timeline/TimelineSliderHandle.d.ts +0 -0
  439. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -3
  440. package/dist/editor/components/Timeline/TimelineTimeIndicators.d.ts +5 -0
  441. package/dist/editor/components/Timeline/TimelineTimeIndicators.js +168 -0
  442. package/dist/editor/components/Timeline/TimelineTracks.d.ts +0 -0
  443. package/dist/editor/components/Timeline/TimelineTracks.js +14 -9
  444. package/dist/editor/components/Timeline/TimelineVideoInfo.d.ts +0 -0
  445. package/dist/editor/components/Timeline/TimelineVideoInfo.js +0 -0
  446. package/dist/editor/components/Timeline/TimelineZoomControls.d.ts +2 -0
  447. package/dist/editor/components/Timeline/TimelineZoomControls.js +44 -0
  448. package/dist/editor/components/Timeline/imperative-state.d.ts +12 -0
  449. package/dist/editor/components/Timeline/imperative-state.js +39 -0
  450. package/dist/editor/components/Timeline/is-collapsed.d.ts +0 -0
  451. package/dist/editor/components/Timeline/is-collapsed.js +2 -3
  452. package/dist/editor/components/Timeline/timeline-refs.d.ts +2 -0
  453. package/dist/editor/components/Timeline/timeline-refs.js +3 -1
  454. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +44 -0
  455. package/dist/editor/components/Timeline/timeline-scroll-logic.js +218 -0
  456. package/dist/editor/components/Timeline/timeline-state-reducer.d.ts +0 -0
  457. package/dist/editor/components/Timeline/timeline-state-reducer.js +0 -0
  458. package/dist/editor/components/TimelineInOutToggle.d.ts +2 -2
  459. package/dist/editor/components/TimelineInOutToggle.js +92 -21
  460. package/dist/editor/components/TopPanel.d.ts +0 -0
  461. package/dist/editor/components/TopPanel.js +35 -16
  462. package/dist/editor/components/UpdateCheck.d.ts +0 -0
  463. package/dist/editor/components/UpdateCheck.js +0 -0
  464. package/dist/editor/components/UpdateModal/UpdateModal.d.ts +0 -0
  465. package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
  466. package/dist/editor/components/ZoomPersistor.d.ts +4 -0
  467. package/dist/editor/components/ZoomPersistor.js +37 -0
  468. package/dist/editor/components/layout.d.ts +2 -1
  469. package/dist/editor/components/layout.js +4 -3
  470. package/dist/editor/helpers/calculate-timeline.d.ts +0 -0
  471. package/dist/editor/helpers/calculate-timeline.js +0 -0
  472. package/dist/editor/helpers/checkerboard-background.d.ts +0 -0
  473. package/dist/editor/helpers/checkerboard-background.js +0 -0
  474. package/dist/editor/helpers/client-id.d.ts +17 -0
  475. package/dist/editor/helpers/client-id.js +46 -0
  476. package/dist/editor/helpers/colors.d.ts +5 -1
  477. package/dist/editor/helpers/colors.js +5 -1
  478. package/dist/editor/helpers/convert-env-variables.d.ts +2 -0
  479. package/dist/editor/helpers/convert-env-variables.js +20 -0
  480. package/dist/editor/helpers/copy-text.d.ts +1 -1
  481. package/dist/editor/helpers/copy-text.js +5 -4
  482. package/dist/editor/helpers/create-folder-tree.d.ts +2 -2
  483. package/dist/editor/helpers/create-folder-tree.js +0 -0
  484. package/dist/editor/helpers/get-effective-translation.d.ts +26 -0
  485. package/dist/editor/helpers/get-effective-translation.js +45 -0
  486. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +1 -0
  487. package/dist/editor/helpers/get-left-of-timeline-slider.js +7 -4
  488. package/dist/editor/helpers/get-sequence-visible-range.d.ts +0 -0
  489. package/dist/editor/helpers/get-sequence-visible-range.js +0 -0
  490. package/dist/editor/helpers/get-timeline-nestedness.d.ts +0 -0
  491. package/dist/editor/helpers/get-timeline-nestedness.js +0 -0
  492. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts +0 -0
  493. package/dist/editor/helpers/get-timeline-sequence-hash.js +0 -0
  494. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +2 -2
  495. package/dist/editor/helpers/get-timeline-sequence-layout.js +29 -9
  496. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +0 -0
  497. package/dist/editor/helpers/get-timeline-sequence-sort-key.js +0 -0
  498. package/dist/editor/helpers/is-composition-still.d.ts +2 -2
  499. package/dist/editor/helpers/is-composition-still.js +3 -0
  500. package/dist/editor/helpers/is-current-selected-still.d.ts +4 -0
  501. package/dist/editor/helpers/is-current-selected-still.js +15 -1
  502. package/dist/editor/helpers/noop.d.ts +0 -0
  503. package/dist/editor/helpers/noop.js +0 -0
  504. package/dist/editor/helpers/open-in-editor.d.ts +2 -0
  505. package/dist/editor/helpers/open-in-editor.js +22 -0
  506. package/dist/editor/helpers/persist-open-folders.d.ts +0 -0
  507. package/dist/editor/helpers/persist-open-folders.js +0 -0
  508. package/dist/editor/helpers/pick-color.d.ts +1 -0
  509. package/dist/editor/helpers/pick-color.js +36 -0
  510. package/dist/editor/helpers/prores-labels.d.ts +2 -0
  511. package/dist/editor/helpers/prores-labels.js +25 -0
  512. package/dist/editor/helpers/render-modal-sections.d.ts +10 -0
  513. package/dist/editor/helpers/render-modal-sections.js +32 -0
  514. package/dist/editor/helpers/timeline-layout.d.ts +0 -0
  515. package/dist/editor/helpers/timeline-layout.js +0 -0
  516. package/dist/editor/helpers/use-breakpoint.d.ts +1 -0
  517. package/dist/editor/helpers/{use-compact-ui.js → use-breakpoint.js} +4 -5
  518. package/dist/editor/helpers/use-file-existence.d.ts +1 -0
  519. package/dist/editor/helpers/use-file-existence.js +66 -0
  520. package/dist/editor/helpers/use-keybinding.d.ts +9 -1
  521. package/dist/editor/helpers/use-keybinding.js +34 -6
  522. package/dist/editor/helpers/use-menu-structure.d.ts +7 -0
  523. package/dist/editor/helpers/use-menu-structure.js +717 -0
  524. package/dist/editor/helpers/validate-new-comp-data.d.ts +2 -2
  525. package/dist/editor/helpers/validate-new-comp-data.js +0 -0
  526. package/dist/editor/icons/Checkmark.d.ts +0 -0
  527. package/dist/editor/icons/Checkmark.js +1 -1
  528. package/dist/editor/icons/RenderStillIcon.d.ts +3 -0
  529. package/dist/editor/icons/RenderStillIcon.js +8 -0
  530. package/dist/editor/icons/audio.d.ts +2 -0
  531. package/dist/editor/icons/audio.js +6 -0
  532. package/dist/editor/icons/caret.d.ts +1 -0
  533. package/dist/editor/icons/caret.js +3 -1
  534. package/dist/editor/icons/data.d.ts +2 -0
  535. package/dist/editor/icons/data.js +8 -0
  536. package/dist/editor/icons/file.d.ts +2 -0
  537. package/dist/editor/icons/file.js +6 -0
  538. package/dist/editor/icons/folder.d.ts +6 -2
  539. package/dist/editor/icons/folder.js +4 -4
  540. package/dist/editor/icons/frame.d.ts +2 -0
  541. package/dist/editor/icons/frame.js +6 -0
  542. package/dist/editor/icons/gear.d.ts +2 -0
  543. package/dist/editor/icons/gear.js +6 -0
  544. package/dist/editor/icons/gif.d.ts +2 -0
  545. package/dist/editor/icons/gif.js +6 -0
  546. package/dist/editor/icons/jump-to-start.d.ts +0 -0
  547. package/dist/editor/icons/jump-to-start.js +0 -0
  548. package/dist/editor/icons/keys.d.ts +0 -0
  549. package/dist/editor/icons/keys.js +0 -0
  550. package/dist/editor/icons/lock.d.ts +0 -0
  551. package/dist/editor/icons/lock.js +0 -0
  552. package/dist/editor/icons/media-volume.d.ts +0 -0
  553. package/dist/editor/icons/media-volume.js +0 -0
  554. package/dist/editor/icons/{film.d.ts → minus.d.ts} +1 -1
  555. package/dist/editor/icons/minus.js +8 -0
  556. package/dist/editor/icons/pause.d.ts +0 -0
  557. package/dist/editor/icons/pause.js +0 -0
  558. package/dist/editor/icons/play.d.ts +0 -0
  559. package/dist/editor/icons/play.js +0 -0
  560. package/dist/editor/icons/plus.d.ts +3 -0
  561. package/dist/editor/icons/plus.js +8 -0
  562. package/dist/editor/icons/render.d.ts +5 -0
  563. package/dist/editor/icons/render.js +8 -0
  564. package/dist/editor/icons/step-back.d.ts +0 -0
  565. package/dist/editor/icons/step-back.js +0 -0
  566. package/dist/editor/icons/step-forward.d.ts +0 -0
  567. package/dist/editor/icons/step-forward.js +0 -0
  568. package/dist/editor/icons/still.d.ts +3 -1
  569. package/dist/editor/icons/still.js +2 -2
  570. package/dist/editor/icons/timelineInOutPointer.d.ts +0 -0
  571. package/dist/editor/icons/timelineInOutPointer.js +0 -0
  572. package/dist/editor/icons/video.d.ts +5 -0
  573. package/dist/editor/icons/video.js +8 -0
  574. package/dist/editor/state/aspect-ratio-locked.d.ts +0 -0
  575. package/dist/editor/state/aspect-ratio-locked.js +0 -0
  576. package/dist/editor/state/checkerboard.d.ts +0 -0
  577. package/dist/editor/state/checkerboard.js +0 -0
  578. package/dist/editor/state/editor-zoom-gestures.d.ts +9 -0
  579. package/dist/editor/state/editor-zoom-gestures.js +17 -0
  580. package/dist/editor/state/folders.d.ts +0 -0
  581. package/dist/editor/state/folders.js +0 -0
  582. package/dist/editor/state/highest-z-index.d.ts +0 -0
  583. package/dist/editor/state/highest-z-index.js +0 -0
  584. package/dist/editor/state/in-out.d.ts +12 -0
  585. package/dist/editor/state/in-out.js +23 -0
  586. package/dist/editor/state/input-dragger-click-lock.d.ts +0 -0
  587. package/dist/editor/state/input-dragger-click-lock.js +0 -0
  588. package/dist/editor/state/keybindings.d.ts +0 -0
  589. package/dist/editor/state/keybindings.js +3 -1
  590. package/dist/editor/state/loop.d.ts +0 -0
  591. package/dist/editor/state/loop.js +0 -0
  592. package/dist/editor/state/marks.d.ts +0 -0
  593. package/dist/editor/state/marks.js +0 -0
  594. package/dist/editor/state/modals.d.ts +41 -1
  595. package/dist/editor/state/modals.js +0 -0
  596. package/dist/editor/state/mute.d.ts +0 -0
  597. package/dist/editor/state/mute.js +0 -0
  598. package/dist/editor/state/playbackrate.d.ts +0 -0
  599. package/dist/editor/state/playbackrate.js +0 -0
  600. package/dist/editor/state/preview-size.d.ts +5 -2
  601. package/dist/editor/state/preview-size.js +49 -5
  602. package/dist/editor/state/render-frame.d.ts +0 -0
  603. package/dist/editor/state/render-frame.js +12 -3
  604. package/dist/editor/state/sidebar.d.ts +6 -3
  605. package/dist/editor/state/sidebar.js +28 -13
  606. package/dist/editor/state/timeline-ref.d.ts +0 -0
  607. package/dist/editor/state/timeline-ref.js +0 -0
  608. package/dist/editor/state/timeline-zoom.d.ts +10 -0
  609. package/dist/editor/state/timeline-zoom.js +38 -0
  610. package/dist/editor/state/timeline.d.ts +0 -0
  611. package/dist/editor/state/timeline.js +0 -0
  612. package/dist/editor/state/z-index.d.ts +0 -0
  613. package/dist/editor/state/z-index.js +38 -12
  614. package/dist/entry-point.d.ts +5 -0
  615. package/dist/entry-point.js +89 -0
  616. package/dist/event-source-events.d.ts +28 -0
  617. package/dist/event-source-events.js +2 -0
  618. package/dist/event-source.d.ts +3 -0
  619. package/dist/event-source.js +59 -0
  620. package/dist/ffmpeg.d.ts +2 -0
  621. package/dist/ffmpeg.js +21 -0
  622. package/dist/file-watcher.d.ts +9 -0
  623. package/dist/file-watcher.js +35 -0
  624. package/dist/format-bytes.d.ts +6 -0
  625. package/dist/format-bytes.js +103 -0
  626. package/dist/get-audio-codec.d.ts +2 -0
  627. package/dist/get-audio-codec.js +10 -0
  628. package/dist/get-cli-options.d.ts +18 -11
  629. package/dist/get-cli-options.js +54 -117
  630. package/dist/get-composition-id.d.ts +11 -2
  631. package/dist/get-composition-id.js +44 -8
  632. package/dist/get-composition-with-dimension-override.d.ts +13 -0
  633. package/dist/get-composition-with-dimension-override.js +20 -0
  634. package/dist/get-config-file-name.d.ts +1 -1
  635. package/dist/get-config-file-name.js +9 -6
  636. package/dist/get-default-out-name.d.ts +5 -0
  637. package/dist/get-default-out-name.js +10 -0
  638. package/dist/get-env.d.ts +1 -1
  639. package/dist/get-env.js +55 -10
  640. package/dist/get-filename.d.ts +8 -4
  641. package/dist/get-filename.js +13 -27
  642. package/dist/get-final-output-codec.d.ts +11 -0
  643. package/dist/get-final-output-codec.js +60 -0
  644. package/dist/get-input-props.d.ts +1 -1
  645. package/dist/get-input-props.js +12 -1
  646. package/dist/get-latest-remotion-version.d.ts +0 -0
  647. package/dist/get-latest-remotion-version.js +0 -0
  648. package/dist/get-network-address.d.ts +1 -0
  649. package/dist/get-network-address.js +16 -0
  650. package/dist/handle-common-errors.d.ts +0 -0
  651. package/dist/handle-common-errors.js +28 -1
  652. package/dist/image-formats.d.ts +6 -3
  653. package/dist/image-formats.js +21 -9
  654. package/dist/index.d.ts +84 -20
  655. package/dist/index.js +59 -19
  656. package/dist/initialize-cli.d.ts +1 -0
  657. package/dist/initialize-cli.js +22 -0
  658. package/dist/is-javascript.d.ts +0 -0
  659. package/dist/is-javascript.js +0 -0
  660. package/dist/lambda-command.d.ts +1 -1
  661. package/dist/lambda-command.js +5 -8
  662. package/dist/list-of-remotion-packages.d.ts +1 -0
  663. package/dist/list-of-remotion-packages.js +27 -0
  664. package/dist/load-config.d.ts +1 -1
  665. package/dist/load-config.js +23 -22
  666. package/dist/log.d.ts +14 -0
  667. package/dist/log.js +27 -10
  668. package/dist/make-progress-bar.d.ts +0 -0
  669. package/dist/make-progress-bar.js +14 -1
  670. package/dist/parse-command-line.d.ts +25 -7
  671. package/dist/parse-command-line.js +63 -47
  672. package/dist/preview-server/api-routes.d.ts +4 -0
  673. package/dist/preview-server/api-routes.js +19 -0
  674. package/dist/preview-server/api-types.d.ts +28 -0
  675. package/dist/preview-server/api-types.js +2 -0
  676. package/dist/preview-server/dev-middleware/compatible-api.d.ts +0 -0
  677. package/dist/preview-server/dev-middleware/compatible-api.js +0 -0
  678. package/dist/preview-server/dev-middleware/get-paths.d.ts +0 -0
  679. package/dist/preview-server/dev-middleware/get-paths.js +0 -0
  680. package/dist/preview-server/dev-middleware/index.d.ts +0 -0
  681. package/dist/preview-server/dev-middleware/index.js +0 -0
  682. package/dist/preview-server/dev-middleware/is-color-supported.d.ts +0 -0
  683. package/dist/preview-server/dev-middleware/is-color-supported.js +0 -0
  684. package/dist/preview-server/dev-middleware/middleware.d.ts +0 -0
  685. package/dist/preview-server/dev-middleware/middleware.js +4 -5
  686. package/dist/preview-server/dev-middleware/range-parser.d.ts +0 -0
  687. package/dist/preview-server/dev-middleware/range-parser.js +0 -0
  688. package/dist/preview-server/dev-middleware/ready.d.ts +0 -0
  689. package/dist/preview-server/dev-middleware/ready.js +0 -0
  690. package/dist/preview-server/dev-middleware/setup-hooks.d.ts +0 -0
  691. package/dist/preview-server/dev-middleware/setup-hooks.js +15 -4
  692. package/dist/preview-server/dev-middleware/setup-output-filesystem.d.ts +0 -0
  693. package/dist/preview-server/dev-middleware/setup-output-filesystem.js +0 -0
  694. package/dist/preview-server/dev-middleware/types.d.ts +0 -0
  695. package/dist/preview-server/dev-middleware/types.js +0 -0
  696. package/dist/preview-server/env-supports-fs-recursive.d.ts +1 -0
  697. package/dist/preview-server/env-supports-fs-recursive.js +18 -0
  698. package/dist/preview-server/error-overlay/entry-basic.d.ts +0 -0
  699. package/dist/preview-server/error-overlay/entry-basic.js +2 -2
  700. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.d.ts +0 -0
  701. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.js +0 -0
  702. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +0 -0
  703. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +2 -2
  704. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.d.ts +0 -0
  705. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.js +0 -0
  706. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.d.ts +0 -0
  707. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.js +0 -0
  708. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +0 -0
  709. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.js +0 -0
  710. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.d.ts +0 -0
  711. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.js +0 -0
  712. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +0 -0
  713. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.js +0 -0
  714. package/dist/preview-server/error-overlay/react-overlay/index.d.ts +0 -0
  715. package/dist/preview-server/error-overlay/react-overlay/index.js +0 -0
  716. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +0 -0
  717. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +9 -1
  718. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -1
  719. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +3 -3
  720. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.d.ts +0 -0
  721. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.js +0 -0
  722. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.d.ts +0 -0
  723. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.js +0 -0
  724. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.d.ts +0 -0
  725. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.js +1 -3
  726. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +8 -4
  727. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +76 -34
  728. package/dist/preview-server/error-overlay/react-overlay/utils/parser.d.ts +0 -0
  729. package/dist/preview-server/error-overlay/react-overlay/utils/parser.js +0 -0
  730. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.d.ts +0 -0
  731. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.js +0 -0
  732. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.d.ts +0 -0
  733. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.js +0 -0
  734. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.d.ts +3 -1
  735. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +22 -2
  736. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +2 -0
  737. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +21 -11
  738. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.d.ts +0 -0
  739. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +2 -0
  740. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.d.ts +0 -0
  741. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.js +0 -0
  742. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +1 -0
  743. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +6 -2
  744. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +1 -0
  745. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +2 -2
  746. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.d.ts +4 -0
  747. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.js +69 -0
  748. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +0 -0
  749. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +5 -9
  750. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.d.ts +6 -0
  751. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +37 -0
  752. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
  753. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +24 -11
  754. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.d.ts +0 -0
  755. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +8 -7
  756. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +1 -0
  757. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +22 -2
  758. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.d.ts +6 -0
  759. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.js +31 -0
  760. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.d.ts +0 -0
  761. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +3 -1
  762. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.d.ts +0 -0
  763. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.js +0 -0
  764. package/dist/preview-server/error-overlay/remotion-overlay/carets.d.ts +4 -2
  765. package/dist/preview-server/error-overlay/remotion-overlay/carets.js +2 -2
  766. package/dist/preview-server/error-overlay/remotion-overlay/format-location.d.ts +0 -0
  767. package/dist/preview-server/error-overlay/remotion-overlay/format-location.js +0 -0
  768. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.d.ts +5 -0
  769. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.js +49 -0
  770. package/dist/preview-server/error-overlay/remotion-overlay/index.d.ts +0 -0
  771. package/dist/preview-server/error-overlay/remotion-overlay/index.js +0 -0
  772. package/dist/preview-server/file-existence-watchers.d.ts +13 -0
  773. package/dist/preview-server/file-existence-watchers.js +62 -0
  774. package/dist/preview-server/get-absolute-public-dir.d.ts +4 -0
  775. package/dist/preview-server/get-absolute-public-dir.js +14 -0
  776. package/dist/preview-server/get-package-manager.d.ts +2 -1
  777. package/dist/preview-server/get-package-manager.js +19 -3
  778. package/dist/preview-server/handler.d.ts +9 -0
  779. package/dist/preview-server/handler.js +34 -0
  780. package/dist/preview-server/hot-middleware/client.d.ts +0 -0
  781. package/dist/preview-server/hot-middleware/client.js +0 -0
  782. package/dist/preview-server/hot-middleware/index.d.ts +94 -0
  783. package/dist/preview-server/hot-middleware/index.js +1 -2
  784. package/dist/preview-server/hot-middleware/process-update.d.ts +0 -0
  785. package/dist/preview-server/hot-middleware/process-update.js +5 -6
  786. package/dist/preview-server/hot-middleware/strip-ansi.d.ts +0 -0
  787. package/dist/preview-server/hot-middleware/strip-ansi.js +0 -0
  788. package/dist/preview-server/hot-middleware/types.d.ts +0 -0
  789. package/dist/preview-server/hot-middleware/types.js +0 -0
  790. package/dist/preview-server/live-events.d.ts +10 -0
  791. package/dist/preview-server/live-events.js +61 -0
  792. package/dist/preview-server/parse-body.d.ts +2 -0
  793. package/dist/preview-server/parse-body.js +16 -0
  794. package/dist/preview-server/project-info.d.ts +1 -1
  795. package/dist/preview-server/project-info.js +12 -4
  796. package/dist/preview-server/public-folder.d.ts +17 -0
  797. package/dist/preview-server/public-folder.js +56 -0
  798. package/dist/preview-server/render-queue/get-default-video-contexts.d.ts +10 -0
  799. package/dist/preview-server/render-queue/get-default-video-contexts.js +13 -0
  800. package/dist/preview-server/render-queue/job.d.ts +129 -0
  801. package/dist/preview-server/render-queue/job.js +2 -0
  802. package/dist/preview-server/render-queue/make-retry-payload.d.ts +3 -0
  803. package/dist/preview-server/render-queue/make-retry-payload.js +89 -0
  804. package/dist/preview-server/render-queue/open-directory-in-finder.d.ts +1 -0
  805. package/dist/preview-server/render-queue/open-directory-in-finder.js +43 -0
  806. package/dist/preview-server/render-queue/process-still.d.ts +8 -0
  807. package/dist/preview-server/render-queue/process-still.js +46 -0
  808. package/dist/preview-server/render-queue/process-video.d.ts +8 -0
  809. package/dist/preview-server/render-queue/process-video.js +63 -0
  810. package/dist/preview-server/render-queue/queue.d.ts +21 -0
  811. package/dist/preview-server/render-queue/queue.js +208 -0
  812. package/dist/preview-server/routes/add-render.d.ts +3 -0
  813. package/dist/preview-server/routes/add-render.js +76 -0
  814. package/dist/preview-server/routes/cancel-render.d.ts +3 -0
  815. package/dist/preview-server/routes/cancel-render.js +9 -0
  816. package/dist/preview-server/routes/open-in-file-explorer.d.ts +3 -0
  817. package/dist/preview-server/routes/open-in-file-explorer.js +8 -0
  818. package/dist/preview-server/routes/remove-render.d.ts +3 -0
  819. package/dist/preview-server/routes/remove-render.js +9 -0
  820. package/dist/preview-server/routes/subscribe-to-file-existence.d.ts +3 -0
  821. package/dist/preview-server/routes/subscribe-to-file-existence.js +13 -0
  822. package/dist/preview-server/routes/unsubscribe-from-file-existence.d.ts +3 -0
  823. package/dist/preview-server/routes/unsubscribe-from-file-existence.js +13 -0
  824. package/dist/preview-server/routes/update-default-props.d.ts +3 -0
  825. package/dist/preview-server/routes/update-default-props.js +22 -0
  826. package/dist/preview-server/routes.d.ts +8 -1
  827. package/dist/preview-server/routes.js +130 -30
  828. package/dist/preview-server/serve-static.d.ts +0 -0
  829. package/dist/preview-server/serve-static.js +4 -3
  830. package/dist/preview-server/start-server.d.ts +19 -6
  831. package/dist/preview-server/start-server.js +72 -28
  832. package/dist/preview-server/update-available.d.ts +1 -1
  833. package/dist/preview-server/update-available.js +8 -5
  834. package/dist/preview.d.ts +1 -1
  835. package/dist/preview.js +115 -16
  836. package/dist/previewEntry.d.ts +0 -0
  837. package/dist/previewEntry.js +10 -2
  838. package/dist/print-compositions.d.ts +2 -0
  839. package/dist/print-compositions.js +50 -0
  840. package/dist/print-error.d.ts +0 -0
  841. package/dist/print-error.js +4 -2
  842. package/dist/print-help.d.ts +0 -0
  843. package/dist/print-help.js +16 -5
  844. package/dist/progress-bar.d.ts +36 -30
  845. package/dist/progress-bar.js +151 -31
  846. package/dist/progress-types.d.ts +32 -0
  847. package/dist/progress-types.js +17 -0
  848. package/dist/render-flows/render.d.ts +47 -0
  849. package/dist/render-flows/render.js +290 -0
  850. package/dist/render-flows/still.d.ts +29 -0
  851. package/dist/render-flows/still.js +168 -0
  852. package/dist/render.d.ts +1 -1
  853. package/dist/render.js +55 -213
  854. package/dist/required-chromium-options.d.ts +3 -0
  855. package/dist/required-chromium-options.js +2 -0
  856. package/dist/resolve-from.d.ts +0 -0
  857. package/dist/resolve-from.js +0 -0
  858. package/dist/select-composition.d.ts +7 -0
  859. package/dist/select-composition.js +51 -0
  860. package/dist/setup-cache.d.ts +31 -2
  861. package/dist/setup-cache.js +122 -24
  862. package/dist/smooth-zoom.d.ts +4 -0
  863. package/dist/smooth-zoom.js +20 -0
  864. package/dist/step.d.ts +0 -0
  865. package/dist/step.js +0 -0
  866. package/dist/still.d.ts +1 -1
  867. package/dist/still.js +41 -131
  868. package/dist/truthy.d.ts +3 -0
  869. package/dist/truthy.js +7 -0
  870. package/dist/upgrade.d.ts +1 -1
  871. package/dist/upgrade.js +21 -29
  872. package/dist/user-passed-output-location.d.ts +7 -1
  873. package/dist/user-passed-output-location.js +15 -9
  874. package/dist/versions.d.ts +2 -2
  875. package/dist/versions.js +15 -26
  876. package/package.json +30 -20
  877. package/styles/styles.css +9 -3
  878. package/web/favicon.png +0 -0
  879. package/.prettierrc.js +0 -14
  880. package/dist/bundle-on-cli.d.ts +0 -2
  881. package/dist/bundle-on-cli.js +0 -41
  882. package/dist/bundle.d.ts +0 -1
  883. package/dist/bundle.js +0 -31
  884. package/dist/chalk/symbols.d.ts +0 -111
  885. package/dist/chalk/symbols.js +0 -75
  886. package/dist/chalk/utilities.d.ts +0 -2
  887. package/dist/chalk/utilities.js +0 -37
  888. package/dist/check-version.d.ts +0 -1
  889. package/dist/check-version.js +0 -14
  890. package/dist/editor/components/CollapsedCompositionSelector.d.ts +0 -4
  891. package/dist/editor/components/CompositionManager.d.ts +0 -4
  892. package/dist/editor/components/CompositionManager.js +0 -60
  893. package/dist/editor/components/KeyboardShortcutsModal.d.ts +0 -2
  894. package/dist/editor/components/KeyboardShortcutsModal.js +0 -53
  895. package/dist/editor/components/LoadingIndicator.d.ts +0 -2
  896. package/dist/editor/components/LoadingIndicator.js +0 -35
  897. package/dist/editor/components/RichTimelineToggle.d.ts +0 -2
  898. package/dist/editor/components/RichTimelineToggle.js +0 -29
  899. package/dist/editor/components/Thumbnail.d.ts +0 -8
  900. package/dist/editor/components/Thumbnail.js +0 -76
  901. package/dist/editor/helpers/use-compact-ui.d.ts +0 -1
  902. package/dist/editor/icons/film.js +0 -8
  903. package/dist/editor/icons/timeline.d.ts +0 -3
  904. package/dist/editor/icons/timeline.js +0 -9
  905. package/dist/editor/state/rich-timeline.d.ts +0 -9
  906. package/dist/editor/state/rich-timeline.js +0 -17
  907. package/dist/initialize-render-cli.d.ts +0 -1
  908. package/dist/initialize-render-cli.js +0 -17
  909. package/dist/prepare-entry-point.d.ts +0 -11
  910. package/dist/prepare-entry-point.js +0 -36
  911. package/dist/preview-server/fast-refresh/helpers.d.ts +0 -39
  912. package/dist/preview-server/fast-refresh/helpers.js +0 -145
  913. package/dist/preview-server/fast-refresh/index.d.ts +0 -30
  914. package/dist/preview-server/fast-refresh/index.js +0 -86
  915. package/dist/preview-server/fast-refresh/loader.d.ts +0 -35
  916. package/dist/preview-server/fast-refresh/loader.js +0 -81
  917. package/dist/preview-server/fast-refresh/runtime.d.ts +0 -35
  918. package/dist/preview-server/fast-refresh/runtime.js +0 -32
  919. package/dist/preview-server/static-preview.d.ts +0 -1
  920. package/dist/preview-server/static-preview.js +0 -40
  921. package/dist/preview-server/webpack-cache.d.ts +0 -12
  922. package/dist/preview-server/webpack-cache.js +0 -66
  923. package/dist/validate-ffmpeg-version.d.ts +0 -3
  924. package/dist/validate-ffmpeg-version.js +0 -17
  925. package/dist/warn-about-ffmpeg-version.d.ts +0 -5
  926. package/dist/warn-about-ffmpeg-version.js +0 -38
  927. package/dist/webpack-cache.d.ts +0 -12
  928. package/dist/webpack-cache.js +0 -66
  929. package/tsconfig.json +0 -16
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorMessage = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const player_1 = require("@remotion/player");
6
+ const react_1 = require("react");
7
+ const colors_1 = require("../../../editor/helpers/colors");
8
+ const carets_1 = require("./carets");
9
+ const fontSize = 24;
10
+ const lineHeight = 1.5;
11
+ const maxLines = 2;
12
+ const buttonSize = 32;
13
+ const maskImage = 'linear-gradient(to bottom, white 60%, transparent)';
14
+ const container = {
15
+ position: 'relative',
16
+ marginBottom: 15,
17
+ };
18
+ const messageContainer = {
19
+ overflow: 'hidden',
20
+ };
21
+ const textContainer = {
22
+ fontSize,
23
+ lineHeight,
24
+ };
25
+ const moreLine = {
26
+ width: '100%',
27
+ display: 'flex',
28
+ justifyContent: 'center',
29
+ position: 'absolute',
30
+ border: `1px solid ${colors_1.INPUT_BORDER_COLOR_HOVERED}`,
31
+ height: 0,
32
+ marginTop: 4,
33
+ };
34
+ const moreButton = {
35
+ height: buttonSize,
36
+ width: buttonSize,
37
+ borderRadius: buttonSize / 2,
38
+ backgroundColor: colors_1.INPUT_BACKGROUND,
39
+ border: `1px solid ${colors_1.INPUT_BORDER_COLOR_UNHOVERED}`,
40
+ marginTop: -buttonSize / 2,
41
+ display: 'flex',
42
+ justifyContent: 'center',
43
+ alignItems: 'center',
44
+ cursor: 'pointer',
45
+ color: 'white',
46
+ };
47
+ const ErrorMessage = ({ message }) => {
48
+ const [expanded, setExpanded] = (0, react_1.useState)(false);
49
+ const ref = (0, react_1.useRef)(null);
50
+ const size = player_1.PlayerInternals.useElementSize(ref, {
51
+ shouldApplyCssTransforms: false,
52
+ triggerOnWindowResize: true,
53
+ });
54
+ const errorLines = size ? size.height / (lineHeight * fontSize) : null;
55
+ const style = (0, react_1.useMemo)(() => {
56
+ const isExpanded = expanded || (errorLines !== null && errorLines <= maxLines);
57
+ return {
58
+ ...messageContainer,
59
+ maxHeight: isExpanded ? undefined : fontSize * lineHeight * maxLines,
60
+ maskImage: isExpanded ? undefined : maskImage,
61
+ WebkitMaskImage: isExpanded ? undefined : maskImage,
62
+ };
63
+ }, [errorLines, expanded]);
64
+ const toggle = (0, react_1.useCallback)(() => {
65
+ setExpanded((e) => !e);
66
+ }, []);
67
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: style, children: (0, jsx_runtime_1.jsx)("div", { ref: ref, style: textContainer, children: message }) }), errorLines !== null && errorLines > maxLines ? ((0, jsx_runtime_1.jsx)("div", { style: moreLine, children: (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: toggle, style: moreButton, children: (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: expanded }) }) })) : null] }));
68
+ };
69
+ exports.ErrorMessage = ErrorMessage;
@@ -4,6 +4,7 @@ exports.ErrorTitle = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_overlay_1 = require("../react-overlay");
6
6
  const DismissButton_1 = require("./DismissButton");
7
+ const ErrorMessage_1 = require("./ErrorMessage");
7
8
  const Symbolicating_1 = require("./Symbolicating");
8
9
  const title = {
9
10
  marginBottom: 8,
@@ -14,17 +15,12 @@ const title = {
14
15
  const left = {
15
16
  flex: 1,
16
17
  paddingRight: 14,
17
- lineHeight: 1.5,
18
- whiteSpace: 'pre',
19
- fontSize: '1.5em',
20
18
  fontWeight: 'bold',
21
- overflowX: 'auto',
19
+ maxWidth: '100%',
22
20
  };
23
21
  const errName = {
24
- fontSize: '0.8em',
25
- background: 'linear-gradient(90deg,#4290f5,#42e9f5)',
26
- WebkitBackgroundClip: 'text',
27
- WebkitTextFillColor: 'transparent',
22
+ fontSize: 18,
23
+ color: '#4290f5',
28
24
  display: 'inline-block',
29
25
  };
30
26
  const row = {
@@ -36,6 +32,6 @@ const spacer = {
36
32
  width: 5,
37
33
  };
38
34
  const ErrorTitle = ({ name, message, symbolicating }) => {
39
- return ((0, jsx_runtime_1.jsxs)("div", { style: title, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)("div", { children: message })] })] }), (0, react_overlay_1.didUnmountReactApp)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {})] }));
35
+ return ((0, jsx_runtime_1.jsxs)("div", { style: title, className: "css-reset", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(ErrorMessage_1.ErrorMessage, { message: message })] })] }), (0, react_overlay_1.didUnmountReactApp)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {})] }));
40
36
  };
41
37
  exports.ErrorTitle = ErrorTitle;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { THelpLink } from './get-help-link';
3
+ export declare const HelpLink: React.FC<{
4
+ canHaveKeyboardShortcuts: boolean;
5
+ link: THelpLink;
6
+ }>;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HelpLink = void 0;
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");
7
+ const Button_1 = require("./Button");
8
+ const ShortcutHint_1 = require("./ShortcutHint");
9
+ const buttonStyle = {
10
+ backgroundColor: 'var(--blue)',
11
+ color: 'white',
12
+ };
13
+ const HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
14
+ const openLink = (0, react_1.useCallback)(() => {
15
+ window.open(link.url, '_blank');
16
+ }, [link]);
17
+ const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
18
+ (0, react_1.useEffect)(() => {
19
+ if (!canHaveKeyboardShortcuts) {
20
+ return;
21
+ }
22
+ const onEditor = () => {
23
+ openLink();
24
+ };
25
+ const { unregister } = registerKeybinding({
26
+ event: 'keydown',
27
+ key: 'h',
28
+ callback: onEditor,
29
+ commandCtrlKey: true,
30
+ preventDefault: true,
31
+ triggerIfInputFieldFocused: false,
32
+ });
33
+ return () => unregister();
34
+ }, [canHaveKeyboardShortcuts, openLink, registerKeybinding]);
35
+ return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { style: buttonStyle, onClick: openLink, children: ["Help: ", '"', link.title, '"', canHaveKeyboardShortcuts ? ((0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "h", cmdOrCtrl: true })) : null] }));
36
+ };
37
+ exports.HelpLink = HelpLink;
@@ -2,4 +2,5 @@ import React from 'react';
2
2
  import type { SymbolicatedStackFrame } from '../react-overlay/utils/stack-frame';
3
3
  export declare const OpenInEditor: React.FC<{
4
4
  stack: SymbolicatedStackFrame;
5
+ canHaveKeyboardShortcuts: boolean;
5
6
  }>;
@@ -4,7 +4,10 @@ exports.OpenInEditor = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  /* eslint-disable no-console */
6
6
  const react_1 = require("react");
7
+ const open_in_editor_1 = require("../../../editor/helpers/open-in-editor");
8
+ const use_keybinding_1 = require("../../../editor/helpers/use-keybinding");
7
9
  const Button_1 = require("./Button");
10
+ const ShortcutHint_1 = require("./ShortcutHint");
8
11
  const initialState = { type: 'idle' };
9
12
  const reducer = (state, action) => {
10
13
  if (action.type === 'start') {
@@ -29,9 +32,10 @@ const reducer = (state, action) => {
29
32
  }
30
33
  return state;
31
34
  };
32
- const OpenInEditor = ({ stack }) => {
35
+ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts }) => {
33
36
  const isMounted = (0, react_1.useRef)(true);
34
37
  const [state, dispatch] = (0, react_1.useReducer)(reducer, initialState);
38
+ const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
35
39
  const dispatchIfMounted = (0, react_1.useCallback)((payload) => {
36
40
  if (isMounted.current === false)
37
41
  return;
@@ -39,15 +43,7 @@ const OpenInEditor = ({ stack }) => {
39
43
  }, []);
40
44
  const openInBrowser = (0, react_1.useCallback)(() => {
41
45
  dispatch({ type: 'start' });
42
- fetch(`/api/open-in-editor`, {
43
- method: 'post',
44
- headers: {
45
- 'content-type': 'application/json',
46
- },
47
- body: JSON.stringify({
48
- stack,
49
- }),
50
- })
46
+ (0, open_in_editor_1.openInEditor)(stack)
51
47
  .then((res) => res.json())
52
48
  .then((data) => {
53
49
  if (data.success) {
@@ -72,6 +68,23 @@ const OpenInEditor = ({ stack }) => {
72
68
  isMounted.current = false;
73
69
  };
74
70
  }, []);
71
+ (0, react_1.useEffect)(() => {
72
+ if (!canHaveKeyboardShortcuts) {
73
+ return;
74
+ }
75
+ const onEditor = () => {
76
+ openInBrowser();
77
+ };
78
+ const { unregister } = registerKeybinding({
79
+ event: 'keydown',
80
+ key: 'o',
81
+ callback: onEditor,
82
+ commandCtrlKey: true,
83
+ preventDefault: true,
84
+ triggerIfInputFieldFocused: false,
85
+ });
86
+ return () => unregister();
87
+ }, [canHaveKeyboardShortcuts, openInBrowser, registerKeybinding]);
75
88
  const label = (0, react_1.useMemo)(() => {
76
89
  switch (state.type) {
77
90
  case 'error':
@@ -86,6 +99,6 @@ const OpenInEditor = ({ stack }) => {
86
99
  throw new Error('invalid state');
87
100
  }
88
101
  }, [state.type]);
89
- return ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, disabled: state.type !== 'idle', children: label }));
102
+ return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: openInBrowser, disabled: state.type !== 'idle', children: [label, canHaveKeyboardShortcuts ? ((0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "o", cmdOrCtrl: true })) : null] }));
90
103
  };
91
104
  exports.OpenInEditor = OpenInEditor;
@@ -4,6 +4,7 @@ exports.Overlay = exports.setErrorsRef = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const keybindings_1 = require("../../../editor/state/keybindings");
7
8
  const ErrorLoader_1 = require("./ErrorLoader");
8
9
  exports.setErrorsRef = (0, react_1.createRef)();
9
10
  const errorsAreTheSame = (first, second) => {
@@ -38,12 +39,12 @@ const Overlay = () => {
38
39
  if (errors.errors.length === 0) {
39
40
  return null;
40
41
  }
41
- return ((0, jsx_runtime_1.jsx)(remotion_1.AbsoluteFill, { style: {
42
- backgroundColor: BACKGROUND_COLOR,
43
- overflow: 'auto',
44
- color: 'white',
45
- }, children: errors.errors.map((err) => {
46
- return (0, jsx_runtime_1.jsx)(ErrorLoader_1.ErrorLoader, { error: err }, err.stack);
47
- }) }));
42
+ return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(remotion_1.AbsoluteFill, { style: {
43
+ backgroundColor: BACKGROUND_COLOR,
44
+ overflow: 'auto',
45
+ color: 'white',
46
+ }, children: errors.errors.map((err, i) => {
47
+ return ((0, jsx_runtime_1.jsx)(ErrorLoader_1.ErrorLoader, { keyboardShortcuts: i === 0, error: err }, err.stack));
48
+ }) }) }));
48
49
  };
49
50
  exports.Overlay = Overlay;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const SearchGithubIssues: React.FC<{
3
3
  message: string;
4
+ canHaveKeyboardShortcuts: boolean;
4
5
  }>;
@@ -3,11 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SearchGithubIssues = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const use_keybinding_1 = require("../../../editor/helpers/use-keybinding");
6
7
  const Button_1 = require("./Button");
7
- const SearchGithubIssues = ({ message }) => {
8
+ const ShortcutHint_1 = require("./ShortcutHint");
9
+ const SearchGithubIssues = ({ message, canHaveKeyboardShortcuts }) => {
8
10
  const openInBrowser = (0, react_1.useCallback)(() => {
9
11
  window.open(`https://github.com/remotion-dev/remotion/issues?q=${encodeURIComponent(message)}`, '_blank');
10
12
  }, [message]);
11
- return (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, children: "Search GitHub Issues" });
13
+ const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
14
+ (0, react_1.useEffect)(() => {
15
+ if (!canHaveKeyboardShortcuts) {
16
+ return;
17
+ }
18
+ const onEditor = () => {
19
+ openInBrowser();
20
+ };
21
+ const { unregister } = registerKeybinding({
22
+ event: 'keydown',
23
+ key: 'g',
24
+ callback: onEditor,
25
+ commandCtrlKey: true,
26
+ preventDefault: true,
27
+ triggerIfInputFieldFocused: false,
28
+ });
29
+ return () => unregister();
30
+ }, [canHaveKeyboardShortcuts, openInBrowser, registerKeybinding]);
31
+ return ((0, jsx_runtime_1.jsxs)(Button_1.Button, { onClick: openInBrowser, children: ["Search GitHub Issues", ' ', canHaveKeyboardShortcuts ? ((0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "g", cmdOrCtrl: true })) : null] }));
12
32
  };
13
33
  exports.SearchGithubIssues = SearchGithubIssues;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const cmdOrCtrlCharacter: string;
3
+ export declare const ShortcutHint: React.FC<{
4
+ keyToPress: string;
5
+ cmdOrCtrl: boolean;
6
+ }>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ShortcutHint = exports.cmdOrCtrlCharacter = void 0;
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");
7
+ exports.cmdOrCtrlCharacter = window.navigator.platform.startsWith('Mac')
8
+ ? '⌘'
9
+ : 'Ctrl';
10
+ const container = {
11
+ display: 'inline-block',
12
+ marginLeft: 6,
13
+ opacity: 0.6,
14
+ verticalAlign: 'middle',
15
+ };
16
+ const ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
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() })] }));
30
+ };
31
+ exports.ShortcutHint = ShortcutHint;
@@ -10,6 +10,7 @@ const format_location_1 = require("./format-location");
10
10
  const location = {
11
11
  color: 'rgba(255, 255, 255, 0.6)',
12
12
  fontFamily: 'monospace',
13
+ fontSize: 14,
13
14
  };
14
15
  const header = {
15
16
  paddingLeft: 14,
@@ -28,6 +29,7 @@ const left = {
28
29
  };
29
30
  const fnName = {
30
31
  fontSize: 14,
32
+ lineHeight: 1.5,
31
33
  marginBottom: 3,
32
34
  };
33
35
  const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
@@ -41,7 +43,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
41
43
  const toggleCodeFrame = (0, react_1.useCallback)(() => {
42
44
  setShowCodeFrame((f) => !f);
43
45
  }, []);
44
- return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? ((0, jsx_runtime_1.jsxs)("div", { style: location, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: toggleCodeFrame, children: showCodeFrame ? (0, jsx_runtime_1.jsx)(carets_1.CaretDown, {}) : (0, jsx_runtime_1.jsx)(carets_1.CaretRight, {}) })) : null] }), (0, jsx_runtime_1.jsx)("div", { children: s.originalScriptCode &&
46
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "css-reset", children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? ((0, jsx_runtime_1.jsxs)("div", { style: location, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: toggleCodeFrame, children: showCodeFrame ? (0, jsx_runtime_1.jsx)(carets_1.CaretDown, { invert: false }) : (0, jsx_runtime_1.jsx)(carets_1.CaretRight, {}) })) : null] }), (0, jsx_runtime_1.jsx)("div", { children: s.originalScriptCode &&
45
47
  s.originalScriptCode.length > 0 &&
46
48
  showCodeFrame ? ((0, jsx_runtime_1.jsx)(CodeFrame_1.CodeFrame, { lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })] }));
47
49
  };
@@ -1,3 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  export declare const CaretRight: () => JSX.Element;
3
- export declare const CaretDown: () => JSX.Element;
3
+ export declare const CaretDown: React.FC<{
4
+ invert: boolean;
5
+ }>;
@@ -6,7 +6,7 @@ const CaretRight = () => {
6
6
  return ((0, jsx_runtime_1.jsx)("svg", { style: { height: 20 }, "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 192 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
7
7
  };
8
8
  exports.CaretRight = CaretRight;
9
- const CaretDown = () => {
10
- return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: 20 }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
9
+ const CaretDown = ({ invert }) => {
10
+ return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: 20, transform: invert ? `rotate(180deg)` : '' }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
11
11
  };
12
12
  exports.CaretDown = CaretDown;
@@ -0,0 +1,5 @@
1
+ export declare type THelpLink = {
2
+ url: string;
3
+ title: string;
4
+ };
5
+ export declare const getHelpLink: (message: string) => THelpLink | null;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getHelpLink = void 0;
4
+ const getHelpLink = (message) => {
5
+ if (message.includes('See https://www.remotion.dev/docs/the-fundamentals#defining-compositions')) {
6
+ return {
7
+ title: 'Defining compositions',
8
+ url: 'See https://www.remotion.dev/docs/the-fundamentals#defining-compositions',
9
+ };
10
+ }
11
+ if (message.includes('https://remotion.dev/docs/wrong-composition-mount')) {
12
+ return {
13
+ title: 'Wrongly mounted <Composition>',
14
+ url: 'https://remotion.dev/docs/wrong-composition-mount',
15
+ };
16
+ }
17
+ if (message.includes('https://remotion.dev/docs/staticfile-relative-paths')) {
18
+ return {
19
+ title: 'staticFile() relative paths',
20
+ url: 'https://remotion.dev/docs/staticfile-relative-paths',
21
+ };
22
+ }
23
+ if (message.includes('https://remotion.dev/docs/staticfile-remote-urls')) {
24
+ return {
25
+ title: 'staticFile() remote URLs',
26
+ url: 'https://remotion.dev/docs/staticfile-remote-urls',
27
+ };
28
+ }
29
+ if (message.includes('https://remotion.dev/docs/non-seekable-media')) {
30
+ return {
31
+ title: 'Non-seekable media',
32
+ url: 'https://remotion.dev/docs/non-seekable-media',
33
+ };
34
+ }
35
+ if (message.includes('https://remotion.dev/docs/media-playback-error')) {
36
+ return {
37
+ title: 'Media playback error',
38
+ url: 'https://remotion.dev/docs/media-playback-error',
39
+ };
40
+ }
41
+ if (message.includes('Div is not part of the THREE')) {
42
+ return {
43
+ title: '<Sequence> inside <ThreeCanvas>',
44
+ url: 'https://remotion.dev/docs/sequence#note-for-remotionthree',
45
+ };
46
+ }
47
+ return null;
48
+ };
49
+ exports.getHelpLink = getHelpLink;
@@ -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 path_1 = __importDefault(require("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 = 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 = 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;
@@ -0,0 +1,4 @@
1
+ export declare const getAbsolutePublicDir: ({ userPassedPublicDir, remotionRoot, }: {
2
+ userPassedPublicDir: string | null;
3
+ remotionRoot: string;
4
+ }) => string;
@@ -0,0 +1,14 @@
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.getAbsolutePublicDir = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const getAbsolutePublicDir = ({ userPassedPublicDir, remotionRoot, }) => {
9
+ const publicDir = userPassedPublicDir
10
+ ? path_1.default.resolve(remotionRoot, userPassedPublicDir)
11
+ : path_1.default.join(remotionRoot, 'public');
12
+ return publicDir;
13
+ };
14
+ exports.getAbsolutePublicDir = getAbsolutePublicDir;
@@ -3,7 +3,8 @@ declare type LockfilePath = {
3
3
  manager: PackageManager;
4
4
  path: string;
5
5
  installCommand: string;
6
+ startCommand: string;
6
7
  };
7
8
  export declare const lockFilePaths: LockfilePath[];
8
- export declare const getPackageManager: () => LockfilePath | 'unknown';
9
+ export declare const getPackageManager: (remotionRoot: string, packageManager: string | undefined) => LockfilePath | 'unknown';
9
10
  export {};
@@ -7,20 +7,36 @@ exports.getPackageManager = exports.lockFilePaths = void 0;
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const path_1 = __importDefault(require("path"));
9
9
  exports.lockFilePaths = [
10
- { path: 'package-lock.json', manager: 'npm', installCommand: 'npm i' },
10
+ {
11
+ path: 'package-lock.json',
12
+ manager: 'npm',
13
+ installCommand: 'npm i',
14
+ startCommand: 'npm start',
15
+ },
11
16
  {
12
17
  path: 'yarn.lock',
13
18
  manager: 'yarn',
14
19
  installCommand: 'yarn add',
20
+ startCommand: 'yarn start',
15
21
  },
16
22
  {
17
23
  path: 'pnpm-lock.yaml',
18
24
  manager: 'pnpm',
19
25
  installCommand: 'pnpm i',
26
+ startCommand: 'pnpm start',
20
27
  },
21
28
  ];
22
- const getPackageManager = () => {
23
- const existingPkgManagers = exports.lockFilePaths.filter((p) => fs_1.default.existsSync(path_1.default.join(process.cwd(), p.path)));
29
+ const getPackageManager = (remotionRoot, packageManager) => {
30
+ if (packageManager) {
31
+ const manager = exports.lockFilePaths.find((p) => p.manager === packageManager);
32
+ if (!manager) {
33
+ throw new Error(`The package manager ${packageManager} is not supported. Supported package managers are ${exports.lockFilePaths
34
+ .map((p) => p.manager)
35
+ .join(', ')}`);
36
+ }
37
+ return manager;
38
+ }
39
+ const existingPkgManagers = exports.lockFilePaths.filter((p) => fs_1.default.existsSync(path_1.default.join(remotionRoot, p.path)));
24
40
  if (existingPkgManagers.length === 0) {
25
41
  return 'unknown';
26
42
  }
@@ -0,0 +1,9 @@
1
+ import type { IncomingMessage, ServerResponse } from '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>;