@stacksjs/stx 0.2.93 → 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 (551) 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-7074g241.js → chunk-03c26pjz.js} +1 -1
  37. package/dist/{chunk-n9dhs1dw.js → chunk-04mvcmcr.js} +1 -1
  38. package/dist/{chunk-hc2mf5h6.js → chunk-05hgyyqc.js} +1 -1
  39. package/dist/{chunk-kx6eb6ma.js → chunk-0g4gece6.js} +1 -1
  40. package/dist/{chunk-1v49fwr5.js → chunk-0jkwrcwj.js} +1 -1
  41. package/dist/{chunk-47kpewks.js → chunk-0m9tdm7t.js} +1 -1
  42. package/dist/{chunk-4deg33rw.js → chunk-0tatqxj2.js} +2 -2
  43. package/dist/{chunk-akf1r75r.js → chunk-0wdar532.js} +1 -1
  44. package/dist/{chunk-9cf97f9p.js → chunk-13yz561y.js} +2 -2
  45. package/dist/{chunk-rpx5fa65.js → chunk-174z0cd0.js} +2 -2
  46. package/dist/{chunk-wkz2vwkr.js → chunk-1mmykse5.js} +1 -1
  47. package/dist/{chunk-3te20hqw.js → chunk-1z2yq9em.js} +2 -2
  48. package/dist/{chunk-rw26rpek.js → chunk-25s7bckb.js} +2 -2
  49. package/dist/{chunk-xgkv66q5.js → chunk-268adc7r.js} +1 -1
  50. package/dist/{chunk-a87qqft6.js → chunk-26r6zh3t.js} +2 -2
  51. package/dist/{chunk-t0c9wvpr.js → chunk-2w3302dh.js} +1 -1
  52. package/dist/{chunk-vjbefncc.js → chunk-2xen423s.js} +1 -1
  53. package/dist/{chunk-jjdq01dv.js → chunk-3bjtemm6.js} +1 -1
  54. package/dist/{chunk-xv34zbp4.js → chunk-3jm3snz8.js} +1 -1
  55. package/dist/{chunk-e98v1bc6.js → chunk-3ngm57nt.js} +2 -2
  56. package/dist/{chunk-gz5fmp3q.js → chunk-3rh7va1z.js} +1 -1
  57. package/dist/{chunk-kypas8vy.js → chunk-3yg9hbmb.js} +1 -1
  58. package/dist/{chunk-qygvvygy.js → chunk-46mkpbkk.js} +2 -2
  59. package/dist/chunk-48cw2nde.js +2 -0
  60. package/dist/chunk-48r3qe0k.js +3 -0
  61. package/dist/{chunk-azkegjd8.js → chunk-4bt81cg3.js} +1 -1
  62. package/dist/{chunk-07y6m5xx.js → chunk-4j188175.js} +1 -1
  63. package/dist/{chunk-h7aq56qj.js → chunk-4qq8ffke.js} +1 -1
  64. package/dist/{chunk-hrnnh4tq.js → chunk-50vqeesm.js} +2 -2
  65. package/dist/{chunk-7n8g0nfn.js → chunk-52agge4n.js} +1 -1
  66. package/dist/{chunk-9t14se2t.js → chunk-57p201gb.js} +1 -1
  67. package/dist/{chunk-jpndqst5.js → chunk-5ggw1dyv.js} +1 -1
  68. package/dist/{chunk-ah88wzbg.js → chunk-5kt3ay7x.js} +1 -1
  69. package/dist/{chunk-x24s4heg.js → chunk-5p568px4.js} +1 -1
  70. package/dist/{chunk-q6zhd9yf.js → chunk-5ppkfyn2.js} +1 -1
  71. package/dist/{chunk-khdn7jwe.js → chunk-5q87fgkk.js} +2 -2
  72. package/dist/{chunk-0p1h3p3w.js → chunk-5qb761h2.js} +1 -1
  73. package/dist/{chunk-rtr974rc.js → chunk-5xvbq2gs.js} +2 -2
  74. package/dist/{chunk-p3e0cqtt.js → chunk-647849kf.js} +2 -2
  75. package/dist/{chunk-gkzq8zw4.js → chunk-6cr3eeh4.js} +1 -1
  76. package/dist/{chunk-mhgk632d.js → chunk-6djgb0hr.js} +1 -1
  77. package/dist/{chunk-tffh3b1e.js → chunk-6dqzky7x.js} +1 -1
  78. package/dist/{chunk-drjq2zwg.js → chunk-6w03t7h6.js} +2 -2
  79. package/dist/{chunk-ek2w6zvy.js → chunk-6wn85hn6.js} +1 -1
  80. package/dist/{chunk-jz73j3qs.js → chunk-6y4gqs1q.js} +1 -1
  81. package/dist/{chunk-nd9rmddh.js → chunk-75rndzbd.js} +1 -1
  82. package/dist/{chunk-7dkz6z2s.js → chunk-77tga15w.js} +2 -2
  83. package/dist/{chunk-wvf31nzs.js → chunk-7a51hkpf.js} +1 -1
  84. package/dist/{chunk-a2g2qb2y.js → chunk-7b0xdy5h.js} +1 -1
  85. package/dist/{chunk-ewa88139.js → chunk-7dy588as.js} +1 -1
  86. package/dist/{chunk-8ahwt6a4.js → chunk-7rvh2wwv.js} +1 -1
  87. package/dist/{chunk-jt0ezawy.js → chunk-7sm05m0j.js} +1 -1
  88. package/dist/{chunk-m167kjhv.js → chunk-7xcfy2fn.js} +1 -1
  89. package/dist/{chunk-keawsbpn.js → chunk-82t27pvd.js} +1 -1
  90. package/dist/{chunk-psc3wfcf.js → chunk-87kx8byz.js} +1 -1
  91. package/dist/{chunk-31dr4bys.js → chunk-8fgwhhb8.js} +2 -2
  92. package/dist/{chunk-rz2ec6g7.js → chunk-8qbax8xn.js} +1 -1
  93. package/dist/{chunk-e2q9c5vq.js → chunk-91s2hres.js} +1 -1
  94. package/dist/{chunk-yb1t2h8h.js → chunk-94g3cahw.js} +2 -2
  95. package/dist/{chunk-n98x35xd.js → chunk-957amb71.js} +1 -1
  96. package/dist/{chunk-v8j49spx.js → chunk-95w08s8v.js} +1 -1
  97. package/dist/{chunk-zy3rp1ab.js → chunk-9agvhp1x.js} +1 -1
  98. package/dist/{chunk-vgv7jvyz.js → chunk-9tmbrwwx.js} +1 -1
  99. package/dist/{chunk-3a4qsygv.js → chunk-9yz5d003.js} +2 -2
  100. package/dist/{chunk-4qcy5tx6.js → chunk-a69tvya5.js} +2 -2
  101. package/dist/{chunk-p52yzjq6.js → chunk-adjcg6wa.js} +2 -2
  102. package/dist/{chunk-w3b6m427.js → chunk-adqh2m9z.js} +1 -1
  103. package/dist/{chunk-h0hjy0kn.js → chunk-asarebzq.js} +1 -1
  104. package/dist/{chunk-43t7faps.js → chunk-aw3rp9ac.js} +1 -1
  105. package/dist/{chunk-7gd339hd.js → chunk-b0cyc09a.js} +1 -1
  106. package/dist/{chunk-09k66d8a.js → chunk-b3kkjcdh.js} +1 -1
  107. package/dist/{chunk-jnmgm2xw.js → chunk-b3prs7y0.js} +1 -1
  108. package/dist/{chunk-xw36p73h.js → chunk-b5zc9y0y.js} +2 -2
  109. package/dist/{chunk-krqn0ddk.js → chunk-baa7h4yz.js} +2 -2
  110. package/dist/{chunk-15nesxgt.js → chunk-bgec9r1v.js} +2 -2
  111. package/dist/{chunk-kdfe4t91.js → chunk-bjnjpsgn.js} +2 -2
  112. package/dist/{chunk-0a61y94n.js → chunk-bk8ew8ze.js} +2 -2
  113. package/dist/{chunk-pcntd9h4.js → chunk-bn08k7yy.js} +2 -2
  114. package/dist/{chunk-8va64c9n.js → chunk-bwxda6n1.js} +2 -2
  115. package/dist/{chunk-pa9zb7ty.js → chunk-bykjk6vj.js} +1 -1
  116. package/dist/{chunk-p3fpb79v.js → chunk-c53hyw5c.js} +1 -1
  117. package/dist/{chunk-km25cwz6.js → chunk-ca6qd1dx.js} +1 -1
  118. package/dist/{chunk-x3r64r0c.js → chunk-cdbwprfv.js} +2 -2
  119. package/dist/{chunk-tg2f1mzq.js → chunk-ceg2c2q2.js} +2 -2
  120. package/dist/{chunk-80g54ncj.js → chunk-cn409b69.js} +1 -1
  121. package/dist/{chunk-8xj7c3mf.js → chunk-cp3kwv17.js} +1 -1
  122. package/dist/{chunk-nm15ccsg.js → chunk-cpcc11vp.js} +2 -2
  123. package/dist/{chunk-y6xsqe9a.js → chunk-cr3wbrcr.js} +2 -2
  124. package/dist/{chunk-4d2y57k7.js → chunk-cygfdk1n.js} +2 -2
  125. package/dist/{chunk-xys2sxh6.js → chunk-cyp4m0vh.js} +1 -1
  126. package/dist/{chunk-27zsyhrd.js → chunk-cz25azze.js} +1 -1
  127. package/dist/{chunk-4x7kae4j.js → chunk-d77yxcds.js} +2 -2
  128. package/dist/{chunk-x05nxhyv.js → chunk-dyjnn5k8.js} +2 -2
  129. package/dist/{chunk-9jtj77jx.js → chunk-dzw95th7.js} +2 -2
  130. package/dist/{chunk-7b6s3g65.js → chunk-e0zytzdh.js} +1 -1
  131. package/dist/{chunk-b77wjyn7.js → chunk-e53h9qhd.js} +1 -1
  132. package/dist/{chunk-wazkqv7n.js → chunk-eds0f8f1.js} +2 -2
  133. package/dist/{chunk-04n64bnt.js → chunk-eh8hact1.js} +1 -1
  134. package/dist/{chunk-scpkdrdb.js → chunk-epj957jf.js} +1 -1
  135. package/dist/{chunk-trfswy66.js → chunk-eqeyaq6g.js} +1 -1
  136. package/dist/{chunk-x5g9w4hh.js → chunk-fbxt2mrx.js} +2 -2
  137. package/dist/{chunk-5shey2e4.js → chunk-fch9tk1k.js} +1 -1
  138. package/dist/{chunk-988dw6q3.js → chunk-fe7r1mq1.js} +2 -2
  139. package/dist/{chunk-8b3z0zd5.js → chunk-fhawx87n.js} +1 -1
  140. package/dist/{chunk-ynhngsdh.js → chunk-fk51yyrw.js} +1 -1
  141. package/dist/{chunk-dqn9gyhb.js → chunk-fms20x0n.js} +1 -1
  142. package/dist/{chunk-bk3j0n82.js → chunk-fs0qezn5.js} +1 -1
  143. package/dist/{chunk-2j21d3ka.js → chunk-g2hekckm.js} +1 -1
  144. package/dist/{chunk-55nwdnsd.js → chunk-g8b81pzc.js} +1 -1
  145. package/dist/{chunk-avx8aydt.js → chunk-ganag9dm.js} +2 -2
  146. package/dist/{chunk-hbgxbgam.js → chunk-gc84b1d2.js} +2 -2
  147. package/dist/{chunk-djddhmcc.js → chunk-gcf5v18y.js} +1 -1
  148. package/dist/{chunk-v7f8jj15.js → chunk-ghrx0hn1.js} +1 -1
  149. package/dist/{chunk-ckxjqqn9.js → chunk-gqpkp459.js} +2 -2
  150. package/dist/chunk-h45py5w5.js +2 -0
  151. package/dist/{chunk-aywxfqev.js → chunk-haecq01c.js} +1 -1
  152. package/dist/{chunk-hbehnm18.js → chunk-hepg894w.js} +2 -2
  153. package/dist/{chunk-29y0hk5z.js → chunk-hjdc99kb.js} +2 -2
  154. package/dist/{chunk-8n9nnqr6.js → chunk-hje9v2zh.js} +1 -1
  155. package/dist/{chunk-bdk6g1vj.js → chunk-hke99a0v.js} +2 -2
  156. package/dist/{chunk-qvrbjpdc.js → chunk-hpqr9e3x.js} +2 -2
  157. package/dist/{chunk-ht43ds42.js → chunk-hq5cem49.js} +1 -1
  158. package/dist/{chunk-8vtm0m84.js → chunk-hrampcrj.js} +1 -1
  159. package/dist/{chunk-fjk3x41y.js → chunk-ht4j68cs.js} +2 -2
  160. package/dist/{chunk-xyg1r5w0.js → chunk-j4s5qwd7.js} +2 -2
  161. package/dist/{chunk-9eq3ht5f.js → chunk-jbejwejg.js} +1 -1
  162. package/dist/{chunk-baf1hfwh.js → chunk-jfm69keq.js} +2 -2
  163. package/dist/chunk-jfrn43vh.js +2 -0
  164. package/dist/{chunk-zen6ax1y.js → chunk-jjvp4t5w.js} +2 -2
  165. package/dist/{chunk-vmxjghsm.js → chunk-jt44av4j.js} +1 -1
  166. package/dist/{chunk-k21df0pg.js → chunk-jt98jhpt.js} +1 -1
  167. package/dist/{chunk-0p0nyq50.js → chunk-k8440jxh.js} +2 -2
  168. package/dist/{chunk-y1k17c8b.js → chunk-kdxa9epn.js} +2 -2
  169. package/dist/{chunk-p1h8065h.js → chunk-kfd2hf6f.js} +2 -2
  170. package/dist/{chunk-x0770gt9.js → chunk-kh6rfz2v.js} +1 -1
  171. package/dist/{chunk-bhqgmyqw.js → chunk-kkp6rs2n.js} +1 -1
  172. package/dist/{chunk-jjb05d21.js → chunk-m59y310j.js} +2 -2
  173. package/dist/{chunk-ay9qf4zj.js → chunk-mgmyr1b9.js} +1 -1
  174. package/dist/{chunk-vw7vqd76.js → chunk-mqwbpamc.js} +1 -1
  175. package/dist/{chunk-bs3gmfxz.js → chunk-mrehzhxv.js} +1 -1
  176. package/dist/{chunk-1sr54zp8.js → chunk-mv03qb75.js} +1 -1
  177. package/dist/chunk-mwbng54r.js +2 -0
  178. package/dist/{chunk-rwrv9wbf.js → chunk-n46a5g1g.js} +1 -1
  179. package/dist/{chunk-zf2pek72.js → chunk-n944baxp.js} +1 -1
  180. package/dist/{chunk-6djzdes9.js → chunk-nanw7yhz.js} +1 -1
  181. package/dist/{chunk-g1vt329s.js → chunk-nap11ntr.js} +2 -2
  182. package/dist/{chunk-d0zjtdw4.js → chunk-ncnfa8ae.js} +2 -2
  183. package/dist/{chunk-knm8a8yx.js → chunk-pc31m5x5.js} +1 -1
  184. package/dist/{chunk-7ed3tean.js → chunk-q60knhjf.js} +1 -1
  185. package/dist/{chunk-shv88d2d.js → chunk-q6h6yvzb.js} +2 -2
  186. package/dist/{chunk-9wmq2272.js → chunk-qd5461tt.js} +1 -1
  187. package/dist/{chunk-0dx4q6yq.js → chunk-qdc3aav1.js} +1 -1
  188. package/dist/{chunk-d1qh1x2g.js → chunk-qfwzdffx.js} +2 -2
  189. package/dist/{chunk-p73meypx.js → chunk-qgxwmagw.js} +1 -1
  190. package/dist/{chunk-rw7937v4.js → chunk-qhdtssn1.js} +2 -2
  191. package/dist/{chunk-pcm1vd8w.js → chunk-qk584whs.js} +1 -1
  192. package/dist/{chunk-9zbk5zx5.js → chunk-qm4yppj5.js} +2 -2
  193. package/dist/chunk-qwyd9a1d.js +2 -0
  194. package/dist/{chunk-xs03kc1h.js → chunk-qxs6et76.js} +1 -1
  195. package/dist/{chunk-8qc1bsym.js → chunk-rb1e4cnb.js} +1 -1
  196. package/dist/{chunk-9ecv8aqj.js → chunk-rv002yn0.js} +1 -1
  197. package/dist/chunk-sjagg9qz.js +66 -0
  198. package/dist/{chunk-bndmdahk.js → chunk-sn07azv3.js} +2 -2
  199. package/dist/{chunk-5f43yz6z.js → chunk-svahbw0w.js} +2 -2
  200. package/dist/{chunk-pznnww6k.js → chunk-svhtdb0s.js} +1 -1
  201. package/dist/{chunk-tzwtg722.js → chunk-t37dp99j.js} +1 -1
  202. package/dist/{chunk-mgj88zeq.js → chunk-tj6zfxeb.js} +2 -2
  203. package/dist/{chunk-rqxf5hns.js → chunk-tmgz5t2g.js} +1 -1
  204. package/dist/{chunk-hjm2xab3.js → chunk-tr0z0e1g.js} +1 -1
  205. package/dist/{chunk-2cdvw21b.js → chunk-tx6br9r4.js} +1 -1
  206. package/dist/{chunk-hy8820vc.js → chunk-vdfwv0fp.js} +1 -1
  207. package/dist/{chunk-yrsb6j3z.js → chunk-vp2395eb.js} +2 -2
  208. package/dist/{chunk-j447q024.js → chunk-vpe6napb.js} +2 -2
  209. package/dist/{chunk-wg9k6h8w.js → chunk-vv9wfz1c.js} +2 -2
  210. package/dist/{chunk-yj4x5ehw.js → chunk-vw6ejgmy.js} +1 -1
  211. package/dist/{chunk-1xz0w746.js → chunk-w01y57f5.js} +2 -2
  212. package/dist/{chunk-8a5bxece.js → chunk-w21mwxdd.js} +1 -1
  213. package/dist/{chunk-20swzkx3.js → chunk-w4n8fqp7.js} +1 -1
  214. package/dist/{chunk-m491r0rj.js → chunk-w959hm8j.js} +1 -1
  215. package/dist/{chunk-9b6cec0v.js → chunk-wk07pwtd.js} +1 -1
  216. package/dist/{chunk-amaa1bev.js → chunk-wxvyj65q.js} +1 -1
  217. package/dist/{chunk-m8448qby.js → chunk-x1hjv24z.js} +1 -1
  218. package/dist/{chunk-frg705zq.js → chunk-x39sfpvm.js} +1 -1
  219. package/dist/{chunk-j58vh0w6.js → chunk-x4fze3q2.js} +1 -1
  220. package/dist/{chunk-35faj94w.js → chunk-x64kb787.js} +1 -1
  221. package/dist/{chunk-vg5kt6az.js → chunk-xcb0pbr6.js} +1 -1
  222. package/dist/{chunk-p077sw22.js → chunk-xhkjhxsp.js} +1 -1
  223. package/dist/{chunk-zcxzdrn7.js → chunk-xhnpsngj.js} +2 -2
  224. package/dist/{chunk-7j5e8sdj.js → chunk-xsqbk4yk.js} +2 -2
  225. package/dist/{chunk-r0jcmpv6.js → chunk-xygc53vr.js} +1 -1
  226. package/dist/{chunk-nhv099jv.js → chunk-y25pr13j.js} +1 -1
  227. package/dist/{chunk-rvptcndz.js → chunk-y4c744dk.js} +2 -2
  228. package/dist/{chunk-wfg2gm11.js → chunk-y4md9hp0.js} +1 -1
  229. package/dist/{chunk-n5kg7fpx.js → chunk-y5wazw6j.js} +1 -1
  230. package/dist/{chunk-8dhdpa5h.js → chunk-y86m1wr4.js} +2 -2
  231. package/dist/{chunk-veeerpwa.js → chunk-yaan98dd.js} +1 -1
  232. package/dist/{chunk-bxc7kjsk.js → chunk-yach037f.js} +1 -1
  233. package/dist/{chunk-06w68hyg.js → chunk-yexjrg9d.js} +2 -2
  234. package/dist/{chunk-6eqbxcrd.js → chunk-yj560gp8.js} +1 -1
  235. package/dist/{chunk-ejh8fyak.js → chunk-yr1gdceh.js} +1 -1
  236. package/dist/{chunk-r5m9xtm7.js → chunk-yw2fzq86.js} +2 -2
  237. package/dist/{chunk-h5jxydqq.js → chunk-ywkrxp2h.js} +1 -1
  238. package/dist/{chunk-j8tn8enq.js → chunk-z37xq5rx.js} +2 -2
  239. package/dist/{chunk-npfmdb6y.js → chunk-z4djtgt0.js} +1 -1
  240. package/dist/{chunk-zk3d0jjf.js → chunk-z8cjr9n9.js} +1 -1
  241. package/dist/{chunk-10debkj5.js → chunk-znxp3zha.js} +1 -1
  242. package/dist/{chunk-k848dzsa.js → chunk-zt2yag10.js} +1 -1
  243. package/dist/cli.js +1 -1
  244. package/dist/client/directive.js +1 -1
  245. package/dist/client/index.js +1 -1
  246. package/dist/client-helpers.js +1 -1
  247. package/dist/client-script-bundler.js +1 -1
  248. package/dist/client-script.js +1 -1
  249. package/dist/component-hmr.js +1 -1
  250. package/dist/component-processing.js +1 -1
  251. package/dist/component-registry.js +1 -1
  252. package/dist/component-renderer.js +1 -1
  253. package/dist/components.js +1 -1
  254. package/dist/composables/index.js +1 -1
  255. package/dist/composables/use-battery.js +1 -1
  256. package/dist/composables/use-broadcast-channel.js +1 -1
  257. package/dist/composables/use-channel.js +1 -1
  258. package/dist/composables/use-clipboard.js +1 -1
  259. package/dist/composables/use-color-mode.js +1 -1
  260. package/dist/composables/use-cookie.js +1 -1
  261. package/dist/composables/use-device-orientation.js +1 -1
  262. package/dist/composables/use-event-listener.js +1 -1
  263. package/dist/composables/use-event-source.js +1 -1
  264. package/dist/composables/use-eye-dropper.js +1 -1
  265. package/dist/composables/use-fetch.js +1 -1
  266. package/dist/composables/use-fullscreen.js +1 -1
  267. package/dist/composables/use-geolocation.js +1 -1
  268. package/dist/composables/use-idle.js +1 -1
  269. package/dist/composables/use-intersection-observer.js +1 -1
  270. package/dist/composables/use-keyboard.js +1 -1
  271. package/dist/composables/use-media-query.js +1 -1
  272. package/dist/composables/use-meta.js +1 -1
  273. package/dist/composables/use-mouse.js +1 -1
  274. package/dist/composables/use-mutation-observer.js +1 -1
  275. package/dist/composables/use-network.js +1 -1
  276. package/dist/composables/use-notification.js +1 -1
  277. package/dist/composables/use-permissions.js +1 -1
  278. package/dist/composables/use-resize-observer.js +1 -1
  279. package/dist/composables/use-router.js +1 -1
  280. package/dist/composables/use-share.js +1 -1
  281. package/dist/composables/use-speech.js +1 -1
  282. package/dist/composables/use-storage.js +1 -1
  283. package/dist/composables/use-text-selection.js +1 -1
  284. package/dist/composables/use-timer.js +1 -1
  285. package/dist/composables/use-utilities.js +1 -1
  286. package/dist/composables/use-wake-lock.js +1 -1
  287. package/dist/composables/use-websocket.js +1 -1
  288. package/dist/composables/use-window.js +1 -1
  289. package/dist/composables.js +1 -1
  290. package/dist/composition-api.js +1 -1
  291. package/dist/computed.js +1 -1
  292. package/dist/conditionals.js +1 -1
  293. package/dist/config.js +1 -1
  294. package/dist/craft-bridge.js +1 -1
  295. package/dist/craft-compiler.js +1 -1
  296. package/dist/craft-components.js +1 -1
  297. package/dist/craft-entry.js +1 -1
  298. package/dist/craft-ssr.js +1 -1
  299. package/dist/csp.js +1 -1
  300. package/dist/csrf.js +1 -1
  301. package/dist/custom-directives.js +1 -1
  302. package/dist/defer.js +1 -1
  303. package/dist/deploy/config-generators.js +1 -1
  304. package/dist/deploy/index.js +1 -1
  305. package/dist/deploy/netlify.js +1 -1
  306. package/dist/dev-server/crosswind.js +1 -1
  307. package/dist/dev-server/index.js +1 -1
  308. package/dist/dev-server/keyboard-shortcuts.js +1 -1
  309. package/dist/dev-server/native-window.js +1 -1
  310. package/dist/dev-server/port-utils.js +1 -1
  311. package/dist/dev-server/serve-app.js +6 -1
  312. package/dist/dev-server/serve-file.js +6 -1
  313. package/dist/dev-server/serve-markdown.js +1 -1
  314. package/dist/dev-server/serve-multi.js +171 -1
  315. package/dist/dev-server/terminal-colors.js +1 -1
  316. package/dist/dev-server/theme-selector.js +1 -1
  317. package/dist/dev-server/types.js +1 -1
  318. package/dist/dev-server.js +1 -1
  319. package/dist/devtools.js +1 -1
  320. package/dist/directive-api.js +1 -1
  321. package/dist/docs.js +1 -1
  322. package/dist/doctor.js +1 -1
  323. package/dist/document-shell.js +1 -1
  324. package/dist/dynamic-components.js +1 -1
  325. package/dist/edge-runtime.js +1 -1
  326. package/dist/env.js +1 -1
  327. package/dist/error-boundaries.js +1 -1
  328. package/dist/error-handling.js +1 -1
  329. package/dist/errors/codes.js +1 -1
  330. package/dist/errors/formatter.js +1 -1
  331. package/dist/errors/index.js +1 -1
  332. package/dist/errors/logger.js +1 -1
  333. package/dist/errors/sanitizer.js +1 -1
  334. package/dist/errors/types.js +1 -1
  335. package/dist/events.js +1 -1
  336. package/dist/expressions.js +1 -1
  337. package/dist/formatter.js +1 -1
  338. package/dist/forms-validation.js +1 -1
  339. package/dist/forms.js +1 -1
  340. package/dist/head.js +1 -1
  341. package/dist/heatmap.js +1 -1
  342. package/dist/hot-reload.js +1 -1
  343. package/dist/html-masking.js +1 -1
  344. package/dist/hydration-runtime.js +1 -1
  345. package/dist/hydration.js +1 -1
  346. package/dist/i18n.js +1 -1
  347. package/dist/image-optimization/auto-sibling.js +1 -1
  348. package/dist/image-optimization/build-plugin.js +1 -1
  349. package/dist/image-optimization/component.js +1 -1
  350. package/dist/image-optimization/directive.js +1 -1
  351. package/dist/image-optimization/index.js +1 -1
  352. package/dist/image-optimization/processor.js +1 -1
  353. package/dist/image-optimization/serve.js +1 -1
  354. package/dist/includes.js +1 -1
  355. package/dist/index.js +1 -1
  356. package/dist/init.js +1 -1
  357. package/dist/inline-assets.js +1 -1
  358. package/dist/interactive.js +1 -1
  359. package/dist/internal-markdown.js +1 -1
  360. package/dist/island-chunking.js +1 -1
  361. package/dist/js-ts.js +1 -1
  362. package/dist/jsx-runtime.js +1 -1
  363. package/dist/keep-alive.js +1 -1
  364. package/dist/lazy-loader.js +1 -1
  365. package/dist/loading-indicator.js +1 -1
  366. package/dist/loops.js +1 -1
  367. package/dist/manifest.js +1 -1
  368. package/dist/markdown.js +1 -1
  369. package/dist/media/client/blur-up.js +1 -1
  370. package/dist/media/client/index.js +1 -1
  371. package/dist/media/client/lazy-load.js +1 -1
  372. package/dist/media/client/upload-handler.js +1 -1
  373. package/dist/media/image/component.js +1 -1
  374. package/dist/media/image/directive.js +1 -1
  375. package/dist/media/image/editing.js +1 -1
  376. package/dist/media/image/index.js +1 -1
  377. package/dist/media/image/placeholder.js +1 -1
  378. package/dist/media/image/processor/cache.js +1 -1
  379. package/dist/media/image/processor/index.js +1 -1
  380. package/dist/media/image/processor/optimizer.js +1 -1
  381. package/dist/media/image/processor/responsive.js +1 -1
  382. package/dist/media/image/srcset.js +1 -1
  383. package/dist/media/index.js +1 -1
  384. package/dist/media/manager/embed.js +1 -1
  385. package/dist/media/protected/component.js +1 -1
  386. package/dist/media/protected/index.js +1 -1
  387. package/dist/media/protected/signature.js +1 -1
  388. package/dist/media/shared/cache.js +1 -1
  389. package/dist/media/shared/hash.js +1 -1
  390. package/dist/media/shared/index.js +1 -1
  391. package/dist/media/upload/component.js +1 -1
  392. package/dist/media/upload/index.js +1 -1
  393. package/dist/media/video/directive.js +1 -1
  394. package/dist/media/video/index.js +1 -1
  395. package/dist/media/video/processor/cache.js +1 -1
  396. package/dist/media/video/processor/index.js +1 -1
  397. package/dist/media/video/processor/streaming.js +1 -1
  398. package/dist/media/video/processor/thumbnail.js +1 -1
  399. package/dist/media/video/processor/transcoder.js +1 -1
  400. package/dist/method-spoofing.js +1 -1
  401. package/dist/middleware.js +1 -1
  402. package/dist/misc-directives.js +1 -1
  403. package/dist/native-build.js +1 -1
  404. package/dist/parser/directive-parser.js +1 -1
  405. package/dist/parser/expression-parser.js +1 -1
  406. package/dist/parser/index.js +1 -1
  407. package/dist/parser/tokenizer.js +1 -1
  408. package/dist/partial-hydration.js +1 -1
  409. package/dist/performance-utils.js +1 -1
  410. package/dist/placeholder.js +1 -1
  411. package/dist/plugin-system.js +1 -1
  412. package/dist/plugin.js +1 -1
  413. package/dist/precompiler.js +1 -1
  414. package/dist/process.js +1 -1
  415. package/dist/production-build.js +1 -1
  416. package/dist/production-builder.js +1 -1
  417. package/dist/production-server.js +1 -1
  418. package/dist/props.js +1 -1
  419. package/dist/public-env.js +1 -1
  420. package/dist/pwa/audit.js +1 -1
  421. package/dist/pwa/directives.js +1 -1
  422. package/dist/pwa/icons.js +1 -1
  423. package/dist/pwa/index.js +1 -1
  424. package/dist/pwa/inject.js +1 -1
  425. package/dist/pwa/manifest.js +1 -1
  426. package/dist/pwa/offline.js +1 -1
  427. package/dist/pwa/precache.js +1 -1
  428. package/dist/pwa/service-worker.js +1 -1
  429. package/dist/pwa/workbox-strategies.js +1 -1
  430. package/dist/pwa/workbox.js +1 -1
  431. package/dist/reactive-bindings.js +1 -1
  432. package/dist/reactive.js +1 -1
  433. package/dist/reactivity.js +1 -1
  434. package/dist/release.js +1 -1
  435. package/dist/render.js +1 -1
  436. package/dist/route-middleware.js +1 -1
  437. package/dist/router.js +1 -1
  438. package/dist/routes.js +1 -1
  439. package/dist/runtime-injection.js +1 -1
  440. package/dist/runtime.js +1 -1
  441. package/dist/safe-evaluator.js +1 -1
  442. package/dist/scaffolding.js +1 -1
  443. package/dist/screenshot.js +1 -1
  444. package/dist/script-classifier.js +1 -1
  445. package/dist/script-validation.js +1 -1
  446. package/dist/seo.js +1 -1
  447. package/dist/serve.js +1 -1
  448. package/dist/server-bindings.js +1 -1
  449. package/dist/server-components.js +1 -1
  450. package/dist/signal-processing.js +1 -1
  451. package/dist/signals-api.js +1 -1
  452. package/dist/signals.js +1 -1
  453. package/dist/site-builder/build.js +1 -1
  454. package/dist/site-builder/i18n.js +1 -1
  455. package/dist/site-builder/index.js +1 -1
  456. package/dist/site-builder/robots.js +1 -1
  457. package/dist/site-builder/router.js +1 -1
  458. package/dist/site-builder/seo.js +1 -1
  459. package/dist/site-builder/sitemap.js +1 -1
  460. package/dist/site-builder/theme.js +1 -1
  461. package/dist/slots.js +1 -1
  462. package/dist/source-maps.js +1 -1
  463. package/dist/spa-shell.js +1 -1
  464. package/dist/ssr.js +1 -1
  465. package/dist/state-management.js +1 -1
  466. package/dist/store-imports.js +1 -1
  467. package/dist/store-loader.js +1 -1
  468. package/dist/stores-client.js +1 -1
  469. package/dist/story/addons.js +1 -1
  470. package/dist/story/analytics.js +1 -1
  471. package/dist/story/auto-stories.js +1 -1
  472. package/dist/story/bookmarks.js +1 -1
  473. package/dist/story/bun-test.js +1 -1
  474. package/dist/story/cli.js +1 -1
  475. package/dist/story/collect/analyzer.js +1 -1
  476. package/dist/story/collect/index.js +1 -1
  477. package/dist/story/collect/parser.js +1 -1
  478. package/dist/story/collect/scanner.js +1 -1
  479. package/dist/story/collect/tree.js +1 -1
  480. package/dist/story/commands/build.js +1 -1
  481. package/dist/story/commands/dev.js +1 -1
  482. package/dist/story/commands/index.js +1 -1
  483. package/dist/story/commands/preview.js +1 -1
  484. package/dist/story/compiled-output.js +1 -1
  485. package/dist/story/composition.js +1 -1
  486. package/dist/story/config-watcher.js +1 -1
  487. package/dist/story/config.js +1 -1
  488. package/dist/story/context.js +1 -1
  489. package/dist/story/controls/index.js +1 -1
  490. package/dist/story/crosswind.js +1 -1
  491. package/dist/story/desktop-preview.js +1 -1
  492. package/dist/story/docs-generator.js +1 -1
  493. package/dist/story/errors.js +1 -1
  494. package/dist/story/figma-export.js +1 -1
  495. package/dist/story/generator.js +1 -1
  496. package/dist/story/hmr.js +1 -1
  497. package/dist/story/hot-swap.js +1 -1
  498. package/dist/story/index.js +1 -1
  499. package/dist/story/interactions.js +1 -1
  500. package/dist/story/keyboard-shortcuts.js +1 -1
  501. package/dist/story/output.js +1 -1
  502. package/dist/story/performance.js +1 -1
  503. package/dist/story/presets.js +1 -1
  504. package/dist/story/props-validation.js +1 -1
  505. package/dist/story/renderer.js +1 -1
  506. package/dist/story/search-index.js +1 -1
  507. package/dist/story/search.js +1 -1
  508. package/dist/story/server.js +1 -1
  509. package/dist/story/setup.js +1 -1
  510. package/dist/story/snapshots.js +1 -1
  511. package/dist/story/testing.js +1 -1
  512. package/dist/story/theme.js +1 -1
  513. package/dist/story/ui/code-panel.js +1 -1
  514. package/dist/story/ui/controls-panel.js +1 -1
  515. package/dist/story/ui/index.js +1 -1
  516. package/dist/story/ui/navigation.js +1 -1
  517. package/dist/story/ui/preview.js +1 -1
  518. package/dist/story/visual-testing.js +1 -1
  519. package/dist/streaming.js +1 -1
  520. package/dist/strict-lint.js +1 -1
  521. package/dist/style-scoping.js +1 -1
  522. package/dist/suspense.js +1 -1
  523. package/dist/teleport.js +1 -1
  524. package/dist/template-compiler.js +1 -1
  525. package/dist/template-hydrator.js +1 -1
  526. package/dist/template-tag-balance.js +1 -1
  527. package/dist/testing.js +1 -1
  528. package/dist/transitions.js +1 -1
  529. package/dist/type-checker.js +1 -1
  530. package/dist/types/directive-types.js +1 -1
  531. package/dist/types/index.js +1 -1
  532. package/dist/types.js +1 -1
  533. package/dist/typescript-templates.js +1 -1
  534. package/dist/utils.js +1 -1
  535. package/dist/validator.js +1 -1
  536. package/dist/variable-extractor.js +1 -1
  537. package/dist/view-composers.js +1 -1
  538. package/dist/virtual-scrolling.js +1 -1
  539. package/dist/visual-editor.js +1 -1
  540. package/dist/vue-template.js +1 -1
  541. package/dist/web-components/css-scoping.js +1 -1
  542. package/dist/web-components/index.js +1 -1
  543. package/dist/web-components/reactive-generator.js +1 -1
  544. package/dist/web-components.js +1 -1
  545. package/dist/x-element.js +1 -1
  546. package/package.json +5 -5
  547. package/dist/chunk-2jxbwnkz.js +0 -2
  548. package/dist/chunk-ejayeex8.js +0 -2
  549. package/dist/chunk-qa59zejf.js +0 -246
  550. package/dist/chunk-xqq1vxb6.js +0 -1
  551. package/dist/chunk-yywfvfph.js +0 -2
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Xe as P,bf as v,df as d}from"./chunk-yj4x5ehw.js";import{jf as Z,kf as _,lf as E,mf as G}from"./chunk-nd9rmddh.js";import{mB as z,nB as A,oB as R}from"./chunk-xv34zbp4.js";var H={};A(H,{isWorkboxEnabled:()=>V,getServiceWorkerFileName:()=>m,generateServiceWorkerAuto:()=>y,generateServiceWorker:()=>U});function U(j,F){let q=j.pwa;if(!q?.enabled)return"";let B=q.serviceWorker||{},X=q.routes||[],L=B.cacheVersion||"1.0.0",O=q.offline,Y=O?.page?"/offline.html":"/offline.html",Q=q.push,K=q.backgroundSync,T=q.cacheStorage,$=F?Z(F,j):null,W=$?_($):"[]",b=["/","/manifest.json",...O?.enabled?[Y]:[],...O?.precacheAssets||[]];return`/**
2
+ import{Xe as P,bf as v,df as d}from"./chunk-vw6ejgmy.js";import{jf as Z,kf as _,lf as E,mf as G}from"./chunk-75rndzbd.js";import{oB as z,pB as A,qB as R}from"./chunk-3jm3snz8.js";var H={};A(H,{isWorkboxEnabled:()=>V,getServiceWorkerFileName:()=>m,generateServiceWorkerAuto:()=>y,generateServiceWorker:()=>U});function U(j,F){let q=j.pwa;if(!q?.enabled)return"";let B=q.serviceWorker||{},X=q.routes||[],L=B.cacheVersion||"1.0.0",O=q.offline,Y=O?.page?"/offline.html":"/offline.html",Q=q.push,K=q.backgroundSync,T=q.cacheStorage,$=F?Z(F,j):null,W=$?_($):"[]",b=["/","/manifest.json",...O?.enabled?[Y]:[],...O?.precacheAssets||[]];return`/**
3
3
  * Service Worker - Auto-generated by stx
4
4
  * Cache Version: ${L}
5
5
  *
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{uu as $}from"./chunk-mgj88zeq.js";import{xu as Y,zu as Z}from"./chunk-m167kjhv.js";import{xw as X}from"./chunk-h5jxydqq.js";function f(){return X({name:"img",hasEndTag:!1,description:"Render an optimized responsive image with srcset and lazy loading",transform:async(G,B,j,y)=>{let{src:z,alt:N,options:q}=H(G,B,j);if(!z)return console.warn("@img directive: missing src argument"),"<!-- @img: missing src -->";let J={src:z,alt:N||"",widths:q.widths||Y,formats:q.formats||Z,quality:q.quality,sizes:q.sizes,dpr:q.dpr,params:q.params,placeholder:q.placeholder,placeholderOptions:q.placeholderOptions,lazy:q.lazy!==!1,priority:q.priority||!1,loading:q.loading,decoding:q.decoding,fetchpriority:q.fetchpriority,objectFit:q.objectFit,objectPosition:q.objectPosition,class:q.class,style:q.style,id:q.id,width:q.width,height:q.height},w=j.__isDev||!1,K=await $(J,{isDev:w}),P=K.html;if(K.preloadLink)P=K.preloadLink+`
2
+ import{vu as $}from"./chunk-tj6zfxeb.js";import{Au as Z,yu as Y}from"./chunk-7xcfy2fn.js";import{yw as X}from"./chunk-ywkrxp2h.js";function f(){return X({name:"img",hasEndTag:!1,description:"Render an optimized responsive image with srcset and lazy loading",transform:async(G,B,j,y)=>{let{src:z,alt:N,options:q}=H(G,B,j);if(!z)return console.warn("@img directive: missing src argument"),"<!-- @img: missing src -->";let J={src:z,alt:N||"",widths:q.widths||Y,formats:q.formats||Z,quality:q.quality,sizes:q.sizes,dpr:q.dpr,params:q.params,placeholder:q.placeholder,placeholderOptions:q.placeholderOptions,lazy:q.lazy!==!1,priority:q.priority||!1,loading:q.loading,decoding:q.decoding,fetchpriority:q.fetchpriority,objectFit:q.objectFit,objectPosition:q.objectPosition,class:q.class,style:q.style,id:q.id,width:q.width,height:q.height},w=j.__isDev||!1,K=await $(J,{isDev:w}),P=K.html;if(K.preloadLink)P=K.preloadLink+`
3
3
  `+P;if(K.css)P+=`
4
4
  <style>${K.css}</style>`;if(K.script)P+=`
5
5
  <script>${K.script}</script>`;return P},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function H(G,B,j){if(B.src)return{src:String(B.src),alt:String(B.alt||""),options:B.options||{}};let y=G.trim();if(y.startsWith("@img(")||y.startsWith("("))y=y.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let z=M(y),N=Q(z[0],j)||"",q=Q(z[1],j)||"",J={};if(z[2]){let w=Q(z[2],j);if(typeof w==="object"&&w!==null)J=w;else if(typeof z[2]==="string")try{J=JSON.parse(z[2])}catch{}}return{src:N,alt:q,options:J}}function M(G){let B=[],j="",y=!1,z="",N=0,q=0;for(let J=0;J<G.length;J++){let w=G[J],K=J>0?G[J-1]:"";if((w==='"'||w==="'"||w==="`")&&K!=="\\"){if(!y)y=!0,z=w;else if(w===z)y=!1,z="";else j+=w;continue}if(!y){if(w==="{")N++;if(w==="}")N--;if(w==="[")q++;if(w==="]")q--;if(w===","&&N===0&&q===0){B.push(j.trim()),j="";continue}}j+=w}if(j.trim())B.push(j.trim());return B}function Q(G,B){if(typeof G!=="string")return G;let j=G.trim();if(j.startsWith('"')&&j.endsWith('"')||j.startsWith("'")&&j.endsWith("'"))return j.slice(1,-1);if(!j.startsWith("/")&&!j.startsWith(".")&&!j.startsWith("http")&&!j.startsWith("{")){let y=B[j];if(y!==void 0)return y}if(j.startsWith("{")||j.startsWith("["))try{return JSON.parse(j)}catch{}return j}var L=f();
6
- export{f as su,L as tu};
6
+ export{f as tu,L as uu};
@@ -344,4 +344,4 @@ else {
344
344
 
345
345
  console.log('[stx] Lifecycle runtime initialized');
346
346
  })();
347
- `}var J=new Map,F=[];function Y(q){return Symbol(q)}function y(q,z){(F.length>0?F[F.length-1]:J).set(q,z)}function I(q,z){for(let B=F.length-1;B>=0;B--){let E=F[B];if(E.has(q))return E.get(q)}if(J.has(q))return J.get(q);if(arguments.length>1)return z;console.warn(`[stx] Injection "${String(q)}" not found.`);return}function w(){F.push(new Map)}function D(){F.pop()}async function k(q){w();try{return await q()}finally{D()}}function p(){J.clear(),F.length=0}var l=Y("theme"),u=Y("router"),r=Y("i18n");export{A as zz,$ as Az,T as Bz,N as Cz,K as Dz,O as Ez,x as Fz,v as Gz,f as Hz,W as Iz,g as Jz,S as Kz,m as Lz,C as Mz,d as Nz,h as Oz,V as Pz,j as Qz,Y as Rz,y as Sz,I as Tz,w as Uz,D as Vz,k as Wz,p as Xz,l as Yz,u as Zz,r as _z};
347
+ `}var J=new Map,F=[];function Y(q){return Symbol(q)}function y(q,z){(F.length>0?F[F.length-1]:J).set(q,z)}function I(q,z){for(let B=F.length-1;B>=0;B--){let E=F[B];if(E.has(q))return E.get(q)}if(J.has(q))return J.get(q);if(arguments.length>1)return z;console.warn(`[stx] Injection "${String(q)}" not found.`);return}function w(){F.push(new Map)}function D(){F.pop()}async function k(q){w();try{return await q()}finally{D()}}function p(){J.clear(),F.length=0}var l=Y("theme"),u=Y("router"),r=Y("i18n");export{A as Bz,$ as Cz,T as Dz,N as Ez,K as Fz,O as Gz,x as Hz,v as Iz,f as Jz,W as Kz,g as Lz,S as Mz,m as Nz,C as Oz,d as Pz,h as Qz,V as Rz,j as Sz,Y as Tz,y as Uz,I as Vz,w as Wz,D as Xz,k as Yz,p as Zz,l as _z,u as $z,r as aA};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{fe as J}from"./chunk-0qnz93q2.js";import{pB as N}from"./chunk-xv34zbp4.js";import O from"fs";import z from"path";async function Q(A={}){console.log(`
2
+ import{fe as J}from"./chunk-0qnz93q2.js";import{rB as N}from"./chunk-3jm3snz8.js";import O from"fs";import z from"path";async function Q(A={}){console.log(`
3
3
  \uD83D\uDCD6 Previewing STX Story build...
4
4
  `);let g=await J({mode:"build"}),B=z.resolve(g.root,g.config.outDir),K=z.join(B,"index.html");try{await O.promises.access(K)}catch{console.log(` \u274C No build found at ${g.config.outDir}`),console.log(` Run "stx story build" first.
5
5
  `);return}let j=A.port??4173,L=Bun.serve({port:j,async fetch(k){let b=new URL(k.url).pathname;if(b==="/")b="/index.html";let G=z.join(B,b);try{let H=Bun.file(G);if(!await H.exists()){let M=`${G}.html`,I=Bun.file(M);if(await I.exists())return new Response(I);return new Response("Not found",{status:404})}return new Response(H)}catch{return new Response("Error",{status:500})}}});if(console.log(" \uD83D\uDCDA Preview server running at:"),console.log(` http://localhost:${j}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{zy as J}from"./chunk-fjk3x41y.js";import{Jy as K}from"./chunk-5shey2e4.js";import{pB as I}from"./chunk-xv34zbp4.js";var V={isEnabled(){return J().enableAutoRecovery},fixCommonSyntaxErrors(j){let k=J();if(!k.enableAutoRecovery)return{fixed:j,fixes:[]};let q=j,z=[],A=(q.match(/\{\{/g)||[]).length,H=(q.match(/\}\}/g)||[]).length;if(A>H){let G=A-H;q+="}}".repeat(G),z.push(`Added ${G} missing closing braces '}}'`)}let F=["if","foreach","for","switch","section"];for(let G of F){let M=(q.match(new RegExp(`@${G}\\b`,"g"))||[]).length,N=(q.match(new RegExp(`@end${G}\\b`,"g"))||[]).length;if(M>N){let O=M-N;for(let Q=0;Q<O;Q++)q+=`
2
+ import{By as J}from"./chunk-ht4j68cs.js";import{Ly as K}from"./chunk-fch9tk1k.js";import{rB as I}from"./chunk-3jm3snz8.js";var V={isEnabled(){return J().enableAutoRecovery},fixCommonSyntaxErrors(j){let k=J();if(!k.enableAutoRecovery)return{fixed:j,fixes:[]};let q=j,z=[],A=(q.match(/\{\{/g)||[]).length,H=(q.match(/\}\}/g)||[]).length;if(A>H){let G=A-H;q+="}}".repeat(G),z.push(`Added ${G} missing closing braces '}}'`)}let F=["if","foreach","for","switch","section"];for(let G of F){let M=(q.match(new RegExp(`@${G}\\b`,"g"))||[]).length,N=(q.match(new RegExp(`@end${G}\\b`,"g"))||[]).length;if(M>N){let O=M-N;for(let Q=0;Q<O;Q++)q+=`
3
3
  @end${G}`;z.push(`Added ${O} missing @end${G}`)}}if(z.length>0&&k.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),z.forEach((G)=>console.warn(` - ${G}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:q,fixes:z}},createFallbackContent(j,k){if(K())return`<!-- ${j} failed: ${k.message} -->`;return"<!-- stx rendering error -->"}};class R{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(j={}){this.maxErrors=j.maxErrors??1000,this.enableFileLogging=j.enableFileLogging??!1,this.logFilePath=j.logFilePath??".stx/errors.log",this.logFormat=j.logFormat??"json",this.maxFileSize=j.maxFileSize??10485760,this.maxLogFiles=j.maxLogFiles??5,this.minLevel=j.minLevel??"all"}configure(j){if(j.maxErrors!==void 0)this.maxErrors=j.maxErrors;if(j.enableFileLogging!==void 0)this.enableFileLogging=j.enableFileLogging;if(j.logFilePath!==void 0)this.logFilePath=j.logFilePath;if(j.logFormat!==void 0)this.logFormat=j.logFormat;if(j.maxFileSize!==void 0)this.maxFileSize=j.maxFileSize;if(j.maxLogFiles!==void 0)this.maxLogFiles=j.maxLogFiles;if(j.minLevel!==void 0)this.minLevel=j.minLevel}log(j,k,q="error"){let z={timestamp:new Date,error:j,context:k,level:q};if(this.errors.push(z),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(q))this.writeToFile(z)}shouldLog(j){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return j==="error"||j==="warning";if(this.minLevel==="error")return j==="error";return!0}formatEntry(j){if(this.logFormat==="json")return JSON.stringify({timestamp:j.timestamp.toISOString(),level:j.level||"error",type:j.error.constructor.name,message:j.error.message,stack:j.error.stack,context:j.context});let k=[`[${j.timestamp.toISOString()}] [${(j.level||"error").toUpperCase()}] ${j.error.constructor.name}: ${j.error.message}`];if(j.error.stack)k.push(` Stack: ${j.error.stack.split(`
4
4
  `).slice(1).join(`
5
5
  `)}`);if(j.context)k.push(` Context: ${JSON.stringify(j.context)}`);return k.join(`
@@ -8,4 +8,4 @@ import{zy as J}from"./chunk-fjk3x41y.js";import{Jy as K}from"./chunk-5shey2e4.js
8
8
 
9
9
  `),"utf-8")}}async flush(){await this.writeQueue}}var W=new R,X={isDevelopment(){return K()},logDetailedError(j,k){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",j.message),console.error("Stack:",j.stack),k)console.error("Context:",k);console.error("========================")},createErrorReport(j,k){let q=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${j.message}`,`Type: ${j.constructor.name}`,`Stack: ${j.stack}`];if(k)q.push(`Context: ${JSON.stringify(k,null,2)}`);return q.push("========================"),q.join(`
10
10
  `)}};
11
- export{V as uy,R as vy,W as wy,X as xy};
11
+ export{V as wy,R as xy,W as yy,X as zy};
@@ -5,4 +5,4 @@ var P=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{nam
5
5
  ${F} [${U.join(`,
6
6
  ${F} `)}]`:"";return`Craft.create("${j.zigType}", ${Q}${W})`}function s(j,q,F){if(q.target==="universal"){let G=[];G.push("// Universal entry point"),G.push("");for(let[Q,U]of F)G.push(`// --- ${Q.toUpperCase()} ---`),G.push(`#if ${Q.toUpperCase()}`),G.push(U),G.push("#endif"),G.push("");return G.join(`
7
7
  `)}return F.get(q.target)||J(j,q)}function r(j,q,F){let G=[];function Q(U){G.push({name:U.zigType,hash:D(JSON.stringify(U.props)),props:Object.keys(U.props),events:Array.from(U.events.keys()),slots:[],isNative:U.zigType.startsWith("craft.")});for(let W of U.children)Q(W)}return Q(q),{version:"1.0.0",components:G,entry:j.id,assets:[],styles:j.styles}}function p(j,q){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}var d=0;function E(){return`id_${++d}`}function D(j){let q=0;for(let F=0;F<j.length;F++){let G=j.charCodeAt(F);q=(q<<5)-q+G,q=q&q}return Math.abs(q).toString(36)}function l(j){return j.charAt(0).toUpperCase()+j.slice(1)}function i(j){let q=[],F=/<script[^>]*>([\s\S]*?)<\/script>/gi,G;while((G=F.exec(j))!==null)q.push(G[1]);return q}function a(j){let q=[],F=/<style[^>]*>([\s\S]*?)<\/style>/gi,G;while((G=F.exec(j))!==null)q.push(G[1]);return q}function B(j){let q=j.type==="component"?1:0;if(j.children)for(let F of j.children)q+=B(F);return q}function b(j){let q=j.zigType.startsWith("craft.")?1:0;for(let F of j.children)q+=b(F);return q}function o(j){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(q)=>{console.log(`[craft-compiler] File changed: ${q}`)}}}var t={compileToNative:k,createHotReloadServer:o,NATIVE_COMPONENTS:P},e=t;
8
- export{P as Bo,k as Co,o as Do,e as Eo};
8
+ export{P as Co,k as Do,o as Eo,e as Fo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function E(j,...A){for(let z of A){if(j.serverDynamic[z]!==void 0)return String(j.serverDynamic[z]);let w=j.static[z];if(typeof w==="string")return w}return}function G(j,A){let z=new RegExp(`<(template|div|span)[^>]*\\bslot=["']${A}["'][^>]*>([\\s\\S]*?)<\\/\\1>`,"i"),w=j.match(z);if(!w)return{region:null,rest:j};return{region:w[2],rest:j.replace(w[0],"")}}var L={name:"Suspense",aliases:["suspense"],render(j,A,z){let w=G(A,"fallback"),H=w.rest,B=G(H,"error"),I=B.rest,J=w.region??E(j,"fallback")??'<div class="stx-suspense-loading">Loading\u2026</div>',K=B.region??E(j,"errorFallback","error-fallback")??'<div class="stx-suspense-error">Something went wrong.</div>';return`<div data-stx-suspense><div data-stx-suspense-fallback>${J}</div><div data-stx-suspense-error hidden>${K}</div><div data-stx-suspense-content hidden>${I}</div></div>`}};
3
- export{L as _y};
3
+ export{L as az};
@@ -90,4 +90,4 @@ else {
90
90
  window.STX.initLazyLoading = init;
91
91
  })();
92
92
  `.trim()}
93
- export{$ as nl,G as ol,A as pl,M as ql,D as rl,F as sl,P as tl,U as ul,_ as vl,N as wl};
93
+ export{$ as kl,G as ll,A as ml,M as nl,D as ol,F as pl,P as ql,U as rl,_ as sl,N as tl};
@@ -216,4 +216,4 @@ else {
216
216
  color: white;
217
217
  }
218
218
  `.trim();return{html:J,script:L,css:M}}function P(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
219
- export{Y as Kj,Z as Lj};
219
+ export{Y as Hj,Z as Ij};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pB as q}from"./chunk-xv34zbp4.js";var D={strategy:"thumbhash",width:20,quality:50,blurLevel:40,transitionDuration:300,easing:"ease-out"},K=`
2
+ import{rB as q}from"./chunk-3jm3snz8.js";var D={strategy:"thumbhash",width:20,quality:50,blurLevel:40,transitionDuration:300,easing:"ease-out"},K=`
3
3
  .stx-img-placeholder {
4
4
  position: relative;
5
5
  overflow: hidden;
@@ -48,4 +48,4 @@ import{pB as q}from"./chunk-xv34zbp4.js";var D={strategy:"thumbhash",width:20,qu
48
48
  opacity: 1;
49
49
  }
50
50
  `.trim()}function T(j){return`background-image: url('${j.dataURL}'); background-size: cover; background-position: center;`}var Q=new Map;async function _(j,f={}){let x=`${j}:${JSON.stringify(f)}`;if(Q.has(x))return Q.get(x);let z=await Z(j,f);return Q.set(x,z),z}function C(){Q.clear()}function u(){return{size:Q.size,keys:Array.from(Q.keys())}}
51
- export{D as Uu,K as Vu,Z as Wu,O as Xu,b as Yu,L as Zu,y as _u,A as $u,P as av,T as bv,_ as cv,C as dv,u as ev};
51
+ export{D as Vu,K as Wu,Z as Xu,O as Yu,b as Zu,L as _u,y as $u,A as av,P as bv,T as cv,_ as dv,C as ev,u as fv};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{pB as I}from"./chunk-xv34zbp4.js";import{createHash as v}from"crypto";import{existsSync as X,mkdirSync as H,readFileSync as $,writeFileSync as T,readdirSync as B,statSync as F}from"fs";import{basename as Y,dirname as W,extname as Z,join as V,relative as N}from"path";import{gzipSync as k}from"zlib";var D={outDir:"dist",publicPath:"/",sourcemaps:!0,minify:{js:!0,css:!0,html:!0,dropConsole:!0,dropDebugger:!0,mangle:!0},splitting:{vendor:!0,minSize:20000,maxSize:250000,chunkNames:"deterministic"},css:{extract:!0,minify:!0,filename:"assets/[name].[hash].css"},assets:{inlineLimit:4096,filename:"assets/[name].[hash][ext]",hash:!0,hashLength:8,include:["png","jpg","jpeg","gif","svg","webp","woff","woff2","ttf","eot"]},compression:{gzip:!0,brotli:!0,threshold:1024,deleteOriginal:!1}};class w{config;startTime=0;outputs=[];chunks=[];assets=[];warnings=[];errors=[];moduleGraph=new Map;assetHashes=new Map;constructor(E){this.config={...D,...E}}async build(){this.startTime=Date.now(),this.outputs=[],this.chunks=[],this.assets=[],this.warnings=[],this.errors=[];try{this.ensureDir(this.config.outDir),await this.runPluginHook("setup"),await this.runPluginHook("buildStart");let E=this.collectEntries();for(let[A,G]of E)await this.buildEntry(A,G);if(this.config.css?.extract)await this.extractCss();if(await this.processAssets(),this.config.splitting)await this.performCodeSplitting();if(this.config.minify)await this.minifyOutputs();if(this.config.sourcemaps)await this.generateSourceMaps();if(await this.fingerprintAssets(),this.config.compression)await this.compressOutputs();if(this.config.analyze)await this.analyzeBundle();let q=this.getResult();return await this.runPluginHook("buildEnd",q),q}catch(E){return this.errors.push(String(E)),this.getResult()}}collectEntries(){let E=new Map,{entry:q}=this.config;if(typeof q==="string")E.set("main",q);else if(Array.isArray(q))q.forEach((A,G)=>{let J=Y(A,Z(A));E.set(J,A)});else if(typeof q==="object")Object.entries(q).forEach(([A,G])=>{E.set(A,G)});return E}async buildEntry(E,q){if(!await Bun.file(q).exists()){this.errors.push(`Entry point not found: ${q}`);return}let A=await Bun.file(q).text(),G=Z(q),J=A,L="js";if(G===".stx"||G===".html")L="html",J=await this.processTemplate(A,q);else if(G===".css")L="css",J=await this.processCss(A,q);else if(G===".js"||G===".ts")L="js",J=await this.processScript(A,q);J=await this.runPluginTransform(J,q);let K=this.generateHash(J),Q=this.getOutputName(E,L,K),R=V(this.config.outDir,Q);this.ensureDir(W(R)),await Bun.write(R,J),this.outputs.push({path:R,type:L,size:Buffer.byteLength(J),hash:K,sources:[q],isEntry:!0})}resolveRelativePath(E,q){if(q.startsWith("/"))return V(W(E),"..",q);return V(W(E),q)}async processTemplate(E,q){let A=E,G=[],J=[];if(A=A.replace(/<script\b([^>]*)\bstx-inline\b([^>]*)(?:><\/script>|><\/script>|\/>)/gi,(L,K,Q)=>{let R=(K+Q).match(/src=["']([^"']+)["']/);if(R){let U=this.resolveRelativePath(q,R[1]);if(X(U)){let _=$(U,"utf-8");G.push(`// Source: ${R[1]}
2
+ import{rB as I}from"./chunk-3jm3snz8.js";import{createHash as v}from"crypto";import{existsSync as X,mkdirSync as H,readFileSync as $,writeFileSync as T,readdirSync as B,statSync as F}from"fs";import{basename as Y,dirname as W,extname as Z,join as V,relative as N}from"path";import{gzipSync as k}from"zlib";var D={outDir:"dist",publicPath:"/",sourcemaps:!0,minify:{js:!0,css:!0,html:!0,dropConsole:!0,dropDebugger:!0,mangle:!0},splitting:{vendor:!0,minSize:20000,maxSize:250000,chunkNames:"deterministic"},css:{extract:!0,minify:!0,filename:"assets/[name].[hash].css"},assets:{inlineLimit:4096,filename:"assets/[name].[hash][ext]",hash:!0,hashLength:8,include:["png","jpg","jpeg","gif","svg","webp","woff","woff2","ttf","eot"]},compression:{gzip:!0,brotli:!0,threshold:1024,deleteOriginal:!1}};class w{config;startTime=0;outputs=[];chunks=[];assets=[];warnings=[];errors=[];moduleGraph=new Map;assetHashes=new Map;constructor(E){this.config={...D,...E}}async build(){this.startTime=Date.now(),this.outputs=[],this.chunks=[],this.assets=[],this.warnings=[],this.errors=[];try{this.ensureDir(this.config.outDir),await this.runPluginHook("setup"),await this.runPluginHook("buildStart");let E=this.collectEntries();for(let[A,G]of E)await this.buildEntry(A,G);if(this.config.css?.extract)await this.extractCss();if(await this.processAssets(),this.config.splitting)await this.performCodeSplitting();if(this.config.minify)await this.minifyOutputs();if(this.config.sourcemaps)await this.generateSourceMaps();if(await this.fingerprintAssets(),this.config.compression)await this.compressOutputs();if(this.config.analyze)await this.analyzeBundle();let q=this.getResult();return await this.runPluginHook("buildEnd",q),q}catch(E){return this.errors.push(String(E)),this.getResult()}}collectEntries(){let E=new Map,{entry:q}=this.config;if(typeof q==="string")E.set("main",q);else if(Array.isArray(q))q.forEach((A,G)=>{let J=Y(A,Z(A));E.set(J,A)});else if(typeof q==="object")Object.entries(q).forEach(([A,G])=>{E.set(A,G)});return E}async buildEntry(E,q){if(!await Bun.file(q).exists()){this.errors.push(`Entry point not found: ${q}`);return}let A=await Bun.file(q).text(),G=Z(q),J=A,L="js";if(G===".stx"||G===".html")L="html",J=await this.processTemplate(A,q);else if(G===".css")L="css",J=await this.processCss(A,q);else if(G===".js"||G===".ts")L="js",J=await this.processScript(A,q);J=await this.runPluginTransform(J,q);let K=this.generateHash(J),Q=this.getOutputName(E,L,K),R=V(this.config.outDir,Q);this.ensureDir(W(R)),await Bun.write(R,J),this.outputs.push({path:R,type:L,size:Buffer.byteLength(J),hash:K,sources:[q],isEntry:!0})}resolveRelativePath(E,q){if(q.startsWith("/"))return V(W(E),"..",q);return V(W(E),q)}async processTemplate(E,q){let A=E,G=[],J=[];if(A=A.replace(/<script\b([^>]*)\bstx-inline\b([^>]*)(?:><\/script>|><\/script>|\/>)/gi,(L,K,Q)=>{let R=(K+Q).match(/src=["']([^"']+)["']/);if(R){let U=this.resolveRelativePath(q,R[1]);if(X(U)){let _=$(U,"utf-8");G.push(`// Source: ${R[1]}
3
3
  ${_}`)}else this.warnings.push(`External script not found: ${U}`)}return""}),A=A.replace(/<link\b([^>]*)\bstx-inline\b([^>]*)(?:\/>|>)/gi,(L,K,Q)=>{let R=(K+Q).match(/href=["']([^"']+)["']/);if(R){let U=this.resolveRelativePath(q,R[1]);if(X(U)){let _=$(U,"utf-8");J.push(`/* Source: ${R[1]} */
4
4
  ${_}`)}else this.warnings.push(`External stylesheet not found: ${U}`)}return""}),A=A.replace(/<script\b(?![^>]*\bstx-inline\b)([^>]*)>([\s\S]*?)<\/script>/gi,(L,K,Q)=>{if(/\bsrc=/.test(K))return L;if(Q.trim())G.push(Q);return""}),A=A.replace(/<style\b[^>]*>([\s\S]*?)<\/style>/gi,(L,K)=>{if(K.trim())J.push(K);return""}),G.length>0){let L=G.join(`
5
5
 
@@ -50,4 +50,4 @@ ${_}`)}else this.warnings.push(`External stylesheet not found: ${U}`)}return""})
50
50
  </body>
51
51
  </html>`}generateAnalysisText(E){let q=["Bundle Analysis","=".repeat(50),""];for(let A of E.outputs)q.push(`${A.path}`),q.push(` Size: ${A.sizeFormatted}${A.gzipSizeFormatted?` (gzip: ${A.gzipSizeFormatted})`:""}`),q.push("");return q.push("=".repeat(50)),q.push(`Total: ${this.formatSize(E.totalSize)} (gzip: ${this.formatSize(E.totalGzipSize)})`),q.join(`
52
52
  `)}async runPluginHook(E,q){if(!this.config.plugins)return;for(let A of this.config.plugins){let G=A[E];if(typeof G==="function")await G.call(A,q||this)}}async runPluginTransform(E,q){if(!this.config.plugins)return E;let A=E;for(let G of this.config.plugins)if(G.transform){let J=await G.transform(A,q);if(J!=null)A=J}return A}generateHash(E){return v("sha256").update(E).digest("hex")}getOutputName(E,q,A){let G=q==="html"?".html":q==="css"?".css":q==="js"?".js":"";return`${E}.${A.slice(0,8)}${G}`}formatSize(E){if(E<1024)return`${E} B`;if(E<1048576)return`${(E/1024).toFixed(2)} KB`;return`${(E/1048576).toFixed(2)} MB`}ensureDir(E){if(!X(E))H(E,{recursive:!0})}walkDir(E,q){if(!X(E))return;let A=B(E,{withFileTypes:!0});for(let G of A){let J=V(E,G.name);if(G.isDirectory())this.walkDir(J,q);else q(J)}}getResult(){let E=Date.now()-this.startTime,q=this.outputs.reduce((G,J)=>G+J.size,0),A=this.outputs.reduce((G,J)=>G+(J.gzipSize||0),0);return{outputs:this.outputs,duration:E,totalSize:q,gzipSize:A,chunks:this.chunks,assets:this.assets,warnings:this.warnings,errors:this.errors}}}async function C(E){return new w(E).build()}function S(E){return new w(E)}function g(E){return{...D,...E}}
53
- export{w as Ai,C as Bi,S as Ci,g as Di};
53
+ export{w as xi,C as yi,S as zi,g as Ai};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Dp as K}from"./chunk-55nwdnsd.js";var W={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function w(q,v={}){let{title:x="Bundle Analysis",gzip:A=!0,colorScheme:I="default"}=v,F=W[I],J=X(q),G=JSON.stringify(J);return`<!DOCTYPE html>
2
+ import{Ep as K}from"./chunk-g8b81pzc.js";var W={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function w(q,v={}){let{title:x="Bundle Analysis",gzip:A=!0,colorScheme:I="default"}=v,F=W[I],J=X(q),G=JSON.stringify(J);return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -495,4 +495,4 @@ import{Dp as K}from"./chunk-55nwdnsd.js";var W={default:{js:"#f7df1e",css:"#264d
495
495
  </script>
496
496
  </body>
497
497
  </html>`}function X(q){let v={name:"root",size:q.totalSize,gzipSize:q.totalGzipSize,children:[]};for(let x of q.chunks){let A={name:x.name,size:x.size,gzipSize:x.gzipSize,children:[]};for(let I of x.modules)Y(A,I);v.children.push(A)}return v}function Y(q,v){let x=v.path.split("/"),A=q;for(let F=0;F<x.length-1;F++){let J=x[F],G=A.children?.find((V)=>V.name===J);if(!G){if(G={name:J,size:0,gzipSize:0,children:[]},!A.children)A.children=[];A.children.push(G)}A=G}let I=x[x.length-1];if(!A.children)A.children=[];A.children.push({name:I,path:v.path,size:v.size,gzipSize:v.gzipSize,type:v.type}),Z(q,v.size,v.gzipSize)}function Z(q,v,x){}function Q(q){return q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function U(q){let v=process.platform,x=v==="darwin"?"open":v==="win32"?"start":"xdg-open";Bun.spawn([x,q],{stdio:["ignore","ignore","ignore"]})}
498
- export{w as Ap,U as Bp};
498
+ export{w as Bp,U as Cp};
@@ -42,4 +42,4 @@ catch (e) {
42
42
  return result;
43
43
  // eslint-disable-next-line pickier/no-unused-vars
44
44
  `)}
45
- export{g as kz,C as lz,b as mz,z as nz,T as oz,P as pz,y as qz,E as rz,m as sz,u as tz,f as uz,h as vz,l as wz,S as xz,d as yz};
45
+ export{g as mz,C as nz,b as oz,z as pz,T as qz,P as rz,y as sz,E as tz,m as uz,u as vz,f as wz,h as xz,l as yz,S as zz,d as Az};
@@ -289,4 +289,4 @@ else {
289
289
  pointer-events: none;
290
290
  }
291
291
  `.trim();return{html:X,script:Y,css:Z}}function M(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function _(j){return j.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function $(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(1)} MB`}
292
- export{g as xj};
292
+ export{g as uj};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Md as $}from"./chunk-pznnww6k.js";import Y from"fs";import X from"path";async function V(q){let{componentsDir:A,outputDir:K=A,include:R=["**/*.stx"],exclude:M=["**/*.story.stx","**/node_modules/**"],generateVariants:O=!0,includeDefaults:Q=!0,overwrite:J=!1}=q,T=[],j=await w(A,R,M);for(let H of j){let U=H.replace(/\.stx$/,".story.stx"),W=await z(U);if(W&&!J){T.push({componentPath:H,storyPath:U,content:"",status:"skipped"});continue}let b=await $(H),B=L(b,{generateVariants:O,includeDefaults:Q}),Z=K===A?U:X.join(K,X.basename(U));await Y.promises.mkdir(X.dirname(Z),{recursive:!0}),await Y.promises.writeFile(Z,B),T.push({componentPath:H,storyPath:Z,content:B,status:W?"updated":"created"})}return T}function L(q,A={}){let{generateVariants:K=!0,includeDefaults:R=!0}=A,M=[],O={};if(R){for(let j of q.props)if(j.default!==void 0)O[j.name]=j.default}if(M.push({id:"default",title:"Default",state:O}),K){for(let j of q.props)if(j.type==="boolean")M.push({id:`${j.name}-true`,title:`${_(j.name)} (true)`,state:{...O,[j.name]:!0}}),M.push({id:`${j.name}-false`,title:`${_(j.name)} (false)`,state:{...O,[j.name]:!1}});for(let j of q.props)if(j.options&&j.options.length>0)for(let H of j.options)M.push({id:`${j.name}-${H}`,title:`${_(j.name)}: ${H}`,state:{...O,[j.name]:H}})}let Q=q.name,J=q.description||`Stories for ${Q} component`,T=M.map((j)=>{let H=Object.entries(j.state).map(([U,W])=>{if(typeof W==="string")return`${U}="${W}"`;return`:${U}="${JSON.stringify(W)}"`}).join(" ");return`
2
+ import{Md as $}from"./chunk-svhtdb0s.js";import Y from"fs";import X from"path";async function V(q){let{componentsDir:A,outputDir:K=A,include:R=["**/*.stx"],exclude:M=["**/*.story.stx","**/node_modules/**"],generateVariants:O=!0,includeDefaults:Q=!0,overwrite:J=!1}=q,T=[],j=await w(A,R,M);for(let H of j){let U=H.replace(/\.stx$/,".story.stx"),W=await z(U);if(W&&!J){T.push({componentPath:H,storyPath:U,content:"",status:"skipped"});continue}let b=await $(H),B=L(b,{generateVariants:O,includeDefaults:Q}),Z=K===A?U:X.join(K,X.basename(U));await Y.promises.mkdir(X.dirname(Z),{recursive:!0}),await Y.promises.writeFile(Z,B),T.push({componentPath:H,storyPath:Z,content:B,status:W?"updated":"created"})}return T}function L(q,A={}){let{generateVariants:K=!0,includeDefaults:R=!0}=A,M=[],O={};if(R){for(let j of q.props)if(j.default!==void 0)O[j.name]=j.default}if(M.push({id:"default",title:"Default",state:O}),K){for(let j of q.props)if(j.type==="boolean")M.push({id:`${j.name}-true`,title:`${_(j.name)} (true)`,state:{...O,[j.name]:!0}}),M.push({id:`${j.name}-false`,title:`${_(j.name)} (false)`,state:{...O,[j.name]:!1}});for(let j of q.props)if(j.options&&j.options.length>0)for(let H of j.options)M.push({id:`${j.name}-${H}`,title:`${_(j.name)}: ${H}`,state:{...O,[j.name]:H}})}let Q=q.name,J=q.description||`Stories for ${Q} component`,T=M.map((j)=>{let H=Object.entries(j.state).map(([U,W])=>{if(typeof W==="string")return`${U}="${W}"`;return`:${U}="${JSON.stringify(W)}"`}).join(" ");return`
3
3
  @story('${j.title}')
4
4
  <${Q} ${H} />
5
5
  @endstory`}).join(`
@@ -106,4 +106,4 @@ else {
106
106
  })();
107
107
  </script>`}function x(q){let j=_(q);if(j.length===0)return{template:q,bindings:[]};let F=q,z=[];for(let J=j.length-1;J>=0;J--){let G=j[J],$=G.originalTag;if(!$.includes(" id="))$=$.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${G.elementId}"`);else{let X=$.match(/id=["']([^"']+)["']/);if(X)for(let D of G.events)D.elementId=X[1]}for(let X of G.events){let D=X.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),V=new RegExp(`\\s*${D}\\s*=\\s*"[^"]*"`,"g"),Z=new RegExp(`\\s*${D}\\s*=\\s*'[^']*'`,"g");$=$.replace(V,""),$=$.replace(Z,"")}F=F.slice(0,G.startIndex)+$+F.slice(G.endIndex),z.push(...G.events)}return{template:F,bindings:z}}function S(q,j,F){if(/\b(?:state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(q)||/@(?:model|show|for|if)\s*=/.test(q)||/data-stx(?:-auto)?(?![-\w])/.test(q))return q;if(j.__stx_sfc_mode){if(/x-data\s*=\s*["']/.test(q))return q;let{template:D,bindings:V}=x(q),Z=j.__stx_event_bindings||[];return j.__stx_event_bindings=[...Z,...V],D}let J=_(q);if(J.length===0)return q;let G=q;for(let D=J.length-1;D>=0;D--){let V=J[D],Z=V.originalTag;if(!Z.includes(" id="))Z=Z.replace(/^<([a-z][a-z0-9-]*)/,`<$1 id="${V.elementId}"`);else{let K=Z.match(/id=["']([^"']+)["']/);if(K)for(let L of V.events)L.elementId=K[1]}for(let K of V.events){let L=K.attribute.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),B=new RegExp(`\\s*${L}\\s*=\\s*"[^"]*"`,"g"),Y=new RegExp(`\\s*${L}\\s*=\\s*'[^']*'`,"g");Z=Z.replace(B,""),Z=Z.replace(Y,"")}G=G.slice(0,V.startIndex)+Z+G.slice(V.endIndex)}let $=k(J),X=G.lastIndexOf("</body>");if(X!==-1)G=G.slice(0,X)+$+`
108
108
  `+G.slice(X);else G+=$;return G}function E(q){return/@[a-z]+(?:\.[a-z]+)*\s*=\s*["'][^"']*["']/i.test(q)}
109
- export{x as Kv,S as Lv,E as Mv};
109
+ export{x as Lv,S as Mv,E as Nv};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import W from"process";function X(){if(typeof globalThis<"u"&&"caches"in globalThis&&"CF"in globalThis)return{platform:"cloudflare",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["kv","r2","d1","durable-objects","queues"]};if(typeof globalThis<"u"&&"Deno"in globalThis)return{platform:"deno",version:globalThis.Deno.version?.deno,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["kv","deploy","ffi"]};if(typeof globalThis<"u"&&"Bun"in globalThis)return{platform:"bun",version:globalThis.Bun.version,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!1,supportsCache:!1,capabilities:["sqlite","ffi","native-modules"]};if(typeof globalThis<"u"&&"EdgeRuntime"in globalThis)return{platform:"vercel",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["edge-config","blob"]};if(typeof globalThis<"u"&&"Netlify"in globalThis)return{platform:"netlify",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!1,capabilities:["blobs","edge-functions"]};if(typeof globalThis<"u"&&"fastly"in globalThis)return{platform:"fastly",supportsStreaming:!0,supportsCrypto:!0,supportsKV:!0,supportsCache:!0,capabilities:["dictionary","backend","geolocation"]};if(W.versions?.node)return{platform:"node",version:W.versions.node,supportsStreaming:!0,supportsCrypto:!0,supportsKV:!1,supportsCache:!1,capabilities:["fs","child-process","native-modules"]};return{platform:"unknown",supportsStreaming:!1,supportsCrypto:!1,supportsKV:!1,supportsCache:!1,capabilities:[]}}function K(){let j=X();return["cloudflare","deno","vercel","netlify","fastly"].includes(j.platform)}function V(){return X().platform!=="unknown"}function $(j){return{get(z){if(j&&z in j){let b=j[z];return typeof b==="string"?b:void 0}if(typeof globalThis<"u"&&"Deno"in globalThis)return globalThis.Deno.env.get(z);if(W.env)return W.env[z];return},getOrThrow(z){let b=this.get(z);if(b===void 0)throw Error(`Environment variable "${z}" is not set`);return b},has(z){return this.get(z)!==void 0},all(){let z={};if(j){for(let[b,B]of Object.entries(j))if(typeof B==="string")z[b]=B}if(typeof globalThis<"u"&&"Deno"in globalThis){let b=globalThis.Deno.env.toObject();Object.assign(z,b)}if(W.env){for(let[b,B]of Object.entries(W.env))if(B!==void 0)z[b]=B}return z}}}function D(j){let z=X();if(z.platform==="cloudflare"&&j)return j;if(z.platform==="deno"&&"Deno"in globalThis)return G();if(z.platform==="node"||z.platform==="bun")return N();return}function G(){let j=null,z=async()=>{if(!j)j=await globalThis.Deno.openKv();return j};return{async get(b){return(await(await z()).get(["stx",b])).value},async getWithMetadata(b){let B=await z(),F=await B.get(["stx",b]),J=await B.get(["stx-meta",b]);return{value:F.value,metadata:J.value}},async put(b,B,F){let J=await z(),L=F?.expirationTtl?F.expirationTtl*1000:void 0;if(await J.set(["stx",b],B,L?{expireIn:L}:void 0),F?.metadata)await J.set(["stx-meta",b],F.metadata,L?{expireIn:L}:void 0)},async delete(b){let B=await z();await B.delete(["stx",b]),await B.delete(["stx-meta",b])},async list(b){let B=await z(),F=b?.prefix?["stx",b.prefix]:["stx"],J=B.list({prefix:F,limit:b?.limit||100}),L=[];for await(let O of J){let S=O.key.slice(1).join("/");if(!S.startsWith("stx-meta/"))L.push({name:S})}return{keys:L,list_complete:!0}}}}function N(){let j=new Map,z=()=>{let b=Date.now();for(let[B,F]of j.entries())if(F.expiration&&F.expiration<b)j.delete(B)};return{async get(b){z();let B=j.get(b);if(!B)return null;if(B.expiration&&B.expiration<Date.now())return j.delete(b),null;return B.value},async getWithMetadata(b){z();let B=j.get(b);if(!B)return{value:null,metadata:null};if(B.expiration&&B.expiration<Date.now())return j.delete(b),{value:null,metadata:null};return{value:B.value,metadata:B.metadata||null}},async put(b,B,F){let J=F?.expiration?F.expiration*1000:F?.expirationTtl?Date.now()+F.expirationTtl*1000:void 0;j.set(b,{value:B,metadata:F?.metadata,expiration:J})},async delete(b){j.delete(b)},async list(b){z();let B=[];for(let[F,J]of j.entries()){if(b?.prefix&&!F.startsWith(b.prefix))continue;if(B.push({name:F,expiration:J.expiration,metadata:J.metadata}),b?.limit&&B.length>=b.limit)break}return{keys:B,list_complete:!0}}}}function T(){let j=X();if(j.platform==="cloudflare"&&"caches"in globalThis)return M();if(j.supportsStreaming)return A();return}function M(){return{async match(j){return(await caches.default).match(j)},async put(j,z){await(await caches.default).put(j,z.clone())},async delete(j){return(await caches.default).delete(j)}}}function A(){let j=new Map,z=60000;return{async match(b){let B=b.url,F=j.get(B);if(!F)return;if(Date.now()>F.expiration){j.delete(B);return}return F.response.clone()},async put(b,B){let F=b.url,J=B.headers.get("Cache-Control"),L=60000;if(J){let O=J.match(/max-age=(\d+)/);if(O)L=Number.parseInt(O[1],10)*1000}j.set(F,{response:B.clone(),expiration:Date.now()+L})},async delete(b){return j.delete(b.url)}}}function w(){return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2,9)}`}function P(j,z){if(z.platform==="cloudflare"){let b=j.cf;if(b)return{city:b.city,country:b.country,countryCode:b.country,region:b.region,latitude:b.latitude?Number.parseFloat(b.latitude):void 0,longitude:b.longitude?Number.parseFloat(b.longitude):void 0,timezone:b.timezone}}if(z.platform==="vercel"){let b={},B=j.headers.get("x-vercel-ip-city"),F=j.headers.get("x-vercel-ip-country"),J=j.headers.get("x-vercel-ip-country-region"),L=j.headers.get("x-vercel-ip-latitude"),O=j.headers.get("x-vercel-ip-longitude");if(B)b.city=decodeURIComponent(B);if(F)b.countryCode=F;if(J)b.region=J;if(L)b.latitude=Number.parseFloat(L);if(O)b.longitude=Number.parseFloat(O);return Object.keys(b).length>0?b:void 0}if(z.platform==="netlify"){let b={},B=j.headers.get("x-nf-geo-city"),F=j.headers.get("x-nf-geo-country");if(B)b.city=B;if(F)b.countryCode=F;return Object.keys(b).length>0?b:void 0}return}function Z(j,z,b){let B=new Headers(j.headers);if(z.origins==="*")B.set("Access-Control-Allow-Origin","*");else if(z.origins&&b&&z.origins.includes(b))B.set("Access-Control-Allow-Origin",b),B.set("Vary","Origin");if(z.methods)B.set("Access-Control-Allow-Methods",z.methods.join(", "));if(z.headers)B.set("Access-Control-Allow-Headers",z.headers.join(", "));if(z.exposeHeaders)B.set("Access-Control-Expose-Headers",z.exposeHeaders.join(", "));if(z.credentials)B.set("Access-Control-Allow-Credentials","true");if(z.maxAge)B.set("Access-Control-Max-Age",String(z.maxAge));return new Response(j.body,{status:j.status,statusText:j.statusText,headers:B})}function Y(j){let z=X();return async(b,B)=>{let F=performance.now(),J=w(),L={runtime:z,platform:B||{},requestId:J,geo:P(b,z),timing:{start:F,getElapsed:()=>performance.now()-F},kv:D(B?.KV),cache:T(),env:$(B?.env)};try{if(b.method==="OPTIONS"&&j.cors){let Q=new Response(null,{status:204});return Q=Z(Q,j.cors,b.headers.get("Origin")||void 0),Q}if(j.cache?.enabled&&b.method==="GET"&&L.cache){if(_(b,j.cache)){let S=await L.cache.match(b);if(S){let U=new Response(S.body,S);return U.headers.set("X-Cache","HIT"),U.headers.set("X-Request-Id",J),j.cors?Z(U,j.cors,b.headers.get("Origin")||void 0):U}}}let O;if(j.middleware&&j.middleware.length>0)O=await H(b,L,j.middleware,async()=>{let Q=await j.render(b,L);return typeof Q==="string"?new Response(Q,{headers:{"Content-Type":"text/html; charset=utf-8"}}):Q});else{let Q=await j.render(b,L);O=typeof Q==="string"?new Response(Q,{headers:{"Content-Type":"text/html; charset=utf-8"}}):Q}if(O.headers.set("X-Request-Id",J),O.headers.set("X-Response-Time",`${L.timing.getElapsed().toFixed(2)}ms`),j.cache?.enabled&&b.method==="GET"&&L.cache){if(_(b,j.cache)&&O.status===200){let S=j.cache.ttl||60,U=O.clone();U.headers.set("Cache-Control",`public, max-age=${S}`),await L.cache.put(b,U),O.headers.set("X-Cache","MISS")}}if(j.cors)O=Z(O,j.cors,b.headers.get("Origin")||void 0);return O}catch(O){let Q=O instanceof Error?O:Error(String(O));if(j.onError)return j.onError(Q,b);return new Response(`Internal Server Error: ${Q.message}`,{status:500,headers:{"Content-Type":"text/plain","X-Request-Id":J}})}}}function _(j,z){let B=new URL(j.url).pathname;if(z.excludePaths){for(let F of z.excludePaths)if(F.test(B))return!1}if(z.includePaths){for(let F of z.includePaths)if(F.test(B))return!0;return!1}return!0}async function H(j,z,b,B){let F=0,J=async()=>{if(F>=b.length)return B();let L=b[F];return F++,L(j,z,J)};return J()}function C(j,z){let b=new Headers(z?.headers);return b.set("Content-Type","text/html; charset=utf-8"),b.set("Transfer-Encoding","chunked"),new Response(j,{...z,headers:b})}function I(){let j=new TextEncoder;return new TransformStream({transform(z,b){b.enqueue(j.encode(z))}})}function E(j){let z=new TextEncoder;return new ReadableStream({async start(b){for await(let B of j)b.enqueue(z.encode(B));b.close()}})}function x(j){let z=Y(j);return{async fetch(b,B,F){return z(b,{env:B,ctx:F,KV:B.KV})}}}function v(j){let z=Y(j);return(b)=>z(b,{})}function h(j){let z=Y(j);return(b)=>z(b,{})}function m(j){let z=Y(j);return(b,B)=>{return z(b,{netlifyContext:B})}}function y(j){let z=j.headers.get("Cookie");if(!z)return{};let b={};for(let B of z.split(";")){let[F,J]=B.split("=").map((L)=>L.trim());if(F&&J)b[F]=decodeURIComponent(J)}return b}function k(j,z,b){let B=`${encodeURIComponent(j)}=${encodeURIComponent(z)}`;if(b?.maxAge!==void 0)B+=`; Max-Age=${b.maxAge}`;if(b?.expires)B+=`; Expires=${b.expires.toUTCString()}`;if(b?.path)B+=`; Path=${b.path}`;if(b?.domain)B+=`; Domain=${b.domain}`;if(b?.secure)B+="; Secure";if(b?.httpOnly)B+="; HttpOnly";if(b?.sameSite)B+=`; SameSite=${b.sameSite}`;return B}function q(j,z){let b=new Headers(z?.headers);return b.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(j),{...z,headers:b})}function d(j,z=302){return new Response(null,{status:z,headers:{Location:j}})}function l(j="Not Found"){return new Response(j,{status:404,headers:{"Content-Type":"text/plain"}})}
3
- export{X as sn,K as tn,V as un,$ as vn,D as wn,T as xn,Y as yn,C as zn,I as An,E as Bn,x as Cn,v as Dn,h as En,m as Fn,y as Gn,k as Hn,q as In,d as Jn,l as Kn};
3
+ export{X as pn,K as qn,V as rn,$ as sn,D as tn,T as un,Y as vn,C as wn,I as xn,E as yn,x as zn,v as An,h as Bn,m as Cn,y as Dn,k as En,q as Fn,d as Gn,l as Hn};
@@ -2,4 +2,4 @@
2
2
  import{existsSync as q,readFileSync as H}from"fs";import{join as T,resolve as Y}from"path";import z from"process";function A(C,E=z.cwd()){let B=C.i18n;if(!B||!Array.isArray(B.locales)||B.locales.length===0)return null;let I=B.defaultLocale??B.locales[0],D=U(B,E);return{locales:B.locales,defaultLocale:I,labels:B.labels??Object.fromEntries(B.locales.map((G)=>[G,G.toUpperCase()])),translations:D,pickerSelector:B.pickerSelector??"#lang-picker"}}function U(C,E){let B=C.translations??{},I={},D=C.translationsDir,G=D===!1?null:Y(E,typeof D==="string"&&D?D:"translations"),J=C.format??"json";for(let M of C.locales){let N=G?K(G,M,J):{};I[M]={...N,...B[M]??{}}}return I}function K(C,E,B){let I=B==="json"?[`${E}.json`]:[`${E}.${B}`,`${E}.${B==="yaml"?"yml":"yaml"}`];for(let D of I){let G=T(C,D);if(!q(G))continue;try{let J=H(G,"utf8"),M=B==="json"?JSON.parse(J):O(J);return _(M)}catch{continue}}return{}}function _(C,E="",B={}){if(!C||typeof C!=="object")return B;for(let[I,D]of Object.entries(C)){let G=E?`${E}.${I}`:I;if(D&&typeof D==="object"&&!Array.isArray(D))_(D,G,B);else if(typeof D==="string")B[G]=D;else if(typeof D==="number"||typeof D==="boolean")B[G]=String(D)}return B}function O(C){let E={},B=[{obj:E,indent:-1}];for(let I of C.split(`
3
3
  `)){let D=I.replace(/#.*$/,"").trimEnd();if(!D.trim())continue;let G=D.search(/\S/);if(G===-1)continue;while(B.length>1&&B[B.length-1].indent>=G)B.pop();let J=B[B.length-1].obj,M=D.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(!M)continue;let[,,N,$]=M,Q=N.trim(),X=$.trim();if(X==="")J[Q]={},B.push({obj:J[Q],indent:G});else J[Q]=V(X)}return E}function V(C){if(C.startsWith("'")&&C.endsWith("'")||C.startsWith('"')&&C.endsWith('"'))return C.slice(1,-1);return C}function F(C,E,B){let I=C.translations[E]?.[B];if(typeof I==="string")return I;let D=C.translations[C.defaultLocale]?.[B];if(typeof D==="string")return D;return B}function L(C,E,B){return C.replace(/\{t(!?):([a-zA-Z][\w.-]*)\}/g,(I,D,G)=>{let J=F(E,B,G);return D==="!"?J:R(J)})}function Z(C,E,B){if(E===B)return C;if(C==="/")return`/${E}/`;if(C==="/404.html")return`/${E}/404.html`;return`/${E}${C}`}function P(C,E){for(let B of E){if(C===`/${B}`||C===`/${B}/`)return{locale:B,path:"/"};if(C.startsWith(`/${B}/`))return{locale:B,path:C.slice(B.length+1)}}return{locale:null,path:C}}function w(C,E,B){let I=C.replace(/\/$/,""),D=[];for(let J of B.locales){let M=`${I}${Z(E,J,B.defaultLocale)}`;D.push(`<link rel="alternate" hreflang="${W(J)}" href="${W(M)}">`)}let G=`${I}${Z(E,B.defaultLocale,B.defaultLocale)}`;return D.push(`<link rel="alternate" hreflang="x-default" href="${W(G)}">`),D.join(`
4
4
  `)}function j(C,E){return`<script data-stx-lang-picker="1">window.__stxI18n=${JSON.stringify({locales:C.locales,defaultLocale:C.defaultLocale,current:E,pickerSelector:C.pickerSelector})};(function(){function cfg(){return window.__stxI18n}function localeFromPath(p){var d=cfg();for(var i=0;i<d.locales.length;i++){var c=d.locales[i];if(p==='/'+c||p==='/'+c+'/')return c;if(p.indexOf('/'+c+'/')===0)return c}return d.defaultLocale}function localePathFor(loc,p){var d=cfg();var stripped=p;for(var i=0;i<d.locales.length;i++){var c=d.locales[i];if(p==='/'+c||p==='/'+c+'/'){stripped='/';break}if(p.indexOf('/'+c+'/')===0){stripped=p.slice(c.length+1);break}}if(loc===d.defaultLocale)return stripped;if(stripped==='/')return '/'+loc+'/';return '/'+loc+stripped}cfg().localizeHref=function(href){try{var u=new URL(href,location.origin);if(u.origin!==location.origin)return href;return localePathFor(localeFromPath(location.pathname),u.pathname)+(u.search||'')+(u.hash||'')}catch(_){return href}};function syncFromUrl(){var d=cfg();var loc=localeFromPath(location.pathname);d.current=loc;var picker=document.querySelector(d.pickerSelector);if(picker){var btns=picker.querySelectorAll('[data-lang]');for(var i=0;i<btns.length;i++){var b=btns[i];if(b.getAttribute('data-lang')===loc)b.setAttribute('aria-current','true');else b.removeAttribute('aria-current')}}if(document.documentElement.lang!==loc)document.documentElement.lang=loc}function onLangClick(e){var d=cfg();var btn=e.target&&e.target.closest&&e.target.closest('[data-lang]');if(!btn)return;var picker=document.querySelector(d.pickerSelector);if(!picker||!picker.contains(btn))return;e.preventDefault();e.stopPropagation();var loc=btn.getAttribute('data-lang');if(!loc||loc===localeFromPath(location.pathname))return;var dest=localePathFor(loc,location.pathname);var r=window.__stxRouter;if(r&&r.navigate)r.navigate(dest,true,true);else location.assign(dest)}syncFromUrl();if(window.__stxLangPickerBound){document.removeEventListener('click',window.__stxLangPickerClick,true);window.removeEventListener('stx:navigate',window.__stxLangPickerSync);window.removeEventListener('popstate',window.__stxLangPickerSync)}window.__stxLangPickerClick=onLangClick;window.__stxLangPickerSync=syncFromUrl;window.__stxLangPickerBound=1;document.addEventListener('click',onLangClick,true);window.addEventListener('stx:navigate',syncFromUrl);window.addEventListener('popstate',syncFromUrl)})();</script>`}function W(C){return C.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function R(C){return C.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
5
- export{A as _g,F as $g,L as ah,Z as bh,P as ch,w as dh,j as eh};
5
+ export{A as Xg,F as Yg,L as Zg,Z as _g,P as $g,w as ah,j as bh};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Go as b,Io as v}from"./chunk-xgkv66q5.js";import{Zo as V}from"./chunk-x24s4heg.js";import{pB as z}from"./chunk-xv34zbp4.js";import{existsSync as y,mkdirSync as _,copyFileSync as O,chmodSync as A}from"fs";import{join as H,basename as P}from"path";import{spawn as R,execSync as d}from"child_process";import{tmpdir as S,homedir as B,platform as N}from"os";async function D(K){let Q=Date.now();try{if(!await Bun.file(K.input).exists())return{success:!1,target:K.target||I(),format:K.format||"app",error:`Input file not found: ${K.input}`};let J=K.target||I(),$=K.format||f(J),U=K.output||H(process.cwd(),"dist","native");if(!y(U))_(U,{recursive:!0});let q=await Bun.file(K.input).text();if(q=V(q,{debug:K.verbose}),q=v(q),!q.includes("craft-component-styles")){if(q.includes("</head>"))q=q.replace("</head>",`${b}
2
+ import{Ho as b,Jo as v}from"./chunk-268adc7r.js";import{_o as V}from"./chunk-5p568px4.js";import{rB as z}from"./chunk-3jm3snz8.js";import{existsSync as y,mkdirSync as _,copyFileSync as O,chmodSync as A}from"fs";import{join as H,basename as P}from"path";import{spawn as R,execSync as d}from"child_process";import{tmpdir as S,homedir as B,platform as N}from"os";async function D(K){let Q=Date.now();try{if(!await Bun.file(K.input).exists())return{success:!1,target:K.target||I(),format:K.format||"app",error:`Input file not found: ${K.input}`};let J=K.target||I(),$=K.format||f(J),U=K.output||H(process.cwd(),"dist","native");if(!y(U))_(U,{recursive:!0});let q=await Bun.file(K.input).text();if(q=V(q,{debug:K.verbose}),q=v(q),!q.includes("craft-component-styles")){if(q.includes("</head>"))q=q.replace("</head>",`${b}
3
3
  </head>`)}let X=K.name||P(K.input,".stx"),Y=K.version||"1.0.0",Z=K.craftPath||await m();if(!Z)return{success:!1,target:J,format:$,error:"Craft binary not found. Please install Craft or specify craftPath."};if(K.verbose)console.log(`\uD83D\uDCE6 Building native app for ${J}...`),console.log(` Input: ${K.input}`),console.log(` Output: ${U}`),console.log(` Craft: ${Z}`);let G;switch(J){case"macos":G=await h(q,X,Y,U,$,K,Z);break;case"windows":G=await u(q,X,Y,U,$,K,Z);break;case"linux":G=await l(q,X,Y,U,$,K,Z);break;case"ios":G=await s(q,X,Y,U,K,Z);break;case"android":G=await g(q,X,Y,U,K,Z);break;default:G={success:!1,target:J,format:$,error:`Unsupported target: ${J}`}}return G.duration=Date.now()-Q,G}catch(J){return{success:!1,target:K.target||I(),format:K.format||"app",error:J.message,duration:Date.now()-Q}}}async function h(K,Q,J,$,U,q,X){let Y=q.bundleId||`com.stx.${Q.toLowerCase().replace(/[^a-z0-9]/g,"")}`,Z=H($,`${Q}.app`),G=H(Z,"Contents"),L=H(G,"MacOS"),W=H(G,"Resources");_(L,{recursive:!0}),_(W,{recursive:!0});let x=H(W,"index.html");await Bun.write(x,K);let E="";if(q.sidebar?.enabled&&q.sidebar?.config)E=H(W,"sidebar-config.json"),await Bun.write(E,JSON.stringify(q.sidebar.config));let T=q.sidebar?.enabled?`--native-sidebar --sidebar-width ${q.sidebar?.width||240} --sidebar-config "$(cat "$RESOURCES/sidebar-config.json")"`:"",M=`#!/bin/bash
4
4
  DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"
5
5
  RESOURCES="$DIR/../Resources"
@@ -87,4 +87,4 @@ Terminal=false
87
87
  Categories=Utility;
88
88
  Icon=${J.toLowerCase()}
89
89
  `;z("fs").writeFileSync(H(X,`${J.toLowerCase()}.desktop`),E);let T=Buffer.from([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,2,0,0,0,144,119,83,222,0,0,0,12,73,68,65,84,8,215,99,248,255,255,63,0,5,254,2,254,220,204,89,231,0,0,0,0,73,69,78,68,174,66,96,130]);if(z("fs").writeFileSync(H(X,`${J.toLowerCase()}.png`),T),$.icon&&y($.icon))O($.icon,H(X,`${J.toLowerCase()}.png`));let M=R("appimagetool",[X,Q],{env:{...process.env,ARCH:"x86_64"}});M.on("close",(w)=>{if(z("fs").rmSync(q,{recursive:!0,force:!0}),w===0)A(Q,493),U({success:!0});else U({success:!1,error:`appimagetool exited with code ${w}. Install from https://appimage.github.io/appimagetool/`})}),M.on("error",(w)=>{z("fs").rmSync(q,{recursive:!0,force:!0}),U({success:!1,error:`appimagetool not found: ${w.message}`})})}catch(q){U({success:!1,error:q.message})}})}function o(){return[I()]}function e(K){switch(K){case"macos":return["app","dmg","pkg"];case"windows":return["app","zip","msi"];case"linux":return["app","deb","rpm","appimage"];case"ios":return["ipa"];case"android":return["apk"];default:return["app"]}}var i={buildNative:D,getAvailableTargets:o,getAvailableFormats:e,detectPlatform:I},$q=i;
90
- export{D as xo,o as yo,e as zo,$q as Ao};
90
+ export{D as yo,o as zo,e as Ao,$q as Bo};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{uz as w}from"./chunk-w3b6m427.js";import{defineRoute as M,defineRoutes as Q,resetRoutes as R,route as S,setAppUrl as T}from"stx-router";import{route as B}from"stx-router";function I(y){return y.replace(/@route\(\s*(['"])([^'"]+)\1(?:\s*,\s*(\{[^}]+\}))?\s*(?:,\s*(true|false)\s*)?\)/g,(C,D,z,q,A)=>{try{let k=q?w(q,{}):{};return B(z,k,A==="true")}catch(k){return console.error(`Error processing @route directive: ${k}`),"#route-error"}})}
3
- export{I as Jt,M as Kt,Q as Lt,R as Mt,S as Nt,T as Ot};
2
+ import{wz as w}from"./chunk-adqh2m9z.js";import{defineRoute as M,defineRoutes as Q,resetRoutes as R,route as S,setAppUrl as T}from"stx-router";import{route as B}from"stx-router";function I(y){return y.replace(/@route\(\s*(['"])([^'"]+)\1(?:\s*,\s*(\{[^}]+\}))?\s*(?:,\s*(true|false)\s*)?\)/g,(C,D,z,q,A)=>{try{let k=q?w(q,{}):{};return B(z,k,A==="true")}catch(k){return console.error(`Error processing @route directive: ${k}`),"#route-error"}})}
3
+ export{I as Kt,M as Lt,Q as Mt,R as Nt,S as Ot,T as Pt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{dq as I,eq as J,fq as K,gq as N,hq as O,iq as P,jq as Q,kq as T,lq as U,mq as V}from"./chunk-q6zhd9yf.js";function X(){try{let w=Y(G()),z=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(w);return z=z.replace(/\}(var |let |const |function )/g,"};$1"),z}catch{return G()}}function Y(w){let B=[],z=0,H="console.log(";while(z<w.length){let E=w.indexOf(H,z);if(E===-1){B.push(w.slice(z));break}B.push(w.slice(z,E));let F=1,x=E+H.length;while(x<w.length&&F>0){let A=w[x];if(A==='"'||A==="'"||A==="`"){let W=A;x++;while(x<w.length&&w[x]!==W){if(w[x]==="\\")x++;x++}x++;continue}if(A==="(")F++;else if(A===")")F--;x++}B.push("0"),z=x}return B.join("")}function G(){return`
2
+ import{eq as I,fq as J,gq as K,hq as N,iq as O,jq as P,kq as Q,lq as T,mq as U,nq as V}from"./chunk-5ppkfyn2.js";function X(){try{let w=Y(G()),z=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(w);return z=z.replace(/\}(var |let |const |function )/g,"};$1"),z}catch{return G()}}function Y(w){let B=[],z=0,H="console.log(";while(z<w.length){let E=w.indexOf(H,z);if(E===-1){B.push(w.slice(z));break}B.push(w.slice(z,E));let F=1,x=E+H.length;while(x<w.length&&F>0){let A=w[x];if(A==='"'||A==="'"||A==="`"){let W=A;x++;while(x<w.length&&w[x]!==W){if(w[x]==="\\")x++;x++}x++;continue}if(A==="(")F++;else if(A===")")F--;x++}B.push("0"),z=x}return B.join("")}function G(){return`
3
3
  // STX Signals Runtime (Development Build)
4
4
  console.log('[stx] signals runtime loading');
5
5
  // Pre-initialization shim: capture onMount/onDestroy calls made before the runtime IIFE runs
@@ -5221,4 +5221,4 @@ catch (e) { console.warn('[stx] mount callback error:', e); }
5221
5221
  }
5222
5222
  })();
5223
5223
  `}var _={state:I,derived:J,effect:K,batch:N,onMount:O,onDestroy:P,isSignal:Q,isDerived:T,untrack:U,peek:V,generateSignalsRuntime:X,generateSignalsRuntimeDev:G};
5224
- export{X as aq,G as bq,_ as cq};
5224
+ export{X as bq,G as cq,_ as dq};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Lq as Y}from"./chunk-d0zjtdw4.js";import{Ks as X,Qr as U,Rr as V}from"./chunk-1xz0w746.js";import{$t as Q,bu as T}from"./chunk-hjm2xab3.js";import O from"path";import{createHash as j}from"crypto";function D(B={}){let A=new Set;return{context:new Proxy(B,{get(z,k){if(k in z)return z[k];if(typeof k==="string"&&!k.startsWith("__"))A.add(k);return},has(z,k){if(k in z)return!0;if(typeof k==="string"&&!k.startsWith("__"))A.add(k);return!1}}),accessedKeys:A}}async function y(B,A,G={}){let z=O.resolve(B),k=await Bun.file(z).text(),Z=j("sha256").update(k).digest("hex").slice(0,16);Q();let I={};try{I=await V()}catch{}let E=[],_=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,F;while((F=_.exec(k))!==null){let $=F[1];if(/\bserver\b/.test($))E.push(F[2])}let{context:J}=D({__filename:z,__dirname:O.dirname(z)}),L=new Set,q={...U,...I,...G,buildMode:"compile",strict:!1},N=await X(k,J,z,q,L),w=Y(N),W=T();return{route:A,sourceFile:B,html:N,fragment:w,placeholders:W,hasServerScripts:E.length>0,serverScriptContent:E,dependencies:Array.from(L),contentHash:Z,streamTemplates:J.__streamTemplates}}
3
- export{y as Fi};
2
+ import{Mq as Y}from"./chunk-ncnfa8ae.js";import{Ls as X,Rr as U,Sr as V}from"./chunk-w01y57f5.js";import{au as Q,cu as T}from"./chunk-tr0z0e1g.js";import O from"path";import{createHash as j}from"crypto";function D(B={}){let A=new Set;return{context:new Proxy(B,{get(z,k){if(k in z)return z[k];if(typeof k==="string"&&!k.startsWith("__"))A.add(k);return},has(z,k){if(k in z)return!0;if(typeof k==="string"&&!k.startsWith("__"))A.add(k);return!1}}),accessedKeys:A}}async function y(B,A,G={}){let z=O.resolve(B),k=await Bun.file(z).text(),Z=j("sha256").update(k).digest("hex").slice(0,16);Q();let I={};try{I=await V()}catch{}let E=[],_=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,F;while((F=_.exec(k))!==null){let $=F[1];if(/\bserver\b/.test($))E.push(F[2])}let{context:J}=D({__filename:z,__dirname:O.dirname(z)}),L=new Set,q={...U,...I,...G,buildMode:"compile",strict:!1},N=await X(k,J,z,q,L),w=Y(N),W=T();return{route:A,sourceFile:B,html:N,fragment:w,placeholders:W,hasServerScripts:E.length>0,serverScriptContent:E,dependencies:Array.from(L),contentHash:Z,streamTemplates:J.__streamTemplates}}
3
+ export{y as Ci};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ks as X,xr as W}from"./chunk-1xz0w746.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
2
+ import{Ls as X,yr as W}from"./chunk-w01y57f5.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
3
3
  ${j.bold}${q[0]}${j.reset} - ${A.description}`),console.log(` Usage: ${j.cyan}${A.usage}${j.reset}
4
4
  `)}else{console.log(`
5
5
  ${j.bold}Available Commands:${j.reset}
@@ -21,4 +21,4 @@ ${j.bold}${j.blue}stx Interactive Mode${j.reset}
21
21
  ${j.dim}Type 'help' for available commands, 'exit' to quit${j.reset}
22
22
  `);let B=()=>{let G=z.cwd.replace(process.env.HOME||"","~");A.question(`${j.cyan}stx${j.reset} ${j.dim}${G}${j.reset} ${j.green}>${j.reset} `,async(I)=>{let K=I.trim();if(!K){if(z.running)B();return}z.history.push(K);let L=K.match(/(?:[^\s"]|"[^"]*")+/g)||[],J=L[0]?.toLowerCase(),O=L.slice(1).map((U)=>U.replace(/^"|"$/g,""));if(J&&Q[J])try{await Q[J].handler(O,z)}catch(U){console.log(`${j.red}Error:${j.reset}`,U)}else if(J)if(K.includes("{{")||K.includes("}}"))try{let U=await W(K,z.context,"eval");console.log(`${j.green}\u2192${j.reset} ${U}`)}catch{console.log(`${j.red}Unknown command: ${J}${j.reset}`),console.log(`${j.dim}Type 'help' for available commands${j.reset}`)}else console.log(`${j.red}Unknown command: ${J}${j.reset}`),console.log(`${j.dim}Type 'help' for available commands${j.reset}`);if(z.running)B();else A.close()})};A.on("SIGINT",()=>{console.log(`
23
23
  ${j.dim}(Use 'exit' to quit)${j.reset}`),B()}),B()}
24
- export{R as Dl};
24
+ export{R as Al};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Lk as y,Mk as z,Ok as A}from"./chunk-ckxjqqn9.js";var E={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class B{config;constructor(j={}){this.config={...E,...j}}async get(j,k){return y(j,k,"video",this.config)}async set(j,k,m){return z(j,k,m,"video",this.config)}async clear(){return A("video",this.config)}updateConfig(j){this.config={...this.config,...j}}}var w=null;function x(j){if(!w)w=new B(j);else if(j)w.updateConfig(j);return w}async function G(j,k,m){let q=m?{directory:`${m.outputDir}/../.cache`}:{};return x(q).get(j,k)}async function H(j,k,m,q){let D=q?{directory:`${q.outputDir}/../.cache`}:{};return x(D).set(j,k,m)}async function I(){return x().clear()}
3
- export{B as Gj,G as Hj,H as Ij,I as Jj};
2
+ import{Ik as y,Jk as z,Lk as A}from"./chunk-gqpkp459.js";var E={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:2000,cacheTranscoded:!0,cacheThumbnails:!0,cacheManifests:!0};class B{config;constructor(j={}){this.config={...E,...j}}async get(j,k){return y(j,k,"video",this.config)}async set(j,k,m){return z(j,k,m,"video",this.config)}async clear(){return A("video",this.config)}updateConfig(j){this.config={...this.config,...j}}}var w=null;function x(j){if(!w)w=new B(j);else if(j)w.updateConfig(j);return w}async function G(j,k,m){let q=m?{directory:`${m.outputDir}/../.cache`}:{};return x(q).get(j,k)}async function H(j,k,m,q){let D=q?{directory:`${q.outputDir}/../.cache`}:{};return x(D).set(j,k,m)}async function I(){return x().clear()}
3
+ export{B as Dj,G as Ej,H as Fj,I as Gj};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Rr as O}from"./chunk-1xz0w746.js";import M from"path";var Q=/<script\b[^>]*\bserver\b/i,W=/<script\b[^>]*\bclient\b/i;async function Z(q){let u=performance.now(),k=await O(q),z=q||k.root||process.cwd(),G=[k.build?.pagesDir||k.pagesDir||"pages",k.componentsDir||"components",k.layoutsDir||"layouts",k.partialsDir||"partials"].map((w)=>M.resolve(z,w)),A=[],B=0;for(let w of G){let H=await U(w);for(let J of H){B++;let K=await Bun.file(J).text();if(Q.test(K))A.push(M.relative(z,J))}}return{mode:A.length>0?"ssr":"ssg",serverScriptFiles:A,totalFilesScanned:B,scanDurationMs:Math.round(performance.now()-u)}}async function $(q){let u=await O(q),k=q||u.root||process.cwd(),z=M.resolve(k,u.componentsDir||"components"),G=[],A=await U(z);for(let B of A){let w=await Bun.file(B).text(),H=Q.test(w),J=W.test(w)||/<script\b(?![^>]*\bserver\b)[^>]*>/i.test(w)&&!H;if(H&&J){let K=M.relative(k,B);G.push({file:K,message:`Component "${K}" has both <script server> and <script client>. `+"Components should be server OR client \u2014 compose them via props/slots."})}}return G}async function U(q){let u=[];try{let k=new Bun.Glob("**/*.stx");for await(let z of k.scan({cwd:q,absolute:!0}))u.push(z)}catch{}return u}
3
- export{Z as oq,$ as pq};
2
+ import{Sr as O}from"./chunk-w01y57f5.js";import M from"path";var Q=/<script\b[^>]*\bserver\b/i,W=/<script\b[^>]*\bclient\b/i;async function Z(q){let u=performance.now(),k=await O(q),z=q||k.root||process.cwd(),G=[k.build?.pagesDir||k.pagesDir||"pages",k.componentsDir||"components",k.layoutsDir||"layouts",k.partialsDir||"partials"].map((w)=>M.resolve(z,w)),A=[],B=0;for(let w of G){let H=await U(w);for(let J of H){B++;let K=await Bun.file(J).text();if(Q.test(K))A.push(M.relative(z,J))}}return{mode:A.length>0?"ssr":"ssg",serverScriptFiles:A,totalFilesScanned:B,scanDurationMs:Math.round(performance.now()-u)}}async function $(q){let u=await O(q),k=q||u.root||process.cwd(),z=M.resolve(k,u.componentsDir||"components"),G=[],A=await U(z);for(let B of A){let w=await Bun.file(B).text(),H=Q.test(w),J=W.test(w)||/<script\b(?![^>]*\bserver\b)[^>]*>/i.test(w)&&!H;if(H&&J){let K=M.relative(k,B);G.push({file:K,message:`Component "${K}" has both <script server> and <script client>. `+"Components should be server OR client \u2014 compose them via props/slots."})}}return G}async function U(q){let u=[];try{let k=new Bun.Glob("**/*.stx");for await(let z of k.scan({cwd:q,absolute:!0}))u.push(z)}catch{}return u}
3
+ export{Z as pq,$ as qq};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var K={},W=[],O={};function _(){return K}function $(){return O}function C(){K={},W.length=0,O={}}function Q(j){K=X(K,j)}function X(j,z){return{title:z.title??j.title,titleTemplate:z.titleTemplate??j.titleTemplate,base:z.base??j.base,meta:[...j.meta||[],...z.meta||[]],link:[...j.link||[],...z.link||[]],script:[...j.script||[],...z.script||[]],style:[...j.style||[],...z.style||[]],htmlAttrs:{...j.htmlAttrs,...z.htmlAttrs},bodyAttrs:{...j.bodyAttrs,...z.bodyAttrs}}}function Y(j){let z=[];if(j.description)z.push({name:"description",content:j.description});if(j.keywords){let L=Array.isArray(j.keywords)?j.keywords.join(", "):j.keywords;z.push({name:"keywords",content:L})}if(j.author)z.push({name:"author",content:j.author});if(j.robots)z.push({name:"robots",content:j.robots});let A=j.ogTitle??j.title,B=j.ogDescription??j.description;if(A)z.push({property:"og:title",content:A});if(B)z.push({property:"og:description",content:B});if(j.ogImage)z.push({property:"og:image",content:j.ogImage});if(j.ogUrl)z.push({property:"og:url",content:j.ogUrl});if(j.ogType)z.push({property:"og:type",content:j.ogType});if(j.ogSiteName)z.push({property:"og:site_name",content:j.ogSiteName});if(j.ogLocale)z.push({property:"og:locale",content:j.ogLocale});let E=j.twitterTitle??j.title,F=j.twitterDescription??j.description,G=j.twitterImage??j.ogImage;if(j.twitterCard)z.push({name:"twitter:card",content:j.twitterCard});if(E)z.push({name:"twitter:title",content:E});if(F)z.push({name:"twitter:description",content:F});if(G)z.push({name:"twitter:image",content:G});if(j.twitterSite)z.push({name:"twitter:site",content:j.twitterSite});if(j.twitterCreator)z.push({name:"twitter:creator",content:j.twitterCreator});if(j.articleAuthor)z.push({property:"article:author",content:j.articleAuthor});if(j.articlePublishedTime)z.push({property:"article:published_time",content:j.articlePublishedTime});if(j.articleModifiedTime)z.push({property:"article:modified_time",content:j.articleModifiedTime});if(j.articleSection)z.push({property:"article:section",content:j.articleSection});if(j.articleTags)for(let L of j.articleTags)z.push({property:"article:tag",content:L});let J=[];if(j.canonical)J.push({rel:"canonical",href:j.canonical});Q({title:j.title,titleTemplate:j.titleTemplate,meta:z,link:J})}function I(j){if(O={...O,...j},j.title||j.description)Y({title:j.title,description:j.description})}function h(j){let z=typeof j==="function"?j():j;Q({title:z})}function x(j=K){let z=[];if(j.title){let A=j.title;if(j.titleTemplate)A=typeof j.titleTemplate==="function"?j.titleTemplate(A):j.titleTemplate.replace("%s",A);z.push(`<title>${N(A)}</title>`)}if(j.base){let A=Object.entries(j.base).map(([B,E])=>`${B}="${N(E)}"`).join(" ");z.push(`<base ${A}>`)}for(let A of j.meta||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>{return`${E==="httpEquiv"?"http-equiv":E}="${N(String(F))}"`}).join(" ");z.push(`<meta ${B}>`)}for(let A of j.link||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>`${E}="${N(String(F))}"`).join(" ");z.push(`<link ${B}>`)}for(let A of j.script||[]){let{content:B,...E}=A,F=Object.entries(E).filter(([G,J])=>J!==void 0).map(([G,J])=>{if(typeof J==="boolean")return J?G:"";return`${G}="${N(String(J))}"`}).filter(Boolean).join(" ");if(B)z.push(`<script ${F}>${B}</script>`);else z.push(`<script ${F}></script>`)}for(let A of j.style||[]){let B=A.type?` type="${A.type}"`:"";z.push(`<style${B}>${A.content}</style>`)}return z.join(`
3
3
  `)}function D(j=K){if(!j.htmlAttrs)return"";return Object.entries(j.htmlAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function S(j=K){if(!j.bodyAttrs)return"";return Object.entries(j.bodyAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function N(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function M(j=K){if(typeof document>"u")return;if(j.title){let z=j.title;if(j.titleTemplate)z=typeof j.titleTemplate==="function"?j.titleTemplate(z):j.titleTemplate.replace("%s",z);document.title=z}for(let z of j.meta||[]){let A=z.name?`meta[name="${z.name}"]`:z.property?`meta[property="${z.property}"]`:null;if(A){let B=document.querySelector(A);if(!B){if(B=document.createElement("meta"),z.name)B.setAttribute("name",z.name);if(z.property)B.setAttribute("property",z.property);document.head.appendChild(B)}B.setAttribute("content",z.content)}}for(let z of j.link||[]){let A=`link[rel="${z.rel}"]${z.href?`[href="${z.href}"]`:""}`,B=document.querySelector(A);if(!B)B=document.createElement("link"),document.head.appendChild(B);for(let[E,F]of Object.entries(z))if(F!==void 0)B.setAttribute(E,String(F))}if(j.htmlAttrs)for(let[z,A]of Object.entries(j.htmlAttrs))document.documentElement.setAttribute(z,A);if(j.bodyAttrs)for(let[z,A]of Object.entries(j.bodyAttrs))document.body.setAttribute(z,A)}function P(j){let z="";return{content:j.replace(/@head\s*([\s\S]*?)@endhead/g,(B,E)=>{return z+=E.trim()+`
4
- `,""}),headContent:z.trim()}}function V(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let G=B?E:z[(F||"").trim()]??F;return Q({title:G}),""})}function w(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,G,J)=>{let L=F?G:J,R=F?L:z[(L||"").trim()]??L,U=E.includes(":")?{property:E,content:R}:{name:E,content:R};return Q({meta:[U]}),""})}export{_ as $v,$ as aw,C as bw,Q as cw,Y as dw,I as ew,h as fw,x as gw,D as hw,S as iw,M as jw,P as kw,V as lw,w as mw};
4
+ `,""}),headContent:z.trim()}}function V(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let G=B?E:z[(F||"").trim()]??F;return Q({title:G}),""})}function w(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,G,J)=>{let L=F?G:J,R=F?L:z[(L||"").trim()]??L,U=E.includes(":")?{property:E,content:R}:{name:E,content:R};return Q({meta:[U]}),""})}export{_ as aw,$ as bw,C as cw,Q as dw,Y as ew,I as fw,h as gw,x as hw,D as iw,S as jw,M as kw,P as lw,V as mw,w as nw};
@@ -474,4 +474,4 @@ describe('Example', () => {
474
474
  @yield('scripts')
475
475
  </body>
476
476
  </html>`}function s(){return"<!-- Hero section -->"}function o(){return"<!-- Features -->"}function t(){return"<!-- Pricing -->"}function e(){return"<!-- Button -->"}function Y(z){if(!X(z))Z(z,{recursive:!0})}function qq(){if(X("bun.lockb"))return"bun";if(X("pnpm-lock.yaml"))return"pnpm";if(X("yarn.lock"))return"yarn";return"bun"}function $(z){return z.replace(/[-_\s]+(.)?/g,(w,q)=>q?q.toUpperCase():"").replace(/^./,(w)=>w.toUpperCase())}function vq(z){return z.replace(/[-_\s]+(.)?/g,(w,q)=>q?q.toUpperCase():"").replace(/^./,(w)=>w.toLowerCase())}function W(z){return z.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()}
477
- export{Qq as Wh,Uq as Xh,Vq as Yh,Wq as Zh,Xq as _h,Yq as $h};
477
+ export{Qq as Th,Uq as Uh,Vq as Vh,Wq as Wh,Xq as Xh,Yq as Yh};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var c={".html":"text/html",".css":"text/css",".js":"application/javascript",".mjs":"application/javascript",".json":"application/json",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".ico":"image/x-icon",".webp":"image/webp",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".eot":"application/vnd.ms-fontobject",".otf":"font/otf",".mp4":"video/mp4",".webm":"video/webm",".mp3":"audio/mpeg",".wav":"audio/wav",".pdf":"application/pdf",".zip":"application/zip",".xml":"application/xml",".txt":"text/plain",".md":"text/markdown",".stx":"text/html"};function g(b){return c[b.toLowerCase()]||"application/octet-stream"}var h={port:3000,watch:!0,native:!1,cache:!1,hotReload:!0,hmrPort:3001,profile:!1,debugDirectives:!1,titlebarHidden:!1};
3
- export{c as bo,g as co,h as do};
3
+ export{c as co,g as do,h as eo};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Sw as z}from"./chunk-0dx4q6yq.js";import{pB as R}from"./chunk-xv34zbp4.js";var X={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function Q(){try{let x=await import("@stacksjs/desktop");if(typeof x.openDevWindow!=="function")return null;return x}catch{return null}}async function $(x,J={}){let q={...X,...J},B=await Q();if(!B)return console.log(`${z.yellow}\u26A0${z.reset} Native window requested, but @stacksjs/desktop is not available.`),console.log(" Install & build the desktop package to enable --native."),!1;try{let w=await B.openDevWindow(x,{title:q.title,width:q.width,height:q.height,darkMode:q.darkMode,hotReload:q.hotReload,titlebarHidden:q.titlebarHidden,nativeSidebar:q.nativeSidebar,sidebarWidth:q.sidebarWidth,sidebarConfig:q.sidebarConfig});if(w&&q.nativeSidebar)console.log(`${z.green}\u2713${z.reset} Native sidebar enabled (macOS Tahoe style)`);return w}catch(w){return console.log(`${z.red}\u2717${z.reset} Could not open native window:`,w),!1}}async function y(){return await Q()!==null}function G(x){if(x.match(/<Sidebar[\s\S]*?variant=["'](?:tahoe|vibrancy|desktop)["'][\s\S]*?\/>/i)){let w=x.match(/<script\s+server[^>]*>([\s\S]*?)<\/script>/i);if(w){let K=w[1];try{let H=`
2
+ import{Tw as z}from"./chunk-qdc3aav1.js";import{rB as R}from"./chunk-3jm3snz8.js";var X={title:"stx Development",width:1400,height:900,darkMode:!0,hotReload:!0,titlebarHidden:!1,nativeSidebar:!1,sidebarWidth:260,sidebarConfig:void 0};async function Q(){try{let x=await import("@stacksjs/desktop");if(typeof x.openDevWindow!=="function")return null;return x}catch{return null}}async function $(x,J={}){let q={...X,...J},B=await Q();if(!B)return console.log(`${z.yellow}\u26A0${z.reset} Native window requested, but @stacksjs/desktop is not available.`),console.log(" Install & build the desktop package to enable --native."),!1;try{let w=await B.openDevWindow(x,{title:q.title,width:q.width,height:q.height,darkMode:q.darkMode,hotReload:q.hotReload,titlebarHidden:q.titlebarHidden,nativeSidebar:q.nativeSidebar,sidebarWidth:q.sidebarWidth,sidebarConfig:q.sidebarConfig});if(w&&q.nativeSidebar)console.log(`${z.green}\u2713${z.reset} Native sidebar enabled (macOS Tahoe style)`);return w}catch(w){return console.log(`${z.red}\u2717${z.reset} Could not open native window:`,w),!1}}async function y(){return await Q()!==null}function G(x){if(x.match(/<Sidebar[\s\S]*?variant=["'](?:tahoe|vibrancy|desktop)["'][\s\S]*?\/>/i)){let w=x.match(/<script\s+server[^>]*>([\s\S]*?)<\/script>/i);if(w){let K=w[1];try{let H=`
3
3
  ${K}
4
4
  return typeof sidebarConfig !== 'undefined' ? sidebarConfig : null;
5
5
  `,P=Function(H)();if(P)return P}catch(H){console.warn("Invalid sidebarConfig:",H)}}return{sections:[]}}let q=x.match(/@nativeSidebar\s*\(\s*(\{[\s\S]*?\})\s*\)/m);if(q)try{return JSON.parse(q[1])}catch{console.warn("Invalid @nativeSidebar configuration")}let B=x.match(/<script\s+native-sidebar[^>]*>([\s\S]*?)<\/script>/i);if(B)try{let w=B[1].match(/(?:export\s+(?:default\s+)?|const\s+\w+\s*=\s*)(\{[\s\S]*\})/m);if(w)return Function(`return ${w[1]}`)()}catch(w){console.warn("Invalid native-sidebar script configuration:",w)}return}
6
- export{X as eo,$ as fo,y as go,G as ho};
6
+ export{X as fo,$ as go,y as ho,G as io};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{gz as a}from"./chunk-gz5fmp3q.js";function i(t,o){if(t.serverDynamic[o]!==void 0)return String(t.serverDynamic[o]);let e=t.static[o];if(typeof e==="string")return e;return}function f(t,o,e){let r=i(t,o);if(r!==void 0){let n=Number.parseInt(r,10);if(!Number.isNaN(n))return n}return e}var s={"top-right":"top:1rem;right:1rem","top-left":"top:1rem;left:1rem","top-center":"top:1rem;left:50%;transform:translateX(-50%)","bottom-right":"bottom:1rem;right:1rem","bottom-left":"bottom:1rem;left:1rem","bottom-center":"bottom:1rem;left:50%;transform:translateX(-50%)"},p={name:"StxToast",aliases:["stx-toast"],render(t,o,e){let r=a(i(t,"position")||"top-right"),n=f(t,"max",5),m=s[r]||s["top-right"];return`<div id="stx-toast-container" data-stx-toast-position="${r}" data-stx-toast-max="${n}" style="position:fixed;${m};z-index:999999;display:flex;flex-direction:column;gap:0.5rem;pointer-events:none;max-width:24rem;width:100%"></div>
2
+ import{iz as a}from"./chunk-3rh7va1z.js";function i(t,o){if(t.serverDynamic[o]!==void 0)return String(t.serverDynamic[o]);let e=t.static[o];if(typeof e==="string")return e;return}function f(t,o,e){let r=i(t,o);if(r!==void 0){let n=Number.parseInt(r,10);if(!Number.isNaN(n))return n}return e}var s={"top-right":"top:1rem;right:1rem","top-left":"top:1rem;left:1rem","top-center":"top:1rem;left:50%;transform:translateX(-50%)","bottom-right":"bottom:1rem;right:1rem","bottom-left":"bottom:1rem;left:1rem","bottom-center":"bottom:1rem;left:50%;transform:translateX(-50%)"},p={name:"StxToast",aliases:["stx-toast"],render(t,o,e){let r=a(i(t,"position")||"top-right"),n=f(t,"max",5),m=s[r]||s["top-right"];return`<div id="stx-toast-container" data-stx-toast-position="${r}" data-stx-toast-max="${n}" style="position:fixed;${m};z-index:999999;display:flex;flex-direction:column;gap:0.5rem;pointer-events:none;max-width:24rem;width:100%"></div>
3
3
  <style>
4
4
  @keyframes stx-toast-in{from{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}
5
5
  @keyframes stx-toast-out{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}
@@ -8,4 +8,4 @@ import{gz as a}from"./chunk-gz5fmp3q.js";function i(t,o){if(t.serverDynamic[o]!=
8
8
  @keyframes stx-toast-in-center{from{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:translateY(0)}}
9
9
  @keyframes stx-toast-out-center{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-1rem)}}
10
10
  </style>`}};
11
- export{p as $y};
11
+ export{p as bz};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import y from"fs";import z from"path";function C(q,j,g){return{version:1,buildTime:new Date().toISOString(),routes:q,assets:j,outputDir:g}}function E(q,j){let g=z.join(j,"manifest.json");y.writeFileSync(g,JSON.stringify(q,null,2))}function F(q){let j=z.join(q,"manifest.json");if(!y.existsSync(j))return null;try{let g=y.readFileSync(j,"utf-8"),w=JSON.parse(g);if(w.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${w.version}`),null;return w}catch(g){return console.warn("[stx] Failed to load manifest:",g),null}}
3
- export{C as $k,E as al,F as bl};
3
+ export{C as Yk,E as Zk,F as _k};
@@ -5,4 +5,4 @@ ${$.join(`
5
5
  `)}
6
6
  ${z}
7
7
  </picture>`}return`${U}${z}`}};
8
- export{c as iz};
8
+ export{c as kz};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Sw as g}from"./chunk-0dx4q6yq.js";function A(){console.log(`
2
+ import{Tw as g}from"./chunk-qdc3aav1.js";function A(){console.log(`
3
3
  Keyboard shortcuts:`),console.log(` ${g.cyan}o${g.reset} + Enter - Open in browser`),console.log(` ${g.cyan}c${g.reset} + Enter - Clear console`),console.log(` ${g.cyan}q${g.reset} + Enter (or ${g.cyan}Ctrl+C${g.reset}) - Quit server`),console.log(` ${g.cyan}h${g.reset} + Enter - Show this help`)}function F(q){console.log(`${g.green}Server running at ${g.cyan}${q}${g.reset}`),console.log(`Press ${g.cyan}Ctrl+C${g.reset} to stop the server`),A()}function G(q){console.log(`${g.dim}Opening ${g.cyan}${q}${g.dim} in your browser...${g.reset}`),Bun.spawn(["open",q],{stderr:"inherit"})}function L(q,x,z){if(!process.stdin.isTTY)return;process.stdin.setRawMode(!0),process.stdin.setEncoding("utf8"),process.stdin.resume(),A();let j="";process.stdin.on("data",(D)=>{if(D==="\x03"){if(z?.onQuit)z.onQuit();x(),process.exit(0)}if(j+=D,j.endsWith("\r")||j.endsWith(`
4
4
  `)){let E=j.trim().toLowerCase();j="",J(E,q,x,z)}})}function J(q,x,z,j){switch(q){case"o":if(j?.onOpen)j.onOpen();else G(x);break;case"c":if(j?.onClear)j.onClear();else console.clear(),F(x);break;case"q":if(j?.onQuit)j.onQuit();console.log(`${g.yellow}Stopping server...${g.reset}`),z(),process.exit(0);break;case"h":if(j?.onHelp)j.onHelp();else A();break;default:break}}function M(){if(process.stdin.isTTY)process.stdin.setRawMode(!1),process.stdin.pause()}
5
- export{A as so,F as to,G as uo,L as vo,M as wo};
5
+ export{A as to,F as uo,G as vo,L as wo,M as xo};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ks as m,Yr as C}from"./chunk-1xz0w746.js";import{dt as x}from"./chunk-g1vt329s.js";import{pB as c}from"./chunk-xv34zbp4.js";var{serve:h}=globalThis.Bun;import K from"fs";import $ from"path";function jj(W,Z=200,G={}){return new Response(W,{status:Z,headers:{"Content-Type":"text/html; charset=utf-8",...G}})}async function i(W={}){let{port:Z=3000,root:G=".",stxOptions:E={},watch:v=!0,onRequest:V,routes:N={},middleware:D=[],on404:T,onError:g}=W,F=$.resolve(G),X=new Map;async function O(A){let B=K.statSync(A),L=`${A}:${B.mtimeMs}`,z=X.get(L);if(z)return z.content;for(let J of X.keys())if(J.startsWith(`${A}:`)&&J!==L)X.delete(J);let j=await Bun.file(A).text(),Q=j,H=j.match(/<template\b(?![^>]*(?:\b(?:id|x-for|x-if|@for|@if|:for|:if)\s*=|\s#[\w-]|\bv-slot|\bslot\s*=))[^>]*>/i);if(H&&H.index!==void 0){let J=H.index+H[0].length,U=1,_=J;while(_<j.length&&U>0){let R=j.indexOf("<template",_),k=j.indexOf("</template>",_);if(k===-1)break;if(R!==-1&&R<k)U++,_=R+9;else{if(U--,U===0){Q=j.substring(J,k).trim();break}_=k+11}}}let y=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,b=[],d=[],I;while((I=y.exec(j))!==null){let J=I[1],U=I[2],_=I[0];if(J.includes("server"))d.push(U);else b.push(_)}let P=j.match(/<style\b[^>]*>[\s\S]*?<\/style>/gi)||[],p=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),M={__filename:A,__dirname:$.dirname(A)};for(let J of d)await x(J,M,A);let Y=await m(p,M,A,E,new Set);if(P.length>0){let J=P.join(`
2
+ import{Ls as m,Zr as C}from"./chunk-w01y57f5.js";import{et as x}from"./chunk-nap11ntr.js";import{rB as c}from"./chunk-3jm3snz8.js";var{serve:h}=globalThis.Bun;import K from"fs";import $ from"path";function jj(W,Z=200,G={}){return new Response(W,{status:Z,headers:{"Content-Type":"text/html; charset=utf-8",...G}})}async function i(W={}){let{port:Z=3000,root:G=".",stxOptions:E={},watch:v=!0,onRequest:V,routes:N={},middleware:D=[],on404:T,onError:g}=W,F=$.resolve(G),X=new Map;async function O(A){let B=K.statSync(A),L=`${A}:${B.mtimeMs}`,z=X.get(L);if(z)return z.content;for(let J of X.keys())if(J.startsWith(`${A}:`)&&J!==L)X.delete(J);let j=await Bun.file(A).text(),Q=j,H=j.match(/<template\b(?![^>]*(?:\b(?:id|x-for|x-if|@for|@if|:for|:if)\s*=|\s#[\w-]|\bv-slot|\bslot\s*=))[^>]*>/i);if(H&&H.index!==void 0){let J=H.index+H[0].length,U=1,_=J;while(_<j.length&&U>0){let R=j.indexOf("<template",_),k=j.indexOf("</template>",_);if(k===-1)break;if(R!==-1&&R<k)U++,_=R+9;else{if(U--,U===0){Q=j.substring(J,k).trim();break}_=k+11}}}let y=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,b=[],d=[],I;while((I=y.exec(j))!==null){let J=I[1],U=I[2],_=I[0];if(J.includes("server"))d.push(U);else b.push(_)}let P=j.match(/<style\b[^>]*>[\s\S]*?<\/style>/gi)||[],p=Q.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),M={__filename:A,__dirname:$.dirname(A)};for(let J of d)await x(J,M,A);let Y=await m(p,M,A,E,new Set);if(P.length>0){let J=P.join(`
3
3
  `);if(Y.match(/(<\/head>)/i))Y=Y.replace(/(<\/head>)/i,`${J}
4
4
  $1`)}if(b.length>0){let{interpolateScriptsInTemplate:J}=await import("././expressions.js"),U=J(b.join(`
5
5
  `),M);if(Y.match(/(<\/body>)/i))Y=Y.replace(/(<\/body>)/i,`${U}
@@ -7,4 +7,4 @@ $1`);else Y+=`
7
7
  ${U}`}return X.set(L,{content:Y,mtime:B.mtimeMs}),Y}async function w(A){let B=K.statSync(A),L=`${A}:${B.mtimeMs}`,z=X.get(L);if(z)return z.content;let{content:j}=await C(A,E);return X.set(L,{content:j,mtime:B.mtimeMs}),j}function u(A){let B=A.startsWith("/")?A.slice(1):A,L=[B,`${B}.stx`,`${B}.md`,`${B}.html`,$.join(B,"index.stx"),$.join(B,"index.md"),$.join(B,"index.html")];for(let z of L){let j=$.join(F,z);if(K.existsSync(j)&&K.statSync(j).isFile())return j}return null}async function f(A){let B=new URL(A.url),L=async()=>{if(N[B.pathname])return await N[B.pathname](A);if(V){let j=await V(A);if(j)return j}let z=u(B.pathname);if(!z){if(T)return await T(A);return new Response("Not Found",{status:404})}try{let j,Q="text/html";if(z.endsWith(".stx"))j=await O(z);else if(z.endsWith(".md"))j=await w(z);else if(z.endsWith(".html"))j=await Bun.file(z).text();else if(z.endsWith(".css"))j=await Bun.file(z).text(),Q="text/css";else if(z.endsWith(".js"))j=await Bun.file(z).text(),Q="text/javascript";else if(z.endsWith(".json"))j=await Bun.file(z).text(),Q="application/json";else return new Response(Bun.file(z));return new Response(j,{headers:{"Content-Type":Q}})}catch(j){if(g)return await g(j,A);let Q=j instanceof Error?j.message:String(j),y=E?.debug===!0?`<h1>Error</h1><pre>${Q}
8
8
  ${j instanceof Error?j.stack:""}</pre>`:"<h1>Internal Server Error</h1><p>An error occurred while processing your request.</p>";return new Response(y,{status:500,headers:{"Content-Type":"text/html"}})}};for(let z=D.length-1;z>=0;z--){let j=D[z],Q=L;L=async()=>await j(A,Q)}return await L()}let S=h({port:Z,fetch:f}),q=null;if(v)q=K.watch(F,{recursive:!0},(A,B)=>{if(B&&(B.endsWith(".stx")||B.endsWith(".md")||B.endsWith(".html")))X.clear()});return{server:S,url:S.url.toString(),stop(){if(q)q.close();S.stop()}}}async function zj(W,Z={}){let G=$.resolve(W);if(!await Bun.file(G).exists())throw Error(`File not found: ${G}`);let E=G.endsWith(".md"),v=G.endsWith(".stx");if(!E&&!v)throw Error(`Unsupported file type: ${G}. Only .stx and .md files are supported.`);return await i({...Z,root:$.dirname(G),routes:{"/":async()=>{let V;if(E){let{content:N}=await C(G,Z.stxOptions);V=N}else{let N=await Bun.file(G).text(),D=[],T=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=T.exec(N))!==null)if(g[1].includes("server"))D.push(g[2]);let F=D.join(`
9
9
  `),X=N.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),O={};if(F.trim())await x(F,O,G);let w=new Set;V=await m(X,O,G,Z.stxOptions||{},w)}return new Response(V,{headers:{"Content-Type":"text/html"}})},...Z.routes}})}function Aj(W){return W}function Bj(W){return W}
10
- export{jj as jh,i as kh,zj as lh,Aj as mh,Bj as nh};
10
+ export{jj as gh,i as hh,zj as ih,Aj as jh,Bj as kh};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{pB as l}from"./chunk-xv34zbp4.js";import U from"fs";import G from"path";import I from"os";import H from"crypto";import{generatePlaceholder as m,processImage as g}from"ts-images";var d=[320,640,768,1024,1280,1536,1920],h=["webp","jpeg"],b=80,u=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],P={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},N=null,W=!1;async function Y(){if(W)return N;W=!0;try{let J=await import("sharp");return N=J.default||J,N}catch{return null}}async function e(){return await Y()!==null}async function t(){return!0}async function JJ(J,K={}){let{widths:Z=d,formats:$=h,quality:q=b,fit:C="cover",placeholder:X="none",outputDir:Q=".stx/images",baseUrl:_="/images"}=K,j,x;if(typeof J==="string"){if(x=J,!await Bun.file(J).exists())throw new L(`Image not found: ${J}`,"NOT_FOUND");j=await Bun.file(J).arrayBuffer().then((V)=>Buffer.from(V))}else x="buffer-input",j=J;let w=H.createHash("sha256").update(j).digest("hex").slice(0,12),y=await O(j),{width:B,height:D}=y,A=B/D;await U.promises.mkdir(Q,{recursive:!0});let T=[],v=G.basename(x,G.extname(x)),z=Z.filter((V)=>V<=B);if(!z.includes(B)&&B<=Math.max(...Z))z.push(B);z.sort((V,R)=>V-R);for(let V of z){let R=Math.round(V/A);for(let F of $){let S=`${v}-${V}w-${w}.${F}`,k=G.join(Q,S),c=`${_}/${S}`,E=await n(j,{width:V,height:R,format:F,quality:q,fit:C});await Bun.write(k,E),T.push({path:k,url:c,width:V,height:R,format:F,size:E.length})}}let M;if(X!=="none")M=await o(j,X);return{src:x,variants:T,placeholder:M,width:B,height:D,aspectRatio:A,hash:w}}async function O(J){let K=typeof J==="string"?Buffer.from(await Bun.file(J).arrayBuffer()):J,Z=await Y();if(Z){let q=await Z(K).metadata();return{width:q.width||0,height:q.height||0,format:q.format||"unknown",hasAlpha:q.hasAlpha}}return p(K)}function p(J){if(J[0]===137&&J[1]===80&&J[2]===78&&J[3]===71){let K=J.readUInt32BE(16),Z=J.readUInt32BE(20);return{width:K,height:Z,format:"png",hasAlpha:!0}}if(J[0]===255&&J[1]===216){let K=2;while(K<J.length){if(J[K]!==255)break;let Z=J[K+1];if(Z>=192&&Z<=207&&Z!==196&&Z!==200&&Z!==204){let q=J.readUInt16BE(K+5);return{width:J.readUInt16BE(K+7),height:q,format:"jpeg",hasAlpha:!1}}let $=J.readUInt16BE(K+2);K+=2+$}}if(J.toString("utf8",0,4)==="RIFF"&&J.toString("utf8",8,12)==="WEBP"){let K=J.toString("utf8",12,16);if(K==="VP8 "){let Z=J.readUInt16LE(26)&16383,$=J.readUInt16LE(28)&16383;return{width:Z,height:$,format:"webp",hasAlpha:!1}}if(K==="VP8L"){let Z=J.readUInt32LE(21),$=(Z&16383)+1,q=(Z>>14&16383)+1;return{width:$,height:q,format:"webp",hasAlpha:!0}}}if(J.toString("utf8",0,3)==="GIF"){let K=J.readUInt16LE(6),Z=J.readUInt16LE(8);return{width:K,height:Z,format:"gif",hasAlpha:!0}}throw new L("Unable to parse image dimensions","PARSE_ERROR")}async function n(J,K){let Z=await Y();if(Z){let q=Z(J).resize(K.width,K.height,{fit:K.fit});switch(K.format){case"webp":q=q.webp({quality:K.quality});break;case"avif":q=q.avif({quality:K.quality});break;case"jpeg":q=q.jpeg({quality:K.quality});break;case"png":q=q.png({quality:K.quality});break}return q.toBuffer()}let $=G.join(I.tmpdir(),`stx-img-${H.randomBytes(8).toString("hex")}.${K.format}`);try{return await g({input:J,output:$,format:K.format,quality:K.quality,resize:{width:K.width,height:K.height,fit:K.fit}}),Buffer.from(await Bun.file($).arrayBuffer())}finally{await U.promises.unlink($).catch(()=>{})}}async function o(J,K){let Z=await Y();if(K==="blur"&&Z){let X=(await Z(J).resize(20).blur(10).toBuffer()).toString("base64"),Q=await O(J);return`data:${P[Q.format]||"image/jpeg"};base64,${X}`}if(K==="dominant-color"&&Z){let{dominant:C}=await Z(J).resize(1,1).toBuffer().then(async(X)=>{let Q=await Z(X).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${C.r}, ${C.g}, ${C.b})`}let $=await O(J),q=G.join(I.tmpdir(),`stx-ph-${H.randomBytes(8).toString("hex")}.${$.format==="unknown"?"bin":$.format}`);try{await Bun.write(q,J);let C=K==="blur"?"blur":K==="thumbhash"?"thumbhash":"dominant-color",Q=await m(q,{strategy:C,width:C==="thumbhash"?void 0:32});if(K==="dominant-color"&&Q.dominantColor)return Q.dominantColor;if(Q.dataURL)return Q.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{await U.promises.unlink(q).catch(()=>{})}}function KJ(J,K){return(K?J.filter(($)=>$.format===K):J).sort(($,q)=>$.width-q.width).map(($)=>`${$.url} ${$.width}w`).join(", ")}function ZJ(J){if(!J||Object.keys(J).length===0)return"100vw";return Object.entries(J).sort((Z,$)=>{let q=Number.parseInt(Z[0].replace(/\D/g,""))||0;return(Number.parseInt($[0].replace(/\D/g,""))||0)-q}).map(([Z,$])=>`(max-width: ${Z}) ${$}`).join(", ")+", 100vw"}function $J(J){let K=J.filter(($)=>$.format==="jpeg");if(K.length===0)return J[Math.floor(J.length/2)];let Z=K.sort(($,q)=>$.width-q.width);return Z[Math.floor(Z.length/2)]}function qJ(J){let K=new Map;for(let Z of J){let $=K.get(Z.format)||[];$.push(Z),K.set(Z.format,$)}return K}function CJ(J){let K=G.extname(J).toLowerCase();return u.includes(K)}function QJ(J){return P[J]||"application/octet-stream"}function VJ(J){return J.reduce((K,Z)=>K+Z.size,0)}function XJ(J){if(J<1024)return`${J} B`;if(J<1048576)return`${(J/1024).toFixed(1)} KB`;return`${(J/1048576).toFixed(2)} MB`}class L extends Error{code;constructor(J,K){super(J);this.name="ImageProcessingError",this.code=K}}
3
- export{d as Mm,h as Nm,b as Om,e as Pm,t as Qm,JJ as Rm,O as Sm,n as Tm,KJ as Um,ZJ as Vm,$J as Wm,qJ as Xm,CJ as Ym,QJ as Zm,VJ as _m,XJ as $m,L as an};
2
+ import{rB as l}from"./chunk-3jm3snz8.js";import U from"fs";import G from"path";import I from"os";import H from"crypto";import{generatePlaceholder as m,processImage as g}from"ts-images";var d=[320,640,768,1024,1280,1536,1920],h=["webp","jpeg"],b=80,u=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],P={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},N=null,W=!1;async function Y(){if(W)return N;W=!0;try{let J=await import("sharp");return N=J.default||J,N}catch{return null}}async function e(){return await Y()!==null}async function t(){return!0}async function JJ(J,K={}){let{widths:Z=d,formats:$=h,quality:q=b,fit:C="cover",placeholder:X="none",outputDir:Q=".stx/images",baseUrl:_="/images"}=K,j,x;if(typeof J==="string"){if(x=J,!await Bun.file(J).exists())throw new L(`Image not found: ${J}`,"NOT_FOUND");j=await Bun.file(J).arrayBuffer().then((V)=>Buffer.from(V))}else x="buffer-input",j=J;let w=H.createHash("sha256").update(j).digest("hex").slice(0,12),y=await O(j),{width:B,height:D}=y,A=B/D;await U.promises.mkdir(Q,{recursive:!0});let T=[],v=G.basename(x,G.extname(x)),z=Z.filter((V)=>V<=B);if(!z.includes(B)&&B<=Math.max(...Z))z.push(B);z.sort((V,R)=>V-R);for(let V of z){let R=Math.round(V/A);for(let F of $){let S=`${v}-${V}w-${w}.${F}`,k=G.join(Q,S),c=`${_}/${S}`,E=await n(j,{width:V,height:R,format:F,quality:q,fit:C});await Bun.write(k,E),T.push({path:k,url:c,width:V,height:R,format:F,size:E.length})}}let M;if(X!=="none")M=await o(j,X);return{src:x,variants:T,placeholder:M,width:B,height:D,aspectRatio:A,hash:w}}async function O(J){let K=typeof J==="string"?Buffer.from(await Bun.file(J).arrayBuffer()):J,Z=await Y();if(Z){let q=await Z(K).metadata();return{width:q.width||0,height:q.height||0,format:q.format||"unknown",hasAlpha:q.hasAlpha}}return p(K)}function p(J){if(J[0]===137&&J[1]===80&&J[2]===78&&J[3]===71){let K=J.readUInt32BE(16),Z=J.readUInt32BE(20);return{width:K,height:Z,format:"png",hasAlpha:!0}}if(J[0]===255&&J[1]===216){let K=2;while(K<J.length){if(J[K]!==255)break;let Z=J[K+1];if(Z>=192&&Z<=207&&Z!==196&&Z!==200&&Z!==204){let q=J.readUInt16BE(K+5);return{width:J.readUInt16BE(K+7),height:q,format:"jpeg",hasAlpha:!1}}let $=J.readUInt16BE(K+2);K+=2+$}}if(J.toString("utf8",0,4)==="RIFF"&&J.toString("utf8",8,12)==="WEBP"){let K=J.toString("utf8",12,16);if(K==="VP8 "){let Z=J.readUInt16LE(26)&16383,$=J.readUInt16LE(28)&16383;return{width:Z,height:$,format:"webp",hasAlpha:!1}}if(K==="VP8L"){let Z=J.readUInt32LE(21),$=(Z&16383)+1,q=(Z>>14&16383)+1;return{width:$,height:q,format:"webp",hasAlpha:!0}}}if(J.toString("utf8",0,3)==="GIF"){let K=J.readUInt16LE(6),Z=J.readUInt16LE(8);return{width:K,height:Z,format:"gif",hasAlpha:!0}}throw new L("Unable to parse image dimensions","PARSE_ERROR")}async function n(J,K){let Z=await Y();if(Z){let q=Z(J).resize(K.width,K.height,{fit:K.fit});switch(K.format){case"webp":q=q.webp({quality:K.quality});break;case"avif":q=q.avif({quality:K.quality});break;case"jpeg":q=q.jpeg({quality:K.quality});break;case"png":q=q.png({quality:K.quality});break}return q.toBuffer()}let $=G.join(I.tmpdir(),`stx-img-${H.randomBytes(8).toString("hex")}.${K.format}`);try{return await g({input:J,output:$,format:K.format,quality:K.quality,resize:{width:K.width,height:K.height,fit:K.fit}}),Buffer.from(await Bun.file($).arrayBuffer())}finally{await U.promises.unlink($).catch(()=>{})}}async function o(J,K){let Z=await Y();if(K==="blur"&&Z){let X=(await Z(J).resize(20).blur(10).toBuffer()).toString("base64"),Q=await O(J);return`data:${P[Q.format]||"image/jpeg"};base64,${X}`}if(K==="dominant-color"&&Z){let{dominant:C}=await Z(J).resize(1,1).toBuffer().then(async(X)=>{let Q=await Z(X).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${C.r}, ${C.g}, ${C.b})`}let $=await O(J),q=G.join(I.tmpdir(),`stx-ph-${H.randomBytes(8).toString("hex")}.${$.format==="unknown"?"bin":$.format}`);try{await Bun.write(q,J);let C=K==="blur"?"blur":K==="thumbhash"?"thumbhash":"dominant-color",Q=await m(q,{strategy:C,width:C==="thumbhash"?void 0:32});if(K==="dominant-color"&&Q.dominantColor)return Q.dominantColor;if(Q.dataURL)return Q.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{await U.promises.unlink(q).catch(()=>{})}}function KJ(J,K){return(K?J.filter(($)=>$.format===K):J).sort(($,q)=>$.width-q.width).map(($)=>`${$.url} ${$.width}w`).join(", ")}function ZJ(J){if(!J||Object.keys(J).length===0)return"100vw";return Object.entries(J).sort((Z,$)=>{let q=Number.parseInt(Z[0].replace(/\D/g,""))||0;return(Number.parseInt($[0].replace(/\D/g,""))||0)-q}).map(([Z,$])=>`(max-width: ${Z}) ${$}`).join(", ")+", 100vw"}function $J(J){let K=J.filter(($)=>$.format==="jpeg");if(K.length===0)return J[Math.floor(J.length/2)];let Z=K.sort(($,q)=>$.width-q.width);return Z[Math.floor(Z.length/2)]}function qJ(J){let K=new Map;for(let Z of J){let $=K.get(Z.format)||[];$.push(Z),K.set(Z.format,$)}return K}function CJ(J){let K=G.extname(J).toLowerCase();return u.includes(K)}function QJ(J){return P[J]||"application/octet-stream"}function VJ(J){return J.reduce((K,Z)=>K+Z.size,0)}function XJ(J){if(J<1024)return`${J} B`;if(J<1048576)return`${(J/1024).toFixed(1)} KB`;return`${(J/1048576).toFixed(2)} MB`}class L extends Error{code;constructor(J,K){super(J);this.name="ImageProcessingError",this.code=K}}
3
+ export{d as Jm,h as Km,b as Lm,e as Mm,t as Nm,JJ as Om,O as Pm,n as Qm,KJ as Rm,ZJ as Sm,$J as Tm,qJ as Um,CJ as Vm,QJ as Wm,VJ as Xm,XJ as Ym,L as Zm};
@@ -13,4 +13,4 @@ ${q}
13
13
  export function isDirectiveActive(name: string): boolean {
14
14
  return name in activeDirectives
15
15
  }
16
- `}function k(K,j={}){let J=[],Q=/@if\(([^)]+)\)[\s\S]*?@endif/g,q=K.matchAll(Q);for(let X of q){let Z=X[1].trim();if(_(Z,j)===!1)J.push({start:X.index,end:X.index+X[0].length,reason:`@if condition always false: ${Z}`})}let G=/@unless\(([^)]+)\)[\s\S]*?@endunless/g,W=K.matchAll(G);for(let X of W){let Z=X[1].trim();if(_(Z,j)===!0)J.push({start:X.index,end:X.index+X[0].length,reason:`@unless condition always true: ${Z}`})}let Y=/@env\(['"]development['"]\)[\s\S]*?@endenv/g;if(j.__ENV__==="production"){let X=K.matchAll(Y);for(let Z of X)J.push({start:Z.index,end:Z.index+Z[0].length,reason:"Development-only code in production build"})}let $=/@debug[\s\S]*?@enddebug/g;if(j.__ENV__==="production"){let X=K.matchAll($);for(let Z of X)J.push({start:Z.index,end:Z.index+Z[0].length,reason:"Debug code in production build"})}return J}function I(K,j={}){let J=k(K,j),Q=[];J.sort((G,W)=>W.start-G.start);let q=K;for(let G of J)q=q.slice(0,G.start)+q.slice(G.end),Q.push(G.reason);return{content:q,removed:Q}}function _(K,j){if(K==="true")return!0;if(K==="false")return!1;if(K==="null")return null;if(/^\d+$/.test(K))return Number.parseInt(K,10);if(/^\d+\.\d+$/.test(K))return Number.parseFloat(K);if(/^['"].*['"]$/.test(K))return K.slice(1,-1);if(K in j)return j[K];let J=K.match(/^(\w+)\s*(===|!==|==|!=|>=|<=|>|<)\s*(.+)$/);if(J){let[,Q,q,G]=J,W=Q in j?j[Q]:void 0,Y=_(G,j);if(W!==void 0&&Y!==void 0)switch(q){case"==":case"===":return W===Y;case"!=":case"!==":return W!==Y;case">":return W>Y;case"<":return W<Y;case">=":return W>=Y;case"<=":return W<=Y}}return}function R(K,j){let J=[],Q=K;return Q=Q.replace(/\{\{\s*(\w+)\s*\}\}/g,(q,G)=>{if(G in j)return J.push(`{{ ${G} }} -> ${j[G]}`),String(j[G]);return q}),Q=Q.replace(/\{\{\s*(\d+)\s*([+\-*])\s*(\d+)\s*\}\}/g,(q,G,W,Y)=>{let $=Number.parseInt(G,10),X=Number.parseInt(Y,10),Z;switch(W){case"+":Z=$+X;break;case"-":Z=$-X;break;case"*":Z=$*X;break;default:return q}return J.push(`{{ ${G} ${W} ${Y} }} -> ${Z}`),String(Z)}),{content:Q,folded:J}}function M(K){let j=K,J=[],Q=0;j=j.replace(/<(pre|code|script|style)([^>]*)>([\s\S]*?)<\/\1>/gi,(q)=>{let G=`__PRESERVE_${Q++}__`;return J.push({marker:G,content:q}),G}),j=j.replace(/\{\{([\s\S]*?)\}\}/g,(q)=>{let G=`__PRESERVE_${Q++}__`;return J.push({marker:G,content:q}),G}),j=j.replace(/\{\{--([\s\S]*?)--\}\}/g,""),j=j.replace(/<!--[\s\S]*?-->/g,""),j=j.replace(/>\s+</g,"><"),j=j.replace(/^\s+/gm,""),j=j.replace(/\s+$/gm,""),j=j.replace(/\s{2,}/g," ");for(let{marker:q,content:G}of J){let W=j.indexOf(q);if(W!==-1)j=j.slice(0,W)+G+j.slice(W+q.length)}return j.trim()}function N(K){let j=new Map,J=new Map,Q=/(['"])([^'"]{10,})\1/g,q;while((q=Q.exec(K))!==null){let Y=q[2];J.set(Y,(J.get(Y)||0)+1)}let G=0,W=K;for(let[Y,$]of J)if($>1){let X=`__STR_${G++}__`;j.set(X,Y);let Z=Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F=new RegExp(`(['"])${Z}\\1`,"g");W=W.replace(F,X)}return{content:W,pool:j,count:j.size}}function b(K,j={}){let J={...E,...j},Q=new Blob([K]).size,q=K,G=[],W=[],Y=[],$=[],X=0;if(J.target==="production")J.constants={...J.constants,__ENV__:"production"};if(J.deadCodeElimination){let H=I(q,J.constants);if(q=H.content,H.removed.length>0)G.push("Dead code elimination"),W.push(...H.removed.map((y)=>`Removed: ${y}`))}if(J.constantFolding&&Object.keys(J.constants).length>0){let H=R(q,J.constants);if(q=H.content,$=H.folded,$.length>0)G.push("Constant folding")}if(J.treeShake){if(Y=T(q,J.preserveDirectives),Y.length>0)G.push("Tree shaking")}if(J.stringPooling){let H=N(q);if(q=H.content,X=H.count,X>0)G.push("String pooling")}if(J.minifyHtml){let H=M(q);if(H.length<q.length)q=H,G.push("HTML minification")}let Z=new Blob([q]).size,F=Q>0?Math.round((1-Z/Q)*100):0;return{content:q,originalSize:Q,optimizedSize:Z,reduction:F,appliedOptimizations:G,removedDirectives:Y,foldedConstants:$,pooledStrings:X,warnings:W}}async function B(K,j={}){let J={...E,...j},Q=new Map,q=[],G=0,W=0,Y=new Set;for(let[F,H]of K){let y=b(H,J);Q.set(F,y),G+=y.originalSize,W+=y.optimizedSize,q.push(...y.warnings.map((P)=>`${F}: ${P}`));let w=A(H);for(let P of w)Y.add(P.name)}let $;if(J.treeShake)$=U(Array.from(Y));let X;if(J.stringPooling)X=new Map;let Z=G>0?Math.round((1-W/G)*100):0;return{templates:Q,directiveBundle:$,stringPool:X,totalOriginalSize:G,totalOptimizedSize:W,overallReduction:Z,warnings:q}}function C(K){return K.charAt(0).toUpperCase()+K.slice(1)}export{A as qq,T as rq,U as sq,k as tq,I as uq,_ as vq,R as wq,M as xq,N as yq,b as zq,B as Aq};
16
+ `}function k(K,j={}){let J=[],Q=/@if\(([^)]+)\)[\s\S]*?@endif/g,q=K.matchAll(Q);for(let X of q){let Z=X[1].trim();if(_(Z,j)===!1)J.push({start:X.index,end:X.index+X[0].length,reason:`@if condition always false: ${Z}`})}let G=/@unless\(([^)]+)\)[\s\S]*?@endunless/g,W=K.matchAll(G);for(let X of W){let Z=X[1].trim();if(_(Z,j)===!0)J.push({start:X.index,end:X.index+X[0].length,reason:`@unless condition always true: ${Z}`})}let Y=/@env\(['"]development['"]\)[\s\S]*?@endenv/g;if(j.__ENV__==="production"){let X=K.matchAll(Y);for(let Z of X)J.push({start:Z.index,end:Z.index+Z[0].length,reason:"Development-only code in production build"})}let $=/@debug[\s\S]*?@enddebug/g;if(j.__ENV__==="production"){let X=K.matchAll($);for(let Z of X)J.push({start:Z.index,end:Z.index+Z[0].length,reason:"Debug code in production build"})}return J}function I(K,j={}){let J=k(K,j),Q=[];J.sort((G,W)=>W.start-G.start);let q=K;for(let G of J)q=q.slice(0,G.start)+q.slice(G.end),Q.push(G.reason);return{content:q,removed:Q}}function _(K,j){if(K==="true")return!0;if(K==="false")return!1;if(K==="null")return null;if(/^\d+$/.test(K))return Number.parseInt(K,10);if(/^\d+\.\d+$/.test(K))return Number.parseFloat(K);if(/^['"].*['"]$/.test(K))return K.slice(1,-1);if(K in j)return j[K];let J=K.match(/^(\w+)\s*(===|!==|==|!=|>=|<=|>|<)\s*(.+)$/);if(J){let[,Q,q,G]=J,W=Q in j?j[Q]:void 0,Y=_(G,j);if(W!==void 0&&Y!==void 0)switch(q){case"==":case"===":return W===Y;case"!=":case"!==":return W!==Y;case">":return W>Y;case"<":return W<Y;case">=":return W>=Y;case"<=":return W<=Y}}return}function R(K,j){let J=[],Q=K;return Q=Q.replace(/\{\{\s*(\w+)\s*\}\}/g,(q,G)=>{if(G in j)return J.push(`{{ ${G} }} -> ${j[G]}`),String(j[G]);return q}),Q=Q.replace(/\{\{\s*(\d+)\s*([+\-*])\s*(\d+)\s*\}\}/g,(q,G,W,Y)=>{let $=Number.parseInt(G,10),X=Number.parseInt(Y,10),Z;switch(W){case"+":Z=$+X;break;case"-":Z=$-X;break;case"*":Z=$*X;break;default:return q}return J.push(`{{ ${G} ${W} ${Y} }} -> ${Z}`),String(Z)}),{content:Q,folded:J}}function M(K){let j=K,J=[],Q=0;j=j.replace(/<(pre|code|script|style)([^>]*)>([\s\S]*?)<\/\1>/gi,(q)=>{let G=`__PRESERVE_${Q++}__`;return J.push({marker:G,content:q}),G}),j=j.replace(/\{\{([\s\S]*?)\}\}/g,(q)=>{let G=`__PRESERVE_${Q++}__`;return J.push({marker:G,content:q}),G}),j=j.replace(/\{\{--([\s\S]*?)--\}\}/g,""),j=j.replace(/<!--[\s\S]*?-->/g,""),j=j.replace(/>\s+</g,"><"),j=j.replace(/^\s+/gm,""),j=j.replace(/\s+$/gm,""),j=j.replace(/\s{2,}/g," ");for(let{marker:q,content:G}of J){let W=j.indexOf(q);if(W!==-1)j=j.slice(0,W)+G+j.slice(W+q.length)}return j.trim()}function N(K){let j=new Map,J=new Map,Q=/(['"])([^'"]{10,})\1/g,q;while((q=Q.exec(K))!==null){let Y=q[2];J.set(Y,(J.get(Y)||0)+1)}let G=0,W=K;for(let[Y,$]of J)if($>1){let X=`__STR_${G++}__`;j.set(X,Y);let Z=Y.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),F=new RegExp(`(['"])${Z}\\1`,"g");W=W.replace(F,X)}return{content:W,pool:j,count:j.size}}function b(K,j={}){let J={...E,...j},Q=new Blob([K]).size,q=K,G=[],W=[],Y=[],$=[],X=0;if(J.target==="production")J.constants={...J.constants,__ENV__:"production"};if(J.deadCodeElimination){let H=I(q,J.constants);if(q=H.content,H.removed.length>0)G.push("Dead code elimination"),W.push(...H.removed.map((y)=>`Removed: ${y}`))}if(J.constantFolding&&Object.keys(J.constants).length>0){let H=R(q,J.constants);if(q=H.content,$=H.folded,$.length>0)G.push("Constant folding")}if(J.treeShake){if(Y=T(q,J.preserveDirectives),Y.length>0)G.push("Tree shaking")}if(J.stringPooling){let H=N(q);if(q=H.content,X=H.count,X>0)G.push("String pooling")}if(J.minifyHtml){let H=M(q);if(H.length<q.length)q=H,G.push("HTML minification")}let Z=new Blob([q]).size,F=Q>0?Math.round((1-Z/Q)*100):0;return{content:q,originalSize:Q,optimizedSize:Z,reduction:F,appliedOptimizations:G,removedDirectives:Y,foldedConstants:$,pooledStrings:X,warnings:W}}async function B(K,j={}){let J={...E,...j},Q=new Map,q=[],G=0,W=0,Y=new Set;for(let[F,H]of K){let y=b(H,J);Q.set(F,y),G+=y.originalSize,W+=y.optimizedSize,q.push(...y.warnings.map((P)=>`${F}: ${P}`));let w=A(H);for(let P of w)Y.add(P.name)}let $;if(J.treeShake)$=U(Array.from(Y));let X;if(J.stringPooling)X=new Map;let Z=G>0?Math.round((1-W/G)*100):0;return{templates:Q,directiveBundle:$,stringPool:X,totalOriginalSize:G,totalOptimizedSize:W,overallReduction:Z,warnings:q}}function C(K){return K.charAt(0).toUpperCase()+K.slice(1)}export{A as rq,T as sq,U as tq,k as uq,I as vq,_ as wq,R as xq,M as yq,N as zq,b as Aq,B as Bq};