Skip to content

🎥 Make videos programmatically with React

Merge branch 'v4' into Zod_Or_Null

Jonny Burger7087bc48efec
diff --cc packages/example/src/Video.tsx
index 393aff9570,ef1691cb19..d978513f7a
--- a/packages/example/src/Video.tsx
+++ b/packages/example/src/Video.tsx
@@@ -677,13 -677,13 +677,13 @@@ export const Index: React.FC = () =>
vehicle: z
.string()
.max(3, 'Too long')
- .refine((v) => ['caa', 'bus', 'truck'].includes(v)),
+ .refine((v) => ['car', 'bus', 'truck'].includes(v)),
other: z.string(),
abc: z.object({
- xyz: z.string(),
+ union: z.null().or(z.string()),
jkl: z.string(),
def: z.object({
- xyz: z.string(),
+ unionArray: z.array(z.null().or(z.string())),
pef: z.string(),
}),
}),
@@@ -708,16 -708,16 +708,17 @@@
supersuperlongvalueabcdefghji: z.string(),
})}
defaultProps={{
- vehicle: 'bus',
- other: 'hi',
+ vehicle: 'car' as const,
+ other: 'hi' as const,
abc: {
- def: {unionArray: ['someString', null], pef: 'hu'},
- jkl: 'sting',
- union: 'hello',
- def: {xyz: 'huthere' as const, pef: 'hu' as const},
++ union: null,
++ def: {unionArray: ['huthere' as const], pef: 'hu' as const},
+ jkl: 'sting' as const,
+ xyz: 'hi' as const,
},
array: [
- {a: 'a', b: 'bbbbb'},
- {a: 'a', b: 'b'},
+ {a: 'a' as const, b: 'bbbbb' as const},
+ {a: 'a' as const, b: 'b' as const},
],
array2: [[12], [12]],
mynum: 4,