🎥 Make videos programmatically with React
Remove loop from InteractiveBaseProps
JonnyBurger98be0f890027
diff --git a/packages/brand/src/3DContext/Div3D.tsx b/packages/brand/src/3DContext/Div3D.tsxindex e91ab96f1e..afee5d3eb7 100644--- a/packages/brand/src/3DContext/Div3D.tsx+++ b/packages/brand/src/3DContext/Div3D.tsx@@ -58,6 +58,7 @@ type ExtrudeDivProps = InteractiveBaseProps &InteractiveTransformProps &ExtrudeDivTransformProps &ExtrudeDivOptionalProps & {+ readonly loop?: boolean;readonly children: React.ReactNode;};diff --git a/packages/brand/src/3DContext/transformation-context.tsx b/packages/brand/src/3DContext/transformation-context.tsxindex 1440c5d719..eb00cdecdb 100644--- a/packages/brand/src/3DContext/transformation-context.tsx+++ b/packages/brand/src/3DContext/transformation-context.tsx@@ -96,6 +96,7 @@ export const NewTransform: React.FC<{};type TransformBaseProps = InteractiveBaseProps & {+ readonly loop?: boolean;readonly children: React.ReactNode;};diff --git a/packages/brand/src/Compose/WhatIsRemotion.tsx b/packages/brand/src/Compose/WhatIsRemotion.tsxindex 5843c139ad..c3ef99e5eb 100644--- a/packages/brand/src/Compose/WhatIsRemotion.tsx+++ b/packages/brand/src/Compose/WhatIsRemotion.tsx@@ -33,6 +33,7 @@ import {Rotations} from './Rotations';type LabelProps = InteractiveBaseProps &InteractiveTransformProps & {+ readonly loop?: boolean;readonly children: string;};diff --git a/packages/brand/src/video-elements/Studio.tsx b/packages/brand/src/video-elements/Studio.tsxindex 62891a4510..3c52fa07e5 100644--- a/packages/brand/src/video-elements/Studio.tsx+++ b/packages/brand/src/video-elements/Studio.tsx@@ -81,6 +81,7 @@ export const studioReferenceSchema = z.object({export type StudioReferenceProps = z.infer<typeof studioReferenceSchema>;export type StudioProps = InteractiveBaseProps & {+ readonly loop?: boolean;readonly compositionName: string;readonly compositionWidth: number;readonly compositionHeight: number;diff --git a/packages/core/src/AbsoluteFill.tsx b/packages/core/src/AbsoluteFill.tsxindex 281082528e..3631f0bc2a 100644--- a/packages/core/src/AbsoluteFill.tsx+++ b/packages/core/src/AbsoluteFill.tsx@@ -29,10 +29,11 @@ import {withInteractivitySchema} from './with-interactivity-schema.js';export type AbsoluteFillProps = Omit<AbsoluteFillElementProps,- keyof InteractiveBaseProps+ keyof InteractiveBaseProps | 'loop'> &InteractiveBaseProps &InteractivePremountProps & {+ readonly loop?: boolean;/*** @deprecated For internal use only*/diff --git a/packages/core/src/HtmlInCanvas.tsx b/packages/core/src/HtmlInCanvas.tsxindex cd73ba4c82..86b36cecdf 100644--- a/packages/core/src/HtmlInCanvas.tsx+++ b/packages/core/src/HtmlInCanvas.tsx@@ -384,6 +384,7 @@ export type HtmlInCanvasProps = Omit<InteractiveBaseProps, 'children'> &InteractiveCropProps &Omit<AbsoluteFillLayout, 'layout'> & {readonly durationInFrames?: number;+ readonly loop?: boolean;readonly width: number;readonly height: number;readonly effects?: EffectsProp;diff --git a/packages/core/src/Img.tsx b/packages/core/src/Img.tsxindex 90bf15d483..f5f5afc691 100644--- a/packages/core/src/Img.tsx+++ b/packages/core/src/Img.tsx@@ -69,6 +69,7 @@ export type ImgProps = NativeImgProps & {readonly effects?: EffectsProp;readonly showInTimeline?: boolean;readonly name?: string;+ readonly loop?: boolean;} & Omit<InteractiveBaseProps, 'playbackRate'> &InteractiveCropProps &InteractivePremountProps;diff --git a/packages/core/src/Interactive.tsx b/packages/core/src/Interactive.tsxindex ddab326827..b079fff360 100644--- a/packages/core/src/Interactive.tsx+++ b/packages/core/src/Interactive.tsx@@ -85,7 +85,6 @@ export type InteractiveBaseProps = Pick<| 'from'| 'trimBefore'| 'playbackRate'- | 'loop'| 'freeze'| 'hidden'| 'name'@@ -107,8 +106,9 @@ export type InteractivePremountProps = Pick<| 'styleWhilePostmounted'>;-type InteractiveManagedProps = InteractiveBaseProps &- InteractiveCropProps &+type InteractiveManagedProps = InteractiveBaseProps & {+ readonly loop?: boolean;+} & InteractiveCropProps &InteractivePremountProps;type InteractiveElementProps<Tag extends InteractiveTag> = Omit<@@ -236,6 +236,7 @@ type ComponentWithoutReservedProps<type WithSchemaReservedKey =| keyof InteractiveBaseProps+ | 'loop'| keyof InteractiveCropProps| keyof InteractivePremountProps| 'controls';@@ -297,8 +298,9 @@ type WithSchema = {},): React.FC<React.ComponentPropsWithRef<Component> &- InteractiveBaseProps &- InteractivePremountProps &+ InteractiveBaseProps & {+ readonly loop?: boolean;+ } & InteractivePremountProps &InteractiveCropProps>;<S extends InteractivitySchema, Props extends object>(@@ -340,8 +342,9 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {type ComponentWrappedInSequenceProps = React.ComponentProps<typeof Component> &- InteractiveBaseProps &- InteractivePremountProps &+ InteractiveBaseProps & {+ readonly loop?: boolean;+ } & InteractivePremountProps &InteractiveCropProps & {readonly controls: SequenceControls | undefined;};@@ -453,8 +456,9 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {return Wrapped as React.FC<React.ComponentProps<typeof Component> &- InteractiveBaseProps &- InteractivePremountProps &+ InteractiveBaseProps & {+ readonly loop?: boolean;+ } & InteractivePremountProps &InteractiveCropProps>;};diff --git a/packages/core/src/animated-image/props.ts b/packages/core/src/animated-image/props.tsindex b118d579c0..932694655a 100644--- a/packages/core/src/animated-image/props.ts+++ b/packages/core/src/animated-image/props.ts@@ -28,8 +28,9 @@ export type RemotionAnimatedImageProps = {requestInit?: RequestInit;} & AnimatedImageCanvasProps;-export type AnimatedImageProps = InteractiveBaseProps &- InteractiveCropProps &+export type AnimatedImageProps = InteractiveBaseProps & {+ readonly loop?: boolean;+} & InteractiveCropProps &InteractivePremountProps &RemotionAnimatedImageProps & {readonly effects?: EffectsProp;diff --git a/packages/core/src/canvas-image/props.ts b/packages/core/src/canvas-image/props.tsindex 211f82ff7a..5944234e56 100644--- a/packages/core/src/canvas-image/props.ts+++ b/packages/core/src/canvas-image/props.ts@@ -7,8 +7,9 @@ import type {InteractivePremountProps,} from '../Interactive.js';-type CanvasImageSequenceProps = Omit<InteractiveBaseProps, 'playbackRate'> &- InteractiveCropProps &+type CanvasImageSequenceProps = Omit<InteractiveBaseProps, 'playbackRate'> & {+ readonly loop?: boolean;+} & InteractiveCropProps &InteractivePremountProps;export type CanvasImageCanvasProps = Omit<diff --git a/packages/core/src/effects/Solid.tsx b/packages/core/src/effects/Solid.tsxindex 6cfe332080..62b4bef425 100644--- a/packages/core/src/effects/Solid.tsx+++ b/packages/core/src/effects/Solid.tsx@@ -26,7 +26,7 @@ import {type InteractivitySchema,} from '../interactivity-schema.js';import {resolveSequenceDuration} from '../resolve-sequence-duration.js';-import {Sequence} from '../Sequence.js';+import {Sequence, type SequenceProps} from '../Sequence.js';import {useCropStyle} from '../use-crop-style.js';import {useDelayRender} from '../use-delay-render.js';import {usePremounting} from '../use-premounting.js';@@ -261,6 +261,7 @@ const SolidOuter = forwardRef<SolidProps & {readonly controls: SequenceControls | undefined;} & InteractiveBaseProps &+ Pick<SequenceProps, 'loop'> &InteractivePremountProps>((diff --git a/packages/docs/docs/interactive.mdx b/packages/docs/docs/interactive.mdxindex ba8e294f59..faf02ffc29 100644--- a/packages/docs/docs/interactive.mdx+++ b/packages/docs/docs/interactive.mdx@@ -74,8 +74,6 @@ Controls inherited from [`<Sequence>`](/docs/sequence):`durationInFrames`, `from`, `trimBefore`, `playbackRate`, `freeze`, `hidden`, `name` and `showInTimeline`.-Timed components also accept [`loop`](/docs/sequence#loop), but it is not included in the shared schema. Components with an intrinsic duration, such as [`<Video>`](/docs/video), can expose their own `loop` control.-[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema and uses it for its [`<Sequence>`](/docs/sequence).### `Interactive.transformSchema`<AvailableFrom v="4.0.479" />@@ -169,7 +167,7 @@ See [`Interactive.withSchema()`](/docs/interactive-with-schema).### `InteractiveBaseProps`<AvailableFrom v="4.0.479" />-The timing props accepted by interactive components. It includes the props in `Interactive.baseSchema` and `loop`.+The prop type matching `Interactive.baseSchema`.### `InteractiveTransformProps`<AvailableFrom v="4.0.479" />diff --git a/packages/example/src/CaptionsTester/AnimatedCaptions.tsx b/packages/example/src/CaptionsTester/AnimatedCaptions.tsxindex 98f5ffd376..dd1132abe9 100644--- a/packages/example/src/CaptionsTester/AnimatedCaptions.tsx+++ b/packages/example/src/CaptionsTester/AnimatedCaptions.tsx@@ -116,6 +116,7 @@ const CaptionPage: React.FC<{page: TikTokPage}> = ({page}) => {type AnimatedCaptionsProps = InteractiveBaseProps &InteractiveTransformProps &Pick<SequenceProps, 'width' | 'height'> & {+ readonly loop?: boolean;readonly captions: Caption[];};diff --git a/packages/gif/src/Gif.tsx b/packages/gif/src/Gif.tsxindex 05ffdf311e..eb225fca44 100644--- a/packages/gif/src/Gif.tsx+++ b/packages/gif/src/Gif.tsx@@ -24,8 +24,9 @@ import {resolveGifSource} from './resolve-gif-source';const {useMemoizedEffectDefinitions, useMemoizedEffects} = Internals;-export type GifProps = InteractiveBaseProps &- InteractiveCropProps &+export type GifProps = InteractiveBaseProps & {+ readonly loop?: boolean;+} & InteractiveCropProps &InteractivePremountProps &InteractiveTransformProps &RemotionGifProps & {diff --git a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx b/packages/jonnys-videos/src/components/AnimatedCaptions.tsxindex ae423e5a1f..7f8383b291 100644--- a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx+++ b/packages/jonnys-videos/src/components/AnimatedCaptions.tsx@@ -35,6 +35,7 @@ import {export const CAPTIONS_HEIGHT = 360;type AnimatedCaptionsProps = InteractiveBaseProps & {+ readonly loop?: boolean;readonly captions: Caption[] | null;readonly captionsSrc: string | null;readonly voiceoverSrc: string | null;diff --git a/packages/light-leaks/src/LightLeak.tsx b/packages/light-leaks/src/LightLeak.tsxindex 12a3fc1f8f..d3d7f053da 100644--- a/packages/light-leaks/src/LightLeak.tsx+++ b/packages/light-leaks/src/LightLeak.tsx@@ -23,6 +23,7 @@ export type LightLeakProps = InteractiveBaseProps &InteractivePremountProps &Pick<SequenceProps, 'width' | 'height'> &Pick<AbsoluteFillLayout, 'className'> & {+ readonly loop?: boolean;readonly seed?: number;readonly hueShift?: number;};diff --git a/packages/mac-cursors/src/MacOSCursor.tsx b/packages/mac-cursors/src/MacOSCursor.tsxindex 3923f7ee2e..8aa5e95fb6 100644--- a/packages/mac-cursors/src/MacOSCursor.tsx+++ b/packages/mac-cursors/src/MacOSCursor.tsx@@ -17,6 +17,7 @@ import {macOSCursorNames, resolveCursor} from './resolve-cursor';export type MacOSCursorProps = InteractiveBaseProps &InteractivePremountProps & {+ readonly loop?: boolean;readonly cursor?: string;readonly customCursor?: string;readonly className?: string;diff --git a/packages/maptiler/src/MapHeatmap.tsx b/packages/maptiler/src/MapHeatmap.tsxindex 009fdbde02..0e0a1b0c2e 100644--- a/packages/maptiler/src/MapHeatmap.tsx+++ b/packages/maptiler/src/MapHeatmap.tsx@@ -20,6 +20,7 @@ import {useMapPremounting} from './use-map-premounting';export type MapHeatmapProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> &Omit<HeatmapLayerOptions, 'layerId' | 'sourceId'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly layerId: string;readonly sourceId?: string;diff --git a/packages/maptiler/src/MapLayer.tsx b/packages/maptiler/src/MapLayer.tsxindex 2e7e647c31..717ce24b0b 100644--- a/packages/maptiler/src/MapLayer.tsx+++ b/packages/maptiler/src/MapLayer.tsx@@ -12,6 +12,7 @@ import {MapTilerContext} from './MapTilerContext';export type MapLayerProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> & {+ readonly loop?: boolean;readonly beforeId?: string;readonly layer: LayerSpecification;};diff --git a/packages/maptiler/src/MapOverlay.tsx b/packages/maptiler/src/MapOverlay.tsxindex 6cb502cfcd..0f54aabc1a 100644--- a/packages/maptiler/src/MapOverlay.tsx+++ b/packages/maptiler/src/MapOverlay.tsx@@ -26,6 +26,7 @@ export type MapOverlayAnchor =export type MapOverlayProps = InteractiveBaseProps &InteractivePremountProps &InteractiveTransformProps & {+ readonly loop?: boolean;readonly anchor?: MapOverlayAnchor;readonly children?: ReactNode;readonly controls?: SequenceControls;diff --git a/packages/maptiler/src/MapPoint.tsx b/packages/maptiler/src/MapPoint.tsxindex e4511a44cb..62bd2e7aad 100644--- a/packages/maptiler/src/MapPoint.tsx+++ b/packages/maptiler/src/MapPoint.tsx@@ -20,6 +20,7 @@ import {useMapPremounting} from './use-map-premounting';export type MapPointProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> &Omit<PointLayerOptions, 'layerId' | 'sourceId'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly layerId: string;readonly sourceId?: string;diff --git a/packages/maptiler/src/MapPolygon.tsx b/packages/maptiler/src/MapPolygon.tsxindex 3dfa9a2926..1e8fa196d8 100644--- a/packages/maptiler/src/MapPolygon.tsx+++ b/packages/maptiler/src/MapPolygon.tsx@@ -38,6 +38,7 @@ export type MapPolygonProps = InteractiveBaseProps &PolygonLayerOptions,'data' | 'fillOpacity' | 'layerId' | 'outlinePosition' | 'sourceId'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly data: MapPolygonData;readonly fillOpacity?: number | PolygonLayerOptions['fillOpacity'];diff --git a/packages/maptiler/src/MapPolyline.tsx b/packages/maptiler/src/MapPolyline.tsxindex 751ab4ed01..0ebbf08332 100644--- a/packages/maptiler/src/MapPolyline.tsx+++ b/packages/maptiler/src/MapPolyline.tsx@@ -31,6 +31,7 @@ export type MapPolylineData = MapPolylineFeature | PolylineLayerOptions['data'];export type MapPolylineProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> &Omit<PolylineLayerOptions, 'data' | 'layerId' | 'sourceId'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly data: MapPolylineData;readonly layerId: string;diff --git a/packages/maptiler/src/MapRegion.tsx b/packages/maptiler/src/MapRegion.tsxindex 9fdc8ae089..c53daab809 100644--- a/packages/maptiler/src/MapRegion.tsx+++ b/packages/maptiler/src/MapRegion.tsx@@ -23,6 +23,7 @@ export type MapRegionFeature = {type MapRegionProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly feature: MapRegionFeature;readonly fill?: number;diff --git a/packages/maptiler/src/MapRoute.tsx b/packages/maptiler/src/MapRoute.tsxindex 5ea89b71ef..2ed61a845e 100644--- a/packages/maptiler/src/MapRoute.tsx+++ b/packages/maptiler/src/MapRoute.tsx@@ -23,6 +23,7 @@ export type MapRouteFeature = {type MapRouteProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> & {+ readonly loop?: boolean;readonly controls?: SequenceControls;readonly feature: MapRouteFeature;readonly glow?: number;diff --git a/packages/maptiler/src/MapSource.tsx b/packages/maptiler/src/MapSource.tsxindex a25ab9a2d4..8fb9adcda1 100644--- a/packages/maptiler/src/MapSource.tsx+++ b/packages/maptiler/src/MapSource.tsx@@ -17,6 +17,7 @@ import {MapTilerContext} from './MapTilerContext';export type MapSourceProps = InteractiveBaseProps &Pick<InteractivePremountProps, 'premountFor' | 'postmountFor'> & {+ readonly loop?: boolean;readonly children?: ReactNode;readonly id: string;readonly source: SourceSpecification;diff --git a/packages/maptiler/src/MapViewport.tsx b/packages/maptiler/src/MapViewport.tsxindex af40e2be8d..4850fe717b 100644--- a/packages/maptiler/src/MapViewport.tsx+++ b/packages/maptiler/src/MapViewport.tsx@@ -38,6 +38,7 @@ export type MapViewportProps = InteractiveBaseProps &InteractiveCropProps &InteractivePremountProps &InteractiveTransformProps & {+ readonly loop?: boolean;readonly apiKey: string | null;readonly backgroundColor?: string;readonly bearing?: number;@@ -216,6 +217,7 @@ type MapViewportContentProps = Omit<| keyof InteractiveCropProps| keyof InteractivePremountProps| keyof InteractiveTransformProps+ | 'loop'| 'controls'> & {readonly style?: CSSProperties;diff --git a/packages/motion-blur/src/HtmlInCanvasMotionBlur.tsx b/packages/motion-blur/src/HtmlInCanvasMotionBlur.tsxindex 462118dba1..f8227ecb6f 100644--- a/packages/motion-blur/src/HtmlInCanvasMotionBlur.tsx+++ b/packages/motion-blur/src/HtmlInCanvasMotionBlur.tsx@@ -15,6 +15,7 @@ import {export type HtmlInCanvasMotionBlurProps = InteractiveBaseProps &InteractivePremountProps & {+ readonly loop?: boolean;readonly children: React.ReactNode;readonly width: number;readonly height: number;diff --git a/packages/rive/src/RemotionRiveCanvas.tsx b/packages/rive/src/RemotionRiveCanvas.tsxindex 684ba200e9..dd5c2e8798 100644--- a/packages/rive/src/RemotionRiveCanvas.tsx+++ b/packages/rive/src/RemotionRiveCanvas.tsx@@ -63,8 +63,7 @@ type RemotionRiveCanvasOwnProps = {};export type RemotionRiveCanvasProps = RemotionRiveCanvasOwnProps &- InteractiveBaseProps &- InteractivePremountProps &+ InteractiveBaseProps & {readonly loop?: boolean} & InteractivePremountProps &InteractiveCropProps;export type RiveCanvasRef = {diff --git a/packages/rough-notation/src/Annotation.tsx b/packages/rough-notation/src/Annotation.tsxindex 19027a9b1b..5fbe04c26b 100644--- a/packages/rough-notation/src/Annotation.tsx+++ b/packages/rough-notation/src/Annotation.tsx@@ -37,8 +37,7 @@ type SharedAnnotationComponentProps = Readonly<type AnnotationInteractiveProps<Config> = SharedAnnotationComponentProps &Readonly<Config> &- InteractiveBaseProps &- InteractivePremountProps;+ InteractiveBaseProps & {readonly loop?: boolean} & InteractivePremountProps;export type HighlightProps = AnnotationInteractiveProps<HighlightConfig>;export type UnderlineProps = AnnotationInteractiveProps<UnderlineConfig>;@@ -52,8 +51,9 @@ export type CircleProps = AnnotationInteractiveProps<>;type InternalAnnotationProps = SharedAnnotationComponentProps &- InteractiveBaseProps &- InteractivePremountProps & {+ InteractiveBaseProps & {+ readonly loop?: boolean;+ } & InteractivePremountProps & {readonly color?: string;readonly strokeWidth?: number;readonly padding?: Partial<Padding>;diff --git a/packages/shapes/src/components/render-svg.tsx b/packages/shapes/src/components/render-svg.tsxindex 812b7158fa..e9d7fb43d4 100644--- a/packages/shapes/src/components/render-svg.tsx+++ b/packages/shapes/src/components/render-svg.tsx@@ -17,6 +17,7 @@ import {doesReactSupportTransformOriginProperty} from '../utils/does-react-suppotype ShapeSequenceProps = InteractiveBaseProps &InteractivePremountProps & {+ readonly loop?: boolean;readonly controls?: SequenceControls;};diff --git a/packages/starburst/src/Starburst.tsx b/packages/starburst/src/Starburst.tsxindex ec4b83def4..be6bc1f39f 100644--- a/packages/starburst/src/Starburst.tsx+++ b/packages/starburst/src/Starburst.tsx@@ -21,6 +21,7 @@ export type StarburstProps = InteractiveBaseProps &InteractivePremountProps &Pick<SequenceProps, 'width' | 'height'> &Pick<AbsoluteFillLayout, 'className'> & {+ readonly loop?: boolean;readonly rays: number;readonly colors: readonly string[];readonly rotation?: number;diff --git a/packages/three/src/ThreeCanvas.tsx b/packages/three/src/ThreeCanvas.tsxindex e1828464f5..56b96c3984 100644--- a/packages/three/src/ThreeCanvas.tsx+++ b/packages/three/src/ThreeCanvas.tsx@@ -22,10 +22,11 @@ import {validateDimension} from './validate';export type ThreeCanvasProps = Omit<React.ComponentProps<typeof Canvas>,- keyof InteractiveBaseProps+ keyof InteractiveBaseProps | 'loop'> &InteractiveBaseProps &InteractivePremountProps & {+ readonly loop?: boolean;readonly width: number;readonly height: number;readonly children: React.ReactNode;