@stacksjs/stx 0.2.412 → 0.2.414

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.
Files changed (350) hide show
  1. package/dist/appearance-bootstrap.js +1 -1
  2. package/dist/binding-manifest.d.ts +1 -1
  3. package/dist/builtins/image-delivery.d.ts +38 -0
  4. package/dist/builtins/image-delivery.js +17 -0
  5. package/dist/builtins/stx-image.js +1 -5
  6. package/dist/bundle-analyzer.js +20 -20
  7. package/dist/chunk-020xyn9q.js +3 -0
  8. package/dist/chunk-04jhmfbz.js +2 -0
  9. package/dist/chunk-10957mcb.js +2 -0
  10. package/dist/chunk-1098mas0.js +2 -0
  11. package/dist/chunk-169n1vpx.js +12 -0
  12. package/dist/chunk-1b6t12hd.js +2 -0
  13. package/dist/chunk-1chw8xsw.js +2 -0
  14. package/dist/chunk-1xdzcy9d.js +14 -0
  15. package/dist/chunk-2ce7f416.js +2 -0
  16. package/dist/chunk-2gr351s0.js +7 -0
  17. package/dist/chunk-2mkcjw08.js +2 -0
  18. package/dist/chunk-2v8wztd5.js +2 -0
  19. package/dist/chunk-340a824p.js +2 -0
  20. package/dist/chunk-39g1134q.js +2 -0
  21. package/dist/chunk-3c74vag1.js +2 -0
  22. package/dist/chunk-3kthfs03.js +3 -0
  23. package/dist/chunk-3qn1wcdg.js +2 -0
  24. package/dist/chunk-3s2vnqcf.js +2 -0
  25. package/dist/chunk-48bwk47q.js +2 -0
  26. package/dist/chunk-4bjravgk.js +2 -0
  27. package/dist/chunk-4jjme6a5.js +2 -0
  28. package/dist/chunk-5g3y8kym.js +2 -0
  29. package/dist/chunk-5gsxpaqk.js +2 -0
  30. package/dist/{chunk-bwsxym3d.js → chunk-5qns2sdz.js} +17 -17
  31. package/dist/chunk-69mc2np8.js +2785 -0
  32. package/dist/chunk-6cfa3g0r.js +2 -0
  33. package/dist/{chunk-bjar18jd.js → chunk-6h38kkjf.js} +46 -52
  34. package/dist/chunk-6hc5vz20.js +3 -0
  35. package/dist/chunk-6q6g76vg.js +499 -0
  36. package/dist/{chunk-dbc5awz9.js → chunk-6sgswrqw.js} +29 -29
  37. package/dist/chunk-6y8hnymb.js +2 -0
  38. package/dist/chunk-74j18qk0.js +930 -0
  39. package/dist/chunk-752hw7cd.js +4 -0
  40. package/dist/{chunk-t5ja7qkn.js → chunk-765e1s44.js} +11 -76
  41. package/dist/chunk-7gkv67ky.js +4 -0
  42. package/dist/chunk-7z2ra0yf.js +2 -0
  43. package/dist/chunk-866n724v.js +2 -0
  44. package/dist/chunk-8nhshfz6.js +5 -0
  45. package/dist/chunk-92ps1xpk.js +2 -0
  46. package/dist/chunk-9g27ybyr.js +3 -0
  47. package/dist/{chunk-xq1acw1r.js → chunk-9pt8fd2n.js} +13 -13
  48. package/dist/{chunk-qvnbnsv9.js → chunk-9vrja6vp.js} +4 -4
  49. package/dist/chunk-9xrbve19.js +2 -0
  50. package/dist/chunk-a688m6js.js +3 -0
  51. package/dist/chunk-afhxw2t8.js +2 -0
  52. package/dist/chunk-ak1cgcah.js +5 -0
  53. package/dist/{chunk-4m7ajama.js → chunk-amd6ey3t.js} +14 -14
  54. package/dist/chunk-apg16xcn.js +2 -0
  55. package/dist/chunk-b52s5z0c.js +2 -0
  56. package/dist/chunk-b84h16er.js +61 -0
  57. package/dist/{chunk-hx998w7n.js → chunk-bay9s6rs.js} +13 -13
  58. package/dist/chunk-bmt7w2pk.js +2 -0
  59. package/dist/chunk-btmhj5t7.js +2 -0
  60. package/dist/chunk-ce1sejr3.js +3 -0
  61. package/dist/chunk-cg8hg6cs.js +3 -0
  62. package/dist/{chunk-8wp64mym.js → chunk-czxt605c.js} +4 -5
  63. package/dist/chunk-d44b9ktb.js +4 -0
  64. package/dist/chunk-daz5aqcf.js +24 -0
  65. package/dist/chunk-dgdm3hy3.js +2 -0
  66. package/dist/chunk-dvgv8nry.js +11 -0
  67. package/dist/chunk-dx7n22ed.js +2 -0
  68. package/dist/chunk-e57rhf65.js +3 -0
  69. package/dist/chunk-eed4fwps.js +3 -0
  70. package/dist/chunk-ej9j6k1q.js +3 -0
  71. package/dist/chunk-et0rr8c7.js +3 -0
  72. package/dist/chunk-f46qsp4m.js +4 -0
  73. package/dist/chunk-f6az0xj5.js +2 -0
  74. package/dist/{chunk-bjcsc6wx.js → chunk-fh1qrp68.js} +21 -21
  75. package/dist/chunk-fjs0a8h7.js +2 -0
  76. package/dist/chunk-fr2txj8q.js +829 -0
  77. package/dist/{chunk-vx86cf4r.js → chunk-ft4p6d28.js} +14 -14
  78. package/dist/chunk-fyzajkrx.js +2 -0
  79. package/dist/chunk-fzapbw9p.js +3 -0
  80. package/dist/chunk-g578mcb0.js +194 -0
  81. package/dist/chunk-gawrg4gb.js +216 -0
  82. package/dist/chunk-gw07qmjk.js +2 -0
  83. package/dist/chunk-h0atqq82.js +32 -0
  84. package/dist/chunk-h6zsqb9r.js +3 -0
  85. package/dist/{chunk-hdysywd8.js → chunk-h85hrwkq.js} +13 -13
  86. package/dist/chunk-hbxz85wy.js +2 -0
  87. package/dist/chunk-hjg3ndgh.js +2 -0
  88. package/dist/chunk-hkxsewzk.js +2 -0
  89. package/dist/chunk-hrbbbtbn.js +2 -0
  90. package/dist/chunk-j03revz2.js +8 -0
  91. package/dist/chunk-j9qcrwbg.js +2 -0
  92. package/dist/chunk-jk4njz0w.js +2 -0
  93. package/dist/chunk-jmabeqfq.js +2 -0
  94. package/dist/chunk-jt0n43mk.js +2 -0
  95. package/dist/chunk-kjbv8a3m.js +2 -0
  96. package/dist/chunk-m1vdghnx.js +2 -0
  97. package/dist/chunk-m4sk62wb.js +5 -0
  98. package/dist/chunk-md8rqn48.js +30 -0
  99. package/dist/chunk-mepdnezf.js +17 -0
  100. package/dist/chunk-mhq0pjws.js +2 -0
  101. package/dist/chunk-mp6hy8g4.js +2 -0
  102. package/dist/chunk-ngc2wke4.js +3 -0
  103. package/dist/chunk-nn2vstke.js +2 -0
  104. package/dist/chunk-p2v2a68k.js +2 -0
  105. package/dist/{chunk-qn5srnj3.js → chunk-pbh4smw3.js} +16 -16
  106. package/dist/chunk-pdt69hpb.js +2 -0
  107. package/dist/chunk-pgzvyrv6.js +29 -0
  108. package/dist/chunk-pj1wg7jg.js +2 -0
  109. package/dist/chunk-pqxzp1bb.js +3 -0
  110. package/dist/chunk-px7fvbj6.js +3 -0
  111. package/dist/chunk-q4c06e8x.js +20 -0
  112. package/dist/chunk-q6vrb2pe.js +2 -0
  113. package/dist/chunk-q7qchkvk.js +2 -0
  114. package/dist/chunk-q9bdh4s5.js +8 -0
  115. package/dist/chunk-qet5gc6s.js +2033 -0
  116. package/dist/chunk-qz519eyp.js +2 -0
  117. package/dist/chunk-r3f9jcf7.js +5 -0
  118. package/dist/chunk-rs4v4fha.js +4 -0
  119. package/dist/chunk-s2x4wcrz.js +2 -0
  120. package/dist/chunk-s5xezjps.js +3 -0
  121. package/dist/chunk-scezfp0w.js +30 -0
  122. package/dist/chunk-sd321bn3.js +2 -0
  123. package/dist/{chunk-eenk6s3t.js → chunk-sd47dzs0.js} +79 -79
  124. package/dist/chunk-se7mwqd1.js +2 -0
  125. package/dist/chunk-shr559s7.js +3 -0
  126. package/dist/chunk-syaw6b75.js +2 -0
  127. package/dist/chunk-t4hzprsm.js +3 -0
  128. package/dist/{chunk-s9za1vvd.js → chunk-t61vdbje.js} +89 -89
  129. package/dist/chunk-tfexmdkt.js +3 -0
  130. package/dist/chunk-thyt8ed8.js +6 -0
  131. package/dist/chunk-v091jft4.js +12 -0
  132. package/dist/chunk-v4vaqxrf.js +33 -0
  133. package/dist/chunk-vgvtnwxa.js +4 -0
  134. package/dist/chunk-x0q32ees.js +3 -0
  135. package/dist/chunk-x5bpeb4a.js +2 -0
  136. package/dist/chunk-x72tv2cg.js +3 -0
  137. package/dist/chunk-xfp7k0v8.js +64 -0
  138. package/dist/chunk-xtdw3692.js +6 -0
  139. package/dist/chunk-y1cmjvk3.js +43 -0
  140. package/dist/chunk-y5310237.js +311 -0
  141. package/dist/chunk-ya0qecph.js +27 -0
  142. package/dist/chunk-yazk54jr.js +8 -0
  143. package/dist/chunk-ydjfar14.js +2 -0
  144. package/dist/chunk-ym95v4nc.js +3 -0
  145. package/dist/chunk-ynvdvbat.js +18 -0
  146. package/dist/chunk-yvx1ap9b.js +3 -0
  147. package/dist/chunk-z0g9jvv0.js +40 -0
  148. package/dist/chunk-z6d0jmjb.js +2 -0
  149. package/dist/{chunk-fpwzacpm.js → chunk-zhxdpzga.js} +4 -4
  150. package/dist/cli.js +110 -110
  151. package/dist/craft-entry.js +7 -7
  152. package/dist/craft.js +7 -7
  153. package/dist/database.js +2 -2
  154. package/dist/image-optimization/component.js +4 -4
  155. package/dist/index.d.ts +2 -0
  156. package/dist/index.js +1 -0
  157. package/dist/media/image/component.js +5 -5
  158. package/dist/media/protected/component.js +2 -2
  159. package/dist/media/video/index.js +4 -4
  160. package/dist/native/bridge/protocol.d.ts +325 -0
  161. package/dist/native/bridge/protocol.js +219 -0
  162. package/dist/native/cli.d.ts +24 -0
  163. package/dist/native/cli.js +52 -0
  164. package/dist/native/compiler/bundle.d.ts +41 -0
  165. package/dist/native/compiler/bundle.js +90 -0
  166. package/dist/native/compiler/client-script.d.ts +8 -0
  167. package/dist/native/compiler/client-script.js +31 -0
  168. package/dist/native/compiler/codegen.d.ts +10 -0
  169. package/dist/native/compiler/codegen.js +145 -0
  170. package/dist/native/compiler/headwind-to-style.d.ts +395 -0
  171. package/dist/native/compiler/headwind-to-style.js +1163 -0
  172. package/dist/native/compiler/html-to-ir.d.ts +41 -0
  173. package/dist/native/compiler/html-to-ir.js +411 -0
  174. package/dist/native/compiler/icons.d.ts +220 -0
  175. package/dist/native/compiler/icons.js +208 -0
  176. package/dist/native/compiler/ir.d.ts +234 -0
  177. package/dist/native/compiler/ir.js +15 -0
  178. package/dist/native/compiler/parser.d.ts +88 -0
  179. package/dist/native/compiler/parser.js +753 -0
  180. package/dist/native/compiler/render-screen.d.ts +26 -0
  181. package/dist/native/compiler/render-screen.js +31 -0
  182. package/dist/native/components/primitives.d.ts +291 -0
  183. package/dist/native/components/primitives.js +22 -0
  184. package/dist/native/hot-reload/client.d.ts +62 -0
  185. package/dist/native/hot-reload/client.js +324 -0
  186. package/dist/native/index.d.ts +90 -0
  187. package/dist/native/index.js +34 -0
  188. package/dist/native/primitives/ActivityIndicator.stx +5 -0
  189. package/dist/native/primitives/Button.stx +5 -0
  190. package/dist/native/primitives/DatePicker.stx +5 -0
  191. package/dist/native/primitives/FlatList.stx +5 -0
  192. package/dist/native/primitives/Image.stx +5 -0
  193. package/dist/native/primitives/ImageBackground.stx +5 -0
  194. package/dist/native/primitives/KeyboardAvoidingView.stx +5 -0
  195. package/dist/native/primitives/Modal.stx +5 -0
  196. package/dist/native/primitives/Picker.stx +5 -0
  197. package/dist/native/primitives/Pressable.stx +5 -0
  198. package/dist/native/primitives/RefreshControl.stx +5 -0
  199. package/dist/native/primitives/SafeAreaView.stx +5 -0
  200. package/dist/native/primitives/ScrollView.stx +5 -0
  201. package/dist/native/primitives/SectionList.stx +5 -0
  202. package/dist/native/primitives/Slider.stx +5 -0
  203. package/dist/native/primitives/StatusBar.stx +5 -0
  204. package/dist/native/primitives/Switch.stx +5 -0
  205. package/dist/native/primitives/Text.stx +5 -0
  206. package/dist/native/primitives/TextInput.stx +5 -0
  207. package/dist/native/primitives/TouchableHighlight.stx +5 -0
  208. package/dist/native/primitives/TouchableOpacity.stx +5 -0
  209. package/dist/native/primitives/View.stx +5 -0
  210. package/dist/native/runtime/craft.d.ts +75 -0
  211. package/dist/native/runtime/craft.js +0 -0
  212. package/dist/native/runtime/entry.d.ts +1 -0
  213. package/dist/native/runtime/entry.js +3 -0
  214. package/dist/native/runtime/index.d.ts +45 -0
  215. package/dist/native/runtime/index.js +165 -0
  216. package/dist/native/runtime/native-host.d.ts +33 -0
  217. package/dist/native/runtime/native-host.js +184 -0
  218. package/dist/native/runtime/screen.d.ts +43 -0
  219. package/dist/native/runtime/screen.js +808 -0
  220. package/dist/pwa/service-worker.js +1 -1
  221. package/dist/pwa/workbox.js +1 -1
  222. package/dist/pwa.js +8 -8
  223. package/dist/site-url.d.ts +1 -1
  224. package/dist/ssg.js +53 -53
  225. package/dist/visual-testing.js +42 -42
  226. package/dist/web-components/reactive-generator.js +2 -2
  227. package/package.json +9 -5
  228. package/dist/chunk-00g9x6w2.js +0 -2
  229. package/dist/chunk-04tgatyy.js +0 -2
  230. package/dist/chunk-097jnwd5.js +0 -2
  231. package/dist/chunk-0btmm4m2.js +0 -147
  232. package/dist/chunk-0c2h69k2.js +0 -4
  233. package/dist/chunk-0pkk226n.js +0 -2
  234. package/dist/chunk-0we9nw1d.js +0 -3
  235. package/dist/chunk-0y46fbkx.js +0 -3
  236. package/dist/chunk-18n1ftn0.js +0 -33
  237. package/dist/chunk-1a0v39k5.js +0 -3
  238. package/dist/chunk-1fs9jvpb.js +0 -2
  239. package/dist/chunk-1qq26zt0.js +0 -2
  240. package/dist/chunk-1te8k8gp.js +0 -3
  241. package/dist/chunk-1ws3xcea.js +0 -1199
  242. package/dist/chunk-213jwgpx.js +0 -3
  243. package/dist/chunk-24w86pek.js +0 -32
  244. package/dist/chunk-27fgag95.js +0 -4
  245. package/dist/chunk-2fw05hs2.js +0 -3
  246. package/dist/chunk-2tbez006.js +0 -2
  247. package/dist/chunk-38wvkv3s.js +0 -2
  248. package/dist/chunk-3rkejwjp.js +0 -2
  249. package/dist/chunk-3t65wb35.js +0 -2
  250. package/dist/chunk-3w6z6tw9.js +0 -2
  251. package/dist/chunk-4q1c6fw2.js +0 -7
  252. package/dist/chunk-50pszj17.js +0 -2
  253. package/dist/chunk-563shnkz.js +0 -3
  254. package/dist/chunk-5h104qh1.js +0 -2
  255. package/dist/chunk-5qjk7drw.js +0 -20
  256. package/dist/chunk-603x5gb2.js +0 -2
  257. package/dist/chunk-6kd5jjwc.js +0 -2
  258. package/dist/chunk-6kdrncsx.js +0 -30
  259. package/dist/chunk-6zggmce7.js +0 -4422
  260. package/dist/chunk-72rwcbp6.js +0 -3
  261. package/dist/chunk-76w34xne.js +0 -3
  262. package/dist/chunk-7dmgt8at.js +0 -2
  263. package/dist/chunk-82pd4b5w.js +0 -2
  264. package/dist/chunk-8d7nf67s.js +0 -2
  265. package/dist/chunk-8w2mqdnv.js +0 -2
  266. package/dist/chunk-90b2vt2n.js +0 -2
  267. package/dist/chunk-9e8t0twa.js +0 -3
  268. package/dist/chunk-9fqp72ze.js +0 -5
  269. package/dist/chunk-9xew0kgf.js +0 -2
  270. package/dist/chunk-a7bnvz91.js +0 -24
  271. package/dist/chunk-akwd34xt.js +0 -29
  272. package/dist/chunk-anydpa34.js +0 -3
  273. package/dist/chunk-aq1xq0r4.js +0 -16
  274. package/dist/chunk-bbt3tp6f.js +0 -499
  275. package/dist/chunk-bn1edb1y.js +0 -47
  276. package/dist/chunk-btd7ds3x.js +0 -2
  277. package/dist/chunk-c4511wng.js +0 -2
  278. package/dist/chunk-c4h579e3.js +0 -2
  279. package/dist/chunk-cj3adc77.js +0 -5
  280. package/dist/chunk-cs54ek9m.js +0 -6
  281. package/dist/chunk-ct1jwd4r.js +0 -2
  282. package/dist/chunk-cxrgxzxc.js +0 -2
  283. package/dist/chunk-de8t7sc9.js +0 -17
  284. package/dist/chunk-fcnrgxck.js +0 -2
  285. package/dist/chunk-fqzcft9d.js +0 -2
  286. package/dist/chunk-gbmeh7jg.js +0 -3
  287. package/dist/chunk-gc06g35w.js +0 -2
  288. package/dist/chunk-gs18069g.js +0 -194
  289. package/dist/chunk-gvbf1mhs.js +0 -930
  290. package/dist/chunk-h564hgzt.js +0 -2
  291. package/dist/chunk-h83jrhfq.js +0 -3
  292. package/dist/chunk-hj4vpyhp.js +0 -2
  293. package/dist/chunk-hrkvsj5c.js +0 -11
  294. package/dist/chunk-hyr4ag1k.js +0 -2
  295. package/dist/chunk-jxvmf02k.js +0 -2
  296. package/dist/chunk-k5ptvy0b.js +0 -4
  297. package/dist/chunk-k80sn8d1.js +0 -2
  298. package/dist/chunk-k8t2cmyd.js +0 -2
  299. package/dist/chunk-kmsyvaex.js +0 -8
  300. package/dist/chunk-kq4b6cwj.js +0 -2
  301. package/dist/chunk-kvmx7dnb.js +0 -2
  302. package/dist/chunk-kxc2h5vn.js +0 -5
  303. package/dist/chunk-mbxehgrq.js +0 -2
  304. package/dist/chunk-mgnq5de2.js +0 -2
  305. package/dist/chunk-mgrckqww.js +0 -2
  306. package/dist/chunk-mq5ewmz6.js +0 -2
  307. package/dist/chunk-mrahwn5v.js +0 -8
  308. package/dist/chunk-n2swas11.js +0 -3
  309. package/dist/chunk-n4299xgy.js +0 -2
  310. package/dist/chunk-naw4jt7j.js +0 -2
  311. package/dist/chunk-ny67c03k.js +0 -3
  312. package/dist/chunk-p4jb9v0w.js +0 -2
  313. package/dist/chunk-p4zrvt5f.js +0 -14
  314. package/dist/chunk-p5wp0ce6.js +0 -43
  315. package/dist/chunk-pcxp4r9n.js +0 -3
  316. package/dist/chunk-pjrn29gg.js +0 -2
  317. package/dist/chunk-prxwsp7n.js +0 -2
  318. package/dist/chunk-py2r6wtv.js +0 -2
  319. package/dist/chunk-q738pwv6.js +0 -2
  320. package/dist/chunk-q9n5swx7.js +0 -3
  321. package/dist/chunk-qmmp5kb5.js +0 -2
  322. package/dist/chunk-qqpqgwvb.js +0 -30
  323. package/dist/chunk-rcv2ehpq.js +0 -18
  324. package/dist/chunk-rq414kn5.js +0 -3
  325. package/dist/chunk-rz9f3zqz.js +0 -7
  326. package/dist/chunk-s6g8wksg.js +0 -2
  327. package/dist/chunk-s8jd13nb.js +0 -3
  328. package/dist/chunk-spxsw4mp.js +0 -2
  329. package/dist/chunk-strcy64y.js +0 -2
  330. package/dist/chunk-t1htzg9e.js +0 -4
  331. package/dist/chunk-t1tdjjht.js +0 -216
  332. package/dist/chunk-tat1cjec.js +0 -2
  333. package/dist/chunk-td08rnk3.js +0 -3
  334. package/dist/chunk-tgadbsd4.js +0 -2
  335. package/dist/chunk-tgrpp58r.js +0 -2
  336. package/dist/chunk-tkyrk66a.js +0 -3
  337. package/dist/chunk-tp8pzf94.js +0 -3
  338. package/dist/chunk-twz64kvy.js +0 -2
  339. package/dist/chunk-v3nwkveg.js +0 -12
  340. package/dist/chunk-vsbmc9kt.js +0 -2
  341. package/dist/chunk-vzgzaw66.js +0 -12
  342. package/dist/chunk-wc66mcn4.js +0 -4367
  343. package/dist/chunk-wkanrfb3.js +0 -2
  344. package/dist/chunk-x8f6wqxd.js +0 -2
  345. package/dist/chunk-xsng1mtq.js +0 -3
  346. package/dist/chunk-xwts5yky.js +0 -4
  347. package/dist/chunk-z5rwnnk1.js +0 -3
  348. package/dist/chunk-zcz9rs6p.js +0 -3
  349. package/dist/chunk-zpcnbdhn.js +0 -64
  350. package/dist/chunk-zq4ssxj9.js +0 -8
@@ -0,0 +1,1163 @@
1
+ const colors = {
2
+ transparent: "transparent",
3
+ current: "currentColor",
4
+ black: "#000000",
5
+ white: "#ffffff",
6
+ slate: {
7
+ 50: "#f8fafc",
8
+ 100: "#f1f5f9",
9
+ 200: "#e2e8f0",
10
+ 300: "#cbd5e1",
11
+ 400: "#94a3b8",
12
+ 500: "#64748b",
13
+ 600: "#475569",
14
+ 700: "#334155",
15
+ 800: "#1e293b",
16
+ 900: "#0f172a",
17
+ 950: "#020617"
18
+ },
19
+ gray: {
20
+ 50: "#f9fafb",
21
+ 100: "#f3f4f6",
22
+ 200: "#e5e7eb",
23
+ 300: "#d1d5db",
24
+ 400: "#9ca3af",
25
+ 500: "#6b7280",
26
+ 600: "#4b5563",
27
+ 700: "#374151",
28
+ 800: "#1f2937",
29
+ 900: "#111827",
30
+ 950: "#030712"
31
+ },
32
+ zinc: {
33
+ 50: "#fafafa",
34
+ 100: "#f4f4f5",
35
+ 200: "#e4e4e7",
36
+ 300: "#d4d4d8",
37
+ 400: "#a1a1aa",
38
+ 500: "#71717a",
39
+ 600: "#52525b",
40
+ 700: "#3f3f46",
41
+ 800: "#27272a",
42
+ 900: "#18181b",
43
+ 950: "#09090b"
44
+ },
45
+ red: {
46
+ 50: "#fef2f2",
47
+ 100: "#fee2e2",
48
+ 200: "#fecaca",
49
+ 300: "#fca5a5",
50
+ 400: "#f87171",
51
+ 500: "#ef4444",
52
+ 600: "#dc2626",
53
+ 700: "#b91c1c",
54
+ 800: "#991b1b",
55
+ 900: "#7f1d1d",
56
+ 950: "#450a0a"
57
+ },
58
+ orange: {
59
+ 50: "#fff7ed",
60
+ 100: "#ffedd5",
61
+ 200: "#fed7aa",
62
+ 300: "#fdba74",
63
+ 400: "#fb923c",
64
+ 500: "#f97316",
65
+ 600: "#ea580c",
66
+ 700: "#c2410c",
67
+ 800: "#9a3412",
68
+ 900: "#7c2d12",
69
+ 950: "#431407"
70
+ },
71
+ amber: {
72
+ 50: "#fffbeb",
73
+ 100: "#fef3c7",
74
+ 200: "#fde68a",
75
+ 300: "#fcd34d",
76
+ 400: "#fbbf24",
77
+ 500: "#f59e0b",
78
+ 600: "#d97706",
79
+ 700: "#b45309",
80
+ 800: "#92400e",
81
+ 900: "#78350f",
82
+ 950: "#451a03"
83
+ },
84
+ yellow: {
85
+ 50: "#fefce8",
86
+ 100: "#fef9c3",
87
+ 200: "#fef08a",
88
+ 300: "#fde047",
89
+ 400: "#facc15",
90
+ 500: "#eab308",
91
+ 600: "#ca8a04",
92
+ 700: "#a16207",
93
+ 800: "#854d0e",
94
+ 900: "#713f12",
95
+ 950: "#422006"
96
+ },
97
+ green: {
98
+ 50: "#f0fdf4",
99
+ 100: "#dcfce7",
100
+ 200: "#bbf7d0",
101
+ 300: "#86efac",
102
+ 400: "#4ade80",
103
+ 500: "#22c55e",
104
+ 600: "#16a34a",
105
+ 700: "#15803d",
106
+ 800: "#166534",
107
+ 900: "#14532d",
108
+ 950: "#052e16"
109
+ },
110
+ emerald: {
111
+ 50: "#ecfdf5",
112
+ 100: "#d1fae5",
113
+ 200: "#a7f3d0",
114
+ 300: "#6ee7b7",
115
+ 400: "#34d399",
116
+ 500: "#10b981",
117
+ 600: "#059669",
118
+ 700: "#047857",
119
+ 800: "#065f46",
120
+ 900: "#064e3b",
121
+ 950: "#022c22"
122
+ },
123
+ teal: {
124
+ 50: "#f0fdfa",
125
+ 100: "#ccfbf1",
126
+ 200: "#99f6e4",
127
+ 300: "#5eead4",
128
+ 400: "#2dd4bf",
129
+ 500: "#14b8a6",
130
+ 600: "#0d9488",
131
+ 700: "#0f766e",
132
+ 800: "#115e59",
133
+ 900: "#134e4a",
134
+ 950: "#042f2e"
135
+ },
136
+ cyan: {
137
+ 50: "#ecfeff",
138
+ 100: "#cffafe",
139
+ 200: "#a5f3fc",
140
+ 300: "#67e8f9",
141
+ 400: "#22d3ee",
142
+ 500: "#06b6d4",
143
+ 600: "#0891b2",
144
+ 700: "#0e7490",
145
+ 800: "#155e75",
146
+ 900: "#164e63",
147
+ 950: "#083344"
148
+ },
149
+ sky: {
150
+ 50: "#f0f9ff",
151
+ 100: "#e0f2fe",
152
+ 200: "#bae6fd",
153
+ 300: "#7dd3fc",
154
+ 400: "#38bdf8",
155
+ 500: "#0ea5e9",
156
+ 600: "#0284c7",
157
+ 700: "#0369a1",
158
+ 800: "#075985",
159
+ 900: "#0c4a6e",
160
+ 950: "#082f49"
161
+ },
162
+ lime: {
163
+ 50: "#f7fee7",
164
+ 100: "#ecfccb",
165
+ 200: "#d9f99d",
166
+ 300: "#bef264",
167
+ 400: "#a3e635",
168
+ 500: "#84cc16",
169
+ 600: "#65a30d",
170
+ 700: "#4d7c0f",
171
+ 800: "#3f6212",
172
+ 900: "#365314",
173
+ 950: "#1a2e05"
174
+ },
175
+ fuchsia: {
176
+ 50: "#fdf4ff",
177
+ 100: "#fae8ff",
178
+ 200: "#f5d0fe",
179
+ 300: "#f0abfc",
180
+ 400: "#e879f9",
181
+ 500: "#d946ef",
182
+ 600: "#c026d3",
183
+ 700: "#a21caf",
184
+ 800: "#86198f",
185
+ 900: "#701a75",
186
+ 950: "#4a044e"
187
+ },
188
+ neutral: {
189
+ 50: "#fafafa",
190
+ 100: "#f5f5f5",
191
+ 200: "#e5e5e5",
192
+ 300: "#d4d4d4",
193
+ 400: "#a3a3a3",
194
+ 500: "#737373",
195
+ 600: "#525252",
196
+ 700: "#404040",
197
+ 800: "#262626",
198
+ 900: "#171717",
199
+ 950: "#0a0a0a"
200
+ },
201
+ stone: {
202
+ 50: "#fafaf9",
203
+ 100: "#f5f5f4",
204
+ 200: "#e7e5e4",
205
+ 300: "#d6d3d1",
206
+ 400: "#a8a29e",
207
+ 500: "#78716c",
208
+ 600: "#57534e",
209
+ 700: "#44403c",
210
+ 800: "#292524",
211
+ 900: "#1c1917",
212
+ 950: "#0c0a09"
213
+ },
214
+ blue: {
215
+ 50: "#eff6ff",
216
+ 100: "#dbeafe",
217
+ 200: "#bfdbfe",
218
+ 300: "#93c5fd",
219
+ 400: "#60a5fa",
220
+ 500: "#3b82f6",
221
+ 600: "#2563eb",
222
+ 700: "#1d4ed8",
223
+ 800: "#1e40af",
224
+ 900: "#1e3a8a",
225
+ 950: "#172554"
226
+ },
227
+ indigo: {
228
+ 50: "#eef2ff",
229
+ 100: "#e0e7ff",
230
+ 200: "#c7d2fe",
231
+ 300: "#a5b4fc",
232
+ 400: "#818cf8",
233
+ 500: "#6366f1",
234
+ 600: "#4f46e5",
235
+ 700: "#4338ca",
236
+ 800: "#3730a3",
237
+ 900: "#312e81",
238
+ 950: "#1e1b4b"
239
+ },
240
+ violet: {
241
+ 50: "#f5f3ff",
242
+ 100: "#ede9fe",
243
+ 200: "#ddd6fe",
244
+ 300: "#c4b5fd",
245
+ 400: "#a78bfa",
246
+ 500: "#8b5cf6",
247
+ 600: "#7c3aed",
248
+ 700: "#6d28d9",
249
+ 800: "#5b21b6",
250
+ 900: "#4c1d95",
251
+ 950: "#2e1065"
252
+ },
253
+ purple: {
254
+ 50: "#faf5ff",
255
+ 100: "#f3e8ff",
256
+ 200: "#e9d5ff",
257
+ 300: "#d8b4fe",
258
+ 400: "#c084fc",
259
+ 500: "#a855f7",
260
+ 600: "#9333ea",
261
+ 700: "#7e22ce",
262
+ 800: "#6b21a8",
263
+ 900: "#581c87",
264
+ 950: "#3b0764"
265
+ },
266
+ pink: {
267
+ 50: "#fdf2f8",
268
+ 100: "#fce7f3",
269
+ 200: "#fbcfe8",
270
+ 300: "#f9a8d4",
271
+ 400: "#f472b6",
272
+ 500: "#ec4899",
273
+ 600: "#db2777",
274
+ 700: "#be185d",
275
+ 800: "#9d174d",
276
+ 900: "#831843",
277
+ 950: "#500724"
278
+ },
279
+ rose: {
280
+ 50: "#fff1f2",
281
+ 100: "#ffe4e6",
282
+ 200: "#fecdd3",
283
+ 300: "#fda4af",
284
+ 400: "#fb7185",
285
+ 500: "#f43f5e",
286
+ 600: "#e11d48",
287
+ 700: "#be123c",
288
+ 800: "#9f1239",
289
+ 900: "#881337",
290
+ 950: "#4c0519"
291
+ }
292
+ }, spacing = {
293
+ px: 1,
294
+ 0: 0,
295
+ 0.5: 2,
296
+ 1: 4,
297
+ 1.5: 6,
298
+ 2: 8,
299
+ 2.5: 10,
300
+ 3: 12,
301
+ 3.5: 14,
302
+ 4: 16,
303
+ 5: 20,
304
+ 6: 24,
305
+ 7: 28,
306
+ 8: 32,
307
+ 9: 36,
308
+ 10: 40,
309
+ 11: 44,
310
+ 12: 48,
311
+ 14: 56,
312
+ 16: 64,
313
+ 20: 80,
314
+ 24: 96,
315
+ 28: 112,
316
+ 32: 128,
317
+ 36: 144,
318
+ 40: 160,
319
+ 44: 176,
320
+ 48: 192,
321
+ 52: 208,
322
+ 56: 224,
323
+ 60: 240,
324
+ 64: 256,
325
+ 72: 288,
326
+ 80: 320,
327
+ 96: 384
328
+ }, fontSizes = {
329
+ xs: 12,
330
+ sm: 14,
331
+ base: 16,
332
+ lg: 18,
333
+ xl: 20,
334
+ "2xl": 24,
335
+ "3xl": 30,
336
+ "4xl": 36,
337
+ "5xl": 48,
338
+ "6xl": 60,
339
+ "7xl": 72,
340
+ "8xl": 96,
341
+ "9xl": 128
342
+ }, borderRadius = {
343
+ none: 0,
344
+ sm: 2,
345
+ DEFAULT: 4,
346
+ md: 6,
347
+ lg: 8,
348
+ xl: 12,
349
+ "2xl": 16,
350
+ "3xl": 24,
351
+ full: 9999
352
+ };
353
+ function resolveColor(colorClass) {
354
+ const slash = colorClass.lastIndexOf("/");
355
+ if (slash > 0 && !colorClass.endsWith("]")) {
356
+ const base = resolveColor(colorClass.slice(0, slash)), amount = colorClass.slice(slash + 1), alpha = /^\[(.+)\]$/.test(amount) ? Number.parseFloat(amount.slice(1, -1)) * (amount.includes("%") ? 1 : 100) : Number.parseFloat(amount);
357
+ if (!base || !Number.isFinite(alpha))
358
+ return;
359
+ return withAlpha(base, alpha / 100);
360
+ }
361
+ if (colorClass === "transparent")
362
+ return "transparent";
363
+ if (colorClass === "current")
364
+ return "currentColor";
365
+ if (colorClass === "black")
366
+ return "#000000";
367
+ if (colorClass === "white")
368
+ return "#ffffff";
369
+ const parts = colorClass.split("-");
370
+ if (parts.length === 2) {
371
+ const [colorName, shade] = parts, palette = colors[colorName];
372
+ if (palette && typeof palette === "object")
373
+ return palette[shade];
374
+ }
375
+ if (colorClass.startsWith("[") && colorClass.endsWith("]")) {
376
+ const inner = colorClass.slice(1, -1);
377
+ return /^(#|rgba?\(|hsla?\(|[a-z]+$)/i.test(inner) ? inner : void 0;
378
+ }
379
+ return;
380
+ }
381
+ function withAlpha(color, alpha) {
382
+ if (color === "transparent")
383
+ return color;
384
+ let hex = color.startsWith("#") ? color.slice(1) : "";
385
+ if (hex.length === 3)
386
+ hex = hex.split("").map((digit) => digit + digit).join("");
387
+ if (hex.length === 8)
388
+ hex = hex.slice(0, 6);
389
+ if (hex.length !== 6)
390
+ return;
391
+ const byte = Math.round(Math.min(1, Math.max(0, alpha)) * 255);
392
+ return `#${hex}${byte.toString(16).padStart(2, "0")}`;
393
+ }
394
+ function arbitraryLength(value, emBase = 16) {
395
+ if (!value.startsWith("[") || !value.endsWith("]"))
396
+ return;
397
+ const inner = value.slice(1, -1), number = Number.parseFloat(inner);
398
+ if (!Number.isFinite(number))
399
+ return;
400
+ if (inner.endsWith("rem"))
401
+ return number * 16;
402
+ if (inner.endsWith("em"))
403
+ return number * emBase;
404
+ return number;
405
+ }
406
+ function resolveSpacing(value) {
407
+ if (value.startsWith("[") && value.endsWith("]")) {
408
+ const inner = value.slice(1, -1), length = inner.endsWith("rem") ? Number.parseFloat(inner) * 16 : Number.parseFloat(inner);
409
+ return Number.isFinite(length) ? length : void 0;
410
+ }
411
+ return spacing[value];
412
+ }
413
+ const classParsers = {
414
+ flex: (_, style) => {
415
+ style.display = "flex";
416
+ return !0;
417
+ },
418
+ hidden: (_, style) => {
419
+ style.display = "none";
420
+ return !0;
421
+ },
422
+ grid: (_, style) => {
423
+ style.display = "grid";
424
+ return !0;
425
+ },
426
+ "flex-row": (_, style) => {
427
+ style.flexDirection = "row";
428
+ return !0;
429
+ },
430
+ "flex-col": (_, style) => {
431
+ style.flexDirection = "column";
432
+ return !0;
433
+ },
434
+ "flex-row-reverse": (_, style) => {
435
+ style.flexDirection = "row-reverse";
436
+ return !0;
437
+ },
438
+ "flex-col-reverse": (_, style) => {
439
+ style.flexDirection = "column-reverse";
440
+ return !0;
441
+ },
442
+ "flex-wrap": (_, style) => {
443
+ style.flexWrap = "wrap";
444
+ return !0;
445
+ },
446
+ "flex-nowrap": (_, style) => {
447
+ style.flexWrap = "nowrap";
448
+ return !0;
449
+ },
450
+ "flex-wrap-reverse": (_, style) => {
451
+ style.flexWrap = "wrap-reverse";
452
+ return !0;
453
+ },
454
+ "flex-1": (_, style) => {
455
+ style.flex = 1;
456
+ style.flexGrow = 1;
457
+ style.flexShrink = 1;
458
+ style.flexBasis = 0;
459
+ return !0;
460
+ },
461
+ "flex-auto": (_, style) => {
462
+ style.flexGrow = 1;
463
+ style.flexShrink = 1;
464
+ return !0;
465
+ },
466
+ "flex-initial": (_, style) => {
467
+ style.flexGrow = 0;
468
+ style.flexShrink = 1;
469
+ return !0;
470
+ },
471
+ "flex-none": (_, style) => {
472
+ style.flexGrow = 0;
473
+ style.flexShrink = 0;
474
+ return !0;
475
+ },
476
+ grow: (_, style) => {
477
+ style.flexGrow = 1;
478
+ return !0;
479
+ },
480
+ "grow-0": (_, style) => {
481
+ style.flexGrow = 0;
482
+ return !0;
483
+ },
484
+ shrink: (_, style) => {
485
+ style.flexShrink = 1;
486
+ return !0;
487
+ },
488
+ "shrink-0": (_, style) => {
489
+ style.flexShrink = 0;
490
+ return !0;
491
+ },
492
+ "justify-start": (_, style) => {
493
+ style.justifyContent = "flex-start";
494
+ return !0;
495
+ },
496
+ "justify-center": (_, style) => {
497
+ style.justifyContent = "center";
498
+ return !0;
499
+ },
500
+ "justify-end": (_, style) => {
501
+ style.justifyContent = "flex-end";
502
+ return !0;
503
+ },
504
+ "justify-between": (_, style) => {
505
+ style.justifyContent = "space-between";
506
+ return !0;
507
+ },
508
+ "justify-around": (_, style) => {
509
+ style.justifyContent = "space-around";
510
+ return !0;
511
+ },
512
+ "justify-evenly": (_, style) => {
513
+ style.justifyContent = "space-evenly";
514
+ return !0;
515
+ },
516
+ "items-start": (_, style) => {
517
+ style.alignItems = "flex-start";
518
+ return !0;
519
+ },
520
+ "items-center": (_, style) => {
521
+ style.alignItems = "center";
522
+ return !0;
523
+ },
524
+ "items-end": (_, style) => {
525
+ style.alignItems = "flex-end";
526
+ return !0;
527
+ },
528
+ "items-stretch": (_, style) => {
529
+ style.alignItems = "stretch";
530
+ return !0;
531
+ },
532
+ "items-baseline": (_, style) => {
533
+ style.alignItems = "baseline";
534
+ return !0;
535
+ },
536
+ "self-auto": (_, style) => {
537
+ style.alignSelf = "auto";
538
+ return !0;
539
+ },
540
+ "self-start": (_, style) => {
541
+ style.alignSelf = "flex-start";
542
+ return !0;
543
+ },
544
+ "self-center": (_, style) => {
545
+ style.alignSelf = "center";
546
+ return !0;
547
+ },
548
+ "self-end": (_, style) => {
549
+ style.alignSelf = "flex-end";
550
+ return !0;
551
+ },
552
+ "self-stretch": (_, style) => {
553
+ style.alignSelf = "stretch";
554
+ return !0;
555
+ },
556
+ "self-baseline": (_, style) => {
557
+ style.alignSelf = "baseline";
558
+ return !0;
559
+ },
560
+ "min-w-0": (_, style) => {
561
+ style.minWidth = 0;
562
+ return !0;
563
+ },
564
+ "aspect-square": (_, style) => {
565
+ style.aspectRatio = 1;
566
+ return !0;
567
+ },
568
+ "inset-0": (_, style) => {
569
+ style.top = 0;
570
+ style.right = 0;
571
+ style.bottom = 0;
572
+ style.left = 0;
573
+ return !0;
574
+ },
575
+ "tracking-tighter": (_, style) => {
576
+ style.letterSpacing = -0.8;
577
+ return !0;
578
+ },
579
+ "tracking-tight": (_, style) => {
580
+ style.letterSpacing = -0.4;
581
+ return !0;
582
+ },
583
+ "tracking-normal": (_, style) => {
584
+ style.letterSpacing = 0;
585
+ return !0;
586
+ },
587
+ "tracking-wide": (_, style) => {
588
+ style.letterSpacing = 0.4;
589
+ return !0;
590
+ },
591
+ "tracking-wider": (_, style) => {
592
+ style.letterSpacing = 0.8;
593
+ return !0;
594
+ },
595
+ "tracking-widest": (_, style) => {
596
+ style.letterSpacing = 1.6;
597
+ return !0;
598
+ },
599
+ "tabular-nums": () => !0,
600
+ block: () => !0,
601
+ "inline-flex": (_, style) => {
602
+ style.display = "flex";
603
+ return !0;
604
+ },
605
+ truncate: () => !0,
606
+ relative: (_, style) => {
607
+ style.position = "relative";
608
+ return !0;
609
+ },
610
+ absolute: (_, style) => {
611
+ style.position = "absolute";
612
+ return !0;
613
+ },
614
+ "overflow-visible": (_, style) => {
615
+ style.overflow = "visible";
616
+ return !0;
617
+ },
618
+ "overflow-hidden": (_, style) => {
619
+ style.overflow = "hidden";
620
+ return !0;
621
+ },
622
+ "overflow-scroll": (_, style) => {
623
+ style.overflow = "scroll";
624
+ return !0;
625
+ },
626
+ "font-thin": (_, style) => {
627
+ style.fontWeight = "100";
628
+ return !0;
629
+ },
630
+ "font-extralight": (_, style) => {
631
+ style.fontWeight = "200";
632
+ return !0;
633
+ },
634
+ "font-light": (_, style) => {
635
+ style.fontWeight = "300";
636
+ return !0;
637
+ },
638
+ "font-normal": (_, style) => {
639
+ style.fontWeight = "400";
640
+ return !0;
641
+ },
642
+ "font-medium": (_, style) => {
643
+ style.fontWeight = "500";
644
+ return !0;
645
+ },
646
+ "font-semibold": (_, style) => {
647
+ style.fontWeight = "600";
648
+ return !0;
649
+ },
650
+ "font-bold": (_, style) => {
651
+ style.fontWeight = "bold";
652
+ return !0;
653
+ },
654
+ "font-extrabold": (_, style) => {
655
+ style.fontWeight = "800";
656
+ return !0;
657
+ },
658
+ "font-black": (_, style) => {
659
+ style.fontWeight = "900";
660
+ return !0;
661
+ },
662
+ italic: (_, style) => {
663
+ style.fontStyle = "italic";
664
+ return !0;
665
+ },
666
+ "not-italic": (_, style) => {
667
+ style.fontStyle = "normal";
668
+ return !0;
669
+ },
670
+ "text-left": (_, style) => {
671
+ style.textAlign = "left";
672
+ return !0;
673
+ },
674
+ "text-center": (_, style) => {
675
+ style.textAlign = "center";
676
+ return !0;
677
+ },
678
+ "text-right": (_, style) => {
679
+ style.textAlign = "right";
680
+ return !0;
681
+ },
682
+ "text-justify": (_, style) => {
683
+ style.textAlign = "justify";
684
+ return !0;
685
+ },
686
+ uppercase: (_, style) => {
687
+ style.textTransform = "uppercase";
688
+ return !0;
689
+ },
690
+ lowercase: (_, style) => {
691
+ style.textTransform = "lowercase";
692
+ return !0;
693
+ },
694
+ capitalize: (_, style) => {
695
+ style.textTransform = "capitalize";
696
+ return !0;
697
+ },
698
+ "normal-case": (_, style) => {
699
+ style.textTransform = "none";
700
+ return !0;
701
+ },
702
+ underline: (_, style) => {
703
+ style.textDecorationLine = "underline";
704
+ return !0;
705
+ },
706
+ "line-through": (_, style) => {
707
+ style.textDecorationLine = "line-through";
708
+ return !0;
709
+ },
710
+ "no-underline": (_, style) => {
711
+ style.textDecorationLine = "none";
712
+ return !0;
713
+ }
714
+ };
715
+ function parseBackgroundColor(className, style) {
716
+ if (!className.startsWith("bg-"))
717
+ return !1;
718
+ const colorClass = className.slice(3), color = resolveColor(colorClass);
719
+ if (color) {
720
+ style.backgroundColor = color;
721
+ return !0;
722
+ }
723
+ return !1;
724
+ }
725
+ function parseTextColor(className, style) {
726
+ if (!className.startsWith("text-"))
727
+ return !1;
728
+ const value = className.slice(5);
729
+ if (fontSizes[value]) {
730
+ style.fontSize = fontSizes[value];
731
+ return !0;
732
+ }
733
+ if (value.startsWith("[") && value.endsWith("]")) {
734
+ const inner = value.slice(1, -1);
735
+ if (/^-?[\d.]+(?:px|r?em)?$/.test(inner)) {
736
+ const size = inner.endsWith("rem") || inner.endsWith("em") ? Number.parseFloat(inner) * 16 : Number.parseFloat(inner);
737
+ if (Number.isFinite(size)) {
738
+ style.fontSize = size;
739
+ return !0;
740
+ }
741
+ }
742
+ }
743
+ const color = resolveColor(value);
744
+ if (color) {
745
+ style.color = color;
746
+ return !0;
747
+ }
748
+ return !1;
749
+ }
750
+ function parsePadding(className, style) {
751
+ if (className.startsWith("p-")) {
752
+ const size = resolveSpacing(className.slice(2));
753
+ if (size !== void 0) {
754
+ style.padding = size;
755
+ return !0;
756
+ }
757
+ }
758
+ if (className.startsWith("px-")) {
759
+ const size = resolveSpacing(className.slice(3));
760
+ if (size !== void 0) {
761
+ style.paddingHorizontal = size;
762
+ return !0;
763
+ }
764
+ }
765
+ if (className.startsWith("py-")) {
766
+ const size = resolveSpacing(className.slice(3));
767
+ if (size !== void 0) {
768
+ style.paddingVertical = size;
769
+ return !0;
770
+ }
771
+ }
772
+ if (className.startsWith("pt-")) {
773
+ const size = resolveSpacing(className.slice(3));
774
+ if (size !== void 0) {
775
+ style.paddingTop = size;
776
+ return !0;
777
+ }
778
+ }
779
+ if (className.startsWith("pr-")) {
780
+ const size = resolveSpacing(className.slice(3));
781
+ if (size !== void 0) {
782
+ style.paddingRight = size;
783
+ return !0;
784
+ }
785
+ }
786
+ if (className.startsWith("pb-")) {
787
+ const size = resolveSpacing(className.slice(3));
788
+ if (size !== void 0) {
789
+ style.paddingBottom = size;
790
+ return !0;
791
+ }
792
+ }
793
+ if (className.startsWith("pl-")) {
794
+ const size = resolveSpacing(className.slice(3));
795
+ if (size !== void 0) {
796
+ style.paddingLeft = size;
797
+ return !0;
798
+ }
799
+ }
800
+ return !1;
801
+ }
802
+ function parseMargin(className, style) {
803
+ if (className.startsWith("m-")) {
804
+ const size = resolveSpacing(className.slice(2));
805
+ if (size !== void 0) {
806
+ style.margin = size;
807
+ return !0;
808
+ }
809
+ }
810
+ if (className.startsWith("mx-")) {
811
+ const size = resolveSpacing(className.slice(3));
812
+ if (size !== void 0) {
813
+ style.marginHorizontal = size;
814
+ return !0;
815
+ }
816
+ }
817
+ if (className.startsWith("my-")) {
818
+ const size = resolveSpacing(className.slice(3));
819
+ if (size !== void 0) {
820
+ style.marginVertical = size;
821
+ return !0;
822
+ }
823
+ }
824
+ if (className.startsWith("mt-")) {
825
+ const size = resolveSpacing(className.slice(3));
826
+ if (size !== void 0) {
827
+ style.marginTop = size;
828
+ return !0;
829
+ }
830
+ }
831
+ if (className.startsWith("mr-")) {
832
+ const size = resolveSpacing(className.slice(3));
833
+ if (size !== void 0) {
834
+ style.marginRight = size;
835
+ return !0;
836
+ }
837
+ }
838
+ if (className.startsWith("mb-")) {
839
+ const size = resolveSpacing(className.slice(3));
840
+ if (size !== void 0) {
841
+ style.marginBottom = size;
842
+ return !0;
843
+ }
844
+ }
845
+ if (className.startsWith("ml-")) {
846
+ const size = resolveSpacing(className.slice(3));
847
+ if (size !== void 0) {
848
+ style.marginLeft = size;
849
+ return !0;
850
+ }
851
+ }
852
+ return !1;
853
+ }
854
+ function parseWidth(className, style) {
855
+ if (!className.startsWith("w-"))
856
+ return !1;
857
+ const value = className.slice(2);
858
+ if (value === "full") {
859
+ style.width = "100%";
860
+ return !0;
861
+ }
862
+ if (value === "screen") {
863
+ style.width = "100%";
864
+ return !0;
865
+ }
866
+ if (value === "auto") {
867
+ style.width = "auto";
868
+ return !0;
869
+ }
870
+ if (value.includes("/")) {
871
+ const [num, denom] = value.split("/"), percent = Number.parseInt(num) / Number.parseInt(denom) * 100;
872
+ style.width = `${percent}%`;
873
+ return !0;
874
+ }
875
+ const size = resolveSpacing(value);
876
+ if (size !== void 0) {
877
+ style.width = size;
878
+ return !0;
879
+ }
880
+ return !1;
881
+ }
882
+ function parseHeight(className, style) {
883
+ if (!className.startsWith("h-"))
884
+ return !1;
885
+ const value = className.slice(2);
886
+ if (value === "full") {
887
+ style.height = "100%";
888
+ return !0;
889
+ }
890
+ if (value === "screen") {
891
+ style.height = "100%";
892
+ return !0;
893
+ }
894
+ if (value === "auto") {
895
+ style.height = "auto";
896
+ return !0;
897
+ }
898
+ const size = resolveSpacing(value);
899
+ if (size !== void 0) {
900
+ style.height = size;
901
+ return !0;
902
+ }
903
+ return !1;
904
+ }
905
+ function parseBorderRadius(className, style) {
906
+ if (!className.startsWith("rounded"))
907
+ return !1;
908
+ if (className === "rounded") {
909
+ style.borderRadius = borderRadius.DEFAULT;
910
+ return !0;
911
+ }
912
+ const value = className.slice(8);
913
+ if (value === "")
914
+ return !1;
915
+ const corner = /^(?:(t|b|l|r)-)?(\[[^\]]+\])$/.exec(value);
916
+ if (corner) {
917
+ const r = arbitraryLength(corner[2]);
918
+ if (r === void 0)
919
+ return !1;
920
+ const corners = {
921
+ t: ["borderTopLeftRadius", "borderTopRightRadius"],
922
+ b: ["borderBottomLeftRadius", "borderBottomRightRadius"],
923
+ l: ["borderTopLeftRadius", "borderBottomLeftRadius"],
924
+ r: ["borderTopRightRadius", "borderBottomRightRadius"]
925
+ };
926
+ for (const key of corner[1] ? corners[corner[1]] : ["borderRadius"])
927
+ style[key] = r;
928
+ return !0;
929
+ }
930
+ if (value.startsWith("t-")) {
931
+ const r = borderRadius[value.slice(2)] ?? borderRadius.DEFAULT;
932
+ style.borderTopLeftRadius = r;
933
+ style.borderTopRightRadius = r;
934
+ return !0;
935
+ }
936
+ if (value.startsWith("b-")) {
937
+ const r = borderRadius[value.slice(2)] ?? borderRadius.DEFAULT;
938
+ style.borderBottomLeftRadius = r;
939
+ style.borderBottomRightRadius = r;
940
+ return !0;
941
+ }
942
+ if (value.startsWith("l-")) {
943
+ const r = borderRadius[value.slice(2)] ?? borderRadius.DEFAULT;
944
+ style.borderTopLeftRadius = r;
945
+ style.borderBottomLeftRadius = r;
946
+ return !0;
947
+ }
948
+ if (value.startsWith("r-")) {
949
+ const r = borderRadius[value.slice(2)] ?? borderRadius.DEFAULT;
950
+ style.borderTopRightRadius = r;
951
+ style.borderBottomRightRadius = r;
952
+ return !0;
953
+ }
954
+ const radius = borderRadius[value];
955
+ if (radius !== void 0) {
956
+ style.borderRadius = radius;
957
+ return !0;
958
+ }
959
+ return !1;
960
+ }
961
+ function parseBorderWidth(className, style) {
962
+ if (!className.startsWith("border"))
963
+ return !1;
964
+ if (className === "border") {
965
+ style.borderWidth = 1;
966
+ return !0;
967
+ }
968
+ const match = className.match(/^border-(\d+)$/);
969
+ if (match) {
970
+ style.borderWidth = Number.parseInt(match[1]);
971
+ return !0;
972
+ }
973
+ const sideMatch = className.match(/^border-(t|r|b|l)-?(\d*)$/);
974
+ if (sideMatch) {
975
+ const [, side, width] = sideMatch, w = width ? Number.parseInt(width) : 1;
976
+ switch (side) {
977
+ case "t":
978
+ style.borderTopWidth = w;
979
+ break;
980
+ case "r":
981
+ style.borderRightWidth = w;
982
+ break;
983
+ case "b":
984
+ style.borderBottomWidth = w;
985
+ break;
986
+ case "l":
987
+ style.borderLeftWidth = w;
988
+ break;
989
+ }
990
+ return !0;
991
+ }
992
+ return !1;
993
+ }
994
+ function parseBorderColor(className, style) {
995
+ if (!className.startsWith("border-"))
996
+ return !1;
997
+ const colorClass = className.slice(7), color = resolveColor(colorClass);
998
+ if (color) {
999
+ style.borderColor = color;
1000
+ return !0;
1001
+ }
1002
+ return !1;
1003
+ }
1004
+ function parseOpacity(className, style) {
1005
+ if (!className.startsWith("opacity-"))
1006
+ return !1;
1007
+ const value = Number.parseInt(className.slice(8));
1008
+ if (!Number.isNaN(value)) {
1009
+ style.opacity = value / 100;
1010
+ return !0;
1011
+ }
1012
+ return !1;
1013
+ }
1014
+ function parseTypography(className, style) {
1015
+ if (className.startsWith("tracking-[")) {
1016
+ const value = arbitraryLength(className.slice(9), typeof style.fontSize === "number" ? style.fontSize : 16);
1017
+ if (value === void 0)
1018
+ return !1;
1019
+ style.letterSpacing = value;
1020
+ return !0;
1021
+ }
1022
+ if (className.startsWith("leading-")) {
1023
+ const value = className.slice(8), size = typeof style.fontSize === "number" ? style.fontSize : 16, ratios = { none: 1, tight: 1.25, snug: 1.375, normal: 1.5, relaxed: 1.625, loose: 2 }, length = value.startsWith("[") ? /^\[[\d.]+\]$/.test(value) ? Number.parseFloat(value.slice(1, -1)) * size : arbitraryLength(value, size) : ratios[value] !== void 0 ? ratios[value] * size : spacing[value];
1024
+ if (length === void 0 || !Number.isFinite(length))
1025
+ return !1;
1026
+ style.lineHeight = length;
1027
+ return !0;
1028
+ }
1029
+ return !1;
1030
+ }
1031
+ function parseGridColumns(className, style) {
1032
+ const match = /^grid-cols-(\d+)$/.exec(className);
1033
+ if (!match)
1034
+ return !1;
1035
+ style.gridColumns = Number(match[1]);
1036
+ return !0;
1037
+ }
1038
+ function parseSize(className, style) {
1039
+ if (!className.startsWith("size-"))
1040
+ return !1;
1041
+ const value = className.slice(5), size = value === "full" ? "100%" : resolveSpacing(value);
1042
+ if (size === void 0)
1043
+ return !1;
1044
+ style.width = size;
1045
+ style.height = size;
1046
+ return !0;
1047
+ }
1048
+ function parsePosition(className, style) {
1049
+ const match = /^(-?)(top|right|bottom|left)-(.+)$/.exec(className);
1050
+ if (!match)
1051
+ return !1;
1052
+ const size = match[3] === "full" ? "100%" : resolveSpacing(match[3]);
1053
+ if (size === void 0)
1054
+ return !1;
1055
+ style[match[2]] = typeof size === "number" && match[1] ? -size : size;
1056
+ return !0;
1057
+ }
1058
+ function parseSpace(className, style) {
1059
+ const match = /^space-(x|y)-(.+)$/.exec(className);
1060
+ if (!match)
1061
+ return !1;
1062
+ const size = resolveSpacing(match[2]);
1063
+ if (size === void 0)
1064
+ return !1;
1065
+ style.gap = size;
1066
+ return !0;
1067
+ }
1068
+ function parseGap(className, style) {
1069
+ if (className.startsWith("gap-")) {
1070
+ const size = resolveSpacing(className.slice(4));
1071
+ if (size !== void 0) {
1072
+ style.gap = size;
1073
+ return !0;
1074
+ }
1075
+ }
1076
+ if (className.startsWith("gap-x-")) {
1077
+ const size = resolveSpacing(className.slice(6));
1078
+ if (size !== void 0) {
1079
+ style.columnGap = size;
1080
+ return !0;
1081
+ }
1082
+ }
1083
+ if (className.startsWith("gap-y-")) {
1084
+ const size = resolveSpacing(className.slice(6));
1085
+ if (size !== void 0) {
1086
+ style.rowGap = size;
1087
+ return !0;
1088
+ }
1089
+ }
1090
+ return !1;
1091
+ }
1092
+ export function compileClassStyles(classes) {
1093
+ const plain = [], dark = [];
1094
+ for (const name of classes.split(/\s+/).filter(Boolean))
1095
+ if (name.startsWith("dark:"))
1096
+ dark.push(name.slice(5));
1097
+ else if (!name.includes(":") || name.startsWith("["))
1098
+ plain.push(name);
1099
+ const unknown = [], result = { style: compileHeadwindToStyle(plain.join(" "), unknown), unknown };
1100
+ if (dark.length)
1101
+ result.dark = compileHeadwindToStyle(dark.join(" "), unknown);
1102
+ for (const name of plain) {
1103
+ if (name === "truncate")
1104
+ result.numberOfLines = 1;
1105
+ const clamp = /^line-clamp-(\d+)$/.exec(name);
1106
+ if (clamp)
1107
+ result.numberOfLines = Number(clamp[1]);
1108
+ if (!result.icon && /^i-[a-z0-9]+-[a-z0-9-]+$/.test(name))
1109
+ result.icon = name;
1110
+ }
1111
+ result.unknown = unknown.filter((name) => !/^line-clamp-\d+$/.test(name));
1112
+ return result;
1113
+ }
1114
+ export function compileHeadwindToStyle(classes, unknown) {
1115
+ const style = {}, classNames = classes.split(/\s+/).filter(Boolean);
1116
+ for (const className of classNames) {
1117
+ if (/^i-[a-z0-9]+-/.test(className))
1118
+ continue;
1119
+ const exactParser = classParsers[className];
1120
+ if (exactParser) {
1121
+ exactParser("", style);
1122
+ continue;
1123
+ }
1124
+ if (parseBackgroundColor(className, style))
1125
+ continue;
1126
+ if (parseTextColor(className, style))
1127
+ continue;
1128
+ if (parsePadding(className, style))
1129
+ continue;
1130
+ if (parseMargin(className, style))
1131
+ continue;
1132
+ if (parseWidth(className, style))
1133
+ continue;
1134
+ if (parseHeight(className, style))
1135
+ continue;
1136
+ if (parseBorderRadius(className, style))
1137
+ continue;
1138
+ if (parseBorderWidth(className, style))
1139
+ continue;
1140
+ if (parseBorderColor(className, style))
1141
+ continue;
1142
+ if (parseOpacity(className, style))
1143
+ continue;
1144
+ if (parseGap(className, style))
1145
+ continue;
1146
+ if (parseTypography(className, style))
1147
+ continue;
1148
+ if (parseSize(className, style))
1149
+ continue;
1150
+ if (parseGridColumns(className, style))
1151
+ continue;
1152
+ if (parsePosition(className, style))
1153
+ continue;
1154
+ if (parseSpace(className, style))
1155
+ continue;
1156
+ unknown?.push(className);
1157
+ if (typeof process < "u" && process.env?.NODE_ENV === "development")
1158
+ console.warn(`[STX Native] Unknown Headwind class: ${className}`);
1159
+ }
1160
+ return style;
1161
+ }
1162
+
1163
+ export { colors, spacing, fontSizes, borderRadius };