@@ -8,7 +8,7 @@ const spacingSchema = z.enum(["none", "xs", "sm", "md", "lg", "xl", "xxl"]);
88const positionSchema = z . enum ( [ "relative" , "absolute" ] ) ;
99const alignSchema = z . enum ( [ "start" , "end" , "center" ] ) ;
1010const gravitySchema = z . enum ( [ "top" , "bottom" , "center" ] ) ;
11- const offsetSchema = z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / , "Format: '10px', '5%', '1em'" ) ;
11+ const offsetSchema = z . string ( ) . regex ( / ^ \d + p x $ / , "Format: '10px', '5%', '1em'" ) ;
1212const colorSchema = z . string ( ) . regex ( / ^ # [ 0 - 9 A - F a - f ] { 6 } $ / , "Hex format: '#FF0000'" ) ;
1313const flexWeightSchema = z . number ( ) ;
1414const scalingSchema = z . boolean ( ) ;
@@ -42,11 +42,11 @@ const textStyleFields = {
4242} ;
4343
4444const paddingFields = {
45- paddingAll : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
46- paddingTop : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
47- paddingBottom : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
48- paddingStart : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
49- paddingEnd : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
45+ paddingAll : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
46+ paddingTop : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
47+ paddingBottom : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
48+ paddingStart : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
49+ paddingEnd : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
5050} ;
5151
5252const flexActionSchema = z . discriminatedUnion ( "type" , [
@@ -191,11 +191,11 @@ const flexComponentSchema: z.ZodType<any> = z.lazy(() =>
191191 contents : z . array ( flexComponentSchema ) ,
192192 backgroundColor : colorSchema . optional ( ) ,
193193 borderColor : colorSchema . optional ( ) ,
194- borderWidth : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
195- cornerRadius : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
194+ borderWidth : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
195+ cornerRadius : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
196196 spacing : spacingSchema . optional ( ) ,
197- width : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
198- height : z . string ( ) . regex ( / ^ \d + ( p x | % | e m | r e m ) $ / ) . optional ( ) ,
197+ width : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
198+ height : z . string ( ) . regex ( / ^ \d + p x $ / ) . optional ( ) ,
199199 justifyContent : z . enum ( [ "flex-start" , "center" , "flex-end" , "space-between" , "space-around" , "space-evenly" ] ) . optional ( ) ,
200200 alignItems : z . enum ( [ "flex-start" , "center" , "flex-end" ] ) . optional ( ) ,
201201 background : z . object ( {
0 commit comments