@stacksjs/stx 0.2.92 → 0.2.94

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 (629) hide show
  1. package/dist/a11y.js +1 -1
  2. package/dist/analytics.js +1 -1
  3. package/dist/analyzer.js +1 -1
  4. package/dist/animation.js +1 -1
  5. package/dist/app-shell.js +1 -1
  6. package/dist/app.js +1 -1
  7. package/dist/assets.js +1 -1
  8. package/dist/ast.js +1 -1
  9. package/dist/async-components.js +1 -1
  10. package/dist/auth.js +1 -1
  11. package/dist/broadcasting.js +1 -1
  12. package/dist/browser-composables.js +1 -1
  13. package/dist/build-assets.js +1 -1
  14. package/dist/build-mode-detector.js +1 -1
  15. package/dist/build-optimizer.js +1 -1
  16. package/dist/build-views.js +1 -1
  17. package/dist/build.js +1 -1
  18. package/dist/builtins/drawer.js +1 -1
  19. package/dist/builtins/escape.js +1 -1
  20. package/dist/builtins/icon.js +1 -1
  21. package/dist/builtins/index.js +1 -1
  22. package/dist/builtins/modal.js +1 -1
  23. package/dist/builtins/safe-image.js +1 -1
  24. package/dist/builtins/stx-image.js +1 -1
  25. package/dist/builtins/stx-link.js +1 -1
  26. package/dist/builtins/stx-loading-indicator.js +1 -1
  27. package/dist/builtins/suspense.js +1 -1
  28. package/dist/builtins/toast.js +1 -1
  29. package/dist/builtins/tooltip.js +1 -1
  30. package/dist/builtins/transition-group.js +1 -1
  31. package/dist/bundle-analyzer/collector.js +1 -1
  32. package/dist/bundle-analyzer/index.js +1 -1
  33. package/dist/bundle-analyzer/report.js +1 -1
  34. package/dist/bundle-analyzer/treemap.js +1 -1
  35. package/dist/caching.js +1 -1
  36. package/dist/{chunk-9p45wwff.js → chunk-03c26pjz.js} +1 -1
  37. package/dist/{chunk-4ep9gk7d.js → chunk-04mvcmcr.js} +1 -1
  38. package/dist/{chunk-5e2khb7q.js → chunk-05hgyyqc.js} +2 -2
  39. package/dist/{chunk-j25swncq.js → chunk-095s3972.js} +1 -1
  40. package/dist/{chunk-t1dzvz5z.js → chunk-0dz85jrp.js} +1 -1
  41. package/dist/{chunk-2aydpj2n.js → chunk-0g4gece6.js} +1 -1
  42. package/dist/{chunk-k7yp9h17.js → chunk-0jd0pndq.js} +1 -1
  43. package/dist/{chunk-3whqk46c.js → chunk-0jkwrcwj.js} +1 -1
  44. package/dist/{chunk-jcjzg6r5.js → chunk-0m9tdm7t.js} +1 -1
  45. package/dist/{chunk-9pzdyd8q.js → chunk-0qnz93q2.js} +2 -2
  46. package/dist/{chunk-c9f5k95v.js → chunk-0tatqxj2.js} +2 -2
  47. package/dist/{chunk-wdtanmx1.js → chunk-0wdar532.js} +1 -1
  48. package/dist/{chunk-m911bf2b.js → chunk-13yz561y.js} +2 -2
  49. package/dist/{chunk-646pxdd1.js → chunk-174z0cd0.js} +2 -2
  50. package/dist/{chunk-wbrqpv9f.js → chunk-1mmykse5.js} +2 -2
  51. package/dist/{chunk-xkzz5rb0.js → chunk-1z2yq9em.js} +2 -2
  52. package/dist/{chunk-jmky0qzm.js → chunk-1z5nhbjt.js} +1 -1
  53. package/dist/{chunk-ms9rebfj.js → chunk-25s7bckb.js} +2 -2
  54. package/dist/{chunk-nsrqf0dg.js → chunk-268adc7r.js} +1 -1
  55. package/dist/{chunk-14kfmww0.js → chunk-26r6zh3t.js} +2 -2
  56. package/dist/{chunk-8xbj6dqe.js → chunk-2w3302dh.js} +1 -1
  57. package/dist/{chunk-9ezvda3j.js → chunk-2xen423s.js} +1 -1
  58. package/dist/{chunk-nv3k4bf9.js → chunk-39gm08bn.js} +1 -1
  59. package/dist/{chunk-g3f1xq76.js → chunk-3bjtemm6.js} +1 -1
  60. package/dist/{chunk-6r70w54p.js → chunk-3jm3snz8.js} +1 -1
  61. package/dist/{chunk-9tksycj5.js → chunk-3ngm57nt.js} +2 -2
  62. package/dist/{chunk-hkjq64we.js → chunk-3rh7va1z.js} +1 -1
  63. package/dist/{chunk-r5sggjdv.js → chunk-3yg9hbmb.js} +2 -2
  64. package/dist/{chunk-sk1gmrr8.js → chunk-46mkpbkk.js} +2 -2
  65. package/dist/chunk-48cw2nde.js +2 -0
  66. package/dist/chunk-48r3qe0k.js +3 -0
  67. package/dist/{chunk-19f7xyy7.js → chunk-4bt81cg3.js} +2 -2
  68. package/dist/{chunk-ccgmxmjk.js → chunk-4j188175.js} +1 -1
  69. package/dist/{chunk-t38vt890.js → chunk-4k7d8p8d.js} +1 -1
  70. package/dist/{chunk-91gyjg5c.js → chunk-4qq8ffke.js} +2 -2
  71. package/dist/{chunk-fnqf7293.js → chunk-50vqeesm.js} +2 -2
  72. package/dist/{chunk-8fhv0xaw.js → chunk-52agge4n.js} +2 -2
  73. package/dist/{chunk-1vz36hw3.js → chunk-55yp0q8t.js} +1 -1
  74. package/dist/{chunk-yywc3yge.js → chunk-57p201gb.js} +1 -1
  75. package/dist/{chunk-kqtchwz7.js → chunk-5ggw1dyv.js} +1 -1
  76. package/dist/{chunk-md4j8nch.js → chunk-5kt3ay7x.js} +1 -1
  77. package/dist/{chunk-ds6g241c.js → chunk-5p568px4.js} +1 -1
  78. package/dist/{chunk-6e08xfzp.js → chunk-5ppkfyn2.js} +1 -1
  79. package/dist/{chunk-1htmc8mb.js → chunk-5q87fgkk.js} +2 -2
  80. package/dist/{chunk-ke7rcrfm.js → chunk-5qb761h2.js} +1 -1
  81. package/dist/{chunk-f7f4g33p.js → chunk-5xvbq2gs.js} +2 -2
  82. package/dist/{chunk-tb9c2mq7.js → chunk-647849kf.js} +2 -2
  83. package/dist/{chunk-b37f9ebf.js → chunk-6b5k6w2q.js} +1 -1
  84. package/dist/{chunk-x6n8z1n8.js → chunk-6cr3eeh4.js} +1 -1
  85. package/dist/{chunk-7sd6c9wv.js → chunk-6djgb0hr.js} +1 -1
  86. package/dist/{chunk-f228sm5e.js → chunk-6dqzky7x.js} +1 -1
  87. package/dist/{chunk-knefeadt.js → chunk-6e4c6g46.js} +2 -2
  88. package/dist/{chunk-qhzdkgg3.js → chunk-6w03t7h6.js} +2 -2
  89. package/dist/{chunk-fh1d8bxd.js → chunk-6wn85hn6.js} +1 -1
  90. package/dist/{chunk-w4a3cvtp.js → chunk-6y4gqs1q.js} +1 -1
  91. package/dist/{chunk-8x58wmgs.js → chunk-75rndzbd.js} +2 -2
  92. package/dist/{chunk-eghdf4qq.js → chunk-77tga15w.js} +2 -2
  93. package/dist/{chunk-w3e1fm1q.js → chunk-7a51hkpf.js} +1 -1
  94. package/dist/{chunk-rdaavfsg.js → chunk-7b0xdy5h.js} +1 -1
  95. package/dist/{chunk-5wecgn5n.js → chunk-7cgmq685.js} +1 -1
  96. package/dist/{chunk-0m53nxvy.js → chunk-7dy588as.js} +1 -1
  97. package/dist/{chunk-87rkm7qf.js → chunk-7rvh2wwv.js} +2 -2
  98. package/dist/{chunk-1hyk728h.js → chunk-7sm05m0j.js} +1 -1
  99. package/dist/{chunk-npj33yqb.js → chunk-7xcfy2fn.js} +1 -1
  100. package/dist/{chunk-7aph6rw7.js → chunk-82t27pvd.js} +1 -1
  101. package/dist/{chunk-hdv4tnvh.js → chunk-87kx8byz.js} +2 -2
  102. package/dist/{chunk-a2xzs4kd.js → chunk-8fgwhhb8.js} +2 -2
  103. package/dist/{chunk-bg1xym0q.js → chunk-8qbax8xn.js} +1 -1
  104. package/dist/{chunk-p4wm4a45.js → chunk-91s2hres.js} +2 -2
  105. package/dist/{chunk-7t4hkmxb.js → chunk-94g3cahw.js} +2 -2
  106. package/dist/{chunk-02bd1cng.js → chunk-957amb71.js} +1 -1
  107. package/dist/{chunk-qvmrwh8n.js → chunk-95w08s8v.js} +1 -1
  108. package/dist/{chunk-6zhv4fcq.js → chunk-9agvhp1x.js} +1 -1
  109. package/dist/{chunk-hd27hhzr.js → chunk-9tmbrwwx.js} +1 -1
  110. package/dist/{chunk-dtcj9r7p.js → chunk-9yz5d003.js} +2 -2
  111. package/dist/{chunk-agzvhej1.js → chunk-a3hyn4we.js} +1 -1
  112. package/dist/{chunk-n2wmny2b.js → chunk-a69tvya5.js} +2 -2
  113. package/dist/{chunk-c7zedzbg.js → chunk-adjcg6wa.js} +2 -2
  114. package/dist/{chunk-p5j0686t.js → chunk-adqh2m9z.js} +1 -1
  115. package/dist/{chunk-ddst5g08.js → chunk-asarebzq.js} +1 -1
  116. package/dist/{chunk-z06myqr1.js → chunk-aw3rp9ac.js} +2 -2
  117. package/dist/{chunk-zr8631g4.js → chunk-b0cyc09a.js} +1 -1
  118. package/dist/{chunk-ckz0ppkr.js → chunk-b3kkjcdh.js} +1 -1
  119. package/dist/{chunk-a33kr9b0.js → chunk-b3prs7y0.js} +1 -1
  120. package/dist/{chunk-zhr3za7x.js → chunk-b5zc9y0y.js} +2 -2
  121. package/dist/{chunk-zepv7y44.js → chunk-baa7h4yz.js} +2 -2
  122. package/dist/{chunk-pzc0bs5r.js → chunk-bgec9r1v.js} +2 -2
  123. package/dist/{chunk-mqnymcn5.js → chunk-bjnjpsgn.js} +2 -2
  124. package/dist/{chunk-g22tv0ed.js → chunk-bk8ew8ze.js} +2 -2
  125. package/dist/{chunk-h3mb2q51.js → chunk-bn08k7yy.js} +2 -2
  126. package/dist/{chunk-nacsxc1r.js → chunk-bpgg59wa.js} +1 -1
  127. package/dist/{chunk-9w7021bx.js → chunk-bwxda6n1.js} +2 -2
  128. package/dist/{chunk-9fj7hpwa.js → chunk-bykjk6vj.js} +1 -1
  129. package/dist/{chunk-gapx9vqm.js → chunk-c53hyw5c.js} +1 -1
  130. package/dist/{chunk-0qzxbxgp.js → chunk-c7jg8w13.js} +1 -1
  131. package/dist/{chunk-f9j3mr9z.js → chunk-ca6qd1dx.js} +1 -1
  132. package/dist/{chunk-f6s1jx8c.js → chunk-cdbwprfv.js} +2 -2
  133. package/dist/{chunk-3rgj1qn6.js → chunk-ceg2c2q2.js} +2 -2
  134. package/dist/{chunk-31w1xfs1.js → chunk-cn409b69.js} +1 -1
  135. package/dist/{chunk-c23697dp.js → chunk-cp3kwv17.js} +1 -1
  136. package/dist/{chunk-1k3k1tf8.js → chunk-cpcc11vp.js} +2 -2
  137. package/dist/{chunk-ftzqtv1k.js → chunk-cr3wbrcr.js} +2 -2
  138. package/dist/{chunk-my0qmjw4.js → chunk-cygfdk1n.js} +2 -2
  139. package/dist/{chunk-1bknva4p.js → chunk-cyp4m0vh.js} +1 -1
  140. package/dist/{chunk-jm460jxs.js → chunk-cz25azze.js} +1 -1
  141. package/dist/{chunk-9d0q9k3p.js → chunk-d77yxcds.js} +2 -2
  142. package/dist/{chunk-cf86cs0k.js → chunk-dvfs1h3c.js} +2 -2
  143. package/dist/{chunk-1bzckhs2.js → chunk-dyjnn5k8.js} +2 -2
  144. package/dist/{chunk-sd2c11bp.js → chunk-dzw95th7.js} +2 -2
  145. package/dist/{chunk-88wdr7f3.js → chunk-e0zytzdh.js} +1 -1
  146. package/dist/{chunk-tgvekhwz.js → chunk-e53h9qhd.js} +1 -1
  147. package/dist/{chunk-593x2ccf.js → chunk-eds0f8f1.js} +2 -2
  148. package/dist/{chunk-5y4q9abj.js → chunk-eh8hact1.js} +1 -1
  149. package/dist/{chunk-4ewrwqwn.js → chunk-epj957jf.js} +1 -1
  150. package/dist/{chunk-fcpxs8mm.js → chunk-eqeyaq6g.js} +1 -1
  151. package/dist/{chunk-n7j8tczc.js → chunk-fbxt2mrx.js} +2 -2
  152. package/dist/{chunk-b0w1cm1s.js → chunk-fch9tk1k.js} +1 -1
  153. package/dist/{chunk-8g0jb444.js → chunk-fe7r1mq1.js} +2 -2
  154. package/dist/{chunk-y92w0240.js → chunk-fhawx87n.js} +1 -1
  155. package/dist/{chunk-dgf2g708.js → chunk-fk51yyrw.js} +1 -1
  156. package/dist/{chunk-5tv1swsr.js → chunk-fms20x0n.js} +1 -1
  157. package/dist/{chunk-13mkbvxc.js → chunk-fs0qezn5.js} +1 -1
  158. package/dist/{chunk-acry1mfc.js → chunk-fzm3y0r3.js} +1 -1
  159. package/dist/{chunk-2rd0ykrg.js → chunk-g2hekckm.js} +1 -1
  160. package/dist/{chunk-zxsqbve0.js → chunk-g4ps1dj8.js} +2 -2
  161. package/dist/{chunk-qr72av66.js → chunk-g8b81pzc.js} +1 -1
  162. package/dist/{chunk-rth1890k.js → chunk-ganag9dm.js} +2 -2
  163. package/dist/{chunk-v9199ywv.js → chunk-gc84b1d2.js} +2 -2
  164. package/dist/{chunk-6jhqq7es.js → chunk-gcf5v18y.js} +1 -1
  165. package/dist/{chunk-a50svyjn.js → chunk-ghrx0hn1.js} +1 -1
  166. package/dist/{chunk-nh418dpm.js → chunk-gqpkp459.js} +2 -2
  167. package/dist/chunk-h45py5w5.js +2 -0
  168. package/dist/{chunk-at9v5saf.js → chunk-h5wa62ek.js} +1 -1
  169. package/dist/{chunk-ecabspxs.js → chunk-h82kjdr4.js} +1 -1
  170. package/dist/{chunk-aaaxvn5r.js → chunk-haecq01c.js} +1 -1
  171. package/dist/{chunk-zx43nkm1.js → chunk-hepg894w.js} +2 -2
  172. package/dist/{chunk-rhyxeb33.js → chunk-hjdc99kb.js} +2 -2
  173. package/dist/{chunk-04yrgvdd.js → chunk-hje9v2zh.js} +1 -1
  174. package/dist/{chunk-zxxt0c9q.js → chunk-hke99a0v.js} +2 -2
  175. package/dist/{chunk-r6sb1sm4.js → chunk-hpqr9e3x.js} +2 -2
  176. package/dist/{chunk-pcngkyjr.js → chunk-hq5cem49.js} +2 -2
  177. package/dist/{chunk-yssvz8zs.js → chunk-hrampcrj.js} +1 -1
  178. package/dist/{chunk-pjaa8q7x.js → chunk-ht4j68cs.js} +2 -2
  179. package/dist/{chunk-22xxm2x5.js → chunk-hxx3za24.js} +1 -1
  180. package/dist/{chunk-ms6793rw.js → chunk-j4s5qwd7.js} +2 -2
  181. package/dist/{chunk-ydhza16t.js → chunk-jbejwejg.js} +1 -1
  182. package/dist/{chunk-vwp4dw7e.js → chunk-jc0fc4ht.js} +1 -1
  183. package/dist/{chunk-kemb0fyc.js → chunk-jcs0ymw7.js} +1 -1
  184. package/dist/{chunk-tj9kmtnx.js → chunk-jfm69keq.js} +2 -2
  185. package/dist/chunk-jfrn43vh.js +2 -0
  186. package/dist/{chunk-fnt3srfr.js → chunk-jjamhxpm.js} +1 -1
  187. package/dist/{chunk-gcsqn7x9.js → chunk-jjvp4t5w.js} +2 -2
  188. package/dist/{chunk-e8x46y38.js → chunk-jt44av4j.js} +1 -1
  189. package/dist/{chunk-n3k3e9n5.js → chunk-jt98jhpt.js} +1 -1
  190. package/dist/{chunk-r738cjs3.js → chunk-k8440jxh.js} +2 -2
  191. package/dist/{chunk-v0s45ek4.js → chunk-kdxa9epn.js} +2 -2
  192. package/dist/{chunk-hrgg37a9.js → chunk-kfd2hf6f.js} +2 -2
  193. package/dist/{chunk-jdy93c39.js → chunk-kgym7ch9.js} +1 -1
  194. package/dist/{chunk-ybe2cpx1.js → chunk-kh6rfz2v.js} +1 -1
  195. package/dist/{chunk-j1myedcr.js → chunk-kkp6rs2n.js} +1 -1
  196. package/dist/{chunk-hz7qnpx1.js → chunk-m59y310j.js} +2 -2
  197. package/dist/{chunk-kh976zgv.js → chunk-mgmyr1b9.js} +1 -1
  198. package/dist/{chunk-dkt9p3bk.js → chunk-mqwbpamc.js} +1 -1
  199. package/dist/{chunk-xmjedbkt.js → chunk-mrehzhxv.js} +1 -1
  200. package/dist/{chunk-snj1hfpb.js → chunk-mv03qb75.js} +1 -1
  201. package/dist/chunk-mwbng54r.js +2 -0
  202. package/dist/{chunk-zvyc82ke.js → chunk-n46a5g1g.js} +1 -1
  203. package/dist/{chunk-vawc9ak6.js → chunk-n944baxp.js} +1 -1
  204. package/dist/{chunk-zwdargbj.js → chunk-nanw7yhz.js} +1 -1
  205. package/dist/{chunk-nwfa5766.js → chunk-nap11ntr.js} +2 -2
  206. package/dist/{chunk-r3cxnszy.js → chunk-ncnfa8ae.js} +2 -2
  207. package/dist/{chunk-xm3hz63f.js → chunk-ngxfwzq3.js} +1 -1
  208. package/dist/{chunk-fngb9apr.js → chunk-nvwb4x04.js} +1 -1
  209. package/dist/{chunk-ydhrdatx.js → chunk-nw34xajc.js} +1 -1
  210. package/dist/{chunk-3wth4wa6.js → chunk-payfb24w.js} +1 -1
  211. package/dist/{chunk-r1m8g439.js → chunk-pc31m5x5.js} +1 -1
  212. package/dist/{chunk-xecnz132.js → chunk-pg1fvqb9.js} +1 -1
  213. package/dist/{chunk-h6s1thg6.js → chunk-q60knhjf.js} +1 -1
  214. package/dist/{chunk-0t75nh4z.js → chunk-q6h6yvzb.js} +2 -2
  215. package/dist/{chunk-w719zps0.js → chunk-qd5461tt.js} +1 -1
  216. package/dist/{chunk-exfw0aqe.js → chunk-qdc3aav1.js} +1 -1
  217. package/dist/{chunk-g9gksn68.js → chunk-qfwzdffx.js} +2 -2
  218. package/dist/{chunk-wtgrc6ya.js → chunk-qgxwmagw.js} +1 -1
  219. package/dist/{chunk-vy0k2prz.js → chunk-qhdtssn1.js} +2 -2
  220. package/dist/{chunk-tzehzwyr.js → chunk-qk584whs.js} +1 -1
  221. package/dist/{chunk-wk7mgg5n.js → chunk-qm4yppj5.js} +2 -2
  222. package/dist/chunk-qwyd9a1d.js +2 -0
  223. package/dist/{chunk-kyhq6hzp.js → chunk-qxs6et76.js} +1 -1
  224. package/dist/{chunk-h1035wzj.js → chunk-rb1e4cnb.js} +1 -1
  225. package/dist/{chunk-kpp2baaz.js → chunk-rkffm9sy.js} +1 -1
  226. package/dist/{chunk-xgmza98t.js → chunk-rv002yn0.js} +1 -1
  227. package/dist/{chunk-64bwamng.js → chunk-s6ja2bdg.js} +1 -1
  228. package/dist/chunk-sjagg9qz.js +66 -0
  229. package/dist/{chunk-jtx73fsh.js → chunk-sn07azv3.js} +2 -2
  230. package/dist/{chunk-rqwhb85x.js → chunk-svahbw0w.js} +2 -2
  231. package/dist/{chunk-1qy4gac6.js → chunk-svhtdb0s.js} +2 -2
  232. package/dist/{chunk-rkr7cgs8.js → chunk-t37dp99j.js} +1 -1
  233. package/dist/{chunk-fk0m346m.js → chunk-tj6zfxeb.js} +2 -2
  234. package/dist/{chunk-1yg3x73j.js → chunk-tmgz5t2g.js} +1 -1
  235. package/dist/{chunk-r7d26vjj.js → chunk-tr0z0e1g.js} +1 -1
  236. package/dist/{chunk-zv9jfm2f.js → chunk-tx6br9r4.js} +1 -1
  237. package/dist/{chunk-zwpm1pa8.js → chunk-vcr5pzpx.js} +1 -1
  238. package/dist/{chunk-nqxqy9v2.js → chunk-vdfwv0fp.js} +1 -1
  239. package/dist/{chunk-hkabmxjj.js → chunk-vp2395eb.js} +2 -2
  240. package/dist/{chunk-fbbv5x9m.js → chunk-vpe6napb.js} +2 -2
  241. package/dist/{chunk-1w3354fv.js → chunk-vv9wfz1c.js} +2 -2
  242. package/dist/{chunk-71n355cg.js → chunk-vw6ejgmy.js} +2 -2
  243. package/dist/{chunk-tzd81m7r.js → chunk-w01y57f5.js} +2 -2
  244. package/dist/{chunk-6wqrqn2x.js → chunk-w21mwxdd.js} +2 -2
  245. package/dist/{chunk-qhrcts5t.js → chunk-w4n8fqp7.js} +1 -1
  246. package/dist/{chunk-x4qr3b2z.js → chunk-w959hm8j.js} +1 -1
  247. package/dist/{chunk-bgan5edn.js → chunk-wf7zrjsw.js} +1 -1
  248. package/dist/{chunk-ktvdeqjr.js → chunk-wk07pwtd.js} +1 -1
  249. package/dist/{chunk-mp9dsjrg.js → chunk-wvef3ngh.js} +1 -1
  250. package/dist/{chunk-xw9skf0n.js → chunk-wxvyj65q.js} +1 -1
  251. package/dist/{chunk-ktpc2rc4.js → chunk-x1hjv24z.js} +1 -1
  252. package/dist/{chunk-6sx4d083.js → chunk-x39sfpvm.js} +1 -1
  253. package/dist/{chunk-am5rtv86.js → chunk-x4fze3q2.js} +1 -1
  254. package/dist/{chunk-08ncwhv7.js → chunk-x64kb787.js} +1 -1
  255. package/dist/{chunk-p993psbk.js → chunk-xcb0pbr6.js} +1 -1
  256. package/dist/{chunk-9v7q6xn4.js → chunk-xhkjhxsp.js} +1 -1
  257. package/dist/{chunk-fp417rws.js → chunk-xhnpsngj.js} +2 -2
  258. package/dist/{chunk-6t76k6ry.js → chunk-xsqbk4yk.js} +2 -2
  259. package/dist/{chunk-wntaqqhz.js → chunk-xygc53vr.js} +1 -1
  260. package/dist/{chunk-vg97xcma.js → chunk-y0qg6rrv.js} +1 -1
  261. package/dist/{chunk-tavtph8x.js → chunk-y25pr13j.js} +1 -1
  262. package/dist/{chunk-fyq5573f.js → chunk-y4c744dk.js} +2 -2
  263. package/dist/{chunk-b5xf2v7f.js → chunk-y4md9hp0.js} +1 -1
  264. package/dist/{chunk-sn7pmfn4.js → chunk-y5wazw6j.js} +1 -1
  265. package/dist/{chunk-zasq08k3.js → chunk-y5xz0jc4.js} +1 -1
  266. package/dist/{chunk-7bd8bw2z.js → chunk-y86m1wr4.js} +2 -2
  267. package/dist/{chunk-ewytyv0p.js → chunk-yaan98dd.js} +2 -2
  268. package/dist/{chunk-dnkq5y2j.js → chunk-yach037f.js} +2 -2
  269. package/dist/{chunk-3ewtm19c.js → chunk-yexjrg9d.js} +2 -2
  270. package/dist/{chunk-c03qara0.js → chunk-ygvyc6wv.js} +1 -1
  271. package/dist/{chunk-0fsrhs3d.js → chunk-yj560gp8.js} +1 -1
  272. package/dist/{chunk-pdv5dhen.js → chunk-yn38c15w.js} +1 -1
  273. package/dist/{chunk-a4zj7qpt.js → chunk-yr1gdceh.js} +1 -1
  274. package/dist/{chunk-t7ghqd7e.js → chunk-yw2fzq86.js} +2 -2
  275. package/dist/{chunk-e792k31a.js → chunk-ywkrxp2h.js} +1 -1
  276. package/dist/{chunk-sgsb5xp4.js → chunk-z37xq5rx.js} +2 -2
  277. package/dist/{chunk-2g16stee.js → chunk-z4djtgt0.js} +2 -2
  278. package/dist/{chunk-zmsj7wh8.js → chunk-z8cjr9n9.js} +1 -1
  279. package/dist/{chunk-j6d9ksyj.js → chunk-znxp3zha.js} +1 -1
  280. package/dist/{chunk-dcp0znhd.js → chunk-zt2yag10.js} +1 -1
  281. package/dist/cli.js +10882 -10882
  282. package/dist/client/directive.js +1 -1
  283. package/dist/client/index.js +1 -1
  284. package/dist/client-helpers.js +1 -1
  285. package/dist/client-script-bundler.js +1 -1
  286. package/dist/client-script.js +1 -1
  287. package/dist/client.js +0 -86
  288. package/dist/component-hmr.js +1 -1
  289. package/dist/component-processing.js +1 -1
  290. package/dist/component-registry.js +1 -1
  291. package/dist/component-renderer.js +1 -1
  292. package/dist/components.js +1 -1
  293. package/dist/composables/index.js +1 -1
  294. package/dist/composables/use-battery.js +1 -1
  295. package/dist/composables/use-broadcast-channel.js +1 -1
  296. package/dist/composables/use-channel.js +1 -1
  297. package/dist/composables/use-clipboard.js +1 -1
  298. package/dist/composables/use-color-mode.js +1 -1
  299. package/dist/composables/use-cookie.js +1 -1
  300. package/dist/composables/use-device-orientation.js +1 -1
  301. package/dist/composables/use-event-listener.js +1 -1
  302. package/dist/composables/use-event-source.js +1 -1
  303. package/dist/composables/use-eye-dropper.js +1 -1
  304. package/dist/composables/use-fetch.js +1 -1
  305. package/dist/composables/use-fullscreen.js +1 -1
  306. package/dist/composables/use-geolocation.js +1 -1
  307. package/dist/composables/use-idle.js +1 -1
  308. package/dist/composables/use-intersection-observer.js +1 -1
  309. package/dist/composables/use-keyboard.js +1 -1
  310. package/dist/composables/use-media-query.js +1 -1
  311. package/dist/composables/use-meta.js +1 -1
  312. package/dist/composables/use-mouse.js +1 -1
  313. package/dist/composables/use-mutation-observer.js +1 -1
  314. package/dist/composables/use-network.js +1 -1
  315. package/dist/composables/use-notification.js +1 -1
  316. package/dist/composables/use-permissions.js +1 -1
  317. package/dist/composables/use-resize-observer.js +1 -1
  318. package/dist/composables/use-router.js +1 -1
  319. package/dist/composables/use-share.js +1 -1
  320. package/dist/composables/use-speech.js +1 -1
  321. package/dist/composables/use-storage.js +1 -1
  322. package/dist/composables/use-text-selection.js +3 -1
  323. package/dist/composables/use-timer.js +1 -1
  324. package/dist/composables/use-utilities.js +1 -1
  325. package/dist/composables/use-wake-lock.js +1 -1
  326. package/dist/composables/use-websocket.js +1 -1
  327. package/dist/composables/use-window.js +1 -1
  328. package/dist/composables.js +1 -1
  329. package/dist/composition-api.js +1 -1
  330. package/dist/computed.js +1 -1
  331. package/dist/conditionals.js +1 -1
  332. package/dist/config.js +1 -1
  333. package/dist/craft-bridge.js +1 -1
  334. package/dist/craft-compiler.js +1 -1
  335. package/dist/craft-components.js +1 -1
  336. package/dist/craft-entry.js +1 -1
  337. package/dist/craft-ssr.js +1 -1
  338. package/dist/csp.js +1 -1
  339. package/dist/csrf.js +1 -1
  340. package/dist/custom-directives.js +1 -1
  341. package/dist/defer.js +1 -1
  342. package/dist/deploy/config-generators.js +1 -1
  343. package/dist/deploy/index.js +1 -1
  344. package/dist/deploy/netlify.js +1 -1
  345. package/dist/dev-server/crosswind.js +1 -1
  346. package/dist/dev-server/index.js +1 -1
  347. package/dist/dev-server/keyboard-shortcuts.js +1 -1
  348. package/dist/dev-server/native-window.js +1 -1
  349. package/dist/dev-server/port-utils.js +1 -1
  350. package/dist/dev-server/serve-app.js +6 -1
  351. package/dist/dev-server/serve-file.js +6 -1
  352. package/dist/dev-server/serve-markdown.js +1 -1
  353. package/dist/dev-server/serve-multi.js +171 -1
  354. package/dist/dev-server/terminal-colors.js +1 -1
  355. package/dist/dev-server/theme-selector.js +1 -1
  356. package/dist/dev-server/types.js +1 -1
  357. package/dist/dev-server.js +1 -1
  358. package/dist/devtools.js +1 -1
  359. package/dist/directive-api.js +1 -1
  360. package/dist/docs.js +1 -1
  361. package/dist/doctor.js +1 -1
  362. package/dist/document-shell.js +1 -1
  363. package/dist/dynamic-components.js +1 -1
  364. package/dist/edge-runtime.js +1 -1
  365. package/dist/env.js +1 -1
  366. package/dist/error-boundaries.js +1 -1
  367. package/dist/error-handling.js +1 -1
  368. package/dist/errors/codes.js +1 -1
  369. package/dist/errors/formatter.js +1 -1
  370. package/dist/errors/index.js +1 -1
  371. package/dist/errors/logger.js +1 -1
  372. package/dist/errors/sanitizer.js +1 -1
  373. package/dist/errors/types.js +1 -1
  374. package/dist/events.js +1 -1
  375. package/dist/expressions.js +1 -1
  376. package/dist/formatter.js +1 -1
  377. package/dist/forms-validation.js +1 -1
  378. package/dist/forms.js +1 -1
  379. package/dist/head.js +1 -1
  380. package/dist/heatmap.js +1 -1
  381. package/dist/hot-reload.js +1 -1
  382. package/dist/html-masking.js +1 -1
  383. package/dist/hydration-runtime.js +1 -1
  384. package/dist/hydration.js +1 -1
  385. package/dist/i18n.js +1 -1
  386. package/dist/image-optimization/auto-sibling.js +1 -1
  387. package/dist/image-optimization/build-plugin.js +1 -1
  388. package/dist/image-optimization/component.js +1 -1
  389. package/dist/image-optimization/directive.js +1 -1
  390. package/dist/image-optimization/index.js +1 -1
  391. package/dist/image-optimization/processor.js +1 -1
  392. package/dist/image-optimization/serve.js +1 -1
  393. package/dist/includes.js +1 -1
  394. package/dist/index.js +1 -1
  395. package/dist/init.js +1 -1
  396. package/dist/inline-assets.js +1 -1
  397. package/dist/interactive.js +1 -1
  398. package/dist/internal-markdown.js +1 -1
  399. package/dist/island-chunking.js +1 -1
  400. package/dist/js-ts.js +1 -1
  401. package/dist/jsx-runtime.js +1 -1
  402. package/dist/keep-alive.js +1 -1
  403. package/dist/lazy-loader.js +1 -1
  404. package/dist/loading-indicator.js +1 -1
  405. package/dist/loops.js +1 -1
  406. package/dist/manifest.js +1 -1
  407. package/dist/markdown.js +1 -1
  408. package/dist/media/client/blur-up.js +1 -1
  409. package/dist/media/client/index.js +1 -1
  410. package/dist/media/client/lazy-load.js +1 -1
  411. package/dist/media/client/upload-handler.js +1 -1
  412. package/dist/media/image/component.js +1 -1
  413. package/dist/media/image/directive.js +1 -1
  414. package/dist/media/image/editing.js +1 -1
  415. package/dist/media/image/index.js +1 -1
  416. package/dist/media/image/placeholder.js +1 -1
  417. package/dist/media/image/processor/cache.js +1 -1
  418. package/dist/media/image/processor/index.js +1 -1
  419. package/dist/media/image/processor/optimizer.js +1 -1
  420. package/dist/media/image/processor/responsive.js +1 -1
  421. package/dist/media/image/srcset.js +1 -1
  422. package/dist/media/index.js +1 -1
  423. package/dist/media/manager/embed.js +1 -1
  424. package/dist/media/protected/component.js +1 -1
  425. package/dist/media/protected/index.js +1 -1
  426. package/dist/media/protected/signature.js +1 -1
  427. package/dist/media/shared/cache.js +1 -1
  428. package/dist/media/shared/hash.js +1 -1
  429. package/dist/media/shared/index.js +1 -1
  430. package/dist/media/upload/component.js +1 -1
  431. package/dist/media/upload/index.js +1 -1
  432. package/dist/media/video/directive.js +1 -1
  433. package/dist/media/video/index.js +1 -1
  434. package/dist/media/video/processor/cache.js +1 -1
  435. package/dist/media/video/processor/index.js +1 -1
  436. package/dist/media/video/processor/streaming.js +1 -1
  437. package/dist/media/video/processor/thumbnail.js +1 -1
  438. package/dist/media/video/processor/transcoder.js +1 -1
  439. package/dist/method-spoofing.js +1 -1
  440. package/dist/middleware.js +1 -1
  441. package/dist/misc-directives.js +1 -1
  442. package/dist/native-build.js +1 -1
  443. package/dist/parser/directive-parser.js +1 -1
  444. package/dist/parser/expression-parser.js +1 -1
  445. package/dist/parser/index.js +1 -1
  446. package/dist/parser/tokenizer.js +1 -1
  447. package/dist/partial-hydration.js +1 -1
  448. package/dist/performance-utils.js +1 -1
  449. package/dist/placeholder.js +1 -1
  450. package/dist/plugin-system.js +1 -1
  451. package/dist/plugin.js +1 -1
  452. package/dist/precompiler.js +1 -1
  453. package/dist/process.js +1 -1
  454. package/dist/production-build.js +1 -1
  455. package/dist/production-builder.js +1 -1
  456. package/dist/production-server.js +1 -1
  457. package/dist/props.js +1 -1
  458. package/dist/public-env.js +1 -1
  459. package/dist/pwa/audit.js +1 -1
  460. package/dist/pwa/directives.js +1 -1
  461. package/dist/pwa/icons.js +1 -1
  462. package/dist/pwa/index.js +1 -1
  463. package/dist/pwa/inject.js +1 -1
  464. package/dist/pwa/manifest.js +1 -1
  465. package/dist/pwa/offline.js +1 -1
  466. package/dist/pwa/precache.js +1 -1
  467. package/dist/pwa/service-worker.js +1 -1
  468. package/dist/pwa/workbox-strategies.js +1 -1
  469. package/dist/pwa/workbox.js +1 -1
  470. package/dist/pwa.js +426 -426
  471. package/dist/reactive-bindings.js +1 -1
  472. package/dist/reactive.js +1 -1
  473. package/dist/reactivity.js +1 -1
  474. package/dist/release.js +1 -1
  475. package/dist/render.js +1 -1
  476. package/dist/route-middleware.js +1 -1
  477. package/dist/router.js +1 -1
  478. package/dist/routes.js +1 -1
  479. package/dist/runtime-injection.js +1 -1
  480. package/dist/runtime.js +1 -1
  481. package/dist/safe-evaluator.js +1 -1
  482. package/dist/scaffolding.js +1 -1
  483. package/dist/screenshot.js +1 -1
  484. package/dist/script-classifier.js +1 -1
  485. package/dist/script-validation.js +1 -1
  486. package/dist/seo.js +1 -1
  487. package/dist/serve.js +1 -1
  488. package/dist/server-bindings.js +1 -1
  489. package/dist/server-components.js +1 -1
  490. package/dist/signal-processing.js +1 -1
  491. package/dist/signals-api.js +1 -1
  492. package/dist/signals.js +1 -1
  493. package/dist/site-builder/build.js +1 -1
  494. package/dist/site-builder/i18n.js +1 -1
  495. package/dist/site-builder/index.js +1 -1
  496. package/dist/site-builder/robots.js +1 -1
  497. package/dist/site-builder/router.js +1 -1
  498. package/dist/site-builder/seo.js +1 -1
  499. package/dist/site-builder/sitemap.js +1 -1
  500. package/dist/site-builder/theme.js +1 -1
  501. package/dist/slots.js +1 -1
  502. package/dist/source-maps.js +1 -1
  503. package/dist/spa-shell.js +1 -1
  504. package/dist/ssg.js +388 -388
  505. package/dist/ssr.js +1 -1
  506. package/dist/state-management.js +1 -1
  507. package/dist/store-imports.js +1 -1
  508. package/dist/store-loader.js +1 -1
  509. package/dist/stores-client.js +1 -1
  510. package/dist/story/addons.js +1 -1
  511. package/dist/story/analytics.js +1 -1
  512. package/dist/story/auto-stories.js +1 -1
  513. package/dist/story/bookmarks.js +1 -1
  514. package/dist/story/bun-test.js +1 -1
  515. package/dist/story/cli.js +1 -1
  516. package/dist/story/collect/analyzer.js +1 -1
  517. package/dist/story/collect/index.js +1 -1
  518. package/dist/story/collect/parser.js +1 -1
  519. package/dist/story/collect/scanner.js +1 -1
  520. package/dist/story/collect/tree.js +1 -1
  521. package/dist/story/commands/build.js +1 -1
  522. package/dist/story/commands/dev.js +1 -1
  523. package/dist/story/commands/index.js +1 -1
  524. package/dist/story/commands/preview.js +1 -1
  525. package/dist/story/compiled-output.js +1 -1
  526. package/dist/story/composition.js +1 -1
  527. package/dist/story/config-watcher.js +1 -1
  528. package/dist/story/config.js +1 -1
  529. package/dist/story/context.js +1 -1
  530. package/dist/story/controls/index.js +1 -1
  531. package/dist/story/crosswind.js +1 -1
  532. package/dist/story/desktop-preview.js +1 -1
  533. package/dist/story/docs-generator.js +1 -1
  534. package/dist/story/errors.js +1 -1
  535. package/dist/story/figma-export.js +1 -1
  536. package/dist/story/generator.js +1 -1
  537. package/dist/story/hmr.js +1 -1
  538. package/dist/story/hot-swap.js +1 -1
  539. package/dist/story/index.js +1 -1
  540. package/dist/story/interactions.js +1 -1
  541. package/dist/story/keyboard-shortcuts.js +1 -1
  542. package/dist/story/output.js +1 -1
  543. package/dist/story/performance.js +1 -1
  544. package/dist/story/presets.js +1 -1
  545. package/dist/story/props-validation.js +1 -1
  546. package/dist/story/renderer.js +1 -1
  547. package/dist/story/search-index.js +1 -1
  548. package/dist/story/search.js +1 -1
  549. package/dist/story/server.js +1 -1
  550. package/dist/story/setup.js +1 -1
  551. package/dist/story/snapshots.js +1 -1
  552. package/dist/story/testing.js +1 -1
  553. package/dist/story/theme.js +1 -1
  554. package/dist/story/ui/code-panel.js +1 -1
  555. package/dist/story/ui/controls-panel.js +1 -1
  556. package/dist/story/ui/index.js +1 -1
  557. package/dist/story/ui/navigation.js +1 -1
  558. package/dist/story/ui/preview.js +1 -1
  559. package/dist/story/visual-testing.js +1 -1
  560. package/dist/streaming.js +1 -1
  561. package/dist/strict-lint.js +1 -1
  562. package/dist/style-scoping.js +1 -1
  563. package/dist/suspense.js +1 -1
  564. package/dist/teleport.js +1 -1
  565. package/dist/template-compiler.js +1 -1
  566. package/dist/template-hydrator.js +1 -1
  567. package/dist/template-tag-balance.js +1 -1
  568. package/dist/testing.js +1 -1
  569. package/dist/transitions.js +1 -1
  570. package/dist/type-checker.js +1 -1
  571. package/dist/types/directive-types.js +1 -1
  572. package/dist/types/index.js +1 -1
  573. package/dist/types.js +1 -1
  574. package/dist/typescript-templates.js +1 -1
  575. package/dist/utils.js +1 -1
  576. package/dist/validator.js +1 -1
  577. package/dist/variable-extractor.js +1 -1
  578. package/dist/view-composers.js +1 -1
  579. package/dist/virtual-scrolling.js +1 -1
  580. package/dist/visual-editor.js +1 -1
  581. package/dist/vue-template.js +1 -1
  582. package/dist/web-components/css-scoping.js +1 -1
  583. package/dist/web-components/index.js +1 -1
  584. package/dist/web-components/reactive-generator.js +418 -1
  585. package/dist/web-components.js +1 -1
  586. package/dist/x-element.js +1 -1
  587. package/package.json +8 -7
  588. package/dist/chunk-0fmsckh1.js +0 -420
  589. package/dist/chunk-2t4gywvz.js +0 -3
  590. package/dist/chunk-2yw4e0h0.js +0 -3
  591. package/dist/chunk-32ka7sdc.js +0 -1
  592. package/dist/chunk-36jjen8k.js +0 -3
  593. package/dist/chunk-37q6x951.js +0 -3
  594. package/dist/chunk-3c7q2vbq.js +0 -3
  595. package/dist/chunk-3tk0sr6m.js +0 -3
  596. package/dist/chunk-5kjk30re.js +0 -3
  597. package/dist/chunk-6x5p7rhz.js +0 -3
  598. package/dist/chunk-73x9a59t.js +0 -3
  599. package/dist/chunk-9a7ce9v1.js +0 -3
  600. package/dist/chunk-9njgv29x.js +0 -3
  601. package/dist/chunk-9zkb2dsx.js +0 -3
  602. package/dist/chunk-bs7qttx8.js +0 -3
  603. package/dist/chunk-bxp8ps0f.js +0 -5
  604. package/dist/chunk-cnchhkk2.js +0 -3
  605. package/dist/chunk-cwjdwzn3.js +0 -3
  606. package/dist/chunk-d3at6tp3.js +0 -1
  607. package/dist/chunk-egn85zmj.js +0 -3
  608. package/dist/chunk-fcrwjh47.js +0 -3
  609. package/dist/chunk-ftq6q3nx.js +0 -3
  610. package/dist/chunk-fxfmwbny.js +0 -3
  611. package/dist/chunk-gfsk93gv.js +0 -246
  612. package/dist/chunk-h4k5wnbf.js +0 -3
  613. package/dist/chunk-kde1c2d4.js +0 -3
  614. package/dist/chunk-mf35r5h2.js +0 -3
  615. package/dist/chunk-mz4petzg.js +0 -3
  616. package/dist/chunk-qpg9jdqb.js +0 -3
  617. package/dist/chunk-r5rx348z.js +0 -3
  618. package/dist/chunk-rs2ejj8f.js +0 -3
  619. package/dist/chunk-s7fg0jy2.js +0 -3
  620. package/dist/chunk-s9hpp0gd.js +0 -3
  621. package/dist/chunk-sajzecge.js +0 -3
  622. package/dist/chunk-sfp05afy.js +0 -3
  623. package/dist/chunk-srq3dkj8.js +0 -3
  624. package/dist/chunk-sydw4nm4.js +0 -3
  625. package/dist/chunk-t6z4b0x6.js +0 -3
  626. package/dist/chunk-wh2szb9t.js +0 -3
  627. package/dist/chunk-xqq1vxb6.js +0 -1
  628. package/dist/chunk-xzjrrd36.js +0 -1
  629. package/dist/chunk-zx35qm5v.js +0 -3
@@ -1,246 +0,0 @@
1
- // @bun
2
- import{Ah as YJ,Ch as _J,Fh as zJ,sh as $J,uh as VJ,vh as KJ}from"./chunk-dgf2g708.js";import{Ji as uG,Li as UJ,Mi as LJ,Pi as pG}from"./chunk-8xbj6dqe.js";import{mm as $G,nm as vG,om as xG,pm as TG,qm as SG,rm as EG}from"./chunk-kyhq6hzp.js";import{On as mG}from"./chunk-ms9rebfj.js";import{io as wG,ko as DG}from"./chunk-f6s1jx8c.js";import{mo as IG}from"./chunk-snj1hfpb.js";import{po as tG,qo as eG,ro as GJ,so as JJ}from"./chunk-yywc3yge.js";import{yo as NG}from"./chunk-1k3k1tf8.js";import{ls as HJ,ms as AJ}from"./chunk-hz7qnpx1.js";import{os as QJ}from"./chunk-am5rtv86.js";import{Ct as kJ,Dt as cG,Et as RG,Ft as yG,Gt as BJ,Ht as WJ,It as OJ}from"./chunk-r3cxnszy.js";import{Ev as MJ,Lu as EJ,Mu as dG,Pv as LG,Su as oG,jv as UG,nu as BG,xu as FJ}from"./chunk-tzd81m7r.js";import{Zv as qJ}from"./chunk-nwfa5766.js";import{Lw as jJ}from"./chunk-v0s45ek4.js";import{Wy as ZJ}from"./chunk-9fj7hpwa.js";import{Gz as jG,Hz as MG,Lz as s}from"./chunk-0t75nh4z.js";import{Mz as G}from"./chunk-exfw0aqe.js";import{GA as iG}from"./chunk-xgmza98t.js";import{hB as aG}from"./chunk-gcsqn7x9.js";import{kB as nG,lB as NJ}from"./chunk-7t4hkmxb.js";import{sB as lG,uB as sG}from"./chunk-pjaa8q7x.js";import{xB as IJ}from"./chunk-b0w1cm1s.js";import{jE as m}from"./chunk-6r70w54p.js";import qG from"path";var{serve:vJ}=globalThis.Bun;import XG from"fs";import i from"path";async function xJ(S,B={}){let I=B.port||3000,y=B.watch!==!1,v=B.hotReload!==!1&&y,j=null,_=B.hmrPort||I+1,X=i.resolve(S);if(!XG.existsSync(X))return console.error(`${G.red}Error: File not found: ${G.bright}${X}${G.reset}`),!1;if(X.endsWith(".md"))return mG(X,B);else if(!X.endsWith(".stx"))return console.error(`${G.red}Error: Unsupported file type: ${G.bright}${X}${G.reset}. Only .stx and .md files are supported.`),!1;let C=i.join(process.cwd(),".stx/output");XG.mkdirSync(C,{recursive:!0}),console.log(`${G.blue}Building ${G.bright}${S}${G.reset}...`);let b=null,f=async()=>{try{let U={name:"public-assets",setup(O){O.onResolve({filter:/^\/(images|fonts|assets|public)\//},(H)=>{return{path:H.path,external:!0}})}},K=await Bun.build({entrypoints:[X],outdir:C,plugins:[U,kG],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...B.stxOptions});if(!K.success)return console.error(`${G.red}Build failed:${G.reset}`,K.logs),!1;let k=K.outputs.find((O)=>O.path.endsWith(".html"));if(!k)return console.error(`${G.red}No HTML output found${G.reset}`),!1;return b=await Bun.file(k.path).text(),!0}catch(U){return console.error(`${G.red}Error building stx file:${G.reset}`,U),!1}};if(!await f())return!1;let l=i.dirname(X);await jG(l);let R=I;try{if(R=await IG(I),R!==I)console.log(`${G.yellow}Port ${I} is busy, using port ${R} instead${G.reset}`)}catch{return console.error(`${G.red}Could not find an available port${G.reset}`),!1}if(v){let U=B.hmrPort||R+1;j=SG({wsPort:U,verbose:!1}),_=j.start(U)}let $={},Z=null;try{let{loadStxConfig:U}=await import("././index.js"),K=await U();if(K?.apiRouter)Z=K?.apiRouter,console.log(`${G.blue}Using custom router for API handling${G.reset}`);if(K?.apiRoutes){$=K.apiRoutes;let k=Object.keys($).length;if(k>0)console.log(`${G.blue}Loaded ${G.bright}${k} API route${k>1?"s":""}${G.reset}`)}if(K?.broadcasting?.enabled)try{let{startBroadcasting:k,loadChannels:Q}=await import("././broadcasting.js"),O=K.broadcasting;await k(O);let H=O.port??6001;console.log(`${G.magenta}Broadcasting on ${G.cyan}ws://localhost:${H}/ws${G.reset}`);let E=i.join(process.cwd(),"channels.ts");if(XG.existsSync(E))try{let V=await Q(E);console.log(`${G.blue}Loaded ${G.bright}${V} broadcast channel${V!==1?"s":""}${G.blue} from channels.ts${G.reset}`)}catch(V){console.warn(`${G.yellow}Failed to load channels.ts: ${V.message}${G.reset}`)}}catch(k){console.warn(`${G.yellow}Broadcasting failed to start: ${k.message}${G.reset}`)}}catch{}if(console.log(`${G.blue}Starting server on ${G.cyan}http://localhost:${R}/${G.reset}...`),v)console.log(`${G.magenta}Hot reload enabled on ws://localhost:${_}${G.reset}`);let M=vJ({port:R,async fetch(U){let K=new URL(U.url);if(Z)try{let E=await Z.handleRequest(U);if(E.status!==404)return E}catch{}if($[K.pathname])try{return await $[K.pathname](U)}catch(E){return new Response(JSON.stringify({error:E.message}),{status:500,headers:{"Content-Type":"application/json"}})}if(K.pathname==="/")return(async()=>{let V=await s(b||"");if(v)V=$G(V,_);if(B.native)if(V.includes("<head>"))V=V.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else if(V.includes("<html"))V=V.replace(/(<html[^>]*>)/,"$1<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>");else V="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+V;if(B.titlebarHidden)if(V.includes("<head>"))V=V.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else if(V.includes("<html"))V=V.replace(/(<html[^>]*>)/,"$1<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>");else V=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${V}`;return V})().then((V)=>new Response(V,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}}));let k=i.join(C,K.pathname);if(XG.existsSync(k)&&XG.statSync(k).isFile()){let E=Bun.file(k),V=i.extname(k).toLowerCase(),Y="text/plain";if(V===".ts"||V===".tsx"){let u=new Bun.Transpiler({loader:V===".tsx"?"tsx":"ts"}),n=await E.text(),WG=u.transformSync(n);return new Response(WG,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(V){case".html":Y="text/html";break;case".css":Y="text/css";break;case".js":Y="text/javascript";break;case".json":Y="application/json";break;case".png":Y="image/png";break;case".jpg":case".jpeg":Y="image/jpeg";break;case".gif":Y="image/gif";break;case".woff":Y="font/woff";break;case".woff2":Y="font/woff2";break;case".ttf":Y="font/ttf";break;case".otf":Y="font/otf";break;case".eot":Y="application/vnd.ms-fontobject";break}return new Response(E,{headers:{"Content-Type":Y}})}let Q=i.dirname(X),O=i.join(Q,K.pathname);if(XG.existsSync(O)&&XG.statSync(O).isFile()){let E=Bun.file(O),V=i.extname(O).toLowerCase(),Y="text/plain";if(V===".ts"||V===".tsx"){let u=new Bun.Transpiler({loader:V===".tsx"?"tsx":"ts"}),n=await E.text(),WG=u.transformSync(n);return new Response(WG,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(V){case".html":Y="text/html";break;case".css":Y="text/css";break;case".js":Y="text/javascript";break;case".json":Y="application/json";break;case".png":Y="image/png";break;case".jpg":case".jpeg":Y="image/jpeg";break;case".gif":Y="image/gif";break;case".svg":Y="image/svg+xml";break;case".ico":Y="image/x-icon";break;case".woff":Y="font/woff";break;case".woff2":Y="font/woff2";break;case".ttf":Y="font/ttf";break;case".otf":Y="font/otf";break;case".eot":Y="application/vnd.ms-fontobject";break}return new Response(E,{headers:{"Content-Type":Y}})}let H=i.join(process.cwd(),"public",K.pathname);if(XG.existsSync(H)&&XG.statSync(H).isFile()){let E=Bun.file(H),V=i.extname(H).toLowerCase(),Y="application/octet-stream";if(V===".ts"||V===".tsx"){let u=new Bun.Transpiler({loader:V===".tsx"?"tsx":"ts"}),n=await E.text(),WG=u.transformSync(n);return new Response(WG,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(V){case".html":Y="text/html";break;case".css":Y="text/css";break;case".js":Y="text/javascript";break;case".json":Y="application/json";break;case".png":Y="image/png";break;case".jpg":case".jpeg":Y="image/jpeg";break;case".gif":Y="image/gif";break;case".svg":Y="image/svg+xml";break;case".ico":Y="image/x-icon";break;case".woff":Y="font/woff";break;case".woff2":Y="font/woff2";break;case".ttf":Y="font/ttf";break;case".otf":Y="font/otf";break;case".eot":Y="application/vnd.ms-fontobject";break}return new Response(E,{headers:{"Content-Type":Y}})}return new Response("Not Found",{status:404})},error(U){return new Response(`<pre>${U}
3
- ${U.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),console.log(`
4
- ${G.blue}stx${G.reset} ${G.green}${process.env.stx_VERSION||"v0.0.10"}${G.reset} ${G.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${G.reset}`),console.log(`
5
- ${G.bright}\u2192 ${G.cyan}http://localhost:${R}/${G.reset}`),console.log(`
6
- ${G.yellow}Routes:${G.reset}`);let F=i.relative(process.cwd(),X);if(console.log(` ${G.green}\u2514\u2500 /${G.reset} \u2192 ${G.bright}${F}${G.reset}`),console.log(`
7
- Press ${G.cyan}h${G.reset} + ${G.cyan}Enter${G.reset} to show shortcuts`),NG(M.url.toString(),()=>{if(y)XG.watch(i.dirname(X),{recursive:!0}).close();M.stop()}),B.native){let U=await Bun.file(X).text(),K=DG(U);await wG(R,{title:i.basename(X,".stx"),titlebarHidden:B.titlebarHidden===!0,nativeSidebar:!!K,sidebarConfig:K})}if(y){let U=i.dirname(X);console.log(`${G.blue}Watching ${G.bright}${U}${G.reset} for changes...`);let K=XG.watch(U,{recursive:!0},async(k,Q)=>{if(!Q||TG(Q))return;if(xG(Q)){console.log(`${G.yellow}File ${G.bright}${Q}${G.yellow} changed, rebuilding...${G.reset}`),UG.clear(),LG();let O=await f();if(await MG(l),v&&j)if(O)j.reload(Q);else j.error("Build failed - check console for details")}else if(vG(Q)){if(console.log(`${G.cyan}CSS ${G.bright}${Q}${G.cyan} changed${G.reset}`),v&&j)j.updateCss(Q)}});process.on("SIGINT",()=>{if(K.close(),j)EG();M.stop(),process.exit(0)})}return!0}var{serve:TJ}=globalThis.Bun;import _G from"fs";import d from"path";function XJ(S){if(S.length===0)return"";if(S.length===1)return S[0];let B=S.map((y)=>y.split(d.sep)),I=[];for(let y=0;y<B[0].length;y++){let v=B[0][y];if(B.every((j)=>j[y]===v))I.push(v);else break}return I.join(d.sep)}async function SJ(S,B={}){let I=B.port||3000,y=B.watch!==!1;for(let $ of S){let Z=d.resolve($);if(!_G.existsSync(Z))return console.error(`${G.red}Error: File not found: ${G.bright}${Z}${G.reset}`),!1;if(!Z.endsWith(".stx")&&!Z.endsWith(".md"))return console.error(`${G.red}Error: Unsupported file type: ${G.bright}${Z}${G.reset}. Only .stx and .md files are supported.`),!1}let v=d.join(process.cwd(),".stx/output");_G.mkdirSync(v,{recursive:!0});let j=XJ(S.map(($)=>d.dirname(d.resolve($))));console.log(`${G.blue}Processing ${G.bright}${S.length}${G.reset} files...`);let _={},X=[],C=async()=>{try{for(let $ of S){let Z=d.resolve($);if(Z.endsWith(".md"))try{let{content:F,data:U}=await oG(Z,{markdown:{syntaxHighlighting:{serverSide:!0,enabled:!0,defaultTheme:dG.markdown?.syntaxHighlighting?.defaultTheme||"github-dark",highlightUnknownLanguages:!0}}}),K=B.markdown?.syntaxHighlighting||dG.markdown?.syntaxHighlighting,k=K?.defaultTheme||"github-dark",Q=["github-dark"],O=K?.additionalThemes||[],E=[...new Set([...Q,...O])].map((n)=>`<option value="${n}"${n===k?" selected":""}>${n}</option>`).join(`
8
- `),V=`
9
- <!DOCTYPE html>
10
- <html lang="en">
11
- <head>
12
- <meta charset="UTF-8">
13
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
14
- <title>${U.title||d.basename(Z)}</title>
15
- <!-- Syntax highlighting styles -->
16
- <style id="syntax-theme">
17
- :root {
18
- --shiki-color-text: #24292e;
19
- --shiki-color-background: #ffffff;
20
- --shiki-token-constant: #005cc5;
21
- --shiki-token-string: #032f62;
22
- --shiki-token-comment: #6a737d;
23
- --shiki-token-keyword: #d73a49;
24
- --shiki-token-parameter: #24292e;
25
- --shiki-token-function: #6f42c1;
26
- --shiki-token-string-expression: #032f62;
27
- --shiki-token-punctuation: #24292e;
28
- --shiki-token-link: #032f62;
29
- }
30
- pre {
31
- background-color: var(--shiki-color-background);
32
- padding: 1rem;
33
- border-radius: 4px;
34
- }
35
- code {
36
- color: var(--shiki-color-text);
37
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
38
- }
39
- .dark-mode {
40
- --shiki-color-text: #e1e4e8;
41
- --shiki-color-background: #24292e;
42
- --shiki-token-constant: #79b8ff;
43
- --shiki-token-string: #9ecbff;
44
- --shiki-token-comment: #6a737d;
45
- --shiki-token-keyword: #f97583;
46
- --shiki-token-parameter: #e1e4e8;
47
- --shiki-token-function: #b392f0;
48
- --shiki-token-string-expression: #9ecbff;
49
- --shiki-token-punctuation: #e1e4e8;
50
- --shiki-token-link: #9ecbff;
51
- }
52
- </style>
53
- <style>
54
- body {
55
- font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
56
- line-height: 1.6;
57
- color: #333;
58
- max-width: 800px;
59
- margin: 0 auto;
60
- padding: 2rem;
61
- }
62
- pre, code {
63
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
64
- }
65
- pre {
66
- border-radius: 4px;
67
- padding: 0;
68
- margin: 1.5rem 0;
69
- overflow-x: auto;
70
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
71
- }
72
- pre code {
73
- display: block;
74
- padding: 1rem;
75
- overflow-x: auto;
76
- }
77
- /* Apply background color to code blocks based on theme */
78
- pre.syntax-highlighter {
79
- background-color: var(--shiki-color-background) !important;
80
- }
81
- .dark-mode pre.syntax-highlighter {
82
- background-color: var(--shiki-color-background) !important;
83
- }
84
- code {
85
- padding: 0.2rem 0.4rem;
86
- border-radius: 3px;
87
- }
88
- h1, h2, h3, h4 {
89
- margin-top: 2rem;
90
- margin-bottom: 1rem;
91
- }
92
- h1 { color: #111; border-bottom: 1px solid #eee; padding-bottom: 0.5rem; }
93
- h2 { color: #333; border-bottom: 1px solid #f0f0f0; padding-bottom: 0.3rem; }
94
- h3 { color: #444; }
95
- img {
96
- max-width: 100%;
97
- border-radius: 4px;
98
- margin: 1rem 0;
99
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
100
- }
101
- blockquote {
102
- border-left: 4px solid #ddd;
103
- padding-left: 1rem;
104
- margin-left: 0;
105
- color: #555;
106
- background: #f9f9f9;
107
- padding: 0.5rem 1rem;
108
- margin: 1.5rem 0;
109
- }
110
- table {
111
- border-collapse: collapse;
112
- width: 100%;
113
- margin: 1.5rem 0;
114
- }
115
- th, td {
116
- border: 1px solid #ddd;
117
- padding: 0.5rem;
118
- }
119
- th {
120
- background: #f0f0f0;
121
- text-align: left;
122
- }
123
- tr:nth-child(even) {
124
- background-color: #f8f8f8;
125
- }
126
- a {
127
- color: #0066cc;
128
- text-decoration: none;
129
- }
130
- a:hover {
131
- text-decoration: underline;
132
- }
133
- hr {
134
- border: 0;
135
- border-top: 1px solid #eee;
136
- margin: 2rem 0;
137
- }
138
- .frontmatter {
139
- background: #f8f8f8;
140
- border-radius: 4px;
141
- padding: 1.5rem;
142
- margin-bottom: 2rem;
143
- font-size: 0.9rem;
144
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
145
- border-left: 4px solid #ddd;
146
- }
147
- .frontmatter-item {
148
- margin-bottom: 0.5rem;
149
- display: flex;
150
- }
151
- .frontmatter-label {
152
- font-weight: bold;
153
- min-width: 100px;
154
- color: #555;
155
- }
156
- ${tG()}
157
- </style>
158
- </head>
159
- <body>
160
- ${JJ(U)}
161
- ${eG(E)}
162
-
163
- ${F}
164
-
165
- <script>
166
- ${GJ()}
167
- </script>
168
- </body>
169
- </html>
170
- `,u=`/${d.relative(j,Z).replace(/\.md$/,"")}`;if(u.endsWith("/index"))u=u.slice(0,-6)||"/";_[u||"/"]={filePath:Z,content:V,fileType:"md"}}catch(F){console.error(`${G.red}Error processing Markdown file ${G.bright}${$}${G.reset}:`,F);continue}else{let F={name:"public-assets",setup(H){H.onResolve({filter:/^\/(images|fonts|assets|public)\//},(E)=>{return{path:E.path,external:!0}})}},U=await Bun.build({entrypoints:[Z],outdir:v,plugins:[F,kG],define:{"process.env.NODE_ENV":'"development"'},...B.stxOptions});if(!U.success){console.error(`${G.red}Build failed for ${G.bright}${$}${G.reset}:`,U.logs);continue}let K=U.outputs.find((H)=>H.path.endsWith(".html"));if(!K){console.error(`${G.red}No HTML output found for ${G.bright}${$}${G.reset}`);continue}let k=await Bun.file(K.path).text(),O=`/${d.relative(j,Z).replace(/\.stx$/,"")}`;if(O.endsWith("/index"))O=O.slice(0,-6)||"/";if(O.includes("[")){let H=[...O.matchAll(/\[([^\]]+)\]/g)].map((V)=>V[1]),E=O.replace(/\[([^\]]+)\]/g,"([^/]+)");X.push({pattern:new RegExp(`^${E}$`),paramNames:H,filePath:Z,routeTemplate:O,fileType:"stx"}),_[O]={filePath:Z,content:k,fileType:"stx"}}else _[O||"/"]={filePath:Z,content:k,fileType:"stx"}}}if(Object.keys(_).length===0)return console.error(`${G.red}No files were successfully processed${G.reset}`),!1;return!0}catch($){return console.error(`${G.red}Error processing files:${G.reset}`,$),!1}};if(!await C())return!1;let f=I;try{if(f=await IG(I),f!==I)console.log(`${G.yellow}Port ${I} is busy, using port ${f} instead${G.reset}`)}catch{return console.error(`${G.red}Could not find an available port${G.reset}`),!1}console.log(`${G.blue}Starting server on ${G.cyan}http://localhost:${f}/${G.reset}...`);let h=TJ({port:f,async fetch($){let Z=new URL($.url),M=d.join(process.cwd(),"public",Z.pathname);if(_G.existsSync(M)&&_G.statSync(M).isFile()){let K=Bun.file(M),k=d.extname(M).toLowerCase(),Q="application/octet-stream";if(k===".ts"||k===".tsx"){let O=new Bun.Transpiler({loader:k===".tsx"?"tsx":"ts"}),H=await K.text(),E=O.transformSync(H);return new Response(E,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(k){case".html":Q="text/html";break;case".css":Q="text/css";break;case".js":Q="text/javascript";break;case".json":Q="application/json";break;case".png":Q="image/png";break;case".jpg":case".jpeg":Q="image/jpeg";break;case".gif":Q="image/gif";break;case".svg":Q="image/svg+xml";break;case".ico":Q="image/x-icon";break;case".woff":Q="font/woff";break;case".woff2":Q="font/woff2";break;case".ttf":Q="font/ttf";break;case".otf":Q="font/otf";break;case".eot":Q="application/vnd.ms-fontobject";break}return new Response(K,{headers:{"Content-Type":Q}})}let F=_[Z.pathname];if(!F&&!Z.pathname.endsWith("/"))F=_[`${Z.pathname}/`];if(!F)for(let K of X){let k=Z.pathname.match(K.pattern);if(k){let Q=_[K.routeTemplate];if(Q){let O={};for(let V=0;V<K.paramNames.length;V++)O[K.paramNames[V]]=decodeURIComponent(k[V+1]);let H=Q.content,E=`<script>window.__routeParams = ${JSON.stringify(O)};</script>`;if(H.includes("</head>"))H=H.replace("</head>",`${E}
171
- </head>`);else H=E+H;F={...Q,content:H}}break}}if(F)return s(F.content).then((K)=>{if(K.includes("</head>"))K=K.replace("</head>",`${QJ}
172
- </head>`);return new Response(K,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})});let U=d.join(v,Z.pathname);if(_G.existsSync(U)&&_G.statSync(U).isFile()){let K=Bun.file(U),k=d.extname(U).toLowerCase(),Q="text/plain";if(k===".ts"||k===".tsx"){let O=new Bun.Transpiler({loader:k===".tsx"?"tsx":"ts"}),H=await K.text(),E=O.transformSync(H);return new Response(E,{headers:{"Content-Type":"application/javascript","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}switch(k){case".html":Q="text/html";break;case".css":Q="text/css";break;case".js":Q="text/javascript";break;case".json":Q="application/json";break;case".png":Q="image/png";break;case".jpg":case".jpeg":Q="image/jpeg";break;case".gif":Q="image/gif";break;case".svg":Q="image/svg+xml";break;case".ico":Q="image/x-icon";break;case".woff":Q="font/woff";break;case".woff2":Q="font/woff2";break;case".ttf":Q="font/ttf";break;case".otf":Q="font/otf";break;case".eot":Q="application/vnd.ms-fontobject";break}return new Response(K,{headers:{"Content-Type":Q}})}if(Z.pathname!=="/"&&_["/"]){let K=$.headers.get("X-STX-Router")==="true";return s(_["/"].content).then((k)=>{if(K){let Q=k.match(/<main[^>]*>([\s\S]*?)<\/main>/i);if(Q){let O=k.match(/<title[^>]*>([\s\S]*?)<\/title>/i),E=`<!DOCTYPE html><html><head><title>${O?O[1]:""}</title></head><body><main>${Q[1]}</main></body></html>`;return new Response(E,{headers:{"Content-Type":"text/html","X-STX-Partial":"true","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}return new Response(k,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})})}return new Response("Not Found",{status:404})},error($){return new Response(`<pre>${$}
173
- ${$.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});console.clear(),console.log(`
174
- ${G.blue}stx${G.reset} ${G.green}${process.env.stx_VERSION||"v0.0.10"}${G.reset} ${G.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${G.reset}`),console.log(`
175
- ${G.bright}\u2192 ${G.cyan}http://localhost:${f}/${G.reset}`),console.log(`
176
- ${G.yellow}Routes:${G.reset}`);let l=new Set(X.map(($)=>$.routeTemplate)),R=Object.entries(_).filter(([$])=>!l.has($)).sort(([$],[Z])=>$.localeCompare(Z)).map(([$,Z])=>({route:$==="/"?"/":$,filePath:d.relative(process.cwd(),Z.filePath),fileType:Z.fileType}));for(let $ of X){let Z=$.routeTemplate.replace(/\[([^\]]+)\]/g,":$1");R.push({route:Z,filePath:d.relative(process.cwd(),$.filePath),fileType:"stx"})}if(R.sort(($,Z)=>$.route.localeCompare(Z.route)),R.forEach(($,Z)=>{let F=Z===R.length-1?"\u2514\u2500 ":"\u251C\u2500 ",U=$.fileType==="md"?`${G.magenta}(markdown)${G.reset}`:"";console.log(` ${G.green}${F}${$.route}${G.reset} \u2192 ${G.bright}${$.filePath}${G.reset} ${U}`)}),console.log(`
177
- Press ${G.cyan}h${G.reset} + ${G.cyan}Enter${G.reset} to show shortcuts`),NG(h.url.toString(),()=>{if(y)_G.watch(j,{recursive:!0}).close();h.stop()}),y){console.log(`${G.blue}Watching for changes...${G.reset}`);let $=_G.watch(j,{recursive:!0},async(Z,M)=>{if(!M)return;if(M.endsWith(".stx")||M.endsWith(".js")||M.endsWith(".ts")||M.endsWith(".md"))console.log(`${G.yellow}File ${G.bright}${M}${G.yellow} changed, rebuilding...${G.reset}`),UG.clear(),LG(),await C()});process.on("SIGINT",()=>{$.close(),h.stop(),process.exit(0)})}return!0}var{serve:RJ}=globalThis.Bun;import a from"fs";import D from"path";function hG(S){let B=Bun.file(S),I=D.extname(S).toLowerCase(),y={".html":"text/html",".css":"text/css",".js":"text/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"},j=[".js",".css",".json"].includes(I)?{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}:{};return new Response(B,{headers:{"Content-Type":y[I]||"application/octet-stream",...j}})}async function yJ(S=".",B={}){let I=B.port||3000,y=B.watch!==!1,v=B.hotReload!==!1&&y,j=null,_=B.hmrPort||I+1,X=D.resolve(S),{loadStxConfig:C}=await import("././index.js"),b=await C(X),f=b.root&&b.root!=="."?D.join(X,b.root):X,h=b.pagesDir||"pages",l=D.join(f,h);if(!a.existsSync(l))return console.error(`${G.red}Error: No '${h}' directory found in ${G.bright}${f}${G.reset}`),console.log(`${G.dim}Create a ${h}/ directory with .stx files to define your routes.${G.reset}`),console.log(`${G.dim}Example: ${h}/index.stx for the homepage.${G.reset}`),!1;let R=uG(f);if(R.length===0)return console.error(`${G.red}Error: No page files found in ${G.bright}${l}${G.reset}`),!1;console.log(`${G.blue}Found ${G.bright}${R.length}${G.blue} routes${G.reset}`);let $=b?._pluginPageDirs||[],Z=[];for(let{dir:J,prefix:L}of $)if(a.existsSync(J)){let N=uG(D.dirname(J),{pagesDir:D.basename(J)});for(let A of N){let q=L==="/"?A.pattern:`${L}${A.pattern==="/"?"":A.pattern}`;Z.push({route:{...A,pattern:q},prefix:L})}if(N.length>0)console.log(`${G.blue}Plugin pages: ${G.bright}${N.length}${G.blue} routes at ${G.cyan}${L}${G.reset}`)}let M=new Map,F=null,U=null;if(B.stxOptions?.shell!==!1){if(U=await kJ(X,B.stxOptions?.shell),U){if(F=await cG(U,B.stxOptions||{}),F)console.log(`${G.blue}Using app shell: ${G.bright}${D.relative(X,U)}${G.reset} ${G.dim}(deprecated: use layouts/default.stx instead)${G.reset}`)}}$J(),await _J(X);let K=YJ();if(K.length>0)console.log(`${G.blue}Loaded ${G.bright}${K.length}${G.blue} middleware: ${G.dim}${K.join(", ")}${G.reset}`);let k={},Q=null;try{let{loadStxConfig:J}=await import("././index.js"),L=await J(X);if(L?.apiRouter)Q=L?.apiRouter,console.log(`${G.blue}Using custom router for API handling${G.reset}`);if(L?.apiRoutes){k=L.apiRoutes;let N=Object.keys(k).length;if(N>0)console.log(`${G.blue}Loaded ${G.bright}${N} API route${N>1?"s":""}${G.reset}`)}if(L?.broadcasting?.enabled)try{let{startBroadcasting:N,loadChannels:A}=await import("././broadcasting.js"),q=L.broadcasting;await N(q);let o=q.port??6001;console.log(`${G.magenta}Broadcasting on ${G.cyan}ws://localhost:${o}/ws${G.reset}`);let r=D.join(process.cwd(),"channels.ts");if(a.existsSync(r))try{let VG=await A(r);console.log(`${G.blue}Loaded ${G.bright}${VG} broadcast channel${VG!==1?"s":""}${G.blue} from channels.ts${G.reset}`)}catch(VG){console.warn(`${G.yellow}Failed to load channels.ts: ${VG.message}${G.reset}`)}}catch(N){console.warn(`${G.yellow}Broadcasting failed to start: ${N.message}${G.reset}`)}}catch{}let O=D.join(X,".stx/output");a.mkdirSync(O,{recursive:!0});let H=new Map,E=new Set,V=async(J)=>{let L=UJ(l,J);if(!L)return null;try{let N=await Bun.build({entrypoints:[L],outdir:O,plugins:[kG],publicPath:"/",define:{"process.env.NODE_ENV":'"development"'},...B.stxOptions});if(!N.success)return null;let A=N.outputs.find((q)=>q.path.endsWith(".html"));if(!A)return null;return await Bun.file(A.path).text()}catch{return null}},Y=async(J,L)=>{try{let{processDirectives:N,extractVariables:A,defaultConfig:q,loadStxConfig:o,injectRouterScript:r}=await import("././index.js"),{checkCache:VG,cacheTemplate:PG,readFileCached:p,templateCache:HG}=await import("././caching.js"),AG=await o(X),W=(x)=>{if(!x)return x;if(D.isAbsolute(x))return x;return D.resolve(X,x)},w={...q,...AG,...B.stxOptions,autoShell:!0};if(B.debugDirectives)w.debug=!0;w.partialsDir=W(w.partialsDir),w.componentsDir=W(w.componentsDir),w.layoutsDir=W(w.layoutsDir),w.storesDir=W(w.storesDir||"stores"),w.cachePath=W(w.cachePath||".stx/cache");let T=!L&&!B.profile,z=w.cache!==!1;if(z&&T){let x=HG.get(J.filePath);if(x)try{if((await a.promises.stat(J.filePath)).mtime.getTime()<=x.mtime){let YG=!0;for(let c of x.dependencies){if(!a.existsSync(c)){YG=!1;break}if((await a.promises.stat(c)).mtime.getTime()>x.mtime){YG=!1;break}}if(YG){let c=x.output;if(F)c=yG(c,{preserveHead:!0});return{route:J,content:c}}}}catch{}let JG=await VG(J.filePath,w);if(JG){let QG=JG;if(F)QG=yG(QG,{preserveHead:!0});return{route:J,content:QG}}}let g=z?await p(J.filePath):await Bun.file(J.filePath).text(),{classifyAllScripts:t}=await import("././index.js"),P=t(g),e=P.server.map((x)=>x.content),KG=g;for(let x of P.server)KG=KG.replace(x.fullTag,"");let GG={__filename:J.filePath,__dirname:D.dirname(J.filePath),params:L??{}},{resetHead:wJ}=await import("././head.js");wJ();for(let x of e)try{await A(x,GG,J.filePath)}catch(JG){if(B.stxOptions?.debug)console.error("[stx] variable extraction error",J.filePath,JG?.message||JG)}let fG=new Set,ZG;if(B.profile){let x=performance.now();ZG=await N(KG,GG,J.filePath,w,fG);let JG=performance.now()-x,QG=D.relative(X,J.filePath)||J.filePath;console.log(`[stx:profile] ${QG} \u2192 ${JG.toFixed(2)}ms`)}else ZG=await N(KG,GG,J.filePath,w,fG);if(!F)ZG=await r(ZG);{let{interpolateScriptExpressions:x}=await import("././expressions.js");ZG=ZG.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/g,(JG,QG,YG)=>{if(!/function\s+__stx_setup_/.test(YG))return JG;return`<script${QG}>${x(YG,GG)}</script>`})}if(F)ZG=yG(ZG,{preserveHead:!0});if(z&&T)await PG(J.filePath,ZG,fG,w);let{extractStreamBoundaries:DJ}=await import("././streaming.js"),OG=DJ(GG),FG=GG.__streamTemplates;if(FG&&typeof FG==="object"&&Object.keys(FG).length>0){let x=GG.streamBoundaries||{},JG={...w,autoShell:!1},QG=Object.keys(FG).map((c)=>({id:c,render:async()=>{let rG=typeof x[c]==="function"?await x[c]():void 0;return N(FG[c],{...GG,$boundary:rG},J.filePath,JG,new Set)}})),YG=new Set(QG.map((c)=>c.id));OG=[...(OG||[]).filter((c)=>!YG.has(c.id)),...QG]}if(OG&&OG.length>0)E.add(J.pattern);else OG=void 0;return{route:J,content:ZG,boundaries:OG}}catch(N){return console.error(`${G.red}Error building ${G.bright}${J.pattern}${G.reset}:`,N),null}},u=8,n=async()=>{H.clear(),M.clear();for(let J=0;J<R.length;J+=u){let L=R.slice(J,J+u),N=await Promise.all(L.map((A)=>Y(A)));for(let A of N)if(A)H.set(A.route.pattern,A)}for(let J=0;J<Z.length;J+=u){let L=Z.slice(J,J+u),N=await Promise.all(L.map(({route:A})=>Y(A)));for(let A of N)if(A)M.set(A.route.pattern,A)}return H.size>0};if(console.log(`${G.blue}Building pages...${G.reset}`),!await n())return console.error(`${G.red}No pages were successfully built${G.reset}`),!1;await jG(X);let zG=I;try{if(zG=await IG(I),zG!==I)console.log(`${G.yellow}Port ${I} is busy, using port ${zG} instead${G.reset}`)}catch{return console.error(`${G.red}Could not find an available port${G.reset}`),!1}if(v){let J=B.hmrPort||zG+1;j=SG({wsPort:J,verbose:!1}),_=j.start(J)}let CG=(J,L)=>{let N=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._rp=${JSON.stringify(L)};if(s.setRouteParams)s.setRouteParams(s._rp);})()</script>`;if(J.includes("</head>"))return J.replace("</head>",`${N}</head>`);if(J.includes("<body"))return J.replace(/<body([^>]*)>/,`<body$1>${N}`);return N+J};console.log(`${G.blue}Starting server...${G.reset}`);let bG=RJ({port:zG,async fetch(J){let L=new URL(J.url),N=b?.publicDir||"public",A=D.join(X,N,L.pathname),q=D.join(X,L.pathname),o=D.join(O,L.pathname),[r,VG,PG]=await Promise.all([a.promises.stat(A).catch(()=>null),a.promises.stat(q).catch(()=>null),a.promises.stat(o).catch(()=>null)]);if(r?.isFile())return hG(A);if(VG?.isFile())return hG(q);if(PG?.isFile())return hG(o);if(L.pathname.startsWith("/_stx/component/")){let W=decodeURIComponent(L.pathname.slice(16));if(W)try{let w=`<${W} />`,T={...buildConfig,autoShell:!1},z=await processDirectives(w,{},D.join(X,"components",`${W}.stx`),T,new Set);return new Response(z,{headers:{"Content-Type":"text/html"}})}catch(w){return new Response(`<div class="stx-async-error">${w.message}</div>`,{status:500,headers:{"Content-Type":"text/html"}})}}if(L.pathname==="/_stx/img"){let{handleImageRequest:W}=await import("./image-optimization/serve.js"),w=await W(J,{publicDir:D.join(X,N),cacheDir:D.join(X,".stx/cache/img")});if(w)return w}if(Q)try{let W=await Q.handleRequest(J);if(W.status!==404)return W}catch{}if(k[L.pathname])try{return await k[L.pathname](J)}catch(W){return new Response(JSON.stringify({error:W.message}),{status:500,headers:{"Content-Type":"application/json"}})}let p=pG(L.pathname,R);if(p){let W=H.get(p.route.pattern),w=E.has(p.route.pattern);if(p.route.isDynamic&&Object.keys(p.params).length>0||w){let T=await Y(p.route,p.params);if(T)W=T}if(W){let T=ZJ();if(T.validate){if(!await T.validate({params:p.params})){let t=await V(404);if(t){let P=t;if(P=await s(P,X),v)P=$G(P,_);return new Response(P,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}}if(T.middleware){let g=KJ(L.pathname,p.params,T,L.search),t=VJ(g,null,J),P=await zJ(T.middleware,t);if(P.redirect){let e=P.redirect.path,KG=P.redirect.options.redirectCode||302,GG=new Headers(P.responseHeaders);return GG.set("Location",e),new Response(null,{status:KG,headers:GG})}if(P.abort){let{statusCode:e,message:KG}=P.abort.error;return new Response(`<!DOCTYPE html><html><head><title>Error ${e}</title></head><body><h1>Error ${e}</h1><p>${KG}</p></body></html>`,{status:e,headers:{"Content-Type":"text/html"}})}if(Object.keys(P.state).length>0){let e=`<script>(function(){var s=typeof stx!=='undefined'?stx:{};s._ms=${JSON.stringify(P.state)};if(s.setMiddlewareState)s.setMiddlewareState(s._ms);})()</script>`;W.content=W.content.replace("</head>",`${e}</head>`)}}let z=W.content;if(F&&BJ(J)){let g=OJ(z),t=z.match(/<title[^>]*>([\s\S]*?)<\/title>/i),P=t?t[1].trim():"";if(Object.keys(p.params).length>0)z=CG(z,p.params);z=await s(z,X);let e=b?.router?.container||"main";return z=WJ(z,e),new Response(z,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true","X-STX-Layout":g.layout,"X-STX-Layout-Group":g.group,...P&&{"X-STX-Title":encodeURIComponent(P)},"Cache-Control":"no-store, no-cache, must-revalidate"}})}if(F)z=RG(F,z);if(Object.keys(p.params).length>0)z=CG(z,p.params);if(z=await s(z,X),v)z=$G(z,_);if(B.native)if(z.includes("<head>"))z=z.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else z="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+z;if(B.titlebarHidden)if(z.includes("<head>"))z=z.replace("<head>","<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script>");else z=`<head><style>html.stx-titlebar-hidden .stx-traffic-lights-dot{visibility:hidden}</style><script>document.documentElement.classList.add('stx-titlebar-hidden')</script></head>${z}`;if(W.boundaries&&W.boundaries.length>0){let{renderStreamingPage:g,streamToResponse:t}=await import("././streaming.js");return t(g(z,W.boundaries,{timeoutMs:30000}),{headers:{"Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}return new Response(z,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}if(Z.length>0){let W=Z.map((T)=>T.route),w=pG(L.pathname,W);if(w){let T=M.get(w.route.pattern);if(T){let z=T.content;if(F)z=RG(F,z);if(Object.keys(w.params).length>0)z=CG(z,w.params);if(z=await s(z,X),v)z=$G(z,_);return new Response(z,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}for(let{prefix:T}of $)if(T!=="/"&&L.pathname.startsWith(T)){let z=M.get(T)||M.get(T+"/");if(z){let g=z.content;if(F)g=RG(F,g);if(g=await s(g,X),v)g=$G(g,_);return new Response(g,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}}}let HG=H.get("/");if(HG){let W=HG.content;if(W=await s(W,X),v)W=$G(W,_);if(B.native)if(W.includes("<head>"))W=W.replace("<head>","<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script>");else W="<head><style>[data-stx-sidebar],.stx-sidebar{display:none!important}</style><script>window.__craftNativeSidebar=true;document.documentElement.classList.add('has-native-sidebar')</script></head>"+W;return new Response(W,{headers:{"Content-Type":"text/html","Cache-Control":"no-store, no-cache, must-revalidate",Pragma:"no-cache",Expires:"0"}})}let AG=await V(404);if(AG){let W=AG;if(W=await s(W,X),v)W=$G(W,_);return new Response(W,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})},async error(J){let L=await V(500);if(L)return new Response(L,{status:500,headers:{"Content-Type":"text/html"}});return new Response(`<pre>${J}
178
- ${J.stack}</pre>`,{headers:{"Content-Type":"text/html"}})}});if(console.clear(),console.log(`
179
- ${G.blue}stx${G.reset} ${G.green}${process.env.stx_VERSION||"v0.0.10"}${G.reset} ${G.dim}ready in ${Math.random()*10+5|0}.${Math.random()*90+10|0} ms${G.reset}`),console.log(`
180
- ${G.bright}\u2192 ${G.cyan}http://localhost:${zG}/${G.reset}`),v)console.log(`${G.dim} HMR: ws://localhost:${_}${G.reset}`);console.log(`
181
- ${G.yellow}Routes:${G.reset}`);let gG=[...LJ(R,X)];for(let{route:J}of Z)gG.push(`${J.pattern}`);if(gG.forEach((J,L)=>{let A=L===gG.length-1?"\u2514\u2500 ":"\u251C\u2500 ";console.log(` ${G.green}${A}${G.reset}${J}`)}),console.log(`
182
- Press ${G.cyan}h${G.reset} + ${G.cyan}Enter${G.reset} to show shortcuts`),NG(bG.url.toString(),()=>{if(j)EG();bG.stop()}),B.native){let J,L=D.join(l,"index.stx");if(a.existsSync(L)){let A=await Bun.file(L).text();J=DG(A)}let N=b?.app?.window??{};await wG(zG,{title:b?.app?.head?.title||D.basename(X)||"stx App",width:N.width,height:N.height,darkMode:N.darkMode,hotReload:N.hotReload,titlebarHidden:N.titlebarHidden??B.titlebarHidden===!0,nativeSidebar:!!J,sidebarConfig:J})}if(y){console.log(`${G.blue}Watching for changes...${G.reset}`);let J=(A)=>{return A.startsWith("public/")||A.startsWith("public\\")},L=(A)=>{let q=A.toLowerCase();return q.endsWith(".stx")||q.endsWith(".html")||q.endsWith(".md")},N=a.watch(X,{recursive:!0},async(A,q)=>{if(!q||TG(q))return;if(xG(q))if(J(q)){if(console.log(`${G.cyan}${q} changed${G.reset}`),v&&j)j.reload(q)}else if(L(q)){console.log(`${G.yellow}${q} changed, rebuilding...${G.reset}`),UG.clear(),LG();try{let{invalidateFileCache:o,templateCache:r}=await import("././caching.js");o(D.resolve(X,q)),r.delete(D.resolve(X,q))}catch{}if(U&&q){if(D.resolve(X,q)===U||D.basename(U)===q){let r=await cG(U,B.stxOptions||{});if(r)F=r}}if(await n(),await MG(X),v&&j)j.reload(q)}else{console.log(`${G.yellow}${q} changed, rebuilding...${G.reset}`),UG.clear(),LG();try{let{invalidateFileCache:o,templateCache:r}=await import("././caching.js");o(D.resolve(X,q)),r.delete(D.resolve(X,q))}catch{}if(await n(),v&&j)j.reload(q)}else if(vG(q)){if(console.log(`${G.cyan}CSS ${q} changed${G.reset}`),v&&j)j.updateCss(q)}});process.on("SIGINT",()=>{if(N.close(),j)EG();bG.stop(),process.exit(0)})}return!0}var cX={};var kG={name:"bun-plugin-stx",async setup(S){let I={...await EJ(),...S.config?.stx},y=new Set,v=I.webComponents?.enabled?`./${qG.relative(qG.dirname(S.config?.outdir||"dist"),I.webComponents.outputDir||"dist/web-components")}`:"/web-components",j=[];if(I.webComponents?.enabled)try{let _=await FJ(I,y);if(j.push(..._),I.debug&&_.length>0)console.log(`Successfully built ${_.length} web components`)}catch(_){console.error("Failed to build web components:",_)}S.onLoad({filter:/\.stx$/},async({path:_})=>{try{let X=new Set;if(I.cache&&I.cachePath){let Z=await HJ(_,I);if(Z){if(I.debug)console.log(`Using cached version of ${_}`);return{contents:Z,loader:"html"}}}let C=await aG(()=>Bun.file(_).text(),"",(Z)=>{throw new sG(`Failed to read stx file: ${_}`,_,void 0,void 0,`File read error: ${Z.message}`)});if(!C)throw new sG(`stx file is empty: ${_}`,_);let{scriptContent:b,templateContent:f,allScripts:h}=iG.time("script-extraction",()=>{let Z=C,M=C.match(/<template\b(?![^>]*(?:\b(?:id|x-for|x-if|@for|@if|:for|:if)\s*=|\s#[\w-]|\bv-slot|\bslot\s*=))[^>]*>([\s\S]*?)<\/template>/i);if(M)Z=M[1].trim();let F=C.match(/<script\b[^>]*>[\s\S]*?<\/script>/gi)||[],U="",K=[];for(let Q of F){let O=Q.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i)?.[1]||"",H=Q.match(/<script\b([^>]*)>/i),E=H?H[1]:"";if(/\bserver\b/i.test(E))U=O;else K.push(Q)}let k=Z.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"");return{scriptContent:U,templateContent:k,allScripts:K}}),l={__filename:_,__dirname:qG.dirname(_),__stx:{webComponentsPath:v,builtComponents:j}};await aG(()=>qJ(b,l,_),void 0,(Z)=>{let M=new lG(`Script execution failed in ${_}: ${Z.message}`,_,void 0,void 0,b.substring(0,100));if(nG.log(M,{filePath:_,scriptContent:b}),I.debug)throw M});let $=await iG.timeAsync("directive-processing",async()=>{return await MJ(f,l,_,I,X)});if(h.length>0){let{interpolateScriptsInTemplate:Z}=await import("././expressions.js"),M=Z(h.join(`
183
- `),l),F=$.search(/<\/body>/i);if(F!==-1)$=$.slice(0,F)+M+`
184
- `+$.slice(F);else $+=`
185
- ${M}`}if($=await jJ($),X.forEach((Z)=>y.add(Z)),I.cache&&I.cachePath){if(await AJ(_,$,X,I),I.debug)console.log(`Cached template ${_} with ${X.size} dependencies`)}return{contents:$,loader:"html"}}catch(X){let C=X instanceof Error?X:new lG(`Plugin processing failed: ${String(X)}`,_);if(nG.log(C,{filePath:_,buildConfig:S.config}),NJ.logDetailedError(C,{filePath:_,plugin:"bun-plugin-stx"}),I.debug)console.error("stx Plugin Error:",C);let b=C,f=b.line||null,h=b.context||null;return{contents:I.debug||IJ()?`<!DOCTYPE html>
186
- <html lang="en">
187
- <head>
188
- <meta charset="UTF-8">
189
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
190
- <title>stx Rendering Error</title>
191
- <style>
192
- body { font-family: system-ui, -apple-system, sans-serif; max-width: 800px; margin: 40px auto; padding: 20px; line-height: 1.6; }
193
- .error-header { color: #dc3545; border-left: 4px solid #dc3545; padding-left: 16px; margin-bottom: 24px; }
194
- .error-details { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 16px; margin: 16px 0; }
195
- .error-code { background: #2d3748; color: #e2e8f0; padding: 16px; border-radius: 8px; overflow-x: auto; font-family: 'Monaco', 'Menlo', monospace; font-size: 14px; }
196
- .help-section { background: #e3f2fd; border-left: 4px solid #2196f3; padding: 16px; margin-top: 24px; }
197
- .file-path { font-family: monospace; background: #f1f3f4; padding: 2px 6px; border-radius: 4px; }
198
- </style>
199
- </head>
200
- <body>
201
- <div class="error-header">
202
- <h1>stx Template Error</h1>
203
- <p>An error occurred while processing your stx template.</p>
204
- </div>
205
-
206
- <div class="error-details">
207
- <h3>Error Details</h3>
208
- <p><strong>File:</strong> <span class="file-path">${BG(_)}</span></p>
209
- <p><strong>Error:</strong> ${BG(C.message)}</p>
210
- ${f?`<p><strong>Line:</strong> ${BG(String(f))}</p>`:""}
211
- ${h?`<p><strong>Context:</strong> ${BG(String(h))}</p>`:""}
212
- </div>
213
-
214
- ${C.stack?`
215
- <div class="error-details">
216
- <h3>Stack Trace</h3>
217
- <pre class="error-code">${BG(C.stack)}</pre>
218
- </div>`:""}
219
-
220
- <div class="help-section">
221
- <h3>Troubleshooting Tips</h3>
222
- <ul>
223
- <li>Check the syntax of your stx directives (e.g., @if, @foreach)</li>
224
- <li>Verify that all variables used in the template are properly defined</li>
225
- <li>Ensure script tags have valid JavaScript/TypeScript syntax</li>
226
- <li>Run <code>stx debug ${BG(qG.basename(_))}</code> for detailed analysis</li>
227
- <li>Enable debug mode in your stx config for more detailed error messages</li>
228
- </ul>
229
- </div>
230
- </body>
231
- </html>`:`<!DOCTYPE html>
232
- <html lang="en">
233
- <head>
234
- <meta charset="UTF-8">
235
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
236
- <title>Error</title>
237
- <style>
238
- body { font-family: system-ui, -apple-system, sans-serif; max-width: 600px; margin: 80px auto; padding: 20px; text-align: center; color: #333; }
239
- </style>
240
- </head>
241
- <body>
242
- <h1>Something went wrong</h1>
243
- <p>An internal error occurred. Please try again later.</p>
244
- </body>
245
- </html>`,loader:"html"}}})}},t0=kG;
246
- export{kG as tf,t0 as uf,xJ as vf,XJ as wf,SJ as xf,yJ as yf,cX as zf};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function G(){if(typeof window>"u")return null;return window.SpeechRecognition||window.webkitSpeechRecognition||null}function V(){return G()!==null}function R(I={}){let F=G(),w=F!==null,q={isListening:!1,transcript:"",finalTranscript:"",interimTranscript:"",confidence:0,isSupported:w,error:null},z=null,Q=[],J={result:[],error:[],start:[],end:[]},K=()=>{Q.forEach((A)=>A(q))},P=(A,H)=>{J[A]?.forEach((j)=>j(H))};if(w&&F){if(z=new F,z.continuous=I.continuous??!1,z.interimResults=I.interimResults??!0,z.lang=I.lang??"en-US",z.maxAlternatives=I.maxAlternatives??1,I.grammars)z.grammars=I.grammars;z.onstart=()=>{q={...q,isListening:!0,error:null},K(),P("start")},z.onresult=(A)=>{let H="",j="",D=0;for(let B=0;B<A.results.length;B++){let N=A.results[B],W=N[0].transcript;if(D=Math.max(D,N[0].confidence||0),N.isFinal)H+=W;else j+=W}q={...q,finalTranscript:q.finalTranscript+H,interimTranscript:j,transcript:q.finalTranscript+H+j,confidence:D},K(),P("result",{transcript:q.transcript,finalTranscript:q.finalTranscript,interimTranscript:j,confidence:D,isFinal:H.length>0})},z.onerror=(A)=>{let H=C(A.error);q={...q,error:H,isListening:!1},K(),P("error",{code:A.error,message:H})},z.onend=()=>{q={...q,isListening:!1},K(),P("end",{transcript:q.transcript})}}let X=()=>{if(!w||!z||q.isListening)return;q={...q,transcript:"",finalTranscript:"",interimTranscript:"",confidence:0,error:null};try{z.start()}catch(A){q={...q,error:"Failed to start speech recognition"},K()}},Y=()=>{if(!z||!q.isListening)return;try{z.stop()}catch{}};return{get:()=>q,subscribe:(A)=>{return Q.push(A),A(q),()=>{Q=Q.filter((H)=>H!==A)}},start:X,stop:Y,abort:()=>{if(!z)return;try{z.abort()}catch{}q={...q,isListening:!1},K()},toggle:()=>{if(q.isListening)Y();else X()},isSupported:()=>w,on:(A,H)=>{if(J[A])return J[A].push(H),()=>{J[A]=J[A].filter((j)=>j!==H)};return()=>{}}}}function C(I){return{"no-speech":"No speech was detected","audio-capture":"No microphone was found or microphone is disabled","not-allowed":"Microphone permission denied",network:"Network error - speech recognition requires internet",aborted:"Speech recognition was aborted","service-not-allowed":"Speech recognition service not allowed","bad-grammar":"Speech grammar error","language-not-supported":"Language not supported"}[I]||`Speech recognition error: ${I}`}function _(){return typeof window<"u"&&"speechSynthesis"in window}function M(I={}){let F=_(),w={isSpeaking:!1,isPaused:!1,isSupported:F,voices:[],currentText:""},q=[],z={start:[],end:[],pause:[],resume:[],error:[]},Q=null,J=()=>{q.forEach((j)=>j(w))},K=(j,D)=>{z[j]?.forEach((B)=>B(D))},P=()=>{if(!F)return;w={...w,voices:window.speechSynthesis.getVoices()},J()};if(F){if(P(),window.speechSynthesis.onvoiceschanged!==void 0)window.speechSynthesis.onvoiceschanged=P}let X=(j)=>{if(j===void 0)return null;if(typeof j==="number")return w.voices[j]||null;return w.voices.find((D)=>D.name.toLowerCase().includes(j.toLowerCase())||D.lang.toLowerCase().includes(j.toLowerCase()))||null},Y=(j,D={})=>{if(!F||!j.trim())return;window.speechSynthesis.cancel();let B=new SpeechSynthesisUtterance(j),N={...I,...D};if(B.rate=N.rate??1,B.pitch=N.pitch??1,B.volume=N.volume??1,N.lang)B.lang=N.lang;let W=X(N.voice);if(W)B.voice=W;B.onstart=()=>{w={...w,isSpeaking:!0,isPaused:!1,currentText:j},J(),K("start",{text:j})},B.onend=()=>{w={...w,isSpeaking:!1,isPaused:!1,currentText:""},J(),K("end",{text:j})},B.onpause=()=>{w={...w,isPaused:!0},J(),K("pause")},B.onresume=()=>{w={...w,isPaused:!1},J(),K("resume")},B.onerror=(U)=>{w={...w,isSpeaking:!1,isPaused:!1},J(),K("error",{error:U.error})},Q=B,window.speechSynthesis.speak(B)},$=()=>{if(!F)return;window.speechSynthesis.cancel(),w={...w,isSpeaking:!1,isPaused:!1,currentText:""},J()},Z=()=>{if(!F||!w.isSpeaking)return;window.speechSynthesis.pause()},A=()=>{if(!F||!w.isPaused)return;window.speechSynthesis.resume()};return{get:()=>w,subscribe:(j)=>{return q.push(j),j(w),()=>{q=q.filter((D)=>D!==j)}},speak:Y,stop:$,pause:Z,resume:A,toggle:()=>{if(w.isPaused)A();else if(w.isSpeaking)Z()},getVoices:()=>w.voices,isSupported:()=>F,on:(j,D)=>{if(z[j])return z[j].push(D),()=>{z[j]=z[j].filter((B)=>B!==D)};return()=>{}}}}function T(I,F){M(F).speak(I)}function b(){if(_())window.speechSynthesis.cancel()}function k(){if(!_())return[];return window.speechSynthesis.getVoices()}
3
- export{V as Pp,R as Qp,_ as Rp,M as Sp,T as Tp,b as Up,k as Vp};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function K(H=!1){let E=H,k=new Set,q=()=>k.forEach((C)=>C(E));return[{get value(){return E},subscribe(C){return k.add(C),()=>{k.delete(C)}}},()=>{E=!E,q()},(C)=>{if(C!==E)E=C,q()}]}function M(H=0,E={}){let{min:k=-1/0,max:q=1/0}=E,z=C(H,k,q),G=new Set,I=()=>G.forEach((D)=>D(z));function C(D,b,J){return Math.min(J,Math.max(b,D))}return{get count(){return z},inc(D=1){z=C(z+D,k,q),I()},dec(D=1){z=C(z-D,k,q),I()},set(D){z=C(D,k,q),I()},reset(){z=C(H,k,q),I()},subscribe(D){return G.add(D),()=>{G.delete(D)}}}}function N(H,E){if(typeof window>"u")return{remove:()=>{}};let k=(z)=>{let G=typeof H==="string"?document.querySelector(H):H;if(!G)return;if(G===z.target||G.contains(z.target))return;E(z)};document.addEventListener("pointerdown",k,!0);let q=()=>{document.removeEventListener("pointerdown",k,!0)};if(typeof globalThis.onDestroy==="function")globalThis.onDestroy(q);return{remove:q}}function O(H){if(typeof window>"u")return{get isFocused(){return!1},focus:()=>{},blur:()=>{},subscribe:()=>()=>{}};let E=!1,k=new Set,q=()=>typeof H==="string"?document.querySelector(H):H,z=(b)=>{if(b!==E)E=b,k.forEach((J)=>J(E))},G=()=>z(!0),I=()=>z(!1),C=q();if(C)C.addEventListener("focus",G),C.addEventListener("blur",I),E=document.activeElement===C;let D=()=>{let b=q();if(b)b.removeEventListener("focus",G),b.removeEventListener("blur",I);k.clear()};if(typeof globalThis.onDestroy==="function")globalThis.onDestroy(D);return{get isFocused(){return E},focus(){let b=q();if(b&&typeof b.focus==="function")b.focus()},blur(){let b=q();if(b&&typeof b.blur==="function")b.blur()},subscribe(b){return k.add(b),()=>{k.delete(b)}}}}function P(H,E={}){let k="idle",q=null,z=null,G=new Set,I=()=>{let D={state:k,data:q,error:z};G.forEach((b)=>b(D))},C=async(...D)=>{k="loading",z=null,I();try{return q=await H(...D),k="success",I(),q}catch(b){return z=b instanceof Error?b:Error(String(b)),k="error",I(),null}};if(E.immediate)C();return{get state(){return k},get isLoading(){return k==="loading"},get error(){return z},get data(){return q},execute:C,subscribe(D){return G.add(D),()=>{G.delete(D)}}}}
3
- export{K as jq,M as kq,N as lq,O as mq,P as nq};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function U(){return typeof window<"u"&&"MutationObserver"in window}function D(A={}){let G=U(),z=new Set,{attributes:H=!0,attributeFilter:C,attributeOldValue:j=!1,characterData:K=!0,characterDataOldValue:Q=!1,childList:B=!0,subtree:E=!0,onMutate:I}=A,J={isSupported:G,isObserving:!1,mutations:[]},P=null,Z=null;function X(){z.forEach((q)=>q(J))}function L(q){J={...J,mutations:q},X(),I?.(q)}function R(q){if(!G||!q)return;Y(),P=new MutationObserver(L);let _={attributes:H,attributeOldValue:j,characterData:K,characterDataOldValue:Q,childList:B,subtree:E};if(C)_.attributeFilter=C;P.observe(q,_),Z=q,J={...J,isObserving:!0},X()}function Y(){if(P)P.disconnect(),P=null,Z=null,J={...J,isObserving:!1,mutations:[]},X()}function W(){if(P)return P.takeRecords();return[]}return{get:()=>J,subscribe:(q)=>{return z.add(q),q(J),()=>{if(z.delete(q),z.size===0)Y()}},observe:R,disconnect:Y,takeRecords:W,isSupported:()=>G}}function F(A,G,z){if(!A||!U())return()=>{};let H=new MutationObserver((C)=>{for(let j of C)if(j.type==="attributes"&&j.attributeName){let K=j.target.getAttribute(j.attributeName);z(j.attributeName,j.oldValue,K)}});return H.observe(A,{attributes:!0,attributeFilter:G,attributeOldValue:!0}),()=>H.disconnect()}function N(A,G,z={}){if(!A||!U())return()=>{};let H=new MutationObserver((C)=>{let j=[],K=[];for(let Q of C)if(Q.type==="childList")j.push(...Array.from(Q.addedNodes)),K.push(...Array.from(Q.removedNodes));if(j.length>0||K.length>0)G(j,K)});return H.observe(A,{childList:!0,subtree:z.subtree??!1}),()=>H.disconnect()}function $(A,G){if(!A||!U())return()=>{};let z=new MutationObserver((H)=>{for(let C of H)if(C.type==="characterData")G(C.oldValue,C.target.textContent||"")});return z.observe(A,{characterData:!0,characterDataOldValue:!0,subtree:!0}),()=>z.disconnect()}
3
- export{U as Cq,D as Dq,F as Eq,N as Fq,$ as Gq};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function F(x){let j=x.toLowerCase().split("+").map((O)=>O.trim());return{key:j[j.length-1],ctrl:j.includes("ctrl")||j.includes("control"),alt:j.includes("alt")||j.includes("option"),shift:j.includes("shift"),meta:j.includes("meta")||j.includes("cmd")||j.includes("command")||j.includes("win")}}function L(x,j){let Q=x.key.toLowerCase(),O=x.code.toLowerCase();return(Q===j.key||O===j.key||O===`key${j.key}`||O===`digit${j.key}`||j.key==="space"&&x.code==="Space"||j.key==="enter"&&x.key==="Enter"||j.key==="escape"&&x.key==="Escape"||j.key==="esc"&&x.key==="Escape"||j.key==="tab"&&x.key==="Tab"||j.key==="backspace"&&x.key==="Backspace"||j.key==="delete"&&x.key==="Delete"||j.key==="up"&&x.key==="ArrowUp"||j.key==="down"&&x.key==="ArrowDown"||j.key==="left"&&x.key==="ArrowLeft"||j.key==="right"&&x.key==="ArrowRight")&&x.ctrlKey===j.ctrl&&x.altKey===j.alt&&x.shiftKey===j.shift&&x.metaKey===j.meta}function M(){let x=document.activeElement;if(!x)return!1;let j=x.tagName.toLowerCase();return j==="input"||j==="textarea"||j==="select"||x.isContentEditable}function R(x={}){let{target:j=typeof window<"u"?window:null,capture:Q=!1,passive:O=!0}=x,A={pressed:new Set,lastKey:null,lastEvent:null,ctrl:!1,alt:!1,shift:!1,meta:!1,timestamp:0},E=[],J=null,S=()=>{E.forEach((z)=>z(A))},W=(z)=>{let G=new Set(A.pressed);G.add(z.key.toLowerCase()),G.add(z.code.toLowerCase()),A={pressed:G,lastKey:z.key,lastEvent:z,ctrl:z.ctrlKey,alt:z.altKey,shift:z.shiftKey,meta:z.metaKey,timestamp:Date.now()},S()},X=(z)=>{let G=new Set(A.pressed);G.delete(z.key.toLowerCase()),G.delete(z.code.toLowerCase()),A={pressed:G,lastKey:z.key,lastEvent:z,ctrl:z.ctrlKey,alt:z.altKey,shift:z.shiftKey,meta:z.metaKey,timestamp:Date.now()},S()},Y=()=>{A={...A,pressed:new Set,ctrl:!1,alt:!1,shift:!1,meta:!1},S()},Z=()=>{if(!j)return;let z=j,G={capture:Q,passive:O};if(z.addEventListener("keydown",W,G),z.addEventListener("keyup",X,G),typeof window<"u")window.addEventListener("blur",Y);J=()=>{if(z.removeEventListener("keydown",W,G),z.removeEventListener("keyup",X,G),typeof window<"u")window.removeEventListener("blur",Y)}};return{get:()=>A,subscribe:(z)=>{if(E.length===0)Z();return E.push(z),z(A),()=>{if(E=E.filter((G)=>G!==z),E.length===0&&J)J(),J=null}},isPressed:(z)=>{let G=z.toLowerCase();return A.pressed.has(G)},stop:()=>{if(J)J(),J=null;E=[]}}}function I(x,j,Q={}){let{target:O=typeof window<"u"?window:null,preventDefault:A=!0,stopPropagation:E=!1,ignoreRepeat:J=!0,keyup:S=!1,ignoreInputs:W=!0}=Q;if(!O)return()=>{};let Y=(Array.isArray(x)?x:[x]).map(F),Z=(_)=>{if(J&&_.repeat)return;if(W&&M())return;if(!Y.some(($)=>L(_,$)))return;if(A)_.preventDefault();if(E)_.stopPropagation();j(_)},z=S?"keyup":"keydown",G=O;return G.addEventListener(z,Z),()=>{G.removeEventListener(z,Z)}}function U(x,j={}){let Q=R(j),O=x.toLowerCase(),A=[],E=!1,J=null;return{get:()=>Q.isPressed(O),subscribe:(S)=>{if(A.length===0)J=Q.subscribe((W)=>{let X=W.pressed.has(O);if(X!==E)E=X,A.forEach((Y)=>Y(X))});return A.push(S),S(Q.isPressed(O)),()=>{if(A=A.filter((W)=>W!==S),A.length===0&&J)J(),J=null}}}}function V(x,j,Q={}){let{timeout:O=1000,target:A=typeof window<"u"?window:null}=Q;if(!A)return()=>{};let E=[],J=0,S=(X)=>{let Y=Date.now();if(Y-J>O)E=[];if(J=Y,E.push(X.key.toLowerCase()),E.length>x.length)E=E.slice(-x.length);if(E.length===x.length){if(E.every((z,G)=>z===x[G].toLowerCase()))j(),E=[]}},W=A;return W.addEventListener("keydown",S),()=>{W.removeEventListener("keydown",S)}}var D={save:"ctrl+s",undo:"ctrl+z",redo:"ctrl+shift+z",copy:"ctrl+c",paste:"ctrl+v",cut:"ctrl+x",selectAll:"ctrl+a",find:"ctrl+f",replace:"ctrl+h",newTab:"ctrl+t",closeTab:"ctrl+w",refresh:"ctrl+r",escape:"escape",enter:"enter",saveMac:"meta+s",undoMac:"meta+z",redoMac:"meta+shift+z",copyMac:"meta+c",pasteMac:"meta+v",cutMac:"meta+x"};
3
- export{R as zr,I as Ar,U as Br,V as Cr,D as Dr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function I(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||null}function P(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}async function Q(b,D){let A=D?.navigationUI?{navigationUI:D.navigationUI}:void 0;if(b.requestFullscreen)await b.requestFullscreen(A);else if(b.webkitRequestFullscreen)await b.webkitRequestFullscreen();else if(b.mozRequestFullScreen)await b.mozRequestFullScreen();else if(b.msRequestFullscreen)await b.msRequestFullscreen()}async function R(){if(document.exitFullscreen)await document.exitFullscreen();else if(document.webkitExitFullscreen)await document.webkitExitFullscreen();else if(document.mozCancelFullScreen)await document.mozCancelFullScreen();else if(document.msExitFullscreen)await document.msExitFullscreen()}function T(b,D={}){let A=typeof document<"u"&&P(),w={isFullscreen:!1,isSupported:A,element:null},z=[],G=null,M=()=>{if(!b)return document.documentElement;if(typeof b==="function")return b()||document.documentElement;return b},N=()=>{z.forEach((j)=>j(w))},H=()=>{let j=I();w={...w,isFullscreen:!!j,element:j},N()},O=()=>{if(typeof document>"u")return;let j=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];for(let B of j)document.addEventListener(B,H);G=()=>{for(let B of j)document.removeEventListener(B,H)},H()},J=async()=>{if(!A)return;let j=M();await Q(j,D)},K=async()=>{if(!A)return;if(I())await R()};return{get:()=>w,subscribe:(j)=>{if(z.length===0)O();return z.push(j),j(w),()=>{if(z=z.filter((B)=>B!==j),z.length===0&&G)G(),G=null}},isFullscreen:()=>w.isFullscreen,isSupported:()=>w.isSupported,enter:J,exit:K,toggle:async()=>{if(w.isFullscreen)await K();else await J()}}}function V(){return T().toggle()}function W(){return!!I()}
3
- export{T as jr,V as kr,W as lr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function I(){let D=new Set,B=typeof window<"u",q={width:B?window.innerWidth:0,height:B?window.innerHeight:0};if(B){let j=()=>{q={width:window.innerWidth,height:window.innerHeight};for(let F of D)try{F(q)}catch(G){console.error("[useWindowSize] Subscriber error:",G)}};window.addEventListener("resize",j,{passive:!0})}return{get width(){return q.width},get height(){return q.height},subscribe:(j)=>{return D.add(j),j(q),()=>D.delete(j)}}}function J(){let D=new Set,B=typeof window<"u",q={x:B?window.scrollX:0,y:B?window.scrollY:0};if(B){let j=()=>{q={x:window.scrollX,y:window.scrollY};for(let F of D)try{F(q)}catch(G){console.error("[useScroll] Subscriber error:",G)}};window.addEventListener("scroll",j,{passive:!0})}return{get x(){return q.x},get y(){return q.y},subscribe:(j)=>{return D.add(j),j(q),()=>D.delete(j)},scrollTo:(j,F)=>{if(!B)return;if(typeof j==="number")window.scrollTo(j,F??0);else window.scrollTo(j)},scrollToTop:()=>{if(!B)return;window.scrollTo({top:0,behavior:"smooth"})},scrollToBottom:()=>{if(!B)return;window.scrollTo({top:document.body.scrollHeight,behavior:"smooth"})}}}function K(){let D=new Set,B=typeof document<"u",q=B?document.visibilityState==="visible":!0;if(B)document.addEventListener("visibilitychange",()=>{q=document.visibilityState==="visible";for(let j of D)try{j(q)}catch(F){console.error("[useVisibility] Subscriber error:",F)}});return{get isVisible(){return q},subscribe:(j)=>{return D.add(j),j(q),()=>D.delete(j)}}}function O(D){let B=typeof document<"u";if(D&&B)document.title=D;return{get value(){return B?document.title:""},set value(q){if(B)document.title=q},set:(q)=>{if(B)document.title=q}}}function Q(D){let B=typeof document<"u",q=()=>{if(!B)return null;let j=document.querySelector('link[rel*="icon"]');if(!j)j=document.createElement("link"),j.rel="icon",document.head.appendChild(j);return j};if(D){let j=q();if(j)j.href=D}return{get value(){return q()?.href||""},set value(j){let F=q();if(F)F.href=j},set:(j)=>{let F=q();if(F)F.href=j}}}
3
- export{I as sp,J as tp,K as up,O as vp,Q as wp};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function E(){let j=new Set,q=typeof window<"u",v=()=>{if(!q)return null;return navigator.connection||null},z=()=>{if(!q)return{isOnline:!0,isOffline:!1,type:null,effectiveType:null,downlink:null,rtt:null,saveData:!1};let d=v();return{isOnline:navigator.onLine,isOffline:!navigator.onLine,type:d?.type||null,effectiveType:d?.effectiveType||null,downlink:d?.downlink||null,rtt:d?.rtt||null,saveData:d?.saveData||!1}},h=z(),x=()=>{let d=z();h=d;for(let B of j)try{B(d)}catch(D){console.error("[useNetwork] Subscriber error:",D)}};if(q){window.addEventListener("online",x),window.addEventListener("offline",x);let d=v();if(d)d.addEventListener("change",x)}return{get isOnline(){return h.isOnline},get isOffline(){return h.isOffline},get type(){return h.type},get effectiveType(){return h.effectiveType},get downlink(){return h.downlink},get rtt(){return h.rtt},get saveData(){return h.saveData},subscribe:(d)=>{return j.add(d),d(h),()=>j.delete(d)}}}function F(){let j=E();return{get isOnline(){return j.isOnline},subscribe:(q)=>{return j.subscribe((v)=>q(v.isOnline))}}}
3
- export{E as Hq,F as Iq};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function B(k){return{state:k,isGranted:k==="granted",isDenied:k==="denied",isPrompt:k==="prompt"}}function I(){return typeof navigator<"u"&&"permissions"in navigator}function J(k){let x=I(),h=B("prompt"),w=[],z=null,A=null,F=()=>{w.forEach((j)=>j(h))},H=()=>{if(z)h=B(z.state),F()},v=async()=>{if(!x)return B("prompt");try{return z=await navigator.permissions.query({name:k}),h=B(z.state),z.addEventListener("change",H),A=()=>{z?.removeEventListener("change",H)},h}catch{return B("prompt")}};return{get:()=>h,subscribe:(j)=>{if(w.length===0&&x)v();return w.push(j),j(h),()=>{if(w=w.filter((D)=>D!==j),w.length===0&&A)A(),A=null}},query:v,isSupported:()=>x}}function L(k){let x=I(),h={},w=[],z={},A=[];for(let v of k)h[v]=B("prompt"),z[v]=J(v);let F=()=>{w.forEach((v)=>v(h))};return{get:()=>h,subscribe:(v)=>{if(w.length===0)for(let j of k){let D=z[j].subscribe((K)=>{h[j]=K,F()});A.push(D)}return w.push(v),v(h),()=>{if(w=w.filter((j)=>j!==v),w.length===0)A.forEach((j)=>j()),A.length=0}},queryAll:async()=>{let v=await Promise.all(k.map(async(j)=>{let D=await z[j].query();return[j,D]}));return h=Object.fromEntries(v),h},isSupported:()=>x}}async function E(k){return(await J(k).query()).isGranted}async function M(){return E("camera")}async function N(){return E("microphone")}async function O(){return E("geolocation")}async function Q(){return E("notifications")}async function T(k={video:!0,audio:!0}){if(typeof navigator>"u"||!navigator.mediaDevices)return{granted:!1,error:Error("MediaDevices API not supported")};try{return{granted:!0,stream:await navigator.mediaDevices.getUserMedia(k)}}catch(x){return{granted:!1,error:x instanceof Error?x:Error(String(x))}}}var U={media:["camera","microphone"],location:["geolocation"],notifications:["notifications","push"],sensors:["accelerometer","gyroscope","magnetometer"],clipboard:["clipboard-read","clipboard-write"]};
3
- export{J as Oq,L as Pq,E as Qq,M as Rq,N as Sq,O as Tq,Q as Uq,T as Vq,U as Wq};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function G(z={}){let{timeout:A=1500}=z,B=new Set,w="",v=!1,q=null,D=typeof navigator<"u"&&"clipboard"in navigator,E=(g)=>{for(let j of B)try{j(g)}catch(F){console.error("[useClipboard] Subscriber error:",F)}};return{get text(){return w},get isSupported(){return D},get copied(){return v},copy:async(g)=>{if(!D)try{let j=document.createElement("textarea");if(j.value=g,j.style.position="fixed",j.style.opacity="0",document.body.appendChild(j),j.select(),document.execCommand("copy"),document.body.removeChild(j),w=g,v=!0,E(g),q)clearTimeout(q);return q=setTimeout(()=>{v=!1},A),!0}catch{return!1}try{if(await navigator.clipboard.writeText(g),w=g,v=!0,E(g),q)clearTimeout(q);return q=setTimeout(()=>{v=!1},A),!0}catch{return!1}},read:async()=>{if(!D)return"";try{let g=await navigator.clipboard.readText();return w=g,g}catch{return""}},subscribe:(g)=>{return B.add(g),()=>B.delete(g)}}}async function J(z){return G().copy(z)}
3
- export{G as Mr,J as Nr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function K(){return typeof window<"u"&&"BroadcastChannel"in window}function R(F,D={}){let z=K(),G=new Set,A=new Map,q={isSupported:z,isClosed:!1,channel:null,lastMessage:null,error:null};function H(){G.forEach((j)=>j(q))}function I(j,w){let J=A.get(j);if(J)J.forEach((Q)=>Q(w))}if(z)try{let j=new BroadcastChannel(F);j.onmessage=(w)=>{q={...q,lastMessage:w.data},H(),I("message",w),D.onMessage?.(w)},j.onmessageerror=(w)=>{q={...q,error:Error("Message error")},H(),I("error",w),D.onError?.(w)},q={...q,channel:j}}catch(j){q={...q,error:j}}function M(j){if(q.channel&&!q.isClosed)q.channel.postMessage(j)}function O(){if(q.channel&&!q.isClosed)q.channel.close(),q={...q,isClosed:!0,channel:null},H()}function P(j,w){if(!A.has(j))A.set(j,new Set);return A.get(j).add(w),()=>{A.get(j)?.delete(w)}}return{get:()=>q,subscribe:(j)=>{return G.add(j),j(q),()=>{G.delete(j)}},post:M,close:O,isSupported:()=>z,on:P}}function T(F,D){if(!K())return;let z=new BroadcastChannel(F);z.postMessage(D),z.close()}
3
- export{K as Ir,R as Jr,T as Kr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function U(q,z,B={}){let{root:C=null,rootMargin:F="0px",threshold:w=0,once:j=!1,immediate:x=!0}=B,G={isIntersecting:!1,intersectionRatio:0,boundingClientRect:null,intersectionRect:null,isVisible:!1,entry:null},K=[],J=null,P=!1,N=()=>{if(typeof q==="function")return q();return q},W=()=>{K.forEach((H)=>H(G))},X=(H)=>{let D=H[0];if(!D)return;if(G={isIntersecting:D.isIntersecting,intersectionRatio:D.intersectionRatio,boundingClientRect:D.boundingClientRect,intersectionRect:D.intersectionRect,isVisible:D.isIntersecting,entry:D},W(),z)z(D,J);if(j&&D.isIntersecting)R()},Q=()=>{if(typeof IntersectionObserver>"u")return;if(J)return;let H=N();if(!H)return;J=new IntersectionObserver(X,{root:C,rootMargin:F,threshold:w}),J.observe(H),P=!0},R=()=>{if(J)J.disconnect(),J=null;P=!1};if(x)Q();return{get:()=>G,subscribe:(H)=>{if(K.push(H),H(G),K.length===1&&!x&&!P)Q();return()=>{if(K=K.filter((D)=>D!==H),K.length===0&&!z)R()}},isVisible:()=>G.isVisible,stop:R,start:Q}}function Y(q,z){let B=U(q,void 0,z),C=[],F=!1;return{get:()=>B.isVisible(),subscribe:(w)=>{let j=B.subscribe((x)=>{if(x.isVisible!==F)F=x.isVisible,w(x.isVisible)});return C.push(w),w(B.isVisible()),()=>{if(C=C.filter((x)=>x!==w),C.length===0)j()}}}}function Z(q,z,B){return{stop:U(q,(F)=>{if(F.isIntersecting)z()},{...B,once:!0}).stop}}function _(q,z,B={}){let{debounce:C=100,...F}=B,w=!1,j=null,x=U(q,async(G)=>{if(!G.isIntersecting||w)return;if(j)clearTimeout(j);j=setTimeout(async()=>{w=!0;try{await z()}finally{w=!1}},C)},{rootMargin:"100px",...F});return{stop:()=>{if(j)clearTimeout(j);x.stop()},start:x.start,isLoading:()=>w}}function $(q,z,B={}){let{root:C=null,rootMargin:F="0px",threshold:w=0}=B,j=null,x=()=>{if(typeof q==="function")return q();return q},G=()=>{if(typeof IntersectionObserver>"u")return;if(j)return;j=new IntersectionObserver(z,{root:C,rootMargin:F,threshold:w});for(let N of x())j.observe(N)},K=()=>{if(j)j.disconnect(),j=null},J=(N)=>{j?.observe(N)},P=(N)=>{j?.unobserve(N)};return G(),{stop:K,start:G,observe:J,unobserve:P}}
3
- export{U as ur,Y as vr,Z as wr,_ as xr,$ as yr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import T from"path";var W={isValidFilePath(B,q){let j=B.replace(/\\/g,"/");if(j.includes("\x00"))return!1;if(j.includes("../")||j.includes("..\\")||j===".."||j.startsWith("../")||j.endsWith("/..")||j.includes("/..\\")||j.includes("\\../"))return!1;if(/^[a-z][a-z0-9+.-]*:/i.test(j))return!1;if(j.startsWith("/")){if(["/etc/","/root/","/var/","/usr/","/bin/","/sbin/","/proc/","/sys/","/dev/","/boot/","/home/","/private/","/Library/","/System/"].some((J)=>j===J.slice(0,-1)||j.startsWith(J)))return!1}if(/^[a-z]:/i.test(j)){if(["Windows/","Windows\\","System32/","System32\\","Program Files/","Program Files\\"].some((J)=>j.includes(J)))return!1}if(q){let I=T.resolve(q,B),J=T.resolve(q);if(!I.startsWith(J+T.sep)&&I!==J)return!1}return!0},isValidVariableName(B){return/^[a-z_$]\w*$/i.test(B)},isValidDirectiveName(B){return/^[a-z][\w-]*$/i.test(B)},isSafeContent(B){return![/<script[^>]*>[\s\S]*?<\/script>/i,/javascript:/i,/data:text\/html/i,/vbscript:/i,/on\w+\s*=/i].some((j)=>j.test(B))}};function Y(B){let q={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return B.replace(/[&<>"']/g,(j)=>q[j]||j)}function U(B,q={}){let{allowHtml:j=!1,maxLength:G=1e4,allowSpecialChars:I=!0,customSanitizer:J}=q,K=[],F=B,M=!1;if(J){let N=J(F);if(N!==F)F=N,M=!0}if(F.includes("\x00"))F=F.replace(/\0/g,""),M=!0,K.push("Null bytes removed from parameter");if(F.length>G)F=F.substring(0,G),M=!0,K.push(`Parameter truncated to ${G} characters`);if(!j&&/<[^>]+>/.test(F))F=Y(F),M=!0,K.push("HTML content was escaped");let X=[{pattern:/javascript:/gi,replacement:"",name:"javascript: URI"},{pattern:/vbscript:/gi,replacement:"",name:"vbscript: URI"},{pattern:/data:text\/html/gi,replacement:"",name:"data:text/html URI"}];for(let{pattern:N,replacement:Q,name:O}of X)if(N.test(F))F=F.replace(N,Q),M=!0,K.push(`Removed ${O} from parameter`);if(!I){let N=F;if(F=F.split("").filter((Q)=>{let O=Q.charCodeAt(0);return O>=32&&O!==127}).join(""),F!==N)M=!0,K.push("Control characters removed")}return{value:F,modified:M,warnings:K}}function $(B,q){let j=B.replace(/\0/g,"");j=j.replace(/\\/g,"/"),j=j.replace(/^[a-z][a-z0-9+.-]*:/i,"");while(j.includes("../")||j.includes("./"))j=j.replace(/\.\.\//g,"").replace(/\.\//g,"");if(!W.isValidFilePath(j,q))return null;return j}function A(B){let q=[],j=B.trim(),G=j!==B,I=[{pattern:/\beval\s*\(/gi,name:"eval()"},{pattern:/\bFunction\s*\(/gi,name:"Function()"},{pattern:/\bsetTimeout\s*\(/gi,name:"setTimeout()"},{pattern:/\bsetInterval\s*\(/gi,name:"setInterval()"},{pattern:/\bimport\s*\(/gi,name:"dynamic import()"},{pattern:/\brequire\s*\(/gi,name:"require()"},{pattern:/\b__proto__\b/gi,name:"__proto__"},{pattern:/\bconstructor\b/gi,name:"constructor"},{pattern:/\bprototype\b/gi,name:"prototype"}];for(let{pattern:J,name:K}of I)if(J.test(j))q.push(`Potentially dangerous pattern detected: ${K}`);if(j.includes("\x00"))j=j.replace(/\0/g,""),G=!0,q.push("Null bytes removed from expression");return{value:j,modified:G,warnings:q}}function C(B,q={}){return B.map((j)=>U(j,q))}function Z(B){let q={};for(let[j,G]of Object.entries(B)){if(!W.isValidVariableName(j))continue;if(typeof G==="string"){let I=U(G);q[j]=I.value}else if(Array.isArray(G))q[j]=G.map((I)=>typeof I==="string"?U(I).value:I);else if(typeof G==="object"&&G!==null)q[j]=Z(G);else q[j]=G}return q}
3
- export{W as HB,U as IB,$ as JB,A as KB,C as LB,Z as MB};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Zs as Y}from"./chunk-6e08xfzp.js";var B=encodeURIComponent,Z=decodeURIComponent;function X(){if(typeof document>"u")return{};let j={},q=document.cookie.split(";");for(let I of q){let[K,...G]=I.trim().split("=");if(K)try{j[K]=Z(G.join("="))}catch{j[K]=G.join("=")}}return j}function N(j){return X()[j]??null}function _(j,q,I){let{maxAge:K,expires:G,path:Q="/",domain:T,secure:U,sameSite:M="Lax",encode:$=B}=I,L=[`${j}=${q?$(q):""}`];if(Q)L.push(`path=${Q}`);if(T)L.push(`domain=${T}`);if(q==="")L.push("max-age=0");else if(typeof K==="number")L.push(`max-age=${K}`);else if(G!==void 0){let w=G instanceof Date?G:typeof G==="number"?new Date(Date.now()+G*1000):new Date(G);L.push(`expires=${w.toUTCString()}`)}L.push(`SameSite=${M}`);let W=U;if(W===void 0)W=typeof location<"u"&&location.protocol==="https:";if(W)L.push("Secure");return L.join("; ")}function E(j,q,I={}){if(typeof document>"u")return;document.cookie=_(j,q,I)}function H(j,q={}){E(j,"",{...q,maxAge:0,expires:new Date(0)})}function O(j,q={}){let I=q.decode||Z,K=q.defaultValue??"",G=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Q=new RegExp(`(?:^|; )${G}=([^;]*)`);function T(){if(typeof document>"u")return K;let M=document.cookie.match(Q);return M?I(M[1]):K}let U=Y(T());return U.subscribe((M)=>{if(typeof document>"u")return;document.cookie=_(j,M,q)}),U}function R(){return X()}function b(j={}){let q=X();for(let I of Object.keys(q))H(I,j)}
3
- export{X as Qr,N as Rr,E as Sr,H as Tr,O as Ur,R as Vr,b as Wr};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Zs as J}from"./chunk-6e08xfzp.js";var D=new Map;function i(j,M,N){let z=M?`${M.replace(/\/$/,"")}/${j.replace(/^\//,"")}`:j;if(N){let W=new URLSearchParams;for(let[_,X]of Object.entries(N))if(X!==void 0)W.append(_,String(X));let P=W.toString();if(P)z+=(z.includes("?")?"&":"?")+P}return z}function f(j,M={}){let{immediate:N=!0,transform:z,parseResponse:W=(G)=>G.json(),timeout:P=30000,retry:_=0,retryDelay:X=1000,key:$,cacheTime:Y=0,refetchOnFocus:I=!1,refetchInterval:H,initialData:S=null,baseURL:q,query:L,body:Q,...A}=M,E=J(S),K=J(!1),O=J(null),U=J(null),v=J(null),w=null,B=null,k=null,F=()=>{let G=typeof j==="function"?j():j;return i(G,q,L)},R=()=>$||F(),p=()=>{if(Y<=0)return null;let G=D.get(R());if(G&&Date.now()-G.timestamp<Y)return G.data;return null},y=(G)=>{if(Y>0)D.set(R(),{data:G,timestamp:Date.now()})},x=async(G=0)=>{let C=p();if(C!==null){E.set(C),K.set(!1),O.set(null);return}if(w)w.abort();w=new AbortController,K.set(!0),O.set(null);let m=setTimeout(()=>w?.abort(),P);try{let V;if(Q)if(typeof Q==="object"&&!(Q instanceof FormData)&&!(Q instanceof URLSearchParams))V=JSON.stringify(Q),A.headers={"Content-Type":"application/json",...A.headers};else V=Q;let Z=await fetch(F(),{...A,body:V,signal:w.signal});if(clearTimeout(m),U.set(Z.status),v.set(Z.statusText),!Z.ok)throw Error(`HTTP ${Z.status}: ${Z.statusText}`);let T=await W(Z);if(z)T=z(T);y(T),E.set(T),K.set(!1)}catch(V){if(clearTimeout(m),V instanceof Error&&V.name==="AbortError")return;if(G<_)return await new Promise((Z)=>setTimeout(Z,X)),x(G+1);O.set(V instanceof Error?V:Error(String(V))),K.set(!1)}},b=()=>{if(!I||typeof window>"u")return;B=()=>{if(document.visibilityState==="visible")x()},document.addEventListener("visibilitychange",B)},g=()=>{if(!H||typeof window>"u")return;k=setInterval(()=>void x(),H)};if(N)x(),b(),g();return{data:E,loading:K,error:O,status:U,statusText:v,refetch:()=>x(),execute:async()=>{await x(),b(),g()},abort:()=>{if(w)w.abort();if(B)document.removeEventListener("visibilitychange",B),B=null;if(k)clearInterval(k),k=null}}}function n(j,M={}){let{immediate:N=!0,transform:z,initialData:W=null,key:P,cacheTime:_=0}=M,X=J(W),$=J(!1),Y=J(null),I=J(null),H=J(null),S=()=>P||j.toString(),q=()=>{if(_<=0)return null;let A=D.get(S());if(A&&Date.now()-A.timestamp<_)return A.data;return null},L=(A)=>{if(_>0)D.set(S(),{data:A,timestamp:Date.now()})},Q=async()=>{let A=q();if(A!==null){X.set(A),$.set(!1),Y.set(null);return}$.set(!0),Y.set(null);try{let E=await j();if(z)E=z(E);L(E),X.set(E),$.set(!1)}catch(E){Y.set(E instanceof Error?E:Error(String(E))),$.set(!1)}};if(N)Q();return{data:X,loading:$,error:Y,status:I,statusText:H,refetch:Q,execute:Q,abort:()=>{}}}function h(j,M={}){let N,z=f(j,{...M,method:"POST",immediate:!1,get body(){return N}});return{execute:async(W)=>{return N=W,await z.execute(),z.data()},state:z}}function d(j){if(j)D.delete(j);else D.clear()}async function l(j,M){await f(j,{...M,immediate:!1}).execute()}
3
- export{f as er,n as fr,h as gr,d as hr,l as ir};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function f(x){let z=new Set,B=typeof window<"u",j=null,w=!1;if(B){j=window.matchMedia(x),w=j.matches;let g=(A)=>{w=A.matches;for(let D of z)try{D(A.matches)}catch(E){console.error("[useMediaQuery] Subscriber error:",E)}};if(j.addEventListener)j.addEventListener("change",g);else j.addListener(g)}return{get matches(){return w},subscribe:(g)=>{return z.add(g),g(w),()=>z.delete(g)}}}function G(){return f("(prefers-color-scheme: dark)")}function H(){return f("(prefers-color-scheme: light)")}function I(){return f("(prefers-reduced-motion: reduce)")}function J(){return f("(prefers-contrast: more)")}var F={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"};function K(x){return f(F[x])}function L(){return f("(max-width: 767px)")}function N(){return f("(min-width: 768px) and (max-width: 1023px)")}function O(){return f("(min-width: 1024px)")}
3
- export{f as oq,G as pq,H as qq,I as rq,J as sq,F as tq,K as uq,L as vq,N as wq,O as xq};
@@ -1 +0,0 @@
1
- // @bun
@@ -1 +0,0 @@
1
- // @bun
@@ -1,3 +0,0 @@
1
- // @bun
2
- function P(){return typeof window<"u"&&"ResizeObserver"in window}function I(F){if(!F||F.length===0)return null;let A=F[0];return{width:A.inlineSize,height:A.blockSize,inlineSize:A.inlineSize,blockSize:A.blockSize}}function Q(F,A,G={}){let H=P(),D={contentRect:null,contentBoxSize:null,borderBoxSize:null,devicePixelContentBoxSize:null},w=[],B=null,L=()=>{if(typeof F==="function")return F();return F},N=(j)=>{if(j.length>0){let q=j[0];D={contentRect:q.contentRect,contentBoxSize:I(q.contentBoxSize),borderBoxSize:I(q.borderBoxSize),devicePixelContentBoxSize:I(q.devicePixelContentBoxSize)}}if(A)A(j);w.forEach((q)=>q(j))},J=()=>{if(!H)return;let j=L();if(!j)return;if(!B)B=new ResizeObserver(N);B.observe(j,{box:G.box})},K=()=>{if(B)B.disconnect(),B=null};return{get:()=>D,subscribe:(j)=>{if(w.length===0)J();return w.push(j),()=>{if(w=w.filter((q)=>q!==j),w.length===0&&!A)K()}},observe:J,disconnect:K,isSupported:()=>H}}function T(F,A,G={}){let H=P(),D=new Map,w=[],B=null,L=()=>{if(typeof F==="function")return F();return F},N=(j)=>{for(let q of j)D.set(q.target,{contentRect:q.contentRect,contentBoxSize:I(q.contentBoxSize),borderBoxSize:I(q.borderBoxSize),devicePixelContentBoxSize:I(q.devicePixelContentBoxSize)});if(A)A(j);w.forEach((q)=>q(j))},J=()=>{if(!H)return;let j=L();if(j.length===0)return;if(!B)B=new ResizeObserver(N);for(let q of j)B.observe(q,{box:G.box})},K=()=>{if(B)B.disconnect(),B=null;D.clear()};return{get:()=>D.values().next().value||{contentRect:null,contentBoxSize:null,borderBoxSize:null,devicePixelContentBoxSize:null},states:()=>D,subscribe:(j)=>{if(w.length===0)J();return w.push(j),()=>{if(w=w.filter((q)=>q!==j),w.length===0&&!A)K()}},observe:J,disconnect:K,isSupported:()=>H}}function U(F){let A={width:0,height:0},G=[],H=Q(F,(D)=>{if(D.length>0){let w=D[0].contentRect;A={width:w.width,height:w.height},G.forEach((B)=>B(A))}});return{get:()=>A,subscribe:(D)=>{if(G.push(D),D(A),G.length===1)H.observe();return()=>{if(G=G.filter((w)=>w!==D),G.length===0)H.disconnect()}},isSupported:H.isSupported}}function V(){return P()}
3
- export{Q as xp,T as yp,U as zp,V as Ap};