@mgcrea/react-native-tailwind 0.15.3 → 0.15.5
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.
- package/dist/babel/index.cjs +136 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/parser/colors.d.ts +2 -1
- package/dist/parser/colors.js +1 -1
- package/dist/parser/colors.test.js +1 -1
- package/dist/parser/index.d.ts +1 -0
- package/dist/parser/index.js +1 -1
- package/dist/parser/outline.d.ts +9 -0
- package/dist/parser/outline.js +1 -0
- package/dist/parser/outline.test.js +1 -0
- package/dist/parser/shadows.d.ts +7 -2
- package/dist/parser/shadows.js +1 -1
- package/dist/parser/shadows.test.js +1 -1
- package/dist/parser/sizing.js +1 -1
- package/dist/parser/sizing.test.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.cjs.map +4 -4
- package/dist/runtime.js +1 -1
- package/dist/runtime.js.map +4 -4
- package/dist/utils/colorUtils.d.ts +30 -0
- package/dist/utils/colorUtils.js +1 -0
- package/dist/utils/colorUtils.test.js +1 -0
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/parser/colors.test.ts +1 -16
- package/src/parser/colors.ts +34 -77
- package/src/parser/index.ts +4 -1
- package/src/parser/outline.test.ts +57 -0
- package/src/parser/outline.ts +101 -0
- package/src/parser/shadows.test.ts +109 -2
- package/src/parser/shadows.ts +20 -4
- package/src/parser/sizing.test.ts +82 -0
- package/src/parser/sizing.ts +28 -0
- package/src/utils/colorUtils.test.ts +193 -0
- package/src/utils/colorUtils.ts +115 -0
package/dist/parser/sizing.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.SIZE_SCALE=exports.SIZE_PERCENTAGES=void 0;exports.parseSizing=parseSizing;var _markers=require("../config/markers");var SIZE_SCALE=exports.SIZE_SCALE={0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384};var SIZE_PERCENTAGES=exports.SIZE_PERCENTAGES={full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"};function parseArbitrarySize(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 size unit: ${value}. Only px and % are supported.`);}return null;}return null;}function parseSizing(cls,customSpacing){var sizeMap=customSpacing?Object.assign({},SIZE_SCALE,customSpacing):SIZE_SCALE;if(cls.startsWith("
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.SIZE_SCALE=exports.SIZE_PERCENTAGES=void 0;exports.parseSizing=parseSizing;var _markers=require("../config/markers");var SIZE_SCALE=exports.SIZE_SCALE={0:0,0.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384};var SIZE_PERCENTAGES=exports.SIZE_PERCENTAGES={full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"};function parseArbitrarySize(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 size unit: ${value}. Only px and % are supported.`);}return null;}return null;}function parseSizing(cls,customSpacing){var sizeMap=customSpacing?Object.assign({},SIZE_SCALE,customSpacing):SIZE_SCALE;if(cls.startsWith("size-")){var sizeKey=cls.substring(5);var arbitrarySize=parseArbitrarySize(sizeKey);if(arbitrarySize!==null){return{width:arbitrarySize,height:arbitrarySize};}var percentage=SIZE_PERCENTAGES[sizeKey];if(percentage){return{width:percentage,height:percentage};}var numericSize=sizeMap[sizeKey];if(numericSize!==undefined){return{width:numericSize,height:numericSize};}if(sizeKey==="auto"){return{width:"auto",height:"auto"};}}if(cls.startsWith("w-")){var _sizeKey=cls.substring(2);if(_sizeKey==="screen"){return{width:`${_markers.RUNTIME_DIMENSIONS_MARKER}width}}`};}var _arbitrarySize=parseArbitrarySize(_sizeKey);if(_arbitrarySize!==null){return{width:_arbitrarySize};}var _percentage=SIZE_PERCENTAGES[_sizeKey];if(_percentage){return{width:_percentage};}var _numericSize=sizeMap[_sizeKey];if(_numericSize!==undefined){return{width:_numericSize};}if(_sizeKey==="auto"){return{width:"auto"};}}if(cls.startsWith("h-")){var _sizeKey2=cls.substring(2);if(_sizeKey2==="screen"){return{height:`${_markers.RUNTIME_DIMENSIONS_MARKER}height}}`};}var _arbitrarySize2=parseArbitrarySize(_sizeKey2);if(_arbitrarySize2!==null){return{height:_arbitrarySize2};}var _percentage2=SIZE_PERCENTAGES[_sizeKey2];if(_percentage2){return{height:_percentage2};}var _numericSize2=sizeMap[_sizeKey2];if(_numericSize2!==undefined){return{height:_numericSize2};}if(_sizeKey2==="auto"){return{height:"auto"};}}if(cls.startsWith("min-w-")){var _sizeKey3=cls.substring(6);var _arbitrarySize3=parseArbitrarySize(_sizeKey3);if(_arbitrarySize3!==null){return{minWidth:_arbitrarySize3};}var _percentage3=SIZE_PERCENTAGES[_sizeKey3];if(_percentage3){return{minWidth:_percentage3};}var _numericSize3=sizeMap[_sizeKey3];if(_numericSize3!==undefined){return{minWidth:_numericSize3};}}if(cls.startsWith("min-h-")){var _sizeKey4=cls.substring(6);var _arbitrarySize4=parseArbitrarySize(_sizeKey4);if(_arbitrarySize4!==null){return{minHeight:_arbitrarySize4};}var _percentage4=SIZE_PERCENTAGES[_sizeKey4];if(_percentage4){return{minHeight:_percentage4};}var _numericSize4=sizeMap[_sizeKey4];if(_numericSize4!==undefined){return{minHeight:_numericSize4};}}if(cls.startsWith("max-w-")){var _sizeKey5=cls.substring(6);var _arbitrarySize5=parseArbitrarySize(_sizeKey5);if(_arbitrarySize5!==null){return{maxWidth:_arbitrarySize5};}var _percentage5=SIZE_PERCENTAGES[_sizeKey5];if(_percentage5){return{maxWidth:_percentage5};}var _numericSize5=sizeMap[_sizeKey5];if(_numericSize5!==undefined){return{maxWidth:_numericSize5};}}if(cls.startsWith("max-h-")){var _sizeKey6=cls.substring(6);var _arbitrarySize6=parseArbitrarySize(_sizeKey6);if(_arbitrarySize6!==null){return{maxHeight:_arbitrarySize6};}var _percentage6=SIZE_PERCENTAGES[_sizeKey6];if(_percentage6){return{maxHeight:_percentage6};}var _numericSize6=sizeMap[_sizeKey6];if(_numericSize6!==undefined){return{maxHeight:_numericSize6};}}return null;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _vitest=require("vitest");var _sizing=require("./sizing");(0,_vitest.describe)("SIZE_SCALE",function(){(0,_vitest.it)("should export complete size scale",function(){(0,_vitest.expect)(_sizing.SIZE_SCALE).toMatchSnapshot();});});(0,_vitest.describe)("SIZE_PERCENTAGES",function(){(0,_vitest.it)("should export complete percentage sizes",function(){(0,_vitest.expect)(_sizing.SIZE_PERCENTAGES).toMatchSnapshot();});});(0,_vitest.describe)("parseSizing - width",function(){(0,_vitest.it)("should parse width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0")).toEqual({width:0});(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:16});(0,_vitest.expect)((0,_sizing.parseSizing)("w-8")).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("w-96")).toEqual({width:384});});(0,_vitest.it)("should parse width with fractional values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0.5")).toEqual({width:2});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1.5")).toEqual({width:6});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2.5")).toEqual({width:10});});(0,_vitest.it)("should parse width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-full")).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/2")).toEqual({width:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/3")).toEqual({width:"33.333333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2/3")).toEqual({width:"66.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/4")).toEqual({width:"25%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-3/4")).toEqual({width:"75%"});});(0,_vitest.it)("should parse width with special values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-auto")).toEqual({width:"auto"});});(0,_vitest.it)("should parse width with arbitrary pixel values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123px]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[350px]")).toEqual({width:350});});(0,_vitest.it)("should parse width with arbitrary percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[50%]")).toEqual({width:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[33.333%]")).toEqual({width:"33.333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[85%]")).toEqual({width:"85%"});});});(0,_vitest.describe)("parseSizing - height",function(){(0,_vitest.it)("should parse height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-0")).toEqual({height:0});(0,_vitest.expect)((0,_sizing.parseSizing)("h-4")).toEqual({height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-8")).toEqual({height:32});(0,_vitest.expect)((0,_sizing.parseSizing)("h-96")).toEqual({height:384});});(0,_vitest.it)("should parse height with fractional values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-0.5")).toEqual({height:2});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1.5")).toEqual({height:6});(0,_vitest.expect)((0,_sizing.parseSizing)("h-2.5")).toEqual({height:10});});(0,_vitest.it)("should parse height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-full")).toEqual({height:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/2")).toEqual({height:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/3")).toEqual({height:"33.333333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-2/3")).toEqual({height:"66.666667%"});});(0,_vitest.it)("should parse height with special values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-auto")).toEqual({height:"auto"});});(0,_vitest.it)("should parse height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-[200px]")).toEqual({height:200});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[75%]")).toEqual({height:"75%"});});});(0,_vitest.describe)("parseSizing - min width",function(){(0,_vitest.it)("should parse min-width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-0")).toEqual({minWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-4")).toEqual({minWidth:16});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-8")).toEqual({minWidth:32});});(0,_vitest.it)("should parse min-width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-full")).toEqual({minWidth:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-1/2")).toEqual({minWidth:"50%"});});(0,_vitest.it)("should parse min-width with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[200px]")).toEqual({minWidth:200});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[50%]")).toEqual({minWidth:"50%"});});});(0,_vitest.describe)("parseSizing - min height",function(){(0,_vitest.it)("should parse min-height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-0")).toEqual({minHeight:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-4")).toEqual({minHeight:16});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-8")).toEqual({minHeight:32});});(0,_vitest.it)("should parse min-height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-full")).toEqual({minHeight:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-1/2")).toEqual({minHeight:"50%"});});(0,_vitest.it)("should parse min-height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[150px]")).toEqual({minHeight:150});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[40%]")).toEqual({minHeight:"40%"});});});(0,_vitest.describe)("parseSizing - max width",function(){(0,_vitest.it)("should parse max-width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-0")).toEqual({maxWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-4")).toEqual({maxWidth:16});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-8")).toEqual({maxWidth:32});});(0,_vitest.it)("should parse max-width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-full")).toEqual({maxWidth:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-1/2")).toEqual({maxWidth:"50%"});});(0,_vitest.it)("should parse max-width with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[500px]")).toEqual({maxWidth:500});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[80%]")).toEqual({maxWidth:"80%"});});});(0,_vitest.describe)("parseSizing - max height",function(){(0,_vitest.it)("should parse max-height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-0")).toEqual({maxHeight:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-4")).toEqual({maxHeight:16});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-8")).toEqual({maxHeight:32});});(0,_vitest.it)("should parse max-height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-full")).toEqual({maxHeight:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-1/2")).toEqual({maxHeight:"50%"});});(0,_vitest.it)("should parse max-height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[300px]")).toEqual({maxHeight:300});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[90%]")).toEqual({maxHeight:"90%"});});});(0,_vitest.describe)("parseSizing - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("invalid")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("w")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("width-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("height-4")).toBeNull();});(0,_vitest.it)("should return null for invalid size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-invalid")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-999")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-abc")).toBeNull();});(0,_vitest.it)("should return null for arbitrary values with unsupported units",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[16rem]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-[2em]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[50vh]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[100vw]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[16")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-16]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[]")).toBeNull();});(0,_vitest.it)("should handle edge case size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0")).toEqual({width:0});(0,_vitest.expect)((0,_sizing.parseSizing)("h-0")).toEqual({height:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-0")).toEqual({minWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-0")).toEqual({maxHeight:0});});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("tw-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("width-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("height-4")).toBeNull();});});(0,_vitest.describe)("parseSizing - comprehensive coverage",function(){(0,_vitest.it)("should parse all width variants with same value",function(){var value=16;(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:value});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-4")).toEqual({minWidth:value});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-4")).toEqual({maxWidth:value});});(0,_vitest.it)("should parse all height variants with same value",function(){var value=16;(0,_vitest.expect)((0,_sizing.parseSizing)("h-4")).toEqual({height:value});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-4")).toEqual({minHeight:value});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-4")).toEqual({maxHeight:value});});(0,_vitest.it)("should handle large size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-96")).toEqual({width:384});(0,_vitest.expect)((0,_sizing.parseSizing)("h-96")).toEqual({height:384});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-96")).toEqual({maxWidth:384});});(0,_vitest.it)("should handle arbitrary values across all width variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123px]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[123px]")).toEqual({minWidth:123});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[123px]")).toEqual({maxWidth:123});});(0,_vitest.it)("should handle arbitrary values across all height variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-[200px]")).toEqual({height:200});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[200px]")).toEqual({minHeight:200});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[200px]")).toEqual({maxHeight:200});});(0,_vitest.it)("should handle arbitrary percentage values across all variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[75%]")).toEqual({width:"75%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[60%]")).toEqual({height:"60%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[25%]")).toEqual({minWidth:"25%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[90%]")).toEqual({maxHeight:"90%"});});(0,_vitest.it)("should handle all fractional percentage variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/5")).toEqual({width:"20%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2/5")).toEqual({width:"40%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-3/5")).toEqual({width:"60%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-4/5")).toEqual({width:"80%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/6")).toEqual({width:"16.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-5/6")).toEqual({width:"83.333333%"});});(0,_vitest.it)("should handle special values consistently",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-auto")).toEqual({width:"auto"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-auto")).toEqual({height:"auto"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-full")).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-full")).toEqual({height:"100%"});});});(0,_vitest.describe)("parseSizing - custom spacing",function(){var customSpacing={xs:4,sm:8,md:16,lg:32,xl:64,"4":20};(0,_vitest.it)("should support custom spacing values for width",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-xs",customSpacing)).toEqual({width:4});(0,_vitest.expect)((0,_sizing.parseSizing)("w-sm",customSpacing)).toEqual({width:8});(0,_vitest.expect)((0,_sizing.parseSizing)("w-lg",customSpacing)).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("w-xl",customSpacing)).toEqual({width:64});});(0,_vitest.it)("should support custom spacing values for height",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-xs",customSpacing)).toEqual({height:4});(0,_vitest.expect)((0,_sizing.parseSizing)("h-md",customSpacing)).toEqual({height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-xl",customSpacing)).toEqual({height:64});});(0,_vitest.it)("should support custom spacing values for min/max dimensions",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-sm",customSpacing)).toEqual({minWidth:8});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-lg",customSpacing)).toEqual({minHeight:32});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-xl",customSpacing)).toEqual({maxWidth:64});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-md",customSpacing)).toEqual({maxHeight:16});});(0,_vitest.it)("should allow custom spacing to override preset values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-4",customSpacing)).toEqual({width:20});(0,_vitest.expect)((0,_sizing.parseSizing)("h-4",customSpacing)).toEqual({height:20});});(0,_vitest.it)("should prefer arbitrary values over custom spacing",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[24px]",customSpacing)).toEqual({width:24});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[50]",customSpacing)).toEqual({height:50});});(0,_vitest.it)("should fall back to preset scale for unknown custom keys",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-8",customSpacing)).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("h-12",customSpacing)).toEqual({height:48});});(0,_vitest.it)("should preserve percentage values with custom spacing",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-full",customSpacing)).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/2",customSpacing)).toEqual({height:"50%"});});(0,_vitest.it)("should work without custom spacing (backward compatible)",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-8")).toEqual({height:32});});});
|
|
1
|
+
var _vitest=require("vitest");var _sizing=require("./sizing");(0,_vitest.describe)("SIZE_SCALE",function(){(0,_vitest.it)("should export complete size scale",function(){(0,_vitest.expect)(_sizing.SIZE_SCALE).toMatchSnapshot();});});(0,_vitest.describe)("SIZE_PERCENTAGES",function(){(0,_vitest.it)("should export complete percentage sizes",function(){(0,_vitest.expect)(_sizing.SIZE_PERCENTAGES).toMatchSnapshot();});});(0,_vitest.describe)("parseSizing - width",function(){(0,_vitest.it)("should parse width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0")).toEqual({width:0});(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:16});(0,_vitest.expect)((0,_sizing.parseSizing)("w-8")).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("w-96")).toEqual({width:384});});(0,_vitest.it)("should parse width with fractional values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0.5")).toEqual({width:2});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1.5")).toEqual({width:6});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2.5")).toEqual({width:10});});(0,_vitest.it)("should parse width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-full")).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/2")).toEqual({width:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/3")).toEqual({width:"33.333333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2/3")).toEqual({width:"66.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/4")).toEqual({width:"25%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-3/4")).toEqual({width:"75%"});});(0,_vitest.it)("should parse width with special values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-auto")).toEqual({width:"auto"});});(0,_vitest.it)("should parse width with arbitrary pixel values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123px]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[350px]")).toEqual({width:350});});(0,_vitest.it)("should parse width with arbitrary percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[50%]")).toEqual({width:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[33.333%]")).toEqual({width:"33.333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-[85%]")).toEqual({width:"85%"});});});(0,_vitest.describe)("parseSizing - height",function(){(0,_vitest.it)("should parse height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-0")).toEqual({height:0});(0,_vitest.expect)((0,_sizing.parseSizing)("h-4")).toEqual({height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-8")).toEqual({height:32});(0,_vitest.expect)((0,_sizing.parseSizing)("h-96")).toEqual({height:384});});(0,_vitest.it)("should parse height with fractional values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-0.5")).toEqual({height:2});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1.5")).toEqual({height:6});(0,_vitest.expect)((0,_sizing.parseSizing)("h-2.5")).toEqual({height:10});});(0,_vitest.it)("should parse height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-full")).toEqual({height:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/2")).toEqual({height:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/3")).toEqual({height:"33.333333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-2/3")).toEqual({height:"66.666667%"});});(0,_vitest.it)("should parse height with special values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-auto")).toEqual({height:"auto"});});(0,_vitest.it)("should parse height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-[200px]")).toEqual({height:200});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[75%]")).toEqual({height:"75%"});});});(0,_vitest.describe)("parseSizing - min width",function(){(0,_vitest.it)("should parse min-width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-0")).toEqual({minWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-4")).toEqual({minWidth:16});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-8")).toEqual({minWidth:32});});(0,_vitest.it)("should parse min-width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-full")).toEqual({minWidth:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-1/2")).toEqual({minWidth:"50%"});});(0,_vitest.it)("should parse min-width with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[200px]")).toEqual({minWidth:200});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[50%]")).toEqual({minWidth:"50%"});});});(0,_vitest.describe)("parseSizing - min height",function(){(0,_vitest.it)("should parse min-height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-0")).toEqual({minHeight:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-4")).toEqual({minHeight:16});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-8")).toEqual({minHeight:32});});(0,_vitest.it)("should parse min-height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-full")).toEqual({minHeight:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-1/2")).toEqual({minHeight:"50%"});});(0,_vitest.it)("should parse min-height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[150px]")).toEqual({minHeight:150});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[40%]")).toEqual({minHeight:"40%"});});});(0,_vitest.describe)("parseSizing - max width",function(){(0,_vitest.it)("should parse max-width with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-0")).toEqual({maxWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-4")).toEqual({maxWidth:16});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-8")).toEqual({maxWidth:32});});(0,_vitest.it)("should parse max-width with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-full")).toEqual({maxWidth:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-1/2")).toEqual({maxWidth:"50%"});});(0,_vitest.it)("should parse max-width with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[500px]")).toEqual({maxWidth:500});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[80%]")).toEqual({maxWidth:"80%"});});});(0,_vitest.describe)("parseSizing - max height",function(){(0,_vitest.it)("should parse max-height with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-0")).toEqual({maxHeight:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-4")).toEqual({maxHeight:16});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-8")).toEqual({maxHeight:32});});(0,_vitest.it)("should parse max-height with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-full")).toEqual({maxHeight:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-1/2")).toEqual({maxHeight:"50%"});});(0,_vitest.it)("should parse max-height with arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[300px]")).toEqual({maxHeight:300});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[90%]")).toEqual({maxHeight:"90%"});});});(0,_vitest.describe)("parseSizing - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("invalid")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("w")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("width-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("height-4")).toBeNull();});(0,_vitest.it)("should return null for invalid size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-invalid")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-999")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-abc")).toBeNull();});(0,_vitest.it)("should return null for arbitrary values with unsupported units",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[16rem]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-[2em]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[50vh]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[100vw]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[16")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("h-16]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[]")).toBeNull();});(0,_vitest.it)("should handle edge case size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-0")).toEqual({width:0});(0,_vitest.expect)((0,_sizing.parseSizing)("h-0")).toEqual({height:0});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-0")).toEqual({minWidth:0});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-0")).toEqual({maxHeight:0});});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("tw-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("width-4")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("height-4")).toBeNull();});});(0,_vitest.describe)("parseSizing - comprehensive coverage",function(){(0,_vitest.it)("should parse all width variants with same value",function(){var value=16;(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:value});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-4")).toEqual({minWidth:value});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-4")).toEqual({maxWidth:value});});(0,_vitest.it)("should parse all height variants with same value",function(){var value=16;(0,_vitest.expect)((0,_sizing.parseSizing)("h-4")).toEqual({height:value});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-4")).toEqual({minHeight:value});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-4")).toEqual({maxHeight:value});});(0,_vitest.it)("should handle large size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-96")).toEqual({width:384});(0,_vitest.expect)((0,_sizing.parseSizing)("h-96")).toEqual({height:384});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-96")).toEqual({maxWidth:384});});(0,_vitest.it)("should handle arbitrary values across all width variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[123px]")).toEqual({width:123});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[123px]")).toEqual({minWidth:123});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-[123px]")).toEqual({maxWidth:123});});(0,_vitest.it)("should handle arbitrary values across all height variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-[200px]")).toEqual({height:200});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-[200px]")).toEqual({minHeight:200});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[200px]")).toEqual({maxHeight:200});});(0,_vitest.it)("should handle arbitrary percentage values across all variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[75%]")).toEqual({width:"75%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[60%]")).toEqual({height:"60%"});(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-[25%]")).toEqual({minWidth:"25%"});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-[90%]")).toEqual({maxHeight:"90%"});});(0,_vitest.it)("should handle all fractional percentage variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/5")).toEqual({width:"20%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-2/5")).toEqual({width:"40%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-3/5")).toEqual({width:"60%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-4/5")).toEqual({width:"80%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-1/6")).toEqual({width:"16.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-5/6")).toEqual({width:"83.333333%"});});(0,_vitest.it)("should handle special values consistently",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-auto")).toEqual({width:"auto"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-auto")).toEqual({height:"auto"});(0,_vitest.expect)((0,_sizing.parseSizing)("w-full")).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-full")).toEqual({height:"100%"});});});(0,_vitest.describe)("parseSizing - custom spacing",function(){var customSpacing={xs:4,sm:8,md:16,lg:32,xl:64,"4":20};(0,_vitest.it)("should support custom spacing values for width",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-xs",customSpacing)).toEqual({width:4});(0,_vitest.expect)((0,_sizing.parseSizing)("w-sm",customSpacing)).toEqual({width:8});(0,_vitest.expect)((0,_sizing.parseSizing)("w-lg",customSpacing)).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("w-xl",customSpacing)).toEqual({width:64});});(0,_vitest.it)("should support custom spacing values for height",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("h-xs",customSpacing)).toEqual({height:4});(0,_vitest.expect)((0,_sizing.parseSizing)("h-md",customSpacing)).toEqual({height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-xl",customSpacing)).toEqual({height:64});});(0,_vitest.it)("should support custom spacing values for min/max dimensions",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("min-w-sm",customSpacing)).toEqual({minWidth:8});(0,_vitest.expect)((0,_sizing.parseSizing)("min-h-lg",customSpacing)).toEqual({minHeight:32});(0,_vitest.expect)((0,_sizing.parseSizing)("max-w-xl",customSpacing)).toEqual({maxWidth:64});(0,_vitest.expect)((0,_sizing.parseSizing)("max-h-md",customSpacing)).toEqual({maxHeight:16});});(0,_vitest.it)("should allow custom spacing to override preset values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-4",customSpacing)).toEqual({width:20});(0,_vitest.expect)((0,_sizing.parseSizing)("h-4",customSpacing)).toEqual({height:20});});(0,_vitest.it)("should prefer arbitrary values over custom spacing",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-[24px]",customSpacing)).toEqual({width:24});(0,_vitest.expect)((0,_sizing.parseSizing)("h-[50]",customSpacing)).toEqual({height:50});});(0,_vitest.it)("should fall back to preset scale for unknown custom keys",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-8",customSpacing)).toEqual({width:32});(0,_vitest.expect)((0,_sizing.parseSizing)("h-12",customSpacing)).toEqual({height:48});});(0,_vitest.it)("should preserve percentage values with custom spacing",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-full",customSpacing)).toEqual({width:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("h-1/2",customSpacing)).toEqual({height:"50%"});});(0,_vitest.it)("should work without custom spacing (backward compatible)",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("w-4")).toEqual({width:16});(0,_vitest.expect)((0,_sizing.parseSizing)("h-8")).toEqual({height:32});});});(0,_vitest.describe)("parseSizing - size (width + height)",function(){(0,_vitest.it)("should parse size with numeric values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-0")).toEqual({width:0,height:0});(0,_vitest.expect)((0,_sizing.parseSizing)("size-4")).toEqual({width:16,height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("size-8")).toEqual({width:32,height:32});(0,_vitest.expect)((0,_sizing.parseSizing)("size-96")).toEqual({width:384,height:384});});(0,_vitest.it)("should parse size with fractional values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-0.5")).toEqual({width:2,height:2});(0,_vitest.expect)((0,_sizing.parseSizing)("size-1.5")).toEqual({width:6,height:6});(0,_vitest.expect)((0,_sizing.parseSizing)("size-2.5")).toEqual({width:10,height:10});});(0,_vitest.it)("should parse size with percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-full")).toEqual({width:"100%",height:"100%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-1/2")).toEqual({width:"50%",height:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-1/3")).toEqual({width:"33.333333%",height:"33.333333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-2/3")).toEqual({width:"66.666667%",height:"66.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-1/4")).toEqual({width:"25%",height:"25%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-3/4")).toEqual({width:"75%",height:"75%"});});(0,_vitest.it)("should parse size with special values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-auto")).toEqual({width:"auto",height:"auto"});});(0,_vitest.it)("should parse size with arbitrary pixel values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-[123px]")).toEqual({width:123,height:123});(0,_vitest.expect)((0,_sizing.parseSizing)("size-[200]")).toEqual({width:200,height:200});(0,_vitest.expect)((0,_sizing.parseSizing)("size-[50px]")).toEqual({width:50,height:50});});(0,_vitest.it)("should parse size with arbitrary percentage values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-[50%]")).toEqual({width:"50%",height:"50%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-[33.333%]")).toEqual({width:"33.333%",height:"33.333%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-[85%]")).toEqual({width:"85%",height:"85%"});});(0,_vitest.it)("should support custom spacing values for size",function(){var customSpacing={sm:8,md:16,lg:32,xl:64};(0,_vitest.expect)((0,_sizing.parseSizing)("size-sm",customSpacing)).toEqual({width:8,height:8});(0,_vitest.expect)((0,_sizing.parseSizing)("size-md",customSpacing)).toEqual({width:16,height:16});(0,_vitest.expect)((0,_sizing.parseSizing)("size-lg",customSpacing)).toEqual({width:32,height:32});(0,_vitest.expect)((0,_sizing.parseSizing)("size-xl",customSpacing)).toEqual({width:64,height:64});});(0,_vitest.it)("should allow custom spacing to override preset values",function(){var customSpacing={"4":20};(0,_vitest.expect)((0,_sizing.parseSizing)("size-4",customSpacing)).toEqual({width:20,height:20});});(0,_vitest.it)("should prefer arbitrary values over custom spacing",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-[24px]",{"4":20})).toEqual({width:24,height:24});(0,_vitest.expect)((0,_sizing.parseSizing)("size-[50]",{sm:8})).toEqual({width:50,height:50});});(0,_vitest.it)("should handle all fractional percentage variants",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-1/5")).toEqual({width:"20%",height:"20%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-2/5")).toEqual({width:"40%",height:"40%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-3/5")).toEqual({width:"60%",height:"60%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-4/5")).toEqual({width:"80%",height:"80%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-1/6")).toEqual({width:"16.666667%",height:"16.666667%"});(0,_vitest.expect)((0,_sizing.parseSizing)("size-5/6")).toEqual({width:"83.333333%",height:"83.333333%"});});(0,_vitest.it)("should handle edge case size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-0")).toEqual({width:0,height:0});});(0,_vitest.it)("should return null for invalid size values",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-invalid")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("size-999")).toBeNull();});(0,_vitest.it)("should return null for arbitrary values with unsupported units",function(){(0,_vitest.expect)((0,_sizing.parseSizing)("size-[16rem]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("size-[2em]")).toBeNull();(0,_vitest.expect)((0,_sizing.parseSizing)("size-[50vh]")).toBeNull();});});
|
package/dist/runtime.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var I=Object.defineProperty,Tt=Object.defineProperties,Nt=Object.getOwnPropertyDescriptor,At=Object.getOwnPropertyDescriptors,_t=Object.getOwnPropertyNames,et=Object.getOwnPropertySymbols;var nt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable;var rt=(t,e,i)=>e in t?I(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,x=(t,e)=>{for(var i in e||(e={}))nt.call(e,i)&&rt(t,i,e[i]);if(et)for(var i of et(e))$t.call(e,i)&&rt(t,i,e[i]);return t},it=(t,e)=>Tt(t,At(e));var It=(t,e)=>{for(var i in e)I(t,i,{get:e[i],enumerable:!0})},vt=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of _t(e))!nt.call(t,o)&&o!==i&&I(t,o,{get:()=>e[o],enumerable:!(r=Nt(e,o))||r.enumerable});return t};var jt=t=>vt(I({},"__esModule",{value:!0}),t);var Ne={};It(Ne,{clearCache:()=>Ce,getCacheStats:()=>We,getCustomColors:()=>Me,getCustomTheme:()=>Oe,setConfig:()=>we,tw:()=>Ee,twStyle:()=>Te});module.exports=jt(Ne);function ot(t){return Object.keys(t)[0]}function Vt(t,e){let i=[...t];for(let r of e){let o=ot(r),n=i.findIndex(s=>ot(s)===o);n!==-1?i[n]=r:i.push(r)}return i}function st(t,e){for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let r=e[i];if(i==="transform"&&Array.isArray(r)){let o=t[i];Array.isArray(o)?t.transform=Vt(o,r):t[i]=r}else t[i]=r}return t}var at={"aspect-auto":void 0,"aspect-square":1,"aspect-video":1.7777777777777777};function Pt(t){let e=t.match(/^\[(\d+)\/(\d+)\]$/);if(e){let i=Number.parseInt(e[1],10),r=Number.parseInt(e[2],10);return r===0?(process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid aspect ratio: ${t}. Denominator cannot be zero.`),null):i/r}return null}function V(t){if(!t.startsWith("aspect-"))return null;if(t in at){let r=at[t];return r===void 0?{aspectRatio:void 0}:{aspectRatio:r}}let e=t.substring(7),i=Pt(e);return i!==null?{aspectRatio:i}:null}var ft={red:{50:"#fef2f2",100:"#ffe2e2",200:"#ffc9c9",300:"#ffa2a2",400:"#ff6467",500:"#fb2c36",600:"#e7000b",700:"#c10007",800:"#9f0712",900:"#82181a",950:"#460809"},orange:{50:"#fff7ed",100:"#ffedd4",200:"#ffd6a7",300:"#ffb86a",400:"#ff8904",500:"#ff6900",600:"#f54900",700:"#ca3500",800:"#9f2d00",900:"#7e2a0c",950:"#441306"},amber:{50:"#fffbeb",100:"#fef3c6",200:"#fee685",300:"#ffd230",400:"#ffb900",500:"#fe9a00",600:"#e17100",700:"#bb4d00",800:"#973c00",900:"#7b3306",950:"#461901"},yellow:{50:"#fefce8",100:"#fef9c2",200:"#fff085",300:"#ffdf20",400:"#fdc700",500:"#f0b100",600:"#d08700",700:"#a65f00",800:"#894b00",900:"#733e0a",950:"#432004"},lime:{50:"#f7fee7",100:"#ecfcca",200:"#d8f999",300:"#bbf451",400:"#9ae600",500:"#7ccf00",600:"#5ea500",700:"#497d00",800:"#3c6300",900:"#35530e",950:"#192e03"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#b9f8cf",300:"#7bf1a8",400:"#05df72",500:"#00c950",600:"#00a63e",700:"#008236",800:"#016630",900:"#0d542b",950:"#032e15"},emerald:{50:"#ecfdf5",100:"#d0fae5",200:"#a4f4cf",300:"#5ee9b5",400:"#00d492",500:"#00bc7d",600:"#009966",700:"#007a55",800:"#006045",900:"#004f3b",950:"#002c22"},teal:{50:"#f0fdfa",100:"#cbfbf1",200:"#96f7e4",300:"#46ecd5",400:"#00d5be",500:"#00bba7",600:"#009689",700:"#00786f",800:"#005f5a",900:"#0b4f4a",950:"#022f2e"},cyan:{50:"#ecfeff",100:"#cefafe",200:"#a2f4fd",300:"#53eafd",400:"#00d3f2",500:"#00b8db",600:"#0092b8",700:"#007595",800:"#005f78",900:"#104e64",950:"#053345"},sky:{50:"#f0f9ff",100:"#dff2fe",200:"#b8e6fe",300:"#74d4ff",400:"#00bcff",500:"#00a6f4",600:"#0084d1",700:"#0069a8",800:"#00598a",900:"#024a70",950:"#052f4a"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bedbff",300:"#8ec5ff",400:"#51a2ff",500:"#2b7fff",600:"#155dfc",700:"#1447e6",800:"#193cb8",900:"#1c398e",950:"#162456"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c6d2ff",300:"#a3b3ff",400:"#7c86ff",500:"#615fff",600:"#4f39f6",700:"#432dd7",800:"#372aac",900:"#312c85",950:"#1e1a4d"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6ff",300:"#c4b4ff",400:"#a684ff",500:"#8e51ff",600:"#7f22fe",700:"#7008e7",800:"#5d0ec0",900:"#4d179a",950:"#2f0d68"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d4ff",300:"#dab2ff",400:"#c27aff",500:"#ad46ff",600:"#9810fa",700:"#8200db",800:"#6e11b0",900:"#59168b",950:"#3c0366"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f6cfff",300:"#f4a8ff",400:"#ed6aff",500:"#e12afb",600:"#c800de",700:"#a800b7",800:"#8a0194",900:"#721378",950:"#4b004f"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fccee8",300:"#fda5d5",400:"#fb64b6",500:"#f6339a",600:"#e60076",700:"#c6005c",800:"#a3004c",900:"#861043",950:"#510424"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#ffccd3",300:"#ffa1ad",400:"#ff637e",500:"#ff2056",600:"#ec003f",700:"#c70036",800:"#a50036",900:"#8b0836",950:"#4d0218"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cad5e2",400:"#90a1b9",500:"#62748e",600:"#45556c",700:"#314158",800:"#1d293d",900:"#0f172b",950:"#020618"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5dc",400:"#99a1af",500:"#6a7282",600:"#4a5565",700:"#364153",800:"#1e2939",900:"#101828",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a1a1a1",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a6a09b",500:"#79716b",600:"#57534d",700:"#44403b",800:"#292524",900:"#1c1917",950:"#0c0a09"}};function A(t,e=""){let i={};for(let[r,o]of Object.entries(t)){let n=r==="DEFAULT"&&e?e:e?`${e}-${r}`:r;typeof o=="string"?i[n]=o:typeof o=="object"&&o!==null&&Object.assign(i,A(o,n))}return i}var Dt=it(x({},A(ft)),{white:"#FFFFFF",black:"#000000",transparent:"transparent"});function lt(t,e){if(t==="transparent")return"transparent";let i=t.replace(/^#/,""),r=i.length===3?i.split("").map(s=>s+s).join(""):i,n=Math.round(e/100*255).toString(16).padStart(2,"0").toUpperCase();return`#${r.toUpperCase()}${n}`}function ct(t){let e=t.match(/^\[#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\]$/);if(e){let i=e[1];return i.length===3?`#${i.split("").map(o=>o+o).join("")}`:`#${i}`}return t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary color value: ${t}. Only hex colors are supported (e.g., [#ff0000], [#f00], or [#ff0000aa]).`),null}function M(t,e){let i=n=>{var s;return(s=e==null?void 0:e[n])!=null?s:Dt[n]},r=n=>{var l;let s=n.match(/^(.+)\/(\d+)$/);if(s){let g=s[1],u=Number.parseInt(s[2],10);if(u<0||u>100)return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid opacity value: ${u}. Opacity must be between 0 and 100.`),null;let h=ct(g);if(h!==null)return lt(h,u);let p=i(g);return p?lt(p,u):null}let a=ct(n);return a!==null?a:(l=i(n))!=null?l:null};if(t.startsWith("bg-")){let n=t.substring(3);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{backgroundColor:s}}if(t.startsWith("text-")){let n=t.substring(5);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{color:s}}if(t.startsWith("border-")&&!t.match(/^border-[0-9]/)){let n=t.substring(7);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{borderColor:s}}let o=t.match(/^border-([trblxy])-(.+)$/);if(o){let n=o[1],s=o[2];if(s.startsWith("[")&&!s.startsWith("[#"))return null;let a=r(s);if(a)return n==="x"?{borderLeftColor:a,borderRightColor:a}:n==="y"?{borderTopColor:a,borderBottomColor:a}:{[{t:"borderTopColor",r:"borderRightColor",b:"borderBottomColor",l:"borderLeftColor"}[n]]:a}}return null}var dt={"":1,0:0,2:2,4:4,8:8},_={none:0,sm:2,"":4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999},ut={t:"borderTopWidth",r:"borderRightWidth",b:"borderBottomWidth",l:"borderLeftWidth",s:"borderStartWidth",e:"borderEndWidth"},pt={tl:"borderTopLeftRadius",tr:"borderTopRightRadius",bl:"borderBottomLeftRadius",br:"borderBottomRightRadius"},gt={ss:"borderTopStartRadius",se:"borderTopEndRadius",es:"borderBottomStartRadius",ee:"borderBottomEndRadius"},kt={t:["borderTopLeftRadius","borderTopRightRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],s:["borderTopStartRadius","borderBottomStartRadius"],e:["borderTopEndRadius","borderBottomEndRadius"]};function yt(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary border width value: ${t}. Only px values are supported (e.g., [8px] or [8]).`),null)}function v(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary border radius value: ${t}. Only px values are supported (e.g., [12px] or [12]).`),null)}function P(t,e){return t==="border-solid"?{borderStyle:"solid"}:t==="border-dotted"?{borderStyle:"dotted"}:t==="border-dashed"?{borderStyle:"dashed"}:t.startsWith("border-")?Lt(t,e):t==="border"?{borderWidth:1}:t.startsWith("rounded")?Ft(t):null}function Lt(t,e){let i=t.match(/^border-([trblse])(?:-(.+))?$/);if(i){let n=i[1],s=i[2]||"";if(s&&n!=="s"&&n!=="e"&&M(t,e)!==null)return null;if(s.startsWith("[")){let l=yt(s);return l!==null?{[ut[n]]:l}:null}let a=dt[s];return a!==void 0?{[ut[n]]:a}:null}let r=t.match(/^border-(\d+)$/);if(r){let n=dt[r[1]];if(n!==void 0)return{borderWidth:n}}let o=t.match(/^border-(\[.+\])$/);if(o){let n=yt(o[1]);if(n!==null)return{borderWidth:n}}return null}function Ft(t){let e=t.substring(7);if(e==="")return{borderRadius:_[""]};if(!e.startsWith("-"))return null;let i=e.substring(1);if(i==="")return null;let r=i.match(/^(tl|tr|bl|br)(?:-(.+))?$/);if(r){let a=r[1],l=r[2]||"";if(l.startsWith("[")){let u=v(l);return u!==null?{[pt[a]]:u}:null}let g=_[l];return g!==void 0?{[pt[a]]:g}:null}let o=i.match(/^(ss|se|es|ee)(?:-(.+))?$/);if(o){let a=o[1],l=o[2]||"";if(l.startsWith("[")){let u=v(l);return u!==null?{[gt[a]]:u}:null}let g=_[l];return g!==void 0?{[gt[a]]:g}:null}let n=i.match(/^([trblse])(?:-(.+))?$/);if(n){let a=n[1],l=n[2]||"",g;if(l.startsWith("[")){let u=v(l);if(u!==null)g=u;else return null}else g=_[l];if(g!==void 0){let u={};return kt[a].forEach(h=>u[h]=g),u}return null}if(i.startsWith("[")){let a=v(i);return a!==null?{borderRadius:a}:null}let s=_[i];return s!==void 0?{borderRadius:s}:null}function R(t){let e=t.match(/^\[(-?\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(-?\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary inset unit: ${t}. Only px and % are supported.`),null)}function zt(t){let e=t.match(/^\[(-?\d+)\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary z-index: ${t}. Only integers are supported.`),null)}function bt(t){let e=t.match(/^\[(\d+(?:\.\d+)?|\.\d+)\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary grow/shrink value: ${t}. Only non-negative numbers are supported (e.g., [1.5], [2], [0.5], [.5]).`),null)}var Kt={flex:{display:"flex"},hidden:{display:"none"}},Bt={"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"}},Ht={"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"flex-nowrap":{flexWrap:"nowrap"}},Ut={"flex-1":{flex:1},"flex-auto":{flex:1},"flex-none":{flex:0}},Gt={grow:{flexGrow:1},"grow-0":{flexGrow:0},shrink:{flexShrink:1},"shrink-0":{flexShrink:0},"flex-grow":{flexGrow:1},"flex-grow-0":{flexGrow:0},"flex-shrink":{flexShrink:1},"flex-shrink-0":{flexShrink:0}},Xt={"justify-start":{justifyContent:"flex-start"},"justify-end":{justifyContent:"flex-end"},"justify-center":{justifyContent:"center"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"justify-evenly":{justifyContent:"space-evenly"}},Yt={"items-start":{alignItems:"flex-start"},"items-end":{alignItems:"flex-end"},"items-center":{alignItems:"center"},"items-baseline":{alignItems:"baseline"},"items-stretch":{alignItems:"stretch"}},Zt={"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-end":{alignSelf:"flex-end"},"self-center":{alignSelf:"center"},"self-stretch":{alignSelf:"stretch"},"self-baseline":{alignSelf:"baseline"}},qt={"content-start":{alignContent:"flex-start"},"content-end":{alignContent:"flex-end"},"content-center":{alignContent:"center"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"content-stretch":{alignContent:"stretch"}},Jt={absolute:{position:"absolute"},relative:{position:"relative"}},Qt={"overflow-hidden":{overflow:"hidden"},"overflow-visible":{overflow:"visible"},"overflow-scroll":{overflow:"scroll"}},te={"opacity-0":{opacity:0},"opacity-5":{opacity:.05},"opacity-10":{opacity:.1},"opacity-15":{opacity:.15},"opacity-20":{opacity:.2},"opacity-25":{opacity:.25},"opacity-30":{opacity:.3},"opacity-35":{opacity:.35},"opacity-40":{opacity:.4},"opacity-45":{opacity:.45},"opacity-50":{opacity:.5},"opacity-55":{opacity:.55},"opacity-60":{opacity:.6},"opacity-65":{opacity:.65},"opacity-70":{opacity:.7},"opacity-75":{opacity:.75},"opacity-80":{opacity:.8},"opacity-85":{opacity:.85},"opacity-90":{opacity:.9},"opacity-95":{opacity:.95},"opacity-100":{opacity:1}},ee={0:0,10:10,20:20,30:30,40:40,50:50,auto:0},ht={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,8:32,10:40,12:48,16:64,20:80,24:96};function D(t,e){var g,u,h,p,b,w,Y,Z,q,J,Q,tt;let i=e?x(x({},ht),e):ht;if(t.startsWith("z-")){let y=t.substring(2),c=zt(y);if(c!==null)return{zIndex:c};let f=ee[y];if(f!==void 0)return{zIndex:f}}let r=t.match(/^(-?)top-(.+)$/);if(r){let[,y,c]=r,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{top:f?-d:d}:f&&d.endsWith("%")?{top:`${-parseFloat(d)}%`}:{top:d};let m=i[c];if(m!==void 0)return{top:f?-m:m}}let o=t.match(/^(-?)right-(.+)$/);if(o){let[,y,c]=o,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{right:f?-d:d}:f&&d.endsWith("%")?{right:`${-parseFloat(d)}%`}:{right:d};let m=i[c];if(m!==void 0)return{right:f?-m:m}}let n=t.match(/^(-?)bottom-(.+)$/);if(n){let[,y,c]=n,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{bottom:f?-d:d}:f&&d.endsWith("%")?{bottom:`${-parseFloat(d)}%`}:{bottom:d};let m=i[c];if(m!==void 0)return{bottom:f?-m:m}}let s=t.match(/^(-?)left-(.+)$/);if(s){let[,y,c]=s,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{left:f?-d:d}:f&&d.endsWith("%")?{left:`${-parseFloat(d)}%`}:{left:d};let m=i[c];if(m!==void 0)return{left:f?-m:m}}let a=t.match(/^(-?)start-(.+)$/);if(a){let[,y,c]=a,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{start:f?-d:d}:f&&d.endsWith("%")?{start:`${-parseFloat(d)}%`}:{start:d};let m=i[c];if(m!==void 0)return{start:f?-m:m}}let l=t.match(/^(-?)end-(.+)$/);if(l){let[,y,c]=l,f=y==="-";if(c==="auto")return{};let d=R(c);if(d!==null)return typeof d=="number"?{end:f?-d:d}:f&&d.endsWith("%")?{end:`${-parseFloat(d)}%`}:{end:d};let m=i[c];if(m!==void 0)return{end:f?-m:m}}if(t.startsWith("inset-x-")){let y=t.substring(8),c=R(y);if(c!==null)return{left:c,right:c};let f=i[y];if(f!==void 0)return{left:f,right:f}}if(t.startsWith("inset-y-")){let y=t.substring(8),c=R(y);if(c!==null)return{top:c,bottom:c};let f=i[y];if(f!==void 0)return{top:f,bottom:f}}if(t.startsWith("inset-s-")){let y=t.substring(8),c=R(y);if(c!==null)return{start:c};let f=i[y];if(f!==void 0)return{start:f}}if(t.startsWith("inset-e-")){let y=t.substring(8),c=R(y);if(c!==null)return{end:c};let f=i[y];if(f!==void 0)return{end:f}}if(t.startsWith("inset-")){let y=t.substring(6),c=R(y);if(c!==null)return{top:c,right:c,bottom:c,left:c};let f=i[y];if(f!==void 0)return{top:f,right:f,bottom:f,left:f}}if(t.startsWith("grow-")||t.startsWith("flex-grow-")){let y=t.startsWith("flex-grow-")?"flex-grow-":"grow-",c=t.substring(y.length),f=bt(c);if(f!==null)return{flexGrow:f}}if(t.startsWith("shrink-")||t.startsWith("flex-shrink-")){let y=t.startsWith("flex-shrink-")?"flex-shrink-":"shrink-",c=t.substring(y.length),f=bt(c);if(f!==null)return{flexShrink:f}}return(tt=(Q=(J=(q=(Z=(Y=(w=(b=(p=(h=(u=(g=Kt[t])!=null?g:Bt[t])!=null?u:Ht[t])!=null?h:Ut[t])!=null?p:Gt[t])!=null?b:Xt[t])!=null?w:Yt[t])!=null?Y:Zt[t])!=null?Z:qt[t])!=null?q:Jt[t])!=null?J:Qt[t])!=null?Q:te[t])!=null?tt:null}var mt={"shadow-sm":{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:1,elevation:1},shadow:{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.1,shadowRadius:2,elevation:2},"shadow-md":{shadowColor:"#000000",shadowOffset:{width:0,height:3},shadowOpacity:.15,shadowRadius:4,elevation:4},"shadow-lg":{shadowColor:"#000000",shadowOffset:{width:0,height:6},shadowOpacity:.2,shadowRadius:8,elevation:8},"shadow-xl":{shadowColor:"#000000",shadowOffset:{width:0,height:10},shadowOpacity:.25,shadowRadius:12,elevation:12},"shadow-2xl":{shadowColor:"#000000",shadowOffset:{width:0,height:20},shadowOpacity:.3,shadowRadius:24,elevation:16},"shadow-none":{shadowColor:"transparent",shadowOffset:{width:0,height:0},shadowOpacity:0,shadowRadius:0,elevation:0}};function k(t){return t in mt?mt[t]:null}var L="{{RUNTIME:dimensions.";var xt={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},C={full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"};function W(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary size unit: ${t}. Only px and % are supported.`),null)}function F(t,e){let i=e?x(x({},xt),e):xt;if(t.startsWith("w-")){let r=t.substring(2);if(r==="screen")return{width:`${L}width}}`};let o=W(r);if(o!==null)return{width:o};let n=C[r];if(n)return{width:n};let s=i[r];if(s!==void 0)return{width:s};if(r==="auto")return{width:"auto"}}if(t.startsWith("h-")){let r=t.substring(2);if(r==="screen")return{height:`${L}height}}`};let o=W(r);if(o!==null)return{height:o};let n=C[r];if(n)return{height:n};let s=i[r];if(s!==void 0)return{height:s};if(r==="auto")return{height:"auto"}}if(t.startsWith("min-w-")){let r=t.substring(6),o=W(r);if(o!==null)return{minWidth:o};let n=C[r];if(n)return{minWidth:n};let s=i[r];if(s!==void 0)return{minWidth:s}}if(t.startsWith("min-h-")){let r=t.substring(6),o=W(r);if(o!==null)return{minHeight:o};let n=C[r];if(n)return{minHeight:n};let s=i[r];if(s!==void 0)return{minHeight:s}}if(t.startsWith("max-w-")){let r=t.substring(6),o=W(r);if(o!==null)return{maxWidth:o};let n=C[r];if(n)return{maxWidth:n};let s=i[r];if(s!==void 0)return{maxWidth:s}}if(t.startsWith("max-h-")){let r=t.substring(6),o=W(r);if(o!==null)return{maxHeight:o};let n=C[r];if(n)return{maxHeight:n};let s=i[r];if(s!==void 0)return{maxHeight:s}}return null}var $={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384};function z(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary spacing value: ${t}. Only px values are supported (e.g., [16px], [16], [4.5px], [4.5]).`),null)}function B(t,e){let i=e?x(x({},$),e):$,r=t.match(/^m([xytrblse]?)-auto$/);if(r){let a=r[1];return K(a,"auto")}let o=t.match(/^(-?)m([xytrblse]?)-(.+)$/);if(o){let[,a,l,g]=o,u=a==="-",h=z(g);if(h!==null){let b=u?-h:h;return K(l,b)}let p=i[g];if(p!==void 0){let b=u?-p:p;return K(l,b)}}let n=t.match(/^p([xytrblse]?)-(.+)$/);if(n){let[,a,l]=n,g=z(l);if(g!==null)return St(a,g);let u=i[l];if(u!==void 0)return St(a,u)}let s=t.match(/^gap-(.+)$/);if(s){let a=s[1],l=z(a);if(l!==null)return{gap:l};let g=i[a];if(g!==void 0)return{gap:g}}return null}function K(t,e){switch(t){case"":return{margin:e};case"x":return{marginHorizontal:e};case"y":return{marginVertical:e};case"t":return{marginTop:e};case"r":return{marginRight:e};case"b":return{marginBottom:e};case"l":return{marginLeft:e};case"s":return{marginStart:e};case"e":return{marginEnd:e};default:return{}}}function St(t,e){switch(t){case"":return{padding:e};case"x":return{paddingHorizontal:e};case"y":return{paddingVertical:e};case"t":return{paddingTop:e};case"r":return{paddingRight:e};case"b":return{paddingBottom:e};case"l":return{paddingLeft:e};case"s":return{paddingStart:e};case"e":return{paddingEnd:e};default:return{}}}var H={0:0,50:.5,75:.75,90:.9,95:.95,100:1,105:1.05,110:1.1,125:1.25,150:1.5,200:2},j={0:0,1:1,2:2,3:3,6:6,12:12,45:45,90:90,180:180},Rt={0:0,1:1,2:2,3:3,6:6,12:12},re={0:0,100:100,200:200,300:300,400:400,500:500,600:600,700:700,800:800,900:900,1e3:1e3};function U(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary scale value: ${t}. Only numbers are supported (e.g., [1.5], [0.75]).`),null)}function E(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)deg\]$/);return e?`${e[1]}deg`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary rotation value: ${t}. Only deg unit is supported (e.g., [45deg], [-15deg]).`),null)}function wt(t){let e=t.match(/^\[(-?\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(-?\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary translation unit: ${t}. Only px and % are supported.`),null)}function ne(t){let e=t.match(/^\[(-?\d+)\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary perspective value: ${t}. Only integers are supported (e.g., [1500]).`),null)}function G(t,e){let i=e?x(x({},$),e):$;if(t.startsWith("origin-"))return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] transform-origin is not supported in React Native. Class "${t}" will be ignored.`),null;if(t.startsWith("scale-")){let r=t.substring(6),o=U(r);if(o!==null)return{transform:[{scale:o}]};let n=H[r];if(n!==void 0)return{transform:[{scale:n}]}}if(t.startsWith("scale-x-")){let r=t.substring(8),o=U(r);if(o!==null)return{transform:[{scaleX:o}]};let n=H[r];if(n!==void 0)return{transform:[{scaleX:n}]}}if(t.startsWith("scale-y-")){let r=t.substring(8),o=U(r);if(o!==null)return{transform:[{scaleY:o}]};let n=H[r];if(n!==void 0)return{transform:[{scaleY:n}]}}if(t.startsWith("rotate-")||t.startsWith("-rotate-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{rotate:r?`-${n}`:n}]};let s=j[o];if(s!==void 0)return{transform:[{rotate:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-x-")||t.startsWith("-rotate-x-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateX:r?`-${n}`:n}]};let s=j[o];if(s!==void 0)return{transform:[{rotateX:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-y-")||t.startsWith("-rotate-y-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateY:r?`-${n}`:n}]};let s=j[o];if(s!==void 0)return{transform:[{rotateY:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-z-")||t.startsWith("-rotate-z-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateZ:r?`-${n}`:n}]};let s=j[o];if(s!==void 0)return{transform:[{rotateZ:`${r?-s:s}deg`}]}}if(t.startsWith("translate-x-")||t.startsWith("-translate-x-")){let r=t.startsWith("-"),o=r?t.substring(13):t.substring(12),n=wt(o);if(n!==null)return{transform:[{translateX:typeof n=="number"?r?-n:n:r?`-${n}`:n}]};let s=i[o];if(s!==void 0)return{transform:[{translateX:r?-s:s}]}}if(t.startsWith("translate-y-")||t.startsWith("-translate-y-")){let r=t.startsWith("-"),o=r?t.substring(13):t.substring(12),n=wt(o);if(n!==null)return{transform:[{translateY:typeof n=="number"?r?-n:n:r?`-${n}`:n}]};let s=i[o];if(s!==void 0)return{transform:[{translateY:r?-s:s}]}}if(t.startsWith("skew-x-")||t.startsWith("-skew-x-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{skewX:r?`-${n}`:n}]};let s=Rt[o];if(s!==void 0)return{transform:[{skewX:`${r?-s:s}deg`}]}}if(t.startsWith("skew-y-")||t.startsWith("-skew-y-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{skewY:r?`-${n}`:n}]};let s=Rt[o];if(s!==void 0)return{transform:[{skewY:`${r?-s:s}deg`}]}}if(t.startsWith("perspective-")){let r=t.substring(12),o=ne(r);if(o!==null)return{transform:[{perspective:o}]};let n=re[r];if(n!==void 0)return{transform:[{perspective:n}]}}return null}var ie={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 Ot={"font-sans":{fontFamily:"System"},"font-serif":{fontFamily:"serif"},"font-mono":{fontFamily:"Courier"}},oe={"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"}},se={italic:{fontStyle:"italic"},"not-italic":{fontStyle:"normal"}},ae={"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"}},fe={underline:{textDecorationLine:"underline"},"line-through":{textDecorationLine:"line-through"},"no-underline":{textDecorationLine:"none"}},le={uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"}},ce={3:12,4:16,5:20,6:24,7:28,8:32,9:36,10:40},de={"leading-none":{lineHeight:16},"leading-tight":{lineHeight:20},"leading-snug":{lineHeight:22},"leading-normal":{lineHeight:24},"leading-relaxed":{lineHeight:28},"leading-loose":{lineHeight:32}},ue={"tracking-tighter":{letterSpacing:-.8},"tracking-tight":{letterSpacing:-.4},"tracking-normal":{letterSpacing:0},"tracking-wide":{letterSpacing:.4},"tracking-wider":{letterSpacing:.8},"tracking-widest":{letterSpacing:1.6}};function pe(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary font size value: ${t}. Only px values are supported (e.g., [18px], [13.5px], [.5]).`),null)}function ge(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary line height value: ${t}. Only px values are supported (e.g., [24px], [21.5px], [.5]).`),null)}function ye(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary letter spacing value: ${t}. Only px values are supported (e.g., [0.5px], [0.3], [.5], [-0.4]).`),null)}function X(t,e,i){var o,n,s,a,l,g,u,h;let r=e?x(x({},Ot),Object.fromEntries(Object.entries(e).map(([p,b])=>[`font-${p}`,{fontFamily:b}]))):Ot;if(t.startsWith("text-")){let p=t.substring(5),b=pe(p);if(b!==null)return{fontSize:b};if((i==null?void 0:i[p])!==void 0)return{fontSize:i[p]};let w=ie[p];if(w!==void 0)return{fontSize:w}}if(t.startsWith("leading-")){let p=t.substring(8),b=ge(p);if(b!==null)return{lineHeight:b};let w=ce[p];if(w!==void 0)return{lineHeight:w}}if(t.startsWith("tracking-")){let p=t.substring(9),b=ye(p);if(b!==null)return{letterSpacing:b}}return(h=(u=(g=(l=(a=(s=(n=(o=r[t])!=null?o:oe[t])!=null?n:se[t])!=null?s:ae[t])!=null?a:fe[t])!=null?l:le[t])!=null?g:de[t])!=null?u:ue[t])!=null?h:null}var be=["active","hover","focus","disabled","placeholder"],he=["ios","android","web"],me=["dark","light"],xe=["scheme"],Se=["rtl","ltr"],nr=[...be,...he,...me,...xe,...Se];function T(t,e){let i=t.split(/\s+/).filter(Boolean),r={};for(let o of i){let n=Re(o,e);st(r,n)}return r}function Re(t,e){let i=[r=>B(r,e==null?void 0:e.spacing),r=>P(r,e==null?void 0:e.colors),r=>M(r,e==null?void 0:e.colors),r=>D(r,e==null?void 0:e.spacing),r=>X(r,e==null?void 0:e.fontFamily,e==null?void 0:e.fontSize),r=>F(r,e==null?void 0:e.spacing),k,V,r=>G(r,e==null?void 0:e.spacing)];for(let r of i){let o=r(t);if(o!==null)return o}return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unknown class: "${t}"`),{}}var Mt=["active","focus","disabled"];function Ct(t){return Mt.some(e=>t.includes(`${e}:`))}function Wt(t){let e=t.split(/\s+/).filter(Boolean),i=[],r=new Map;for(let o of e){let n=!1;for(let s of Mt){let a=`${s}:`;if(o.startsWith(a)){let l=o.slice(a.length);r.has(s)||r.set(s,[]);let g=r.get(s);g&&g.push(l),n=!0;break}}n||i.push(o)}return{base:i,modifiers:r}}var S={colors:{},fontFamily:{},fontSize:{},spacing:{}},O=new Map;function we(t){var e,i,r,o,n,s,a,l,g;if((i=(e=t.theme)==null?void 0:e.extend)!=null&&i.colors?S.colors=A((r=t.theme)==null?void 0:r.extend.colors):S.colors={},(n=(o=t.theme)==null?void 0:o.extend)!=null&&n.fontFamily){let u={};for(let[h,p]of Object.entries(t.theme.extend.fontFamily))Array.isArray(p)?u[h]=p[0]:u[h]=p;S.fontFamily=u}else S.fontFamily={};if((a=(s=t.theme)==null?void 0:s.extend)!=null&&a.fontSize){let u={};for(let[h,p]of Object.entries(t.theme.extend.fontSize))if(typeof p=="number")u[h]=p;else if(typeof p=="string"){let b=parseFloat(p.replace(/px$/,""));isNaN(b)||(u[h]=b)}S.fontSize=u}else S.fontSize={};if((g=(l=t.theme)==null?void 0:l.extend)!=null&&g.spacing){let u={};for(let[h,p]of Object.entries(t.theme.extend.spacing))if(typeof p=="number")u[h]=p;else if(typeof p=="string"){let b;p.endsWith("rem")?b=parseFloat(p.replace(/rem$/,""))*16:b=parseFloat(p.replace(/px$/,"")),isNaN(b)||(u[h]=b)}S.spacing=u}else S.spacing={};O.clear()}function Oe(){return S}function Me(){var t;return Object.keys((t=S.colors)!=null?t:{}).length>0?S.colors:void 0}function Ce(){O.clear()}function We(){return{size:O.size,keys:Array.from(O.keys())}}function Et(t){let e=O.get(t);if(e)return e;if(!Ct(t)){let l={style:T(t,S)};return O.set(t,l),l}let{base:i,modifiers:r}=Wt(t),o=i.join(" "),s={style:o?T(o,S):{}};if(r.has("active")){let a=r.get("active");if(a&&a.length>0){let l=a.join(" ");s.activeStyle=T(l,S)}}if(r.has("focus")){let a=r.get("focus");if(a&&a.length>0){let l=a.join(" ");s.focusStyle=T(l,S)}}if(r.has("disabled")){let a=r.get("disabled");if(a&&a.length>0){let l=a.join(" ");s.disabledStyle=T(l,S)}}return O.set(t,s),s}function Ee(t,...e){let r=t.reduce((o,n,s)=>{let a=e[s],l=a!=null&&a!==!1?String(a):"";return o+n+l},"").trim().replace(/\s+/g," ");return r?Et(r):{style:{}}}function Te(t){let e=t.trim().replace(/\s+/g," ");if(e)return Et(e)}
|
|
1
|
+
"use strict";var j=Object.defineProperty,_t=Object.defineProperties,It=Object.getOwnPropertyDescriptor,vt=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertyNames,st=Object.getOwnPropertySymbols;var ft=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable;var at=(t,e,i)=>e in t?j(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,x=(t,e)=>{for(var i in e||(e={}))ft.call(e,i)&&at(t,i,e[i]);if(st)for(var i of st(e))jt.call(e,i)&&at(t,i,e[i]);return t},lt=(t,e)=>_t(t,vt(e));var Pt=(t,e)=>{for(var i in e)j(t,i,{get:e[i],enumerable:!0})},Dt=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Vt(e))!ft.call(t,o)&&o!==i&&j(t,o,{get:()=>e[o],enumerable:!(r=It(e,o))||r.enumerable});return t};var Lt=t=>Dt(j({},"__esModule",{value:!0}),t);var _e={};Pt(_e,{clearCache:()=>Ne,getCacheStats:()=>Te,getCustomColors:()=>Ee,getCustomTheme:()=>Ce,setConfig:()=>We,tw:()=>Ae,twStyle:()=>$e});module.exports=Lt(_e);function ct(t){return Object.keys(t)[0]}function kt(t,e){let i=[...t];for(let r of e){let o=ct(r),n=i.findIndex(s=>ct(s)===o);n!==-1?i[n]=r:i.push(r)}return i}function ut(t,e){for(let i in e)if(Object.prototype.hasOwnProperty.call(e,i)){let r=e[i];if(i==="transform"&&Array.isArray(r)){let o=t[i];Array.isArray(o)?t.transform=kt(o,r):t[i]=r}else t[i]=r}return t}var dt={"aspect-auto":void 0,"aspect-square":1,"aspect-video":1.7777777777777777};function zt(t){let e=t.match(/^\[(\d+)\/(\d+)\]$/);if(e){let i=Number.parseInt(e[1],10),r=Number.parseInt(e[2],10);return r===0?(process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid aspect ratio: ${t}. Denominator cannot be zero.`),null):i/r}return null}function k(t){if(!t.startsWith("aspect-"))return null;if(t in dt){let r=dt[t];return r===void 0?{aspectRatio:void 0}:{aspectRatio:r}}let e=t.substring(7),i=zt(e);return i!==null?{aspectRatio:i}:null}var pt={red:{50:"#fef2f2",100:"#ffe2e2",200:"#ffc9c9",300:"#ffa2a2",400:"#ff6467",500:"#fb2c36",600:"#e7000b",700:"#c10007",800:"#9f0712",900:"#82181a",950:"#460809"},orange:{50:"#fff7ed",100:"#ffedd4",200:"#ffd6a7",300:"#ffb86a",400:"#ff8904",500:"#ff6900",600:"#f54900",700:"#ca3500",800:"#9f2d00",900:"#7e2a0c",950:"#441306"},amber:{50:"#fffbeb",100:"#fef3c6",200:"#fee685",300:"#ffd230",400:"#ffb900",500:"#fe9a00",600:"#e17100",700:"#bb4d00",800:"#973c00",900:"#7b3306",950:"#461901"},yellow:{50:"#fefce8",100:"#fef9c2",200:"#fff085",300:"#ffdf20",400:"#fdc700",500:"#f0b100",600:"#d08700",700:"#a65f00",800:"#894b00",900:"#733e0a",950:"#432004"},lime:{50:"#f7fee7",100:"#ecfcca",200:"#d8f999",300:"#bbf451",400:"#9ae600",500:"#7ccf00",600:"#5ea500",700:"#497d00",800:"#3c6300",900:"#35530e",950:"#192e03"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#b9f8cf",300:"#7bf1a8",400:"#05df72",500:"#00c950",600:"#00a63e",700:"#008236",800:"#016630",900:"#0d542b",950:"#032e15"},emerald:{50:"#ecfdf5",100:"#d0fae5",200:"#a4f4cf",300:"#5ee9b5",400:"#00d492",500:"#00bc7d",600:"#009966",700:"#007a55",800:"#006045",900:"#004f3b",950:"#002c22"},teal:{50:"#f0fdfa",100:"#cbfbf1",200:"#96f7e4",300:"#46ecd5",400:"#00d5be",500:"#00bba7",600:"#009689",700:"#00786f",800:"#005f5a",900:"#0b4f4a",950:"#022f2e"},cyan:{50:"#ecfeff",100:"#cefafe",200:"#a2f4fd",300:"#53eafd",400:"#00d3f2",500:"#00b8db",600:"#0092b8",700:"#007595",800:"#005f78",900:"#104e64",950:"#053345"},sky:{50:"#f0f9ff",100:"#dff2fe",200:"#b8e6fe",300:"#74d4ff",400:"#00bcff",500:"#00a6f4",600:"#0084d1",700:"#0069a8",800:"#00598a",900:"#024a70",950:"#052f4a"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bedbff",300:"#8ec5ff",400:"#51a2ff",500:"#2b7fff",600:"#155dfc",700:"#1447e6",800:"#193cb8",900:"#1c398e",950:"#162456"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c6d2ff",300:"#a3b3ff",400:"#7c86ff",500:"#615fff",600:"#4f39f6",700:"#432dd7",800:"#372aac",900:"#312c85",950:"#1e1a4d"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6ff",300:"#c4b4ff",400:"#a684ff",500:"#8e51ff",600:"#7f22fe",700:"#7008e7",800:"#5d0ec0",900:"#4d179a",950:"#2f0d68"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d4ff",300:"#dab2ff",400:"#c27aff",500:"#ad46ff",600:"#9810fa",700:"#8200db",800:"#6e11b0",900:"#59168b",950:"#3c0366"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f6cfff",300:"#f4a8ff",400:"#ed6aff",500:"#e12afb",600:"#c800de",700:"#a800b7",800:"#8a0194",900:"#721378",950:"#4b004f"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fccee8",300:"#fda5d5",400:"#fb64b6",500:"#f6339a",600:"#e60076",700:"#c6005c",800:"#a3004c",900:"#861043",950:"#510424"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#ffccd3",300:"#ffa1ad",400:"#ff637e",500:"#ff2056",600:"#ec003f",700:"#c70036",800:"#a50036",900:"#8b0836",950:"#4d0218"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cad5e2",400:"#90a1b9",500:"#62748e",600:"#45556c",700:"#314158",800:"#1d293d",900:"#0f172b",950:"#020618"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5dc",400:"#99a1af",500:"#6a7282",600:"#4a5565",700:"#364153",800:"#1e2939",900:"#101828",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#9f9fa9",500:"#71717b",600:"#52525c",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a1a1a1",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a6a09b",500:"#79716b",600:"#57534d",700:"#44403b",800:"#292524",900:"#1c1917",950:"#0c0a09"}};function A(t,e=""){let i={};for(let[r,o]of Object.entries(t)){let n=r==="DEFAULT"&&e?e:e?`${e}-${r}`:r;typeof o=="string"?i[n]=o:typeof o=="object"&&o!==null&&Object.assign(i,A(o,n))}return i}var P=lt(x({},A(pt)),{white:"#FFFFFF",black:"#000000",transparent:"transparent"});function $(t,e){if(t==="transparent")return"transparent";let i=t.replace(/^#/,""),r=i.length===3?i.split("").map(s=>s+s).join(""):i,n=Math.round(e/100*255).toString(16).padStart(2,"0").toUpperCase();return`#${r.toUpperCase()}${n}`}function _(t){let e=t.match(/^\[#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\]$/);if(e){let i=e[1];return i.length===3?`#${i.split("").map(o=>o+o).join("")}`:`#${i}`}return null}function gt(t,e){var n;let i=s=>{var a;return(a=e==null?void 0:e[s])!=null?a:P[s]},r=t.match(/^(.+)\/(\d+)$/);if(r){let s=r[1],a=Number.parseInt(r[2],10);if(a<0||a>100)return null;let f=_(s);if(f!==null)return $(f,a);let p=i(s);return p?$(p,a):null}let o=_(t);return o!==null?o:(n=i(t))!=null?n:null}function C(t,e){let i=n=>{var s;return(s=e==null?void 0:e[n])!=null?s:P[n]},r=n=>{var f;let s=n.match(/^(.+)\/(\d+)$/);if(s){let p=s[1],d=Number.parseInt(s[2],10);if(d<0||d>100)return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid opacity value: ${d}. Opacity must be between 0 and 100.`),null;let b=_(p);if(b!==null)return $(b,d);let g=i(p);return g?$(g,d):null}let a=_(n);return a!==null?a:n.startsWith("[")&&n.endsWith("]")?(process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary color value: ${n}. Only hex colors are supported (e.g., [#ff0000], [#f00], or [#ff0000aa]).`),null):(f=i(n))!=null?f:null};if(t.startsWith("bg-")){let n=t.substring(3);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{backgroundColor:s}}if(t.startsWith("text-")){let n=t.substring(5);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{color:s}}if(t.startsWith("border-")&&!t.match(/^border-[0-9]/)){let n=t.substring(7);if(n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{borderColor:s}}if(t.startsWith("outline-")&&!t.match(/^outline-[0-9]/)&&!t.startsWith("outline-offset-")){let n=t.substring(8);if(["solid","dashed","dotted","none"].includes(n)||n.startsWith("[")&&!n.startsWith("[#"))return null;let s=r(n);if(s)return{outlineColor:s}}let o=t.match(/^border-([trblxy])-(.+)$/);if(o){let n=o[1],s=o[2];if(s.startsWith("[")&&!s.startsWith("[#"))return null;let a=r(s);if(a)return n==="x"?{borderLeftColor:a,borderRightColor:a}:n==="y"?{borderTopColor:a,borderBottomColor:a}:{[{t:"borderTopColor",r:"borderRightColor",b:"borderBottomColor",l:"borderLeftColor"}[n]]:a}}return null}var v={"":1,0:0,2:2,4:4,8:8},I={none:0,sm:2,"":4,md:6,lg:8,xl:12,"2xl":16,"3xl":24,full:9999},yt={t:"borderTopWidth",r:"borderRightWidth",b:"borderBottomWidth",l:"borderLeftWidth",s:"borderStartWidth",e:"borderEndWidth"},ht={tl:"borderTopLeftRadius",tr:"borderTopRightRadius",bl:"borderBottomLeftRadius",br:"borderBottomRightRadius"},bt={ss:"borderTopStartRadius",se:"borderTopEndRadius",es:"borderBottomStartRadius",ee:"borderBottomEndRadius"},Ft={t:["borderTopLeftRadius","borderTopRightRadius"],r:["borderTopRightRadius","borderBottomRightRadius"],b:["borderBottomLeftRadius","borderBottomRightRadius"],l:["borderTopLeftRadius","borderBottomLeftRadius"],s:["borderTopStartRadius","borderBottomStartRadius"],e:["borderTopEndRadius","borderBottomEndRadius"]};function mt(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary border width value: ${t}. Only px values are supported (e.g., [8px] or [8]).`),null)}function D(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary border radius value: ${t}. Only px values are supported (e.g., [12px] or [12]).`),null)}function z(t,e){return t==="border-solid"?{borderStyle:"solid"}:t==="border-dotted"?{borderStyle:"dotted"}:t==="border-dashed"?{borderStyle:"dashed"}:t.startsWith("border-")?Kt(t,e):t==="border"?{borderWidth:1}:t.startsWith("rounded")?Bt(t):null}function Kt(t,e){let i=t.match(/^border-([trblse])(?:-(.+))?$/);if(i){let n=i[1],s=i[2]||"";if(s&&n!=="s"&&n!=="e"&&C(t,e)!==null)return null;if(s.startsWith("[")){let f=mt(s);return f!==null?{[yt[n]]:f}:null}let a=v[s];return a!==void 0?{[yt[n]]:a}:null}let r=t.match(/^border-(\d+)$/);if(r){let n=v[r[1]];if(n!==void 0)return{borderWidth:n}}let o=t.match(/^border-(\[.+\])$/);if(o){let n=mt(o[1]);if(n!==null)return{borderWidth:n}}return null}function Bt(t){let e=t.substring(7);if(e==="")return{borderRadius:I[""]};if(!e.startsWith("-"))return null;let i=e.substring(1);if(i==="")return null;let r=i.match(/^(tl|tr|bl|br)(?:-(.+))?$/);if(r){let a=r[1],f=r[2]||"";if(f.startsWith("[")){let d=D(f);return d!==null?{[ht[a]]:d}:null}let p=I[f];return p!==void 0?{[ht[a]]:p}:null}let o=i.match(/^(ss|se|es|ee)(?:-(.+))?$/);if(o){let a=o[1],f=o[2]||"";if(f.startsWith("[")){let d=D(f);return d!==null?{[bt[a]]:d}:null}let p=I[f];return p!==void 0?{[bt[a]]:p}:null}let n=i.match(/^([trblse])(?:-(.+))?$/);if(n){let a=n[1],f=n[2]||"",p;if(f.startsWith("[")){let d=D(f);if(d!==null)p=d;else return null}else p=I[f];if(p!==void 0){let d={};return Ft[a].forEach(b=>d[b]=p),d}return null}if(i.startsWith("[")){let a=D(i);return a!==null?{borderRadius:a}:null}let s=I[i];return s!==void 0?{borderRadius:s}:null}function R(t){let e=t.match(/^\[(-?\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(-?\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary inset unit: ${t}. Only px and % are supported.`),null)}function Ht(t){let e=t.match(/^\[(-?\d+)\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary z-index: ${t}. Only integers are supported.`),null)}function xt(t){let e=t.match(/^\[(\d+(?:\.\d+)?|\.\d+)\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary grow/shrink value: ${t}. Only non-negative numbers are supported (e.g., [1.5], [2], [0.5], [.5]).`),null)}var Ut={flex:{display:"flex"},hidden:{display:"none"}},Gt={"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"}},Xt={"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"flex-nowrap":{flexWrap:"nowrap"}},Yt={"flex-1":{flex:1},"flex-auto":{flex:1},"flex-none":{flex:0}},Zt={grow:{flexGrow:1},"grow-0":{flexGrow:0},shrink:{flexShrink:1},"shrink-0":{flexShrink:0},"flex-grow":{flexGrow:1},"flex-grow-0":{flexGrow:0},"flex-shrink":{flexShrink:1},"flex-shrink-0":{flexShrink:0}},qt={"justify-start":{justifyContent:"flex-start"},"justify-end":{justifyContent:"flex-end"},"justify-center":{justifyContent:"center"},"justify-between":{justifyContent:"space-between"},"justify-around":{justifyContent:"space-around"},"justify-evenly":{justifyContent:"space-evenly"}},Jt={"items-start":{alignItems:"flex-start"},"items-end":{alignItems:"flex-end"},"items-center":{alignItems:"center"},"items-baseline":{alignItems:"baseline"},"items-stretch":{alignItems:"stretch"}},Qt={"self-auto":{alignSelf:"auto"},"self-start":{alignSelf:"flex-start"},"self-end":{alignSelf:"flex-end"},"self-center":{alignSelf:"center"},"self-stretch":{alignSelf:"stretch"},"self-baseline":{alignSelf:"baseline"}},te={"content-start":{alignContent:"flex-start"},"content-end":{alignContent:"flex-end"},"content-center":{alignContent:"center"},"content-between":{alignContent:"space-between"},"content-around":{alignContent:"space-around"},"content-stretch":{alignContent:"stretch"}},ee={absolute:{position:"absolute"},relative:{position:"relative"}},re={"overflow-hidden":{overflow:"hidden"},"overflow-visible":{overflow:"visible"},"overflow-scroll":{overflow:"scroll"}},ne={"opacity-0":{opacity:0},"opacity-5":{opacity:.05},"opacity-10":{opacity:.1},"opacity-15":{opacity:.15},"opacity-20":{opacity:.2},"opacity-25":{opacity:.25},"opacity-30":{opacity:.3},"opacity-35":{opacity:.35},"opacity-40":{opacity:.4},"opacity-45":{opacity:.45},"opacity-50":{opacity:.5},"opacity-55":{opacity:.55},"opacity-60":{opacity:.6},"opacity-65":{opacity:.65},"opacity-70":{opacity:.7},"opacity-75":{opacity:.75},"opacity-80":{opacity:.8},"opacity-85":{opacity:.85},"opacity-90":{opacity:.9},"opacity-95":{opacity:.95},"opacity-100":{opacity:1}},ie={0:0,10:10,20:20,30:30,40:40,50:50,auto:0},St={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,8:32,10:40,12:48,16:64,20:80,24:96};function F(t,e){var p,d,b,g,h,w,tt,et,rt,nt,it,ot;let i=e?x(x({},St),e):St;if(t.startsWith("z-")){let y=t.substring(2),c=Ht(y);if(c!==null)return{zIndex:c};let l=ie[y];if(l!==void 0)return{zIndex:l}}let r=t.match(/^(-?)top-(.+)$/);if(r){let[,y,c]=r,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{top:l?-u:u}:l&&u.endsWith("%")?{top:`${-parseFloat(u)}%`}:{top:u};let m=i[c];if(m!==void 0)return{top:l?-m:m}}let o=t.match(/^(-?)right-(.+)$/);if(o){let[,y,c]=o,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{right:l?-u:u}:l&&u.endsWith("%")?{right:`${-parseFloat(u)}%`}:{right:u};let m=i[c];if(m!==void 0)return{right:l?-m:m}}let n=t.match(/^(-?)bottom-(.+)$/);if(n){let[,y,c]=n,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{bottom:l?-u:u}:l&&u.endsWith("%")?{bottom:`${-parseFloat(u)}%`}:{bottom:u};let m=i[c];if(m!==void 0)return{bottom:l?-m:m}}let s=t.match(/^(-?)left-(.+)$/);if(s){let[,y,c]=s,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{left:l?-u:u}:l&&u.endsWith("%")?{left:`${-parseFloat(u)}%`}:{left:u};let m=i[c];if(m!==void 0)return{left:l?-m:m}}let a=t.match(/^(-?)start-(.+)$/);if(a){let[,y,c]=a,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{start:l?-u:u}:l&&u.endsWith("%")?{start:`${-parseFloat(u)}%`}:{start:u};let m=i[c];if(m!==void 0)return{start:l?-m:m}}let f=t.match(/^(-?)end-(.+)$/);if(f){let[,y,c]=f,l=y==="-";if(c==="auto")return{};let u=R(c);if(u!==null)return typeof u=="number"?{end:l?-u:u}:l&&u.endsWith("%")?{end:`${-parseFloat(u)}%`}:{end:u};let m=i[c];if(m!==void 0)return{end:l?-m:m}}if(t.startsWith("inset-x-")){let y=t.substring(8),c=R(y);if(c!==null)return{left:c,right:c};let l=i[y];if(l!==void 0)return{left:l,right:l}}if(t.startsWith("inset-y-")){let y=t.substring(8),c=R(y);if(c!==null)return{top:c,bottom:c};let l=i[y];if(l!==void 0)return{top:l,bottom:l}}if(t.startsWith("inset-s-")){let y=t.substring(8),c=R(y);if(c!==null)return{start:c};let l=i[y];if(l!==void 0)return{start:l}}if(t.startsWith("inset-e-")){let y=t.substring(8),c=R(y);if(c!==null)return{end:c};let l=i[y];if(l!==void 0)return{end:l}}if(t.startsWith("inset-")){let y=t.substring(6),c=R(y);if(c!==null)return{top:c,right:c,bottom:c,left:c};let l=i[y];if(l!==void 0)return{top:l,right:l,bottom:l,left:l}}if(t.startsWith("grow-")||t.startsWith("flex-grow-")){let y=t.startsWith("flex-grow-")?"flex-grow-":"grow-",c=t.substring(y.length),l=xt(c);if(l!==null)return{flexGrow:l}}if(t.startsWith("shrink-")||t.startsWith("flex-shrink-")){let y=t.startsWith("flex-shrink-")?"flex-shrink-":"shrink-",c=t.substring(y.length),l=xt(c);if(l!==null)return{flexShrink:l}}return(ot=(it=(nt=(rt=(et=(tt=(w=(h=(g=(b=(d=(p=Ut[t])!=null?p:Gt[t])!=null?d:Xt[t])!=null?b:Yt[t])!=null?g:Zt[t])!=null?h:qt[t])!=null?w:Jt[t])!=null?tt:Qt[t])!=null?et:te[t])!=null?rt:ee[t])!=null?nt:re[t])!=null?it:ne[t])!=null?ot:null}function Rt(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary outline value: ${t}. Only px values are supported (e.g., [8px] or [8]).`),null)}function K(t){if(t==="outline")return{outlineWidth:1,outlineStyle:"solid"};if(t==="outline-none")return{outlineWidth:0};if(t==="outline-solid")return{outlineStyle:"solid"};if(t==="outline-dotted")return{outlineStyle:"dotted"};if(t==="outline-dashed")return{outlineStyle:"dashed"};if(t.startsWith("outline-offset-")){let r=t.substring(15);if(r.startsWith("[")){let n=Rt(r);return n!==null?{outlineOffset:n}:null}let o=v[r];return o!==void 0?{outlineOffset:o}:null}let e=t.match(/^outline-(\d+)$/);if(e){let r=v[e[1]];if(r!==void 0)return{outlineWidth:r}}let i=t.match(/^outline-(\[.+\])$/);if(i){let r=Rt(i[1]);return r!==null?{outlineWidth:r}:null}return null}var wt={"shadow-sm":{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:1,elevation:1},shadow:{shadowColor:"#000000",shadowOffset:{width:0,height:1},shadowOpacity:.1,shadowRadius:2,elevation:2},"shadow-md":{shadowColor:"#000000",shadowOffset:{width:0,height:3},shadowOpacity:.15,shadowRadius:4,elevation:4},"shadow-lg":{shadowColor:"#000000",shadowOffset:{width:0,height:6},shadowOpacity:.2,shadowRadius:8,elevation:8},"shadow-xl":{shadowColor:"#000000",shadowOffset:{width:0,height:10},shadowOpacity:.25,shadowRadius:12,elevation:12},"shadow-2xl":{shadowColor:"#000000",shadowOffset:{width:0,height:20},shadowOpacity:.3,shadowRadius:24,elevation:16},"shadow-none":{shadowColor:"transparent",shadowOffset:{width:0,height:0},shadowOpacity:0,shadowRadius:0,elevation:0}};function B(t,e){if(t in wt)return wt[t];if(t.startsWith("shadow-")){let i=t.substring(7),r=gt(i,e);if(r)return{shadowColor:r}}return null}var H="{{RUNTIME:dimensions.";var Ot={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384},O={full:"100%","1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%"};function M(t){let e=t.match(/^\[(\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary size unit: ${t}. Only px and % are supported.`),null)}function U(t,e){let i=e?x(x({},Ot),e):Ot;if(t.startsWith("size-")){let r=t.substring(5),o=M(r);if(o!==null)return{width:o,height:o};let n=O[r];if(n)return{width:n,height:n};let s=i[r];if(s!==void 0)return{width:s,height:s};if(r==="auto")return{width:"auto",height:"auto"}}if(t.startsWith("w-")){let r=t.substring(2);if(r==="screen")return{width:`${H}width}}`};let o=M(r);if(o!==null)return{width:o};let n=O[r];if(n)return{width:n};let s=i[r];if(s!==void 0)return{width:s};if(r==="auto")return{width:"auto"}}if(t.startsWith("h-")){let r=t.substring(2);if(r==="screen")return{height:`${H}height}}`};let o=M(r);if(o!==null)return{height:o};let n=O[r];if(n)return{height:n};let s=i[r];if(s!==void 0)return{height:s};if(r==="auto")return{height:"auto"}}if(t.startsWith("min-w-")){let r=t.substring(6),o=M(r);if(o!==null)return{minWidth:o};let n=O[r];if(n)return{minWidth:n};let s=i[r];if(s!==void 0)return{minWidth:s}}if(t.startsWith("min-h-")){let r=t.substring(6),o=M(r);if(o!==null)return{minHeight:o};let n=O[r];if(n)return{minHeight:n};let s=i[r];if(s!==void 0)return{minHeight:s}}if(t.startsWith("max-w-")){let r=t.substring(6),o=M(r);if(o!==null)return{maxWidth:o};let n=O[r];if(n)return{maxWidth:n};let s=i[r];if(s!==void 0)return{maxWidth:s}}if(t.startsWith("max-h-")){let r=t.substring(6),o=M(r);if(o!==null)return{maxHeight:o};let n=O[r];if(n)return{maxHeight:n};let s=i[r];if(s!==void 0)return{maxHeight:s}}return null}var V={0:0,.5:2,1:4,1.5:6,2:8,2.5:10,3:12,3.5:14,4:16,5:20,6:24,7:28,8:32,9:36,10:40,11:44,12:48,14:56,16:64,20:80,24:96,28:112,32:128,36:144,40:160,44:176,48:192,52:208,56:224,60:240,64:256,72:288,80:320,96:384};function G(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary spacing value: ${t}. Only px values are supported (e.g., [16px], [16], [4.5px], [4.5]).`),null)}function Y(t,e){let i=e?x(x({},V),e):V,r=t.match(/^m([xytrblse]?)-auto$/);if(r){let a=r[1];return X(a,"auto")}let o=t.match(/^(-?)m([xytrblse]?)-(.+)$/);if(o){let[,a,f,p]=o,d=a==="-",b=G(p);if(b!==null){let h=d?-b:b;return X(f,h)}let g=i[p];if(g!==void 0){let h=d?-g:g;return X(f,h)}}let n=t.match(/^p([xytrblse]?)-(.+)$/);if(n){let[,a,f]=n,p=G(f);if(p!==null)return Mt(a,p);let d=i[f];if(d!==void 0)return Mt(a,d)}let s=t.match(/^gap-(.+)$/);if(s){let a=s[1],f=G(a);if(f!==null)return{gap:f};let p=i[a];if(p!==void 0)return{gap:p}}return null}function X(t,e){switch(t){case"":return{margin:e};case"x":return{marginHorizontal:e};case"y":return{marginVertical:e};case"t":return{marginTop:e};case"r":return{marginRight:e};case"b":return{marginBottom:e};case"l":return{marginLeft:e};case"s":return{marginStart:e};case"e":return{marginEnd:e};default:return{}}}function Mt(t,e){switch(t){case"":return{padding:e};case"x":return{paddingHorizontal:e};case"y":return{paddingVertical:e};case"t":return{paddingTop:e};case"r":return{paddingRight:e};case"b":return{paddingBottom:e};case"l":return{paddingLeft:e};case"s":return{paddingStart:e};case"e":return{paddingEnd:e};default:return{}}}var Z={0:0,50:.5,75:.75,90:.9,95:.95,100:1,105:1.05,110:1.1,125:1.25,150:1.5,200:2},L={0:0,1:1,2:2,3:3,6:6,12:12,45:45,90:90,180:180},Wt={0:0,1:1,2:2,3:3,6:6,12:12},oe={0:0,100:100,200:200,300:300,400:400,500:500,600:600,700:700,800:800,900:900,1e3:1e3};function q(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary scale value: ${t}. Only numbers are supported (e.g., [1.5], [0.75]).`),null)}function E(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?)deg\]$/);return e?`${e[1]}deg`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary rotation value: ${t}. Only deg unit is supported (e.g., [45deg], [-15deg]).`),null)}function Ct(t){let e=t.match(/^\[(-?\d+)(?:px)?\]$/);if(e)return parseInt(e[1],10);let i=t.match(/^\[(-?\d+(?:\.\d+)?)%\]$/);return i?`${i[1]}%`:(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary translation unit: ${t}. Only px and % are supported.`),null)}function se(t){let e=t.match(/^\[(-?\d+)\]$/);return e?parseInt(e[1],10):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Invalid arbitrary perspective value: ${t}. Only integers are supported (e.g., [1500]).`),null)}function J(t,e){let i=e?x(x({},V),e):V;if(t.startsWith("origin-"))return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] transform-origin is not supported in React Native. Class "${t}" will be ignored.`),null;if(t.startsWith("scale-")){let r=t.substring(6),o=q(r);if(o!==null)return{transform:[{scale:o}]};let n=Z[r];if(n!==void 0)return{transform:[{scale:n}]}}if(t.startsWith("scale-x-")){let r=t.substring(8),o=q(r);if(o!==null)return{transform:[{scaleX:o}]};let n=Z[r];if(n!==void 0)return{transform:[{scaleX:n}]}}if(t.startsWith("scale-y-")){let r=t.substring(8),o=q(r);if(o!==null)return{transform:[{scaleY:o}]};let n=Z[r];if(n!==void 0)return{transform:[{scaleY:n}]}}if(t.startsWith("rotate-")||t.startsWith("-rotate-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{rotate:r?`-${n}`:n}]};let s=L[o];if(s!==void 0)return{transform:[{rotate:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-x-")||t.startsWith("-rotate-x-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateX:r?`-${n}`:n}]};let s=L[o];if(s!==void 0)return{transform:[{rotateX:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-y-")||t.startsWith("-rotate-y-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateY:r?`-${n}`:n}]};let s=L[o];if(s!==void 0)return{transform:[{rotateY:`${r?-s:s}deg`}]}}if(t.startsWith("rotate-z-")||t.startsWith("-rotate-z-")){let r=t.startsWith("-"),o=r?t.substring(10):t.substring(9),n=E(o);if(n!==null)return{transform:[{rotateZ:r?`-${n}`:n}]};let s=L[o];if(s!==void 0)return{transform:[{rotateZ:`${r?-s:s}deg`}]}}if(t.startsWith("translate-x-")||t.startsWith("-translate-x-")){let r=t.startsWith("-"),o=r?t.substring(13):t.substring(12),n=Ct(o);if(n!==null)return{transform:[{translateX:typeof n=="number"?r?-n:n:r?`-${n}`:n}]};let s=i[o];if(s!==void 0)return{transform:[{translateX:r?-s:s}]}}if(t.startsWith("translate-y-")||t.startsWith("-translate-y-")){let r=t.startsWith("-"),o=r?t.substring(13):t.substring(12),n=Ct(o);if(n!==null)return{transform:[{translateY:typeof n=="number"?r?-n:n:r?`-${n}`:n}]};let s=i[o];if(s!==void 0)return{transform:[{translateY:r?-s:s}]}}if(t.startsWith("skew-x-")||t.startsWith("-skew-x-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{skewX:r?`-${n}`:n}]};let s=Wt[o];if(s!==void 0)return{transform:[{skewX:`${r?-s:s}deg`}]}}if(t.startsWith("skew-y-")||t.startsWith("-skew-y-")){let r=t.startsWith("-"),o=r?t.substring(8):t.substring(7),n=E(o);if(n!==null)return{transform:[{skewY:r?`-${n}`:n}]};let s=Wt[o];if(s!==void 0)return{transform:[{skewY:`${r?-s:s}deg`}]}}if(t.startsWith("perspective-")){let r=t.substring(12),o=se(r);if(o!==null)return{transform:[{perspective:o}]};let n=oe[r];if(n!==void 0)return{transform:[{perspective:n}]}}return null}var ae={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 Et={"font-sans":{fontFamily:"System"},"font-serif":{fontFamily:"serif"},"font-mono":{fontFamily:"Courier"}},fe={"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"}},le={italic:{fontStyle:"italic"},"not-italic":{fontStyle:"normal"}},ce={"text-left":{textAlign:"left"},"text-center":{textAlign:"center"},"text-right":{textAlign:"right"},"text-justify":{textAlign:"justify"}},ue={underline:{textDecorationLine:"underline"},"line-through":{textDecorationLine:"line-through"},"no-underline":{textDecorationLine:"none"}},de={uppercase:{textTransform:"uppercase"},lowercase:{textTransform:"lowercase"},capitalize:{textTransform:"capitalize"},"normal-case":{textTransform:"none"}},pe={3:12,4:16,5:20,6:24,7:28,8:32,9:36,10:40},ge={"leading-none":{lineHeight:16},"leading-tight":{lineHeight:20},"leading-snug":{lineHeight:22},"leading-normal":{lineHeight:24},"leading-relaxed":{lineHeight:28},"leading-loose":{lineHeight:32}},ye={"tracking-tighter":{letterSpacing:-.8},"tracking-tight":{letterSpacing:-.4},"tracking-normal":{letterSpacing:0},"tracking-wide":{letterSpacing:.4},"tracking-wider":{letterSpacing:.8},"tracking-widest":{letterSpacing:1.6}};function he(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary font size value: ${t}. Only px values are supported (e.g., [18px], [13.5px], [.5]).`),null)}function be(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary line height value: ${t}. Only px values are supported (e.g., [24px], [21.5px], [.5]).`),null)}function me(t){let e=t.match(/^\[(-?\d+(?:\.\d+)?|-?\.\d+)(?:px)?\]$/);return e?parseFloat(e[1]):(t.startsWith("[")&&t.endsWith("]")&&process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unsupported arbitrary letter spacing value: ${t}. Only px values are supported (e.g., [0.5px], [0.3], [.5], [-0.4]).`),null)}function Q(t,e,i){var o,n,s,a,f,p,d,b;let r=e?x(x({},Et),Object.fromEntries(Object.entries(e).map(([g,h])=>[`font-${g}`,{fontFamily:h}]))):Et;if(t.startsWith("text-")){let g=t.substring(5),h=he(g);if(h!==null)return{fontSize:h};if((i==null?void 0:i[g])!==void 0)return{fontSize:i[g]};let w=ae[g];if(w!==void 0)return{fontSize:w}}if(t.startsWith("leading-")){let g=t.substring(8),h=be(g);if(h!==null)return{lineHeight:h};let w=pe[g];if(w!==void 0)return{lineHeight:w}}if(t.startsWith("tracking-")){let g=t.substring(9),h=me(g);if(h!==null)return{letterSpacing:h}}return(b=(d=(p=(f=(a=(s=(n=(o=r[t])!=null?o:fe[t])!=null?n:le[t])!=null?s:ce[t])!=null?a:ue[t])!=null?f:de[t])!=null?p:ge[t])!=null?d:ye[t])!=null?b:null}var xe=["active","hover","focus","disabled","placeholder"],Se=["ios","android","web"],Re=["dark","light"],we=["scheme"],Oe=["rtl","ltr"],ur=[...xe,...Se,...Re,...we,...Oe];function N(t,e){let i=t.split(/\s+/).filter(Boolean),r={};for(let o of i){let n=Me(o,e);ut(r,n)}return r}function Me(t,e){let i=[r=>Y(r,e==null?void 0:e.spacing),r=>z(r,e==null?void 0:e.colors),K,r=>C(r,e==null?void 0:e.colors),r=>F(r,e==null?void 0:e.spacing),r=>Q(r,e==null?void 0:e.fontFamily,e==null?void 0:e.fontSize),r=>U(r,e==null?void 0:e.spacing),r=>B(r,e==null?void 0:e.colors),k,r=>J(r,e==null?void 0:e.spacing)];for(let r of i){let o=r(t);if(o!==null)return o}return process.env.NODE_ENV!=="production"&&console.warn(`[react-native-tailwind] Unknown class: "${t}"`),{}}var Nt=["active","focus","disabled"];function Tt(t){return Nt.some(e=>t.includes(`${e}:`))}function At(t){let e=t.split(/\s+/).filter(Boolean),i=[],r=new Map;for(let o of e){let n=!1;for(let s of Nt){let a=`${s}:`;if(o.startsWith(a)){let f=o.slice(a.length);r.has(s)||r.set(s,[]);let p=r.get(s);p&&p.push(f),n=!0;break}}n||i.push(o)}return{base:i,modifiers:r}}var S={colors:{},fontFamily:{},fontSize:{},spacing:{}},W=new Map;function We(t){var e,i,r,o,n,s,a,f,p;if((i=(e=t.theme)==null?void 0:e.extend)!=null&&i.colors?S.colors=A((r=t.theme)==null?void 0:r.extend.colors):S.colors={},(n=(o=t.theme)==null?void 0:o.extend)!=null&&n.fontFamily){let d={};for(let[b,g]of Object.entries(t.theme.extend.fontFamily))Array.isArray(g)?d[b]=g[0]:d[b]=g;S.fontFamily=d}else S.fontFamily={};if((a=(s=t.theme)==null?void 0:s.extend)!=null&&a.fontSize){let d={};for(let[b,g]of Object.entries(t.theme.extend.fontSize))if(typeof g=="number")d[b]=g;else if(typeof g=="string"){let h=parseFloat(g.replace(/px$/,""));isNaN(h)||(d[b]=h)}S.fontSize=d}else S.fontSize={};if((p=(f=t.theme)==null?void 0:f.extend)!=null&&p.spacing){let d={};for(let[b,g]of Object.entries(t.theme.extend.spacing))if(typeof g=="number")d[b]=g;else if(typeof g=="string"){let h;g.endsWith("rem")?h=parseFloat(g.replace(/rem$/,""))*16:h=parseFloat(g.replace(/px$/,"")),isNaN(h)||(d[b]=h)}S.spacing=d}else S.spacing={};W.clear()}function Ce(){return S}function Ee(){var t;return Object.keys((t=S.colors)!=null?t:{}).length>0?S.colors:void 0}function Ne(){W.clear()}function Te(){return{size:W.size,keys:Array.from(W.keys())}}function $t(t){let e=W.get(t);if(e)return e;if(!Tt(t)){let f={style:N(t,S)};return W.set(t,f),f}let{base:i,modifiers:r}=At(t),o=i.join(" "),s={style:o?N(o,S):{}};if(r.has("active")){let a=r.get("active");if(a&&a.length>0){let f=a.join(" ");s.activeStyle=N(f,S)}}if(r.has("focus")){let a=r.get("focus");if(a&&a.length>0){let f=a.join(" ");s.focusStyle=N(f,S)}}if(r.has("disabled")){let a=r.get("disabled");if(a&&a.length>0){let f=a.join(" ");s.disabledStyle=N(f,S)}}return W.set(t,s),s}function Ae(t,...e){let r=t.reduce((o,n,s)=>{let a=e[s],f=a!=null&&a!==!1?String(a):"";return o+n+f},"").trim().replace(/\s+/g," ");return r?$t(r):{style:{}}}function $e(t){let e=t.trim().replace(/\s+/g," ");if(e)return $t(e)}
|
|
2
2
|
//# sourceMappingURL=runtime.cjs.map
|