@@ -1735,7 +1735,7 @@ function parseUnparsed(
17351735 tokenOrValue . value . name = `@${ tokenOrValue . value . name } ` ;
17361736 return unparsedFunction ( tokenOrValue , options ) ;
17371737 case "platformColor" :
1738- case "getPixelSizeForLayoutSize " :
1738+ case "pixelSizeForLayoutSize " :
17391739 case "roundToNearestPixel" :
17401740 case "pixelScale" :
17411741 case "fontScale" :
@@ -1747,14 +1747,6 @@ function parseUnparsed(
17471747 return unparsedFunction ( tokenOrValue , options ) ;
17481748 case "hairlineWidth" :
17491749 return [ { } , tokenOrValue . value . name , [ ] ] ;
1750- case "platformSelect" :
1751- case "fontScaleSelect" :
1752- case "pixelScaleSelect" :
1753- return parseRNRuntimeSpecificsFunction (
1754- tokenOrValue . value . name ,
1755- tokenOrValue . value . arguments ,
1756- options ,
1757- ) ;
17581750 case "calc" :
17591751 case "max" :
17601752 case "min" :
@@ -2580,82 +2572,6 @@ function parseGap(value: GapValue, options: ParserOptions) {
25802572 return parseLength ( value . value , options ) ;
25812573}
25822574
2583- function parseRNRuntimeSpecificsFunction (
2584- name : string ,
2585- args : TokenOrValue [ ] ,
2586- options : ParserOptions ,
2587- ) : StyleDescriptor {
2588- let key : string | undefined ;
2589- const runtimeArgs : Record < string , StyleDescriptor > = { } ;
2590-
2591- for ( const token of args ) {
2592- if ( ! key ) {
2593- if (
2594- token . type === "token" &&
2595- ( token . value . type === "ident" || token . value . type === "number" )
2596- ) {
2597- key = token . value . value . toString ( ) ;
2598- continue ;
2599- }
2600- } else {
2601- if ( token . type !== "token" ) {
2602- const value = parseUnparsed ( token , options ) ;
2603- if ( value === undefined ) {
2604- return ;
2605- }
2606- runtimeArgs [ key ] = value ;
2607- key = undefined ;
2608- } else {
2609- switch ( token . value . type ) {
2610- case "string" :
2611- case "number" :
2612- case "ident" : {
2613- if ( key ) {
2614- runtimeArgs [ key ] = parseUnparsed ( token , options ) ;
2615- key = undefined ;
2616- continue ;
2617- } else {
2618- return ;
2619- }
2620- }
2621- case "delim" :
2622- case "comma" :
2623- continue ;
2624- case "function" :
2625- case "at-keyword" :
2626- case "hash" :
2627- case "id-hash" :
2628- case "unquoted-url" :
2629- case "percentage" :
2630- case "dimension" :
2631- case "white-space" :
2632- case "comment" :
2633- case "colon" :
2634- case "semicolon" :
2635- case "include-match" :
2636- case "dash-match" :
2637- case "prefix-match" :
2638- case "suffix-match" :
2639- case "substring-match" :
2640- case "cdo" :
2641- case "cdc" :
2642- case "parenthesis-block" :
2643- case "square-bracket-block" :
2644- case "curly-bracket-block" :
2645- case "bad-url" :
2646- case "bad-string" :
2647- case "close-parenthesis" :
2648- case "close-square-bracket" :
2649- case "close-curly-bracket" :
2650- return undefined ;
2651- }
2652- }
2653- }
2654- }
2655-
2656- return [ { } , name , Object . entries ( runtimeArgs ) ] ;
2657- }
2658-
26592575function parseTextAlign ( textAlign : TextAlign , options : ParserOptions ) {
26602576 const allowed = new Set ( [ "auto" , "left" , "right" , "center" , "justify" ] ) ;
26612577 if ( allowed . has ( textAlign ) ) {
0 commit comments