@mgcrea/react-native-tailwind 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,302 @@
1
+ export type TailwindPalette = {
2
+ "50": string;
3
+ "100": string;
4
+ "200": string;
5
+ "300": string;
6
+ "400": string;
7
+ "500": string;
8
+ "600": string;
9
+ "700": string;
10
+ "800": string;
11
+ "900": string;
12
+ "950": string;
13
+ };
14
+ export declare const TAILWIND_PALETTES: {
15
+ red: {
16
+ "50": string;
17
+ "100": string;
18
+ "200": string;
19
+ "300": string;
20
+ "400": string;
21
+ "500": string;
22
+ "600": string;
23
+ "700": string;
24
+ "800": string;
25
+ "900": string;
26
+ "950": string;
27
+ };
28
+ orange: {
29
+ "50": string;
30
+ "100": string;
31
+ "200": string;
32
+ "300": string;
33
+ "400": string;
34
+ "500": string;
35
+ "600": string;
36
+ "700": string;
37
+ "800": string;
38
+ "900": string;
39
+ "950": string;
40
+ };
41
+ amber: {
42
+ "50": string;
43
+ "100": string;
44
+ "200": string;
45
+ "300": string;
46
+ "400": string;
47
+ "500": string;
48
+ "600": string;
49
+ "700": string;
50
+ "800": string;
51
+ "900": string;
52
+ "950": string;
53
+ };
54
+ yellow: {
55
+ "50": string;
56
+ "100": string;
57
+ "200": string;
58
+ "300": string;
59
+ "400": string;
60
+ "500": string;
61
+ "600": string;
62
+ "700": string;
63
+ "800": string;
64
+ "900": string;
65
+ "950": string;
66
+ };
67
+ lime: {
68
+ "50": string;
69
+ "100": string;
70
+ "200": string;
71
+ "300": string;
72
+ "400": string;
73
+ "500": string;
74
+ "600": string;
75
+ "700": string;
76
+ "800": string;
77
+ "900": string;
78
+ "950": string;
79
+ };
80
+ green: {
81
+ "50": string;
82
+ "100": string;
83
+ "200": string;
84
+ "300": string;
85
+ "400": string;
86
+ "500": string;
87
+ "600": string;
88
+ "700": string;
89
+ "800": string;
90
+ "900": string;
91
+ "950": string;
92
+ };
93
+ emerald: {
94
+ "50": string;
95
+ "100": string;
96
+ "200": string;
97
+ "300": string;
98
+ "400": string;
99
+ "500": string;
100
+ "600": string;
101
+ "700": string;
102
+ "800": string;
103
+ "900": string;
104
+ "950": string;
105
+ };
106
+ teal: {
107
+ "50": string;
108
+ "100": string;
109
+ "200": string;
110
+ "300": string;
111
+ "400": string;
112
+ "500": string;
113
+ "600": string;
114
+ "700": string;
115
+ "800": string;
116
+ "900": string;
117
+ "950": string;
118
+ };
119
+ cyan: {
120
+ "50": string;
121
+ "100": string;
122
+ "200": string;
123
+ "300": string;
124
+ "400": string;
125
+ "500": string;
126
+ "600": string;
127
+ "700": string;
128
+ "800": string;
129
+ "900": string;
130
+ "950": string;
131
+ };
132
+ sky: {
133
+ "50": string;
134
+ "100": string;
135
+ "200": string;
136
+ "300": string;
137
+ "400": string;
138
+ "500": string;
139
+ "600": string;
140
+ "700": string;
141
+ "800": string;
142
+ "900": string;
143
+ "950": string;
144
+ };
145
+ blue: {
146
+ "50": string;
147
+ "100": string;
148
+ "200": string;
149
+ "300": string;
150
+ "400": string;
151
+ "500": string;
152
+ "600": string;
153
+ "700": string;
154
+ "800": string;
155
+ "900": string;
156
+ "950": string;
157
+ };
158
+ indigo: {
159
+ "50": string;
160
+ "100": string;
161
+ "200": string;
162
+ "300": string;
163
+ "400": string;
164
+ "500": string;
165
+ "600": string;
166
+ "700": string;
167
+ "800": string;
168
+ "900": string;
169
+ "950": string;
170
+ };
171
+ violet: {
172
+ "50": string;
173
+ "100": string;
174
+ "200": string;
175
+ "300": string;
176
+ "400": string;
177
+ "500": string;
178
+ "600": string;
179
+ "700": string;
180
+ "800": string;
181
+ "900": string;
182
+ "950": string;
183
+ };
184
+ purple: {
185
+ "50": string;
186
+ "100": string;
187
+ "200": string;
188
+ "300": string;
189
+ "400": string;
190
+ "500": string;
191
+ "600": string;
192
+ "700": string;
193
+ "800": string;
194
+ "900": string;
195
+ "950": string;
196
+ };
197
+ fuchsia: {
198
+ "50": string;
199
+ "100": string;
200
+ "200": string;
201
+ "300": string;
202
+ "400": string;
203
+ "500": string;
204
+ "600": string;
205
+ "700": string;
206
+ "800": string;
207
+ "900": string;
208
+ "950": string;
209
+ };
210
+ pink: {
211
+ "50": string;
212
+ "100": string;
213
+ "200": string;
214
+ "300": string;
215
+ "400": string;
216
+ "500": string;
217
+ "600": string;
218
+ "700": string;
219
+ "800": string;
220
+ "900": string;
221
+ "950": string;
222
+ };
223
+ rose: {
224
+ "50": string;
225
+ "100": string;
226
+ "200": string;
227
+ "300": string;
228
+ "400": string;
229
+ "500": string;
230
+ "600": string;
231
+ "700": string;
232
+ "800": string;
233
+ "900": string;
234
+ "950": string;
235
+ };
236
+ slate: {
237
+ "50": string;
238
+ "100": string;
239
+ "200": string;
240
+ "300": string;
241
+ "400": string;
242
+ "500": string;
243
+ "600": string;
244
+ "700": string;
245
+ "800": string;
246
+ "900": string;
247
+ "950": string;
248
+ };
249
+ gray: {
250
+ "50": string;
251
+ "100": string;
252
+ "200": string;
253
+ "300": string;
254
+ "400": string;
255
+ "500": string;
256
+ "600": string;
257
+ "700": string;
258
+ "800": string;
259
+ "900": string;
260
+ "950": string;
261
+ };
262
+ zinc: {
263
+ "50": string;
264
+ "100": string;
265
+ "200": string;
266
+ "300": string;
267
+ "400": string;
268
+ "500": string;
269
+ "600": string;
270
+ "700": string;
271
+ "800": string;
272
+ "900": string;
273
+ "950": string;
274
+ };
275
+ neutral: {
276
+ "50": string;
277
+ "100": string;
278
+ "200": string;
279
+ "300": string;
280
+ "400": string;
281
+ "500": string;
282
+ "600": string;
283
+ "700": string;
284
+ "800": string;
285
+ "900": string;
286
+ "950": string;
287
+ };
288
+ stone: {
289
+ "50": string;
290
+ "100": string;
291
+ "200": string;
292
+ "300": string;
293
+ "400": string;
294
+ "500": string;
295
+ "600": string;
296
+ "700": string;
297
+ "800": string;
298
+ "900": string;
299
+ "950": string;
300
+ };
301
+ };
302
+ export type TailwindColor = keyof typeof TAILWIND_PALETTES;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.TAILWIND_PALETTES=void 0;var TAILWIND_PALETTES=exports.TAILWIND_PALETTES={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"}};
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.COLORS=void 0;exports.parseColor=parseColor;var COLORS=exports.COLORS={"gray-50":"#F9FAFB","gray-100":"#F3F4F6","gray-200":"#E5E7EB","gray-300":"#D1D5DB","gray-400":"#9CA3AF","gray-500":"#6B7280","gray-600":"#4B5563","gray-700":"#374151","gray-800":"#1F2937","gray-900":"#111827","red-50":"#FEF2F2","red-100":"#FEE2E2","red-200":"#FECACA","red-300":"#FCA5A5","red-400":"#F87171","red-500":"#EF4444","red-600":"#DC2626","red-700":"#B91C1C","red-800":"#991B1B","red-900":"#7F1D1D","blue-50":"#EFF6FF","blue-100":"#DBEAFE","blue-200":"#BFDBFE","blue-300":"#93C5FD","blue-400":"#60A5FA","blue-500":"#3B82F6","blue-600":"#2563EB","blue-700":"#1D4ED8","blue-800":"#1E40AF","blue-900":"#1E3A8A","green-50":"#F0FDF4","green-100":"#DCFCE7","green-200":"#BBF7D0","green-300":"#86EFAC","green-400":"#4ADE80","green-500":"#22C55E","green-600":"#16A34A","green-700":"#15803D","green-800":"#166534","green-900":"#14532D","yellow-50":"#FEFCE8","yellow-100":"#FEF9C3","yellow-200":"#FEF08A","yellow-300":"#FDE047","yellow-400":"#FACC15","yellow-500":"#EAB308","yellow-600":"#CA8A04","yellow-700":"#A16207","yellow-800":"#854D0E","yellow-900":"#713F12","purple-50":"#FAF5FF","purple-100":"#F3E8FF","purple-200":"#E9D5FF","purple-300":"#D8B4FE","purple-400":"#C084FC","purple-500":"#A855F7","purple-600":"#9333EA","purple-700":"#7E22CE","purple-800":"#6B21A8","purple-900":"#581C87","pink-50":"#FDF2F8","pink-100":"#FCE7F3","pink-200":"#FBCFE8","pink-300":"#F9A8D4","pink-400":"#F472B6","pink-500":"#EC4899","pink-600":"#DB2777","pink-700":"#BE185D","pink-800":"#9D174D","pink-900":"#831843","orange-50":"#FFF7ED","orange-100":"#FFEDD5","orange-200":"#FED7AA","orange-300":"#FDBA74","orange-400":"#FB923C","orange-500":"#F97316","orange-600":"#EA580C","orange-700":"#C2410C","orange-800":"#9A3412","orange-900":"#7C2D12","indigo-50":"#EEF2FF","indigo-100":"#E0E7FF","indigo-200":"#C7D2FE","indigo-300":"#A5B4FC","indigo-400":"#818CF8","indigo-500":"#6366F1","indigo-600":"#4F46E5","indigo-700":"#4338CA","indigo-800":"#3730A3","indigo-900":"#312E81",white:"#FFFFFF",black:"#000000",transparent:"transparent"};function applyOpacity(hex,opacity){if(hex==="transparent"){return"transparent";}var cleanHex=hex.replace(/^#/,"");var fullHex=cleanHex.length===3?cleanHex.split("").map(function(char){return char+char;}).join(""):cleanHex;var alpha=Math.round(opacity/100*255);var alphaHex=alpha.toString(16).padStart(2,"0").toUpperCase();return`#${fullHex.toUpperCase()}${alphaHex}`;}function parseArbitraryColor(value){var hexMatch=value.match(/^\[#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\]$/);if(hexMatch){var hex=hexMatch[1];if(hex.length===3){var expanded=hex.split("").map(function(char){return char+char;}).join("");return`#${expanded}`;}return`#${hex}`;}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary color value: ${value}. Only hex colors are supported (e.g., [#ff0000], [#f00], or [#ff0000aa]).`);}return null;}return null;}function parseColor(cls,customColors){var getColor=function getColor(key){var _customColors$key;return(_customColors$key=customColors==null?void 0:customColors[key])!=null?_customColors$key:COLORS[key];};var parseColorWithOpacity=function parseColorWithOpacity(colorKey){var _getColor;var opacityMatch=colorKey.match(/^(.+)\/(\d+)$/);if(opacityMatch){var baseColorKey=opacityMatch[1];var opacity=Number.parseInt(opacityMatch[2],10);if(opacity<0||opacity>100){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid opacity value: ${opacity}. Opacity must be between 0 and 100.`);}return null;}var _arbitraryColor=parseArbitraryColor(baseColorKey);if(_arbitraryColor!==null){return applyOpacity(_arbitraryColor,opacity);}var color=getColor(baseColorKey);if(color){return applyOpacity(color,opacity);}return null;}var arbitraryColor=parseArbitraryColor(colorKey);if(arbitraryColor!==null){return arbitraryColor;}return(_getColor=getColor(colorKey))!=null?_getColor:null;};if(cls.startsWith("bg-")){var colorKey=cls.substring(3);if(colorKey.startsWith("[")&&!colorKey.startsWith("[#")){return null;}var color=parseColorWithOpacity(colorKey);if(color){return{backgroundColor:color};}}if(cls.startsWith("text-")){var _colorKey=cls.substring(5);if(_colorKey.startsWith("[")&&!_colorKey.startsWith("[#")){return null;}var _color=parseColorWithOpacity(_colorKey);if(_color){return{color:_color};}}if(cls.startsWith("border-")&&!cls.match(/^border-[0-9]/)){var _colorKey2=cls.substring(7);if(_colorKey2.startsWith("[")&&!_colorKey2.startsWith("[#")){return null;}var _color2=parseColorWithOpacity(_colorKey2);if(_color2){return{borderColor:_color2};}}return null;}
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.COLORS=void 0;exports.parseColor=parseColor;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _palettes=require("../config/palettes");function flattenColors(){var flat={};for(var _ref of Object.entries(_palettes.TAILWIND_PALETTES)){var _ref2=(0,_slicedToArray2.default)(_ref,2);var colorName=_ref2[0];var shades=_ref2[1];for(var _ref3 of Object.entries(shades)){var _ref4=(0,_slicedToArray2.default)(_ref3,2);var shade=_ref4[0];var hex=_ref4[1];flat[`${colorName}-${shade}`]=hex;}}flat.white="#FFFFFF";flat.black="#000000";flat.transparent="transparent";return flat;}var COLORS=exports.COLORS=flattenColors();function applyOpacity(hex,opacity){if(hex==="transparent"){return"transparent";}var cleanHex=hex.replace(/^#/,"");var fullHex=cleanHex.length===3?cleanHex.split("").map(function(char){return char+char;}).join(""):cleanHex;var alpha=Math.round(opacity/100*255);var alphaHex=alpha.toString(16).padStart(2,"0").toUpperCase();return`#${fullHex.toUpperCase()}${alphaHex}`;}function parseArbitraryColor(value){var hexMatch=value.match(/^\[#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\]$/);if(hexMatch){var hex=hexMatch[1];if(hex.length===3){var expanded=hex.split("").map(function(char){return char+char;}).join("");return`#${expanded}`;}return`#${hex}`;}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Unsupported arbitrary color value: ${value}. Only hex colors are supported (e.g., [#ff0000], [#f00], or [#ff0000aa]).`);}return null;}return null;}function parseColor(cls,customColors){var getColor=function getColor(key){var _customColors$key;return(_customColors$key=customColors==null?void 0:customColors[key])!=null?_customColors$key:COLORS[key];};var parseColorWithOpacity=function parseColorWithOpacity(colorKey){var _getColor;var opacityMatch=colorKey.match(/^(.+)\/(\d+)$/);if(opacityMatch){var baseColorKey=opacityMatch[1];var opacity=Number.parseInt(opacityMatch[2],10);if(opacity<0||opacity>100){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid opacity value: ${opacity}. Opacity must be between 0 and 100.`);}return null;}var _arbitraryColor=parseArbitraryColor(baseColorKey);if(_arbitraryColor!==null){return applyOpacity(_arbitraryColor,opacity);}var color=getColor(baseColorKey);if(color){return applyOpacity(color,opacity);}return null;}var arbitraryColor=parseArbitraryColor(colorKey);if(arbitraryColor!==null){return arbitraryColor;}return(_getColor=getColor(colorKey))!=null?_getColor:null;};if(cls.startsWith("bg-")){var colorKey=cls.substring(3);if(colorKey.startsWith("[")&&!colorKey.startsWith("[#")){return null;}var color=parseColorWithOpacity(colorKey);if(color){return{backgroundColor:color};}}if(cls.startsWith("text-")){var _colorKey=cls.substring(5);if(_colorKey.startsWith("[")&&!_colorKey.startsWith("[#")){return null;}var _color=parseColorWithOpacity(_colorKey);if(_color){return{color:_color};}}if(cls.startsWith("border-")&&!cls.match(/^border-[0-9]/)){var _colorKey2=cls.substring(7);if(_colorKey2.startsWith("[")&&!_colorKey2.startsWith("[#")){return null;}var _color2=parseColorWithOpacity(_colorKey2);if(_color2){return{borderColor:_color2};}}return null;}
@@ -1 +1 @@
1
- var _vitest=require("vitest");var _colors=require("./colors");(0,_vitest.describe)("COLORS",function(){(0,_vitest.it)("should export complete color palette",function(){(0,_vitest.expect)(_colors.COLORS).toMatchSnapshot();});});(0,_vitest.describe)("parseColor - background colors",function(){(0,_vitest.it)("should parse background colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500")).toEqual({backgroundColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500")).toEqual({backgroundColor:"#EF4444"});(0,_vitest.expect)((0,_colors.parseColor)("bg-green-500")).toEqual({backgroundColor:"#22C55E"});(0,_vitest.expect)((0,_colors.parseColor)("bg-gray-300")).toEqual({backgroundColor:"#D1D5DB"});});(0,_vitest.it)("should parse background colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-white")).toEqual({backgroundColor:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black")).toEqual({backgroundColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-transparent")).toEqual({backgroundColor:"transparent"});});(0,_vitest.it)("should parse background colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#3B82F6]")).toEqual({backgroundColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#000000]")).toEqual({backgroundColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFFFFF]")).toEqual({backgroundColor:"#FFFFFF"});});(0,_vitest.it)("should parse background colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#f00]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#abc]")).toEqual({backgroundColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#123]")).toEqual({backgroundColor:"#112233"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFF]")).toEqual({backgroundColor:"#FFFFFF"});});(0,_vitest.it)("should parse background colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000aa]")).toEqual({backgroundColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#3B82F680]")).toEqual({backgroundColor:"#3B82F680"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#00000000]")).toEqual({backgroundColor:"#00000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFFFFFFF]")).toEqual({backgroundColor:"#FFFFFFFF"});});(0,_vitest.it)("should handle case-insensitive hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FF0000]")).toEqual({backgroundColor:"#FF0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#Ff0000]")).toEqual({backgroundColor:"#Ff0000"});});(0,_vitest.it)("should prefer arbitrary values over preset colors",function(){var customColors={"[#ff0000]":"#00ff00"};(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]",customColors)).toEqual({backgroundColor:"#ff0000"});});});(0,_vitest.describe)("parseColor - text colors",function(){(0,_vitest.it)("should parse text colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500")).toEqual({color:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("text-red-500")).toEqual({color:"#EF4444"});(0,_vitest.expect)((0,_colors.parseColor)("text-green-500")).toEqual({color:"#22C55E"});(0,_vitest.expect)((0,_colors.parseColor)("text-gray-700")).toEqual({color:"#374151"});});(0,_vitest.it)("should parse text colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-white")).toEqual({color:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("text-black")).toEqual({color:"#000000"});});(0,_vitest.it)("should parse text colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#3B82F6]")).toEqual({color:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#333333]")).toEqual({color:"#333333"});});(0,_vitest.it)("should parse text colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#f00]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]")).toEqual({color:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#000]")).toEqual({color:"#000000"});});(0,_vitest.it)("should parse text colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000aa]")).toEqual({color:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#00000080]")).toEqual({color:"#00000080"});});});(0,_vitest.describe)("parseColor - border colors",function(){(0,_vitest.it)("should parse border colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-blue-500")).toEqual({borderColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("border-red-500")).toEqual({borderColor:"#EF4444"});(0,_vitest.expect)((0,_colors.parseColor)("border-green-500")).toEqual({borderColor:"#22C55E"});(0,_vitest.expect)((0,_colors.parseColor)("border-gray-200")).toEqual({borderColor:"#E5E7EB"});});(0,_vitest.it)("should parse border colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-white")).toEqual({borderColor:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("border-black")).toEqual({borderColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("border-transparent")).toEqual({borderColor:"transparent"});});(0,_vitest.it)("should parse border colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000]")).toEqual({borderColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#3B82F6]")).toEqual({borderColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#cccccc]")).toEqual({borderColor:"#cccccc"});});(0,_vitest.it)("should parse border colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#f00]")).toEqual({borderColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]")).toEqual({borderColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#999]")).toEqual({borderColor:"#999999"});});(0,_vitest.it)("should parse border colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000aa]")).toEqual({borderColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#0000FF50]")).toEqual({borderColor:"#0000FF50"});});(0,_vitest.it)("should not match border width classes",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-0")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-2")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-4")).toBeNull();});});(0,_vitest.describe)("parseColor - custom colors",function(){var customColors={"brand-primary":"#FF6B6B","brand-secondary":"#4ECDC4",accent:"#FFE66D"};(0,_vitest.it)("should support custom background colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-primary",customColors)).toEqual({backgroundColor:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-secondary",customColors)).toEqual({backgroundColor:"#4ECDC4"});(0,_vitest.expect)((0,_colors.parseColor)("bg-accent",customColors)).toEqual({backgroundColor:"#FFE66D"});});(0,_vitest.it)("should support custom text colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-brand-primary",customColors)).toEqual({color:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("text-brand-secondary",customColors)).toEqual({color:"#4ECDC4"});});(0,_vitest.it)("should support custom border colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-brand-primary",customColors)).toEqual({borderColor:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("border-accent",customColors)).toEqual({borderColor:"#FFE66D"});});(0,_vitest.it)("should allow custom colors to override preset colors",function(){var overrideColors={"blue-500":"#FF0000"};(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500",overrideColors)).toEqual({backgroundColor:"#FF0000"});});(0,_vitest.it)("should fallback to preset colors when custom color not found",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500",customColors)).toEqual({backgroundColor:"#EF4444"});});});(0,_vitest.describe)("parseColor - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_colors.parseColor)("invalid")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border")).toBeNull();});(0,_vitest.it)("should return null for invalid color values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-invalid")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-notacolor")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-xyz")).toBeNull();});(0,_vitest.it)("should return null for invalid arbitrary hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffffffff]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-#ff0000]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[ff0000]")).toBeNull();});(0,_vitest.it)("should return null for non-hex arbitrary values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#gggggg]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#zzzzzz]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[rgb(255,0,0)]")).toBeNull();});(0,_vitest.it)("should return null for non-color arbitrary values (to let other parsers handle them)",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[13px]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-[18px]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-[24]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[100%]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[50px]")).toBeNull();});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_colors.parseColor)("background-blue-500")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("textcolor-red-500")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-color-blue-500")).toBeNull();});(0,_vitest.it)("should handle all color scale variants",function(){var scales=["50","100","200","300","400","500","600","700","800","900"];scales.forEach(function(scale){(0,_vitest.expect)((0,_colors.parseColor)(`bg-blue-${scale}`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-red-${scale}`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-green-${scale}`)).toBeTruthy();});});});(0,_vitest.describe)("parseColor - comprehensive coverage",function(){(0,_vitest.it)("should parse all color types with same preset color",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500")).toEqual({backgroundColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500")).toEqual({color:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("border-blue-500")).toEqual({borderColor:"#3B82F6"});});(0,_vitest.it)("should parse all color types with same arbitrary hex",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000]")).toEqual({borderColor:"#ff0000"});});(0,_vitest.it)("should handle all color families",function(){var families=["gray","red","blue","green","yellow","purple","pink","orange","indigo"];families.forEach(function(family){(0,_vitest.expect)((0,_colors.parseColor)(`bg-${family}-500`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-${family}-500`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-${family}-500`)).toBeTruthy();});});(0,_vitest.it)("should handle arbitrary values with mixed case",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#AbCdEf]")).toEqual({backgroundColor:"#AbCdEf"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#aBcDeF]")).toEqual({color:"#aBcDeF"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ABCDEF]")).toEqual({borderColor:"#ABCDEF"});});(0,_vitest.it)("should expand 3-digit hex consistently across all color types",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#abc]")).toEqual({backgroundColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]")).toEqual({color:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]")).toEqual({borderColor:"#aabbcc"});});(0,_vitest.it)("should handle alpha channel consistently across all color types",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000aa]")).toEqual({backgroundColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000aa]")).toEqual({color:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000aa]")).toEqual({borderColor:"#ff0000aa"});});});(0,_vitest.describe)("parseColor - opacity modifiers",function(){(0,_vitest.it)("should parse background colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50")).toEqual({backgroundColor:"#00000080"});(0,_vitest.expect)((0,_colors.parseColor)("bg-white/50")).toEqual({backgroundColor:"#FFFFFF80"});(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500/80")).toEqual({backgroundColor:"#3B82F6CC"});(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500/30")).toEqual({backgroundColor:"#EF44444D"});});(0,_vitest.it)("should parse text colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-black/80")).toEqual({color:"#000000CC"});(0,_vitest.expect)((0,_colors.parseColor)("text-white/90")).toEqual({color:"#FFFFFFE6"});(0,_vitest.expect)((0,_colors.parseColor)("text-gray-900/70")).toEqual({color:"#111827B3"});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500/50")).toEqual({color:"#3B82F680"});});(0,_vitest.it)("should parse border colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-black/25")).toEqual({borderColor:"#00000040"});(0,_vitest.expect)((0,_colors.parseColor)("border-red-500/60")).toEqual({borderColor:"#EF444499"});(0,_vitest.expect)((0,_colors.parseColor)("border-gray-200/40")).toEqual({borderColor:"#E5E7EB66"});});(0,_vitest.it)("should handle opacity modifier with arbitrary hex colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]/50")).toEqual({backgroundColor:"#FF000080"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#3B82F6]/80")).toEqual({color:"#3B82F6CC"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]/60")).toEqual({borderColor:"#AABBCC99"});});(0,_vitest.it)("should handle opacity modifier with custom colors",function(){var customColors={"brand-primary":"#FF6B6B"};(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-primary/50",customColors)).toEqual({backgroundColor:"#FF6B6B80"});(0,_vitest.expect)((0,_colors.parseColor)("text-brand-primary/75",customColors)).toEqual({color:"#FF6B6BBF"});});(0,_vitest.it)("should handle opacity 0 (fully transparent)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/0")).toEqual({backgroundColor:"#00000000"});(0,_vitest.expect)((0,_colors.parseColor)("text-red-500/0")).toEqual({color:"#EF444400"});});(0,_vitest.it)("should handle opacity 100 (fully opaque)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/100")).toEqual({backgroundColor:"#000000FF"});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500/100")).toEqual({color:"#3B82F6FF"});});(0,_vitest.it)("should handle transparent color with opacity modifier",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-transparent/50")).toEqual({backgroundColor:"transparent"});});(0,_vitest.it)("should convert opacity percentage to correct hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/0")).toEqual({backgroundColor:"#00000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/10")).toEqual({backgroundColor:"#0000001A"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/25")).toEqual({backgroundColor:"#00000040"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50")).toEqual({backgroundColor:"#00000080"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/75")).toEqual({backgroundColor:"#000000BF"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/100")).toEqual({backgroundColor:"#000000FF"});});(0,_vitest.it)("should return null for invalid opacity values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/101")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/-1")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/150")).toBeNull();});(0,_vitest.it)("should return null for malformed opacity syntax",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/abc")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50/")).toBeNull();});(0,_vitest.it)("should handle opacity with 3-digit hex expansion",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#f00]/50")).toEqual({backgroundColor:"#FF000080"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]/75")).toEqual({color:"#AABBCCBF"});});(0,_vitest.it)("should work with all color families",function(){var families=["gray","red","blue","green","yellow","purple","pink","orange","indigo"];families.forEach(function(family){(0,_vitest.expect)((0,_colors.parseColor)(`bg-${family}-500/50`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-${family}-500/50`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-${family}-500/50`)).toBeTruthy();});});});
1
+ var _vitest=require("vitest");var _colors=require("./colors");function applyOpacity(hex,opacity){if(hex==="transparent")return"transparent";var cleanHex=hex.replace(/^#/,"");var fullHex=cleanHex.length===3?cleanHex.split("").map(function(char){return char+char;}).join(""):cleanHex;var alpha=Math.round(opacity/100*255);var alphaHex=alpha.toString(16).padStart(2,"0").toUpperCase();return`#${fullHex.toUpperCase()}${alphaHex}`;}(0,_vitest.describe)("COLORS",function(){(0,_vitest.it)("should export complete color palette",function(){(0,_vitest.expect)(_colors.COLORS).toMatchSnapshot();});});(0,_vitest.describe)("parseColor - background colors",function(){(0,_vitest.it)("should parse background colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500")).toEqual({backgroundColor:_colors.COLORS["blue-500"]});(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500")).toEqual({backgroundColor:_colors.COLORS["red-500"]});(0,_vitest.expect)((0,_colors.parseColor)("bg-green-500")).toEqual({backgroundColor:_colors.COLORS["green-500"]});(0,_vitest.expect)((0,_colors.parseColor)("bg-gray-300")).toEqual({backgroundColor:_colors.COLORS["gray-300"]});});(0,_vitest.it)("should parse background colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-white")).toEqual({backgroundColor:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black")).toEqual({backgroundColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-transparent")).toEqual({backgroundColor:"transparent"});});(0,_vitest.it)("should parse background colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#3B82F6]")).toEqual({backgroundColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#000000]")).toEqual({backgroundColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFFFFF]")).toEqual({backgroundColor:"#FFFFFF"});});(0,_vitest.it)("should parse background colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#f00]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#abc]")).toEqual({backgroundColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#123]")).toEqual({backgroundColor:"#112233"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFF]")).toEqual({backgroundColor:"#FFFFFF"});});(0,_vitest.it)("should parse background colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000aa]")).toEqual({backgroundColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#3B82F680]")).toEqual({backgroundColor:"#3B82F680"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#00000000]")).toEqual({backgroundColor:"#00000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FFFFFFFF]")).toEqual({backgroundColor:"#FFFFFFFF"});});(0,_vitest.it)("should handle case-insensitive hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#FF0000]")).toEqual({backgroundColor:"#FF0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-[#Ff0000]")).toEqual({backgroundColor:"#Ff0000"});});(0,_vitest.it)("should prefer arbitrary values over preset colors",function(){var customColors={"[#ff0000]":"#00ff00"};(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]",customColors)).toEqual({backgroundColor:"#ff0000"});});});(0,_vitest.describe)("parseColor - text colors",function(){(0,_vitest.it)("should parse text colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500")).toEqual({color:_colors.COLORS["blue-500"]});(0,_vitest.expect)((0,_colors.parseColor)("text-red-500")).toEqual({color:_colors.COLORS["red-500"]});(0,_vitest.expect)((0,_colors.parseColor)("text-green-500")).toEqual({color:_colors.COLORS["green-500"]});(0,_vitest.expect)((0,_colors.parseColor)("text-gray-700")).toEqual({color:_colors.COLORS["gray-700"]});});(0,_vitest.it)("should parse text colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-white")).toEqual({color:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("text-black")).toEqual({color:"#000000"});});(0,_vitest.it)("should parse text colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#3B82F6]")).toEqual({color:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#333333]")).toEqual({color:"#333333"});});(0,_vitest.it)("should parse text colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#f00]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]")).toEqual({color:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#000]")).toEqual({color:"#000000"});});(0,_vitest.it)("should parse text colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000aa]")).toEqual({color:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#00000080]")).toEqual({color:"#00000080"});});});(0,_vitest.describe)("parseColor - border colors",function(){(0,_vitest.it)("should parse border colors with preset values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-blue-500")).toEqual({borderColor:_colors.COLORS["blue-500"]});(0,_vitest.expect)((0,_colors.parseColor)("border-red-500")).toEqual({borderColor:_colors.COLORS["red-500"]});(0,_vitest.expect)((0,_colors.parseColor)("border-green-500")).toEqual({borderColor:_colors.COLORS["green-500"]});(0,_vitest.expect)((0,_colors.parseColor)("border-gray-200")).toEqual({borderColor:_colors.COLORS["gray-200"]});});(0,_vitest.it)("should parse border colors with basic values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-white")).toEqual({borderColor:"#FFFFFF"});(0,_vitest.expect)((0,_colors.parseColor)("border-black")).toEqual({borderColor:"#000000"});(0,_vitest.expect)((0,_colors.parseColor)("border-transparent")).toEqual({borderColor:"transparent"});});(0,_vitest.it)("should parse border colors with arbitrary 6-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000]")).toEqual({borderColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#3B82F6]")).toEqual({borderColor:"#3B82F6"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#cccccc]")).toEqual({borderColor:"#cccccc"});});(0,_vitest.it)("should parse border colors with arbitrary 3-digit hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#f00]")).toEqual({borderColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]")).toEqual({borderColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#999]")).toEqual({borderColor:"#999999"});});(0,_vitest.it)("should parse border colors with arbitrary 8-digit hex values (with alpha)",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000aa]")).toEqual({borderColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#0000FF50]")).toEqual({borderColor:"#0000FF50"});});(0,_vitest.it)("should not match border width classes",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-0")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-2")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-4")).toBeNull();});});(0,_vitest.describe)("parseColor - custom colors",function(){var customColors={"brand-primary":"#FF6B6B","brand-secondary":"#4ECDC4",accent:"#FFE66D"};(0,_vitest.it)("should support custom background colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-primary",customColors)).toEqual({backgroundColor:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-secondary",customColors)).toEqual({backgroundColor:"#4ECDC4"});(0,_vitest.expect)((0,_colors.parseColor)("bg-accent",customColors)).toEqual({backgroundColor:"#FFE66D"});});(0,_vitest.it)("should support custom text colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-brand-primary",customColors)).toEqual({color:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("text-brand-secondary",customColors)).toEqual({color:"#4ECDC4"});});(0,_vitest.it)("should support custom border colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-brand-primary",customColors)).toEqual({borderColor:"#FF6B6B"});(0,_vitest.expect)((0,_colors.parseColor)("border-accent",customColors)).toEqual({borderColor:"#FFE66D"});});(0,_vitest.it)("should allow custom colors to override preset colors",function(){var overrideColors={"blue-500":"#FF0000"};(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500",overrideColors)).toEqual({backgroundColor:"#FF0000"});});(0,_vitest.it)("should fallback to preset colors when custom color not found",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500",customColors)).toEqual({backgroundColor:_colors.COLORS["red-500"]});});});(0,_vitest.describe)("parseColor - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_colors.parseColor)("invalid")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border")).toBeNull();});(0,_vitest.it)("should return null for invalid color values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-invalid")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-notacolor")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-xyz")).toBeNull();});(0,_vitest.it)("should return null for invalid arbitrary hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffffff]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#fffffffff]")).toBeNull();});(0,_vitest.it)("should return null for malformed arbitrary values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-#ff0000]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[ff0000]")).toBeNull();});(0,_vitest.it)("should return null for non-hex arbitrary values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#gggggg]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[#zzzzzz]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[rgb(255,0,0)]")).toBeNull();});(0,_vitest.it)("should return null for non-color arbitrary values (to let other parsers handle them)",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-[13px]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-[18px]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("text-[24]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[100%]")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-[50px]")).toBeNull();});(0,_vitest.it)("should not match partial class names",function(){(0,_vitest.expect)((0,_colors.parseColor)("background-blue-500")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("textcolor-red-500")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("border-color-blue-500")).toBeNull();});(0,_vitest.it)("should handle all color scale variants",function(){var scales=["50","100","200","300","400","500","600","700","800","900"];scales.forEach(function(scale){(0,_vitest.expect)((0,_colors.parseColor)(`bg-blue-${scale}`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-red-${scale}`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-green-${scale}`)).toBeTruthy();});});});(0,_vitest.describe)("parseColor - comprehensive coverage",function(){(0,_vitest.it)("should parse all color types with same preset color",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500")).toEqual({backgroundColor:_colors.COLORS["blue-500"]});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500")).toEqual({color:_colors.COLORS["blue-500"]});(0,_vitest.expect)((0,_colors.parseColor)("border-blue-500")).toEqual({borderColor:_colors.COLORS["blue-500"]});});(0,_vitest.it)("should parse all color types with same arbitrary hex",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]")).toEqual({backgroundColor:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000]")).toEqual({color:"#ff0000"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000]")).toEqual({borderColor:"#ff0000"});});(0,_vitest.it)("should handle all color families",function(){var families=["gray","red","blue","green","yellow","purple","pink","orange","indigo"];families.forEach(function(family){(0,_vitest.expect)((0,_colors.parseColor)(`bg-${family}-500`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-${family}-500`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-${family}-500`)).toBeTruthy();});});(0,_vitest.it)("should handle arbitrary values with mixed case",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#AbCdEf]")).toEqual({backgroundColor:"#AbCdEf"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#aBcDeF]")).toEqual({color:"#aBcDeF"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ABCDEF]")).toEqual({borderColor:"#ABCDEF"});});(0,_vitest.it)("should expand 3-digit hex consistently across all color types",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#abc]")).toEqual({backgroundColor:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]")).toEqual({color:"#aabbcc"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]")).toEqual({borderColor:"#aabbcc"});});(0,_vitest.it)("should handle alpha channel consistently across all color types",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000aa]")).toEqual({backgroundColor:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#ff0000aa]")).toEqual({color:"#ff0000aa"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#ff0000aa]")).toEqual({borderColor:"#ff0000aa"});});});(0,_vitest.describe)("parseColor - opacity modifiers",function(){(0,_vitest.it)("should parse background colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50")).toEqual({backgroundColor:applyOpacity(_colors.COLORS.black,50)});(0,_vitest.expect)((0,_colors.parseColor)("bg-white/50")).toEqual({backgroundColor:applyOpacity(_colors.COLORS.white,50)});(0,_vitest.expect)((0,_colors.parseColor)("bg-blue-500/80")).toEqual({backgroundColor:applyOpacity(_colors.COLORS["blue-500"],80)});(0,_vitest.expect)((0,_colors.parseColor)("bg-red-500/30")).toEqual({backgroundColor:applyOpacity(_colors.COLORS["red-500"],30)});});(0,_vitest.it)("should parse text colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("text-black/80")).toEqual({color:applyOpacity(_colors.COLORS.black,80)});(0,_vitest.expect)((0,_colors.parseColor)("text-white/90")).toEqual({color:applyOpacity(_colors.COLORS.white,90)});(0,_vitest.expect)((0,_colors.parseColor)("text-gray-900/70")).toEqual({color:applyOpacity(_colors.COLORS["gray-900"],70)});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500/50")).toEqual({color:applyOpacity(_colors.COLORS["blue-500"],50)});});(0,_vitest.it)("should parse border colors with opacity modifiers",function(){(0,_vitest.expect)((0,_colors.parseColor)("border-black/25")).toEqual({borderColor:applyOpacity(_colors.COLORS.black,25)});(0,_vitest.expect)((0,_colors.parseColor)("border-red-500/60")).toEqual({borderColor:applyOpacity(_colors.COLORS["red-500"],60)});(0,_vitest.expect)((0,_colors.parseColor)("border-gray-200/40")).toEqual({borderColor:applyOpacity(_colors.COLORS["gray-200"],40)});});(0,_vitest.it)("should handle opacity modifier with arbitrary hex colors",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#ff0000]/50")).toEqual({backgroundColor:"#FF000080"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#3B82F6]/80")).toEqual({color:"#3B82F6CC"});(0,_vitest.expect)((0,_colors.parseColor)("border-[#abc]/60")).toEqual({borderColor:"#AABBCC99"});});(0,_vitest.it)("should handle opacity modifier with custom colors",function(){var customColors={"brand-primary":"#FF6B6B"};(0,_vitest.expect)((0,_colors.parseColor)("bg-brand-primary/50",customColors)).toEqual({backgroundColor:"#FF6B6B80"});(0,_vitest.expect)((0,_colors.parseColor)("text-brand-primary/75",customColors)).toEqual({color:"#FF6B6BBF"});});(0,_vitest.it)("should handle opacity 0 (fully transparent)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/0")).toEqual({backgroundColor:applyOpacity(_colors.COLORS.black,0)});(0,_vitest.expect)((0,_colors.parseColor)("text-red-500/0")).toEqual({color:applyOpacity(_colors.COLORS["red-500"],0)});});(0,_vitest.it)("should handle opacity 100 (fully opaque)",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/100")).toEqual({backgroundColor:applyOpacity(_colors.COLORS.black,100)});(0,_vitest.expect)((0,_colors.parseColor)("text-blue-500/100")).toEqual({color:applyOpacity(_colors.COLORS["blue-500"],100)});});(0,_vitest.it)("should handle transparent color with opacity modifier",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-transparent/50")).toEqual({backgroundColor:"transparent"});});(0,_vitest.it)("should convert opacity percentage to correct hex values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/0")).toEqual({backgroundColor:"#00000000"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/10")).toEqual({backgroundColor:"#0000001A"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/25")).toEqual({backgroundColor:"#00000040"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50")).toEqual({backgroundColor:"#00000080"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/75")).toEqual({backgroundColor:"#000000BF"});(0,_vitest.expect)((0,_colors.parseColor)("bg-black/100")).toEqual({backgroundColor:"#000000FF"});});(0,_vitest.it)("should return null for invalid opacity values",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/101")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/-1")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/150")).toBeNull();});(0,_vitest.it)("should return null for malformed opacity syntax",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-black/")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/abc")).toBeNull();(0,_vitest.expect)((0,_colors.parseColor)("bg-black/50/")).toBeNull();});(0,_vitest.it)("should handle opacity with 3-digit hex expansion",function(){(0,_vitest.expect)((0,_colors.parseColor)("bg-[#f00]/50")).toEqual({backgroundColor:"#FF000080"});(0,_vitest.expect)((0,_colors.parseColor)("text-[#abc]/75")).toEqual({color:"#AABBCCBF"});});(0,_vitest.it)("should work with all color families",function(){var families=["gray","red","blue","green","yellow","purple","pink","orange","indigo"];families.forEach(function(family){(0,_vitest.expect)((0,_colors.parseColor)(`bg-${family}-500/50`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`text-${family}-500/50`)).toBeTruthy();(0,_vitest.expect)((0,_colors.parseColor)(`border-${family}-500/50`)).toBeTruthy();});});});
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.Z_INDEX_SCALE=exports.INSET_SCALE=void 0;exports.parseLayout=parseLayout;function parseArbitraryInset(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 inset unit: ${value}. Only px and % are supported.`);}return null;}return null;}function parseArbitraryZIndex(value){var zMatch=value.match(/^\[(-?\d+)\]$/);if(zMatch){return parseInt(zMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid arbitrary z-index: ${value}. Only integers are supported.`);}return null;}return null;}var DISPLAY_MAP={flex:{display:"flex"},hidden:{display:"none"}};var FLEX_DIRECTION_MAP={"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"}};var FLEX_WRAP_MAP={"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"flex-nowrap":{flexWrap:"nowrap"}};var FLEX_MAP={"flex-1":{flex:1},"flex-auto":{flex:1},"flex-none":{flex:0}};var GROW_SHRINK_MAP={grow:{flexGrow:1},"grow-0":{flexGrow:0},shrink:{flexShrink:1},"shrink-0":{flexShrink:0}};var JUSTIFY_CONTENT_MAP={"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"}};var ALIGN_ITEMS_MAP={"items-start":{alignItems:"flex-start"},"items-end":{alignItems:"flex-end"},"items-center":{alignItems:"center"},"items-baseline":{alignItems:"baseline"},"items-stretch":{alignItems:"stretch"}};var ALIGN_SELF_MAP={"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"}};var ALIGN_CONTENT_MAP={"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"}};var POSITION_MAP={absolute:{position:"absolute"},relative:{position:"relative"}};var OVERFLOW_MAP={"overflow-hidden":{overflow:"hidden"},"overflow-visible":{overflow:"visible"},"overflow-scroll":{overflow:"scroll"}};var Z_INDEX_SCALE=exports.Z_INDEX_SCALE={0:0,10:10,20:20,30:30,40:40,50:50,auto:0};var INSET_SCALE=exports.INSET_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,8:32,10:40,12:48,16:64,20:80,24:96};function parseLayout(cls){var _ref,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9,_ref0,_DISPLAY_MAP$cls;if(cls.startsWith("z-")){var zKey=cls.substring(2);var arbitraryZ=parseArbitraryZIndex(zKey);if(arbitraryZ!==null){return{zIndex:arbitraryZ};}var zValue=Z_INDEX_SCALE[zKey];if(zValue!==undefined){return{zIndex:zValue};}}if(cls.startsWith("top-")){var topKey=cls.substring(4);if(topKey==="auto"){return{};}var arbitraryTop=parseArbitraryInset(topKey);if(arbitraryTop!==null){return{top:arbitraryTop};}var topValue=INSET_SCALE[topKey];if(topValue!==undefined){return{top:topValue};}}if(cls.startsWith("right-")){var rightKey=cls.substring(6);if(rightKey==="auto"){return{};}var arbitraryRight=parseArbitraryInset(rightKey);if(arbitraryRight!==null){return{right:arbitraryRight};}var rightValue=INSET_SCALE[rightKey];if(rightValue!==undefined){return{right:rightValue};}}if(cls.startsWith("bottom-")){var bottomKey=cls.substring(7);if(bottomKey==="auto"){return{};}var arbitraryBottom=parseArbitraryInset(bottomKey);if(arbitraryBottom!==null){return{bottom:arbitraryBottom};}var bottomValue=INSET_SCALE[bottomKey];if(bottomValue!==undefined){return{bottom:bottomValue};}}if(cls.startsWith("left-")){var leftKey=cls.substring(5);if(leftKey==="auto"){return{};}var arbitraryLeft=parseArbitraryInset(leftKey);if(arbitraryLeft!==null){return{left:arbitraryLeft};}var leftValue=INSET_SCALE[leftKey];if(leftValue!==undefined){return{left:leftValue};}}if(cls.startsWith("inset-x-")){var insetKey=cls.substring(8);var arbitraryInset=parseArbitraryInset(insetKey);if(arbitraryInset!==null){return{left:arbitraryInset,right:arbitraryInset};}var insetValue=INSET_SCALE[insetKey];if(insetValue!==undefined){return{left:insetValue,right:insetValue};}}if(cls.startsWith("inset-y-")){var _insetKey=cls.substring(8);var _arbitraryInset=parseArbitraryInset(_insetKey);if(_arbitraryInset!==null){return{top:_arbitraryInset,bottom:_arbitraryInset};}var _insetValue=INSET_SCALE[_insetKey];if(_insetValue!==undefined){return{top:_insetValue,bottom:_insetValue};}}if(cls.startsWith("inset-")){var _insetKey2=cls.substring(6);var _arbitraryInset2=parseArbitraryInset(_insetKey2);if(_arbitraryInset2!==null){return{top:_arbitraryInset2,right:_arbitraryInset2,bottom:_arbitraryInset2,left:_arbitraryInset2};}var _insetValue2=INSET_SCALE[_insetKey2];if(_insetValue2!==undefined){return{top:_insetValue2,right:_insetValue2,bottom:_insetValue2,left:_insetValue2};}}return(_ref=(_ref2=(_ref3=(_ref4=(_ref5=(_ref6=(_ref7=(_ref8=(_ref9=(_ref0=(_DISPLAY_MAP$cls=DISPLAY_MAP[cls])!=null?_DISPLAY_MAP$cls:FLEX_DIRECTION_MAP[cls])!=null?_ref0:FLEX_WRAP_MAP[cls])!=null?_ref9:FLEX_MAP[cls])!=null?_ref8:GROW_SHRINK_MAP[cls])!=null?_ref7:JUSTIFY_CONTENT_MAP[cls])!=null?_ref6:ALIGN_ITEMS_MAP[cls])!=null?_ref5:ALIGN_SELF_MAP[cls])!=null?_ref4:ALIGN_CONTENT_MAP[cls])!=null?_ref3:POSITION_MAP[cls])!=null?_ref2:OVERFLOW_MAP[cls])!=null?_ref:null;}
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.Z_INDEX_SCALE=exports.INSET_SCALE=void 0;exports.parseLayout=parseLayout;function parseArbitraryInset(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 inset unit: ${value}. Only px and % are supported.`);}return null;}return null;}function parseArbitraryZIndex(value){var zMatch=value.match(/^\[(-?\d+)\]$/);if(zMatch){return parseInt(zMatch[1],10);}if(value.startsWith("[")&&value.endsWith("]")){if(process.env.NODE_ENV!=="production"){console.warn(`[react-native-tailwind] Invalid arbitrary z-index: ${value}. Only integers are supported.`);}return null;}return null;}var DISPLAY_MAP={flex:{display:"flex"},hidden:{display:"none"}};var FLEX_DIRECTION_MAP={"flex-row":{flexDirection:"row"},"flex-row-reverse":{flexDirection:"row-reverse"},"flex-col":{flexDirection:"column"},"flex-col-reverse":{flexDirection:"column-reverse"}};var FLEX_WRAP_MAP={"flex-wrap":{flexWrap:"wrap"},"flex-wrap-reverse":{flexWrap:"wrap-reverse"},"flex-nowrap":{flexWrap:"nowrap"}};var FLEX_MAP={"flex-1":{flex:1},"flex-auto":{flex:1},"flex-none":{flex:0}};var GROW_SHRINK_MAP={grow:{flexGrow:1},"grow-0":{flexGrow:0},shrink:{flexShrink:1},"shrink-0":{flexShrink:0}};var JUSTIFY_CONTENT_MAP={"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"}};var ALIGN_ITEMS_MAP={"items-start":{alignItems:"flex-start"},"items-end":{alignItems:"flex-end"},"items-center":{alignItems:"center"},"items-baseline":{alignItems:"baseline"},"items-stretch":{alignItems:"stretch"}};var ALIGN_SELF_MAP={"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"}};var ALIGN_CONTENT_MAP={"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"}};var POSITION_MAP={absolute:{position:"absolute"},relative:{position:"relative"}};var OVERFLOW_MAP={"overflow-hidden":{overflow:"hidden"},"overflow-visible":{overflow:"visible"},"overflow-scroll":{overflow:"scroll"}};var OPACITY_MAP={"opacity-0":{opacity:0},"opacity-5":{opacity:0.05},"opacity-10":{opacity:0.1},"opacity-15":{opacity:0.15},"opacity-20":{opacity:0.2},"opacity-25":{opacity:0.25},"opacity-30":{opacity:0.3},"opacity-35":{opacity:0.35},"opacity-40":{opacity:0.4},"opacity-45":{opacity:0.45},"opacity-50":{opacity:0.5},"opacity-55":{opacity:0.55},"opacity-60":{opacity:0.6},"opacity-65":{opacity:0.65},"opacity-70":{opacity:0.7},"opacity-75":{opacity:0.75},"opacity-80":{opacity:0.8},"opacity-85":{opacity:0.85},"opacity-90":{opacity:0.9},"opacity-95":{opacity:0.95},"opacity-100":{opacity:1}};var Z_INDEX_SCALE=exports.Z_INDEX_SCALE={0:0,10:10,20:20,30:30,40:40,50:50,auto:0};var INSET_SCALE=exports.INSET_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,8:32,10:40,12:48,16:64,20:80,24:96};function parseLayout(cls){var _ref,_ref2,_ref3,_ref4,_ref5,_ref6,_ref7,_ref8,_ref9,_ref0,_ref1,_DISPLAY_MAP$cls;if(cls.startsWith("z-")){var zKey=cls.substring(2);var arbitraryZ=parseArbitraryZIndex(zKey);if(arbitraryZ!==null){return{zIndex:arbitraryZ};}var zValue=Z_INDEX_SCALE[zKey];if(zValue!==undefined){return{zIndex:zValue};}}if(cls.startsWith("top-")){var topKey=cls.substring(4);if(topKey==="auto"){return{};}var arbitraryTop=parseArbitraryInset(topKey);if(arbitraryTop!==null){return{top:arbitraryTop};}var topValue=INSET_SCALE[topKey];if(topValue!==undefined){return{top:topValue};}}if(cls.startsWith("right-")){var rightKey=cls.substring(6);if(rightKey==="auto"){return{};}var arbitraryRight=parseArbitraryInset(rightKey);if(arbitraryRight!==null){return{right:arbitraryRight};}var rightValue=INSET_SCALE[rightKey];if(rightValue!==undefined){return{right:rightValue};}}if(cls.startsWith("bottom-")){var bottomKey=cls.substring(7);if(bottomKey==="auto"){return{};}var arbitraryBottom=parseArbitraryInset(bottomKey);if(arbitraryBottom!==null){return{bottom:arbitraryBottom};}var bottomValue=INSET_SCALE[bottomKey];if(bottomValue!==undefined){return{bottom:bottomValue};}}if(cls.startsWith("left-")){var leftKey=cls.substring(5);if(leftKey==="auto"){return{};}var arbitraryLeft=parseArbitraryInset(leftKey);if(arbitraryLeft!==null){return{left:arbitraryLeft};}var leftValue=INSET_SCALE[leftKey];if(leftValue!==undefined){return{left:leftValue};}}if(cls.startsWith("inset-x-")){var insetKey=cls.substring(8);var arbitraryInset=parseArbitraryInset(insetKey);if(arbitraryInset!==null){return{left:arbitraryInset,right:arbitraryInset};}var insetValue=INSET_SCALE[insetKey];if(insetValue!==undefined){return{left:insetValue,right:insetValue};}}if(cls.startsWith("inset-y-")){var _insetKey=cls.substring(8);var _arbitraryInset=parseArbitraryInset(_insetKey);if(_arbitraryInset!==null){return{top:_arbitraryInset,bottom:_arbitraryInset};}var _insetValue=INSET_SCALE[_insetKey];if(_insetValue!==undefined){return{top:_insetValue,bottom:_insetValue};}}if(cls.startsWith("inset-")){var _insetKey2=cls.substring(6);var _arbitraryInset2=parseArbitraryInset(_insetKey2);if(_arbitraryInset2!==null){return{top:_arbitraryInset2,right:_arbitraryInset2,bottom:_arbitraryInset2,left:_arbitraryInset2};}var _insetValue2=INSET_SCALE[_insetKey2];if(_insetValue2!==undefined){return{top:_insetValue2,right:_insetValue2,bottom:_insetValue2,left:_insetValue2};}}return(_ref=(_ref2=(_ref3=(_ref4=(_ref5=(_ref6=(_ref7=(_ref8=(_ref9=(_ref0=(_ref1=(_DISPLAY_MAP$cls=DISPLAY_MAP[cls])!=null?_DISPLAY_MAP$cls:FLEX_DIRECTION_MAP[cls])!=null?_ref1:FLEX_WRAP_MAP[cls])!=null?_ref0:FLEX_MAP[cls])!=null?_ref9:GROW_SHRINK_MAP[cls])!=null?_ref8:JUSTIFY_CONTENT_MAP[cls])!=null?_ref7:ALIGN_ITEMS_MAP[cls])!=null?_ref6:ALIGN_SELF_MAP[cls])!=null?_ref5:ALIGN_CONTENT_MAP[cls])!=null?_ref4:POSITION_MAP[cls])!=null?_ref3:OVERFLOW_MAP[cls])!=null?_ref2:OPACITY_MAP[cls])!=null?_ref:null;}
@@ -1 +1 @@
1
- var _vitest=require("vitest");var _layout=require("./layout");(0,_vitest.describe)("parseLayout - display utilities",function(){(0,_vitest.it)("should parse display flex",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).toEqual({display:"flex"});});(0,_vitest.it)("should parse display hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("hidden")).toEqual({display:"none"});});});(0,_vitest.describe)("parseLayout - flex direction utilities",function(){(0,_vitest.it)("should parse flex row",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row")).toEqual({flexDirection:"row"});});(0,_vitest.it)("should parse flex row reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row-reverse")).toEqual({flexDirection:"row-reverse"});});(0,_vitest.it)("should parse flex column",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col")).toEqual({flexDirection:"column"});});(0,_vitest.it)("should parse flex column reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col-reverse")).toEqual({flexDirection:"column-reverse"});});});(0,_vitest.describe)("parseLayout - flex wrap utilities",function(){(0,_vitest.it)("should parse flex wrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap")).toEqual({flexWrap:"wrap"});});(0,_vitest.it)("should parse flex wrap reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap-reverse")).toEqual({flexWrap:"wrap-reverse"});});(0,_vitest.it)("should parse flex nowrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-nowrap")).toEqual({flexWrap:"nowrap"});});});(0,_vitest.describe)("parseLayout - flex utilities",function(){(0,_vitest.it)("should parse flex-1",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-none",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});});(0,_vitest.describe)("parseLayout - flex grow/shrink utilities",function(){(0,_vitest.it)("should parse grow",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow")).toEqual({flexGrow:1});});(0,_vitest.it)("should parse grow-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow-0")).toEqual({flexGrow:0});});(0,_vitest.it)("should parse shrink",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).toEqual({flexShrink:1});});(0,_vitest.it)("should parse shrink-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink-0")).toEqual({flexShrink:0});});});(0,_vitest.describe)("parseLayout - justify content utilities",function(){(0,_vitest.it)("should parse justify-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-start")).toEqual({justifyContent:"flex-start"});});(0,_vitest.it)("should parse justify-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-end")).toEqual({justifyContent:"flex-end"});});(0,_vitest.it)("should parse justify-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-center")).toEqual({justifyContent:"center"});});(0,_vitest.it)("should parse justify-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-between")).toEqual({justifyContent:"space-between"});});(0,_vitest.it)("should parse justify-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-around")).toEqual({justifyContent:"space-around"});});(0,_vitest.it)("should parse justify-evenly",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-evenly")).toEqual({justifyContent:"space-evenly"});});});(0,_vitest.describe)("parseLayout - align items utilities",function(){(0,_vitest.it)("should parse items-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-start")).toEqual({alignItems:"flex-start"});});(0,_vitest.it)("should parse items-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-end")).toEqual({alignItems:"flex-end"});});(0,_vitest.it)("should parse items-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-center")).toEqual({alignItems:"center"});});(0,_vitest.it)("should parse items-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-baseline")).toEqual({alignItems:"baseline"});});(0,_vitest.it)("should parse items-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-stretch")).toEqual({alignItems:"stretch"});});});(0,_vitest.describe)("parseLayout - align self utilities",function(){(0,_vitest.it)("should parse self-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-auto")).toEqual({alignSelf:"auto"});});(0,_vitest.it)("should parse self-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-start")).toEqual({alignSelf:"flex-start"});});(0,_vitest.it)("should parse self-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-end")).toEqual({alignSelf:"flex-end"});});(0,_vitest.it)("should parse self-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-center")).toEqual({alignSelf:"center"});});(0,_vitest.it)("should parse self-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-stretch")).toEqual({alignSelf:"stretch"});});(0,_vitest.it)("should parse self-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-baseline")).toEqual({alignSelf:"baseline"});});});(0,_vitest.describe)("parseLayout - align content utilities",function(){(0,_vitest.it)("should parse content-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-start")).toEqual({alignContent:"flex-start"});});(0,_vitest.it)("should parse content-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-end")).toEqual({alignContent:"flex-end"});});(0,_vitest.it)("should parse content-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-center")).toEqual({alignContent:"center"});});(0,_vitest.it)("should parse content-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-between")).toEqual({alignContent:"space-between"});});(0,_vitest.it)("should parse content-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-around")).toEqual({alignContent:"space-around"});});(0,_vitest.it)("should parse content-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-stretch")).toEqual({alignContent:"stretch"});});});(0,_vitest.describe)("parseLayout - position utilities",function(){(0,_vitest.it)("should parse absolute",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});});(0,_vitest.it)("should parse relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("relative")).toEqual({position:"relative"});});});(0,_vitest.describe)("parseLayout - overflow utilities",function(){(0,_vitest.it)("should parse overflow-hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-hidden")).toEqual({overflow:"hidden"});});(0,_vitest.it)("should parse overflow-visible",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-visible")).toEqual({overflow:"visible"});});(0,_vitest.it)("should parse overflow-scroll",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-scroll")).toEqual({overflow:"scroll"});});});(0,_vitest.describe)("parseLayout - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_layout.parseLayout)("invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flex-invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("items")).toBeNull();});(0,_vitest.it)("should return null for empty string",function(){(0,_vitest.expect)((0,_layout.parseLayout)("")).toBeNull();});(0,_vitest.it)("should return null for partial class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("fle")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flexbox")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify-start-center")).toBeNull();});(0,_vitest.it)("should return null for CSS classes not in React Native",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inline")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inline-block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("grid")).toBeNull();});});(0,_vitest.describe)("parseLayout - comprehensive coverage",function(){(0,_vitest.it)("should handle all flex direction variants",function(){var directions=["flex-row","flex-row-reverse","flex-col","flex-col-reverse"];directions.forEach(function(dir){(0,_vitest.expect)((0,_layout.parseLayout)(dir)).toBeTruthy();});});(0,_vitest.it)("should handle all flex wrap variants",function(){var wraps=["flex-wrap","flex-wrap-reverse","flex-nowrap"];wraps.forEach(function(wrap){(0,_vitest.expect)((0,_layout.parseLayout)(wrap)).toBeTruthy();});});(0,_vitest.it)("should handle all justify content variants",function(){var justifies=["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly"];justifies.forEach(function(justify){(0,_vitest.expect)((0,_layout.parseLayout)(justify)).toBeTruthy();});});(0,_vitest.it)("should handle all align items variants",function(){var aligns=["items-start","items-end","items-center","items-baseline","items-stretch"];aligns.forEach(function(align){(0,_vitest.expect)((0,_layout.parseLayout)(align)).toBeTruthy();});});(0,_vitest.it)("should handle all align self variants",function(){var selfs=["self-auto","self-start","self-end","self-center","self-stretch","self-baseline"];selfs.forEach(function(self){(0,_vitest.expect)((0,_layout.parseLayout)(self)).toBeTruthy();});});(0,_vitest.it)("should handle all align content variants",function(){var contents=["content-start","content-end","content-center","content-between","content-around","content-stretch"];contents.forEach(function(content){(0,_vitest.expect)((0,_layout.parseLayout)(content)).toBeTruthy();});});(0,_vitest.it)("should handle all position variants",function(){var positions=["absolute","relative"];positions.forEach(function(position){(0,_vitest.expect)((0,_layout.parseLayout)(position)).toBeTruthy();});});(0,_vitest.it)("should handle all overflow variants",function(){var overflows=["overflow-hidden","overflow-visible","overflow-scroll"];overflows.forEach(function(overflow){(0,_vitest.expect)((0,_layout.parseLayout)(overflow)).toBeTruthy();});});});(0,_vitest.describe)("parseLayout - case sensitivity",function(){(0,_vitest.it)("should be case-sensitive",function(){(0,_vitest.expect)((0,_layout.parseLayout)("FLEX")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("Flex")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("ABSOLUTE")).toBeNull();});});(0,_vitest.describe)("parseLayout - z-index utilities",function(){(0,_vitest.it)("should parse z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-0")).toEqual({zIndex:0});(0,_vitest.expect)((0,_layout.parseLayout)("z-10")).toEqual({zIndex:10});(0,_vitest.expect)((0,_layout.parseLayout)("z-20")).toEqual({zIndex:20});(0,_vitest.expect)((0,_layout.parseLayout)("z-30")).toEqual({zIndex:30});(0,_vitest.expect)((0,_layout.parseLayout)("z-40")).toEqual({zIndex:40});(0,_vitest.expect)((0,_layout.parseLayout)("z-50")).toEqual({zIndex:50});});(0,_vitest.it)("should parse z-auto as 0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-auto")).toEqual({zIndex:0});});(0,_vitest.it)("should parse arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[999]")).toEqual({zIndex:999});(0,_vitest.expect)((0,_layout.parseLayout)("z-[100]")).toEqual({zIndex:100});(0,_vitest.expect)((0,_layout.parseLayout)("z-[1]")).toEqual({zIndex:1});});(0,_vitest.it)("should parse negative arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[-1]")).toEqual({zIndex:-1});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-10]")).toEqual({zIndex:-10});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-999]")).toEqual({zIndex:-999});});(0,_vitest.it)("should return null for invalid z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-5")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-invalid")).toBeNull();});});(0,_vitest.describe)("parseLayout - positioning utilities",function(){(0,_vitest.it)("should parse top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toEqual({top:16});(0,_vitest.expect)((0,_layout.parseLayout)("top-8")).toEqual({top:32});(0,_vitest.expect)((0,_layout.parseLayout)("top-16")).toEqual({top:64});});(0,_vitest.it)("should parse right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-0")).toEqual({right:0});(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toEqual({right:16});(0,_vitest.expect)((0,_layout.parseLayout)("right-8")).toEqual({right:32});(0,_vitest.expect)((0,_layout.parseLayout)("right-16")).toEqual({right:64});});(0,_vitest.it)("should parse bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-0")).toEqual({bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toEqual({bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-8")).toEqual({bottom:32});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-16")).toEqual({bottom:64});});(0,_vitest.it)("should parse left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toEqual({left:16});(0,_vitest.expect)((0,_layout.parseLayout)("left-8")).toEqual({left:32});(0,_vitest.expect)((0,_layout.parseLayout)("left-16")).toEqual({left:64});});(0,_vitest.it)("should parse fractional positioning values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0.5")).toEqual({top:2});(0,_vitest.expect)((0,_layout.parseLayout)("right-1.5")).toEqual({right:6});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-2.5")).toEqual({bottom:10});(0,_vitest.expect)((0,_layout.parseLayout)("left-3.5")).toEqual({left:14});});(0,_vitest.it)("should parse auto positioning values as empty object",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("right-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("left-auto")).toEqual({});});(0,_vitest.it)("should parse arbitrary top values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50px]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100px]")).toEqual({top:100});(0,_vitest.expect)((0,_layout.parseLayout)("top-[0px]")).toEqual({top:0});});(0,_vitest.it)("should parse arbitrary top values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100]")).toEqual({top:100});});(0,_vitest.it)("should parse arbitrary top values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[25%]")).toEqual({top:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[50%]")).toEqual({top:"50%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[10.5%]")).toEqual({top:"10.5%"});});(0,_vitest.it)("should parse negative arbitrary top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[-10px]")).toEqual({top:-10});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-50]")).toEqual({top:-50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-25%]")).toEqual({top:"-25%"});});(0,_vitest.it)("should parse arbitrary right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-[30px]")).toEqual({right:30});(0,_vitest.expect)((0,_layout.parseLayout)("right-[20]")).toEqual({right:20});(0,_vitest.expect)((0,_layout.parseLayout)("right-[15%]")).toEqual({right:"15%"});(0,_vitest.expect)((0,_layout.parseLayout)("right-[-10px]")).toEqual({right:-10});});(0,_vitest.it)("should parse arbitrary bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[40px]")).toEqual({bottom:40});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[25]")).toEqual({bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[33.333%]")).toEqual({bottom:"33.333%"});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[-15px]")).toEqual({bottom:-15});});(0,_vitest.it)("should parse arbitrary left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-[60px]")).toEqual({left:60});(0,_vitest.expect)((0,_layout.parseLayout)("left-[45]")).toEqual({left:45});(0,_vitest.expect)((0,_layout.parseLayout)("left-[12.5%]")).toEqual({left:"12.5%"});(0,_vitest.expect)((0,_layout.parseLayout)("left-[-20px]")).toEqual({left:-20});});});(0,_vitest.describe)("parseLayout - inset utilities",function(){(0,_vitest.it)("should parse inset (all sides) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0")).toEqual({top:0,right:0,bottom:0,left:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-4")).toEqual({top:16,right:16,bottom:16,left:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-8")).toEqual({top:32,right:32,bottom:32,left:32});});(0,_vitest.it)("should parse inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-0")).toEqual({left:0,right:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-4")).toEqual({left:16,right:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-8")).toEqual({left:32,right:32});});(0,_vitest.it)("should parse inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-0")).toEqual({top:0,bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-4")).toEqual({top:16,bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-8")).toEqual({top:32,bottom:32});});(0,_vitest.it)("should parse fractional inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0.5")).toEqual({top:2,right:2,bottom:2,left:2});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-1.5")).toEqual({left:6,right:6});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-2.5")).toEqual({top:10,bottom:10});});(0,_vitest.it)("should return null for invalid inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-100")).toBeNull();});(0,_vitest.it)("should parse arbitrary inset (all sides) values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10px]")).toEqual({top:10,right:10,bottom:10,left:10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25px]")).toEqual({top:25,right:25,bottom:25,left:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[0px]")).toEqual({top:0,right:0,bottom:0,left:0});});(0,_vitest.it)("should parse arbitrary inset values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[15]")).toEqual({top:15,right:15,bottom:15,left:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[30]")).toEqual({top:30,right:30,bottom:30,left:30});});(0,_vitest.it)("should parse arbitrary inset values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10%]")).toEqual({top:"10%",right:"10%",bottom:"10%",left:"10%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25%]")).toEqual({top:"25%",right:"25%",bottom:"25%",left:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[5.5%]")).toEqual({top:"5.5%",right:"5.5%",bottom:"5.5%",left:"5.5%"});});(0,_vitest.it)("should parse arbitrary inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[20px]")).toEqual({left:20,right:20});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[15]")).toEqual({left:15,right:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[10%]")).toEqual({left:"10%",right:"10%"});});(0,_vitest.it)("should parse arbitrary inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[30px]")).toEqual({top:30,bottom:30});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[25]")).toEqual({top:25,bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[15%]")).toEqual({top:"15%",bottom:"15%"});});(0,_vitest.it)("should parse negative arbitrary inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-5px]")).toEqual({top:-5,right:-5,bottom:-5,left:-5});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[-10px]")).toEqual({left:-10,right:-10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[-15px]")).toEqual({top:-15,bottom:-15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-20%]")).toEqual({top:"-20%",right:"-20%",bottom:"-20%",left:"-20%"});});});(0,_vitest.describe)("parseLayout - specific property coverage",function(){(0,_vitest.it)("should return unique objects for each class",function(){var flex1=(0,_layout.parseLayout)("flex");var flex2=(0,_layout.parseLayout)("flex");(0,_vitest.expect)(flex1).toEqual(flex2);});(0,_vitest.it)("should handle flex value variations",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});(0,_vitest.it)("should distinguish between similar class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).not.toEqual((0,_layout.parseLayout)("flex-1"));(0,_vitest.expect)((0,_layout.parseLayout)("grow")).not.toEqual((0,_layout.parseLayout)("grow-0"));(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).not.toEqual((0,_layout.parseLayout)("shrink-0"));});(0,_vitest.it)("should handle positioning with absolute/relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});});(0,_vitest.it)("should handle all positioning directions",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toHaveProperty("top");(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toHaveProperty("right");(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toHaveProperty("bottom");(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toHaveProperty("left");});(0,_vitest.it)("should handle inset shorthand variations",function(){var insetAll=(0,_layout.parseLayout)("inset-4");(0,_vitest.expect)(insetAll).toHaveProperty("top",16);(0,_vitest.expect)(insetAll).toHaveProperty("right",16);(0,_vitest.expect)(insetAll).toHaveProperty("bottom",16);(0,_vitest.expect)(insetAll).toHaveProperty("left",16);var insetX=(0,_layout.parseLayout)("inset-x-4");(0,_vitest.expect)(insetX).toHaveProperty("left",16);(0,_vitest.expect)(insetX).toHaveProperty("right",16);(0,_vitest.expect)(insetX).not.toHaveProperty("top");(0,_vitest.expect)(insetX).not.toHaveProperty("bottom");var insetY=(0,_layout.parseLayout)("inset-y-4");(0,_vitest.expect)(insetY).toHaveProperty("top",16);(0,_vitest.expect)(insetY).toHaveProperty("bottom",16);(0,_vitest.expect)(insetY).not.toHaveProperty("left");(0,_vitest.expect)(insetY).not.toHaveProperty("right");});});
1
+ var _vitest=require("vitest");var _layout=require("./layout");(0,_vitest.describe)("parseLayout - display utilities",function(){(0,_vitest.it)("should parse display flex",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).toEqual({display:"flex"});});(0,_vitest.it)("should parse display hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("hidden")).toEqual({display:"none"});});});(0,_vitest.describe)("parseLayout - flex direction utilities",function(){(0,_vitest.it)("should parse flex row",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row")).toEqual({flexDirection:"row"});});(0,_vitest.it)("should parse flex row reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-row-reverse")).toEqual({flexDirection:"row-reverse"});});(0,_vitest.it)("should parse flex column",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col")).toEqual({flexDirection:"column"});});(0,_vitest.it)("should parse flex column reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-col-reverse")).toEqual({flexDirection:"column-reverse"});});});(0,_vitest.describe)("parseLayout - flex wrap utilities",function(){(0,_vitest.it)("should parse flex wrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap")).toEqual({flexWrap:"wrap"});});(0,_vitest.it)("should parse flex wrap reverse",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-wrap-reverse")).toEqual({flexWrap:"wrap-reverse"});});(0,_vitest.it)("should parse flex nowrap",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-nowrap")).toEqual({flexWrap:"nowrap"});});});(0,_vitest.describe)("parseLayout - flex utilities",function(){(0,_vitest.it)("should parse flex-1",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});});(0,_vitest.it)("should parse flex-none",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});});(0,_vitest.describe)("parseLayout - flex grow/shrink utilities",function(){(0,_vitest.it)("should parse grow",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow")).toEqual({flexGrow:1});});(0,_vitest.it)("should parse grow-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("grow-0")).toEqual({flexGrow:0});});(0,_vitest.it)("should parse shrink",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).toEqual({flexShrink:1});});(0,_vitest.it)("should parse shrink-0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("shrink-0")).toEqual({flexShrink:0});});});(0,_vitest.describe)("parseLayout - justify content utilities",function(){(0,_vitest.it)("should parse justify-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-start")).toEqual({justifyContent:"flex-start"});});(0,_vitest.it)("should parse justify-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-end")).toEqual({justifyContent:"flex-end"});});(0,_vitest.it)("should parse justify-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-center")).toEqual({justifyContent:"center"});});(0,_vitest.it)("should parse justify-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-between")).toEqual({justifyContent:"space-between"});});(0,_vitest.it)("should parse justify-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-around")).toEqual({justifyContent:"space-around"});});(0,_vitest.it)("should parse justify-evenly",function(){(0,_vitest.expect)((0,_layout.parseLayout)("justify-evenly")).toEqual({justifyContent:"space-evenly"});});});(0,_vitest.describe)("parseLayout - align items utilities",function(){(0,_vitest.it)("should parse items-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-start")).toEqual({alignItems:"flex-start"});});(0,_vitest.it)("should parse items-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-end")).toEqual({alignItems:"flex-end"});});(0,_vitest.it)("should parse items-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-center")).toEqual({alignItems:"center"});});(0,_vitest.it)("should parse items-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-baseline")).toEqual({alignItems:"baseline"});});(0,_vitest.it)("should parse items-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("items-stretch")).toEqual({alignItems:"stretch"});});});(0,_vitest.describe)("parseLayout - align self utilities",function(){(0,_vitest.it)("should parse self-auto",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-auto")).toEqual({alignSelf:"auto"});});(0,_vitest.it)("should parse self-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-start")).toEqual({alignSelf:"flex-start"});});(0,_vitest.it)("should parse self-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-end")).toEqual({alignSelf:"flex-end"});});(0,_vitest.it)("should parse self-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-center")).toEqual({alignSelf:"center"});});(0,_vitest.it)("should parse self-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-stretch")).toEqual({alignSelf:"stretch"});});(0,_vitest.it)("should parse self-baseline",function(){(0,_vitest.expect)((0,_layout.parseLayout)("self-baseline")).toEqual({alignSelf:"baseline"});});});(0,_vitest.describe)("parseLayout - align content utilities",function(){(0,_vitest.it)("should parse content-start",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-start")).toEqual({alignContent:"flex-start"});});(0,_vitest.it)("should parse content-end",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-end")).toEqual({alignContent:"flex-end"});});(0,_vitest.it)("should parse content-center",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-center")).toEqual({alignContent:"center"});});(0,_vitest.it)("should parse content-between",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-between")).toEqual({alignContent:"space-between"});});(0,_vitest.it)("should parse content-around",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-around")).toEqual({alignContent:"space-around"});});(0,_vitest.it)("should parse content-stretch",function(){(0,_vitest.expect)((0,_layout.parseLayout)("content-stretch")).toEqual({alignContent:"stretch"});});});(0,_vitest.describe)("parseLayout - position utilities",function(){(0,_vitest.it)("should parse absolute",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});});(0,_vitest.it)("should parse relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("relative")).toEqual({position:"relative"});});});(0,_vitest.describe)("parseLayout - overflow utilities",function(){(0,_vitest.it)("should parse overflow-hidden",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-hidden")).toEqual({overflow:"hidden"});});(0,_vitest.it)("should parse overflow-visible",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-visible")).toEqual({overflow:"visible"});});(0,_vitest.it)("should parse overflow-scroll",function(){(0,_vitest.expect)((0,_layout.parseLayout)("overflow-scroll")).toEqual({overflow:"scroll"});});});(0,_vitest.describe)("parseLayout - opacity utilities",function(){(0,_vitest.it)("should parse opacity-0 (fully transparent)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-0")).toEqual({opacity:0});});(0,_vitest.it)("should parse opacity-50 (half transparent)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-50")).toEqual({opacity:0.5});});(0,_vitest.it)("should parse opacity-100 (fully opaque)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-100")).toEqual({opacity:1});});(0,_vitest.it)("should parse all opacity values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("opacity-5")).toEqual({opacity:0.05});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-10")).toEqual({opacity:0.1});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-15")).toEqual({opacity:0.15});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-20")).toEqual({opacity:0.2});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-25")).toEqual({opacity:0.25});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-30")).toEqual({opacity:0.3});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-35")).toEqual({opacity:0.35});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-40")).toEqual({opacity:0.4});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-45")).toEqual({opacity:0.45});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-55")).toEqual({opacity:0.55});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-60")).toEqual({opacity:0.6});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-65")).toEqual({opacity:0.65});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-70")).toEqual({opacity:0.7});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-75")).toEqual({opacity:0.75});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-80")).toEqual({opacity:0.8});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-85")).toEqual({opacity:0.85});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-90")).toEqual({opacity:0.9});(0,_vitest.expect)((0,_layout.parseLayout)("opacity-95")).toEqual({opacity:0.95});});});(0,_vitest.describe)("parseLayout - edge cases",function(){(0,_vitest.it)("should return null for invalid classes",function(){(0,_vitest.expect)((0,_layout.parseLayout)("invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flex-invalid")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("items")).toBeNull();});(0,_vitest.it)("should return null for empty string",function(){(0,_vitest.expect)((0,_layout.parseLayout)("")).toBeNull();});(0,_vitest.it)("should return null for partial class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("fle")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("flexbox")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("justify-start-center")).toBeNull();});(0,_vitest.it)("should return null for CSS classes not in React Native",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inline")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inline-block")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("grid")).toBeNull();});});(0,_vitest.describe)("parseLayout - comprehensive coverage",function(){(0,_vitest.it)("should handle all flex direction variants",function(){var directions=["flex-row","flex-row-reverse","flex-col","flex-col-reverse"];directions.forEach(function(dir){(0,_vitest.expect)((0,_layout.parseLayout)(dir)).toBeTruthy();});});(0,_vitest.it)("should handle all flex wrap variants",function(){var wraps=["flex-wrap","flex-wrap-reverse","flex-nowrap"];wraps.forEach(function(wrap){(0,_vitest.expect)((0,_layout.parseLayout)(wrap)).toBeTruthy();});});(0,_vitest.it)("should handle all justify content variants",function(){var justifies=["justify-start","justify-end","justify-center","justify-between","justify-around","justify-evenly"];justifies.forEach(function(justify){(0,_vitest.expect)((0,_layout.parseLayout)(justify)).toBeTruthy();});});(0,_vitest.it)("should handle all align items variants",function(){var aligns=["items-start","items-end","items-center","items-baseline","items-stretch"];aligns.forEach(function(align){(0,_vitest.expect)((0,_layout.parseLayout)(align)).toBeTruthy();});});(0,_vitest.it)("should handle all align self variants",function(){var selfs=["self-auto","self-start","self-end","self-center","self-stretch","self-baseline"];selfs.forEach(function(self){(0,_vitest.expect)((0,_layout.parseLayout)(self)).toBeTruthy();});});(0,_vitest.it)("should handle all align content variants",function(){var contents=["content-start","content-end","content-center","content-between","content-around","content-stretch"];contents.forEach(function(content){(0,_vitest.expect)((0,_layout.parseLayout)(content)).toBeTruthy();});});(0,_vitest.it)("should handle all position variants",function(){var positions=["absolute","relative"];positions.forEach(function(position){(0,_vitest.expect)((0,_layout.parseLayout)(position)).toBeTruthy();});});(0,_vitest.it)("should handle all overflow variants",function(){var overflows=["overflow-hidden","overflow-visible","overflow-scroll"];overflows.forEach(function(overflow){(0,_vitest.expect)((0,_layout.parseLayout)(overflow)).toBeTruthy();});});});(0,_vitest.describe)("parseLayout - case sensitivity",function(){(0,_vitest.it)("should be case-sensitive",function(){(0,_vitest.expect)((0,_layout.parseLayout)("FLEX")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("Flex")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("ABSOLUTE")).toBeNull();});});(0,_vitest.describe)("parseLayout - z-index utilities",function(){(0,_vitest.it)("should parse z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-0")).toEqual({zIndex:0});(0,_vitest.expect)((0,_layout.parseLayout)("z-10")).toEqual({zIndex:10});(0,_vitest.expect)((0,_layout.parseLayout)("z-20")).toEqual({zIndex:20});(0,_vitest.expect)((0,_layout.parseLayout)("z-30")).toEqual({zIndex:30});(0,_vitest.expect)((0,_layout.parseLayout)("z-40")).toEqual({zIndex:40});(0,_vitest.expect)((0,_layout.parseLayout)("z-50")).toEqual({zIndex:50});});(0,_vitest.it)("should parse z-auto as 0",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-auto")).toEqual({zIndex:0});});(0,_vitest.it)("should parse arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[999]")).toEqual({zIndex:999});(0,_vitest.expect)((0,_layout.parseLayout)("z-[100]")).toEqual({zIndex:100});(0,_vitest.expect)((0,_layout.parseLayout)("z-[1]")).toEqual({zIndex:1});});(0,_vitest.it)("should parse negative arbitrary z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-[-1]")).toEqual({zIndex:-1});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-10]")).toEqual({zIndex:-10});(0,_vitest.expect)((0,_layout.parseLayout)("z-[-999]")).toEqual({zIndex:-999});});(0,_vitest.it)("should return null for invalid z-index values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("z-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-5")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("z-invalid")).toBeNull();});});(0,_vitest.describe)("parseLayout - positioning utilities",function(){(0,_vitest.it)("should parse top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toEqual({top:16});(0,_vitest.expect)((0,_layout.parseLayout)("top-8")).toEqual({top:32});(0,_vitest.expect)((0,_layout.parseLayout)("top-16")).toEqual({top:64});});(0,_vitest.it)("should parse right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-0")).toEqual({right:0});(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toEqual({right:16});(0,_vitest.expect)((0,_layout.parseLayout)("right-8")).toEqual({right:32});(0,_vitest.expect)((0,_layout.parseLayout)("right-16")).toEqual({right:64});});(0,_vitest.it)("should parse bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-0")).toEqual({bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toEqual({bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-8")).toEqual({bottom:32});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-16")).toEqual({bottom:64});});(0,_vitest.it)("should parse left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toEqual({left:16});(0,_vitest.expect)((0,_layout.parseLayout)("left-8")).toEqual({left:32});(0,_vitest.expect)((0,_layout.parseLayout)("left-16")).toEqual({left:64});});(0,_vitest.it)("should parse fractional positioning values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-0.5")).toEqual({top:2});(0,_vitest.expect)((0,_layout.parseLayout)("right-1.5")).toEqual({right:6});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-2.5")).toEqual({bottom:10});(0,_vitest.expect)((0,_layout.parseLayout)("left-3.5")).toEqual({left:14});});(0,_vitest.it)("should parse auto positioning values as empty object",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("right-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-auto")).toEqual({});(0,_vitest.expect)((0,_layout.parseLayout)("left-auto")).toEqual({});});(0,_vitest.it)("should parse arbitrary top values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50px]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100px]")).toEqual({top:100});(0,_vitest.expect)((0,_layout.parseLayout)("top-[0px]")).toEqual({top:0});});(0,_vitest.it)("should parse arbitrary top values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[50]")).toEqual({top:50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[100]")).toEqual({top:100});});(0,_vitest.it)("should parse arbitrary top values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[25%]")).toEqual({top:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[50%]")).toEqual({top:"50%"});(0,_vitest.expect)((0,_layout.parseLayout)("top-[10.5%]")).toEqual({top:"10.5%"});});(0,_vitest.it)("should parse negative arbitrary top values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-[-10px]")).toEqual({top:-10});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-50]")).toEqual({top:-50});(0,_vitest.expect)((0,_layout.parseLayout)("top-[-25%]")).toEqual({top:"-25%"});});(0,_vitest.it)("should parse arbitrary right values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("right-[30px]")).toEqual({right:30});(0,_vitest.expect)((0,_layout.parseLayout)("right-[20]")).toEqual({right:20});(0,_vitest.expect)((0,_layout.parseLayout)("right-[15%]")).toEqual({right:"15%"});(0,_vitest.expect)((0,_layout.parseLayout)("right-[-10px]")).toEqual({right:-10});});(0,_vitest.it)("should parse arbitrary bottom values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[40px]")).toEqual({bottom:40});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[25]")).toEqual({bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[33.333%]")).toEqual({bottom:"33.333%"});(0,_vitest.expect)((0,_layout.parseLayout)("bottom-[-15px]")).toEqual({bottom:-15});});(0,_vitest.it)("should parse arbitrary left values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("left-[60px]")).toEqual({left:60});(0,_vitest.expect)((0,_layout.parseLayout)("left-[45]")).toEqual({left:45});(0,_vitest.expect)((0,_layout.parseLayout)("left-[12.5%]")).toEqual({left:"12.5%"});(0,_vitest.expect)((0,_layout.parseLayout)("left-[-20px]")).toEqual({left:-20});});});(0,_vitest.describe)("parseLayout - inset utilities",function(){(0,_vitest.it)("should parse inset (all sides) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0")).toEqual({top:0,right:0,bottom:0,left:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-4")).toEqual({top:16,right:16,bottom:16,left:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-8")).toEqual({top:32,right:32,bottom:32,left:32});});(0,_vitest.it)("should parse inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-0")).toEqual({left:0,right:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-4")).toEqual({left:16,right:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-8")).toEqual({left:32,right:32});});(0,_vitest.it)("should parse inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-0")).toEqual({top:0,bottom:0});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-4")).toEqual({top:16,bottom:16});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-8")).toEqual({top:32,bottom:32});});(0,_vitest.it)("should parse fractional inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-0.5")).toEqual({top:2,right:2,bottom:2,left:2});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-1.5")).toEqual({left:6,right:6});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-2.5")).toEqual({top:10,bottom:10});});(0,_vitest.it)("should return null for invalid inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-100")).toBeNull();(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-100")).toBeNull();});(0,_vitest.it)("should parse arbitrary inset (all sides) values with pixels",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10px]")).toEqual({top:10,right:10,bottom:10,left:10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25px]")).toEqual({top:25,right:25,bottom:25,left:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[0px]")).toEqual({top:0,right:0,bottom:0,left:0});});(0,_vitest.it)("should parse arbitrary inset values without unit (defaults to px)",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[15]")).toEqual({top:15,right:15,bottom:15,left:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[30]")).toEqual({top:30,right:30,bottom:30,left:30});});(0,_vitest.it)("should parse arbitrary inset values with percentages",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[10%]")).toEqual({top:"10%",right:"10%",bottom:"10%",left:"10%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[25%]")).toEqual({top:"25%",right:"25%",bottom:"25%",left:"25%"});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[5.5%]")).toEqual({top:"5.5%",right:"5.5%",bottom:"5.5%",left:"5.5%"});});(0,_vitest.it)("should parse arbitrary inset-x (horizontal) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[20px]")).toEqual({left:20,right:20});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[15]")).toEqual({left:15,right:15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[10%]")).toEqual({left:"10%",right:"10%"});});(0,_vitest.it)("should parse arbitrary inset-y (vertical) values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[30px]")).toEqual({top:30,bottom:30});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[25]")).toEqual({top:25,bottom:25});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[15%]")).toEqual({top:"15%",bottom:"15%"});});(0,_vitest.it)("should parse negative arbitrary inset values",function(){(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-5px]")).toEqual({top:-5,right:-5,bottom:-5,left:-5});(0,_vitest.expect)((0,_layout.parseLayout)("inset-x-[-10px]")).toEqual({left:-10,right:-10});(0,_vitest.expect)((0,_layout.parseLayout)("inset-y-[-15px]")).toEqual({top:-15,bottom:-15});(0,_vitest.expect)((0,_layout.parseLayout)("inset-[-20%]")).toEqual({top:"-20%",right:"-20%",bottom:"-20%",left:"-20%"});});});(0,_vitest.describe)("parseLayout - specific property coverage",function(){(0,_vitest.it)("should return unique objects for each class",function(){var flex1=(0,_layout.parseLayout)("flex");var flex2=(0,_layout.parseLayout)("flex");(0,_vitest.expect)(flex1).toEqual(flex2);});(0,_vitest.it)("should handle flex value variations",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex-1")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-auto")).toEqual({flex:1});(0,_vitest.expect)((0,_layout.parseLayout)("flex-none")).toEqual({flex:0});});(0,_vitest.it)("should distinguish between similar class names",function(){(0,_vitest.expect)((0,_layout.parseLayout)("flex")).not.toEqual((0,_layout.parseLayout)("flex-1"));(0,_vitest.expect)((0,_layout.parseLayout)("grow")).not.toEqual((0,_layout.parseLayout)("grow-0"));(0,_vitest.expect)((0,_layout.parseLayout)("shrink")).not.toEqual((0,_layout.parseLayout)("shrink-0"));});(0,_vitest.it)("should handle positioning with absolute/relative",function(){(0,_vitest.expect)((0,_layout.parseLayout)("absolute")).toEqual({position:"absolute"});(0,_vitest.expect)((0,_layout.parseLayout)("top-0")).toEqual({top:0});(0,_vitest.expect)((0,_layout.parseLayout)("left-0")).toEqual({left:0});});(0,_vitest.it)("should handle all positioning directions",function(){(0,_vitest.expect)((0,_layout.parseLayout)("top-4")).toHaveProperty("top");(0,_vitest.expect)((0,_layout.parseLayout)("right-4")).toHaveProperty("right");(0,_vitest.expect)((0,_layout.parseLayout)("bottom-4")).toHaveProperty("bottom");(0,_vitest.expect)((0,_layout.parseLayout)("left-4")).toHaveProperty("left");});(0,_vitest.it)("should handle inset shorthand variations",function(){var insetAll=(0,_layout.parseLayout)("inset-4");(0,_vitest.expect)(insetAll).toHaveProperty("top",16);(0,_vitest.expect)(insetAll).toHaveProperty("right",16);(0,_vitest.expect)(insetAll).toHaveProperty("bottom",16);(0,_vitest.expect)(insetAll).toHaveProperty("left",16);var insetX=(0,_layout.parseLayout)("inset-x-4");(0,_vitest.expect)(insetX).toHaveProperty("left",16);(0,_vitest.expect)(insetX).toHaveProperty("right",16);(0,_vitest.expect)(insetX).not.toHaveProperty("top");(0,_vitest.expect)(insetX).not.toHaveProperty("bottom");var insetY=(0,_layout.parseLayout)("inset-y-4");(0,_vitest.expect)(insetY).toHaveProperty("top",16);(0,_vitest.expect)(insetY).toHaveProperty("bottom",16);(0,_vitest.expect)(insetY).not.toHaveProperty("left");(0,_vitest.expect)(insetY).not.toHaveProperty("right");});});