🎥 Make videos programmatically with React
Make wrapInSequence explicit and include transforms
JonnyBurger055b79062a45
diff --git a/packages/codemods/src/basic-captions-element-source.ts b/packages/codemods/src/basic-captions-element-source.tsindex 357e4ba410..04d26f1ac7 100644--- a/packages/codemods/src/basic-captions-element-source.ts+++ b/packages/codemods/src/basic-captions-element-source.ts@@ -109,13 +109,13 @@ const basicCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;export const BasicCaptions = Interactive.withSchema({Component: BasicCaptionsContent,componentName: '<BasicCaptions>',schema: basicCaptionsSchema,+ wrapInSequence: true,});`;diff --git a/packages/core/src/Interactive.tsx b/packages/core/src/Interactive.tsxindex 84768405f5..c6d6d0de83 100644--- a/packages/core/src/Interactive.tsx+++ b/packages/core/src/Interactive.tsx@@ -294,6 +294,7 @@ type WithSchema = {WithSchemaReservedKey>;readonly defaultDurationInFrames?: number;+ readonly wrapInSequence: true;},): React.FC<React.ComponentPropsWithRef<Component> &@@ -315,14 +316,12 @@ type WithSchemaImplementationOptions = Omit<readonly Component: React.ComponentType<object>;readonly defaultDurationInFrames?: number;readonly supportsEffects?: boolean;- readonly wrapInSequence?: false;+ readonly wrapInSequence?: false | true;};const withSchema: WithSchema = (untypedOptions: unknown) => {const options = untypedOptions as WithSchemaImplementationOptions;- // `supportsEffects` was required by the previous API, where the component- // owned its Sequence. Keep that behavior for existing callers.- if ('supportsEffects' in options || options.wrapInSequence === false) {+ if (!options.wrapInSequence) {const LegacyWrapped = withInteractivitySchema(options as WithInteractivitySchemaOptions<InteractivitySchema, object>,);@@ -448,6 +447,7 @@ const withSchema: WithSchema = (untypedOptions: unknown) => {componentName,schema: {...schema,+ ...transformSchema,...baseSchema,...premountSchema,...cropSchema,diff --git a/packages/docs/docs/interactive-with-schema.mdx b/packages/docs/docs/interactive-with-schema.mdxindex cb80624aef..d4861cffb8 100644--- a/packages/docs/docs/interactive-with-schema.mdx+++ b/packages/docs/docs/interactive-with-schema.mdx@@ -33,7 +33,6 @@ const circleSchema = {default: '#0b84ff',description: 'Color',},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const CircleInner: React.FC<CircleProps> = ({radius = 80, color = '#0b84ff', style}) => {@@ -54,6 +53,7 @@ export const Circle = Interactive.withSchema({Component: CircleInner,componentName: '<Circle>',schema: circleSchema,+ wrapInSequence: true,});```@@ -85,12 +85,14 @@ Sets the default [`<Sequence>`](/docs/sequence) duration when no `durationInFramAn [`InteractivitySchema`](/docs/interactivity-schema) that describes which props are editable in Remotion Studio.-`Interactive.withSchema()` includes [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema) and [`Interactive.cropSchema`](/docs/interactive#interactivecropschema).--Use [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema) if the component should expose transform controls.+`Interactive.withSchema()` includes [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) and [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema).For reliable source updates, follow [Interactivity best practices](/docs/studio/interactivity-best-practices): Keep editable values inline, use hardcoded `interpolate()` keyframe arrays, use `translate`, `scale`, `rotate` and `opacity` directly, and avoid animated layout props or `transform` strings.+### `wrapInSequence`<AvailableFrom v="4.0.530" />++Set this to `true`.+### Return valueReturns a component with the public props of `Component`, the common [timing props](/docs/timing), [`InteractivePremountProps`](/docs/interactive#interactivepremountprops) and [`InteractiveCropProps`](/docs/interactive#interactivecropprops).diff --git a/packages/docs/docs/interactive.mdx b/packages/docs/docs/interactive.mdxindex 997b998238..b7e825d3e2 100644--- a/packages/docs/docs/interactive.mdx+++ b/packages/docs/docs/interactive.mdx@@ -82,7 +82,7 @@ Controls for transform-related style props:`style.transformOrigin`, `style.translate`, `style.scale`, `style.rotate` and `style.opacity`.-Use it for components that accept a `style` prop and apply it to the rendered element.+[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this schema.Keep these values inline in JSX if the Studio should edit or keyframe them.### `Interactive.cropSchema`<AvailableFrom v="4.0.500" />diff --git a/packages/docs/docs/interactivity-schema.mdx b/packages/docs/docs/interactivity-schema.mdxindex b9a6798dd4..019785fe4a 100644--- a/packages/docs/docs/interactivity-schema.mdx+++ b/packages/docs/docs/interactivity-schema.mdx@@ -16,10 +16,9 @@ This schema is not a Zod schema. Use [Zod schemas](/docs/schemas) for [`<Composi## Example```ts twoslash title="schema.ts"-import {Interactive, type InteractivitySchema} from 'remotion';+import type {InteractivitySchema} from 'remotion';export const titleCardSchema = {- ...Interactive.transformSchema,tint: {type: 'color',default: '#ffffff',@@ -50,6 +49,8 @@ This schema fragment is headless: it does not render an element or add layout, tTransform-related style props: `style.transformOrigin`, `style.translate`, `style.scale`, `style.rotate` and `style.opacity`.+[`Interactive.withSchema()`](/docs/interactive-with-schema) includes this fragment.+### `Interactive.cropSchema`<AvailableFrom v="4.0.500" />Controls for cropping a component from each edge: [`cropLeft`](/docs/sequence#cropleft), [`cropRight`](/docs/sequence#cropright), [`cropTop`](/docs/sequence#croptop) and [`cropBottom`](/docs/sequence#cropbottom).diff --git a/packages/docs/docs/studio/make-component-interactive.mdx b/packages/docs/docs/studio/make-component-interactive.mdxindex a76051d3c3..6edccb5233 100644--- a/packages/docs/docs/studio/make-component-interactive.mdx+++ b/packages/docs/docs/studio/make-component-interactive.mdx@@ -12,8 +12,8 @@ To make your component interactive too, wrap it with [`Interactive.withSchema()`## Create the component-Create any component. Make sure it accepts `style` and passes it on to its visual root.-Styles for transforming, premounting, and cropping will be applied.+Create any component. Make sure it accepts `style` and passes it on to its visual root.<br />+Styles for transforming, premounting, and cropping will be injected.```tsx twoslash title="Badge.tsx"import type React from 'react';@@ -49,7 +49,7 @@ export const BadgeInner: React.FC<BadgeProps> = ({children, color = '#0b84ff', pDefine an [`InteractivitySchema`](/docs/interactivity-schema) to declare the props that may be interactively edited.```tsx twoslash title="Badge.tsx"-import {Interactive, type InteractivitySchema} from 'remotion';+import type {InteractivitySchema} from 'remotion';const badgeSchema = {color: {@@ -65,17 +65,10 @@ const badgeSchema = {description: 'Padding',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;```-`Interactive.withSchema()` includes [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), which provides props such as `from`, `durationInFrames`, `trimBefore`, `freeze`, `playbackRate`, `name` and `showInTimeline`.--It also includes [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), allowing the component to be [premounted](/docs/player/premounting).--It includes [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) as well, allowing the component to be cropped from any side.--Include [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema) to allow 2D and 3D transformations.+`Interactive.withSchema()` includes [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) and [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema), which provide props such as `from`, `durationInFrames`, `trimBefore`, `freeze`, `playbackRate`, `name`, `premountFor`, `postmountFor`, `showInTimeline`, `cropLeft`, `cropTop`, `cropRight` and `cropBottom`.### Caption fields<AvailableFrom v="4.0.500" />@@ -138,13 +131,13 @@ const badgeSchema = {description: 'Padding',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;export const Badge = Interactive.withSchema({Component: BadgeInner,componentName: '<Badge>',schema: badgeSchema,+ wrapInSequence: true,});```diff --git a/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx b/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsxindex c98714ae61..5e76af9f6a 100644--- a/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx+++ b/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx@@ -48,7 +48,6 @@ const mirroredAudioSpectrumSchema = {description: 'Sensitivity',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const MirroredAudioSpectrumInner: React.FC<MirroredAudioSpectrumProps> = ({@@ -124,4 +123,5 @@ export const MirroredAudioSpectrum = Interactive.withSchema({Component: MirroredAudioSpectrumInner,componentName: '<MirroredAudioSpectrum>',schema: mirroredAudioSpectrumSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx b/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsxindex 66998fdf9d..114ca43423 100644--- a/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx+++ b/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx@@ -61,7 +61,6 @@ const audioOscilloscopeSchema = {description: 'Time window in seconds',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const AudioOscilloscopeInner: React.FC<AudioOscilloscopeProps> = ({@@ -140,4 +139,5 @@ export const AudioOscilloscope = Interactive.withSchema({Component: AudioOscilloscopeInner,componentName: '<AudioOscilloscope>',schema: audioOscilloscopeSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsxindex a73c4e24f7..759eb3f76d 100644--- a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx+++ b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx@@ -65,7 +65,6 @@ const audioWaveformProgressSchema = {description: 'Amplitude',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const AudioWaveformProgressContent: React.FC<{@@ -198,4 +197,5 @@ export const AudioWaveformProgress = Interactive.withSchema({componentName: '<AudioWaveformProgress>',defaultDurationInFrames: 271,schema: audioWaveformProgressSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/captions/basic-captions/basic-captions.tsx b/packages/docs/elements/captions/basic-captions/basic-captions.tsxindex c0174f3b27..1d36ae7163 100644--- a/packages/docs/elements/captions/basic-captions/basic-captions.tsx+++ b/packages/docs/elements/captions/basic-captions/basic-captions.tsx@@ -46,7 +46,6 @@ const basicCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const BasicCaptionsContent: React.FC<BasicCaptionsProps> = ({@@ -115,4 +114,5 @@ export const BasicCaptions = Interactive.withSchema({Component: BasicCaptionsContent,componentName: '<BasicCaptions>',schema: basicCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/captions/moving-pill-captions/moving-pill-captions.tsx b/packages/docs/elements/captions/moving-pill-captions/moving-pill-captions.tsxindex 73ad51e793..f3f691f953 100644--- a/packages/docs/elements/captions/moving-pill-captions/moving-pill-captions.tsx+++ b/packages/docs/elements/captions/moving-pill-captions/moving-pill-captions.tsx@@ -65,7 +65,6 @@ const movingPillCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const {fontFamily, waitUntilDone} = loadFont('normal', {@@ -379,4 +378,5 @@ export const MovingPillCaptions = Interactive.withSchema({Component: MovingPillCaptionsContent,componentName: '<MovingPillCaptions>',schema: movingPillCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx b/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsxindex 61d5d20e0f..c9fc3293aa 100644--- a/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx+++ b/packages/docs/elements/captions/popping-word-captions/popping-word-captions.tsx@@ -56,7 +56,6 @@ const poppingWordCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const {fontFamily, waitUntilDone} = loadFont('normal', {@@ -285,4 +284,5 @@ export const PoppingWordCaptions = Interactive.withSchema({Component: PoppingWordCaptionsContent,componentName: '<PoppingWordCaptions>',schema: poppingWordCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/captions/rounded-captions/rounded-captions.tsx b/packages/docs/elements/captions/rounded-captions/rounded-captions.tsxindex c8a409412c..b57c9a2829 100644--- a/packages/docs/elements/captions/rounded-captions/rounded-captions.tsx+++ b/packages/docs/elements/captions/rounded-captions/rounded-captions.tsx@@ -55,7 +55,6 @@ const roundedCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const {fontFamily, waitUntilDone} = loadFont('normal', {@@ -212,4 +211,5 @@ export const RoundedCaptions = Interactive.withSchema({Component: RoundedCaptionsContent,componentName: '<RoundedCaptions>',schema: roundedCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx b/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsxindex e3ab100889..5682727b95 100644--- a/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx+++ b/packages/docs/elements/captions/word-highlight-captions/word-highlight-captions.tsx@@ -53,7 +53,6 @@ const wordHighlightCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const {fontFamily, waitUntilDone} = loadFont('normal', {@@ -243,4 +242,5 @@ export const WordHighlightCaptions = Interactive.withSchema({Component: WordHighlightCaptionsContent,componentName: '<WordHighlightCaptions>',schema: wordHighlightCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/commerce/product-collection/product-collection.tsx b/packages/docs/elements/commerce/product-collection/product-collection.tsxindex d1c94e21ad..9ae1915132 100644--- a/packages/docs/elements/commerce/product-collection/product-collection.tsx+++ b/packages/docs/elements/commerce/product-collection/product-collection.tsx@@ -32,7 +32,6 @@ const productCardSchema = {},count: {type: 'hidden'},index: {type: 'hidden'},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const ProductCardInner: React.FC<ProductCardProps> = ({@@ -174,6 +173,7 @@ const ProductCard = Interactive.withSchema({Component: ProductCardInner,componentName: '<ProductCard>',schema: productCardSchema,+ wrapInSequence: true,});export const ProductCollection = () => {diff --git a/packages/docs/elements/guidelines.mdx b/packages/docs/elements/guidelines.mdxindex 9911708734..439d945b9b 100644--- a/packages/docs/elements/guidelines.mdx+++ b/packages/docs/elements/guidelines.mdx@@ -48,13 +48,13 @@ Use `installationMode: 'component-owned-sequence'` when Studio interactivity doe- Canvas-based Elements where individual outlines cannot be passed to Studio- Single-image overlays where the image itself cannot be edited-Wrap the exported component with [`Interactive.withSchema()`](/docs/interactive-with-schema). The user gets one timeline layer that they can trim. The component must accept a `style` prop and apply it to its visual root. To make it movable on the canvas, include [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema). The implementation does not appear as separate editable layers.+Wrap the exported component with [`Interactive.withSchema()`](/docs/interactive-with-schema) and set `wrapInSequence: true`. The user gets one timeline layer that they can trim. The component must accept a `style` prop and apply it to its visual root. The implementation does not appear as separate editable layers.Use `defaultDurationInFrames` to preserve a component-owned default duration.`Interactive.withSchema()`:-- Adds [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema), the corresponding props and a `<Sequence layout="none">`.+- Supplies [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema), [`Interactive.premountSchema`](/docs/interactive#interactivepremountschema), [`Interactive.cropSchema`](/docs/interactive#interactivecropschema), [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema), the corresponding props and a `<Sequence layout="none">`.- Premounting defaults to `0` frames in v4 and one second in v5. Pass `premountFor={0}` to opt out of the v5 default.- The wrapper merges the incoming `style` with active premounting or postmounting styles and the crop style last.- Pass `style` to the rendered element. Studio discovers its outline automatically. Set the dimensions in the component because Element metadata does not pass them as props.@@ -63,7 +63,7 @@ Use `defaultDurationInFrames` to preserve a component-owned default duration.Export the schema-enabled component directly, without another forwarding wrapper.-Check in Studio that the exported instance appears as one layer and can be trimmed. If it includes `Interactive.transformSchema`, also check that it can be moved. Do not use `component-owned-sequence` only to remove markup. Do not add padding only for a gallery preview.+Check in Studio that the exported instance appears as one layer, can be trimmed and can be moved. Do not use `component-owned-sequence` only to remove markup. Do not add padding only for a gallery preview.## Initial props@@ -89,7 +89,7 @@ Animate properties within the Element, such as translation, scale, and opacity;Elements are source-code copies designed for direct editing, not managed dependencies. Expose useful Studio controls in the Element's `Interactive` schema, but there is no need to mirror every implementation detail as a public prop.-Use [`Interactive.withSchema()`](/docs/interactive-with-schema) when useful controls can make the Element easier to edit. Controls should meaningfully edit the treatment; they may tune details but must not switch between unrelated visual styles.+Use [`Interactive.withSchema()`](/docs/interactive-with-schema) with `wrapInSequence: true` when useful controls can make the Element easier to edit. Controls should meaningfully edit the treatment; they may tune details but must not switch between unrelated visual styles.Give editable objects clear names, using a generic name such as `Container` for the main object and child controls only for separate editing targets.diff --git a/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx b/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsxindex c1ec9b4e1a..15a99f683a 100644--- a/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx+++ b/packages/docs/elements/maps/map-flyover/a-to-b-map-flyover.tsx@@ -73,7 +73,6 @@ const mapFlyoverSchema = {description: 'Route width',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const unwrapLongitude = (longitude: number, reference: number) => {@@ -594,4 +593,5 @@ export const MapFlyover = Interactive.withSchema({Component: MapFlyoverContent,componentName: '<MapFlyover>',schema: mapFlyoverSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx b/packages/docs/elements/maps/watercolor-map/watercolor-map.tsxindex d736de0ac7..0017e7e1d1 100644--- a/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx+++ b/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx@@ -75,7 +75,6 @@ const watercolorMapSchema = {description: 'Route width',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const getZoom = (origin: Coordinates, destination: Coordinates) => {@@ -393,4 +392,5 @@ export const WatercolorMap = Interactive.withSchema({Component: WatercolorMapContent,componentName: '<WatercolorMap>',schema: watercolorMapSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/overlays/social-safe-zones/social-safe-zones.tsx b/packages/docs/elements/overlays/social-safe-zones/social-safe-zones.tsxindex 91e344de78..07fedba60d 100644--- a/packages/docs/elements/overlays/social-safe-zones/social-safe-zones.tsx+++ b/packages/docs/elements/overlays/social-safe-zones/social-safe-zones.tsx@@ -21,7 +21,6 @@ const socialSafeZonesSchema = {tiktok: {},},},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const SocialSafeZonesInner: React.FC<SocialSafeZonesProps> = ({@@ -83,4 +82,5 @@ export const SocialSafeZones = Interactive.withSchema({Component: SocialSafeZonesInner,componentName: '<SocialSafeZones>',schema: socialSafeZonesSchema,+ wrapInSequence: true,});diff --git a/packages/docs/elements/text/spinning-text-wheel/spinning-text-wheel.tsx b/packages/docs/elements/text/spinning-text-wheel/spinning-text-wheel.tsxindex b2df40206c..ca2883e7c2 100644--- a/packages/docs/elements/text/spinning-text-wheel/spinning-text-wheel.tsx+++ b/packages/docs/elements/text/spinning-text-wheel/spinning-text-wheel.tsx@@ -46,7 +46,6 @@ const spinningTextWheelSchema = {...Interactive.textSchema['style.lineHeight'],default: 1,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const SpinningTextWheelInner: React.FC<SpinningTextWheelProps> = ({@@ -142,4 +141,5 @@ export const SpinningTextWheel = Interactive.withSchema({Component: SpinningTextWheelInner,componentName: '<SpinningTextWheel>',schema: spinningTextWheelSchema,+ wrapInSequence: true,});diff --git a/packages/example/src/mirrored-spectrum.element.tsx b/packages/example/src/mirrored-spectrum.element.tsxindex 5d10b97cbb..9534e12dfb 100644--- a/packages/example/src/mirrored-spectrum.element.tsx+++ b/packages/example/src/mirrored-spectrum.element.tsx@@ -48,7 +48,6 @@ const mirroredAudioSpectrumSchema = {description: 'Sensitivity',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const MirroredAudioSpectrumContent: React.FC<MirroredAudioSpectrumProps> = ({@@ -124,4 +123,5 @@ export const MirroredAudioSpectrum = Interactive.withSchema({Component: MirroredAudioSpectrumContent,componentName: '<MirroredAudioSpectrum>',schema: mirroredAudioSpectrumSchema,+ wrapInSequence: true,});diff --git a/packages/example/src/moving-pill-captions.element.tsx b/packages/example/src/moving-pill-captions.element.tsxindex e59113406d..b354efef36 100644--- a/packages/example/src/moving-pill-captions.element.tsx+++ b/packages/example/src/moving-pill-captions.element.tsx@@ -66,7 +66,6 @@ const movingPillCaptionsSchema = {description: 'Time between caption pages',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const {fontFamily, waitUntilDone} = loadFont('normal', {@@ -391,4 +390,5 @@ export const MovingPillCaptions = Interactive.withSchema({Component: MovingPillCaptionsContent,componentName: '<MovingPillCaptions>',schema: movingPillCaptionsSchema,+ wrapInSequence: true,});diff --git a/packages/example/src/oscilloscope.element.tsx b/packages/example/src/oscilloscope.element.tsxindex 8d9993120d..9fc9398cfa 100644--- a/packages/example/src/oscilloscope.element.tsx+++ b/packages/example/src/oscilloscope.element.tsx@@ -61,7 +61,6 @@ const audioOscilloscopeSchema = {description: 'Time window in seconds',hiddenFromList: false,},- ...Interactive.transformSchema,} as const satisfies InteractivitySchema;const AudioOscilloscopeContent: React.FC<AudioOscilloscopeProps> = ({@@ -140,4 +139,5 @@ export const AudioOscilloscope = Interactive.withSchema({Component: AudioOscilloscopeContent,componentName: '<AudioOscilloscope>',schema: audioOscilloscopeSchema,+ wrapInSequence: true,});diff --git a/packages/maptiler/src/MapViewport.tsx b/packages/maptiler/src/MapViewport.tsxindex 183905fa46..af40e2be8d 100644--- a/packages/maptiler/src/MapViewport.tsx+++ b/packages/maptiler/src/MapViewport.tsx@@ -8,6 +8,7 @@ import {type InteractiveBaseProps,type InteractiveCropProps,type InteractivePremountProps,+ type InteractiveTransformProps,type InteractivitySchema,type SequenceControls,} from 'remotion';@@ -35,7 +36,8 @@ export type MapAdministrativeBorders = 'all' | 'country-only' | 'none';export type MapViewportProps = InteractiveBaseProps &InteractiveCropProps &- InteractivePremountProps & {+ InteractivePremountProps &+ InteractiveTransformProps & {readonly apiKey: string | null;readonly backgroundColor?: string;readonly bearing?: number;@@ -213,6 +215,7 @@ type MapViewportContentProps = Omit<| keyof InteractiveBaseProps| keyof InteractiveCropProps| keyof InteractivePremountProps+ | keyof InteractiveTransformProps| 'controls'> & {readonly style?: CSSProperties;@@ -535,4 +538,5 @@ export const MapViewport: ComponentType<MapViewportProps> =Component: MapViewportContent,componentName: '<MapViewport>',schema: mapViewportSchema,+ wrapInSequence: true,});diff --git a/packages/skills/skills/remotion-interactivity/SKILL.md b/packages/skills/skills/remotion-interactivity/SKILL.mdindex 2113f3b319..d3a6accc34 100644--- a/packages/skills/skills/remotion-interactivity/SKILL.md+++ b/packages/skills/skills/remotion-interactivity/SKILL.md@@ -305,7 +305,7 @@ Render separate elements if one version should have effects and another should n## Making your own component interactive-`Interactive.withSchema()` adds `Interactive.baseSchema`, `Interactive.premountSchema` and `Interactive.cropSchema`, wraps the component in `<Sequence layout="none">` and exposes standard timeline, mounting and cropping controls. The component must accept a `style?: React.CSSProperties` prop and apply it to its visual root so the wrapper can apply premounting and crop styles.+Use `Interactive.withSchema()` and set `wrapInSequence: true`. It supplies `Interactive.baseSchema`, `Interactive.premountSchema`, `Interactive.cropSchema` and `Interactive.transformSchema`, wraps the component in `<Sequence layout="none">` and exposes standard timeline, mounting, cropping and transform controls. The component must accept a `style?: React.CSSProperties` prop and apply it to its visual root so the wrapper can apply premounting and crop styles.Use `defaultDurationInFrames` when the wrapped component needs a default duration.