Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

fix: registry

kapishdimae1528b5c76e5
diff --git a/registry-artifacts/drift.json b/registry-artifacts/drift.json
index 31ea575c..aa492227 100644
--- a/registry-artifacts/drift.json
+++ b/registry-artifacts/drift.json
@@ -7,7 +7,7 @@
"files": [
{
"path": "registry/remocn/drift/index.tsx",
- "content": "\"use client\";\n\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nexport function Drift({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return (\n <AbsoluteFill style={{ scale: `${scale}` }}>\n {children}\n </AbsoluteFill>\n );\n}\n",
+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nexport function Drift({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return <AbsoluteFill style={{ scale: `${scale}` }}>{children}</AbsoluteFill>;\n}\n",
"type": "registry:component",
"target": "components/remocn/drift.tsx"
}
diff --git a/registry-artifacts/elements/drift.json b/registry-artifacts/elements/drift.json
index f87e37c0..04ae0b03 100644
--- a/registry-artifacts/elements/drift.json
+++ b/registry-artifacts/elements/drift.json
@@ -8,7 +8,7 @@
"durationInFrames": 90,
"installationMode": "component-owned-sequence",
"slug": "drift",
- "sourceCode": "import { AbsoluteFill, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nfunction DriftBase({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return (\n <AbsoluteFill style={{ scale: `${scale}` }}>\n {children}\n </AbsoluteFill>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n grow: {\n type: \"number\",\n min: -0.1,\n max: 0.15,\n step: 0.005,\n default: 0.035,\n description: \"Grow\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"grow\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n grow: 0.035,\n speed: 1,\n};\n\ntype DriftElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof DriftBase>;\n\nconst DriftInner = forwardRef<\n HTMLDivElement,\n DriftElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Drift>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <DriftBase\n {...(componentProps as unknown as ComponentProps<typeof DriftBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Drift = Interactive.withSchema({\n Component: DriftInner,\n componentName: \"<Drift>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"
+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nfunction DriftBase({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return <AbsoluteFill style={{ scale: `${scale}` }}>{children}</AbsoluteFill>;\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n grow: {\n type: \"number\",\n min: -0.1,\n max: 0.15,\n step: 0.005,\n default: 0.035,\n description: \"Grow\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"grow\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n grow: 0.035,\n speed: 1,\n};\n\ntype DriftElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof DriftBase>;\n\nconst DriftInner = forwardRef<\n HTMLDivElement,\n DriftElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Drift>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <DriftBase\n {...(componentProps as unknown as ComponentProps<typeof DriftBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Drift = Interactive.withSchema({\n Component: DriftInner,\n componentName: \"<Drift>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"
},
"durationInFrames": 90
}