remotion 4.0.0-webhook.26 → 4.0.0

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 (287) 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 +56 -0
  12. package/dist/cjs/Composition.js +121 -0
  13. package/dist/cjs/CompositionManager.d.ts +74 -0
  14. package/dist/{CompositionManager.js → cjs/CompositionManager.js} +29 -66
  15. package/dist/cjs/CompositionManagerContext.d.ts +19 -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 +74 -0
  31. package/dist/cjs/ResolveCompositionConfig.d.ts +24 -0
  32. package/dist/cjs/ResolveCompositionConfig.js +198 -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} +14 -6
  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 +132 -0
  86. package/dist/cjs/internals.js +123 -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 +45 -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 +82 -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 -9
  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} +9 -7
  134. package/dist/cjs/timeline-position-state.js +67 -0
  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} +6 -5
  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/cjs/validation/validate-dimensions.d.ts +1 -0
  166. package/dist/{validation → cjs/validation}/validate-dimensions.js +2 -2
  167. package/dist/cjs/validation/validate-duration-in-frames.d.ts +4 -0
  168. package/dist/{validation → cjs/validation}/validate-duration-in-frames.js +10 -3
  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/cjs/validation/validate-fps.d.ts +1 -0
  172. package/dist/{validation → cjs/validation}/validate-fps.js +2 -2
  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 +40 -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/cjs/video-config.d.ts +9 -0
  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 +4643 -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/timeline-position-state.js +0 -41
  253. package/dist/truthy.d.ts +0 -3
  254. package/dist/use-current-frame.d.ts +0 -6
  255. package/dist/use-lazy-component.d.ts +0 -7
  256. package/dist/use-media-playback.js +0 -75
  257. package/dist/use-video-config.d.ts +0 -7
  258. package/dist/use-video-config.js +0 -26
  259. package/dist/use-video.d.ts +0 -13
  260. package/dist/use-video.js +0 -28
  261. package/dist/validate-media-props.d.ts +0 -4
  262. package/dist/validation/validate-dimensions.d.ts +0 -1
  263. package/dist/validation/validate-duration-in-frames.d.ts +0 -1
  264. package/dist/validation/validate-fps.d.ts +0 -1
  265. package/dist/validation/validate-offthreadvideo-image-format.d.ts +0 -1
  266. package/dist/validation/validate-offthreadvideo-image-format.js +0 -15
  267. package/dist/version.d.ts +0 -1
  268. package/dist/video/LoopedVideo.d.ts +0 -3
  269. package/dist/video/LoopedVideo.js +0 -16
  270. package/dist/video/OffthreadVideo.d.ts +0 -3
  271. package/dist/video/OffthreadVideo.js +0 -27
  272. package/dist/video/OffthreadVideoForRendering.js +0 -101
  273. package/dist/video/Video.d.ts +0 -6
  274. package/dist/video/Video.js +0 -29
  275. package/dist/video/VideoForDevelopment.js +0 -69
  276. package/dist/video/VideoForRendering.d.ts +0 -6
  277. package/dist/video/VideoForRendering.js +0 -168
  278. package/dist/video/duration-state.d.ts +0 -8
  279. package/dist/video/duration-state.js +0 -15
  280. package/dist/video/index.d.ts +0 -3
  281. package/dist/video/props.d.ts +0 -21
  282. package/dist/video-config.d.ts +0 -8
  283. package/dist/wrap-remotion-context.d.ts +0 -14
  284. package/dist/wrap-remotion-context.js +0 -65
  285. package/ensure-correct-version.js +0 -24
  286. package/tsconfig.json +0 -12
  287. package/version.d.ts +0 -1
@@ -4,9 +4,9 @@
4
4
  * https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/Colors.ts
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.interpolateColors = void 0;
7
+ exports.interpolateColors = exports.processColor = void 0;
8
8
  /* eslint no-bitwise: 0 */
9
- const interpolate_1 = require("./interpolate");
9
+ const interpolate_js_1 = require("./interpolate.js");
10
10
  // var INTEGER = '[-+]?\\d+';
11
11
  const NUMBER = '[-+]?\\d*\\.?\\d+';
12
12
  const PERCENTAGE = NUMBER + '%';
@@ -356,18 +356,14 @@ const blue = (c) => {
356
356
  const rgbaColor = (r, g, b, alpha) => {
357
357
  return `rgba(${r}, ${g}, ${b}, ${alpha})`;
358
358
  };
359
- function processColorInitially(color) {
360
- let normalizedColor = normalizeColor(color);
361
- normalizedColor = ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb
362
- return normalizedColor;
363
- }
364
359
  function processColor(color) {
365
- const normalizedColor = processColorInitially(color);
366
- return normalizedColor;
360
+ const normalizedColor = normalizeColor(color);
361
+ return ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb
367
362
  }
363
+ exports.processColor = processColor;
368
364
  const interpolateColorsRGB = (value, inputRange, colors) => {
369
365
  const [r, g, b, a] = [red, green, blue, opacity].map((f) => {
370
- const unrounded = (0, interpolate_1.interpolate)(value, inputRange, colors.map((c) => f(c)), {
366
+ const unrounded = (0, interpolate_js_1.interpolate)(value, inputRange, colors.map((c) => f(c)), {
371
367
  extrapolateLeft: 'clamp',
372
368
  extrapolateRight: 'clamp',
373
369
  });
@@ -378,6 +374,10 @@ const interpolateColorsRGB = (value, inputRange, colors) => {
378
374
  });
379
375
  return rgbaColor(r, g, b, a);
380
376
  };
377
+ /**
378
+ * @description This function allows you to map a range of values to colors using a concise syntax.
379
+ * @see [Documentation](https://www.remotion.dev/docs/interpolate-colors)
380
+ */
381
381
  const interpolateColors = (input, inputRange, outputRange) => {
382
382
  if (typeof input === 'undefined') {
383
383
  throw new TypeError('input can not be undefined');
@@ -1,4 +1,13 @@
1
- declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
1
+ export type ExtrapolateType = 'extend' | 'identity' | 'clamp';
2
+ /**
3
+ * @description This function allows you to map a range of values to another with a conside syntax
4
+ * @see [Documentation](https://www.remotion.dev/docs/interpolate)
5
+ */
6
+ export type InterpolateOptions = Partial<{
7
+ easing: (input: number) => number;
8
+ extrapolateLeft: ExtrapolateType;
9
+ extrapolateRight: ExtrapolateType;
10
+ }>;
2
11
  /**
3
12
  * Map a value from an input range to an output range.
4
13
  * @link https://www.remotion.dev/docs/interpolate
@@ -10,9 +19,4 @@ declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
10
19
  * @param {string=} [options.extrapolateLeft="extend"] What should happen if the input value is outside left the input range, default: "extend" {@link https://www.remotion.dev/docs/interpolate#extrapolateleft}
11
20
  * @param {string=} [options.extrapolateRight="extend"] Same as extrapolateLeft, except for values outside right the input range {@link https://www.remotion.dev/docs/interpolate#extrapolateright}
12
21
  */
13
- export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly number[], options?: {
14
- easing?: (input: number) => number;
15
- extrapolateLeft?: ExtrapolateType;
16
- extrapolateRight?: ExtrapolateType;
17
- }): number;
18
- export {};
22
+ export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly number[], options?: InterpolateOptions): number;
File without changes
@@ -0,0 +1,3 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ export declare const IsPlayerContextProvider: React.FC<PropsWithChildren>;
3
+ export declare const useIsPlayer: () => boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useIsPlayer = exports.IsPlayerContextProvider = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const IsPlayerContext = (0, react_1.createContext)(false);
7
+ const IsPlayerContextProvider = ({ children, }) => {
8
+ return (0, jsx_runtime_1.jsx)(IsPlayerContext.Provider, { value: true, children: children });
9
+ };
10
+ exports.IsPlayerContextProvider = IsPlayerContextProvider;
11
+ const useIsPlayer = () => {
12
+ return (0, react_1.useContext)(IsPlayerContext);
13
+ };
14
+ exports.useIsPlayer = useIsPlayer;
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Loading = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const AbsoluteFill_1 = require("./AbsoluteFill");
5
+ const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
6
6
  const rotate = {
7
7
  transform: `rotate(90deg)`,
8
8
  };
9
9
  const ICON_SIZE = 40;
10
10
  const label = {
11
- color: '#555',
11
+ color: 'white',
12
12
  fontSize: 14,
13
13
  fontFamily: 'sans-serif',
14
14
  };
@@ -17,7 +17,7 @@ const container = {
17
17
  alignItems: 'center',
18
18
  };
19
19
  const Loading = () => {
20
- return ((0, jsx_runtime_1.jsxs)(AbsoluteFill_1.AbsoluteFill, { style: container, id: "remotion-comp-loading", children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", children: `
20
+ return ((0, jsx_runtime_1.jsxs)(AbsoluteFill_js_1.AbsoluteFill, { style: container, id: "remotion-comp-loading", children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", children: `
21
21
  @keyframes anim {
22
22
  from {
23
23
  opacity: 0
@@ -30,6 +30,6 @@ const Loading = () => {
30
30
  animation: anim 2s;
31
31
  animation-fill-mode: forwards;
32
32
  }
33
- ` }), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }), (0, jsx_runtime_1.jsx)("p", { style: label, children: "Loading..." })] }));
33
+ ` }), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }), (0, jsx_runtime_1.jsxs)("p", { style: label, children: ["Resolving ", '<Suspense>', "..."] })] }));
34
34
  };
35
35
  exports.Loading = Loading;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { LayoutAndStyle } from '../Sequence.js';
3
+ export type LoopProps = {
4
+ durationInFrames: number;
5
+ times?: number;
6
+ name?: string;
7
+ children: React.ReactNode;
8
+ } & LayoutAndStyle;
9
+ /**
10
+ * @description This component allows you to quickly lay out an animation so it repeats itself.
11
+ * @see [Documentation](https://www.remotion.dev/docs/loop)
12
+ */
13
+ export declare const Loop: React.FC<LoopProps>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Loop = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const Sequence_js_1 = require("../Sequence.js");
7
+ const use_current_frame_js_1 = require("../use-current-frame.js");
8
+ const use_video_config_js_1 = require("../use-video-config.js");
9
+ const validate_duration_in_frames_js_1 = require("../validation/validate-duration-in-frames.js");
10
+ /**
11
+ * @description This component allows you to quickly lay out an animation so it repeats itself.
12
+ * @see [Documentation](https://www.remotion.dev/docs/loop)
13
+ */
14
+ const Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
15
+ const currentFrame = (0, use_current_frame_js_1.useCurrentFrame)();
16
+ const { durationInFrames: compDuration } = (0, use_video_config_js_1.useVideoConfig)();
17
+ (0, validate_duration_in_frames_js_1.validateDurationInFrames)(durationInFrames, {
18
+ component: 'of the <Loop /> component',
19
+ allowFloats: true,
20
+ });
21
+ if (typeof times !== 'number') {
22
+ throw new TypeError(`You passed to "times" an argument of type ${typeof times}, but it must be a number.`);
23
+ }
24
+ if (times !== Infinity && times % 1 !== 0) {
25
+ throw new TypeError(`The "times" prop of a loop must be an integer, but got ${times}.`);
26
+ }
27
+ if (times < 0) {
28
+ throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${times}`);
29
+ }
30
+ const maxTimes = Math.ceil(compDuration / durationInFrames);
31
+ const actualTimes = Math.min(maxTimes, times);
32
+ const style = props.layout === 'none' ? undefined : props.style;
33
+ const maxFrame = durationInFrames * (actualTimes - 1);
34
+ const start = Math.floor(currentFrame / durationInFrames) * durationInFrames;
35
+ const from = Math.min(start, maxFrame);
36
+ const loopDisplay = (0, react_1.useMemo)(() => {
37
+ return {
38
+ numberOfTimes: actualTimes,
39
+ startOffset: -from,
40
+ durationInFrames,
41
+ };
42
+ }, [actualTimes, durationInFrames, from]);
43
+ return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name, loopDisplay: loopDisplay, layout: props.layout, style: style, children: children }));
44
+ };
45
+ exports.Loop = Loop;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.checkMultipleRemotionVersions = void 0;
4
- const truthy_1 = require("./truthy");
5
- const version_1 = require("./version");
4
+ const truthy_js_1 = require("./truthy.js");
5
+ const version_js_1 = require("./version.js");
6
6
  const checkMultipleRemotionVersions = () => {
7
7
  if (typeof globalThis === 'undefined') {
8
8
  return;
@@ -10,18 +10,23 @@ const checkMultipleRemotionVersions = () => {
10
10
  const alreadyImported = globalThis.remotion_imported ||
11
11
  (typeof window !== 'undefined' && window.remotion_imported);
12
12
  if (alreadyImported) {
13
+ if (alreadyImported === version_js_1.VERSION) {
14
+ // Next.JS will reload the package and cause a server-side warning.
15
+ // It's okay if this happens during SSR in developement
16
+ return;
17
+ }
13
18
  throw new TypeError(`🚨 Multiple versions of Remotion detected: ${[
14
- version_1.VERSION,
19
+ version_js_1.VERSION,
15
20
  typeof alreadyImported === 'string'
16
21
  ? alreadyImported
17
22
  : 'an older version',
18
23
  ]
19
- .filter(truthy_1.truthy)
24
+ .filter(truthy_js_1.truthy)
20
25
  .join(' and ')}. This will cause things to break in an unexpected way.\nCheck that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
21
26
  }
22
- globalThis.remotion_imported = true;
27
+ globalThis.remotion_imported = version_js_1.VERSION;
23
28
  if (typeof window !== 'undefined') {
24
- window.remotion_imported = version_1.VERSION;
29
+ window.remotion_imported = version_js_1.VERSION;
25
30
  }
26
31
  };
27
32
  exports.checkMultipleRemotionVersions = checkMultipleRemotionVersions;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare type TNonceContext = {
2
+ export type TNonceContext = {
3
3
  getNonce: () => number;
4
4
  fastRefreshes: number;
5
5
  };
@@ -9,7 +9,13 @@ exports.NonceContext = (0, react_1.createContext)({
9
9
  const useNonce = () => {
10
10
  const context = (0, react_1.useContext)(exports.NonceContext);
11
11
  const [nonce, setNonce] = (0, react_1.useState)(() => context.getNonce());
12
+ const lastContext = (0, react_1.useRef)(context);
13
+ // Only if context changes, but not initially
12
14
  (0, react_1.useEffect)(() => {
15
+ if (lastContext.current === context) {
16
+ return;
17
+ }
18
+ lastContext.current = context;
13
19
  setNonce(context.getNonce);
14
20
  }, [context]);
15
21
  return nonce;
@@ -28,6 +28,10 @@ const playAndHandleNotAllowedError = (mediaRef, mediaType) => {
28
28
  if (err.message.includes('request was interrupted by a new load request')) {
29
29
  return;
30
30
  }
31
+ // Audio tag got unmounted
32
+ if (err.message.includes('because the media was removed from the document')) {
33
+ return;
34
+ }
31
35
  console.log(`Could not play ${mediaType} due to following error: `, err);
32
36
  if (!current.muted) {
33
37
  console.log(`The video will be muted and we'll retry playing it.`, err);
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type Value = Record<string, string>;
3
+ export declare const PreloadContext: React.Context<Value>;
4
+ export declare const setPreloads: (updater: (p: Value) => Value) => void;
5
+ export declare const PrefetchProvider: React.FC<{
6
+ children: React.ReactNode;
7
+ }>;
8
+ export {};
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrefetchProvider = exports.setPreloads = exports.PreloadContext = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ exports.PreloadContext = (0, react_1.createContext)({});
7
+ let preloads = {};
8
+ let updaters = [];
9
+ const setPreloads = (updater) => {
10
+ preloads = updater(preloads);
11
+ updaters.forEach((u) => u());
12
+ };
13
+ exports.setPreloads = setPreloads;
14
+ const PrefetchProvider = ({ children }) => {
15
+ const [_preloads, _setPreloads] = (0, react_1.useState)(() => preloads);
16
+ (0, react_1.useEffect)(() => {
17
+ const updaterFunction = () => {
18
+ _setPreloads(preloads);
19
+ };
20
+ updaters.push(updaterFunction);
21
+ return () => {
22
+ updaters = updaters.filter((u) => u !== updaterFunction);
23
+ };
24
+ }, []);
25
+ return ((0, jsx_runtime_1.jsx)(exports.PreloadContext.Provider, { value: _preloads, children: children }));
26
+ };
27
+ exports.PrefetchProvider = PrefetchProvider;
@@ -0,0 +1,13 @@
1
+ export declare const usePreload: (src: string) => string;
2
+ type FetchAndPreload = {
3
+ free: () => void;
4
+ waitUntilDone: () => Promise<string>;
5
+ };
6
+ /**
7
+ * @description When you call the preFetch() function, an asset will be fetched and kept in memory so it is ready when you want to play it in a <Player>.
8
+ * @see [Documentation](https://www.remotion.dev/docs/prefetch)
9
+ */
10
+ export declare const prefetch: (src: string, options?: {
11
+ method?: 'blob-url' | 'base64';
12
+ }) => FetchAndPreload;
13
+ export {};
@@ -2,16 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.prefetch = exports.usePreload = void 0;
4
4
  const react_1 = require("react");
5
- const get_environment_1 = require("./get-environment");
6
- const prefetch_state_1 = require("./prefetch-state");
5
+ const get_environment_js_1 = require("./get-environment.js");
6
+ const prefetch_state_js_1 = require("./prefetch-state.js");
7
7
  const usePreload = (src) => {
8
8
  var _a;
9
- const { preloads } = (0, react_1.useContext)(prefetch_state_1.PreloadContext);
9
+ const preloads = (0, react_1.useContext)(prefetch_state_js_1.PreloadContext);
10
10
  return (_a = preloads[src]) !== null && _a !== void 0 ? _a : src;
11
11
  };
12
12
  exports.usePreload = usePreload;
13
- const prefetch = (src) => {
14
- if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
13
+ const blobToBase64 = function (blob) {
14
+ const reader = new FileReader();
15
+ return new Promise((resolve, reject) => {
16
+ reader.onload = function () {
17
+ const dataUrl = reader.result;
18
+ resolve(dataUrl);
19
+ };
20
+ reader.onerror = (err) => {
21
+ return reject(err);
22
+ };
23
+ reader.readAsDataURL(blob);
24
+ });
25
+ };
26
+ /**
27
+ * @description When you call the preFetch() function, an asset will be fetched and kept in memory so it is ready when you want to play it in a <Player>.
28
+ * @see [Documentation](https://www.remotion.dev/docs/prefetch)
29
+ */
30
+ const prefetch = (src, options) => {
31
+ var _a;
32
+ const method = (_a = options === null || options === void 0 ? void 0 : options.method) !== null && _a !== void 0 ? _a : 'blob-url';
33
+ if ((0, get_environment_js_1.getRemotionEnvironment)() === 'rendering') {
15
34
  return {
16
35
  free: () => undefined,
17
36
  waitUntilDone: () => Promise.resolve(src),
@@ -41,28 +60,35 @@ const prefetch = (src) => {
41
60
  return res.blob();
42
61
  })
43
62
  .then((buf) => {
44
- var _a;
45
- if (canceled) {
63
+ if (!buf) {
46
64
  return;
47
65
  }
48
- if (buf) {
49
- objectUrl = URL.createObjectURL(buf);
50
- (_a = prefetch_state_1.preloadRef.current) === null || _a === void 0 ? void 0 : _a.setPreloads((p) => ({
51
- ...p,
52
- [src]: objectUrl,
53
- }));
54
- resolve(objectUrl);
66
+ if (method === 'base64') {
67
+ return blobToBase64(buf);
55
68
  }
69
+ return URL.createObjectURL(buf);
70
+ })
71
+ .then((url) => {
72
+ if (canceled) {
73
+ return;
74
+ }
75
+ objectUrl = url;
76
+ (0, prefetch_state_js_1.setPreloads)((p) => ({
77
+ ...p,
78
+ [src]: objectUrl,
79
+ }));
80
+ resolve(objectUrl);
56
81
  })
57
82
  .catch((err) => {
58
83
  reject(err);
59
84
  });
60
85
  return {
61
86
  free: () => {
62
- var _a;
63
87
  if (objectUrl) {
64
- URL.revokeObjectURL(objectUrl);
65
- (_a = prefetch_state_1.preloadRef.current) === null || _a === void 0 ? void 0 : _a.setPreloads((p) => {
88
+ if (method === 'blob-url') {
89
+ URL.revokeObjectURL(objectUrl);
90
+ }
91
+ (0, prefetch_state_js_1.setPreloads)((p) => {
66
92
  const copy = { ...p };
67
93
  delete copy[src];
68
94
  return copy;
@@ -0,0 +1,10 @@
1
+ import type { AnyZodObject, z } from 'zod';
2
+ type And<A extends boolean, B extends boolean> = A extends true ? B extends true ? true : false : false;
3
+ export type PropsIfHasProps<Schema extends AnyZodObject, Props extends Record<string, unknown>> = And<AnyZodObject extends Schema ? true : false, {} extends Props ? true : false> extends true ? {
4
+ defaultProps?: {};
5
+ } : {
6
+ defaultProps: InferProps<Schema, Props>;
7
+ };
8
+ export type InferProps<Schema extends AnyZodObject, Props extends Record<string, unknown>> = AnyZodObject extends Schema ? {} extends Props ? Record<string, unknown> : Props : {} extends Props ? z.infer<Schema> : // Props and schema specified
9
+ z.infer<Schema> & Props;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ export type RandomSeed = number | string | null;
2
+ /**
3
+ * @description A deterministic pseudo-random number generator. Pass in the same seed and get the same pseudorandom number.
4
+ * @see [Documentation](https://remotion.dev/docs/random)
5
+ */
6
+ export declare const random: (seed: RandomSeed, dummy?: unknown) => number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.random = void 0;
4
+ /* eslint-disable no-bitwise */
4
5
  function mulberry32(a) {
5
6
  let t = a + 0x6d2b79f5;
6
7
  t = Math.imul(t ^ (t >>> 15), t | 1);
@@ -19,9 +20,8 @@ function hashCode(str) {
19
20
  return hash;
20
21
  }
21
22
  /**
22
- * A deterministic pseudo-random number generator.
23
- * Pass in the same seed and get the same pseudorandom number.
24
- * See: https://remotion.dev/docs/random
23
+ * @description A deterministic pseudo-random number generator. Pass in the same seed and get the same pseudorandom number.
24
+ * @see [Documentation](https://remotion.dev/docs/random)
25
25
  */
26
26
  const random = (seed, dummy) => {
27
27
  if (dummy !== undefined) {
@@ -1,4 +1,8 @@
1
1
  import type React from 'react';
2
+ /**
3
+ * @description This function registers the root component of the Remotion project
4
+ * @see [Documentation](https://www.remotion.dev/docs/register-root)
5
+ */
2
6
  export declare const registerRoot: (comp: React.FC) => void;
3
7
  export declare const getRoot: () => React.FC<{}> | null;
4
8
  export declare const waitForRoot: (fn: (comp: React.FC) => void) => (() => void);
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.waitForRoot = exports.getRoot = exports.registerRoot = void 0;
4
4
  let Root = null;
5
5
  let listeners = [];
6
+ /**
7
+ * @description This function registers the root component of the Remotion project
8
+ * @see [Documentation](https://www.remotion.dev/docs/register-root)
9
+ */
6
10
  const registerRoot = (comp) => {
7
11
  if (!comp) {
8
12
  throw new Error(`You must pass a React component to registerRoot(), but ${JSON.stringify(comp)} was passed.`);
@@ -0,0 +1,8 @@
1
+ import type { AnyZodObject } from 'zod';
2
+ import type { TCompMetadataWithCalcFunction } from './CompositionManager.js';
3
+ import type { VideoConfig } from './video-config.js';
4
+ export declare const resolveVideoConfig: ({ composition, editorProps: editorPropsOrUndefined, signal, }: {
5
+ composition: TCompMetadataWithCalcFunction<AnyZodObject, Record<string, unknown>>;
6
+ editorProps: object;
7
+ signal: AbortSignal;
8
+ }) => VideoConfig | Promise<VideoConfig>;
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveVideoConfig = void 0;
4
+ const input_props_js_1 = require("./config/input-props.js");
5
+ const get_environment_js_1 = require("./get-environment.js");
6
+ const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
7
+ const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
8
+ const validate_fps_js_1 = require("./validation/validate-fps.js");
9
+ const resolveVideoConfig = ({ composition, editorProps: editorPropsOrUndefined, signal, }) => {
10
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11
+ const calculatedProm = composition.calculateMetadata
12
+ ? composition.calculateMetadata({
13
+ defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
14
+ props: {
15
+ ...((_b = composition.defaultProps) !== null && _b !== void 0 ? _b : {}),
16
+ ...(editorPropsOrUndefined !== null && editorPropsOrUndefined !== void 0 ? editorPropsOrUndefined : {}),
17
+ ...(typeof window === 'undefined' ||
18
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-development' ||
19
+ (0, get_environment_js_1.getRemotionEnvironment)() === 'player-production'
20
+ ? {}
21
+ : (_c = (0, input_props_js_1.getInputProps)()) !== null && _c !== void 0 ? _c : {}),
22
+ },
23
+ abortSignal: signal,
24
+ })
25
+ : null;
26
+ if (calculatedProm !== null &&
27
+ typeof calculatedProm === 'object' &&
28
+ 'then' in calculatedProm) {
29
+ return calculatedProm.then((c) => {
30
+ var _a, _b, _c;
31
+ const { height, width, durationInFrames, fps } = validateCalculated({
32
+ calculated: c,
33
+ composition,
34
+ });
35
+ return {
36
+ width,
37
+ height,
38
+ fps,
39
+ durationInFrames,
40
+ id: composition.id,
41
+ defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
42
+ props: (_c = (_b = c.props) !== null && _b !== void 0 ? _b : composition.defaultProps) !== null && _c !== void 0 ? _c : {},
43
+ };
44
+ });
45
+ }
46
+ const data = validateCalculated({
47
+ calculated: calculatedProm,
48
+ composition,
49
+ });
50
+ if (calculatedProm === null) {
51
+ return {
52
+ ...data,
53
+ id: composition.id,
54
+ defaultProps: (_d = composition.defaultProps) !== null && _d !== void 0 ? _d : {},
55
+ props: (_e = composition.defaultProps) !== null && _e !== void 0 ? _e : {},
56
+ };
57
+ }
58
+ return {
59
+ ...data,
60
+ id: composition.id,
61
+ defaultProps: (_f = composition.defaultProps) !== null && _f !== void 0 ? _f : {},
62
+ props: (_h = (_g = calculatedProm.props) !== null && _g !== void 0 ? _g : composition.defaultProps) !== null && _h !== void 0 ? _h : {},
63
+ };
64
+ };
65
+ exports.resolveVideoConfig = resolveVideoConfig;
66
+ const validateCalculated = ({ composition, calculated, }) => {
67
+ var _a, _b, _c, _d, _e, _f, _g, _h;
68
+ const calculateMetadataErrorLocation = `calculated by calculateMetadata() for the composition "${composition.id}"`;
69
+ const defaultErrorLocation = `of the "<Composition />" component with the id "${composition.id}"`;
70
+ const width = (_b = (_a = calculated === null || calculated === void 0 ? void 0 : calculated.width) !== null && _a !== void 0 ? _a : composition.width) !== null && _b !== void 0 ? _b : undefined;
71
+ (0, validate_dimensions_js_1.validateDimension)(width, 'width', (calculated === null || calculated === void 0 ? void 0 : calculated.width) ? calculateMetadataErrorLocation : defaultErrorLocation);
72
+ const height = (_d = (_c = calculated === null || calculated === void 0 ? void 0 : calculated.height) !== null && _c !== void 0 ? _c : composition.height) !== null && _d !== void 0 ? _d : undefined;
73
+ (0, validate_dimensions_js_1.validateDimension)(height, 'height', (calculated === null || calculated === void 0 ? void 0 : calculated.height) ? calculateMetadataErrorLocation : defaultErrorLocation);
74
+ const fps = (_f = (_e = calculated === null || calculated === void 0 ? void 0 : calculated.fps) !== null && _e !== void 0 ? _e : composition.fps) !== null && _f !== void 0 ? _f : null;
75
+ (0, validate_fps_js_1.validateFps)(fps, (calculated === null || calculated === void 0 ? void 0 : calculated.fps) ? calculateMetadataErrorLocation : defaultErrorLocation, false);
76
+ const durationInFrames = (_h = (_g = calculated === null || calculated === void 0 ? void 0 : calculated.durationInFrames) !== null && _g !== void 0 ? _g : composition.durationInFrames) !== null && _h !== void 0 ? _h : null;
77
+ (0, validate_duration_in_frames_js_1.validateDurationInFrames)(durationInFrames, {
78
+ allowFloats: false,
79
+ component: `of the "<Composition />" component with the id "${composition.id}"`,
80
+ });
81
+ return { width, height, fps, durationInFrames };
82
+ };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const flattenChildren: (children: React.ReactNode) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment | React.ReactPortal)[];
File without changes
@@ -0,0 +1,17 @@
1
+ import type { FC, PropsWithChildren } from 'react';
2
+ import type { LayoutAndStyle, SequenceProps } from '../Sequence.js';
3
+ type SeriesSequenceProps = PropsWithChildren<{
4
+ durationInFrames: number;
5
+ offset?: number;
6
+ } & Pick<SequenceProps, 'layout' | 'name'> & LayoutAndStyle>;
7
+ declare const SeriesSequence: import("react").ForwardRefExoticComponent<SeriesSequenceProps & import("react").RefAttributes<HTMLDivElement>>;
8
+ /**
9
+ * @description with this component, you can easily stitch together scenes that should play sequentially after another.
10
+ * @see [Documentation](https://www.remotion.dev/docs/series)
11
+ */
12
+ declare const Series: FC<{
13
+ children: React.ReactNode;
14
+ }> & {
15
+ Sequence: typeof SeriesSequence;
16
+ };
17
+ export { Series };