@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,218 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.zoomAndPreserveCursor = exports.getFrameFromX = exports.getFrameWhileScrollingRight = exports.getFrameIncrementFromWidth = exports.getFrameIncrement = exports.getScrollPositionForCursorOnRightEdge = exports.getScrollPositionForCursorOnLeftEdge = exports.scrollToTimelineXOffset = exports.ensureFrameIsInViewport = exports.isCursorInViewport = exports.getFrameWhileScrollingLeft = exports.canScrollTimelineIntoDirection = void 0;
4
+ const remotion_1 = require("remotion");
5
+ const timeline_layout_1 = require("../../helpers/timeline-layout");
6
+ const timeline_refs_1 = require("./timeline-refs");
7
+ const TimelineSlider_1 = require("./TimelineSlider");
8
+ const canScrollTimelineIntoDirection = () => {
9
+ const current = timeline_refs_1.scrollableRef.current;
10
+ const { scrollWidth, scrollLeft, clientWidth } = current;
11
+ const canScrollRight = scrollWidth - scrollLeft - clientWidth > timeline_layout_1.TIMELINE_PADDING;
12
+ const canScrollLeft = scrollLeft > timeline_layout_1.TIMELINE_PADDING;
13
+ return { canScrollRight, canScrollLeft };
14
+ };
15
+ exports.canScrollTimelineIntoDirection = canScrollTimelineIntoDirection;
16
+ const SCROLL_INCREMENT = 200;
17
+ const calculateFrameWhileScrollingRight = ({ durationInFrames, width, scrollLeft, }) => {
18
+ var _a;
19
+ return ((0, exports.getFrameFromX)({
20
+ clientX: scrollLeft,
21
+ durationInFrames,
22
+ width,
23
+ extrapolate: 'clamp',
24
+ }) +
25
+ Math.ceil((((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) - timeline_layout_1.TIMELINE_PADDING) /
26
+ (0, exports.getFrameIncrement)(durationInFrames)));
27
+ };
28
+ const getFrameWhileScrollingLeft = ({ durationInFrames, width, }) => {
29
+ var _a, _b;
30
+ const nextFrame = (0, exports.getFrameFromX)({
31
+ clientX: ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) - SCROLL_INCREMENT,
32
+ durationInFrames,
33
+ width,
34
+ extrapolate: 'clamp',
35
+ });
36
+ const currentFrame = (0, exports.getFrameFromX)({
37
+ clientX: (_b = timeline_refs_1.scrollableRef.current) === null || _b === void 0 ? void 0 : _b.scrollLeft,
38
+ durationInFrames,
39
+ width,
40
+ extrapolate: 'clamp',
41
+ });
42
+ // Should go back at least 1 frame, but not less than 0
43
+ return Math.max(0, Math.min(currentFrame - 1, nextFrame));
44
+ };
45
+ exports.getFrameWhileScrollingLeft = getFrameWhileScrollingLeft;
46
+ const isCursorInViewport = ({ frame, durationInFrames, }) => {
47
+ var _a, _b, _c, _d;
48
+ const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
49
+ const scrollLeft = (_d = (_c = timeline_refs_1.scrollableRef.current) === null || _c === void 0 ? void 0 : _c.scrollLeft) !== null && _d !== void 0 ? _d : 0;
50
+ const scrollPosOnRightEdge = (0, exports.getScrollPositionForCursorOnRightEdge)({
51
+ nextFrame: frame,
52
+ durationInFrames,
53
+ });
54
+ const scrollPosOnLeftEdge = (0, exports.getScrollPositionForCursorOnLeftEdge)({
55
+ nextFrame: frame,
56
+ durationInFrames,
57
+ });
58
+ const currentFrameRight = calculateFrameWhileScrollingRight({
59
+ durationInFrames,
60
+ scrollLeft,
61
+ width,
62
+ });
63
+ return !(scrollPosOnRightEdge >=
64
+ (0, exports.getScrollPositionForCursorOnRightEdge)({
65
+ nextFrame: currentFrameRight,
66
+ durationInFrames,
67
+ }) || scrollPosOnLeftEdge < scrollLeft);
68
+ };
69
+ exports.isCursorInViewport = isCursorInViewport;
70
+ const ensureFrameIsInViewport = ({ direction, durationInFrames, frame, }) => {
71
+ var _a, _b, _c, _d, _e;
72
+ (_a = TimelineSlider_1.redrawTimelineSliderFast.current) === null || _a === void 0 ? void 0 : _a.draw(frame);
73
+ const width = (_c = (_b = timeline_refs_1.scrollableRef.current) === null || _b === void 0 ? void 0 : _b.scrollWidth) !== null && _c !== void 0 ? _c : 0;
74
+ const scrollLeft = (_e = (_d = timeline_refs_1.scrollableRef.current) === null || _d === void 0 ? void 0 : _d.scrollLeft) !== null && _e !== void 0 ? _e : 0;
75
+ if (direction === 'fit-left') {
76
+ const currentFrameLeft = (0, exports.getFrameFromX)({
77
+ clientX: scrollLeft,
78
+ durationInFrames,
79
+ width,
80
+ extrapolate: 'clamp',
81
+ });
82
+ const scrollPos = (0, exports.getScrollPositionForCursorOnLeftEdge)({
83
+ nextFrame: frame,
84
+ durationInFrames,
85
+ });
86
+ const needsToScrollLeft = scrollPos <=
87
+ (0, exports.getScrollPositionForCursorOnLeftEdge)({
88
+ nextFrame: currentFrameLeft,
89
+ durationInFrames,
90
+ });
91
+ if (needsToScrollLeft) {
92
+ (0, exports.scrollToTimelineXOffset)(scrollPos);
93
+ }
94
+ }
95
+ if (direction === 'fit-right') {
96
+ const currentFrameRight = calculateFrameWhileScrollingRight({
97
+ durationInFrames,
98
+ scrollLeft,
99
+ width,
100
+ });
101
+ const scrollPos = (0, exports.getScrollPositionForCursorOnRightEdge)({
102
+ nextFrame: frame,
103
+ durationInFrames,
104
+ });
105
+ const needsToScrollRight = scrollPos >=
106
+ (0, exports.getScrollPositionForCursorOnRightEdge)({
107
+ nextFrame: currentFrameRight,
108
+ durationInFrames,
109
+ });
110
+ if (needsToScrollRight) {
111
+ (0, exports.scrollToTimelineXOffset)(scrollPos);
112
+ }
113
+ }
114
+ if (direction === 'page-right' || direction === 'page-left') {
115
+ if (!(0, exports.isCursorInViewport)({ frame, durationInFrames })) {
116
+ (0, exports.scrollToTimelineXOffset)(direction === 'page-left'
117
+ ? (0, exports.getScrollPositionForCursorOnRightEdge)({
118
+ nextFrame: frame,
119
+ durationInFrames,
120
+ })
121
+ : (0, exports.getScrollPositionForCursorOnLeftEdge)({
122
+ nextFrame: frame,
123
+ durationInFrames,
124
+ }));
125
+ }
126
+ }
127
+ if (direction === 'center') {
128
+ const scrollPosOnRightEdge = (0, exports.getScrollPositionForCursorOnRightEdge)({
129
+ nextFrame: frame,
130
+ durationInFrames,
131
+ });
132
+ const scrollPosOnLeftEdge = (0, exports.getScrollPositionForCursorOnLeftEdge)({
133
+ nextFrame: frame,
134
+ durationInFrames,
135
+ });
136
+ (0, exports.scrollToTimelineXOffset)((scrollPosOnLeftEdge + scrollPosOnRightEdge) / 2);
137
+ }
138
+ };
139
+ exports.ensureFrameIsInViewport = ensureFrameIsInViewport;
140
+ const scrollToTimelineXOffset = (scrollPos) => {
141
+ var _a;
142
+ (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scroll({
143
+ left: scrollPos,
144
+ });
145
+ };
146
+ exports.scrollToTimelineXOffset = scrollToTimelineXOffset;
147
+ const getScrollPositionForCursorOnLeftEdge = ({ nextFrame, durationInFrames, }) => {
148
+ const frameIncrement = (0, exports.getFrameIncrement)(durationInFrames);
149
+ const scrollPos = frameIncrement * nextFrame;
150
+ return scrollPos;
151
+ };
152
+ exports.getScrollPositionForCursorOnLeftEdge = getScrollPositionForCursorOnLeftEdge;
153
+ const getScrollPositionForCursorOnRightEdge = ({ nextFrame, durationInFrames, }) => {
154
+ var _a, _b;
155
+ const frameIncrement = (0, exports.getFrameIncrement)(durationInFrames);
156
+ const framesRemaining = durationInFrames - 1 - nextFrame;
157
+ const fromRight = framesRemaining * frameIncrement + timeline_layout_1.TIMELINE_PADDING;
158
+ const scrollPos = ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) -
159
+ fromRight -
160
+ ((_b = timeline_refs_1.scrollableRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth) +
161
+ timeline_layout_1.TIMELINE_PADDING +
162
+ 4; // clearfix;
163
+ return scrollPos;
164
+ };
165
+ exports.getScrollPositionForCursorOnRightEdge = getScrollPositionForCursorOnRightEdge;
166
+ const getFrameIncrement = (durationInFrames) => {
167
+ var _a, _b;
168
+ const width = (_b = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollWidth) !== null && _b !== void 0 ? _b : 0;
169
+ return (0, exports.getFrameIncrementFromWidth)(durationInFrames, width);
170
+ };
171
+ exports.getFrameIncrement = getFrameIncrement;
172
+ const getFrameIncrementFromWidth = (durationInFrames, width) => {
173
+ return (width - timeline_layout_1.TIMELINE_PADDING * 2) / (durationInFrames - 1);
174
+ };
175
+ exports.getFrameIncrementFromWidth = getFrameIncrementFromWidth;
176
+ const getFrameWhileScrollingRight = ({ durationInFrames, width, }) => {
177
+ var _a, _b;
178
+ const nextFrame = calculateFrameWhileScrollingRight({
179
+ durationInFrames,
180
+ width,
181
+ scrollLeft: ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft) + SCROLL_INCREMENT,
182
+ });
183
+ const currentFrame = calculateFrameWhileScrollingRight({
184
+ durationInFrames,
185
+ width,
186
+ scrollLeft: (_b = timeline_refs_1.scrollableRef.current) === null || _b === void 0 ? void 0 : _b.scrollLeft,
187
+ });
188
+ // Should scroll by at least 1 frame, but not overshoot duration
189
+ return Math.min(durationInFrames - 1, Math.max(nextFrame, currentFrame + 1));
190
+ };
191
+ exports.getFrameWhileScrollingRight = getFrameWhileScrollingRight;
192
+ const getFrameFromX = ({ clientX, durationInFrames, width, extrapolate, }) => {
193
+ var _a;
194
+ const pos = clientX - timeline_layout_1.TIMELINE_PADDING;
195
+ 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], {
196
+ extrapolateLeft: extrapolate,
197
+ extrapolateRight: extrapolate,
198
+ }));
199
+ return frame;
200
+ };
201
+ exports.getFrameFromX = getFrameFromX;
202
+ const zoomAndPreserveCursor = ({ oldZoom, newZoom, currentFrame, currentDurationInFrames, }) => {
203
+ var _a, _b, _c;
204
+ const ratio = newZoom / oldZoom;
205
+ if (ratio === 1) {
206
+ return;
207
+ }
208
+ const { current } = timeline_refs_1.scrollableRef;
209
+ if (!current) {
210
+ return;
211
+ }
212
+ const frameIncrement = (0, exports.getFrameIncrement)(currentDurationInFrames);
213
+ const prevCursorPosition = frameIncrement * currentFrame + timeline_layout_1.TIMELINE_PADDING;
214
+ const newCursorPosition = ratio * (prevCursorPosition - timeline_layout_1.TIMELINE_PADDING) + timeline_layout_1.TIMELINE_PADDING;
215
+ current.scrollLeft += newCursorPosition - prevCursorPosition;
216
+ (_a = TimelineSlider_1.redrawTimelineSliderFast.current) === null || _a === void 0 ? void 0 : _a.draw(currentFrame, ((_c = (_b = timeline_refs_1.scrollableRef.current) === null || _b === void 0 ? void 0 : _b.clientWidth) !== null && _c !== void 0 ? _c : 0) * ratio);
217
+ };
218
+ exports.zoomAndPreserveCursor = zoomAndPreserveCursor;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  export declare const inOutHandles: React.RefObject<{
3
- inMarkClick: () => void;
4
- outMarkClick: () => void;
3
+ inMarkClick: (e: KeyboardEvent | null) => void;
4
+ outMarkClick: (e: KeyboardEvent | null) => void;
5
5
  clearMarks: () => void;
6
6
  setMarks: (marks: [number | null, number | null]) => void;
7
7
  }>;
@@ -4,12 +4,20 @@ exports.TimelineInOutPointToggle = exports.inOutHandles = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const truthy_1 = require("../../truthy");
7
8
  const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
8
9
  const use_keybinding_1 = require("../helpers/use-keybinding");
9
10
  const timelineInOutPointer_1 = require("../icons/timelineInOutPointer");
11
+ const in_out_1 = require("../state/in-out");
10
12
  const marks_1 = require("../state/marks");
11
13
  const ControlButton_1 = require("./ControlButton");
12
- const getTooltipText = (pointType) => `Mark ${pointType}`;
14
+ const getTooltipText = (pointType, key) => [
15
+ `Mark ${pointType}`,
16
+ (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : `(${key})`,
17
+ '- right click to clear',
18
+ ]
19
+ .filter(truthy_1.truthy)
20
+ .join(' ');
13
21
  const style = {
14
22
  width: 16,
15
23
  height: 16,
@@ -17,16 +25,33 @@ const style = {
17
25
  exports.inOutHandles = (0, react_1.createRef)();
18
26
  const TimelineInOutPointToggle = () => {
19
27
  const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
20
- const { inFrame, outFrame } = remotion_1.Internals.Timeline.useTimelineInOutFramePosition();
21
- const { setInAndOutFrames } = remotion_1.Internals.Timeline.useTimelineSetInOutFramePosition();
28
+ const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
29
+ const { setInAndOutFrames } = (0, in_out_1.useTimelineSetInOutFramePosition)();
22
30
  const { currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
23
31
  const isStill = (0, is_current_selected_still_1.useIsStill)();
24
32
  const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
25
33
  const keybindings = (0, use_keybinding_1.useKeybinding)();
26
- const onInMark = (0, react_1.useCallback)(() => {
34
+ const onInOutClear = (0, react_1.useCallback)(() => {
35
+ setInAndOutFrames(() => {
36
+ return {
37
+ inFrame: null,
38
+ outFrame: null,
39
+ };
40
+ });
41
+ }, [setInAndOutFrames]);
42
+ const onInMark = (0, react_1.useCallback)((e) => {
27
43
  if (!videoConfig) {
28
44
  return null;
29
45
  }
46
+ if (e === null || e === void 0 ? void 0 : e.shiftKey) {
47
+ setInAndOutFrames((f) => {
48
+ return {
49
+ ...f,
50
+ inFrame: null,
51
+ };
52
+ });
53
+ return null;
54
+ }
30
55
  setInAndOutFrames((prev) => {
31
56
  const biggestPossible = prev.outFrame === null ? Infinity : prev.outFrame - 1;
32
57
  const selected = Math.min(timelinePosition, biggestPossible);
@@ -51,10 +76,43 @@ const TimelineInOutPointToggle = () => {
51
76
  };
52
77
  });
53
78
  }, [setInAndOutFrames, timelinePosition, videoConfig]);
54
- const onOutMark = (0, react_1.useCallback)(() => {
79
+ const clearInMark = (0, react_1.useCallback)((e) => {
80
+ if (!videoConfig) {
81
+ return null;
82
+ }
83
+ e.preventDefault();
84
+ setInAndOutFrames((f) => {
85
+ return {
86
+ ...f,
87
+ inFrame: null,
88
+ };
89
+ });
90
+ }, [setInAndOutFrames, videoConfig]);
91
+ const clearOutMark = (0, react_1.useCallback)((e) => {
92
+ if (!videoConfig) {
93
+ return null;
94
+ }
95
+ e === null || e === void 0 ? void 0 : e.preventDefault();
96
+ setInAndOutFrames((f) => {
97
+ return {
98
+ ...f,
99
+ outFrame: null,
100
+ };
101
+ });
102
+ }, [setInAndOutFrames, videoConfig]);
103
+ const onOutMark = (0, react_1.useCallback)((e) => {
55
104
  if (!videoConfig) {
56
105
  return null;
57
106
  }
107
+ if (e === null || e === void 0 ? void 0 : e.shiftKey) {
108
+ setInAndOutFrames((f) => {
109
+ return {
110
+ ...f,
111
+ outFrame: null,
112
+ };
113
+ });
114
+ return;
115
+ }
58
116
  setInAndOutFrames((prev) => {
59
117
  const smallestPossible = prev.inFrame === null ? -Infinity : prev.inFrame + 1;
60
118
  const selected = Math.max(timelinePosition, smallestPossible);
@@ -78,23 +136,30 @@ const TimelineInOutPointToggle = () => {
78
136
  };
79
137
  });
80
138
  }, [setInAndOutFrames, timelinePosition, videoConfig]);
81
- const onInOutClear = (0, react_1.useCallback)(() => {
82
- setInAndOutFrames(() => {
83
- return {
84
- inFrame: null,
85
- outFrame: null,
86
- };
87
- });
88
- }, [setInAndOutFrames]);
89
139
  (0, react_1.useEffect)(() => {
90
- const iKey = keybindings.registerKeybinding('keypress', 'i', () => {
91
- onInMark();
140
+ const iKey = keybindings.registerKeybinding({
141
+ event: 'keypress',
142
+ key: 'i',
143
+ callback: (e) => {
144
+ onInMark(e);
145
+ },
146
+ commandCtrlKey: false,
92
147
  });
93
- const oKey = keybindings.registerKeybinding('keypress', 'o', () => {
94
- onOutMark();
148
+ const oKey = keybindings.registerKeybinding({
149
+ event: 'keypress',
150
+ key: 'o',
151
+ callback: (e) => {
152
+ onOutMark(e);
153
+ },
154
+ commandCtrlKey: false,
95
155
  });
96
- const xKey = keybindings.registerKeybinding('keypress', 'x', () => {
97
- onInOutClear();
156
+ const xKey = keybindings.registerKeybinding({
157
+ event: 'keypress',
158
+ key: 'x',
159
+ callback: () => {
160
+ onInOutClear();
161
+ },
162
+ commandCtrlKey: false,
98
163
  });
99
164
  return () => {
100
165
  oKey.unregister();
@@ -153,6 +218,6 @@ const TimelineInOutPointToggle = () => {
153
218
  if (isStill) {
154
219
  return null;
155
220
  }
156
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In (I)'), "aria-label": getTooltipText('In (I)'), onClick: onInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' : 'var(--blue)', style: style }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('Out (O)'), "aria-label": getTooltipText('Out (O)'), onClick: onOutMark, disabled: timelinePosition === videoConfig.durationInFrames - 1, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? 'white' : 'var(--blue)', style: style }, void 0) }, void 0)] }, void 0));
221
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: (e) => onInMark(e), onContextMenu: clearInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' : 'var(--blue)', style: style }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: timelinePosition === videoConfig.durationInFrames - 1, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? 'white' : 'var(--blue)', style: style }) })] }));
157
222
  };
158
223
  exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
@@ -2,8 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TopPanel = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const use_compact_ui_1 = require("../helpers/use-compact-ui");
7
+ const sidebar_1 = require("../state/sidebar");
5
8
  const Canvas_1 = require("./Canvas");
9
+ const CollapsedCompositionSelector_1 = require("./CollapsedCompositionSelector");
6
10
  const CompositionSelector_1 = require("./CompositionSelector");
11
+ const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
7
12
  const MenuToolbar_1 = require("./MenuToolbar");
8
13
  const PreviewToolbar_1 = require("./PreviewToolbar");
9
14
  const SplitterContainer_1 = require("./Splitter/SplitterContainer");
@@ -11,6 +16,7 @@ const SplitterElement_1 = require("./Splitter/SplitterElement");
11
16
  const SplitterHandle_1 = require("./Splitter/SplitterHandle");
12
17
  const container = {
13
18
  height: '100%',
19
+ width: '100%',
14
20
  display: 'flex',
15
21
  flexDirection: 'column',
16
22
  flex: 1,
@@ -29,6 +35,23 @@ const leftContainer = {
29
35
  display: 'flex',
30
36
  };
31
37
  const TopPanel = () => {
32
- return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}, void 0), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}, void 0) }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, {}, void 0), (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}, void 0) }, void 0) }, void 0)] }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}, void 0)] }, void 0));
38
+ const compactUi = (0, use_compact_ui_1.useCompactUI)();
39
+ const { setSidebarCollapsedState, sidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
40
+ const actualState = (0, react_1.useMemo)(() => {
41
+ if (sidebarCollapsedState === 'collapsed') {
42
+ return 'collapsed';
43
+ }
44
+ if (sidebarCollapsedState === 'expanded') {
45
+ return 'expanded';
46
+ }
47
+ return compactUi ? 'collapsed' : 'expanded';
48
+ }, [compactUi, sidebarCollapsedState]);
49
+ const onCollapse = (0, react_1.useCallback)(() => {
50
+ setSidebarCollapsedState('collapsed');
51
+ }, [setSidebarCollapsedState]);
52
+ const onExpand = (0, react_1.useCallback)(() => {
53
+ setSidebarCollapsedState('expanded');
54
+ }, [setSidebarCollapsedState]);
55
+ return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [actualState === 'collapsed' ? ((0, jsx_runtime_1.jsx)(CollapsedCompositionSelector_1.CollapsedCompositionSelector, { onExpand: onExpand })) : null, (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualState === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: leftContainer, className: "css-reset", children: (0, jsx_runtime_1.jsx)(CompositionSelector_1.CompositionSelector, {}) }) })) : null, actualState === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: true, onCollapse: onCollapse })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainer, children: (0, jsx_runtime_1.jsx)(Canvas_1.Canvas, {}) }) })] })] }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {})] }));
33
56
  };
34
57
  exports.TopPanel = TopPanel;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { PackageManager } from '@remotion/bundler';
2
+ import type { PackageManager } from '../../preview-server/get-package-manager';
3
3
  export declare type UpdateInfo = {
4
4
  currentVersion: string;
5
5
  latestVersion: string;
@@ -53,6 +53,6 @@ const UpdateCheck = () => {
53
53
  if (!info.updateAvailable) {
54
54
  return null;
55
55
  }
56
- return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: buttonStyle, onClick: openModal, type: "button", children: "Update available!" }, void 0));
56
+ return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: buttonStyle, onClick: openModal, type: "button", children: "Update available!" }));
57
57
  };
58
58
  exports.UpdateCheck = UpdateCheck;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { UpdateInfo } from '../UpdateCheck';
2
+ import type { UpdateInfo } from '../UpdateCheck';
3
3
  export declare const UpdateModal: React.FC<{
4
4
  info: UpdateInfo;
5
5
  }>;
@@ -38,6 +38,6 @@ const UpdateModal = ({ info }) => {
38
38
  setSelectedModal(null);
39
39
  }, [setSelectedModal]);
40
40
  const command = commands[info.packageManager];
41
- return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }, void 0), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }, void 0), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyCmd)(command), style: code, children: command }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }, void 0), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }, void 0), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }, void 0), ' ', "to know what", "'s", " new in Remotion."] }, void 0)] }, void 0)] }, void 0));
41
+ return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command), style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
42
42
  };
43
43
  exports.UpdateModal = UpdateModal;
@@ -0,0 +1,4 @@
1
+ import type React from 'react';
2
+ export declare const persistCurrentZoom: (zoom: number) => void;
3
+ export declare const getZoomForComposition: (composition: string) => number;
4
+ export declare const ZoomPersistor: React.FC;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZoomPersistor = exports.getZoomForComposition = exports.persistCurrentZoom = 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 FramePersistor_1 = require("./FramePersistor");
8
+ const makeKey = (composition) => {
9
+ return `remotion.zoom.${composition}`;
10
+ };
11
+ const persistCurrentZoom = (zoom) => {
12
+ const currentComposition = (0, FramePersistor_1.getCurrentCompositionFromUrl)();
13
+ if (!currentComposition) {
14
+ return;
15
+ }
16
+ localStorage.setItem(makeKey(currentComposition), String(zoom));
17
+ };
18
+ exports.persistCurrentZoom = persistCurrentZoom;
19
+ const getZoomForComposition = (composition) => {
20
+ const zoom = localStorage.getItem(makeKey(composition));
21
+ return zoom ? Number(zoom) : 0;
22
+ };
23
+ exports.getZoomForComposition = getZoomForComposition;
24
+ const ZoomPersistor = () => {
25
+ const [playing] = remotion_1.Internals.Timeline.usePlayingState();
26
+ const { zoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
27
+ const { currentComposition } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
28
+ const isActive = currentComposition === (0, FramePersistor_1.getCurrentCompositionFromUrl)();
29
+ (0, react_1.useEffect)(() => {
30
+ if (!isActive) {
31
+ return;
32
+ }
33
+ (0, exports.persistCurrentZoom)(zoom);
34
+ }, [zoom, isActive, playing]);
35
+ return null;
36
+ };
37
+ exports.ZoomPersistor = ZoomPersistor;
@@ -12,11 +12,11 @@ const Spacing = ({ x = 0, y = 0 }) => {
12
12
  height: y * exports.SPACING_UNIT,
13
13
  };
14
14
  }, [x, y]);
15
- return (0, jsx_runtime_1.jsx)("div", { style: style }, void 0);
15
+ return (0, jsx_runtime_1.jsx)("div", { style: style });
16
16
  };
17
17
  exports.Spacing = Spacing;
18
18
  const flex = { flex: 1 };
19
- const Flex = ({ children }) => (0, jsx_runtime_1.jsx)("div", { style: flex, children: children }, void 0);
19
+ const Flex = ({ children }) => (0, jsx_runtime_1.jsx)("div", { style: flex, children: children });
20
20
  exports.Flex = Flex;
21
21
  const Row = ({ children, justify, className, align, style = {} }) => {
22
22
  const finalStyle = (0, react_1.useMemo)(() => {
@@ -28,7 +28,7 @@ const Row = ({ children, justify, className, align, style = {} }) => {
28
28
  alignItems: align !== null && align !== void 0 ? align : 'flex-start',
29
29
  };
30
30
  }, [align, justify, style]);
31
- return ((0, jsx_runtime_1.jsx)("div", { className: className, style: finalStyle, children: children }, void 0));
31
+ return ((0, jsx_runtime_1.jsx)("div", { className: className, style: finalStyle, children: children }));
32
32
  };
33
33
  exports.Row = Row;
34
34
  const Column = ({ children, justify, className, align, style = {} }) => {
@@ -41,6 +41,6 @@ const Column = ({ children, justify, className, align, style = {} }) => {
41
41
  alignItems: align !== null && align !== void 0 ? align : 'flex-start',
42
42
  };
43
43
  }, [align, justify, style]);
44
- return ((0, jsx_runtime_1.jsx)("div", { className: className, style: finalStyle, children: children }, void 0));
44
+ return ((0, jsx_runtime_1.jsx)("div", { className: className, style: finalStyle, children: children }));
45
45
  };
46
46
  exports.Column = Column;
@@ -1,5 +1,5 @@
1
- import { TSequence } from 'remotion';
2
- import { TrackWithHash } from './get-timeline-sequence-sort-key';
1
+ import type { TSequence } from 'remotion';
2
+ import type { TrackWithHash } from './get-timeline-sequence-sort-key';
3
3
  export declare type SequenceWithOverlap = {
4
4
  sequence: TSequence;
5
5
  overlaps: TSequence[];
@@ -8,7 +8,8 @@ export declare const SELECTED_HOVER_BACKGROUND = "hsla(0, 0%, 100%, 0.25)";
8
8
  export declare const CLEAR_HOVER = "rgba(255, 255, 255, 0.06)";
9
9
  export declare const INPUT_BORDER_COLOR_UNHOVERED = "rgba(0, 0, 0, 0.6)";
10
10
  export declare const INPUT_BORDER_COLOR_HOVERED = "rgba(255, 255, 255, 0.05)";
11
+ export declare const TIMELINE_BACKGROUND = "#111";
11
12
  export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
12
13
  selected: boolean;
13
14
  hovered: boolean;
14
- }) => "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)" | "transparent";
15
+ }) => "transparent" | "hsla(0, 0%, 100%, 0.15)" | "hsla(0, 0%, 100%, 0.25)" | "rgba(255, 255, 255, 0.06)";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBackgroundFromHoverState = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.SELECTED_HOVER_BACKGROUND = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
3
+ exports.getBackgroundFromHoverState = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.SELECTED_HOVER_BACKGROUND = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
4
4
  exports.BACKGROUND = '#1f2428';
5
5
  exports.INPUT_BACKGROUND = '#2f363d';
6
6
  exports.BORDER_COLOR = '#000';
@@ -11,6 +11,7 @@ exports.SELECTED_HOVER_BACKGROUND = 'hsla(0, 0%, 100%, 0.25)';
11
11
  exports.CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';
12
12
  exports.INPUT_BORDER_COLOR_UNHOVERED = 'rgba(0, 0, 0, 0.6)';
13
13
  exports.INPUT_BORDER_COLOR_HOVERED = 'rgba(255, 255, 255, 0.05)';
14
+ exports.TIMELINE_BACKGROUND = '#111';
14
15
  const getBackgroundFromHoverState = ({ selected, hovered, }) => {
15
16
  if (selected) {
16
17
  if (hovered) {
@@ -1 +1 @@
1
- export declare const copyCmd: (cmd: string) => void;
1
+ export declare const copyText: (cmd: string) => void;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.copyCmd = void 0;
4
- const copyCmd = (cmd) => {
3
+ exports.copyText = void 0;
4
+ const copyText = (cmd) => {
5
5
  const permissionName = 'clipboard-write';
6
6
  navigator.permissions
7
7
  .query({ name: permissionName })
@@ -11,7 +11,8 @@ const copyCmd = (cmd) => {
11
11
  }
12
12
  })
13
13
  .catch((err) => {
14
- console.log('Could not copy command', err);
14
+ // eslint-disable-next-line no-alert
15
+ alert('Could not copy:' + err);
15
16
  });
16
17
  };
17
- exports.copyCmd = copyCmd;
18
+ exports.copyText = copyText;
@@ -1,5 +1,5 @@
1
- import { TComposition, TFolder } from 'remotion';
2
- import { CompositionSelectorItemType } from '../components/CompositionSelectorItem';
1
+ import type { TComposition, TFolder } from 'remotion';
2
+ import type { CompositionSelectorItemType } from '../components/CompositionSelectorItem';
3
3
  export declare const splitParentIntoNameAndParent: (name: string | null) => {
4
4
  name: string | null;
5
5
  parent: string | null;
@@ -0,0 +1,26 @@
1
+ import type { Size, Translation } from '@remotion/player';
2
+ export declare const getEffectiveTranslation: ({ canvasSize, scale, compositionHeight, compositionWidth, translation, }: {
3
+ canvasSize: Size;
4
+ scale: number;
5
+ compositionWidth: number;
6
+ compositionHeight: number;
7
+ translation: {
8
+ x: number;
9
+ y: number;
10
+ };
11
+ }) => {
12
+ x: number;
13
+ y: number;
14
+ };
15
+ export declare const getCenterPointWhileScrolling: ({ size, clientX, clientY, compositionWidth, compositionHeight, scale, translation, }: {
16
+ size: Size;
17
+ clientX: number;
18
+ clientY: number;
19
+ compositionWidth: number;
20
+ compositionHeight: number;
21
+ scale: number;
22
+ translation: Translation;
23
+ }) => {
24
+ centerX: number;
25
+ centerY: number;
26
+ };