Skip to content

🎥 Make videos programmatically with React

`remotion`: Make componentIdentity optional in Interactive.withSchema()

JonnyBurger6805fa78b388
diff --git a/packages/brand/src/3DContext/Div3D.tsx b/packages/brand/src/3DContext/Div3D.tsx
index 22e87deeb8..8f3410f211 100644
--- a/packages/brand/src/3DContext/Div3D.tsx
+++ b/packages/brand/src/3DContext/Div3D.tsx
@@ -553,7 +553,6 @@ ExtrudeDivInner.displayName = '<ExtrudeDiv>';
export const ExtrudeDiv = Interactive.withSchema({
Component: ExtrudeDivInner,
componentName: '<ExtrudeDiv>',
- componentIdentity: null,
schema: extrudeDivSchema,
supportsEffects: false,
});
diff --git a/packages/brand/src/3DContext/transformation-context.tsx b/packages/brand/src/3DContext/transformation-context.tsx
index 09aaafbea1..9e664fd1b8 100644
--- a/packages/brand/src/3DContext/transformation-context.tsx
+++ b/packages/brand/src/3DContext/transformation-context.tsx
@@ -168,7 +168,6 @@ const make3DTransform = <ValueKey extends string>({
const Wrapped = Interactive.withSchema({
Component: Inner,
componentName,
- componentIdentity: null,
schema,
supportsEffects: false,
}) as unknown as React.FC<Props>;
diff --git a/packages/brand/src/Compose/WhatIsRemotion.tsx b/packages/brand/src/Compose/WhatIsRemotion.tsx
index ac6f08a19c..dec4b041ce 100644
--- a/packages/brand/src/Compose/WhatIsRemotion.tsx
+++ b/packages/brand/src/Compose/WhatIsRemotion.tsx
@@ -134,7 +134,6 @@ LabelInner.displayName = '<Label>';
const Label = Interactive.withSchema({
Component: LabelInner,
componentName: '<Label>',
- componentIdentity: null,
schema: labelSchema,
supportsEffects: false,
});
diff --git a/packages/core/src/with-interactivity-schema.ts b/packages/core/src/with-interactivity-schema.ts
index 6864b5c5c9..b506ec2916 100644
--- a/packages/core/src/with-interactivity-schema.ts
+++ b/packages/core/src/with-interactivity-schema.ts
@@ -165,7 +165,8 @@ export type WithInteractivitySchemaOptions<
Props & {readonly controls: SequenceControls | undefined}
>;
componentName: string;
- componentIdentity: JsxComponentIdentity | null;
+ /** @internal */
+ componentIdentity?: JsxComponentIdentity | null;
schema: S;
supportsEffects: boolean;
};
@@ -188,7 +189,7 @@ export const withInteractivitySchema = <
>({
Component,
componentName,
- componentIdentity,
+ componentIdentity = null,
schema,
supportsEffects,
}: WithInteractivitySchemaOptions<S, Props>): React.ComponentType<Props> => {
diff --git a/packages/docs/docs/interactive-with-schema.mdx b/packages/docs/docs/interactive-with-schema.mdx
index df10cc5041..878cf6f737 100644
--- a/packages/docs/docs/interactive-with-schema.mdx
+++ b/packages/docs/docs/interactive-with-schema.mdx
@@ -95,7 +95,6 @@ const CircleInner = forwardRef<
export const Circle = Interactive.withSchema({
Component: CircleInner,
componentName: '<Circle>',
- componentIdentity: 'com.example.Circle',
schema: circleSchema,
supportsEffects: false,
});
@@ -132,12 +131,6 @@ An [`InteractivitySchema`](/docs/interactivity-schema) that describes which prop
Use [`Interactive.baseSchema`](/docs/interactive#interactivebaseschema) for Sequence-like timeline props. Use [`Interactive.transformSchema`](/docs/interactive#interactivetransformschema) if the component accepts a `style` prop and should expose transform controls. Use [`Interactive.cropSchema`](/docs/interactive#interactivecropschema) with `InteractiveCropProps` to opt the component into crop controls.
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.
-### `componentIdentity`
-
-A stable string that identifies the component type.
-
-Use reverse-DNS style names such as `"com.example.Circle"`. Pass `null` if the component should not be identified for source updates.
-
### `supportsEffects`
Set to `true` if this component supports an `effects` prop. Otherwise, set it to `false`.
diff --git a/packages/docs/docs/studio/make-component-interactive.mdx b/packages/docs/docs/studio/make-component-interactive.mdx
index 3a44c97475..8f950c6581 100644
--- a/packages/docs/docs/studio/make-component-interactive.mdx
+++ b/packages/docs/docs/studio/make-component-interactive.mdx
@@ -169,8 +169,6 @@ Pass [`outlineRef`](/docs/sequence#outlineref) when using `<Sequence layout="non
## Wrap the component
-Set `componentIdentity` to `null` for a component defined in your project.
-
```tsx twoslash title="Badge.tsx"
import React, {forwardRef, useImperativeHandle, useRef} from 'react';
import {
@@ -259,7 +257,6 @@ const BadgeInner = forwardRef<
export const Badge = Interactive.withSchema({
Component: BadgeInner,
componentName: '<Badge>',
- componentIdentity: null,
schema: badgeSchema,
supportsEffects: false,
});
diff --git a/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx b/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx
index dad5741913..f31ad5f8ff 100644
--- a/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx
+++ b/packages/docs/elements/audio/mirrored-spectrum/mirrored-spectrum.tsx
@@ -171,7 +171,6 @@ const MirroredAudioSpectrumInner = forwardRef<
export const MirroredAudioSpectrum = Interactive.withSchema({
Component: MirroredAudioSpectrumInner,
componentName: '<MirroredAudioSpectrum>',
- componentIdentity: null,
schema: mirroredAudioSpectrumSchema,
supportsEffects: false,
}) as React.FC<MirroredAudioSpectrumProps>;
diff --git a/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx b/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx
index 674c5f640c..6faeb287fa 100644
--- a/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx
+++ b/packages/docs/elements/audio/oscilloscope/audio-oscilloscope.tsx
@@ -198,7 +198,6 @@ const AudioOscilloscopeInner = forwardRef<
export const AudioOscilloscope = Interactive.withSchema({
Component: AudioOscilloscopeInner,
componentName: '<AudioOscilloscope>',
- componentIdentity: null,
schema: audioOscilloscopeSchema,
supportsEffects: false,
}) as React.FC<AudioOscilloscopeProps>;
diff --git a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx
index df1a2adbe0..e3c0937651 100644
--- a/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx
+++ b/packages/docs/elements/audio/waveform-progress/audio-waveform-progress.tsx
@@ -236,7 +236,6 @@ const AudioWaveformProgressInner = forwardRef<
export const AudioWaveformProgress = Interactive.withSchema({
Component: AudioWaveformProgressInner,
componentName: '<AudioWaveformProgress>',
- componentIdentity: null,
schema: audioWaveformProgressSchema,
supportsEffects: false,
}) as React.FC<AudioWaveformProgressProps>;
diff --git a/packages/docs/elements/captions/basic-captions/basic-captions.tsx b/packages/docs/elements/captions/basic-captions/basic-captions.tsx
index 052332a3e1..8602b17a8b 100644
--- a/packages/docs/elements/captions/basic-captions/basic-captions.tsx
+++ b/packages/docs/elements/captions/basic-captions/basic-captions.tsx
@@ -157,7 +157,6 @@ const BasicCaptionsInner = forwardRef<
const BasicCaptionsLayer = Interactive.withSchema({
Component: BasicCaptionsInner,
componentName: '<BasicCaptions>',
- componentIdentity: null,
schema: basicCaptionsSchema,
supportsEffects: false,
}) as React.FC<BasicCaptionsProps>;
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.tsx
index 7aeee69352..4b0ac2d893 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
@@ -436,7 +436,6 @@ const MovingPillCaptionsInner = forwardRef<
const MovingPillCaptionsLayer = Interactive.withSchema({
Component: MovingPillCaptionsInner,
componentName: '<MovingPillCaptions>',
- componentIdentity: null,
schema: movingPillCaptionsSchema,
supportsEffects: false,
}) as React.FC<MovingPillCaptionsProps>;
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.tsx
index 7092367901..58330a98fe 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
@@ -347,7 +347,6 @@ const PoppingWordCaptionsInner = forwardRef<
const PoppingWordCaptionsLayer = Interactive.withSchema({
Component: PoppingWordCaptionsInner,
componentName: '<PoppingWordCaptions>',
- componentIdentity: null,
schema: poppingWordCaptionsSchema,
supportsEffects: false,
}) as React.FC<PoppingWordCaptionsProps>;
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.tsx
index 3fd5877e02..5a5c155821 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
@@ -305,7 +305,6 @@ const WordHighlightCaptionsInner = forwardRef<
const WordHighlightCaptionsLayer = Interactive.withSchema({
Component: WordHighlightCaptionsInner,
componentName: '<WordHighlightCaptions>',
- componentIdentity: null,
schema: wordHighlightCaptionsSchema,
supportsEffects: false,
}) as React.FC<WordHighlightCaptionsProps>;
diff --git a/packages/docs/elements/commerce/product-collection/product-collection.tsx b/packages/docs/elements/commerce/product-collection/product-collection.tsx
index 61e7d5d7c4..16c738f576 100644
--- a/packages/docs/elements/commerce/product-collection/product-collection.tsx
+++ b/packages/docs/elements/commerce/product-collection/product-collection.tsx
@@ -341,7 +341,6 @@ const ProductCardInner = forwardRef<
const ProductCard = Interactive.withSchema({
Component: ProductCardInner,
componentName: '<ProductCard>',
- componentIdentity: null,
schema: productCardSchema,
supportsEffects: false,
}) as React.FC<ProductCardProps>;
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.tsx
index e467800e95..714d152403 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
@@ -638,7 +638,6 @@ const MapFlyoverLayerInner = forwardRef<
const InteractiveMapFlyoverLayer = Interactive.withSchema({
Component: MapFlyoverLayerInner,
componentName: '<MapFlyover>',
- componentIdentity: null,
schema: mapFlyoverSchema,
supportsEffects: false,
}) as React.FC<MapFlyoverLayerProps>;
diff --git a/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx b/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx
index d4b31f146c..7bb29cca5a 100644
--- a/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx
+++ b/packages/docs/elements/maps/watercolor-map/watercolor-map.tsx
@@ -453,7 +453,6 @@ const WatercolorMapInner = forwardRef<
const InteractiveWatercolorMap = Interactive.withSchema({
Component: WatercolorMapInner,
componentName: '<WatercolorMap>',
- componentIdentity: null,
schema: watercolorMapSchema,
supportsEffects: false,
}) as React.FC<WatercolorMapProps>;
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.tsx
index 04f27a3171..7fa979743b 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
@@ -176,7 +176,6 @@ const SocialSafeZonesInner = forwardRef<
export const SocialSafeZones = Interactive.withSchema({
Component: SocialSafeZonesInner,
componentName: '<SocialSafeZones>',
- componentIdentity: null,
schema: socialSafeZonesSchema,
supportsEffects: false,
}) as React.FC<SocialSafeZonesProps>;
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.tsx
index 05344802d5..68449fee3b 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
@@ -175,7 +175,6 @@ const SpinningTextWheelInner = forwardRef<
const InteractiveSpinningTextWheel = Interactive.withSchema({
Component: SpinningTextWheelInner,
componentName: '<SpinningTextWheel>',
- componentIdentity: null,
schema: spinningTextWheelSchema,
supportsEffects: false,
}) as React.FC<InteractiveSpinningTextWheelProps>;
diff --git a/packages/example/src/CaptionsTester/AnimatedCaptions.tsx b/packages/example/src/CaptionsTester/AnimatedCaptions.tsx
index d8ab890953..b2e0d956d3 100644
--- a/packages/example/src/CaptionsTester/AnimatedCaptions.tsx
+++ b/packages/example/src/CaptionsTester/AnimatedCaptions.tsx
@@ -176,7 +176,6 @@ const AnimatedCaptionsInner = forwardRef<
export const AnimatedCaptions = Interactive.withSchema({
Component: AnimatedCaptionsInner,
componentName: '<AnimatedCaptions>',
- componentIdentity: null,
schema: animatedCaptionsSchema,
supportsEffects: false,
});
diff --git a/packages/example/src/InspectorControlLayoutE2e.tsx b/packages/example/src/InspectorControlLayoutE2e.tsx
index b8322a3b7a..4281fb4f1f 100644
--- a/packages/example/src/InspectorControlLayoutE2e.tsx
+++ b/packages/example/src/InspectorControlLayoutE2e.tsx
@@ -78,7 +78,6 @@ const InspectorControlLayoutInner: React.FC<
const InteractiveInspectorControlLayout = Interactive.withSchema({
Component: InspectorControlLayoutInner,
componentName: '<InspectorControlLayout>',
- componentIdentity: null,
schema: inspectorControlLayoutSchema,
supportsEffects: false,
}) as React.FC<InspectorControlLayoutProps>;
diff --git a/packages/example/src/mirrored-spectrum.element.tsx b/packages/example/src/mirrored-spectrum.element.tsx
index dad5741913..f31ad5f8ff 100644
--- a/packages/example/src/mirrored-spectrum.element.tsx
+++ b/packages/example/src/mirrored-spectrum.element.tsx
@@ -171,7 +171,6 @@ const MirroredAudioSpectrumInner = forwardRef<
export const MirroredAudioSpectrum = Interactive.withSchema({
Component: MirroredAudioSpectrumInner,
componentName: '<MirroredAudioSpectrum>',
- componentIdentity: null,
schema: mirroredAudioSpectrumSchema,
supportsEffects: false,
}) as React.FC<MirroredAudioSpectrumProps>;
diff --git a/packages/example/src/moving-pill-captions.element.tsx b/packages/example/src/moving-pill-captions.element.tsx
index fdc3f69981..efe7d0f376 100644
--- a/packages/example/src/moving-pill-captions.element.tsx
+++ b/packages/example/src/moving-pill-captions.element.tsx
@@ -479,7 +479,6 @@ const MovingPillCaptionsInner = forwardRef<
const MovingPillCaptionsLayer = Interactive.withSchema({
Component: MovingPillCaptionsInner,
componentName: '<MovingPillCaptions>',
- componentIdentity: null,
schema: movingPillCaptionsSchema,
supportsEffects: false,
}) as React.FC<MovingPillCaptionsLayerProps>;
diff --git a/packages/example/src/oscilloscope.element.tsx b/packages/example/src/oscilloscope.element.tsx
index be5e289a47..7e6da525a3 100644
--- a/packages/example/src/oscilloscope.element.tsx
+++ b/packages/example/src/oscilloscope.element.tsx
@@ -198,7 +198,6 @@ const AudioOscilloscopeInner = forwardRef<
export const AudioOscilloscope = Interactive.withSchema({
Component: AudioOscilloscopeInner,
componentName: '<AudioOscilloscope>',
- componentIdentity: null,
schema: audioOscilloscopeSchema,
supportsEffects: false,
}) as React.FC<AudioOscilloscopeProps>;
diff --git a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx b/packages/jonnys-videos/src/components/AnimatedCaptions.tsx
index 39838c8afb..6bd99538ac 100644
--- a/packages/jonnys-videos/src/components/AnimatedCaptions.tsx
+++ b/packages/jonnys-videos/src/components/AnimatedCaptions.tsx
@@ -482,7 +482,6 @@ const AnimatedCaptionsInner = forwardRef<
export const AnimatedCaptions = Interactive.withSchema({
Component: AnimatedCaptionsInner,
componentName: '<AnimatedCaptions>',
- componentIdentity: null,
schema: animatedCaptionsSchema,
supportsEffects: false,
}) as React.FC<AnimatedCaptionsProps>;
diff --git a/packages/maptiler/src/MapOverlay.tsx b/packages/maptiler/src/MapOverlay.tsx
index 6427d4732a..4589290f25 100644
--- a/packages/maptiler/src/MapOverlay.tsx
+++ b/packages/maptiler/src/MapOverlay.tsx
@@ -184,7 +184,6 @@ const MapOverlayInner = forwardRef(MapOverlayRefForwardingFunction);
export const MapOverlay = Interactive.withSchema({
Component: MapOverlayInner,
componentName: '<MapOverlay>',
- componentIdentity: null,
schema: mapOverlaySchema,
supportsEffects: false,
});
diff --git a/packages/maptiler/src/MapRegion.tsx b/packages/maptiler/src/MapRegion.tsx
index 94203ce96f..5fa77f2015 100644
--- a/packages/maptiler/src/MapRegion.tsx
+++ b/packages/maptiler/src/MapRegion.tsx
@@ -391,7 +391,6 @@ const MapRegionInner = forwardRef(MapRegionRefForwardingFunction);
export const MapRegion = Interactive.withSchema({
Component: MapRegionInner,
componentName: '<MapRegion>',
- componentIdentity: null,
schema: mapRegionSchema,
supportsEffects: false,
});
diff --git a/packages/maptiler/src/MapRoute.tsx b/packages/maptiler/src/MapRoute.tsx
index 3866842f1e..08997d00c1 100644
--- a/packages/maptiler/src/MapRoute.tsx
+++ b/packages/maptiler/src/MapRoute.tsx
@@ -319,7 +319,6 @@ const MapRouteInner = forwardRef(MapRouteRefForwardingFunction);
export const MapRoute = Interactive.withSchema({
Component: MapRouteInner,
componentName: '<MapRoute>',
- componentIdentity: null,
schema: mapRouteSchema,
supportsEffects: false,
});
diff --git a/packages/maptiler/src/MapViewport.tsx b/packages/maptiler/src/MapViewport.tsx
index c8f4cc8809..85d3e4f912 100644
--- a/packages/maptiler/src/MapViewport.tsx
+++ b/packages/maptiler/src/MapViewport.tsx
@@ -555,7 +555,6 @@ export const MapViewport: ComponentType<MapViewportProps> =
Interactive.withSchema({
Component: MapViewportInner,
componentName: '<MapViewport>',
- componentIdentity: null,
schema: mapViewportSchema,
supportsEffects: false,
});