🎥 Make videos programmatically with React
Fix formatting
Jonny Burger51b7b0929c46
diff --git a/packages/core/src/index.ts b/packages/core/src/index.tsindex 6d7a48fec0..680ac27099 100644--- a/packages/core/src/index.ts+++ b/packages/core/src/index.ts@@ -123,6 +123,7 @@ export type BundleState =checkMultipleRemotionVersions();export * from './AbsoluteFill.js';export * from './animated-image/index.js';+export type {AnyZodObject} from './any-zod-type.js';export {Artifact} from './Artifact.js';export {Audio, Html5Audio, RemotionAudioProps} from './audio/index.js';export type {LoopVolumeCurveBehavior} from './audio/use-audio-frame.js';@@ -172,7 +173,6 @@ export {Series} from './series/index.js';export * from './spring/index.js';export {staticFile} from './static-file.js';export * from './Still.js';-export type {AnyZodObject} from './any-zod-type.js';export type {PlayableMediaTag} from './timeline-position-state.js';export {useBufferState} from './use-buffer-state';export {useCurrentFrame} from './use-current-frame.js';diff --git a/packages/example/src/Root.tsx b/packages/example/src/Root.tsxindex 6912bfe272..3bb285aaf3 100644--- a/packages/example/src/Root.tsx+++ b/packages/example/src/Root.tsx@@ -66,7 +66,6 @@ import {schemaArrayTestSchema,schemaTestSchema,} from './SchemaTest';-import {ZodV4SchemaTest, zodV4Schema} from './ZodV4SchemaTest';import {Scripts} from './Scripts';import {WidthHeightSequences} from './Sequence/WidthHeightSequences';import CircleTest from './Shapes/CircleTest';@@ -110,6 +109,7 @@ import {VideoTesting} from './VideoTesting';import {WarpDemoOuter} from './WarpText';import {WarpDemo2} from './WarpText/demo2';import {WatchStaticDemo} from './watch-static';+import {ZodV4SchemaTest, zodV4Schema} from './ZodV4SchemaTest';if (alias !== 'alias') {throw new Error('should support TS aliases');diff --git a/packages/player/src/Player.tsx b/packages/player/src/Player.tsxindex 18c58faad7..03bedf09d2 100644--- a/packages/player/src/Player.tsx+++ b/packages/player/src/Player.tsx@@ -9,6 +9,7 @@ import React, {useState,} from 'react';import type {+ AnyZodObject,CompProps,LogLevel,PlayableMediaTag,@@ -16,7 +17,6 @@ import type {TimelineContextValue,} from 'remotion';import {Composition, Internals} from 'remotion';-import type {AnyZodObject} from 'remotion';import {PlayerEmitterProvider} from './EmitterProvider.js';import type {RenderMuteButton} from './MediaVolumeSlider.js';import type {diff --git a/packages/player/src/Thumbnail.tsx b/packages/player/src/Thumbnail.tsxindex 296cf9a269..52f4b9e07e 100644--- a/packages/player/src/Thumbnail.tsx+++ b/packages/player/src/Thumbnail.tsx@@ -12,9 +12,13 @@ import {useRef,useState,} from 'react';-import type {CompProps, LogLevel, TimelineContextValue} from 'remotion';+import type {+ AnyZodObject,+ CompProps,+ LogLevel,+ TimelineContextValue,+} from 'remotion';import {Internals, random} from 'remotion';-import type {AnyZodObject} from 'remotion';import {ThumbnailEmitterContext} from './emitter-context.js';import {ThumbnailEmitter} from './event-emitter.js';import type {ThumbnailMethods} from './player-methods.js';diff --git a/packages/react18-tests/src/test/ZodV3SchemaTest.tsx b/packages/react18-tests/src/test/ZodV3SchemaTest.tsxindex cf2c94f9fc..3e2c720117 100644--- a/packages/react18-tests/src/test/ZodV3SchemaTest.tsx+++ b/packages/react18-tests/src/test/ZodV3SchemaTest.tsx@@ -38,9 +38,7 @@ export const ZodV3SchemaTest: React.FC<z.infer<typeof zodV3Schema>> = ({<div style={{fontSize: 24, marginTop: 10}}>Count: {count} | Enabled: {String(enabled)} | Level: {level}</div>- <div style={{fontSize: 20, marginTop: 10}}>- Tags: {tags.join(', ')}- </div>+ <div style={{fontSize: 20, marginTop: 10}}>Tags: {tags.join(', ')}</div></div>);};diff --git a/packages/studio/src/api/create-composition.tsx b/packages/studio/src/api/create-composition.tsxindex dec8c1db3a..024c7e57d4 100644--- a/packages/studio/src/api/create-composition.tsx+++ b/packages/studio/src/api/create-composition.tsx@@ -1,6 +1,5 @@-import type {CompositionProps, StillProps} from 'remotion';+import type {AnyZodObject, CompositionProps, StillProps} from 'remotion';import {Composition, Still} from 'remotion';-import type {AnyZodObject} from 'remotion';export const createComposition =<Schema extends AnyZodObject, Props extends Record<string, unknown>>({diff --git a/packages/studio/src/api/helpers/calc-new-props.ts b/packages/studio/src/api/helpers/calc-new-props.tsindex f81611db01..88e12f7ad6 100644--- a/packages/studio/src/api/helpers/calc-new-props.ts+++ b/packages/studio/src/api/helpers/calc-new-props.ts@@ -1,6 +1,5 @@-import type {AnyComposition} from 'remotion';+import type {AnyComposition, AnyZodObject} from 'remotion';import {Internals, getRemotionEnvironment} from 'remotion';-import type {AnyZodObject} from 'remotion';export type UpdateDefaultPropsFunction = (currentValues: {schema: AnyZodObject | null;diff --git a/packages/studio/src/components/RenderModal/DataEditor.tsx b/packages/studio/src/components/RenderModal/DataEditor.tsxindex 3b06ce1fbc..688ef01ac5 100644--- a/packages/studio/src/components/RenderModal/DataEditor.tsx+++ b/packages/studio/src/components/RenderModal/DataEditor.tsx@@ -8,7 +8,6 @@ import React, {import type {_InternalTypes, SerializedJSONWithCustomFields} from 'remotion';import {getInputProps, Internals} from 'remotion';import {NoReactInternals} from 'remotion/no-react';-import {getZodSchemaType} from './SchemaEditor/zod-schema-type';import {FastRefreshContext} from '../../fast-refresh-context';import {StudioServerConnectionCtx} from '../../helpers/client-id';import {BACKGROUND, BORDER_COLOR, LIGHT_TEXT} from '../../helpers/colors';@@ -30,6 +29,7 @@ import {ZodNotInstalled,} from './SchemaEditor/SchemaErrorMessages';import {extractEnumJsonPaths} from './SchemaEditor/extract-enum-json-paths';+import {getZodSchemaType} from './SchemaEditor/zod-schema-type';import {WarningIndicatorButton} from './WarningIndicatorButton';import type {TypeCanSaveState} from './get-render-modal-warnings';import {@@ -49,7 +49,7 @@ export type State =value: Record<string, unknown>;validJSON: true;// eslint-disable-next-line @typescript-eslint/no-explicit-any- zodValidation: {success: boolean; error?: any};+ zodValidation: {success: boolean; error?: any};}| {str: string;@@ -174,7 +174,12 @@ export const DataEditor: React.FC<{return 'no-schema' as const;}- if (!(typeof (unresolvedComposition.schema as {safeParse?: unknown}).safeParse === 'function')) {+ if (+ !(+ typeof (unresolvedComposition.schema as {safeParse?: unknown})+ .safeParse === 'function'+ )+ ) {throw new Error('A value which is not a Zod schema was passed to `schema`',);@@ -192,7 +197,9 @@ export const DataEditor: React.FC<{return 'no-schema' as const;}- return (schema as {safeParse: (v: unknown) => {success: boolean; error?: unknown}}).safeParse(defaultProps);+ return (+ schema as {safeParse: (v: unknown) => {success: boolean; error?: unknown}}+ ).safeParse(defaultProps);}, [defaultProps, schema]);const setShowWarning: React.Dispatch<React.SetStateAction<boolean>> =diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaEditor.tsxindex 6abb1e93a0..04f13a00b1 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaEditor.tsx@@ -1,6 +1,5 @@import React, {useCallback, useEffect, useMemo, useState} from 'react';import {Internals} from 'remotion';-import {getZodSchemaType} from './zod-schema-type';import {setUnsavedProps} from '../../../helpers/document-title';import {useKeybinding} from '../../../helpers/use-keybinding';import {VERTICAL_SCROLLBAR_CLASSNAME} from '../../Menu/is-menu-item';@@ -15,6 +14,7 @@ import {deepEqual} from './deep-equal';import type {RevisionContextType} from './local-state';import {RevisionContext} from './local-state';import {defaultPropsEditorScrollableAreaRef} from './scroll-to-default-props-path';+import {getZodSchemaType} from './zod-schema-type';const scrollable: React.CSSProperties = {display: 'flex',diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsxindex 16fbcf005d..97122827be 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx@@ -1,5 +1,4 @@import React, {useCallback, useMemo, useState} from 'react';-import {getArrayElement} from './zod-schema-type';import {BACKGROUND, LIGHT_TEXT, LINE_COLOR} from '../../../helpers/colors';import {Plus} from '../../../icons/plus';import {@@ -9,6 +8,7 @@ import {import {Spacing} from '../../layout';import {fieldSetText} from '../layout';import {createZodValues} from './create-zod-values';+import {getArrayElement} from './zod-schema-type';export const VERTICAL_GUIDE_HEIGHT = 24;diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsxindex 6a18785a8b..38225a23ee 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx@@ -1,5 +1,4 @@import React, {useMemo, useState} from 'react';-import {getArrayElement} from './zod-schema-type';import {useZodIfPossible,useZodTypesIfPossible,@@ -14,6 +13,7 @@ import type {UpdaterFunction} from './ZodSwitch';import {createZodValues} from './create-zod-values';import {deepEqual} from './deep-equal';import {useLocalState} from './local-state';+import {getArrayElement} from './zod-schema-type';import type {JSONPath} from './zod-types';// eslint-disable-next-line @typescript-eslint/no-explicit-anydiff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDefaultEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDefaultEditor.tsxindex 700335311a..1bc893217c 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDefaultEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDefaultEditor.tsx@@ -1,8 +1,8 @@import React from 'react';import {getInnerType} from './zod-schema-type';+import type {JSONPath} from './zod-types';import type {UpdaterFunction} from './ZodSwitch';import {ZodSwitch} from './ZodSwitch';-import type {JSONPath} from './zod-types';// eslint-disable-next-line @typescript-eslint/no-explicit-anyexport const ZodDefaultEditor: React.FC<{diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.tsxindex b42b2e947d..9c4b239c9b 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.tsx@@ -13,12 +13,12 @@ import {ZodObjectEditor} from './ZodObjectEditor';import type {UpdaterFunction} from './ZodSwitch';import {createZodValues} from './create-zod-values';import {useLocalState} from './local-state';-import type {JSONPath} from './zod-types';import {- getDiscriminator,- getDiscriminatedOptionKeys,getDiscriminatedOption,+ getDiscriminatedOptionKeys,+ getDiscriminator,} from './zod-schema-type';+import type {JSONPath} from './zod-types';// eslint-disable-next-line @typescript-eslint/no-explicit-anyexport const ZodDiscriminatedUnionEditor: React.FC<{@@ -77,15 +77,13 @@ export const ZodDiscriminatedUnionEditor: React.FC<{label: option,id: option,keyHint: null,- leftItem:- option === value[discriminator] ? <Checkmark /> : null,+ leftItem: option === value[discriminator] ? <Checkmark /> : null,onClick: () => {const optionSchema = getDiscriminatedOption(schema, option);- const val = createZodValues(- optionSchema,- z,- zodTypes,- ) as Record<string, unknown>;+ const val = createZodValues(optionSchema, z, zodTypes) as Record<+ string,+ unknown+ >;setLocalValue(() => val, false, false);},quickSwitcherLabel: null,@@ -93,15 +91,7 @@ export const ZodDiscriminatedUnionEditor: React.FC<{type: 'item',};});- }, [- options,- setLocalValue,- discriminator,- schema,- value,- z,- zodTypes,- ]);+ }, [options, setLocalValue, discriminator, schema, value, z, zodTypes]);const save = useCallback(() => {onSave(() => value, false, false);@@ -116,8 +106,7 @@ export const ZodDiscriminatedUnionEditor: React.FC<{<SchemaLabelhandleClick={null}isDefaultValue={- localValue.value[discriminator] ===- defaultValue[discriminator]+ localValue.value[discriminator] === defaultValue[discriminator]}jsonPath={[...jsonPath, discriminator]}onRemove={onRemove}diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodEffectEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodEffectEditor.tsxindex ab4f9106ba..a8834bc59c 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodEffectEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodEffectEditor.tsx@@ -1,10 +1,10 @@import React from 'react';-import {getEffectsInner, getZodSchemaType} from './zod-schema-type';import {Fieldset} from './Fieldset';import {ZodFieldValidation} from './ZodFieldValidation';import type {UpdaterFunction} from './ZodSwitch';import {ZodSwitch} from './ZodSwitch';import {useLocalState} from './local-state';+import {getEffectsInner, getZodSchemaType} from './zod-schema-type';import type {JSONPath} from './zod-types';const fullWidth: React.CSSProperties = {diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodEnumEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodEnumEditor.tsxindex 8caf0af415..eda8d85967 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodEnumEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodEnumEditor.tsx@@ -7,8 +7,8 @@ import {SchemaLabel} from './SchemaLabel';import {ZodFieldValidation} from './ZodFieldValidation';import type {UpdaterFunction} from './ZodSwitch';import {useLocalState} from './local-state';-import type {JSONPath} from './zod-types';import {getEnumValues} from './zod-schema-type';+import type {JSONPath} from './zod-types';const container: React.CSSProperties = {width: '100%',diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsxindex e8ed7d8f40..920735158d 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodErrorMessages.tsx@@ -46,33 +46,37 @@ export const ZodErrorMessages: React.FC<{if (viewTab === 'json') {return (<div>- {zodValidationResult.error.errors.map((error: {path: (string | number)[]; message: string}) => {- return (- <div key={error.path.join('.')} style={style}>- <WarningTriangle style={triangleStyle} />- <Spacing x={1} />- {error.path.length === 0 ? 'Root' : error.path.join('.')}:{' '}- {error.message}- </div>- );- })}+ {zodValidationResult.error.errors.map(+ (error: {path: (string | number)[]; message: string}) => {+ return (+ <div key={error.path.join('.')} style={style}>+ <WarningTriangle style={triangleStyle} />+ <Spacing x={1} />+ {error.path.length === 0 ? 'Root' : error.path.join('.')}:{' '}+ {error.message}+ </div>+ );+ },+ )}</div>);}return (<div>- {zodValidationResult.error.errors.map((error: {path: (string | number)[]; message: string}) => {- return (- <div key={error.path.join('.')} style={style}>- -{' '}- <code style={code}>- {error.path.length === 0 ? 'Root' : error.path.join('.')}- </code>- : {error.message}- </div>- );- })}+ {zodValidationResult.error.errors.map(+ (error: {path: (string | number)[]; message: string}) => {+ return (+ <div key={error.path.join('.')} style={style}>+ -{' '}+ <code style={code}>+ {error.path.length === 0 ? 'Root' : error.path.join('.')}+ </code>+ : {error.message}+ </div>+ );+ },+ )}</div>);};diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodFieldValidation.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodFieldValidation.tsxindex 04ce1d848a..218d72423e 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodFieldValidation.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodFieldValidation.tsx@@ -37,15 +37,17 @@ export const ZodFieldValidation: React.FC<{<InfoBubble title="Zod validation failure"><div style={stackTrace}><div style={stackTraceLabel}>Zod Validation has failed:</div>- {localValue.zodValidation.error.errors.map((error: {code: string; message: string}, index: number) => (- // eslint-disable-next-line react/no-array-index-key- <div key={index} style={stackTraceLabel}>- Type: {error.code} <br />- Message: {error.message}- <br />- Path: {path.join('.')}- </div>- ))}+ {localValue.zodValidation.error.errors.map(+ (error: {code: string; message: string}, index: number) => (+ // eslint-disable-next-line react/no-array-index-key+ <div key={index} style={stackTraceLabel}>+ Type: {error.code} <br />+ Message: {error.message}+ <br />+ Path: {path.join('.')}+ </div>+ ),+ )}</div></InfoBubble><Spacing x={0.5} />diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsxindex 31159e49a5..fb827e41cd 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx@@ -3,7 +3,6 @@ import {useZodIfPossible,useZodTypesIfPossible,} from '../../get-zod-if-possible';-import {getArrayElement} from './zod-schema-type';import {Fieldset} from './Fieldset';import {SchemaLabel} from './SchemaLabel';import {SchemaArrayItemSeparationLine} from './SchemaSeparationLine';@@ -14,6 +13,7 @@ import type {UpdaterFunction} from './ZodSwitch';import {createZodValues} from './create-zod-values';import {deepEqual} from './deep-equal';import {useLocalState} from './local-state';+import {getArrayElement} from './zod-schema-type';import type {JSONPath} from './zod-types';const rowStyle: React.CSSProperties = {diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodNumberEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodNumberEditor.tsxindex 1ada57a043..48ba438686 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodNumberEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodNumberEditor.tsx@@ -5,8 +5,8 @@ import {SchemaLabel} from './SchemaLabel';import {ZodFieldValidation} from './ZodFieldValidation';import type {UpdaterFunction} from './ZodSwitch';import {useLocalState} from './local-state';-import type {JSONPath} from './zod-types';import {isZodV3Schema} from './zod-schema-type';+import type {JSONPath} from './zod-types';const fullWidth: React.CSSProperties = {width: '100%',@@ -19,9 +19,7 @@ const getMinValue = (schema: any) => {if (isZodV3Schema(schema)) {// v3: {kind: "min", value: 0, inclusive: true}- const minCheck = checks.find(- (c: {kind: string}) => c.kind === 'min',- );+ const minCheck = checks.find((c: {kind: string}) => c.kind === 'min');if (!minCheck || !minCheck.inclusive) return -Infinity;return minCheck.value;}@@ -44,9 +42,7 @@ const getMaxValue = (schema: any) => {if (isZodV3Schema(schema)) {// v3: {kind: "max", value: 100, inclusive: true}- const maxCheck = checks.find(- (c: {kind: string}) => c.kind === 'max',- );+ const maxCheck = checks.find((c: {kind: string}) => c.kind === 'max');if (!maxCheck || !maxCheck.inclusive) return Infinity;return maxCheck.value;}diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsxindex d2771003e3..e1b38af015 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx@@ -1,5 +1,4 @@import React, {useMemo, useState} from 'react';-import {isZodV3Schema, getZodSchemaType} from './zod-schema-type';import {fieldsetLabel} from '../layout';import {Fieldset} from './Fieldset';import {SchemaLabel} from './SchemaLabel';@@ -9,6 +8,7 @@ import type {UpdaterFunction} from './ZodSwitch';import {ZodSwitch} from './ZodSwitch';import {deepEqual} from './deep-equal';import {useLocalState} from './local-state';+import {getZodSchemaType, isZodV3Schema} from './zod-schema-type';import type {JSONPath} from './zod-types';export type ObjectDiscrimatedUnionReplacement = {diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodSwitch.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodSwitch.tsxindex 7016be331c..2055f27675 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodSwitch.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodSwitch.tsx@@ -1,9 +1,6 @@import React from 'react';import {useZodTypesIfPossible} from '../../get-zod-if-possible';-import {- getZodSchemaDescription,- getZodSchemaType,-} from './zod-schema-type';+import {getZodSchemaDescription, getZodSchemaType} from './zod-schema-type';import type {JSONPath} from './zod-types';import {ZodArrayEditor} from './ZodArrayEditor';import {ZodBooleanEditor} from './ZodBooleanEditor';diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/ZodUnionEditor.tsx b/packages/studio/src/components/RenderModal/SchemaEditor/ZodUnionEditor.tsxindex 6b69ee10d9..66914b2dc1 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/ZodUnionEditor.tsx+++ b/packages/studio/src/components/RenderModal/SchemaEditor/ZodUnionEditor.tsx@@ -1,8 +1,8 @@import {ZonNonEditableValue} from './ZodNonEditableValue';import {ZodOrNullishEditor} from './ZodOrNullishEditor';import type {UpdaterFunction} from './ZodSwitch';-import type {JSONPath} from './zod-types';import {getZodSchemaType} from './zod-schema-type';+import type {JSONPath} from './zod-types';// eslint-disable-next-line @typescript-eslint/no-explicit-anyconst findNull = (value: readonly any[]) => {diff --git a/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts b/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.tsindex 6a69d9fe9b..012dd7791a 100644--- a/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts+++ b/packages/studio/src/components/RenderModal/SchemaEditor/create-zod-values.ts@@ -37,15 +37,13 @@ export const createZodValues = (if (isZodV3Schema(schema)) {for (const check of checks) {if (check.kind === 'min') return check.value;- if (check.kind === 'max' && check.value < 0)- return check.value;+ if (check.kind === 'max' && check.value < 0) return check.value;}} else {for (const check of checks) {const cd = check._zod?.def;if (cd?.check === 'greater_than') return cd.value;- if (cd?.check === 'less_than' && cd.value < 0)- return cd.value;+ if (cd?.check === 'less_than' && cd.value < 0) return cd.value;}}}@@ -79,11 +77,7 @@ export const createZodValues = (const keys = Object.keys(shape);const returnValue = keys.reduce((existing, key) => {- existing[key] = createZodValues(- shape[key],- zodRuntime,- zodTypes,- );+ existing[key] = createZodValues(shape[key], zodRuntime, zodTypes);return existing;},{} as Record<string, unknown>,diff --git a/packages/web-renderer/src/create-scaffold.tsx b/packages/web-renderer/src/create-scaffold.tsxindex a1320a5d22..7fe063a1db 100644--- a/packages/web-renderer/src/create-scaffold.tsx+++ b/packages/web-renderer/src/create-scaffold.tsx@@ -1,9 +1,14 @@import {createRef, type ComponentType} from 'react';import {flushSync} from 'react-dom';import ReactDOM from 'react-dom/client';-import type {Codec, DelayRenderScope, LogLevel, TRenderAsset} from 'remotion';+import type {+ AnyZodObject,+ Codec,+ DelayRenderScope,+ LogLevel,+ TRenderAsset,+} from 'remotion';import {Internals} from 'remotion';-import type {AnyZodObject} from 'remotion';import type {TimeUpdaterRef} from './update-time';import {UpdateTime} from './update-time';diff --git a/packages/web-renderer/src/props-if-has-props.ts b/packages/web-renderer/src/props-if-has-props.tsindex bfca486bbc..ca6b69edc9 100644--- a/packages/web-renderer/src/props-if-has-props.ts+++ b/packages/web-renderer/src/props-if-has-props.ts@@ -1,6 +1,5 @@import type {ComponentType} from 'react';-import type {CalculateMetadataFunction} from 'remotion';-import type {AnyZodObject} from 'remotion';+import type {AnyZodObject, CalculateMetadataFunction} from 'remotion';export type InferProps<Schema extends AnyZodObject,diff --git a/packages/web-renderer/src/render-media-on-web.tsx b/packages/web-renderer/src/render-media-on-web.tsxindex e139aa3286..4f8bb2a985 100644--- a/packages/web-renderer/src/render-media-on-web.tsx+++ b/packages/web-renderer/src/render-media-on-web.tsx@@ -1,8 +1,7 @@import {BufferTarget, StreamTarget} from 'mediabunny';-import type {CalculateMetadataFunction} from 'remotion';+import type {AnyZodObject, CalculateMetadataFunction} from 'remotion';import {Internals, type LogLevel} from 'remotion';import {VERSION} from 'remotion/version';-import type {AnyZodObject} from 'remotion';import {addAudioSample, addVideoSampleAndCloseFrame} from './add-sample';import {handleArtifacts, type WebRendererOnArtifact} from './artifact';import {onlyInlineAudio} from './audio';diff --git a/packages/web-renderer/src/render-still-on-web.tsx b/packages/web-renderer/src/render-still-on-web.tsxindex 413098a813..fc287a08f0 100644--- a/packages/web-renderer/src/render-still-on-web.tsx+++ b/packages/web-renderer/src/render-still-on-web.tsx@@ -1,9 +1,9 @@+import type {AnyZodObject} from 'remotion';import {Internals,type CalculateMetadataFunction,type LogLevel,} from 'remotion';-import type {AnyZodObject} from 'remotion';import type {WebRendererOnArtifact} from './artifact';import {handleArtifacts} from './artifact';import {checkForError, createScaffold} from './create-scaffold';