remotion 4.0.0-lambda.3 → 4.0.0-newpathfunctions.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.
- package/LICENSE.md +8 -8
- package/README.md +30 -19
- package/dist/AbsoluteFill.d.ts +6 -2
- package/dist/AbsoluteFill.js +7 -3
- package/dist/CanUseRemotionHooks.d.ts +5 -0
- package/dist/CanUseRemotionHooks.js +10 -0
- package/dist/Clipper.d.ts +7 -0
- package/dist/Clipper.js +24 -0
- package/dist/Composition.d.ts +3 -5
- package/dist/Composition.js +36 -38
- package/dist/CompositionManager.d.ts +9 -11
- package/dist/CompositionManager.js +9 -3
- package/dist/Folder.d.ts +15 -0
- package/dist/Folder.js +33 -0
- package/dist/IFrame.d.ts +0 -0
- package/dist/IFrame.js +0 -0
- package/dist/Img.d.ts +0 -0
- package/dist/Img.js +31 -21
- package/dist/LayerMaster.d.ts +8 -0
- package/dist/LayerMaster.js +39 -0
- package/dist/NativeLayers.d.ts +13 -0
- package/dist/NativeLayers.js +29 -0
- package/dist/Null.d.ts +2 -0
- package/dist/Null.js +25 -0
- package/dist/RemotionRoot.d.ts +1 -0
- package/dist/RemotionRoot.js +9 -6
- package/dist/{sequencing/index.d.ts → Sequence.d.ts} +13 -4
- package/dist/{sequencing/index.js → Sequence.js} +42 -34
- package/dist/Still.d.ts +1 -1
- package/dist/Still.js +0 -0
- package/dist/absolute-src.d.ts +0 -0
- package/dist/absolute-src.js +0 -0
- package/dist/asset-types.d.ts +1 -4
- package/dist/asset-types.js +0 -0
- package/dist/audio/Audio.d.ts +5 -3
- package/dist/audio/Audio.js +26 -6
- package/dist/audio/AudioForDevelopment.d.ts +6 -2
- package/dist/audio/AudioForDevelopment.js +42 -6
- package/dist/audio/AudioForRendering.d.ts +9 -2
- package/dist/audio/AudioForRendering.js +52 -9
- package/dist/audio/index.d.ts +0 -0
- package/dist/audio/index.js +0 -0
- package/dist/audio/props.d.ts +4 -2
- package/dist/audio/props.js +0 -0
- package/dist/audio/shared-audio-tags.d.ts +9 -4
- package/dist/audio/shared-audio-tags.js +117 -45
- package/dist/audio/use-audio-frame.d.ts +0 -0
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/bezier.d.ts +0 -0
- package/dist/bezier.js +0 -0
- package/dist/config/input-props.d.ts +0 -0
- package/dist/config/input-props.js +12 -14
- package/dist/config.d.ts +285 -0
- package/dist/config.js +21 -0
- package/dist/default-css.d.ts +1 -0
- package/dist/default-css.js +9 -2
- package/dist/delay-render.d.ts +0 -0
- package/dist/delay-render.js +4 -4
- package/dist/easing.d.ts +0 -0
- package/dist/easing.js +0 -0
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/get-asset-file-name.d.ts +0 -0
- package/dist/get-asset-file-name.js +0 -0
- package/dist/get-compositions-from-markup.d.ts +3 -0
- package/dist/get-compositions-from-markup.js +19 -0
- package/dist/get-environment.d.ts +1 -0
- package/dist/get-environment.js +14 -2
- package/dist/get-preview-dom-element.d.ts +0 -0
- package/dist/get-preview-dom-element.js +0 -0
- package/dist/get-static-files.d.ts +17 -0
- package/dist/get-static-files.js +31 -0
- package/dist/get-timeline-clip-name.d.ts +0 -0
- package/dist/get-timeline-clip-name.js +2 -1
- package/dist/index.d.ts +38 -9
- package/dist/index.js +25 -9
- package/dist/internals.d.ts +50 -102
- package/dist/internals.js +18 -93
- package/dist/{interpolateColors.d.ts → interpolate-colors.d.ts} +0 -0
- package/dist/{interpolateColors.js → interpolate-colors.js} +0 -0
- package/dist/interpolate.d.ts +0 -0
- package/dist/interpolate.js +0 -0
- package/dist/is-approximately-the-same.d.ts +0 -0
- package/dist/is-approximately-the-same.js +0 -0
- package/dist/is-player.d.ts +3 -0
- package/dist/is-player.js +14 -0
- package/dist/layers.d.ts +24 -0
- package/dist/layers.js +149 -0
- package/dist/loading-indicator.d.ts +0 -0
- package/dist/loading-indicator.js +0 -0
- package/dist/loop/index.d.ts +2 -2
- package/dist/loop/index.js +7 -5
- package/dist/multiple-versions-warning.d.ts +0 -0
- package/dist/multiple-versions-warning.js +23 -4
- package/dist/nonce.d.ts +0 -0
- package/dist/nonce.js +0 -0
- package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
- package/dist/play-and-handle-not-allowed-error.js +4 -0
- package/dist/portal-node.d.ts +0 -0
- package/dist/portal-node.js +0 -0
- package/dist/prefetch-state.d.ts +8 -0
- package/dist/prefetch-state.js +27 -0
- package/dist/prefetch.d.ts +9 -0
- package/dist/prefetch.js +108 -0
- package/dist/random.d.ts +2 -1
- package/dist/random.js +0 -0
- package/dist/register-root.d.ts +1 -1
- package/dist/register-root.js +3 -0
- package/dist/series/flatten-children.d.ts +1 -1
- package/dist/series/flatten-children.js +0 -0
- package/dist/series/index.d.ts +4 -4
- package/dist/series/index.js +5 -3
- package/dist/setup-env-variables.d.ts +0 -0
- package/dist/setup-env-variables.js +0 -0
- package/dist/spring/index.d.ts +8 -4
- package/dist/spring/index.js +21 -6
- package/dist/spring/measure-spring.d.ts +1 -1
- package/dist/spring/measure-spring.js +1 -1
- package/dist/spring/spring-utils.d.ts +0 -0
- package/dist/spring/spring-utils.js +0 -0
- package/dist/static-file.d.ts +4 -0
- package/dist/static-file.js +10 -0
- package/dist/timeline-position-state.d.ts +1 -1
- package/dist/timeline-position-state.js +0 -0
- package/dist/truthy.d.ts +0 -0
- package/dist/truthy.js +0 -0
- package/dist/{use-frame.d.ts → use-current-frame.d.ts} +0 -1
- package/dist/use-current-frame.js +28 -0
- package/dist/use-lazy-component.d.ts +3 -3
- package/dist/use-lazy-component.js +0 -0
- package/dist/use-media-in-timeline.d.ts +4 -3
- package/dist/use-media-in-timeline.js +15 -8
- package/dist/use-media-playback.d.ts +5 -2
- package/dist/use-media-playback.js +13 -8
- package/dist/use-media-tag-volume.d.ts +1 -1
- package/dist/use-media-tag-volume.js +0 -0
- package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
- package/dist/use-sync-volume-with-media-tag.js +1 -0
- package/dist/use-unsafe-video-config.d.ts +1 -1
- package/dist/use-unsafe-video-config.js +2 -2
- package/dist/use-video-config.d.ts +1 -1
- package/dist/use-video-config.js +10 -1
- package/dist/use-video.d.ts +13 -1
- package/dist/use-video.js +16 -3
- package/dist/validate-media-props.d.ts +3 -3
- package/dist/validate-media-props.js +0 -0
- package/dist/validate-start-from-props.d.ts +0 -0
- package/dist/validate-start-from-props.js +0 -0
- package/dist/validation/validate-composition-id.d.ts +0 -0
- package/dist/validation/validate-composition-id.js +0 -0
- package/dist/validation/validate-dimensions.d.ts +0 -0
- package/dist/validation/validate-dimensions.js +0 -0
- package/dist/validation/validate-duration-in-frames.d.ts +0 -0
- package/dist/validation/validate-duration-in-frames.js +0 -0
- package/dist/validation/validate-folder-name.d.ts +0 -0
- package/dist/validation/validate-folder-name.js +0 -0
- package/dist/validation/validate-fps.d.ts +1 -1
- package/dist/validation/validate-fps.js +4 -1
- package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
- package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
- package/dist/validation/validation-spring-duration.d.ts +1 -0
- package/dist/validation/validation-spring-duration.js +21 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +5 -0
- package/dist/video/NativeVideo.d.ts +5 -0
- package/dist/video/NativeVideo.js +33 -0
- package/dist/video/NativeVideoForRendering.d.ts +8 -0
- package/dist/video/NativeVideoForRendering.js +14 -0
- package/dist/video/OffthreadVideo.d.ts +2 -2
- package/dist/video/OffthreadVideo.js +12 -4
- package/dist/video/OffthreadVideoForRendering.d.ts +1 -1
- package/dist/video/OffthreadVideoForRendering.js +28 -17
- package/dist/video/Video.d.ts +5 -3
- package/dist/video/Video.js +27 -6
- package/dist/video/VideoForDevelopment.d.ts +10 -2
- package/dist/video/VideoForDevelopment.js +75 -7
- package/dist/video/VideoForRendering.d.ts +9 -2
- package/dist/video/VideoForRendering.js +84 -27
- package/dist/video/duration-state.d.ts +17 -0
- package/dist/video/duration-state.js +34 -0
- package/dist/video/get-current-time.d.ts +2 -1
- package/dist/video/get-current-time.js +7 -7
- package/dist/video/index.d.ts +1 -1
- package/dist/video/index.js +0 -0
- package/dist/video/props.d.ts +9 -3
- package/dist/video/props.js +0 -0
- package/dist/video/video-fragment.d.ts +12 -0
- package/dist/video/video-fragment.js +60 -0
- package/dist/video-config.d.ts +0 -0
- package/dist/video-config.js +0 -0
- package/dist/volume-position-state.d.ts +0 -0
- package/dist/volume-position-state.js +0 -0
- package/dist/volume-prop.d.ts +2 -1
- package/dist/volume-prop.js +4 -3
- package/dist/warn-about-non-seekable-media.d.ts +1 -1
- package/dist/warn-about-non-seekable-media.js +14 -2
- package/dist/wrap-remotion-context.d.ts +6 -1
- package/dist/wrap-remotion-context.js +15 -3
- package/package.json +26 -16
- package/.turbo/turbo-build.log +0 -5
- package/dist/AbsoluteFill.d.ts.map +0 -1
- package/dist/AbsoluteFill.js.map +0 -1
- package/dist/Composition.d.ts.map +0 -1
- package/dist/Composition.js.map +0 -1
- package/dist/CompositionManager.d.ts.map +0 -1
- package/dist/CompositionManager.js.map +0 -1
- package/dist/IFrame.d.ts.map +0 -1
- package/dist/IFrame.js.map +0 -1
- package/dist/Img.d.ts.map +0 -1
- package/dist/Img.js.map +0 -1
- package/dist/RemotionRoot.d.ts.map +0 -1
- package/dist/RemotionRoot.js.map +0 -1
- package/dist/Still.d.ts.map +0 -1
- package/dist/Still.js.map +0 -1
- package/dist/absolute-src.d.ts.map +0 -1
- package/dist/absolute-src.js.map +0 -1
- package/dist/asset-types.d.ts.map +0 -1
- package/dist/asset-types.js.map +0 -1
- package/dist/audio/Audio.d.ts.map +0 -1
- package/dist/audio/Audio.js.map +0 -1
- package/dist/audio/AudioForDevelopment.d.ts.map +0 -1
- package/dist/audio/AudioForDevelopment.js.map +0 -1
- package/dist/audio/AudioForRendering.d.ts.map +0 -1
- package/dist/audio/AudioForRendering.js.map +0 -1
- package/dist/audio/index.d.ts.map +0 -1
- package/dist/audio/index.js.map +0 -1
- package/dist/audio/props.d.ts.map +0 -1
- package/dist/audio/props.js.map +0 -1
- package/dist/audio/shared-audio-tags.d.ts.map +0 -1
- package/dist/audio/shared-audio-tags.js.map +0 -1
- package/dist/audio/use-audio-frame.d.ts.map +0 -1
- package/dist/audio/use-audio-frame.js.map +0 -1
- package/dist/bezier.d.ts.map +0 -1
- package/dist/bezier.js.map +0 -1
- package/dist/compress-assets.d.ts +0 -7
- package/dist/compress-assets.d.ts.map +0 -1
- package/dist/compress-assets.js +0 -25
- package/dist/compress-assets.js.map +0 -1
- package/dist/config/browser-executable.d.ts +0 -3
- package/dist/config/browser-executable.d.ts.map +0 -1
- package/dist/config/browser-executable.js +0 -12
- package/dist/config/browser-executable.js.map +0 -1
- package/dist/config/browser.d.ts +0 -4
- package/dist/config/browser.d.ts.map +0 -1
- package/dist/config/browser.js +0 -19
- package/dist/config/browser.js.map +0 -1
- package/dist/config/bundle-out-dir.d.ts +0 -2
- package/dist/config/bundle-out-dir.js +0 -12
- package/dist/config/chromium-flags.d.ts +0 -10
- package/dist/config/chromium-flags.d.ts.map +0 -1
- package/dist/config/chromium-flags.js +0 -34
- package/dist/config/chromium-flags.js.map +0 -1
- package/dist/config/codec.d.ts +0 -17
- package/dist/config/codec.d.ts.map +0 -1
- package/dist/config/codec.js +0 -103
- package/dist/config/codec.js.map +0 -1
- package/dist/config/concurrency.d.ts +0 -3
- package/dist/config/concurrency.d.ts.map +0 -1
- package/dist/config/concurrency.js +0 -15
- package/dist/config/concurrency.js.map +0 -1
- package/dist/config/crf.d.ts +0 -9
- package/dist/config/crf.d.ts.map +0 -1
- package/dist/config/crf.js +0 -83
- package/dist/config/crf.js.map +0 -1
- package/dist/config/env-file.d.ts +0 -2
- package/dist/config/env-file.d.ts.map +0 -1
- package/dist/config/env-file.js +0 -10
- package/dist/config/env-file.js.map +0 -1
- package/dist/config/every-nth-file.d.ts +0 -2
- package/dist/config/every-nth-file.js +0 -12
- package/dist/config/ffmpeg-executable.d.ts +0 -5
- package/dist/config/ffmpeg-executable.d.ts.map +0 -1
- package/dist/config/ffmpeg-executable.js +0 -21
- package/dist/config/ffmpeg-executable.js.map +0 -1
- package/dist/config/frame-range.d.ts +0 -5
- package/dist/config/frame-range.d.ts.map +0 -1
- package/dist/config/frame-range.js +0 -80
- package/dist/config/frame-range.js.map +0 -1
- package/dist/config/image-format.d.ts +0 -8
- package/dist/config/image-format.d.ts.map +0 -1
- package/dist/config/image-format.js +0 -37
- package/dist/config/image-format.js.map +0 -1
- package/dist/config/image-sequence.d.ts +0 -3
- package/dist/config/image-sequence.d.ts.map +0 -1
- package/dist/config/image-sequence.js +0 -15
- package/dist/config/image-sequence.js.map +0 -1
- package/dist/config/index.d.ts +0 -167
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -180
- package/dist/config/index.js.map +0 -1
- package/dist/config/input-props.d.ts.map +0 -1
- package/dist/config/input-props.js.map +0 -1
- package/dist/config/log.d.ts +0 -7
- package/dist/config/log.d.ts.map +0 -1
- package/dist/config/log.js +0 -25
- package/dist/config/log.js.map +0 -1
- package/dist/config/loop.d.ts +0 -3
- package/dist/config/loop.js +0 -15
- package/dist/config/max-timeline-tracks.d.ts +0 -2
- package/dist/config/max-timeline-tracks.d.ts.map +0 -1
- package/dist/config/max-timeline-tracks.js +0 -24
- package/dist/config/max-timeline-tracks.js.map +0 -1
- package/dist/config/override-webpack.d.ts +0 -6
- package/dist/config/override-webpack.d.ts.map +0 -1
- package/dist/config/override-webpack.js +0 -14
- package/dist/config/override-webpack.js.map +0 -1
- package/dist/config/overwrite.d.ts +0 -3
- package/dist/config/overwrite.d.ts.map +0 -1
- package/dist/config/overwrite.js +0 -14
- package/dist/config/overwrite.js.map +0 -1
- package/dist/config/pixel-format.d.ts +0 -8
- package/dist/config/pixel-format.d.ts.map +0 -1
- package/dist/config/pixel-format.js +0 -38
- package/dist/config/pixel-format.js.map +0 -1
- package/dist/config/preview-server.d.ts +0 -2
- package/dist/config/preview-server.d.ts.map +0 -1
- package/dist/config/preview-server.js +0 -20
- package/dist/config/preview-server.js.map +0 -1
- package/dist/config/prores-profile.d.ts +0 -7
- package/dist/config/prores-profile.d.ts.map +0 -1
- package/dist/config/prores-profile.js +0 -32
- package/dist/config/prores-profile.js.map +0 -1
- package/dist/config/public-path.d.ts +0 -2
- package/dist/config/public-path.js +0 -12
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.d.ts.map +0 -1
- package/dist/config/quality.js +0 -17
- package/dist/config/quality.js.map +0 -1
- package/dist/config/scale.d.ts +0 -3
- package/dist/config/scale.d.ts.map +0 -1
- package/dist/config/scale.js +0 -15
- package/dist/config/scale.js.map +0 -1
- package/dist/config/still-frame.d.ts +0 -2
- package/dist/config/still-frame.d.ts.map +0 -1
- package/dist/config/still-frame.js +0 -12
- package/dist/config/still-frame.js.map +0 -1
- package/dist/config/timeout.d.ts +0 -2
- package/dist/config/timeout.d.ts.map +0 -1
- package/dist/config/timeout.js +0 -17
- package/dist/config/timeout.js.map +0 -1
- package/dist/config/webpack-caching.d.ts +0 -3
- package/dist/config/webpack-caching.d.ts.map +0 -1
- package/dist/config/webpack-caching.js +0 -16
- package/dist/config/webpack-caching.js.map +0 -1
- package/dist/default-css.d.ts.map +0 -1
- package/dist/default-css.js.map +0 -1
- package/dist/delay-render.d.ts.map +0 -1
- package/dist/delay-render.js.map +0 -1
- package/dist/easing.d.ts.map +0 -1
- package/dist/easing.js.map +0 -1
- package/dist/feature-flags.d.ts +0 -1
- package/dist/feature-flags.d.ts.map +0 -1
- package/dist/feature-flags.js +0 -7
- package/dist/feature-flags.js.map +0 -1
- package/dist/freeze.d.ts.map +0 -1
- package/dist/freeze.js.map +0 -1
- package/dist/get-asset-file-name.d.ts.map +0 -1
- package/dist/get-asset-file-name.js.map +0 -1
- package/dist/get-environment.d.ts.map +0 -1
- package/dist/get-environment.js.map +0 -1
- package/dist/get-preview-dom-element.d.ts.map +0 -1
- package/dist/get-preview-dom-element.js.map +0 -1
- package/dist/get-timeline-clip-name.d.ts.map +0 -1
- package/dist/get-timeline-clip-name.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initial-frame.d.ts +0 -2
- package/dist/initial-frame.d.ts.map +0 -1
- package/dist/initial-frame.js +0 -12
- package/dist/initial-frame.js.map +0 -1
- package/dist/internals.d.ts.map +0 -1
- package/dist/internals.js.map +0 -1
- package/dist/interpolate.d.ts.map +0 -1
- package/dist/interpolate.js.map +0 -1
- package/dist/interpolateColors.d.ts.map +0 -1
- package/dist/interpolateColors.js.map +0 -1
- package/dist/is-approximately-the-same.d.ts.map +0 -1
- package/dist/is-approximately-the-same.js.map +0 -1
- package/dist/is-audio-codec.d.ts +0 -2
- package/dist/is-audio-codec.d.ts.map +0 -1
- package/dist/is-audio-codec.js +0 -7
- package/dist/is-audio-codec.js.map +0 -1
- package/dist/loop/index.d.ts.map +0 -1
- package/dist/loop/index.js.map +0 -1
- package/dist/multiple-versions-warning.d.ts.map +0 -1
- package/dist/multiple-versions-warning.js.map +0 -1
- package/dist/nonce.d.ts.map +0 -1
- package/dist/nonce.js.map +0 -1
- package/dist/perf/index.d.ts +0 -5
- package/dist/perf/index.d.ts.map +0 -1
- package/dist/perf/index.js +0 -35
- package/dist/perf/index.js.map +0 -1
- package/dist/play-and-handle-not-allowed-error.d.ts.map +0 -1
- package/dist/play-and-handle-not-allowed-error.js.map +0 -1
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js.map +0 -1
- package/dist/register-root.d.ts.map +0 -1
- package/dist/register-root.js.map +0 -1
- package/dist/sequencing/index.d.ts.map +0 -1
- package/dist/sequencing/index.js.map +0 -1
- package/dist/series/flatten-children.d.ts.map +0 -1
- package/dist/series/flatten-children.js.map +0 -1
- package/dist/series/index.d.ts.map +0 -1
- package/dist/series/index.js.map +0 -1
- package/dist/setup-env-variables.d.ts.map +0 -1
- package/dist/setup-env-variables.js.map +0 -1
- package/dist/spring/index.d.ts.map +0 -1
- package/dist/spring/index.js.map +0 -1
- package/dist/spring/measure-spring.d.ts.map +0 -1
- package/dist/spring/measure-spring.js.map +0 -1
- package/dist/spring/spring-utils.d.ts.map +0 -1
- package/dist/spring/spring-utils.js.map +0 -1
- package/dist/static-file.d.ts.map +0 -1
- package/dist/static-file.js.map +0 -1
- package/dist/timeline-inout-position-state.d.ts +0 -12
- package/dist/timeline-inout-position-state.d.ts.map +0 -1
- package/dist/timeline-inout-position-state.js +0 -23
- package/dist/timeline-inout-position-state.js.map +0 -1
- package/dist/timeline-position-state.d.ts.map +0 -1
- package/dist/timeline-position-state.js.map +0 -1
- package/dist/timeout.d.ts +0 -2
- package/dist/timeout.d.ts.map +0 -1
- package/dist/timeout.js +0 -12
- package/dist/timeout.js.map +0 -1
- package/dist/truthy.d.ts.map +0 -1
- package/dist/truthy.js.map +0 -1
- package/dist/use-frame.d.ts.map +0 -1
- package/dist/use-frame.js +0 -25
- package/dist/use-frame.js.map +0 -1
- package/dist/use-lazy-component.d.ts.map +0 -1
- package/dist/use-lazy-component.js.map +0 -1
- package/dist/use-media-in-timeline.d.ts.map +0 -1
- package/dist/use-media-in-timeline.js.map +0 -1
- package/dist/use-media-playback.d.ts.map +0 -1
- package/dist/use-media-playback.js.map +0 -1
- package/dist/use-media-tag-volume.d.ts.map +0 -1
- package/dist/use-media-tag-volume.js.map +0 -1
- package/dist/use-sync-volume-with-media-tag.d.ts.map +0 -1
- package/dist/use-sync-volume-with-media-tag.js.map +0 -1
- package/dist/use-unsafe-video-config.d.ts.map +0 -1
- package/dist/use-unsafe-video-config.js.map +0 -1
- package/dist/use-video-config.d.ts.map +0 -1
- package/dist/use-video-config.js.map +0 -1
- package/dist/use-video.d.ts.map +0 -1
- package/dist/use-video.js.map +0 -1
- package/dist/validate-media-props.d.ts.map +0 -1
- package/dist/validate-media-props.js.map +0 -1
- package/dist/validate-start-from-props.d.ts.map +0 -1
- package/dist/validate-start-from-props.js.map +0 -1
- package/dist/validation/validate-composition-id.d.ts.map +0 -1
- package/dist/validation/validate-composition-id.js.map +0 -1
- package/dist/validation/validate-dimensions.d.ts.map +0 -1
- package/dist/validation/validate-dimensions.js.map +0 -1
- package/dist/validation/validate-duration-in-frames.d.ts.map +0 -1
- package/dist/validation/validate-duration-in-frames.js.map +0 -1
- package/dist/validation/validate-every-nth-frame.d.ts +0 -1
- package/dist/validation/validate-every-nth-frame.js +0 -21
- package/dist/validation/validate-folder-name.d.ts.map +0 -1
- package/dist/validation/validate-folder-name.js.map +0 -1
- package/dist/validation/validate-fps.d.ts.map +0 -1
- package/dist/validation/validate-fps.js.map +0 -1
- package/dist/validation/validate-frame.d.ts +0 -1
- package/dist/validation/validate-frame.d.ts.map +0 -1
- package/dist/validation/validate-frame.js +0 -24
- package/dist/validation/validate-frame.js.map +0 -1
- package/dist/validation/validate-image-format.d.ts +0 -2
- package/dist/validation/validate-image-format.d.ts.map +0 -1
- package/dist/validation/validate-image-format.js +0 -9
- package/dist/validation/validate-image-format.js.map +0 -1
- package/dist/validation/validate-opengl-renderer.d.ts +0 -4
- package/dist/validation/validate-opengl-renderer.d.ts.map +0 -1
- package/dist/validation/validate-opengl-renderer.js +0 -14
- package/dist/validation/validate-opengl-renderer.js.map +0 -1
- package/dist/validation/validate-quality.d.ts +0 -1
- package/dist/validation/validate-quality.d.ts.map +0 -1
- package/dist/validation/validate-quality.js +0 -21
- package/dist/validation/validate-quality.js.map +0 -1
- package/dist/video/Video.d.ts.map +0 -1
- package/dist/video/Video.js.map +0 -1
- package/dist/video/VideoForDevelopment.d.ts.map +0 -1
- package/dist/video/VideoForDevelopment.js.map +0 -1
- package/dist/video/VideoForRendering.d.ts.map +0 -1
- package/dist/video/VideoForRendering.js.map +0 -1
- package/dist/video/get-current-time.d.ts.map +0 -1
- package/dist/video/get-current-time.js.map +0 -1
- package/dist/video/index.d.ts.map +0 -1
- package/dist/video/index.js.map +0 -1
- package/dist/video/props.d.ts.map +0 -1
- package/dist/video/props.js.map +0 -1
- package/dist/video-config.d.ts.map +0 -1
- package/dist/video-config.js.map +0 -1
- package/dist/volume-position-state.d.ts.map +0 -1
- package/dist/volume-position-state.js.map +0 -1
- package/dist/volume-prop.d.ts.map +0 -1
- package/dist/volume-prop.js.map +0 -1
- package/dist/warn-about-non-seekable-media.d.ts.map +0 -1
- package/dist/warn-about-non-seekable-media.js.map +0 -1
- package/dist/wrap-remotion-context.d.ts.map +0 -1
- package/dist/wrap-remotion-context.js.map +0 -1
package/dist/layers.js
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.useLayers = exports.convertComponentTypesToLayersWithCache = exports.convertComponentTypesToLayers = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const inputLayersToLayers = (layers) => {
|
|
29
|
+
return layers.map((layer) => {
|
|
30
|
+
if (layer.type === 'web') {
|
|
31
|
+
return {
|
|
32
|
+
component: react_1.default.lazy(() => Promise.resolve({ default: layer.component })),
|
|
33
|
+
type: 'web',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
// No lazy for Video allowed!
|
|
37
|
+
if (layer.type === 'video') {
|
|
38
|
+
return {
|
|
39
|
+
component: layer.component,
|
|
40
|
+
type: 'video',
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// No lazy for SVG allowed!
|
|
44
|
+
return {
|
|
45
|
+
component: layer.component,
|
|
46
|
+
type: 'svg',
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const convertComponentTypesToLayers = (compProps) => {
|
|
51
|
+
if ('component' in compProps) {
|
|
52
|
+
// In SSR, suspense is not yet supported, we cannot use React.lazy
|
|
53
|
+
if (typeof document === 'undefined') {
|
|
54
|
+
return [
|
|
55
|
+
{
|
|
56
|
+
component: compProps.component,
|
|
57
|
+
type: 'web',
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
return [
|
|
62
|
+
{
|
|
63
|
+
component: react_1.default.lazy(() => Promise.resolve({ default: compProps.component })),
|
|
64
|
+
type: 'web',
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
}
|
|
68
|
+
if ('lazyComponent' in compProps) {
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
component: react_1.default.lazy(compProps.lazyComponent),
|
|
72
|
+
type: 'web',
|
|
73
|
+
},
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
if ('layers' in compProps) {
|
|
77
|
+
return inputLayersToLayers(compProps.layers);
|
|
78
|
+
}
|
|
79
|
+
throw new Error('Unknown component type');
|
|
80
|
+
};
|
|
81
|
+
exports.convertComponentTypesToLayers = convertComponentTypesToLayers;
|
|
82
|
+
const convertComponentTypesToLayersWithCache = (compProps, prevCompProps, prevReturnValue) => {
|
|
83
|
+
if ('component' in compProps) {
|
|
84
|
+
if (prevCompProps &&
|
|
85
|
+
'component' in prevCompProps &&
|
|
86
|
+
compProps.component === prevCompProps.component &&
|
|
87
|
+
prevReturnValue) {
|
|
88
|
+
return prevReturnValue;
|
|
89
|
+
}
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
type: 'web',
|
|
93
|
+
component: react_1.default.lazy(() => Promise.resolve({ default: compProps.component })),
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
if ('lazyComponent' in compProps) {
|
|
98
|
+
if (prevCompProps &&
|
|
99
|
+
'lazyComponent' in prevCompProps &&
|
|
100
|
+
compProps.lazyComponent === prevCompProps.lazyComponent &&
|
|
101
|
+
prevReturnValue) {
|
|
102
|
+
return prevReturnValue;
|
|
103
|
+
}
|
|
104
|
+
return [
|
|
105
|
+
{
|
|
106
|
+
type: 'web',
|
|
107
|
+
component: react_1.default.lazy(compProps.lazyComponent),
|
|
108
|
+
},
|
|
109
|
+
];
|
|
110
|
+
}
|
|
111
|
+
if ('layers' in compProps) {
|
|
112
|
+
const isTheSame = () => {
|
|
113
|
+
if (!prevCompProps) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
if (!('layers' in prevCompProps)) {
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
if (compProps.layers.length !== prevCompProps.layers.length) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
for (let i = 0; i < compProps.layers.length; i++) {
|
|
123
|
+
if (compProps.layers[i].component !== prevCompProps.layers[i].component) {
|
|
124
|
+
return false;
|
|
125
|
+
}
|
|
126
|
+
if (compProps.layers[i].type !== prevCompProps.layers[i].type) {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return true;
|
|
131
|
+
};
|
|
132
|
+
if (isTheSame()) {
|
|
133
|
+
return prevReturnValue;
|
|
134
|
+
}
|
|
135
|
+
return inputLayersToLayers(compProps.layers);
|
|
136
|
+
}
|
|
137
|
+
throw new Error('Unknown component type');
|
|
138
|
+
};
|
|
139
|
+
exports.convertComponentTypesToLayersWithCache = convertComponentTypesToLayersWithCache;
|
|
140
|
+
const useLayers = (compProps) => {
|
|
141
|
+
var _a, _b;
|
|
142
|
+
const prevCompProps = (0, react_1.useRef)();
|
|
143
|
+
const prevLayers = (0, react_1.useRef)();
|
|
144
|
+
const layers = (0, exports.convertComponentTypesToLayersWithCache)(compProps, (_a = prevCompProps.current) !== null && _a !== void 0 ? _a : null, (_b = prevLayers.current) !== null && _b !== void 0 ? _b : null);
|
|
145
|
+
prevCompProps.current = compProps;
|
|
146
|
+
prevLayers.current = layers;
|
|
147
|
+
return layers;
|
|
148
|
+
};
|
|
149
|
+
exports.useLayers = useLayers;
|
|
File without changes
|
|
File without changes
|
package/dist/loop/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { LayoutAndStyle } from '../Sequence';
|
|
2
3
|
export declare type LoopProps = {
|
|
3
4
|
durationInFrames: number;
|
|
4
5
|
times?: number;
|
|
5
|
-
layout?: 'absolute-fill' | 'none';
|
|
6
6
|
name?: string;
|
|
7
7
|
children: React.ReactNode;
|
|
8
|
-
};
|
|
8
|
+
} & LayoutAndStyle;
|
|
9
9
|
export declare const Loop: React.FC<LoopProps>;
|
package/dist/loop/index.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Loop = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const Sequence_1 = require("../Sequence");
|
|
6
|
+
const use_video_config_1 = require("../use-video-config");
|
|
6
7
|
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
7
|
-
const Loop = ({ durationInFrames, times = Infinity, children,
|
|
8
|
-
const { durationInFrames: compDuration } = (0,
|
|
8
|
+
const Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {
|
|
9
|
+
const { durationInFrames: compDuration } = (0, use_video_config_1.useVideoConfig)();
|
|
9
10
|
(0, validate_duration_in_frames_1.validateDurationInFrames)(durationInFrames, 'of the <Loop /> component');
|
|
10
11
|
if (typeof times !== 'number') {
|
|
11
12
|
throw new TypeError(`You passed to "times" an argument of type ${typeof times}, but it must be a number.`);
|
|
@@ -18,10 +19,11 @@ const Loop = ({ durationInFrames, times = Infinity, children, layout, name, }) =
|
|
|
18
19
|
}
|
|
19
20
|
const maxTimes = Math.ceil(compDuration / durationInFrames);
|
|
20
21
|
const actualTimes = Math.min(maxTimes, times);
|
|
22
|
+
const style = props.layout === 'none' ? undefined : props.style;
|
|
21
23
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: new Array(actualTimes).fill(true).map((_, i) => {
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence
|
|
23
25
|
// eslint-disable-next-line react/no-array-index-key
|
|
24
|
-
, { durationInFrames: durationInFrames, from: i * durationInFrames,
|
|
26
|
+
, { durationInFrames: durationInFrames, from: i * durationInFrames, name: name, showLoopTimesInTimeline: actualTimes, showInTimeline: i === 0, layout: props.layout, style: style, children: children }, `loop-${i}`));
|
|
25
27
|
}) }));
|
|
26
28
|
};
|
|
27
29
|
exports.Loop = Loop;
|
|
File without changes
|
|
@@ -1,13 +1,32 @@
|
|
|
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
6
|
const checkMultipleRemotionVersions = () => {
|
|
5
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis === 'undefined') {
|
|
6
8
|
return;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const alreadyImported = globalThis.remotion_imported ||
|
|
11
|
+
(typeof window !== 'undefined' && window.remotion_imported);
|
|
12
|
+
if (alreadyImported) {
|
|
13
|
+
if (typeof window === 'undefined' && alreadyImported === version_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
|
+
}
|
|
18
|
+
throw new TypeError(`🚨 Multiple versions of Remotion detected: ${[
|
|
19
|
+
version_1.VERSION,
|
|
20
|
+
typeof alreadyImported === 'string'
|
|
21
|
+
? alreadyImported
|
|
22
|
+
: 'an older version',
|
|
23
|
+
]
|
|
24
|
+
.filter(truthy_1.truthy)
|
|
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.`);
|
|
26
|
+
}
|
|
27
|
+
globalThis.remotion_imported = version_1.VERSION;
|
|
28
|
+
if (typeof window !== 'undefined') {
|
|
29
|
+
window.remotion_imported = version_1.VERSION;
|
|
10
30
|
}
|
|
11
|
-
window.remotion_imported = true;
|
|
12
31
|
};
|
|
13
32
|
exports.checkMultipleRemotionVersions = checkMultipleRemotionVersions;
|
package/dist/nonce.d.ts
CHANGED
|
File without changes
|
package/dist/nonce.js
CHANGED
|
File without changes
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
export declare const playAndHandleNotAllowedError: (mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>, mediaType: 'audio' | 'video') => void;
|
|
@@ -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);
|
package/dist/portal-node.d.ts
CHANGED
|
File without changes
|
package/dist/portal-node.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare 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,9 @@
|
|
|
1
|
+
export declare const usePreload: (src: string) => string;
|
|
2
|
+
declare type FetchAndPreload = {
|
|
3
|
+
free: () => void;
|
|
4
|
+
waitUntilDone: () => Promise<string>;
|
|
5
|
+
};
|
|
6
|
+
export declare const prefetch: (src: string, options?: {
|
|
7
|
+
method?: 'blob-url' | 'base64';
|
|
8
|
+
}) => FetchAndPreload;
|
|
9
|
+
export {};
|
package/dist/prefetch.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.prefetch = exports.usePreload = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const get_environment_1 = require("./get-environment");
|
|
6
|
+
const prefetch_state_1 = require("./prefetch-state");
|
|
7
|
+
const usePreload = (src) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const preloads = (0, react_1.useContext)(prefetch_state_1.PreloadContext);
|
|
10
|
+
return (_a = preloads[src]) !== null && _a !== void 0 ? _a : src;
|
|
11
|
+
};
|
|
12
|
+
exports.usePreload = usePreload;
|
|
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
|
+
const prefetch = (src, options) => {
|
|
27
|
+
var _a;
|
|
28
|
+
const method = (_a = options === null || options === void 0 ? void 0 : options.method) !== null && _a !== void 0 ? _a : 'blob-url';
|
|
29
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
30
|
+
return {
|
|
31
|
+
free: () => undefined,
|
|
32
|
+
waitUntilDone: () => Promise.resolve(src),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
let canceled = false;
|
|
36
|
+
let objectUrl = null;
|
|
37
|
+
let resolve = () => undefined;
|
|
38
|
+
let reject = () => undefined;
|
|
39
|
+
const waitUntilDone = new Promise((res, rej) => {
|
|
40
|
+
resolve = res;
|
|
41
|
+
reject = rej;
|
|
42
|
+
});
|
|
43
|
+
const controller = new AbortController();
|
|
44
|
+
let canBeAborted = true;
|
|
45
|
+
fetch(src, {
|
|
46
|
+
signal: controller.signal,
|
|
47
|
+
})
|
|
48
|
+
.then((res) => {
|
|
49
|
+
canBeAborted = false;
|
|
50
|
+
if (canceled) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
if (!res.ok) {
|
|
54
|
+
throw new Error(`HTTP error, status = ${res.status}`);
|
|
55
|
+
}
|
|
56
|
+
return res.blob();
|
|
57
|
+
})
|
|
58
|
+
.then((buf) => {
|
|
59
|
+
if (!buf) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (method === 'base64') {
|
|
63
|
+
return blobToBase64(buf);
|
|
64
|
+
}
|
|
65
|
+
return URL.createObjectURL(buf);
|
|
66
|
+
})
|
|
67
|
+
.then((url) => {
|
|
68
|
+
if (canceled) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
objectUrl = url;
|
|
72
|
+
(0, prefetch_state_1.setPreloads)((p) => ({
|
|
73
|
+
...p,
|
|
74
|
+
[src]: objectUrl,
|
|
75
|
+
}));
|
|
76
|
+
resolve(objectUrl);
|
|
77
|
+
})
|
|
78
|
+
.catch((err) => {
|
|
79
|
+
reject(err);
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
free: () => {
|
|
83
|
+
if (objectUrl) {
|
|
84
|
+
if (method === 'blob-url') {
|
|
85
|
+
URL.revokeObjectURL(objectUrl);
|
|
86
|
+
}
|
|
87
|
+
(0, prefetch_state_1.setPreloads)((p) => {
|
|
88
|
+
const copy = { ...p };
|
|
89
|
+
delete copy[src];
|
|
90
|
+
return copy;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
canceled = true;
|
|
95
|
+
if (canBeAborted) {
|
|
96
|
+
try {
|
|
97
|
+
controller.abort();
|
|
98
|
+
}
|
|
99
|
+
catch (e) { }
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
waitUntilDone: () => {
|
|
104
|
+
return waitUntilDone;
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
exports.prefetch = prefetch;
|
package/dist/random.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
export declare type RandomSeed = number | string | null;
|
|
1
2
|
/**
|
|
2
3
|
* A deterministic pseudo-random number generator.
|
|
3
4
|
* Pass in the same seed and get the same pseudorandom number.
|
|
4
5
|
* See: https://remotion.dev/docs/random
|
|
5
6
|
*/
|
|
6
|
-
export declare const random: (seed:
|
|
7
|
+
export declare const random: (seed: RandomSeed, dummy?: unknown) => number;
|
package/dist/random.js
CHANGED
|
File without changes
|
package/dist/register-root.d.ts
CHANGED
package/dist/register-root.js
CHANGED
|
@@ -4,6 +4,9 @@ exports.waitForRoot = exports.getRoot = exports.registerRoot = void 0;
|
|
|
4
4
|
let Root = null;
|
|
5
5
|
let listeners = [];
|
|
6
6
|
const registerRoot = (comp) => {
|
|
7
|
+
if (!comp) {
|
|
8
|
+
throw new Error(`You must pass a React component to registerRoot(), but ${JSON.stringify(comp)} was passed.`);
|
|
9
|
+
}
|
|
7
10
|
if (Root) {
|
|
8
11
|
throw new Error('registerRoot() was called more than once.');
|
|
9
12
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const flattenChildren: (children: React.ReactNode) => (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
|
package/dist/series/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
import { SequenceProps } from '../
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { LayoutAndStyle, SequenceProps } from '../Sequence';
|
|
3
3
|
declare type SeriesSequenceProps = PropsWithChildren<{
|
|
4
4
|
durationInFrames: number;
|
|
5
5
|
offset?: number;
|
|
6
|
-
} & Pick<SequenceProps, 'layout' | 'name'
|
|
7
|
-
declare const SeriesSequence: (
|
|
6
|
+
} & Pick<SequenceProps, 'layout' | 'name'> & LayoutAndStyle>;
|
|
7
|
+
declare const SeriesSequence: import("react").ForwardRefExoticComponent<SeriesSequenceProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const Series: FC<{
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
}> & {
|
package/dist/series/index.js
CHANGED
|
@@ -3,13 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Series = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const Sequence_1 = require("../Sequence");
|
|
7
7
|
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
8
8
|
const flatten_children_1 = require("./flatten-children");
|
|
9
|
-
const
|
|
9
|
+
const SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
10
|
+
// Discard ref
|
|
10
11
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
11
12
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
12
13
|
};
|
|
14
|
+
const SeriesSequence = (0, react_1.forwardRef)(SeriesSequenceRefForwardingFunction);
|
|
13
15
|
const Series = ({ children }) => {
|
|
14
16
|
const childrenValue = (0, react_1.useMemo)(() => {
|
|
15
17
|
let startFrame = 0;
|
|
@@ -45,7 +47,7 @@ const Series = ({ children }) => {
|
|
|
45
47
|
}
|
|
46
48
|
const currentStartFrame = startFrame + offset;
|
|
47
49
|
startFrame += durationInFramesProp + offset;
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, ref: castedChild.ref, children: child }));
|
|
49
51
|
});
|
|
50
52
|
}, [children]);
|
|
51
53
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
File without changes
|
|
File without changes
|
package/dist/spring/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpringConfig } from './spring-utils';
|
|
1
|
+
import type { SpringConfig } from './spring-utils';
|
|
2
2
|
/**
|
|
3
3
|
* Calculates a position based on physical parameters, start and end value, and time.
|
|
4
4
|
* @link https://www.remotion.dev/docs/spring
|
|
@@ -9,15 +9,19 @@ import { SpringConfig } from './spring-utils';
|
|
|
9
9
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
10
10
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
11
11
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
12
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
13
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
12
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
13
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
14
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
15
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
14
16
|
*/
|
|
15
|
-
export declare function spring({ frame, fps, config, from, to, }: {
|
|
17
|
+
export declare function spring({ frame, fps, config, from, to, durationInFrames, durationRestThreshold, }: {
|
|
16
18
|
frame: number;
|
|
17
19
|
fps: number;
|
|
18
20
|
config?: Partial<SpringConfig>;
|
|
19
21
|
from?: number;
|
|
20
22
|
to?: number;
|
|
23
|
+
durationInFrames?: number;
|
|
24
|
+
durationRestThreshold?: number;
|
|
21
25
|
}): number;
|
|
22
26
|
export { measureSpring } from './measure-spring';
|
|
23
27
|
export { SpringConfig } from './spring-utils';
|
package/dist/spring/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.measureSpring = exports.spring = void 0;
|
|
4
|
+
const validation_spring_duration_1 = require("../validation/validation-spring-duration");
|
|
5
|
+
const measure_spring_1 = require("./measure-spring");
|
|
4
6
|
const spring_utils_1 = require("./spring-utils");
|
|
5
7
|
/**
|
|
6
8
|
* Calculates a position based on physical parameters, start and end value, and time.
|
|
@@ -12,13 +14,26 @@ const spring_utils_1 = require("./spring-utils");
|
|
|
12
14
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
13
15
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
14
16
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
15
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
16
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
17
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
18
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
19
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
20
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
17
21
|
*/
|
|
18
|
-
function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
22
|
+
function spring({ frame, fps, config = {}, from = 0, to = 1, durationInFrames, durationRestThreshold, }) {
|
|
23
|
+
(0, validation_spring_duration_1.validateSpringDuration)(durationInFrames);
|
|
24
|
+
const durationRatio = durationInFrames === undefined
|
|
25
|
+
? 1
|
|
26
|
+
: durationInFrames /
|
|
27
|
+
(0, measure_spring_1.measureSpring)({
|
|
28
|
+
fps,
|
|
29
|
+
config,
|
|
30
|
+
from,
|
|
31
|
+
to,
|
|
32
|
+
threshold: durationRestThreshold,
|
|
33
|
+
});
|
|
19
34
|
const spr = (0, spring_utils_1.springCalculation)({
|
|
20
35
|
fps,
|
|
21
|
-
frame,
|
|
36
|
+
frame: frame / durationRatio,
|
|
22
37
|
config,
|
|
23
38
|
from,
|
|
24
39
|
to,
|
|
@@ -32,5 +47,5 @@ function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
|
32
47
|
return Math.max(spr.current, to);
|
|
33
48
|
}
|
|
34
49
|
exports.spring = spring;
|
|
35
|
-
var
|
|
36
|
-
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return
|
|
50
|
+
var measure_spring_2 = require("./measure-spring");
|
|
51
|
+
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return measure_spring_2.measureSpring; } });
|
|
@@ -22,7 +22,7 @@ function measureSpring({ fps, config = {}, threshold = 0.005, from = 0, to = 1,
|
|
|
22
22
|
if (threshold < 0) {
|
|
23
23
|
throw new TypeError('Threshold is below 0');
|
|
24
24
|
}
|
|
25
|
-
(0, validate_fps_1.validateFps)(fps, 'to the measureSpring() function');
|
|
25
|
+
(0, validate_fps_1.validateFps)(fps, 'to the measureSpring() function', false);
|
|
26
26
|
const range = Math.abs(from - to);
|
|
27
27
|
let frame = 0;
|
|
28
28
|
let finishedFrame = 0;
|
|
File without changes
|
|
File without changes
|
package/dist/static-file.d.ts
CHANGED
package/dist/static-file.js
CHANGED
|
@@ -13,7 +13,17 @@ const inner = (path) => {
|
|
|
13
13
|
}
|
|
14
14
|
return `/${trimLeadingSlash(path)}`;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Reference a file from the public/ folder.
|
|
18
|
+
* If the file does not appear in the autocomplete, type the path manually.
|
|
19
|
+
*/
|
|
16
20
|
const staticFile = (path) => {
|
|
21
|
+
if (path.startsWith('http://') || path.startsWith('https://')) {
|
|
22
|
+
throw new TypeError(`staticFile() does not support remote URLs - got "${path}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);
|
|
23
|
+
}
|
|
24
|
+
if (path.startsWith('..') || path.startsWith('./')) {
|
|
25
|
+
throw new TypeError(`staticFile() does not support relative paths - got "${path}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);
|
|
26
|
+
}
|
|
17
27
|
const preparsed = inner(path);
|
|
18
28
|
if (!preparsed.startsWith('/')) {
|
|
19
29
|
return `/${preparsed}`;
|
|
File without changes
|
package/dist/truthy.d.ts
CHANGED
|
File without changes
|
package/dist/truthy.js
CHANGED
|
File without changes
|