@mgcrea/react-native-tailwind 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var _vitest=require("vitest");var _layout=require("./layout");(0,_vitest.describe)("parseLayout - display utilities",function(){(0,_vitest.it)("should parse display flex",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).toEqual({display:"flex"});});(0,_vitest.it)("should parse display hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("hidden")).toEqual({display:"none"});});});(0,_vitest.describe)("parseLayout - flex direction utilities",function(){(0,_vitest.it)("should parse flex row",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row")).toEqual({flexDirection:"row"});});(0,_vitest.it)("should parse flex row reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row-reverse")).toEqual({flexDirection:"row-reverse"});});(0,_vitest.it)("should parse flex column",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col")).toEqual({flexDirection:"column"});});(0,_vitest.it)("should parse flex column reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col-reverse")).toEqual({flexDirection:"column-reverse"});});});(0,_vitest.describe)("parseLayout - flex wrap utilities",function(){(0,_vitest.it)("should parse flex wrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap")).toEqual({flexWrap:"wrap"});});(0,_vitest.it)("should parse flex wrap reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap-reverse")).toEqual({flexWrap:"wrap-reverse"});});(0,_vitest.it)("should parse flex nowrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-nowrap")).toEqual({flexWrap:"nowrap"});});});(0,_vitest.describe)("parseLayout - flex utilities",function(){(0,_vitest.it)("should parse flex-1",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-none",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});});(0,_vitest.describe)("parseLayout - flex grow/shrink utilities",function(){(0,_vitest.it)("should parse grow",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow")).toEqual({flexGrow:1});});(0,_vitest.it)("should parse grow-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow-0")).toEqual({flexGrow:0});});(0,_vitest.it)("should parse shrink",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).toEqual({flexShrink:1});});(0,_vitest.it)("should parse shrink-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink-0")).toEqual({flexShrink:0});});});(0,_vitest.describe)("parseLayout - justify content utilities",function(){(0,_vitest.it)("should parse justify-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-start")).toEqual({justifyContent:"flex-start"});});(0,_vitest.it)("should parse justify-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-end")).toEqual({justifyContent:"flex-end"});});(0,_vitest.it)("should parse justify-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-center")).toEqual({justifyContent:"center"});});(0,_vitest.it)("should parse justify-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-between")).toEqual({justifyContent:"space-between"});});(0,_vitest.it)("should parse justify-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-around")).toEqual({justifyContent:"space-around"});});(0,_vitest.it)("should parse justify-evenly",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-evenly")).toEqual({justifyContent:"space-evenly"});});});(0,_vitest.describe)("parseLayout - align items utilities",function(){(0,_vitest.it)("should parse items-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-start")).toEqual({alignItems:"flex-start"});});(0,_vitest.it)("should parse items-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-end")).toEqual({alignItems:"flex-end"});});(0,_vitest.it)("should parse items-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-center")).toEqual({alignItems:"center"});});(0,_vitest.it)("should parse items-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-baseline")).toEqual({alignItems:"baseline"});});(0,_vitest.it)("should parse items-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-stretch")).toEqual({alignItems:"stretch"});});});(0,_vitest.describe)("parseLayout - align self utilities",function(){(0,_vitest.it)("should parse self-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-auto")).toEqual({alignSelf:"auto"});});(0,_vitest.it)("should parse self-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-start")).toEqual({alignSelf:"flex-start"});});(0,_vitest.it)("should parse self-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-end")).toEqual({alignSelf:"flex-end"});});(0,_vitest.it)("should parse self-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-center")).toEqual({alignSelf:"center"});});(0,_vitest.it)("should parse self-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-stretch")).toEqual({alignSelf:"stretch"});});(0,_vitest.it)("should parse self-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-baseline")).toEqual({alignSelf:"baseline"});});});(0,_vitest.describe)("parseLayout - align content utilities",function(){(0,_vitest.it)("should parse content-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-start")).toEqual({alignContent:"flex-start"});});(0,_vitest.it)("should parse content-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-end")).toEqual({alignContent:"flex-end"});});(0,_vitest.it)("should parse content-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-center")).toEqual({alignContent:"center"});});(0,_vitest.it)("should parse content-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-between")).toEqual({alignContent:"space-between"});});(0,_vitest.it)("should parse content-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-around")).toEqual({alignContent:"space-around"});});(0,_vitest.it)("should parse content-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-stretch")).toEqual({alignContent:"stretch"});});});(0,_vitest.describe)("parseLayout - position utilities",function(){(0,_vitest.it)("should parse absolute",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});});(0,_vitest.it)("should parse relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("relative")).toEqual({position:"relative"});});});(0,_vitest.describe)("parseLayout - overflow utilities",function(){(0,_vitest.it)("should parse overflow-hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-hidden")).toEqual({overflow:"hidden"});});(0,_vitest.it)("should parse overflow-visible",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-visible")).toEqual({overflow:"visible"});});(0,_vitest.it)("should parse overflow-scroll",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-scroll")).toEqual({overflow:"scroll"});});});(0,_vitest.describe)("parseLayout - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_layout.parseLayout)("invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flex-invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("items")).toBeNull();});(0,_vitest.it)("should return null for empty string",function(){(0,_vitest.expect)((0,_layout.parseLayout)("")).toBeNull();});(0,_vitest.it)("should return null for partial class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("fle")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flexbox")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify-start-center")).toBeNull();});(0,_vitest.it)("should return null for CSS classes not in React Native",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inline")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inline-block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("grid")).toBeNull();});});(0,_vitest.describe)("parseLayout - comprehensive coverage",function(){(0,_vitest.it)("should handle all flex direction variants",function(){var directions=["flex-row","flex-row-reverse","flex-col","flex-col-reverse"];directions.forEach(function(dir){(0,_vitest.expect)((0,_layout.parseLayout)(dir)).toBeTruthy();});});(0,_vitest.it)("should handle all flex wrap variants",function(){var wraps=["flex-wrap","flex-wrap-reverse","flex-nowrap"];wraps.forEach(function(wrap){(0,_vitest.expect)((0,_layout.parseLayout)(wrap)).toBeTruthy();});});(0,_vitest.it)("should handle all justify content variants",function(){var justifies=["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly"];justifies.forEach(function(justify){(0,_vitest.expect)((0,_layout.parseLayout)(justify)).toBeTruthy();});});(0,_vitest.it)("should handle all align items variants",function(){var aligns=["items-start","items-end","items-center","items-baseline","items-stretch"];aligns.forEach(function(align){(0,_vitest.expect)((0,_layout.parseLayout)(align)).toBeTruthy();});});(0,_vitest.it)("should handle all align self variants",function(){var selfs=["self-auto","self-start","self-end","self-center","self-stretch","self-baseline"];selfs.forEach(function(self){(0,_vitest.expect)((0,_layout.parseLayout)(self)).toBeTruthy();});});(0,_vitest.it)("should handle all align content variants",function(){var contents=["content-start","content-end","content-center","content-between","content-around","content-stretch"];contents.forEach(function(content){(0,_vitest.expect)((0,_layout.parseLayout)(content)).toBeTruthy();});});(0,_vitest.it)("should handle all position variants",function(){var positions=["absolute","relative"];positions.forEach(function(position){(0,_vitest.expect)((0,_layout.parseLayout)(position)).toBeTruthy();});});(0,_vitest.it)("should handle all overflow variants",function(){var overflows=["overflow-hidden","overflow-visible","overflow-scroll"];overflows.forEach(function(overflow){(0,_vitest.expect)((0,_layout.parseLayout)(overflow)).toBeTruthy();});});});(0,_vitest.describe)("parseLayout - case sensitivity",function(){(0,_vitest.it)("should be case-sensitive",function(){(0,_vitest.expect)((0,_layout.parseLayout)("FLEX")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("Flex")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("ABSOLUTE")).toBeNull();});});(0,_vitest.describe)("parseLayout - z-index utilities",function(){(0,_vitest.it)("should parse z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-0")).toEqual({zIndex:0});(0,_vitest.expect)((0,_layout.parseLayout)("z-10")).toEqual({zIndex:10});(0,_vitest.expect)((0,_layout.parseLayout)("z-20")).toEqual({zIndex:20});(0,_vitest.expect)((0,_layout.parseLayout)("z-30")).toEqual({zIndex:30});(0,_vitest.expect)((0,_layout.parseLayout)("z-40")).toEqual({zIndex:40});(0,_vitest.expect)((0,_layout.parseLayout)("z-50")).toEqual({zIndex:50});});(0,_vitest.it)("should parse z-auto as 0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-auto")).toEqual({zIndex:0});});(0,_vitest.it)("should parse arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[999]")).toEqual({zIndex:999});(0,_vitest.expect)((0,_layout.parseLayout)("z-[100]")).toEqual({zIndex:100});(0,_vitest.expect)((0,_layout.parseLayout)("z-[1]")).toEqual({zIndex:1});});(0,_vitest.it)("should parse negative arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[-1]")).toEqual({zIndex:-1});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-10]")).toEqual({zIndex:-10});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-999]")).toEqual({zIndex:-999});});(0,_vitest.it)("should return null for invalid z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-5")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-invalid")).toBeNull();});});(0,_vitest.describe)("parseLayout - positioning utilities",function(){(0,_vitest.it)("should parse top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toEqual({top:16});(0,_vitest.expect)((0,_layout.parseLayout)("top-8")).toEqual({top:32});(0,_vitest.expect)((0,_layout.parseLayout)("top-16")).toEqual({top:64});});(0,_vitest.it)("should parse right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-0")).toEqual({right:0});(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toEqual({right:16});(0,_vitest.expect)((0,_layout.parseLayout)("right-8")).toEqual({right:32});(0,_vitest.expect)((0,_layout.parseLayout)("right-16")).toEqual({right:64});});(0,_vitest.it)("should parse bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-0")).toEqual({bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toEqual({bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-8")).toEqual({bottom:32});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-16")).toEqual({bottom:64});});(0,_vitest.it)("should parse left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toEqual({left:16});(0,_vitest.expect)((0,_layout.parseLayout)("left-8")).toEqual({left:32});(0,_vitest.expect)((0,_layout.parseLayout)("left-16")).toEqual({left:64});});(0,_vitest.it)("should parse fractional positioning values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0.5")).toEqual({top:2});(0,_vitest.expect)((0,_layout.parseLayout)("right-1.5")).toEqual({right:6});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-2.5")).toEqual({bottom:10});(0,_vitest.expect)((0,_layout.parseLayout)("left-3.5")).toEqual({left:14});});(0,_vitest.it)("should parse auto positioning values as empty object",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("right-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("left-auto")).toEqual({});});(0,_vitest.it)("should parse arbitrary top values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50px]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100px]")).toEqual({top:100});(0,_vitest.expect)((0,_layout.parseLayout)("top-[0px]")).toEqual({top:0});});(0,_vitest.it)("should parse arbitrary top values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100]")).toEqual({top:100});});(0,_vitest.it)("should parse arbitrary top values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[25%]")).toEqual({top:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[50%]")).toEqual({top:"50%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[10.5%]")).toEqual({top:"10.5%"});});(0,_vitest.it)("should parse negative arbitrary top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[-10px]")).toEqual({top:-10});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-50]")).toEqual({top:-50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-25%]")).toEqual({top:"-25%"});});(0,_vitest.it)("should parse arbitrary right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-[30px]")).toEqual({right:30});(0,_vitest.expect)((0,_layout.parseLayout)("right-[20]")).toEqual({right:20});(0,_vitest.expect)((0,_layout.parseLayout)("right-[15%]")).toEqual({right:"15%"});(0,_vitest.expect)((0,_layout.parseLayout)("right-[-10px]")).toEqual({right:-10});});(0,_vitest.it)("should parse arbitrary bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[40px]")).toEqual({bottom:40});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[25]")).toEqual({bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[33.333%]")).toEqual({bottom:"33.333%"});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[-15px]")).toEqual({bottom:-15});});(0,_vitest.it)("should parse arbitrary left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-[60px]")).toEqual({left:60});(0,_vitest.expect)((0,_layout.parseLayout)("left-[45]")).toEqual({left:45});(0,_vitest.expect)((0,_layout.parseLayout)("left-[12.5%]")).toEqual({left:"12.5%"});(0,_vitest.expect)((0,_layout.parseLayout)("left-[-20px]")).toEqual({left:-20});});});(0,_vitest.describe)("parseLayout - inset utilities",function(){(0,_vitest.it)("should parse inset (all sides) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0")).toEqual({top:0,right:0,bottom:0,left:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-4")).toEqual({top:16,right:16,bottom:16,left:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-8")).toEqual({top:32,right:32,bottom:32,left:32});});(0,_vitest.it)("should parse inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-0")).toEqual({left:0,right:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-4")).toEqual({left:16,right:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-8")).toEqual({left:32,right:32});});(0,_vitest.it)("should parse inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-0")).toEqual({top:0,bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-4")).toEqual({top:16,bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-8")).toEqual({top:32,bottom:32});});(0,_vitest.it)("should parse fractional inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0.5")).toEqual({top:2,right:2,bottom:2,left:2});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-1.5")).toEqual({left:6,right:6});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-2.5")).toEqual({top:10,bottom:10});});(0,_vitest.it)("should return null for invalid inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-100")).toBeNull();});(0,_vitest.it)("should parse arbitrary inset (all sides) values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10px]")).toEqual({top:10,right:10,bottom:10,left:10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25px]")).toEqual({top:25,right:25,bottom:25,left:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[0px]")).toEqual({top:0,right:0,bottom:0,left:0});});(0,_vitest.it)("should parse arbitrary inset values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[15]")).toEqual({top:15,right:15,bottom:15,left:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[30]")).toEqual({top:30,right:30,bottom:30,left:30});});(0,_vitest.it)("should parse arbitrary inset values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10%]")).toEqual({top:"10%",right:"10%",bottom:"10%",left:"10%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25%]")).toEqual({top:"25%",right:"25%",bottom:"25%",left:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[5.5%]")).toEqual({top:"5.5%",right:"5.5%",bottom:"5.5%",left:"5.5%"});});(0,_vitest.it)("should parse arbitrary inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[20px]")).toEqual({left:20,right:20});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[15]")).toEqual({left:15,right:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[10%]")).toEqual({left:"10%",right:"10%"});});(0,_vitest.it)("should parse arbitrary inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[30px]")).toEqual({top:30,bottom:30});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[25]")).toEqual({top:25,bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[15%]")).toEqual({top:"15%",bottom:"15%"});});(0,_vitest.it)("should parse negative arbitrary inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-5px]")).toEqual({top:-5,right:-5,bottom:-5,left:-5});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[-10px]")).toEqual({left:-10,right:-10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[-15px]")).toEqual({top:-15,bottom:-15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-20%]")).toEqual({top:"-20%",right:"-20%",bottom:"-20%",left:"-20%"});});});(0,_vitest.describe)("parseLayout - specific property coverage",function(){(0,_vitest.it)("should return unique objects for each class",function(){var flex1=(0,_layout.parseLayout)("flex");var flex2=(0,_layout.parseLayout)("flex");(0,_vitest.expect)(flex1).toEqual(flex2);});(0,_vitest.it)("should handle flex value variations",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});(0,_vitest.it)("should distinguish between similar class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).not.toEqual((0,_layout.parseLayout)("flex-1"));(0,_vitest.expect)((0,_layout.parseLayout)("grow")).not.toEqual((0,_layout.parseLayout)("grow-0"));(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).not.toEqual((0,_layout.parseLayout)("shrink-0"));});(0,_vitest.it)("should handle positioning with absolute/relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});});(0,_vitest.it)("should handle all positioning directions",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toHaveProperty("top");(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toHaveProperty("right");(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toHaveProperty("bottom");(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toHaveProperty("left");});(0,_vitest.it)("should handle inset shorthand variations",function(){var insetAll=(0,_layout.parseLayout)("inset-4");(0,_vitest.expect)(insetAll).toHaveProperty("top",16);(0,_vitest.expect)(insetAll).toHaveProperty("right",16);(0,_vitest.expect)(insetAll).toHaveProperty("bottom",16);(0,_vitest.expect)(insetAll).toHaveProperty("left",16);var insetX=(0,_layout.parseLayout)("inset-x-4");(0,_vitest.expect)(insetX).toHaveProperty("left",16);(0,_vitest.expect)(insetX).toHaveProperty("right",16);(0,_vitest.expect)(insetX).not.toHaveProperty("top");(0,_vitest.expect)(insetX).not.toHaveProperty("bottom");var insetY=(0,_layout.parseLayout)("inset-y-4");(0,_vitest.expect)(insetY).toHaveProperty("top",16);(0,_vitest.expect)(insetY).toHaveProperty("bottom",16);(0,_vitest.expect)(insetY).not.toHaveProperty("left");(0,_vitest.expect)(insetY).not.toHaveProperty("right");});});
1
+ var _vitest=require("vitest");var _layout=require("./layout");(0,_vitest.describe)("parseLayout - display utilities",function(){(0,_vitest.it)("should parse display flex",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).toEqual({display:"flex"});});(0,_vitest.it)("should parse display hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("hidden")).toEqual({display:"none"});});});(0,_vitest.describe)("parseLayout - flex direction utilities",function(){(0,_vitest.it)("should parse flex row",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row")).toEqual({flexDirection:"row"});});(0,_vitest.it)("should parse flex row reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row-reverse")).toEqual({flexDirection:"row-reverse"});});(0,_vitest.it)("should parse flex column",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col")).toEqual({flexDirection:"column"});});(0,_vitest.it)("should parse flex column reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col-reverse")).toEqual({flexDirection:"column-reverse"});});});(0,_vitest.describe)("parseLayout - flex wrap utilities",function(){(0,_vitest.it)("should parse flex wrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap")).toEqual({flexWrap:"wrap"});});(0,_vitest.it)("should parse flex wrap reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap-reverse")).toEqual({flexWrap:"wrap-reverse"});});(0,_vitest.it)("should parse flex nowrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-nowrap")).toEqual({flexWrap:"nowrap"});});});(0,_vitest.describe)("parseLayout - flex utilities",function(){(0,_vitest.it)("should parse flex-1",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-none",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});});(0,_vitest.describe)("parseLayout - flex grow/shrink utilities",function(){(0,_vitest.it)("should parse grow",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow")).toEqual({flexGrow:1});});(0,_vitest.it)("should parse grow-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow-0")).toEqual({flexGrow:0});});(0,_vitest.it)("should parse shrink",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).toEqual({flexShrink:1});});(0,_vitest.it)("should parse shrink-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink-0")).toEqual({flexShrink:0});});});(0,_vitest.describe)("parseLayout - justify content utilities",function(){(0,_vitest.it)("should parse justify-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-start")).toEqual({justifyContent:"flex-start"});});(0,_vitest.it)("should parse justify-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-end")).toEqual({justifyContent:"flex-end"});});(0,_vitest.it)("should parse justify-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-center")).toEqual({justifyContent:"center"});});(0,_vitest.it)("should parse justify-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-between")).toEqual({justifyContent:"space-between"});});(0,_vitest.it)("should parse justify-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-around")).toEqual({justifyContent:"space-around"});});(0,_vitest.it)("should parse justify-evenly",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-evenly")).toEqual({justifyContent:"space-evenly"});});});(0,_vitest.describe)("parseLayout - align items utilities",function(){(0,_vitest.it)("should parse items-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-start")).toEqual({alignItems:"flex-start"});});(0,_vitest.it)("should parse items-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-end")).toEqual({alignItems:"flex-end"});});(0,_vitest.it)("should parse items-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-center")).toEqual({alignItems:"center"});});(0,_vitest.it)("should parse items-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-baseline")).toEqual({alignItems:"baseline"});});(0,_vitest.it)("should parse items-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-stretch")).toEqual({alignItems:"stretch"});});});(0,_vitest.describe)("parseLayout - align self utilities",function(){(0,_vitest.it)("should parse self-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-auto")).toEqual({alignSelf:"auto"});});(0,_vitest.it)("should parse self-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-start")).toEqual({alignSelf:"flex-start"});});(0,_vitest.it)("should parse self-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-end")).toEqual({alignSelf:"flex-end"});});(0,_vitest.it)("should parse self-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-center")).toEqual({alignSelf:"center"});});(0,_vitest.it)("should parse self-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-stretch")).toEqual({alignSelf:"stretch"});});(0,_vitest.it)("should parse self-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-baseline")).toEqual({alignSelf:"baseline"});});});(0,_vitest.describe)("parseLayout - align content utilities",function(){(0,_vitest.it)("should parse content-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-start")).toEqual({alignContent:"flex-start"});});(0,_vitest.it)("should parse content-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-end")).toEqual({alignContent:"flex-end"});});(0,_vitest.it)("should parse content-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-center")).toEqual({alignContent:"center"});});(0,_vitest.it)("should parse content-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-between")).toEqual({alignContent:"space-between"});});(0,_vitest.it)("should parse content-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-around")).toEqual({alignContent:"space-around"});});(0,_vitest.it)("should parse content-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-stretch")).toEqual({alignContent:"stretch"});});});(0,_vitest.describe)("parseLayout - position utilities",function(){(0,_vitest.it)("should parse absolute",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});});(0,_vitest.it)("should parse relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("relative")).toEqual({position:"relative"});});});(0,_vitest.describe)("parseLayout - overflow utilities",function(){(0,_vitest.it)("should parse overflow-hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-hidden")).toEqual({overflow:"hidden"});});(0,_vitest.it)("should parse overflow-visible",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-visible")).toEqual({overflow:"visible"});});(0,_vitest.it)("should parse overflow-scroll",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-scroll")).toEqual({overflow:"scroll"});});});(0,_vitest.describe)("parseLayout - opacity utilities",function(){(0,_vitest.it)("should parse opacity-0 (fully transparent)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-0")).toEqual({opacity:0});});(0,_vitest.it)("should parse opacity-50 (half transparent)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-50")).toEqual({opacity:0.5});});(0,_vitest.it)("should parse opacity-100 (fully opaque)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-100")).toEqual({opacity:1});});(0,_vitest.it)("should parse all opacity values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-5")).toEqual({opacity:0.05});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-10")).toEqual({opacity:0.1});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-15")).toEqual({opacity:0.15});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-20")).toEqual({opacity:0.2});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-25")).toEqual({opacity:0.25});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-30")).toEqual({opacity:0.3});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-35")).toEqual({opacity:0.35});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-40")).toEqual({opacity:0.4});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-45")).toEqual({opacity:0.45});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-55")).toEqual({opacity:0.55});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-60")).toEqual({opacity:0.6});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-65")).toEqual({opacity:0.65});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-70")).toEqual({opacity:0.7});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-75")).toEqual({opacity:0.75});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-80")).toEqual({opacity:0.8});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-85")).toEqual({opacity:0.85});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-90")).toEqual({opacity:0.9});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-95")).toEqual({opacity:0.95});});});(0,_vitest.describe)("parseLayout - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_layout.parseLayout)("invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flex-invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("items")).toBeNull();});(0,_vitest.it)("should return null for empty string",function(){(0,_vitest.expect)((0,_layout.parseLayout)("")).toBeNull();});(0,_vitest.it)("should return null for partial class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("fle")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flexbox")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify-start-center")).toBeNull();});(0,_vitest.it)("should return null for CSS classes not in React Native",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inline")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inline-block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("grid")).toBeNull();});});(0,_vitest.describe)("parseLayout - comprehensive coverage",function(){(0,_vitest.it)("should handle all flex direction variants",function(){var directions=["flex-row","flex-row-reverse","flex-col","flex-col-reverse"];directions.forEach(function(dir){(0,_vitest.expect)((0,_layout.parseLayout)(dir)).toBeTruthy();});});(0,_vitest.it)("should handle all flex wrap variants",function(){var wraps=["flex-wrap","flex-wrap-reverse","flex-nowrap"];wraps.forEach(function(wrap){(0,_vitest.expect)((0,_layout.parseLayout)(wrap)).toBeTruthy();});});(0,_vitest.it)("should handle all justify content variants",function(){var justifies=["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly"];justifies.forEach(function(justify){(0,_vitest.expect)((0,_layout.parseLayout)(justify)).toBeTruthy();});});(0,_vitest.it)("should handle all align items variants",function(){var aligns=["items-start","items-end","items-center","items-baseline","items-stretch"];aligns.forEach(function(align){(0,_vitest.expect)((0,_layout.parseLayout)(align)).toBeTruthy();});});(0,_vitest.it)("should handle all align self variants",function(){var selfs=["self-auto","self-start","self-end","self-center","self-stretch","self-baseline"];selfs.forEach(function(self){(0,_vitest.expect)((0,_layout.parseLayout)(self)).toBeTruthy();});});(0,_vitest.it)("should handle all align content variants",function(){var contents=["content-start","content-end","content-center","content-between","content-around","content-stretch"];contents.forEach(function(content){(0,_vitest.expect)((0,_layout.parseLayout)(content)).toBeTruthy();});});(0,_vitest.it)("should handle all position variants",function(){var positions=["absolute","relative"];positions.forEach(function(position){(0,_vitest.expect)((0,_layout.parseLayout)(position)).toBeTruthy();});});(0,_vitest.it)("should handle all overflow variants",function(){var overflows=["overflow-hidden","overflow-visible","overflow-scroll"];overflows.forEach(function(overflow){(0,_vitest.expect)((0,_layout.parseLayout)(overflow)).toBeTruthy();});});});(0,_vitest.describe)("parseLayout - case sensitivity",function(){(0,_vitest.it)("should be case-sensitive",function(){(0,_vitest.expect)((0,_layout.parseLayout)("FLEX")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("Flex")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("ABSOLUTE")).toBeNull();});});(0,_vitest.describe)("parseLayout - z-index utilities",function(){(0,_vitest.it)("should parse z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-0")).toEqual({zIndex:0});(0,_vitest.expect)((0,_layout.parseLayout)("z-10")).toEqual({zIndex:10});(0,_vitest.expect)((0,_layout.parseLayout)("z-20")).toEqual({zIndex:20});(0,_vitest.expect)((0,_layout.parseLayout)("z-30")).toEqual({zIndex:30});(0,_vitest.expect)((0,_layout.parseLayout)("z-40")).toEqual({zIndex:40});(0,_vitest.expect)((0,_layout.parseLayout)("z-50")).toEqual({zIndex:50});});(0,_vitest.it)("should parse z-auto as 0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-auto")).toEqual({zIndex:0});});(0,_vitest.it)("should parse arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[999]")).toEqual({zIndex:999});(0,_vitest.expect)((0,_layout.parseLayout)("z-[100]")).toEqual({zIndex:100});(0,_vitest.expect)((0,_layout.parseLayout)("z-[1]")).toEqual({zIndex:1});});(0,_vitest.it)("should parse negative arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[-1]")).toEqual({zIndex:-1});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-10]")).toEqual({zIndex:-10});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-999]")).toEqual({zIndex:-999});});(0,_vitest.it)("should return null for invalid z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-5")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-invalid")).toBeNull();});});(0,_vitest.describe)("parseLayout - positioning utilities",function(){(0,_vitest.it)("should parse top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toEqual({top:16});(0,_vitest.expect)((0,_layout.parseLayout)("top-8")).toEqual({top:32});(0,_vitest.expect)((0,_layout.parseLayout)("top-16")).toEqual({top:64});});(0,_vitest.it)("should parse right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-0")).toEqual({right:0});(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toEqual({right:16});(0,_vitest.expect)((0,_layout.parseLayout)("right-8")).toEqual({right:32});(0,_vitest.expect)((0,_layout.parseLayout)("right-16")).toEqual({right:64});});(0,_vitest.it)("should parse bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-0")).toEqual({bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toEqual({bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-8")).toEqual({bottom:32});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-16")).toEqual({bottom:64});});(0,_vitest.it)("should parse left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toEqual({left:16});(0,_vitest.expect)((0,_layout.parseLayout)("left-8")).toEqual({left:32});(0,_vitest.expect)((0,_layout.parseLayout)("left-16")).toEqual({left:64});});(0,_vitest.it)("should parse fractional positioning values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0.5")).toEqual({top:2});(0,_vitest.expect)((0,_layout.parseLayout)("right-1.5")).toEqual({right:6});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-2.5")).toEqual({bottom:10});(0,_vitest.expect)((0,_layout.parseLayout)("left-3.5")).toEqual({left:14});});(0,_vitest.it)("should parse auto positioning values as empty object",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("right-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("left-auto")).toEqual({});});(0,_vitest.it)("should parse arbitrary top values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50px]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100px]")).toEqual({top:100});(0,_vitest.expect)((0,_layout.parseLayout)("top-[0px]")).toEqual({top:0});});(0,_vitest.it)("should parse arbitrary top values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100]")).toEqual({top:100});});(0,_vitest.it)("should parse arbitrary top values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[25%]")).toEqual({top:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[50%]")).toEqual({top:"50%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[10.5%]")).toEqual({top:"10.5%"});});(0,_vitest.it)("should parse negative arbitrary top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[-10px]")).toEqual({top:-10});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-50]")).toEqual({top:-50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-25%]")).toEqual({top:"-25%"});});(0,_vitest.it)("should parse arbitrary right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-[30px]")).toEqual({right:30});(0,_vitest.expect)((0,_layout.parseLayout)("right-[20]")).toEqual({right:20});(0,_vitest.expect)((0,_layout.parseLayout)("right-[15%]")).toEqual({right:"15%"});(0,_vitest.expect)((0,_layout.parseLayout)("right-[-10px]")).toEqual({right:-10});});(0,_vitest.it)("should parse arbitrary bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[40px]")).toEqual({bottom:40});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[25]")).toEqual({bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[33.333%]")).toEqual({bottom:"33.333%"});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[-15px]")).toEqual({bottom:-15});});(0,_vitest.it)("should parse arbitrary left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-[60px]")).toEqual({left:60});(0,_vitest.expect)((0,_layout.parseLayout)("left-[45]")).toEqual({left:45});(0,_vitest.expect)((0,_layout.parseLayout)("left-[12.5%]")).toEqual({left:"12.5%"});(0,_vitest.expect)((0,_layout.parseLayout)("left-[-20px]")).toEqual({left:-20});});});(0,_vitest.describe)("parseLayout - inset utilities",function(){(0,_vitest.it)("should parse inset (all sides) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0")).toEqual({top:0,right:0,bottom:0,left:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-4")).toEqual({top:16,right:16,bottom:16,left:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-8")).toEqual({top:32,right:32,bottom:32,left:32});});(0,_vitest.it)("should parse inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-0")).toEqual({left:0,right:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-4")).toEqual({left:16,right:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-8")).toEqual({left:32,right:32});});(0,_vitest.it)("should parse inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-0")).toEqual({top:0,bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-4")).toEqual({top:16,bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-8")).toEqual({top:32,bottom:32});});(0,_vitest.it)("should parse fractional inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0.5")).toEqual({top:2,right:2,bottom:2,left:2});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-1.5")).toEqual({left:6,right:6});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-2.5")).toEqual({top:10,bottom:10});});(0,_vitest.it)("should return null for invalid inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-100")).toBeNull();});(0,_vitest.it)("should parse arbitrary inset (all sides) values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10px]")).toEqual({top:10,right:10,bottom:10,left:10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25px]")).toEqual({top:25,right:25,bottom:25,left:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[0px]")).toEqual({top:0,right:0,bottom:0,left:0});});(0,_vitest.it)("should parse arbitrary inset values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[15]")).toEqual({top:15,right:15,bottom:15,left:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[30]")).toEqual({top:30,right:30,bottom:30,left:30});});(0,_vitest.it)("should parse arbitrary inset values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10%]")).toEqual({top:"10%",right:"10%",bottom:"10%",left:"10%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25%]")).toEqual({top:"25%",right:"25%",bottom:"25%",left:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[5.5%]")).toEqual({top:"5.5%",right:"5.5%",bottom:"5.5%",left:"5.5%"});});(0,_vitest.it)("should parse arbitrary inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[20px]")).toEqual({left:20,right:20});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[15]")).toEqual({left:15,right:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[10%]")).toEqual({left:"10%",right:"10%"});});(0,_vitest.it)("should parse arbitrary inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[30px]")).toEqual({top:30,bottom:30});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[25]")).toEqual({top:25,bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[15%]")).toEqual({top:"15%",bottom:"15%"});});(0,_vitest.it)("should parse negative arbitrary inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-5px]")).toEqual({top:-5,right:-5,bottom:-5,left:-5});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[-10px]")).toEqual({left:-10,right:-10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[-15px]")).toEqual({top:-15,bottom:-15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-20%]")).toEqual({top:"-20%",right:"-20%",bottom:"-20%",left:"-20%"});});});(0,_vitest.describe)("parseLayout - specific property coverage",function(){(0,_vitest.it)("should return unique objects for each class",function(){var flex1=(0,_layout.parseLayout)("flex");var flex2=(0,_layout.parseLayout)("flex");(0,_vitest.expect)(flex1).toEqual(flex2);});(0,_vitest.it)("should handle flex value variations",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});(0,_vitest.it)("should distinguish between similar class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).not.toEqual((0,_layout.parseLayout)("flex-1"));(0,_vitest.expect)((0,_layout.parseLayout)("grow")).not.toEqual((0,_layout.parseLayout)("grow-0"));(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).not.toEqual((0,_layout.parseLayout)("shrink-0"));});(0,_vitest.it)("should handle positioning with absolute/relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});});(0,_vitest.it)("should handle all positioning directions",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toHaveProperty("top");(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toHaveProperty("right");(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toHaveProperty("bottom");(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toHaveProperty("left");});(0,_vitest.it)("should handle inset shorthand variations",function(){var insetAll=(0,_layout.parseLayout)("inset-4");(0,_vitest.expect)(insetAll).toHaveProperty("top",16);(0,_vitest.expect)(insetAll).toHaveProperty("right",16);(0,_vitest.expect)(insetAll).toHaveProperty("bottom",16);(0,_vitest.expect)(insetAll).toHaveProperty("left",16);var insetX=(0,_layout.parseLayout)("inset-x-4");(0,_vitest.expect)(insetX).toHaveProperty("left",16);(0,_vitest.expect)(insetX).toHaveProperty("right",16);(0,_vitest.expect)(insetX).not.toHaveProperty("top");(0,_vitest.expect)(insetX).not.toHaveProperty("bottom");var insetY=(0,_layout.parseLayout)("inset-y-4");(0,_vitest.expect)(insetY).toHaveProperty("top",16);(0,_vitest.expect)(insetY).toHaveProperty("bottom",16);(0,_vitest.expect)(insetY).not.toHaveProperty("left");(0,_vitest.expect)(insetY).not.toHaveProperty("right");});});
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Transform utilities (scale, rotate, translate, skew, perspective)
3
+ */
4
+ import type { StyleObject } from "../types";
5
+ export declare const SCALE_MAP: Record<string, number>;
6
+ export declare const ROTATE_MAP: Record<string, number>;
7
+ export declare const SKEW_MAP: Record<string, number>;
8
+ export declare const PERSPECTIVE_SCALE: Record<string, number>;
9
+ /**
10
+ * Parse transform classes
11
+ * Each transform class returns a transform array with a single transform object
12
+ */
13
+ export declare function parseTransform(cls: string): StyleObject | null;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.SKEW_MAP=exports.SCALE_MAP=exports.ROTATE_MAP=exports.PERSPECTIVE_SCALE=void 0;exports.parseTransform=parseTransform;var _spacing=require("./spacing");var SCALE_MAP=exports.SCALE_MAP={0:0,50:0.5,75:0.75,90:0.9,95:0.95,100:1,105:1.05,110:1.1,125:1.25,150:1.5,200:2};var ROTATE_MAP=exports.ROTATE_MAP={0:0,1:1,2:2,3:3,6:6,12:12,45:45,90:90,180:180};var SKEW_MAP=exports.SKEW_MAP={0:0,1:1,2:2,3:3,6:6,12:12};var PERSPECTIVE_SCALE=exports.PERSPECTIVE_SCALE={0:0,100:100,200:200,300:300,400:400,500:500,600:600,700:700,800:800,900:900,1000:1000};function parseArbitraryScale(value){var scaleMatch=value.match(/^\[(-?\d+(?:\.\d+)?)\]$/);if(scaleMatch){return parseFloat(scaleMatch[1]);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid arbitrary scale value: ${value}. Only numbers are supported (e.g., [1.5], [0.75]).`);}return null;}return null;}function parseArbitraryRotation(value){var rotateMatch=value.match(/^\[(-?\d+(?:\.\d+)?)deg\]$/);if(rotateMatch){return`${rotateMatch[1]}deg`;}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid arbitrary rotation value: ${value}. Only deg unit is supported (e.g., [45deg], [-15deg]).`);}return null;}return null;}function parseArbitraryTranslation(value){var pxMatch=value.match(/^\[(-?\d+)(?:px)?\]$/);if(pxMatch){return parseInt(pxMatch[1],10);}var percentMatch=value.match(/^\[(-?\d+(?:\.\d+)?)%\]$/);if(percentMatch){return`${percentMatch[1]}%`;}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary translation unit: ${value}. Only px and % are supported.`);}return null;}return null;}function parseArbitraryPerspective(value){var perspectiveMatch=value.match(/^\[(-?\d+)\]$/);if(perspectiveMatch){return parseInt(perspectiveMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid arbitrary perspective value: ${value}. Only integers are supported (e.g., [1500]).`);}return null;}return null;}function parseTransform(cls){if(cls.startsWith("origin-")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] transform-origin is not supported in React Native. Class "${cls}" will be ignored.`);}return null;}if(cls.startsWith("scale-")){var scaleKey=cls.substring(6);var arbitraryScale=parseArbitraryScale(scaleKey);if(arbitraryScale!==null){return{transform:[{scale:arbitraryScale}]};}var scaleValue=SCALE_MAP[scaleKey];if(scaleValue!==undefined){return{transform:[{scale:scaleValue}]};}}if(cls.startsWith("scale-x-")){var _scaleKey=cls.substring(8);var _arbitraryScale=parseArbitraryScale(_scaleKey);if(_arbitraryScale!==null){return{transform:[{scaleX:_arbitraryScale}]};}var _scaleValue=SCALE_MAP[_scaleKey];if(_scaleValue!==undefined){return{transform:[{scaleX:_scaleValue}]};}}if(cls.startsWith("scale-y-")){var _scaleKey2=cls.substring(8);var _arbitraryScale2=parseArbitraryScale(_scaleKey2);if(_arbitraryScale2!==null){return{transform:[{scaleY:_arbitraryScale2}]};}var _scaleValue2=SCALE_MAP[_scaleKey2];if(_scaleValue2!==undefined){return{transform:[{scaleY:_scaleValue2}]};}}if(cls.startsWith("rotate-")||cls.startsWith("-rotate-")){var isNegative=cls.startsWith("-");var rotateKey=isNegative?cls.substring(8):cls.substring(7);var arbitraryRotate=parseArbitraryRotation(rotateKey);if(arbitraryRotate!==null){var degrees=isNegative?`-${arbitraryRotate}`:arbitraryRotate;return{transform:[{rotate:degrees}]};}var rotateValue=ROTATE_MAP[rotateKey];if(rotateValue!==undefined){var _degrees=isNegative?-rotateValue:rotateValue;return{transform:[{rotate:`${_degrees}deg`}]};}}if(cls.startsWith("rotate-x-")||cls.startsWith("-rotate-x-")){var _isNegative=cls.startsWith("-");var _rotateKey=_isNegative?cls.substring(10):cls.substring(9);var _arbitraryRotate=parseArbitraryRotation(_rotateKey);if(_arbitraryRotate!==null){var _degrees2=_isNegative?`-${_arbitraryRotate}`:_arbitraryRotate;return{transform:[{rotateX:_degrees2}]};}var _rotateValue=ROTATE_MAP[_rotateKey];if(_rotateValue!==undefined){var _degrees3=_isNegative?-_rotateValue:_rotateValue;return{transform:[{rotateX:`${_degrees3}deg`}]};}}if(cls.startsWith("rotate-y-")||cls.startsWith("-rotate-y-")){var _isNegative2=cls.startsWith("-");var _rotateKey2=_isNegative2?cls.substring(10):cls.substring(9);var _arbitraryRotate2=parseArbitraryRotation(_rotateKey2);if(_arbitraryRotate2!==null){var _degrees4=_isNegative2?`-${_arbitraryRotate2}`:_arbitraryRotate2;return{transform:[{rotateY:_degrees4}]};}var _rotateValue2=ROTATE_MAP[_rotateKey2];if(_rotateValue2!==undefined){var _degrees5=_isNegative2?-_rotateValue2:_rotateValue2;return{transform:[{rotateY:`${_degrees5}deg`}]};}}if(cls.startsWith("rotate-z-")||cls.startsWith("-rotate-z-")){var _isNegative3=cls.startsWith("-");var _rotateKey3=_isNegative3?cls.substring(10):cls.substring(9);var _arbitraryRotate3=parseArbitraryRotation(_rotateKey3);if(_arbitraryRotate3!==null){var _degrees6=_isNegative3?`-${_arbitraryRotate3}`:_arbitraryRotate3;return{transform:[{rotateZ:_degrees6}]};}var _rotateValue3=ROTATE_MAP[_rotateKey3];if(_rotateValue3!==undefined){var _degrees7=_isNegative3?-_rotateValue3:_rotateValue3;return{transform:[{rotateZ:`${_degrees7}deg`}]};}}if(cls.startsWith("translate-x-")||cls.startsWith("-translate-x-")){var _isNegative4=cls.startsWith("-");var translateKey=_isNegative4?cls.substring(13):cls.substring(12);var arbitraryTranslate=parseArbitraryTranslation(translateKey);if(arbitraryTranslate!==null){var value=typeof arbitraryTranslate==="number"?_isNegative4?-arbitraryTranslate:arbitraryTranslate:_isNegative4?`-${arbitraryTranslate}`:arbitraryTranslate;return{transform:[{translateX:value}]};}var translateValue=_spacing.SPACING_SCALE[translateKey];if(translateValue!==undefined){var _value=_isNegative4?-translateValue:translateValue;return{transform:[{translateX:_value}]};}}if(cls.startsWith("translate-y-")||cls.startsWith("-translate-y-")){var _isNegative5=cls.startsWith("-");var _translateKey=_isNegative5?cls.substring(13):cls.substring(12);var _arbitraryTranslate=parseArbitraryTranslation(_translateKey);if(_arbitraryTranslate!==null){var _value2=typeof _arbitraryTranslate==="number"?_isNegative5?-_arbitraryTranslate:_arbitraryTranslate:_isNegative5?`-${_arbitraryTranslate}`:_arbitraryTranslate;return{transform:[{translateY:_value2}]};}var _translateValue=_spacing.SPACING_SCALE[_translateKey];if(_translateValue!==undefined){var _value3=_isNegative5?-_translateValue:_translateValue;return{transform:[{translateY:_value3}]};}}if(cls.startsWith("skew-x-")||cls.startsWith("-skew-x-")){var _isNegative6=cls.startsWith("-");var skewKey=_isNegative6?cls.substring(8):cls.substring(7);var arbitrarySkew=parseArbitraryRotation(skewKey);if(arbitrarySkew!==null){var _degrees8=_isNegative6?`-${arbitrarySkew}`:arbitrarySkew;return{transform:[{skewX:_degrees8}]};}var skewValue=SKEW_MAP[skewKey];if(skewValue!==undefined){var _degrees9=_isNegative6?-skewValue:skewValue;return{transform:[{skewX:`${_degrees9}deg`}]};}}if(cls.startsWith("skew-y-")||cls.startsWith("-skew-y-")){var _isNegative7=cls.startsWith("-");var _skewKey=_isNegative7?cls.substring(8):cls.substring(7);var _arbitrarySkew=parseArbitraryRotation(_skewKey);if(_arbitrarySkew!==null){var _degrees0=_isNegative7?`-${_arbitrarySkew}`:_arbitrarySkew;return{transform:[{skewY:_degrees0}]};}var _skewValue=SKEW_MAP[_skewKey];if(_skewValue!==undefined){var _degrees1=_isNegative7?-_skewValue:_skewValue;return{transform:[{skewY:`${_degrees1}deg`}]};}}if(cls.startsWith("perspective-")){var perspectiveKey=cls.substring(12);var arbitraryPerspective=parseArbitraryPerspective(perspectiveKey);if(arbitraryPerspective!==null){return{transform:[{perspective:arbitraryPerspective}]};}var perspectiveValue=PERSPECTIVE_SCALE[perspectiveKey];if(perspectiveValue!==undefined){return{transform:[{perspective:perspectiveValue}]};}}return null;}
@@ -0,0 +1 @@
1
+ var _vitest=require("vitest");var _transforms=require("./transforms");(0,_vitest.describe)("SCALE_MAP",function(){(0,_vitest.it)("should export complete scale map",function(){(0,_vitest.expect)(_transforms.SCALE_MAP).toMatchSnapshot();});});(0,_vitest.describe)("ROTATE_MAP",function(){(0,_vitest.it)("should export complete rotate map",function(){(0,_vitest.expect)(_transforms.ROTATE_MAP).toMatchSnapshot();});});(0,_vitest.describe)("SKEW_MAP",function(){(0,_vitest.it)("should export complete skew map",function(){(0,_vitest.expect)(_transforms.SKEW_MAP).toMatchSnapshot();});});(0,_vitest.describe)("PERSPECTIVE_SCALE",function(){(0,_vitest.it)("should export complete perspective scale",function(){(0,_vitest.expect)(_transforms.PERSPECTIVE_SCALE).toMatchSnapshot();});});(0,_vitest.describe)("parseTransform - scale utilities",function(){(0,_vitest.it)("should parse scale values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-0")).toEqual({transform:[{scale:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-50")).toEqual({transform:[{scale:0.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-75")).toEqual({transform:[{scale:0.75}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-90")).toEqual({transform:[{scale:0.9}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-95")).toEqual({transform:[{scale:0.95}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-100")).toEqual({transform:[{scale:1}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-105")).toEqual({transform:[{scale:1.05}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-110")).toEqual({transform:[{scale:1.1}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-125")).toEqual({transform:[{scale:1.25}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-150")).toEqual({transform:[{scale:1.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-200")).toEqual({transform:[{scale:2}]});});(0,_vitest.it)("should parse scaleX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-0")).toEqual({transform:[{scaleX:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-50")).toEqual({transform:[{scaleX:0.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-100")).toEqual({transform:[{scaleX:1}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-150")).toEqual({transform:[{scaleX:1.5}]});});(0,_vitest.it)("should parse scaleY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-y-0")).toEqual({transform:[{scaleY:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-y-75")).toEqual({transform:[{scaleY:0.75}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-y-100")).toEqual({transform:[{scaleY:1}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-y-125")).toEqual({transform:[{scaleY:1.25}]});});(0,_vitest.it)("should parse arbitrary scale values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-[1.23]")).toEqual({transform:[{scale:1.23}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-[0.5]")).toEqual({transform:[{scale:0.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-[2.5]")).toEqual({transform:[{scale:2.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-[1.5]")).toEqual({transform:[{scaleX:1.5}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-y-[0.8]")).toEqual({transform:[{scaleY:0.8}]});});(0,_vitest.it)("should parse negative arbitrary scale values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-[-1]")).toEqual({transform:[{scale:-1}]});(0,_vitest.expect)((0,_transforms.parseTransform)("scale-x-[-0.5]")).toEqual({transform:[{scaleX:-0.5}]});});(0,_vitest.it)("should return null for invalid scale values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scale-999")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("scale-invalid")).toBeNull();});});(0,_vitest.describe)("parseTransform - rotate utilities",function(){(0,_vitest.it)("should parse rotate values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-0")).toEqual({transform:[{rotate:"0deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-1")).toEqual({transform:[{rotate:"1deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-45")).toEqual({transform:[{rotate:"45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-90")).toEqual({transform:[{rotate:"90deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-180")).toEqual({transform:[{rotate:"180deg"}]});});(0,_vitest.it)("should parse negative rotate values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-45")).toEqual({transform:[{rotate:"-45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-90")).toEqual({transform:[{rotate:"-90deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-180")).toEqual({transform:[{rotate:"-180deg"}]});});(0,_vitest.it)("should parse arbitrary rotate values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-[37deg]")).toEqual({transform:[{rotate:"37deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-[15.5deg]")).toEqual({transform:[{rotate:"15.5deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-[15deg]")).toEqual({transform:[{rotate:"-15deg"}]});});(0,_vitest.it)("should parse rotateX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-x-45")).toEqual({transform:[{rotateX:"45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-x-90")).toEqual({transform:[{rotateX:"90deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-x-45")).toEqual({transform:[{rotateX:"-45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-x-[30deg]")).toEqual({transform:[{rotateX:"30deg"}]});});(0,_vitest.it)("should parse rotateY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-y-45")).toEqual({transform:[{rotateY:"45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-y-180")).toEqual({transform:[{rotateY:"180deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-y-90")).toEqual({transform:[{rotateY:"-90deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-y-[60deg]")).toEqual({transform:[{rotateY:"60deg"}]});});(0,_vitest.it)("should parse rotateZ values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-z-45")).toEqual({transform:[{rotateZ:"45deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-z-90")).toEqual({transform:[{rotateZ:"90deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-rotate-z-12")).toEqual({transform:[{rotateZ:"-12deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-z-[75deg]")).toEqual({transform:[{rotateZ:"75deg"}]});});(0,_vitest.it)("should return null for invalid rotate values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-999")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("rotate-invalid")).toBeNull();});});(0,_vitest.describe)("parseTransform - translate utilities",function(){(0,_vitest.it)("should parse translateX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-0")).toEqual({transform:[{translateX:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-4")).toEqual({transform:[{translateX:16}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-8")).toEqual({transform:[{translateX:32}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-16")).toEqual({transform:[{translateX:64}]});});(0,_vitest.it)("should parse negative translateX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-x-4")).toEqual({transform:[{translateX:-16}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-x-8")).toEqual({transform:[{translateX:-32}]});});(0,_vitest.it)("should parse translateY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-0")).toEqual({transform:[{translateY:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-4")).toEqual({transform:[{translateY:16}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-12")).toEqual({transform:[{translateY:48}]});});(0,_vitest.it)("should parse negative translateY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-y-4")).toEqual({transform:[{translateY:-16}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-y-10")).toEqual({transform:[{translateY:-40}]});});(0,_vitest.it)("should parse arbitrary translateX pixel values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-[123px]")).toEqual({transform:[{translateX:123}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-[50]")).toEqual({transform:[{translateX:50}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-x-[100px]")).toEqual({transform:[{translateX:-100}]});});(0,_vitest.it)("should parse arbitrary translateX percentage values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-[50%]")).toEqual({transform:[{translateX:"50%"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-[33.333%]")).toEqual({transform:[{translateX:"33.333%"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-x-[25%]")).toEqual({transform:[{translateX:"-25%"}]});});(0,_vitest.it)("should parse arbitrary translateY pixel values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-[200px]")).toEqual({transform:[{translateY:200}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-y-[75px]")).toEqual({transform:[{translateY:-75}]});});(0,_vitest.it)("should parse arbitrary translateY percentage values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-[100%]")).toEqual({transform:[{translateY:"100%"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-translate-y-[50%]")).toEqual({transform:[{translateY:"-50%"}]});});(0,_vitest.it)("should return null for invalid translate values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("translate-x-999")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("translate-y-invalid")).toBeNull();});});(0,_vitest.describe)("parseTransform - skew utilities",function(){(0,_vitest.it)("should parse skewX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-0")).toEqual({transform:[{skewX:"0deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-1")).toEqual({transform:[{skewX:"1deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-3")).toEqual({transform:[{skewX:"3deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-6")).toEqual({transform:[{skewX:"6deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-12")).toEqual({transform:[{skewX:"12deg"}]});});(0,_vitest.it)("should parse negative skewX values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("-skew-x-3")).toEqual({transform:[{skewX:"-3deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-skew-x-12")).toEqual({transform:[{skewX:"-12deg"}]});});(0,_vitest.it)("should parse skewY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("skew-y-0")).toEqual({transform:[{skewY:"0deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-y-2")).toEqual({transform:[{skewY:"2deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-y-6")).toEqual({transform:[{skewY:"6deg"}]});});(0,_vitest.it)("should parse negative skewY values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("-skew-y-2")).toEqual({transform:[{skewY:"-2deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-skew-y-6")).toEqual({transform:[{skewY:"-6deg"}]});});(0,_vitest.it)("should parse arbitrary skew values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-[15deg]")).toEqual({transform:[{skewX:"15deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("skew-y-[20deg]")).toEqual({transform:[{skewY:"20deg"}]});(0,_vitest.expect)((0,_transforms.parseTransform)("-skew-x-[8deg]")).toEqual({transform:[{skewX:"-8deg"}]});});(0,_vitest.it)("should return null for invalid skew values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("skew-x-999")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("skew-y-invalid")).toBeNull();});});(0,_vitest.describe)("parseTransform - perspective utility",function(){(0,_vitest.it)("should parse perspective values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-0")).toEqual({transform:[{perspective:0}]});(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-100")).toEqual({transform:[{perspective:100}]});(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-500")).toEqual({transform:[{perspective:500}]});(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-1000")).toEqual({transform:[{perspective:1000}]});});(0,_vitest.it)("should parse arbitrary perspective values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-[1500]")).toEqual({transform:[{perspective:1500}]});(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-[2000]")).toEqual({transform:[{perspective:2000}]});(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-[250]")).toEqual({transform:[{perspective:250}]});});(0,_vitest.it)("should return null for invalid perspective values",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-99")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("perspective-invalid")).toBeNull();});});(0,_vitest.describe)("parseTransform - transform origin warning",function(){(0,_vitest.it)("should return null and warn for origin classes",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("origin-center")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("origin-top")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("origin-left")).toBeNull();});});(0,_vitest.describe)("parseTransform - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("invalid")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("transform")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("transforms")).toBeNull();});(0,_vitest.it)("should return null for empty string",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("")).toBeNull();});(0,_vitest.it)("should return null for partial class names",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("scal")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("rotat")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("translat")).toBeNull();});(0,_vitest.it)("should handle all transform types returning arrays",function(){var scaleResult=(0,_transforms.parseTransform)("scale-110");(0,_vitest.expect)(scaleResult).toHaveProperty("transform");(0,_vitest.expect)(Array.isArray(scaleResult==null?void 0:scaleResult.transform)).toBe(true);var rotateResult=(0,_transforms.parseTransform)("rotate-45");(0,_vitest.expect)(rotateResult).toHaveProperty("transform");(0,_vitest.expect)(Array.isArray(rotateResult==null?void 0:rotateResult.transform)).toBe(true);var translateResult=(0,_transforms.parseTransform)("translate-x-4");(0,_vitest.expect)(translateResult).toHaveProperty("transform");(0,_vitest.expect)(Array.isArray(translateResult==null?void 0:translateResult.transform)).toBe(true);});});(0,_vitest.describe)("parseTransform - comprehensive coverage",function(){(0,_vitest.it)("should handle all scale variants",function(){var scaleClasses=["scale-0","scale-50","scale-100","scale-150"];scaleClasses.forEach(function(cls){(0,_vitest.expect)((0,_transforms.parseTransform)(cls)).toBeTruthy();});});(0,_vitest.it)("should handle all rotate variants",function(){var rotateClasses=["rotate-0","rotate-45","rotate-90","rotate-180"];rotateClasses.forEach(function(cls){(0,_vitest.expect)((0,_transforms.parseTransform)(cls)).toBeTruthy();});});(0,_vitest.it)("should handle all translate variants",function(){var translateClasses=["translate-x-0","translate-x-4","translate-y-8","-translate-x-2"];translateClasses.forEach(function(cls){(0,_vitest.expect)((0,_transforms.parseTransform)(cls)).toBeTruthy();});});(0,_vitest.it)("should handle all skew variants",function(){var skewClasses=["skew-x-3","skew-y-6","-skew-x-12"];skewClasses.forEach(function(cls){(0,_vitest.expect)((0,_transforms.parseTransform)(cls)).toBeTruthy();});});(0,_vitest.it)("should handle all perspective variants",function(){var perspectiveClasses=["perspective-100","perspective-500","perspective-1000"];perspectiveClasses.forEach(function(cls){(0,_vitest.expect)((0,_transforms.parseTransform)(cls)).toBeTruthy();});});});(0,_vitest.describe)("parseTransform - case sensitivity",function(){(0,_vitest.it)("should be case-sensitive",function(){(0,_vitest.expect)((0,_transforms.parseTransform)("SCALE-110")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("Scale-110")).toBeNull();(0,_vitest.expect)((0,_transforms.parseTransform)("ROTATE-45")).toBeNull();});});
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.LETTER_SPACING_SCALE=exports.FONT_SIZES=void 0;exports.parseTypography=parseTypography;var FONT_SIZES=exports.FONT_SIZES={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128};var LETTER_SPACING_SCALE=exports.LETTER_SPACING_SCALE={tighter:-0.8,tight:-0.4,normal:0,wide:0.4,wider:0.8,widest:1.6};var FONT_WEIGHT_MAP={"font-thin":{fontWeight:"100"},"font-extralight":{fontWeight:"200"},"font-light":{fontWeight:"300"},"font-normal":{fontWeight:"400"},"font-medium":{fontWeight:"500"},"font-semibold":{fontWeight:"600"},"font-bold":{fontWeight:"700"},"font-extrabold":{fontWeight:"800"},"font-black":{fontWeight:"900"}};var FONT_STYLE_MAP={italic:{fontStyle:"italic"},"not-italic":{fontStyle:"normal"}};var TEXT_ALIGN_MAP={"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"}};var TEXT_DECORATION_MAP={underline:{textDecorationLine:"underline"},"line-through":{textDecorationLine:"line-through"},"no-underline":{textDecorationLine:"none"}};var TEXT_TRANSFORM_MAP={uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"}};var LINE_HEIGHT_MAP={"leading-none":{lineHeight:16},"leading-tight":{lineHeight:20},"leading-snug":{lineHeight:22},"leading-normal":{lineHeight:24},"leading-relaxed":{lineHeight:28},"leading-loose":{lineHeight:32}};var TRACKING_MAP={"tracking-tighter":{letterSpacing:-0.8},"tracking-tight":{letterSpacing:-0.4},"tracking-normal":{letterSpacing:0},"tracking-wide":{letterSpacing:0.4},"tracking-wider":{letterSpacing:0.8},"tracking-widest":{letterSpacing:1.6}};function parseArbitraryFontSize(value){var pxMatch=value.match(/^\[(\d+)(?:px)?\]$/);if(pxMatch){return parseInt(pxMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary font size value: ${value}. Only px values are supported (e.g., [18px] or [18]).`);}return null;}return null;}function parseArbitraryLineHeight(value){var pxMatch=value.match(/^\[(\d+)(?:px)?\]$/);if(pxMatch){return parseInt(pxMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary line height value: ${value}. Only px values are supported (e.g., [24px] or [24]).`);}return null;}return null;}function parseTypography(cls){var _ref,_ref2,_ref3,_ref4,_ref5,_ref6,_FONT_WEIGHT_MAP$cls;if(cls.startsWith("text-")){var sizeKey=cls.substring(5);var arbitraryValue=parseArbitraryFontSize(sizeKey);if(arbitraryValue!==null){return{fontSize:arbitraryValue};}var fontSize=FONT_SIZES[sizeKey];if(fontSize!==undefined){return{fontSize:fontSize};}}if(cls.startsWith("leading-")){var heightKey=cls.substring(8);var _arbitraryValue=parseArbitraryLineHeight(heightKey);if(_arbitraryValue!==null){return{lineHeight:_arbitraryValue};}}return(_ref=(_ref2=(_ref3=(_ref4=(_ref5=(_ref6=(_FONT_WEIGHT_MAP$cls=FONT_WEIGHT_MAP[cls])!=null?_FONT_WEIGHT_MAP$cls:FONT_STYLE_MAP[cls])!=null?_ref6:TEXT_ALIGN_MAP[cls])!=null?_ref5:TEXT_DECORATION_MAP[cls])!=null?_ref4:TEXT_TRANSFORM_MAP[cls])!=null?_ref3:LINE_HEIGHT_MAP[cls])!=null?_ref2:TRACKING_MAP[cls])!=null?_ref:null;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.LETTER_SPACING_SCALE=exports.FONT_SIZES=void 0;exports.parseTypography=parseTypography;var FONT_SIZES=exports.FONT_SIZES={xs:12,sm:14,base:16,lg:18,xl:20,"2xl":24,"3xl":30,"4xl":36,"5xl":48,"6xl":60,"7xl":72,"8xl":96,"9xl":128};var LETTER_SPACING_SCALE=exports.LETTER_SPACING_SCALE={tighter:-0.8,tight:-0.4,normal:0,wide:0.4,wider:0.8,widest:1.6};var FONT_FAMILY_MAP={"font-sans":{fontFamily:"System"},"font-serif":{fontFamily:"serif"},"font-mono":{fontFamily:"Courier"}};var FONT_WEIGHT_MAP={"font-thin":{fontWeight:"100"},"font-extralight":{fontWeight:"200"},"font-light":{fontWeight:"300"},"font-normal":{fontWeight:"400"},"font-medium":{fontWeight:"500"},"font-semibold":{fontWeight:"600"},"font-bold":{fontWeight:"700"},"font-extrabold":{fontWeight:"800"},"font-black":{fontWeight:"900"}};var FONT_STYLE_MAP={italic:{fontStyle:"italic"},"not-italic":{fontStyle:"normal"}};var TEXT_ALIGN_MAP={"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"}};var TEXT_DECORATION_MAP={underline:{textDecorationLine:"underline"},"line-through":{textDecorationLine:"line-through"},"no-underline":{textDecorationLine:"none"}};var TEXT_TRANSFORM_MAP={uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"}};var LINE_HEIGHT_MAP={"leading-none":{lineHeight:16},"leading-tight":{lineHeight:20},"leading-snug":{lineHeight:22},"leading-normal":{lineHeight:24},"leading-relaxed":{lineHeight:28},"leading-loose":{lineHeight:32}};var TRACKING_MAP={"tracking-tighter":{letterSpacing:-0.8},"tracking-tight":{letterSpacing:-0.4},"tracking-normal":{letterSpacing:0},"tracking-wide":{letterSpacing:0.4},"tracking-wider":{letterSpacing:0.8},"tracking-widest":{letterSpacing:1.6}};function parseArbitraryFontSize(value){var pxMatch=value.match(/^\[(\d+)(?:px)?\]$/);if(pxMatch){return parseInt(pxMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary font size value: ${value}. Only px values are supported (e.g., [18px] or [18]).`);}return null;}return null;}function parseArbitraryLineHeight(value){var pxMatch=value.match(/^\[(\d+)(?:px)?\]$/);if(pxMatch){return parseInt(pxMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary line height value: ${value}. Only px values are supported (e.g., [24px] or [24]).`);}return null;}return null;}function parseTypography(cls){var _ref,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_FONT_FAMILY_MAP$cls;if(cls.startsWith("text-")){var sizeKey=cls.substring(5);var arbitraryValue=parseArbitraryFontSize(sizeKey);if(arbitraryValue!==null){return{fontSize:arbitraryValue};}var fontSize=FONT_SIZES[sizeKey];if(fontSize!==undefined){return{fontSize:fontSize};}}if(cls.startsWith("leading-")){var heightKey=cls.substring(8);var _arbitraryValue=parseArbitraryLineHeight(heightKey);if(_arbitraryValue!==null){return{lineHeight:_arbitraryValue};}}return(_ref=(_ref2=(_ref3=(_ref4=(_ref5=(_ref6=(_ref7=(_FONT_FAMILY_MAP$cls=FONT_FAMILY_MAP[cls])!=null?_FONT_FAMILY_MAP$cls:FONT_WEIGHT_MAP[cls])!=null?_ref7:FONT_STYLE_MAP[cls])!=null?_ref6:TEXT_ALIGN_MAP[cls])!=null?_ref5:TEXT_DECORATION_MAP[cls])!=null?_ref4:TEXT_TRANSFORM_MAP[cls])!=null?_ref3:LINE_HEIGHT_MAP[cls])!=null?_ref2:TRACKING_MAP[cls])!=null?_ref:null;}
@@ -1 +1 @@
1
- var _vitest=require("vitest");var _typography=require("./typography");(0,_vitest.describe)("FONT_SIZES",function(){(0,_vitest.it)("should export complete font size scale",function(){(0,_vitest.expect)(_typography.FONT_SIZES).toMatchSnapshot();});});(0,_vitest.describe)("LETTER_SPACING_SCALE",function(){(0,_vitest.it)("should export complete letter spacing scale",function(){(0,_vitest.expect)(_typography.LETTER_SPACING_SCALE).toMatchSnapshot();});});(0,_vitest.describe)("parseTypography - font size",function(){(0,_vitest.it)("should parse font size with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-xs")).toEqual({fontSize:12});(0,_vitest.expect)((0,_typography.parseTypography)("text-sm")).toEqual({fontSize:14});(0,_vitest.expect)((0,_typography.parseTypography)("text-base")).toEqual({fontSize:16});(0,_vitest.expect)((0,_typography.parseTypography)("text-lg")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-xl")).toEqual({fontSize:20});(0,_vitest.expect)((0,_typography.parseTypography)("text-2xl")).toEqual({fontSize:24});(0,_vitest.expect)((0,_typography.parseTypography)("text-3xl")).toEqual({fontSize:30});(0,_vitest.expect)((0,_typography.parseTypography)("text-4xl")).toEqual({fontSize:36});(0,_vitest.expect)((0,_typography.parseTypography)("text-5xl")).toEqual({fontSize:48});(0,_vitest.expect)((0,_typography.parseTypography)("text-6xl")).toEqual({fontSize:60});(0,_vitest.expect)((0,_typography.parseTypography)("text-7xl")).toEqual({fontSize:72});(0,_vitest.expect)((0,_typography.parseTypography)("text-8xl")).toEqual({fontSize:96});(0,_vitest.expect)((0,_typography.parseTypography)("text-9xl")).toEqual({fontSize:128});});(0,_vitest.it)("should parse font size with arbitrary pixel values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[18px]")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-[18]")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-[22px]")).toEqual({fontSize:22});(0,_vitest.expect)((0,_typography.parseTypography)("text-[22]")).toEqual({fontSize:22});(0,_vitest.expect)((0,_typography.parseTypography)("text-[100px]")).toEqual({fontSize:100});});});(0,_vitest.describe)("parseTypography - font weight",function(){(0,_vitest.it)("should parse font weight values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("font-thin")).toEqual({fontWeight:"100"});(0,_vitest.expect)((0,_typography.parseTypography)("font-extralight")).toEqual({fontWeight:"200"});(0,_vitest.expect)((0,_typography.parseTypography)("font-light")).toEqual({fontWeight:"300"});(0,_vitest.expect)((0,_typography.parseTypography)("font-normal")).toEqual({fontWeight:"400"});(0,_vitest.expect)((0,_typography.parseTypography)("font-medium")).toEqual({fontWeight:"500"});(0,_vitest.expect)((0,_typography.parseTypography)("font-semibold")).toEqual({fontWeight:"600"});(0,_vitest.expect)((0,_typography.parseTypography)("font-bold")).toEqual({fontWeight:"700"});(0,_vitest.expect)((0,_typography.parseTypography)("font-extrabold")).toEqual({fontWeight:"800"});(0,_vitest.expect)((0,_typography.parseTypography)("font-black")).toEqual({fontWeight:"900"});});});(0,_vitest.describe)("parseTypography - font style",function(){(0,_vitest.it)("should parse font style values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("italic")).toEqual({fontStyle:"italic"});(0,_vitest.expect)((0,_typography.parseTypography)("not-italic")).toEqual({fontStyle:"normal"});});});(0,_vitest.describe)("parseTypography - text alignment",function(){(0,_vitest.it)("should parse text alignment values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-left")).toEqual({textAlign:"left"});(0,_vitest.expect)((0,_typography.parseTypography)("text-center")).toEqual({textAlign:"center"});(0,_vitest.expect)((0,_typography.parseTypography)("text-right")).toEqual({textAlign:"right"});(0,_vitest.expect)((0,_typography.parseTypography)("text-justify")).toEqual({textAlign:"justify"});});});(0,_vitest.describe)("parseTypography - text decoration",function(){(0,_vitest.it)("should parse text decoration values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("underline")).toEqual({textDecorationLine:"underline"});(0,_vitest.expect)((0,_typography.parseTypography)("line-through")).toEqual({textDecorationLine:"line-through"});(0,_vitest.expect)((0,_typography.parseTypography)("no-underline")).toEqual({textDecorationLine:"none"});});});(0,_vitest.describe)("parseTypography - text transform",function(){(0,_vitest.it)("should parse text transform values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("uppercase")).toEqual({textTransform:"uppercase"});(0,_vitest.expect)((0,_typography.parseTypography)("lowercase")).toEqual({textTransform:"lowercase"});(0,_vitest.expect)((0,_typography.parseTypography)("capitalize")).toEqual({textTransform:"capitalize"});(0,_vitest.expect)((0,_typography.parseTypography)("normal-case")).toEqual({textTransform:"none"});});});(0,_vitest.describe)("parseTypography - line height",function(){(0,_vitest.it)("should parse line height with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("leading-none")).toEqual({lineHeight:16});(0,_vitest.expect)((0,_typography.parseTypography)("leading-tight")).toEqual({lineHeight:20});(0,_vitest.expect)((0,_typography.parseTypography)("leading-snug")).toEqual({lineHeight:22});(0,_vitest.expect)((0,_typography.parseTypography)("leading-normal")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-relaxed")).toEqual({lineHeight:28});(0,_vitest.expect)((0,_typography.parseTypography)("leading-loose")).toEqual({lineHeight:32});});(0,_vitest.it)("should parse line height with arbitrary pixel values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24px]")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24]")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[30px]")).toEqual({lineHeight:30});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[30]")).toEqual({lineHeight:30});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[50px]")).toEqual({lineHeight:50});});});(0,_vitest.describe)("parseTypography - letter spacing",function(){(0,_vitest.it)("should parse letter spacing with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tighter")).toEqual({letterSpacing:-0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tight")).toEqual({letterSpacing:-0.4});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-normal")).toEqual({letterSpacing:0});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wide")).toEqual({letterSpacing:0.4});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wider")).toEqual({letterSpacing:0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-widest")).toEqual({letterSpacing:1.6});});});(0,_vitest.describe)("parseTypography - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_typography.parseTypography)("invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("tracking")).toBeNull();});(0,_vitest.it)("should return null for invalid font size values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-10xl")).toBeNull();});(0,_vitest.it)("should return null for invalid font weight values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("font-invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font-100")).toBeNull();});(0,_vitest.it)("should return null for arbitrary values with unsupported units",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[16rem]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-[2em]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[2rem]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[1.5em]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[16")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-16]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-[]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-24]")).toBeNull();});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_typography.parseTypography)("mytext-lg")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font-bold-extra")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("italic-text")).toBeNull();});});(0,_vitest.describe)("parseTypography - comprehensive coverage",function(){(0,_vitest.it)("should handle all typography categories independently",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-base")).toEqual({fontSize:16});(0,_vitest.expect)((0,_typography.parseTypography)("font-bold")).toEqual({fontWeight:"700"});(0,_vitest.expect)((0,_typography.parseTypography)("italic")).toEqual({fontStyle:"italic"});(0,_vitest.expect)((0,_typography.parseTypography)("text-center")).toEqual({textAlign:"center"});(0,_vitest.expect)((0,_typography.parseTypography)("underline")).toEqual({textDecorationLine:"underline"});(0,_vitest.expect)((0,_typography.parseTypography)("uppercase")).toEqual({textTransform:"uppercase"});(0,_vitest.expect)((0,_typography.parseTypography)("leading-normal")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wide")).toEqual({letterSpacing:0.4});});(0,_vitest.it)("should handle arbitrary values for font size and line height",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[19px]")).toEqual({fontSize:19});(0,_vitest.expect)((0,_typography.parseTypography)("text-[19]")).toEqual({fontSize:19});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[26px]")).toEqual({lineHeight:26});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[26]")).toEqual({lineHeight:26});});(0,_vitest.it)("should handle edge case values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-xs")).toEqual({fontSize:12});(0,_vitest.expect)((0,_typography.parseTypography)("text-9xl")).toEqual({fontSize:128});(0,_vitest.expect)((0,_typography.parseTypography)("leading-none")).toEqual({lineHeight:16});(0,_vitest.expect)((0,_typography.parseTypography)("leading-loose")).toEqual({lineHeight:32});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tighter")).toEqual({letterSpacing:-0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-widest")).toEqual({letterSpacing:1.6});});});
1
+ var _vitest=require("vitest");var _typography=require("./typography");(0,_vitest.describe)("FONT_SIZES",function(){(0,_vitest.it)("should export complete font size scale",function(){(0,_vitest.expect)(_typography.FONT_SIZES).toMatchSnapshot();});});(0,_vitest.describe)("LETTER_SPACING_SCALE",function(){(0,_vitest.it)("should export complete letter spacing scale",function(){(0,_vitest.expect)(_typography.LETTER_SPACING_SCALE).toMatchSnapshot();});});(0,_vitest.describe)("parseTypography - font size",function(){(0,_vitest.it)("should parse font size with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-xs")).toEqual({fontSize:12});(0,_vitest.expect)((0,_typography.parseTypography)("text-sm")).toEqual({fontSize:14});(0,_vitest.expect)((0,_typography.parseTypography)("text-base")).toEqual({fontSize:16});(0,_vitest.expect)((0,_typography.parseTypography)("text-lg")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-xl")).toEqual({fontSize:20});(0,_vitest.expect)((0,_typography.parseTypography)("text-2xl")).toEqual({fontSize:24});(0,_vitest.expect)((0,_typography.parseTypography)("text-3xl")).toEqual({fontSize:30});(0,_vitest.expect)((0,_typography.parseTypography)("text-4xl")).toEqual({fontSize:36});(0,_vitest.expect)((0,_typography.parseTypography)("text-5xl")).toEqual({fontSize:48});(0,_vitest.expect)((0,_typography.parseTypography)("text-6xl")).toEqual({fontSize:60});(0,_vitest.expect)((0,_typography.parseTypography)("text-7xl")).toEqual({fontSize:72});(0,_vitest.expect)((0,_typography.parseTypography)("text-8xl")).toEqual({fontSize:96});(0,_vitest.expect)((0,_typography.parseTypography)("text-9xl")).toEqual({fontSize:128});});(0,_vitest.it)("should parse font size with arbitrary pixel values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[13px]")).toEqual({fontSize:13});(0,_vitest.expect)((0,_typography.parseTypography)("text-[13]")).toEqual({fontSize:13});(0,_vitest.expect)((0,_typography.parseTypography)("text-[18px]")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-[18]")).toEqual({fontSize:18});(0,_vitest.expect)((0,_typography.parseTypography)("text-[22px]")).toEqual({fontSize:22});(0,_vitest.expect)((0,_typography.parseTypography)("text-[22]")).toEqual({fontSize:22});(0,_vitest.expect)((0,_typography.parseTypography)("text-[100px]")).toEqual({fontSize:100});});});(0,_vitest.describe)("parseTypography - font family",function(){(0,_vitest.it)("should parse font family values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("font-sans")).toEqual({fontFamily:"System"});(0,_vitest.expect)((0,_typography.parseTypography)("font-serif")).toEqual({fontFamily:"serif"});(0,_vitest.expect)((0,_typography.parseTypography)("font-mono")).toEqual({fontFamily:"Courier"});});});(0,_vitest.describe)("parseTypography - font weight",function(){(0,_vitest.it)("should parse font weight values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("font-thin")).toEqual({fontWeight:"100"});(0,_vitest.expect)((0,_typography.parseTypography)("font-extralight")).toEqual({fontWeight:"200"});(0,_vitest.expect)((0,_typography.parseTypography)("font-light")).toEqual({fontWeight:"300"});(0,_vitest.expect)((0,_typography.parseTypography)("font-normal")).toEqual({fontWeight:"400"});(0,_vitest.expect)((0,_typography.parseTypography)("font-medium")).toEqual({fontWeight:"500"});(0,_vitest.expect)((0,_typography.parseTypography)("font-semibold")).toEqual({fontWeight:"600"});(0,_vitest.expect)((0,_typography.parseTypography)("font-bold")).toEqual({fontWeight:"700"});(0,_vitest.expect)((0,_typography.parseTypography)("font-extrabold")).toEqual({fontWeight:"800"});(0,_vitest.expect)((0,_typography.parseTypography)("font-black")).toEqual({fontWeight:"900"});});});(0,_vitest.describe)("parseTypography - font style",function(){(0,_vitest.it)("should parse font style values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("italic")).toEqual({fontStyle:"italic"});(0,_vitest.expect)((0,_typography.parseTypography)("not-italic")).toEqual({fontStyle:"normal"});});});(0,_vitest.describe)("parseTypography - text alignment",function(){(0,_vitest.it)("should parse text alignment values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-left")).toEqual({textAlign:"left"});(0,_vitest.expect)((0,_typography.parseTypography)("text-center")).toEqual({textAlign:"center"});(0,_vitest.expect)((0,_typography.parseTypography)("text-right")).toEqual({textAlign:"right"});(0,_vitest.expect)((0,_typography.parseTypography)("text-justify")).toEqual({textAlign:"justify"});});});(0,_vitest.describe)("parseTypography - text decoration",function(){(0,_vitest.it)("should parse text decoration values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("underline")).toEqual({textDecorationLine:"underline"});(0,_vitest.expect)((0,_typography.parseTypography)("line-through")).toEqual({textDecorationLine:"line-through"});(0,_vitest.expect)((0,_typography.parseTypography)("no-underline")).toEqual({textDecorationLine:"none"});});});(0,_vitest.describe)("parseTypography - text transform",function(){(0,_vitest.it)("should parse text transform values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("uppercase")).toEqual({textTransform:"uppercase"});(0,_vitest.expect)((0,_typography.parseTypography)("lowercase")).toEqual({textTransform:"lowercase"});(0,_vitest.expect)((0,_typography.parseTypography)("capitalize")).toEqual({textTransform:"capitalize"});(0,_vitest.expect)((0,_typography.parseTypography)("normal-case")).toEqual({textTransform:"none"});});});(0,_vitest.describe)("parseTypography - line height",function(){(0,_vitest.it)("should parse line height with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("leading-none")).toEqual({lineHeight:16});(0,_vitest.expect)((0,_typography.parseTypography)("leading-tight")).toEqual({lineHeight:20});(0,_vitest.expect)((0,_typography.parseTypography)("leading-snug")).toEqual({lineHeight:22});(0,_vitest.expect)((0,_typography.parseTypography)("leading-normal")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-relaxed")).toEqual({lineHeight:28});(0,_vitest.expect)((0,_typography.parseTypography)("leading-loose")).toEqual({lineHeight:32});});(0,_vitest.it)("should parse line height with arbitrary pixel values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24px]")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24]")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[30px]")).toEqual({lineHeight:30});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[30]")).toEqual({lineHeight:30});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[50px]")).toEqual({lineHeight:50});});});(0,_vitest.describe)("parseTypography - letter spacing",function(){(0,_vitest.it)("should parse letter spacing with preset values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tighter")).toEqual({letterSpacing:-0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tight")).toEqual({letterSpacing:-0.4});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-normal")).toEqual({letterSpacing:0});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wide")).toEqual({letterSpacing:0.4});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wider")).toEqual({letterSpacing:0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-widest")).toEqual({letterSpacing:1.6});});});(0,_vitest.describe)("parseTypography - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_typography.parseTypography)("invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("tracking")).toBeNull();});(0,_vitest.it)("should return null for invalid font size values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-10xl")).toBeNull();});(0,_vitest.it)("should return null for invalid font weight values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("font-invalid")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font-100")).toBeNull();});(0,_vitest.it)("should return null for arbitrary values with unsupported units",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[16rem]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-[2em]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[2rem]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[1.5em]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[16")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-16]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("text-[]")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-[24")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("leading-24]")).toBeNull();});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_typography.parseTypography)("mytext-lg")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("font-bold-extra")).toBeNull();(0,_vitest.expect)((0,_typography.parseTypography)("italic-text")).toBeNull();});});(0,_vitest.describe)("parseTypography - comprehensive coverage",function(){(0,_vitest.it)("should handle all typography categories independently",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-base")).toEqual({fontSize:16});(0,_vitest.expect)((0,_typography.parseTypography)("font-mono")).toEqual({fontFamily:"Courier"});(0,_vitest.expect)((0,_typography.parseTypography)("font-bold")).toEqual({fontWeight:"700"});(0,_vitest.expect)((0,_typography.parseTypography)("italic")).toEqual({fontStyle:"italic"});(0,_vitest.expect)((0,_typography.parseTypography)("text-center")).toEqual({textAlign:"center"});(0,_vitest.expect)((0,_typography.parseTypography)("underline")).toEqual({textDecorationLine:"underline"});(0,_vitest.expect)((0,_typography.parseTypography)("uppercase")).toEqual({textTransform:"uppercase"});(0,_vitest.expect)((0,_typography.parseTypography)("leading-normal")).toEqual({lineHeight:24});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-wide")).toEqual({letterSpacing:0.4});});(0,_vitest.it)("should handle arbitrary values for font size and line height",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-[19px]")).toEqual({fontSize:19});(0,_vitest.expect)((0,_typography.parseTypography)("text-[19]")).toEqual({fontSize:19});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[26px]")).toEqual({lineHeight:26});(0,_vitest.expect)((0,_typography.parseTypography)("leading-[26]")).toEqual({lineHeight:26});});(0,_vitest.it)("should handle edge case values",function(){(0,_vitest.expect)((0,_typography.parseTypography)("text-xs")).toEqual({fontSize:12});(0,_vitest.expect)((0,_typography.parseTypography)("text-9xl")).toEqual({fontSize:128});(0,_vitest.expect)((0,_typography.parseTypography)("leading-none")).toEqual({lineHeight:16});(0,_vitest.expect)((0,_typography.parseTypography)("leading-loose")).toEqual({lineHeight:32});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-tighter")).toEqual({letterSpacing:-0.8});(0,_vitest.expect)((0,_typography.parseTypography)("tracking-widest")).toEqual({letterSpacing:1.6});});});
package/dist/types.d.ts CHANGED
@@ -3,10 +3,40 @@
3
3
  */
4
4
  import type { ImageStyle, TextStyle, ViewStyle } from "react-native";
5
5
  export type RNStyle = ViewStyle | TextStyle | ImageStyle;
6
- export type StyleObject = Record<string, string | number | {
6
+ export type TransformStyle = {
7
+ scale?: number;
8
+ } | {
9
+ scaleX?: number;
10
+ } | {
11
+ scaleY?: number;
12
+ } | {
13
+ rotate?: string;
14
+ } | {
15
+ rotateX?: string;
16
+ } | {
17
+ rotateY?: string;
18
+ } | {
19
+ rotateZ?: string;
20
+ } | {
21
+ translateX?: number | string;
22
+ } | {
23
+ translateY?: number | string;
24
+ } | {
25
+ skewX?: string;
26
+ } | {
27
+ skewY?: string;
28
+ } | {
29
+ perspective?: number;
30
+ };
31
+ export type ShadowOffsetStyle = {
7
32
  width: number;
8
33
  height: number;
9
- } | undefined>;
34
+ };
35
+ export type StyleObject = {
36
+ [key: string]: string | number | ShadowOffsetStyle | TransformStyle[] | undefined;
37
+ shadowOffset?: ShadowOffsetStyle;
38
+ transform?: TransformStyle[];
39
+ };
10
40
  export type SpacingValue = number;
11
41
  export type ColorValue = string;
12
42
  export type Parser = (className: string) => StyleObject | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgcrea/react-native-tailwind",
3
- "version": "0.5.2",
3
+ "version": "0.6.1",
4
4
  "description": "Compile-time Tailwind CSS for React Native with zero runtime overhead",
5
5
  "author": "Olivier Louvignes <olivier@mgcrea.io> (https://github.com/mgcrea)",
6
6
  "homepage": "https://github.com/mgcrea/react-native-tailwind#readme",
@@ -21,6 +21,7 @@ export type PressableProps = Omit<RNPressableProps, "style"> & {
21
21
  * Style can be a static style object/array or a function that receives Pressable state + disabled
22
22
  */
23
23
  style?: StyleProp<ViewStyle> | ((state: EnhancedPressableState) => StyleProp<ViewStyle>);
24
+ className?: string; // compile-time only
24
25
  };
25
26
 
26
27
  /**
@@ -30,6 +30,7 @@ export type TextInputProps = Omit<RNTextInputProps, "style"> & {
30
30
  style?:
31
31
  | RNTextInputProps["style"]
32
32
  | ((state: { focused: boolean; disabled: boolean }) => RNTextInputProps["style"]);
33
+ className?: string; // compile-time only
33
34
  /**
34
35
  * Convenience prop for disabled state (overrides editable if provided)
35
36
  * When true, sets editable to false