remotion 4.0.0-alpha.4 → 4.0.0-alpha11
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 +32 -21
- package/dist/cjs/AbsoluteFill.d.ts +6 -0
- package/dist/{AbsoluteFill.js → cjs/AbsoluteFill.js} +7 -7
- package/dist/{CanUseRemotionHooks.d.ts → cjs/CanUseRemotionHooks.d.ts} +0 -0
- package/dist/{CanUseRemotionHooks.js → cjs/CanUseRemotionHooks.js} +0 -0
- package/dist/cjs/Clipper.d.ts +7 -0
- package/dist/cjs/Clipper.js +24 -0
- package/dist/cjs/Composition.d.ts +41 -0
- package/dist/cjs/Composition.js +132 -0
- package/dist/cjs/CompositionManager.d.ts +75 -0
- package/dist/{CompositionManager.js → cjs/CompositionManager.js} +34 -27
- package/dist/cjs/CompositionManagerContext.d.ts +24 -0
- package/dist/cjs/CompositionManagerContext.js +22 -0
- package/dist/cjs/EditorProps.d.ts +15 -0
- package/dist/cjs/EditorProps.js +53 -0
- package/dist/{Folder.d.ts → cjs/Folder.d.ts} +4 -0
- package/dist/{Folder.js → cjs/Folder.js} +10 -6
- package/dist/{IFrame.d.ts → cjs/IFrame.d.ts} +4 -0
- package/dist/{IFrame.js → cjs/IFrame.js} +8 -4
- package/dist/cjs/Img.d.ts +9 -0
- package/dist/cjs/Img.js +100 -0
- package/dist/cjs/NativeLayers.d.ts +13 -0
- package/dist/cjs/NativeLayers.js +29 -0
- package/dist/cjs/Null.d.ts +2 -0
- package/dist/cjs/Null.js +25 -0
- package/dist/{RemotionRoot.d.ts → cjs/RemotionRoot.d.ts} +1 -0
- package/dist/cjs/RemotionRoot.js +72 -0
- package/dist/cjs/ResolveCompositionConfig.d.ts +22 -0
- package/dist/cjs/ResolveCompositionConfig.js +171 -0
- package/dist/cjs/Sequence.d.ts +22 -0
- package/dist/{Sequence.js → cjs/Sequence.js} +41 -41
- package/dist/cjs/SequenceContext.d.ts +9 -0
- package/dist/cjs/SequenceContext.js +5 -0
- package/dist/cjs/Still.d.ts +8 -0
- package/dist/cjs/Still.js +22 -0
- package/dist/{absolute-src.d.ts → cjs/absolute-src.d.ts} +0 -0
- package/dist/{absolute-src.js → cjs/absolute-src.js} +0 -0
- package/dist/{asset-types.d.ts → cjs/asset-types.d.ts} +0 -0
- package/dist/{asset-types.js → cjs/asset-types.js} +0 -0
- package/dist/cjs/audio/Audio.d.ts +12 -0
- package/dist/cjs/audio/Audio.js +58 -0
- package/dist/cjs/audio/AudioForDevelopment.d.ts +11 -0
- package/dist/cjs/audio/AudioForDevelopment.js +101 -0
- package/dist/cjs/audio/AudioForRendering.d.ts +10 -0
- package/dist/cjs/audio/AudioForRendering.js +111 -0
- package/dist/cjs/audio/index.d.ts +2 -0
- package/dist/{audio → cjs/audio}/index.js +2 -2
- package/dist/{audio → cjs/audio}/props.d.ts +4 -2
- package/dist/{audio → cjs/audio}/props.js +0 -0
- package/dist/{audio → cjs/audio}/shared-audio-tags.d.ts +8 -2
- package/dist/{audio → cjs/audio}/shared-audio-tags.js +63 -15
- package/dist/{audio → cjs/audio}/use-audio-frame.d.ts +0 -0
- package/dist/{audio → cjs/audio}/use-audio-frame.js +4 -4
- package/dist/{bezier.d.ts → cjs/bezier.d.ts} +0 -0
- package/dist/{bezier.js → cjs/bezier.js} +0 -0
- package/dist/cjs/cancel-render.d.ts +5 -0
- package/dist/cjs/cancel-render.js +47 -0
- package/dist/{config → cjs/config}/input-props.d.ts +0 -0
- package/dist/{config → cjs/config}/input-props.js +3 -3
- package/dist/cjs/config.d.ts +294 -0
- package/dist/{config.js → cjs/config.js} +4 -4
- package/dist/{default-css.d.ts → cjs/default-css.d.ts} +0 -0
- package/dist/{default-css.js → cjs/default-css.js} +0 -0
- package/dist/{delay-render.d.ts → cjs/delay-render.d.ts} +4 -4
- package/dist/{delay-render.js → cjs/delay-render.js} +12 -12
- package/dist/{easing.d.ts → cjs/easing.d.ts} +4 -0
- package/dist/{easing.js → cjs/easing.js} +6 -2
- package/dist/{freeze.d.ts → cjs/freeze.d.ts} +4 -0
- package/dist/{freeze.js → cjs/freeze.js} +8 -4
- package/dist/{get-asset-file-name.d.ts → cjs/get-asset-file-name.d.ts} +0 -0
- package/dist/{get-asset-file-name.js → cjs/get-asset-file-name.js} +0 -0
- package/dist/{get-environment.d.ts → cjs/get-environment.d.ts} +1 -0
- package/dist/{get-environment.js → cjs/get-environment.js} +14 -2
- package/dist/cjs/get-preview-dom-element.d.ts +2 -0
- package/dist/cjs/get-preview-dom-element.js +8 -0
- package/dist/cjs/get-static-files.d.ts +21 -0
- package/dist/cjs/get-static-files.js +35 -0
- package/dist/{get-timeline-clip-name.d.ts → cjs/get-timeline-clip-name.d.ts} +0 -0
- package/dist/{get-timeline-clip-name.js → cjs/get-timeline-clip-name.js} +2 -1
- package/dist/cjs/index.d.ts +101 -0
- package/dist/cjs/index.js +105 -0
- package/dist/cjs/internals.d.ts +129 -0
- package/dist/cjs/internals.js +116 -0
- package/dist/{interpolate-colors.d.ts → cjs/interpolate-colors.d.ts} +5 -0
- package/dist/{interpolate-colors.js → cjs/interpolate-colors.js} +10 -10
- package/dist/{interpolate.d.ts → cjs/interpolate.d.ts} +11 -7
- package/dist/{interpolate.js → cjs/interpolate.js} +0 -0
- package/dist/{is-approximately-the-same.d.ts → cjs/is-approximately-the-same.d.ts} +0 -0
- package/dist/{is-approximately-the-same.js → cjs/is-approximately-the-same.js} +0 -0
- package/dist/cjs/is-player.d.ts +3 -0
- package/dist/cjs/is-player.js +14 -0
- package/dist/{loading-indicator.d.ts → cjs/loading-indicator.d.ts} +0 -0
- package/dist/{loading-indicator.js → cjs/loading-indicator.js} +4 -4
- package/dist/cjs/loop/index.d.ts +13 -0
- package/dist/cjs/loop/index.js +46 -0
- package/dist/{multiple-versions-warning.d.ts → cjs/multiple-versions-warning.d.ts} +0 -0
- package/dist/cjs/multiple-versions-warning.js +32 -0
- package/dist/{nonce.d.ts → cjs/nonce.d.ts} +0 -0
- package/dist/{nonce.js → cjs/nonce.js} +0 -0
- package/dist/{play-and-handle-not-allowed-error.d.ts → cjs/play-and-handle-not-allowed-error.d.ts} +0 -0
- package/dist/{play-and-handle-not-allowed-error.js → cjs/play-and-handle-not-allowed-error.js} +4 -0
- package/dist/{portal-node.d.ts → cjs/portal-node.d.ts} +0 -0
- package/dist/{portal-node.js → cjs/portal-node.js} +0 -0
- package/dist/cjs/prefetch-state.d.ts +8 -0
- package/dist/cjs/prefetch-state.js +27 -0
- package/dist/cjs/prefetch.d.ts +13 -0
- package/dist/cjs/prefetch.js +112 -0
- package/dist/cjs/props-if-has-props.d.ts +10 -0
- package/dist/{video-config.js → cjs/props-if-has-props.js} +0 -0
- package/dist/cjs/random.d.ts +6 -0
- package/dist/{random.js → cjs/random.js} +3 -3
- package/dist/{register-root.d.ts → cjs/register-root.d.ts} +4 -0
- package/dist/{register-root.js → cjs/register-root.js} +7 -0
- package/dist/cjs/resolve-video-config.d.ts +8 -0
- package/dist/cjs/resolve-video-config.js +76 -0
- package/dist/cjs/series/flatten-children.d.ts +2 -0
- package/dist/{series → cjs/series}/flatten-children.js +0 -0
- package/dist/cjs/series/index.d.ts +17 -0
- package/dist/{series → cjs/series}/index.js +22 -8
- package/dist/{setup-env-variables.d.ts → cjs/setup-env-variables.d.ts} +0 -0
- package/dist/{setup-env-variables.js → cjs/setup-env-variables.js} +3 -3
- package/dist/{spring → cjs/spring}/index.d.ts +10 -6
- package/dist/cjs/spring/index.js +75 -0
- package/dist/cjs/spring/measure-spring.d.ts +12 -0
- package/dist/{spring → cjs/spring}/measure-spring.js +8 -4
- package/dist/{spring → cjs/spring}/spring-utils.d.ts +0 -0
- package/dist/{spring → cjs/spring}/spring-utils.js +0 -0
- package/dist/cjs/static-file.d.ts +33 -0
- package/dist/cjs/static-file.js +87 -0
- package/dist/{timeline-position-state.d.ts → cjs/timeline-position-state.d.ts} +0 -0
- package/dist/{timeline-position-state.js → cjs/timeline-position-state.js} +9 -1
- package/dist/{truthy.d.ts → cjs/truthy.d.ts} +0 -0
- package/dist/{truthy.js → cjs/truthy.js} +0 -0
- package/dist/cjs/use-current-frame.d.ts +5 -0
- package/dist/{use-current-frame.js → cjs/use-current-frame.js} +9 -15
- package/dist/{use-lazy-component.d.ts → cjs/use-lazy-component.d.ts} +2 -2
- package/dist/{use-lazy-component.js → cjs/use-lazy-component.js} +0 -0
- package/dist/{use-media-in-timeline.d.ts → cjs/use-media-in-timeline.d.ts} +3 -2
- package/dist/{use-media-in-timeline.js → cjs/use-media-in-timeline.js} +34 -27
- package/dist/{use-media-playback.d.ts → cjs/use-media-playback.d.ts} +3 -1
- package/dist/cjs/use-media-playback.js +86 -0
- package/dist/{use-media-tag-volume.d.ts → cjs/use-media-tag-volume.d.ts} +0 -0
- package/dist/{use-media-tag-volume.js → cjs/use-media-tag-volume.js} +0 -0
- package/dist/{use-sync-volume-with-media-tag.d.ts → cjs/use-sync-volume-with-media-tag.d.ts} +1 -1
- package/dist/{use-sync-volume-with-media-tag.js → cjs/use-sync-volume-with-media-tag.js} +5 -4
- package/dist/{use-unsafe-video-config.d.ts → cjs/use-unsafe-video-config.d.ts} +1 -1
- package/dist/{use-unsafe-video-config.js → cjs/use-unsafe-video-config.js} +4 -4
- package/dist/cjs/use-video-config.d.ts +8 -0
- package/dist/cjs/use-video-config.js +34 -0
- package/dist/cjs/use-video.d.ts +7 -0
- package/dist/cjs/use-video.js +38 -0
- package/dist/cjs/validate-frame.d.ts +5 -0
- package/dist/{validation → cjs}/validate-frame.js +5 -5
- package/dist/cjs/validate-media-props.d.ts +4 -0
- package/dist/{validate-media-props.js → cjs/validate-media-props.js} +0 -0
- package/dist/{validate-start-from-props.d.ts → cjs/validate-start-from-props.d.ts} +0 -0
- package/dist/{validate-start-from-props.js → cjs/validate-start-from-props.js} +0 -0
- package/dist/{validation → cjs/validation}/validate-composition-id.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validate-composition-id.js +0 -0
- package/dist/cjs/validation/validate-default-props.d.ts +1 -0
- package/dist/cjs/validation/validate-default-props.js +15 -0
- package/dist/{validation → cjs/validation}/validate-dimensions.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validate-dimensions.js +0 -0
- package/dist/cjs/validation/validate-duration-in-frames.d.ts +5 -0
- package/dist/{validation → cjs/validation}/validate-duration-in-frames.js +5 -2
- package/dist/{validation → cjs/validation}/validate-folder-name.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validate-folder-name.js +0 -0
- package/dist/{validation → cjs/validation}/validate-fps.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validate-fps.js +1 -1
- package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.js +0 -0
- package/dist/{validation → cjs/validation}/validation-spring-duration.d.ts +0 -0
- package/dist/{validation → cjs/validation}/validation-spring-duration.js +0 -0
- package/dist/cjs/version.d.ts +1 -0
- package/dist/cjs/version.js +5 -0
- package/dist/cjs/video/OffthreadVideo.d.ts +7 -0
- package/dist/cjs/video/OffthreadVideo.js +38 -0
- package/dist/{video → cjs/video}/OffthreadVideoForRendering.d.ts +1 -1
- package/dist/cjs/video/OffthreadVideoForRendering.js +103 -0
- package/dist/cjs/video/Video.d.ts +12 -0
- package/dist/cjs/video/Video.js +55 -0
- package/dist/cjs/video/VideoForDevelopment.d.ts +11 -0
- package/dist/cjs/video/VideoForDevelopment.js +117 -0
- package/dist/cjs/video/VideoForRendering.d.ts +10 -0
- package/dist/cjs/video/VideoForRendering.js +208 -0
- package/dist/cjs/video/duration-state.d.ts +17 -0
- package/dist/cjs/video/duration-state.js +35 -0
- package/dist/{video → cjs/video}/get-current-time.d.ts +0 -0
- package/dist/{video → cjs/video}/get-current-time.js +12 -11
- package/dist/cjs/video/index.d.ts +3 -0
- package/dist/{video → cjs/video}/index.js +4 -4
- package/dist/{video → cjs/video}/props.d.ts +16 -5
- package/dist/cjs/video/props.js +2 -0
- package/dist/cjs/video/video-fragment.d.ts +12 -0
- package/dist/cjs/video/video-fragment.js +60 -0
- package/dist/{video-config.d.ts → cjs/video-config.d.ts} +1 -1
- package/dist/{video/props.js → cjs/video-config.js} +0 -0
- package/dist/{volume-position-state.d.ts → cjs/volume-position-state.d.ts} +0 -0
- package/dist/{volume-position-state.js → cjs/volume-position-state.js} +0 -0
- package/dist/{volume-prop.d.ts → cjs/volume-prop.d.ts} +2 -1
- package/dist/{volume-prop.js → cjs/volume-prop.js} +4 -3
- package/dist/{warn-about-non-seekable-media.d.ts → cjs/warn-about-non-seekable-media.d.ts} +0 -0
- package/dist/{warn-about-non-seekable-media.js → cjs/warn-about-non-seekable-media.js} +2 -2
- package/dist/cjs/wrap-remotion-context.d.ts +29 -0
- package/dist/cjs/wrap-remotion-context.js +77 -0
- package/dist/esm/index.mjs +4562 -0
- package/dist/esm/version.mjs +4 -0
- package/package.json +80 -57
- package/version.js +2 -0
- package/.prettierrc.js +0 -14
- package/.turbo/turbo-build.log +0 -5
- package/dist/AbsoluteFill.d.ts +0 -7
- package/dist/AbsoluteFill.d.ts.map +0 -1
- package/dist/AbsoluteFill.js.map +0 -1
- package/dist/Composition.d.ts +0 -22
- package/dist/Composition.d.ts.map +0 -1
- package/dist/Composition.js +0 -98
- package/dist/Composition.js.map +0 -1
- package/dist/CompositionManager.d.ts +0 -76
- 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 +0 -2
- package/dist/Img.d.ts.map +0 -1
- package/dist/Img.js +0 -45
- package/dist/Img.js.map +0 -1
- package/dist/RemotionRoot.d.ts.map +0 -1
- package/dist/RemotionRoot.js +0 -70
- package/dist/RemotionRoot.js.map +0 -1
- package/dist/Sequence.d.ts +0 -25
- package/dist/Still.d.ts +0 -3
- package/dist/Still.d.ts.map +0 -1
- package/dist/Still.js +0 -9
- 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 +0 -6
- package/dist/audio/Audio.d.ts.map +0 -1
- package/dist/audio/Audio.js +0 -32
- package/dist/audio/Audio.js.map +0 -1
- package/dist/audio/AudioForDevelopment.d.ts +0 -7
- package/dist/audio/AudioForDevelopment.d.ts.map +0 -1
- package/dist/audio/AudioForDevelopment.js +0 -68
- package/dist/audio/AudioForDevelopment.js.map +0 -1
- package/dist/audio/AudioForRendering.d.ts +0 -3
- package/dist/audio/AudioForRendering.d.ts.map +0 -1
- package/dist/audio/AudioForRendering.js +0 -68
- package/dist/audio/AudioForRendering.js.map +0 -1
- package/dist/audio/index.d.ts +0 -2
- 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/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 -16
- package/dist/config/codec.d.ts.map +0 -1
- package/dist/config/codec.js +0 -109
- 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 -12
- 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-frame.d.ts +0 -3
- package/dist/config/every-nth-frame.js +0 -20
- 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 -178
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -193
- 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/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/number-of-gif-loops.d.ts +0 -4
- package/dist/config/number-of-gif-loops.js +0 -21
- 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/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/config.d.ts +0 -188
- package/dist/default-css.d.ts.map +0 -1
- package/dist/default-css.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 +0 -1
- package/dist/get-preview-dom-element.d.ts.map +0 -1
- package/dist/get-preview-dom-element.js +0 -7
- 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 +0 -61
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -55
- package/dist/index.js.map +0 -1
- package/dist/initial-frame.d.ts +0 -3
- package/dist/initial-frame.d.ts.map +0 -1
- package/dist/initial-frame.js +0 -13
- package/dist/initial-frame.js.map +0 -1
- package/dist/internals.d.ts +0 -74
- package/dist/internals.d.ts.map +0 -1
- package/dist/internals.js +0 -93
- 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 +0 -6
- package/dist/interpolateColors.d.ts.map +0 -1
- package/dist/interpolateColors.js +0 -401
- 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 +0 -9
- package/dist/loop/index.d.ts.map +0 -1
- package/dist/loop/index.js +0 -27
- package/dist/loop/index.js.map +0 -1
- package/dist/multiple-versions-warning.d.ts.map +0 -1
- package/dist/multiple-versions-warning.js +0 -13
- 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 +0 -6
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js.map +0 -1
- package/dist/ready-manager.d.ts +0 -15
- package/dist/ready-manager.d.ts.map +0 -1
- package/dist/ready-manager.js +0 -78
- package/dist/ready-manager.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 +0 -20
- package/dist/sequencing/index.d.ts.map +0 -1
- package/dist/sequencing/index.js +0 -124
- package/dist/sequencing/index.js.map +0 -1
- package/dist/series/flatten-children.d.ts +0 -2
- 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 +0 -13
- 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 +0 -51
- package/dist/spring/index.js.map +0 -1
- package/dist/spring/measure-spring.d.ts +0 -8
- 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 +0 -1
- package/dist/static-file.d.ts.map +0 -1
- package/dist/static-file.js +0 -23
- 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-current-frame.d.ts +0 -7
- package/dist/use-frame.d.ts +0 -8
- package/dist/use-frame.d.ts.map +0 -1
- package/dist/use-frame.js +0 -26
- 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 +0 -75
- 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 +0 -7
- package/dist/use-video-config.d.ts.map +0 -1
- package/dist/use-video-config.js +0 -26
- package/dist/use-video-config.js.map +0 -1
- package/dist/use-video.d.ts +0 -1
- package/dist/use-video.d.ts.map +0 -1
- package/dist/use-video.js +0 -15
- package/dist/use-video.js.map +0 -1
- package/dist/validate-media-props.d.ts +0 -4
- 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 +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-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.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/OffthreadVideo.d.ts +0 -3
- package/dist/video/OffthreadVideo.js +0 -27
- package/dist/video/OffthreadVideoForRendering.js +0 -95
- package/dist/video/Video.d.ts +0 -6
- package/dist/video/Video.d.ts.map +0 -1
- package/dist/video/Video.js +0 -29
- package/dist/video/Video.js.map +0 -1
- package/dist/video/VideoForDevelopment.d.ts +0 -7
- package/dist/video/VideoForDevelopment.d.ts.map +0 -1
- package/dist/video/VideoForDevelopment.js +0 -46
- package/dist/video/VideoForDevelopment.js.map +0 -1
- package/dist/video/VideoForRendering.d.ts +0 -3
- package/dist/video/VideoForRendering.d.ts.map +0 -1
- package/dist/video/VideoForRendering.js +0 -149
- 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 +0 -3
- 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 +0 -14
- package/dist/wrap-remotion-context.d.ts.map +0 -1
- package/dist/wrap-remotion-context.js +0 -65
- package/dist/wrap-remotion-context.js.map +0 -1
- package/tsconfig.json +0 -12
package/LICENSE.md
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
# Remotion License
|
|
2
2
|
|
|
3
|
-
Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion create videos for free (even commercial), while a company license is required for for-profit
|
|
3
|
+
Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
|
|
4
4
|
|
|
5
5
|
- [Free license](#free-license)
|
|
6
6
|
- [Company license](#company-license)
|
|
7
7
|
|
|
8
8
|
## Free license
|
|
9
9
|
|
|
10
|
-
Copyright ©
|
|
10
|
+
Copyright © 2023 [Remotion](https://www.remotion.dev/)
|
|
11
11
|
|
|
12
12
|
### Eligibility
|
|
13
13
|
|
|
14
14
|
You are eligible to use Remotion for free if you are:
|
|
15
15
|
|
|
16
16
|
- an individual
|
|
17
|
-
- a for-profit
|
|
18
|
-
- a non-profit or not-for-profit
|
|
17
|
+
- a for-profit organization with up to 3 employees
|
|
18
|
+
- a non-profit or not-for-profit organization
|
|
19
19
|
- evaluating whether Remotion is a good fit, and are not yet using it in a commercial way
|
|
20
20
|
|
|
21
21
|
### Allowed use cases
|
|
22
22
|
|
|
23
|
-
Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify
|
|
23
|
+
Permission is hereby granted, free of charge, to any person eligible for the "Free license", to use the software non-commercially or commercially for the purpose of creating videos and images and to modify the software to their own liking, for the purpose of fulfilling their custom use case or to contribute bug fixes or improvements back to Remotion.
|
|
24
24
|
|
|
25
25
|
### Disallowed use cases
|
|
26
26
|
|
|
27
|
-
It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, sublicensing your own derivate of Remotion.
|
|
27
|
+
It is not allowed to copy or modify Remotion code for the purpose of selling, renting, licensing, relicensing, or sublicensing your own derivate of Remotion.
|
|
28
28
|
|
|
29
29
|
### Warranty notice
|
|
30
30
|
|
|
31
|
-
The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and
|
|
31
|
+
The software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
|
|
32
32
|
|
|
33
33
|
### Support
|
|
34
34
|
|
|
@@ -36,6 +36,6 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
|
36
36
|
|
|
37
37
|
## Company license
|
|
38
38
|
|
|
39
|
-
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support.
|
|
39
|
+
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
|
|
40
40
|
|
|
41
41
|
Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
|
package/README.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
<a href="https://github.com/remotion-dev/logo">
|
|
3
|
-
<
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-dark.gif">
|
|
5
|
+
<img alt="Animated Remotion Logo" src="https://github.com/remotion-dev/logo/raw/main/animated-logo-banner-light.gif">
|
|
6
|
+
</picture>
|
|
4
7
|
</a>
|
|
5
8
|
</p>
|
|
6
9
|
|
|
7
|
-
[](https://npmcharts.com/compare/remotion?minimal=true)
|
|
10
|
-
[](https://remotion.dev/discord)
|
|
11
|
+
[](https://www.npmjs.org/package/remotion)
|
|
12
|
+
[](https://npmcharts.com/compare/remotion?minimal=true)
|
|
13
|
+
[](https://github.com/remotion-dev/remotion/issues?q=is%3Aopen+label%3A%22%F0%9F%92%8E+Bounty%22+sort%3Aupdated-desc)
|
|
14
|
+
<a href="https://twitter.com/remotion"><img src="https://img.shields.io/twitter/follow/remotion?label=Twitter&color=black" alt="Twitter"></a>
|
|
11
15
|
|
|
12
|
-
Remotion is a
|
|
16
|
+
Remotion is a framework for **creating videos programmatically using React.**
|
|
13
17
|
|
|
14
18
|
## Why create videos in React?
|
|
15
19
|
|
|
@@ -17,35 +21,42 @@ Remotion is a suite of libraries building a foundation for **creating videos pro
|
|
|
17
21
|
- **Leverage programming**: Use variables, functions, APIs, math and algorithms to create new effects
|
|
18
22
|
- **Leverage React**: Reusable components, Powerful composition, Fast Refresh, Package ecosystem
|
|
19
23
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
## Created with Remotion
|
|
25
|
+
|
|
26
|
+
<table>
|
|
27
|
+
<tr>
|
|
28
|
+
<td align="center">
|
|
29
|
+
<img style="width: 290px" src="packages/docs/static/img/fireship-quick.gif" />
|
|
30
|
+
<p>"This video was made with code" <em>- Fireship</em> <a href="https://youtu.be/deg8bOoziaE">Watch</a> • <a href="https://github.com/wcandillon/remotion-fireship">Source</a></p>
|
|
31
|
+
</td>
|
|
32
|
+
<td align="center">
|
|
33
|
+
<img style="width: 240px" src="packages/docs/static/img/unwrapped-2022.gif" />
|
|
34
|
+
<p>GitHub Unwrapped - Personalized Year in Review <a href="https://www.githubunwrapped.com">Try</a> • <a href="https://github.com/remotion-dev/github-unwrapped-2022">Source</a></p>
|
|
35
|
+
</td>
|
|
36
|
+
<td align="center">
|
|
37
|
+
<em>View more in the <a href="https://remotion.dev/showcase">Remotion Showcase</a>!</em>
|
|
38
|
+
</td>
|
|
39
|
+
</tr>
|
|
40
|
+
</table>
|
|
31
41
|
|
|
32
42
|
## Get started
|
|
33
43
|
|
|
34
|
-
If you already have
|
|
44
|
+
If you already have Node.JS installed, type
|
|
35
45
|
|
|
36
46
|
```console
|
|
37
|
-
|
|
47
|
+
npm init video
|
|
38
48
|
```
|
|
39
49
|
|
|
40
50
|
to get started. Otherwise, read the [installation page](https://www.remotion.dev/docs/) in the documentation.
|
|
41
51
|
|
|
42
52
|
## Documentation
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
Documentation: [**remotion.dev/docs**](https://www.remotion.dev/docs)
|
|
55
|
+
API Reference: [**remotion.dev/api**](https://www.remotion.dev/api)
|
|
45
56
|
|
|
46
57
|
## License
|
|
47
58
|
|
|
48
|
-
Be aware of that Remotion has a special license and requires obtaining a company license in some cases. Read the [LICENSE](LICENSE.md)
|
|
59
|
+
Be aware of that Remotion has a special license and requires obtaining a company license in some cases. Read the [LICENSE](LICENSE.md) page for more information.
|
|
49
60
|
|
|
50
61
|
## Contributing
|
|
51
62
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @description An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
4
|
+
* @see [Documentation](https://www.remotion.dev/docs/absolute-fill)
|
|
5
|
+
*/
|
|
6
|
+
export declare const AbsoluteFill: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,11 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AbsoluteFill = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
|
|
7
|
-
* An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
8
|
-
* @link https://www.remotion.dev/docs/absolute-fill
|
|
9
|
-
*/
|
|
10
|
-
const AbsoluteFill = (props) => {
|
|
6
|
+
const AbsoluteFillRefForwarding = (props, ref) => {
|
|
11
7
|
const { style, ...other } = props;
|
|
12
8
|
const actualStyle = (0, react_1.useMemo)(() => {
|
|
13
9
|
return {
|
|
@@ -23,6 +19,10 @@ const AbsoluteFill = (props) => {
|
|
|
23
19
|
...style,
|
|
24
20
|
};
|
|
25
21
|
}, [style]);
|
|
26
|
-
return (0, jsx_runtime_1.jsx)("div", { style: actualStyle, ...other });
|
|
22
|
+
return (0, jsx_runtime_1.jsx)("div", { ref: ref, style: actualStyle, ...other });
|
|
27
23
|
};
|
|
28
|
-
|
|
24
|
+
/**
|
|
25
|
+
* @description An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
26
|
+
* @see [Documentation](https://www.remotion.dev/docs/absolute-fill)
|
|
27
|
+
*/
|
|
28
|
+
exports.AbsoluteFill = (0, react_1.forwardRef)(AbsoluteFillRefForwarding);
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Clipper = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
6
|
+
const Clipper = ({ height, width, x, y }) => {
|
|
7
|
+
const { setClipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
|
|
8
|
+
(0, react_1.useEffect)(() => {
|
|
9
|
+
setClipRegion((c) => {
|
|
10
|
+
if (c === 'hide') {
|
|
11
|
+
throw new Error('Cannot render <Clipper>, because another <Null> is already rendered');
|
|
12
|
+
}
|
|
13
|
+
if (c === null) {
|
|
14
|
+
return { height, width, x, y };
|
|
15
|
+
}
|
|
16
|
+
throw new Error('Cannot render <Clipper>, because another component clipping the region was already rendered (most likely <Clipper>)');
|
|
17
|
+
});
|
|
18
|
+
return () => {
|
|
19
|
+
setClipRegion(null);
|
|
20
|
+
};
|
|
21
|
+
}, [height, setClipRegion, width, x, y]);
|
|
22
|
+
return null;
|
|
23
|
+
};
|
|
24
|
+
exports.Clipper = Clipper;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { AnyZodObject } from 'zod';
|
|
4
|
+
import type { InferProps, PropsIfHasProps } from './props-if-has-props.js';
|
|
5
|
+
declare type LooseComponentType<T> = ComponentType<T> | ((props: T) => React.ReactNode);
|
|
6
|
+
export declare type CompProps<Props> = {
|
|
7
|
+
lazyComponent: () => Promise<{
|
|
8
|
+
default: LooseComponentType<Props>;
|
|
9
|
+
}>;
|
|
10
|
+
} | {
|
|
11
|
+
component: LooseComponentType<Props>;
|
|
12
|
+
};
|
|
13
|
+
export declare type CalcMetadataReturnType<T> = {
|
|
14
|
+
durationInFrames?: number;
|
|
15
|
+
fps?: number;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
props?: T;
|
|
19
|
+
};
|
|
20
|
+
export declare type CalculateMetadataFunction<T> = (options: {
|
|
21
|
+
defaultProps: T;
|
|
22
|
+
props: T;
|
|
23
|
+
abortSignal: AbortSignal;
|
|
24
|
+
}) => Promise<CalcMetadataReturnType<T>> | CalcMetadataReturnType<T>;
|
|
25
|
+
export declare type StillProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
id: string;
|
|
29
|
+
calculateMetadata?: CalculateMetadataFunction<InferProps<Schema, Props>>;
|
|
30
|
+
schema?: Schema;
|
|
31
|
+
} & CompProps<Props> & PropsIfHasProps<Schema, Props>;
|
|
32
|
+
export declare type CompositionProps<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = StillProps<Schema, Props> & {
|
|
33
|
+
fps: number;
|
|
34
|
+
durationInFrames: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @description This component is used to register a video to make it renderable and make it show in the sidebar, in dev mode.
|
|
38
|
+
* @see [Documentation](https://www.remotion.dev/docs/composition)
|
|
39
|
+
*/
|
|
40
|
+
export declare const Composition: <Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined>({ width, height, fps, durationInFrames, id, defaultProps, schema, ...compProps }: CompositionProps<Schema, Props>) => React.ReactPortal | null;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Composition = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_dom_1 = require("react-dom");
|
|
7
|
+
const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
|
|
8
|
+
const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
9
|
+
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
10
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
11
|
+
const Folder_js_1 = require("./Folder.js");
|
|
12
|
+
const get_environment_js_1 = require("./get-environment.js");
|
|
13
|
+
const loading_indicator_js_1 = require("./loading-indicator.js");
|
|
14
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
15
|
+
const nonce_js_1 = require("./nonce.js");
|
|
16
|
+
const portal_node_js_1 = require("./portal-node.js");
|
|
17
|
+
const ResolveCompositionConfig_js_1 = require("./ResolveCompositionConfig.js");
|
|
18
|
+
const use_lazy_component_js_1 = require("./use-lazy-component.js");
|
|
19
|
+
const use_video_js_1 = require("./use-video.js");
|
|
20
|
+
const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
|
|
21
|
+
const validate_default_props_js_1 = require("./validation/validate-default-props.js");
|
|
22
|
+
const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
|
|
23
|
+
const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
|
|
24
|
+
const validate_fps_js_1 = require("./validation/validate-fps.js");
|
|
25
|
+
const Fallback = () => {
|
|
26
|
+
(0, react_1.useEffect)(() => {
|
|
27
|
+
const fallback = (0, delay_render_js_1.delayRender)('Waiting for Root component to unsuspend');
|
|
28
|
+
return () => (0, delay_render_js_1.continueRender)(fallback);
|
|
29
|
+
}, []);
|
|
30
|
+
return null;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @description This component is used to register a video to make it renderable and make it show in the sidebar, in dev mode.
|
|
34
|
+
* @see [Documentation](https://www.remotion.dev/docs/composition)
|
|
35
|
+
*/
|
|
36
|
+
const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, schema, ...compProps }) => {
|
|
37
|
+
var _a, _b;
|
|
38
|
+
const { registerComposition, unregisterComposition } = (0, react_1.useContext)(CompositionManagerContext_js_1.CompositionManager);
|
|
39
|
+
const video = (0, use_video_js_1.useVideo)();
|
|
40
|
+
const lazy = (0, use_lazy_component_js_1.useLazyComponent)(compProps);
|
|
41
|
+
const nonce = (0, nonce_js_1.useNonce)();
|
|
42
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
43
|
+
const canUseComposition = (0, react_1.useContext)(CanUseRemotionHooks_js_1.CanUseRemotionHooks);
|
|
44
|
+
if (canUseComposition) {
|
|
45
|
+
if (environment === 'player-development' ||
|
|
46
|
+
environment === 'player-production') {
|
|
47
|
+
throw new Error('<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.');
|
|
48
|
+
}
|
|
49
|
+
throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
|
|
50
|
+
}
|
|
51
|
+
const { folderName, parentName } = (0, react_1.useContext)(Folder_js_1.FolderContext);
|
|
52
|
+
(0, react_1.useEffect)(() => {
|
|
53
|
+
var _a;
|
|
54
|
+
// Ensure it's a URL safe id
|
|
55
|
+
if (!id) {
|
|
56
|
+
throw new Error('No id for composition passed.');
|
|
57
|
+
}
|
|
58
|
+
(0, validate_composition_id_js_1.validateCompositionId)(id);
|
|
59
|
+
(0, validate_dimensions_js_1.validateDimension)(width, 'width', 'of the <Composition/> component');
|
|
60
|
+
(0, validate_dimensions_js_1.validateDimension)(height, 'height', 'of the <Composition/> component');
|
|
61
|
+
(0, validate_duration_in_frames_js_1.validateDurationInFrames)({
|
|
62
|
+
durationInFrames,
|
|
63
|
+
component: 'of the <Composition/> component',
|
|
64
|
+
allowFloats: false,
|
|
65
|
+
});
|
|
66
|
+
(0, validate_fps_js_1.validateFps)(fps, 'as a prop of the <Composition/> component', false);
|
|
67
|
+
(0, validate_default_props_js_1.validateDefaultAndInputProps)(defaultProps, 'defaultProps', id);
|
|
68
|
+
registerComposition({
|
|
69
|
+
durationInFrames,
|
|
70
|
+
fps,
|
|
71
|
+
height,
|
|
72
|
+
width,
|
|
73
|
+
id,
|
|
74
|
+
folderName,
|
|
75
|
+
component: lazy,
|
|
76
|
+
defaultProps: defaultProps,
|
|
77
|
+
nonce,
|
|
78
|
+
parentFolderName: parentName,
|
|
79
|
+
schema: schema !== null && schema !== void 0 ? schema : null,
|
|
80
|
+
calculateMetadata: (_a = compProps.calculateMetadata) !== null && _a !== void 0 ? _a : null,
|
|
81
|
+
});
|
|
82
|
+
return () => {
|
|
83
|
+
unregisterComposition(id);
|
|
84
|
+
};
|
|
85
|
+
}, [
|
|
86
|
+
durationInFrames,
|
|
87
|
+
fps,
|
|
88
|
+
height,
|
|
89
|
+
lazy,
|
|
90
|
+
id,
|
|
91
|
+
folderName,
|
|
92
|
+
defaultProps,
|
|
93
|
+
registerComposition,
|
|
94
|
+
unregisterComposition,
|
|
95
|
+
width,
|
|
96
|
+
nonce,
|
|
97
|
+
parentName,
|
|
98
|
+
schema,
|
|
99
|
+
compProps.calculateMetadata,
|
|
100
|
+
]);
|
|
101
|
+
const resolved = (0, ResolveCompositionConfig_js_1.useResolvedVideoConfig)(id);
|
|
102
|
+
if (environment === 'preview' && video && video.component === lazy) {
|
|
103
|
+
const Comp = lazy;
|
|
104
|
+
if (resolved === null || resolved.type !== 'success') {
|
|
105
|
+
return null;
|
|
106
|
+
}
|
|
107
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(ClipComposition, { children: (0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_js_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...((_a = resolved.result.defaultProps) !== null && _a !== void 0 ? _a : {}) }) }) }) }), (0, portal_node_js_1.portalNode)());
|
|
108
|
+
}
|
|
109
|
+
if (environment === 'rendering' && video && video.component === lazy) {
|
|
110
|
+
const Comp = lazy;
|
|
111
|
+
if (resolved === null || resolved.type !== 'success') {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...((_b = resolved.result.defaultProps) !== null && _b !== void 0 ? _b : {}) }) }) }), (0, portal_node_js_1.portalNode)());
|
|
115
|
+
}
|
|
116
|
+
return null;
|
|
117
|
+
};
|
|
118
|
+
exports.Composition = Composition;
|
|
119
|
+
const ClipComposition = ({ children }) => {
|
|
120
|
+
const { clipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
|
|
121
|
+
const style = (0, react_1.useMemo)(() => {
|
|
122
|
+
return {
|
|
123
|
+
display: 'flex',
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
opacity: clipRegion === 'hide' ? 0 : 1,
|
|
126
|
+
clipPath: clipRegion && clipRegion !== 'hide'
|
|
127
|
+
? `polygon(${clipRegion.x}px ${clipRegion.y}px, ${clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.y}px)`
|
|
128
|
+
: undefined,
|
|
129
|
+
};
|
|
130
|
+
}, [clipRegion]);
|
|
131
|
+
return (0, jsx_runtime_1.jsx)(AbsoluteFill_js_1.AbsoluteFill, { style: style, children: children });
|
|
132
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ComponentType, LazyExoticComponent } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { AnyZodObject } from 'zod';
|
|
4
|
+
import type { CalculateMetadataFunction } from './Composition.js';
|
|
5
|
+
import type { InferProps, PropsIfHasProps } from './props-if-has-props.js';
|
|
6
|
+
export declare type TComposition<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
fps: number;
|
|
10
|
+
durationInFrames: number;
|
|
11
|
+
id: string;
|
|
12
|
+
folderName: string | null;
|
|
13
|
+
parentFolderName: string | null;
|
|
14
|
+
component: LazyExoticComponent<ComponentType<Props>>;
|
|
15
|
+
nonce: number;
|
|
16
|
+
schema: Schema | null;
|
|
17
|
+
calculateMetadata: CalculateMetadataFunction<InferProps<Schema, Props>> | null;
|
|
18
|
+
} & PropsIfHasProps<Schema, Props>;
|
|
19
|
+
export declare type AnyComposition = TComposition<AnyZodObject, Record<string, unknown> | undefined>;
|
|
20
|
+
export declare type TCompMetadataWithCalcFunction<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<Schema, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames' | 'defaultProps' | 'calculateMetadata'>;
|
|
21
|
+
export declare type TCompMetadata<Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<Schema, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames' | 'defaultProps'>;
|
|
22
|
+
export declare type AnyCompMetadata = TCompMetadata<AnyZodObject, Record<string, unknown> | undefined>;
|
|
23
|
+
export declare type SmallTCompMetadata<T extends AnyZodObject, Props extends Record<string, unknown> | undefined> = Pick<TComposition<T, Props>, 'id' | 'height' | 'width' | 'fps' | 'durationInFrames'> & Partial<Pick<TComposition<T, Props>, 'defaultProps'>>;
|
|
24
|
+
export declare type AnySmallCompMetadata = SmallTCompMetadata<AnyZodObject, Record<string, unknown> | undefined>;
|
|
25
|
+
declare type EnhancedTSequenceData = {
|
|
26
|
+
type: 'sequence';
|
|
27
|
+
} | {
|
|
28
|
+
type: 'audio';
|
|
29
|
+
src: string;
|
|
30
|
+
volume: string | number;
|
|
31
|
+
doesVolumeChange: boolean;
|
|
32
|
+
startMediaFrom: number;
|
|
33
|
+
playbackRate: number;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'video';
|
|
36
|
+
src: string;
|
|
37
|
+
volume: string | number;
|
|
38
|
+
doesVolumeChange: boolean;
|
|
39
|
+
startMediaFrom: number;
|
|
40
|
+
playbackRate: number;
|
|
41
|
+
};
|
|
42
|
+
export declare type LoopDisplay = {
|
|
43
|
+
numberOfTimes: number;
|
|
44
|
+
startOffset: number;
|
|
45
|
+
durationInFrames: number;
|
|
46
|
+
};
|
|
47
|
+
export declare type TSequence = {
|
|
48
|
+
from: number;
|
|
49
|
+
duration: number;
|
|
50
|
+
id: string;
|
|
51
|
+
displayName: string;
|
|
52
|
+
parent: string | null;
|
|
53
|
+
rootId: string;
|
|
54
|
+
showInTimeline: boolean;
|
|
55
|
+
nonce: number;
|
|
56
|
+
loopDisplay: LoopDisplay | undefined;
|
|
57
|
+
} & EnhancedTSequenceData;
|
|
58
|
+
export declare type TAsset = {
|
|
59
|
+
type: 'audio' | 'video';
|
|
60
|
+
src: string;
|
|
61
|
+
id: string;
|
|
62
|
+
frame: number;
|
|
63
|
+
volume: number;
|
|
64
|
+
mediaFrame: number;
|
|
65
|
+
playbackRate: number;
|
|
66
|
+
allowAmplificationDuringRender: boolean;
|
|
67
|
+
};
|
|
68
|
+
export declare const compositionsRef: React.RefObject<{
|
|
69
|
+
getCompositions: () => TCompMetadataWithCalcFunction<AnyZodObject, Record<string, unknown> | undefined>[];
|
|
70
|
+
}>;
|
|
71
|
+
export declare const CompositionManagerProvider: React.FC<{
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
numberOfAudioTags: number;
|
|
74
|
+
}>;
|
|
75
|
+
export {};
|
|
@@ -23,42 +23,45 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.CompositionManagerProvider = exports.compositionsRef =
|
|
26
|
+
exports.CompositionManagerProvider = exports.compositionsRef = void 0;
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
unregisterComposition: () => undefined,
|
|
33
|
-
registerFolder: () => undefined,
|
|
34
|
-
unregisterFolder: () => undefined,
|
|
35
|
-
currentComposition: null,
|
|
36
|
-
setCurrentComposition: () => undefined,
|
|
37
|
-
registerSequence: () => undefined,
|
|
38
|
-
unregisterSequence: () => undefined,
|
|
39
|
-
registerAsset: () => undefined,
|
|
40
|
-
unregisterAsset: () => undefined,
|
|
41
|
-
sequences: [],
|
|
42
|
-
assets: [],
|
|
43
|
-
folders: [],
|
|
44
|
-
});
|
|
29
|
+
const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
|
|
30
|
+
const CompositionManagerContext_js_1 = require("./CompositionManagerContext.js");
|
|
31
|
+
const ResolveCompositionConfig_js_1 = require("./ResolveCompositionConfig.js");
|
|
45
32
|
exports.compositionsRef = react_1.default.createRef();
|
|
46
|
-
const CompositionManagerProvider = ({ children }) => {
|
|
33
|
+
const CompositionManagerProvider = ({ children, numberOfAudioTags }) => {
|
|
34
|
+
var _a;
|
|
47
35
|
// Wontfix, expected to have
|
|
48
36
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
49
37
|
const [compositions, setCompositions] = (0, react_1.useState)([]);
|
|
38
|
+
const currentcompositionsRef = (0, react_1.useRef)(compositions);
|
|
50
39
|
const [currentComposition, setCurrentComposition] = (0, react_1.useState)(null);
|
|
51
40
|
const [assets, setAssets] = (0, react_1.useState)([]);
|
|
52
41
|
const [folders, setFolders] = (0, react_1.useState)([]);
|
|
53
42
|
const [sequences, setSequences] = (0, react_1.useState)([]);
|
|
54
|
-
const
|
|
43
|
+
const [currentCompositionMetadata, setCurrentCompositionMetadata] = (0, react_1.useState)(null);
|
|
44
|
+
const updateCompositions = (0, react_1.useCallback)((
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
46
|
+
updateComps) => {
|
|
55
47
|
setCompositions((comps) => {
|
|
48
|
+
const updated = updateComps(comps);
|
|
49
|
+
currentcompositionsRef.current = updated;
|
|
50
|
+
return updated;
|
|
51
|
+
});
|
|
52
|
+
}, []);
|
|
53
|
+
const registerComposition = (0, react_1.useCallback)((comp) => {
|
|
54
|
+
updateCompositions((comps) => {
|
|
56
55
|
if (comps.find((c) => c.id === comp.id)) {
|
|
57
56
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
58
57
|
}
|
|
59
|
-
|
|
58
|
+
const value = [...comps, comp]
|
|
59
|
+
.slice()
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
61
|
+
.sort((a, b) => a.nonce - b.nonce);
|
|
62
|
+
return value;
|
|
60
63
|
});
|
|
61
|
-
}, []);
|
|
64
|
+
}, [updateCompositions]);
|
|
62
65
|
const registerSequence = (0, react_1.useCallback)((seq) => {
|
|
63
66
|
setSequences((seqs) => {
|
|
64
67
|
return [...seqs, seq];
|
|
@@ -108,9 +111,10 @@ const CompositionManagerProvider = ({ children }) => {
|
|
|
108
111
|
}, [assets]);
|
|
109
112
|
(0, react_1.useImperativeHandle)(exports.compositionsRef, () => {
|
|
110
113
|
return {
|
|
111
|
-
getCompositions: () =>
|
|
114
|
+
getCompositions: () => currentcompositionsRef.current,
|
|
112
115
|
};
|
|
113
|
-
}, [
|
|
116
|
+
}, []);
|
|
117
|
+
const composition = compositions.find((c) => c.id === currentComposition);
|
|
114
118
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
115
119
|
return {
|
|
116
120
|
compositions,
|
|
@@ -127,22 +131,25 @@ const CompositionManagerProvider = ({ children }) => {
|
|
|
127
131
|
folders,
|
|
128
132
|
registerFolder,
|
|
129
133
|
unregisterFolder,
|
|
134
|
+
currentCompositionMetadata,
|
|
135
|
+
setCurrentCompositionMetadata,
|
|
130
136
|
};
|
|
131
137
|
}, [
|
|
132
138
|
compositions,
|
|
133
|
-
currentComposition,
|
|
134
139
|
registerComposition,
|
|
135
|
-
registerSequence,
|
|
136
140
|
unregisterComposition,
|
|
141
|
+
currentComposition,
|
|
142
|
+
registerSequence,
|
|
137
143
|
unregisterSequence,
|
|
138
144
|
registerAsset,
|
|
139
145
|
unregisterAsset,
|
|
140
146
|
sequences,
|
|
141
147
|
assets,
|
|
148
|
+
folders,
|
|
142
149
|
registerFolder,
|
|
143
150
|
unregisterFolder,
|
|
144
|
-
|
|
151
|
+
currentCompositionMetadata,
|
|
145
152
|
]);
|
|
146
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
153
|
+
return ((0, jsx_runtime_1.jsx)(CompositionManagerContext_js_1.CompositionManager.Provider, { value: contextValue, children: (0, jsx_runtime_1.jsx)(ResolveCompositionConfig_js_1.ResolveCompositionConfig, { children: (0, jsx_runtime_1.jsx)(shared_audio_tags_js_1.SharedAudioContextProvider, { numberOfAudioTags: numberOfAudioTags, component: (_a = composition === null || composition === void 0 ? void 0 : composition.component) !== null && _a !== void 0 ? _a : null, children: children }) }) }));
|
|
147
154
|
};
|
|
148
155
|
exports.CompositionManagerProvider = CompositionManagerProvider;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { AnyZodObject } from 'zod';
|
|
3
|
+
import type { AnyCompMetadata, AnyComposition, TAsset, TComposition, TSequence } from './CompositionManager.js';
|
|
4
|
+
import type { TFolder } from './Folder.js';
|
|
5
|
+
export declare type BaseMetadata = Pick<AnyCompMetadata, 'durationInFrames' | 'fps' | 'defaultProps' | 'height' | 'width'>;
|
|
6
|
+
export declare type CompositionManagerContext = {
|
|
7
|
+
compositions: AnyComposition[];
|
|
8
|
+
registerComposition: <Schema extends AnyZodObject, Props extends Record<string, unknown> | undefined>(comp: TComposition<Schema, Props>) => void;
|
|
9
|
+
unregisterComposition: (name: string) => void;
|
|
10
|
+
registerFolder: (name: string, parent: string | null) => void;
|
|
11
|
+
unregisterFolder: (name: string, parent: string | null) => void;
|
|
12
|
+
currentComposition: string | null;
|
|
13
|
+
setCurrentComposition: (curr: string) => void;
|
|
14
|
+
setCurrentCompositionMetadata: (metadata: BaseMetadata) => void;
|
|
15
|
+
currentCompositionMetadata: BaseMetadata | null;
|
|
16
|
+
registerSequence: (seq: TSequence) => void;
|
|
17
|
+
unregisterSequence: (id: string) => void;
|
|
18
|
+
registerAsset: (asset: TAsset) => void;
|
|
19
|
+
unregisterAsset: (id: string) => void;
|
|
20
|
+
sequences: TSequence[];
|
|
21
|
+
assets: TAsset[];
|
|
22
|
+
folders: TFolder[];
|
|
23
|
+
};
|
|
24
|
+
export declare const CompositionManager: import("react").Context<CompositionManagerContext>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompositionManager = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
exports.CompositionManager = (0, react_1.createContext)({
|
|
6
|
+
compositions: [],
|
|
7
|
+
registerComposition: () => undefined,
|
|
8
|
+
unregisterComposition: () => undefined,
|
|
9
|
+
registerFolder: () => undefined,
|
|
10
|
+
unregisterFolder: () => undefined,
|
|
11
|
+
currentComposition: null,
|
|
12
|
+
setCurrentComposition: () => undefined,
|
|
13
|
+
setCurrentCompositionMetadata: () => undefined,
|
|
14
|
+
registerSequence: () => undefined,
|
|
15
|
+
unregisterSequence: () => undefined,
|
|
16
|
+
registerAsset: () => undefined,
|
|
17
|
+
unregisterAsset: () => undefined,
|
|
18
|
+
sequences: [],
|
|
19
|
+
assets: [],
|
|
20
|
+
folders: [],
|
|
21
|
+
currentCompositionMetadata: null,
|
|
22
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = Record<string, Record<string, unknown>>;
|
|
3
|
+
export declare type EditorPropsContextType = {
|
|
4
|
+
props: Props;
|
|
5
|
+
updateProps: (options: {
|
|
6
|
+
id: string;
|
|
7
|
+
defaultProps: Record<string, unknown>;
|
|
8
|
+
newProps: Record<string, unknown> | ((oldProps: Record<string, unknown>) => Record<string, unknown>);
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const EditorPropsContext: React.Context<EditorPropsContextType>;
|
|
12
|
+
export declare const EditorPropsProvider: React.FC<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export {};
|