@stacksjs/stx 0.2.92 → 0.2.93

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 (624) 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-5y4q9abj.js → chunk-04n64bnt.js} +1 -1
  37. package/dist/{chunk-3ewtm19c.js → chunk-06w68hyg.js} +2 -2
  38. package/dist/{chunk-ccgmxmjk.js → chunk-07y6m5xx.js} +1 -1
  39. package/dist/{chunk-j25swncq.js → chunk-095s3972.js} +1 -1
  40. package/dist/{chunk-ckz0ppkr.js → chunk-09k66d8a.js} +1 -1
  41. package/dist/{chunk-g22tv0ed.js → chunk-0a61y94n.js} +2 -2
  42. package/dist/{chunk-exfw0aqe.js → chunk-0dx4q6yq.js} +1 -1
  43. package/dist/{chunk-t1dzvz5z.js → chunk-0dz85jrp.js} +1 -1
  44. package/dist/{chunk-k7yp9h17.js → chunk-0jd0pndq.js} +1 -1
  45. package/dist/{chunk-r738cjs3.js → chunk-0p0nyq50.js} +2 -2
  46. package/dist/{chunk-ke7rcrfm.js → chunk-0p1h3p3w.js} +1 -1
  47. package/dist/{chunk-9pzdyd8q.js → chunk-0qnz93q2.js} +2 -2
  48. package/dist/{chunk-j6d9ksyj.js → chunk-10debkj5.js} +1 -1
  49. package/dist/{chunk-pzc0bs5r.js → chunk-15nesxgt.js} +2 -2
  50. package/dist/{chunk-snj1hfpb.js → chunk-1sr54zp8.js} +1 -1
  51. package/dist/{chunk-3whqk46c.js → chunk-1v49fwr5.js} +1 -1
  52. package/dist/{chunk-tzd81m7r.js → chunk-1xz0w746.js} +2 -2
  53. package/dist/{chunk-jmky0qzm.js → chunk-1z5nhbjt.js} +1 -1
  54. package/dist/{chunk-qhrcts5t.js → chunk-20swzkx3.js} +1 -1
  55. package/dist/{chunk-jm460jxs.js → chunk-27zsyhrd.js} +1 -1
  56. package/dist/{chunk-rhyxeb33.js → chunk-29y0hk5z.js} +2 -2
  57. package/dist/{chunk-zv9jfm2f.js → chunk-2cdvw21b.js} +1 -1
  58. package/dist/{chunk-2rd0ykrg.js → chunk-2j21d3ka.js} +1 -1
  59. package/dist/chunk-2jxbwnkz.js +2 -0
  60. package/dist/{chunk-a2xzs4kd.js → chunk-31dr4bys.js} +2 -2
  61. package/dist/{chunk-08ncwhv7.js → chunk-35faj94w.js} +1 -1
  62. package/dist/{chunk-nv3k4bf9.js → chunk-39gm08bn.js} +1 -1
  63. package/dist/{chunk-dtcj9r7p.js → chunk-3a4qsygv.js} +2 -2
  64. package/dist/{chunk-xkzz5rb0.js → chunk-3te20hqw.js} +2 -2
  65. package/dist/{chunk-z06myqr1.js → chunk-43t7faps.js} +2 -2
  66. package/dist/{chunk-jcjzg6r5.js → chunk-47kpewks.js} +1 -1
  67. package/dist/{chunk-my0qmjw4.js → chunk-4d2y57k7.js} +2 -2
  68. package/dist/{chunk-c9f5k95v.js → chunk-4deg33rw.js} +2 -2
  69. package/dist/{chunk-t38vt890.js → chunk-4k7d8p8d.js} +1 -1
  70. package/dist/{chunk-n2wmny2b.js → chunk-4qcy5tx6.js} +2 -2
  71. package/dist/{chunk-9d0q9k3p.js → chunk-4x7kae4j.js} +2 -2
  72. package/dist/{chunk-qr72av66.js → chunk-55nwdnsd.js} +1 -1
  73. package/dist/{chunk-1vz36hw3.js → chunk-55yp0q8t.js} +1 -1
  74. package/dist/{chunk-rqwhb85x.js → chunk-5f43yz6z.js} +2 -2
  75. package/dist/{chunk-b0w1cm1s.js → chunk-5shey2e4.js} +1 -1
  76. package/dist/{chunk-b37f9ebf.js → chunk-6b5k6w2q.js} +1 -1
  77. package/dist/{chunk-zwdargbj.js → chunk-6djzdes9.js} +1 -1
  78. package/dist/{chunk-knefeadt.js → chunk-6e4c6g46.js} +2 -2
  79. package/dist/{chunk-0fsrhs3d.js → chunk-6eqbxcrd.js} +1 -1
  80. package/dist/{chunk-9p45wwff.js → chunk-7074g241.js} +1 -1
  81. package/dist/{chunk-88wdr7f3.js → chunk-7b6s3g65.js} +1 -1
  82. package/dist/{chunk-5wecgn5n.js → chunk-7cgmq685.js} +1 -1
  83. package/dist/{chunk-eghdf4qq.js → chunk-7dkz6z2s.js} +2 -2
  84. package/dist/{chunk-h6s1thg6.js → chunk-7ed3tean.js} +1 -1
  85. package/dist/{chunk-zr8631g4.js → chunk-7gd339hd.js} +1 -1
  86. package/dist/{chunk-6t76k6ry.js → chunk-7j5e8sdj.js} +2 -2
  87. package/dist/{chunk-8fhv0xaw.js → chunk-7n8g0nfn.js} +2 -2
  88. package/dist/{chunk-31w1xfs1.js → chunk-80g54ncj.js} +1 -1
  89. package/dist/{chunk-6wqrqn2x.js → chunk-8a5bxece.js} +2 -2
  90. package/dist/{chunk-87rkm7qf.js → chunk-8ahwt6a4.js} +2 -2
  91. package/dist/{chunk-y92w0240.js → chunk-8b3z0zd5.js} +1 -1
  92. package/dist/{chunk-7bd8bw2z.js → chunk-8dhdpa5h.js} +2 -2
  93. package/dist/{chunk-04yrgvdd.js → chunk-8n9nnqr6.js} +1 -1
  94. package/dist/{chunk-h1035wzj.js → chunk-8qc1bsym.js} +1 -1
  95. package/dist/{chunk-9w7021bx.js → chunk-8va64c9n.js} +2 -2
  96. package/dist/{chunk-yssvz8zs.js → chunk-8vtm0m84.js} +1 -1
  97. package/dist/{chunk-c23697dp.js → chunk-8xj7c3mf.js} +1 -1
  98. package/dist/{chunk-8g0jb444.js → chunk-988dw6q3.js} +2 -2
  99. package/dist/{chunk-ktvdeqjr.js → chunk-9b6cec0v.js} +1 -1
  100. package/dist/{chunk-m911bf2b.js → chunk-9cf97f9p.js} +2 -2
  101. package/dist/{chunk-xgmza98t.js → chunk-9ecv8aqj.js} +1 -1
  102. package/dist/{chunk-ydhza16t.js → chunk-9eq3ht5f.js} +1 -1
  103. package/dist/{chunk-sd2c11bp.js → chunk-9jtj77jx.js} +2 -2
  104. package/dist/{chunk-yywc3yge.js → chunk-9t14se2t.js} +1 -1
  105. package/dist/{chunk-w719zps0.js → chunk-9wmq2272.js} +1 -1
  106. package/dist/{chunk-wk7mgg5n.js → chunk-9zbk5zx5.js} +2 -2
  107. package/dist/{chunk-rdaavfsg.js → chunk-a2g2qb2y.js} +1 -1
  108. package/dist/{chunk-agzvhej1.js → chunk-a3hyn4we.js} +1 -1
  109. package/dist/{chunk-14kfmww0.js → chunk-a87qqft6.js} +2 -2
  110. package/dist/{chunk-md4j8nch.js → chunk-ah88wzbg.js} +1 -1
  111. package/dist/{chunk-wdtanmx1.js → chunk-akf1r75r.js} +1 -1
  112. package/dist/{chunk-xw9skf0n.js → chunk-amaa1bev.js} +1 -1
  113. package/dist/{chunk-rth1890k.js → chunk-avx8aydt.js} +2 -2
  114. package/dist/{chunk-kh976zgv.js → chunk-ay9qf4zj.js} +1 -1
  115. package/dist/{chunk-aaaxvn5r.js → chunk-aywxfqev.js} +1 -1
  116. package/dist/{chunk-19f7xyy7.js → chunk-azkegjd8.js} +2 -2
  117. package/dist/{chunk-tgvekhwz.js → chunk-b77wjyn7.js} +1 -1
  118. package/dist/{chunk-tj9kmtnx.js → chunk-baf1hfwh.js} +2 -2
  119. package/dist/{chunk-zxxt0c9q.js → chunk-bdk6g1vj.js} +2 -2
  120. package/dist/{chunk-j1myedcr.js → chunk-bhqgmyqw.js} +1 -1
  121. package/dist/{chunk-13mkbvxc.js → chunk-bk3j0n82.js} +1 -1
  122. package/dist/{chunk-jtx73fsh.js → chunk-bndmdahk.js} +2 -2
  123. package/dist/{chunk-nacsxc1r.js → chunk-bpgg59wa.js} +1 -1
  124. package/dist/{chunk-xmjedbkt.js → chunk-bs3gmfxz.js} +1 -1
  125. package/dist/{chunk-dnkq5y2j.js → chunk-bxc7kjsk.js} +2 -2
  126. package/dist/{chunk-0qzxbxgp.js → chunk-c7jg8w13.js} +1 -1
  127. package/dist/{chunk-nh418dpm.js → chunk-ckxjqqn9.js} +2 -2
  128. package/dist/{chunk-r3cxnszy.js → chunk-d0zjtdw4.js} +2 -2
  129. package/dist/{chunk-g9gksn68.js → chunk-d1qh1x2g.js} +2 -2
  130. package/dist/{chunk-6jhqq7es.js → chunk-djddhmcc.js} +1 -1
  131. package/dist/{chunk-5tv1swsr.js → chunk-dqn9gyhb.js} +1 -1
  132. package/dist/{chunk-qhzdkgg3.js → chunk-drjq2zwg.js} +2 -2
  133. package/dist/{chunk-cf86cs0k.js → chunk-dvfs1h3c.js} +2 -2
  134. package/dist/{chunk-p4wm4a45.js → chunk-e2q9c5vq.js} +2 -2
  135. package/dist/{chunk-9tksycj5.js → chunk-e98v1bc6.js} +2 -2
  136. package/dist/chunk-ejayeex8.js +2 -0
  137. package/dist/{chunk-a4zj7qpt.js → chunk-ejh8fyak.js} +1 -1
  138. package/dist/{chunk-fh1d8bxd.js → chunk-ek2w6zvy.js} +1 -1
  139. package/dist/{chunk-0m53nxvy.js → chunk-ewa88139.js} +1 -1
  140. package/dist/{chunk-pjaa8q7x.js → chunk-fjk3x41y.js} +2 -2
  141. package/dist/{chunk-6sx4d083.js → chunk-frg705zq.js} +1 -1
  142. package/dist/{chunk-acry1mfc.js → chunk-fzm3y0r3.js} +1 -1
  143. package/dist/{chunk-nwfa5766.js → chunk-g1vt329s.js} +2 -2
  144. package/dist/{chunk-zxsqbve0.js → chunk-g4ps1dj8.js} +2 -2
  145. package/dist/{chunk-x6n8z1n8.js → chunk-gkzq8zw4.js} +1 -1
  146. package/dist/{chunk-hkjq64we.js → chunk-gz5fmp3q.js} +1 -1
  147. package/dist/{chunk-ddst5g08.js → chunk-h0hjy0kn.js} +1 -1
  148. package/dist/{chunk-e792k31a.js → chunk-h5jxydqq.js} +1 -1
  149. package/dist/{chunk-at9v5saf.js → chunk-h5wa62ek.js} +1 -1
  150. package/dist/{chunk-91gyjg5c.js → chunk-h7aq56qj.js} +2 -2
  151. package/dist/{chunk-ecabspxs.js → chunk-h82kjdr4.js} +1 -1
  152. package/dist/{chunk-zx43nkm1.js → chunk-hbehnm18.js} +2 -2
  153. package/dist/{chunk-v9199ywv.js → chunk-hbgxbgam.js} +2 -2
  154. package/dist/{chunk-5e2khb7q.js → chunk-hc2mf5h6.js} +2 -2
  155. package/dist/{chunk-r7d26vjj.js → chunk-hjm2xab3.js} +1 -1
  156. package/dist/{chunk-fnqf7293.js → chunk-hrnnh4tq.js} +2 -2
  157. package/dist/{chunk-pcngkyjr.js → chunk-ht43ds42.js} +2 -2
  158. package/dist/{chunk-22xxm2x5.js → chunk-hxx3za24.js} +1 -1
  159. package/dist/{chunk-nqxqy9v2.js → chunk-hy8820vc.js} +1 -1
  160. package/dist/{chunk-fbbv5x9m.js → chunk-j447q024.js} +2 -2
  161. package/dist/{chunk-am5rtv86.js → chunk-j58vh0w6.js} +1 -1
  162. package/dist/{chunk-sgsb5xp4.js → chunk-j8tn8enq.js} +2 -2
  163. package/dist/{chunk-vwp4dw7e.js → chunk-jc0fc4ht.js} +1 -1
  164. package/dist/{chunk-kemb0fyc.js → chunk-jcs0ymw7.js} +1 -1
  165. package/dist/{chunk-fnt3srfr.js → chunk-jjamhxpm.js} +1 -1
  166. package/dist/{chunk-hz7qnpx1.js → chunk-jjb05d21.js} +2 -2
  167. package/dist/{chunk-g3f1xq76.js → chunk-jjdq01dv.js} +1 -1
  168. package/dist/{chunk-a33kr9b0.js → chunk-jnmgm2xw.js} +1 -1
  169. package/dist/{chunk-kqtchwz7.js → chunk-jpndqst5.js} +1 -1
  170. package/dist/{chunk-1hyk728h.js → chunk-jt0ezawy.js} +1 -1
  171. package/dist/{chunk-w4a3cvtp.js → chunk-jz73j3qs.js} +1 -1
  172. package/dist/{chunk-n3k3e9n5.js → chunk-k21df0pg.js} +1 -1
  173. package/dist/{chunk-dcp0znhd.js → chunk-k848dzsa.js} +1 -1
  174. package/dist/{chunk-mqnymcn5.js → chunk-kdfe4t91.js} +2 -2
  175. package/dist/{chunk-7aph6rw7.js → chunk-keawsbpn.js} +1 -1
  176. package/dist/{chunk-jdy93c39.js → chunk-kgym7ch9.js} +1 -1
  177. package/dist/{chunk-1htmc8mb.js → chunk-khdn7jwe.js} +2 -2
  178. package/dist/{chunk-f9j3mr9z.js → chunk-km25cwz6.js} +1 -1
  179. package/dist/{chunk-r1m8g439.js → chunk-knm8a8yx.js} +1 -1
  180. package/dist/{chunk-zepv7y44.js → chunk-krqn0ddk.js} +2 -2
  181. package/dist/{chunk-2aydpj2n.js → chunk-kx6eb6ma.js} +1 -1
  182. package/dist/{chunk-r5sggjdv.js → chunk-kypas8vy.js} +2 -2
  183. package/dist/{chunk-npj33yqb.js → chunk-m167kjhv.js} +1 -1
  184. package/dist/{chunk-x4qr3b2z.js → chunk-m491r0rj.js} +1 -1
  185. package/dist/{chunk-ktpc2rc4.js → chunk-m8448qby.js} +1 -1
  186. package/dist/{chunk-fk0m346m.js → chunk-mgj88zeq.js} +2 -2
  187. package/dist/{chunk-7sd6c9wv.js → chunk-mhgk632d.js} +1 -1
  188. package/dist/{chunk-sn7pmfn4.js → chunk-n5kg7fpx.js} +1 -1
  189. package/dist/{chunk-02bd1cng.js → chunk-n98x35xd.js} +1 -1
  190. package/dist/{chunk-4ep9gk7d.js → chunk-n9dhs1dw.js} +1 -1
  191. package/dist/{chunk-8x58wmgs.js → chunk-nd9rmddh.js} +2 -2
  192. package/dist/{chunk-xm3hz63f.js → chunk-ngxfwzq3.js} +1 -1
  193. package/dist/{chunk-tavtph8x.js → chunk-nhv099jv.js} +1 -1
  194. package/dist/{chunk-1k3k1tf8.js → chunk-nm15ccsg.js} +2 -2
  195. package/dist/{chunk-2g16stee.js → chunk-npfmdb6y.js} +2 -2
  196. package/dist/{chunk-fngb9apr.js → chunk-nvwb4x04.js} +1 -1
  197. package/dist/{chunk-ydhrdatx.js → chunk-nw34xajc.js} +1 -1
  198. package/dist/{chunk-9v7q6xn4.js → chunk-p077sw22.js} +1 -1
  199. package/dist/{chunk-hrgg37a9.js → chunk-p1h8065h.js} +2 -2
  200. package/dist/{chunk-tb9c2mq7.js → chunk-p3e0cqtt.js} +2 -2
  201. package/dist/{chunk-gapx9vqm.js → chunk-p3fpb79v.js} +1 -1
  202. package/dist/{chunk-c7zedzbg.js → chunk-p52yzjq6.js} +2 -2
  203. package/dist/{chunk-wtgrc6ya.js → chunk-p73meypx.js} +1 -1
  204. package/dist/{chunk-9fj7hpwa.js → chunk-pa9zb7ty.js} +1 -1
  205. package/dist/{chunk-3wth4wa6.js → chunk-payfb24w.js} +1 -1
  206. package/dist/{chunk-tzehzwyr.js → chunk-pcm1vd8w.js} +1 -1
  207. package/dist/{chunk-h3mb2q51.js → chunk-pcntd9h4.js} +2 -2
  208. package/dist/{chunk-xecnz132.js → chunk-pg1fvqb9.js} +1 -1
  209. package/dist/{chunk-hdv4tnvh.js → chunk-psc3wfcf.js} +2 -2
  210. package/dist/{chunk-1qy4gac6.js → chunk-pznnww6k.js} +2 -2
  211. package/dist/{chunk-6e08xfzp.js → chunk-q6zhd9yf.js} +1 -1
  212. package/dist/{chunk-gfsk93gv.js → chunk-qa59zejf.js} +2 -2
  213. package/dist/{chunk-r6sb1sm4.js → chunk-qvrbjpdc.js} +2 -2
  214. package/dist/{chunk-sk1gmrr8.js → chunk-qygvvygy.js} +2 -2
  215. package/dist/{chunk-wntaqqhz.js → chunk-r0jcmpv6.js} +1 -1
  216. package/dist/{chunk-t7ghqd7e.js → chunk-r5m9xtm7.js} +2 -2
  217. package/dist/{chunk-kpp2baaz.js → chunk-rkffm9sy.js} +1 -1
  218. package/dist/{chunk-646pxdd1.js → chunk-rpx5fa65.js} +2 -2
  219. package/dist/{chunk-1yg3x73j.js → chunk-rqxf5hns.js} +1 -1
  220. package/dist/{chunk-f7f4g33p.js → chunk-rtr974rc.js} +2 -2
  221. package/dist/{chunk-fyq5573f.js → chunk-rvptcndz.js} +2 -2
  222. package/dist/{chunk-ms9rebfj.js → chunk-rw26rpek.js} +2 -2
  223. package/dist/{chunk-vy0k2prz.js → chunk-rw7937v4.js} +2 -2
  224. package/dist/{chunk-zvyc82ke.js → chunk-rwrv9wbf.js} +1 -1
  225. package/dist/{chunk-bg1xym0q.js → chunk-rz2ec6g7.js} +1 -1
  226. package/dist/{chunk-64bwamng.js → chunk-s6ja2bdg.js} +1 -1
  227. package/dist/{chunk-4ewrwqwn.js → chunk-scpkdrdb.js} +1 -1
  228. package/dist/{chunk-0t75nh4z.js → chunk-shv88d2d.js} +2 -2
  229. package/dist/{chunk-8xbj6dqe.js → chunk-t0c9wvpr.js} +1 -1
  230. package/dist/{chunk-f228sm5e.js → chunk-tffh3b1e.js} +1 -1
  231. package/dist/{chunk-3rgj1qn6.js → chunk-tg2f1mzq.js} +2 -2
  232. package/dist/{chunk-fcpxs8mm.js → chunk-trfswy66.js} +1 -1
  233. package/dist/{chunk-rkr7cgs8.js → chunk-tzwtg722.js} +1 -1
  234. package/dist/{chunk-a50svyjn.js → chunk-v7f8jj15.js} +1 -1
  235. package/dist/{chunk-qvmrwh8n.js → chunk-v8j49spx.js} +1 -1
  236. package/dist/{chunk-zwpm1pa8.js → chunk-vcr5pzpx.js} +1 -1
  237. package/dist/{chunk-ewytyv0p.js → chunk-veeerpwa.js} +2 -2
  238. package/dist/{chunk-p993psbk.js → chunk-vg5kt6az.js} +1 -1
  239. package/dist/{chunk-hd27hhzr.js → chunk-vgv7jvyz.js} +1 -1
  240. package/dist/{chunk-9ezvda3j.js → chunk-vjbefncc.js} +1 -1
  241. package/dist/{chunk-e8x46y38.js → chunk-vmxjghsm.js} +1 -1
  242. package/dist/{chunk-dkt9p3bk.js → chunk-vw7vqd76.js} +1 -1
  243. package/dist/{chunk-p5j0686t.js → chunk-w3b6m427.js} +1 -1
  244. package/dist/{chunk-593x2ccf.js → chunk-wazkqv7n.js} +2 -2
  245. package/dist/{chunk-bgan5edn.js → chunk-wf7zrjsw.js} +1 -1
  246. package/dist/{chunk-b5xf2v7f.js → chunk-wfg2gm11.js} +1 -1
  247. package/dist/{chunk-1w3354fv.js → chunk-wg9k6h8w.js} +2 -2
  248. package/dist/{chunk-wbrqpv9f.js → chunk-wkz2vwkr.js} +2 -2
  249. package/dist/{chunk-mp9dsjrg.js → chunk-wvef3ngh.js} +1 -1
  250. package/dist/{chunk-w3e1fm1q.js → chunk-wvf31nzs.js} +1 -1
  251. package/dist/{chunk-1bzckhs2.js → chunk-x05nxhyv.js} +2 -2
  252. package/dist/{chunk-ybe2cpx1.js → chunk-x0770gt9.js} +1 -1
  253. package/dist/{chunk-ds6g241c.js → chunk-x24s4heg.js} +1 -1
  254. package/dist/{chunk-f6s1jx8c.js → chunk-x3r64r0c.js} +2 -2
  255. package/dist/{chunk-n7j8tczc.js → chunk-x5g9w4hh.js} +2 -2
  256. package/dist/{chunk-nsrqf0dg.js → chunk-xgkv66q5.js} +1 -1
  257. package/dist/{chunk-kyhq6hzp.js → chunk-xs03kc1h.js} +1 -1
  258. package/dist/{chunk-6r70w54p.js → chunk-xv34zbp4.js} +1 -1
  259. package/dist/{chunk-zhr3za7x.js → chunk-xw36p73h.js} +2 -2
  260. package/dist/{chunk-ms6793rw.js → chunk-xyg1r5w0.js} +2 -2
  261. package/dist/{chunk-1bknva4p.js → chunk-xys2sxh6.js} +1 -1
  262. package/dist/{chunk-vg97xcma.js → chunk-y0qg6rrv.js} +1 -1
  263. package/dist/{chunk-v0s45ek4.js → chunk-y1k17c8b.js} +2 -2
  264. package/dist/{chunk-zasq08k3.js → chunk-y5xz0jc4.js} +1 -1
  265. package/dist/{chunk-ftzqtv1k.js → chunk-y6xsqe9a.js} +2 -2
  266. package/dist/{chunk-7t4hkmxb.js → chunk-yb1t2h8h.js} +2 -2
  267. package/dist/{chunk-c03qara0.js → chunk-ygvyc6wv.js} +1 -1
  268. package/dist/{chunk-71n355cg.js → chunk-yj4x5ehw.js} +2 -2
  269. package/dist/{chunk-pdv5dhen.js → chunk-yn38c15w.js} +1 -1
  270. package/dist/{chunk-dgf2g708.js → chunk-ynhngsdh.js} +1 -1
  271. package/dist/{chunk-hkabmxjj.js → chunk-yrsb6j3z.js} +2 -2
  272. package/dist/chunk-yywfvfph.js +2 -0
  273. package/dist/{chunk-fp417rws.js → chunk-zcxzdrn7.js} +2 -2
  274. package/dist/{chunk-gcsqn7x9.js → chunk-zen6ax1y.js} +2 -2
  275. package/dist/{chunk-vawc9ak6.js → chunk-zf2pek72.js} +1 -1
  276. package/dist/{chunk-zmsj7wh8.js → chunk-zk3d0jjf.js} +1 -1
  277. package/dist/{chunk-6zhv4fcq.js → chunk-zy3rp1ab.js} +1 -1
  278. package/dist/cli.js +10882 -10882
  279. package/dist/client/directive.js +1 -1
  280. package/dist/client/index.js +1 -1
  281. package/dist/client-helpers.js +1 -1
  282. package/dist/client-script-bundler.js +1 -1
  283. package/dist/client-script.js +1 -1
  284. package/dist/client.js +0 -86
  285. package/dist/component-hmr.js +1 -1
  286. package/dist/component-processing.js +1 -1
  287. package/dist/component-registry.js +1 -1
  288. package/dist/component-renderer.js +1 -1
  289. package/dist/components.js +1 -1
  290. package/dist/composables/index.js +1 -1
  291. package/dist/composables/use-battery.js +1 -1
  292. package/dist/composables/use-broadcast-channel.js +1 -1
  293. package/dist/composables/use-channel.js +1 -1
  294. package/dist/composables/use-clipboard.js +1 -1
  295. package/dist/composables/use-color-mode.js +1 -1
  296. package/dist/composables/use-cookie.js +1 -1
  297. package/dist/composables/use-device-orientation.js +1 -1
  298. package/dist/composables/use-event-listener.js +1 -1
  299. package/dist/composables/use-event-source.js +1 -1
  300. package/dist/composables/use-eye-dropper.js +1 -1
  301. package/dist/composables/use-fetch.js +1 -1
  302. package/dist/composables/use-fullscreen.js +1 -1
  303. package/dist/composables/use-geolocation.js +1 -1
  304. package/dist/composables/use-idle.js +1 -1
  305. package/dist/composables/use-intersection-observer.js +1 -1
  306. package/dist/composables/use-keyboard.js +1 -1
  307. package/dist/composables/use-media-query.js +1 -1
  308. package/dist/composables/use-meta.js +1 -1
  309. package/dist/composables/use-mouse.js +1 -1
  310. package/dist/composables/use-mutation-observer.js +1 -1
  311. package/dist/composables/use-network.js +1 -1
  312. package/dist/composables/use-notification.js +1 -1
  313. package/dist/composables/use-permissions.js +1 -1
  314. package/dist/composables/use-resize-observer.js +1 -1
  315. package/dist/composables/use-router.js +1 -1
  316. package/dist/composables/use-share.js +1 -1
  317. package/dist/composables/use-speech.js +1 -1
  318. package/dist/composables/use-storage.js +1 -1
  319. package/dist/composables/use-text-selection.js +3 -1
  320. package/dist/composables/use-timer.js +1 -1
  321. package/dist/composables/use-utilities.js +1 -1
  322. package/dist/composables/use-wake-lock.js +1 -1
  323. package/dist/composables/use-websocket.js +1 -1
  324. package/dist/composables/use-window.js +1 -1
  325. package/dist/composables.js +1 -1
  326. package/dist/composition-api.js +1 -1
  327. package/dist/computed.js +1 -1
  328. package/dist/conditionals.js +1 -1
  329. package/dist/config.js +1 -1
  330. package/dist/craft-bridge.js +1 -1
  331. package/dist/craft-compiler.js +1 -1
  332. package/dist/craft-components.js +1 -1
  333. package/dist/craft-entry.js +1 -1
  334. package/dist/craft-ssr.js +1 -1
  335. package/dist/csp.js +1 -1
  336. package/dist/csrf.js +1 -1
  337. package/dist/custom-directives.js +1 -1
  338. package/dist/defer.js +1 -1
  339. package/dist/deploy/config-generators.js +1 -1
  340. package/dist/deploy/index.js +1 -1
  341. package/dist/deploy/netlify.js +1 -1
  342. package/dist/dev-server/crosswind.js +1 -1
  343. package/dist/dev-server/index.js +1 -1
  344. package/dist/dev-server/keyboard-shortcuts.js +1 -1
  345. package/dist/dev-server/native-window.js +1 -1
  346. package/dist/dev-server/port-utils.js +1 -1
  347. package/dist/dev-server/serve-app.js +1 -1
  348. package/dist/dev-server/serve-file.js +1 -1
  349. package/dist/dev-server/serve-markdown.js +1 -1
  350. package/dist/dev-server/serve-multi.js +1 -1
  351. package/dist/dev-server/terminal-colors.js +1 -1
  352. package/dist/dev-server/theme-selector.js +1 -1
  353. package/dist/dev-server/types.js +1 -1
  354. package/dist/dev-server.js +1 -1
  355. package/dist/devtools.js +1 -1
  356. package/dist/directive-api.js +1 -1
  357. package/dist/docs.js +1 -1
  358. package/dist/doctor.js +1 -1
  359. package/dist/document-shell.js +1 -1
  360. package/dist/dynamic-components.js +1 -1
  361. package/dist/edge-runtime.js +1 -1
  362. package/dist/env.js +1 -1
  363. package/dist/error-boundaries.js +1 -1
  364. package/dist/error-handling.js +1 -1
  365. package/dist/errors/codes.js +1 -1
  366. package/dist/errors/formatter.js +1 -1
  367. package/dist/errors/index.js +1 -1
  368. package/dist/errors/logger.js +1 -1
  369. package/dist/errors/sanitizer.js +1 -1
  370. package/dist/errors/types.js +1 -1
  371. package/dist/events.js +1 -1
  372. package/dist/expressions.js +1 -1
  373. package/dist/formatter.js +1 -1
  374. package/dist/forms-validation.js +1 -1
  375. package/dist/forms.js +1 -1
  376. package/dist/head.js +1 -1
  377. package/dist/heatmap.js +1 -1
  378. package/dist/hot-reload.js +1 -1
  379. package/dist/html-masking.js +1 -1
  380. package/dist/hydration-runtime.js +1 -1
  381. package/dist/hydration.js +1 -1
  382. package/dist/i18n.js +1 -1
  383. package/dist/image-optimization/auto-sibling.js +1 -1
  384. package/dist/image-optimization/build-plugin.js +1 -1
  385. package/dist/image-optimization/component.js +1 -1
  386. package/dist/image-optimization/directive.js +1 -1
  387. package/dist/image-optimization/index.js +1 -1
  388. package/dist/image-optimization/processor.js +1 -1
  389. package/dist/image-optimization/serve.js +1 -1
  390. package/dist/includes.js +1 -1
  391. package/dist/index.js +1 -1
  392. package/dist/init.js +1 -1
  393. package/dist/inline-assets.js +1 -1
  394. package/dist/interactive.js +1 -1
  395. package/dist/internal-markdown.js +1 -1
  396. package/dist/island-chunking.js +1 -1
  397. package/dist/js-ts.js +1 -1
  398. package/dist/jsx-runtime.js +1 -1
  399. package/dist/keep-alive.js +1 -1
  400. package/dist/lazy-loader.js +1 -1
  401. package/dist/loading-indicator.js +1 -1
  402. package/dist/loops.js +1 -1
  403. package/dist/manifest.js +1 -1
  404. package/dist/markdown.js +1 -1
  405. package/dist/media/client/blur-up.js +1 -1
  406. package/dist/media/client/index.js +1 -1
  407. package/dist/media/client/lazy-load.js +1 -1
  408. package/dist/media/client/upload-handler.js +1 -1
  409. package/dist/media/image/component.js +1 -1
  410. package/dist/media/image/directive.js +1 -1
  411. package/dist/media/image/editing.js +1 -1
  412. package/dist/media/image/index.js +1 -1
  413. package/dist/media/image/placeholder.js +1 -1
  414. package/dist/media/image/processor/cache.js +1 -1
  415. package/dist/media/image/processor/index.js +1 -1
  416. package/dist/media/image/processor/optimizer.js +1 -1
  417. package/dist/media/image/processor/responsive.js +1 -1
  418. package/dist/media/image/srcset.js +1 -1
  419. package/dist/media/index.js +1 -1
  420. package/dist/media/manager/embed.js +1 -1
  421. package/dist/media/protected/component.js +1 -1
  422. package/dist/media/protected/index.js +1 -1
  423. package/dist/media/protected/signature.js +1 -1
  424. package/dist/media/shared/cache.js +1 -1
  425. package/dist/media/shared/hash.js +1 -1
  426. package/dist/media/shared/index.js +1 -1
  427. package/dist/media/upload/component.js +1 -1
  428. package/dist/media/upload/index.js +1 -1
  429. package/dist/media/video/directive.js +1 -1
  430. package/dist/media/video/index.js +1 -1
  431. package/dist/media/video/processor/cache.js +1 -1
  432. package/dist/media/video/processor/index.js +1 -1
  433. package/dist/media/video/processor/streaming.js +1 -1
  434. package/dist/media/video/processor/thumbnail.js +1 -1
  435. package/dist/media/video/processor/transcoder.js +1 -1
  436. package/dist/method-spoofing.js +1 -1
  437. package/dist/middleware.js +1 -1
  438. package/dist/misc-directives.js +1 -1
  439. package/dist/native-build.js +1 -1
  440. package/dist/parser/directive-parser.js +1 -1
  441. package/dist/parser/expression-parser.js +1 -1
  442. package/dist/parser/index.js +1 -1
  443. package/dist/parser/tokenizer.js +1 -1
  444. package/dist/partial-hydration.js +1 -1
  445. package/dist/performance-utils.js +1 -1
  446. package/dist/placeholder.js +1 -1
  447. package/dist/plugin-system.js +1 -1
  448. package/dist/plugin.js +1 -1
  449. package/dist/precompiler.js +1 -1
  450. package/dist/process.js +1 -1
  451. package/dist/production-build.js +1 -1
  452. package/dist/production-builder.js +1 -1
  453. package/dist/production-server.js +1 -1
  454. package/dist/props.js +1 -1
  455. package/dist/public-env.js +1 -1
  456. package/dist/pwa/audit.js +1 -1
  457. package/dist/pwa/directives.js +1 -1
  458. package/dist/pwa/icons.js +1 -1
  459. package/dist/pwa/index.js +1 -1
  460. package/dist/pwa/inject.js +1 -1
  461. package/dist/pwa/manifest.js +1 -1
  462. package/dist/pwa/offline.js +1 -1
  463. package/dist/pwa/precache.js +1 -1
  464. package/dist/pwa/service-worker.js +1 -1
  465. package/dist/pwa/workbox-strategies.js +1 -1
  466. package/dist/pwa/workbox.js +1 -1
  467. package/dist/pwa.js +426 -426
  468. package/dist/reactive-bindings.js +1 -1
  469. package/dist/reactive.js +1 -1
  470. package/dist/reactivity.js +1 -1
  471. package/dist/release.js +1 -1
  472. package/dist/render.js +1 -1
  473. package/dist/route-middleware.js +1 -1
  474. package/dist/router.js +1 -1
  475. package/dist/routes.js +1 -1
  476. package/dist/runtime-injection.js +1 -1
  477. package/dist/runtime.js +1 -1
  478. package/dist/safe-evaluator.js +1 -1
  479. package/dist/scaffolding.js +1 -1
  480. package/dist/screenshot.js +1 -1
  481. package/dist/script-classifier.js +1 -1
  482. package/dist/script-validation.js +1 -1
  483. package/dist/seo.js +1 -1
  484. package/dist/serve.js +1 -1
  485. package/dist/server-bindings.js +1 -1
  486. package/dist/server-components.js +1 -1
  487. package/dist/signal-processing.js +1 -1
  488. package/dist/signals-api.js +1 -1
  489. package/dist/signals.js +1 -1
  490. package/dist/site-builder/build.js +1 -1
  491. package/dist/site-builder/i18n.js +1 -1
  492. package/dist/site-builder/index.js +1 -1
  493. package/dist/site-builder/robots.js +1 -1
  494. package/dist/site-builder/router.js +1 -1
  495. package/dist/site-builder/seo.js +1 -1
  496. package/dist/site-builder/sitemap.js +1 -1
  497. package/dist/site-builder/theme.js +1 -1
  498. package/dist/slots.js +1 -1
  499. package/dist/source-maps.js +1 -1
  500. package/dist/spa-shell.js +1 -1
  501. package/dist/ssg.js +388 -388
  502. package/dist/ssr.js +1 -1
  503. package/dist/state-management.js +1 -1
  504. package/dist/store-imports.js +1 -1
  505. package/dist/store-loader.js +1 -1
  506. package/dist/stores-client.js +1 -1
  507. package/dist/story/addons.js +1 -1
  508. package/dist/story/analytics.js +1 -1
  509. package/dist/story/auto-stories.js +1 -1
  510. package/dist/story/bookmarks.js +1 -1
  511. package/dist/story/bun-test.js +1 -1
  512. package/dist/story/cli.js +1 -1
  513. package/dist/story/collect/analyzer.js +1 -1
  514. package/dist/story/collect/index.js +1 -1
  515. package/dist/story/collect/parser.js +1 -1
  516. package/dist/story/collect/scanner.js +1 -1
  517. package/dist/story/collect/tree.js +1 -1
  518. package/dist/story/commands/build.js +1 -1
  519. package/dist/story/commands/dev.js +1 -1
  520. package/dist/story/commands/index.js +1 -1
  521. package/dist/story/commands/preview.js +1 -1
  522. package/dist/story/compiled-output.js +1 -1
  523. package/dist/story/composition.js +1 -1
  524. package/dist/story/config-watcher.js +1 -1
  525. package/dist/story/config.js +1 -1
  526. package/dist/story/context.js +1 -1
  527. package/dist/story/controls/index.js +1 -1
  528. package/dist/story/crosswind.js +1 -1
  529. package/dist/story/desktop-preview.js +1 -1
  530. package/dist/story/docs-generator.js +1 -1
  531. package/dist/story/errors.js +1 -1
  532. package/dist/story/figma-export.js +1 -1
  533. package/dist/story/generator.js +1 -1
  534. package/dist/story/hmr.js +1 -1
  535. package/dist/story/hot-swap.js +1 -1
  536. package/dist/story/index.js +1 -1
  537. package/dist/story/interactions.js +1 -1
  538. package/dist/story/keyboard-shortcuts.js +1 -1
  539. package/dist/story/output.js +1 -1
  540. package/dist/story/performance.js +1 -1
  541. package/dist/story/presets.js +1 -1
  542. package/dist/story/props-validation.js +1 -1
  543. package/dist/story/renderer.js +1 -1
  544. package/dist/story/search-index.js +1 -1
  545. package/dist/story/search.js +1 -1
  546. package/dist/story/server.js +1 -1
  547. package/dist/story/setup.js +1 -1
  548. package/dist/story/snapshots.js +1 -1
  549. package/dist/story/testing.js +1 -1
  550. package/dist/story/theme.js +1 -1
  551. package/dist/story/ui/code-panel.js +1 -1
  552. package/dist/story/ui/controls-panel.js +1 -1
  553. package/dist/story/ui/index.js +1 -1
  554. package/dist/story/ui/navigation.js +1 -1
  555. package/dist/story/ui/preview.js +1 -1
  556. package/dist/story/visual-testing.js +1 -1
  557. package/dist/streaming.js +1 -1
  558. package/dist/strict-lint.js +1 -1
  559. package/dist/style-scoping.js +1 -1
  560. package/dist/suspense.js +1 -1
  561. package/dist/teleport.js +1 -1
  562. package/dist/template-compiler.js +1 -1
  563. package/dist/template-hydrator.js +1 -1
  564. package/dist/template-tag-balance.js +1 -1
  565. package/dist/testing.js +1 -1
  566. package/dist/transitions.js +1 -1
  567. package/dist/type-checker.js +1 -1
  568. package/dist/types/directive-types.js +1 -1
  569. package/dist/types/index.js +1 -1
  570. package/dist/types.js +1 -1
  571. package/dist/typescript-templates.js +1 -1
  572. package/dist/utils.js +1 -1
  573. package/dist/validator.js +1 -1
  574. package/dist/variable-extractor.js +1 -1
  575. package/dist/view-composers.js +1 -1
  576. package/dist/virtual-scrolling.js +1 -1
  577. package/dist/visual-editor.js +1 -1
  578. package/dist/vue-template.js +1 -1
  579. package/dist/web-components/css-scoping.js +1 -1
  580. package/dist/web-components/index.js +1 -1
  581. package/dist/web-components/reactive-generator.js +418 -1
  582. package/dist/web-components.js +1 -1
  583. package/dist/x-element.js +1 -1
  584. package/package.json +8 -7
  585. package/dist/chunk-0fmsckh1.js +0 -420
  586. package/dist/chunk-2t4gywvz.js +0 -3
  587. package/dist/chunk-2yw4e0h0.js +0 -3
  588. package/dist/chunk-32ka7sdc.js +0 -1
  589. package/dist/chunk-36jjen8k.js +0 -3
  590. package/dist/chunk-37q6x951.js +0 -3
  591. package/dist/chunk-3c7q2vbq.js +0 -3
  592. package/dist/chunk-3tk0sr6m.js +0 -3
  593. package/dist/chunk-5kjk30re.js +0 -3
  594. package/dist/chunk-6x5p7rhz.js +0 -3
  595. package/dist/chunk-73x9a59t.js +0 -3
  596. package/dist/chunk-9a7ce9v1.js +0 -3
  597. package/dist/chunk-9njgv29x.js +0 -3
  598. package/dist/chunk-9zkb2dsx.js +0 -3
  599. package/dist/chunk-bs7qttx8.js +0 -3
  600. package/dist/chunk-bxp8ps0f.js +0 -5
  601. package/dist/chunk-cnchhkk2.js +0 -3
  602. package/dist/chunk-cwjdwzn3.js +0 -3
  603. package/dist/chunk-d3at6tp3.js +0 -1
  604. package/dist/chunk-egn85zmj.js +0 -3
  605. package/dist/chunk-fcrwjh47.js +0 -3
  606. package/dist/chunk-ftq6q3nx.js +0 -3
  607. package/dist/chunk-fxfmwbny.js +0 -3
  608. package/dist/chunk-h4k5wnbf.js +0 -3
  609. package/dist/chunk-kde1c2d4.js +0 -3
  610. package/dist/chunk-mf35r5h2.js +0 -3
  611. package/dist/chunk-mz4petzg.js +0 -3
  612. package/dist/chunk-qpg9jdqb.js +0 -3
  613. package/dist/chunk-r5rx348z.js +0 -3
  614. package/dist/chunk-rs2ejj8f.js +0 -3
  615. package/dist/chunk-s7fg0jy2.js +0 -3
  616. package/dist/chunk-s9hpp0gd.js +0 -3
  617. package/dist/chunk-sajzecge.js +0 -3
  618. package/dist/chunk-sfp05afy.js +0 -3
  619. package/dist/chunk-srq3dkj8.js +0 -3
  620. package/dist/chunk-sydw4nm4.js +0 -3
  621. package/dist/chunk-t6z4b0x6.js +0 -3
  622. package/dist/chunk-wh2szb9t.js +0 -3
  623. package/dist/chunk-xzjrrd36.js +0 -1
  624. package/dist/chunk-zx35qm5v.js +0 -3
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import{Broadcast as D,BroadcastServer as U}from"ts-broadcasting";import{channel as b}from"ts-broadcasting";import{Broadcast as N,BroadcastServer as p}from"ts-broadcasting";var z=null,H=[];function X(){return z}async function Y(j){if(z)return z;let k=j.driver??"bun",q=j.host??"0.0.0.0",G=j.port??6001,J=j.scheme??"ws",E={verbose:j.verbose??!1,driver:k,default:k,connections:{[k]:{driver:k,host:q,port:G,scheme:J}}};return z=new U(E),D.setServer(z),await z.start(),z}async function Z(){for(let j of H)clearInterval(j);if(H.length=0,!z)return;await z.stop(),z=null}async function $(j){let k=await import(j),q=k.default??k;if(typeof q!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof q}`);let G=0;return q({channel(E,A){if(G++,A.authorize&&z)z.channels.channel(E,A.authorize);if(A.interval&&A.data){let L=A.event??`${E}.updated`,M=A.data,Q=setInterval(async()=>{try{let T=await M();V(E,L,T)}catch{}},A.interval);H.push(Q)}}}),G}var K=!1;function F(){if(z)return!0;if(!K)K=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function V(j,k,q){if(!F())return;D.send(j,k,q)}function x(j,k,q){if(!F())return;D.toUser(j,k,q)}function C(j,k,q){if(!F())return;D.toUsers(j,k,q)}function S(j,k,q){if(!F())return;D.send(`private-${j}`,k,q)}function w(j,k,q){if(!F())return;D.presence(j,k,q)}
3
- export{X as Gs,Y as Hs,Z as Is,$ as Js,V as Ks,x as Ls,C as Ms,S as Ns,w as Os,b as Ps,N as Qs,p as Rs};
3
+ export{X as Mp,Y as Np,Z as Op,$ as Pp,V as Qp,x as Rp,C as Sp,S as Tp,w as Up,b as Vp,N as Wp,p as Xp};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{We as O,Ze as Q}from"./chunk-hdv4tnvh.js";Q();function J(j){let q=j.pwa;if(!q?.enabled)return"";let A=q.manifest,z=q.icons?.outputDir?`/${q.icons.outputDir}`:"/pwa-icons",G=O(j),C=`
2
+ import{Se as O,Ve as Q}from"./chunk-psc3wfcf.js";Q();function J(j){let q=j.pwa;if(!q?.enabled)return"";let A=q.manifest,z=q.icons?.outputDir?`/${q.icons.outputDir}`:"/pwa-icons",G=O(j),C=`
3
3
  <!-- stx PWA Meta Tags -->
4
4
  <link rel="manifest" href="/manifest.json">
5
5
  <meta name="theme-color" content="${K(A?.themeColor||"#000000")}">
@@ -58,4 +58,4 @@ if ('serviceWorker' in navigator) {
58
58
  });
59
59
  }
60
60
  </script>`}function X(){return'<link rel="manifest" href="/manifest.json">'}function Y(j){return`<meta name="theme-color" content="${K(j)}">`}function K(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}
61
- export{J as Le,U as Me,V as Ne,X as Oe,Y as Pe};
61
+ export{J as He,U as Ie,V as Je,X as Ke,Y as Le};
@@ -81,4 +81,4 @@ else {
81
81
  </div>
82
82
  ${U}
83
83
  `})}
84
- export{_ as Pn};
84
+ export{_ as Mn};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{sm as O,um as R,vm as f}from"./chunk-w4a3cvtp.js";function _(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function b(q){return`
2
+ import{pm as O,rm as R,sm as f}from"./chunk-jz73j3qs.js";function _(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function b(q){return`
3
3
  <script data-hydrate="${q}">
4
4
  (function() {
5
5
  const island = document.querySelector('[data-island="${q}"]');
@@ -228,4 +228,4 @@ else {
228
228
  ${JSON.stringify(j)}
229
229
  </script>
230
230
  `}var c={processPartialHydrationDirectives:D,processStaticDirectives:m,generatePartialHydrationCSS:H,generateIslandManifest:u,createIslandRegistry:_,hydrateIsland:h,hydrateByStrategy:S,hydrateAll:x,isHydrated:g,onHydrated:v};
231
- export{_ as gj,D as hj,H as ij,h as jj,S as kj,x as lj,g as mj,v as nj,m as oj,u as pj,c as qj};
231
+ export{_ as dj,D as ej,H as fj,h as gj,S as hj,x as ij,g as jj,v as kj,m as lj,u as mj,c as nj};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{TA as l,VA as p,XA as c,ZA as a}from"./chunk-t7ghqd7e.js";import{dB as x}from"./chunk-gcsqn7x9.js";import{FB as P}from"./chunk-jm460jxs.js";import{dC as f}from"./chunk-r6sb1sm4.js";import{jC as v,kC as m,pC as h}from"./chunk-p5j0686t.js";function o(G,K,q){let H=G,T=!0;while(T){T=!1;let $=H.match(/@switch\s*\(/);if(!$||$.index===void 0)break;let j=$.index,J=a(H,j);if(!J)break;try{let U;if(m(J.expression))U=h(J.expression,Object.keys(K))(...Object.values(K));else U=v(J.expression,K);let Y="",W=!1;for(let X of J.cases)if(X.type==="default"){if(!W)Y=X.content.trim()}else try{let F;if(X.value&&m(X.value))F=h(X.value,Object.keys(K))(...Object.values(K));else if(X.value)F=v(X.value,K);if(U===F){Y=X.content.trim(),W=!0;break}}catch{continue}H=H.substring(0,j)+Y+H.substring(J.end),T=!0}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("Switch",`Error evaluating @switch expression: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,j)+W+H.substring(J.end);break}}return H}function KH(G,K,q){let H=G;H=o(H,K,q);{let $=!0;while($){$=!1;let j=H.match(/@unless\s*\(/);if(!j||j.index===void 0)break;let J=j.index,U=l(H,J+7);if(!U)break;let Y=U.endPos,W=p(H,"unless","endunless",Y);if(W===-1){console.warn(`[stx] @unless directive at position ${J} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let X=H.slice(Y,W),F=U.expression,O=-1;{let z=0,Q=/@(?:if|unless)\s*\(/g,_=/@(?:endif|endunless)(?![a-z])/g,V=/@else(?![a-z])/g,w=[],B;while((B=Q.exec(X))!==null)w.push({pos:B.index,type:"open"});while((B=_.exec(X))!==null)w.push({pos:B.index,type:"close"});while((B=V.exec(X))!==null)w.push({pos:B.index,type:"else"});w.sort((N,L)=>N.pos-L.pos);for(let N of w)if(N.type==="open")z++;else if(N.type==="close")z--;else if(N.type==="else"&&z===0){O=N.pos;break}}let Z;if(O!==-1){let z=X.slice(0,O),Q=X.slice(O+5);Z=`@if (${F})${Q}@else ${z}@endif`}else Z=`@if (!(${F}))${X}@endif`;H=H.substring(0,J)+Z+H.substring(W+10),$=!0}}H=s(H,K,q),H=n(H,K,q),H=r(H,K);let T=()=>{let $=c(H);if($.length===0)return!1;for(let j=$.length-1;j>=0;j--){let J=$[j];try{let U="",Y=!1;for(let W of J.branches){if(Y)break;if(W.type==="else")U=W.content,Y=!0;else try{let X;if(W.condition&&m(W.condition))X=h(W.condition,Object.keys(K))(...Object.values(K));else if(W.condition)X=v(W.condition,K);if(X)U=W.content,Y=!0}catch(X){U=x(W.type==="if"?"If":"Elseif",`Error in @${W.type}(${W.condition}): ${X instanceof Error?X.message:String(X)}`,P.EVALUATION_ERROR),Y=!0}}H=H.substring(0,J.start)+U+H.substring(J.end)}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("If",`Error processing @if block: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,J.start)+W+H.substring(J.end)}}return!0};while(!0){let $=H;if(!T())break;if(H===$)break}return H}function u(G){let K=0;while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!=="(")return null;K++;while(K<G.length&&/\s/.test(G[K]))K++;let q=G[K];if(q!=="'"&&q!=='"')return null;K++;let H=[];while(K<G.length){let T=G[K];if(T==="\\"&&K+1<G.length){H.push(G[K+1]),K+=2;continue}if(T===q){K++;break}H.push(T),K++}while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!==")")return null;return K++,{value:H.join(""),consumed:K}}function r(G,K){let q=G;function H(J,U,Y,W){let X=1,F=W,O=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),Z=new RegExp(`@${Y}(?![a-z])`,"g");while(F<J.length&&X>0){O.lastIndex=F,Z.lastIndex=F;let z=O.exec(J),Q=Z.exec(J),_=z?z.index:1/0,V=Q?Q.index:1/0;if(_<V)X++,F=_+z[0].length;else if(V<1/0){if(X--,X===0)return V;F=V+Q[0].length}else break}return-1}function T(J,U,Y){let W=0,X=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),F=new RegExp(`@${Y}(?![a-z])`,"g"),O=/@else(?![a-z])/g,Z=[],z;while((z=X.exec(J))!==null)Z.push({pos:z.index,type:"open"});while((z=F.exec(J))!==null)Z.push({pos:z.index,type:"close"});while((z=O.exec(J))!==null)Z.push({pos:z.index,type:"else"});Z.sort((Q,_)=>Q.pos-_.pos);for(let Q of Z)if(Q.type==="open")W++;else if(Q.type==="close")W--;else if(Q.type==="else"&&W===0)return Q.pos;return-1}{let J=!0;while(J){J=!1;let U=q.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+5),O=u(F);if(O)W=O.value,X=Y+5+O.consumed;else X=Y+5;let Z=H(q,"auth","endauth",X);if(Z===-1){console.warn(`[stx] @auth directive at position ${Y} has no matching @endauth \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"auth","endauth"),_;if(!K.auth)_=!1;else _=W?f(`auth?.check && auth?.user?.[${W}]`,K):f("auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+8),J=!0}}{let J=!0;while(J){J=!1;let U=q.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+6),O=u(F);if(O)W=O.value,X=Y+6+O.consumed;else X=Y+6;let Z=H(q,"guest","endguest",X);if(Z===-1){console.warn(`[stx] @guest directive at position ${Y} has no matching @endguest \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"guest","endguest"),_;if(!K.auth)_=!0;else _=W?f(`!auth?.check || !auth?.user?.[${W}]`,K):f("!auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+9),J=!0}}function $(J,U,Y){if(K.userCan&&typeof K.userCan[J]==="boolean")return K.userCan[J];if(K.permissions?.check&&typeof K.permissions.check==="function")try{let W=[J];if(U)W.push(U);if(Y){let X=f(Y,K);W.push(X)}return K.permissions.check(...W)}catch{return!1}return!1}function j(J){let U=J.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!U)return null;return{ability:U[1],type:U[2],id:U[3]?.trim(),paramsEnd:U[0].length}}for(let J of["can","cannot"]){let U=`end${J}`,Y=J==="can"?"elsecan":"elsecannot",W=!0;while(W){W=!1;let X=q.match(new RegExp(`@${J}\\s*\\(`));if(!X||X.index===void 0)break;let F=X.index,O=q.slice(F+`@${J}`.length),Z=j(O);if(!Z)break;let z=F+`@${J}`.length+Z.paramsEnd,Q=H(q,J,U,z);if(Q===-1){console.warn(`[stx] @${J} directive at position ${F} has no matching @${U} \u2014 the block was skipped.`);break}let _=q.slice(z,Q),V=[],w=0,B=new RegExp(`@${J}\\s*\\(`,"g"),N=new RegExp(`@${U}(?![a-z])`,"g"),L=new RegExp(`@${Y}\\s*\\(`,"g"),D=/@else(?![a-z])/g,M=[],k;while((k=B.exec(_))!==null)M.push({pos:k.index,type:"open"});while((k=N.exec(_))!==null)M.push({pos:k.index,type:"close"});while((k=L.exec(_))!==null)M.push({pos:k.index,type:"elseDirective"});while((k=D.exec(_))!==null)M.push({pos:k.index,type:"else"});M.sort((A,I)=>A.pos-I.pos);for(let A of M){if(A.type==="open"){w++;continue}if(A.type==="close"){w--;continue}if(w===0)V.push(A)}let R=[],b=0;for(let A=0;A<V.length;A++){let I=V[A];if(R.push({content:_.slice(b,I.pos),ability:void 0}),I.type==="elseDirective"){let C=_.slice(I.pos+`@${Y}`.length),E=j(C);if(E){R[R.length-1]={content:_.slice(b,I.pos)},b=I.pos+`@${Y}`.length+E.paramsEnd,R.push({content:"",ability:E.ability,type:E.type,id:E.id}),R.pop();let d=V[A+1],i=d?d.pos:_.length;R.push({content:_.slice(b,i),ability:E.ability,type:E.type,id:E.id}),b=i}}else b=I.pos+5}if(b<_.length){let A=R[R.length-1];if(V.length>0&&V[V.length-1].type==="else")R.push({content:_.slice(b),isFinalElse:!0});else if(R.length===0)R.push({content:_.slice(b)})}let y=$(Z.ability,Z.type,Z.id),S=J==="can"?y:!y,g="";if(S)g=R[0]?.content||"";else{let A=!1;for(let I=1;I<R.length;I++){let C=R[I];if(C.isFinalElse){g=C.content,A=!0;break}if(C.ability){let E=$(C.ability,C.type,C.id);if(J==="can"?E:!E){g=C.content,A=!0;break}}}if(!A&&R.length>0){let I=R[R.length-1];if(I.isFinalElse)g=I.content}}q=q.substring(0,F)+g+q.substring(Q+`@${U}`.length),W=!0}}return q}function s(G,K,q){let H=G;function T($,j,J,U,Y){let W=!0;while(W){W=!1;let X=new RegExp(`@${j}\\s*\\(`),F=$.match(X);if(!F||F.index===void 0)break;let O=F.index,Z=l($,O+`@${j}`.length);if(!Z)break;let z=Z.endPos,Q=p($,j,J,z);if(Q===-1){console.warn(`[stx] @${j} directive at position ${O} has no matching @${J} \u2014 the block was skipped.`);break}let _=$.slice(z,Q),V=Z.expression,w=-1,B=0,N=0;while(N<_.length){let L=_.indexOf("@",N);if(L===-1)break;let D=_.substring(L);if(/^@(?:if|unless|isset|empty)\s*\(/.test(D)){B++,N=L+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(D)){B--,N=L+1;continue}if(B===0&&/^@else(?![a-z])/.test(D)){w=L;break}N=L+1}try{let L=U(V.trim()),D;if(w!==-1){let M=_.slice(0,w),k=_.slice(w+5);D=L?M:k}else D=L?_:"";$=$.substring(0,O)+D+$.substring(Q+`@${J}`.length),W=!0}catch(L){let D=L instanceof Error?L.message:String(L),M=x(Y,`Error processing @${j} directive: ${D}`,P.EVALUATION_ERROR);$=$.substring(0,O)+M+$.substring(Q+`@${J}`.length);break}}return $}return H=T(H,"isset","endisset",($)=>{let j=f($,K);return j!==void 0&&j!==null},"Isset"),H=T(H,"empty","endempty",($)=>{let j=f($,K);return j===void 0||j===null||j===""||j===0||j===!1||Array.isArray(j)&&j.length===0||typeof j==="object"&&j!==null&&Object.keys(j).length===0},"Empty"),H}function n(G,K,q){let H=G,T="development";function $(j,J,U,Y){let W=new RegExp(`@${J}(?![a-z])`,"g"),X=new RegExp(`@${U}(?![a-z])`,"g"),F=new RegExp(`^@${J}(?![a-z])`),O=new RegExp(`^@${U}(?![a-z])`),Z=j,z=!0;while(z){z=!1,W.lastIndex=0;let Q=W.exec(Z);if(!Q)break;let _=Q.index,V=_+Q[0].length;if(J==="env"){let y=Z.substring(V).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!y)break;V+=y[0].length,Y=T===y[2]}let w=1,B=V,N=-1;while(w>0&&B<Z.length){W.lastIndex=B,X.lastIndex=B;let y=W.exec(Z),S=X.exec(Z),g=y?y.index:1/0,A=S?S.index:1/0;if(g<A)w++,B=g+y[0].length;else if(A<1/0){if(w--,w===0){N=A;break}B=A+S[0].length}else break}if(N===-1){console.warn(`[stx] @${J} directive at position ${_} has no matching @${U} \u2014 the block was skipped.`);break}let L=Z.substring(V,N),D=-1,M=0,k=0;while(k<L.length){let y=L.indexOf("@",k);if(y===-1)break;let S=L.substring(y);if(F.test(S)){M++,k=y+1;continue}if(O.test(S)){M--,k=y+1;continue}if(M===0&&/^@else(?![a-z])/.test(S)){D=y;break}k=y+1}let R;if(D!==-1){let y=L.slice(0,D),S=L.slice(D+5);R=Y?y:S}else R=Y?L:"";let b=`@${U}`.length;Z=Z.substring(0,_)+R+Z.substring(N+b),z=!0}return Z}return H=$(H,"env","endenv",!1),H=$(H,"production","endproduction",T==="production"),H=$(H,"development","enddevelopment",T==="development"),H=$(H,"staging","endstaging",T==="staging"),H=$(H,"testing","endtesting",T==="testing"),H}
3
- export{o as JA,KH as KA,r as LA,s as MA,n as NA};
2
+ import{$x as p,Zx as l,by as c,dy as a}from"./chunk-r5m9xtm7.js";import{py as x}from"./chunk-zen6ax1y.js";import{Ry as P}from"./chunk-27zsyhrd.js";import{jz as f}from"./chunk-qvrbjpdc.js";import{pz as v,qz as m,vz as h}from"./chunk-w3b6m427.js";function o(G,K,q){let H=G,T=!0;while(T){T=!1;let $=H.match(/@switch\s*\(/);if(!$||$.index===void 0)break;let j=$.index,J=a(H,j);if(!J)break;try{let U;if(m(J.expression))U=h(J.expression,Object.keys(K))(...Object.values(K));else U=v(J.expression,K);let Y="",W=!1;for(let X of J.cases)if(X.type==="default"){if(!W)Y=X.content.trim()}else try{let F;if(X.value&&m(X.value))F=h(X.value,Object.keys(K))(...Object.values(K));else if(X.value)F=v(X.value,K);if(U===F){Y=X.content.trim(),W=!0;break}}catch{continue}H=H.substring(0,j)+Y+H.substring(J.end),T=!0}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("Switch",`Error evaluating @switch expression: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,j)+W+H.substring(J.end);break}}return H}function KH(G,K,q){let H=G;H=o(H,K,q);{let $=!0;while($){$=!1;let j=H.match(/@unless\s*\(/);if(!j||j.index===void 0)break;let J=j.index,U=l(H,J+7);if(!U)break;let Y=U.endPos,W=p(H,"unless","endunless",Y);if(W===-1){console.warn(`[stx] @unless directive at position ${J} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let X=H.slice(Y,W),F=U.expression,O=-1;{let z=0,Q=/@(?:if|unless)\s*\(/g,_=/@(?:endif|endunless)(?![a-z])/g,V=/@else(?![a-z])/g,w=[],B;while((B=Q.exec(X))!==null)w.push({pos:B.index,type:"open"});while((B=_.exec(X))!==null)w.push({pos:B.index,type:"close"});while((B=V.exec(X))!==null)w.push({pos:B.index,type:"else"});w.sort((N,L)=>N.pos-L.pos);for(let N of w)if(N.type==="open")z++;else if(N.type==="close")z--;else if(N.type==="else"&&z===0){O=N.pos;break}}let Z;if(O!==-1){let z=X.slice(0,O),Q=X.slice(O+5);Z=`@if (${F})${Q}@else ${z}@endif`}else Z=`@if (!(${F}))${X}@endif`;H=H.substring(0,J)+Z+H.substring(W+10),$=!0}}H=s(H,K,q),H=n(H,K,q),H=r(H,K);let T=()=>{let $=c(H);if($.length===0)return!1;for(let j=$.length-1;j>=0;j--){let J=$[j];try{let U="",Y=!1;for(let W of J.branches){if(Y)break;if(W.type==="else")U=W.content,Y=!0;else try{let X;if(W.condition&&m(W.condition))X=h(W.condition,Object.keys(K))(...Object.values(K));else if(W.condition)X=v(W.condition,K);if(X)U=W.content,Y=!0}catch(X){U=x(W.type==="if"?"If":"Elseif",`Error in @${W.type}(${W.condition}): ${X instanceof Error?X.message:String(X)}`,P.EVALUATION_ERROR),Y=!0}}H=H.substring(0,J.start)+U+H.substring(J.end)}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("If",`Error processing @if block: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,J.start)+W+H.substring(J.end)}}return!0};while(!0){let $=H;if(!T())break;if(H===$)break}return H}function u(G){let K=0;while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!=="(")return null;K++;while(K<G.length&&/\s/.test(G[K]))K++;let q=G[K];if(q!=="'"&&q!=='"')return null;K++;let H=[];while(K<G.length){let T=G[K];if(T==="\\"&&K+1<G.length){H.push(G[K+1]),K+=2;continue}if(T===q){K++;break}H.push(T),K++}while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!==")")return null;return K++,{value:H.join(""),consumed:K}}function r(G,K){let q=G;function H(J,U,Y,W){let X=1,F=W,O=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),Z=new RegExp(`@${Y}(?![a-z])`,"g");while(F<J.length&&X>0){O.lastIndex=F,Z.lastIndex=F;let z=O.exec(J),Q=Z.exec(J),_=z?z.index:1/0,V=Q?Q.index:1/0;if(_<V)X++,F=_+z[0].length;else if(V<1/0){if(X--,X===0)return V;F=V+Q[0].length}else break}return-1}function T(J,U,Y){let W=0,X=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),F=new RegExp(`@${Y}(?![a-z])`,"g"),O=/@else(?![a-z])/g,Z=[],z;while((z=X.exec(J))!==null)Z.push({pos:z.index,type:"open"});while((z=F.exec(J))!==null)Z.push({pos:z.index,type:"close"});while((z=O.exec(J))!==null)Z.push({pos:z.index,type:"else"});Z.sort((Q,_)=>Q.pos-_.pos);for(let Q of Z)if(Q.type==="open")W++;else if(Q.type==="close")W--;else if(Q.type==="else"&&W===0)return Q.pos;return-1}{let J=!0;while(J){J=!1;let U=q.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+5),O=u(F);if(O)W=O.value,X=Y+5+O.consumed;else X=Y+5;let Z=H(q,"auth","endauth",X);if(Z===-1){console.warn(`[stx] @auth directive at position ${Y} has no matching @endauth \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"auth","endauth"),_;if(!K.auth)_=!1;else _=W?f(`auth?.check && auth?.user?.[${W}]`,K):f("auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+8),J=!0}}{let J=!0;while(J){J=!1;let U=q.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+6),O=u(F);if(O)W=O.value,X=Y+6+O.consumed;else X=Y+6;let Z=H(q,"guest","endguest",X);if(Z===-1){console.warn(`[stx] @guest directive at position ${Y} has no matching @endguest \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"guest","endguest"),_;if(!K.auth)_=!0;else _=W?f(`!auth?.check || !auth?.user?.[${W}]`,K):f("!auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+9),J=!0}}function $(J,U,Y){if(K.userCan&&typeof K.userCan[J]==="boolean")return K.userCan[J];if(K.permissions?.check&&typeof K.permissions.check==="function")try{let W=[J];if(U)W.push(U);if(Y){let X=f(Y,K);W.push(X)}return K.permissions.check(...W)}catch{return!1}return!1}function j(J){let U=J.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!U)return null;return{ability:U[1],type:U[2],id:U[3]?.trim(),paramsEnd:U[0].length}}for(let J of["can","cannot"]){let U=`end${J}`,Y=J==="can"?"elsecan":"elsecannot",W=!0;while(W){W=!1;let X=q.match(new RegExp(`@${J}\\s*\\(`));if(!X||X.index===void 0)break;let F=X.index,O=q.slice(F+`@${J}`.length),Z=j(O);if(!Z)break;let z=F+`@${J}`.length+Z.paramsEnd,Q=H(q,J,U,z);if(Q===-1){console.warn(`[stx] @${J} directive at position ${F} has no matching @${U} \u2014 the block was skipped.`);break}let _=q.slice(z,Q),V=[],w=0,B=new RegExp(`@${J}\\s*\\(`,"g"),N=new RegExp(`@${U}(?![a-z])`,"g"),L=new RegExp(`@${Y}\\s*\\(`,"g"),D=/@else(?![a-z])/g,M=[],k;while((k=B.exec(_))!==null)M.push({pos:k.index,type:"open"});while((k=N.exec(_))!==null)M.push({pos:k.index,type:"close"});while((k=L.exec(_))!==null)M.push({pos:k.index,type:"elseDirective"});while((k=D.exec(_))!==null)M.push({pos:k.index,type:"else"});M.sort((A,I)=>A.pos-I.pos);for(let A of M){if(A.type==="open"){w++;continue}if(A.type==="close"){w--;continue}if(w===0)V.push(A)}let R=[],b=0;for(let A=0;A<V.length;A++){let I=V[A];if(R.push({content:_.slice(b,I.pos),ability:void 0}),I.type==="elseDirective"){let C=_.slice(I.pos+`@${Y}`.length),E=j(C);if(E){R[R.length-1]={content:_.slice(b,I.pos)},b=I.pos+`@${Y}`.length+E.paramsEnd,R.push({content:"",ability:E.ability,type:E.type,id:E.id}),R.pop();let d=V[A+1],i=d?d.pos:_.length;R.push({content:_.slice(b,i),ability:E.ability,type:E.type,id:E.id}),b=i}}else b=I.pos+5}if(b<_.length){let A=R[R.length-1];if(V.length>0&&V[V.length-1].type==="else")R.push({content:_.slice(b),isFinalElse:!0});else if(R.length===0)R.push({content:_.slice(b)})}let y=$(Z.ability,Z.type,Z.id),S=J==="can"?y:!y,g="";if(S)g=R[0]?.content||"";else{let A=!1;for(let I=1;I<R.length;I++){let C=R[I];if(C.isFinalElse){g=C.content,A=!0;break}if(C.ability){let E=$(C.ability,C.type,C.id);if(J==="can"?E:!E){g=C.content,A=!0;break}}}if(!A&&R.length>0){let I=R[R.length-1];if(I.isFinalElse)g=I.content}}q=q.substring(0,F)+g+q.substring(Q+`@${U}`.length),W=!0}}return q}function s(G,K,q){let H=G;function T($,j,J,U,Y){let W=!0;while(W){W=!1;let X=new RegExp(`@${j}\\s*\\(`),F=$.match(X);if(!F||F.index===void 0)break;let O=F.index,Z=l($,O+`@${j}`.length);if(!Z)break;let z=Z.endPos,Q=p($,j,J,z);if(Q===-1){console.warn(`[stx] @${j} directive at position ${O} has no matching @${J} \u2014 the block was skipped.`);break}let _=$.slice(z,Q),V=Z.expression,w=-1,B=0,N=0;while(N<_.length){let L=_.indexOf("@",N);if(L===-1)break;let D=_.substring(L);if(/^@(?:if|unless|isset|empty)\s*\(/.test(D)){B++,N=L+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(D)){B--,N=L+1;continue}if(B===0&&/^@else(?![a-z])/.test(D)){w=L;break}N=L+1}try{let L=U(V.trim()),D;if(w!==-1){let M=_.slice(0,w),k=_.slice(w+5);D=L?M:k}else D=L?_:"";$=$.substring(0,O)+D+$.substring(Q+`@${J}`.length),W=!0}catch(L){let D=L instanceof Error?L.message:String(L),M=x(Y,`Error processing @${j} directive: ${D}`,P.EVALUATION_ERROR);$=$.substring(0,O)+M+$.substring(Q+`@${J}`.length);break}}return $}return H=T(H,"isset","endisset",($)=>{let j=f($,K);return j!==void 0&&j!==null},"Isset"),H=T(H,"empty","endempty",($)=>{let j=f($,K);return j===void 0||j===null||j===""||j===0||j===!1||Array.isArray(j)&&j.length===0||typeof j==="object"&&j!==null&&Object.keys(j).length===0},"Empty"),H}function n(G,K,q){let H=G,T="development";function $(j,J,U,Y){let W=new RegExp(`@${J}(?![a-z])`,"g"),X=new RegExp(`@${U}(?![a-z])`,"g"),F=new RegExp(`^@${J}(?![a-z])`),O=new RegExp(`^@${U}(?![a-z])`),Z=j,z=!0;while(z){z=!1,W.lastIndex=0;let Q=W.exec(Z);if(!Q)break;let _=Q.index,V=_+Q[0].length;if(J==="env"){let y=Z.substring(V).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!y)break;V+=y[0].length,Y=T===y[2]}let w=1,B=V,N=-1;while(w>0&&B<Z.length){W.lastIndex=B,X.lastIndex=B;let y=W.exec(Z),S=X.exec(Z),g=y?y.index:1/0,A=S?S.index:1/0;if(g<A)w++,B=g+y[0].length;else if(A<1/0){if(w--,w===0){N=A;break}B=A+S[0].length}else break}if(N===-1){console.warn(`[stx] @${J} directive at position ${_} has no matching @${U} \u2014 the block was skipped.`);break}let L=Z.substring(V,N),D=-1,M=0,k=0;while(k<L.length){let y=L.indexOf("@",k);if(y===-1)break;let S=L.substring(y);if(F.test(S)){M++,k=y+1;continue}if(O.test(S)){M--,k=y+1;continue}if(M===0&&/^@else(?![a-z])/.test(S)){D=y;break}k=y+1}let R;if(D!==-1){let y=L.slice(0,D),S=L.slice(D+5);R=Y?y:S}else R=Y?L:"";let b=`@${U}`.length;Z=Z.substring(0,_)+R+Z.substring(N+b),z=!0}return Z}return H=$(H,"env","endenv",!1),H=$(H,"production","endproduction",T==="production"),H=$(H,"development","enddevelopment",T==="development"),H=$(H,"staging","endstaging",T==="staging"),H=$(H,"testing","endtesting",T==="testing"),H}
3
+ export{o as Px,KH as Qx,r as Rx,s as Sx,n as Tx};
@@ -33,4 +33,4 @@ ${Y}`}),q=q.replace(/(<\/[^>]+>)(?=<|$)/g,(w,W,Y,X)=>{let Z=X.substring(Math.max
33
33
  `),w=[],W=0,Y=!1,X=q.useTabs?"\t":" ".repeat(q.indentSize);for(let Z=0;Z<j.length;Z++){let V=j[Z],G=V.trim();if(G===""){w.push("");continue}let H=G.match(/<script\b/i),z=G.match(/<\/script>/i);if(Y&&!z){w.push(V);continue}let J=G===">";if(_(G)&&!G.startsWith("<")&&!G.startsWith("@")){w.push(X.repeat(W)+G);continue}let R=G.startsWith("@end"),$=G.startsWith("@else")||G.startsWith("@elseif"),F=G.startsWith("@")&&x(G),y=G.startsWith("<!DOCTYPE")||G.startsWith("<!doctype"),A=G.startsWith("<!--"),U=G.startsWith("</"),B=G.startsWith("<")&&!U&&!A&&!y,k=G.includes("/>")||S(G),E=_(G);if(U||R)W=Math.max(0,W-1);let M=$?Math.max(0,W-1):W;if(J)w.push(V);else w.push(X.repeat(M)+G);if(B&&!k&&!E&&!J||F)W++;if(H)Y=!0;if(z)Y=!1}return w.join(`
34
34
  `)}function N(K,q){if(K=K.replace(/@(if|elseif|foreach|for|while)\s*\(\s*([^)]+)\s*\)/g,(Q,j,w)=>{let W=w.trim().replace(/\s+/g," ");return`@${j}(${W})`}),K=K.replace(/@(csrf|method)\s*\(\s*([^)]*)\s*\)/g,(Q,j,w)=>{if(w.trim()==="")return`@${j}`;return`@${j}(${w.trim()})`}),q.normalizeWhitespace)K=K.replace(/\{\{\s*([^}]+)\s*\}\}/g,(Q,j)=>{return`{{ ${j.trim()} }}`}),K=K.replace(/\{!!\s*([^!]+)\s*!!\}/g,(Q,j)=>{return`{!! ${j.trim()} !!}`});return K}function S(K){let q=["br","hr","img","input","meta","link","area","base","col","embed","source","track","wbr"];if(K.includes("/>"))return!0;let Q=K.match(/<(\w+)/);if(Q){let j=Q[1];return q.includes(j.toLowerCase())}return!1}function _(K){return/<(\w+)(?:\s[^>]*)?>[\s\S]*?<\/\1>/.test(K)}function x(K){let q=["if","unless","foreach","for","while","section","push","component","slot","markdown","wrap","error"];for(let Q of q)if(K.startsWith(`@${Q}`))return!K.includes(`@end${Q}`);return!1}function L(K,q){if(!q.sortAttributes)return K;return K.replace(/<(\w+)([^>]*)>/g,(Q,j,w)=>{if(!w.trim())return Q;if(w.includes("<")||w.includes(`
35
35
  `)||w.includes("@"))return Q;let W=/(\w+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Y=[],X;while((X=W.exec(w))!==null)Y.push({name:X[1],value:X[2]});Y.sort((V,G)=>{if(V.name==="id")return-1;if(G.name==="id")return 1;if(V.name==="class")return-1;if(G.name==="class")return 1;return V.name.localeCompare(G.name)});let Z=Y.map((V)=>V.value?`${V.name}=${V.value}`:V.name).join(" ");return`<${j}${Z?` ${Z}`:""}>`})}
36
- export{O as en,v as fn};
36
+ export{O as bn,v as cn};
@@ -338,4 +338,4 @@ else {
338
338
  console.log('[stx] Suspense runtime initialized');
339
339
  })();
340
340
  `}
341
- export{N as Nf,Q as Of,T as Pf,U as Qf,W as Rf};
341
+ export{N as Jf,Q as Kf,T as Lf,U as Mf,W as Nf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Kk as x,Lk as C}from"./chunk-1htmc8mb.js";import{Yk as U,bl as k}from"./chunk-kqtchwz7.js";import{jE as q}from"./chunk-6r70w54p.js";import{resolve as B,basename as F,extname as T,join as z}from"path";import{mkdir as R}from"fs/promises";async function X(){try{return await import("ts-images")}catch{return null}}function A(K){switch(K){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function P(K,L){let N=L?A(L):A("web"),G=K.formatQuality||{};return{jpeg:{...N.jpeg,...G.jpeg},png:{...N.png,...G.png},webp:{...N.webp,...G.webp},avif:{...N.avif,...G.avif}}}async function f(K,L,N){let G=await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:K,processed:!1};let w=await x(K,L,N);if(w)return w;try{let O=B(K);if(!await k(O))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let J=P(N,L.preset),Y=N.outputDir||"dist/images",E=N.baseUrl||"/images";await R(Y,{recursive:!0});let Z=await U(O),H=F(K,T(K)),S=L.outputFormat?[L.outputFormat]:N.defaultFormats||["avif","webp","jpeg"],M={src:K,processed:!0,variants:[],hash:Z},_=null;if(L.transformations&&L.transformations.length>0)_=await d(O,L.transformations,G);for(let V of S){let $=J[V]||{},j=`${H}-${Z}.${V}`,v=z(Y,j);try{let W=await G.optimizeImage({input:_||O,output:v,format:V,quality:$.quality,progressive:$.progressive});if(W){if(M.variants.push({path:v,url:`${E}/${j}`,width:W.width||0,height:W.height||0,format:V,size:W.outputSize||0}),!M.originalWidth&&W.width)M.originalWidth=W.width,M.originalHeight=W.height}}catch(W){M.errors=M.errors||[],M.errors.push(`Failed to optimize ${V}: ${W}`)}}if(L.embedThumbhash||L.placeholder==="thumbhash")try{let V=await G.generateThumbHash(O);M.placeholder=V.dataUrl}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to generate thumbhash: ${V}`)}if(L.useDominantColor)try{let V=await G.generatePlaceholder(O,{strategy:"dominant-color"});M.dominantColor=V.dominantColor}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to extract dominant color: ${V}`)}return await C(K,L,M,N),M}catch(O){return{src:K,processed:!1,errors:[`Processing failed: ${O}`]}}}async function n(K,L,N,G){let w=await X();if(!w)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await w.optimizeImage({input:K,output:G,format:L,quality:N}))?.outputSize}}catch(O){return{success:!1,error:String(O)}}}async function d(K,L,N){let G=N||await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let w=await G.decode(K);for(let O of L){let J=O.options||{};switch(O.type){case"resize":if(J.width||J.height)w=await G.resize(w,{width:J.width,height:J.height,fit:J.fit});break;case"blur":if(J.sigma!==void 0)w=await G.blur(w,J.sigma);break;case"sharpen":if(J.amount!==void 0)w=await G.sharpen(w,J.amount);break;case"grayscale":w=await G.grayscale(w);break;case"rotate":if(J.angle!==void 0)w=await G.rotate(w,J.angle);break;case"flip":w=await G.flip(w);break;case"flop":w=await G.flop(w);break;case"brightness":if(J.value!==void 0)w=await G.brightness(w,J.value);break;case"contrast":if(J.value!==void 0)w=await G.contrast(w,J.value);break;case"saturation":if(J.value!==void 0)w=await G.saturation(w,J.value);break}}return await G.encode(w,"png")}catch(w){return console.error(`[stx-media] Transformation failed: ${w}`),null}}
3
- export{f as Gk,n as Hk,d as Ik};
2
+ import{Hk as x,Ik as C}from"./chunk-khdn7jwe.js";import{Vk as U,_k as k}from"./chunk-jpndqst5.js";import{pB as q}from"./chunk-xv34zbp4.js";import{resolve as B,basename as F,extname as T,join as z}from"path";import{mkdir as R}from"fs/promises";async function X(){try{return await import("ts-images")}catch{return null}}function A(K){switch(K){case"quality":return{jpeg:{quality:90,mozjpeg:!0,progressive:!0},png:{compressionLevel:6,palette:!1},webp:{quality:90,effort:6,smartSubsample:!0},avif:{quality:85,effort:6}};case"performance":return{jpeg:{quality:70,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!0},webp:{quality:70,effort:4,smartSubsample:!0},avif:{quality:60,effort:2}};case"web":default:return{jpeg:{quality:82,mozjpeg:!0,progressive:!0},png:{compressionLevel:8,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4}}}}function P(K,L){let N=L?A(L):A("web"),G=K.formatQuality||{};return{jpeg:{...N.jpeg,...G.jpeg},png:{...N.png,...G.png},webp:{...N.webp,...G.webp},avif:{...N.avif,...G.avif}}}async function f(K,L,N){let G=await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping optimization"),{src:K,processed:!1};let w=await x(K,L,N);if(w)return w;try{let O=B(K);if(!await k(O))return{src:K,processed:!1,errors:[`Source file not found: ${K}`]};let J=P(N,L.preset),Y=N.outputDir||"dist/images",E=N.baseUrl||"/images";await R(Y,{recursive:!0});let Z=await U(O),H=F(K,T(K)),S=L.outputFormat?[L.outputFormat]:N.defaultFormats||["avif","webp","jpeg"],M={src:K,processed:!0,variants:[],hash:Z},_=null;if(L.transformations&&L.transformations.length>0)_=await d(O,L.transformations,G);for(let V of S){let $=J[V]||{},j=`${H}-${Z}.${V}`,v=z(Y,j);try{let W=await G.optimizeImage({input:_||O,output:v,format:V,quality:$.quality,progressive:$.progressive});if(W){if(M.variants.push({path:v,url:`${E}/${j}`,width:W.width||0,height:W.height||0,format:V,size:W.outputSize||0}),!M.originalWidth&&W.width)M.originalWidth=W.width,M.originalHeight=W.height}}catch(W){M.errors=M.errors||[],M.errors.push(`Failed to optimize ${V}: ${W}`)}}if(L.embedThumbhash||L.placeholder==="thumbhash")try{let V=await G.generateThumbHash(O);M.placeholder=V.dataUrl}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to generate thumbhash: ${V}`)}if(L.useDominantColor)try{let V=await G.generatePlaceholder(O,{strategy:"dominant-color"});M.dominantColor=V.dominantColor}catch(V){M.errors=M.errors||[],M.errors.push(`Failed to extract dominant color: ${V}`)}return await C(K,L,M,N),M}catch(O){return{src:K,processed:!1,errors:[`Processing failed: ${O}`]}}}async function n(K,L,N,G){let w=await X();if(!w)return{success:!1,error:"ts-images not installed"};try{return{success:!0,size:(await w.optimizeImage({input:K,output:G,format:L,quality:N}))?.outputSize}}catch(O){return{success:!1,error:String(O)}}}async function d(K,L,N){let G=N||await X();if(!G)return console.warn("[stx-media] ts-images not installed, skipping transformations"),null;try{let w=await G.decode(K);for(let O of L){let J=O.options||{};switch(O.type){case"resize":if(J.width||J.height)w=await G.resize(w,{width:J.width,height:J.height,fit:J.fit});break;case"blur":if(J.sigma!==void 0)w=await G.blur(w,J.sigma);break;case"sharpen":if(J.amount!==void 0)w=await G.sharpen(w,J.amount);break;case"grayscale":w=await G.grayscale(w);break;case"rotate":if(J.angle!==void 0)w=await G.rotate(w,J.angle);break;case"flip":w=await G.flip(w);break;case"flop":w=await G.flop(w);break;case"brightness":if(J.value!==void 0)w=await G.brightness(w,J.value);break;case"contrast":if(J.value!==void 0)w=await G.contrast(w,J.value);break;case"saturation":if(J.value!==void 0)w=await G.saturation(w,J.value);break}}return await G.encode(w,"png")}catch(w){return console.error(`[stx-media] Transformation failed: ${w}`),null}}
3
+ export{f as Dk,n as Ek,d as Fk};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import Z from"fs";import Y from"path";async function _(j){let{root:q,config:B}=j,J=[],H=await E(q,B.storyMatch,B.storyIgnored);for(let Q of H){let L=Y.resolve(q,Q),V=$(Q,L);J.push(V)}return J}async function E(j,q,B){let J=[];async function H(Q,L){let V=await Z.promises.readdir(Q,{withFileTypes:!0});for(let K of V){let X=Y.join(Q,K.name),U=Y.relative(L,X);if(A(U,B))continue;if(K.isDirectory())await H(X,L);else if(K.isFile()){if(W(U,q))J.push(U)}}}return await H(j,j),J}function A(j,q){for(let B of q)if(z(j,B))return!0;return!1}var I=["**/layouts/**","**/pages/**","**/partials/**","**/_*.stx","**/layout.stx","**/page.stx","**/error.stx","**/loading.stx"];function k(j){for(let q of I)if(z(j,q))return!0;return!1}function W(j,q){for(let B of q)if(z(j,B))return!0;return!1}function z(j,q){let B=j.replace(/\\/g,"/"),H=q.replace(/\\/g,"/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,"{{GLOBSTAR}}").replace(/\*/g,"[^/]*").replace(/\?/g,".").replace(/\{\{GLOBSTAR\}\}/g,".*");return H=`^${H}$`,new RegExp(H).test(B)}function $(j,q){let B=Y.basename(j,".story.stx");return{id:j.toLowerCase().replace(/\.story\.stx$/,"").replace(/[/\\]/g,"-").replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),path:q,relativePath:j,fileName:B,treeFile:{title:B,path:j}}}function G(j,q){let{root:B,config:J}=j,H=[],Q=Z.watch(B,{recursive:!0},async(L,V)=>{if(!V)return;let K=V.replace(/\\/g,"/");if(!W(K,J.storyMatch))return;if(A(K,J.storyIgnored))return;let X=Y.resolve(B,K);try{await Z.promises.access(X);let U=$(K,X);q(L==="rename"?"add":"change",U)}catch{let U=$(K,X);q("unlink",U)}});return H.push(Q),()=>{for(let L of H)L.close()}}
3
- export{_ as jd,k as kd,G as ld};
3
+ export{_ as fd,k as gd,G as hd};
@@ -2,4 +2,4 @@
2
2
  class J{source;pos=0;line=1;column=0;tokens=[];constructor(b){this.source=b}tokenize(){this.tokens=[],this.pos=0,this.line=1,this.column=0;while(this.pos<this.source.length){let b=this.nextToken();if(b)this.tokens.push(b)}return this.tokens.push({type:"EOF",value:"",start:this.pos,end:this.pos,line:this.line,column:this.column}),this.tokens}nextToken(){if(this.pos>=this.source.length)return null;let b=this.pos,w=this.line,j=this.column,v=this.source[this.pos];if(/\s/.test(v))return this.readWhitespace(b,w,j);if(v==="/"&&this.peek(1)==="/")return this.readLineComment(b,w,j);if(v==="/"&&this.peek(1)==="*")return this.readBlockComment(b,w,j);if(v==='"'||v==="'")return this.readString(v,b,w,j);if(v==="`")return this.readTemplateString(b,w,j);if(/\d/.test(v)||v==="."&&/\d/.test(this.peek(1)||""))return this.readNumber(b,w,j);if(/[a-z_$]/i.test(v))return this.readIdentifier(b,w,j);if(v==="{"){if(this.peek(1)==="{"&&this.peek(2)==="{")return this.advance(3),{type:"RAW_START",value:"{{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="{")return this.advance(2),{type:"EXPRESSION_START",value:"{{",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="!"&&this.peek(2)==="!")return this.advance(3),{type:"RAW_START",value:"{!!",start:b,end:this.pos,line:w,column:j}}if(v==="}"){if(this.peek(1)==="}"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"}}}",start:b,end:this.pos,line:w,column:j};if(this.peek(1)==="}")return this.advance(2),{type:"EXPRESSION_END",value:"}}",start:b,end:this.pos,line:w,column:j}}if(v==="!"&&this.peek(1)==="!"&&this.peek(2)==="}")return this.advance(3),{type:"RAW_END",value:"!!}",start:b,end:this.pos,line:w,column:j};if(v==="@"&&/[a-z]/i.test(this.peek(1)||""))return this.readDirective(b,w,j);let z=["===","!==","==","!=","<=",">=","&&","||","??","++","--","+=","-=","*=","/=","%=","**","=>","?.","...","<<",">>",">>>","&=","|=","^="];for(let B of z)if(this.source.slice(this.pos,this.pos+B.length)===B)return this.advance(B.length),{type:"OPERATOR",value:B,start:b,end:this.pos,line:w,column:j};if(/[+\-*/%<>=!&|^~?:]/.test(v))return this.advance(),{type:"OPERATOR",value:v,start:b,end:this.pos,line:w,column:j};if(/[()[\]{},;.]/.test(v))return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j};return this.advance(),{type:"PUNCTUATION",value:v,start:b,end:this.pos,line:w,column:j}}readWhitespace(b,w,j){while(this.pos<this.source.length&&/\s/.test(this.source[this.pos]))this.advance();return{type:"WHITESPACE",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readLineComment(b,w,j){this.advance(2);while(this.pos<this.source.length&&this.source[this.pos]!==`
3
3
  `)this.advance();return{type:"COMMENT",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readBlockComment(b,w,j){this.advance(2);while(this.pos<this.source.length-1){if(this.source[this.pos]==="*"&&this.source[this.pos+1]==="/"){this.advance(2);break}this.advance()}return{type:"COMMENT",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readString(b,w,j,v){this.advance();while(this.pos<this.source.length){let z=this.source[this.pos];if(z==="\\"){this.advance(2);continue}if(z===b){this.advance();break}this.advance()}return{type:"STRING",value:this.source.slice(w,this.pos),start:w,end:this.pos,line:j,column:v}}readTemplateString(b,w,j){this.advance();let v=0,z=256;while(this.pos<this.source.length){let B=this.source[this.pos];if(B==="\\"){this.advance(2);continue}if(B==="$"&&this.peek(1)==="{"){if(v>=z){this.pos=this.source.length;break}this.advance(2),v++;continue}if(B==="{"&&v>0){v++,this.advance();continue}if(B==="}"&&v>0){v--,this.advance();continue}if(B==="`"&&v===0){this.advance();break}this.advance()}return{type:"TEMPLATE_STRING",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readNumber(b,w,j){if(this.source[this.pos]==="0"){let v=this.peek(1)?.toLowerCase();if(v==="x"||v==="o"||v==="b"){this.advance(2);while(this.pos<this.source.length&&/[\da-f_]/i.test(this.source[this.pos]))this.advance();return{type:"NUMBER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}}while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance();if(this.source[this.pos]==="."&&/\d/.test(this.peek(1)||"")){this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(/e/i.test(this.source[this.pos]||"")){if(this.advance(),/[+-]/.test(this.source[this.pos]||""))this.advance();while(this.pos<this.source.length&&/[\d_]/.test(this.source[this.pos]))this.advance()}if(this.source[this.pos]==="n")this.advance();return{type:"NUMBER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readIdentifier(b,w,j){while(this.pos<this.source.length&&/[\w$]/.test(this.source[this.pos]))this.advance();return{type:"IDENTIFIER",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}readDirective(b,w,j){this.advance();while(this.pos<this.source.length&&/[a-z]/i.test(this.source[this.pos]))this.advance();return{type:"DIRECTIVE",value:this.source.slice(b,this.pos),start:b,end:this.pos,line:w,column:j}}advance(b=1){for(let w=0;w<b&&this.pos<this.source.length;w++){if(this.source[this.pos]===`
4
4
  `)this.line++,this.column=0;else this.column++;this.pos++}}peek(b){return this.source[this.pos+b]}saveState(){return{pos:this.pos,line:this.line,column:this.column}}restoreState(b){this.pos=b.pos,this.line=b.line,this.column=b.column}}function K(b,w,j,v=0){let z=0,B=v,y=null,D=0,H=!1;while(B<b.length){let F=b[B];if(y&&H){H=!1,B++;continue}if(y&&F==="\\"){H=!0,B++;continue}if(H=!1,(F==='"'||F==="'"||F==="`")&&!y){y=F,B++;continue}if(F===y&&y!=="`"){y=null,B++;continue}if(y==="`"&&F==="$"&&b[B+1]==="{"){D++,B+=2;continue}if(D>0&&F==="}"){D--,B++;continue}if(F==="`"&&y==="`"&&D===0){y=null,B++;continue}if(y){B++;continue}if(F===w)z++;else if(F===j){if(z--,z===0)return B}B++}return-1}function O(b,w){let j=w,v={paren:0,bracket:0,brace:0},z=null,B=0;while(j<b.length){let y=b[j];if((j>0?b[j-1]:"")==="\\"&&z){j++;continue}if((y==='"'||y==="'")&&!z){z=y,j++;continue}if(y===z&&z!=="`"){z=null,j++;continue}if(y==="`"&&!z){z="`",j++;continue}if(y==="`"&&z==="`"&&B===0){z=null,j++;continue}if(z==="`"&&y==="$"&&b[j+1]==="{"){B++,j+=2;continue}if(B>0){if(y==="{")B++;else if(y==="}")B--;j++;continue}if(z){j++;continue}if(v.paren===0&&v.bracket===0&&v.brace===0){if(b.slice(j,j+2)==="}}"||b.slice(j,j+3)==="!!}")break;if(y===","||y===";")break}if(y==="(")v.paren++;else if(y===")"){if(v.paren--,v.paren<0)break}else if(y==="[")v.bracket++;else if(y==="]"){if(v.bracket--,v.bracket<0)break}else if(y==="{")v.brace++;else if(y==="}"){if(v.brace--,v.brace<0)break}j++}return{expression:b.slice(w,j),endPos:j}}function Q(b){let w=[],j="",v={paren:0,bracket:0,brace:0},z=null,B=0;for(let y=0;y<b.length;y++){let D=b[y];if((y>0?b[y-1]:"")==="\\"&&z){j+=D;continue}if((D==='"'||D==="'")&&!z){z=D,j+=D;continue}if(D===z&&z!=="`"){z=null,j+=D;continue}if(D==="`"&&!z){z="`",j+=D;continue}if(D==="`"&&z==="`"&&B===0){z=null,j+=D;continue}if(z==="`"&&D==="$"&&b[y+1]==="{"){B++,j+=D+b[y+1],y++;continue}if(B>0&&D==="{"){B++,j+=D;continue}if(B>0&&D==="}"){B--,j+=D;continue}if(z){j+=D;continue}if(D==="(")v.paren++;else if(D===")")v.paren--;else if(D==="[")v.bracket++;else if(D==="]")v.bracket--;else if(D==="{")v.brace++;else if(D==="}")v.brace--;if(D==="|"&&b[y+1]!=="|"&&(y===0||b[y-1]!=="|")&&b[y-1]!=="\\"&&v.paren===0&&v.bracket===0&&v.brace===0){w.push(j.trim()),j="";continue}if(D==="|"&&b[y-1]==="\\"&&!z){j=j.slice(0,-1)+D;continue}j+=D}if(j.trim())w.push(j.trim());return w}
5
- export{J as _A,K as $A,O as aB,Q as bB};
5
+ export{J as ey,K as fy,O as gy,Q as hy};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{jE as X}from"./chunk-6r70w54p.js";function Z(k,q={}){let{includeVariants:z=!0,includeProps:A=!0,frameWidth:B=400,frameHeight:E=300,componentSpacing:K=40}=q,J={},L={},U=[],V=0;for(let Q of k){let R=j(),Y=_(Q,R,V,0,B,E,A);U.push(Y),J[R]={key:R,name:Q.name,description:Q.description||""},V+=B+K}return{name:"STX Components",lastModified:new Date().toISOString(),version:"1.0.0",document:{id:"0:0",name:"Document",type:"DOCUMENT",children:[{id:"0:1",name:"Components",type:"CANVAS",children:U}]},components:J,styles:L}}function _(k,q,z,A,B,E,K){let J=[];if(J.push({id:`${q}:title`,name:"Title",type:"TEXT",characters:k.name,style:{fontFamily:"Inter",fontWeight:600,fontSize:16},fills:[{type:"SOLID",color:{r:0,g:0,b:0,a:1}}]}),k.description)J.push({id:`${q}:desc`,name:"Description",type:"TEXT",characters:k.description,style:{fontFamily:"Inter",fontWeight:400,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});if(K&&k.props.length>0){let L=$(k.props,`${q}:props`);J.push(L)}return J.push({id:`${q}:preview`,name:"Preview",type:"RECTANGLE",absoluteBoundingBox:{x:0,y:0,width:B-32,height:150},fills:[{type:"SOLID",color:{r:0.95,g:0.95,b:0.95,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:8}),{id:q,name:k.name,type:"COMPONENT",children:J,absoluteBoundingBox:{x:z,y:A,width:B,height:E},fills:[{type:"SOLID",color:{r:1,g:1,b:1,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:12,paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,itemSpacing:12,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function $(k,q){let z=[];z.push({id:`${q}:header`,name:"Props Header",type:"TEXT",characters:"Props",style:{fontFamily:"Inter",fontWeight:600,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});for(let A=0;A<k.length;A++){let B=k[A];z.push({id:`${q}:prop:${A}`,name:B.name,type:"TEXT",characters:`${B.name}: ${B.type}${B.required?" (required)":""}`,style:{fontFamily:"SF Mono",fontWeight:400,fontSize:11},fills:[{type:"SOLID",color:{r:0.2,g:0.2,b:0.2,a:1}}]})}return{id:q,name:"Props",type:"FRAME",children:z,fills:[{type:"SOLID",color:{r:0.98,g:0.98,b:0.98,a:1}}],cornerRadius:6,paddingLeft:12,paddingRight:12,paddingTop:8,paddingBottom:8,itemSpacing:4,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function j(){return`${Date.now()}:${Math.random().toString(36).slice(2,8)}`}async function D(k,q,z={}){let A=Z(k,z),B=JSON.stringify(A,null,2),E=await import("fs"),K=await import("path");await E.promises.mkdir(K.dirname(q),{recursive:!0}),await E.promises.writeFile(q,B)}function G(k){if(k.startsWith("#")){let z=k.slice(1),A=Number.parseInt(z.slice(0,2),16)/255,B=Number.parseInt(z.slice(2,4),16)/255,E=Number.parseInt(z.slice(4,6),16)/255,K=z.length===8?Number.parseInt(z.slice(6,8),16)/255:1;return{r:A,g:B,b:E,a:K}}let q=k.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(q)return{r:Number.parseInt(q[1])/255,g:Number.parseInt(q[2])/255,b:Number.parseInt(q[3])/255,a:q[4]?Number.parseFloat(q[4]):1};return{r:0,g:0,b:0,a:1}}function H(k){let q=Math.round(k.r*255),z=Math.round(k.g*255),A=Math.round(k.b*255);if(k.a===1)return`#${q.toString(16).padStart(2,"0")}${z.toString(16).padStart(2,"0")}${A.toString(16).padStart(2,"0")}`;return`rgba(${q}, ${z}, ${A}, ${k.a})`}function N(k){return{name:k,id:`stx-story-${k.toLowerCase().replace(/\s+/g,"-")}`,api:"1.0.0",main:"code.js",ui:"ui.html",editorType:["figma"],capabilities:["inspect"],permissions:["currentuser"]}}function T(k){let q=k.map((z)=>z.name).join(", ");return`
2
+ import{pB as X}from"./chunk-xv34zbp4.js";function Z(k,q={}){let{includeVariants:z=!0,includeProps:A=!0,frameWidth:B=400,frameHeight:E=300,componentSpacing:K=40}=q,J={},L={},U=[],V=0;for(let Q of k){let R=j(),Y=_(Q,R,V,0,B,E,A);U.push(Y),J[R]={key:R,name:Q.name,description:Q.description||""},V+=B+K}return{name:"STX Components",lastModified:new Date().toISOString(),version:"1.0.0",document:{id:"0:0",name:"Document",type:"DOCUMENT",children:[{id:"0:1",name:"Components",type:"CANVAS",children:U}]},components:J,styles:L}}function _(k,q,z,A,B,E,K){let J=[];if(J.push({id:`${q}:title`,name:"Title",type:"TEXT",characters:k.name,style:{fontFamily:"Inter",fontWeight:600,fontSize:16},fills:[{type:"SOLID",color:{r:0,g:0,b:0,a:1}}]}),k.description)J.push({id:`${q}:desc`,name:"Description",type:"TEXT",characters:k.description,style:{fontFamily:"Inter",fontWeight:400,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});if(K&&k.props.length>0){let L=$(k.props,`${q}:props`);J.push(L)}return J.push({id:`${q}:preview`,name:"Preview",type:"RECTANGLE",absoluteBoundingBox:{x:0,y:0,width:B-32,height:150},fills:[{type:"SOLID",color:{r:0.95,g:0.95,b:0.95,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:8}),{id:q,name:k.name,type:"COMPONENT",children:J,absoluteBoundingBox:{x:z,y:A,width:B,height:E},fills:[{type:"SOLID",color:{r:1,g:1,b:1,a:1}}],strokes:[{type:"SOLID",color:{r:0.9,g:0.9,b:0.9,a:1}}],strokeWeight:1,cornerRadius:12,paddingLeft:16,paddingRight:16,paddingTop:16,paddingBottom:16,itemSpacing:12,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function $(k,q){let z=[];z.push({id:`${q}:header`,name:"Props Header",type:"TEXT",characters:"Props",style:{fontFamily:"Inter",fontWeight:600,fontSize:12},fills:[{type:"SOLID",color:{r:0.4,g:0.4,b:0.4,a:1}}]});for(let A=0;A<k.length;A++){let B=k[A];z.push({id:`${q}:prop:${A}`,name:B.name,type:"TEXT",characters:`${B.name}: ${B.type}${B.required?" (required)":""}`,style:{fontFamily:"SF Mono",fontWeight:400,fontSize:11},fills:[{type:"SOLID",color:{r:0.2,g:0.2,b:0.2,a:1}}]})}return{id:q,name:"Props",type:"FRAME",children:z,fills:[{type:"SOLID",color:{r:0.98,g:0.98,b:0.98,a:1}}],cornerRadius:6,paddingLeft:12,paddingRight:12,paddingTop:8,paddingBottom:8,itemSpacing:4,layoutMode:"VERTICAL",primaryAxisAlignItems:"MIN",counterAxisAlignItems:"MIN"}}function j(){return`${Date.now()}:${Math.random().toString(36).slice(2,8)}`}async function D(k,q,z={}){let A=Z(k,z),B=JSON.stringify(A,null,2),E=await import("fs"),K=await import("path");await E.promises.mkdir(K.dirname(q),{recursive:!0}),await E.promises.writeFile(q,B)}function G(k){if(k.startsWith("#")){let z=k.slice(1),A=Number.parseInt(z.slice(0,2),16)/255,B=Number.parseInt(z.slice(2,4),16)/255,E=Number.parseInt(z.slice(4,6),16)/255,K=z.length===8?Number.parseInt(z.slice(6,8),16)/255:1;return{r:A,g:B,b:E,a:K}}let q=k.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(q)return{r:Number.parseInt(q[1])/255,g:Number.parseInt(q[2])/255,b:Number.parseInt(q[3])/255,a:q[4]?Number.parseFloat(q[4]):1};return{r:0,g:0,b:0,a:1}}function H(k){let q=Math.round(k.r*255),z=Math.round(k.g*255),A=Math.round(k.b*255);if(k.a===1)return`#${q.toString(16).padStart(2,"0")}${z.toString(16).padStart(2,"0")}${A.toString(16).padStart(2,"0")}`;return`rgba(${q}, ${z}, ${A}, ${k.a})`}function N(k){return{name:k,id:`stx-story-${k.toLowerCase().replace(/\s+/g,"-")}`,api:"1.0.0",main:"code.js",ui:"ui.html",editorType:["figma"],capabilities:["inspect"],permissions:["currentuser"]}}function T(k){let q=k.map((z)=>z.name).join(", ");return`
3
3
  // Figma Plugin Code to import STX components
4
4
  // Run this in Figma's plugin console
5
5
 
@@ -29,4 +29,4 @@ async function importComponents() {
29
29
 
30
30
  importComponents();
31
31
  `}
32
- export{Z as Na,D as Oa,G as Pa,H as Qa,N as Ra,T as Sa};
32
+ export{Z as Ja,D as Ka,G as La,H as Ma,N as Na,T as Oa};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function Z(E,j,q,B){let K=[],L=B.join(" ");for(let G of E)if(K.push({src:`${j}/icon-${G}x${G}.png`,sizes:`${G}x${G}`,type:"image/png",purpose:L}),q)K.push({src:`${j}/icon-${G}x${G}.webp`,sizes:`${G}x${G}`,type:"image/webp",purpose:L});return K}function _(E){return E.map((j)=>({name:j.name,short_name:j.shortName,description:j.description,url:j.url,icons:j.icons?.map((q)=>({src:q.src,sizes:q.sizes,type:q.type}))}))}function $(E){let j=E.pwa?.shareTarget;if(!j?.enabled)return;let q={action:j.action||"/share",method:j.method||"POST",enctype:j.enctype||"multipart/form-data",params:{title:j.params?.title||"title",text:j.params?.text||"text",url:j.params?.url||"url"}};if(j.acceptFiles&&j.acceptFiles.length>0)q.params.files=j.acceptFiles.map((B)=>({name:B.name,accept:B.accept}));return q}function k(E){let j=E.pwa?.fileHandlers;if(!j?.enabled||!j.accept)return;let q=[{action:j.action||"/",accept:j.accept,launch_type:j.launchType||"single-client"}];if(j.icons)q[0].icons=j.icons.map((B)=>({src:B.src,sizes:B.sizes,type:B.type}));return q}function F(E){let j=E.pwa?.protocolHandlers;if(!j||j.length===0)return;return j.map((q)=>({protocol:q.protocol,url:q.url}))}function I(E){let j=E.pwa;if(!j?.enabled||!j.manifest)return null;let{manifest:q,icons:B}=j,K=B?.sizes||[72,96,128,144,152,192,384,512],L=B?.outputDir?`/${B.outputDir}`:"/pwa-icons",G=B?.generateWebP??!0,N=B?.purpose||["any","maskable"],J={name:q.name,short_name:q.shortName||q.name,description:q.description,start_url:q.startUrl||"/",display:q.display||"standalone",display_override:q.displayOverride,orientation:q.orientation,theme_color:q.themeColor,background_color:q.backgroundColor,scope:q.scope||"/",lang:q.lang,dir:q.dir,id:q.id,categories:q.categories,icons:Z(K,L,G,N)};if(q.shortcuts&&q.shortcuts.length>0)J.shortcuts=_(q.shortcuts);if(q.screenshots&&q.screenshots.length>0)J.screenshots=q.screenshots.map((Q)=>({src:Q.src,sizes:Q.sizes,type:Q.type,label:Q.label,form_factor:Q.platform}));let U=$(E);if(U)J.share_target=U;let X=k(E);if(X)J.file_handlers=X;let Y=F(E);if(Y)J.protocol_handlers=Y;if(q.launchHandler)J.launch_handler={client_mode:q.launchHandler};if(q.handleLinks)J.handle_links=q.handleLinks;if(q.edgeSidePanel?.enabled)J.edge_side_panel={preferred_width:q.edgeSidePanel.preferredWidth};return J}function O(E){let j=I(E);if(!j)return"";let q=JSON.parse(JSON.stringify(j));return JSON.stringify(q,null,2)}function y(E,j){return{...j,...E,shortcuts:E.shortcuts||j.shortcuts,screenshots:E.screenshots||j.screenshots,categories:E.categories||j.categories}}function R(E){let j=[],q=E.pwa;if(!q?.enabled)return j;let B=q.manifest;if(!B)return j.push("PWA manifest configuration is missing"),j;if(!B.name)j.push("Manifest name is required");let K=["fullscreen","standalone","minimal-ui","browser"];if(B.display&&!K.includes(B.display))j.push(`Invalid display mode: ${B.display}. Must be one of: ${K.join(", ")}`);let L=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(B.orientation&&!L.includes(B.orientation))j.push(`Invalid orientation: ${B.orientation}`);let G=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(B.themeColor&&!G.test(B.themeColor))j.push(`Invalid theme color: ${B.themeColor}. Must be a valid hex color.`);if(B.backgroundColor&&!G.test(B.backgroundColor))j.push(`Invalid background color: ${B.backgroundColor}. Must be a valid hex color.`);if(q.shareTarget?.enabled){if(!q.shareTarget.action)j.push("Share target action URL is required")}if(q.fileHandlers?.enabled){if(!q.fileHandlers.accept||Object.keys(q.fileHandlers.accept).length===0)j.push("File handlers must specify accepted MIME types")}if(q.protocolHandlers)for(let N of q.protocolHandlers){if(!N.protocol)j.push("Protocol handler missing protocol");if(!N.url||!N.url.includes("%s"))j.push(`Protocol handler URL must contain %s placeholder: ${N.protocol}`)}return j}
3
- export{I as if,O as jf,y as kf,R as lf};
3
+ export{I as ef,O as ff,y as gf,R as hf};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{$k as U,Yk as Z,al as X,bl as _}from"./chunk-kqtchwz7.js";import{mkdir as S,readFile as $,writeFile as V,readdir as v,rm as W,stat as A}from"fs/promises";import{join as R,dirname as K}from"path";var L=new Map,T={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function M(b){try{await S(b,{recursive:!0})}catch{}}function w(b,q,G){return R(b,G,`${q}.json`)}async function Y(b,q,G){if((Date.now()-b.createdAt)/86400000>G)return!1;if(await X(q)!==b.srcMtime)return!1;return!0}async function F(b,q,G,B=T){if(!B.enabled)return null;let z=U(b,q),I=L.get(z);if(I){if(await Y(I,b,B.maxAge))return I.lastAccessedAt=Date.now(),I.data;L.delete(z)}let O=w(B.directory,z,G);if(await _(O))try{let J=await $(O,"utf-8"),N=JSON.parse(J);if(await Y(N,b,B.maxAge))return N.lastAccessedAt=Date.now(),L.set(z,N),N.data}catch{}return null}async function k(b,q,G,B,z=T){if(!z.enabled)return;let I=U(b,q),O=await Z(b),J=await X(b),N={key:I,src:b,srcHash:O,srcMtime:J,optionsHash:U("",q),data:G,createdAt:Date.now(),lastAccessedAt:Date.now()};L.set(I,N);let Q=w(z.directory,I,B);try{await M(K(Q)),await V(Q,JSON.stringify(N,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function D(b,q,G=T){for(let[B,z]of L.entries())if(z.src===b)L.delete(B)}async function P(b,q=T){if(b==="all")L.clear();else L.clear();let G=b==="all"?["image","video"]:[b];for(let B of G){let z=R(q.directory,B);try{await W(z,{recursive:!0,force:!0})}catch{}}}async function u(b=T){let q={memoryEntries:L.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let G of["image","video"]){let B=R(b.directory,G);try{let z=await v(B);q.diskEntries[G]=z.length;for(let I of z){let O=R(B,I),J=await A(O);q.totalSizeMB+=J.size/1048576}}catch{}}return q}async function d(b=T){let q=0,G=b.maxAge*24*60*60*1000;for(let B of["image","video"]){let z=R(b.directory,B);try{let I=await v(z);for(let O of I){let J=R(z,O);try{let N=await $(J,"utf-8"),Q=JSON.parse(N);if(Date.now()-Q.createdAt>G)await W(J),L.delete(Q.key),q++}catch{await W(J).catch(()=>{}),q++}}}catch{}}return q}
3
- export{T as Nk,F as Ok,k as Pk,D as Qk,P as Rk,u as Sk,d as Tk};
2
+ import{Vk as Z,Yk as U,Zk as X,_k as _}from"./chunk-jpndqst5.js";import{mkdir as S,readFile as $,writeFile as V,readdir as v,rm as W,stat as A}from"fs/promises";import{join as R,dirname as K}from"path";var L=new Map,T={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function M(b){try{await S(b,{recursive:!0})}catch{}}function w(b,q,G){return R(b,G,`${q}.json`)}async function Y(b,q,G){if((Date.now()-b.createdAt)/86400000>G)return!1;if(await X(q)!==b.srcMtime)return!1;return!0}async function F(b,q,G,B=T){if(!B.enabled)return null;let z=U(b,q),I=L.get(z);if(I){if(await Y(I,b,B.maxAge))return I.lastAccessedAt=Date.now(),I.data;L.delete(z)}let O=w(B.directory,z,G);if(await _(O))try{let J=await $(O,"utf-8"),N=JSON.parse(J);if(await Y(N,b,B.maxAge))return N.lastAccessedAt=Date.now(),L.set(z,N),N.data}catch{}return null}async function k(b,q,G,B,z=T){if(!z.enabled)return;let I=U(b,q),O=await Z(b),J=await X(b),N={key:I,src:b,srcHash:O,srcMtime:J,optionsHash:U("",q),data:G,createdAt:Date.now(),lastAccessedAt:Date.now()};L.set(I,N);let Q=w(z.directory,I,B);try{await M(K(Q)),await V(Q,JSON.stringify(N,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function D(b,q,G=T){for(let[B,z]of L.entries())if(z.src===b)L.delete(B)}async function P(b,q=T){if(b==="all")L.clear();else L.clear();let G=b==="all"?["image","video"]:[b];for(let B of G){let z=R(q.directory,B);try{await W(z,{recursive:!0,force:!0})}catch{}}}async function u(b=T){let q={memoryEntries:L.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let G of["image","video"]){let B=R(b.directory,G);try{let z=await v(B);q.diskEntries[G]=z.length;for(let I of z){let O=R(B,I),J=await A(O);q.totalSizeMB+=J.size/1048576}}catch{}}return q}async function d(b=T){let q=0,G=b.maxAge*24*60*60*1000;for(let B of["image","video"]){let z=R(b.directory,B);try{let I=await v(z);for(let O of I){let J=R(z,O);try{let N=await $(J,"utf-8"),Q=JSON.parse(N);if(Date.now()-Q.createdAt>G)await W(J),L.delete(Q.key),q++}catch{await W(J).catch(()=>{}),q++}}}catch{}}return q}
3
+ export{T as Kk,F as Lk,k as Mk,D as Nk,P as Ok,u as Pk,d as Qk};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Kt as E}from"./chunk-7sd6c9wv.js";import{jE as f}from"./chunk-6r70w54p.js";import D from"path";import{extractLayoutMetadata as p}from"stx-router/layout-metadata";var P="stx-page-head:",R=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,H=null;function M(){if(H!==null)return H;try{let{getRouterScript:z}=f("stx-router");H=`<script>${z()}</script>`}catch{H=""}return H}async function x(z,X){if(X===!1)return null;if(X&&typeof X==="string"){let J=D.resolve(z,X);if(await Bun.file(J).exists())return J;return null}let w=D.join(z,"app.stx");if(await Bun.file(w).exists())return w;return null}async function y(z,X){try{let w=await Bun.file(z).text(),J=w,Y=w.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(Y)J=Y[1].trim();let N=E(w),V=[...N.client.map((Q)=>Q.fullTag),...N.signals.map((Q)=>Q.fullTag)],F=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,$;while(($=Z.exec(w))!==null)F.push($[0]);let B=J;for(let Q of N.server)B=B.replace(Q.fullTag,"");for(let Q of N.client)B=B.replace(Q.fullTag,"");B=B.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let j="<!--__STX_PAGE_SLOT__-->";if(B=B.replace(/<slot\s*\/>/gi,j).replace(/<slot\s*>\s*<\/slot>/gi,j),!B.includes(j))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:G,extractVariables:I,defaultConfig:W,loadStxConfig:K}=await import("././index.js"),A=await K(),q={__filename:z,__dirname:D.dirname(z)};for(let Q of V){let k=Q.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(k&&!Q.includes("client")&&!Q.includes('type="module"'))await I(k[1],q,z)}let U=await G(B,q,z,{...W,...A,...X},new Set),v=U.indexOf(j);if(v===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:U.substring(0,v),afterSlot:U.substring(v+j.length),filePath:z,shellScripts:V,shellStyles:F}}catch(w){return console.error(`[stx] Error processing shell ${z}:`,w),null}}function S(z,X,w){let J,Y="",N=X.match(R);if(N){X=X.replace(N[0],"");try{let B=Buffer.from(N[1],"base64").toString("utf8"),j=B.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(j)J=j[1].trim();Y=B.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let V=w||J||"stx App",F=M(),Z="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
2
+ import{Qq as E}from"./chunk-mhgk632d.js";import{pB as f}from"./chunk-xv34zbp4.js";import D from"path";import{extractLayoutMetadata as p}from"stx-router/layout-metadata";var P="stx-page-head:",R=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,H=null;function M(){if(H!==null)return H;try{let{getRouterScript:z}=f("stx-router");H=`<script>${z()}</script>`}catch{H=""}return H}async function x(z,X){if(X===!1)return null;if(X&&typeof X==="string"){let J=D.resolve(z,X);if(await Bun.file(J).exists())return J;return null}let w=D.join(z,"app.stx");if(await Bun.file(w).exists())return w;return null}async function y(z,X){try{let w=await Bun.file(z).text(),J=w,Y=w.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(Y)J=Y[1].trim();let N=E(w),V=[...N.client.map((Q)=>Q.fullTag),...N.signals.map((Q)=>Q.fullTag)],F=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,$;while(($=Z.exec(w))!==null)F.push($[0]);let B=J;for(let Q of N.server)B=B.replace(Q.fullTag,"");for(let Q of N.client)B=B.replace(Q.fullTag,"");B=B.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let j="<!--__STX_PAGE_SLOT__-->";if(B=B.replace(/<slot\s*\/>/gi,j).replace(/<slot\s*>\s*<\/slot>/gi,j),!B.includes(j))return console.warn(`[stx] Shell ${z} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:G,extractVariables:I,defaultConfig:W,loadStxConfig:K}=await import("././index.js"),A=await K(),q={__filename:z,__dirname:D.dirname(z)};for(let Q of V){let k=Q.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(k&&!Q.includes("client")&&!Q.includes('type="module"'))await I(k[1],q,z)}let U=await G(B,q,z,{...W,...A,...X},new Set),v=U.indexOf(j);if(v===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:U.substring(0,v),afterSlot:U.substring(v+j.length),filePath:z,shellScripts:V,shellStyles:F}}catch(w){return console.error(`[stx] Error processing shell ${z}:`,w),null}}function S(z,X,w){let J,Y="",N=X.match(R);if(N){X=X.replace(N[0],"");try{let B=Buffer.from(N[1],"base64").toString("utf8"),j=B.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(j)J=j[1].trim();Y=B.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let V=w||J||"stx App",F=M(),Z="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -26,4 +26,4 @@ ${F}
26
26
  `));if(W.length>0)q.push(W.join(`
27
27
  `));return q.push(I),q.join(`
28
28
  `)}
29
- export{x as Ct,y as Dt,S as Et,b as Ft,C as Gt,g as Ht,p as It};
29
+ export{x as Iq,y as Jq,S as Kq,b as Lq,C as Mq,g as Nq,p as Oq};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{nu as U,tu as W}from"./chunk-tzd81m7r.js";import{Zv as X}from"./chunk-nwfa5766.js";import{Zw as R,_w as O}from"./chunk-r7d26vjj.js";import{jE as Q}from"./chunk-6r70w54p.js";async function F(j,N={}){return(await _(j,N)).html}async function V(j,N={}){let{html:J,context:A}=await _(j,N),{extractStreamBoundaries:G}=await import("././streaming.js"),z=G(A),w=j.streamTemplates;if(w&&Object.keys(w).length>0){let{processDirectives:$}=await import("././process.js"),{defaultConfig:D}=await import("././config.js"),Y=A.streamBoundaries||{},I={...D,autoShell:!1},Z=Object.keys(w).map((K)=>({id:K,render:async()=>{let M=typeof Y[K]==="function"?await Y[K]():void 0;return $(w[K],{...A,$boundary:M},j.sourceFile,I,new Set)}})),L=new Set(Z.map((K)=>K.id));z=[...(z||[]).filter((K)=>!L.has(K.id)),...Z]}return{html:J,boundaries:z&&z.length>0?z:void 0}}async function _(j,N){let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};if(!j.hasServerScripts&&!O(j.html))return{html:j.html,context:J};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.html))return{html:j.html,context:J};let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return{html:R(j.html,A),context:J}}async function y(j,N={}){if(!j.hasServerScripts&&!O(j.fragment))return j.fragment;let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.fragment))return j.fragment;let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return R(j.fragment,A)}
3
- export{F as Ri,V as Si,y as Ti};
2
+ import{tr as U,zr as W}from"./chunk-1xz0w746.js";import{dt as X}from"./chunk-g1vt329s.js";import{du as R,eu as O}from"./chunk-hjm2xab3.js";import{pB as Q}from"./chunk-xv34zbp4.js";async function F(j,N={}){return(await _(j,N)).html}async function V(j,N={}){let{html:J,context:A}=await _(j,N),{extractStreamBoundaries:G}=await import("././streaming.js"),z=G(A),w=j.streamTemplates;if(w&&Object.keys(w).length>0){let{processDirectives:$}=await import("././process.js"),{defaultConfig:D}=await import("././config.js"),Y=A.streamBoundaries||{},I={...D,autoShell:!1},Z=Object.keys(w).map((K)=>({id:K,render:async()=>{let M=typeof Y[K]==="function"?await Y[K]():void 0;return $(w[K],{...A,$boundary:M},j.sourceFile,I,new Set)}})),L=new Set(Z.map((K)=>K.id));z=[...(z||[]).filter((K)=>!L.has(K.id)),...Z]}return{html:J,boundaries:z&&z.length>0?z:void 0}}async function _(j,N){let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};if(!j.hasServerScripts&&!O(j.html))return{html:j.html,context:J};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.html))return{html:j.html,context:J};let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return{html:R(j.html,A),context:J}}async function y(j,N={}){if(!j.hasServerScripts&&!O(j.fragment))return j.fragment;let J={__filename:j.sourceFile,__dirname:j.sourceFile.replace(/[/\\][^/\\]+$/,""),...N};for(let G of j.serverScriptContent)try{await X(G,J,j.sourceFile)}catch(z){console.warn(`[stx] Server script error in ${j.sourceFile}:`,z)}if(!O(j.fragment))return j.fragment;let A=new Map;for(let[G,z]of Object.entries(j.placeholders))if(z.expression)try{let w=W(z.expression,J);if(z.type==="raw")A.set(G,w!==void 0&&w!==null?String(w):"");else A.set(G,w!==void 0&&w!==null?U(String(w)):"")}catch{A.set(G,"")}return R(j.fragment,A)}
3
+ export{F as Oi,V as Pi,y as Qi};
@@ -57,4 +57,4 @@ ${j.inlineScript}
57
57
  <!-- Custom Analytics -->
58
58
  <script${w.length>0?` ${w.join(" ")}`:""} src="${J(j.scriptUrl)}" defer></script>
59
59
  `}function Y(q,j){let w=N(j);if(!w)return q;if(!q.includes("</head>")){let K=q.lastIndexOf("</body>");if(K!==-1)return q.slice(0,K)+w+q.slice(K);return q+w}return q.replace("</head>",`${w}</head>`)}function J(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var Z={name:"analytics",hasEndTag:!1,handler:async(q,j,w,K)=>{let z=w.__stx_config||{};return N(z)}};
60
- export{N as eD,Y as fD,Z as gD};
60
+ export{N as kA,Y as lA,Z as mA};
@@ -18,4 +18,4 @@ ${_}
18
18
  `)}</p>`);if(j=D.join(`
19
19
  `),Q)j=j.replace(/\n/g,`<br />
20
20
  `);for(let q=0;q<O.length;q++)j=j.replace(`\x00CODEBLOCK${q}\x00`,O[q]);return j=j.replace(/<p>\s*<\/p>/g,""),j.trim()}
21
- export{A as $x,S as ay};
21
+ export{A as fv,S as gv};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Lu as E}from"./chunk-tzd81m7r.js";import{jE as D}from"./chunk-6r70w54p.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("././ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,...q.ssg})}else{let{buildForProduction:z}=await import("././production-builder.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
3
- export{M as As};
2
+ import{Rr as E}from"./chunk-1xz0w746.js";import{pB as D}from"./chunk-xv34zbp4.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("././ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,...q.ssg})}else{let{buildForProduction:z}=await import("././production-builder.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
3
+ export{M as Gp};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Fb as J,Lb as L}from"./chunk-k7yp9h17.js";import{$c as _,Wc as Y,Yc as Z,cd as $}from"./chunk-pdv5dhen.js";import{jd as V}from"./chunk-nacsxc1r.js";import{nd as X}from"./chunk-vg97xcma.js";import{je as P,ke as Q,le as U}from"./chunk-9pzdyd8q.js";import k from"fs";import v from"path";async function I(A={}){let E=Date.now();Y();let j=await P({mode:"build"});if(!j.config.enabled){_("Story feature is disabled in config.");return}let w=await V(j);Q(j,w);let K=X(j.config,w);U(j,K),Z(w.length);let G=A.outDir??j.config.outDir,z=v.resolve(j.root,G);await k.promises.mkdir(z,{recursive:!0}),console.log(` Building to ${G}...`);let M=T(j);await k.promises.writeFile(v.join(z,"index.html"),M);let R={files:w.map((q)=>({id:q.id,fileName:q.fileName,relativePath:q.relativePath,treePath:q.treePath})),tree:K};await k.promises.writeFile(v.join(z,"stories.json"),JSON.stringify(R,null,2));let W={theme:j.config.theme,responsivePresets:j.config.responsivePresets,backgroundPresets:j.config.backgroundPresets};await k.promises.writeFile(v.join(z,"config.json"),JSON.stringify(W,null,2));let N=v.join(z,"stories");await k.promises.mkdir(N,{recursive:!0});for(let q of w){let g=await k.promises.readFile(q.path,"utf-8");await k.promises.writeFile(v.join(N,`${q.id}.stx`),g)}J(j);let B=L();await k.promises.writeFile(v.join(z,"search-index.json"),B);let H=Date.now()-E;$(w.length,G,H)}function T(A){let{theme:E}=A.config,j=E.title||"STX Story";return`<!DOCTYPE html>
2
+ import{Bb as J,Hb as L}from"./chunk-0jd0pndq.js";import{Sc as Y,Uc as Z,Xc as _,_c as $}from"./chunk-yn38c15w.js";import{fd as V}from"./chunk-bpgg59wa.js";import{jd as X}from"./chunk-y0qg6rrv.js";import{fe as P,ge as Q,he as U}from"./chunk-0qnz93q2.js";import k from"fs";import v from"path";async function I(A={}){let E=Date.now();Y();let j=await P({mode:"build"});if(!j.config.enabled){_("Story feature is disabled in config.");return}let w=await V(j);Q(j,w);let K=X(j.config,w);U(j,K),Z(w.length);let G=A.outDir??j.config.outDir,z=v.resolve(j.root,G);await k.promises.mkdir(z,{recursive:!0}),console.log(` Building to ${G}...`);let M=T(j);await k.promises.writeFile(v.join(z,"index.html"),M);let R={files:w.map((q)=>({id:q.id,fileName:q.fileName,relativePath:q.relativePath,treePath:q.treePath})),tree:K};await k.promises.writeFile(v.join(z,"stories.json"),JSON.stringify(R,null,2));let W={theme:j.config.theme,responsivePresets:j.config.responsivePresets,backgroundPresets:j.config.backgroundPresets};await k.promises.writeFile(v.join(z,"config.json"),JSON.stringify(W,null,2));let N=v.join(z,"stories");await k.promises.mkdir(N,{recursive:!0});for(let q of w){let g=await k.promises.readFile(q.path,"utf-8");await k.promises.writeFile(v.join(N,`${q.id}.stx`),g)}J(j);let B=L();await k.promises.writeFile(v.join(z,"search-index.json"),B);let H=Date.now()-E;$(w.length,G,H)}function T(A){let{theme:E}=A.config,j=E.title||"STX Story";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -114,4 +114,4 @@ import{Fb as J,Lb as L}from"./chunk-k7yp9h17.js";import{$c as _,Wc as Y,Yc as Z,
114
114
  </script>
115
115
  </body>
116
116
  </html>`}var h=I;
117
- export{I as Db,h as Eb};
117
+ export{I as zb,h as Ab};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import{je as J}from"./chunk-9pzdyd8q.js";import{jE as N}from"./chunk-6r70w54p.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{pB as N}from"./chunk-xv34zbp4.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}
6
6
  `),A.open)try{let{exec:k}=await import("child_process"),y=process.platform;k(`${y==="darwin"?"open":y==="win32"?"start":"xdg-open"} http://localhost:${j}`)}catch{}let E=()=>{console.log(`
7
7
  Shutting down...`),L.stop(),process.exit(0)};process.on("SIGINT",E),process.on("SIGTERM",E),await new Promise(()=>{})}var W=Q;
8
- export{Q as xb,W as yb};
8
+ export{Q as tb,W as ub};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ev as T,Ku as B}from"./chunk-tzd81m7r.js";import{Zv as N}from"./chunk-nwfa5766.js";import{jE as M}from"./chunk-6r70w54p.js";import O from"fs";import Z from"path";async function S(q,G={},z={}){let E=await Bun.file(q).text(),j=E.match(/<script\s+server\s*>([\s\S]*?)<\/script>/i),F=j?j[1]:"",J=j?E.replace(/<script\s+server\s*>[\s\S]*?<\/script>/i,""):E;J=J.replace(/<script\s+client\s*>/gi,"<script>");let K={__filename:q,__dirname:Z.dirname(q),props:G,...G};if(F)await N(F,K,q);let L={...B,...z};return await T(J,K,q,L,new Set)}async function y(q){let G=performance.now(),z={success:!0,views:[],errors:[],duration:0},{viewsDir:E,outputDir:j,componentsDir:F=Z.join(E,"components"),layoutsDir:J=Z.join(E,"layouts"),partialsDir:K=Z.join(E,"partials"),globalProps:L={},placeholders:Q={},views:U,debug:I=!1,generateManifest:R=!0}=q;if(I)console.log("Building STX views..."),console.log(` Source: ${E}`),console.log(` Output: ${j}`);O.mkdirSync(j,{recursive:!0});let A={componentsDir:F,layoutsDir:J,partialsDir:K,debug:I},_;if(U&&U.length>0)_=U;else _=O.readdirSync(E).filter((W)=>W.endsWith(".stx")).map((W)=>({input:W}));for(let H of _){let W=Z.join(E,H.input),X=H.output||H.input.replace(/\.stx$/,".html"),$=Z.join(j,X);if(I)console.log(` Building ${H.input}...`);try{let Y={...L,...H.props,...Q},k=await S(W,Y,A);await Bun.write($,k),z.views.push(X)}catch(Y){let k=Y instanceof Error?Y.message:String(Y);if(z.errors.push({file:H.input,error:k}),z.success=!1,I)console.error(` Error: ${k}`)}}if(R){let H={buildTime:new Date().toISOString(),views:z.views,placeholders:Q,errors:z.errors.length>0?z.errors:void 0};await Bun.write(Z.join(j,"manifest.json"),JSON.stringify(H,null,2))}if(z.duration=performance.now()-G,I)if(z.success)console.log(`
2
+ import{Ks as T,Qr as B}from"./chunk-1xz0w746.js";import{dt as N}from"./chunk-g1vt329s.js";import{pB as M}from"./chunk-xv34zbp4.js";import O from"fs";import Z from"path";async function S(q,G={},z={}){let E=await Bun.file(q).text(),j=E.match(/<script\s+server\s*>([\s\S]*?)<\/script>/i),F=j?j[1]:"",J=j?E.replace(/<script\s+server\s*>[\s\S]*?<\/script>/i,""):E;J=J.replace(/<script\s+client\s*>/gi,"<script>");let K={__filename:q,__dirname:Z.dirname(q),props:G,...G};if(F)await N(F,K,q);let L={...B,...z};return await T(J,K,q,L,new Set)}async function y(q){let G=performance.now(),z={success:!0,views:[],errors:[],duration:0},{viewsDir:E,outputDir:j,componentsDir:F=Z.join(E,"components"),layoutsDir:J=Z.join(E,"layouts"),partialsDir:K=Z.join(E,"partials"),globalProps:L={},placeholders:Q={},views:U,debug:I=!1,generateManifest:R=!0}=q;if(I)console.log("Building STX views..."),console.log(` Source: ${E}`),console.log(` Output: ${j}`);O.mkdirSync(j,{recursive:!0});let A={componentsDir:F,layoutsDir:J,partialsDir:K,debug:I},_;if(U&&U.length>0)_=U;else _=O.readdirSync(E).filter((W)=>W.endsWith(".stx")).map((W)=>({input:W}));for(let H of _){let W=Z.join(E,H.input),X=H.output||H.input.replace(/\.stx$/,".html"),$=Z.join(j,X);if(I)console.log(` Building ${H.input}...`);try{let Y={...L,...H.props,...Q},k=await S(W,Y,A);await Bun.write($,k),z.views.push(X)}catch(Y){let k=Y instanceof Error?Y.message:String(Y);if(z.errors.push({file:H.input,error:k}),z.success=!1,I)console.error(` Error: ${k}`)}}if(R){let H={buildTime:new Date().toISOString(),views:z.views,placeholders:Q,errors:z.errors.length>0?z.errors:void 0};await Bun.write(Z.join(j,"manifest.json"),JSON.stringify(H,null,2))}if(z.duration=performance.now()-G,I)if(z.success)console.log(`
3
3
  \u2705 Built ${z.views.length} views in ${z.duration.toFixed(0)}ms`);else console.log(`
4
4
  \u26A0\uFE0F Built ${z.views.length} views with ${z.errors.length} errors`);return z}function C(q,G){let z=O.watch(q.viewsDir,{recursive:!0},async(E,j)=>{if(!j)return;if(j.endsWith(".stx")||j.endsWith(".ts")||j.endsWith(".js")){if(q.debug)console.log(`
5
5
  File changed: ${j}, rebuilding...`);let F=await y(q);G?.(F)}});return{close:()=>z.close()}}async function g(q,G={},z={}){let E={...z,skipDefaultSeoTags:!0,skipSignalsRuntime:!0},j=await S(q,G,E);j=await x(j),j=j.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j=j.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,""),j=j.replace(/<!--\s*stx SEO Tags\s*-->/gi,""),j=j.replace(/\n\s*\n\s*\n/g,`
@@ -9,4 +9,4 @@ File changed: ${j}, rebuilding...`);let F=await y(q);G?.(F)}});return{close:()=>
9
9
  `).replace(/<\/td>/gi,"\t").replace(/<[^>]*>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&copy;/g,"(c)").replace(/&middot;/g,"-").replace(/\n\s*\n\s*\n/g,`
10
10
 
11
11
  `).trim()}var u=y;
12
- export{S as vt,y as wt,C as xt,g as yt,u as zt};
12
+ export{S as Bq,y as Cq,C as Dq,g as Eq,u as Fq};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ export{O as Wg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var O=new Set(["disabled","checked","readonly","required","autofocus","autoplay","controls","default","defer","formnovalidate","hidden","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","reversed","selected"]);function L(k){if(typeof k==="string")return k;if(Array.isArray(k))return k.filter(Boolean).map((F)=>L(F)).join(" ");if(k&&typeof k==="object")return Object.entries(k).filter(([,F])=>F).map(([F])=>F).join(" ");return k?String(k):""}function B(k,F){if(!/:[\w-]+=/.test(k))return k;let Q=k,P=/<(script|style)\b[^>]*>[\s\S]*?<\/\1>/gi,E=[],q;while((q=P.exec(k))!==null)E.push([q.index,q.index+q[0].length]);function V(D){return E.some(([G,U])=>D>=G&&D<U)}let _=/<([a-zA-Z][a-zA-Z0-9-]*)((?:\s+(?:[^>"']|"[^"]*"|'[^']*'))*)\s*\/?>/g,Z=[];while((q=_.exec(Q))!==null){if(V(q.index))continue;let D=q[0],G=q[2];if(!G||!G.includes(":"))continue;let U=/\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g,z,j=G,X=!1;while((z=U.exec(G))!==null){let I=z[1],H=z[2];if(H.includes("()")&&!H.includes(".get(")||H.includes("$store")||H.includes("$ref"))continue;try{let Y=Object.keys(F),K=Object.values(F),$=H.match(/^([a-zA-Z_$][\w$]*)/);if($&&!Y.includes($[1])&&!["true","false","null","undefined","Math","JSON","String","Number","Array","Object","Date","parseInt","parseFloat"].includes($[1]))continue;let J=Function(...Y,`return (${H})`)(...K);if(I==="class"){let W=L(J);if(W){let b=j.match(/\sclass="([^"]*)"/);if(b)j=j.replace(b[0],` class="${b[1]} ${W}"`);else j=j.replace(z[0],` class="${W}"`)}else j=j.replace(z[0],"");X=!0;continue}if(O.has(I)){if(J)j=j.replace(z[0],` ${I}`);else j=j.replace(z[0],"");X=!0;continue}if(J===null||J===void 0||J===!1)j=j.replace(z[0],"");else{let W=String(J).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");j=j.replace(z[0],` ${I}="${W}"`)}X=!0}catch{continue}}if(X){let I=D.endsWith("/>")?" /":"",Y=`<${q[1]}${j}${I}>`;Z.push({start:q.index,end:q.index+D.length,replacement:Y})}}for(let D=Z.length-1;D>=0;D--){let{start:G,end:U,replacement:z}=Z[D];Q=Q.slice(0,G)+z+Q.slice(U)}return Q}
3
- export{B as Cw};
3
+ export{B as It};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var J=new WeakMap;function Q(j=16){let q=new Uint8Array(j);return crypto.getRandomValues(q),btoa(String.fromCharCode(...q))}function I(j,q){if(!j)return q?.nonceGenerator?.()??Q();let z=J.get(j);if(!z)z=q?.nonceGenerator?.()??Q(),J.set(j,z);return z}function A(j){J.delete(j)}function R(j,q){let z=[];for(let[F,E]of Object.entries(j)){if(E===void 0||E===null)continue;if(typeof E==="boolean"){if(E)z.push(F);continue}if(Array.isArray(E)){let B=[...E];if(q&&(F==="script-src"||F==="style-src"))B=B.filter((G)=>!G.startsWith("'nonce-")),B.push(`'nonce-${q}'`);if(B.length>0)z.push(`${F} ${B.join(" ")}`)}}return z.join("; ")}function L(j,q){return`<meta http-equiv="Content-Security-Policy" content="${R(j,q).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}">`}var X={"default-src":["'self'"],"script-src":["'self'","'strict-dynamic'"],"style-src":["'self'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:","data:"],"connect-src":["'self'"],"media-src":["'self'"],"object-src":["'none'"],"frame-src":["'none'"],"base-uri":["'self'"],"form-action":["'self'"],"frame-ancestors":["'self'"],"upgrade-insecure-requests":!0},K={"default-src":["'self'"],"script-src":["'self'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:"],"font-src":["'self'","https:","data:"],"connect-src":["'self'","https:"],"media-src":["'self'"],"object-src":["'none'"],"frame-src":["'self'"],"base-uri":["'self'"],"form-action":["'self'"],"upgrade-insecure-requests":!0},Y={"default-src":["'self'"],"script-src":["'self'","'unsafe-inline'"],"style-src":["'self'","'unsafe-inline'"],"img-src":["'self'","data:","https:","http:"],"font-src":["'self'","https:","http:","data:"],"connect-src":["'self'","https:","http:","ws:","wss:"],"media-src":["'self'","https:","http:"],"object-src":["'none'"],"frame-src":["'self'","https:"],"base-uri":["'self'"]},Z={"default-src":["'none'"],"frame-ancestors":["'none'"]};function O(j){return{enabled:!0,directives:{strict:X,moderate:K,relaxed:Y,api:Z}[j]||K,useNonce:j==="strict",addMetaTag:!0}}function D(j,q){let z={...j};for(let[F,E]of Object.entries(q)){let B=F,G=z[B];if(E===void 0||E===null)continue;if(typeof E==="boolean")z[B]=G||E;else if(Array.isArray(E)){let U=Array.isArray(G)?G:[],W=[...new Set([...U,...E])];z[B]=W}}return z}function H(j,q,z){if(!q.enabled||!q.addMetaTag)return j;if(j.includes('http-equiv="Content-Security-Policy"'))return j;if(!j.includes("<head>")&&!j.includes("<head "))return j;let F=q.useNonce?I(z,q):void 0,E=L(q.directives,F);return j.replace(/<head([^>]*)>/,`<head$1>
3
3
  ${E}`)}function M(j,q){let z=j;return z=z.replace(/<script(?![^>]*\ssrc=)([^>]*)>/gi,(F,E)=>{if(E.includes("nonce="))return F;return`<script nonce="${q}"${E}>`}),z=z.replace(/<style([^>]*)>/gi,(F,E)=>{if(E.includes("nonce="))return F;return`<style nonce="${q}"${E}>`}),z}function S(j,q,z,F){let E=j,B=F.csp;if(E=E.replace(/@csp\b/g,()=>{if(!B?.enabled||!B.directives)return"<!-- CSP not configured -->";let G=B.useNonce?I(q,B):void 0;return L(B.directives,G)}),E=E.replace(/@cspNonce\b/g,()=>{if(!B?.enabled||!B.useNonce)return"";return I(q,B)}),B?.enabled&&B.useNonce)q.cspNonce=I(q,B);return E}var _={name:"csp",handler:(j,q,z,F)=>{let B=z.__stx_options?.csp;if(!B?.enabled||!B.directives)return"<!-- CSP not configured -->";let G=B.useNonce?I(z,B):void 0;return L(B.directives,G)},hasEndTag:!1,description:"Insert Content-Security-Policy meta tag"},$={name:"cspNonce",handler:(j,q,z,F)=>{let B=z.__stx_options?.csp;if(!B?.enabled||!B.useNonce)return"";return I(z,B)},hasEndTag:!1,description:"Output the current CSP nonce value"};function T(){return[_,$]}function V(j){let q=[];if(j["script-src"]?.includes("'unsafe-inline'"))q.push("CSP: Using unsafe-inline in script-src significantly reduces XSS protection");if(j["script-src"]?.includes("'unsafe-eval'"))q.push("CSP: Using unsafe-eval in script-src allows eval() and related functions");if(!j["default-src"])q.push("CSP: No default-src specified. Recommend adding default-src as a fallback");if(j["default-src"]?.includes("*"))q.push("CSP: Using * in default-src provides minimal protection");if(!j["object-src"]&&!j["default-src"]?.includes("'none'"))q.push("CSP: Consider adding object-src: none to block plugins");if(!j["base-uri"])q.push("CSP: Consider adding base-uri to prevent base tag injection attacks");for(let[z,F]of Object.entries(j))if(Array.isArray(F)&&F.includes("http:"))q.push(`CSP: Using http: in ${z} allows insecure resources`);return q}function k(j=!1){return j?"Content-Security-Policy-Report-Only":"Content-Security-Policy"}function y(j,q){if(!j.enabled)return{};let z=j.useNonce?I(q,j):void 0,F=R(j.directives,z);return{[k(j.reportOnly)]:F}}var P={enabled:!1,reportOnly:!1,directives:K,useNonce:!1,addMetaTag:!0};
4
- export{Q as Tz,I as Uz,A as Vz,R as Wz,L as Xz,X as Yz,K as Zz,Y as _z,Z as $z,O as aA,D as bA,H as cA,M as dA,S as eA,_ as fA,$ as gA,T as hA,V as iA,k as jA,y as kA,P as lA};
4
+ export{Q as Zw,I as _w,A as $w,R as ax,L as bx,X as cx,K as dx,Y as ex,Z as fx,O as gx,D as hx,H as ix,M as jx,S as kx,_ as lx,$ as mx,T as nx,V as ox,k as px,y as qx,P as rx};
@@ -3,4 +3,4 @@ function H(k,v){let z=k.url.replace(/\/$/,""),A=new Date().toISOString().slice(0
3
3
  `)}).join(`
4
4
  `),"</urlset>",""].join(`
5
5
  `)}function E(k){return k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
6
- export{H as lh};
6
+ export{H as ih};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{xB as H}from"./chunk-b0w1cm1s.js";import{FB as A}from"./chunk-jm460jxs.js";import K from"path";var I={showRelativePaths:!1,enableAutoRecovery:H(),logRecoveryWarnings:!0},B={...I};function W(j){B={...B,...j}}function X(){return{...B}}function Y(){B={...I}}function L(j){if(!B.showRelativePaths||!j)return j;let q=B.baseDir||process.cwd();try{let k=K.relative(q,j);return k.startsWith("..")?j:k}catch{return j}}class G extends Error{code;filePath;line;column;context;numericCode;constructor(j,q,k,w,y,z,J){super(j);this.code=q;this.filePath=k;this.line=w;this.column=y;this.context=z;if(this.name="StxError",this.numericCode=J||A.EVALUATION_ERROR,this.filePath)this.filePath=L(this.filePath)}}class M extends G{constructor(j,q,k,w,y,z){super(j,"stx_SYNTAX_ERROR",q,k,w,y,z||A.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class N extends G{constructor(j,q,k,w,y,z){super(j,"stx_RUNTIME_ERROR",q,k,w,y,z||A.EVALUATION_ERROR);this.name="StxRuntimeError"}}class O extends G{constructor(j,q,k,w,y,z){super(j,"stx_SECURITY_ERROR",q,k,w,y,z||A.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Q extends G{constructor(j,q,k,w,y,z){super(j,"stx_FILE_ERROR",q,k,w,y,z||A.FILE_NOT_FOUND);this.name="StxFileError"}}class R extends G{isFatal=!0;constructor(j,q,k,w,y,z){super(j,"stx_VALIDATION_ERROR",q,k,w,y,z||A.DOM_API_VIOLATION);this.name="StxValidationError"}}
3
- export{W as mB,X as nB,Y as oB,L as pB,G as qB,M as rB,N as sB,O as tB,Q as uB,R as vB};
2
+ import{Jy as H}from"./chunk-5shey2e4.js";import{Ry as A}from"./chunk-27zsyhrd.js";import K from"path";var I={showRelativePaths:!1,enableAutoRecovery:H(),logRecoveryWarnings:!0},B={...I};function W(j){B={...B,...j}}function X(){return{...B}}function Y(){B={...I}}function L(j){if(!B.showRelativePaths||!j)return j;let q=B.baseDir||process.cwd();try{let k=K.relative(q,j);return k.startsWith("..")?j:k}catch{return j}}class G extends Error{code;filePath;line;column;context;numericCode;constructor(j,q,k,w,y,z,J){super(j);this.code=q;this.filePath=k;this.line=w;this.column=y;this.context=z;if(this.name="StxError",this.numericCode=J||A.EVALUATION_ERROR,this.filePath)this.filePath=L(this.filePath)}}class M extends G{constructor(j,q,k,w,y,z){super(j,"stx_SYNTAX_ERROR",q,k,w,y,z||A.INVALID_DIRECTIVE_SYNTAX);this.name="StxSyntaxError"}}class N extends G{constructor(j,q,k,w,y,z){super(j,"stx_RUNTIME_ERROR",q,k,w,y,z||A.EVALUATION_ERROR);this.name="StxRuntimeError"}}class O extends G{constructor(j,q,k,w,y,z){super(j,"stx_SECURITY_ERROR",q,k,w,y,z||A.UNSAFE_EXPRESSION);this.name="StxSecurityError"}}class Q extends G{constructor(j,q,k,w,y,z){super(j,"stx_FILE_ERROR",q,k,w,y,z||A.FILE_NOT_FOUND);this.name="StxFileError"}}class R extends G{isFatal=!0;constructor(j,q,k,w,y,z){super(j,"stx_VALIDATION_ERROR",q,k,w,y,z||A.DOM_API_VIOLATION);this.name="StxValidationError"}}
3
+ export{W as yy,X as zy,Y as Ay,L as By,G as Cy,M as Dy,N as Ey,O as Fy,Q as Gy,R as Hy};
@@ -299,4 +299,4 @@ catch (error) {
299
299
  }
300
300
  })();
301
301
  </script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
302
- export{N as Pw,Q as Qw,T as Rw,V as Sw,X as Tw,Z as Uw};
302
+ export{N as Vt,Q as Wt,T as Xt,V as Yt,X as Zt,Z as _t};
@@ -264,4 +264,4 @@ else {
264
264
  }
265
265
  </script>
266
266
  `}
267
- export{A as Yb,B as Zb,C as _b,D as $b,E as ac};
267
+ export{A as Ub,B as Vb,C as Wb,D as Xb,E as Yb};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Vy as s,Yy as a,Zy as i}from"./chunk-9fj7hpwa.js";import{$A as I}from"./chunk-xmjedbkt.js";import{NB as c}from"./chunk-h6s1thg6.js";import{jC as v}from"./chunk-p5j0686t.js";import{jE as f}from"./chunk-6r70w54p.js";import k from"path";import y from"process";function NQ(H){let Q=[],Z=0,z=H.split(`
2
+ import{$v as s,cw as a,dw as i}from"./chunk-pa9zb7ty.js";import{fy as I}from"./chunk-bs3gmfxz.js";import{Ty as c}from"./chunk-7ed3tean.js";import{pz as v}from"./chunk-w3b6m427.js";import{pB as f}from"./chunk-xv34zbp4.js";import k from"path";import y from"process";function NQ(H){let Q=[],Z=0,z=H.split(`
3
3
  `);for(let X of z){let Y=Z,$=null,_=!1;for(let J=0;J<X.length;J++){let G=X[J];if(_){_=!1;continue}if(G==="\\"){_=!0;continue}if($){if(G===$)$=null;continue}if(G==="'"||G==='"'||G==="`"){$=G;continue}if(G==="/"&&J+1<X.length&&X[J+1]==="/")break;if(G==="{")Z++;else if(G==="}")Z--}if(Y===0){let J=X.match(/(?:const|let|var)\s+(\w+)\s*=/);if(J)Q.push(J[1]);else if(/^\s*(?:const|let|var)\s+\w+\s*;?\s*$/.test(X)){let G=X.match(/(?:const|let|var)\s+(\w+)/);if(G)Q.push(G[1])}else{let G=X.match(/(?:const|let|var)\s+(\{[^}]+\}|\[[^\]]+\])\s*=/);if(G){let B=G[1].slice(1,-1).split(",").map((R)=>{let F=R.split(":");return(F.length>1?F[1]:F[0]).trim()}).filter((R)=>/^\w+$/.test(R));Q.push(...B)}}}}return[...new Set(Q)]}function EQ(H){let Q=H;Q=Q.replace(/^\s*import\s+.*?from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*import\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Q=Q.replace(/^\s*interface\s+\w+\s*\{[\s\S]*?\n\}\s*$/gm,""),Q=Q.replace(/^\s*type\s+\w+\s*=[\s\S]*?(?=\n(?:const|let|var|function|export|interface|type|$))/gm,""),Q=Q.replace(/^(\s*(?:export\s+)?(?:const|let|var)\s+)(\w+|\{[^}]+\}|\[[^\]]+\])\s*:\s*[^=]+(\s*=)/gm,"$1$2$3");function Z(z){if(!z.includes(":"))return z;let X=[],Y="",$=0,_=0,J=null;for(let G=0;G<z.length;G++){let W=z[G];if(J){if(Y+=W,W===J)J=null;continue}if(W==='"'||W==="'"||W==="`"){J=W,Y+=W;continue}if(W==="<")$++;else if(W===">"&&$>0)$--;else if(W==="(")_++;else if(W===")")_--;if(W===","&&$===0&&_===0){X.push(Y),Y="";continue}Y+=W}if(Y)X.push(Y);return X.map((G)=>{let W=G.trim(),B=W.startsWith("..."),R=B?W.slice(3):W,F=-1,q=0;for(let N=0;N<R.length;N++)if(R[N]==="<")q++;else if(R[N]===">")q--;else if(R[N]===":"&&q===0){F=N;break}if(F===-1)return G;let M=R.substring(0,F).trim().replace(/\?$/,""),V=R.substring(F+1),b=-1,L=0;for(let N=0;N<V.length;N++)if(V[N]==="<")L++;else if(V[N]===">")L--;else if(V[N]==="="&&L===0){b=N;break}let D=B?"...":"";if(b!==-1)return`${D}${M} = ${V.substring(b+1).trim()}`;return`${D}${M}`}).join(", ")}Q=Q.replace(/\b(function\s+\w*\s*)\(([^)]*)\)/g,(z,X,Y)=>{if(!Y.includes(":"))return z;return`${X}(${Z(Y)})`});{let z=/\b(function\s+\w*\s*)\(/g,X,Y=[];while((X=z.exec(Q))!==null){let $=X.index+X[0].length-1,_=1,J=$+1,G=0,W=null;while(J<Q.length&&_>0){let F=Q[J];if(W){if(F===W)W=null;J++;continue}if(F==='"'||F==="'"||F==="`"){W=F,J++;continue}if(F==="<")G++;else if(F===">"&&G>0)G--;else if(G===0){if(F==="(")_++;else if(F===")")_--}if(_>0)J++}if(_!==0)continue;let B=Q.substring($+1,J);if(!B.includes(":"))continue;let R=Z(B);Y.push({start:$+1,end:J,replacement:R})}for(let $=Y.length-1;$>=0;$--){let{start:_,end:J,replacement:G}=Y[$];Q=Q.substring(0,_)+G+Q.substring(J)}}return Q=Q.replace(/\(([^)]*)\)\s*(?::\s*[^=]+)?\s*=>/g,(z,X)=>{if(!X.includes(":"))return z;if(X.includes("{")||X.includes("}"))return z;return`(${X.split(",").map(($)=>{let[_,...J]=$.split("="),G=_.split(":")[0].trim();if(J.length>0)return`${G} = ${J.join("=").trim()}`;return G}).join(", ")}) =>`}),Q=Q.replace(/(\))\s*:\s*([A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined)(?:<[^>]+>)?(?:\s*\|\s*(?:[A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined))*\s*(\{)/g,"$1$3"),Q=Q.replace(/(\b(?:function|class|interface|type|extends|implements)\s+\w+)\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\b(?:defineProps|withDefaults|defineEmits|defineSlots|Array|Promise|Map|Set|Record|Partial|Required|Readonly|Pick|Omit|Exclude|Extract))\s*<[^<>()]*>/g,"$1"),Q=Q.replace(/(\w+)\s*<[A-Z][^<>()]*>\s*(?=\()/g,"$1"),Q=Q.replace(/\s+as\s+(?:const|[A-Za-z]\w*(?:\[\])?(?:\s*\|\s*\w+(?:\[\])?)*)/g,""),Q=Q.replace(/\s+satisfies\s+\w+(?:<[^>]*>)?/g,""),Q=Q.replace(/(\w|\)|\])\s*!(?!=)/g,"$1"),Q=Q.replace(/^\s*(?:export\s+)?(?:const\s+)?enum\s+\w+\s*\{[^}]*\}\s*$/gm,""),Q=Q.replace(/(?<=[\s=,(])<[A-Z]\w*(?:\[\])?>/g,""),Q=Q.replace(/\n\s*\n\s*\n/g,`
4
4
 
5
5
  `),Q}async function xQ(H,Q,Z,z={}){if(!H.trim())return;let X;try{let U=new Bun.Transpiler({loader:"ts",target:"browser",define:c()}),A=H.replace(/^\s*import\s+\w+\s+from\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,"");A=A.replace(/^\s*import\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,""),X=U.transformSync(A)}catch{X=EQ(H)}let Y={exports:{}},$=Y.exports,_=y.cwd(),J={},G=[...X.matchAll(/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g)||[]].map((U)=>U[1]).filter((U)=>!U.startsWith("node:")&&!U.startsWith(".")&&!["fs","path","os","child_process","crypto","http","https","url","util","stream","events","buffer","net","querystring","zlib","tls"].includes(U));for(let U of G)try{let A=k.resolve(_,"node_modules",U),O=k.join(A,"package.json"),T=JSON.parse(f("fs").readFileSync(O,"utf8")),w=T.main||"index.js";if(T.exports){let j=typeof T.exports==="string"?T.exports:T.exports["."];if(typeof j==="string")w=j;else if(j?.bun)w=j.bun;else if(j?.import)w=j.import;else if(j?.default)w=j.default}J[U]=await import(k.resolve(A,w))}catch{}let W=(U)=>{if(J[U])return J[U];return f(U)},B=Q.props||{},R=(U)=>{if(!U)return B;let A={};for(let[O,T]of Object.entries(U)){let w=B[O];if(w!==void 0)A[O]=w;else if(typeof T==="function")A[O]=T();else A[O]=T}return A};for(let[U,A]of Object.entries(B))Object.defineProperty(R,U,{value:A,enumerable:!0,configurable:!0,writable:!0});let F=(U)=>{if(!U)return B;let A={...B};for(let[O,T]of Object.entries(U)){let w=T&&typeof T==="object"&&!Array.isArray(T)?T:{type:T};if(A[O]===void 0&&w.default!==void 0)A[O]=typeof w.default==="function"?w.default():w.default}return A},q=()=>Q.slots||{},E=(U,A)=>{let O={...U};for(let[T,w]of Object.entries(A))if(O[T]===void 0)if(typeof w==="function")O[T]=w();else O[T]=w;return O},M=(U)=>{let A=()=>U;return A.set=(O)=>{},A.update=(O)=>{},A},V=(U)=>{let A,O=!1;return()=>{if(!O)try{A=U(),O=!0}catch{A=void 0}return A}},b=(U)=>{},L=(U)=>U(),D=(U)=>{},N=(U)=>{},S=(U)=>{},e=()=>{let U=Q.__stxServeContext,A=Q.__stxServeSearch??U?.search??"",O=U?.path??"";return{params:Q.params??{},query:Object.fromEntries(new URLSearchParams(A)),path:O,name:"",fullPath:O+A,hash:"",matched:[]}},QQ=()=>({push:(U)=>{},replace:(U)=>{},back:()=>{},forward:()=>{},go:(U)=>{}}),XQ=(U)=>{a(U);let A=Q.__stx_runtime_head||{},O=U||{};Q.__stx_runtime_head={...A,...O.title&&{title:O.title},meta:[...A.meta||[],...O.meta||[]],link:[...A.link||[],...O.link||[]],script:[...A.script||[],...O.script||[]],htmlAttrs:{...A.htmlAttrs||{},...O.htmlAttrs||{}},bodyAttrs:{...A.bodyAttrs||{},...O.bodyAttrs||{}}}},YQ=(U)=>{i(U);let A=s();Q.__stx_runtime_head={...Q.__stx_runtime_head||{},...A.title&&{title:A.title},meta:A.meta?[...A.meta]:[]}},ZQ=(U)=>({value:U}),zQ=(U)=>U,GQ=(U)=>({value:typeof U==="function"?U():U}),$Q=(U,A)=>{},HQ=(U)=>{},UQ=(U)=>{},_Q=(U)=>U?U():Promise.resolve(),JQ=(U)=>(A,...O)=>{},WQ=(U)=>{},AQ=(U,A)=>{},BQ=(U,A)=>A,FQ=()=>({value:"light"}),OQ=()=>({value:!1}),C={siteId:void 0,API_ENDPOINT:"",ANALYTICS_SITE_ID:void 0,location:{href:"",pathname:"",search:"",hash:"",origin:"",host:"",hostname:"",protocol:"https:",assign:()=>{},replace:()=>{},reload:()=>{}},localStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},sessionStorage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{},clear:()=>{}},fetch:globalThis.fetch,addEventListener:()=>{},removeEventListener:()=>{},setTimeout:()=>0,clearTimeout:()=>{},setInterval:()=>0,clearInterval:()=>{},requestAnimationFrame:()=>0,cancelAnimationFrame:()=>{},alert:()=>{},confirm:()=>!1,prompt:()=>null,getComputedStyle:()=>({}),matchMedia:()=>({matches:!1,addListener:()=>{},removeListener:()=>{}}),getDateRangeParams:()=>"",stx:{}},RQ=new Proxy(C,{get(U,A){if(A in U)return U[A];return},set(U,A,O){return U[A]=O,!0}}),KQ={getElementById:()=>null,querySelector:()=>null,querySelectorAll:()=>[],createElement:()=>({}),createTextNode:()=>({}),body:{},head:{},documentElement:{},addEventListener:()=>{},removeEventListener:()=>{}},qQ=console;try{let U=MQ(X,Z),A=new Set(Object.keys(B)),O=Object.keys(Q).filter((K)=>!A.has(K)&&K!=="props"),T=O.map((K)=>Q[K]),w=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","let","new","return","super","switch","this","throw","try","typeof","var","void","while","with","yield","enum","await","async","module","exports","require","params","window","document","console","state","derived","effect"]),j=[],x=[];for(let[K,P]of Object.entries(B)){if(!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(K))continue;if(w.has(K))continue;if(new RegExp(`(?:^|[\\s;{])(?:const|let|var|function)\\s+${K}\\b`).test(U))continue;j.push(K),x.push(P)}let TQ=NQ(U).map((K)=>`module.exports.${K} = typeof ${K} !== 'undefined' ? ${K} : module.exports.${K};`).join(`
@@ -18,4 +18,4 @@ ${H[J]}`,J++;else break}return _=_.trim().replace(/;$/,""),{type:X,name:Y,value:
18
18
  ${Y}`,X++}while(X<H.length){let Y=H[X].trim();if(Y.startsWith(".")||Y.startsWith("?."))z+=`
19
19
  ${H[X]}`,X++;else break}return{value:z,nextIndex:X}}function LQ(H,Q,Z){let z=Z,X=Q+1;while(X<H.length){let Y=z.indexOf("{");if(Y!==-1){if(I(z,"{","}",Y)!==-1)break}let $=H[X];z+=`
20
20
  ${$}`,X++}return{functionCode:z,nextIndex:X}}function o(H,Q){let Z=v(H,Q)??v(`(${H})`,Q);if(Z!==void 0)return Z;if(!/\bprocess\b/.test(H))return;let z={...Q,process:Object.freeze({env:{...y.env}})};try{return Function(...Object.keys(z),`'use strict'; return (${H});`)(...Object.values(z))}catch{try{return Function(...Object.keys(z),`'use strict'; return ${H};`)(...Object.values(z))}catch{return}}}async function DQ(H,Q,Z){let z=H.matchAll(/export\s+(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:export\s+|$))/g);for(let Y of z){let[,,$,_]=Y;try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch(J){console.warn(`Failed to parse export ${$} in fallback:`,J)}}let X=H.matchAll(/(?:^|\n)\s*(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:(?:const|let|var|function|export)\s+|$))/g);for(let Y of X){let[,,$,_]=Y;if(!($ in Q))try{let J=_.trim().replace(/;$/,""),G=o(J,Q);if(G!==void 0)Q[$]=G}catch{}}}function hQ(H){let Q=H.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i),Z=Q?Q[1]:"",z=Q?H.replace(/<script\b[^>]*>[\s\S]*?<\/script>/i,""):H;return{scriptContent:Z,templateWithoutScript:z}}function mQ(H){let Q=H.trim();if(!Q)return!1;return/(?:const|let|var|function)\s+\w+/.test(Q)}
21
- export{EQ as Yv,xQ as Zv,MQ as _v,hQ as $v,mQ as aw};
21
+ export{EQ as ct,xQ as dt,MQ as et,hQ as ft,mQ as gt};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ua as x}from"./chunk-5wecgn5n.js";import{hb as w}from"./chunk-zwpm1pa8.js";function K(j){let b={};if(j)for(let q of j.props)b[q.name]=q.default;return{collapsed:!1,values:b,filter:""}}function N(j,b){if(!j)return`
2
+ import{Qa as x}from"./chunk-7cgmq685.js";import{db as w}from"./chunk-vcr5pzpx.js";function K(j){let b={};if(j)for(let q of j.props)b[q.name]=q.default;return{collapsed:!1,values:b,filter:""}}function N(j,b){if(!j)return`
3
3
  <div class="stx-controls-panel">
4
4
  <div class="stx-controls-empty">
5
5
  Select a story to edit props
@@ -137,4 +137,4 @@ import{Ua as x}from"./chunk-5wecgn5n.js";import{hb as w}from"./chunk-zwpm1pa8.js
137
137
  font-size: 12px;
138
138
  }
139
139
  `}function F(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}
140
- export{K as n,N as o,O as p,P as q};
140
+ export{K as j,N as k,O as l,P as m};
@@ -20,4 +20,4 @@ function E(b){return b.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/
20
20
  </script>
21
21
  </body>
22
22
  </html>`}
23
- export{K as tg};
23
+ export{K as pg};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  function t(e){return e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
3
- export{t as aC};
3
+ export{t as gz};
@@ -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 Aj};
292
+ export{g as xj};
@@ -144,4 +144,4 @@ var N=new Map,Q=new Map;function T(A){if(N.set(A.name,A),A.client)Q.set(A.name,A
144
144
  console.log('[stx] Directive runtime initialized');
145
145
  })();
146
146
  `}function $(A){let B=/v-(\w+)(?::(\w+))?(?:\.([\w.]+))?="([^"]*)"/g;return A.replace(B,(C,F,H,L,J)=>{let E=(L?L.split("."):[]).reduce((M,S)=>{return M[S]=!0,M},{});return`data-stx-directive="${F}:${J}" data-stx-directive-arg="${H||""}" data-stx-directive-modifiers='${JSON.stringify(E)}'`})}
147
- export{T as nz,V as oz,W as pz,X as qz,G as rz,Y as sz,Z as tz,_ as uz,$ as vz};
147
+ export{T as tw,V as uw,W as vw,X as ww,G as xw,Y as yw,Z as zw,_ as Aw,$ as Bw};
@@ -142,4 +142,4 @@ window.applyPreset = window.__stxPresets.applyPreset;
142
142
  window.deletePreset = window.__stxPresets.deletePreset;
143
143
  </script>
144
144
  `}
145
- export{F as hc,X as ic,b as jc,j as kc};
145
+ export{F as dc,X as ec,b as fc,j as gc};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{fe as J}from"./chunk-5e2khb7q.js";import{je as H}from"./chunk-9pzdyd8q.js";import{jE as I}from"./chunk-6r70w54p.js";async function P(j={}){let{describe:A,test:z,expect:k}=await import("bun:test"),D=await H({mode:"build"});A("STX Story Visual Tests",()=>{z("should pass visual regression tests",async()=>{let q=await J(D,{filter:j.filter,threshold:j.threshold,update:j.update});if(console.log(`
2
+ import{be as J}from"./chunk-hc2mf5h6.js";import{fe as H}from"./chunk-0qnz93q2.js";import{pB as I}from"./chunk-xv34zbp4.js";async function P(j={}){let{describe:A,test:z,expect:k}=await import("bun:test"),D=await H({mode:"build"});A("STX Story Visual Tests",()=>{z("should pass visual regression tests",async()=>{let q=await J(D,{filter:j.filter,threshold:j.threshold,update:j.update});if(console.log(`
3
3
  Visual Tests: ${q.passed}/${q.total} passed`),q.failed>0){console.log(`
4
4
  Failed tests:`);for(let E of q.failures)console.log(` \u2717 ${E.storyId} - ${E.variantId}`),console.log(` Difference: ${(E.difference??0).toFixed(2)}%`)}k(q.failed).toBe(0)},j.timeout||30000)})}async function Q(j={}){let{describe:A,test:z,expect:k}=await import("bun:test"),D=await H({mode:"build"}),{scanStoryFiles:q}=await import("./story/collect/scanner.js"),E=await q(D);A("STX Stories",()=>{for(let G of E){if(j.filter&&j.filter.length>0){if(!j.filter.some((K)=>G.fileName.toLowerCase().includes(K.toLowerCase())))continue}A(G.fileName,()=>{if(z("should render without errors",async()=>{let B=await Bun.file(G.path).text();k(B).toBeTruthy(),k(B.length).toBeGreaterThan(0)}),G.story)for(let B of G.story.variants)z(`variant: ${B.title}`,async()=>{if(k(B.title).toBeTruthy(),B.source)k(B.source.length).toBeGreaterThan(0)})})}})}async function L(j={}){let A=Date.now(),z=await H({mode:"build"}),k=await J(z,{filter:j.filter,threshold:j.threshold,update:j.update});return{passed:k.passed,failed:k.failed,total:k.total,duration:Date.now()-A}}function R(j){return`/**
5
5
  * Auto-generated story tests
@@ -25,4 +25,4 @@ describe('Story Visual Tests', () => {
25
25
  ${k}: ${D}`),console.log("Running tests...");let q=await L(j);if(q.failed>0)console.log(`
26
26
  \u274C ${q.failed} test(s) failed`);else console.log(`
27
27
  \u2713 All ${q.total} tests passed (${q.duration}ms)`)})}
28
- export{P as ae,Q as be,L as ce,R as de,U as ee};
28
+ export{P as Yd,Q as Zd,L as _d,R as $d,U as ae};