@remotion/cli 4.0.0-oops.3 → 4.0.0-prefetch.7

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 (479) hide show
  1. package/dist/bundle.d.ts +1 -0
  2. package/dist/bundle.js +32 -0
  3. package/dist/chalk/index.d.ts +58 -0
  4. package/dist/chalk/index.js +138 -0
  5. package/dist/code-frame.d.ts +1 -1
  6. package/dist/code-frame.js +10 -12
  7. package/dist/compositions.d.ts +1 -1
  8. package/dist/compositions.js +38 -8
  9. package/dist/config/browser-executable.d.ts +3 -0
  10. package/dist/config/browser-executable.js +12 -0
  11. package/dist/config/browser.d.ts +3 -0
  12. package/dist/config/browser.js +18 -0
  13. package/dist/config/bundle-out-dir.d.ts +2 -0
  14. package/dist/config/bundle-out-dir.js +12 -0
  15. package/dist/config/chromium-flags.d.ts +9 -0
  16. package/dist/config/chromium-flags.js +33 -0
  17. package/dist/config/codec.d.ts +7 -0
  18. package/dist/config/codec.js +40 -0
  19. package/dist/config/concurrency.d.ts +3 -0
  20. package/dist/config/concurrency.js +12 -0
  21. package/dist/config/crf.d.ts +4 -0
  22. package/dist/config/crf.js +23 -0
  23. package/dist/config/enforce-audio-track.d.ts +2 -0
  24. package/dist/config/enforce-audio-track.js +13 -0
  25. package/dist/config/env-file.d.ts +2 -0
  26. package/dist/config/env-file.js +10 -0
  27. package/dist/config/every-nth-frame.d.ts +3 -0
  28. package/dist/config/every-nth-frame.js +20 -0
  29. package/dist/config/ffmpeg-executable.d.ts +5 -0
  30. package/dist/config/ffmpeg-executable.js +21 -0
  31. package/dist/config/frame-range.d.ts +4 -0
  32. package/dist/config/frame-range.js +35 -0
  33. package/dist/config/get-public-path.d.ts +2 -0
  34. package/dist/config/get-public-path.js +12 -0
  35. package/dist/config/image-format.d.ts +3 -0
  36. package/dist/config/image-format.js +20 -0
  37. package/dist/config/image-sequence.d.ts +3 -0
  38. package/dist/config/image-sequence.js +15 -0
  39. package/dist/config/index.d.ts +49 -0
  40. package/dist/config/index.js +176 -0
  41. package/dist/config/keyboard-shortcuts.d.ts +2 -0
  42. package/dist/config/keyboard-shortcuts.js +12 -0
  43. package/dist/config/log.d.ts +3 -0
  44. package/dist/config/log.js +12 -0
  45. package/dist/config/max-timeline-tracks.d.ts +2 -0
  46. package/dist/config/max-timeline-tracks.js +24 -0
  47. package/dist/config/muted.d.ts +2 -0
  48. package/dist/config/muted.js +13 -0
  49. package/dist/config/number-of-gif-loops.d.ts +4 -0
  50. package/dist/config/number-of-gif-loops.js +21 -0
  51. package/dist/config/output-location.d.ts +2 -0
  52. package/dist/config/output-location.js +16 -0
  53. package/dist/config/override-webpack.d.ts +5 -0
  54. package/dist/config/override-webpack.js +14 -0
  55. package/dist/config/overwrite.d.ts +2 -0
  56. package/dist/config/overwrite.js +14 -0
  57. package/dist/config/pixel-format.d.ts +3 -0
  58. package/dist/config/pixel-format.js +16 -0
  59. package/dist/config/preview-server.d.ts +2 -0
  60. package/dist/config/preview-server.js +20 -0
  61. package/dist/config/prores-profile.d.ts +3 -0
  62. package/dist/config/prores-profile.js +12 -0
  63. package/dist/config/public-dir.d.ts +2 -0
  64. package/dist/config/public-dir.js +12 -0
  65. package/dist/config/quality.d.ts +2 -0
  66. package/dist/config/quality.js +17 -0
  67. package/dist/config/scale.d.ts +3 -0
  68. package/dist/config/scale.js +15 -0
  69. package/dist/config/still-frame.d.ts +2 -0
  70. package/dist/config/still-frame.js +12 -0
  71. package/dist/config/timeout.d.ts +2 -0
  72. package/dist/config/timeout.js +17 -0
  73. package/dist/config/webpack-caching.d.ts +3 -0
  74. package/dist/config/webpack-caching.js +16 -0
  75. package/dist/download-progress.d.ts +2 -1
  76. package/dist/download-progress.js +19 -4
  77. package/dist/editor/components/AudioWaveform.js +2 -2
  78. package/dist/editor/components/AudioWaveformBar.js +1 -1
  79. package/dist/editor/components/Button.d.ts +4 -0
  80. package/dist/editor/components/Button.js +24 -0
  81. package/dist/editor/components/Canvas.js +191 -1
  82. package/dist/editor/components/CheckboardToggle.js +9 -2
  83. package/dist/editor/components/ClipboardIcon.js +1 -1
  84. package/dist/editor/components/CollapsedCompositionSelector.d.ts +4 -0
  85. package/dist/editor/components/CollapsedCompositionSelector.js +39 -0
  86. package/dist/editor/components/CompositionSelector.js +7 -45
  87. package/dist/editor/components/CompositionSelectorItem.d.ts +2 -2
  88. package/dist/editor/components/CompositionSelectorItem.js +6 -4
  89. package/dist/editor/components/ControlButton.js +1 -1
  90. package/dist/editor/components/CopyButton.js +5 -18
  91. package/dist/editor/components/CurrentComposition.js +7 -2
  92. package/dist/editor/components/Editor.js +22 -90
  93. package/dist/editor/components/EditorContent.js +3 -2
  94. package/dist/editor/components/EditorContexts.d.ts +4 -0
  95. package/dist/editor/components/EditorContexts.js +83 -0
  96. package/dist/editor/components/FpsCounter.js +1 -1
  97. package/dist/editor/components/FramePersistor.d.ts +1 -1
  98. package/dist/editor/components/GlobalKeybindings.d.ts +1 -1
  99. package/dist/editor/components/GlobalKeybindings.js +26 -11
  100. package/dist/editor/components/InitialCompositionLoader.d.ts +4 -0
  101. package/dist/editor/components/InitialCompositionLoader.js +86 -0
  102. package/dist/editor/components/KeyboardShortcutsModal.js +15 -1
  103. package/dist/editor/components/LoopToggle.js +1 -1
  104. package/dist/editor/components/Menu/MenuDivider.js +1 -1
  105. package/dist/editor/components/Menu/MenuItem.d.ts +2 -2
  106. package/dist/editor/components/Menu/MenuItem.js +4 -4
  107. package/dist/editor/components/Menu/MenuSubItem.d.ts +1 -1
  108. package/dist/editor/components/Menu/MenuSubItem.js +5 -4
  109. package/dist/editor/components/Menu/SubMenu.d.ts +2 -2
  110. package/dist/editor/components/Menu/SubMenu.js +1 -1
  111. package/dist/editor/components/Menu/styles.d.ts +3 -2
  112. package/dist/editor/components/Menu/styles.js +10 -3
  113. package/dist/editor/components/MenuBuildIndicator.d.ts +2 -0
  114. package/dist/editor/components/MenuBuildIndicator.js +26 -0
  115. package/dist/editor/components/MenuToolbar.js +109 -20
  116. package/dist/editor/components/ModalContainer.js +1 -1
  117. package/dist/editor/components/ModalHeader.js +1 -1
  118. package/dist/editor/components/MuteToggle.js +1 -1
  119. package/dist/editor/components/NewComposition/CancelButton.d.ts +2 -1
  120. package/dist/editor/components/NewComposition/CancelButton.js +1 -1
  121. package/dist/editor/components/NewComposition/ComboBox.js +15 -5
  122. package/dist/editor/components/NewComposition/CopyHint.js +1 -1
  123. package/dist/editor/components/NewComposition/InputDragger.d.ts +2 -1
  124. package/dist/editor/components/NewComposition/InputDragger.js +2 -2
  125. package/dist/editor/components/NewComposition/MenuContent.d.ts +1 -1
  126. package/dist/editor/components/NewComposition/MenuContent.js +43 -8
  127. package/dist/editor/components/NewComposition/NewCompAspectRatio.js +1 -1
  128. package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
  129. package/dist/editor/components/NewComposition/NewComposition.d.ts +1 -1
  130. package/dist/editor/components/NewComposition/NewComposition.js +4 -4
  131. package/dist/editor/components/NewComposition/RemInput.js +1 -1
  132. package/dist/editor/components/NewComposition/ToggleAspectRatio.js +1 -1
  133. package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
  134. package/dist/editor/components/NewComposition/new-comp-layout.d.ts +1 -1
  135. package/dist/editor/components/NoRegisterRoot.d.ts +2 -0
  136. package/dist/editor/components/NoRegisterRoot.js +41 -0
  137. package/dist/editor/components/Notifications/ColorDot.d.ts +4 -0
  138. package/dist/editor/components/Notifications/ColorDot.js +22 -0
  139. package/dist/editor/components/Notifications/Notification.d.ts +8 -0
  140. package/dist/editor/components/Notifications/Notification.js +31 -0
  141. package/dist/editor/components/Notifications/NotificationCenter.d.ts +13 -0
  142. package/dist/editor/components/Notifications/NotificationCenter.js +40 -0
  143. package/dist/editor/components/Notifications/ServerDisconnected.d.ts +6 -0
  144. package/dist/editor/components/Notifications/ServerDisconnected.js +59 -0
  145. package/dist/editor/components/PlayPause.js +121 -23
  146. package/dist/editor/components/PlaybackKeyboardShortcutsManager.d.ts +1 -1
  147. package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +24 -21
  148. package/dist/editor/components/PlaybackRatePersistor.d.ts +1 -1
  149. package/dist/editor/components/PlaybackRateSelector.js +7 -2
  150. package/dist/editor/components/Preview.d.ts +2 -1
  151. package/dist/editor/components/Preview.js +27 -16
  152. package/dist/editor/components/PreviewToolbar.js +4 -2
  153. package/dist/editor/components/PreviewZoomControls.d.ts +2 -0
  154. package/dist/editor/components/PreviewZoomControls.js +67 -0
  155. package/dist/editor/components/ResetZoomButton.d.ts +4 -0
  156. package/dist/editor/components/ResetZoomButton.js +9 -0
  157. package/dist/editor/components/RichTimelineToggle.js +1 -1
  158. package/dist/editor/components/SizeSelector.d.ts +3 -2
  159. package/dist/editor/components/SizeSelector.js +58 -18
  160. package/dist/editor/components/Splitter/SplitterContainer.d.ts +1 -1
  161. package/dist/editor/components/Splitter/SplitterContainer.js +1 -1
  162. package/dist/editor/components/Splitter/SplitterElement.js +5 -2
  163. package/dist/editor/components/Splitter/SplitterHandle.d.ts +4 -1
  164. package/dist/editor/components/Splitter/SplitterHandle.js +28 -7
  165. package/dist/editor/components/Thumbnail.d.ts +1 -1
  166. package/dist/editor/components/Thumbnail.js +1 -1
  167. package/dist/editor/components/TimeValue.js +9 -5
  168. package/dist/editor/components/Timeline/LoopedIndicator.js +2 -2
  169. package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +3 -3
  170. package/dist/editor/components/Timeline/MaxTimelineTracks.d.ts +1 -0
  171. package/dist/editor/components/Timeline/MaxTimelineTracks.js +6 -4
  172. package/dist/editor/components/Timeline/Timeline.js +12 -4
  173. package/dist/editor/components/Timeline/TimelineCollapseToggle.js +2 -2
  174. package/dist/editor/components/Timeline/TimelineDragHandler.js +123 -25
  175. package/dist/editor/components/Timeline/TimelineInOutPointer.js +4 -3
  176. package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +1 -1
  177. package/dist/editor/components/Timeline/TimelineList.d.ts +2 -2
  178. package/dist/editor/components/Timeline/TimelineList.js +7 -4
  179. package/dist/editor/components/Timeline/TimelineListItem.d.ts +3 -2
  180. package/dist/editor/components/Timeline/TimelineListItem.js +10 -5
  181. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.d.ts +2 -0
  182. package/dist/editor/components/Timeline/TimelinePlayCursorSyncer.js +76 -0
  183. package/dist/editor/components/Timeline/TimelineScrollable.d.ts +4 -0
  184. package/dist/editor/components/Timeline/TimelineScrollable.js +25 -0
  185. package/dist/editor/components/Timeline/TimelineSequence.d.ts +1 -1
  186. package/dist/editor/components/Timeline/TimelineSequence.js +1 -1
  187. package/dist/editor/components/Timeline/TimelineSequenceFrame.js +1 -1
  188. package/dist/editor/components/Timeline/TimelineSlider.d.ts +3 -0
  189. package/dist/editor/components/Timeline/TimelineSlider.js +35 -2
  190. package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -3
  191. package/dist/editor/components/Timeline/TimelineTimeIndicators.d.ts +5 -0
  192. package/dist/editor/components/Timeline/TimelineTimeIndicators.js +168 -0
  193. package/dist/editor/components/Timeline/TimelineTracks.d.ts +2 -2
  194. package/dist/editor/components/Timeline/TimelineTracks.js +14 -9
  195. package/dist/editor/components/Timeline/TimelineVideoInfo.js +1 -1
  196. package/dist/editor/components/Timeline/TimelineZoomControls.d.ts +2 -0
  197. package/dist/editor/components/Timeline/TimelineZoomControls.js +45 -0
  198. package/dist/editor/components/Timeline/imperative-state.d.ts +12 -0
  199. package/dist/editor/components/Timeline/imperative-state.js +39 -0
  200. package/dist/editor/components/Timeline/is-collapsed.d.ts +2 -2
  201. package/dist/editor/components/Timeline/timeline-refs.d.ts +2 -0
  202. package/dist/editor/components/Timeline/timeline-refs.js +3 -1
  203. package/dist/editor/components/Timeline/timeline-scroll-logic.d.ts +44 -0
  204. package/dist/editor/components/Timeline/timeline-scroll-logic.js +218 -0
  205. package/dist/editor/components/TimelineInOutToggle.d.ts +2 -2
  206. package/dist/editor/components/TimelineInOutToggle.js +85 -20
  207. package/dist/editor/components/TopPanel.js +24 -1
  208. package/dist/editor/components/UpdateCheck.d.ts +1 -1
  209. package/dist/editor/components/UpdateCheck.js +1 -1
  210. package/dist/editor/components/UpdateModal/UpdateModal.d.ts +1 -1
  211. package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
  212. package/dist/editor/components/ZoomPersistor.d.ts +4 -0
  213. package/dist/editor/components/ZoomPersistor.js +37 -0
  214. package/dist/editor/components/layout.js +4 -4
  215. package/dist/editor/helpers/calculate-timeline.d.ts +2 -2
  216. package/dist/editor/helpers/colors.d.ts +2 -1
  217. package/dist/editor/helpers/colors.js +2 -1
  218. package/dist/editor/helpers/copy-text.d.ts +1 -1
  219. package/dist/editor/helpers/copy-text.js +5 -4
  220. package/dist/editor/helpers/create-folder-tree.d.ts +2 -2
  221. package/dist/editor/helpers/get-effective-translation.d.ts +26 -0
  222. package/dist/editor/helpers/get-effective-translation.js +45 -0
  223. package/dist/editor/helpers/get-left-of-timeline-slider.d.ts +1 -0
  224. package/dist/editor/helpers/get-left-of-timeline-slider.js +7 -4
  225. package/dist/editor/helpers/get-sequence-visible-range.d.ts +1 -1
  226. package/dist/editor/helpers/get-timeline-nestedness.d.ts +1 -1
  227. package/dist/editor/helpers/get-timeline-sequence-hash.d.ts +1 -1
  228. package/dist/editor/helpers/get-timeline-sequence-layout.d.ts +1 -1
  229. package/dist/editor/helpers/get-timeline-sequence-layout.js +29 -9
  230. package/dist/editor/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  231. package/dist/editor/helpers/is-composition-still.d.ts +1 -1
  232. package/dist/editor/helpers/is-current-selected-still.d.ts +4 -0
  233. package/dist/editor/helpers/is-current-selected-still.js +15 -1
  234. package/dist/editor/helpers/normalize-wheel.d.ts +5 -0
  235. package/dist/editor/helpers/normalize-wheel.js +20 -0
  236. package/dist/editor/helpers/normalize-zoom.d.ts +1 -0
  237. package/dist/editor/helpers/normalize-zoom.js +16 -0
  238. package/dist/editor/helpers/pick-color.d.ts +1 -0
  239. package/dist/editor/helpers/pick-color.js +36 -0
  240. package/dist/editor/helpers/use-compact-ui.d.ts +1 -0
  241. package/dist/editor/helpers/use-compact-ui.js +18 -0
  242. package/dist/editor/helpers/use-keybinding.d.ts +8 -2
  243. package/dist/editor/helpers/use-keybinding.js +23 -6
  244. package/dist/editor/helpers/validate-new-comp-data.d.ts +1 -1
  245. package/dist/editor/icons/Checkmark.js +1 -1
  246. package/dist/editor/icons/caret.d.ts +1 -1
  247. package/dist/editor/icons/caret.js +4 -4
  248. package/dist/editor/icons/film.d.ts +2 -1
  249. package/dist/editor/icons/film.js +1 -1
  250. package/dist/editor/icons/folder.d.ts +2 -1
  251. package/dist/editor/icons/folder.js +2 -2
  252. package/dist/editor/icons/jump-to-start.d.ts +2 -0
  253. package/dist/editor/icons/jump-to-start.js +8 -0
  254. package/dist/editor/icons/keys.js +3 -3
  255. package/dist/editor/icons/lock.d.ts +2 -1
  256. package/dist/editor/icons/lock.js +2 -2
  257. package/dist/editor/icons/media-volume.js +2 -2
  258. package/dist/editor/icons/minus.d.ts +3 -0
  259. package/dist/editor/icons/minus.js +8 -0
  260. package/dist/editor/icons/pause.d.ts +2 -1
  261. package/dist/editor/icons/pause.js +1 -1
  262. package/dist/editor/icons/play.d.ts +2 -1
  263. package/dist/editor/icons/play.js +1 -1
  264. package/dist/editor/icons/plus.d.ts +3 -0
  265. package/dist/editor/icons/plus.js +8 -0
  266. package/dist/editor/icons/step-back.d.ts +2 -1
  267. package/dist/editor/icons/step-back.js +1 -1
  268. package/dist/editor/icons/step-forward.d.ts +2 -1
  269. package/dist/editor/icons/step-forward.js +1 -1
  270. package/dist/editor/icons/still.d.ts +2 -1
  271. package/dist/editor/icons/still.js +1 -1
  272. package/dist/editor/icons/timeline.d.ts +2 -1
  273. package/dist/editor/icons/timeline.js +1 -1
  274. package/dist/editor/icons/timelineInOutPointer.d.ts +2 -1
  275. package/dist/editor/icons/timelineInOutPointer.js +2 -2
  276. package/dist/editor/state/folders.d.ts +11 -0
  277. package/dist/editor/state/folders.js +23 -0
  278. package/dist/editor/state/highest-z-index.js +2 -2
  279. package/dist/editor/state/in-out.d.ts +12 -0
  280. package/dist/editor/state/in-out.js +23 -0
  281. package/dist/editor/state/keybindings.js +4 -2
  282. package/dist/editor/state/modals.d.ts +2 -2
  283. package/dist/editor/state/preview-size.d.ts +6 -3
  284. package/dist/editor/state/preview-size.js +39 -5
  285. package/dist/editor/state/render-frame.js +12 -3
  286. package/dist/editor/state/sidebar.d.ts +12 -0
  287. package/dist/editor/state/sidebar.js +40 -0
  288. package/dist/editor/state/timeline-zoom.d.ts +10 -0
  289. package/dist/editor/state/timeline-zoom.js +38 -0
  290. package/dist/editor/state/z-index.js +7 -2
  291. package/dist/event-source-events.d.ts +6 -0
  292. package/dist/event-source-events.js +2 -0
  293. package/dist/event-source.d.ts +1 -0
  294. package/dist/event-source.js +28 -0
  295. package/dist/find-closest-package-json.d.ts +2 -0
  296. package/dist/find-closest-package-json.js +35 -0
  297. package/dist/format-bytes.d.ts +6 -0
  298. package/dist/format-bytes.js +103 -0
  299. package/dist/get-cli-options.d.ts +15 -8
  300. package/dist/get-cli-options.js +56 -46
  301. package/dist/get-composition-id.d.ts +1 -2
  302. package/dist/get-composition-id.js +2 -3
  303. package/dist/get-config-file-name.d.ts +1 -1
  304. package/dist/get-config-file-name.js +9 -6
  305. package/dist/get-env.js +6 -4
  306. package/dist/get-filename.d.ts +4 -3
  307. package/dist/get-filename.js +5 -5
  308. package/dist/get-final-output-codec.d.ts +6 -0
  309. package/dist/get-final-output-codec.js +63 -0
  310. package/dist/get-input-props.d.ts +1 -1
  311. package/dist/get-input-props.js +10 -1
  312. package/dist/get-latest-remotion-version.d.ts +1 -0
  313. package/dist/get-latest-remotion-version.js +31 -0
  314. package/dist/handle-common-errors.js +5 -0
  315. package/dist/image-formats.d.ts +3 -2
  316. package/dist/image-formats.js +6 -4
  317. package/dist/index.d.ts +79 -22
  318. package/dist/index.js +33 -15
  319. package/dist/initialize-render-cli.d.ts +1 -1
  320. package/dist/initialize-render-cli.js +8 -3
  321. package/dist/lambda-command.d.ts +1 -1
  322. package/dist/lambda-command.js +8 -4
  323. package/dist/list-of-remotion-packages.d.ts +1 -0
  324. package/dist/list-of-remotion-packages.js +20 -0
  325. package/dist/load-config.d.ts +1 -1
  326. package/dist/load-config.js +16 -5
  327. package/dist/log.js +11 -13
  328. package/dist/parse-command-line.d.ts +8 -1
  329. package/dist/parse-command-line.js +56 -28
  330. package/dist/prepare-entry-point.d.ts +12 -0
  331. package/dist/prepare-entry-point.js +37 -0
  332. package/dist/preview-server/dev-middleware/compatible-api.d.ts +7 -0
  333. package/dist/preview-server/dev-middleware/compatible-api.js +20 -0
  334. package/dist/preview-server/dev-middleware/get-paths.d.ts +7 -0
  335. package/dist/preview-server/dev-middleware/get-paths.js +19 -0
  336. package/dist/preview-server/dev-middleware/index.d.ts +3 -0
  337. package/dist/preview-server/dev-middleware/index.js +27 -0
  338. package/dist/preview-server/dev-middleware/is-color-supported.d.ts +1 -0
  339. package/dist/preview-server/dev-middleware/is-color-supported.js +37 -0
  340. package/dist/preview-server/dev-middleware/middleware.d.ts +10 -0
  341. package/dist/preview-server/dev-middleware/middleware.js +224 -0
  342. package/dist/preview-server/dev-middleware/range-parser.d.ts +15 -0
  343. package/dist/preview-server/dev-middleware/range-parser.js +96 -0
  344. package/dist/preview-server/dev-middleware/ready.d.ts +3 -0
  345. package/dist/preview-server/dev-middleware/ready.js +11 -0
  346. package/dist/preview-server/dev-middleware/setup-hooks.d.ts +2 -0
  347. package/dist/preview-server/dev-middleware/setup-hooks.js +42 -0
  348. package/dist/preview-server/dev-middleware/setup-output-filesystem.d.ts +2 -0
  349. package/dist/preview-server/dev-middleware/setup-output-filesystem.js +13 -0
  350. package/dist/preview-server/dev-middleware/types.d.ts +10 -0
  351. package/dist/preview-server/dev-middleware/types.js +2 -0
  352. package/dist/preview-server/error-overlay/entry-basic.d.ts +1 -0
  353. package/dist/preview-server/error-overlay/entry-basic.js +21 -0
  354. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.d.ts +11 -0
  355. package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.js +41 -0
  356. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +7 -0
  357. package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +46 -0
  358. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.d.ts +24 -0
  359. package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.js +64 -0
  360. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.d.ts +3 -0
  361. package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.js +31 -0
  362. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +3 -0
  363. package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.js +43 -0
  364. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.d.ts +4 -0
  365. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.js +45 -0
  366. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +4 -0
  367. package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.js +41 -0
  368. package/dist/preview-server/error-overlay/react-overlay/index.d.ts +2 -0
  369. package/dist/preview-server/error-overlay/react-overlay/index.js +21 -0
  370. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +8 -0
  371. package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +87 -0
  372. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -0
  373. package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +21 -0
  374. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.d.ts +14 -0
  375. package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.js +24 -0
  376. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.d.ts +7 -0
  377. package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.js +50 -0
  378. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.d.ts +2 -0
  379. package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.js +27 -0
  380. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +16 -0
  381. package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +483 -0
  382. package/dist/preview-server/error-overlay/react-overlay/utils/parser.d.ts +2 -0
  383. package/dist/preview-server/error-overlay/react-overlay/utils/parser.js +117 -0
  384. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.d.ts +40 -0
  385. package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.js +31 -0
  386. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.d.ts +2 -0
  387. package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.js +64 -0
  388. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.d.ts +4 -0
  389. package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +32 -0
  390. package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +7 -0
  391. package/dist/preview-server/error-overlay/remotion-overlay/Button.js +31 -0
  392. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.d.ts +6 -0
  393. package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +30 -0
  394. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.d.ts +2 -0
  395. package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.js +23 -0
  396. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +6 -0
  397. package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +48 -0
  398. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +5 -0
  399. package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +61 -0
  400. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.d.ts +4 -0
  401. package/dist/preview-server/error-overlay/remotion-overlay/ErrorMessage.js +69 -0
  402. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +6 -0
  403. package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +37 -0
  404. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.d.ts +6 -0
  405. package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +35 -0
  406. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.d.ts +6 -0
  407. package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +109 -0
  408. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.d.ts +14 -0
  409. package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +50 -0
  410. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +5 -0
  411. package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +31 -0
  412. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.d.ts +5 -0
  413. package/dist/preview-server/error-overlay/remotion-overlay/ShortcutHint.js +16 -0
  414. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.d.ts +8 -0
  415. package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +50 -0
  416. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.d.ts +2 -0
  417. package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.js +8 -0
  418. package/dist/preview-server/error-overlay/remotion-overlay/carets.d.ts +5 -0
  419. package/dist/preview-server/error-overlay/remotion-overlay/carets.js +12 -0
  420. package/dist/preview-server/error-overlay/remotion-overlay/format-location.d.ts +1 -0
  421. package/dist/preview-server/error-overlay/remotion-overlay/format-location.js +10 -0
  422. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.d.ts +5 -0
  423. package/dist/preview-server/error-overlay/remotion-overlay/get-help-link.js +43 -0
  424. package/dist/preview-server/error-overlay/remotion-overlay/index.d.ts +1 -0
  425. package/dist/preview-server/error-overlay/remotion-overlay/index.js +18 -0
  426. package/dist/preview-server/get-package-manager.d.ts +10 -0
  427. package/dist/preview-server/get-package-manager.js +47 -0
  428. package/dist/preview-server/hot-middleware/client.d.ts +19 -0
  429. package/dist/preview-server/hot-middleware/client.js +177 -0
  430. package/dist/preview-server/hot-middleware/index.d.ts +8 -0
  431. package/dist/preview-server/hot-middleware/index.js +150 -0
  432. package/dist/preview-server/hot-middleware/process-update.d.ts +12 -0
  433. package/dist/preview-server/hot-middleware/process-update.js +144 -0
  434. package/dist/preview-server/hot-middleware/strip-ansi.d.ts +1 -0
  435. package/dist/preview-server/hot-middleware/strip-ansi.js +21 -0
  436. package/dist/preview-server/hot-middleware/types.d.ts +27 -0
  437. package/dist/preview-server/hot-middleware/types.js +10 -0
  438. package/dist/preview-server/live-events.d.ts +8 -0
  439. package/dist/preview-server/live-events.js +41 -0
  440. package/dist/preview-server/project-info.d.ts +5 -0
  441. package/dist/preview-server/project-info.js +22 -0
  442. package/dist/preview-server/routes.d.ts +12 -0
  443. package/dist/preview-server/routes.js +161 -0
  444. package/dist/preview-server/serve-static.d.ts +9 -0
  445. package/dist/preview-server/serve-static.js +77 -0
  446. package/dist/preview-server/start-server.d.ts +15 -0
  447. package/dist/preview-server/start-server.js +81 -0
  448. package/dist/preview-server/update-available.d.ts +11 -0
  449. package/dist/preview-server/update-available.js +47 -0
  450. package/dist/preview.d.ts +1 -1
  451. package/dist/preview.js +38 -8
  452. package/dist/previewEntry.js +12 -2
  453. package/dist/print-error.js +6 -8
  454. package/dist/print-help.js +11 -14
  455. package/dist/progress-bar.d.ts +7 -4
  456. package/dist/progress-bar.js +19 -15
  457. package/dist/render.d.ts +1 -1
  458. package/dist/render.js +88 -55
  459. package/dist/setup-cache.d.ts +16 -2
  460. package/dist/setup-cache.js +53 -14
  461. package/dist/smooth-zoom.d.ts +4 -0
  462. package/dist/smooth-zoom.js +20 -0
  463. package/dist/still.d.ts +1 -1
  464. package/dist/still.js +93 -43
  465. package/dist/truthy.d.ts +3 -0
  466. package/dist/truthy.js +7 -0
  467. package/dist/upgrade.d.ts +1 -1
  468. package/dist/upgrade.js +18 -32
  469. package/dist/user-passed-output-location.d.ts +5 -1
  470. package/dist/user-passed-output-location.js +14 -7
  471. package/dist/versions.d.ts +2 -2
  472. package/dist/versions.js +16 -24
  473. package/dist/warn-about-ffmpeg-version.d.ts +1 -1
  474. package/package.json +15 -16
  475. package/tsconfig.json +2 -1
  476. package/vitest.config.ts +9 -0
  477. package/web/favicon.png +0 -0
  478. package/dist/editor/components/LoadingIndicator.d.ts +0 -2
  479. package/dist/editor/components/LoadingIndicator.js +0 -35
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /* eslint-disable no-console */
4
+ /**
5
+ * Source code is adapted from
6
+ * https://github.com/webpack-contrib/webpack-hot-middleware#readme
7
+ * and rewritten in TypeScript. This file is MIT licensed
8
+ */
9
+ const process_update_1 = require("./process-update");
10
+ const strip_ansi_1 = require("./strip-ansi");
11
+ const types_1 = require("./types");
12
+ if (typeof window === 'undefined') {
13
+ // do nothing
14
+ }
15
+ else if (typeof window.EventSource === 'undefined') {
16
+ console.warn('Unsupported browser: You need a browser that supports EventSource ');
17
+ }
18
+ else {
19
+ connect();
20
+ }
21
+ function eventSourceWrapper() {
22
+ let source;
23
+ let lastActivity = Date.now();
24
+ const listeners = [];
25
+ init();
26
+ const timer = setInterval(() => {
27
+ if (Date.now() - lastActivity > types_1.hotMiddlewareOptions.timeout) {
28
+ handleDisconnect();
29
+ }
30
+ }, types_1.hotMiddlewareOptions.timeout / 2);
31
+ function init() {
32
+ source = new window.EventSource(types_1.hotMiddlewareOptions.path);
33
+ source.onopen = handleOnline;
34
+ source.onerror = handleDisconnect;
35
+ source.onmessage = handleMessage;
36
+ }
37
+ function handleOnline() {
38
+ lastActivity = Date.now();
39
+ }
40
+ function handleMessage(event) {
41
+ lastActivity = Date.now();
42
+ for (let i = 0; i < listeners.length; i++) {
43
+ listeners[i](event);
44
+ }
45
+ }
46
+ function handleDisconnect() {
47
+ clearInterval(timer);
48
+ source.close();
49
+ setTimeout(init, types_1.hotMiddlewareOptions.timeout);
50
+ }
51
+ return {
52
+ addMessageListener(fn) {
53
+ listeners.push(fn);
54
+ },
55
+ };
56
+ }
57
+ function getEventSourceWrapper() {
58
+ if (!window.__whmEventSourceWrapper) {
59
+ window.__whmEventSourceWrapper = {};
60
+ }
61
+ if (!window.__whmEventSourceWrapper[types_1.hotMiddlewareOptions.path]) {
62
+ // cache the wrapper for other entries loaded on
63
+ // the same page with the same hotMiddlewareOptions.path
64
+ window.__whmEventSourceWrapper[types_1.hotMiddlewareOptions.path] =
65
+ eventSourceWrapper();
66
+ }
67
+ return window.__whmEventSourceWrapper[types_1.hotMiddlewareOptions.path];
68
+ }
69
+ function connect() {
70
+ getEventSourceWrapper().addMessageListener(handleMessage);
71
+ function handleMessage(event) {
72
+ if (event.data === '\uD83D\uDC93') {
73
+ return;
74
+ }
75
+ try {
76
+ processMessage(JSON.parse(event.data));
77
+ }
78
+ catch (ex) {
79
+ if (types_1.hotMiddlewareOptions.warn) {
80
+ console.warn('Invalid HMR message: ' + event.data + '\n' + ex);
81
+ }
82
+ }
83
+ }
84
+ }
85
+ // the reporter needs to be a singleton on the page
86
+ // in case the client is being used by multiple bundles
87
+ // we only want to report once.
88
+ // all the errors will go to all clients
89
+ const singletonKey = '__webpack_hot_middleware_reporter__';
90
+ let reporter;
91
+ if (typeof window !== 'undefined') {
92
+ if (!window[singletonKey]) {
93
+ window[singletonKey] = createReporter();
94
+ }
95
+ reporter = window[singletonKey];
96
+ }
97
+ function createReporter() {
98
+ const styles = {
99
+ errors: 'color: #ff0000;',
100
+ warnings: 'color: #999933;',
101
+ };
102
+ let previousProblems = null;
103
+ function log(type, obj) {
104
+ if (obj.action === 'building') {
105
+ console.log('[Fast Refresh] Building');
106
+ return;
107
+ }
108
+ const newProblems = obj[type]
109
+ .map((msg) => {
110
+ return (0, strip_ansi_1.stripAnsi)(msg);
111
+ })
112
+ .join('\n');
113
+ if (previousProblems === newProblems) {
114
+ return;
115
+ }
116
+ previousProblems = newProblems;
117
+ const style = styles[type];
118
+ const name = obj.name ? "'" + obj.name + "' " : '';
119
+ const title = '[Fast Refresh] bundle ' + name + 'has ' + obj[type].length + ' ' + type;
120
+ // NOTE: console.warn or console.error will print the stack trace
121
+ // which isn't helpful here, so using console.log to escape it.
122
+ if (console.group && console.groupEnd) {
123
+ console.group('%c' + title, style);
124
+ console.log('%c' + newProblems, style);
125
+ console.groupEnd();
126
+ }
127
+ else {
128
+ console.log('%c' + title + '\n\t%c' + newProblems.replace(/\n/g, '\n\t'), style + 'font-weight: bold;', style + 'font-weight: normal;');
129
+ }
130
+ }
131
+ return {
132
+ cleanProblemsCache() {
133
+ previousProblems = null;
134
+ },
135
+ problems(type, obj) {
136
+ if (types_1.hotMiddlewareOptions.warn) {
137
+ log(type, obj);
138
+ }
139
+ return true;
140
+ },
141
+ success: () => undefined,
142
+ };
143
+ }
144
+ function processMessage(obj) {
145
+ var _a, _b;
146
+ switch (obj.action) {
147
+ case 'building':
148
+ (_a = window.remotion_isBuilding) === null || _a === void 0 ? void 0 : _a.call(window);
149
+ break;
150
+ case 'sync':
151
+ case 'built': {
152
+ let applyUpdate = true;
153
+ if (obj.errors.length > 0) {
154
+ if (reporter)
155
+ reporter.problems('errors', obj);
156
+ applyUpdate = false;
157
+ }
158
+ else if (obj.warnings.length > 0) {
159
+ if (reporter) {
160
+ const overlayShown = reporter.problems('warnings', obj);
161
+ applyUpdate = overlayShown;
162
+ }
163
+ }
164
+ else if (reporter) {
165
+ reporter.cleanProblemsCache();
166
+ reporter.success();
167
+ }
168
+ if (applyUpdate) {
169
+ (_b = window.remotion_finishedBuilding) === null || _b === void 0 ? void 0 : _b.call(window);
170
+ (0, process_update_1.processUpdate)(obj.hash, obj.modules, types_1.hotMiddlewareOptions);
171
+ }
172
+ break;
173
+ }
174
+ default:
175
+ break;
176
+ }
177
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Source code is adapted from
3
+ * https://github.com/webpack-contrib/webpack-hot-middleware#readme
4
+ * and rewritten in TypeScript. This file is MIT licensed
5
+ */
6
+ import type { webpack } from '@remotion/bundler';
7
+ import type { IncomingMessage, ServerResponse } from 'http';
8
+ export declare const webpackHotMiddleware: (compiler: webpack.Compiler) => (req: IncomingMessage, res: ServerResponse, next: () => void) => void;
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ /**
3
+ * Source code is adapted from
4
+ * https://github.com/webpack-contrib/webpack-hot-middleware#readme
5
+ * and rewritten in TypeScript. This file is MIT licensed
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.webpackHotMiddleware = void 0;
9
+ const url_1 = require("url");
10
+ const log_1 = require("../../log");
11
+ const types_1 = require("./types");
12
+ const pathMatch = function (url, path) {
13
+ try {
14
+ return (0, url_1.parse)(url).pathname === path;
15
+ }
16
+ catch (e) {
17
+ return false;
18
+ }
19
+ };
20
+ const webpackHotMiddleware = (compiler) => {
21
+ const eventStream = createEventStream(types_1.hotMiddlewareOptions.heartbeat);
22
+ let latestStats = null;
23
+ compiler.hooks.invalid.tap('remotion', onInvalid);
24
+ compiler.hooks.done.tap('remotion', onDone);
25
+ function onInvalid() {
26
+ latestStats = null;
27
+ log_1.Log.info('webpack building...');
28
+ eventStream === null || eventStream === void 0 ? void 0 : eventStream.publish({
29
+ action: 'building',
30
+ });
31
+ }
32
+ function onDone(statsResult) {
33
+ // Keep hold of latest stats so they can be propagated to new clients
34
+ latestStats = statsResult;
35
+ publishStats('built', latestStats, eventStream);
36
+ }
37
+ const middleware = function (req, res, next) {
38
+ if (!pathMatch(req.url, types_1.hotMiddlewareOptions.path))
39
+ return next();
40
+ eventStream === null || eventStream === void 0 ? void 0 : eventStream.handler(req, res);
41
+ if (latestStats) {
42
+ publishStats('sync', latestStats, eventStream);
43
+ }
44
+ };
45
+ return middleware;
46
+ };
47
+ exports.webpackHotMiddleware = webpackHotMiddleware;
48
+ function createEventStream(heartbeat) {
49
+ let clientId = 0;
50
+ let clients = {};
51
+ function everyClient(fn) {
52
+ Object.keys(clients).forEach((id) => {
53
+ fn(clients[id]);
54
+ });
55
+ }
56
+ const interval = setInterval(() => {
57
+ everyClient((client) => {
58
+ client.write('data: \uD83D\uDC93\n\n');
59
+ });
60
+ }, heartbeat).unref();
61
+ return {
62
+ close() {
63
+ clearInterval(interval);
64
+ everyClient((client) => {
65
+ if (!client.finished)
66
+ client.end();
67
+ });
68
+ clients = {};
69
+ },
70
+ handler(req, res) {
71
+ const headers = {
72
+ 'Access-Control-Allow-Origin': '*',
73
+ 'Content-Type': 'text/event-stream;charset=utf-8',
74
+ 'Cache-Control': 'no-cache, no-transform',
75
+ };
76
+ const isHttp1 = !(parseInt(req.httpVersion, 10) >= 2);
77
+ if (isHttp1) {
78
+ req.socket.setKeepAlive(true);
79
+ Object.assign(headers, {
80
+ Connection: 'keep-alive',
81
+ });
82
+ }
83
+ res.writeHead(200, headers);
84
+ res.write('\n');
85
+ const id = clientId++;
86
+ clients[id] = res;
87
+ req.on('close', () => {
88
+ if (!res.finished)
89
+ res.end();
90
+ delete clients[id];
91
+ });
92
+ },
93
+ publish(payload) {
94
+ everyClient((client) => {
95
+ client.write('data: ' + JSON.stringify(payload) + '\n\n');
96
+ });
97
+ },
98
+ };
99
+ }
100
+ function publishStats(action, statsResult, eventStream) {
101
+ const stats = statsResult.toJson({
102
+ all: false,
103
+ cached: true,
104
+ children: true,
105
+ modules: true,
106
+ timings: true,
107
+ hash: true,
108
+ });
109
+ // For multi-compiler, stats will be an object with a 'children' array of stats
110
+ const bundles = extractBundles(stats);
111
+ bundles.forEach((_stats) => {
112
+ let name = _stats.name || '';
113
+ // Fallback to compilation name in case of 1 bundle (if it exists)
114
+ if (bundles.length === 1 && !name && statsResult.compilation) {
115
+ name = statsResult.compilation.name || '';
116
+ }
117
+ log_1.Log.info(`webpack built in ${_stats.time}ms`);
118
+ eventStream === null || eventStream === void 0 ? void 0 : eventStream.publish({
119
+ name,
120
+ action,
121
+ time: _stats.time,
122
+ hash: _stats.hash,
123
+ warnings: _stats.warnings || [],
124
+ errors: _stats.errors || [],
125
+ modules: buildModuleMap(_stats.modules),
126
+ });
127
+ });
128
+ }
129
+ function extractBundles(stats) {
130
+ var _a;
131
+ // Stats has modules, single bundle
132
+ if (stats.modules)
133
+ return [stats];
134
+ // Stats has children, multiple bundles
135
+ if ((_a = stats.children) === null || _a === void 0 ? void 0 : _a.length)
136
+ return stats.children;
137
+ // Not sure, assume single
138
+ return [stats];
139
+ }
140
+ function buildModuleMap(modules) {
141
+ const map = {};
142
+ if (!modules) {
143
+ return map;
144
+ }
145
+ modules.forEach((module) => {
146
+ const id = module.id;
147
+ map[id] = module.name;
148
+ });
149
+ return map;
150
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Source code is adapted from
3
+ * https://github.com/webpack-contrib/webpack-hot-middleware#readme
4
+ * and rewritten in TypeScript. This file is MIT licensed
5
+ */
6
+ /**
7
+ * Based heavily on https://github.com/webpack/webpack/blob/
8
+ * c0afdf9c6abc1dd70707c594e473802a566f7b6e/hot/only-dev-server.js
9
+ * Original copyright Tobias Koppers @sokra (MIT license)
10
+ */
11
+ import type { HotMiddlewareOptions, ModuleMap } from './types';
12
+ export declare const processUpdate: (hash: string | undefined, moduleMap: ModuleMap, options: HotMiddlewareOptions) => void;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ /* eslint-disable no-console */
3
+ /**
4
+ * Source code is adapted from
5
+ * https://github.com/webpack-contrib/webpack-hot-middleware#readme
6
+ * and rewritten in TypeScript. This file is MIT licensed
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.processUpdate = void 0;
10
+ /* global __webpack_hash__ */
11
+ if (!module.hot) {
12
+ throw new Error('[Fast refresh] Hot Module Replacement is disabled.');
13
+ }
14
+ const hmrDocsUrl = 'https://webpack.js.org/concepts/hot-module-replacement/'; // eslint-disable-line max-len
15
+ let lastHash;
16
+ const failureStatuses = { abort: 1, fail: 1 };
17
+ const applyOptions = {
18
+ ignoreUnaccepted: true,
19
+ ignoreDeclined: true,
20
+ ignoreErrored: true,
21
+ onUnaccepted(data) {
22
+ var _a;
23
+ console.warn('Ignored an update to unaccepted module ' +
24
+ ((_a = data.chain) !== null && _a !== void 0 ? _a : []).join(' -> '));
25
+ },
26
+ onDeclined(data) {
27
+ var _a;
28
+ console.warn('Ignored an update to declined module ' + ((_a = data.chain) !== null && _a !== void 0 ? _a : []).join(' -> '));
29
+ },
30
+ onErrored(data) {
31
+ console.error(data.error);
32
+ console.warn('Ignored an error while updating module ' +
33
+ data.moduleId +
34
+ ' (' +
35
+ data.type +
36
+ ')');
37
+ },
38
+ };
39
+ function upToDate(hash) {
40
+ if (hash)
41
+ lastHash = hash;
42
+ return lastHash === __webpack_hash__;
43
+ }
44
+ const processUpdate = function (hash, moduleMap, options) {
45
+ var _a;
46
+ const { reload } = options;
47
+ if (!upToDate(hash) && ((_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) === 'idle') {
48
+ check();
49
+ }
50
+ async function check() {
51
+ var _a;
52
+ const cb = function (err, updatedModules) {
53
+ var _a;
54
+ if (err)
55
+ return handleError(err);
56
+ if (!updatedModules) {
57
+ if (options.warn) {
58
+ console.warn('[Fast refresh] Cannot find update (Full reload needed)');
59
+ console.warn('[Fast refresh] (Probably because of restarting the server)');
60
+ }
61
+ performReload();
62
+ return null;
63
+ }
64
+ const applyCallback = function (applyErr, renewedModules) {
65
+ if (applyErr)
66
+ return handleError(applyErr);
67
+ if (!upToDate()) {
68
+ check();
69
+ }
70
+ logUpdates(updatedModules, renewedModules);
71
+ };
72
+ const applyResult = (_a = module.hot) === null || _a === void 0 ? void 0 : _a.apply(applyOptions, applyCallback);
73
+ if (applyResult === null || applyResult === void 0 ? void 0 : applyResult.then) {
74
+ // HotModuleReplacement.runtime.js refers to the result as `outdatedModules`
75
+ applyResult
76
+ .then((outdatedModules) => {
77
+ applyCallback(null, outdatedModules);
78
+ })
79
+ .catch((_err) => applyCallback(_err, []));
80
+ }
81
+ };
82
+ try {
83
+ const result = await ((_a = module.hot) === null || _a === void 0 ? void 0 : _a.check(false, cb));
84
+ cb(null, result);
85
+ }
86
+ catch (err) {
87
+ cb(err, []);
88
+ }
89
+ }
90
+ function logUpdates(updatedModules, renewedModules) {
91
+ var _a;
92
+ const unacceptedModules = (_a = updatedModules === null || updatedModules === void 0 ? void 0 : updatedModules.filter((moduleId) => {
93
+ return renewedModules && renewedModules.indexOf(moduleId) < 0;
94
+ })) !== null && _a !== void 0 ? _a : [];
95
+ if (unacceptedModules.length > 0) {
96
+ if (options.warn) {
97
+ console.warn("[Fast refresh] The following modules couldn't be hot updated: " +
98
+ '(Full reload needed)\n' +
99
+ 'This is usually because the modules which have changed ' +
100
+ '(and their parents) do not know how to hot reload themselves. ' +
101
+ 'See ' +
102
+ hmrDocsUrl +
103
+ ' for more details.');
104
+ unacceptedModules.forEach((moduleId) => {
105
+ console.warn('[Fast refresh] - ' + (moduleMap[moduleId] || moduleId));
106
+ });
107
+ }
108
+ performReload();
109
+ return;
110
+ }
111
+ if (!renewedModules || renewedModules.length === 0) {
112
+ console.log('[Fast refresh] Nothing hot updated.');
113
+ }
114
+ else {
115
+ renewedModules.forEach((moduleId) => {
116
+ console.log(`[Fast refresh] ${moduleMap[moduleId] || moduleId} fast refreshed.`);
117
+ });
118
+ }
119
+ }
120
+ function handleError(err) {
121
+ var _a, _b;
122
+ if (((_b = (_a = module.hot) === null || _a === void 0 ? void 0 : _a.status()) !== null && _b !== void 0 ? _b : 'nope') in failureStatuses) {
123
+ if (options.warn) {
124
+ console.warn('[Fast refresh] Cannot check for update (Full reload needed)');
125
+ console.warn('[Fast refresh] ' + (err.stack || err.message));
126
+ }
127
+ performReload();
128
+ return;
129
+ }
130
+ if (options.warn) {
131
+ console.warn('[Fast refresh] Update check failed: ' + (err.stack || err.message));
132
+ window.location.reload();
133
+ }
134
+ }
135
+ function performReload() {
136
+ if (!reload) {
137
+ return;
138
+ }
139
+ if (options.warn)
140
+ console.warn('[Fast refresh] Reloading page');
141
+ window.location.reload();
142
+ }
143
+ };
144
+ exports.processUpdate = processUpdate;
@@ -0,0 +1 @@
1
+ export declare const stripAnsi: (str: string) => string;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stripAnsi = void 0;
4
+ /**
5
+ * Code inlined from https://github.com/chalk/strip-ansi#readme
6
+ * This file is MIT licensed.
7
+ */
8
+ const ansiRegex = () => {
9
+ const pattern = [
10
+ '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
11
+ '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
12
+ ].join('|');
13
+ return new RegExp(pattern, 'g');
14
+ };
15
+ const stripAnsi = (str) => {
16
+ if (typeof str !== 'string') {
17
+ throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
18
+ }
19
+ return str.replace(ansiRegex(), '');
20
+ };
21
+ exports.stripAnsi = stripAnsi;
@@ -0,0 +1,27 @@
1
+ import type { webpack } from '@remotion/bundler';
2
+ export declare type HotMiddlewareMessage = {
3
+ action: 'building';
4
+ name?: string;
5
+ } | {
6
+ action: 'built' | 'sync';
7
+ name: string;
8
+ time: number | undefined;
9
+ errors: unknown[];
10
+ warnings: unknown[];
11
+ hash: string | undefined;
12
+ modules: {
13
+ [key: string]: string;
14
+ };
15
+ };
16
+ export declare const hotMiddlewareOptions: {
17
+ path: string;
18
+ timeout: number;
19
+ reload: boolean;
20
+ warn: boolean;
21
+ heartbeat: number;
22
+ };
23
+ export declare type HotMiddlewareOptions = typeof hotMiddlewareOptions;
24
+ export declare type WebpackStats = ReturnType<webpack.Stats['toJson']>;
25
+ export declare type ModuleMap = {
26
+ [key: string]: string;
27
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hotMiddlewareOptions = void 0;
4
+ exports.hotMiddlewareOptions = {
5
+ path: '/__webpack_hmr',
6
+ timeout: 20 * 1000,
7
+ reload: true,
8
+ warn: true,
9
+ heartbeat: 10 * 1000,
10
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="node" />
2
+ import type { IncomingMessage, ServerResponse } from 'http';
3
+ import type { EventSourceEvent } from '../event-source-events';
4
+ export declare type LiveEventsServer = {
5
+ sendEventToClient: (event: EventSourceEvent) => void;
6
+ router: (request: IncomingMessage, response: ServerResponse) => void;
7
+ };
8
+ export declare const makeLiveEventsRouter: () => LiveEventsServer;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.makeLiveEventsRouter = void 0;
4
+ const serializeMessage = (message) => {
5
+ return `data: ${JSON.stringify(message)}\n\n`;
6
+ };
7
+ const makeLiveEventsRouter = () => {
8
+ let clients = [];
9
+ const router = (request, response) => {
10
+ const headers = {
11
+ 'content-type': 'text/event-stream',
12
+ connection: 'keep-alive',
13
+ 'cache-control': 'no-cache',
14
+ };
15
+ response.writeHead(200, headers);
16
+ if (request.method === 'OPTIONS') {
17
+ response.end();
18
+ return;
19
+ }
20
+ response.write(serializeMessage({ type: 'init' }));
21
+ const clientId = String(Math.random());
22
+ const newClient = {
23
+ id: clientId,
24
+ response,
25
+ };
26
+ clients.push(newClient);
27
+ request.on('close', () => {
28
+ clients = clients.filter((client) => client.id !== clientId);
29
+ });
30
+ };
31
+ const sendEventToClient = (event) => {
32
+ clients.forEach((client) => {
33
+ client.response.write(serializeMessage(event));
34
+ });
35
+ };
36
+ return {
37
+ sendEventToClient,
38
+ router,
39
+ };
40
+ };
41
+ exports.makeLiveEventsRouter = makeLiveEventsRouter;
@@ -0,0 +1,5 @@
1
+ export declare type ProjectInfo = {
2
+ videoFile: string | null;
3
+ relativeVideoFile: string | null;
4
+ };
5
+ export declare const getProjectInfo: (remotionRoot: string) => Promise<ProjectInfo>;
@@ -0,0 +1,22 @@
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.getProjectInfo = void 0;
7
+ const fs_1 = require("fs");
8
+ const path_1 = __importDefault(require("path"));
9
+ const getProjectInfo = (remotionRoot) => {
10
+ var _a;
11
+ const pathsToLookFor = ['src/Video.tsx', 'src/Video.jsx'].map((p) => {
12
+ return path_1.default.join(remotionRoot, p);
13
+ });
14
+ const videoFile = (_a = pathsToLookFor.find((p) => (0, fs_1.existsSync)(p))) !== null && _a !== void 0 ? _a : null;
15
+ return Promise.resolve({
16
+ videoFile,
17
+ relativeVideoFile: videoFile
18
+ ? path_1.default.relative(remotionRoot, videoFile)
19
+ : null,
20
+ });
21
+ };
22
+ exports.getProjectInfo = getProjectInfo;
@@ -0,0 +1,12 @@
1
+ import type { IncomingMessage, ServerResponse } from 'http';
2
+ import type { LiveEventsServer } from './live-events';
3
+ export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, remotionRoot, userPassedPublicDir, }: {
4
+ hash: string;
5
+ hashPrefix: string;
6
+ request: IncomingMessage;
7
+ response: ServerResponse;
8
+ liveEventsServer: LiveEventsServer;
9
+ getCurrentInputProps: () => object;
10
+ remotionRoot: string;
11
+ userPassedPublicDir: string | null;
12
+ }) => void | Promise<void>;