@stacksjs/stx 0.2.819 → 0.2.821

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 (212) hide show
  1. package/dist/{chunk-nsxjt6h3.js → chunk-06hc6rs6.js} +1 -1
  2. package/dist/{chunk-skht06a2.js → chunk-076fj387.js} +1 -1
  3. package/dist/{chunk-p7hy0seh.js → chunk-079g8e4w.js} +1 -1
  4. package/dist/chunk-09285y4b.js +2 -0
  5. package/dist/{chunk-v041eh5f.js → chunk-0dvgrqt8.js} +3 -3
  6. package/dist/chunk-0dzmw98y.js +2 -0
  7. package/dist/{chunk-g7mjv276.js → chunk-1f7d1c0y.js} +2 -2
  8. package/dist/chunk-22ekceg9.js +2 -0
  9. package/dist/{chunk-ax16vnn5.js → chunk-242qc25m.js} +6 -6
  10. package/dist/{chunk-4gg9594a.js → chunk-2b8pyef0.js} +5 -5
  11. package/dist/{chunk-sjd6rt97.js → chunk-2c6qbvne.js} +4 -4
  12. package/dist/{chunk-fmawgk87.js → chunk-2nj9aewf.js} +1 -1
  13. package/dist/{chunk-m7hfcxt3.js → chunk-2vqpz4qv.js} +2 -2
  14. package/dist/{chunk-dq9djbgq.js → chunk-30rpspzt.js} +4 -4
  15. package/dist/{chunk-1hg0zb3p.js → chunk-3axb6t08.js} +2 -2
  16. package/dist/chunk-3bf48zrh.js +2 -0
  17. package/dist/chunk-3dnkp861.js +2 -0
  18. package/dist/chunk-3rkh5etz.js +2 -0
  19. package/dist/chunk-3xc2bg6x.js +2 -0
  20. package/dist/{chunk-mr2ke5km.js → chunk-3yh6y00f.js} +6 -6
  21. package/dist/chunk-4ff1hdsh.js +2 -0
  22. package/dist/{chunk-1a8qtvs1.js → chunk-4mj9dem1.js} +2 -2
  23. package/dist/{chunk-p3dc6rg2.js → chunk-4wjsfq4s.js} +6 -6
  24. package/dist/{chunk-s6mte5vy.js → chunk-5v1gp0g1.js} +8 -5
  25. package/dist/{chunk-vmxzktdr.js → chunk-67kbsav0.js} +1 -1
  26. package/dist/chunk-6h1qa3hw.js +2 -0
  27. package/dist/{chunk-xc7nynb9.js → chunk-6qvn1h09.js} +3 -3
  28. package/dist/{chunk-e758jz81.js → chunk-73h35m0a.js} +6 -6
  29. package/dist/{chunk-k3t72x38.js → chunk-76eh43e9.js} +2 -2
  30. package/dist/chunk-7pz76f28.js +2 -0
  31. package/dist/{chunk-6s9bk98p.js → chunk-7yb82rm6.js} +2 -2
  32. package/dist/chunk-817rcghe.js +2 -0
  33. package/dist/chunk-856zaqcm.js +2 -0
  34. package/dist/{chunk-e4d0jgcw.js → chunk-8724whyk.js} +6 -6
  35. package/dist/{chunk-72jt897s.js → chunk-8ttmzcxb.js} +12 -12
  36. package/dist/{chunk-035m9ada.js → chunk-8w9spdbn.js} +4 -4
  37. package/dist/chunk-966f94qx.js +2 -0
  38. package/dist/{chunk-e3t2bqyf.js → chunk-9gmceny5.js} +5 -5
  39. package/dist/chunk-9gpdkqzn.js +2 -0
  40. package/dist/{chunk-brbqz5he.js → chunk-9wab73nn.js} +13 -13
  41. package/dist/{chunk-rccv14mn.js → chunk-a6tajb47.js} +5 -5
  42. package/dist/chunk-a8fy7jv8.js +2 -0
  43. package/dist/chunk-adsyh38d.js +2 -0
  44. package/dist/{chunk-4fbg7gq8.js → chunk-akj26p4b.js} +2 -2
  45. package/dist/chunk-b22yj5j5.js +2 -0
  46. package/dist/{chunk-b9d70mgr.js → chunk-b4x5ndt9.js} +3 -3
  47. package/dist/{chunk-zhvmcj78.js → chunk-bfbh0hfn.js} +5 -5
  48. package/dist/{chunk-0rjcbqk3.js → chunk-brhas9mp.js} +2 -2
  49. package/dist/{chunk-1tzqqr0p.js → chunk-bt0amey5.js} +2 -2
  50. package/dist/{chunk-1rvgv1fr.js → chunk-btxnrqxf.js} +5 -5
  51. package/dist/{chunk-93f6kwht.js → chunk-c0gj3pty.js} +2 -2
  52. package/dist/chunk-c1e45rtv.js +2 -0
  53. package/dist/{chunk-cbt1dchd.js → chunk-ctygc783.js} +4 -4
  54. package/dist/{chunk-4jaet63w.js → chunk-cveanyb3.js} +2 -2
  55. package/dist/{chunk-tj6zvs8f.js → chunk-cxz4cdcn.js} +2 -2
  56. package/dist/{chunk-m7kct2sg.js → chunk-d457yx0w.js} +4 -4
  57. package/dist/{chunk-mbhvf0sv.js → chunk-d6d2s7n6.js} +2 -2
  58. package/dist/chunk-dpndrajq.js +2 -0
  59. package/dist/{chunk-gcje06er.js → chunk-e4jwhmpb.js} +30 -30
  60. package/dist/{chunk-x46hqa74.js → chunk-enhys344.js} +4 -4
  61. package/dist/{chunk-mjg9cx5a.js → chunk-f0txsdpa.js} +3 -3
  62. package/dist/chunk-fb41ty71.js +2 -0
  63. package/dist/{chunk-bnewgd23.js → chunk-fqxcs1h1.js} +2 -2
  64. package/dist/chunk-g8nqmnb7.js +2 -0
  65. package/dist/{chunk-hwcfgs3e.js → chunk-gjf8cjdt.js} +3 -3
  66. package/dist/{chunk-ek5ynvqh.js → chunk-gxg4vvws.js} +1 -1
  67. package/dist/chunk-h67pm636.js +2 -0
  68. package/dist/chunk-hb8jxg45.js +2 -0
  69. package/dist/chunk-hfgzqapw.js +2 -0
  70. package/dist/chunk-hzrdtg2s.js +2 -0
  71. package/dist/chunk-j0hrk24j.js +2 -0
  72. package/dist/{chunk-k3zcadcc.js → chunk-j737tnvt.js} +4 -4
  73. package/dist/chunk-jjbdtj4w.js +2 -0
  74. package/dist/chunk-jyz2g48d.js +2 -0
  75. package/dist/{chunk-nqdh7z2d.js → chunk-jzgyrxye.js} +1 -1
  76. package/dist/chunk-k0xdvegc.js +2 -0
  77. package/dist/{chunk-9gwhs0gk.js → chunk-k81trehg.js} +2 -2
  78. package/dist/{chunk-7c5b0th8.js → chunk-k90sf0w8.js} +10 -10
  79. package/dist/chunk-k9g43d24.js +3 -0
  80. package/dist/chunk-khcb6pm1.js +2 -0
  81. package/dist/chunk-kqgpd3ee.js +2 -0
  82. package/dist/chunk-kqq896j6.js +2 -0
  83. package/dist/chunk-ktna9keb.js +2 -0
  84. package/dist/chunk-m934bzg2.js +2 -0
  85. package/dist/chunk-matr6j2d.js +2 -0
  86. package/dist/{chunk-znx5m1jv.js → chunk-me6kgvsm.js} +1 -1
  87. package/dist/chunk-mmeck545.js +2 -0
  88. package/dist/{chunk-s9b6abkb.js → chunk-mwxbdpb1.js} +2 -2
  89. package/dist/chunk-mz6qjee1.js +2 -0
  90. package/dist/{chunk-baj6w8ja.js → chunk-n7arptzc.js} +2 -2
  91. package/dist/{chunk-he8rmsdq.js → chunk-nfxgpjhk.js} +12 -12
  92. package/dist/{chunk-xka9fdye.js → chunk-npdmeesx.js} +2 -2
  93. package/dist/chunk-nxfkkmxy.js +2 -0
  94. package/dist/{chunk-1ae3megp.js → chunk-p1fpferp.js} +6 -6
  95. package/dist/{chunk-vhzngsmd.js → chunk-p1jzpgej.js} +79 -79
  96. package/dist/chunk-pmk33n5r.js +2 -0
  97. package/dist/{chunk-1p3vmy65.js → chunk-pp7ehbxj.js} +4 -4
  98. package/dist/chunk-prt4ntb0.js +2 -0
  99. package/dist/{chunk-sxad7x2s.js → chunk-pvj0bpqg.js} +4 -4
  100. package/dist/chunk-pvrew37s.js +2 -0
  101. package/dist/chunk-q5bct2ks.js +2 -0
  102. package/dist/{chunk-rpen41w3.js → chunk-q7zwv88b.js} +2 -2
  103. package/dist/{chunk-jgj16jmg.js → chunk-qdea9cew.js} +2 -2
  104. package/dist/{chunk-gtd6qs1r.js → chunk-qj4r08jb.js} +2 -2
  105. package/dist/{chunk-sh1hbhhb.js → chunk-qz3fdmrc.js} +3 -3
  106. package/dist/{chunk-m9dyqae7.js → chunk-r29repjv.js} +5 -5
  107. package/dist/chunk-r2hjn9ds.js +2 -0
  108. package/dist/{chunk-ngh1aeff.js → chunk-rvdsbthd.js} +4 -4
  109. package/dist/{chunk-j476jghg.js → chunk-rx59bmnb.js} +1 -1
  110. package/dist/chunk-s2zsa16d.js +2 -0
  111. package/dist/chunk-sddp2398.js +2 -0
  112. package/dist/chunk-sv4emtcj.js +2 -0
  113. package/dist/{chunk-gahpv8ce.js → chunk-t4ndn1kf.js} +2 -2
  114. package/dist/chunk-tcyvwy8p.js +2 -0
  115. package/dist/{chunk-jdddw8en.js → chunk-te2c0qpt.js} +2 -2
  116. package/dist/chunk-tg18j1yf.js +2 -0
  117. package/dist/chunk-tj7dh2dz.js +2 -0
  118. package/dist/{chunk-j8r0am39.js → chunk-tksjakyv.js} +1 -1
  119. package/dist/chunk-vafxrky2.js +2 -0
  120. package/dist/chunk-vxxcn14a.js +2 -0
  121. package/dist/{chunk-6n11z33h.js → chunk-vzbyn4nh.js} +5 -5
  122. package/dist/chunk-w6nkp7b7.js +2 -0
  123. package/dist/{chunk-f6nk205v.js → chunk-wceg59n0.js} +1 -1
  124. package/dist/{chunk-3dg2zg8d.js → chunk-wers7czp.js} +3 -3
  125. package/dist/{chunk-t2sg2tp2.js → chunk-wf0n9gpj.js} +4 -4
  126. package/dist/chunk-wpam70s6.js +2 -0
  127. package/dist/{chunk-c5vzr1va.js → chunk-wpendr22.js} +2 -2
  128. package/dist/{chunk-427mhgje.js → chunk-wy0gghvh.js} +1 -1
  129. package/dist/chunk-wysfprwt.js +42 -0
  130. package/dist/chunk-x30gh7vt.js +2 -0
  131. package/dist/{chunk-6a0ekt1n.js → chunk-xe1qxxhs.js} +3 -3
  132. package/dist/{chunk-em2yy1te.js → chunk-xpy9yjyx.js} +6 -6
  133. package/dist/{chunk-9egd7tx3.js → chunk-y8p85kcj.js} +2 -2
  134. package/dist/{chunk-7xs45trj.js → chunk-y9bj3566.js} +2 -2
  135. package/dist/{chunk-0s93s6ep.js → chunk-ygwgegyb.js} +3 -3
  136. package/dist/chunk-ytrg9ghh.js +2 -0
  137. package/dist/chunk-z09sgx0d.js +2 -0
  138. package/dist/{chunk-8dmey36n.js → chunk-z23arg8m.js} +2 -2
  139. package/dist/{chunk-jw7cakxt.js → chunk-z3s9rvyh.js} +9 -9
  140. package/dist/{chunk-12sd0ep5.js → chunk-zk88r1yh.js} +15 -15
  141. package/dist/chunk-zn378280.js +2 -0
  142. package/dist/chunk-zvwenqn3.js +2 -0
  143. package/dist/cli.js +19 -19
  144. package/dist/client/signals-dom-ready-runtime.js +4 -1
  145. package/dist/craft-entry.js +2 -2
  146. package/dist/craft.js +2 -2
  147. package/dist/html-masking.d.ts +10 -0
  148. package/dist/html-masking.js +50 -0
  149. package/dist/pwa.js +3 -3
  150. package/dist/server-bindings.js +28 -30
  151. package/dist/ssg.js +4 -4
  152. package/package.json +5 -5
  153. package/dist/chunk-03mtfndv.js +0 -2
  154. package/dist/chunk-0633xsmx.js +0 -2
  155. package/dist/chunk-0wrmcexg.js +0 -2
  156. package/dist/chunk-18qxd18d.js +0 -2
  157. package/dist/chunk-1cd0w20k.js +0 -2
  158. package/dist/chunk-2k3ga51z.js +0 -2
  159. package/dist/chunk-54kn2jtw.js +0 -2
  160. package/dist/chunk-54mc7876.js +0 -2
  161. package/dist/chunk-6e76tz09.js +0 -2
  162. package/dist/chunk-72w08sh9.js +0 -2
  163. package/dist/chunk-7p7hdn42.js +0 -2
  164. package/dist/chunk-88mhhbqj.js +0 -2
  165. package/dist/chunk-9736003n.js +0 -2
  166. package/dist/chunk-9b52cnzm.js +0 -2
  167. package/dist/chunk-9bhvh2dc.js +0 -2
  168. package/dist/chunk-9y1dm510.js +0 -2
  169. package/dist/chunk-a4yzet7p.js +0 -2
  170. package/dist/chunk-abzrvxct.js +0 -2
  171. package/dist/chunk-avbvedyx.js +0 -2
  172. package/dist/chunk-cvq4bz8y.js +0 -2
  173. package/dist/chunk-d7p5jr31.js +0 -2
  174. package/dist/chunk-dh1f8ga0.js +0 -2
  175. package/dist/chunk-dzp2a775.js +0 -2
  176. package/dist/chunk-f86ehf7n.js +0 -2
  177. package/dist/chunk-fn2cqvb1.js +0 -2
  178. package/dist/chunk-fzj3e3zk.js +0 -2
  179. package/dist/chunk-gsc617cx.js +0 -2
  180. package/dist/chunk-h8kbcz9t.js +0 -2
  181. package/dist/chunk-hx575xy8.js +0 -2
  182. package/dist/chunk-j58z3y2g.js +0 -2
  183. package/dist/chunk-j5t40n2g.js +0 -2
  184. package/dist/chunk-jcz6rd9n.js +0 -2
  185. package/dist/chunk-k5nd8zqh.js +0 -2
  186. package/dist/chunk-kz6qw9fm.js +0 -42
  187. package/dist/chunk-m5cdkb11.js +0 -2
  188. package/dist/chunk-mcgqgheq.js +0 -2
  189. package/dist/chunk-mz1mgfq3.js +0 -3
  190. package/dist/chunk-n1tbc7da.js +0 -2
  191. package/dist/chunk-n7dm6prj.js +0 -2
  192. package/dist/chunk-nknpr8cy.js +0 -2
  193. package/dist/chunk-nqn4dvqd.js +0 -2
  194. package/dist/chunk-nt5dh56c.js +0 -2
  195. package/dist/chunk-p04dabqm.js +0 -2
  196. package/dist/chunk-pe89ztq6.js +0 -2
  197. package/dist/chunk-pe9npaby.js +0 -2
  198. package/dist/chunk-pmq2pdr9.js +0 -2
  199. package/dist/chunk-r2v042ym.js +0 -2
  200. package/dist/chunk-r3zmbpv2.js +0 -2
  201. package/dist/chunk-r57s8jqs.js +0 -2
  202. package/dist/chunk-rjzp7za8.js +0 -2
  203. package/dist/chunk-sata7rh2.js +0 -2
  204. package/dist/chunk-tsb5h4e2.js +0 -2
  205. package/dist/chunk-v7h8vd9n.js +0 -2
  206. package/dist/chunk-v8h2kns0.js +0 -2
  207. package/dist/chunk-vvcfrsjg.js +0 -2
  208. package/dist/chunk-vyw40ym7.js +0 -2
  209. package/dist/chunk-whq40bdm.js +0 -2
  210. package/dist/chunk-xsck49x5.js +0 -2
  211. package/dist/chunk-z0c35c5c.js +0 -2
  212. package/dist/chunk-zwp7n01x.js +0 -2
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{eo,Ht,Sl,Eg}from"./chunk-k3zcadcc.js";import{Qs,Pi,kg,_g,Cg}from"./chunk-zhvmcj78.js";import{wl,vl,xl,xg,Sg}from"./chunk-1a8qtvs1.js";import{Ue,Tn,Ii}from"./chunk-7xs45trj.js";import{Tg,$g,Rg,Ag,to,py}from"./chunk-g7mjv276.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-2k3ga51z.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{eo,Ht,kl,Tg}from"./chunk-j737tnvt.js";import{Qs,Ii,_g,Cg,Eg}from"./chunk-bfbh0hfn.js";import{vl,xl,Sl,Sg,kg}from"./chunk-4mj9dem1.js";import{Ue,Tn,Oi}from"./chunk-y9bj3566.js";import{$g,Rg,Ag,Pg,to,fy}from"./chunk-1f7d1c0y.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-z09sgx0d.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=Ue(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=eo(n,t);if(a){let s=Ht(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 Pi(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,vl as auditBuildOutput,wl as auditConfig,re as buildPwaAssets,xl as calculateAuditResult,Sg as formatAuditResult,Ii as formatSize,j as generateManifest,_ as generateManifestJson,_g as generateManifestLink,F as generateOfflinePage,Ue as generatePrecacheManifest,Tn as generatePrecacheManifestJs,M as generatePwaIcons,Qs as generatePwaTags,eo as generateServiceWorker,Eg as generateServiceWorkerAuto,kg as generateSwRegistrationScript,Cg as generateThemeColorMeta,N as getExpectedIconPaths,Ht as getServiceWorkerFileName,Pi as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,Sl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,to as pwaDirectives,Tg as pwaInstallDirective,Rg as pwaOfflineDirective,Ag as pwaPushDirective,$g as pwaUpdateDirective,py as registerPwaDirectives,xg 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=Ue(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=eo(n,t);if(a){let s=Ht(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 Ii(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,xl as auditBuildOutput,vl as auditConfig,re as buildPwaAssets,Sl as calculateAuditResult,kg as formatAuditResult,Oi as formatSize,j as generateManifest,_ as generateManifestJson,Cg as generateManifestLink,F as generateOfflinePage,Ue as generatePrecacheManifest,Tn as generatePrecacheManifestJs,M as generatePwaIcons,Qs as generatePwaTags,eo as generateServiceWorker,Tg as generateServiceWorkerAuto,_g as generateSwRegistrationScript,Eg as generateThemeColorMeta,N as getExpectedIconPaths,Ht as getServiceWorkerFileName,Ii as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,kl as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,to as pwaDirectives,$g as pwaInstallDirective,Ag as pwaOfflineDirective,Pg as pwaPushDirective,Rg as pwaUpdateDirective,fy as registerPwaDirectives,Sg as runPwaAudit,D as validateManifest};
@@ -2,6 +2,8 @@ import { classifyHtmlInterpolation, UnsafeInterpolationContextError } from "./in
2
2
  import { escapeAttributeValue, escapeHtmlValue } from "./expressions.js";
3
3
  import { inheritedClientLoopNames, loopBoundNames, readsAnyName } from "./loop-binding.js";
4
4
  import { isRuntimeOwnedColonAttr } from "./runtime-globals.js";
5
+ import { scanHtmlTags } from "./html-masking.js";
6
+ import { parseAttributes } from "./component-processing.js";
5
7
  const BOOLEAN_ATTRS = new Set([
6
8
  "disabled",
7
9
  "checked",
@@ -24,7 +26,7 @@ const BOOLEAN_ATTRS = new Set([
24
26
  "playsinline",
25
27
  "reversed",
26
28
  "selected"
27
- ]), VOID_TAGS = new Set([
29
+ ]), LOOP_ATTRIBUTES = new Set([":for", "x-for", "v-for", "@for"]), VOID_TAGS = new Set([
28
30
  "area",
29
31
  "base",
30
32
  "br",
@@ -44,30 +46,26 @@ export function reactiveLoopRanges(template) {
44
46
  return reactiveLoopScopes(template).map((scope) => [scope.start, scope.end]);
45
47
  }
46
48
  export function reactiveLoopScopes(template) {
47
- const ranges = [], openingTag = /<([a-zA-Z][a-zA-Z0-9-]*)\b((?:[^>"']|"[^"]*"|'[^']*')*)\s*\/?>/g;
48
- let match;
49
- while ((match = openingTag.exec(template)) !== null) {
50
- const attributes = match[2] || "", loopAttr = /(?:^|\s)(?::for|x-for|v-for|@for)\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>]+))/.exec(attributes);
51
- if (!loopAttr)
52
- continue;
53
- const names = loopBoundNames(loopAttr[1] ?? loopAttr[2] ?? loopAttr[3] ?? ""), start = match.index, openingEnd = start + match[0].length, tagName = match[1].toLowerCase();
54
- if (match[0].endsWith("/>") || VOID_TAGS.has(tagName)) {
55
- ranges.push({ start, end: openingEnd, names });
49
+ const ranges = [], ancestors = new Map;
50
+ for (const tag of scanHtmlTags(template)) {
51
+ const tagName = tag.name.toLowerCase();
52
+ if (tag.closing) {
53
+ const scope = ancestors.get(tagName)?.pop();
54
+ if (scope)
55
+ scope.end = tag.end;
56
56
  continue;
57
57
  }
58
- const escapedTag = tagName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), sameTag = new RegExp(`<\\/?${escapedTag}\\b(?:[^>"']|"[^"]*"|'[^']*')*>`, "gi");
59
- sameTag.lastIndex = openingEnd;
60
- let depth = 1, closingEnd = openingEnd, nested;
61
- while ((nested = sameTag.exec(template)) !== null)
62
- if (nested[0].startsWith("</")) {
63
- depth--;
64
- if (depth === 0) {
65
- closingEnd = nested.index + nested[0].length;
66
- break;
67
- }
68
- } else if (!nested[0].endsWith("/>"))
69
- depth++;
70
- ranges.push({ start, end: closingEnd, names });
58
+ const loopAttr = /(?::for|x-for|v-for|@for)\s*=/.test(tag.attributes) ? parseAttributes(tag.attributes).find((attr) => LOOP_ATTRIBUTES.has(attr.name)) : void 0, loopValue = typeof loopAttr?.value === "string" ? loopAttr.value : null, scope = loopValue !== null ? { start: tag.start, end: tag.end, names: loopBoundNames(loopValue) } : null;
59
+ if (scope)
60
+ ranges.push(scope);
61
+ if (!tag.selfClosing && !VOID_TAGS.has(tagName)) {
62
+ let stack = ancestors.get(tagName);
63
+ if (!stack) {
64
+ stack = [];
65
+ ancestors.set(tagName, stack);
66
+ }
67
+ stack.push(scope);
68
+ }
71
69
  }
72
70
  return ranges;
73
71
  }
@@ -96,11 +94,11 @@ export function processServerBindings(template, context) {
96
94
  function isProtected(pos) {
97
95
  return protectedRanges.some(([start, end]) => pos >= start && pos < end);
98
96
  }
99
- const tagRegex = /<([a-zA-Z][a-zA-Z0-9-]*)\b((?:[^>"']|"[^"]*"|'[^']*')*?)\s*(\/?)>/g, replacements = [], compiledBindings = new Map, maxCompiledBindings = 256;
100
- while ((match = tagRegex.exec(output)) !== null) {
101
- if (isProtected(match.index))
97
+ const replacements = [], compiledBindings = new Map, maxCompiledBindings = 256;
98
+ for (const tag of scanHtmlTags(output)) {
99
+ if (tag.closing || isProtected(tag.start))
102
100
  continue;
103
- const fullTag = match[0], attrs = match[2];
101
+ const attrs = tag.attributes.trimEnd();
104
102
  if (!attrs || !attrs.includes(":"))
105
103
  continue;
106
104
  const nativeHost = /(?:^|\s)data-native(?:\s|=|$)/i.test(attrs.replace(/"[^"]*"|'[^']*'/g, "")), bindingRegex = /\s:([a-zA-Z_][\w-]*)\s*=\s*"([^"]*)"/g;
@@ -163,10 +161,10 @@ export function processServerBindings(template, context) {
163
161
  }
164
162
  }
165
163
  if (hadReplacement) {
166
- const selfClose = match[3] ? " /" : "", newTag = `<${match[1]}${newAttrs}${selfClose}>`;
164
+ const selfClose = tag.selfClosing ? " /" : "", newTag = `<${tag.name}${newAttrs}${selfClose}>`;
167
165
  replacements.push({
168
- start: match.index,
169
- end: match.index + fullTag.length,
166
+ start: tag.start,
167
+ end: tag.end,
170
168
  replacement: newTag
171
169
  });
172
170
  }
package/dist/ssg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import"./chunk-7sh9fa3q.js";import{x,rl}from"./chunk-72jt897s.js";import"./chunk-1tzqqr0p.js";import"./chunk-r9e0r6jx.js";import{Rt,w}from"./chunk-vhzngsmd.js";import"./chunk-m7hfcxt3.js";import"./chunk-bnewgd23.js";import"./chunk-9gwhs0gk.js";import{kt,_t,Ct,Et,Tt,$t}from"./chunk-gtd6qs1r.js";import{a}from"./chunk-jw7cakxt.js";import{Es}from"./chunk-em2yy1te.js";import"./chunk-t2sg2tp2.js";import"./chunk-x46hqa74.js";import{he,en,tn}from"./chunk-sjd6rt97.js";import"./chunk-xka9fdye.js";import{y}from"./chunk-e758jz81.js";import{yt,i}from"./chunk-12sd0ep5.js";import"./chunk-kz6qw9fm.js";import"./chunk-4gg9594a.js";import{ps}from"./chunk-e4d0jgcw.js";import"./chunk-4jaet63w.js";import"./chunk-c84pxd2k.js";import{Ya,Za,Qa}from"./chunk-hwcfgs3e.js";import{Zt,Yn,Zn}from"./chunk-ndjmt3vg.js";import{Qt}from"./chunk-j476jghg.js";import"./chunk-mz1mgfq3.js";import"./chunk-f6nk205v.js";import{X,we}from"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-3dg2zg8d.js";import{c}from"./chunk-0rjcbqk3.js";import{r,ge}from"./chunk-b9d70mgr.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function Pt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,o=t.replace(Dt,(e,u,g,v)=>{let S=v.trim();if(!S)return e;if(/\bdata-stx-src=/.test(g))return e;if(n.minify)S=Pt(S);let p=It(S);if(!s.has(p))s.set(p,S);let P=n.integrity?` data-stx-integrity="sha384-${vt("sha384").update(S).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),l=Array.from(s,([e,u])=>({hash:e,code:u}));return{html:o,chunks:l}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(t))!==null)n.set(o[1],o[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(n.get(u[1])||""))l.add(u[2]);let g=/<\/head\s*>/iy,v=w(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(l.size===0||v===-1)return t;let S=Array.from(l).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!S)return t;return t.slice(0,v)+S+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let n=t.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let n of jt){let s=t[n];if(!s)continue;let o=K(s);if(o)return{url:o,source:"env",via:n}}return null}function lt(t){if(!t||typeof t!=="object")return null;let n=t,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?K(s):null}async function At(t){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=s.resolve(t,o);if(!n(l))continue;try{let e=await import(l),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let n=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let l=await At(n);if(l)return{url:l,source:"site.config",via:"url"};let e=Ft(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){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
- `)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let n=r(t),{depths:s}=ge(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=o.exec(n))!==null){if(s[l.index]!==0)continue;let u=x(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=x(n,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(l.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(n))!==null){if(s[l.index]!==0)continue;let u=rl(n,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let n="read";try{let s=await Bun.file(t).text();n="parse";let o=Qt(s),l=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(r(e.attrs))).sort((e,u)=>s.indexOf(e.fullTag)-s.indexOf(u.fullTag));for(let e of l){if(!/\bgetStaticPaths\b/.test(r(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(r(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(r(g))&&Rt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let v=Function("defineStaticPaths",`return (${g})`)(q);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let S=await v();n="result";let p=Array.isArray(S)?{paths:S}:S;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let s=D.statSync(t),o=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of n)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let l=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);l=(l<<5)-l+u,l=l&l}return Math.abs(l).toString(36)}get(t,n){let s=this.cache.get(t);if(!s)return null;let o=ft(n).some((u)=>D.existsSync(u)),l=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ps(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||l)return this.cache.delete(t),null;let e=this.getHash(n,s.dependencies??[]);if(s.hash!==e)return this.cache.delete(t),null;return s.html}set(t,n,s,o){let l=this.getHash(n,s);this.cache.set(t,{hash:l,html:o,generatedAt:Date.now(),dependencies:s})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let s=this.getFilePath(t);await D.promises.mkdir(f.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await D.promises.unlink(n)}async invalidatePattern(t){let n=f.join(this.cacheDir,"isr");if(!D.existsSync(n))return;let s=await D.promises.readdir(n);for(let o of s){let l=o.replace(/_/g,"/").replace(".json","");if(t.test(l))await D.promises.unlink(f.join(n,o))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function Ut(t){let n=[];if(!t.isDynamic)n.push({url:t.pattern,params:{}});else{let s=await gt(t.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${t.pattern} (${t.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),n;for(let l of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(l.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:e,params:l.params,props:l.props,revalidate:l.revalidate})}}return n}function ft(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let n of ft(t))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...l}=s;return l}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Gt(t,n,s){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let l=o[1];if(!l.includes("getStaticProps"))return null;try{let e=l.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
2
+ import"./chunk-7sh9fa3q.js";import{x,sl}from"./chunk-8ttmzcxb.js";import"./chunk-bt0amey5.js";import"./chunk-r9e0r6jx.js";import{Rt,w}from"./chunk-p1jzpgej.js";import"./chunk-2vqpz4qv.js";import"./chunk-fqxcs1h1.js";import"./chunk-k81trehg.js";import{kt,_t,Ct,Et,Tt,$t}from"./chunk-qj4r08jb.js";import{a}from"./chunk-z3s9rvyh.js";import{Es}from"./chunk-xpy9yjyx.js";import"./chunk-wf0n9gpj.js";import"./chunk-enhys344.js";import{he,en,tn}from"./chunk-2c6qbvne.js";import"./chunk-npdmeesx.js";import{y}from"./chunk-73h35m0a.js";import{yt,i}from"./chunk-zk88r1yh.js";import"./chunk-wysfprwt.js";import"./chunk-2b8pyef0.js";import{ps}from"./chunk-8724whyk.js";import"./chunk-cveanyb3.js";import"./chunk-c84pxd2k.js";import{Za,Qa,ec}from"./chunk-gjf8cjdt.js";import{Zt,Yn,Zn}from"./chunk-ndjmt3vg.js";import{Qt}from"./chunk-rx59bmnb.js";import"./chunk-k9g43d24.js";import"./chunk-wceg59n0.js";import{X,we}from"./chunk-a6tajb47.js";import"./chunk-2nj9aewf.js";import"./chunk-wers7czp.js";import{c}from"./chunk-brhas9mp.js";import{r,ge}from"./chunk-b4x5ndt9.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function Pt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,o=t.replace(Dt,(e,u,g,v)=>{let S=v.trim();if(!S)return e;if(/\bdata-stx-src=/.test(g))return e;if(n.minify)S=Pt(S);let p=It(S);if(!s.has(p))s.set(p,S);let P=n.integrity?` data-stx-integrity="sha384-${vt("sha384").update(S).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),l=Array.from(s,([e,u])=>({hash:e,code:u}));return{html:o,chunks:l}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(t))!==null)n.set(o[1],o[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(n.get(u[1])||""))l.add(u[2]);let g=/<\/head\s*>/iy,v=w(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(l.size===0||v===-1)return t;let S=Array.from(l).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!S)return t;return t.slice(0,v)+S+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let n=t.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let n of jt){let s=t[n];if(!s)continue;let o=K(s);if(o)return{url:o,source:"env",via:n}}return null}function lt(t){if(!t||typeof t!=="object")return null;let n=t,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?K(s):null}async function At(t){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=s.resolve(t,o);if(!n(l))continue;try{let e=await import(l),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let n=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let l=await At(n);if(l)return{url:l,source:"site.config",via:"url"};let e=Ft(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){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
+ `)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let n=r(t),{depths:s}=ge(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=o.exec(n))!==null){if(s[l.index]!==0)continue;let u=x(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=x(n,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(l.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(n))!==null){if(s[l.index]!==0)continue;let u=sl(n,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let n="read";try{let s=await Bun.file(t).text();n="parse";let o=Qt(s),l=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(r(e.attrs))).sort((e,u)=>s.indexOf(e.fullTag)-s.indexOf(u.fullTag));for(let e of l){if(!/\bgetStaticPaths\b/.test(r(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(r(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(r(g))&&Rt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let v=Function("defineStaticPaths",`return (${g})`)(q);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let S=await v();n="result";let p=Array.isArray(S)?{paths:S}:S;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let s=D.statSync(t),o=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of n)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let l=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);l=(l<<5)-l+u,l=l&l}return Math.abs(l).toString(36)}get(t,n){let s=this.cache.get(t);if(!s)return null;let o=ft(n).some((u)=>D.existsSync(u)),l=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ps(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||l)return this.cache.delete(t),null;let e=this.getHash(n,s.dependencies??[]);if(s.hash!==e)return this.cache.delete(t),null;return s.html}set(t,n,s,o){let l=this.getHash(n,s);this.cache.set(t,{hash:l,html:o,generatedAt:Date.now(),dependencies:s})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let s=this.getFilePath(t);await D.promises.mkdir(f.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await D.promises.unlink(n)}async invalidatePattern(t){let n=f.join(this.cacheDir,"isr");if(!D.existsSync(n))return;let s=await D.promises.readdir(n);for(let o of s){let l=o.replace(/_/g,"/").replace(".json","");if(t.test(l))await D.promises.unlink(f.join(n,o))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function Ut(t){let n=[];if(!t.isDynamic)n.push({url:t.pattern,params:{}});else{let s=await gt(t.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${t.pattern} (${t.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),n;for(let l of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(l.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:e,params:l.params,props:l.props,revalidate:l.revalidate})}}return n}function ft(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let n of ft(t))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...l}=s;return l}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Gt(t,n,s){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let l=o[1];if(!l.includes("getStaticProps"))return null;try{let e=l.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
4
4
  return (async function getStaticProps() {
5
5
  ${e[1]}
6
6
  })()
@@ -37,7 +37,7 @@ ${t.map((o)=>{let l=new URL(o.loc,n).href,e=` <url>
37
37
  ${s.join(`
38
38
  `)}
39
39
  </channel>
40
- </rss>`}async function Vt(t={}){let n=Date.now();tn();let s=await a(process.cwd()),o=s.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:s});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.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},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,S={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-p04dabqm.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-k5nd8zqh.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-p04dabqm.js");await d('<div class="bg-black"></div>')}catch{}kt();let wt=s?.routeMiddleware?.dir||"middleware";await Ct(process.cwd(),wt);let J=_t();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let St=s?.routeMiddleware?.global||[];Qa(s?.layoutsDir,c(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:G,props:xt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=Yt(A),bt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...St,...bt];if(nt.length>0){let B=Et(h,G,O||{}),L=Tt(B,null,void 0,{isServer:!0}),j=await $t(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=te(String(C),h),U=ee(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,H),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(H),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
40
+ </rss>`}async function Vt(t={}){let n=Date.now();tn();let s=await a(process.cwd()),o=s.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:s});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.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},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,S={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-zn378280.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-pvrew37s.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-zn378280.js");await d('<div class="bg-black"></div>')}catch{}kt();let wt=s?.routeMiddleware?.dir||"middleware";await Ct(process.cwd(),wt);let J=_t();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let St=s?.routeMiddleware?.global||[];ec(s?.layoutsDir,c(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:G,props:xt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=Yt(A),bt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...St,...bt];if(nt.length>0){let B=Et(h,G,O||{}),L=Tt(B,null,void 0,{isServer:!0}),j=await $t(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=te(String(C),h),U=ee(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,H),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(H),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
41
41
  const validate = ${it[1]};
42
42
  return validate(route);
43
43
  `)({params:G})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await mt(k,G,xt,e,s);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
@@ -69,7 +69,7 @@ ${d}`)}if(e.cache)await T.save();if(e.generate404){let d=f.join(e.pagesDir,"404.
69
69
  <a href="/">Go home</a>
70
70
  </div>
71
71
  </body>
72
- </html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),G)}}let V=f.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(V).text(),{},V,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=Es({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...m.length>0?{disallow:m}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(f.join(e.outputDir,"robots.txt"),k),console.log("Generated robots.txt")}if(e.rss){let d=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(d.getItems)m=await d.getItems();let k=Jt(d,m),h=f.join(e.outputDir,"rss.xml");await Bun.write(h,k),u.rssPath=h,console.log(`Generated rss.xml with ${m.length} items`)}let z=Ya(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let W=Za(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} repeated asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&D.existsSync(e.publicDir))await Y(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let et=Zn();if(et)await Y(et,f.join(e.outputDir,Yn)),console.log(`Copied assets from ${Zt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:S,pages:p};await Bun.write(f.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await e.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
72
+ </html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),G)}}let V=f.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(V).text(),{},V,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&_.length>0){let d=qt(_,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${_.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=Es({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...m.length>0?{disallow:m}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(f.join(e.outputDir,"robots.txt"),k),console.log("Generated robots.txt")}if(e.rss){let d=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(d.getItems)m=await d.getItems();let k=Jt(d,m),h=f.join(e.outputDir,"rss.xml");await Bun.write(h,k),u.rssPath=h,console.log(`Generated rss.xml with ${m.length} items`)}let z=Za(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let W=Qa(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} repeated asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&D.existsSync(e.publicDir))await Y(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let et=Zn();if(et)await Y(et,f.join(e.outputDir,Yn)),console.log(`Copied assets from ${Zt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:S,pages:p};await Bun.write(f.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await e.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
73
73
  Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
74
74
  Build complete!
75
75
  Total: ${u.totalPages} pages
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.819",
4
+ "version": "0.2.821",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -128,12 +128,12 @@
128
128
  "dependencies": {
129
129
  "@stacksjs/ts-css": "^0.3.21",
130
130
  "@stacksjs/clapp": "^0.2.16",
131
- "@stacksjs/desktop": "0.2.819",
132
- "@stacksjs/sanitizer": "0.2.819",
131
+ "@stacksjs/desktop": "0.2.821",
132
+ "@stacksjs/sanitizer": "0.2.821",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
- "bun-plugin-stx": "0.2.819",
134
+ "bun-plugin-stx": "0.2.821",
135
135
  "bunfig": "^0.15.21",
136
- "stx-router": "0.2.819",
136
+ "stx-router": "0.2.821",
137
137
  "ts-broadcasting": "^0.0.11",
138
138
  "ts-images": "^0.2.22",
139
139
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wm,qm}from"./chunk-mjg9cx5a.js";export{qm as ensureTeleportTargets,Wm as processTeleportDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vf,xf,he,Sf,ec,en,tn,kh,tc,nn,Qn,kf,_f,Cf,ss,rn,Ef,sn,nc,_h}from"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Qn as MODULE_SPECIFIER_PREFIX,vf as bundleCacheDir,xf as bundleCacheEntryLimit,_h as bundleClientEntriesSplit,sn as bundleClientScript,tn as clearBundleFailures,he as clientBundleDependencies,en as getBundleFailures,nn as hasUserImports,rn as moduleSubstitutionKey,_f as normalizeRegistrySpecifiers,Ef as queueClientBundleBuild,ec as recordBundleFailure,kf as registryIdForPath,tc as resolveBundlerFallback,Cf as rewriteRegistryImports,kh as setBundlerFallbackMode,Sf as shouldLogBundlerDiagnostics,nc as tempBuildName,ss as withModuleSubstitutes};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{zl,mm,Hl,Vl,hm,ym}from"./chunk-jgj16jmg.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{ym as applySlots,hm as extractSlotContent,mm as parseSlotElement,zl as parseSlots,Vl as processSlots,Hl as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Km,Xm,Gm,Jm,Ym,Zm}from"./chunk-1rvgv1fr.js";export{Jm as generateTransitionCSS,Ym as generateTransitionRuntime,Km as performEnter,Xm as performLeave,Zm as processTransitionAttributes,Gm as processTransitionDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ma,ha,ql,Kl,Xl,Gl,Am}from"./chunk-1ae3megp.js";export{ma as createVirtualList,Am as default,ql as generateVirtualListCSS,Xl as processInfiniteListDirectives,Gl as processVirtualGridDirectives,ha as processVirtualListDirectives,Kl as useVirtualList};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{tr,i}from"./chunk-12sd0ep5.js";import"./chunk-e758jz81.js";import"./chunk-4gg9594a.js";import"./chunk-c84pxd2k.js";import"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import{we}from"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-xka9fdye.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{Oe,zs,Hs}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{tr as buildModulesTag,we as injectRouterScript,i as processDirectives,zs as processJsonDirective,Hs as processOnceDirective,Oe as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{sh,bo,oh,ih,ah,ch}from"./chunk-m7kct2sg.js";import"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{ch as clearStoreCache,sh as getStoreScript,ah as getStoreScriptFor,ih as pageStoresAll,bo as storesRead,oh as storesReadInFiles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ya,iu,Fn,Im,au,cu,lu,Om}from"./chunk-v041eh5f.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Fn as Validator,iu as defineForm,au as processErrorDirective,cu as processErrorsDirective,Om as processFormValidationDirectives,lu as processHasErrorsDirective,ya as useForm,Im as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Um}from"./chunk-1hg0zb3p.js";export{Um as processDeferDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jl,Yl,Zl,Ql,eu,tu,nu,ru,su,ou,Pm}from"./chunk-mr2ke5km.js";export{Jl as createIslandRegistry,Pm as default,ou as generateIslandManifest,Zl as generatePartialHydrationCSS,tu as hydrateAll,eu as hydrateByStrategy,Ql as hydrateIsland,nu as isHydrated,ru as onHydrated,Yl as processPartialHydrationDirectives,su as processStaticDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{B,Ff,Go,a,I,zh,Hh}from"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{I as config,B as defaultConfig,zh as defineStxConfig,Go as discoverConfig,a as loadStxConfig,Ff as resolveStxDirectories,Hh as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ni,ri,St,ue,pr,Ts,fr,$s,Rs,Hf,Vf,Uf,gr,Wf,qf,Kf,Xf,kc,_c,Cc,si,Ec,Gf,kt,_t,Ct,Et,Tt,$t,tt,Jf}from"./chunk-gtd6qs1r.js";export{fr as Router,Kf as abortNavigation,Ts as bracketPathToRegex,kt as clearMiddleware,_c as createClientCookieManager,Tt as createMiddlewareContext,Et as createRouteLocation,kc as createServerCookieManager,Cc as createStorageManager,Xf as defineMiddleware,Vf as defineRoute,Uf as defineRoutes,$s as findErrorPage,Rs as formatRoutes,ri as generateRouteManifest,ni as generateRouteTypes,Ec as getMiddleware,_t as getMiddlewareNames,tt as getRouterScript,Jf as getRouterScriptDev,Gf as hasMiddleware,St as isFileRequestPath,Ct as loadMiddlewareFromDirectory,pr as matchRoute,qf as navigateTo,ue as patternToRegex,si as registerMiddleware,Wf as resetRoutes,gr as route,$t as runMiddleware,Hf as setAppUrl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wl}from"./chunk-s9b6abkb.js";export{Wl as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ca,Ea,Ta,$a,Sh}from"./chunk-he8rmsdq.js";import"./chunk-gcje06er.js";import"./chunk-1p3vmy65.js";import"./chunk-baj6w8ja.js";import"./chunk-12sd0ep5.js";import"./chunk-e758jz81.js";import"./chunk-4gg9594a.js";import"./chunk-c84pxd2k.js";import"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-xka9fdye.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Ca as buildNative,Sh as default,Ea as findCraftBinary,$a as getAvailableFormats,Ta as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oh,ps,Vo,gs,ir,Uo,Wo,Mf,ms,hs,ys,qo,cc,Df,wt}from"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{H}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Mf as bindLoopInterpolations,Oh as clearScriptScanCache,ms as convertServerLoopAttributesToDirectives,Uo as convertSignalDirectivesToAttributes,hs as convertSignalLoopsToAttributes,ir as extractClientSignalNames,H as extractExports,cc as findMarkupIndexOutsideScripts,gs as hasSignalsSyntax,Vo as parseLoopExpression,Wo as preEvalLiteralReactiveIfs,ys as processScriptSetup,qo as processSignals,Df as rewriteStxImportSpecifiers,ps as scanScriptTags,wt as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$l,Wg}from"./chunk-tj6zvs8f.js";export{$l as captureScreenshot,Wg as captureScreenshots};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lr,so,Bg,Cl,oo}from"./chunk-cbt1dchd.js";export{Bg as buildModuleRegistryScript,oo as buildSharedModuleRegistries,Cl as exportsMutableBinding,Lr as registeredModuleIdsIn,so as registeredModuleNamesIn};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bm,wm,vm,xm,Sm}from"./chunk-sxad7x2s.js";export{wm as defineAsyncComponent,xm as generateAsyncComponentCSS,Sm as generateAsyncComponentRuntime,vm as isAsyncComponent,bm as processAsyncDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qm,eh,th,nh,rh}from"./chunk-e3t2bqyf.js";export{eh as createSSRSuspense,nh as generateSuspenseCSS,rh as generateSuspenseRuntime,Qm as processSuspenseDirectives,th as renderSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{eo,Ht,Sl,Eg}from"./chunk-k3zcadcc.js";export{eo as generateServiceWorker,Eg as generateServiceWorkerAuto,Ht as getServiceWorkerFileName,Sl as isWorkboxEnabled};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{El,Tl}from"./chunk-brbqz5he.js";import"./chunk-tj6zvs8f.js";import"./chunk-0s93s6ep.js";import"./chunk-93f6kwht.js";import"./chunk-gahpv8ce.js";import"./chunk-035m9ada.js";import"./chunk-dq9djbgq.js";import"./chunk-7c5b0th8.js";import"./chunk-jdddw8en.js";import"./chunk-m9dyqae7.js";import"./chunk-8dmey36n.js";import"./chunk-mbhvf0sv.js";import"./chunk-vmxzktdr.js";import"./chunk-jgj16jmg.js";import"./chunk-4fbg7gq8.js";import"./chunk-s9b6abkb.js";import"./chunk-sxad7x2s.js";import"./chunk-6n11z33h.js";import"./chunk-1ae3megp.js";import"./chunk-mr2ke5km.js";import"./chunk-v041eh5f.js";import"./chunk-p3dc6rg2.js";import"./chunk-1hg0zb3p.js";import"./chunk-mjg9cx5a.js";import"./chunk-1rvgv1fr.js";import"./chunk-e3t2bqyf.js";import"./chunk-m7kct2sg.js";import"./chunk-6a0ekt1n.js";import"./chunk-s6mte5vy.js";import"./chunk-1p3vmy65.js";import"./chunk-baj6w8ja.js";import"./chunk-hwcfgs3e.js";import{Qt}from"./chunk-j476jghg.js";import"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import{Re,i}from"./chunk-12sd0ep5.js";import"./chunk-e758jz81.js";import"./chunk-4gg9594a.js";import"./chunk-c84pxd2k.js";import"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import{we}from"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import{lr,ur}from"./chunk-xka9fdye.js";import{xs,B,a}from"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{m,Le}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";import"./chunk-j8r0am39.js";import"./chunk-sh1hbhhb.js";export{xs as buildWebComponents,ur as cacheTemplate,lr as checkCache,Qt as classifyAllScripts,El as createMiddleware,Tl as createRoute,B as defaultConfig,m as extractVariables,we as injectRouterScript,a as loadStxConfig,Le as processClientScript,i as processDirectives,Re as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fa,Fl}from"./chunk-mbhvf0sv.js";import"./chunk-4fbg7gq8.js";import"./chunk-baj6w8ja.js";export{Fl as createImageHandler,fa as handleImageRequest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Of,us}from"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-f6nk205v.js";import"./chunk-fmawgk87.js";import{kr}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import{st}from"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{st as freeIdentifiers,us as processComponents,Of as processESImports,kr as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kg}from"./chunk-93f6kwht.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Kg as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{m,gi,Wc,qc,ag,cg,lg,ug,dg,Vs,pg,je,Y,Be,fg,Cr,gg,Gc,Jc,yi,Fe,s,bn,Yc,h,fe,Gh}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Jc as SIGNAL_COMPOSABLE_CALL,fe as clearComponentCache,yi as componentClientSignalNames,gi as convertToCommonJS,h as createDetailedErrorMessage,dg as extractDirectiveNames,Wc as extractScriptFromTemplate,m as extractVariables,s as fileExists,Gh as getComponentCacheStats,cg as getPositionInfo,Y as getSharedTranspiler,Yc as getSourceLineInfo,ug as hasDirectives,qc as hasVariables,gg as isHydrateTrigger,pg as isJavaScriptScript,Fe as renderComponentWithSlot,bn as resolveTemplatePath,fg as scopeOnRootElement,Vs as scopeSequenceKey,je as shouldTranspileTypeScript,Gc as slotContentHasExpressions,Be as transpileTypeScript,Cr as userComponentFileExists,lg as validateDirective,ag as validateTemplate};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ds,or,Nf}from"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{At}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Nf as declareBareLoopHead,At as parseLoopBinding,or as processLoops,ds as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xg}from"./chunk-gahpv8ce.js";import"./chunk-m9dyqae7.js";import"./chunk-j476jghg.js";import"./chunk-x46hqa74.js";import"./chunk-mz1mgfq3.js";import"./chunk-rccv14mn.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Xg as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{km,_m,Cm,Em,Tm,$m,Rm}from"./chunk-6n11z33h.js";export{_m as createKeepAliveCache,Em as generateKeepAliveCSS,Tm as generateKeepAliveRuntime,$m as onActivated,Rm as onDeactivated,km as processKeepAliveDirectives,Cm as shouldCacheComponent};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ht,Hn,dh}from"./chunk-s6mte5vy.js";import{le,Vn,ph,Un,vo,Gr,Jr,fh,gh,mh,Wn,qn,xo,Yr,hh}from"./chunk-9egd7tx3.js";import"./chunk-1tzqqr0p.js";export{vo as batch,dh as default,Vn as derived,Un as effect,ht as generateSignalsRuntime,Hn as generateSignalsRuntimeDev,qn as isDerived,Wn as isSignal,ph as memo,Jr as onDestroy,Gr as onMount,Yr as peek,mh as pendingLifecycleCounts,gh as runDestroyCallbacks,fh as runMountCallbacks,le as state,xo as untrack,hh as useOptimistic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oi,Ni,Mi,Pg,Ig,Og,kl,Ng,Mg}from"./chunk-j8r0am39.js";export{Oi as ImageProcessorCache,kl as applyTransformations,Pg as clearImageCache,Ng as generateResponsiveVariants,Mg as generateSrcset,Ni as getCachedImageResult,Og as optimizeImage,Ig as processImage,Mi as setCachedImageResult};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Rl,na,Al,Pl,ra,Il,Ol,Nl,Ml,sa,Dl,Yg}from"./chunk-dq9djbgq.js";import{fa,Fl}from"./chunk-mbhvf0sv.js";import{Q,ee,te,Nn,me,Te,Kr,gt,Xt,Mn,Dn,Ln,ne,jn,Bn,Xr}from"./chunk-4fbg7gq8.js";import{Wl}from"./chunk-s9b6abkb.js";import"./chunk-baj6w8ja.js";export{ee as DEFAULT_FORMATS,te as DEFAULT_QUALITY,Q as DEFAULT_WIDTHS,Xr as ImageProcessingError,Pl as clearImageCache,ra as createImageDirective,Fl as createImageHandler,Ol as createImagePlugin,Yg as defaultImageConfig,Bn as formatSize,sa as generateImageManifest,Xt as generateSizes,gt as generateSrcSet,Mn as getFallbackVariant,Kr as getImageMetadata,ne as getMimeType,jn as getTotalSize,Dn as groupVariantsByFormat,fa as handleImageRequest,Il as imageDirective,me as isImageBackendAvailable,Ln as isImageFile,Nn as isSharpAvailable,Ml as optimizeDirectory,Nl as optimizeImage,na as parseImageComponent,Te as processImage,Al as processImageComponents,Rl as renderImageComponent,Wl as rewriteImagesWithSiblings,Dl as writeImageManifest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{oa,Zg,ia,Qg,Ll,jl,em,tm}from"./chunk-7c5b0th8.js";import"./chunk-6a0ekt1n.js";import"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{Pt,Yf}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{oa as buildScriptVirtualFile,Zg as buildVirtualSource,Pt as extractScriptBlocks,Yf as extractTemplateExpressions,Ll as findRuntimeTypeDeclarations,jl as findStxModuleDeclarations,tm as formatTypecheckDiagnostics,Qg as sourcePathFor,em as typecheckStxFiles,ia as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lo,jo,Bo,Ph,ls,Ih}from"./chunk-kz6qw9fm.js";export{ls as clearImageDeliveryCatalog,Ph as deliveredImage,Bo as efficientDeliverySources,Lo as getImageDelivery,jo as isTransparentImage,Ih as prepareImageDelivery};