@stacksjs/stx 0.2.706 → 0.2.708

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 (266) hide show
  1. package/dist/app-shell.d.ts +2 -1
  2. package/dist/app-shell.js +5 -2
  3. package/dist/{chunk-e3yhx053.js → chunk-029qng4p.js} +5 -5
  4. package/dist/chunk-03p4w958.js +2 -0
  5. package/dist/chunk-0dve54ne.js +3 -0
  6. package/dist/chunk-0jtrdgyv.js +422 -0
  7. package/dist/{chunk-m4j9gedb.js → chunk-0myrwz84.js} +48 -8
  8. package/dist/chunk-12vjp2gr.js +2 -0
  9. package/dist/chunk-18fr730w.js +2 -0
  10. package/dist/chunk-19knw8c6.js +2 -0
  11. package/dist/{chunk-5bgkb4vm.js → chunk-1kwsnqr1.js} +3 -3
  12. package/dist/{chunk-n2ema4wf.js → chunk-1xjv71dw.js} +2 -2
  13. package/dist/chunk-27catnpa.js +2 -0
  14. package/dist/chunk-29sapda2.js +2 -0
  15. package/dist/{chunk-d597d0dp.js → chunk-2aarvd3a.js} +6 -6
  16. package/dist/chunk-2k6d8s6h.js +2 -0
  17. package/dist/chunk-2qf6kd9r.js +2 -0
  18. package/dist/chunk-2snfd93r.js +2 -0
  19. package/dist/chunk-2srb5f7t.js +2 -0
  20. package/dist/{chunk-y91rz3rq.js → chunk-3457kk19.js} +7 -7
  21. package/dist/chunk-3907sad1.js +2 -0
  22. package/dist/chunk-3nsdb1fg.js +2 -0
  23. package/dist/chunk-3qnke2jb.js +2 -0
  24. package/dist/chunk-3sg2ardr.js +2 -0
  25. package/dist/chunk-3t3p2c1t.js +65 -0
  26. package/dist/chunk-3vsnnr1b.js +2 -0
  27. package/dist/{chunk-3850m7ab.js → chunk-3wkgd883.js} +1 -1
  28. package/dist/{chunk-epnpst9q.js → chunk-3xmt01wr.js} +11 -11
  29. package/dist/{chunk-t27fecet.js → chunk-42w6snem.js} +4 -4
  30. package/dist/chunk-48936paw.js +2 -0
  31. package/dist/chunk-4c1fbthr.js +2 -0
  32. package/dist/{chunk-zggdhtmn.js → chunk-4ckxs446.js} +3 -3
  33. package/dist/chunk-4cs5t287.js +2 -0
  34. package/dist/chunk-4fxg20je.js +2 -0
  35. package/dist/chunk-58v34kba.js +2 -0
  36. package/dist/chunk-5n4qg8za.js +3 -0
  37. package/dist/{chunk-j9h41w8b.js → chunk-609pekf5.js} +2 -2
  38. package/dist/chunk-65fcex5r.js +42 -0
  39. package/dist/{chunk-1kr1mpft.js → chunk-67abad76.js} +1 -1
  40. package/dist/{chunk-7smgebdq.js → chunk-6cz1sbb1.js} +3 -3
  41. package/dist/{chunk-4sesw88b.js → chunk-6n11z33h.js} +5 -5
  42. package/dist/chunk-6ndeycxk.js +2 -0
  43. package/dist/{chunk-tp4eqfxq.js → chunk-6ts3sthp.js} +2 -2
  44. package/dist/chunk-75n3vbtk.js +2 -0
  45. package/dist/{chunk-8w4y3dx3.js → chunk-768evhvm.js} +2 -2
  46. package/dist/chunk-7dc3n69c.js +3 -0
  47. package/dist/{chunk-66cfnzem.js → chunk-7kaadsd1.js} +5 -5
  48. package/dist/{chunk-ccqe741j.js → chunk-83p5k4eb.js} +2 -2
  49. package/dist/chunk-86775qk0.js +2 -0
  50. package/dist/chunk-8c4zbq1k.js +2 -0
  51. package/dist/chunk-8s4rxgs8.js +2 -0
  52. package/dist/chunk-8t9em8md.js +2 -0
  53. package/dist/{chunk-vfjenjez.js → chunk-8v2vbc4y.js} +1 -1
  54. package/dist/chunk-8z469777.js +2 -0
  55. package/dist/{chunk-9p452mq6.js → chunk-90kfvtf6.js} +114 -114
  56. package/dist/{chunk-rcdjse0z.js → chunk-93y8zwcz.js} +5 -5
  57. package/dist/chunk-9736003n.js +2 -0
  58. package/dist/chunk-97r557ws.js +2 -0
  59. package/dist/chunk-9adx6f4k.js +3 -0
  60. package/dist/{chunk-5w1erc2m.js → chunk-9dg5ja4w.js} +1 -1
  61. package/dist/chunk-9nvywf05.js +3 -0
  62. package/dist/chunk-9wgvn5rn.js +24 -0
  63. package/dist/chunk-9whmbfwx.js +2 -0
  64. package/dist/{chunk-2e2qnce5.js → chunk-9xb33nz0.js} +2 -2
  65. package/dist/chunk-a32xsr61.js +11 -0
  66. package/dist/{chunk-3hxd5td3.js → chunk-am4wadh7.js} +2 -2
  67. package/dist/{chunk-wqe98032.js → chunk-an387127.js} +2 -2
  68. package/dist/{chunk-bsr9wnq4.js → chunk-ap30qs8p.js} +2 -2
  69. package/dist/chunk-avr65xra.js +2 -0
  70. package/dist/chunk-axwwhdtt.js +2 -0
  71. package/dist/chunk-b6318vv3.js +2 -0
  72. package/dist/{chunk-7kn0d1f1.js → chunk-b7j48bq9.js} +2 -2
  73. package/dist/chunk-bcr8sq50.js +2 -0
  74. package/dist/chunk-bhpsr1mt.js +20 -0
  75. package/dist/{chunk-3ja845kw.js → chunk-c2b5p621.js} +171 -171
  76. package/dist/{chunk-11mjqfde.js → chunk-c71f6mfr.js} +45 -45
  77. package/dist/chunk-ccty08sm.js +32 -0
  78. package/dist/chunk-cjx11tgd.js +2 -0
  79. package/dist/{chunk-njhd845r.js → chunk-ckrmrdjp.js} +5 -5
  80. package/dist/chunk-cqnpjdc9.js +2 -0
  81. package/dist/{chunk-k296qq0p.js → chunk-cwhzk2n3.js} +2 -2
  82. package/dist/{chunk-nv886zy6.js → chunk-d2xnkt8m.js} +10 -10
  83. package/dist/chunk-dedmk383.js +2 -0
  84. package/dist/chunk-dhdt7e54.js +2 -0
  85. package/dist/chunk-dxqvv686.js +3 -0
  86. package/dist/chunk-e5vsw0fw.js +4 -0
  87. package/dist/{chunk-qef5mz20.js → chunk-e8brwwp1.js} +105 -105
  88. package/dist/{chunk-b3sw5ykg.js → chunk-edka95zp.js} +3 -3
  89. package/dist/{chunk-y7xsjr28.js → chunk-erqsgfdj.js} +1 -1
  90. package/dist/chunk-eywx2f4h.js +2 -0
  91. package/dist/chunk-f6ybdjt0.js +14 -0
  92. package/dist/{chunk-0qtygx7m.js → chunk-f9b7847f.js} +4 -4
  93. package/dist/{chunk-44c1mbye.js → chunk-fcbd7kwj.js} +3 -3
  94. package/dist/chunk-fj3pct59.js +2 -0
  95. package/dist/chunk-fvk1xr5a.js +2 -0
  96. package/dist/{chunk-b2j7s1a2.js → chunk-g1tq4xdb.js} +2 -2
  97. package/dist/chunk-g6wd49b5.js +2 -0
  98. package/dist/chunk-gk0nq2ky.js +2 -0
  99. package/dist/{chunk-z9csfarm.js → chunk-gvs17jd0.js} +11 -11
  100. package/dist/chunk-h6pmg82p.js +4 -0
  101. package/dist/chunk-h8kbcz9t.js +2 -0
  102. package/dist/chunk-h9n71rdn.js +2 -0
  103. package/dist/{chunk-eb3xg8an.js → chunk-hb77kw66.js} +1 -1
  104. package/dist/{chunk-a8erwxng.js → chunk-hmkg3xy0.js} +3 -3
  105. package/dist/{chunk-yn9kvsk1.js → chunk-j2mpqa4p.js} +2 -2
  106. package/dist/chunk-j7gg6xrc.js +2 -0
  107. package/dist/{chunk-gp9k0t3g.js → chunk-jb5sftzz.js} +2 -2
  108. package/dist/{chunk-t8d33x9w.js → chunk-khrckvwn.js} +4 -4
  109. package/dist/{chunk-4x2gnvz1.js → chunk-kxf8z7vp.js} +2 -2
  110. package/dist/{chunk-ygtfjnqj.js → chunk-kxwfrdt3.js} +2 -2
  111. package/dist/{chunk-ah5ch04j.js → chunk-mr3r8crk.js} +2 -2
  112. package/dist/chunk-mzwa2478.js +2 -0
  113. package/dist/chunk-n6carvxa.js +2 -0
  114. package/dist/chunk-ncs2j5kc.js +3 -0
  115. package/dist/{chunk-b1a79hgk.js → chunk-nde9yj3n.js} +2 -2
  116. package/dist/{chunk-2gzrx4ma.js → chunk-p3dkhz9v.js} +56 -56
  117. package/dist/{chunk-3ys3sa08.js → chunk-qa9t9k6z.js} +1 -1
  118. package/dist/{chunk-p4czdmrr.js → chunk-qcw1neka.js} +2 -2
  119. package/dist/chunk-r5k21k3x.js +54 -0
  120. package/dist/chunk-r6bc2q44.js +2 -0
  121. package/dist/{chunk-sxf17xfc.js → chunk-rb2a1qxb.js} +6 -6
  122. package/dist/chunk-rdj74dqc.js +2 -0
  123. package/dist/chunk-rswg7xsg.js +18 -0
  124. package/dist/chunk-rtbkjq0y.js +2 -0
  125. package/dist/chunk-rwjgpmrw.js +2 -0
  126. package/dist/chunk-s1vj8gtz.js +21 -0
  127. package/dist/{chunk-416jy1m5.js → chunk-s9b6abkb.js} +2 -2
  128. package/dist/{chunk-2p34qf9c.js → chunk-stvw8y3c.js} +2 -2
  129. package/dist/chunk-sy1btryy.js +2 -0
  130. package/dist/chunk-sz0e6tpq.js +20 -0
  131. package/dist/{chunk-9ra3ne11.js → chunk-t63f15yh.js} +3 -3
  132. package/dist/{chunk-2v7t87n8.js → chunk-t6ayy0t5.js} +2 -2
  133. package/dist/chunk-t7mbaf69.js +2 -0
  134. package/dist/{chunk-x7rtrdqq.js → chunk-tvcr9sct.js} +3 -3
  135. package/dist/chunk-v5s6r2b3.js +130 -0
  136. package/dist/chunk-vqratjvb.js +33 -0
  137. package/dist/chunk-vstvadc2.js +12 -0
  138. package/dist/chunk-w2h6nn70.js +2 -0
  139. package/dist/chunk-w8yv9hnf.js +2 -0
  140. package/dist/{chunk-ktkmv1j8.js → chunk-wbfg7p3k.js} +4 -4
  141. package/dist/chunk-weaxr0qe.js +2 -0
  142. package/dist/{chunk-3392k9vm.js → chunk-wp6q0geg.js} +2 -2
  143. package/dist/{chunk-2nqt1m3m.js → chunk-wt18wv6x.js} +2 -2
  144. package/dist/{chunk-jkywbfb0.js → chunk-x2gxx8eg.js} +2 -2
  145. package/dist/chunk-xw8wwcr8.js +25 -0
  146. package/dist/{chunk-xc03cdet.js → chunk-xyyt8v1r.js} +28 -28
  147. package/dist/chunk-ykmcnk3x.js +2 -0
  148. package/dist/chunk-yw66yks2.js +43 -0
  149. package/dist/chunk-z05dbey1.js +2 -0
  150. package/dist/chunk-zaj3gzet.js +2 -0
  151. package/dist/{chunk-w7e28p74.js → chunk-zav8yrtp.js} +9 -9
  152. package/dist/{chunk-ywzh979k.js → chunk-zecgd1wz.js} +4 -4
  153. package/dist/{chunk-c3hr5mm2.js → chunk-zjaw79zp.js} +2 -2
  154. package/dist/chunk-zjcmybab.js +3 -0
  155. package/dist/{chunk-fgr56q3w.js → chunk-zjw6j2x0.js} +4 -4
  156. package/dist/{chunk-k7pmzreg.js → chunk-zn3c0ew5.js} +3 -3
  157. package/dist/chunk-ztckg7a3.js +2 -0
  158. package/dist/cli.js +46 -46
  159. package/dist/craft-entry.js +2 -2
  160. package/dist/craft.js +2 -2
  161. package/dist/dev-server/serve-app.js +1 -1
  162. package/dist/expressions.js +6 -2
  163. package/dist/index.d.ts +1 -0
  164. package/dist/index.js +1 -0
  165. package/dist/island-chunking.js +5 -1
  166. package/dist/native/accessibility.d.ts +2 -2
  167. package/dist/native/accessibility.js +5 -3
  168. package/dist/native/compiler/html-to-ir.js +1 -1
  169. package/dist/native/runtime/native-host.js +5 -5
  170. package/dist/page-head.d.ts +2 -0
  171. package/dist/page-head.js +35 -0
  172. package/dist/production-builder.js +1 -1
  173. package/dist/production-server.js +2 -2
  174. package/dist/pwa.js +3 -3
  175. package/dist/site-builder/i18n.js +1 -1
  176. package/dist/ssg.js +36 -36
  177. package/dist/template-compiler.js +2 -1
  178. package/dist/utils.js +41 -0
  179. package/package.json +5 -5
  180. package/dist/chunk-09801kkv.js +0 -2
  181. package/dist/chunk-0s55c880.js +0 -2
  182. package/dist/chunk-0ys97vq8.js +0 -2
  183. package/dist/chunk-13jg9qpq.js +0 -2
  184. package/dist/chunk-1e79xcc8.js +0 -2
  185. package/dist/chunk-1yt4ynxh.js +0 -2
  186. package/dist/chunk-2whqx2c0.js +0 -2
  187. package/dist/chunk-2xtzzx00.js +0 -2
  188. package/dist/chunk-4t9cggwf.js +0 -2
  189. package/dist/chunk-5g7m27e1.js +0 -21
  190. package/dist/chunk-5h1ahj7m.js +0 -2
  191. package/dist/chunk-5zqxzyxk.js +0 -2
  192. package/dist/chunk-68wezwr7.js +0 -2
  193. package/dist/chunk-7gw96jpj.js +0 -2
  194. package/dist/chunk-7w2mrg3s.js +0 -2
  195. package/dist/chunk-8hhyp9p6.js +0 -2
  196. package/dist/chunk-926fs6g7.js +0 -2
  197. package/dist/chunk-93ft5jea.js +0 -3
  198. package/dist/chunk-94gp1g2f.js +0 -2
  199. package/dist/chunk-983zpa57.js +0 -3
  200. package/dist/chunk-98yf0aq9.js +0 -4
  201. package/dist/chunk-9wq145yr.js +0 -2
  202. package/dist/chunk-a4r93m1q.js +0 -2
  203. package/dist/chunk-aea12k73.js +0 -2
  204. package/dist/chunk-b378jpbp.js +0 -2
  205. package/dist/chunk-b7e07ybq.js +0 -3
  206. package/dist/chunk-bfhks7zf.js +0 -43
  207. package/dist/chunk-bhnq6xr5.js +0 -2
  208. package/dist/chunk-bksjh409.js +0 -2
  209. package/dist/chunk-c4sskkv6.js +0 -421
  210. package/dist/chunk-ca0vn95n.js +0 -18
  211. package/dist/chunk-cbdyns7r.js +0 -3
  212. package/dist/chunk-cknbhyw6.js +0 -2
  213. package/dist/chunk-csx3zne1.js +0 -3
  214. package/dist/chunk-d7vmzkjy.js +0 -2
  215. package/dist/chunk-djwat8vn.js +0 -2
  216. package/dist/chunk-dm7am3p3.js +0 -2
  217. package/dist/chunk-dpjs0ajs.js +0 -2
  218. package/dist/chunk-e41h5yrz.js +0 -11
  219. package/dist/chunk-f498cdg5.js +0 -2
  220. package/dist/chunk-fazw6sxz.js +0 -2
  221. package/dist/chunk-ffddd2t8.js +0 -14
  222. package/dist/chunk-fk71r3h6.js +0 -2
  223. package/dist/chunk-g1bed7se.js +0 -2
  224. package/dist/chunk-gbgbhpms.js +0 -2
  225. package/dist/chunk-gxtmq5r2.js +0 -130
  226. package/dist/chunk-h1fpjmr8.js +0 -2
  227. package/dist/chunk-ha4vb9a6.js +0 -2
  228. package/dist/chunk-hadbgke6.js +0 -2
  229. package/dist/chunk-hkmewh5h.js +0 -12
  230. package/dist/chunk-hmnj2hrh.js +0 -20
  231. package/dist/chunk-htyee0b7.js +0 -3
  232. package/dist/chunk-hz5vabap.js +0 -25
  233. package/dist/chunk-j10dhha2.js +0 -2
  234. package/dist/chunk-kjc1f6af.js +0 -2
  235. package/dist/chunk-m28d7w2s.js +0 -54
  236. package/dist/chunk-mv4wfsc5.js +0 -2
  237. package/dist/chunk-mwwd425n.js +0 -33
  238. package/dist/chunk-nbzy9m6a.js +0 -2
  239. package/dist/chunk-nmcgyxcg.js +0 -2
  240. package/dist/chunk-p4e7x4f6.js +0 -2
  241. package/dist/chunk-p6sdrq1y.js +0 -2
  242. package/dist/chunk-p78v88ng.js +0 -65
  243. package/dist/chunk-pbtr7w5e.js +0 -2
  244. package/dist/chunk-q13cp39b.js +0 -42
  245. package/dist/chunk-qfk2gh5y.js +0 -20
  246. package/dist/chunk-qqj8n8s9.js +0 -4
  247. package/dist/chunk-qtr1660m.js +0 -2
  248. package/dist/chunk-r0nm6sz0.js +0 -2
  249. package/dist/chunk-rb8g9nnc.js +0 -2
  250. package/dist/chunk-rhm7wg6p.js +0 -2
  251. package/dist/chunk-tjf1eajh.js +0 -2
  252. package/dist/chunk-ttn2hvze.js +0 -24
  253. package/dist/chunk-w42v5j1j.js +0 -2
  254. package/dist/chunk-w9kak6aj.js +0 -2
  255. package/dist/chunk-wr6z8z70.js +0 -2
  256. package/dist/chunk-xy3p6d2m.js +0 -2
  257. package/dist/chunk-yfppczrm.js +0 -2
  258. package/dist/chunk-yhf7pj12.js +0 -2
  259. package/dist/chunk-ympp4tja.js +0 -2
  260. package/dist/chunk-yyx89zxs.js +0 -2
  261. package/dist/chunk-z00ysspf.js +0 -31
  262. package/dist/chunk-z0x54ynx.js +0 -3
  263. package/dist/chunk-za6teyn1.js +0 -2
  264. package/dist/chunk-zgyw04pj.js +0 -2
  265. package/dist/chunk-zmnqha0x.js +0 -2
  266. package/dist/chunk-zw924mfr.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function it(e){let t=e.root??process.cwd(),o;try{let r=await import(c.join(t,"stx.config.ts"));o=(r.default||r).story}catch{}let a={...o,...e.config},f=l(a);return{root:t,config:f,storyFiles:[],tree:void 0,mode:e.mode}}function at(e,t){e.storyFiles=t}function ct(e,t){e.tree=t}
3
- export{it,at,ct};
2
+ import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function at(e){let t=e.root??process.cwd(),o;try{let r=await import(c.join(t,"stx.config.ts"));o=(r.default||r).story}catch{}let a={...o,...e.config},f=l(a);return{root:t,config:f,storyFiles:[],tree:void 0,mode:e.mode}}function ct(e,t){e.storyFiles=t}function lt(e,t){e.tree=t}
3
+ export{at,ct,lt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Bg}from"./chunk-nde9yj3n.js";import"./chunk-90kfvtf6.js";import"./chunk-hmkg3xy0.js";import"./chunk-stvw8y3c.js";import"./chunk-zjw6j2x0.js";import"./chunk-3t3p2c1t.js";import"./chunk-0myrwz84.js";import"./chunk-0jtrdgyv.js";import"./chunk-qcw1neka.js";import"./chunk-wp6q0geg.js";import"./chunk-xyyt8v1r.js";import"./chunk-zn3c0ew5.js";import"./chunk-wt18wv6x.js";export{Bg as buildApp};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function bl(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function _g(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await bl(r,l.join(n,`${m}.${s}`),t))}return i}
3
- export{bl,_g};
2
+ var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function wl(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function Eg(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await wl(r,l.join(n,`${m}.${s}`),t))}return i}
3
+ export{wl,Eg};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{u,f,jc,d,t,c}from"./chunk-xyyt8v1r.js";import{Je,bt,on,Io}from"./chunk-8v2vbc4y.js";function L(w,e){try{let p=w.trim();if(f(p))return d(p,Object.keys(e))(...Object.values(e));else return u(p,e)}catch{return!1}}function Q(w,e,p){let n=w,v=!0;while(v){v=!1;let g=n.match(/@switch\s*\(/);if(!g||g.index===void 0)break;let b=g.index,s=Io(n,b);if(!s)break;try{let o;if(f(s.expression))o=d(s.expression,Object.keys(e))(...Object.values(e));else o=u(s.expression,e);let r="",a=!1;for(let i of s.cases)if(i.type==="default"){if(!a)r=i.content.trim()}else try{let y;if(i.value&&f(i.value))y=d(i.value,Object.keys(e))(...Object.values(e));else if(i.value)y=u(i.value,e);if(o===y){r=i.content.trim(),a=!0;break}}catch{continue}n=n.substring(0,b)+r+n.substring(s.end),v=!0}catch(o){let r=o instanceof Error?o.message:String(o),a=c("Switch",`Error evaluating @switch expression: ${r}`,t.EVALUATION_ERROR);n=n.substring(0,b)+a+n.substring(s.end);break}}return n}function H(w){let e=[];return{masked:w.replace(/<script\b[\s\S]*?<\/script\s*>/gi,(n)=>(e.push(n),`\x00stx-script-${e.length-1}\x00`)),scripts:e}}function J(w,e){if(e.length===0)return w;return w.replace(/\u0000stx-script-(\d+)\u0000/g,(p,n)=>e[Number(n)]??p)}function se(w,e,p){let{masked:n,scripts:v}=H(w);return J(K(n,e,p),v)}function K(w,e,p){let n=w;n=Q(n,e,p);{let g=!0;while(g){g=!1;let b=n.match(/@unless\s*\(/);if(!b||b.index===void 0)break;let s=b.index,o=Je(n,s+7);if(!o)break;let r=o.endPos,a=bt(n,"unless","endunless",r);if(a===-1){console.warn(`[stx] @unless directive at position ${s} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let i=n.slice(r,a),y=o.expression,m=-1;{let x=0,k=/@(?:if|unless)\s*\(/g,h=/@(?:endif|endunless)(?![a-z])/g,E=/@else(?![a-z])/g,S=[],C;while((C=k.exec(i))!==null)S.push({pos:C.index,type:"open"});while((C=h.exec(i))!==null)S.push({pos:C.index,type:"close"});while((C=E.exec(i))!==null)S.push({pos:C.index,type:"else"});S.sort((P,R)=>P.pos-R.pos);for(let P of S)if(P.type==="open")x++;else if(P.type==="close")x--;else if(P.type==="else"&&x===0){m=P.pos;break}}let l;if(m!==-1){let x=i.slice(0,m),k=i.slice(m+5);l=`@if (${y})${k}@else ${x}@endif`}else l=`@if (!(${y}))${i}@endif`;n=n.substring(0,s)+l+n.substring(a+10),g=!0}}n=Eo(n,e,p),n=To(n,e,p),n=Co(n,e);let v=()=>{let g=on(n);if(g.length===0)return!1;let b=Array(g.length);for(let r=g.length-1;r>=0;r--){let a=g[r];try{let i="",y=!1;for(let m of a.branches){if(y)break;if(m.type==="else")i=m.content,y=!0;else try{if(m.condition?jc(m.condition,e):!1)i=m.content,y=!0}catch(l){i=c(m.type==="if"?"If":"Elseif",`Error in @${m.type}(${m.condition}): ${l instanceof Error?l.message:String(l)}`,t.EVALUATION_ERROR),y=!0}}b[r]=i}catch(i){let y=i instanceof Error?i.message:String(i);b[r]=c("If",`Error processing @if block: ${y}`,t.EVALUATION_ERROR)}}let s=Array(g.length*2+1),o=0;for(let r=0;r<g.length;r++){let a=g[r];s[r*2]=n.slice(o,a.start),s[r*2+1]=b[r],o=a.end}return s[g.length*2]=n.slice(o),n=s.join(""),!0};while(!0){let g=n;if(!v())break;if(n===g)break}return n}function q(w){let e=0;while(e<w.length&&/\s/.test(w[e]))e++;if(w[e]!=="(")return null;e++;while(e<w.length&&/\s/.test(w[e]))e++;let p=w[e];if(p!=="'"&&p!=='"')return null;e++;let n=[];while(e<w.length){let v=w[e];if(v==="\\"&&e+1<w.length){n.push(w[e+1]),e+=2;continue}if(v===p){e++;break}n.push(v),e++}while(e<w.length&&/\s/.test(w[e]))e++;if(w[e]!==")")return null;return e++,{value:n.join(""),consumed:e}}function Co(w,e){let p=w;function n(s,o,r,a){let i=1,y=a,m=new RegExp(`@${o}(?:\\s*\\(|\\s|$)`,"g"),l=new RegExp(`@${r}(?![a-z])`,"g");while(y<s.length&&i>0){m.lastIndex=y,l.lastIndex=y;let x=m.exec(s),k=l.exec(s),h=x?x.index:1/0,E=k?k.index:1/0;if(h<E)i++,y=h+x[0].length;else if(E<1/0){if(i--,i===0)return E;y=E+k[0].length}else break}return-1}function v(s,o,r){let a=0,i=new RegExp(`@${o}(?:\\s*\\(|\\s|$)`,"g"),y=new RegExp(`@${r}(?![a-z])`,"g"),m=/@else(?![a-z])/g,l=[],x;while((x=i.exec(s))!==null)l.push({pos:x.index,type:"open"});while((x=y.exec(s))!==null)l.push({pos:x.index,type:"close"});while((x=m.exec(s))!==null)l.push({pos:x.index,type:"else"});l.sort((k,h)=>k.pos-h.pos);for(let k of l)if(k.type==="open")a++;else if(k.type==="close")a--;else if(k.type==="else"&&a===0)return k.pos;return-1}{let s=!0;while(s){s=!1;let o=p.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!o||o.index===void 0)break;let r=o.index,a,i,y=p.slice(r+5),m=q(y);if(m)a=m.value,i=r+5+m.consumed;else i=r+5;let l=n(p,"auth","endauth",i);if(l===-1){console.warn(`[stx] @auth directive at position ${r} has no matching @endauth \u2014 the block was skipped.`);break}let x=p.slice(i,l),k=v(x,"auth","endauth"),h;if(!e.auth)h=!1;else h=a?L(`auth?.check && auth?.user?.[${a}]`,e):L("auth?.check",e);let E;if(k!==-1){let S=x.slice(0,k),C=x.slice(k+5);E=h?S:C}else E=h?x:"";p=p.substring(0,r)+E+p.substring(l+8),s=!0}}{let s=!0;while(s){s=!1;let o=p.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!o||o.index===void 0)break;let r=o.index,a,i,y=p.slice(r+6),m=q(y);if(m)a=m.value,i=r+6+m.consumed;else i=r+6;let l=n(p,"guest","endguest",i);if(l===-1){console.warn(`[stx] @guest directive at position ${r} has no matching @endguest \u2014 the block was skipped.`);break}let x=p.slice(i,l),k=v(x,"guest","endguest"),h;if(!e.auth)h=!0;else h=a?L(`!auth?.check || !auth?.user?.[${a}]`,e):L("!auth?.check",e);let E;if(k!==-1){let S=x.slice(0,k),C=x.slice(k+5);E=h?S:C}else E=h?x:"";p=p.substring(0,r)+E+p.substring(l+9),s=!0}}function g(s,o,r){if(e.userCan&&typeof e.userCan[s]==="boolean")return e.userCan[s];if(e.permissions?.check&&typeof e.permissions.check==="function")try{let a=[s];if(o)a.push(o);if(r){let i=L(r,e);a.push(i)}return e.permissions.check(...a)}catch{return!1}return!1}function b(s){let o=s.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!o)return null;return{ability:o[1],type:o[2],id:o[3]?.trim(),paramsEnd:o[0].length}}for(let s of["can","cannot"]){let o=`end${s}`,r=s==="can"?"elsecan":"elsecannot",a=!0;while(a){a=!1;let i=p.match(new RegExp(`@${s}\\s*\\(`));if(!i||i.index===void 0)break;let y=i.index,m=p.slice(y+`@${s}`.length),l=b(m);if(!l)break;let x=y+`@${s}`.length+l.paramsEnd,k=n(p,s,o,x);if(k===-1){console.warn(`[stx] @${s} directive at position ${y} has no matching @${o} \u2014 the block was skipped.`);break}let h=p.slice(x,k),E=[],S=0,C=new RegExp(`@${s}\\s*\\(`,"g"),P=new RegExp(`@${o}(?![a-z])`,"g"),R=new RegExp(`@${r}\\s*\\(`,"g"),T=/@else(?![a-z])/g,_=[],M;while((M=C.exec(h))!==null)_.push({pos:M.index,type:"open"});while((M=P.exec(h))!==null)_.push({pos:M.index,type:"close"});while((M=R.exec(h))!==null)_.push({pos:M.index,type:"elseDirective"});while((M=T.exec(h))!==null)_.push({pos:M.index,type:"else"});_.sort((A,z)=>A.pos-z.pos);for(let A of _){if(A.type==="open"){S++;continue}if(A.type==="close"){S--;continue}if(S===0)E.push(A)}let I=[],F=0;for(let A=0;A<E.length;A++){let z=E[A];if(I.push({content:h.slice(F,z.pos),ability:void 0}),z.type==="elseDirective"){let D=h.slice(z.pos+`@${r}`.length),B=b(D);if(B){I[I.length-1]={content:h.slice(F,z.pos)},F=z.pos+`@${r}`.length+B.paramsEnd,I.push({content:"",ability:B.ability,type:B.type,id:B.id}),I.pop();let G=E[A+1],U=G?G.pos:h.length;I.push({content:h.slice(F,U),ability:B.ability,type:B.type,id:B.id}),F=U}}else F=z.pos+5}if(F<h.length){let A=I[I.length-1];if(E.length>0&&E[E.length-1].type==="else")I.push({content:h.slice(F),isFinalElse:!0});else if(I.length===0)I.push({content:h.slice(F)})}let O=g(l.ability,l.type,l.id),j=s==="can"?O:!O,V="";if(j)V=I[0]?.content||"";else{let A=!1;for(let z=1;z<I.length;z++){let D=I[z];if(D.isFinalElse){V=D.content,A=!0;break}if(D.ability){let B=g(D.ability,D.type,D.id);if(s==="can"?B:!B){V=D.content,A=!0;break}}}if(!A&&I.length>0){let z=I[I.length-1];if(z.isFinalElse)V=z.content}}p=p.substring(0,y)+V+p.substring(k+`@${o}`.length),a=!0}}return p}function Eo(w,e,p){let n=w;function v(g,b,s,o,r){let a=!0;while(a){a=!1;let i=new RegExp(`@${b}\\s*\\(`),y=g.match(i);if(!y||y.index===void 0)break;let m=y.index,l=Je(g,m+`@${b}`.length);if(!l)break;let x=l.endPos,k=bt(g,b,s,x);if(k===-1){console.warn(`[stx] @${b} directive at position ${m} has no matching @${s} \u2014 the block was skipped.`);break}let h=g.slice(x,k),E=l.expression,S=-1,C=0,P=0;while(P<h.length){let R=h.indexOf("@",P);if(R===-1)break;let T=h.substring(R);if(/^@(?:if|unless|isset|empty)\s*\(/.test(T)){C++,P=R+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(T)){C--,P=R+1;continue}if(C===0&&/^@else(?![a-z])/.test(T)){S=R;break}P=R+1}try{let R=o(E.trim()),T;if(S!==-1){let _=h.slice(0,S),M=h.slice(S+5);T=R?_:M}else T=R?h:"";g=g.substring(0,m)+T+g.substring(k+`@${s}`.length),a=!0}catch(R){let T=R instanceof Error?R.message:String(R),_=c(r,`Error processing @${b} directive: ${T}`,t.EVALUATION_ERROR);g=g.substring(0,m)+_+g.substring(k+`@${s}`.length);break}}return g}return n=v(n,"isset","endisset",(g)=>{let b=L(g,e);return b!==void 0&&b!==null},"Isset"),n=v(n,"empty","endempty",(g)=>{let b=L(g,e);return b===void 0||b===null||b===""||b===0||b===!1||Array.isArray(b)&&b.length===0||typeof b==="object"&&b!==null&&Object.keys(b).length===0},"Empty"),n}function To(w,e,p){let n=w,v="development";function g(b,s,o,r){let a=new RegExp(`@${s}(?![a-z])`,"g"),i=new RegExp(`@${o}(?![a-z])`,"g"),y=new RegExp(`^@${s}(?![a-z])`),m=new RegExp(`^@${o}(?![a-z])`),l=b,x=!0;while(x){x=!1,a.lastIndex=0;let k=a.exec(l);if(!k)break;let h=k.index,E=h+k[0].length;if(s==="env"){let O=l.substring(E).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!O)break;E+=O[0].length,r=v===O[2]}let S=1,C=E,P=-1;while(S>0&&C<l.length){a.lastIndex=C,i.lastIndex=C;let O=a.exec(l),j=i.exec(l),V=O?O.index:1/0,A=j?j.index:1/0;if(V<A)S++,C=V+O[0].length;else if(A<1/0){if(S--,S===0){P=A;break}C=A+j[0].length}else break}if(P===-1){console.warn(`[stx] @${s} directive at position ${h} has no matching @${o} \u2014 the block was skipped.`);break}let R=l.substring(E,P),T=-1,_=0,M=0;while(M<R.length){let O=R.indexOf("@",M);if(O===-1)break;let j=R.substring(O);if(y.test(j)){_++,M=O+1;continue}if(m.test(j)){_--,M=O+1;continue}if(_===0&&/^@else(?![a-z])/.test(j)){T=O;break}M=O+1}let I;if(T!==-1){let O=R.slice(0,T),j=R.slice(T+5);I=r?O:j}else I=r?R:"";let F=`@${o}`.length;l=l.substring(0,h)+I+l.substring(P+F),x=!0}return l}return n=g(n,"env","endenv",!1),n=g(n,"production","endproduction",v==="production"),n=g(n,"development","enddevelopment",v==="development"),n=g(n,"staging","endstaging",v==="staging"),n=g(n,"testing","endtesting",v==="testing"),n}
3
+ export{se,Co,Eo,To};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{le}from"./chunk-m4j9gedb.js";import{Be,A}from"./chunk-3392k9vm.js";import{tc}from"./chunk-fgr56q3w.js";import{c}from"./chunk-93ft5jea.js";import S from"fs";import m from"path";import{pathToFileURL as O}from"url";var E=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],P=new Set;function tn(s,l={}){let o=m.resolve(s,l.dir??"server/api"),i=[],f=new Map;if(!S.existsSync(o))return i;let t=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:o})).sort();for(let e of t){if(e.endsWith(".d.ts"))continue;let p=e.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),n=p.pop(),u=n.lastIndexOf("."),d=u>=0?n.slice(u+1):"get",g=d.toUpperCase();if(!E.includes(g)||d!==d.toLowerCase())throw Error(`Unsupported API method suffix in ${e}; use ${E.map((y)=>y.toLowerCase()).join(", ")}`);if(u>=0)n=n.slice(0,u);if(n!=="index")p.push(n);let r=new Set,h=p.map((y,I)=>{let v=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(y);if(v){if(r.has(v[2])||v[1]&&I!==p.length-1)throw Error(`Invalid API parameter in ${e}`);return r.add(v[2]),`:${v[2]}${v[1]?"*":""}`}if(!/^[\w-]+$/.test(y))throw Error(`Unsupported API path segment ${y} in ${e}`);return y}),w=`/api${h.length?`/${h.join("/")}`:""}`,x=`${g} ${w.replace(/:\w+/g,":param")}`;if(f.has(x))throw Error(`Ambiguous API route ${g} ${w}: ${f.get(x)} and ${e}`);f.set(x,e);let R=m.join(o,e);P.add(m.resolve(R)),P.add(S.realpathSync(R)),i.push({pattern:w,method:g,filePath:R})}return i.sort((e,a)=>{let p=e.pattern.split("/"),n=a.pattern.split("/"),u=(d)=>d?.endsWith("*")?0:d?.startsWith(":")?1:2;for(let d=0;d<Math.max(p.length,n.length);d++){let g=u(n[d])-u(p[d]);if(g)return g}return e.pattern.localeCompare(a.pattern)||e.method.localeCompare(a.method)})}async function po(s,l){let o=c(s,"api-types.d.ts"),i=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let t of l){let e=`./${m.relative(m.dirname(o),t.filePath).replace(/\\/g,"/")}`,{params:a}=le(t.pattern);i.push(` ${JSON.stringify(`${t.method} ${t.pattern}`)}: { params: { ${a.map((p)=>`${JSON.stringify(p)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(e)}).default>> }`)}i.push(" }","}","export {}","");let f=i.join(`
3
- `);if(!await Bun.file(o).exists()||await Bun.file(o).text()!==f)await Bun.write(o,f);return o}async function fo(s,l,o={}){let i=tn(s,o);await po(s,i);let f=[];for(let t of i){let e=await Bun.build({entrypoints:[t.filePath],target:"bun",format:"esm",minify:!1,splitting:!1});if(!e.success)throw Error(`API build failed for ${t.filePath}: ${e.logs.join(`
4
- `)}`);let a=e.outputs.find((u)=>u.kind==="entry-point");if(!a)throw Error(`No API bundle for ${t.filePath}`);if(e.outputs.length!==1)throw Error(`API endpoint ${t.filePath} emits assets; package those explicitly instead`);let n=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await a.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write(m.join(l,n),a),f.push({...t,filePath:n})}return f}function j(s,l){let o=s.map((i)=>({route:i,...le(i.pattern)}));return async(i)=>{let f=new URL(i.url).pathname,t=o.filter((r)=>r.regex.test(f));if(!t.length)return null;let e=t[0].route.pattern,a=(r)=>r.replace(/:\w+/g,":param"),p=t.filter((r)=>a(r.route.pattern)===a(e)),n=i.method,u=p.find((r)=>r.route.method===n)??(n==="HEAD"?p.find((r)=>r.route.method==="GET"):void 0);if(!u){let r=new Set(p.map((h)=>h.route.method));if(r.has("GET"))r.add("HEAD");return r.add("OPTIONS"),new Response(null,{status:n==="OPTIONS"?204:405,headers:{Allow:Array.from(r).sort().join(", ")}})}let d=u.regex.exec(f),g=Object.create(null);try{u.params.forEach((r,h)=>{g[r]=decodeURIComponent(d[h+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let r=await l(u.route);if(typeof r!=="function")throw Error(`API endpoint ${u.route.filePath} must default-export a handler`);let h=await r(i,{params:g}),w=h instanceof Response?h:h===void 0?new Response(null,{status:204}):Response.json(h);if(n==="HEAD")return new Response(null,{status:w.status,headers:w.headers});return w}catch(r){return console.error(`[stx] API error for ${n} ${e}:`,r),Response.json({error:"Internal Server Error"},{status:500})}}}function go(s,l){return j(l,async(o)=>(await import(O(m.resolve(s,o.filePath)).href)).default)}async function Gm(s,l){if(!l)return async()=>null;let o=l===!0?{}:l,i=tn(s,o);return await po(s,i),async(f)=>{if(!new URL(f.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let t=tn(s,o);await po(s,t);let{loadStxConfig:e}=await import("./chunk-13jg9qpq.js"),a=A((await e(s)).runtimeConfig);return await Be(a,()=>j(t,async(p)=>{let n=await Bun.build({entrypoints:[p.filePath],target:"bun",format:"esm",splitting:!1});if(!n.success)throw Error(n.logs.join(`
5
- `));let u=n.outputs.find((d)=>d.kind==="entry-point");if(!u||n.outputs.length!==1)throw Error(`Unsupported API bundle output: ${p.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await u.text()).toString("base64")}`)).default})(f))}catch(t){return console.error("[stx] API discovery failed:",t),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function mo(s,l,o){if(tc(s))return!0;let i=/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/;if(i.test(m.basename(s)))return!0;try{if(i.test(m.basename(S.realpathSync(s))))return!0}catch{}if(P.has(m.resolve(s)))return!0;if(!o)return!1;let f=m.resolve(l,typeof o==="object"?o.dir??"server/api":"server/api"),t=(a)=>{try{return S.realpathSync(a)}catch{return m.resolve(a)}},e=t(s);return[f,m.resolve(l,"server"),m.resolve(l,".output/server")].some((a)=>{let p=t(a);return e===p||e.startsWith(`${p}${m.sep}`)})}
6
- export{tn,po,fo,go,Gm,mo};
2
+ import{ue}from"./chunk-0myrwz84.js";import{Fe,O}from"./chunk-wp6q0geg.js";import{rc}from"./chunk-zjw6j2x0.js";import{l}from"./chunk-5n4qg8za.js";import v from"fs";import m from"path";import{pathToFileURL as I}from"url";var P=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],R=new Set;function nn(s,c={}){let o=m.resolve(s,c.dir??"server/api"),i=[],f=new Map;if(!v.existsSync(o))return i;let t=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:o})).sort();for(let e of t){if(e.endsWith(".d.ts"))continue;let p=e.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),n=p.pop(),u=n.lastIndexOf("."),d=u>=0?n.slice(u+1):"get",g=d.toUpperCase();if(!P.includes(g)||d!==d.toLowerCase())throw Error(`Unsupported API method suffix in ${e}; use ${P.map((A)=>A.toLowerCase()).join(", ")}`);if(u>=0)n=n.slice(0,u);if(n!=="index")p.push(n);let r=new Set,h=p.map((A,j)=>{let y=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(A);if(y){if(r.has(y[2])||y[1]&&j!==p.length-1)throw Error(`Invalid API parameter in ${e}`);return r.add(y[2]),`:${y[2]}${y[1]?"*":""}`}if(!/^[\w-]+$/.test(A))throw Error(`Unsupported API path segment ${A} in ${e}`);return A}),w=`/api${h.length?`/${h.join("/")}`:""}`,S=`${g} ${w.replace(/:\w+/g,":param")}`;if(f.has(S))throw Error(`Ambiguous API route ${g} ${w}: ${f.get(S)} and ${e}`);f.set(S,e);let x=m.join(o,e);R.add(m.resolve(x)),R.add(v.realpathSync(x)),i.push({pattern:w,method:g,filePath:x})}return i.sort((e,a)=>{let p=e.pattern.split("/"),n=a.pattern.split("/"),u=(d)=>d?.endsWith("*")?0:d?.startsWith(":")?1:2;for(let d=0;d<Math.max(p.length,n.length);d++){let g=u(n[d])-u(p[d]);if(g)return g}return e.pattern.localeCompare(a.pattern)||e.method.localeCompare(a.method)})}async function mo(s,c){let o=l(s,"api-types.d.ts"),i=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let t of c){let e=`./${m.relative(m.dirname(o),t.filePath).replace(/\\/g,"/")}`,{params:a}=ue(t.pattern);i.push(` ${JSON.stringify(`${t.method} ${t.pattern}`)}: { params: { ${a.map((p)=>`${JSON.stringify(p)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(e)}).default>> }`)}i.push(" }","}","export {}","");let f=i.join(`
3
+ `);if(!await Bun.file(o).exists()||await Bun.file(o).text()!==f)await Bun.write(o,f);return o}async function ho(s,c,o={}){let i=nn(s,o);await mo(s,i);let f=[];for(let t of i){let e=await Bun.build({entrypoints:[t.filePath],target:"bun",format:"esm",minify:!1,splitting:!1});if(!e.success)throw Error(`API build failed for ${t.filePath}: ${e.logs.join(`
4
+ `)}`);let a=e.outputs.find((u)=>u.kind==="entry-point");if(!a)throw Error(`No API bundle for ${t.filePath}`);if(e.outputs.length!==1)throw Error(`API endpoint ${t.filePath} emits assets; package those explicitly instead`);let n=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await a.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write(m.join(c,n),a),f.push({...t,filePath:n})}return f}function E(s,c){let o=s.map((i)=>({route:i,...ue(i.pattern)}));return async(i)=>{let f=new URL(i.url).pathname,t=o.filter((r)=>r.regex.test(f));if(!t.length)return null;let e=t[0].route.pattern,a=(r)=>r.replace(/:\w+/g,":param"),p=t.filter((r)=>a(r.route.pattern)===a(e)),n=i.method,u=p.find((r)=>r.route.method===n)??(n==="HEAD"?p.find((r)=>r.route.method==="GET"):void 0);if(!u){let r=new Set(p.map((h)=>h.route.method));if(r.has("GET"))r.add("HEAD");return r.add("OPTIONS"),new Response(null,{status:n==="OPTIONS"?204:405,headers:{Allow:Array.from(r).sort().join(", ")}})}let d=u.regex.exec(f),g=Object.create(null);try{u.params.forEach((r,h)=>{g[r]=decodeURIComponent(d[h+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let r=await c(u.route);if(typeof r!=="function")throw Error(`API endpoint ${u.route.filePath} must default-export a handler`);let h=await r(i,{params:g}),w=h instanceof Response?h:h===void 0?new Response(null,{status:204}):Response.json(h);if(n==="HEAD")return new Response(null,{status:w.status,headers:w.headers});return w}catch(r){return console.error(`[stx] API error for ${n} ${e}:`,r),Response.json({error:"Internal Server Error"},{status:500})}}}function yo(s,c){return E(c,async(o)=>(await import(I(m.resolve(s,o.filePath)).href)).default)}async function Xm(s,c){if(!c)return async()=>null;let o=c===!0?{}:c,i=nn(s,o);return await mo(s,i),async(f)=>{if(!new URL(f.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let t=nn(s,o);await mo(s,t);let{loadStxConfig:e}=await import("./chunk-zaj3gzet.js"),a=O((await e(s)).runtimeConfig);return await Fe(a,()=>E(t,async(p)=>{let n=await Bun.build({entrypoints:[p.filePath],target:"bun",format:"esm",splitting:!1});if(!n.success)throw Error(n.logs.join(`
5
+ `));let u=n.outputs.find((d)=>d.kind==="entry-point");if(!u||n.outputs.length!==1)throw Error(`Unsupported API bundle output: ${p.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await u.text()).toString("base64")}`)).default})(f))}catch(t){return console.error("[stx] API discovery failed:",t),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function bo(s,c,o){if(rc(s))return!0;let i=/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/;if(i.test(m.basename(s)))return!0;try{if(i.test(m.basename(v.realpathSync(s))))return!0}catch{}if(R.has(m.resolve(s)))return!0;if(!o)return!1;let f=m.resolve(c,typeof o==="object"?o.dir??"server/api":"server/api"),t=(a)=>{try{return v.realpathSync(a)}catch{return m.resolve(a)}},e=t(s);return[f,m.resolve(c,"server"),m.resolve(c,".output/server")].some((a)=>{let p=t(a);return e===p||e.startsWith(`${p}${m.sep}`)})}
6
+ export{nn,mo,ho,yo,Xm,bo};
@@ -1,8 +1,8 @@
1
1
  // @bun
2
- import d from"fs";import l from"path";function Qc(n){let s=[],e=n.pwa;if(s.push({id:"pwa-enabled",name:"PWA Enabled",category:"required",passed:e?.enabled===!0,message:e?.enabled?"PWA is enabled":"PWA is not enabled in config"}),!e?.enabled)return s;s.push({id:"manifest-name",name:"App Name",category:"required",passed:Boolean(e.manifest?.name),message:e.manifest?.name?`App name: "${e.manifest.name}"`:"Missing required manifest name"}),s.push({id:"manifest-short-name",name:"Short Name",category:"recommended",passed:Boolean(e.manifest?.shortName),message:e.manifest?.shortName?`Short name: "${e.manifest.shortName}"`:"Short name not set (will use full name)"}),s.push({id:"manifest-description",name:"App Description",category:"recommended",passed:Boolean(e.manifest?.description),message:e.manifest?.description?"Description is set":"App description not provided"}),s.push({id:"manifest-theme-color",name:"Theme Color",category:"required",passed:Boolean(e.manifest?.themeColor),message:e.manifest?.themeColor?`Theme color: ${e.manifest.themeColor}`:"Theme color not set"}),s.push({id:"manifest-background-color",name:"Background Color",category:"required",passed:Boolean(e.manifest?.backgroundColor),message:e.manifest?.backgroundColor?`Background color: ${e.manifest.backgroundColor}`:"Background color not set"}),s.push({id:"manifest-display",name:"Display Mode",category:"required",passed:["standalone","fullscreen","minimal-ui"].includes(e.manifest?.display||""),message:e.manifest?.display?`Display mode: ${e.manifest.display}`:"Display mode should be standalone, fullscreen, or minimal-ui"}),s.push({id:"manifest-start-url",name:"Start URL",category:"required",passed:Boolean(e.manifest?.startUrl),message:e.manifest?.startUrl?`Start URL: ${e.manifest.startUrl}`:"Start URL not set"}),s.push({id:"icons-source",name:"Icon Source",category:"required",passed:Boolean(e.icons?.src),message:e.icons?.src?`Icon source: ${e.icons.src}`:"No icon source configured"});let a=e.icons?.sizes||[];s.push({id:"icons-192",name:"192x192 Icon",category:"required",passed:a.includes(192),message:a.includes(192)?"192x192 icon will be generated":"Missing 192x192 icon (required for Android)"}),s.push({id:"icons-512",name:"512x512 Icon",category:"required",passed:a.includes(512),message:a.includes(512)?"512x512 icon will be generated":"Missing 512x512 icon (required for splash screen)"}),s.push({id:"icons-maskable",name:"Maskable Icon",category:"recommended",passed:e.icons?.purpose?.includes("maskable")||!1,message:e.icons?.purpose?.includes("maskable")?"Maskable icon purpose is set":"Consider adding maskable icon purpose for adaptive icons"}),s.push({id:"sw-configured",name:"Service Worker",category:"required",passed:Boolean(e.serviceWorker),message:e.serviceWorker?"Service worker is configured":"Service worker configuration missing"}),s.push({id:"sw-cache-version",name:"Cache Version",category:"recommended",passed:Boolean(e.serviceWorker?.cacheVersion),message:e.serviceWorker?.cacheVersion?`Cache version: ${e.serviceWorker.cacheVersion}`:"Set cache version for proper cache busting"}),s.push({id:"offline-enabled",name:"Offline Support",category:"required",passed:e.offline?.enabled===!0,message:e.offline?.enabled?"Offline support is enabled":"Offline support is disabled"});let t=e.routes||[];return s.push({id:"caching-strategies",name:"Caching Strategies",category:"recommended",passed:t.length>0,message:t.length>0?`${t.length} route caching strategies configured`:"No custom caching strategies defined"}),s.push({id:"push-config",name:"Push Notifications",category:"optional",passed:!e.push?.enabled||Boolean(e.push?.vapidPublicKey),message:e.push?.enabled?e.push?.vapidPublicKey?"Push notifications configured with VAPID key":"Push enabled but missing VAPID key":"Push notifications not enabled"}),s.push({id:"share-target",name:"Share Target",category:"optional",passed:!0,message:e.shareTarget?.enabled?`Share target enabled at ${e.shareTarget.action}`:"Share target not enabled"}),s.push({id:"auto-inject",name:"Auto-injection",category:"recommended",passed:e.autoInject!==!1,message:e.autoInject!==!1?"PWA tags will be auto-injected":"Auto-injection disabled - manual tag insertion required"}),s}function el(n){let s=[],e=l.join(n,"manifest.json"),a=d.existsSync(e);if(s.push({id:"build-manifest",name:"Manifest File",category:"required",passed:a,message:a?"manifest.json exists":"manifest.json not found in build output"}),a)try{let r=JSON.parse(d.readFileSync(e,"utf-8"));s.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!0,message:"Manifest is valid JSON"}),s.push({id:"build-manifest-icons",name:"Manifest Icons",category:"required",passed:Array.isArray(r.icons)&&r.icons.length>0,message:r.icons?.length?`${r.icons.length} icons defined in manifest`:"No icons defined in manifest"})}catch{s.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!1,message:"Manifest is not valid JSON"})}let t=l.join(n,"sw.js"),c=d.existsSync(t);s.push({id:"build-sw",name:"Service Worker File",category:"required",passed:c,message:c?"Service worker (sw.js) exists":"Service worker not found in build output"});let o=l.join(n,"offline.html"),u=d.existsSync(o);s.push({id:"build-offline",name:"Offline Page",category:"recommended",passed:u,message:u?"Offline page exists":"No offline.html found"});let i=l.join(n,"pwa-icons");if(d.existsSync(i)){let r=d.readdirSync(i).filter((m)=>m.endsWith(".png")||m.endsWith(".webp"));s.push({id:"build-icons",name:"Generated Icons",category:"required",passed:r.length>0,message:r.length>0?`${r.length} icon files generated`:"No icon files found"})}else s.push({id:"build-icons",name:"Generated Icons",category:"required",passed:!1,message:"Icons directory not found"});return s}function tl(n){let s=n.filter((i)=>i.category==="required"),e=n.filter((i)=>i.category==="recommended"),a=s.filter((i)=>i.passed).length,t=e.filter((i)=>i.passed).length,c=s.length>0?a/s.length*70:70,o=e.length>0?t/e.length*30:30;return{score:Math.round(c+o),passed:n.filter((i)=>i.passed).length,failed:n.filter((i)=>!i.passed&&i.category==="required").length,warnings:n.filter((i)=>!i.passed&&i.category!=="required").length,checks:n}}function Zf(n,s){let e=Qc(n),a=s&&d.existsSync(s)?el(s):[];return tl([...e,...a])}function Qf(n){let s=[];s.push(`
2
+ import d from"fs";import l from"path";function tl(n){let s=[],e=n.pwa;if(s.push({id:"pwa-enabled",name:"PWA Enabled",category:"required",passed:e?.enabled===!0,message:e?.enabled?"PWA is enabled":"PWA is not enabled in config"}),!e?.enabled)return s;s.push({id:"manifest-name",name:"App Name",category:"required",passed:Boolean(e.manifest?.name),message:e.manifest?.name?`App name: "${e.manifest.name}"`:"Missing required manifest name"}),s.push({id:"manifest-short-name",name:"Short Name",category:"recommended",passed:Boolean(e.manifest?.shortName),message:e.manifest?.shortName?`Short name: "${e.manifest.shortName}"`:"Short name not set (will use full name)"}),s.push({id:"manifest-description",name:"App Description",category:"recommended",passed:Boolean(e.manifest?.description),message:e.manifest?.description?"Description is set":"App description not provided"}),s.push({id:"manifest-theme-color",name:"Theme Color",category:"required",passed:Boolean(e.manifest?.themeColor),message:e.manifest?.themeColor?`Theme color: ${e.manifest.themeColor}`:"Theme color not set"}),s.push({id:"manifest-background-color",name:"Background Color",category:"required",passed:Boolean(e.manifest?.backgroundColor),message:e.manifest?.backgroundColor?`Background color: ${e.manifest.backgroundColor}`:"Background color not set"}),s.push({id:"manifest-display",name:"Display Mode",category:"required",passed:["standalone","fullscreen","minimal-ui"].includes(e.manifest?.display||""),message:e.manifest?.display?`Display mode: ${e.manifest.display}`:"Display mode should be standalone, fullscreen, or minimal-ui"}),s.push({id:"manifest-start-url",name:"Start URL",category:"required",passed:Boolean(e.manifest?.startUrl),message:e.manifest?.startUrl?`Start URL: ${e.manifest.startUrl}`:"Start URL not set"}),s.push({id:"icons-source",name:"Icon Source",category:"required",passed:Boolean(e.icons?.src),message:e.icons?.src?`Icon source: ${e.icons.src}`:"No icon source configured"});let a=e.icons?.sizes||[];s.push({id:"icons-192",name:"192x192 Icon",category:"required",passed:a.includes(192),message:a.includes(192)?"192x192 icon will be generated":"Missing 192x192 icon (required for Android)"}),s.push({id:"icons-512",name:"512x512 Icon",category:"required",passed:a.includes(512),message:a.includes(512)?"512x512 icon will be generated":"Missing 512x512 icon (required for splash screen)"}),s.push({id:"icons-maskable",name:"Maskable Icon",category:"recommended",passed:e.icons?.purpose?.includes("maskable")||!1,message:e.icons?.purpose?.includes("maskable")?"Maskable icon purpose is set":"Consider adding maskable icon purpose for adaptive icons"}),s.push({id:"sw-configured",name:"Service Worker",category:"required",passed:Boolean(e.serviceWorker),message:e.serviceWorker?"Service worker is configured":"Service worker configuration missing"}),s.push({id:"sw-cache-version",name:"Cache Version",category:"recommended",passed:Boolean(e.serviceWorker?.cacheVersion),message:e.serviceWorker?.cacheVersion?`Cache version: ${e.serviceWorker.cacheVersion}`:"Set cache version for proper cache busting"}),s.push({id:"offline-enabled",name:"Offline Support",category:"required",passed:e.offline?.enabled===!0,message:e.offline?.enabled?"Offline support is enabled":"Offline support is disabled"});let t=e.routes||[];return s.push({id:"caching-strategies",name:"Caching Strategies",category:"recommended",passed:t.length>0,message:t.length>0?`${t.length} route caching strategies configured`:"No custom caching strategies defined"}),s.push({id:"push-config",name:"Push Notifications",category:"optional",passed:!e.push?.enabled||Boolean(e.push?.vapidPublicKey),message:e.push?.enabled?e.push?.vapidPublicKey?"Push notifications configured with VAPID key":"Push enabled but missing VAPID key":"Push notifications not enabled"}),s.push({id:"share-target",name:"Share Target",category:"optional",passed:!0,message:e.shareTarget?.enabled?`Share target enabled at ${e.shareTarget.action}`:"Share target not enabled"}),s.push({id:"auto-inject",name:"Auto-injection",category:"recommended",passed:e.autoInject!==!1,message:e.autoInject!==!1?"PWA tags will be auto-injected":"Auto-injection disabled - manual tag insertion required"}),s}function nl(n){let s=[],e=l.join(n,"manifest.json"),a=d.existsSync(e);if(s.push({id:"build-manifest",name:"Manifest File",category:"required",passed:a,message:a?"manifest.json exists":"manifest.json not found in build output"}),a)try{let r=JSON.parse(d.readFileSync(e,"utf-8"));s.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!0,message:"Manifest is valid JSON"}),s.push({id:"build-manifest-icons",name:"Manifest Icons",category:"required",passed:Array.isArray(r.icons)&&r.icons.length>0,message:r.icons?.length?`${r.icons.length} icons defined in manifest`:"No icons defined in manifest"})}catch{s.push({id:"build-manifest-valid",name:"Valid Manifest JSON",category:"required",passed:!1,message:"Manifest is not valid JSON"})}let t=l.join(n,"sw.js"),c=d.existsSync(t);s.push({id:"build-sw",name:"Service Worker File",category:"required",passed:c,message:c?"Service worker (sw.js) exists":"Service worker not found in build output"});let o=l.join(n,"offline.html"),u=d.existsSync(o);s.push({id:"build-offline",name:"Offline Page",category:"recommended",passed:u,message:u?"Offline page exists":"No offline.html found"});let i=l.join(n,"pwa-icons");if(d.existsSync(i)){let r=d.readdirSync(i).filter((m)=>m.endsWith(".png")||m.endsWith(".webp"));s.push({id:"build-icons",name:"Generated Icons",category:"required",passed:r.length>0,message:r.length>0?`${r.length} icon files generated`:"No icon files found"})}else s.push({id:"build-icons",name:"Generated Icons",category:"required",passed:!1,message:"Icons directory not found"});return s}function rl(n){let s=n.filter((i)=>i.category==="required"),e=n.filter((i)=>i.category==="recommended"),a=s.filter((i)=>i.passed).length,t=e.filter((i)=>i.passed).length,c=s.length>0?a/s.length*70:70,o=e.length>0?t/e.length*30:30;return{score:Math.round(c+o),passed:n.filter((i)=>i.passed).length,failed:n.filter((i)=>!i.passed&&i.category==="required").length,warnings:n.filter((i)=>!i.passed&&i.category!=="required").length,checks:n}}function eg(n,s){let e=tl(n),a=s&&d.existsSync(s)?nl(s):[];return rl([...e,...a])}function tg(n){let s=[];s.push(`
3
3
  === PWA Audit Report ===
4
4
  `);let e=n.score>=90?"32":n.score>=70?"33":"31";s.push(`Score: \x1B[${e}m${n.score}/100\x1B[0m`),s.push(`Passed: ${n.passed} | Failed: ${n.failed} | Warnings: ${n.warnings}
5
5
  `);let a=["required","recommended","optional"];for(let t of a){let c=n.checks.filter((o)=>o.category===t);if(c.length===0)continue;s.push(`
6
6
  ${t.toUpperCase()}:`);for(let o of c){let u=o.passed?"\x1B[32m\u2713\x1B[0m":"\x1B[31m\u2717\x1B[0m";if(s.push(` ${u} ${o.name}: ${o.message}`),o.details)s.push(` ${o.details}`)}}return s.push(""),s.join(`
7
7
  `)}
8
- export{Qc,el,tl,Zf,Qf};
8
+ export{tl,nl,rl,eg,tg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Jm,za,Ym,Ha,cf,lf,sn,tr,Zm,uf,df,Qm,y}from"./chunk-3xmt01wr.js";import"./chunk-zjcmybab.js";import"./chunk-0jtrdgyv.js";import"./chunk-qcw1neka.js";import"./chunk-wp6q0geg.js";import"./chunk-xyyt8v1r.js";import"./chunk-zn3c0ew5.js";import"./chunk-wt18wv6x.js";export{sn as buildCss,uf as extractClassNames,lf as fingerprintConfig,df as generateCss,Zm as getCachedCSS,Jm as getCssServeAsset,y as injectCss,za as loadCssEngine,Ha as loadCssEngineConfig,tr as rebuildCss,Ym as resetCssCache,cf as resolveUserCssConfig,Qm as withLinkedModuleBundles};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gn,If,Of,Nf,Df,Mf,m,Lf,Qo,jf,$c,Rc}from"./chunk-0jtrdgyv.js";import"./chunk-qcw1neka.js";import"./chunk-wp6q0geg.js";import"./chunk-xyyt8v1r.js";import"./chunk-zn3c0ew5.js";import"./chunk-wt18wv6x.js";export{gn as STX_ENGINE_BINDING_NAMES,Qo as convertToCommonJS,$c as extractScriptFromTemplate,m as extractVariables,Rc as hasVariables,Lf as isCompleteImport,Mf as isMissingBindingFailure,Nf as isModuleResolutionFailure,Df as isSyntaxFailure,jf as splitDeclaration,If as stripTypeScript,Of as withoutStxReferrer};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{xf,Do}from"./chunk-stvw8y3c.js";export{xf as looksLikeGlob,Do as resolveStxTargets};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Yn,$e}from"./chunk-1xjv71dw.js";export{Yn as describeBuildFailure,$e as formatBuildFailure};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{y}from"./chunk-xc03cdet.js";function Xe(e,r){let n=v(e,r);return n.ok?{expression:n.expression,endPos:n.endPos}:null}function v(e,r){let n=r;while(n<e.length&&/\s/.test(e[n]))n++;if(e[n]!=="(")return{ok:!1,reason:"missing-open-paren",pos:n};let c=y(e,"(",")",n);if(c===-1)return{ok:!1,reason:"unclosed-paren",pos:n};return{ok:!0,expression:e.slice(n+1,c),endPos:c+1}}function k(e,r){let n=e.lastIndexOf("<",r);if(n===-1)return!1;return n>e.lastIndexOf(">",r)}function yt(e,r,n,c){let o=1,i=c,u=new RegExp(`@${r}\\s*\\(`,"g"),a=new RegExp(`@${n}(?![a-z])`,"g");while(i<e.length&&o>0){u.lastIndex=i,a.lastIndex=i;let p=u.exec(e),t=a.exec(e),s=p?p.index:1/0,f=t?t.index:1/0;if(s<f)o++,i=s+p[0].length;else if(f<1/0){if(o--,o===0)return f;i=f+t[0].length}else break}return-1}function P(e,r){let n=e.slice(r).match(/^@if\s*/);if(!n)return null;let c=r+n[0].length,o=Xe(e,c);if(!o)return null;let i=o.endPos,u=yt(e,"if","endif",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s="if",f=o.expression,l=0,x=0;while(t<a.length){let h=a.indexOf("@",t);if(h===-1)break;t=h;let d=a.substring(h);if(k(a,h)){t++;continue}if(/^@if\s*\(/.test(d)){x++,t++;continue}if(/^@endif(?![a-z])/.test(d)){x--,t+=6;continue}if(x===0){let g=d.match(/^@elseif\s*/);if(g){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t});let m=t+g[0].length,b=Xe(a,m);if(!b){t++;continue}s="elseif",f=b.expression,t=b.endPos,l=t;continue}else if(/^@else(?![a-z])/.test(d)){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t}),s="else",f=void 0,t+=5,l=t;continue}}t++}return p.push({type:s,condition:f,content:a.slice(l),start:i+l,end:i+a.length}),{fullMatch:e.slice(r,u+6),branches:p,start:r,end:u+6}}function sn(e){let r=[],n=/@if\s*\(/g,c=n.exec(e);while(c!==null){if(r.some((u)=>c.index>u.start&&c.index<u.end)){c=n.exec(e);continue}let i=P(e,c.index);if(i)r.push(i),n.lastIndex=i.end;c=n.exec(e)}return r}function rs(e,r,n){let c=[],o=new RegExp(`@${r}\\s*\\(`,"g"),i=o.exec(e);while(i!==null){if(c.some((d)=>i.index>d.start&&i.index<d.end)){i=o.exec(e);continue}let a=i.index,p=a+i[0].length-1,t=y(e,"(",")",p);if(t===-1){i=o.exec(e);continue}let s=e.slice(p+1,t),f=t+1,l=yt(e,r,n,f);if(l===-1){i=o.exec(e);continue}let x=e.slice(f,l),h=l+`@${n}`.length;c.push({fullMatch:e.slice(a,h),name:r,params:s,content:x,start:a,end:h}),o.lastIndex=h,i=o.exec(e)}return c}function Ro(e,r){let n=e.slice(r).match(/^@switch\s*/);if(!n)return null;let c=r+n[0].length,o=Xe(e,c);if(!o)return null;let i=o.endPos,u=yt(e,"switch","endswitch",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s=null,f=0;while(t<a.length){let l=a.slice(t),x=l.match(/^@switch\s*\(/),h=l.match(/^@endswitch(?![a-z])/);if(x){if(f++,s)s.content+=x[0];t+=x[0].length;continue}if(h){if(f--,s)s.content+=h[0];t+=h[0].length;continue}if(f>0){if(s)s.content+=a[t];t++;continue}let d=l.match(/^@case\s*/),g=l.match(/^@default(?![a-z])/),m=l.match(/^@break(?![a-z])/);if(d&&l.startsWith("@case")){if(s)p.push(s);let b=t+d[0].length,E=Xe(a,b);if(!E){t++;continue}s={type:"case",value:E.expression,content:""},t=E.endPos}else if(g&&l.startsWith("@default")){if(s)p.push(s);s={type:"default",content:""},t+=g[0].length}else if(m&&l.startsWith("@break"))t+=m[0].length;else{if(s)s.content+=a[t];t++}}if(s)p.push(s);return{fullMatch:e.slice(r,u+10),expression:o.expression,cases:p,start:r,end:u+10}}export{Xe,yt,sn,rs,Ro};
2
+ import{b}from"./chunk-xyyt8v1r.js";function Je(e,r){let n=y(e,r);return n.ok?{expression:n.expression,endPos:n.endPos}:null}function y(e,r){let n=r;while(n<e.length&&/\s/.test(e[n]))n++;if(e[n]!=="(")return{ok:!1,reason:"missing-open-paren",pos:n};let c=b(e,"(",")",n);if(c===-1)return{ok:!1,reason:"unclosed-paren",pos:n};return{ok:!0,expression:e.slice(n+1,c),endPos:c+1}}function k(e,r){let n=e.lastIndexOf("<",r);if(n===-1)return!1;return n>e.lastIndexOf(">",r)}function bt(e,r,n,c){let o=1,i=c,u=new RegExp(`@${r}\\s*\\(`,"g"),a=new RegExp(`@${n}(?![a-z])`,"g");while(i<e.length&&o>0){u.lastIndex=i,a.lastIndex=i;let p=u.exec(e),t=a.exec(e),s=p?p.index:1/0,f=t?t.index:1/0;if(s<f)o++,i=s+p[0].length;else if(f<1/0){if(o--,o===0)return f;i=f+t[0].length}else break}return-1}function v(e,r){let n=e.slice(r).match(/^@if\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"if","endif",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s="if",f=o.expression,l=0,x=0;while(t<a.length){let h=a.indexOf("@",t);if(h===-1)break;t=h;let d=a.substring(h);if(k(a,h)){t++;continue}if(/^@if\s*\(/.test(d)){x++,t++;continue}if(/^@endif(?![a-z])/.test(d)){x--,t+=6;continue}if(x===0){let g=d.match(/^@elseif\s*/);if(g){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t});let E=t+g[0].length,m=Je(a,E);if(!m){t++;continue}s="elseif",f=m.expression,t=m.endPos,l=t;continue}else if(/^@else(?![a-z])/.test(d)){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t}),s="else",f=void 0,t+=5,l=t;continue}}t++}return p.push({type:s,condition:f,content:a.slice(l),start:i+l,end:i+a.length}),{fullMatch:e.slice(r,u+6),branches:p,start:r,end:u+6}}function on(e){let r=[],n=/@if\s*\(/g,c=n.exec(e);while(c!==null){if(r.some((u)=>c.index>u.start&&c.index<u.end)){c=n.exec(e);continue}let i=v(e,c.index);if(i)r.push(i),n.lastIndex=i.end;c=n.exec(e)}return r}function is(e,r,n){let c=[],o=new RegExp(`@${r}\\s*\\(`,"g"),i=o.exec(e);while(i!==null){if(c.some((d)=>i.index>d.start&&i.index<d.end)){i=o.exec(e);continue}let a=i.index,p=a+i[0].length-1,t=b(e,"(",")",p);if(t===-1){i=o.exec(e);continue}let s=e.slice(p+1,t),f=t+1,l=bt(e,r,n,f);if(l===-1){i=o.exec(e);continue}let x=e.slice(f,l),h=l+`@${n}`.length;c.push({fullMatch:e.slice(a,h),name:r,params:s,content:x,start:a,end:h}),o.lastIndex=h,i=o.exec(e)}return c}function Io(e,r){let n=e.slice(r).match(/^@switch\s*/);if(!n)return null;let c=r+n[0].length,o=Je(e,c);if(!o)return null;let i=o.endPos,u=bt(e,"switch","endswitch",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s=null,f=0;while(t<a.length){let l=a.slice(t),x=l.match(/^@switch\s*\(/),h=l.match(/^@endswitch(?![a-z])/);if(x){if(f++,s)s.content+=x[0];t+=x[0].length;continue}if(h){if(f--,s)s.content+=h[0];t+=h[0].length;continue}if(f>0){if(s)s.content+=a[t];t++;continue}let d=l.match(/^@case\s*/),g=l.match(/^@default(?![a-z])/),E=l.match(/^@break(?![a-z])/);if(d&&l.startsWith("@case")){if(s)p.push(s);let m=t+d[0].length,P=Je(a,m);if(!P){t++;continue}s={type:"case",value:P.expression,content:""},t=P.endPos}else if(g&&l.startsWith("@default")){if(s)p.push(s);s={type:"default",content:""},t+=g[0].length}else if(E&&l.startsWith("@break"))t+=E[0].length;else{if(s)s.content+=a[t];t++}}if(s)p.push(s);return{fullMatch:e.slice(r,u+10),expression:o.expression,cases:p,start:r,end:u+10}}export{Je,bt,on,is,Io};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Gg,ra,ql,Xg,Jg,Yg,Zg,Qg,Kl,Gl,em,tm,nm,rm}from"./chunk-d2xnkt8m.js";import"./chunk-e8brwwp1.js";import"./chunk-3xmt01wr.js";import"./chunk-ap30qs8p.js";import"./chunk-xw8wwcr8.js";import"./chunk-r5k21k3x.js";import"./chunk-65fcex5r.js";import"./chunk-9nvywf05.js";import"./chunk-7dc3n69c.js";import"./chunk-s1vj8gtz.js";import"./chunk-f6ybdjt0.js";import"./chunk-8v2vbc4y.js";import"./chunk-zjcmybab.js";import"./chunk-90kfvtf6.js";import"./chunk-hmkg3xy0.js";import"./chunk-stvw8y3c.js";import"./chunk-zjw6j2x0.js";import"./chunk-3t3p2c1t.js";import"./chunk-0myrwz84.js";import"./chunk-0jtrdgyv.js";import"./chunk-qcw1neka.js";import"./chunk-wp6q0geg.js";import"./chunk-xyyt8v1r.js";import"./chunk-zn3c0ew5.js";import"./chunk-wt18wv6x.js";export{ql as SUSPENSE_RESOLVER_RUNTIME,ra as buildSuspenseResolveScript,Qg as createStreamRenderer,Yg as extractStreamBoundaries,rm as generateHydrationRuntime,Gl as islandDirective,tm as processSectionDirectives,Jg as processStreamDirectives,em as registerStreamingDirectives,Xg as renderStreamingPage,Gg as streamTemplate,Zg as streamTemplateSimple,nm as streamToResponse,Kl as streamingSuspenseDirective};