@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
@@ -1,14 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MaxTimelineTracksReached = exports.MAX_TIMELINE_TRACKS = void 0;
3
+ exports.MaxTimelineTracksReached = exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT = exports.MAX_TIMELINE_TRACKS = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const timeline_layout_1 = require("../../helpers/timeline-layout");
6
6
  exports.MAX_TIMELINE_TRACKS = typeof process.env.MAX_TIMELINE_TRACKS === 'undefined'
7
7
  ? 15
8
8
  : Number(process.env.MAX_TIMELINE_TRACKS);
9
+ exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT = 24;
9
10
  const container = {
10
- paddingTop: 6,
11
- paddingBottom: 6,
11
+ height: exports.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT,
12
+ display: 'flex',
13
+ alignItems: 'center',
12
14
  color: 'rgba(255, 255, 255, 0.6)',
13
15
  fontFamily: 'sans-serif',
14
16
  fontSize: 12,
@@ -16,6 +18,6 @@ const container = {
16
18
  paddingLeft: timeline_layout_1.TIMELINE_PADDING + 5,
17
19
  };
18
20
  const MaxTimelineTracksReached = () => {
19
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: ["Limited display to ", exports.MAX_TIMELINE_TRACKS, " tracks to sustain performance.", '', "You can change this by setting Config.Preview.setMaxTimelineTracks() in your remotion.config.ts file."] }, void 0));
21
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: ["Limited display to ", exports.MAX_TIMELINE_TRACKS, " tracks to sustain performance.", '', "You can change this by setting Config.Preview.setMaxTimelineTracks() in your remotion.config.ts file."] }));
20
22
  };
21
23
  exports.MaxTimelineTracksReached = MaxTimelineTracksReached;
@@ -12,19 +12,24 @@ const SplitterElement_1 = require("../Splitter/SplitterElement");
12
12
  const SplitterHandle_1 = require("../Splitter/SplitterHandle");
13
13
  const is_collapsed_1 = require("./is-collapsed");
14
14
  const MaxTimelineTracks_1 = require("./MaxTimelineTracks");
15
+ const timeline_refs_1 = require("./timeline-refs");
15
16
  const timeline_state_reducer_1 = require("./timeline-state-reducer");
16
17
  const TimelineDragHandler_1 = require("./TimelineDragHandler");
17
18
  const TimelineInOutPointer_1 = require("./TimelineInOutPointer");
18
19
  const TimelineList_1 = require("./TimelineList");
20
+ const TimelinePlayCursorSyncer_1 = require("./TimelinePlayCursorSyncer");
21
+ const TimelineScrollable_1 = require("./TimelineScrollable");
19
22
  const TimelineSlider_1 = require("./TimelineSlider");
23
+ const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
20
24
  const TimelineTracks_1 = require("./TimelineTracks");
21
25
  const container = {
22
26
  minHeight: '100%',
23
27
  flex: 1,
24
28
  display: 'flex',
25
29
  height: 0,
26
- overflow: 'auto',
30
+ overflowY: 'auto',
27
31
  };
32
+ const noop = () => undefined;
28
33
  const Timeline = () => {
29
34
  const { sequences } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
30
35
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
@@ -60,18 +65,21 @@ const Timeline = () => {
60
65
  return timeline.filter((t) => !(0, is_collapsed_1.isTrackHidden)(t, timeline, state));
61
66
  }, [state, timeline]);
62
67
  const shown = withoutHidden.slice(0, MaxTimelineTracks_1.MAX_TIMELINE_TRACKS);
68
+ const hasBeenCut = withoutHidden.length > shown.length;
63
69
  const inner = (0, react_1.useMemo)(() => {
64
70
  return {
65
- height: shown.length * (timeline_layout_1.TIMELINE_LAYER_HEIGHT + timeline_layout_1.TIMELINE_BORDER * 2),
71
+ height: shown.length * (timeline_layout_1.TIMELINE_LAYER_HEIGHT + timeline_layout_1.TIMELINE_BORDER * 2) +
72
+ (hasBeenCut ? MaxTimelineTracks_1.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) +
73
+ TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT,
66
74
  display: 'flex',
67
75
  flex: 1,
68
76
  minHeight: '100%',
69
77
  overflowX: 'hidden',
70
78
  };
71
- }, [shown.length]);
79
+ }, [hasBeenCut, shown.length]);
72
80
  if (!videoConfig) {
73
81
  return null;
74
82
  }
75
- return ((0, jsx_runtime_1.jsx)("div", { style: container, className: "css-reset", children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TimelineList_1.TimelineList, { dispatchStateChange: dispatch, viewState: state, timeline: shown }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, {}, void 0), (0, jsx_runtime_1.jsxs)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: [(0, jsx_runtime_1.jsx)(TimelineTracks_1.TimelineTracks, { viewState: state, timeline: shown, fps: videoConfig.fps, hasBeenCut: withoutHidden.length > shown.length }, void 0), (0, jsx_runtime_1.jsx)(TimelineInOutPointer_1.TimelineInOutPointer, {}, void 0), (0, jsx_runtime_1.jsx)(TimelineDragHandler_1.TimelineDragHandler, {}, void 0), (0, jsx_runtime_1.jsx)(TimelineSlider_1.TimelineSlider, {}, void 0)] }, void 0)] }, void 0) }, void 0) }, void 0));
83
+ return ((0, jsx_runtime_1.jsx)("div", { ref: timeline_refs_1.timelineVerticalScroll, style: container, className: "css-reset", children: (0, jsx_runtime_1.jsx)("div", { style: inner, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(TimelineList_1.TimelineList, { dispatchStateChange: dispatch, viewState: state, timeline: shown }) }), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: false }), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(TimelineScrollable_1.TimelineScrollable, { children: [(0, jsx_runtime_1.jsx)(TimelineTracks_1.TimelineTracks, { viewState: state, timeline: shown, fps: videoConfig.fps, hasBeenCut: hasBeenCut }), (0, jsx_runtime_1.jsx)(TimelineInOutPointer_1.TimelineInOutPointer, {}), (0, jsx_runtime_1.jsx)(TimelineDragHandler_1.TimelineDragHandler, {}), (0, jsx_runtime_1.jsx)(TimelineSlider_1.TimelineSlider, {}), (0, jsx_runtime_1.jsx)(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {})] }) })] }) }) }));
76
84
  };
77
85
  exports.Timeline = Timeline;
@@ -11,9 +11,9 @@ const container = {
11
11
  alignItems: 'center',
12
12
  };
13
13
  const Icon = (props) => {
14
- return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 8 10", ...props, style: { height: 10, width: 8 }, children: (0, jsx_runtime_1.jsx)("path", { d: "M 0 0 L 8 5 L 0 10 z", fill: colors_1.LIGHT_COLOR }, void 0) }, void 0));
14
+ return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 8 10", ...props, style: { height: 10, width: 8 }, children: (0, jsx_runtime_1.jsx)("path", { d: "M 0 0 L 8 5 L 0 10 z", fill: colors_1.LIGHT_COLOR }) }));
15
15
  };
16
16
  const TimelineCollapseToggle = ({ collapsed }) => {
17
- return ((0, jsx_runtime_1.jsx)("div", { style: collapsed ? container : { ...container, transform: 'rotate(90deg)' }, children: (0, jsx_runtime_1.jsx)(Icon, {}, void 0) }, void 0));
17
+ return ((0, jsx_runtime_1.jsx)("div", { style: collapsed ? container : { ...container, transform: 'rotate(90deg)' }, children: (0, jsx_runtime_1.jsx)(Icon, {}) }));
18
18
  };
19
19
  exports.TimelineCollapseToggle = TimelineCollapseToggle;
@@ -7,50 +7,56 @@ const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
8
  const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
9
9
  const timeline_layout_1 = require("../../helpers/timeline-layout");
10
+ const in_out_1 = require("../../state/in-out");
11
+ const timeline_zoom_1 = require("../../state/timeline-zoom");
10
12
  const FramePersistor_1 = require("../FramePersistor");
11
13
  const timeline_refs_1 = require("./timeline-refs");
14
+ const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
12
15
  const TimelineInOutPointer_1 = require("./TimelineInOutPointer");
13
16
  const TimelineInOutPointerHandle_1 = require("./TimelineInOutPointerHandle");
17
+ const TimelineSlider_1 = require("./TimelineSlider");
14
18
  const inner = {
15
19
  overflowY: 'auto',
16
20
  overflowX: 'hidden',
17
21
  };
18
22
  const container = {
19
23
  userSelect: 'none',
20
- overflow: 'hidden',
21
24
  position: 'absolute',
22
- width: '100%',
23
25
  height: '100%',
26
+ top: 0,
24
27
  };
25
- const getFrameFromX = (clientX, durationInFrames, width, extrapolate) => {
28
+ const getClientXWithScroll = (x) => {
26
29
  var _a;
27
- const pos = clientX - timeline_layout_1.TIMELINE_PADDING;
28
- const frame = Math.round((0, remotion_1.interpolate)(pos, [0, width - timeline_layout_1.TIMELINE_PADDING * 2], [0, (_a = durationInFrames - 1) !== null && _a !== void 0 ? _a : 0], {
29
- extrapolateLeft: extrapolate,
30
- extrapolateRight: extrapolate,
31
- }));
32
- return frame;
30
+ return x + ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft);
33
31
  };
34
32
  const TimelineDragHandler = () => {
35
- var _a, _b;
36
- const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.sliderAreaRef, {
33
+ var _a, _b, _c;
34
+ const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
37
35
  triggerOnWindowResize: true,
38
36
  shouldApplyCssTransforms: true,
39
37
  });
40
38
  const [inOutDragging, setInOutDragging] = (0, react_1.useState)({
41
39
  dragging: false,
42
40
  });
43
- const width = (_a = size === null || size === void 0 ? void 0 : size.width) !== null && _a !== void 0 ? _a : 0;
44
- const left = (_b = size === null || size === void 0 ? void 0 : size.left) !== null && _b !== void 0 ? _b : 0;
45
- const { inFrame, outFrame } = remotion_1.Internals.Timeline.useTimelineInOutFramePosition();
46
- const { setInAndOutFrames } = remotion_1.Internals.Timeline.useTimelineSetInOutFramePosition();
41
+ const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
42
+ const left = (_c = size === null || size === void 0 ? void 0 : size.left) !== null && _c !== void 0 ? _c : 0;
43
+ const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
44
+ const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
47
45
  const { get } = (0, get_left_of_timeline_slider_1.useGetXPositionOfItemInTimeline)();
48
46
  const [dragging, setDragging] = (0, react_1.useState)({
49
47
  dragging: false,
50
48
  });
51
49
  const { playing, play, pause, seek } = player_1.PlayerInternals.usePlayer();
52
50
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
51
+ const scroller = (0, react_1.useRef)(null);
52
+ const stopInterval = () => {
53
+ if (scroller.current) {
54
+ clearInterval(scroller.current);
55
+ scroller.current = null;
56
+ }
57
+ };
53
58
  const onPointerDown = (0, react_1.useCallback)((e) => {
59
+ stopInterval();
54
60
  if (!videoConfig) {
55
61
  return;
56
62
  }
@@ -62,7 +68,7 @@ const TimelineDragHandler = () => {
62
68
  const outMarker = outFrame === null ? Infinity : get(outFrame - 1);
63
69
  setInOutDragging({
64
70
  dragging: 'in',
65
- initialOffset: e.clientX,
71
+ initialOffset: getClientXWithScroll(e.clientX),
66
72
  boundaries: [-Infinity, outMarker - inMarker],
67
73
  });
68
74
  return;
@@ -75,12 +81,17 @@ const TimelineDragHandler = () => {
75
81
  const inMarker = inFrame === null ? -Infinity : get(inFrame + 1);
76
82
  setInOutDragging({
77
83
  dragging: 'out',
78
- initialOffset: e.clientX,
84
+ initialOffset: getClientXWithScroll(e.clientX),
79
85
  boundaries: [inMarker - outMarker, Infinity],
80
86
  });
81
87
  return;
82
88
  }
83
- const frame = getFrameFromX(e.clientX - left, videoConfig.durationInFrames, width, 'clamp');
89
+ const frame = (0, timeline_scroll_logic_1.getFrameFromX)({
90
+ clientX: getClientXWithScroll(e.clientX) - left,
91
+ durationInFrames: videoConfig.durationInFrames,
92
+ width,
93
+ extrapolate: 'clamp',
94
+ });
84
95
  seek(frame);
85
96
  setDragging({
86
97
  dragging: true,
@@ -89,15 +100,84 @@ const TimelineDragHandler = () => {
89
100
  pause();
90
101
  }, [videoConfig, left, width, seek, playing, pause, outFrame, get, inFrame]);
91
102
  const onPointerMoveScrubbing = (0, react_1.useCallback)((e) => {
103
+ var _a;
92
104
  if (!videoConfig) {
93
105
  return;
94
106
  }
95
107
  if (!dragging.dragging) {
96
108
  return;
97
109
  }
98
- const frame = getFrameFromX(e.clientX - left, videoConfig.durationInFrames, width, 'clamp');
99
- seek(frame);
100
- }, [dragging.dragging, seek, left, videoConfig, width]);
110
+ const isRightOfArea = e.clientX >=
111
+ ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) +
112
+ left -
113
+ timeline_layout_1.TIMELINE_PADDING;
114
+ const isLeftOfArea = e.clientX <= left;
115
+ const frame = (0, timeline_scroll_logic_1.getFrameFromX)({
116
+ clientX: getClientXWithScroll(e.clientX) - left,
117
+ durationInFrames: videoConfig.durationInFrames,
118
+ width,
119
+ extrapolate: 'clamp',
120
+ });
121
+ if (isLeftOfArea && (0, timeline_scroll_logic_1.canScrollTimelineIntoDirection)().canScrollLeft) {
122
+ if (scroller.current) {
123
+ return;
124
+ }
125
+ const scrollEvery = () => {
126
+ var _a;
127
+ if (!(0, timeline_scroll_logic_1.canScrollTimelineIntoDirection)().canScrollLeft) {
128
+ stopInterval();
129
+ return;
130
+ }
131
+ const nextFrame = (0, timeline_scroll_logic_1.getFrameWhileScrollingLeft)({
132
+ durationInFrames: videoConfig.durationInFrames,
133
+ width,
134
+ });
135
+ const scrollPos = (0, timeline_scroll_logic_1.getScrollPositionForCursorOnLeftEdge)({
136
+ nextFrame,
137
+ durationInFrames: videoConfig.durationInFrames,
138
+ });
139
+ (_a = TimelineSlider_1.redrawTimelineSliderFast.current) === null || _a === void 0 ? void 0 : _a.draw(nextFrame);
140
+ seek(nextFrame);
141
+ (0, timeline_scroll_logic_1.scrollToTimelineXOffset)(scrollPos);
142
+ };
143
+ scrollEvery();
144
+ scroller.current = setInterval(() => {
145
+ scrollEvery();
146
+ }, 100);
147
+ }
148
+ else if (isRightOfArea &&
149
+ (0, timeline_scroll_logic_1.canScrollTimelineIntoDirection)().canScrollRight) {
150
+ if (scroller.current) {
151
+ return;
152
+ }
153
+ const scrollEvery = () => {
154
+ var _a;
155
+ if (!(0, timeline_scroll_logic_1.canScrollTimelineIntoDirection)().canScrollRight) {
156
+ stopInterval();
157
+ return;
158
+ }
159
+ const nextFrame = (0, timeline_scroll_logic_1.getFrameWhileScrollingRight)({
160
+ durationInFrames: videoConfig.durationInFrames,
161
+ width,
162
+ });
163
+ const scrollPos = (0, timeline_scroll_logic_1.getScrollPositionForCursorOnRightEdge)({
164
+ nextFrame,
165
+ durationInFrames: videoConfig.durationInFrames,
166
+ });
167
+ (_a = TimelineSlider_1.redrawTimelineSliderFast.current) === null || _a === void 0 ? void 0 : _a.draw(nextFrame);
168
+ seek(nextFrame);
169
+ (0, timeline_scroll_logic_1.scrollToTimelineXOffset)(scrollPos);
170
+ };
171
+ scrollEvery();
172
+ scroller.current = setInterval(() => {
173
+ scrollEvery();
174
+ }, 100);
175
+ }
176
+ else {
177
+ stopInterval();
178
+ seek(frame);
179
+ }
180
+ }, [videoConfig, dragging.dragging, left, width, seek]);
101
181
  const onPointerMoveInOut = (0, react_1.useCallback)((e) => {
102
182
  if (!videoConfig) {
103
183
  return;
@@ -105,7 +185,7 @@ const TimelineDragHandler = () => {
105
185
  if (!inOutDragging.dragging) {
106
186
  return;
107
187
  }
108
- const offset = Math.max(inOutDragging.boundaries[0], Math.min(inOutDragging.boundaries[1], e.clientX - inOutDragging.initialOffset));
188
+ const offset = Math.max(inOutDragging.boundaries[0], Math.min(inOutDragging.boundaries[1], getClientXWithScroll(e.clientX) - inOutDragging.initialOffset));
109
189
  if (inOutDragging.dragging === 'in') {
110
190
  if (!TimelineInOutPointerHandle_1.inPointerHandle.current) {
111
191
  throw new Error('in pointer handle');
@@ -138,6 +218,7 @@ const TimelineDragHandler = () => {
138
218
  }
139
219
  }, [get, inFrame, inOutDragging, outFrame, videoConfig, width]);
140
220
  const onPointerUpScrubbing = (0, react_1.useCallback)((e) => {
221
+ stopInterval();
141
222
  if (!videoConfig) {
142
223
  return;
143
224
  }
@@ -147,7 +228,12 @@ const TimelineDragHandler = () => {
147
228
  setDragging({
148
229
  dragging: false,
149
230
  });
150
- const frame = getFrameFromX(e.clientX - left, videoConfig.durationInFrames, width, 'clamp');
231
+ const frame = (0, timeline_scroll_logic_1.getFrameFromX)({
232
+ clientX: getClientXWithScroll(e.clientX) - left,
233
+ durationInFrames: videoConfig.durationInFrames,
234
+ width,
235
+ extrapolate: 'clamp',
236
+ });
151
237
  (0, FramePersistor_1.persistCurrentFrame)(frame);
152
238
  if (dragging.wasPlaying) {
153
239
  play();
@@ -163,7 +249,12 @@ const TimelineDragHandler = () => {
163
249
  setInOutDragging({
164
250
  dragging: false,
165
251
  });
166
- const frame = getFrameFromX(e.clientX - left, videoConfig.durationInFrames, width, 'extend');
252
+ const frame = (0, timeline_scroll_logic_1.getFrameFromX)({
253
+ clientX: getClientXWithScroll(e.clientX) - left,
254
+ durationInFrames: videoConfig.durationInFrames,
255
+ width,
256
+ extrapolate: 'extend',
257
+ });
167
258
  if (inOutDragging.dragging === 'in') {
168
259
  if (frame < 1) {
169
260
  return setInAndOutFrames((prev) => ({
@@ -221,6 +312,13 @@ const TimelineDragHandler = () => {
221
312
  window.removeEventListener('pointerup', onPointerUpInOut);
222
313
  };
223
314
  }, [inOutDragging.dragging, onPointerMoveInOut, onPointerUpInOut]);
224
- return ((0, jsx_runtime_1.jsxs)("div", { ref: timeline_refs_1.sliderAreaRef, style: container, onPointerDown: onPointerDown, children: [(0, jsx_runtime_1.jsx)("div", { style: inner }, void 0), inFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' }, void 0)), outFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }, void 0))] }, void 0));
315
+ const { zoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
316
+ const containerStyle = (0, react_1.useMemo)(() => {
317
+ return {
318
+ ...container,
319
+ width: 100 * zoom + '%',
320
+ };
321
+ }, [zoom]);
322
+ return ((0, jsx_runtime_1.jsxs)("div", { ref: timeline_refs_1.sliderAreaRef, style: containerStyle, onPointerDown: onPointerDown, children: [(0, jsx_runtime_1.jsx)("div", { style: inner }), inFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' })), outFrame !== null && ((0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }))] }));
225
323
  };
226
324
  exports.TimelineDragHandler = TimelineDragHandler;
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
8
+ const in_out_1 = require("../../state/in-out");
8
9
  const areaHighlight = {
9
10
  position: 'absolute',
10
11
  backgroundColor: 'rgba(0, 0, 0, 0.5)',
@@ -15,7 +16,7 @@ const areaHighlight = {
15
16
  exports.inMarkerAreaRef = (0, react_1.createRef)();
16
17
  exports.outMarkerAreaRef = (0, react_1.createRef)();
17
18
  const TimelineInOutPointer = () => {
18
- const { inFrame, outFrame } = remotion_1.Internals.Timeline.useTimelineInOutFramePosition();
19
+ const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
19
20
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
20
21
  const { get, width } = (0, get_left_of_timeline_slider_1.useGetXPositionOfItemInTimeline)();
21
22
  if (!videoConfig) {
@@ -25,10 +26,10 @@ const TimelineInOutPointer = () => {
25
26
  ...areaHighlight,
26
27
  left: 0,
27
28
  width: get(inFrame !== null && inFrame !== void 0 ? inFrame : 0),
28
- } }, void 0)), outFrame !== null && ((0, jsx_runtime_1.jsx)("div", { ref: exports.outMarkerAreaRef, style: {
29
+ } })), outFrame !== null && ((0, jsx_runtime_1.jsx)("div", { ref: exports.outMarkerAreaRef, style: {
29
30
  ...areaHighlight,
30
31
  left: get(outFrame),
31
32
  width: width - get(outFrame),
32
- } }, void 0))] }, void 0));
33
+ } }))] }));
33
34
  };
34
35
  exports.TimelineInOutPointer = TimelineInOutPointer;
@@ -26,6 +26,6 @@ const TimelineInOutPointerHandle = ({ dragging, type, atFrame }) => {
26
26
  transform: `translateX(${get(atFrame)}px)`,
27
27
  };
28
28
  }, [atFrame, dragging, get]);
29
- return ((0, jsx_runtime_1.jsx)("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style }, void 0));
29
+ return ((0, jsx_runtime_1.jsx)("div", { ref: type === 'in' ? exports.inPointerHandle : exports.outPointerHandle, style: style }));
30
30
  };
31
31
  exports.TimelineInOutPointerHandle = TimelineInOutPointerHandle;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key';
3
- import { TimelineActionState, TimelineViewState } from './timeline-state-reducer';
2
+ import type { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key';
3
+ import type { TimelineActionState, TimelineViewState } from './timeline-state-reducer';
4
4
  export declare const TimelineList: React.FC<{
5
5
  timeline: TrackWithHash[];
6
6
  viewState: TimelineViewState;
@@ -2,17 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelineList = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../../helpers/colors");
5
6
  const is_collapsed_1 = require("./is-collapsed");
6
7
  const TimelineListItem_1 = require("./TimelineListItem");
8
+ const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
7
9
  const container = {
8
10
  flex: 1,
9
11
  display: 'flex',
10
12
  flexDirection: 'column',
13
+ background: colors_1.BACKGROUND,
11
14
  };
12
15
  const TimelineList = ({ timeline, viewState, dispatchStateChange }) => {
13
- return ((0, jsx_runtime_1.jsx)("div", { style: container, children: timeline.map((track, i) => {
14
- const beforeDepth = i === 0 ? 0 : timeline[i - 1].depth;
15
- return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(TimelineListItem_1.TimelineListItem, { hash: track.hash, dispatchStateChange: dispatchStateChange, collapsed: (0, is_collapsed_1.isTrackCollapsed)(track.hash, viewState), nestedDepth: track.depth, sequence: track.sequence, beforeDepth: beforeDepth, canCollapse: track.canCollapse }, track.sequence.id) }, track.sequence.id));
16
- }) }, void 0));
16
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(TimelineTimeIndicators_1.TimelineTimePadding, {}), timeline.map((track, i) => {
17
+ const beforeDepth = i === 0 ? 0 : timeline[i - 1].depth;
18
+ return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(TimelineListItem_1.TimelineListItem, { hash: track.hash, dispatchStateChange: dispatchStateChange, collapsed: (0, is_collapsed_1.isTrackCollapsed)(track.hash, viewState), nestedDepth: track.depth, sequence: track.sequence, beforeDepth: beforeDepth, canCollapse: track.canCollapse }, track.sequence.id) }, track.sequence.id));
19
+ }), (0, jsx_runtime_1.jsx)(TimelineTimeIndicators_1.TimelineTimePlaceholders, {})] }));
17
20
  };
18
21
  exports.TimelineList = TimelineList;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { TSequence } from 'remotion';
3
- import { TimelineActionState } from './timeline-state-reducer';
2
+ import type { TSequence } from 'remotion';
3
+ import type { TimelineActionState } from './timeline-state-reducer';
4
+ export declare const TOTAL_TIMELINE_LAYER_LEFT_PADDING: number;
4
5
  export declare const TimelineListItem: React.FC<{
5
6
  sequence: TSequence;
6
7
  nestedDepth: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimelineListItem = void 0;
3
+ exports.TimelineListItem = exports.TOTAL_TIMELINE_LAYER_LEFT_PADDING = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const timeline_layout_1 = require("../../helpers/timeline-layout");
@@ -10,6 +10,10 @@ const TimelineSequenceFrame_1 = require("./TimelineSequenceFrame");
10
10
  const HOOK_WIDTH = 7;
11
11
  const BORDER_BOTTOM_LEFT_RADIUS = 2;
12
12
  const SPACING = 5;
13
+ const TIMELINE_LAYER_PADDING = HOOK_WIDTH + SPACING * 1.5;
14
+ const TIMELINE_COLLAPSER_WIDTH = 8;
15
+ const TIMELINE_COLLAPSER_MARGIN_RIGHT = 10;
16
+ exports.TOTAL_TIMELINE_LAYER_LEFT_PADDING = TIMELINE_COLLAPSER_WIDTH + TIMELINE_COLLAPSER_MARGIN_RIGHT + timeline_layout_1.TIMELINE_PADDING;
13
17
  const textStyle = {
14
18
  fontSize: 13,
15
19
  };
@@ -22,6 +26,7 @@ const outer = {
22
26
  alignItems: 'center',
23
27
  paddingLeft: timeline_layout_1.TIMELINE_PADDING,
24
28
  wordBreak: 'break-all',
29
+ textAlign: 'left',
25
30
  };
26
31
  const hookContainer = {
27
32
  height: timeline_layout_1.TIMELINE_LAYER_HEIGHT,
@@ -43,9 +48,9 @@ const smallSpace = {
43
48
  width: SPACING * 0.5,
44
49
  };
45
50
  const collapser = {
46
- width: 8,
51
+ width: TIMELINE_COLLAPSER_WIDTH,
47
52
  userSelect: 'none',
48
- marginRight: 10,
53
+ marginRight: TIMELINE_COLLAPSER_MARGIN_RIGHT,
49
54
  };
50
55
  const collapserButton = {
51
56
  ...collapser,
@@ -54,7 +59,7 @@ const collapserButton = {
54
59
  };
55
60
  const TimelineListItem = ({ nestedDepth, sequence, collapsed, beforeDepth, dispatchStateChange, hash, canCollapse, }) => {
56
61
  const { tabIndex } = (0, z_index_1.useZIndex)();
57
- const leftOffset = HOOK_WIDTH + SPACING * 1.5;
62
+ const leftOffset = TIMELINE_LAYER_PADDING;
58
63
  const hookStyle = (0, react_1.useMemo)(() => {
59
64
  return {
60
65
  ...hook,
@@ -85,6 +90,6 @@ const TimelineListItem = ({ nestedDepth, sequence, collapsed, beforeDepth, dispa
85
90
  const text = sequence.displayName.length > 80
86
91
  ? sequence.displayName.slice(0, 80) + '...'
87
92
  : sequence.displayName;
88
- return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: padder }, void 0), canCollapse ? ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, type: "button", style: collapserButton, onClick: toggleCollapse, children: (0, jsx_runtime_1.jsx)(TimelineCollapseToggle_1.TimelineCollapseToggle, { collapsed: collapsed }, void 0) }, void 0)) : ((0, jsx_runtime_1.jsx)("div", { style: collapser }, void 0)), sequence.parent && nestedDepth > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: smallSpace }, void 0), (0, jsx_runtime_1.jsx)("div", { style: hookContainer, children: (0, jsx_runtime_1.jsx)("div", { style: hookStyle }, void 0) }, void 0), (0, jsx_runtime_1.jsx)("div", { style: space }, void 0)] }, void 0)) : null, (0, jsx_runtime_1.jsxs)("div", { style: textStyle, children: [text || 'Untitled', (0, jsx_runtime_1.jsx)(TimelineSequenceFrame_1.TimelineSequenceFrame, { duration: sequence.duration, from: sequence.from }, void 0)] }, void 0)] }, void 0));
93
+ return ((0, jsx_runtime_1.jsxs)("div", { style: outer, children: [(0, jsx_runtime_1.jsx)("div", { style: padder }), canCollapse ? ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, type: "button", style: collapserButton, onClick: toggleCollapse, children: (0, jsx_runtime_1.jsx)(TimelineCollapseToggle_1.TimelineCollapseToggle, { collapsed: collapsed }) })) : ((0, jsx_runtime_1.jsx)("div", { style: collapser })), sequence.parent && nestedDepth > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: smallSpace }), (0, jsx_runtime_1.jsx)("div", { style: hookContainer, children: (0, jsx_runtime_1.jsx)("div", { style: hookStyle }) }), (0, jsx_runtime_1.jsx)("div", { style: space })] })) : null, (0, jsx_runtime_1.jsxs)("div", { style: textStyle, children: [text || 'Untitled', (0, jsx_runtime_1.jsx)(TimelineSequenceFrame_1.TimelineSequenceFrame, { duration: sequence.duration, from: sequence.from })] })] }));
89
94
  };
90
95
  exports.TimelineListItem = TimelineListItem;
@@ -0,0 +1,2 @@
1
+ import type React from 'react';
2
+ export declare const TimelinePlayCursorSyncer: React.FC;
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelinePlayCursorSyncer = void 0;
4
+ const react_1 = require("react");
5
+ const remotion_1 = require("remotion");
6
+ const timeline_zoom_1 = require("../../state/timeline-zoom");
7
+ const imperative_state_1 = require("./imperative-state");
8
+ const timeline_refs_1 = require("./timeline-refs");
9
+ const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
10
+ let lastTimelinePositionWhileScrolling = null;
11
+ const TimelinePlayCursorSyncer = () => {
12
+ var _a, _b, _c;
13
+ const video = remotion_1.Internals.useVideo();
14
+ const timelineContext = (0, react_1.useContext)(remotion_1.Internals.Timeline.TimelineContext);
15
+ const { zoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
16
+ (0, imperative_state_1.setCurrentFrame)(timelineContext.frame);
17
+ (0, imperative_state_1.setCurrentZoom)(zoom);
18
+ (0, imperative_state_1.setCurrentDuration)((_a = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _a !== void 0 ? _a : 1);
19
+ (0, imperative_state_1.setCurrentFps)((_b = video === null || video === void 0 ? void 0 : video.fps) !== null && _b !== void 0 ? _b : 1);
20
+ const playing = (_c = timelineContext.playing) !== null && _c !== void 0 ? _c : false;
21
+ /**
22
+ * While playing (forwards or backwards), jump one viewport width to the left or right when the cursor goes out of the viewport.
23
+ */
24
+ (0, react_1.useEffect)(() => {
25
+ if (!video) {
26
+ return;
27
+ }
28
+ if (!playing) {
29
+ return;
30
+ }
31
+ (0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
32
+ direction: timelineContext.playbackRate > 0 ? 'page-right' : 'page-left',
33
+ durationInFrames: video.durationInFrames,
34
+ frame: timelineContext.frame,
35
+ });
36
+ }, [playing, timelineContext, video]);
37
+ /**
38
+ * Restore state if `enter` is being pressed
39
+ */
40
+ (0, react_1.useEffect)(() => {
41
+ const { current } = timeline_refs_1.scrollableRef;
42
+ if (!current) {
43
+ return;
44
+ }
45
+ if (playing) {
46
+ lastTimelinePositionWhileScrolling = {
47
+ scrollLeft: current.scrollLeft,
48
+ frame: (0, imperative_state_1.getCurrentFrame)(),
49
+ zoomLevel: (0, imperative_state_1.getCurrentZoom)(),
50
+ durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
51
+ };
52
+ }
53
+ else if (lastTimelinePositionWhileScrolling !== null) {
54
+ if ((0, timeline_scroll_logic_1.isCursorInViewport)({
55
+ frame: (0, imperative_state_1.getCurrentFrame)(),
56
+ durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
57
+ })) {
58
+ return;
59
+ }
60
+ if (lastTimelinePositionWhileScrolling.zoomLevel === (0, imperative_state_1.getCurrentZoom)() &&
61
+ lastTimelinePositionWhileScrolling.durationInFrames ===
62
+ (0, imperative_state_1.getCurrentDuration)()) {
63
+ current.scrollLeft = lastTimelinePositionWhileScrolling.scrollLeft;
64
+ }
65
+ else {
66
+ (0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
67
+ direction: 'center',
68
+ durationInFrames: (0, imperative_state_1.getCurrentDuration)(),
69
+ frame: lastTimelinePositionWhileScrolling.frame,
70
+ });
71
+ }
72
+ }
73
+ }, [playing]);
74
+ return null;
75
+ };
76
+ exports.TimelinePlayCursorSyncer = TimelinePlayCursorSyncer;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const TimelineScrollable: React.FC<{
3
+ children: React.ReactNode;
4
+ }>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineScrollable = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const timeline_refs_1 = require("./timeline-refs");
8
+ const outer = {
9
+ width: '100%',
10
+ height: '100%',
11
+ overflowX: 'auto',
12
+ overflowY: 'hidden',
13
+ position: 'relative',
14
+ backgroundColor: colors_1.TIMELINE_BACKGROUND,
15
+ };
16
+ const TimelineScrollable = ({ children }) => {
17
+ const containerStyle = (0, react_1.useMemo)(() => {
18
+ return {
19
+ width: '100%',
20
+ minHeight: '100%',
21
+ };
22
+ }, []);
23
+ return ((0, jsx_runtime_1.jsx)("div", { ref: timeline_refs_1.scrollableRef, style: outer, children: (0, jsx_runtime_1.jsx)("div", { style: containerStyle, children: children }) }));
24
+ };
25
+ exports.TimelineScrollable = TimelineScrollable;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { TSequence } from 'remotion';
2
+ import type { TSequence } from 'remotion';
3
3
  export declare const TimelineSequence: React.FC<{
4
4
  s: TSequence;
5
5
  fps: number;
@@ -67,6 +67,6 @@ const TimelineSequence = ({ s, fps }) => {
67
67
  };
68
68
  }, []);
69
69
  const thumbnailWidth = timeline_layout_1.TIMELINE_LAYER_HEIGHT * (video.width / video.height);
70
- return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [(0, jsx_runtime_1.jsx)("div", { style: row, children: richTimeline && s.type === 'sequence' ? ((0, jsx_runtime_1.jsx)(Thumbnail_1.Thumbnail, { targetHeight: timeline_layout_1.TIMELINE_LAYER_HEIGHT, targetWidth: thumbnailWidth, composition: video, frameToDisplay: Math.floor(s.from + s.duration / 2) }, void 0)) : null }, void 0), s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, fps: fps, volume: s.volume, setMaxMediaDuration: setMaxMediaDuration }, void 0)) : null, s.type === 'video' ? (0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src }, void 0) : null, s.showLoopTimesInTimeline === undefined ? null : ((0, jsx_runtime_1.jsx)(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.showLoopTimesInTimeline }, void 0))] }, s.id));
70
+ return ((0, jsx_runtime_1.jsxs)("div", { style: style, title: s.displayName, children: [(0, jsx_runtime_1.jsx)("div", { style: row, children: richTimeline && s.type === 'sequence' ? ((0, jsx_runtime_1.jsx)(Thumbnail_1.Thumbnail, { targetHeight: timeline_layout_1.TIMELINE_LAYER_HEIGHT, targetWidth: thumbnailWidth, composition: video, frameToDisplay: Math.floor(s.from + s.duration / 2) })) : null }), s.type === 'audio' ? ((0, jsx_runtime_1.jsx)(AudioWaveform_1.AudioWaveform, { src: s.src, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, fps: fps, volume: s.volume, setMaxMediaDuration: setMaxMediaDuration })) : null, s.type === 'video' ? (0, jsx_runtime_1.jsx)(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src }) : null, s.showLoopTimesInTimeline === undefined ? null : ((0, jsx_runtime_1.jsx)(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.showLoopTimesInTimeline }))] }, s.id));
71
71
  };
72
72
  exports.TimelineSequence = TimelineSequence;
@@ -26,6 +26,6 @@ The current time within the sequence.
26
26
  Call \`useCurrentFrame()\` within the sequence to get the time programmatically.
27
27
 
28
28
  Call \`const {durationInFrames} = useVideoConfig()\` to get the duration of the sequence.
29
- `.trim(), style: relativeFrameStyle, children: [(0, render_frame_1.renderFrame)(relativeFrame, fps), " (", relativeFrame, ")"] }, void 0));
29
+ `.trim(), style: relativeFrameStyle, children: [(0, render_frame_1.renderFrame)(relativeFrame, fps), " (", relativeFrame, ")"] }));
30
30
  };
31
31
  exports.TimelineSequenceFrame = TimelineSequenceFrame;
@@ -1,2 +1,5 @@
1
1
  import React from 'react';
2
+ export declare const redrawTimelineSliderFast: React.RefObject<{
3
+ draw: (frame: number, width?: number) => void;
4
+ }>;
2
5
  export declare const TimelineSlider: React.FC;