remotion 4.0.0-webhook.27 → 4.1.0-alpha2

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 (283) hide show
  1. package/LICENSE.md +8 -8
  2. package/README.md +7 -7
  3. package/dist/{AbsoluteFill.d.ts → cjs/AbsoluteFill.d.ts} +2 -2
  4. package/dist/{AbsoluteFill.js → cjs/AbsoluteFill.js} +2 -2
  5. package/dist/cjs/AssetManager.d.ts +11 -0
  6. package/dist/cjs/AssetManager.js +40 -0
  7. package/dist/{CanUseRemotionHooks.d.ts → cjs/CanUseRemotionHooks.d.ts} +0 -0
  8. package/dist/{CanUseRemotionHooks.js → cjs/CanUseRemotionHooks.js} +0 -0
  9. package/dist/cjs/Clipper.d.ts +7 -0
  10. package/dist/cjs/Clipper.js +24 -0
  11. package/dist/cjs/Composition.d.ts +41 -0
  12. package/dist/cjs/Composition.js +132 -0
  13. package/dist/cjs/CompositionManager.d.ts +75 -0
  14. package/dist/{CompositionManager.js → cjs/CompositionManager.js} +29 -66
  15. package/dist/cjs/CompositionManagerContext.d.ts +18 -0
  16. package/dist/cjs/CompositionManagerContext.js +16 -0
  17. package/dist/cjs/EditorProps.d.ts +15 -0
  18. package/dist/cjs/EditorProps.js +53 -0
  19. package/dist/{Folder.d.ts → cjs/Folder.d.ts} +6 -2
  20. package/dist/{Folder.js → cjs/Folder.js} +10 -6
  21. package/dist/{IFrame.d.ts → cjs/IFrame.d.ts} +4 -0
  22. package/dist/{IFrame.js → cjs/IFrame.js} +8 -4
  23. package/dist/cjs/Img.d.ts +9 -0
  24. package/dist/cjs/Img.js +100 -0
  25. package/dist/cjs/NativeLayers.d.ts +13 -0
  26. package/dist/cjs/NativeLayers.js +29 -0
  27. package/dist/cjs/Null.d.ts +2 -0
  28. package/dist/cjs/Null.js +25 -0
  29. package/dist/{RemotionRoot.d.ts → cjs/RemotionRoot.d.ts} +1 -0
  30. package/dist/cjs/RemotionRoot.js +72 -0
  31. package/dist/cjs/ResolveCompositionConfig.d.ts +24 -0
  32. package/dist/cjs/ResolveCompositionConfig.js +192 -0
  33. package/dist/cjs/Sequence.d.ts +22 -0
  34. package/dist/{Sequence.js → cjs/Sequence.js} +27 -29
  35. package/dist/cjs/SequenceContext.d.ts +9 -0
  36. package/dist/cjs/SequenceContext.js +5 -0
  37. package/dist/cjs/SequenceManager.d.ts +11 -0
  38. package/dist/cjs/SequenceManager.js +57 -0
  39. package/dist/cjs/Still.d.ts +8 -0
  40. package/dist/cjs/Still.js +22 -0
  41. package/dist/{absolute-src.d.ts → cjs/absolute-src.d.ts} +0 -0
  42. package/dist/{absolute-src.js → cjs/absolute-src.js} +0 -0
  43. package/dist/{asset-types.d.ts → cjs/asset-types.d.ts} +0 -0
  44. package/dist/{asset-types.js → cjs/asset-types.js} +0 -0
  45. package/dist/{audio → cjs/audio}/Audio.d.ts +10 -4
  46. package/dist/cjs/audio/Audio.js +58 -0
  47. package/dist/cjs/audio/AudioForDevelopment.d.ts +11 -0
  48. package/dist/cjs/audio/AudioForDevelopment.js +101 -0
  49. package/dist/cjs/audio/AudioForRendering.d.ts +10 -0
  50. package/dist/cjs/audio/AudioForRendering.js +111 -0
  51. package/dist/cjs/audio/index.d.ts +2 -0
  52. package/dist/{audio → cjs/audio}/index.js +2 -2
  53. package/dist/cjs/audio/props.d.ts +12 -0
  54. package/dist/{audio → cjs/audio}/props.js +0 -0
  55. package/dist/{audio → cjs/audio}/shared-audio-tags.d.ts +10 -4
  56. package/dist/{audio → cjs/audio}/shared-audio-tags.js +35 -13
  57. package/dist/{audio → cjs/audio}/use-audio-frame.d.ts +0 -0
  58. package/dist/{audio → cjs/audio}/use-audio-frame.js +4 -4
  59. package/dist/{bezier.d.ts → cjs/bezier.d.ts} +0 -0
  60. package/dist/{bezier.js → cjs/bezier.js} +0 -0
  61. package/dist/cjs/cancel-render.d.ts +5 -0
  62. package/dist/cjs/cancel-render.js +47 -0
  63. package/dist/{config → cjs/config}/input-props.d.ts +0 -0
  64. package/dist/{config → cjs/config}/input-props.js +3 -3
  65. package/dist/{default-css.d.ts → cjs/default-css.d.ts} +0 -0
  66. package/dist/{default-css.js → cjs/default-css.js} +0 -0
  67. package/dist/{delay-render.d.ts → cjs/delay-render.d.ts} +4 -4
  68. package/dist/{delay-render.js → cjs/delay-render.js} +12 -12
  69. package/dist/{easing.d.ts → cjs/easing.d.ts} +4 -0
  70. package/dist/{easing.js → cjs/easing.js} +6 -2
  71. package/dist/cjs/freeze.d.ts +11 -0
  72. package/dist/{freeze.js → cjs/freeze.js} +8 -4
  73. package/dist/{get-asset-file-name.d.ts → cjs/get-asset-file-name.d.ts} +0 -0
  74. package/dist/{get-asset-file-name.js → cjs/get-asset-file-name.js} +0 -0
  75. package/dist/cjs/get-environment.d.ts +3 -0
  76. package/dist/{get-environment.js → cjs/get-environment.js} +14 -2
  77. package/dist/cjs/get-preview-dom-element.d.ts +2 -0
  78. package/dist/cjs/get-preview-dom-element.js +8 -0
  79. package/dist/cjs/get-static-files.d.ts +21 -0
  80. package/dist/cjs/get-static-files.js +35 -0
  81. package/dist/{get-timeline-clip-name.d.ts → cjs/get-timeline-clip-name.d.ts} +0 -0
  82. package/dist/{get-timeline-clip-name.js → cjs/get-timeline-clip-name.js} +0 -0
  83. package/dist/cjs/index.d.ts +102 -0
  84. package/dist/cjs/index.js +105 -0
  85. package/dist/cjs/internals.d.ts +131 -0
  86. package/dist/cjs/internals.js +120 -0
  87. package/dist/{interpolate-colors.d.ts → cjs/interpolate-colors.d.ts} +5 -0
  88. package/dist/{interpolate-colors.js → cjs/interpolate-colors.js} +10 -10
  89. package/dist/{interpolate.d.ts → cjs/interpolate.d.ts} +11 -7
  90. package/dist/{interpolate.js → cjs/interpolate.js} +0 -0
  91. package/dist/{is-approximately-the-same.d.ts → cjs/is-approximately-the-same.d.ts} +0 -0
  92. package/dist/{is-approximately-the-same.js → cjs/is-approximately-the-same.js} +0 -0
  93. package/dist/cjs/is-player.d.ts +3 -0
  94. package/dist/cjs/is-player.js +14 -0
  95. package/dist/{loading-indicator.d.ts → cjs/loading-indicator.d.ts} +0 -0
  96. package/dist/{loading-indicator.js → cjs/loading-indicator.js} +4 -4
  97. package/dist/cjs/loop/index.d.ts +13 -0
  98. package/dist/cjs/loop/index.js +46 -0
  99. package/dist/{multiple-versions-warning.d.ts → cjs/multiple-versions-warning.d.ts} +0 -0
  100. package/dist/{multiple-versions-warning.js → cjs/multiple-versions-warning.js} +11 -6
  101. package/dist/{nonce.d.ts → cjs/nonce.d.ts} +1 -1
  102. package/dist/{nonce.js → cjs/nonce.js} +6 -0
  103. package/dist/{play-and-handle-not-allowed-error.d.ts → cjs/play-and-handle-not-allowed-error.d.ts} +0 -0
  104. package/dist/{play-and-handle-not-allowed-error.js → cjs/play-and-handle-not-allowed-error.js} +4 -0
  105. package/dist/{portal-node.d.ts → cjs/portal-node.d.ts} +0 -0
  106. package/dist/{portal-node.js → cjs/portal-node.js} +0 -0
  107. package/dist/cjs/prefetch-state.d.ts +8 -0
  108. package/dist/cjs/prefetch-state.js +27 -0
  109. package/dist/cjs/prefetch.d.ts +13 -0
  110. package/dist/{prefetch.js → cjs/prefetch.js} +43 -17
  111. package/dist/cjs/props-if-has-props.d.ts +10 -0
  112. package/dist/{video-config.js → cjs/props-if-has-props.js} +0 -0
  113. package/dist/cjs/random.d.ts +6 -0
  114. package/dist/{random.js → cjs/random.js} +3 -3
  115. package/dist/{register-root.d.ts → cjs/register-root.d.ts} +4 -0
  116. package/dist/{register-root.js → cjs/register-root.js} +4 -0
  117. package/dist/cjs/resolve-video-config.d.ts +8 -0
  118. package/dist/cjs/resolve-video-config.js +89 -0
  119. package/dist/cjs/series/flatten-children.d.ts +2 -0
  120. package/dist/{series → cjs/series}/flatten-children.js +0 -0
  121. package/dist/cjs/series/index.d.ts +17 -0
  122. package/dist/{series → cjs/series}/index.js +22 -8
  123. package/dist/cjs/setup-env-variables.d.ts +1 -0
  124. package/dist/{setup-env-variables.js → cjs/setup-env-variables.js} +7 -9
  125. package/dist/{spring → cjs/spring}/index.d.ts +10 -6
  126. package/dist/cjs/spring/index.js +75 -0
  127. package/dist/cjs/spring/measure-spring.d.ts +12 -0
  128. package/dist/{spring → cjs/spring}/measure-spring.js +8 -4
  129. package/dist/{spring → cjs/spring}/spring-utils.d.ts +2 -2
  130. package/dist/{spring → cjs/spring}/spring-utils.js +0 -0
  131. package/dist/cjs/static-file.d.ts +33 -0
  132. package/dist/cjs/static-file.js +87 -0
  133. package/dist/{timeline-position-state.d.ts → cjs/timeline-position-state.d.ts} +4 -4
  134. package/dist/{timeline-position-state.js → cjs/timeline-position-state.js} +9 -1
  135. package/dist/cjs/truthy.d.ts +3 -0
  136. package/dist/{truthy.js → cjs/truthy.js} +0 -0
  137. package/dist/cjs/use-current-frame.d.ts +5 -0
  138. package/dist/{use-current-frame.js → cjs/use-current-frame.js} +8 -9
  139. package/dist/cjs/use-lazy-component.d.ts +7 -0
  140. package/dist/{use-lazy-component.js → cjs/use-lazy-component.js} +0 -0
  141. package/dist/{use-media-in-timeline.d.ts → cjs/use-media-in-timeline.d.ts} +3 -2
  142. package/dist/{use-media-in-timeline.js → cjs/use-media-in-timeline.js} +29 -25
  143. package/dist/{use-media-playback.d.ts → cjs/use-media-playback.d.ts} +3 -1
  144. package/dist/cjs/use-media-playback.js +86 -0
  145. package/dist/{use-media-tag-volume.d.ts → cjs/use-media-tag-volume.d.ts} +0 -0
  146. package/dist/{use-media-tag-volume.js → cjs/use-media-tag-volume.js} +0 -0
  147. package/dist/{use-sync-volume-with-media-tag.d.ts → cjs/use-sync-volume-with-media-tag.d.ts} +2 -2
  148. package/dist/{use-sync-volume-with-media-tag.js → cjs/use-sync-volume-with-media-tag.js} +5 -4
  149. package/dist/{use-unsafe-video-config.d.ts → cjs/use-unsafe-video-config.d.ts} +1 -1
  150. package/dist/{use-unsafe-video-config.js → cjs/use-unsafe-video-config.js} +4 -4
  151. package/dist/cjs/use-video-config.d.ts +8 -0
  152. package/dist/cjs/use-video-config.js +34 -0
  153. package/dist/cjs/use-video.d.ts +7 -0
  154. package/dist/cjs/use-video.js +38 -0
  155. package/dist/cjs/validate-frame.d.ts +5 -0
  156. package/dist/cjs/validate-frame.js +24 -0
  157. package/dist/cjs/validate-media-props.d.ts +4 -0
  158. package/dist/{validate-media-props.js → cjs/validate-media-props.js} +0 -0
  159. package/dist/{validate-start-from-props.d.ts → cjs/validate-start-from-props.d.ts} +0 -0
  160. package/dist/{validate-start-from-props.js → cjs/validate-start-from-props.js} +0 -0
  161. package/dist/{validation → cjs/validation}/validate-composition-id.d.ts +0 -0
  162. package/dist/{validation → cjs/validation}/validate-composition-id.js +0 -0
  163. package/dist/cjs/validation/validate-default-props.d.ts +1 -0
  164. package/dist/cjs/validation/validate-default-props.js +15 -0
  165. package/dist/{validation → cjs/validation}/validate-dimensions.d.ts +0 -0
  166. package/dist/{validation → cjs/validation}/validate-dimensions.js +0 -0
  167. package/dist/cjs/validation/validate-duration-in-frames.d.ts +5 -0
  168. package/dist/{validation → cjs/validation}/validate-duration-in-frames.js +5 -2
  169. package/dist/{validation → cjs/validation}/validate-folder-name.d.ts +0 -0
  170. package/dist/{validation → cjs/validation}/validate-folder-name.js +0 -0
  171. package/dist/{validation → cjs/validation}/validate-fps.d.ts +0 -0
  172. package/dist/{validation → cjs/validation}/validate-fps.js +0 -0
  173. package/dist/{validation → cjs/validation}/validation-spring-duration.d.ts +0 -0
  174. package/dist/{validation → cjs/validation}/validation-spring-duration.js +0 -0
  175. package/dist/cjs/version.d.ts +1 -0
  176. package/dist/{version.js → cjs/version.js} +1 -1
  177. package/dist/cjs/video/OffthreadVideo.d.ts +7 -0
  178. package/dist/cjs/video/OffthreadVideo.js +38 -0
  179. package/dist/{video → cjs/video}/OffthreadVideoForRendering.d.ts +1 -1
  180. package/dist/cjs/video/OffthreadVideoForRendering.js +103 -0
  181. package/dist/cjs/video/Video.d.ts +12 -0
  182. package/dist/cjs/video/Video.js +55 -0
  183. package/dist/{video → cjs/video}/VideoForDevelopment.d.ts +5 -2
  184. package/dist/cjs/video/VideoForDevelopment.js +117 -0
  185. package/dist/cjs/video/VideoForRendering.d.ts +10 -0
  186. package/dist/cjs/video/VideoForRendering.js +208 -0
  187. package/dist/cjs/video/duration-state.d.ts +17 -0
  188. package/dist/cjs/video/duration-state.js +35 -0
  189. package/dist/{video → cjs/video}/get-current-time.d.ts +0 -0
  190. package/dist/{video → cjs/video}/get-current-time.js +12 -11
  191. package/dist/cjs/video/index.d.ts +3 -0
  192. package/dist/{video → cjs/video}/index.js +4 -4
  193. package/dist/cjs/video/props.d.ts +32 -0
  194. package/dist/cjs/video/props.js +2 -0
  195. package/dist/cjs/video/video-fragment.d.ts +12 -0
  196. package/dist/cjs/video/video-fragment.js +60 -0
  197. package/dist/{video-config.d.ts → cjs/video-config.d.ts} +2 -2
  198. package/dist/{video/props.js → cjs/video-config.js} +0 -0
  199. package/dist/{volume-position-state.d.ts → cjs/volume-position-state.d.ts} +4 -4
  200. package/dist/{volume-position-state.js → cjs/volume-position-state.js} +0 -0
  201. package/dist/{volume-prop.d.ts → cjs/volume-prop.d.ts} +3 -2
  202. package/dist/{volume-prop.js → cjs/volume-prop.js} +4 -3
  203. package/dist/{warn-about-non-seekable-media.d.ts → cjs/warn-about-non-seekable-media.d.ts} +0 -0
  204. package/dist/{warn-about-non-seekable-media.js → cjs/warn-about-non-seekable-media.js} +2 -2
  205. package/dist/cjs/wrap-remotion-context.d.ts +31 -0
  206. package/dist/cjs/wrap-remotion-context.js +85 -0
  207. package/dist/esm/index.mjs +4623 -0
  208. package/dist/esm/version.mjs +4 -0
  209. package/package.json +80 -57
  210. package/version.js +2 -1
  211. package/.prettierrc.js +0 -14
  212. package/.turbo/turbo-build.log +0 -5
  213. package/dist/Composition.d.ts +0 -22
  214. package/dist/Composition.js +0 -98
  215. package/dist/CompositionManager.d.ts +0 -79
  216. package/dist/Img.d.ts +0 -2
  217. package/dist/Img.js +0 -51
  218. package/dist/RemotionRoot.js +0 -71
  219. package/dist/Sequence.d.ts +0 -29
  220. package/dist/Still.d.ts +0 -3
  221. package/dist/Still.js +0 -9
  222. package/dist/audio/Audio.js +0 -32
  223. package/dist/audio/AudioForDevelopment.d.ts +0 -8
  224. package/dist/audio/AudioForDevelopment.js +0 -71
  225. package/dist/audio/AudioForRendering.d.ts +0 -6
  226. package/dist/audio/AudioForRendering.js +0 -75
  227. package/dist/audio/index.d.ts +0 -2
  228. package/dist/audio/props.d.ts +0 -10
  229. package/dist/config.d.ts +0 -218
  230. package/dist/config.js +0 -21
  231. package/dist/freeze.d.ts +0 -7
  232. package/dist/get-environment.d.ts +0 -2
  233. package/dist/get-preview-dom-element.d.ts +0 -1
  234. package/dist/get-preview-dom-element.js +0 -7
  235. package/dist/index.d.ts +0 -72
  236. package/dist/index.js +0 -58
  237. package/dist/internals.d.ts +0 -88
  238. package/dist/internals.js +0 -93
  239. package/dist/loop/index.d.ts +0 -9
  240. package/dist/loop/index.js +0 -28
  241. package/dist/prefetch-state.d.ts +0 -13
  242. package/dist/prefetch-state.js +0 -26
  243. package/dist/prefetch.d.ts +0 -7
  244. package/dist/random.d.ts +0 -6
  245. package/dist/series/flatten-children.d.ts +0 -2
  246. package/dist/series/index.d.ts +0 -13
  247. package/dist/setup-env-variables.d.ts +0 -2
  248. package/dist/spring/index.js +0 -51
  249. package/dist/spring/measure-spring.d.ts +0 -8
  250. package/dist/static-file.d.ts +0 -1
  251. package/dist/static-file.js +0 -29
  252. package/dist/truthy.d.ts +0 -3
  253. package/dist/use-current-frame.d.ts +0 -6
  254. package/dist/use-lazy-component.d.ts +0 -7
  255. package/dist/use-media-playback.js +0 -75
  256. package/dist/use-video-config.d.ts +0 -7
  257. package/dist/use-video-config.js +0 -26
  258. package/dist/use-video.d.ts +0 -13
  259. package/dist/use-video.js +0 -28
  260. package/dist/validate-media-props.d.ts +0 -4
  261. package/dist/validation/validate-duration-in-frames.d.ts +0 -1
  262. package/dist/validation/validate-offthreadvideo-image-format.d.ts +0 -1
  263. package/dist/validation/validate-offthreadvideo-image-format.js +0 -15
  264. package/dist/version.d.ts +0 -1
  265. package/dist/video/LoopedVideo.d.ts +0 -3
  266. package/dist/video/LoopedVideo.js +0 -16
  267. package/dist/video/OffthreadVideo.d.ts +0 -3
  268. package/dist/video/OffthreadVideo.js +0 -27
  269. package/dist/video/OffthreadVideoForRendering.js +0 -101
  270. package/dist/video/Video.d.ts +0 -6
  271. package/dist/video/Video.js +0 -29
  272. package/dist/video/VideoForDevelopment.js +0 -69
  273. package/dist/video/VideoForRendering.d.ts +0 -6
  274. package/dist/video/VideoForRendering.js +0 -168
  275. package/dist/video/duration-state.d.ts +0 -8
  276. package/dist/video/duration-state.js +0 -15
  277. package/dist/video/index.d.ts +0 -3
  278. package/dist/video/props.d.ts +0 -21
  279. package/dist/wrap-remotion-context.d.ts +0 -14
  280. package/dist/wrap-remotion-context.js +0 -65
  281. package/ensure-correct-version.js +0 -24
  282. package/tsconfig.json +0 -12
  283. package/version.d.ts +0 -1
@@ -0,0 +1,4 @@
1
+ // Automatically generated on publish
2
+ const VERSION = '4.1.0-alpha2';
3
+
4
+ export { VERSION };
package/package.json CHANGED
@@ -1,58 +1,81 @@
1
1
  {
2
- "name": "remotion",
3
- "version": "4.0.0-webhook.27+eb81308ee",
4
- "description": "Render videos in React",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "sideEffects": false,
8
- "scripts": {
9
- "prepublish": "node ensure-correct-version.js && cp ../../README.md .",
10
- "lint": "eslint src --ext ts,tsx",
11
- "test": "vitest --run",
12
- "build": "tsc -d",
13
- "watch": "tsc -w"
14
- },
15
- "repository": {
16
- "url": "https://github.com/remotion-dev/remotion"
17
- },
18
- "bugs": {
19
- "url": "https://github.com/remotion-dev/remotion/issues"
20
- },
21
- "author": "",
22
- "license": "SEE LICENSE IN LICENSE.md",
23
- "peerDependencies": {
24
- "react": ">=16.8.0",
25
- "react-dom": ">=16.8.0"
26
- },
27
- "devDependencies": {
28
- "@jonny/eslint-config": "3.0.266",
29
- "@testing-library/react": "13.3.0",
30
- "@types/node": "^16.7.5",
31
- "@types/react": "18.0.1",
32
- "@types/react-dom": "18.0.0",
33
- "@types/webpack-env": "^1.16.0",
34
- "@vitejs/plugin-react": "^2.0.0",
35
- "eslint": "8.13.0",
36
- "prettier": "^2.0.5",
37
- "prettier-plugin-organize-imports": "^2.3.4",
38
- "react": "^18.0.0",
39
- "react-dom": "^18.0.0",
40
- "react-test-renderer": "^18.0.0",
41
- "rimraf": "^3.0.2",
42
- "typescript": "^4.7.0",
43
- "vitest": "^0.18.0",
44
- "webpack": "5.74.0"
45
- },
46
- "keywords": [
47
- "remotion",
48
- "ffmpeg",
49
- "video",
50
- "react",
51
- "puppeteer",
52
- "player"
53
- ],
54
- "publishConfig": {
55
- "access": "public"
56
- },
57
- "gitHead": "eb81308ee07a402f4a8dd9ff24306bb07dd78175"
58
- }
2
+ "name": "remotion",
3
+ "version": "4.1.0-alpha2",
4
+ "description": "Render videos in React",
5
+ "main": "dist/cjs/index.js",
6
+ "types": "dist/cjs/index.d.ts",
7
+ "module": "dist/esm/index.mjs",
8
+ "repository": {
9
+ "url": "https://github.com/remotion-dev/remotion"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/remotion-dev/remotion/issues"
13
+ },
14
+ "author": "Jonny Burger <jonny@remotion.dev>",
15
+ "license": "SEE LICENSE IN LICENSE.md",
16
+ "peerDependencies": {
17
+ "react": ">=16.8.0",
18
+ "react-dom": ">=16.8.0"
19
+ },
20
+ "devDependencies": {
21
+ "@jonny/eslint-config": "3.0.273",
22
+ "@rollup/plugin-typescript": "^8.2.0",
23
+ "@testing-library/react": "14.0.0",
24
+ "@types/node": "18.14.6",
25
+ "@types/react": "18.0.26",
26
+ "@types/react-dom": "18.0.10",
27
+ "@vitejs/plugin-react": "^2.0.0",
28
+ "eslint": "8.42.0",
29
+ "eslint-plugin-require-extensions": "^0.1.2",
30
+ "jsdom": "21.1.0",
31
+ "prettier": "^2.7.1",
32
+ "prettier-plugin-organize-imports": "^2.3.4",
33
+ "react": "^18.0.0",
34
+ "react-dom": "^18.0.0",
35
+ "rimraf": "^3.0.2",
36
+ "rollup": "^2.70.1",
37
+ "typescript": "4.9.5",
38
+ "vitest": "0.31.1",
39
+ "webpack": "5.83.1",
40
+ "zod": "3.21.4"
41
+ },
42
+ "keywords": [
43
+ "remotion",
44
+ "ffmpeg",
45
+ "video",
46
+ "react",
47
+ "player"
48
+ ],
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "exports": {
53
+ "./package.json": "./package.json",
54
+ ".": {
55
+ "types": "./dist/cjs/index.d.ts",
56
+ "module": "./dist/esm/index.mjs",
57
+ "import": "./dist/esm/index.mjs",
58
+ "require": "./dist/cjs/index.js"
59
+ },
60
+ "./version": {
61
+ "types": "./dist/cjs/version.d.ts",
62
+ "module": "./dist/esm/version.mjs",
63
+ "import": "./dist/esm/version.mjs",
64
+ "require": "./dist/cjs/version.js"
65
+ }
66
+ },
67
+ "typesVersions": {
68
+ ">=1.0": {
69
+ "version": [
70
+ "dist/cjs/version.d.ts"
71
+ ]
72
+ }
73
+ },
74
+ "scripts": {
75
+ "formatting": "prettier src --check",
76
+ "lint": "eslint src --ext ts,tsx",
77
+ "test": "vitest --run",
78
+ "build": "tsc -d && rollup --config rollup-version.config.js && rollup --config rollup.config.js",
79
+ "watch": "tsc -w"
80
+ }
81
+ }
package/version.js CHANGED
@@ -1 +1,2 @@
1
- module.exports = require('./dist/version');
1
+ // For backwards compatibility when you use `esm-wallaby`
2
+ module.exports = require('./dist/cjs/version');
package/.prettierrc.js DELETED
@@ -1,14 +0,0 @@
1
- module.exports = {
2
- singleQuote: true,
3
- bracketSpacing: false,
4
- useTabs: true,
5
- overrides: [
6
- {
7
- files: ['*.yml'],
8
- options: {
9
- singleQuote: false,
10
- },
11
- },
12
- ],
13
- plugins: [require.resolve('prettier-plugin-organize-imports')],
14
- };
@@ -1,5 +0,0 @@
1
- remotion:build: cache hit, replaying output 0f507b249dbf2f69
2
- remotion:build: 
3
- remotion:build: > remotion@3.2.29 build /Users/jonathanburger/remotion/packages/core
4
- remotion:build: > tsc -d
5
- remotion:build: 
@@ -1,22 +0,0 @@
1
- import type { ComponentType } from 'react';
2
- import React from 'react';
3
- declare type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
4
- export declare type CompProps<T> = {
5
- lazyComponent: () => Promise<{
6
- default: LooseComponentType<T>;
7
- }>;
8
- } | {
9
- component: LooseComponentType<T>;
10
- };
11
- export declare type StillProps<T> = {
12
- width: number;
13
- height: number;
14
- id: string;
15
- defaultProps?: T;
16
- } & CompProps<T>;
17
- declare type CompositionProps<T> = StillProps<T> & {
18
- fps: number;
19
- durationInFrames: number;
20
- };
21
- export declare const Composition: <T>({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }: CompositionProps<T>) => React.ReactPortal | null;
22
- export {};
@@ -1,98 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- 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 CanUseRemotionHooks_1 = require("./CanUseRemotionHooks");
8
- const CompositionManager_1 = require("./CompositionManager");
9
- const input_props_1 = require("./config/input-props");
10
- const delay_render_1 = require("./delay-render");
11
- const Folder_1 = require("./Folder");
12
- const get_environment_1 = require("./get-environment");
13
- const internals_1 = require("./internals");
14
- const loading_indicator_1 = require("./loading-indicator");
15
- const nonce_1 = require("./nonce");
16
- const portal_node_1 = require("./portal-node");
17
- const use_lazy_component_1 = require("./use-lazy-component");
18
- const use_video_1 = require("./use-video");
19
- const validate_composition_id_1 = require("./validation/validate-composition-id");
20
- const validate_dimensions_1 = require("./validation/validate-dimensions");
21
- const validate_duration_in_frames_1 = require("./validation/validate-duration-in-frames");
22
- const validate_fps_1 = require("./validation/validate-fps");
23
- const Fallback = () => {
24
- (0, react_1.useEffect)(() => {
25
- const fallback = (0, delay_render_1.delayRender)('Waiting for Root component to unsuspend');
26
- return () => (0, delay_render_1.continueRender)(fallback);
27
- }, []);
28
- return null;
29
- };
30
- const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }) => {
31
- const { registerComposition, unregisterComposition } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
32
- const video = (0, use_video_1.useVideo)();
33
- const lazy = (0, use_lazy_component_1.useLazyComponent)(compProps);
34
- const nonce = (0, nonce_1.useNonce)();
35
- const canUseComposition = (0, react_1.useContext)(internals_1.Internals.CanUseRemotionHooks);
36
- if (canUseComposition) {
37
- if (typeof window !== 'undefined' && window.remotion_isPlayer) {
38
- 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
- }
40
- throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
41
- }
42
- const { folderName, parentName } = (0, react_1.useContext)(Folder_1.FolderContext);
43
- (0, react_1.useEffect)(() => {
44
- // Ensure it's a URL safe id
45
- if (!id) {
46
- throw new Error('No id for composition passed.');
47
- }
48
- (0, validate_composition_id_1.validateCompositionId)(id);
49
- (0, validate_dimensions_1.validateDimension)(width, 'width', 'of the <Composition/> component');
50
- (0, validate_dimensions_1.validateDimension)(height, 'height', 'of the <Composition/> component');
51
- (0, validate_duration_in_frames_1.validateDurationInFrames)(durationInFrames, 'of the <Composition/> component');
52
- (0, validate_fps_1.validateFps)(fps, 'as a prop of the <Composition/> component', false);
53
- registerComposition({
54
- durationInFrames,
55
- fps,
56
- height,
57
- width,
58
- id,
59
- folderName,
60
- component: lazy,
61
- defaultProps,
62
- nonce,
63
- parentFolderName: parentName,
64
- });
65
- return () => {
66
- unregisterComposition(id);
67
- };
68
- }, [
69
- durationInFrames,
70
- fps,
71
- height,
72
- lazy,
73
- id,
74
- folderName,
75
- defaultProps,
76
- registerComposition,
77
- unregisterComposition,
78
- width,
79
- nonce,
80
- parentName,
81
- ]);
82
- if ((0, get_environment_1.getRemotionEnvironment)() === 'preview' &&
83
- video &&
84
- video.component === lazy) {
85
- const Comp = lazy;
86
- 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)());
88
- }
89
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering' &&
90
- video &&
91
- video.component === lazy) {
92
- const Comp = lazy;
93
- const inputProps = (0, input_props_1.getInputProps)();
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)());
95
- }
96
- return null;
97
- };
98
- exports.Composition = Composition;
@@ -1,79 +0,0 @@
1
- import type { ComponentType, LazyExoticComponent } from 'react';
2
- import React from 'react';
3
- import type { TFolder } from './Folder';
4
- export declare type TComposition<T = unknown> = {
5
- width: number;
6
- height: number;
7
- fps: number;
8
- durationInFrames: number;
9
- id: string;
10
- folderName: string | null;
11
- parentFolderName: string | null;
12
- component: LazyExoticComponent<ComponentType<T>>;
13
- defaultProps: T | undefined;
14
- nonce: number;
15
- };
16
- export declare type TCompMetadata = Pick<TComposition, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames' | 'defaultProps'>;
17
- export declare type SmallTCompMetadata = Pick<TComposition, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames'> & Partial<Pick<TComposition, 'defaultProps'>>;
18
- declare type EnhancedTSequenceData = {
19
- type: 'sequence';
20
- } | {
21
- type: 'audio';
22
- src: string;
23
- volume: string | number;
24
- doesVolumeChange: boolean;
25
- startMediaFrom: number;
26
- } | {
27
- type: 'video';
28
- src: string;
29
- volume: string | number;
30
- doesVolumeChange: boolean;
31
- startMediaFrom: number;
32
- };
33
- export declare type TSequence = {
34
- from: number;
35
- duration: number;
36
- id: string;
37
- displayName: string;
38
- parent: string | null;
39
- rootId: string;
40
- showInTimeline: boolean;
41
- nonce: number;
42
- showLoopTimesInTimeline: number | undefined;
43
- } & EnhancedTSequenceData;
44
- export declare type TAsset = {
45
- type: 'audio' | 'video';
46
- src: string;
47
- id: string;
48
- frame: number;
49
- volume: number;
50
- mediaFrame: number;
51
- playbackRate: number;
52
- };
53
- declare type BaseMetadata = Pick<TCompMetadata, 'durationInFrames' | 'fps' | 'defaultProps' | 'height' | 'width'>;
54
- export declare type CompositionManagerContext = {
55
- compositions: TComposition[];
56
- registerComposition: <T>(comp: TComposition<T>) => void;
57
- unregisterComposition: (name: string) => void;
58
- registerFolder: (name: string, parent: string | null) => void;
59
- unregisterFolder: (name: string, parent: string | null) => void;
60
- currentComposition: string | null;
61
- setCurrentComposition: (curr: string) => void;
62
- setCurrentCompositionMetadata: (metadata: BaseMetadata) => void;
63
- currentCompositionMetadata: BaseMetadata | null;
64
- registerSequence: (seq: TSequence) => void;
65
- unregisterSequence: (id: string) => void;
66
- registerAsset: (asset: TAsset) => void;
67
- unregisterAsset: (id: string) => void;
68
- sequences: TSequence[];
69
- assets: TAsset[];
70
- folders: TFolder[];
71
- };
72
- export declare const CompositionManager: React.Context<CompositionManagerContext>;
73
- export declare const compositionsRef: React.RefObject<{
74
- getCompositions: () => TCompMetadata[];
75
- }>;
76
- export declare const CompositionManagerProvider: React.FC<{
77
- children: React.ReactNode;
78
- }>;
79
- export {};
package/dist/Img.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare const Img: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "key" | keyof React.ImgHTMLAttributes<HTMLImageElement>> & React.RefAttributes<HTMLImageElement>>;
package/dist/Img.js DELETED
@@ -1,51 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Img = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const delay_render_1 = require("./delay-render");
7
- const get_environment_1 = require("./get-environment");
8
- const prefetch_1 = require("./prefetch");
9
- const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
10
- const imageRef = (0, react_1.useRef)(null);
11
- (0, react_1.useImperativeHandle)(ref, () => {
12
- return imageRef.current;
13
- }, []);
14
- const actualSrc = (0, prefetch_1.usePreload)(src);
15
- const didGetError = (0, react_1.useCallback)((e) => {
16
- var _a;
17
- if (onError) {
18
- onError(e);
19
- }
20
- else {
21
- console.error('Error loading image with src:', (_a = imageRef.current) === null || _a === void 0 ? void 0 : _a.src, e, 'Handle the event using the onError() prop to make this message disappear.');
22
- }
23
- }, [onError]);
24
- // If image source switches, make new handle
25
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
26
- // eslint-disable-next-line react-hooks/rules-of-hooks
27
- (0, react_1.useLayoutEffect)(() => {
28
- if (process.env.NODE_ENV === 'test') {
29
- return;
30
- }
31
- const newHandle = (0, delay_render_1.delayRender)('Loading <Img> with src=' + src);
32
- const { current } = imageRef;
33
- const didLoad = () => {
34
- (0, delay_render_1.continueRender)(newHandle);
35
- };
36
- if (current === null || current === void 0 ? void 0 : current.complete) {
37
- (0, delay_render_1.continueRender)(newHandle);
38
- }
39
- else {
40
- current === null || current === void 0 ? void 0 : current.addEventListener('load', didLoad, { once: true });
41
- }
42
- // If tag gets unmounted, clear pending handles because image is not going to load
43
- return () => {
44
- current === null || current === void 0 ? void 0 : current.removeEventListener('load', didLoad);
45
- (0, delay_render_1.continueRender)(newHandle);
46
- };
47
- }, [src]);
48
- }
49
- return ((0, jsx_runtime_1.jsx)("img", { ...props, ref: imageRef, src: actualSrc, onError: didGetError }));
50
- };
51
- exports.Img = (0, react_1.forwardRef)(ImgRefForwarding);
@@ -1,71 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RemotionRoot = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const shared_audio_tags_1 = require("./audio/shared-audio-tags");
7
- const CompositionManager_1 = require("./CompositionManager");
8
- const delay_render_1 = require("./delay-render");
9
- const nonce_1 = require("./nonce");
10
- const prefetch_state_1 = require("./prefetch-state");
11
- const random_1 = require("./random");
12
- const timeline_position_state_1 = require("./timeline-position-state");
13
- const RemotionRoot = ({ children }) => {
14
- var _a;
15
- const [remotionRootId] = (0, react_1.useState)(() => String((0, random_1.random)(null)));
16
- const [frame, setFrame] = (0, react_1.useState)((_a = window.remotion_initialFrame) !== null && _a !== void 0 ? _a : 0);
17
- const [playing, setPlaying] = (0, react_1.useState)(false);
18
- const imperativePlaying = (0, react_1.useRef)(false);
19
- const [fastRefreshes, setFastRefreshes] = (0, react_1.useState)(0);
20
- const [playbackRate, setPlaybackRate] = (0, react_1.useState)(1);
21
- const audioAndVideoTags = (0, react_1.useRef)([]);
22
- (0, react_1.useLayoutEffect)(() => {
23
- if (typeof window !== 'undefined') {
24
- window.remotion_setFrame = (f) => {
25
- const id = (0, delay_render_1.delayRender)(`Setting the current frame to ${f}`);
26
- setFrame(f);
27
- requestAnimationFrame(() => (0, delay_render_1.continueRender)(id));
28
- };
29
- window.remotion_isPlayer = false;
30
- }
31
- }, []);
32
- const timelineContextValue = (0, react_1.useMemo)(() => {
33
- return {
34
- frame,
35
- playing,
36
- imperativePlaying,
37
- rootId: remotionRootId,
38
- playbackRate,
39
- setPlaybackRate,
40
- audioAndVideoTags,
41
- };
42
- }, [frame, playbackRate, playing, remotionRootId]);
43
- const setTimelineContextValue = (0, react_1.useMemo)(() => {
44
- return {
45
- setFrame,
46
- setPlaying,
47
- };
48
- }, []);
49
- const nonceContext = (0, react_1.useMemo)(() => {
50
- let counter = 0;
51
- return {
52
- getNonce: () => counter++,
53
- fastRefreshes,
54
- };
55
- }, [fastRefreshes]);
56
- (0, react_1.useEffect)(() => {
57
- if (module.hot) {
58
- module.hot.addStatusHandler((status) => {
59
- if (status === 'idle') {
60
- setFastRefreshes((i) => i + 1);
61
- }
62
- });
63
- }
64
- }, []);
65
- return ((0, jsx_runtime_1.jsx)(nonce_1.NonceContext.Provider, { value: nonceContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.TimelineContext.Provider, { value: timelineContextValue, children: (0, jsx_runtime_1.jsx)(timeline_position_state_1.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(prefetch_state_1.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(CompositionManager_1.CompositionManagerProvider, { children: (0, jsx_runtime_1.jsx)(shared_audio_tags_1.SharedAudioContextProvider
66
- // In the preview, which is mostly played on Desktop, we opt out of the autoplay policy fix as described in https://github.com/remotion-dev/remotion/pull/554, as it mostly applies to mobile.
67
- , {
68
- // In the preview, which is mostly played on Desktop, we opt out of the autoplay policy fix as described in https://github.com/remotion-dev/remotion/pull/554, as it mostly applies to mobile.
69
- numberOfAudioTags: 0, children: children }) }) }) }) }) }));
70
- };
71
- exports.RemotionRoot = RemotionRoot;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- export declare type SequenceContextType = {
3
- cumulatedFrom: number;
4
- relativeFrom: number;
5
- parentFrom: number;
6
- durationInFrames: number;
7
- id: string;
8
- };
9
- export declare const SequenceContext: React.Context<SequenceContextType | null>;
10
- declare type LayoutAndStyle = {
11
- layout: 'none';
12
- } | {
13
- layout?: 'absolute-fill';
14
- style?: React.CSSProperties;
15
- };
16
- export declare type SequenceProps = {
17
- children: React.ReactNode;
18
- from: number;
19
- durationInFrames?: number;
20
- name?: string;
21
- showInTimeline?: boolean;
22
- showLoopTimesInTimeline?: number;
23
- } & LayoutAndStyle;
24
- /**
25
- * A component that time-shifts its children and wraps them in an absolutely positioned <div>.
26
- * @link https://www.remotion.dev/docs/sequence
27
- */
28
- export declare const Sequence: React.ForwardRefExoticComponent<SequenceProps & React.RefAttributes<HTMLDivElement>>;
29
- export {};
package/dist/Still.d.ts DELETED
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- import type { StillProps } from './Composition';
3
- export declare const Still: <T>(props: StillProps<T>) => JSX.Element;
package/dist/Still.js DELETED
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Still = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Composition_1 = require("./Composition");
6
- const Still = (props) => {
7
- return (0, jsx_runtime_1.jsx)(Composition_1.Composition, { fps: 1, durationInFrames: 1, ...props });
8
- };
9
- exports.Still = Still;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Audio = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const get_environment_1 = require("../get-environment");
7
- const Sequence_1 = require("../Sequence");
8
- const validate_media_props_1 = require("../validate-media-props");
9
- const validate_start_from_props_1 = require("../validate-start-from-props");
10
- const AudioForDevelopment_1 = require("./AudioForDevelopment");
11
- const AudioForRendering_1 = require("./AudioForRendering");
12
- const shared_audio_tags_1 = require("./shared-audio-tags");
13
- const AudioRefForwardingFunction = (props, ref) => {
14
- const audioContext = (0, react_1.useContext)(shared_audio_tags_1.SharedAudioContext);
15
- const { startFrom, endAt, ...otherProps } = props;
16
- const onError = (0, react_1.useCallback)((e) => {
17
- console.log(e.currentTarget.error);
18
- throw new Error(`Could not play audio with src ${otherProps.src}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`);
19
- }, [otherProps.src]);
20
- if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
21
- (0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
22
- const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
23
- const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
24
- return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.Audio, { ...otherProps, ref: ref }) }));
25
- }
26
- (0, validate_media_props_1.validateMediaProps)(props, 'Audio');
27
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
28
- return (0, jsx_runtime_1.jsx)(AudioForRendering_1.AudioForRendering, { ...props, ref: ref, onError: onError });
29
- }
30
- return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_1.AudioForDevelopment, { shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError }));
31
- };
32
- exports.Audio = (0, react_1.forwardRef)(AudioRefForwardingFunction);
@@ -1,8 +0,0 @@
1
- import type { ForwardRefExoticComponent, RefAttributes } from 'react';
2
- import React from 'react';
3
- export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
4
- volume?: import("../volume-prop").VolumeProp | undefined;
5
- playbackRate?: number | undefined;
6
- } & {
7
- shouldPreMountAudioTags: boolean;
8
- } & RefAttributes<HTMLAudioElement>>;