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