remotion 4.0.0-reorg.7 → 4.0.0-resetpath.13

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 (276) hide show
  1. package/LICENSE.md +8 -8
  2. package/README.md +29 -18
  3. package/dist/AbsoluteFill.d.ts +1 -2
  4. package/dist/AbsoluteFill.js +7 -7
  5. package/dist/CanUseRemotionHooks.d.ts +0 -0
  6. package/dist/CanUseRemotionHooks.js +0 -0
  7. package/dist/Clipper.d.ts +7 -0
  8. package/dist/Clipper.js +24 -0
  9. package/dist/Composition.d.ts +2 -1
  10. package/dist/Composition.js +24 -9
  11. package/dist/CompositionManager.d.ts +6 -6
  12. package/dist/CompositionManager.js +9 -3
  13. package/dist/Folder.d.ts +0 -0
  14. package/dist/Folder.js +0 -0
  15. package/dist/IFrame.d.ts +0 -0
  16. package/dist/IFrame.js +0 -0
  17. package/dist/Img.d.ts +0 -0
  18. package/dist/Img.js +31 -24
  19. package/dist/LayerMaster.d.ts +8 -0
  20. package/dist/LayerMaster.js +39 -0
  21. package/dist/NativeLayers.d.ts +13 -0
  22. package/dist/NativeLayers.js +29 -0
  23. package/dist/Null.d.ts +2 -0
  24. package/dist/Null.js +25 -0
  25. package/dist/RemotionRoot.d.ts +1 -0
  26. package/dist/RemotionRoot.js +9 -6
  27. package/dist/Sequence.d.ts +7 -4
  28. package/dist/Sequence.js +25 -21
  29. package/dist/Still.d.ts +0 -0
  30. package/dist/Still.js +0 -0
  31. package/dist/absolute-src.d.ts +0 -0
  32. package/dist/absolute-src.js +0 -0
  33. package/dist/asset-types.d.ts +0 -0
  34. package/dist/asset-types.js +0 -0
  35. package/dist/audio/Audio.d.ts +4 -2
  36. package/dist/audio/Audio.js +24 -4
  37. package/dist/audio/AudioForDevelopment.d.ts +6 -2
  38. package/dist/audio/AudioForDevelopment.js +35 -9
  39. package/dist/audio/AudioForRendering.d.ts +9 -2
  40. package/dist/audio/AudioForRendering.js +48 -5
  41. package/dist/audio/index.d.ts +0 -0
  42. package/dist/audio/index.js +0 -0
  43. package/dist/audio/props.d.ts +3 -1
  44. package/dist/audio/props.js +0 -0
  45. package/dist/audio/shared-audio-tags.d.ts +5 -1
  46. package/dist/audio/shared-audio-tags.js +42 -13
  47. package/dist/audio/use-audio-frame.d.ts +0 -0
  48. package/dist/audio/use-audio-frame.js +0 -0
  49. package/dist/bezier.d.ts +0 -0
  50. package/dist/bezier.js +0 -0
  51. package/dist/config/input-props.d.ts +0 -0
  52. package/dist/config/input-props.js +0 -0
  53. package/dist/config.d.ts +98 -1
  54. package/dist/config.js +0 -0
  55. package/dist/default-css.d.ts +0 -0
  56. package/dist/default-css.js +0 -0
  57. package/dist/delay-render.d.ts +0 -0
  58. package/dist/delay-render.js +0 -0
  59. package/dist/easing.d.ts +0 -0
  60. package/dist/easing.js +0 -0
  61. package/dist/freeze.d.ts +0 -0
  62. package/dist/freeze.js +0 -0
  63. package/dist/get-asset-file-name.d.ts +0 -0
  64. package/dist/get-asset-file-name.js +0 -0
  65. package/dist/get-compositions-from-markup.d.ts +3 -0
  66. package/dist/get-compositions-from-markup.js +19 -0
  67. package/dist/get-environment.d.ts +1 -0
  68. package/dist/get-environment.js +14 -2
  69. package/dist/get-preview-dom-element.d.ts +0 -0
  70. package/dist/get-preview-dom-element.js +0 -0
  71. package/dist/get-static-files.d.ts +17 -0
  72. package/dist/get-static-files.js +31 -0
  73. package/dist/get-timeline-clip-name.d.ts +0 -0
  74. package/dist/get-timeline-clip-name.js +2 -1
  75. package/dist/index.d.ts +31 -3
  76. package/dist/index.js +16 -2
  77. package/dist/internals.d.ts +32 -5
  78. package/dist/internals.js +8 -2
  79. package/dist/interpolate-colors.d.ts +0 -0
  80. package/dist/interpolate-colors.js +0 -0
  81. package/dist/interpolate.d.ts +0 -0
  82. package/dist/interpolate.js +0 -0
  83. package/dist/is-approximately-the-same.d.ts +0 -0
  84. package/dist/is-approximately-the-same.js +0 -0
  85. package/dist/is-player.d.ts +3 -0
  86. package/dist/is-player.js +14 -0
  87. package/dist/layers.d.ts +24 -0
  88. package/dist/layers.js +149 -0
  89. package/dist/loading-indicator.d.ts +0 -0
  90. package/dist/loading-indicator.js +0 -0
  91. package/dist/loop/index.d.ts +2 -2
  92. package/dist/loop/index.js +7 -5
  93. package/dist/multiple-versions-warning.d.ts +0 -0
  94. package/dist/multiple-versions-warning.js +23 -4
  95. package/dist/nonce.d.ts +0 -0
  96. package/dist/nonce.js +0 -0
  97. package/dist/play-and-handle-not-allowed-error.d.ts +0 -0
  98. package/dist/play-and-handle-not-allowed-error.js +4 -0
  99. package/dist/portal-node.d.ts +0 -0
  100. package/dist/portal-node.js +0 -0
  101. package/dist/prefetch-state.d.ts +8 -0
  102. package/dist/prefetch-state.js +27 -0
  103. package/dist/prefetch.d.ts +9 -0
  104. package/dist/prefetch.js +108 -0
  105. package/dist/random.d.ts +2 -1
  106. package/dist/random.js +0 -0
  107. package/dist/register-root.d.ts +0 -0
  108. package/dist/register-root.js +3 -0
  109. package/dist/series/flatten-children.d.ts +1 -1
  110. package/dist/series/flatten-children.js +0 -0
  111. package/dist/series/index.d.ts +3 -3
  112. package/dist/series/index.js +4 -2
  113. package/dist/setup-env-variables.d.ts +0 -0
  114. package/dist/setup-env-variables.js +0 -0
  115. package/dist/spring/index.d.ts +0 -0
  116. package/dist/spring/index.js +0 -0
  117. package/dist/spring/measure-spring.d.ts +0 -0
  118. package/dist/spring/measure-spring.js +0 -0
  119. package/dist/spring/spring-utils.d.ts +0 -0
  120. package/dist/spring/spring-utils.js +0 -0
  121. package/dist/static-file.d.ts +4 -0
  122. package/dist/static-file.js +10 -0
  123. package/dist/timeline-position-state.d.ts +0 -0
  124. package/dist/timeline-position-state.js +0 -0
  125. package/dist/truthy.d.ts +0 -0
  126. package/dist/truthy.js +0 -0
  127. package/dist/use-current-frame.d.ts +0 -1
  128. package/dist/use-current-frame.js +2 -7
  129. package/dist/use-lazy-component.d.ts +0 -0
  130. package/dist/use-lazy-component.js +0 -0
  131. package/dist/use-media-in-timeline.d.ts +2 -1
  132. package/dist/use-media-in-timeline.js +13 -6
  133. package/dist/use-media-playback.d.ts +3 -1
  134. package/dist/use-media-playback.js +6 -4
  135. package/dist/use-media-tag-volume.d.ts +0 -0
  136. package/dist/use-media-tag-volume.js +0 -0
  137. package/dist/use-sync-volume-with-media-tag.d.ts +0 -0
  138. package/dist/use-sync-volume-with-media-tag.js +1 -0
  139. package/dist/use-unsafe-video-config.d.ts +0 -0
  140. package/dist/use-unsafe-video-config.js +0 -0
  141. package/dist/use-video-config.d.ts +0 -0
  142. package/dist/use-video-config.js +4 -1
  143. package/dist/use-video.d.ts +13 -1
  144. package/dist/use-video.js +16 -3
  145. package/dist/validate-media-props.d.ts +0 -0
  146. package/dist/validate-media-props.js +0 -0
  147. package/dist/validate-start-from-props.d.ts +0 -0
  148. package/dist/validate-start-from-props.js +0 -0
  149. package/dist/validation/validate-composition-id.d.ts +0 -0
  150. package/dist/validation/validate-composition-id.js +0 -0
  151. package/dist/validation/validate-dimensions.d.ts +0 -0
  152. package/dist/validation/validate-dimensions.js +0 -0
  153. package/dist/validation/validate-duration-in-frames.d.ts +0 -0
  154. package/dist/validation/validate-duration-in-frames.js +0 -0
  155. package/dist/validation/validate-folder-name.d.ts +0 -0
  156. package/dist/validation/validate-folder-name.js +0 -0
  157. package/dist/validation/validate-fps.d.ts +0 -0
  158. package/dist/validation/validate-fps.js +1 -1
  159. package/dist/validation/validate-offthreadvideo-image-format.d.ts +0 -0
  160. package/dist/validation/validate-offthreadvideo-image-format.js +0 -0
  161. package/dist/validation/validation-spring-duration.d.ts +0 -0
  162. package/dist/validation/validation-spring-duration.js +0 -0
  163. package/dist/version.d.ts +1 -0
  164. package/dist/version.js +5 -0
  165. package/dist/video/NativeVideo.d.ts +5 -0
  166. package/dist/video/NativeVideo.js +33 -0
  167. package/dist/video/NativeVideoForRendering.d.ts +8 -0
  168. package/dist/video/NativeVideoForRendering.js +14 -0
  169. package/dist/video/OffthreadVideo.d.ts +1 -1
  170. package/dist/video/OffthreadVideo.js +8 -2
  171. package/dist/video/OffthreadVideoForRendering.d.ts +0 -0
  172. package/dist/video/OffthreadVideoForRendering.js +13 -4
  173. package/dist/video/Video.d.ts +4 -2
  174. package/dist/video/Video.js +25 -4
  175. package/dist/video/VideoForDevelopment.d.ts +6 -2
  176. package/dist/video/VideoForDevelopment.js +74 -7
  177. package/dist/video/VideoForRendering.d.ts +9 -2
  178. package/dist/video/VideoForRendering.js +77 -23
  179. package/dist/video/duration-state.d.ts +17 -0
  180. package/dist/video/duration-state.js +34 -0
  181. package/dist/video/get-current-time.d.ts +0 -0
  182. package/dist/video/get-current-time.js +0 -0
  183. package/dist/video/index.d.ts +0 -0
  184. package/dist/video/index.js +0 -0
  185. package/dist/video/props.d.ts +5 -1
  186. package/dist/video/props.js +0 -0
  187. package/dist/video/video-fragment.d.ts +12 -0
  188. package/dist/video/video-fragment.js +60 -0
  189. package/dist/video-config.d.ts +0 -0
  190. package/dist/video-config.js +0 -0
  191. package/dist/volume-position-state.d.ts +0 -0
  192. package/dist/volume-position-state.js +0 -0
  193. package/dist/volume-prop.d.ts +2 -1
  194. package/dist/volume-prop.js +4 -3
  195. package/dist/warn-about-non-seekable-media.d.ts +0 -0
  196. package/dist/warn-about-non-seekable-media.js +1 -1
  197. package/dist/wrap-remotion-context.d.ts +4 -0
  198. package/dist/wrap-remotion-context.js +9 -1
  199. package/package.json +22 -11
  200. package/.turbo/turbo-build.log +0 -5
  201. package/dist/compress-assets.d.ts +0 -7
  202. package/dist/compress-assets.js +0 -25
  203. package/dist/config/browser-executable.d.ts +0 -3
  204. package/dist/config/browser-executable.js +0 -12
  205. package/dist/config/browser.d.ts +0 -4
  206. package/dist/config/browser.js +0 -19
  207. package/dist/config/chromium-flags.d.ts +0 -10
  208. package/dist/config/chromium-flags.js +0 -34
  209. package/dist/config/codec.d.ts +0 -16
  210. package/dist/config/codec.js +0 -109
  211. package/dist/config/concurrency.d.ts +0 -3
  212. package/dist/config/concurrency.js +0 -12
  213. package/dist/config/crf.d.ts +0 -9
  214. package/dist/config/crf.js +0 -83
  215. package/dist/config/env-file.d.ts +0 -2
  216. package/dist/config/env-file.js +0 -10
  217. package/dist/config/every-nth-frame.d.ts +0 -3
  218. package/dist/config/every-nth-frame.js +0 -20
  219. package/dist/config/ffmpeg-executable.d.ts +0 -5
  220. package/dist/config/ffmpeg-executable.js +0 -21
  221. package/dist/config/frame-range.d.ts +0 -5
  222. package/dist/config/frame-range.js +0 -80
  223. package/dist/config/image-format.d.ts +0 -8
  224. package/dist/config/image-format.js +0 -37
  225. package/dist/config/image-sequence.d.ts +0 -3
  226. package/dist/config/image-sequence.js +0 -15
  227. package/dist/config/index.d.ts +0 -182
  228. package/dist/config/index.js +0 -198
  229. package/dist/config/log.d.ts +0 -7
  230. package/dist/config/log.js +0 -25
  231. package/dist/config/max-timeline-tracks.d.ts +0 -2
  232. package/dist/config/max-timeline-tracks.js +0 -24
  233. package/dist/config/number-of-gif-loops.d.ts +0 -4
  234. package/dist/config/number-of-gif-loops.js +0 -21
  235. package/dist/config/output-location.d.ts +0 -2
  236. package/dist/config/output-location.js +0 -16
  237. package/dist/config/override-webpack.d.ts +0 -6
  238. package/dist/config/override-webpack.js +0 -14
  239. package/dist/config/overwrite.d.ts +0 -3
  240. package/dist/config/overwrite.js +0 -14
  241. package/dist/config/pixel-format.d.ts +0 -8
  242. package/dist/config/pixel-format.js +0 -38
  243. package/dist/config/preview-server.d.ts +0 -2
  244. package/dist/config/preview-server.js +0 -20
  245. package/dist/config/prores-profile.d.ts +0 -7
  246. package/dist/config/prores-profile.js +0 -32
  247. package/dist/config/quality.d.ts +0 -2
  248. package/dist/config/quality.js +0 -17
  249. package/dist/config/scale.d.ts +0 -3
  250. package/dist/config/scale.js +0 -15
  251. package/dist/config/still-frame.d.ts +0 -2
  252. package/dist/config/still-frame.js +0 -12
  253. package/dist/config/timeout.d.ts +0 -2
  254. package/dist/config/timeout.js +0 -17
  255. package/dist/config/webpack-caching.d.ts +0 -3
  256. package/dist/config/webpack-caching.js +0 -16
  257. package/dist/feature-flags.d.ts +0 -1
  258. package/dist/feature-flags.js +0 -7
  259. package/dist/is-audio-codec.d.ts +0 -2
  260. package/dist/is-audio-codec.js +0 -7
  261. package/dist/perf/index.d.ts +0 -5
  262. package/dist/perf/index.js +0 -35
  263. package/dist/timeline-inout-position-state.d.ts +0 -12
  264. package/dist/timeline-inout-position-state.js +0 -23
  265. package/dist/timeout.d.ts +0 -2
  266. package/dist/timeout.js +0 -12
  267. package/dist/validation/validate-every-nth-frame.d.ts +0 -1
  268. package/dist/validation/validate-every-nth-frame.js +0 -21
  269. package/dist/validation/validate-frame.d.ts +0 -1
  270. package/dist/validation/validate-frame.js +0 -24
  271. package/dist/validation/validate-image-format.d.ts +0 -2
  272. package/dist/validation/validate-image-format.js +0 -9
  273. package/dist/validation/validate-opengl-renderer.d.ts +0 -4
  274. package/dist/validation/validate-opengl-renderer.js +0 -14
  275. package/dist/validation/validate-quality.d.ts +0 -1
  276. package/dist/validation/validate-quality.js +0 -21
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
10
  [![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)
11
+ [![NPM Version](https://img.shields.io/npm/v/remotion.svg?style=flat)](https://www.npmjs.org/package/remotion)
9
12
  [![NPM Downloads](https://img.shields.io/npm/dm/remotion.svg?style=flat)](https://npmcharts.com/compare/remotion?minimal=true)
10
13
  [![Install Size](https://packagephobia.now.sh/badge?p=remotion)](https://packagephobia.now.sh/result?p=remotion)
14
+ <a href="https://twitter.com/remotion"><img src="https://img.shields.io/twitter/follow/remotion?label=Twitter&style=social" 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
 
@@ -1,7 +1,6 @@
1
- import type { HTMLAttributes } from 'react';
2
1
  import React from 'react';
3
2
  /**
4
3
  * An absolutely positioned <div> element with 100% width, height, and a column flex style
5
4
  * @link https://www.remotion.dev/docs/absolute-fill
6
5
  */
7
- export declare const AbsoluteFill: React.FC<HTMLAttributes<HTMLDivElement>>;
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
+ * An absolutely positioned <div> element with 100% width, height, and a column flex style
26
+ * @link https://www.remotion.dev/docs/absolute-fill
27
+ */
28
+ exports.AbsoluteFill = (0, react_1.forwardRef)(AbsoluteFillRefForwarding);
File without changes
File without changes
@@ -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_1 = require("./NativeLayers");
6
+ const Clipper = ({ height, width, x, y }) => {
7
+ const { setClipRegion } = (0, react_1.useContext)(NativeLayers_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> = {
@@ -19,4 +19,5 @@ declare type CompositionProps<T> = StillProps<T> & {
19
19
  durationInFrames: number;
20
20
  };
21
21
  export declare const Composition: <T>({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }: CompositionProps<T>) => React.ReactPortal | null;
22
+ export declare const ClipComposition: React.FC<PropsWithChildren>;
22
23
  export {};
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Composition = void 0;
3
+ exports.ClipComposition = exports.Composition = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const react_dom_1 = require("react-dom");
7
+ const AbsoluteFill_1 = require("./AbsoluteFill");
7
8
  const CanUseRemotionHooks_1 = require("./CanUseRemotionHooks");
8
9
  const CompositionManager_1 = require("./CompositionManager");
9
10
  const input_props_1 = require("./config/input-props");
@@ -12,6 +13,7 @@ const Folder_1 = require("./Folder");
12
13
  const get_environment_1 = require("./get-environment");
13
14
  const internals_1 = require("./internals");
14
15
  const loading_indicator_1 = require("./loading-indicator");
16
+ const NativeLayers_1 = require("./NativeLayers");
15
17
  const nonce_1 = require("./nonce");
16
18
  const portal_node_1 = require("./portal-node");
17
19
  const use_lazy_component_1 = require("./use-lazy-component");
@@ -32,9 +34,11 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
32
34
  const video = (0, use_video_1.useVideo)();
33
35
  const lazy = (0, use_lazy_component_1.useLazyComponent)(compProps);
34
36
  const nonce = (0, nonce_1.useNonce)();
37
+ const environment = (0, get_environment_1.useRemotionEnvironment)();
35
38
  const canUseComposition = (0, react_1.useContext)(internals_1.Internals.CanUseRemotionHooks);
36
39
  if (canUseComposition) {
37
- if (typeof window !== 'undefined' && window.remotion_isPlayer) {
40
+ if (environment === 'player-development' ||
41
+ environment === 'player-production') {
38
42
  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.');
39
43
  }
40
44
  throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
@@ -79,16 +83,12 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
79
83
  nonce,
80
84
  parentName,
81
85
  ]);
82
- if ((0, get_environment_1.getRemotionEnvironment)() === 'preview' &&
83
- video &&
84
- video.component === lazy) {
86
+ if (environment === 'preview' && video && video.component === lazy) {
85
87
  const Comp = lazy;
86
88
  const inputProps = (0, input_props_1.getInputProps)();
87
- return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }), (0, portal_node_1.portalNode)());
89
+ return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.ClipComposition, { children: (0, jsx_runtime_1.jsx)(CanUseRemotionHooks_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }) }), (0, portal_node_1.portalNode)());
88
90
  }
89
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering' &&
90
- video &&
91
- video.component === lazy) {
91
+ if (environment === 'rendering' && video && video.component === lazy) {
92
92
  const Comp = lazy;
93
93
  const inputProps = (0, input_props_1.getInputProps)();
94
94
  return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_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_1.portalNode)());
@@ -96,3 +96,18 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
96
96
  return null;
97
97
  };
98
98
  exports.Composition = Composition;
99
+ const ClipComposition = ({ children }) => {
100
+ const { clipRegion } = (0, react_1.useContext)(NativeLayers_1.NativeLayersContext);
101
+ const style = (0, react_1.useMemo)(() => {
102
+ return {
103
+ display: 'flex',
104
+ flexDirection: 'row',
105
+ opacity: clipRegion === 'hide' ? 0 : 1,
106
+ clipPath: clipRegion && clipRegion !== 'hide'
107
+ ? `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)`
108
+ : undefined,
109
+ };
110
+ }, [clipRegion]);
111
+ return (0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { style: style, children: children });
112
+ };
113
+ exports.ClipComposition = ClipComposition;
@@ -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,13 +51,9 @@ export declare type TAsset = {
49
51
  volume: number;
50
52
  mediaFrame: number;
51
53
  playbackRate: number;
54
+ allowAmplificationDuringRender: boolean;
52
55
  };
53
- export declare type RenderAssetInfo = {
54
- assets: TAsset[][];
55
- imageSequenceName: string;
56
- downloadDir: string;
57
- firstFrameIndex: number;
58
- };
56
+ declare type BaseMetadata = Pick<TCompMetadata, 'durationInFrames' | 'fps' | 'defaultProps' | 'height' | 'width'>;
59
57
  export declare type CompositionManagerContext = {
60
58
  compositions: TComposition[];
61
59
  registerComposition: <T>(comp: TComposition<T>) => void;
@@ -64,6 +62,8 @@ export declare type CompositionManagerContext = {
64
62
  unregisterFolder: (name: string, parent: string | null) => void;
65
63
  currentComposition: string | null;
66
64
  setCurrentComposition: (curr: string) => void;
65
+ setCurrentCompositionMetadata: (metadata: BaseMetadata) => void;
66
+ currentCompositionMetadata: BaseMetadata | null;
67
67
  registerSequence: (seq: TSequence) => void;
68
68
  unregisterSequence: (id: string) => void;
69
69
  registerAsset: (asset: TAsset) => void;
@@ -34,6 +34,7 @@ exports.CompositionManager = (0, react_1.createContext)({
34
34
  unregisterFolder: () => undefined,
35
35
  currentComposition: null,
36
36
  setCurrentComposition: () => undefined,
37
+ setCurrentCompositionMetadata: () => undefined,
37
38
  registerSequence: () => undefined,
38
39
  unregisterSequence: () => undefined,
39
40
  registerAsset: () => undefined,
@@ -41,6 +42,7 @@ exports.CompositionManager = (0, react_1.createContext)({
41
42
  sequences: [],
42
43
  assets: [],
43
44
  folders: [],
45
+ currentCompositionMetadata: null,
44
46
  });
45
47
  exports.compositionsRef = react_1.default.createRef();
46
48
  const CompositionManagerProvider = ({ children }) => {
@@ -51,6 +53,7 @@ const CompositionManagerProvider = ({ children }) => {
51
53
  const [assets, setAssets] = (0, react_1.useState)([]);
52
54
  const [folders, setFolders] = (0, react_1.useState)([]);
53
55
  const [sequences, setSequences] = (0, react_1.useState)([]);
56
+ const [currentCompositionMetadata, setCurrentCompositionMetadata] = (0, react_1.useState)(null);
54
57
  const registerComposition = (0, react_1.useCallback)((comp) => {
55
58
  setCompositions((comps) => {
56
59
  if (comps.find((c) => c.id === comp.id)) {
@@ -127,21 +130,24 @@ const CompositionManagerProvider = ({ children }) => {
127
130
  folders,
128
131
  registerFolder,
129
132
  unregisterFolder,
133
+ currentCompositionMetadata,
134
+ setCurrentCompositionMetadata,
130
135
  };
131
136
  }, [
132
137
  compositions,
133
- currentComposition,
134
138
  registerComposition,
135
- registerSequence,
136
139
  unregisterComposition,
140
+ currentComposition,
141
+ registerSequence,
137
142
  unregisterSequence,
138
143
  registerAsset,
139
144
  unregisterAsset,
140
145
  sequences,
141
146
  assets,
147
+ folders,
142
148
  registerFolder,
143
149
  unregisterFolder,
144
- folders,
150
+ currentCompositionMetadata,
145
151
  ]);
146
152
  return ((0, jsx_runtime_1.jsx)(exports.CompositionManager.Provider, { value: contextValue, children: children }));
147
153
  };
package/dist/Folder.d.ts CHANGED
File without changes
package/dist/Folder.js CHANGED
File without changes
package/dist/IFrame.d.ts CHANGED
File without changes
package/dist/IFrame.js CHANGED
File without changes
package/dist/Img.d.ts CHANGED
File without changes
package/dist/Img.js CHANGED
@@ -4,11 +4,15 @@ exports.Img = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const delay_render_1 = require("./delay-render");
7
- const ImgRefForwarding = ({ onError, ...props }, ref) => {
7
+ const get_environment_1 = require("./get-environment");
8
+ const prefetch_1 = require("./prefetch");
9
+ const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
8
10
  const imageRef = (0, react_1.useRef)(null);
11
+ const environment = (0, get_environment_1.useRemotionEnvironment)();
9
12
  (0, react_1.useImperativeHandle)(ref, () => {
10
13
  return imageRef.current;
11
- });
14
+ }, []);
15
+ const actualSrc = (0, prefetch_1.usePreload)(src);
12
16
  const didGetError = (0, react_1.useCallback)((e) => {
13
17
  var _a;
14
18
  if (onError) {
@@ -19,27 +23,30 @@ const ImgRefForwarding = ({ onError, ...props }, ref) => {
19
23
  }
20
24
  }, [onError]);
21
25
  // If image source switches, make new handle
22
- (0, react_1.useLayoutEffect)(() => {
23
- if (process.env.NODE_ENV === 'test') {
24
- return;
25
- }
26
- const newHandle = (0, delay_render_1.delayRender)('Loading <Img> with src=' + props.src);
27
- const { current } = imageRef;
28
- const didLoad = () => {
29
- (0, delay_render_1.continueRender)(newHandle);
30
- };
31
- if (current === null || current === void 0 ? void 0 : current.complete) {
32
- (0, delay_render_1.continueRender)(newHandle);
33
- }
34
- else {
35
- current === null || current === void 0 ? void 0 : current.addEventListener('load', didLoad, { once: true });
36
- }
37
- // If tag gets unmounted, clear pending handles because image is not going to load
38
- return () => {
39
- current === null || current === void 0 ? void 0 : current.removeEventListener('load', didLoad);
40
- (0, delay_render_1.continueRender)(newHandle);
41
- };
42
- }, [props.src]);
43
- return (0, jsx_runtime_1.jsx)("img", { ...props, ref: imageRef, onError: didGetError });
26
+ if (environment === 'rendering') {
27
+ // eslint-disable-next-line react-hooks/rules-of-hooks
28
+ (0, react_1.useLayoutEffect)(() => {
29
+ if (process.env.NODE_ENV === 'test') {
30
+ return;
31
+ }
32
+ const newHandle = (0, delay_render_1.delayRender)('Loading <Img> with src=' + src);
33
+ const { current } = imageRef;
34
+ const didLoad = () => {
35
+ (0, delay_render_1.continueRender)(newHandle);
36
+ };
37
+ if (current === null || current === void 0 ? void 0 : current.complete) {
38
+ (0, delay_render_1.continueRender)(newHandle);
39
+ }
40
+ else {
41
+ current === null || current === void 0 ? void 0 : current.addEventListener('load', didLoad, { once: true });
42
+ }
43
+ // If tag gets unmounted, clear pending handles because image is not going to load
44
+ return () => {
45
+ current === null || current === void 0 ? void 0 : current.removeEventListener('load', didLoad);
46
+ (0, delay_render_1.continueRender)(newHandle);
47
+ };
48
+ }, [src]);
49
+ }
50
+ return ((0, jsx_runtime_1.jsx)("img", { ...props, ref: imageRef, src: actualSrc, onError: didGetError }));
44
51
  };
45
52
  exports.Img = (0, react_1.forwardRef)(ImgRefForwarding);
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { Layer } from './layers';
3
+ export declare const LayerMaster: <T extends object>({ layers, defaultProps, inputProps, fallbackComponent: FallbackComponent, }: {
4
+ layers: Layer<T>[];
5
+ defaultProps: T | undefined;
6
+ inputProps: any;
7
+ fallbackComponent: React.FC | null;
8
+ }) => JSX.Element;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LayerMaster = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const AbsoluteFill_1 = require("./AbsoluteFill");
7
+ const get_environment_1 = require("./get-environment");
8
+ const LayerMaster = ({ layers, defaultProps, inputProps, fallbackComponent: FallbackComponent, }) => {
9
+ return (
10
+ // TODO: Same styles as normal
11
+ (0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: layers.map((layer, i) => {
12
+ const Comp = layer.component;
13
+ if (layer.type === 'web') {
14
+ if (FallbackComponent === null) {
15
+ // eslint-disable-next-line react/no-array-index-key
16
+ return (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }, String(i));
17
+ }
18
+ return (
19
+ // eslint-disable-next-line react/no-array-index-key
20
+ (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(FallbackComponent, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }, String(i)));
21
+ }
22
+ // SVG should not support suspense
23
+ if (layer.type === 'svg') {
24
+ if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
25
+ return null;
26
+ }
27
+ return ((0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }, String(i)) }));
28
+ }
29
+ if (layer.type === 'video') {
30
+ if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
31
+ return null;
32
+ }
33
+ // TODO: AbsoluteFill is different flex direction
34
+ return ((0, jsx_runtime_1.jsx)(AbsoluteFill_1.AbsoluteFill, { children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }, String(i)) }));
35
+ }
36
+ throw new Error('Unknown layer type');
37
+ }) }));
38
+ };
39
+ exports.LayerMaster = LayerMaster;
@@ -0,0 +1,13 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare type ClipRegion = {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ } | 'hide';
8
+ export declare type TNativeLayersContext = {
9
+ clipRegion: ClipRegion | null;
10
+ setClipRegion: React.Dispatch<React.SetStateAction<ClipRegion | null>>;
11
+ };
12
+ export declare const NativeLayersContext: import("react").Context<TNativeLayersContext>;
13
+ export declare const NativeLayersProvider: React.FC<PropsWithChildren>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NativeLayersProvider = exports.NativeLayersContext = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ exports.NativeLayersContext = (0, react_1.createContext)({
7
+ setClipRegion: () => {
8
+ throw new Error('NativeLayers not set');
9
+ },
10
+ clipRegion: null,
11
+ });
12
+ const NativeLayersProvider = ({ children, }) => {
13
+ const [clipRegion, setClipRegion] = (0, react_1.useState)(null);
14
+ const context = (0, react_1.useMemo)(() => {
15
+ return {
16
+ setClipRegion,
17
+ clipRegion,
18
+ };
19
+ }, [clipRegion, setClipRegion]);
20
+ (0, react_1.useLayoutEffect)(() => {
21
+ if (typeof window !== 'undefined') {
22
+ window.remotion_getClipRegion = () => {
23
+ return clipRegion;
24
+ };
25
+ }
26
+ }, [clipRegion, setClipRegion]);
27
+ return ((0, jsx_runtime_1.jsx)(exports.NativeLayersContext.Provider, { value: context, children: children }));
28
+ };
29
+ exports.NativeLayersProvider = NativeLayersProvider;
package/dist/Null.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Null: React.FC;
package/dist/Null.js ADDED
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Null = void 0;
4
+ const react_1 = require("react");
5
+ const NativeLayers_1 = require("./NativeLayers");
6
+ const Null = () => {
7
+ const { setClipRegion } = (0, react_1.useContext)(NativeLayers_1.NativeLayersContext);
8
+ (0, react_1.useEffect)(() => {
9
+ setClipRegion((c) => {
10
+ if (c === null) {
11
+ return 'hide';
12
+ }
13
+ // Rendering multiple <Null> is fine, because they are all hidden
14
+ if (c === 'hide') {
15
+ return 'hide';
16
+ }
17
+ throw new Error('Cannot render <Null>, because another component clipping the region was already rendered (most likely <Clipper>)');
18
+ });
19
+ return () => {
20
+ setClipRegion(null);
21
+ };
22
+ }, [setClipRegion]);
23
+ return null;
24
+ };
25
+ exports.Null = Null;
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const RemotionRoot: React.FC<{
3
3
  children: React.ReactNode;
4
+ numberOfAudioTags: number;
4
5
  }>;