remotion 4.0.0-alpha.4 → 4.0.0-alpha4

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 (545) hide show
  1. package/LICENSE.md +8 -8
  2. package/README.md +32 -21
  3. package/dist/cjs/AbsoluteFill.d.ts +6 -0
  4. package/dist/{AbsoluteFill.js → cjs/AbsoluteFill.js} +7 -7
  5. package/dist/{CanUseRemotionHooks.d.ts → cjs/CanUseRemotionHooks.d.ts} +0 -0
  6. package/dist/{CanUseRemotionHooks.js → cjs/CanUseRemotionHooks.js} +0 -0
  7. package/dist/cjs/Clipper.d.ts +7 -0
  8. package/dist/cjs/Clipper.js +24 -0
  9. package/dist/{Composition.d.ts → cjs/Composition.d.ts} +6 -1
  10. package/dist/cjs/Composition.js +121 -0
  11. package/dist/{CompositionManager.d.ts → cjs/CompositionManager.d.ts} +8 -1
  12. package/dist/{CompositionManager.js → cjs/CompositionManager.js} +28 -9
  13. package/dist/{Folder.d.ts → cjs/Folder.d.ts} +4 -0
  14. package/dist/{Folder.js → cjs/Folder.js} +10 -6
  15. package/dist/{IFrame.d.ts → cjs/IFrame.d.ts} +4 -0
  16. package/dist/{IFrame.js → cjs/IFrame.js} +8 -4
  17. package/dist/cjs/Img.d.ts +8 -0
  18. package/dist/cjs/Img.js +93 -0
  19. package/dist/cjs/NativeLayers.d.ts +13 -0
  20. package/dist/cjs/NativeLayers.js +29 -0
  21. package/dist/cjs/Null.d.ts +2 -0
  22. package/dist/cjs/Null.js +25 -0
  23. package/dist/{RemotionRoot.d.ts → cjs/RemotionRoot.d.ts} +1 -0
  24. package/dist/cjs/RemotionRoot.js +71 -0
  25. package/dist/cjs/Sequence.d.ts +21 -0
  26. package/dist/{Sequence.js → cjs/Sequence.js} +39 -39
  27. package/dist/cjs/SequenceContext.d.ts +9 -0
  28. package/dist/cjs/SequenceContext.js +5 -0
  29. package/dist/cjs/Still.d.ts +7 -0
  30. package/dist/cjs/Still.js +13 -0
  31. package/dist/{absolute-src.d.ts → cjs/absolute-src.d.ts} +0 -0
  32. package/dist/{absolute-src.js → cjs/absolute-src.js} +0 -0
  33. package/dist/{asset-types.d.ts → cjs/asset-types.d.ts} +0 -0
  34. package/dist/{asset-types.js → cjs/asset-types.js} +0 -0
  35. package/dist/cjs/audio/Audio.d.ts +12 -0
  36. package/dist/cjs/audio/Audio.js +56 -0
  37. package/dist/cjs/audio/AudioForDevelopment.d.ts +11 -0
  38. package/dist/cjs/audio/AudioForDevelopment.js +94 -0
  39. package/dist/cjs/audio/AudioForRendering.d.ts +10 -0
  40. package/dist/cjs/audio/AudioForRendering.js +111 -0
  41. package/dist/cjs/audio/index.d.ts +2 -0
  42. package/dist/{audio → cjs/audio}/index.js +2 -2
  43. package/dist/{audio → cjs/audio}/props.d.ts +4 -2
  44. package/dist/{audio → cjs/audio}/props.js +0 -0
  45. package/dist/{audio → cjs/audio}/shared-audio-tags.d.ts +8 -2
  46. package/dist/{audio → cjs/audio}/shared-audio-tags.js +63 -15
  47. package/dist/{audio → cjs/audio}/use-audio-frame.d.ts +0 -0
  48. package/dist/{audio → cjs/audio}/use-audio-frame.js +4 -4
  49. package/dist/{bezier.d.ts → cjs/bezier.d.ts} +0 -0
  50. package/dist/{bezier.js → cjs/bezier.js} +0 -0
  51. package/dist/cjs/cancel-render.d.ts +5 -0
  52. package/dist/cjs/cancel-render.js +47 -0
  53. package/dist/{config → cjs/config}/input-props.d.ts +0 -0
  54. package/dist/{config → cjs/config}/input-props.js +3 -3
  55. package/dist/cjs/config.d.ts +294 -0
  56. package/dist/{config.js → cjs/config.js} +4 -4
  57. package/dist/{default-css.d.ts → cjs/default-css.d.ts} +0 -0
  58. package/dist/{default-css.js → cjs/default-css.js} +0 -0
  59. package/dist/{delay-render.d.ts → cjs/delay-render.d.ts} +4 -4
  60. package/dist/{delay-render.js → cjs/delay-render.js} +9 -9
  61. package/dist/{easing.d.ts → cjs/easing.d.ts} +4 -0
  62. package/dist/{easing.js → cjs/easing.js} +6 -2
  63. package/dist/{freeze.d.ts → cjs/freeze.d.ts} +4 -0
  64. package/dist/{freeze.js → cjs/freeze.js} +8 -4
  65. package/dist/{get-asset-file-name.d.ts → cjs/get-asset-file-name.d.ts} +0 -0
  66. package/dist/{get-asset-file-name.js → cjs/get-asset-file-name.js} +0 -0
  67. package/dist/{get-environment.d.ts → cjs/get-environment.d.ts} +1 -0
  68. package/dist/{get-environment.js → cjs/get-environment.js} +14 -2
  69. package/dist/{get-preview-dom-element.d.ts → cjs/get-preview-dom-element.d.ts} +0 -0
  70. package/dist/{get-preview-dom-element.js → cjs/get-preview-dom-element.js} +0 -0
  71. package/dist/cjs/get-static-files.d.ts +21 -0
  72. package/dist/cjs/get-static-files.js +35 -0
  73. package/dist/{get-timeline-clip-name.d.ts → cjs/get-timeline-clip-name.d.ts} +0 -0
  74. package/dist/{get-timeline-clip-name.js → cjs/get-timeline-clip-name.js} +2 -1
  75. package/dist/cjs/index.d.ts +99 -0
  76. package/dist/cjs/index.js +82 -0
  77. package/dist/{internals.d.ts → cjs/internals.d.ts} +57 -22
  78. package/dist/cjs/internals.js +103 -0
  79. package/dist/{interpolate-colors.d.ts → cjs/interpolate-colors.d.ts} +4 -0
  80. package/dist/{interpolate-colors.js → cjs/interpolate-colors.js} +6 -2
  81. package/dist/{interpolate.d.ts → cjs/interpolate.d.ts} +11 -7
  82. package/dist/{interpolate.js → cjs/interpolate.js} +0 -0
  83. package/dist/{is-approximately-the-same.d.ts → cjs/is-approximately-the-same.d.ts} +0 -0
  84. package/dist/{is-approximately-the-same.js → cjs/is-approximately-the-same.js} +0 -0
  85. package/dist/cjs/is-player.d.ts +3 -0
  86. package/dist/cjs/is-player.js +14 -0
  87. package/dist/{loading-indicator.d.ts → cjs/loading-indicator.d.ts} +0 -0
  88. package/dist/{loading-indicator.js → cjs/loading-indicator.js} +2 -2
  89. package/dist/cjs/loop/index.d.ts +13 -0
  90. package/dist/cjs/loop/index.js +37 -0
  91. package/dist/{multiple-versions-warning.d.ts → cjs/multiple-versions-warning.d.ts} +0 -0
  92. package/dist/cjs/multiple-versions-warning.js +32 -0
  93. package/dist/{nonce.d.ts → cjs/nonce.d.ts} +0 -0
  94. package/dist/{nonce.js → cjs/nonce.js} +0 -0
  95. package/dist/{play-and-handle-not-allowed-error.d.ts → cjs/play-and-handle-not-allowed-error.d.ts} +0 -0
  96. package/dist/{play-and-handle-not-allowed-error.js → cjs/play-and-handle-not-allowed-error.js} +4 -0
  97. package/dist/{portal-node.d.ts → cjs/portal-node.d.ts} +0 -0
  98. package/dist/{portal-node.js → cjs/portal-node.js} +0 -0
  99. package/dist/cjs/prefetch-state.d.ts +8 -0
  100. package/dist/cjs/prefetch-state.js +27 -0
  101. package/dist/cjs/prefetch.d.ts +13 -0
  102. package/dist/cjs/prefetch.js +112 -0
  103. package/dist/cjs/random.d.ts +6 -0
  104. package/dist/{random.js → cjs/random.js} +3 -3
  105. package/dist/{register-root.d.ts → cjs/register-root.d.ts} +4 -0
  106. package/dist/{register-root.js → cjs/register-root.js} +7 -0
  107. package/dist/cjs/series/flatten-children.d.ts +2 -0
  108. package/dist/{series → cjs/series}/flatten-children.js +0 -0
  109. package/dist/cjs/series/index.d.ts +17 -0
  110. package/dist/{series → cjs/series}/index.js +22 -8
  111. package/dist/{setup-env-variables.d.ts → cjs/setup-env-variables.d.ts} +0 -0
  112. package/dist/{setup-env-variables.js → cjs/setup-env-variables.js} +3 -3
  113. package/dist/{spring → cjs/spring}/index.d.ts +5 -5
  114. package/dist/{spring → cjs/spring}/index.js +14 -10
  115. package/dist/cjs/spring/measure-spring.d.ts +12 -0
  116. package/dist/{spring → cjs/spring}/measure-spring.js +8 -4
  117. package/dist/{spring → cjs/spring}/spring-utils.d.ts +0 -0
  118. package/dist/{spring → cjs/spring}/spring-utils.js +0 -0
  119. package/dist/cjs/static-file.d.ts +5 -0
  120. package/dist/cjs/static-file.js +47 -0
  121. package/dist/{timeline-position-state.d.ts → cjs/timeline-position-state.d.ts} +0 -0
  122. package/dist/{timeline-position-state.js → cjs/timeline-position-state.js} +0 -0
  123. package/dist/{truthy.d.ts → cjs/truthy.d.ts} +0 -0
  124. package/dist/{truthy.js → cjs/truthy.js} +0 -0
  125. package/dist/cjs/use-current-frame.d.ts +5 -0
  126. package/dist/{use-current-frame.js → cjs/use-current-frame.js} +9 -15
  127. package/dist/{use-lazy-component.d.ts → cjs/use-lazy-component.d.ts} +1 -1
  128. package/dist/{use-lazy-component.js → cjs/use-lazy-component.js} +0 -0
  129. package/dist/{use-media-in-timeline.d.ts → cjs/use-media-in-timeline.d.ts} +3 -2
  130. package/dist/{use-media-in-timeline.js → cjs/use-media-in-timeline.js} +33 -26
  131. package/dist/{use-media-playback.d.ts → cjs/use-media-playback.d.ts} +3 -1
  132. package/dist/{use-media-playback.js → cjs/use-media-playback.js} +21 -19
  133. package/dist/{use-media-tag-volume.d.ts → cjs/use-media-tag-volume.d.ts} +0 -0
  134. package/dist/{use-media-tag-volume.js → cjs/use-media-tag-volume.js} +0 -0
  135. package/dist/{use-sync-volume-with-media-tag.d.ts → cjs/use-sync-volume-with-media-tag.d.ts} +1 -1
  136. package/dist/{use-sync-volume-with-media-tag.js → cjs/use-sync-volume-with-media-tag.js} +5 -4
  137. package/dist/{use-unsafe-video-config.d.ts → cjs/use-unsafe-video-config.d.ts} +1 -1
  138. package/dist/{use-unsafe-video-config.js → cjs/use-unsafe-video-config.js} +4 -4
  139. package/dist/cjs/use-video-config.d.ts +8 -0
  140. package/dist/cjs/use-video-config.js +34 -0
  141. package/dist/cjs/use-video.d.ts +13 -0
  142. package/dist/cjs/use-video.js +28 -0
  143. package/dist/cjs/validate-frame.d.ts +5 -0
  144. package/dist/{validation → cjs}/validate-frame.js +5 -5
  145. package/dist/cjs/validate-media-props.d.ts +4 -0
  146. package/dist/{validate-media-props.js → cjs/validate-media-props.js} +0 -0
  147. package/dist/{validate-start-from-props.d.ts → cjs/validate-start-from-props.d.ts} +0 -0
  148. package/dist/{validate-start-from-props.js → cjs/validate-start-from-props.js} +0 -0
  149. package/dist/{validation → cjs/validation}/validate-composition-id.d.ts +0 -0
  150. package/dist/{validation → cjs/validation}/validate-composition-id.js +0 -0
  151. package/dist/{validation → cjs/validation}/validate-dimensions.d.ts +0 -0
  152. package/dist/{validation → cjs/validation}/validate-dimensions.js +0 -0
  153. package/dist/cjs/validation/validate-duration-in-frames.d.ts +5 -0
  154. package/dist/{validation → cjs/validation}/validate-duration-in-frames.js +5 -2
  155. package/dist/{validation → cjs/validation}/validate-folder-name.d.ts +0 -0
  156. package/dist/{validation → cjs/validation}/validate-folder-name.js +0 -0
  157. package/dist/{validation → cjs/validation}/validate-fps.d.ts +0 -0
  158. package/dist/{validation → cjs/validation}/validate-fps.js +1 -1
  159. package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.d.ts +0 -0
  160. package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.js +0 -0
  161. package/dist/{validation → cjs/validation}/validation-spring-duration.d.ts +0 -0
  162. package/dist/{validation → cjs/validation}/validation-spring-duration.js +0 -0
  163. package/dist/cjs/version.d.ts +1 -0
  164. package/dist/cjs/version.js +5 -0
  165. package/dist/cjs/video/OffthreadVideo.d.ts +7 -0
  166. package/dist/cjs/video/OffthreadVideo.js +37 -0
  167. package/dist/{video → cjs/video}/OffthreadVideoForRendering.d.ts +1 -1
  168. package/dist/cjs/video/OffthreadVideoForRendering.js +104 -0
  169. package/dist/cjs/video/Video.d.ts +12 -0
  170. package/dist/cjs/video/Video.js +54 -0
  171. package/dist/cjs/video/VideoForDevelopment.d.ts +11 -0
  172. package/dist/cjs/video/VideoForDevelopment.js +113 -0
  173. package/dist/cjs/video/VideoForRendering.d.ts +10 -0
  174. package/dist/cjs/video/VideoForRendering.js +203 -0
  175. package/dist/cjs/video/duration-state.d.ts +17 -0
  176. package/dist/cjs/video/duration-state.js +34 -0
  177. package/dist/{video → cjs/video}/get-current-time.d.ts +0 -0
  178. package/dist/{video → cjs/video}/get-current-time.js +12 -11
  179. package/dist/{video → cjs/video}/index.d.ts +3 -3
  180. package/dist/{video → cjs/video}/index.js +4 -4
  181. package/dist/{video → cjs/video}/props.d.ts +6 -2
  182. package/dist/{video → cjs/video}/props.js +0 -0
  183. package/dist/cjs/video/video-fragment.d.ts +12 -0
  184. package/dist/cjs/video/video-fragment.js +60 -0
  185. package/dist/{video-config.d.ts → cjs/video-config.d.ts} +0 -0
  186. package/dist/{video-config.js → cjs/video-config.js} +0 -0
  187. package/dist/{volume-position-state.d.ts → cjs/volume-position-state.d.ts} +0 -0
  188. package/dist/{volume-position-state.js → cjs/volume-position-state.js} +0 -0
  189. package/dist/{volume-prop.d.ts → cjs/volume-prop.d.ts} +2 -1
  190. package/dist/{volume-prop.js → cjs/volume-prop.js} +4 -3
  191. package/dist/{warn-about-non-seekable-media.d.ts → cjs/warn-about-non-seekable-media.d.ts} +0 -0
  192. package/dist/{warn-about-non-seekable-media.js → cjs/warn-about-non-seekable-media.js} +1 -1
  193. package/dist/cjs/wrap-remotion-context.d.ts +18 -0
  194. package/dist/{wrap-remotion-context.js → cjs/wrap-remotion-context.js} +20 -12
  195. package/dist/esm/index.mjs +4156 -0
  196. package/dist/esm/version.mjs +4 -0
  197. package/package.json +78 -57
  198. package/version.js +2 -0
  199. package/.prettierrc.js +0 -14
  200. package/.turbo/turbo-build.log +0 -5
  201. package/dist/AbsoluteFill.d.ts +0 -7
  202. package/dist/AbsoluteFill.d.ts.map +0 -1
  203. package/dist/AbsoluteFill.js.map +0 -1
  204. package/dist/Composition.d.ts.map +0 -1
  205. package/dist/Composition.js +0 -98
  206. package/dist/Composition.js.map +0 -1
  207. package/dist/CompositionManager.d.ts.map +0 -1
  208. package/dist/CompositionManager.js.map +0 -1
  209. package/dist/IFrame.d.ts.map +0 -1
  210. package/dist/IFrame.js.map +0 -1
  211. package/dist/Img.d.ts +0 -2
  212. package/dist/Img.d.ts.map +0 -1
  213. package/dist/Img.js +0 -45
  214. package/dist/Img.js.map +0 -1
  215. package/dist/RemotionRoot.d.ts.map +0 -1
  216. package/dist/RemotionRoot.js +0 -70
  217. package/dist/RemotionRoot.js.map +0 -1
  218. package/dist/Sequence.d.ts +0 -25
  219. package/dist/Still.d.ts +0 -3
  220. package/dist/Still.d.ts.map +0 -1
  221. package/dist/Still.js +0 -9
  222. package/dist/Still.js.map +0 -1
  223. package/dist/absolute-src.d.ts.map +0 -1
  224. package/dist/absolute-src.js.map +0 -1
  225. package/dist/asset-types.d.ts.map +0 -1
  226. package/dist/asset-types.js.map +0 -1
  227. package/dist/audio/Audio.d.ts +0 -6
  228. package/dist/audio/Audio.d.ts.map +0 -1
  229. package/dist/audio/Audio.js +0 -32
  230. package/dist/audio/Audio.js.map +0 -1
  231. package/dist/audio/AudioForDevelopment.d.ts +0 -7
  232. package/dist/audio/AudioForDevelopment.d.ts.map +0 -1
  233. package/dist/audio/AudioForDevelopment.js +0 -68
  234. package/dist/audio/AudioForDevelopment.js.map +0 -1
  235. package/dist/audio/AudioForRendering.d.ts +0 -3
  236. package/dist/audio/AudioForRendering.d.ts.map +0 -1
  237. package/dist/audio/AudioForRendering.js +0 -68
  238. package/dist/audio/AudioForRendering.js.map +0 -1
  239. package/dist/audio/index.d.ts +0 -2
  240. package/dist/audio/index.d.ts.map +0 -1
  241. package/dist/audio/index.js.map +0 -1
  242. package/dist/audio/props.d.ts.map +0 -1
  243. package/dist/audio/props.js.map +0 -1
  244. package/dist/audio/shared-audio-tags.d.ts.map +0 -1
  245. package/dist/audio/shared-audio-tags.js.map +0 -1
  246. package/dist/audio/use-audio-frame.d.ts.map +0 -1
  247. package/dist/audio/use-audio-frame.js.map +0 -1
  248. package/dist/bezier.d.ts.map +0 -1
  249. package/dist/bezier.js.map +0 -1
  250. package/dist/compress-assets.d.ts +0 -7
  251. package/dist/compress-assets.d.ts.map +0 -1
  252. package/dist/compress-assets.js +0 -25
  253. package/dist/compress-assets.js.map +0 -1
  254. package/dist/config/browser-executable.d.ts +0 -3
  255. package/dist/config/browser-executable.d.ts.map +0 -1
  256. package/dist/config/browser-executable.js +0 -12
  257. package/dist/config/browser-executable.js.map +0 -1
  258. package/dist/config/browser.d.ts +0 -4
  259. package/dist/config/browser.d.ts.map +0 -1
  260. package/dist/config/browser.js +0 -19
  261. package/dist/config/browser.js.map +0 -1
  262. package/dist/config/chromium-flags.d.ts +0 -10
  263. package/dist/config/chromium-flags.d.ts.map +0 -1
  264. package/dist/config/chromium-flags.js +0 -34
  265. package/dist/config/chromium-flags.js.map +0 -1
  266. package/dist/config/codec.d.ts +0 -16
  267. package/dist/config/codec.d.ts.map +0 -1
  268. package/dist/config/codec.js +0 -109
  269. package/dist/config/codec.js.map +0 -1
  270. package/dist/config/concurrency.d.ts +0 -3
  271. package/dist/config/concurrency.d.ts.map +0 -1
  272. package/dist/config/concurrency.js +0 -12
  273. package/dist/config/concurrency.js.map +0 -1
  274. package/dist/config/crf.d.ts +0 -9
  275. package/dist/config/crf.d.ts.map +0 -1
  276. package/dist/config/crf.js +0 -83
  277. package/dist/config/crf.js.map +0 -1
  278. package/dist/config/env-file.d.ts +0 -2
  279. package/dist/config/env-file.d.ts.map +0 -1
  280. package/dist/config/env-file.js +0 -10
  281. package/dist/config/env-file.js.map +0 -1
  282. package/dist/config/every-nth-frame.d.ts +0 -3
  283. package/dist/config/every-nth-frame.js +0 -20
  284. package/dist/config/ffmpeg-executable.d.ts +0 -5
  285. package/dist/config/ffmpeg-executable.d.ts.map +0 -1
  286. package/dist/config/ffmpeg-executable.js +0 -21
  287. package/dist/config/ffmpeg-executable.js.map +0 -1
  288. package/dist/config/frame-range.d.ts +0 -5
  289. package/dist/config/frame-range.d.ts.map +0 -1
  290. package/dist/config/frame-range.js +0 -80
  291. package/dist/config/frame-range.js.map +0 -1
  292. package/dist/config/image-format.d.ts +0 -8
  293. package/dist/config/image-format.d.ts.map +0 -1
  294. package/dist/config/image-format.js +0 -37
  295. package/dist/config/image-format.js.map +0 -1
  296. package/dist/config/image-sequence.d.ts +0 -3
  297. package/dist/config/image-sequence.d.ts.map +0 -1
  298. package/dist/config/image-sequence.js +0 -15
  299. package/dist/config/image-sequence.js.map +0 -1
  300. package/dist/config/index.d.ts +0 -178
  301. package/dist/config/index.d.ts.map +0 -1
  302. package/dist/config/index.js +0 -193
  303. package/dist/config/index.js.map +0 -1
  304. package/dist/config/input-props.d.ts.map +0 -1
  305. package/dist/config/input-props.js.map +0 -1
  306. package/dist/config/log.d.ts +0 -7
  307. package/dist/config/log.d.ts.map +0 -1
  308. package/dist/config/log.js +0 -25
  309. package/dist/config/log.js.map +0 -1
  310. package/dist/config/max-timeline-tracks.d.ts +0 -2
  311. package/dist/config/max-timeline-tracks.d.ts.map +0 -1
  312. package/dist/config/max-timeline-tracks.js +0 -24
  313. package/dist/config/max-timeline-tracks.js.map +0 -1
  314. package/dist/config/number-of-gif-loops.d.ts +0 -4
  315. package/dist/config/number-of-gif-loops.js +0 -21
  316. package/dist/config/override-webpack.d.ts +0 -6
  317. package/dist/config/override-webpack.d.ts.map +0 -1
  318. package/dist/config/override-webpack.js +0 -14
  319. package/dist/config/override-webpack.js.map +0 -1
  320. package/dist/config/overwrite.d.ts +0 -3
  321. package/dist/config/overwrite.d.ts.map +0 -1
  322. package/dist/config/overwrite.js +0 -14
  323. package/dist/config/overwrite.js.map +0 -1
  324. package/dist/config/pixel-format.d.ts +0 -8
  325. package/dist/config/pixel-format.d.ts.map +0 -1
  326. package/dist/config/pixel-format.js +0 -38
  327. package/dist/config/pixel-format.js.map +0 -1
  328. package/dist/config/preview-server.d.ts +0 -2
  329. package/dist/config/preview-server.d.ts.map +0 -1
  330. package/dist/config/preview-server.js +0 -20
  331. package/dist/config/preview-server.js.map +0 -1
  332. package/dist/config/prores-profile.d.ts +0 -7
  333. package/dist/config/prores-profile.d.ts.map +0 -1
  334. package/dist/config/prores-profile.js +0 -32
  335. package/dist/config/prores-profile.js.map +0 -1
  336. package/dist/config/quality.d.ts +0 -2
  337. package/dist/config/quality.d.ts.map +0 -1
  338. package/dist/config/quality.js +0 -17
  339. package/dist/config/quality.js.map +0 -1
  340. package/dist/config/scale.d.ts +0 -3
  341. package/dist/config/scale.d.ts.map +0 -1
  342. package/dist/config/scale.js +0 -15
  343. package/dist/config/scale.js.map +0 -1
  344. package/dist/config/still-frame.d.ts +0 -2
  345. package/dist/config/still-frame.d.ts.map +0 -1
  346. package/dist/config/still-frame.js +0 -12
  347. package/dist/config/still-frame.js.map +0 -1
  348. package/dist/config/timeout.d.ts +0 -2
  349. package/dist/config/timeout.d.ts.map +0 -1
  350. package/dist/config/timeout.js +0 -17
  351. package/dist/config/timeout.js.map +0 -1
  352. package/dist/config/webpack-caching.d.ts +0 -3
  353. package/dist/config/webpack-caching.d.ts.map +0 -1
  354. package/dist/config/webpack-caching.js +0 -16
  355. package/dist/config/webpack-caching.js.map +0 -1
  356. package/dist/config.d.ts +0 -188
  357. package/dist/default-css.d.ts.map +0 -1
  358. package/dist/default-css.js.map +0 -1
  359. package/dist/easing.d.ts.map +0 -1
  360. package/dist/easing.js.map +0 -1
  361. package/dist/feature-flags.d.ts +0 -1
  362. package/dist/feature-flags.d.ts.map +0 -1
  363. package/dist/feature-flags.js +0 -7
  364. package/dist/feature-flags.js.map +0 -1
  365. package/dist/freeze.d.ts.map +0 -1
  366. package/dist/freeze.js.map +0 -1
  367. package/dist/get-asset-file-name.d.ts.map +0 -1
  368. package/dist/get-asset-file-name.js.map +0 -1
  369. package/dist/get-environment.d.ts.map +0 -1
  370. package/dist/get-environment.js.map +0 -1
  371. package/dist/get-preview-dom-element.d.ts.map +0 -1
  372. package/dist/get-preview-dom-element.js.map +0 -1
  373. package/dist/get-timeline-clip-name.d.ts.map +0 -1
  374. package/dist/get-timeline-clip-name.js.map +0 -1
  375. package/dist/index.d.ts +0 -61
  376. package/dist/index.d.ts.map +0 -1
  377. package/dist/index.js +0 -55
  378. package/dist/index.js.map +0 -1
  379. package/dist/initial-frame.d.ts +0 -3
  380. package/dist/initial-frame.d.ts.map +0 -1
  381. package/dist/initial-frame.js +0 -13
  382. package/dist/initial-frame.js.map +0 -1
  383. package/dist/internals.d.ts.map +0 -1
  384. package/dist/internals.js +0 -93
  385. package/dist/internals.js.map +0 -1
  386. package/dist/interpolate.d.ts.map +0 -1
  387. package/dist/interpolate.js.map +0 -1
  388. package/dist/interpolateColors.d.ts +0 -6
  389. package/dist/interpolateColors.d.ts.map +0 -1
  390. package/dist/interpolateColors.js +0 -401
  391. package/dist/interpolateColors.js.map +0 -1
  392. package/dist/is-approximately-the-same.d.ts.map +0 -1
  393. package/dist/is-approximately-the-same.js.map +0 -1
  394. package/dist/is-audio-codec.d.ts +0 -2
  395. package/dist/is-audio-codec.d.ts.map +0 -1
  396. package/dist/is-audio-codec.js +0 -7
  397. package/dist/is-audio-codec.js.map +0 -1
  398. package/dist/loop/index.d.ts +0 -9
  399. package/dist/loop/index.d.ts.map +0 -1
  400. package/dist/loop/index.js +0 -27
  401. package/dist/loop/index.js.map +0 -1
  402. package/dist/multiple-versions-warning.d.ts.map +0 -1
  403. package/dist/multiple-versions-warning.js +0 -13
  404. package/dist/multiple-versions-warning.js.map +0 -1
  405. package/dist/nonce.d.ts.map +0 -1
  406. package/dist/nonce.js.map +0 -1
  407. package/dist/perf/index.d.ts +0 -5
  408. package/dist/perf/index.d.ts.map +0 -1
  409. package/dist/perf/index.js +0 -35
  410. package/dist/perf/index.js.map +0 -1
  411. package/dist/play-and-handle-not-allowed-error.d.ts.map +0 -1
  412. package/dist/play-and-handle-not-allowed-error.js.map +0 -1
  413. package/dist/random.d.ts +0 -6
  414. package/dist/random.d.ts.map +0 -1
  415. package/dist/random.js.map +0 -1
  416. package/dist/ready-manager.d.ts +0 -15
  417. package/dist/ready-manager.d.ts.map +0 -1
  418. package/dist/ready-manager.js +0 -78
  419. package/dist/ready-manager.js.map +0 -1
  420. package/dist/register-root.d.ts.map +0 -1
  421. package/dist/register-root.js.map +0 -1
  422. package/dist/sequencing/index.d.ts +0 -20
  423. package/dist/sequencing/index.d.ts.map +0 -1
  424. package/dist/sequencing/index.js +0 -124
  425. package/dist/sequencing/index.js.map +0 -1
  426. package/dist/series/flatten-children.d.ts +0 -2
  427. package/dist/series/flatten-children.d.ts.map +0 -1
  428. package/dist/series/flatten-children.js.map +0 -1
  429. package/dist/series/index.d.ts +0 -13
  430. package/dist/series/index.d.ts.map +0 -1
  431. package/dist/series/index.js.map +0 -1
  432. package/dist/setup-env-variables.d.ts.map +0 -1
  433. package/dist/setup-env-variables.js.map +0 -1
  434. package/dist/spring/index.d.ts.map +0 -1
  435. package/dist/spring/index.js.map +0 -1
  436. package/dist/spring/measure-spring.d.ts +0 -8
  437. package/dist/spring/measure-spring.d.ts.map +0 -1
  438. package/dist/spring/measure-spring.js.map +0 -1
  439. package/dist/spring/spring-utils.d.ts.map +0 -1
  440. package/dist/spring/spring-utils.js.map +0 -1
  441. package/dist/static-file.d.ts +0 -1
  442. package/dist/static-file.d.ts.map +0 -1
  443. package/dist/static-file.js +0 -23
  444. package/dist/static-file.js.map +0 -1
  445. package/dist/timeline-inout-position-state.d.ts +0 -12
  446. package/dist/timeline-inout-position-state.d.ts.map +0 -1
  447. package/dist/timeline-inout-position-state.js +0 -23
  448. package/dist/timeline-inout-position-state.js.map +0 -1
  449. package/dist/timeline-position-state.d.ts.map +0 -1
  450. package/dist/timeline-position-state.js.map +0 -1
  451. package/dist/timeout.d.ts +0 -2
  452. package/dist/timeout.d.ts.map +0 -1
  453. package/dist/timeout.js +0 -12
  454. package/dist/timeout.js.map +0 -1
  455. package/dist/truthy.d.ts.map +0 -1
  456. package/dist/truthy.js.map +0 -1
  457. package/dist/use-current-frame.d.ts +0 -7
  458. package/dist/use-frame.d.ts +0 -8
  459. package/dist/use-frame.d.ts.map +0 -1
  460. package/dist/use-frame.js +0 -26
  461. package/dist/use-frame.js.map +0 -1
  462. package/dist/use-lazy-component.d.ts.map +0 -1
  463. package/dist/use-lazy-component.js.map +0 -1
  464. package/dist/use-media-in-timeline.d.ts.map +0 -1
  465. package/dist/use-media-in-timeline.js.map +0 -1
  466. package/dist/use-media-playback.d.ts.map +0 -1
  467. package/dist/use-media-playback.js.map +0 -1
  468. package/dist/use-media-tag-volume.d.ts.map +0 -1
  469. package/dist/use-media-tag-volume.js.map +0 -1
  470. package/dist/use-sync-volume-with-media-tag.d.ts.map +0 -1
  471. package/dist/use-sync-volume-with-media-tag.js.map +0 -1
  472. package/dist/use-unsafe-video-config.d.ts.map +0 -1
  473. package/dist/use-unsafe-video-config.js.map +0 -1
  474. package/dist/use-video-config.d.ts +0 -7
  475. package/dist/use-video-config.d.ts.map +0 -1
  476. package/dist/use-video-config.js +0 -26
  477. package/dist/use-video-config.js.map +0 -1
  478. package/dist/use-video.d.ts +0 -1
  479. package/dist/use-video.d.ts.map +0 -1
  480. package/dist/use-video.js +0 -15
  481. package/dist/use-video.js.map +0 -1
  482. package/dist/validate-media-props.d.ts +0 -4
  483. package/dist/validate-media-props.d.ts.map +0 -1
  484. package/dist/validate-media-props.js.map +0 -1
  485. package/dist/validate-start-from-props.d.ts.map +0 -1
  486. package/dist/validate-start-from-props.js.map +0 -1
  487. package/dist/validation/validate-composition-id.d.ts.map +0 -1
  488. package/dist/validation/validate-composition-id.js.map +0 -1
  489. package/dist/validation/validate-dimensions.d.ts.map +0 -1
  490. package/dist/validation/validate-dimensions.js.map +0 -1
  491. package/dist/validation/validate-duration-in-frames.d.ts +0 -1
  492. package/dist/validation/validate-duration-in-frames.d.ts.map +0 -1
  493. package/dist/validation/validate-duration-in-frames.js.map +0 -1
  494. package/dist/validation/validate-every-nth-frame.d.ts +0 -1
  495. package/dist/validation/validate-every-nth-frame.js +0 -21
  496. package/dist/validation/validate-fps.d.ts.map +0 -1
  497. package/dist/validation/validate-fps.js.map +0 -1
  498. package/dist/validation/validate-frame.d.ts +0 -1
  499. package/dist/validation/validate-frame.d.ts.map +0 -1
  500. package/dist/validation/validate-frame.js.map +0 -1
  501. package/dist/validation/validate-image-format.d.ts +0 -2
  502. package/dist/validation/validate-image-format.d.ts.map +0 -1
  503. package/dist/validation/validate-image-format.js +0 -9
  504. package/dist/validation/validate-image-format.js.map +0 -1
  505. package/dist/validation/validate-opengl-renderer.d.ts +0 -4
  506. package/dist/validation/validate-opengl-renderer.d.ts.map +0 -1
  507. package/dist/validation/validate-opengl-renderer.js +0 -14
  508. package/dist/validation/validate-opengl-renderer.js.map +0 -1
  509. package/dist/validation/validate-quality.d.ts +0 -1
  510. package/dist/validation/validate-quality.d.ts.map +0 -1
  511. package/dist/validation/validate-quality.js +0 -21
  512. package/dist/validation/validate-quality.js.map +0 -1
  513. package/dist/video/OffthreadVideo.d.ts +0 -3
  514. package/dist/video/OffthreadVideo.js +0 -27
  515. package/dist/video/OffthreadVideoForRendering.js +0 -95
  516. package/dist/video/Video.d.ts +0 -6
  517. package/dist/video/Video.d.ts.map +0 -1
  518. package/dist/video/Video.js +0 -29
  519. package/dist/video/Video.js.map +0 -1
  520. package/dist/video/VideoForDevelopment.d.ts +0 -7
  521. package/dist/video/VideoForDevelopment.d.ts.map +0 -1
  522. package/dist/video/VideoForDevelopment.js +0 -46
  523. package/dist/video/VideoForDevelopment.js.map +0 -1
  524. package/dist/video/VideoForRendering.d.ts +0 -3
  525. package/dist/video/VideoForRendering.d.ts.map +0 -1
  526. package/dist/video/VideoForRendering.js +0 -149
  527. package/dist/video/VideoForRendering.js.map +0 -1
  528. package/dist/video/get-current-time.d.ts.map +0 -1
  529. package/dist/video/get-current-time.js.map +0 -1
  530. package/dist/video/index.d.ts.map +0 -1
  531. package/dist/video/index.js.map +0 -1
  532. package/dist/video/props.d.ts.map +0 -1
  533. package/dist/video/props.js.map +0 -1
  534. package/dist/video-config.d.ts.map +0 -1
  535. package/dist/video-config.js.map +0 -1
  536. package/dist/volume-position-state.d.ts.map +0 -1
  537. package/dist/volume-position-state.js.map +0 -1
  538. package/dist/volume-prop.d.ts.map +0 -1
  539. package/dist/volume-prop.js.map +0 -1
  540. package/dist/warn-about-non-seekable-media.d.ts.map +0 -1
  541. package/dist/warn-about-non-seekable-media.js.map +0 -1
  542. package/dist/wrap-remotion-context.d.ts +0 -14
  543. package/dist/wrap-remotion-context.d.ts.map +0 -1
  544. package/dist/wrap-remotion-context.js.map +0 -1
  545. package/tsconfig.json +0 -12
package/LICENSE.md CHANGED
@@ -1,34 +1,34 @@
1
1
  # Remotion License
2
2
 
3
- Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion create videos for free (even commercial), while a company license is required for for-profit organisations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
3
+ Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
4
4
 
5
5
  - [Free license](#free-license)
6
6
  - [Company license](#company-license)
7
7
 
8
8
  ## Free license
9
9
 
10
- Copyright © 2022 [Jonny Burger](https://jonny.io)
10
+ Copyright © 2023 [Remotion](https://www.remotion.dev/)
11
11
 
12
12
  ### Eligibility
13
13
 
14
14
  You are eligible to use Remotion for free if you are:
15
15
 
16
16
  - an individual
17
- - a for-profit organisation with up to 3 employees
18
- - a non-profit or not-for-profit organisation
17
+ - a for-profit organization with up to 3 employees
18
+ - a non-profit or not-for-profit organization
19
19
  - evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
20
20
 
21
21
  ### Allowed use cases
22
22
 
23
- Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify and the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
23
+ Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
24
24
 
25
25
  ### Disallowed use cases
26
26
 
27
- It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, sublicensing your own derivate of Remotion.
27
+ It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
28
28
 
29
29
  ### Warranty notice
30
30
 
31
- The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
31
+ The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
32
32
 
33
33
  ### Support
34
34
 
@@ -36,6 +36,6 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
36
36
 
37
37
  ## Company license
38
38
 
39
- You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support.
39
+ You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
40
40
 
41
41
  Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
package/README.md CHANGED
@@ -1,15 +1,19 @@
1
1
  <p align="center">
2
2
  <a href="https://github.com/remotion-dev/logo">
3
- <img src="https://github.com/remotion-dev/logo/raw/main/withtitle/element-0.png">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-dark.gif">
5
+ <img alt="Animated Remotion Logo" src="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-light.gif">
6
+ </picture>
4
7
  </a>
5
8
  </p>
6
9
 
7
- [![Discord Shield](https://discordapp.com/api/guilds/809501355504959528/widget.png?style=shield)](https://remotion.dev/discord)
8
- [![NPM Version](http://img.shields.io/npm/v/remotion.svg?style=flat)](https://www.npmjs.org/package/remotion)
9
- [![NPM Downloads](https://img.shields.io/npm/dm/remotion.svg?style=flat)](https://npmcharts.com/compare/remotion?minimal=true)
10
- [![Install Size](https://packagephobia.now.sh/badge?p=remotion)](https://packagephobia.now.sh/result?p=remotion)
10
+ [![Discord Shield](https://img.shields.io/discord/809501355504959528?color=000000&label=Discord&logo=fdgssdf)](https://remotion.dev/discord)
11
+ [![NPM Version](https://img.shields.io/npm/v/remotion.svg?style=flat&color=black)](https://www.npmjs.org/package/remotion)
12
+ [![NPM Downloads](https://img.shields.io/npm/dm/remotion.svg?style=flat&color=black&label=Downloads)](https://npmcharts.com/compare/remotion?minimal=true)
13
+ [![Open Bounties](https://img.shields.io/endpoint?url=https%3A%2F%2Fconsole.algora.io%2Fapi%2Fshields%2Fremotion%2Fbounties%3Fstatus%3Dopen&style=flat&color=black&labelColor=grey&label=Open+Bounties)](https://github.com/remotion-dev/remotion/issues?q=is%3Aopen+label%3A%22%F0%9F%92%8E+Bounty%22+sort%3Aupdated-desc)
14
+ <a href="https://twitter.com/remotion"><img src="https://img.shields.io/twitter/follow/remotion?label=Twitter&color=black" alt="Twitter"></a>
11
15
 
12
- Remotion is a suite of libraries building a foundation for **creating videos programmatically using React.**
16
+ Remotion is a framework for **creating videos programmatically using React.**
13
17
 
14
18
  ## Why create videos in React?
15
19
 
@@ -17,35 +21,42 @@ Remotion is a suite of libraries building a foundation for **creating videos pro
17
21
  - **Leverage programming**: Use variables, functions, APIs, math and algorithms to create new effects
18
22
  - **Leverage React**: Reusable components, Powerful composition, Fast Refresh, Package ecosystem
19
23
 
20
- ## Example videos
21
-
22
- - **Remotion Trailer** [Watch](https://www.youtube.com/watch?v=gwlDorikqgY) • [Source code](https://github.com/remotion-dev/trailer) • The announcement video for Remotion was written in Remotion itself!
23
- - **AnySticker Welcome Video** [Watch](https://www.youtube.com/watch?v=Y0SNPeTz09w) • [Source code](https://github.com/JonnyBurger/anysticker-tutorials) • An in-app explainer video for my app AnySticker.
24
- - **Spotify Wrapped Recreated** [Watch](https://twitter.com/JNYBGR/status/1360269270526136320) • [Tutorial](https://www.youtube.com/watch?v=I-y_5H9-3gk) • [Source code](https://github.com/JonnyBurger/remotion-wrapped) • A recreation of Spotify Wrapped where you can override all text and images via command line.
25
- - **"Game changer or no game changer" intro** [Watch](https://youtu.be/ga_xAZo9m7k?t=61) • [Source code](https://github.com/JonnyBurger/gamechanger-or-no-gamechanger-intro) • An intro for a quiz show I did with William Candillon.
26
- - **"The X in MDX" talk** [Watch](https://twitter.com/pomber/status/1359556846688886789)[Source code](https://github.com/pomber/record-talk-with-remotion) • A re-recording of [this talk](https://www.youtube.com/watch?v=xEu3t-KJVVg) using Remotion.
27
- - **Redesigning the Scatterplot** [Watch](https://twitter.com/BrooksLybrand/status/1371547875109445635) • [Source code](https://github.com/brookslybrand/redesigning-scatterplots) • An animated section of Edward R. Tufte's book [The Visual Display of Quantitative Information](https://www.amazon.com/Visual-Display-Quantitative-Information/dp/0961392142/ref=sr_1_1?crid=3HQZSBUUROV09&dchild=1&keywords=the+visual+display+of+quantitative+information&qid=1615907320&sprefix=the+visual+disp%2Caps%2C190&sr=8-1).
28
- - **News Podcast Maker** [Watch](https://www.youtube.com/watch?v=Mwo5iNlWryg) • [Source code](https://github.com/FelippeChemello/podcast-maker/) • A fully automated News Podcast Maker.
29
-
30
- Feel free to pull request your creations!
24
+ ## Created with Remotion
25
+
26
+ <table>
27
+ <tr>
28
+ <td align="center">
29
+ <img style="width: 290px" src="packages/docs/static/img/fireship-quick.gif" />
30
+ <p>"This video was made with code" <em>- Fireship</em> <a href="https://youtu.be/deg8bOoziaE">Watch</a><a href="https://github.com/wcandillon/remotion-fireship">Source</a></p>
31
+ </td>
32
+ <td align="center">
33
+ <img style="width: 240px" src="packages/docs/static/img/unwrapped-2022.gif" />
34
+ <p>GitHub Unwrapped - Personalized Year in Review <a href="https://www.githubunwrapped.com">Try</a> • <a href="https://github.com/remotion-dev/github-unwrapped-2022">Source</a></p>
35
+ </td>
36
+ <td align="center">
37
+ <em>View more in the <a href="https://remotion.dev/showcase">Remotion Showcase</a>!</em>
38
+ </td>
39
+ </tr>
40
+ </table>
31
41
 
32
42
  ## Get started
33
43
 
34
- If you already have Yarn and FFMPEG installed, type
44
+ If you already have Node.JS installed, type
35
45
 
36
46
  ```console
37
- yarn create video
47
+ npm init video
38
48
  ```
39
49
 
40
50
  to get started. Otherwise, read the [installation page](https://www.remotion.dev/docs/) in the documentation.
41
51
 
42
52
  ## Documentation
43
53
 
44
- Head to [**remotion.dev**](https://www.remotion.dev) to learn the in and outs of Remotion!
54
+ Documentation: [**remotion.dev/docs**](https://www.remotion.dev/docs)
55
+ API Reference: [**remotion.dev/api**](https://www.remotion.dev/api)
45
56
 
46
57
  ## License
47
58
 
48
- Be aware of that Remotion has a special license and requires obtaining a company license in some cases. Read the [LICENSE](LICENSE.md) documentation for more information.
59
+ Be aware of that Remotion has a special license and requires obtaining a company license in some cases. Read the [LICENSE](LICENSE.md) page for more information.
49
60
 
50
61
  ## Contributing
51
62
 
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ /**
3
+ * @description An absolutely positioned <div> element with 100% width, height, and a column flex style
4
+ * @see [Documentation](https://www.remotion.dev/docs/absolute-fill)
5
+ */
6
+ export declare const AbsoluteFill: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
@@ -3,11 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbsoluteFill = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- /**
7
- * An absolutely positioned <div> element with 100% width, height, and a column flex style
8
- * @link https://www.remotion.dev/docs/absolute-fill
9
- */
10
- const AbsoluteFill = (props) => {
6
+ const AbsoluteFillRefForwarding = (props, ref) => {
11
7
  const { style, ...other } = props;
12
8
  const actualStyle = (0, react_1.useMemo)(() => {
13
9
  return {
@@ -23,6 +19,10 @@ const AbsoluteFill = (props) => {
23
19
  ...style,
24
20
  };
25
21
  }, [style]);
26
- return (0, jsx_runtime_1.jsx)("div", { style: actualStyle, ...other });
22
+ return (0, jsx_runtime_1.jsx)("div", { ref: ref, style: actualStyle, ...other });
27
23
  };
28
- exports.AbsoluteFill = AbsoluteFill;
24
+ /**
25
+ * @description An absolutely positioned <div> element with 100% width, height, and a column flex style
26
+ * @see [Documentation](https://www.remotion.dev/docs/absolute-fill)
27
+ */
28
+ exports.AbsoluteFill = (0, react_1.forwardRef)(AbsoluteFillRefForwarding);
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ export declare const Clipper: React.FC<{
3
+ width: number;
4
+ height: number;
5
+ x: number;
6
+ y: number;
7
+ }>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Clipper = void 0;
4
+ const react_1 = require("react");
5
+ const NativeLayers_js_1 = require("./NativeLayers.js");
6
+ const Clipper = ({ height, width, x, y }) => {
7
+ const { setClipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
8
+ (0, react_1.useEffect)(() => {
9
+ setClipRegion((c) => {
10
+ if (c === 'hide') {
11
+ throw new Error('Cannot render <Clipper>, because another <Null> is already rendered');
12
+ }
13
+ if (c === null) {
14
+ return { height, width, x, y };
15
+ }
16
+ throw new Error('Cannot render <Clipper>, because another component clipping the region was already rendered (most likely <Clipper>)');
17
+ });
18
+ return () => {
19
+ setClipRegion(null);
20
+ };
21
+ }, [height, setClipRegion, width, x, y]);
22
+ return null;
23
+ };
24
+ exports.Clipper = Clipper;
@@ -1,4 +1,4 @@
1
- import type { ComponentType } from 'react';
1
+ import type { ComponentType, PropsWithChildren } from 'react';
2
2
  import React from 'react';
3
3
  declare type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
4
4
  export declare type CompProps<T> = {
@@ -18,5 +18,10 @@ declare type CompositionProps<T> = StillProps<T> & {
18
18
  fps: number;
19
19
  durationInFrames: number;
20
20
  };
21
+ /**
22
+ * @description This component is used to register a video to make it renderable and make it show in the sidebar, in dev mode.
23
+ * @see [Documentation](https://www.remotion.dev/docs/composition)
24
+ */
21
25
  export declare const Composition: <T>({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }: CompositionProps<T>) => React.ReactPortal | null;
26
+ export declare const ClipComposition: React.FC<PropsWithChildren>;
22
27
  export {};
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClipComposition = exports.Composition = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_dom_1 = require("react-dom");
7
+ const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
8
+ const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
9
+ const CompositionManager_js_1 = require("./CompositionManager.js");
10
+ const input_props_js_1 = require("./config/input-props.js");
11
+ const delay_render_js_1 = require("./delay-render.js");
12
+ const Folder_js_1 = require("./Folder.js");
13
+ const get_environment_js_1 = require("./get-environment.js");
14
+ const internals_js_1 = require("./internals.js");
15
+ const loading_indicator_js_1 = require("./loading-indicator.js");
16
+ const NativeLayers_js_1 = require("./NativeLayers.js");
17
+ const nonce_js_1 = require("./nonce.js");
18
+ const portal_node_js_1 = require("./portal-node.js");
19
+ const use_lazy_component_js_1 = require("./use-lazy-component.js");
20
+ const use_video_js_1 = require("./use-video.js");
21
+ const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
22
+ const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
23
+ const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
24
+ const validate_fps_js_1 = require("./validation/validate-fps.js");
25
+ const Fallback = () => {
26
+ (0, react_1.useEffect)(() => {
27
+ const fallback = (0, delay_render_js_1.delayRender)('Waiting for Root component to unsuspend');
28
+ return () => (0, delay_render_js_1.continueRender)(fallback);
29
+ }, []);
30
+ return null;
31
+ };
32
+ /**
33
+ * @description This component is used to register a video to make it renderable and make it show in the sidebar, in dev mode.
34
+ * @see [Documentation](https://www.remotion.dev/docs/composition)
35
+ */
36
+ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }) => {
37
+ const { registerComposition, unregisterComposition } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
38
+ const video = (0, use_video_js_1.useVideo)();
39
+ const lazy = (0, use_lazy_component_js_1.useLazyComponent)(compProps);
40
+ const nonce = (0, nonce_js_1.useNonce)();
41
+ const environment = (0, get_environment_js_1.useRemotionEnvironment)();
42
+ const canUseComposition = (0, react_1.useContext)(internals_js_1.Internals.CanUseRemotionHooks);
43
+ if (canUseComposition) {
44
+ if (environment === 'player-development' ||
45
+ environment === 'player-production') {
46
+ throw new Error('<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.');
47
+ }
48
+ throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
49
+ }
50
+ const { folderName, parentName } = (0, react_1.useContext)(Folder_js_1.FolderContext);
51
+ (0, react_1.useEffect)(() => {
52
+ // Ensure it's a URL safe id
53
+ if (!id) {
54
+ throw new Error('No id for composition passed.');
55
+ }
56
+ (0, validate_composition_id_js_1.validateCompositionId)(id);
57
+ (0, validate_dimensions_js_1.validateDimension)(width, 'width', 'of the <Composition/> component');
58
+ (0, validate_dimensions_js_1.validateDimension)(height, 'height', 'of the <Composition/> component');
59
+ (0, validate_duration_in_frames_js_1.validateDurationInFrames)({
60
+ durationInFrames,
61
+ component: 'of the <Composition/> component',
62
+ allowFloats: false,
63
+ });
64
+ (0, validate_fps_js_1.validateFps)(fps, 'as a prop of the <Composition/> component', false);
65
+ registerComposition({
66
+ durationInFrames,
67
+ fps,
68
+ height,
69
+ width,
70
+ id,
71
+ folderName,
72
+ component: lazy,
73
+ defaultProps,
74
+ nonce,
75
+ parentFolderName: parentName,
76
+ });
77
+ return () => {
78
+ unregisterComposition(id);
79
+ };
80
+ }, [
81
+ durationInFrames,
82
+ fps,
83
+ height,
84
+ lazy,
85
+ id,
86
+ folderName,
87
+ defaultProps,
88
+ registerComposition,
89
+ unregisterComposition,
90
+ width,
91
+ nonce,
92
+ parentName,
93
+ ]);
94
+ if (environment === 'preview' && video && video.component === lazy) {
95
+ const Comp = lazy;
96
+ const inputProps = (0, input_props_js_1.getInputProps)();
97
+ return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.ClipComposition, { children: (0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_js_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }) }), (0, portal_node_js_1.portalNode)());
98
+ }
99
+ if (environment === 'rendering' && video && video.component === lazy) {
100
+ const Comp = lazy;
101
+ const inputProps = (0, input_props_js_1.getInputProps)();
102
+ return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }), (0, portal_node_js_1.portalNode)());
103
+ }
104
+ return null;
105
+ };
106
+ exports.Composition = Composition;
107
+ const ClipComposition = ({ children }) => {
108
+ const { clipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
109
+ const style = (0, react_1.useMemo)(() => {
110
+ return {
111
+ display: 'flex',
112
+ flexDirection: 'row',
113
+ opacity: clipRegion === 'hide' ? 0 : 1,
114
+ clipPath: clipRegion && clipRegion !== 'hide'
115
+ ? `polygon(${clipRegion.x}px ${clipRegion.y}px, ${clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.y}px)`
116
+ : undefined,
117
+ };
118
+ }, [clipRegion]);
119
+ return (0, jsx_runtime_1.jsx)(AbsoluteFill_js_1.AbsoluteFill, { style: style, children: children });
120
+ };
121
+ exports.ClipComposition = ClipComposition;
@@ -1,6 +1,6 @@
1
1
  import type { ComponentType, LazyExoticComponent } from 'react';
2
2
  import React from 'react';
3
- import type { TFolder } from './Folder';
3
+ import type { TFolder } from './Folder.js';
4
4
  export declare type TComposition<T = unknown> = {
5
5
  width: number;
6
6
  height: number;
@@ -23,12 +23,14 @@ declare type EnhancedTSequenceData = {
23
23
  volume: string | number;
24
24
  doesVolumeChange: boolean;
25
25
  startMediaFrom: number;
26
+ playbackRate: number;
26
27
  } | {
27
28
  type: 'video';
28
29
  src: string;
29
30
  volume: string | number;
30
31
  doesVolumeChange: boolean;
31
32
  startMediaFrom: number;
33
+ playbackRate: number;
32
34
  };
33
35
  export declare type TSequence = {
34
36
  from: number;
@@ -49,7 +51,9 @@ export declare type TAsset = {
49
51
  volume: number;
50
52
  mediaFrame: number;
51
53
  playbackRate: number;
54
+ allowAmplificationDuringRender: boolean;
52
55
  };
56
+ declare type BaseMetadata = Pick<TCompMetadata, 'durationInFrames' | 'fps' | 'defaultProps' | 'height' | 'width'>;
53
57
  export declare type CompositionManagerContext = {
54
58
  compositions: TComposition[];
55
59
  registerComposition: <T>(comp: TComposition<T>) => void;
@@ -58,6 +62,8 @@ export declare type CompositionManagerContext = {
58
62
  unregisterFolder: (name: string, parent: string | null) => void;
59
63
  currentComposition: string | null;
60
64
  setCurrentComposition: (curr: string) => void;
65
+ setCurrentCompositionMetadata: (metadata: BaseMetadata) => void;
66
+ currentCompositionMetadata: BaseMetadata | null;
61
67
  registerSequence: (seq: TSequence) => void;
62
68
  unregisterSequence: (id: string) => void;
63
69
  registerAsset: (asset: TAsset) => void;
@@ -72,5 +78,6 @@ export declare const compositionsRef: React.RefObject<{
72
78
  }>;
73
79
  export declare const CompositionManagerProvider: React.FC<{
74
80
  children: React.ReactNode;
81
+ numberOfAudioTags: number;
75
82
  }>;
76
83
  export {};
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.CompositionManagerProvider = exports.compositionsRef = exports.CompositionManager = void 0;
27
27
  const jsx_runtime_1 = require("react/jsx-runtime");
28
28
  const react_1 = __importStar(require("react"));
29
+ const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
29
30
  exports.CompositionManager = (0, react_1.createContext)({
30
31
  compositions: [],
31
32
  registerComposition: () => undefined,
@@ -34,6 +35,7 @@ exports.CompositionManager = (0, react_1.createContext)({
34
35
  unregisterFolder: () => undefined,
35
36
  currentComposition: null,
36
37
  setCurrentComposition: () => undefined,
38
+ setCurrentCompositionMetadata: () => undefined,
37
39
  registerSequence: () => undefined,
38
40
  unregisterSequence: () => undefined,
39
41
  registerAsset: () => undefined,
@@ -41,24 +43,37 @@ exports.CompositionManager = (0, react_1.createContext)({
41
43
  sequences: [],
42
44
  assets: [],
43
45
  folders: [],
46
+ currentCompositionMetadata: null,
44
47
  });
45
48
  exports.compositionsRef = react_1.default.createRef();
46
- const CompositionManagerProvider = ({ children }) => {
49
+ const CompositionManagerProvider = ({ children, numberOfAudioTags }) => {
50
+ var _a;
47
51
  // Wontfix, expected to have
48
52
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
49
53
  const [compositions, setCompositions] = (0, react_1.useState)([]);
54
+ const currentcompositionsRef = (0, react_1.useRef)(compositions);
50
55
  const [currentComposition, setCurrentComposition] = (0, react_1.useState)(null);
51
56
  const [assets, setAssets] = (0, react_1.useState)([]);
52
57
  const [folders, setFolders] = (0, react_1.useState)([]);
53
58
  const [sequences, setSequences] = (0, react_1.useState)([]);
54
- const registerComposition = (0, react_1.useCallback)((comp) => {
59
+ const [currentCompositionMetadata, setCurrentCompositionMetadata] = (0, react_1.useState)(null);
60
+ const updateCompositions = (0, react_1.useCallback)(
61
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
+ (updateComps) => {
55
63
  setCompositions((comps) => {
64
+ const updated = updateComps(comps);
65
+ currentcompositionsRef.current = updated;
66
+ return updated;
67
+ });
68
+ }, []);
69
+ const registerComposition = (0, react_1.useCallback)((comp) => {
70
+ updateCompositions((comps) => {
56
71
  if (comps.find((c) => c.id === comp.id)) {
57
72
  throw new Error(`Multiple composition with id ${comp.id} are registered.`);
58
73
  }
59
74
  return [...comps, comp].slice().sort((a, b) => a.nonce - b.nonce);
60
75
  });
61
- }, []);
76
+ }, [updateCompositions]);
62
77
  const registerSequence = (0, react_1.useCallback)((seq) => {
63
78
  setSequences((seqs) => {
64
79
  return [...seqs, seq];
@@ -108,9 +123,9 @@ const CompositionManagerProvider = ({ children }) => {
108
123
  }, [assets]);
109
124
  (0, react_1.useImperativeHandle)(exports.compositionsRef, () => {
110
125
  return {
111
- getCompositions: () => compositions,
126
+ getCompositions: () => currentcompositionsRef.current,
112
127
  };
113
- }, [compositions]);
128
+ }, []);
114
129
  const contextValue = (0, react_1.useMemo)(() => {
115
130
  return {
116
131
  compositions,
@@ -127,22 +142,26 @@ const CompositionManagerProvider = ({ children }) => {
127
142
  folders,
128
143
  registerFolder,
129
144
  unregisterFolder,
145
+ currentCompositionMetadata,
146
+ setCurrentCompositionMetadata,
130
147
  };
131
148
  }, [
132
149
  compositions,
133
- currentComposition,
134
150
  registerComposition,
135
- registerSequence,
136
151
  unregisterComposition,
152
+ currentComposition,
153
+ registerSequence,
137
154
  unregisterSequence,
138
155
  registerAsset,
139
156
  unregisterAsset,
140
157
  sequences,
141
158
  assets,
159
+ folders,
142
160
  registerFolder,
143
161
  unregisterFolder,
144
- folders,
162
+ currentCompositionMetadata,
145
163
  ]);
146
- return ((0, jsx_runtime_1.jsx)(exports.CompositionManager.Provider, { value: contextValue, children: children }));
164
+ const composition = (_a = compositions.find((c) => c.id === currentComposition)) === null || _a === void 0 ? void 0 : _a.component;
165
+ return ((0, jsx_runtime_1.jsx)(exports.CompositionManager.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)(shared_audio_tags_js_1.SharedAudioContextProvider, { numberOfAudioTags: numberOfAudioTags, component: composition !== null && composition !== void 0 ? composition : null, children: children }) }));
147
166
  };
148
167
  exports.CompositionManagerProvider = CompositionManagerProvider;
@@ -8,6 +8,10 @@ declare type FolderContextType = {
8
8
  parentName: string | null;
9
9
  };
10
10
  export declare const FolderContext: import("react").Context<FolderContextType>;
11
+ /**
12
+ * @description By wrapping a <Composition /> inside a <Folder />, you can visually categorize it in your sidebar, should you have many compositions.
13
+ * @see [Documentation](https://www.remotion.dev/docs/folder)
14
+ */
11
15
  export declare const Folder: FC<{
12
16
  name: string;
13
17
  children: React.ReactNode;
@@ -3,18 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Folder = exports.FolderContext = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const CompositionManager_1 = require("./CompositionManager");
7
- const truthy_1 = require("./truthy");
8
- const validate_folder_name_1 = require("./validation/validate-folder-name");
6
+ const CompositionManager_js_1 = require("./CompositionManager.js");
7
+ const truthy_js_1 = require("./truthy.js");
8
+ const validate_folder_name_js_1 = require("./validation/validate-folder-name.js");
9
9
  exports.FolderContext = (0, react_1.createContext)({
10
10
  folderName: null,
11
11
  parentName: null,
12
12
  });
13
+ /**
14
+ * @description By wrapping a <Composition /> inside a <Folder />, you can visually categorize it in your sidebar, should you have many compositions.
15
+ * @see [Documentation](https://www.remotion.dev/docs/folder)
16
+ */
13
17
  const Folder = ({ name, children, }) => {
14
18
  const parent = (0, react_1.useContext)(exports.FolderContext);
15
- const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
16
- (0, validate_folder_name_1.validateFolderName)(name);
17
- const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_1.truthy);
19
+ const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
20
+ (0, validate_folder_name_js_1.validateFolderName)(name);
21
+ const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_js_1.truthy);
18
22
  const parentName = parentNameArr.length === 0 ? null : parentNameArr.join('/');
19
23
  const value = (0, react_1.useMemo)(() => {
20
24
  return {
@@ -1,2 +1,6 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @description The <IFrame /> can be used like a regular <iframe> HTML tag.
4
+ * @see [Documentation](https://www.remotion.dev/docs/iframe)
5
+ */
2
6
  export declare const IFrame: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, "key" | keyof React.IframeHTMLAttributes<HTMLIFrameElement>> & React.RefAttributes<HTMLIFrameElement>>;
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IFrame = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
- const delay_render_1 = require("./delay-render");
6
+ const delay_render_js_1 = require("./delay-render.js");
7
7
  const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
8
- const [handle] = (0, react_1.useState)(() => (0, delay_render_1.delayRender)(`Loading <IFrame> with source ${props.src}`));
8
+ const [handle] = (0, react_1.useState)(() => (0, delay_render_js_1.delayRender)(`Loading <IFrame> with source ${props.src}`));
9
9
  const didLoad = (0, react_1.useCallback)((e) => {
10
- (0, delay_render_1.continueRender)(handle);
10
+ (0, delay_render_js_1.continueRender)(handle);
11
11
  onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);
12
12
  }, [handle, onLoad]);
13
13
  const didGetError = (0, react_1.useCallback)((e) => {
14
- (0, delay_render_1.continueRender)(handle);
14
+ (0, delay_render_js_1.continueRender)(handle);
15
15
  if (onError) {
16
16
  onError(e);
17
17
  }
@@ -21,4 +21,8 @@ const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
21
21
  }, [handle, onError]);
22
22
  return (0, jsx_runtime_1.jsx)("iframe", { ...props, ref: ref, onError: didGetError, onLoad: didLoad });
23
23
  };
24
+ /**
25
+ * @description The <IFrame /> can be used like a regular <iframe> HTML tag.
26
+ * @see [Documentation](https://www.remotion.dev/docs/iframe)
27
+ */
24
28
  exports.IFrame = (0, react_1.forwardRef)(IFrameRefForwarding);
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /**
3
+ * @description Works just like a regular HTML img tag. When you use the <Img> tag, Remotion will ensure that the image is loaded before rendering the frame.
4
+ * @see [Documentation](https://www.remotion.dev/docs/img)
5
+ */
6
+ export declare const Img: React.ForwardRefExoticComponent<Pick<React.ClassAttributes<HTMLImageElement> & React.ImgHTMLAttributes<HTMLImageElement> & {
7
+ maxRetries?: number | undefined;
8
+ }, "key" | "maxRetries" | keyof React.ImgHTMLAttributes<HTMLImageElement>> & React.RefAttributes<HTMLImageElement>>;