@stacksjs/stx 0.2.562 → 0.2.564

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 (215) hide show
  1. package/dist/app-shell.d.ts +3 -0
  2. package/dist/app-shell.js +27 -3
  3. package/dist/{chunk-ygs733hw.js → chunk-0897e87r.js} +2 -2
  4. package/dist/chunk-0fv4x8fn.js +2 -0
  5. package/dist/chunk-15g5sc0p.js +3 -0
  6. package/dist/{chunk-jxc48ga1.js → chunk-1dfd95ev.js} +2 -2
  7. package/dist/{chunk-6dw8aa34.js → chunk-1g4t7df6.js} +3 -3
  8. package/dist/chunk-1k38dc96.js +2 -0
  9. package/dist/chunk-1zfg1kd5.js +2 -0
  10. package/dist/chunk-203rr1c8.js +3 -0
  11. package/dist/chunk-2xbrrc5a.js +2 -0
  12. package/dist/{chunk-hj67a88k.js → chunk-30wqqwbn.js} +7 -7
  13. package/dist/{chunk-qmza4327.js → chunk-39tkfkp7.js} +3 -3
  14. package/dist/chunk-3wyxe996.js +2 -0
  15. package/dist/{chunk-kns6nhdw.js → chunk-46195rpy.js} +1 -1
  16. package/dist/chunk-4aw3whbc.js +2834 -0
  17. package/dist/{chunk-kww6tjzk.js → chunk-4bhjt6xn.js} +14 -14
  18. package/dist/{chunk-7wfh2hqy.js → chunk-4ct7a53d.js} +4 -4
  19. package/dist/chunk-4ga3g8xc.js +2 -0
  20. package/dist/chunk-4q5d5r7s.js +2 -0
  21. package/dist/chunk-4ss6b94k.js +2 -0
  22. package/dist/chunk-592xm851.js +2 -0
  23. package/dist/chunk-5adcz47v.js +2 -0
  24. package/dist/chunk-5zxb7dsf.js +2 -0
  25. package/dist/{chunk-p56ymk3z.js → chunk-658paz71.js} +45 -45
  26. package/dist/{chunk-8227vfw0.js → chunk-68b64sj4.js} +1 -1
  27. package/dist/chunk-6qyters0.js +2 -0
  28. package/dist/{chunk-yp00nht2.js → chunk-6vnnx536.js} +2 -2
  29. package/dist/chunk-7bqkgjxv.js +2 -0
  30. package/dist/chunk-7cfpb2n8.js +18 -0
  31. package/dist/{chunk-r4199q6x.js → chunk-7m0r2qs2.js} +2 -2
  32. package/dist/chunk-7pewegtw.js +2 -0
  33. package/dist/{chunk-peeseskn.js → chunk-7phshjwf.js} +2 -2
  34. package/dist/chunk-7w0qa3n0.js +2 -0
  35. package/dist/{chunk-5fx8m234.js → chunk-7wyyjdks.js} +2 -2
  36. package/dist/{chunk-nd8v4xgb.js → chunk-7ze47qgv.js} +5 -5
  37. package/dist/chunk-8218m54a.js +2 -0
  38. package/dist/chunk-86cnpvf4.js +2 -0
  39. package/dist/{chunk-ff61d2wr.js → chunk-8b6mp92r.js} +4 -4
  40. package/dist/{chunk-97vj2cqz.js → chunk-8cs45k3f.js} +3 -3
  41. package/dist/{chunk-s040j1bv.js → chunk-8nr1kras.js} +6 -6
  42. package/dist/{chunk-p2mxsjv1.js → chunk-8sfv1h98.js} +7 -7
  43. package/dist/{chunk-xefvwnwh.js → chunk-97614ghv.js} +5 -5
  44. package/dist/{chunk-1zeqghsw.js → chunk-9jvzz9pr.js} +9 -9
  45. package/dist/{chunk-nda4xq79.js → chunk-9tcvkbb5.js} +2 -2
  46. package/dist/{chunk-vpmb8gcc.js → chunk-9ya4tdpz.js} +4 -4
  47. package/dist/{chunk-g6cwhsb4.js → chunk-a9q8c4pm.js} +11 -11
  48. package/dist/{chunk-n1cqg89v.js → chunk-b76jbdtk.js} +2 -2
  49. package/dist/chunk-b7yvq1kw.js +2 -0
  50. package/dist/chunk-bhyrzt2n.js +2 -0
  51. package/dist/chunk-c78327kx.js +2 -0
  52. package/dist/chunk-cbyh8fhn.js +4 -0
  53. package/dist/chunk-d19w3e4x.js +2 -0
  54. package/dist/{chunk-6v1gwdbv.js → chunk-d4ybwtqt.js} +2 -2
  55. package/dist/{chunk-pp9jgyb6.js → chunk-d7w1n5jm.js} +7 -7
  56. package/dist/chunk-d80xsgse.js +2 -0
  57. package/dist/chunk-da649d3k.js +2 -0
  58. package/dist/chunk-dkyjw3hc.js +3 -0
  59. package/dist/chunk-e7ddshxz.js +2 -0
  60. package/dist/{chunk-mtdx75j5.js → chunk-ec8k75ep.js} +2 -2
  61. package/dist/chunk-eh6n83az.js +2 -0
  62. package/dist/chunk-enb8dpkt.js +2 -0
  63. package/dist/{chunk-f9m24nfx.js → chunk-et82hw8n.js} +1 -1
  64. package/dist/{chunk-rdfgqvrh.js → chunk-ezdsaxbb.js} +5 -5
  65. package/dist/{chunk-5yc38gvt.js → chunk-f1z9ekjh.js} +2 -2
  66. package/dist/{chunk-y0pbnxjg.js → chunk-f46a7pvn.js} +2 -2
  67. package/dist/{chunk-v1m9nrn9.js → chunk-f5n26rq9.js} +1 -1
  68. package/dist/{chunk-azb58ven.js → chunk-ffxwsa94.js} +2 -2
  69. package/dist/chunk-fh4vpewx.js +2 -0
  70. package/dist/chunk-fh8q5rnd.js +2 -0
  71. package/dist/chunk-fm5tm1b7.js +2 -0
  72. package/dist/{chunk-8jc86h7n.js → chunk-fpa1nq88.js} +2 -2
  73. package/dist/{chunk-8a4g0mex.js → chunk-g8tx0yf8.js} +7 -7
  74. package/dist/chunk-gan95hj0.js +2 -0
  75. package/dist/{chunk-e124cgb6.js → chunk-ghnkphy4.js} +2 -2
  76. package/dist/{chunk-m5fw8jq1.js → chunk-gjx5256r.js} +5 -5
  77. package/dist/chunk-gkq300a7.js +2 -0
  78. package/dist/chunk-h5jpbxda.js +2 -0
  79. package/dist/chunk-hb95ah88.js +31 -0
  80. package/dist/{chunk-36rd7j1d.js → chunk-hdswffnj.js} +4 -4
  81. package/dist/chunk-hg7amzgz.js +2 -0
  82. package/dist/{chunk-8nwzd6eg.js → chunk-jbmhdyzz.js} +3 -3
  83. package/dist/{chunk-bqdsc6rm.js → chunk-jh9ajakd.js} +1 -1
  84. package/dist/{chunk-v79qs0qh.js → chunk-jra9r8fq.js} +1 -1
  85. package/dist/chunk-jzmtpjns.js +2 -0
  86. package/dist/{chunk-zmq9hwta.js → chunk-k2dgwy05.js} +2 -2
  87. package/dist/chunk-k50k9zbw.js +2 -0
  88. package/dist/{chunk-xab6b4mt.js → chunk-kch9a9v1.js} +2 -2
  89. package/dist/chunk-kj4fpfjj.js +2 -0
  90. package/dist/chunk-m1bczftm.js +2 -0
  91. package/dist/chunk-m3drjrkh.js +2 -0
  92. package/dist/chunk-m6826w3k.js +2 -0
  93. package/dist/{chunk-g12j8ahm.js → chunk-m6m19hwd.js} +4 -4
  94. package/dist/{chunk-1ycy7mqy.js → chunk-m6zmvcq2.js} +2 -2
  95. package/dist/{chunk-dpawcmgr.js → chunk-m7h6wx3r.js} +5 -5
  96. package/dist/chunk-m9cmc6np.js +2 -0
  97. package/dist/chunk-m9r4x7e6.js +2 -0
  98. package/dist/chunk-mbwdn96z.js +2 -0
  99. package/dist/chunk-mdxg95mq.js +2 -0
  100. package/dist/chunk-mqje968d.js +2 -0
  101. package/dist/{chunk-7gdvp6py.js → chunk-n1xcmhjw.js} +3 -3
  102. package/dist/{chunk-a5kaw8sc.js → chunk-nd7vkt4w.js} +8 -8
  103. package/dist/chunk-nkarb6fg.js +2 -0
  104. package/dist/{chunk-wwx0stf6.js → chunk-p47kzj6s.js} +7 -7
  105. package/dist/{chunk-ah7h9q0x.js → chunk-pjgzqz07.js} +2 -2
  106. package/dist/chunk-pq8mz4ma.js +2 -0
  107. package/dist/chunk-pxcmv1xz.js +2 -0
  108. package/dist/chunk-pxes1ft6.js +2 -0
  109. package/dist/chunk-q0xcf4zq.js +2 -0
  110. package/dist/{chunk-v2b8pa86.js → chunk-q94wdmdp.js} +3 -3
  111. package/dist/chunk-qc66nfp7.js +2 -0
  112. package/dist/{chunk-1c4t7ncb.js → chunk-qj4j547f.js} +2 -2
  113. package/dist/{chunk-e4407hzw.js → chunk-qyq7edq6.js} +12 -12
  114. package/dist/{chunk-4r7s3862.js → chunk-r47cs92n.js} +2 -2
  115. package/dist/{chunk-1xgs9gd5.js → chunk-rgage0vm.js} +2 -2
  116. package/dist/{chunk-jjwg83xv.js → chunk-rqc62964.js} +1 -1
  117. package/dist/{chunk-1w8ssr90.js → chunk-rxvnfge3.js} +6 -6
  118. package/dist/{chunk-tqnh98j7.js → chunk-saf7kypg.js} +3 -3
  119. package/dist/chunk-sg2bn15n.js +2 -0
  120. package/dist/chunk-sn98t7ef.js +2 -0
  121. package/dist/chunk-sz243f3v.js +2 -0
  122. package/dist/chunk-t2ec3fek.js +2 -0
  123. package/dist/{chunk-3nc2fr4q.js → chunk-tq28tg3k.js} +2 -2
  124. package/dist/chunk-v0dzrwg8.js +2 -0
  125. package/dist/chunk-vc6dn0jf.js +2 -0
  126. package/dist/{chunk-x8rx0s3h.js → chunk-vjx8gtfk.js} +3 -3
  127. package/dist/{chunk-9dgd1p9a.js → chunk-w9157aaz.js} +5 -5
  128. package/dist/{chunk-xj45mw7v.js → chunk-wsdn5fxe.js} +3 -3
  129. package/dist/{chunk-xb739v4r.js → chunk-wxkphrnt.js} +6 -6
  130. package/dist/{chunk-yn3kp3qy.js → chunk-wy4hfmjs.js} +5 -5
  131. package/dist/{chunk-qfc912e5.js → chunk-xfpfs9zq.js} +2 -2
  132. package/dist/chunk-xnfjemzj.js +2 -0
  133. package/dist/chunk-yje1skpw.js +2 -0
  134. package/dist/{chunk-h23bjqn1.js → chunk-ymcsz527.js} +31 -31
  135. package/dist/{chunk-w8q1xp9e.js → chunk-ymdy7b8z.js} +2 -2
  136. package/dist/{chunk-wk85dz07.js → chunk-z06npyzn.js} +3 -3
  137. package/dist/chunk-ztfvrpp6.js +2 -0
  138. package/dist/chunk-zycahp89.js +2 -0
  139. package/dist/cli.js +22 -22
  140. package/dist/craft-entry.js +2 -2
  141. package/dist/craft.js +2 -2
  142. package/dist/native/primitives/Map.stx +4 -1
  143. package/dist/native/runtime/browser-renderer.js +23 -8
  144. package/dist/pwa.js +3 -3
  145. package/dist/server-bindings.js +2 -2
  146. package/dist/signal-processing.js +3 -120
  147. package/dist/ssg.js +11 -11
  148. package/package.json +5 -5
  149. package/dist/chunk-0cdm7t05.js +0 -2
  150. package/dist/chunk-0m8bd1e4.js +0 -2
  151. package/dist/chunk-15y79nz5.js +0 -2
  152. package/dist/chunk-17vy71v0.js +0 -2
  153. package/dist/chunk-1ee1t21e.js +0 -2
  154. package/dist/chunk-2bpj2dsh.js +0 -2
  155. package/dist/chunk-31ez1sq0.js +0 -2
  156. package/dist/chunk-38qks2pt.js +0 -2
  157. package/dist/chunk-3jhckfnp.js +0 -18
  158. package/dist/chunk-3m2h76cz.js +0 -2
  159. package/dist/chunk-3nk8cnrm.js +0 -3
  160. package/dist/chunk-40fqmb3q.js +0 -2
  161. package/dist/chunk-4265g93g.js +0 -2
  162. package/dist/chunk-4cmqjmqr.js +0 -3
  163. package/dist/chunk-54mnmxg9.js +0 -2
  164. package/dist/chunk-56mkcxvb.js +0 -2
  165. package/dist/chunk-5pk0s92z.js +0 -2
  166. package/dist/chunk-68ph8r20.js +0 -2
  167. package/dist/chunk-6bcvd3pg.js +0 -2
  168. package/dist/chunk-6va8wt88.js +0 -2
  169. package/dist/chunk-7qwwm3se.js +0 -2
  170. package/dist/chunk-89s1ekq9.js +0 -2
  171. package/dist/chunk-8xn3kd90.js +0 -2
  172. package/dist/chunk-97w2jbj4.js +0 -2
  173. package/dist/chunk-9skdekv5.js +0 -2
  174. package/dist/chunk-ac8a280a.js +0 -2
  175. package/dist/chunk-avw3nvd4.js +0 -2
  176. package/dist/chunk-cp4dr9ch.js +0 -2
  177. package/dist/chunk-d235xyhd.js +0 -2
  178. package/dist/chunk-d7mfkc61.js +0 -2
  179. package/dist/chunk-d8fhthyf.js +0 -2
  180. package/dist/chunk-dagve9rb.js +0 -2
  181. package/dist/chunk-dekpf1ry.js +0 -2
  182. package/dist/chunk-dz7v901d.js +0 -2
  183. package/dist/chunk-e099d50m.js +0 -2
  184. package/dist/chunk-eeadhr78.js +0 -2
  185. package/dist/chunk-fz7dxc1q.js +0 -2
  186. package/dist/chunk-hp8g2q2n.js +0 -2
  187. package/dist/chunk-hpeg9erh.js +0 -3
  188. package/dist/chunk-hrahv6v0.js +0 -2
  189. package/dist/chunk-hv2kxb94.js +0 -2
  190. package/dist/chunk-j9c0yam7.js +0 -2
  191. package/dist/chunk-jvt7ddp6.js +0 -2
  192. package/dist/chunk-k376bs13.js +0 -2
  193. package/dist/chunk-k6tnvpje.js +0 -2836
  194. package/dist/chunk-m7jmpech.js +0 -2
  195. package/dist/chunk-m7ktr4xn.js +0 -2
  196. package/dist/chunk-m9wr2crk.js +0 -2
  197. package/dist/chunk-mjdyyekx.js +0 -4
  198. package/dist/chunk-mx785pkc.js +0 -2
  199. package/dist/chunk-njrakvz7.js +0 -2
  200. package/dist/chunk-qd7bqhm3.js +0 -2
  201. package/dist/chunk-qprkb5qe.js +0 -2
  202. package/dist/chunk-r90xczch.js +0 -2
  203. package/dist/chunk-sa18andz.js +0 -30
  204. package/dist/chunk-schxd5k5.js +0 -2
  205. package/dist/chunk-t94z65ry.js +0 -2
  206. package/dist/chunk-wzymzex7.js +0 -2
  207. package/dist/chunk-x2baq8dk.js +0 -2
  208. package/dist/chunk-xcegeyn7.js +0 -2
  209. package/dist/chunk-y2gbm7j3.js +0 -2
  210. package/dist/chunk-z9q5p39g.js +0 -2
  211. package/dist/chunk-zfypzka2.js +0 -2
  212. package/dist/chunk-zh0jbzvk.js +0 -2
  213. package/dist/chunk-zh4saqzm.js +0 -2
  214. package/dist/chunk-zpf9he2x.js +0 -2
  215. package/dist/chunk-zpftj8s8.js +0 -2
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Bn,Ne,Ho,Ja}from"./chunk-vpmb8gcc.js";import{jn,qr,Ga,Ka,Xa}from"./chunk-8a4g0mex.js";import{Bo,Fo,zo,Wa,qa}from"./chunk-5fx8m234.js";import{ie,ht,Gr}from"./chunk-97vj2cqz.js";import{Zc,Qc,el,tl,hr,vu}from"./chunk-nda4xq79.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
3
- Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-k376bs13.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
2
+ import{Fn,Le,Uo,Ya}from"./chunk-9ya4tdpz.js";import{Bn,Gr,Ka,Xa,Ja}from"./chunk-g8tx0yf8.js";import{Fo,zo,Ho,qa,Ga}from"./chunk-7wyyjdks.js";import{ae,yt,Kr}from"./chunk-8cs45k3f.js";import{Qc,el,tl,nl,yr,xu}from"./chunk-9tcvkbb5.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
3
+ Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-e7ddshxz.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
4
4
  <html lang="en">
5
5
  <head>
6
6
  <meta charset="UTF-8">
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
233
233
  }, 5000);
234
234
  </script>
235
235
  </body>
236
- </html>`}function b(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=ie(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Bn(n,t);if(a){let s=Ne(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return qr(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,Fo as auditBuildOutput,Bo as auditConfig,re as buildPwaAssets,zo as calculateAuditResult,qa as formatAuditResult,Gr as formatSize,j as generateManifest,_ as generateManifestJson,Ka as generateManifestLink,F as generateOfflinePage,ie as generatePrecacheManifest,ht as generatePrecacheManifestJs,M as generatePwaIcons,jn as generatePwaTags,Bn as generateServiceWorker,Ja as generateServiceWorkerAuto,Ga as generateSwRegistrationScript,Xa as generateThemeColorMeta,N as getExpectedIconPaths,Ne as getServiceWorkerFileName,qr as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,Ho as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,hr as pwaDirectives,Zc as pwaInstallDirective,el as pwaOfflineDirective,tl as pwaPushDirective,Qc as pwaUpdateDirective,vu as registerPwaDirectives,Wa as runPwaAudit,D as validateManifest};
236
+ </html>`}function b(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=ae(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Fn(n,t);if(a){let s=Le(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function se(n,t){return Gr(n,t)}function oe(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,zo as auditBuildOutput,Fo as auditConfig,re as buildPwaAssets,Ho as calculateAuditResult,Ga as formatAuditResult,Kr as formatSize,j as generateManifest,_ as generateManifestJson,Xa as generateManifestLink,F as generateOfflinePage,ae as generatePrecacheManifest,yt as generatePrecacheManifestJs,M as generatePwaIcons,Bn as generatePwaTags,Fn as generateServiceWorker,Ya as generateServiceWorkerAuto,Ka as generateSwRegistrationScript,Ja as generateThemeColorMeta,N as getExpectedIconPaths,Le as getServiceWorkerFileName,Gr as injectPwaTags,oe as isPwaEnabled,I as isSharpAvailable,Uo as isWorkboxEnabled,q as mergeManifestConfig,se as processPwaHtml,yr as pwaDirectives,Qc as pwaInstallDirective,tl as pwaOfflineDirective,nl as pwaPushDirective,el as pwaUpdateDirective,xu as registerPwaDirectives,qa as runPwaAudit,D as validateManifest};
@@ -98,7 +98,7 @@ export function processServerBindings(template, context) {
98
98
  const fullTag = match[0], attrs = match[2];
99
99
  if (!attrs || !attrs.includes(":"))
100
100
  continue;
101
- const bindingRegex = /\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g;
101
+ const nativeHost = /(?:^|\s)data-native(?:\s|=|$)/i.test(attrs.replace(/"[^"]*"|'[^']*'/g, "")), bindingRegex = /\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g;
102
102
  let attrMatch, newAttrs = attrs, hadReplacement = !1;
103
103
  while ((attrMatch = bindingRegex.exec(attrs)) !== null) {
104
104
  const attrName = attrMatch[1], expression = attrMatch[2];
@@ -145,7 +145,7 @@ export function processServerBindings(template, context) {
145
145
  if (value === null || value === void 0 || value === !1)
146
146
  newAttrs = newAttrs.replace(attrMatch[0], "");
147
147
  else {
148
- const escaped = String(value).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
148
+ const escaped = (nativeHost && typeof value === "object" ? JSON.stringify(value) : String(value)).replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
149
149
  newAttrs = newAttrs.replace(attrMatch[0], ` ${attrName}="${escaped}"`);
150
150
  }
151
151
  hadReplacement = !0;
@@ -8,6 +8,7 @@ import { injectSignalsRuntime } from "./runtime-injection.js";
8
8
  import { evictOldest, matchScriptElement, scanAtElementPosition } from "./html-masking.js";
9
9
  import { importOnce } from "./lazy-module.js";
10
10
  import { findBodyOpenTag } from "./find-body-tag.js";
11
+ import { stripCommentsAndLiterals } from "./strip-literals.js";
11
12
  let signalSetupCounter = 0;
12
13
  const TAG_ATTR_RUN = `(?:"[^"]*"|'[^']*'|[^>"'])*`, SINGLE_ELEMENT_RE = /^<([a-zA-Z][a-zA-Z0-9-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)>([\s\S]*)<\/\1>$/s, SCRIPT_SCAN_CACHE_MIN_BYTES = 65536, SCRIPT_SCAN_CACHE_MAX_ENTRIES = 4, scriptScanCache = new Map;
13
14
  export function clearScriptScanCache() {
@@ -861,106 +862,9 @@ if(window.stx)window.stx._latestSetup=${setupFnName};
861
862
  return { output: rebuildSetupOwner(template, signalScripts, markerAt, setupFnName), setupCode };
862
863
  }
863
864
  export function extractExports(setupContent) {
864
- const code = setupContent, names = [], seen = new Set;
865
+ const code = stripCommentsAndLiterals(setupContent), names = [], seen = new Set;
865
866
  let depth = 0, i = 0;
866
- const len = code.length;
867
- let lastSig = "";
868
- const skipRegex = () => {
869
- i++;
870
- let inClass = !1;
871
- while (i < len) {
872
- const c = code[i];
873
- if (c === "\\") {
874
- i += 2;
875
- continue;
876
- }
877
- if (c === "[" && !inClass) {
878
- inClass = !0;
879
- i++;
880
- continue;
881
- }
882
- if (c === "]" && inClass) {
883
- inClass = !1;
884
- i++;
885
- continue;
886
- }
887
- if (c === "/" && !inClass) {
888
- i++;
889
- while (i < len && /[gimsuyd]/.test(code[i]))
890
- i++;
891
- return;
892
- }
893
- if (c === `
894
- `)
895
- return;
896
- i++;
897
- }
898
- }, isRegexStart = () => {
899
- if (!lastSig)
900
- return !0;
901
- if (/[\w)\]]/.test(lastSig))
902
- return !1;
903
- return !0;
904
- }, skipString = (quote) => {
905
- i++;
906
- while (i < len) {
907
- if (code[i] === "\\") {
908
- i += 2;
909
- continue;
910
- }
911
- if (code[i] === quote) {
912
- i++;
913
- return;
914
- }
915
- i++;
916
- }
917
- }, skipTemplateLiteral = () => {
918
- i++;
919
- while (i < len) {
920
- if (code[i] === "\\") {
921
- i += 2;
922
- continue;
923
- }
924
- if (code[i] === "`") {
925
- i++;
926
- return;
927
- }
928
- if (code[i] === "$" && code[i + 1] === "{") {
929
- i += 2;
930
- let templateDepth = 1;
931
- while (i < len && templateDepth > 0)
932
- if (code[i] === "{") {
933
- templateDepth++;
934
- i++;
935
- } else if (code[i] === "}") {
936
- templateDepth--;
937
- i++;
938
- } else if (code[i] === "'" || code[i] === '"')
939
- skipString(code[i]);
940
- else if (code[i] === "`")
941
- skipTemplateLiteral();
942
- else
943
- i++;
944
- continue;
945
- }
946
- i++;
947
- }
948
- }, skipComment = () => {
949
- if (code[i] === "/" && code[i + 1] === "/") {
950
- while (i < len && code[i] !== `
951
- `)
952
- i++;
953
- return !0;
954
- }
955
- if (code[i] === "/" && code[i + 1] === "*") {
956
- i += 2;
957
- while (i < len - 1 && !(code[i] === "*" && code[i + 1] === "/"))
958
- i++;
959
- i += 2;
960
- return !0;
961
- }
962
- return !1;
963
- }, checkDeclaration = () => {
867
+ const len = code.length, checkDeclaration = () => {
964
868
  if (depth !== 0)
965
869
  return;
966
870
  const declMatch = code.slice(i).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*(?:[!:;,\n]|=(?!=)|$)/);
@@ -1019,39 +923,18 @@ export function extractExports(setupContent) {
1019
923
  }
1020
924
  };
1021
925
  while (i < len) {
1022
- if (skipComment())
1023
- continue;
1024
- if (code[i] === "'" || code[i] === '"') {
1025
- skipString(code[i]);
1026
- lastSig = code[i - 1];
1027
- continue;
1028
- }
1029
- if (code[i] === "`") {
1030
- skipTemplateLiteral();
1031
- lastSig = "`";
1032
- continue;
1033
- }
1034
- if (code[i] === "/" && code[i + 1] !== "/" && code[i + 1] !== "*" && isRegexStart()) {
1035
- skipRegex();
1036
- lastSig = "/";
1037
- continue;
1038
- }
1039
926
  if (code[i] === "{") {
1040
927
  depth++;
1041
- lastSig = "{";
1042
928
  i++;
1043
929
  continue;
1044
930
  }
1045
931
  if (code[i] === "}") {
1046
932
  depth--;
1047
- lastSig = "}";
1048
933
  i++;
1049
934
  continue;
1050
935
  }
1051
936
  if (depth === 0 && /[a-z]/i.test(code[i]) && (i === 0 || /\s|[;{}()]/.test(code[i - 1])))
1052
937
  checkDeclaration();
1053
- if (!/\s/.test(code[i]))
1054
- lastSig = code[i];
1055
938
  i++;
1056
939
  }
1057
940
  return names.join(", ");
package/dist/ssg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import"./chunk-azb58ven.js";import"./chunk-a5kaw8sc.js";import"./chunk-mtdx75j5.js";import{nt,rt,st,ot,it,at}from"./chunk-h23bjqn1.js";import"./chunk-r4199q6x.js";import"./chunk-6v1gwdbv.js";import{f,ze,N,K,n,o}from"./chunk-k6tnvpje.js";import"./chunk-g6cwhsb4.js";import{sr}from"./chunk-pp9jgyb6.js";import"./chunk-e124cgb6.js";import"./chunk-1ycy7mqy.js";import"./chunk-1xgs9gd5.js";import"./chunk-ff61d2wr.js";import"./chunk-rdfgqvrh.js";import{ae,yt,bt}from"./chunk-9dgd1p9a.js";import{No,Lo,jo}from"./chunk-wk85dz07.js";import{mt,Qt,en}from"./chunk-hpeg9erh.js";import"./chunk-x8rx0s3h.js";import{a}from"./chunk-4cmqjmqr.js";import x from"fs";import g from"path";import{createHash as Dt}from"crypto";function Rt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Ct(t){return Bun.hash(t).toString(16)}function ut(t,i={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,r=t.replace(kt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(i.minify)h=Rt(h);let S=Ct(h);if(!s.has(S))s.set(S,h);let P=i.integrity?` data-stx-integrity="sha384-${Dt("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(s,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Et=new Set(["visible","idle"]);function dt(t){if(!t.includes("data-stx-src="))return t;let i=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=s.exec(t))!==null)i.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Et.has(i.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var It=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function q(t){let i=t.trim();if(!i)return null;let s=/^https?:\/\//i.test(i)?i:`https://${i}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Bt(t){for(let i of It){let s=t[i];if(!s)continue;let r=q(s);if(r)return{url:r,source:"env",via:i}}return null}function gt(t){if(!t||typeof t!=="object")return null;let i=t,s=i.site?.url??i.url??i.app?.url;return typeof s==="string"?q(s):null}async function jt(t){let{existsSync:i}=await import("fs"),s=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(t,r);if(!i(c))continue;try{let e=await import(c),l=gt(e.default??e);if(l)return l}catch{}}return null}async function pt(t={}){let i=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let l=q(t.explicit);if(l)return{url:l,source:"option"}}let r=gt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await jt(i);if(c)return{url:c,source:"site.config",via:"url"};let e=Bt(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ht(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
- `)}class ft{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,i=""){this.cacheDir=t,this.salt=i}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let i=JSON.parse(await Bun.file(t).text());for(let[s,r]of Object.entries(i))this.cache.set(s,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),i={};for(let[s,r]of this.cache)i[s]=r;await Bun.write(t,JSON.stringify(i))}getHash(t,i){let s=x.statSync(t),r=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of i)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let c=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);c=(c<<5)-c+l,c=c&c}return Math.abs(c).toString(36)}get(t,i){let s=this.cache.get(t);if(!s)return null;let r=this.getHash(i,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(t),null;return s.html}set(t,i,s,r){let c=this.getHash(i,s);this.cache.set(t,{hash:c,html:r,generatedAt:Date.now(),dependencies:s})}}class wt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let i=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",i)}async get(t){let i=this.getFilePath(t);if(!await Bun.file(i).exists())return null;try{return JSON.parse(await Bun.file(i).text())}catch{return null}}async set(t,i){let s=this.getFilePath(t);await x.promises.mkdir(g.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(i))}async invalidate(t){let i=this.getFilePath(t);if(await Bun.file(i).exists())await x.promises.unlink(i)}async invalidatePattern(t){let i=g.join(this.cacheDir,"isr");if(!x.existsSync(i))return;let s=await x.promises.readdir(i);for(let r of s){let c=r.replace(/_/g,"/").replace(".json","");if(t.test(c))await x.promises.unlink(g.join(i,r))}}async needsRevalidation(t){let i=await this.get(t);if(!i)return!0;return Date.now()>i.revalidateAfter}}async function Ft(t){try{let s=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!s)return null;let r=s[1];if(!r.includes("getStaticPaths"))return null;let c=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!c)return null;return await Function(`
2
+ import"./chunk-ffxwsa94.js";import"./chunk-nd7vkt4w.js";import"./chunk-ec8k75ep.js";import{rt,st,ot,it,at,ct}from"./chunk-ymcsz527.js";import"./chunk-7m0r2qs2.js";import"./chunk-d4ybwtqt.js";import{f,He,N,X,n,o}from"./chunk-4aw3whbc.js";import"./chunk-a9q8c4pm.js";import{or}from"./chunk-d7w1n5jm.js";import"./chunk-ghnkphy4.js";import"./chunk-m6zmvcq2.js";import"./chunk-rgage0vm.js";import"./chunk-8b6mp92r.js";import"./chunk-ezdsaxbb.js";import{ce,bt,wt}from"./chunk-w9157aaz.js";import{Lo,jo,Bo}from"./chunk-z06npyzn.js";import{ht,en,tn}from"./chunk-15g5sc0p.js";import"./chunk-vjx8gtfk.js";import{a}from"./chunk-203rr1c8.js";import x from"fs";import g from"path";import{createHash as Dt}from"crypto";function Rt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Ct(t){return Bun.hash(t).toString(16)}function ut(t,i={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,r=t.replace(kt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(i.minify)h=Rt(h);let S=Ct(h);if(!s.has(S))s.set(S,h);let P=i.integrity?` data-stx-integrity="sha384-${Dt("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(s,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Et=new Set(["visible","idle"]);function dt(t){if(!t.includes("data-stx-src="))return t;let i=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=s.exec(t))!==null)i.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Et.has(i.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var It=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function q(t){let i=t.trim();if(!i)return null;let s=/^https?:\/\//i.test(i)?i:`https://${i}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Bt(t){for(let i of It){let s=t[i];if(!s)continue;let r=q(s);if(r)return{url:r,source:"env",via:i}}return null}function gt(t){if(!t||typeof t!=="object")return null;let i=t,s=i.site?.url??i.url??i.app?.url;return typeof s==="string"?q(s):null}async function jt(t){let{existsSync:i}=await import("fs"),s=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(t,r);if(!i(c))continue;try{let e=await import(c),l=gt(e.default??e);if(l)return l}catch{}}return null}async function pt(t={}){let i=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let l=q(t.explicit);if(l)return{url:l,source:"option"}}let r=gt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await jt(i);if(c)return{url:c,source:"site.config",via:"url"};let e=Bt(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ft(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
+ `)}class mt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,i=""){this.cacheDir=t,this.salt=i}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let i=JSON.parse(await Bun.file(t).text());for(let[s,r]of Object.entries(i))this.cache.set(s,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),i={};for(let[s,r]of this.cache)i[s]=r;await Bun.write(t,JSON.stringify(i))}getHash(t,i){let s=x.statSync(t),r=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of i)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let c=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);c=(c<<5)-c+l,c=c&c}return Math.abs(c).toString(36)}get(t,i){let s=this.cache.get(t);if(!s)return null;let r=this.getHash(i,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(t),null;return s.html}set(t,i,s,r){let c=this.getHash(i,s);this.cache.set(t,{hash:c,html:r,generatedAt:Date.now(),dependencies:s})}}class yt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let i=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",i)}async get(t){let i=this.getFilePath(t);if(!await Bun.file(i).exists())return null;try{return JSON.parse(await Bun.file(i).text())}catch{return null}}async set(t,i){let s=this.getFilePath(t);await x.promises.mkdir(g.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(i))}async invalidate(t){let i=this.getFilePath(t);if(await Bun.file(i).exists())await x.promises.unlink(i)}async invalidatePattern(t){let i=g.join(this.cacheDir,"isr");if(!x.existsSync(i))return;let s=await x.promises.readdir(i);for(let r of s){let c=r.replace(/_/g,"/").replace(".json","");if(t.test(c))await x.promises.unlink(g.join(i,r))}}async needsRevalidation(t){let i=await this.get(t);if(!i)return!0;return Date.now()>i.revalidateAfter}}async function Ft(t){try{let s=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!s)return null;let r=s[1];if(!r.includes("getStaticPaths"))return null;let c=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!c)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${c[1]}
6
6
  })()
@@ -9,9 +9,9 @@ import"./chunk-azb58ven.js";import"./chunk-a5kaw8sc.js";import"./chunk-mtdx75j5.
9
9
  ${e[1]}
10
10
  })()
11
11
  `)(i)}catch(e){return console.error(`Error executing getStaticProps in ${s}:`,e),null}}function Lt(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function St(t,i,s={},r,c){let e=await Bun.file(t.filePath).text(),l=await Tt(t.filePath),w=await At(e,i,t.filePath),y={...l||{},...w||{},...s,params:i,$route:{path:t.pattern,params:i}},h=new Set,S=[],P=[],D={...c,...r.partialsDir?{partialsDir:r.partialsDir}:{},...r.componentsDir?{componentsDir:r.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(b)=>{S.push(`${g.relative(process.cwd(),b.templatePath)}: ${b.message}
12
- resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(Lt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let p=await n(e,y,t.filePath,D,h);for(let b of[t.filePath,...h])for(let B of ae(b))h.add(B);if(Object.keys(i).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(i)};else window.__stx_rp=${JSON.stringify(i)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
12
+ resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(Lt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let p=await n(e,y,t.filePath,D,h);for(let b of[t.filePath,...h])for(let B of ce(b))h.add(B);if(Object.keys(i).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(i)};else window.__stx_rp=${JSON.stringify(i)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
13
13
  </head>`);else p=`${b}
14
- ${p}`}if(p=await K(p,{router:r.router}),p=await f(p),r.minify!==!1)return{html:Mt(p),dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P};return{html:p,dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P}}function Mt(t){let i=[],s=0,r=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=r.exec(t))!==null){let l=t.slice(s,c.index);i.push(l.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=c[1],y=c[2],h=c[3];y=y.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),i.push(w+y+h),s=c.index+c[0].length}let e=t.slice(s);return i.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),i.join("").trim()}function Ut(t){let i=0;for(let s=0;s<t.length;s++){let r=t.charCodeAt(s);i=(i<<5)-i+r,i=i&i}return`"${Math.abs(i).toString(36)}"`}function _t(t,i,s,r){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(i))return!0;return r.some((c)=>{if(c instanceof RegExp)return c.test(t);return c.endsWith("/")?t===c.slice(0,-1)||t.startsWith(c):t===c})}function Gt(t,i){return`<?xml version="1.0" encoding="UTF-8"?>
14
+ ${p}`}if(p=await X(p,{router:r.router}),p=await f(p),r.minify!==!1)return{html:Mt(p),dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P};return{html:p,dependencies:Array.from(h),includeFailures:S,serverScriptFailures:P}}function Mt(t){let i=[],s=0,r=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=r.exec(t))!==null){let l=t.slice(s,c.index);i.push(l.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=c[1],y=c[2],h=c[3];y=y.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),i.push(w+y+h),s=c.index+c[0].length}let e=t.slice(s);return i.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),i.join("").trim()}function Ut(t){let i=0;for(let s=0;s<t.length;s++){let r=t.charCodeAt(s);i=(i<<5)-i+r,i=i&i}return`"${Math.abs(i).toString(36)}"`}function _t(t,i,s,r){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(i))return!0;return r.some((c)=>{if(c instanceof RegExp)return c.test(t);return c.endsWith("/")?t===c.slice(0,-1)||t.startsWith(c):t===c})}function Gt(t,i){return`<?xml version="1.0" encoding="UTF-8"?>
15
15
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
16
16
  ${t.map((r)=>{let c=new URL(r.loc,i).href,e=` <url>
17
17
  <loc>${I(c)}</loc>`;if(r.lastmod)e+=`
@@ -41,16 +41,16 @@ ${t.map((r)=>{let c=new URL(r.loc,i).href,e=` <url>
41
41
  ${s.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function zt(t={}){let i=Date.now();bt();let s=await o(process.cwd()),r=s.build||{},c=await pt({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ht());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-4265g93g.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-54mnmxg9.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new ft(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-4265g93g.js");await u('<div class="bg-black"></div>')}catch{}nt();let xt=s?.routeMiddleware?.dir||"middleware";await st(process.cwd(),xt);let H=rt();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let vt=s?.routeMiddleware?.global||[];jo(s?.layoutsDir,a(process.cwd()));let V=N(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${V.length} routes`);let _=[];for(let u of V){let m=await Ot(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],X=[];for(let u=0;u<_.length;u+=e.concurrency)X.push(_.slice(u,u+e.concurrency));for(let u of X)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:Pt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Jt(j),$t=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],tt=[...vt,...$t];if(tt.length>0){let C=ot(d,L,F||{}),O=it(C,null,void 0,{isServer:!0}),E=await at(tt,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Vt(String(R),d),T=Kt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let et=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(et)try{if(!await Function("route",`
44
+ </rss>`}async function zt(t={}){let i=Date.now();wt();let s=await o(process.cwd()),r=s.build||{},c=await pt({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ft());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-1k38dc96.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-0fv4x8fn.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new mt(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-1k38dc96.js");await u('<div class="bg-black"></div>')}catch{}rt();let xt=s?.routeMiddleware?.dir||"middleware";await ot(process.cwd(),xt);let H=st();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let vt=s?.routeMiddleware?.global||[];Bo(s?.layoutsDir,a(process.cwd()));let V=N(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${V.length} routes`);let _=[];for(let u of V){let m=await Ot(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],K=[];for(let u=0;u<_.length;u+=e.concurrency)K.push(_.slice(u,u+e.concurrency));for(let u of K)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:Pt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Jt(j),$t=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],tt=[...vt,...$t];if(tt.length>0){let C=it(d,L,F||{}),O=at(C,null,void 0,{isServer:!0}),E=await ct(tt,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Vt(String(R),d),T=Kt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let et=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(et)try{if(!await Function("route",`
45
45
  const validate = ${et[1]};
46
46
  return validate(route);
47
- `)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,ct=!1;if(e.cache){if(k=B.get(d,v.filePath),k)ct=!0,l.cachedCount++}if(!k){let C=await St(v,L,Pt,e,s);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
47
+ `)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,nt=!1;if(e.cache){if(k=B.get(d,v.filePath),k)nt=!0,l.cachedCount++}if(!k){let C=await St(v,L,Pt,e,s);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
48
48
  ${C.includeFailures.join(`
49
49
  `)}
50
50
  Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&C.serverScriptFailures.length>0)throw Error(`${C.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
51
51
  ${C.serverScriptFailures.join(`
52
52
  `)}
53
- Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)B.set(d,v.filePath,C.dependencies,k)}let M;if(e.trailingSlash)M=g.join(e.outputDir,d,"index.html");else M=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=ut(k,{integrity:e.integrityIslands,minify:e.minify});if(O.length>0){let E=g.join(e.outputDir,"_stx","islands");await x.promises.mkdir(E,{recursive:!0});for(let R of O){let U=g.join(E,`${R.hash}.js`);if(!await Bun.file(U).exists())await Bun.write(U,R.code);if(!w.has(R.hash)){w.add(R.hash);let T=Buffer.byteLength(R.code,"utf8");y+=T,h[R.hash]={bytes:T,file:`/_stx/islands/${R.hash}.js`}}}if(S[d]=O.map((R)=>R.hash),k=C,e.prefetchIslands)k=dt(k)}}if(await x.promises.mkdir(g.dirname(M),{recursive:!0}),await Bun.write(M,k),!_t(d,k,F,e.sitemapExclude))A.push({loc:d,lastmod:new Date().toISOString().split("T")[0],priority:d==="/"?1:0.8});let lt={route:d,outputPath:M,size:Buffer.byteLength(k,"utf8"),cached:ct};if(Q!==!1)lt.revalidateAt=Date.now()+Q*1000;l.pages.push(lt),l.successCount++,await e.hooks.onPageEnd?.(d,k)}catch(j){l.failedCount++,l.errors.push({route:d,error:j}),await e.hooks.onError?.(j,d),console.error(`Error generating ${d}:`,j)}}));let Y=yt();if(Y.length>0){let u=Y.map((m)=>`${m.filePath}: ${m.message}`).join(`
53
+ Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)B.set(d,v.filePath,C.dependencies,k)}let M;if(e.trailingSlash)M=g.join(e.outputDir,d,"index.html");else M=d==="/"?g.join(e.outputDir,"index.html"):g.join(e.outputDir,`${d}.html`);if(e.chunkIslands){let{html:C,chunks:O}=ut(k,{integrity:e.integrityIslands,minify:e.minify});if(O.length>0){let E=g.join(e.outputDir,"_stx","islands");await x.promises.mkdir(E,{recursive:!0});for(let R of O){let U=g.join(E,`${R.hash}.js`);if(!await Bun.file(U).exists())await Bun.write(U,R.code);if(!w.has(R.hash)){w.add(R.hash);let T=Buffer.byteLength(R.code,"utf8");y+=T,h[R.hash]={bytes:T,file:`/_stx/islands/${R.hash}.js`}}}if(S[d]=O.map((R)=>R.hash),k=C,e.prefetchIslands)k=dt(k)}}if(await x.promises.mkdir(g.dirname(M),{recursive:!0}),await Bun.write(M,k),!_t(d,k,F,e.sitemapExclude))A.push({loc:d,lastmod:new Date().toISOString().split("T")[0],priority:d==="/"?1:0.8});let lt={route:d,outputPath:M,size:Buffer.byteLength(k,"utf8"),cached:nt};if(Q!==!1)lt.revalidateAt=Date.now()+Q*1000;l.pages.push(lt),l.successCount++,await e.hooks.onPageEnd?.(d,k)}catch(j){l.failedCount++,l.errors.push({route:d,error:j}),await e.hooks.onError?.(j,d),console.error(`Error generating ${d}:`,j)}}));let Y=bt();if(Y.length>0){let u=Y.map((m)=>`${m.filePath}: ${m.message}`).join(`
54
54
  `);throw Error(`Client script bundling failed:
55
55
  ${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.stx");if(await Bun.file(u).exists()){let m=new Set,v={...s,debug:!1,cache:!1},d=await n(await Bun.file(u).text(),{},u,v,m);await Bun.write(g.join(e.outputDir,"404.html"),d)}else await Bun.write(g.join(e.outputDir,"404.html"),`<!DOCTYPE html>
56
56
  <html lang="en">
@@ -73,7 +73,7 @@ ${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.
73
73
  <a href="/">Go home</a>
74
74
  </div>
75
75
  </body>
76
- </html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...s,debug:!1,cache:!1},L=await n(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let W=g.join(e.pagesDir,"error.stx");if(await Bun.file(W).exists()){let u=new Set,m={...s,debug:!1,cache:!1},v=await n(await Bun.file(W).text(),{},W,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=Gt(A,e.domain),m=g.join(e.outputDir,"sitemap.xml");await Bun.write(m,u),l.sitemapPath=m,console.log(`Generated sitemap.xml with ${A.length} URLs`)}if(e.robots!==!1){let u=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((d)=>typeof d==="string"),...u.disallow||[]],v=sr({rules:[{userAgent:u.userAgent||"*",allow:u.allow||["/"],...m.length>0?{disallow:m}:{}}],...u.sitemap!==!1&&l.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(g.join(e.outputDir,"robots.txt"),v),console.log("Generated robots.txt")}if(e.rss){let u=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(u.getItems)m=await u.getItems();let v=Nt(u,m),d=g.join(e.outputDir,"rss.xml");await Bun.write(d,v),l.rssPath=d,console.log(`Generated rss.xml with ${m.length} items`)}let G=No(e.outputDir);if(G.assets>0)console.log(`Externalized ${G.assets} asset(s) from ${G.pages} page(s) (${(G.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let z=Lo(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} repeated asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&x.existsSync(e.publicDir))await J(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let Z=en();if(Z)await J(Z,g.join(e.outputDir,Qt)),console.log(`Copied assets from ${mt}`)}catch(D){throw await e.hooks.onError?.(D),D}if(l.buildTime=Date.now()-i,w.size>0){l.islandChunks={count:w.size,totalBytes:y};let D={generatedChunks:w.size,totalBytes:y,chunks:h,pages:S};await Bun.write(g.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(D,null,2))}await e.hooks.onBuildEnd?.(l);let P=l.islandChunks?`
76
+ </html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...s,debug:!1,cache:!1},L=await n(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let W=g.join(e.pagesDir,"error.stx");if(await Bun.file(W).exists()){let u=new Set,m={...s,debug:!1,cache:!1},v=await n(await Bun.file(W).text(),{},W,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=Gt(A,e.domain),m=g.join(e.outputDir,"sitemap.xml");await Bun.write(m,u),l.sitemapPath=m,console.log(`Generated sitemap.xml with ${A.length} URLs`)}if(e.robots!==!1){let u=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((d)=>typeof d==="string"),...u.disallow||[]],v=or({rules:[{userAgent:u.userAgent||"*",allow:u.allow||["/"],...m.length>0?{disallow:m}:{}}],...u.sitemap!==!1&&l.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(g.join(e.outputDir,"robots.txt"),v),console.log("Generated robots.txt")}if(e.rss){let u=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(u.getItems)m=await u.getItems();let v=Nt(u,m),d=g.join(e.outputDir,"rss.xml");await Bun.write(d,v),l.rssPath=d,console.log(`Generated rss.xml with ${m.length} items`)}let G=Lo(e.outputDir);if(G.assets>0)console.log(`Externalized ${G.assets} asset(s) from ${G.pages} page(s) (${(G.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let z=jo(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} repeated asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&x.existsSync(e.publicDir))await J(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let Z=tn();if(Z)await J(Z,g.join(e.outputDir,en)),console.log(`Copied assets from ${ht}`)}catch(D){throw await e.hooks.onError?.(D),D}if(l.buildTime=Date.now()-i,w.size>0){l.islandChunks={count:w.size,totalBytes:y};let D={generatedChunks:w.size,totalBytes:y,chunks:h,pages:S};await Bun.write(g.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(D,null,2))}await e.hooks.onBuildEnd?.(l);let P=l.islandChunks?`
77
77
  Island chunks: ${l.islandChunks.count} (${(l.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
78
78
  Build complete!
79
79
  Total: ${l.totalPages} pages
@@ -81,8 +81,8 @@ Build complete!
81
81
  Cached: ${l.cachedCount}
82
82
  Failed: ${l.failedCount}
83
83
  Time: ${l.buildTime}ms${P}
84
- `),l}async function J(t,i){await x.promises.mkdir(i,{recursive:!0});let s=await x.promises.readdir(t,{withFileTypes:!0});for(let r of s){let c=g.join(t,r.name),e=g.join(i,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await J(c,e);else await x.promises.copyFile(c,e)}}function Ht(t={}){let i=t.cacheDir||a(process.cwd(),"ssg-cache"),s=new wt(i),r=t.revalidate||3600;return{async get(c){let e=await s.get(c);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(c).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${r}, stale-while-revalidate=${r*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(c){let l=N(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>c.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${c}`);return}let w=c.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let h=await o(),{html:S}=await St(l,y,{},t,h);await s.set(c,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:Ut(S)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Wt(t){return async()=>({paths:await t(),fallback:!1})}function qt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let i=await Bun.file(t).text(),s=i.match(/^---\n([\s\S]*?)\n---/),r={},c=i;if(s){let h=s[1];c=i.slice(s[0].length).trim();for(let S of h.split(`
85
- `)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));r[D]=p}}}let e=c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),l=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,y;while((y=w.exec(e))!==null){let h=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:h})}return{content:e,data:r,toc:l}}}}function Jt(t){return ze(t)}function Vt(t,i){return`<!DOCTYPE html>
84
+ `),l}async function J(t,i){await x.promises.mkdir(i,{recursive:!0});let s=await x.promises.readdir(t,{withFileTypes:!0});for(let r of s){let c=g.join(t,r.name),e=g.join(i,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await J(c,e);else await x.promises.copyFile(c,e)}}function Ht(t={}){let i=t.cacheDir||a(process.cwd(),"ssg-cache"),s=new yt(i),r=t.revalidate||3600;return{async get(c){let e=await s.get(c);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(c).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${r}, stale-while-revalidate=${r*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(c){let l=N(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>c.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${c}`);return}let w=c.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let h=await o(),{html:S}=await St(l,y,{},t,h);await s.set(c,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:Ut(S)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Wt(t){return async()=>({paths:await t(),fallback:!1})}function qt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let i=await Bun.file(t).text(),s=i.match(/^---\n([\s\S]*?)\n---/),r={},c=i;if(s){let h=s[1];c=i.slice(s[0].length).trim();for(let S of h.split(`
85
+ `)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));r[D]=p}}}let e=c.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),l=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,y;while((y=w.exec(e))!==null){let h=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:h})}return{content:e,data:r,toc:l}}}}function Jt(t){return He(t)}function Vt(t,i){return`<!DOCTYPE html>
86
86
  <html>
87
87
  <head>
88
88
  <meta charset="utf-8">
@@ -94,4 +94,4 @@ Build complete!
94
94
  <p>Redirecting to <a href="${t}">${t}</a>...</p>
95
95
  <script>window.location.replace('${t}')</script>
96
96
  </body>
97
- </html>`}function Kt(t,i){if(t==="/"||t==="")return g.join(i.outputDir,"index.html");let s=t.replace(/^\/|\/$/g,"");if(i.trailingSlash)return g.join(i.outputDir,s,"index.html");return g.join(i.outputDir,`${s}.html`)}var Se={generateStaticSite:zt,createISRHandler:Ht,defineStaticPaths:Wt,createMarkdownLoader:qt};export{Ht as createISRHandler,qt as createMarkdownLoader,Lt as declaresPageAction,Se as default,Wt as defineStaticPaths,zt as generateStaticSite,_t as isExcludedFromSitemap};
97
+ </html>`}function Kt(t,i){if(t==="/"||t==="")return g.join(i.outputDir,"index.html");let s=t.replace(/^\/|\/$/g,"");if(i.trailingSlash)return g.join(i.outputDir,s,"index.html");return g.join(i.outputDir,`${s}.html`)}var ye={generateStaticSite:zt,createISRHandler:Ht,defineStaticPaths:Wt,createMarkdownLoader:qt};export{Ht as createISRHandler,qt as createMarkdownLoader,Lt as declaresPageAction,ye as default,Wt as defineStaticPaths,zt as generateStaticSite,_t as isExcludedFromSitemap};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.562",
4
+ "version": "0.2.564",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -123,12 +123,12 @@
123
123
  "dependencies": {
124
124
  "@stacksjs/ts-css": "^0.3.11",
125
125
  "@stacksjs/clapp": "^0.2.16",
126
- "@stacksjs/desktop": "0.2.562",
127
- "@stacksjs/sanitizer": "0.2.562",
126
+ "@stacksjs/desktop": "0.2.564",
127
+ "@stacksjs/sanitizer": "0.2.564",
128
128
  "@stacksjs/ts-i18n": "^0.1.11",
129
- "bun-plugin-stx": "0.2.562",
129
+ "bun-plugin-stx": "0.2.564",
130
130
  "bunfig": "^0.15.19",
131
- "stx-router": "0.2.562",
131
+ "stx-router": "0.2.564",
132
132
  "ts-broadcasting": "^0.0.11",
133
133
  "ts-images": "^0.2.22",
134
134
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{nl}from"./chunk-dpawcmgr.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{nl as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Tt,Sc,kc,Cc,_c,Ec,d,Tc,hs,$c,pi,fi}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Tt as STX_ENGINE_BINDING_NAMES,hs as convertToCommonJS,pi as extractScriptFromTemplate,d as extractVariables,fi as hasVariables,Tc as isCompleteImport,Ec as isMissingBindingFailure,Cc as isModuleResolutionFailure,_c as isSyntaxFailure,$c as splitDeclaration,Sc as stripTypeScript,kc as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{R,Fc,o,A,nu,ru}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{A as config,R as defaultConfig,nu as defineStxConfig,o as loadStxConfig,Fc as resolveStxDirectories,ru as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ro,Ao,Po,Rd}from"./chunk-kww6tjzk.js";import"./chunk-3jhckfnp.js";import"./chunk-tqnh98j7.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Ro as buildNative,Rd as default,Po as getAvailableFormats,Ao as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{id,ad}from"./chunk-36rd7j1d.js";import"./chunk-9dgd1p9a.js";import"./chunk-rdfgqvrh.js";import"./chunk-azb58ven.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{ad as clearStoreCache,id as getStoreScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{za}from"./chunk-zmq9hwta.js";export{za as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Rs,As,Ps,Is,nr,rr,su,ou,iu,au,sr,cu}from"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";export{cu as generateDefaultRobotsTxt,sr as generateRobotsTxt,ou as generateSitemap,iu as generateSitemapIndex,Is as injectSeoTags,nr as metaDirective,Rs as processMetaDirectives,Ps as processSeoDirective,As as processStructuredData,su as registerSeoDirectives,au as scanForSitemapEntries,rr as structuredDataDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{zn,sc,Dd,oc,Md,ic,Hn,b,Ct,be,ac,rs,cc,Nd,G,lc,Ld,x,jd}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{lc as applyFilters,Md as clearCustomFilters,ac as clientLoopScopes,zn as defaultFilters,b as escapeHtml,Ct as escapeHtmlValue,x as evaluateExpression,ic as findMustacheEnd,oc as getAllFilters,cc as interpolateScriptAttributes,rs as interpolateScriptExpressions,Nd as interpolateScriptsInTemplate,G as processExpressions,sc as registerFilter,Dd as registerFilters,Hn as replaceInterpolations,Ld as resetRejectedExpressionWarnings,jd as unescapeHtml,be as usesSignalsInScript};
@@ -1,18 +0,0 @@
1
- // @bun
2
- import{Fn,Le,Be,ye,ei,Wn,Q,K,ln,d,n,R}from"./chunk-k6tnvpje.js";import{dirname as k,resolve as _}from"path";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function C(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(s,p){let u;while((u=s.exec(o))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:m}=Fn(o),c=await(e.renderer??((s)=>Le(s)))(m);return{html:C(c),frontmatter:r??{}}}function v(o){let e=o,r=Q(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(o))!==null){let i=u[1],l=u[2],f=u[0],g=i.includes("server");if(p(l))s.push(f);else if(g)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let g=l.index+l[0].length,x=t.indexOf("</script>",g);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let g=f.length-1;g>=0;g--)t=t.substring(0,f[g].start)+t.substring(f[g].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function M(o,e){return`<!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>${(e||"stx").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}</title>
8
- </head>
9
- <body>
10
- ${o}
11
- </body>
12
- </html>`}async function Do(o,e={}){let r=_(o),m=Bun.file(r);if(!await m.exists())throw Error(`Template file not found: ${r}`);let a=await m.text(),c=null;if(h(r)){let s=await b(a,{renderer:e.markdownRenderer});a=s.html,c=s.frontmatter}if(c)e={...e,context:{...c,...e.context||{}}};if(e.layout){let s=_(e.layout),p=Bun.file(s);if(!await p.exists())throw Error(`Layout template not found: ${s}`);let{layout:u,injectCSS:t,...i}=e,l={...e.context||{}};ln(l);let f=await S(a,r,{...i,context:{...l,__stx_defer_server_data:!0},injectCSS:!1}),g=await p.text(),x={...l,content:f},w={...i,context:x,injectCSS:t};return S(g,s,w)}return S(a,r,e)}async function S(o,e,r={}){let{templateContent:m,serverScripts:a,clientScripts:c}=v(o),s={...R,...r.options},p={__filename:e,__dirname:k(e),__stx:{},__stx_options:s,__stx_sfc_mode:!0,__stx_inject_css:r.injectCSS===!0,__stxServeContext:void 0,...Wn(r.context??{}),definePageMeta:()=>{},...r.context||{}};for(let i of a)await d(i,p,e);let u=new Set,t=m;if(t=await n(t,p,e,s,u),ei(p,r.context),r.templateOnly){if(t=t.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),t=t.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),c.length>0)t+=`
13
- ${c.join(`
14
- `)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Be(p),g=(await Promise.all(c.map(async(w)=>{let y=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!y)return w;return await ye(y[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})}))).join(`
15
- `);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${g}
16
- $1`);else t+=`
17
- ${g}`}t=await K(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=M(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-4265g93g.js");t=await i(t)}catch{}return t}
18
- export{Do};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ar,Pr,Ir,ma,ha,ya,wo,ba,wa}from"./chunk-v79qs0qh.js";export{Ar as ImageProcessorCache,wo as applyTransformations,ma as clearImageCache,ba as generateResponsiveVariants,wa as generateSrcset,Pr as getCachedImageResult,ya as optimizeImage,ha as processImage,Ir as setCachedImageResult};
@@ -1,3 +0,0 @@
1
- // @bun
2
- function me(){let{NODE_ENV:o}=process.env;return o==="production"}function D(){let{STX_DEBUG:o}=process.env;return!me()||o==="true"}function xn(){let{NODE_ENV:o}=process.env;return o==="test"}
3
- export{me,D,xn};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ko,La,Gt,Ll,ja,Ba,Fa,jl}from"./chunk-7gdvp6py.js";export{Gt as Validator,La as defineForm,ja as processErrorDirective,Ba as processErrorsDirective,jl as processFormValidationDirectives,Fa as processHasErrorsDirective,ko as useForm,Ll as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qd,Zo,Gd,Qo,fc,gc,_t,an,Kd,mc,hc,Xd,f}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{_t as buildCss,mc as extractClassNames,gc as fingerprintConfig,hc as generateCss,Kd as getCachedCSS,qd as getCssServeAsset,f as injectCss,Zo as loadCssEngine,Qo as loadCssEngineConfig,an as rebuildCss,Gd as resetCssCache,fc as resolveUserCssConfig,Xd as withLinkedModuleBundles};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import i from"path";var $t=".stx",o="STX_DIR",e=null;function $i(t){e=t?.trim()||null}function dn(){return process.env[o]?.trim()||e||$t}function a(t=process.cwd(),...n){let r=dn();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function un(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==$t&&!n.startsWith(`${$t}/`))return t;let r=n.slice($t.length+1);return r?i.join(dn(),r):dn()}
3
- export{$t,$i,dn,a,un};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ss,os,is,Jd,qn,Yd}from"./chunk-k6tnvpje.js";export{qn as clearImageDeliveryCatalog,Jd as deliveredImage,is as efficientDeliverySources,ss as getImageDelivery,os as isTransparentImage,Yd as prepareImageDelivery};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pl,fl,gl,ml,la,hl,yl,bl,wl,vl,xl,Sl}from"./chunk-yp00nht2.js";export{xl as Broadcast,Sl as BroadcastServer,la as broadcast,wl as broadcastPresence,bl as broadcastPrivate,vl as channel,pl as getBroadcastServer,ml as loadChannels,fl as startBroadcasting,gl as stopBroadcasting,hl as toUser,yl as toUsers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pa,_l,fa,ga,El,Tl}from"./chunk-5yc38gvt.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Tl as applySlots,El as extractSlotContent,_l as parseSlotElement,pa as parseSlots,ga as processSlots,fa as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{De,Xt,cd}from"./chunk-p2mxsjv1.js";import{U,Mn,Jt,zr,Hr,Nn,ld,dd,ud,Yt,Zt,Ur,Ln,pd}from"./chunk-w8q1xp9e.js";import"./chunk-r4199q6x.js";export{zr as batch,cd as default,Mn as derived,Jt as effect,De as generateSignalsRuntime,Xt as generateSignalsRuntimeDev,Zt as isDerived,Yt as isSignal,Nn as onDestroy,Hr as onMount,Ln as peek,ud as pendingLifecycleCounts,dd as runDestroyCallbacks,ld as runMountCallbacks,U as state,Ur as untrack,pd as useOptimistic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Bn,Ne,Ho,Ja}from"./chunk-vpmb8gcc.js";export{Bn as generateServiceWorker,Ja as generateServiceWorkerAuto,Ne as getServiceWorkerFileName,Ho as isWorkboxEnabled};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$l,Rl,Al,Pl,Il,Ol,Dl}from"./chunk-m5fw8jq1.js";export{Rl as createKeepAliveCache,Pl as generateKeepAliveCSS,Il as generateKeepAliveRuntime,Ol as onActivated,Dl as onDeactivated,$l as processKeepAliveDirectives,Al as shouldCacheComponent};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kl}from"./chunk-jxc48ga1.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{kl as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{oa,ao,al,ia,aa,cl,ll}from"./chunk-e4407hzw.js";import"./chunk-wwx0stf6.js";import"./chunk-9dgd1p9a.js";import"./chunk-rdfgqvrh.js";import"./chunk-azb58ven.js";import{Ve,yc}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{oa as buildVirtualSource,Ve as extractScriptBlocks,yc as extractTemplateExpressions,ia as findRuntimeTypeDeclarations,aa as findStxModuleDeclarations,ll as formatTypecheckDiagnostics,al as sourcePathFor,cl as typecheckStxFiles,ao as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zd,wc,us,ps,ci,li,gs,ms,Kn,vc,di,ui,xc,We}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Zd as clearScriptScanCache,gs as convertServerLoopAttributesToDirectives,ci as convertSignalDirectivesToAttributes,ms as convertSignalLoopsToAttributes,vc as extractExports,ui as findMarkupIndexOutsideScripts,ps as hasSignalsSyntax,us as parseLoopExpression,li as preEvalLiteralReactiveIfs,Kn as processScriptSetup,di as processSignals,xc as rewriteStxImportSpecifiers,wc as scanScriptTags,We as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{cn,bc,ds}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import{ke}from"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{ke as freeIdentifiers,ds as processComponents,bc as processESImports,cn as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jl,Yl,Zl,Ql,ed}from"./chunk-yn3kp3qy.js";export{Yl as createSSRSuspense,Ql as generateSuspenseCSS,ed as generateSuspenseRuntime,Jl as processSuspenseDirectives,Zl as renderSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{je,dc,Bd,Fd,zd,Hd,uc,pc,Ud,Vd,Yo,Wd,sn,on,Un}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Hd as __setSignalsGeneratorsForTest,je as cacheEngineFingerprint,on as cacheTemplate,sn as checkCache,Wd as clearDevCaches,pc as getCachedRouterScript,uc as getCachedSignalsRuntime,Ud as getServeClientAsset,Yo as getServeModuleBundle,Un as hashFilePath,Fd as invalidateFileCache,zd as invalidateFileCacheByDir,Bd as readFileCached,Vd as registerServeModuleBundle,dc as templateCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pn,Ts}from"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";export{Ts as generateRuntimeConfigTypes,pn as prepareRuntimeConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bo,Cl}from"./chunk-jjwg83xv.js";export{bo as definePlugin,Cl as pluginManager};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fd,Co,Ha,gd,md,hd,yd,bd,Ua,Va,wd,vd,xd,Sd}from"./chunk-1w8ssr90.js";import"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{Ha as SUSPENSE_RESOLVER_RUNTIME,Co as buildSuspenseResolveScript,bd as createStreamRenderer,hd as extractStreamBoundaries,Sd as generateHydrationRuntime,Va as islandDirective,vd as processSectionDirectives,md as processStreamDirectives,wd as registerStreamingDirectives,gd as renderStreamingPage,fd as streamTemplate,yd as streamTemplateSimple,xd as streamToResponse,Ua as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{jn,qr,Ga,Ka,Xa}from"./chunk-8a4g0mex.js";import"./chunk-vpmb8gcc.js";export{Ka as generateManifestLink,jn as generatePwaTags,Ga as generateSwRegistrationScript,Xa as generateThemeColorMeta,qr as injectPwaTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ue,Rt,tr,$s,C,Je}from"./chunk-e124cgb6.js";export{Rt as currentRuntimeConfig,Je as injectRuntimeConfig,C as resolveRuntimeConfig,$s as useRuntimeConfig,tr as useServerRuntimeConfig,ue as withRuntimeConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{q,Zr,Qr,rc,St,qo,es,Go,Od,Be,ts,ye}from"./chunk-k6tnvpje.js";import"./chunk-x8rx0s3h.js";import"./chunk-mtdx75j5.js";import{Ci,s}from"./chunk-7wfh2hqy.js";import"./chunk-ff61d2wr.js";import"./chunk-1ycy7mqy.js";import"./chunk-e124cgb6.js";import"./chunk-pp9jgyb6.js";import"./chunk-g6cwhsb4.js";import"./chunk-a5kaw8sc.js";import"./chunk-6v1gwdbv.js";import"./chunk-r4199q6x.js";import"./chunk-h23bjqn1.js";import"./chunk-1xgs9gd5.js";export{q as BROWSER_CORE_IMPORTS,rc as STX_AUTO_IMPORTS,Zr as extractAndStripCssImports,Be as extractBridgeData,Ci as findInterpolationEnd,Go as generateAutoImportDestructuring,Od as generateBrowserAutoImportDestructuring,ts as generateServerDataBridge,St as injectBrowserCoreAutoImports,ye as processClientScript,es as referencesName,Qr as renderVendorStyleTags,s as stripCommentsAndLiterals,qo as transformAutoImports};