@stacksjs/stx 0.2.753 → 0.2.755

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 (222) hide show
  1. package/dist/{chunk-qeyjbnpn.js → chunk-024m1xmd.js} +6 -6
  2. package/dist/{chunk-1bk3t4s1.js → chunk-0dsykna3.js} +5 -5
  3. package/dist/{chunk-n3t2cd17.js → chunk-0dt7ax79.js} +2 -2
  4. package/dist/{chunk-qksbf2gt.js → chunk-0fweckq5.js} +6 -6
  5. package/dist/{chunk-yax8wz93.js → chunk-0md73jp8.js} +2 -2
  6. package/dist/{chunk-5hrm7rtx.js → chunk-0tgrqhkr.js} +12 -12
  7. package/dist/{chunk-p4h5c79q.js → chunk-0vvb78yj.js} +5 -5
  8. package/dist/{chunk-67z3kesf.js → chunk-1a2cwee1.js} +2 -2
  9. package/dist/chunk-1gan06yr.js +2 -0
  10. package/dist/chunk-1menbxwb.js +2 -0
  11. package/dist/chunk-1n2d3cy5.js +2 -0
  12. package/dist/{chunk-pnpd7gz7.js → chunk-1tmq09ch.js} +3 -3
  13. package/dist/{chunk-kyk4ekng.js → chunk-236bdf7y.js} +2 -2
  14. package/dist/chunk-2vc2pkyz.js +2 -0
  15. package/dist/chunk-33bp9m4c.js +2 -0
  16. package/dist/chunk-361yezje.js +2 -0
  17. package/dist/{chunk-7t9wj2m4.js → chunk-3ap06zzx.js} +1 -1
  18. package/dist/{chunk-c0v9ng82.js → chunk-3z38swhv.js} +7 -7
  19. package/dist/{chunk-02c0zcaw.js → chunk-41sq06t2.js} +2 -2
  20. package/dist/chunk-45cvagp1.js +2 -0
  21. package/dist/{chunk-9hfk5wf1.js → chunk-4fc8zs15.js} +5 -5
  22. package/dist/{chunk-jq6gggcz.js → chunk-4zta7ay1.js} +2 -2
  23. package/dist/{chunk-srjhnk6w.js → chunk-5evgz54v.js} +30 -30
  24. package/dist/chunk-5f0wwwmw.js +2 -0
  25. package/dist/chunk-5h71xbzk.js +2 -0
  26. package/dist/{chunk-8qhw7me1.js → chunk-5q2tfrcw.js} +2 -2
  27. package/dist/{chunk-3yz7fafy.js → chunk-5wcgg5t4.js} +1 -1
  28. package/dist/chunk-5z9a1vzw.js +2 -0
  29. package/dist/chunk-67jf2e8x.js +2 -0
  30. package/dist/chunk-6b7je8dc.js +2 -0
  31. package/dist/chunk-6fxjs3ay.js +3 -0
  32. package/dist/chunk-6n5jnd97.js +2 -0
  33. package/dist/chunk-6wvnfdqq.js +2 -0
  34. package/dist/{chunk-6z8rdsc6.js → chunk-6ywa41tr.js} +2 -2
  35. package/dist/{chunk-vzn029zn.js → chunk-73b6sst8.js} +3 -3
  36. package/dist/chunk-78jkbaz3.js +2 -0
  37. package/dist/{chunk-g7shwb6q.js → chunk-7djnbbeb.js} +6 -6
  38. package/dist/chunk-7e9hfrtb.js +2 -0
  39. package/dist/{chunk-fcp5mde5.js → chunk-7mm5mvg0.js} +2 -2
  40. package/dist/{chunk-g019qe9x.js → chunk-7r5vhqtz.js} +4 -4
  41. package/dist/chunk-7tc5fj96.js +2 -0
  42. package/dist/{chunk-myr79xxf.js → chunk-7ycf8a8d.js} +2 -2
  43. package/dist/{chunk-r3v1zaj0.js → chunk-81ysx0tc.js} +2 -2
  44. package/dist/chunk-82q0fy52.js +2 -0
  45. package/dist/chunk-8q5ec4s1.js +2 -0
  46. package/dist/{chunk-9d9rn9qs.js → chunk-8w0cwcvk.js} +81 -81
  47. package/dist/{chunk-80gbx1jn.js → chunk-8wbcy0cn.js} +3 -3
  48. package/dist/{chunk-k4yjbkgb.js → chunk-8wbgq43c.js} +3 -3
  49. package/dist/chunk-8ysk095d.js +2 -0
  50. package/dist/{chunk-hnzfzm0k.js → chunk-90gx5qxn.js} +4 -4
  51. package/dist/{chunk-h7y2pmd9.js → chunk-9q1kkfv1.js} +6 -6
  52. package/dist/{chunk-hc6m2t92.js → chunk-9r3ehqtx.js} +2 -2
  53. package/dist/chunk-9vbrj55v.js +2 -0
  54. package/dist/chunk-bcefawtc.js +2 -0
  55. package/dist/chunk-bd6s91p9.js +2 -0
  56. package/dist/chunk-bhkqzz91.js +2 -0
  57. package/dist/{chunk-tg8z1h11.js → chunk-bkkwdh13.js} +2 -2
  58. package/dist/chunk-bx1mjwhb.js +2 -0
  59. package/dist/{chunk-bd4c8af4.js → chunk-c3dphs36.js} +1 -1
  60. package/dist/{chunk-rt5as4t6.js → chunk-c85j39f7.js} +3 -3
  61. package/dist/{chunk-snfmgp7a.js → chunk-cb4ybh7g.js} +4 -4
  62. package/dist/{chunk-41yjah34.js → chunk-cmaxdd8d.js} +2 -2
  63. package/dist/{chunk-amwxbvdp.js → chunk-d2vsw1j7.js} +2 -2
  64. package/dist/{chunk-9b5k0fvr.js → chunk-d73hh5ar.js} +1 -1
  65. package/dist/{chunk-rzqd4t77.js → chunk-df8cbgf0.js} +2 -2
  66. package/dist/{chunk-8mkxge3a.js → chunk-dvakr9p9.js} +4 -4
  67. package/dist/chunk-dw0m259e.js +2 -0
  68. package/dist/chunk-dx4g2ec9.js +2 -0
  69. package/dist/chunk-evdskc25.js +2 -0
  70. package/dist/{chunk-neh3kewg.js → chunk-fa3ygt8c.js} +4 -4
  71. package/dist/{chunk-s20j5yns.js → chunk-fmxtnva8.js} +2 -2
  72. package/dist/{chunk-k7p9wkw3.js → chunk-fxftc455.js} +2 -2
  73. package/dist/{chunk-1sb6z37d.js → chunk-g223zsce.js} +3 -3
  74. package/dist/{chunk-vfe8xj8g.js → chunk-g22absm0.js} +2 -2
  75. package/dist/{chunk-dg1h0d9r.js → chunk-g45p4y4v.js} +3 -3
  76. package/dist/{chunk-37j288h1.js → chunk-g5sctfwa.js} +10 -10
  77. package/dist/chunk-gppv6fez.js +2 -0
  78. package/dist/chunk-grjr8shp.js +2 -0
  79. package/dist/chunk-gz1w4cpp.js +2 -0
  80. package/dist/chunk-gzbmfwxr.js +42 -0
  81. package/dist/chunk-h0qtmmq3.js +2 -0
  82. package/dist/chunk-h6sewvt2.js +20 -0
  83. package/dist/chunk-hb34m4pp.js +2 -0
  84. package/dist/chunk-hwvtpx3p.js +2 -0
  85. package/dist/{chunk-vpzadc7t.js → chunk-j2hm8v8b.js} +4 -4
  86. package/dist/{chunk-kf80wm87.js → chunk-j3d9zknp.js} +6 -6
  87. package/dist/{chunk-3h2e5jte.js → chunk-j5p191zq.js} +7 -7
  88. package/dist/chunk-k3kav39s.js +2 -0
  89. package/dist/chunk-k46j2maz.js +2 -0
  90. package/dist/{chunk-mdsrnd6s.js → chunk-k4dn3ry6.js} +4 -4
  91. package/dist/{chunk-rra9xhgg.js → chunk-k9m36nyw.js} +5 -5
  92. package/dist/chunk-ka2f844k.js +2 -0
  93. package/dist/chunk-kh4dr6gd.js +2 -0
  94. package/dist/{chunk-8q8202pj.js → chunk-kjfzkac7.js} +7 -7
  95. package/dist/{chunk-ecpr2jsc.js → chunk-m0shnhth.js} +3 -3
  96. package/dist/{chunk-qeh8f4bk.js → chunk-m6w75sq2.js} +2 -2
  97. package/dist/{chunk-qmy12s7k.js → chunk-mpmx0n3q.js} +28 -28
  98. package/dist/chunk-myd82d80.js +2 -0
  99. package/dist/chunk-nek0q523.js +130 -0
  100. package/dist/{chunk-4nmb776w.js → chunk-nmy72s6r.js} +2 -2
  101. package/dist/{chunk-9mtc6m11.js → chunk-np8knskz.js} +1 -1
  102. package/dist/{chunk-5s8bt976.js → chunk-nsjkmpjf.js} +1 -1
  103. package/dist/chunk-nvbjcgzd.js +2 -0
  104. package/dist/{chunk-664tnv9e.js → chunk-nzy4set0.js} +5 -5
  105. package/dist/chunk-p13dxvaj.js +2 -0
  106. package/dist/{chunk-6fhcmg96.js → chunk-p2v0r96k.js} +2 -2
  107. package/dist/{chunk-y1h6z9cy.js → chunk-p33w8zst.js} +3 -3
  108. package/dist/chunk-pht5z7wa.js +2 -0
  109. package/dist/{chunk-572rs7vb.js → chunk-ppvdbstz.js} +3 -3
  110. package/dist/chunk-pwdk7jbx.js +2 -0
  111. package/dist/{chunk-ecf9tftk.js → chunk-pydmzvpq.js} +1 -1
  112. package/dist/{chunk-ftk2jdg8.js → chunk-q0f28539.js} +2 -2
  113. package/dist/chunk-qekyxjy6.js +2 -0
  114. package/dist/{chunk-fgg1stc0.js → chunk-qpb80r4b.js} +2 -2
  115. package/dist/{chunk-smpb39kv.js → chunk-qxrsm48h.js} +5 -5
  116. package/dist/chunk-r10eadgn.js +2 -0
  117. package/dist/chunk-r8184e10.js +2 -0
  118. package/dist/{chunk-8zr9xhf3.js → chunk-rshaz0df.js} +1 -1
  119. package/dist/{chunk-r6s35xw9.js → chunk-sj2a5twe.js} +2 -2
  120. package/dist/chunk-tcrpa52j.js +2 -0
  121. package/dist/{chunk-zpqqdyb4.js → chunk-thr1m7k7.js} +18 -18
  122. package/dist/{chunk-wjtn0ywp.js → chunk-txgd0sj1.js} +5 -5
  123. package/dist/{chunk-tary163t.js → chunk-v0s52tmv.js} +2 -2
  124. package/dist/{chunk-3tg9bsbc.js → chunk-vc4jww9y.js} +13 -13
  125. package/dist/chunk-vp1p250v.js +2 -0
  126. package/dist/{chunk-mcdwjq8t.js → chunk-vpa4xzz3.js} +1 -1
  127. package/dist/chunk-vqrg5j83.js +2 -0
  128. package/dist/chunk-vzdfq3b5.js +2 -0
  129. package/dist/chunk-wzh4ene8.js +2 -0
  130. package/dist/{chunk-8x3axvek.js → chunk-x5sy0tym.js} +6 -6
  131. package/dist/chunk-x5vwkccx.js +2 -0
  132. package/dist/chunk-x6cmj5sa.js +2 -0
  133. package/dist/chunk-xnrfz4c3.js +2 -0
  134. package/dist/{chunk-5bkha4ej.js → chunk-xrzghjvy.js} +2 -2
  135. package/dist/{chunk-we96m579.js → chunk-xzz36k99.js} +2 -2
  136. package/dist/chunk-yaabhcss.js +2 -0
  137. package/dist/chunk-yazqtmq4.js +2 -0
  138. package/dist/{chunk-5afjh2ms.js → chunk-yd2nj0rv.js} +1 -1
  139. package/dist/{chunk-0p6fpsw5.js → chunk-z5kdmget.js} +3 -3
  140. package/dist/{chunk-sva555j3.js → chunk-zqmvhg37.js} +10 -10
  141. package/dist/chunk-zygpvm1x.js +2 -0
  142. package/dist/chunk-zz247c1r.js +2 -0
  143. package/dist/cli.js +19 -19
  144. package/dist/client-script-bundler.d.ts +3 -2
  145. package/dist/client-script-bundler.js +2 -2
  146. package/dist/component-image-usage.d.ts +2 -0
  147. package/dist/component-image-usage.js +13 -0
  148. package/dist/component-renderer.js +7 -2
  149. package/dist/craft-entry.js +2 -2
  150. package/dist/craft.js +2 -2
  151. package/dist/native/compiler/inline-style.js +16 -6
  152. package/dist/native/compiler/ir.d.ts +2 -0
  153. package/dist/native/compiler/render-screen.js +1 -1
  154. package/dist/native/components/primitives.d.ts +2 -0
  155. package/dist/native/prop-names.js +2 -0
  156. package/dist/native/runtime/browser-renderer.js +6 -0
  157. package/dist/pwa.js +3 -3
  158. package/dist/ssg.js +4 -4
  159. package/dist/utils.js +2 -1
  160. package/package.json +5 -5
  161. package/dist/chunk-02kkd7fy.js +0 -2
  162. package/dist/chunk-051evb5w.js +0 -2
  163. package/dist/chunk-1019v091.js +0 -2
  164. package/dist/chunk-1h9mcnvn.js +0 -2
  165. package/dist/chunk-1kdtapc1.js +0 -2
  166. package/dist/chunk-1mmtkbhf.js +0 -2
  167. package/dist/chunk-3a42s01p.js +0 -2
  168. package/dist/chunk-3t737sdr.js +0 -2
  169. package/dist/chunk-4jwp2per.js +0 -2
  170. package/dist/chunk-59512t1y.js +0 -2
  171. package/dist/chunk-5cyzd17z.js +0 -2
  172. package/dist/chunk-5q1mnc79.js +0 -2
  173. package/dist/chunk-6jtjhx7w.js +0 -2
  174. package/dist/chunk-6x112bw3.js +0 -2
  175. package/dist/chunk-7ygjbxm8.js +0 -2
  176. package/dist/chunk-8wnjaz0x.js +0 -2
  177. package/dist/chunk-af1e9spb.js +0 -2
  178. package/dist/chunk-bn13c7ma.js +0 -2
  179. package/dist/chunk-bymeqhjp.js +0 -2
  180. package/dist/chunk-cgyddqxw.js +0 -2
  181. package/dist/chunk-cpexmwbs.js +0 -2
  182. package/dist/chunk-cr12w7hv.js +0 -2
  183. package/dist/chunk-cs5gf4zp.js +0 -2
  184. package/dist/chunk-engy7e5m.js +0 -2
  185. package/dist/chunk-enzptxpw.js +0 -2
  186. package/dist/chunk-f0kbpzbb.js +0 -2
  187. package/dist/chunk-f83dksbn.js +0 -2
  188. package/dist/chunk-fedcrvrm.js +0 -2
  189. package/dist/chunk-fk7gs41v.js +0 -2
  190. package/dist/chunk-fmsrzpb4.js +0 -3
  191. package/dist/chunk-gbve6fgb.js +0 -2
  192. package/dist/chunk-gsawyk8q.js +0 -2
  193. package/dist/chunk-gv6w1j3z.js +0 -2
  194. package/dist/chunk-h3w9sx7w.js +0 -2
  195. package/dist/chunk-hf0n98x2.js +0 -2
  196. package/dist/chunk-k83z4nyg.js +0 -2
  197. package/dist/chunk-kg4zjb7a.js +0 -2
  198. package/dist/chunk-mjam7gyj.js +0 -2
  199. package/dist/chunk-nhm3qamb.js +0 -2
  200. package/dist/chunk-p5hbpmws.js +0 -2
  201. package/dist/chunk-pe5643ce.js +0 -2
  202. package/dist/chunk-q82kcwn4.js +0 -2
  203. package/dist/chunk-rhygq40y.js +0 -2
  204. package/dist/chunk-rx71g5z4.js +0 -2
  205. package/dist/chunk-s4fr9cx8.js +0 -2
  206. package/dist/chunk-sp5c1pgg.js +0 -2
  207. package/dist/chunk-tcrxk0mv.js +0 -130
  208. package/dist/chunk-th2ej2dz.js +0 -2
  209. package/dist/chunk-tkp7npcj.js +0 -42
  210. package/dist/chunk-tyb22n6n.js +0 -2
  211. package/dist/chunk-va57s6yw.js +0 -2
  212. package/dist/chunk-vch68zrs.js +0 -20
  213. package/dist/chunk-vqjbqm6c.js +0 -2
  214. package/dist/chunk-vyznvnew.js +0 -2
  215. package/dist/chunk-wad1w2d2.js +0 -2
  216. package/dist/chunk-wzb2g38x.js +0 -2
  217. package/dist/chunk-xe7wyaac.js +0 -2
  218. package/dist/chunk-y627cbst.js +0 -2
  219. package/dist/chunk-ycxwf633.js +0 -2
  220. package/dist/chunk-ydx3j69d.js +0 -2
  221. package/dist/chunk-yq3p5y7y.js +0 -2
  222. package/dist/chunk-z3ggbhhc.js +0 -2
package/dist/craft.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // @bun
2
- import{uo,ha,ya}from"./chunk-rt5as4t6.js";import"./chunk-srjhnk6w.js";import"./chunk-5hrm7rtx.js";import"./chunk-kyk4ekng.js";import"./chunk-89h4snzd.js";import"./chunk-9d9rn9qs.js";import"./chunk-r6s35xw9.js";import"./chunk-fcp5mde5.js";import"./chunk-qeh8f4bk.js";import"./chunk-mdsrnd6s.js";import"./chunk-37j288h1.js";import"./chunk-c0v9ng82.js";import"./chunk-snfmgp7a.js";import"./chunk-we96m579.js";import"./chunk-8x3axvek.js";import"./chunk-zpqqdyb4.js";import"./chunk-tkp7npcj.js";import"./chunk-3h2e5jte.js";import"./chunk-8q8202pj.js";import"./chunk-k4yjbkgb.js";import"./chunk-02c0zcaw.js";import"./chunk-ftk2jdg8.js";import{eu,ca,qm,Km,la,lo,qr,ua,da,Gm,Xm,pa,fa,ga,ma}from"./chunk-3tg9bsbc.js";import"./chunk-vpzadc7t.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-y1h6z9cy.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
2
+ import{po,ya,ba}from"./chunk-c85j39f7.js";import"./chunk-5evgz54v.js";import"./chunk-0tgrqhkr.js";import"./chunk-236bdf7y.js";import"./chunk-89h4snzd.js";import"./chunk-8w0cwcvk.js";import"./chunk-sj2a5twe.js";import"./chunk-7mm5mvg0.js";import"./chunk-m6w75sq2.js";import"./chunk-k4dn3ry6.js";import"./chunk-g5sctfwa.js";import"./chunk-3z38swhv.js";import"./chunk-cb4ybh7g.js";import"./chunk-xzz36k99.js";import"./chunk-x5sy0tym.js";import"./chunk-thr1m7k7.js";import"./chunk-gzbmfwxr.js";import"./chunk-j5p191zq.js";import"./chunk-kjfzkac7.js";import"./chunk-8wbgq43c.js";import"./chunk-41sq06t2.js";import"./chunk-q0f28539.js";import{tu,la,Km,Gm,ua,uo,Kr,da,pa,Xm,Jm,fa,ga,ma,ha}from"./chunk-vc4jww9y.js";import"./chunk-j2hm8v8b.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-p33w8zst.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
3
3
  `),scripts:t.scripts.join(`
4
4
  `),metadata:{renderTime:0,cacheHit:!0,totalSize:c.html.length,componentCount:t.metadata.componentCount}}}let a;if(n.streaming)a=await H(t.tree,e);else a=h(t.tree,e);let i;if(n.hydrate){let o=j(a,t,e);a=o.html,i=o.data}if(n.minify)a=D(a);if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`;d.set(o,{html:a,timestamp:Date.now()})}let s=performance.now()-r;return{html:a,styles:t.styles.join(`
5
5
  `),scripts:t.scripts.join(`
6
6
  `),hydrationData:i,metadata:{renderTime:s,cacheHit:!1,totalSize:a.length,componentCount:t.metadata.componentCount}}}function V(t,e){let n=[],r=[],a=[],i=new Map,s=[];return y(t.tree,(o,c)=>{if(o.type==="component"&&o.componentName){if(T(o.componentName))n.push(o.componentName)}if(o.type==="element"&&o.tag){let p=J(o);if(p)s.push(p);if(o.props){for(let[l,f]of Object.entries(o.props))if(l.startsWith("on")&&typeof f==="string"){let g=`handler_${i.size}`;i.set(g,f)}}}if(o.isStatic&&o.type==="element")r.push(b(o));else if(!o.isStatic&&o.type!=="text")a.push(o.tag||o.componentName||"unknown")}),{nativeComponents:n,staticHTML:r,dynamicParts:a,eventHandlers:i,nativeWidgets:s}}function Y(t,e={}){let n=R(t),r=P(n,e),a=new Map,i=[];return y(n.tree,(s)=>{if(s.type==="component"&&s.componentName){if(T(s.componentName)){i.push(s.componentName);let o=`<!--craft:${s.componentName}:${s.hydrationKey||"default"}-->`;a.set(s.hydrationKey||s.componentName,o)}}}),{staticHTML:r,dynamicPlaceholders:a,craftComponents:i}}function M(t){let e={type:"fragment",children:[]},n=e,r=[e],a=t,i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(a.length>0){let s=a.match(/^<(@?[\w-]+)([^>]*)>/);if(s){let[p,l,f]=s,g=z(f),u=l.startsWith("@craft-"),C=u?l:l.toLowerCase(),S={type:u?"component":"element",tag:C,props:g,children:[],componentName:u?C.slice(1):void 0,isStatic:!v(f),hydrationKey:F()};if(n.children=n.children||[],n.children.push(S),!i.has(C)&&!f.endsWith("/"))r.push(S),n=S;a=a.slice(p.length);continue}let o=a.match(/^<\/(@?[\w-]+)>/);if(o){let[p,l]=o,g=l.startsWith("@craft-")?l:l.toLowerCase();while(r.length>1){let u=r.pop();if(n=r[r.length-1],u.tag===g)break}a=a.slice(p.length);continue}let c=a.match(/^[^<]+/);if(c){let p=c[0];if(p.trim()){let l={type:"text",text:p,isStatic:!v(p)};n.children=n.children||[],n.children.push(l)}a=a.slice(p.length);continue}a=a.slice(1)}return e}function z(t){let e={},n=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,r;while((r=n.exec(t))!==null){let[,a,i,s,o]=r,c=i??s??o??!0;e[a]=c}return e}function y(t,e,n=[]){if(e(t,n),t.children)t.children.forEach((r,a)=>{y(r,e,[...n,`${a}`])})}function h(t,e){switch(t.type){case"text":return x(t.text||"",e);case"element":case"component":{let n=t.tag||"div",r=N(t.props||{},e),a=(t.children||[]).map((i)=>h(i,e)).join("");if(!t.children||t.children.length===0){if(["input","br","hr","img","meta","link"].includes(n))return`<${n}${r} />`}return`<${n}${r}>${a}</${n}>`}case"fragment":return(t.children||[]).map((n)=>h(n,e)).join("");case"slot":return`<!--slot:${t.slotName||"default"}-->`;default:return""}}function b(t){if(t.type==="text")return t.text||"";let e=t.tag||"div",n=N(t.props||{},{});return`<${e}${n}></${e}>`}function N(t,e){let n=[];for(let[r,a]of Object.entries(t))if(a===!0)n.push(` ${r}`);else if(a!==!1&&a!==null&&a!==void 0){let i=x(String(a),e);n.push(` ${r}="${k(i)}"`)}return n.join("")}async function H(t,e){return h(t,e)}function P(t,e){let n=[];return y(t.tree,(r)=>{if(r.isStatic)n.push(h(r,e))}),n.join("")}function j(t,e,n){let r={templateId:e.id,context:n,dynamicParts:Array.from(e.dynamicParts.entries())},a=`
7
7
  <script data-craft-hydration>
8
8
  window.__CRAFT_HYDRATION__ = ${JSON.stringify(r)};
9
- </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{eu as CRAFT_BRIDGE_SCRIPT,lo as CRAFT_COMPONENTS,ua as CRAFT_COMPONENT_RUNTIME,qr as CRAFT_COMPONENT_STYLES,uo as NATIVE_COMPONENTS,pa as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,ha as compileToNative,ya as createHotReloadServer,fa as findCraftBinary,ca as generateCraftBridgeScript,V as generateCraftOptimizations,ma as getAvailableFormats,ga as getAvailableTargets,Xm as getCraftComponents,G as getSSRCacheStats,la as injectCraftBridge,qm as isCraftEnvironment,Y as prerenderForCraft,da as processCraftComponents,Km as processCraftDirective,Gm as registerCraftComponent,Q as renderSSR};
9
+ </script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{tu as CRAFT_BRIDGE_SCRIPT,uo as CRAFT_COMPONENTS,da as CRAFT_COMPONENT_RUNTIME,Kr as CRAFT_COMPONENT_STYLES,po as NATIVE_COMPONENTS,fa as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,ya as compileToNative,ba as createHotReloadServer,ga as findCraftBinary,la as generateCraftBridgeScript,V as generateCraftOptimizations,ha as getAvailableFormats,ma as getAvailableTargets,Jm as getCraftComponents,G as getSSRCacheStats,ua as injectCraftBridge,Km as isCraftEnvironment,Y as prerenderForCraft,pa as processCraftComponents,Gm as processCraftDirective,Xm as registerCraftComponent,Q as renderSSR};
@@ -88,6 +88,7 @@ const STYLE_KEYS = new Set([
88
88
  "textTransform",
89
89
  "resizeMode",
90
90
  "objectFit",
91
+ "objectPosition",
91
92
  "tintColor",
92
93
  "transform",
93
94
  "overflow",
@@ -278,16 +279,25 @@ function parseEntries(entries, variables, report) {
278
279
  }
279
280
  if (property === "objectFit") {
280
281
  const fit = typeof value === "string" ? value.trim().toLowerCase() : "";
281
- if (fit === "cover" || fit === "contain")
282
- style.resizeMode = fit;
283
- else if (fit === "fill")
284
- style.resizeMode = "stretch";
285
- else if (fit === "none")
286
- style.resizeMode = "center";
282
+ if (["fill", "contain", "cover", "none", "scale-down"].includes(fit))
283
+ style.objectFit = fit;
287
284
  else
288
285
  report({ kind: "unknown-style", name: `objectFit:${String(value)}` });
289
286
  continue;
290
287
  }
288
+ if (property === "objectPosition") {
289
+ const position = typeof value === "string" ? value.trim().toLowerCase().replace(/\s+/g, " ") : "", parts = position.split(" ");
290
+ if (parts.length === 1)
291
+ parts.push("center");
292
+ if (["top", "bottom"].includes(parts[0]) || ["left", "right"].includes(parts[1]))
293
+ parts.reverse();
294
+ const percentage = (part) => part.endsWith("%") && NUMBER.test(part.slice(0, -1)) && Number.isFinite(Number(part.slice(0, -1)));
295
+ if (parts.length === 2 && (["left", "center", "right"].includes(parts[0]) || percentage(parts[0])) && (["top", "center", "bottom"].includes(parts[1]) || percentage(parts[1])))
296
+ style.objectPosition = position;
297
+ else
298
+ report({ kind: "unknown-style", name: `objectPosition:${String(value)}` });
299
+ continue;
300
+ }
291
301
  let translated;
292
302
  if (NUMERIC_STYLE_KEYS.has(property) || DIMENSION_STYLE_KEYS.has(property)) {
293
303
  translated = numericValue(value);
@@ -137,6 +137,8 @@ export declare interface STXStyle {
137
137
  textDecorationColor?: string
138
138
  textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize'
139
139
  resizeMode?: 'cover' | 'contain' | 'stretch' | 'center'
140
+ objectFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
141
+ objectPosition?: string
140
142
  tintColor?: string
141
143
  transform?: Array<
142
144
  | { perspective: number }
@@ -30,7 +30,7 @@ export async function compileScreenSource(source, filePath, options = {}) {
30
30
  buildMode: "serve",
31
31
  cache: !1,
32
32
  _targetComponentDirs: [nativePrimitivesDir()],
33
- _targetComponentFallbackNames: ["Button", "Checkbox", "Switch", "TextInput", "Video"],
33
+ _targetComponentFallbackNames: ["Button", "Checkbox", "Switch", "TextInput", "Image", "Video"],
34
34
  _nativeHostAttrs: !0,
35
35
  skipEventDirectives: !0,
36
36
  _pluginComponentDirs: loaded._pluginComponentDirs ?? []
@@ -251,6 +251,8 @@ export declare interface ImageProps extends BaseProps {
251
251
  source: ImageSource
252
252
  alt?: string
253
253
  resizeMode?: 'cover' | 'contain' | 'stretch' | 'center'
254
+ objectFit?: 'fill' | 'contain' | 'cover' | 'none' | 'scale-down'
255
+ objectPosition?: string
254
256
  onLoad?: () => void
255
257
  onLoadStart?: () => void
256
258
  onLoadEnd?: () => void
@@ -43,6 +43,8 @@ const NATIVE_PROP_NAMES = [
43
43
  "minuteInterval",
44
44
  "numberOfLines",
45
45
  "numColumns",
46
+ "objectFit",
47
+ "objectPosition",
46
48
  "onEndReachedThreshold",
47
49
  "pageIndex",
48
50
  "pagingEnabled",
@@ -1,4 +1,5 @@
1
1
  import { LUCIDE_TO_SF } from "../compiler/icons.js";
2
+ import { parseNativeStyle } from "../compiler/inline-style.js";
2
3
  const SYMBOL_TO_ICON = {};
3
4
  for (const [name, symbol] of Object.entries(LUCIDE_TO_SF))
4
5
  if (!(symbol in SYMBOL_TO_ICON) || name === symbol)
@@ -327,6 +328,11 @@ export class BrowserScreenRenderer {
327
328
  css.flexShrink = "0";
328
329
  }
329
330
  this.style(css, style);
331
+ if (type === "Image") {
332
+ const fit = props.objectFit ?? style.objectFit, position = props.objectPosition ?? style.objectPosition, explicitGeometry = fit != null || position != null, legacy = props.resizeMode ?? style.resizeMode ?? "cover";
333
+ css.objectFit = explicitGeometry ? typeof fit === "string" && ["fill", "contain", "cover", "none", "scale-down"].includes(fit) ? fit : "fill" : legacy === "stretch" ? "fill" : legacy === "center" ? "none" : String(legacy);
334
+ css.objectPosition = explicitGeometry ? parseNativeStyle({ objectPosition: position }).objectPosition ?? "center" : "center";
335
+ }
330
336
  if (props.contentContainerStyle && typeof props.contentContainerStyle === "object")
331
337
  this.style(css, props.contentContainerStyle);
332
338
  if (type === "SafeAreaView") {
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Ws,Ft,ll,dg}from"./chunk-8mkxge3a.js";import{Us,xi,cg,lg,ug}from"./chunk-h7y2pmd9.js";import{il,al,cl,ig,ag}from"./chunk-67z3kesf.js";import{Ve,Cn,Si}from"./chunk-vfe8xj8g.js";import{pg,fg,gg,mg,qs,zh}from"./chunk-5bkha4ej.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-rx71g5z4.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{qs,Ft,ul,pg}from"./chunk-dvakr9p9.js";import{Ws,Si,lg,ug,dg}from"./chunk-9q1kkfv1.js";import{al,cl,ll,ag,cg}from"./chunk-1a2cwee1.js";import{Ve,Cn,ki}from"./chunk-g22absm0.js";import{fg,gg,mg,hg,Ks,Hh}from"./chunk-xrzghjvy.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-33bp9m4c.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=Ve(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Ws(n,t);if(a){let s=Ft(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 xi(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,al as auditBuildOutput,il as auditConfig,re as buildPwaAssets,cl as calculateAuditResult,ag as formatAuditResult,Si as formatSize,j as generateManifest,_ as generateManifestJson,lg as generateManifestLink,F as generateOfflinePage,Ve as generatePrecacheManifest,Cn as generatePrecacheManifestJs,M as generatePwaIcons,Us as generatePwaTags,Ws as generateServiceWorker,dg as generateServiceWorkerAuto,cg as generateSwRegistrationScript,ug as generateThemeColorMeta,N as getExpectedIconPaths,Ft as getServiceWorkerFileName,xi as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,ll as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,qs as pwaDirectives,pg as pwaInstallDirective,gg as pwaOfflineDirective,mg as pwaPushDirective,fg as pwaUpdateDirective,zh as registerPwaDirectives,ig 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=Ve(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=qs(n,t);if(a){let s=Ft(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 Si(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,cl as auditBuildOutput,al as auditConfig,re as buildPwaAssets,ll as calculateAuditResult,cg as formatAuditResult,ki as formatSize,j as generateManifest,_ as generateManifestJson,ug as generateManifestLink,F as generateOfflinePage,Ve as generatePrecacheManifest,Cn as generatePrecacheManifestJs,M as generatePwaIcons,Ws as generatePwaTags,qs as generateServiceWorker,pg as generateServiceWorkerAuto,lg as generateSwRegistrationScript,dg as generateThemeColorMeta,N as getExpectedIconPaths,Ft as getServiceWorkerFileName,Si as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,ul as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Ks as pwaDirectives,fg as pwaInstallDirective,mg as pwaOfflineDirective,hg as pwaPushDirective,gg as pwaUpdateDirective,Hh as registerPwaDirectives,ag as runPwaAudit,D as validateManifest};
package/dist/ssg.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import"./chunk-19safa6y.js";import{b,Uc}from"./chunk-5hrm7rtx.js";import"./chunk-kyk4ekng.js";import"./chunk-89h4snzd.js";import{Tt,S}from"./chunk-9d9rn9qs.js";import"./chunk-r6s35xw9.js";import"./chunk-fcp5mde5.js";import"./chunk-qeh8f4bk.js";import{xt,St,kt,_t,Ct,Et}from"./chunk-mdsrnd6s.js";import{a}from"./chunk-37j288h1.js";import{ys}from"./chunk-c0v9ng82.js";import"./chunk-snfmgp7a.js";import"./chunk-wjtn0ywp.js";import{Te,Zt,Qt}from"./chunk-vch68zrs.js";import"./chunk-we96m579.js";import{y}from"./chunk-8x3axvek.js";import{mt,i}from"./chunk-zpqqdyb4.js";import"./chunk-tkp7npcj.js";import"./chunk-3h2e5jte.js";import{ss}from"./chunk-8q8202pj.js";import"./chunk-k4yjbkgb.js";import"./chunk-02c0zcaw.js";import{Fa,za,Ha}from"./chunk-0p6fpsw5.js";import{Jt,Xn,Jn}from"./chunk-tn40nh9e.js";import{Yt}from"./chunk-9mtc6m11.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import{G,be}from"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-y1h6z9cy.js";import{l}from"./chunk-myr79xxf.js";import{s,ge}from"./chunk-dg1h0d9r.js";import D from"fs";import f from"path";import{createHash as $t}from"crypto";function Dt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Rt=/<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,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Rt,(e,u,g,v)=>{let w=v.trim();if(!w)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)w=Dt(w);let p=It(w);if(!n.has(p))n.set(p,w);let P=r.integrity?` data-stx-integrity="sha384-${$t("sha384").update(w).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let w=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!w)return t;return t.slice(0,v)+w+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=X(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?X(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=X(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 c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);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 J(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=b(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=b(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=Uc(r,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 r="read";try{let n=await Bun.file(t).text();r="parse";let o=Yt(n),c=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of c){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&Tt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(J);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let w=await v();r="result";let p=Array.isArray(w)?{paths:w}:w;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(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let c=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=ft(r).some((u)=>D.existsSync(u)),c=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ss(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let c=this.getHash(r,n);this.cache.set(t,{hash:c,html:o,generatedAt:Date.now(),dependencies:n})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let c=o.replace(/_/g,"/").replace(".json","");if(t.test(c))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let c of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(c.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:c.params,props:c.props,revalidate:c.revalidate})}}return r}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 r of ft(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...c}=n;return c}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let e=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
2
+ import"./chunk-19safa6y.js";import{b,Wc}from"./chunk-0tgrqhkr.js";import"./chunk-236bdf7y.js";import"./chunk-89h4snzd.js";import{Tt,S}from"./chunk-8w0cwcvk.js";import"./chunk-sj2a5twe.js";import"./chunk-7mm5mvg0.js";import"./chunk-m6w75sq2.js";import{xt,St,kt,_t,Ct,Et}from"./chunk-k4dn3ry6.js";import{a}from"./chunk-g5sctfwa.js";import{bs}from"./chunk-3z38swhv.js";import"./chunk-cb4ybh7g.js";import"./chunk-txgd0sj1.js";import{Te,Zt,Qt}from"./chunk-h6sewvt2.js";import"./chunk-xzz36k99.js";import{y}from"./chunk-x5sy0tym.js";import{mt,i}from"./chunk-thr1m7k7.js";import"./chunk-gzbmfwxr.js";import"./chunk-j5p191zq.js";import{os}from"./chunk-kjfzkac7.js";import"./chunk-8wbgq43c.js";import"./chunk-41sq06t2.js";import{za,Ha,Va}from"./chunk-z5kdmget.js";import{Jt,Xn,Jn}from"./chunk-tn40nh9e.js";import{Yt}from"./chunk-np8knskz.js";import"./chunk-6fxjs3ay.js";import"./chunk-v0s52tmv.js";import{G,be}from"./chunk-024m1xmd.js";import"./chunk-nsjkmpjf.js";import"./chunk-p33w8zst.js";import{l}from"./chunk-7ycf8a8d.js";import{s,ge}from"./chunk-g45p4y4v.js";import D from"fs";import f from"path";import{createHash as $t}from"crypto";function Dt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Rt=/<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,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Rt,(e,u,g,v)=>{let w=v.trim();if(!w)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)w=Dt(w);let p=It(w);if(!n.has(p))n.set(p,w);let P=r.integrity?` data-stx-integrity="sha384-${$t("sha384").update(w).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let w=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!w)return t;return t.slice(0,v)+w+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=X(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?X(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=X(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 c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);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 J(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=b(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=b(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=Wc(r,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 r="read";try{let n=await Bun.file(t).text();r="parse";let o=Yt(n),c=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of c){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&Tt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(J);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let w=await v();r="result";let p=Array.isArray(w)?{paths:w}:w;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(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let c=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=ft(r).some((u)=>D.existsSync(u)),c=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&os(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let c=this.getHash(r,n);this.cache.set(t,{hash:c,html:o,generatedAt:Date.now(),dependencies:n})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let c=o.replace(/_/g,"/").replace(".json","");if(t.test(c))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let c of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(c.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:c.params,props:c.props,revalidate:c.revalidate})}}return r}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 r of ft(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...c}=n;return c}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let e=c.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 c=new URL(o.loc,r).href,e=` <url>
37
37
  ${n.join(`
38
38
  `)}
39
39
  </channel>
40
- </rss>`}async function Kt(t={}){let r=Date.now();Qt();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.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||l(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||n?.partialsDir||"",componentsDir:t.componentsDir||n?.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,w={},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-va57s6yw.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:x}=await import("./chunk-1mmtkbhf.js"),R=await x(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-va57s6yw.js");await d('<div class="bg-black"></div>')}catch{}xt();let yt=n?.routeMiddleware?.dir||"middleware";await kt(process.cwd(),yt);let V=St();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let bt=n?.routeMiddleware?.global||[];Ha(n?.layoutsDir,l(process.cwd()));let Z=G(".",{pagesDir:e.pagesDir,pagesDirs:n?._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:N,props:vt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=ee(A),Pt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...bt,...Pt];if(nt.length>0){let B=_t(h,N,O||{}),L=Ct(B,null,void 0,{isServer:!0}),j=await Et(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,z=re(String(C),h),U=ne(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,z),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(z),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 Kt(t={}){let r=Date.now();Qt();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.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||l(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||n?.partialsDir||"",componentsDir:t.componentsDir||n?.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,w={},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-yazqtmq4.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:x}=await import("./chunk-x6cmj5sa.js"),R=await x(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-yazqtmq4.js");await d('<div class="bg-black"></div>')}catch{}xt();let yt=n?.routeMiddleware?.dir||"middleware";await kt(process.cwd(),yt);let V=St();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let bt=n?.routeMiddleware?.global||[];Va(n?.layoutsDir,l(process.cwd()));let Z=G(".",{pagesDir:e.pagesDir,pagesDirs:n?._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:N,props:vt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=ee(A),Pt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...bt,...Pt];if(nt.length>0){let B=_t(h,N,O||{}),L=Ct(B,null,void 0,{isServer:!0}),j=await Et(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,z=re(String(C),h),U=ne(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,z),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(z),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:N})){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 wt(k,N,vt,e,n);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={...n,minifyClient:!0,debug:!1,cache:!1},N=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),N)}}let K=f.join(e.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(K).text(),{},K,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=ys({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=Vt(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 W=Fa(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=za(e.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.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=Jn();if(et)await Y(et,f.join(e.outputDir,Xn)),console.log(`Copied assets from ${Jt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-r,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:w,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={...n,minifyClient:!0,debug:!1,cache:!1},N=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),N)}}let K=f.join(e.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(K).text(),{},K,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=bs({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=Vt(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 W=za(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=Ha(e.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.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=Jn();if(et)await Y(et,f.join(e.outputDir,Xn)),console.log(`Copied assets from ${Jt}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-r,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:w,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/dist/utils.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { extractExports as scopeExports, scopePropertyDescriptor } from "./client-scope-bindings.js";
2
2
  import { pascalToKebab } from "./component-resolution.js";
3
+ import { usesSharedImageApi } from "./component-image-usage.js";
3
4
  import fs from "node:fs";
4
5
  import path from "node:path";
5
6
  import { extractAndStripCssImports, extractBridgeData, generateServerDataBridge, injectBrowserCoreAutoImports, processClientScript, renderVendorStyleTags } from "./client-script.js";
@@ -723,7 +724,7 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
723
724
  for (const dir of options.additionalComponentsDirs ?? [])
724
725
  if (dir && !searchDirs.includes(dir))
725
726
  searchDirs.push(dir);
726
- const checkedControl = options._nativeHostAttrs && /^(?:checkbox|switch)$/i.test(baseName), eventNames = (renderMetadata?.events ?? []).map((name) => name.replace(/^@/, "").split(".")[0].toLowerCase().replace(/-/g, "")), usesChecked = Object.hasOwn(props, "checked") || Boolean(renderMetadata?.reactiveProps?.includes("checked")), usesValue = Object.hasOwn(props, "value") || Boolean(renderMetadata?.reactiveProps?.includes("value")), sharedCheckedUsage = !eventNames.includes("valuechange") && (usesChecked || eventNames.includes("change") && !usesValue), textInput = options._nativeHostAttrs && /^textinput$/i.test(baseName), sharedTextInputUsage = eventNames.includes("update:value") && !eventNames.includes("input"), video = options._nativeHostAttrs && /^video$/i.test(baseName), usesSrc = Object.hasOwn(props, "src") || Boolean(renderMetadata?.reactiveProps?.includes("src")), usesSource = Object.hasOwn(props, "source") || Boolean(renderMetadata?.reactiveProps?.includes("source")), sharedVideoUsage = video && usesSrc && !usesSource && (renderMetadata?.events ?? []).every((event) => /^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(event.replace(/^@/, "").split(".")[0])), hasProp = (name) => Object.hasOwn(props, name) || Boolean(renderMetadata?.reactiveProps?.includes(name)), nativeButtonUsage = options._nativeHostAttrs && /^button$/i.test(baseName) && (hasProp("symbol") || hasProp("iconOnly") || hasProp("title") && !hasProp("label") && !slotContent.trim()), targetIsFallback = options._targetComponentFallbackNames?.some((name) => name.toLowerCase() === baseName.toLowerCase()) && (!checkedControl || sharedCheckedUsage) && (!textInput || sharedTextInputUsage) && (!video || sharedVideoUsage) && !nativeButtonUsage;
727
+ const checkedControl = options._nativeHostAttrs && /^(?:checkbox|switch)$/i.test(baseName), eventNames = (renderMetadata?.events ?? []).map((name) => name.replace(/^@/, "").split(".")[0].toLowerCase().replace(/-/g, "")), usesChecked = Object.hasOwn(props, "checked") || Boolean(renderMetadata?.reactiveProps?.includes("checked")), usesValue = Object.hasOwn(props, "value") || Boolean(renderMetadata?.reactiveProps?.includes("value")), sharedCheckedUsage = !eventNames.includes("valuechange") && (usesChecked || eventNames.includes("change") && !usesValue), textInput = options._nativeHostAttrs && /^textinput$/i.test(baseName), sharedTextInputUsage = eventNames.includes("update:value") && !eventNames.includes("input"), video = options._nativeHostAttrs && /^video$/i.test(baseName), image = options._nativeHostAttrs && /^image$/i.test(baseName), sharedImageUsage = usesSharedImageApi([...Object.keys(props), ...renderMetadata?.reactiveProps ?? []], renderMetadata?.events, props), usesSrc = Object.hasOwn(props, "src") || Boolean(renderMetadata?.reactiveProps?.includes("src")), usesSource = Object.hasOwn(props, "source") || Boolean(renderMetadata?.reactiveProps?.includes("source")), sharedVideoUsage = video && usesSrc && !usesSource && (renderMetadata?.events ?? []).every((event) => /^(?:play|pause|ended|timeupdate|loadedmetadata|loadstart|error)$/.test(event.replace(/^@/, "").split(".")[0])), hasProp = (name) => Object.hasOwn(props, name) || Boolean(renderMetadata?.reactiveProps?.includes(name)), nativeButtonUsage = options._nativeHostAttrs && /^button$/i.test(baseName) && (hasProp("symbol") || hasProp("iconOnly") || hasProp("title") && !hasProp("label") && !slotContent.trim()), targetIsFallback = options._targetComponentFallbackNames?.some((name) => name.toLowerCase() === baseName.toLowerCase()) && (!checkedControl || sharedCheckedUsage) && (!textInput || sharedTextInputUsage) && (!video || sharedVideoUsage) && (!image || sharedImageUsage) && !nativeButtonUsage;
727
728
  for (const dir of targetIsFallback ? [] : options._targetComponentDirs ?? [])
728
729
  if (dir && !searchDirs.includes(dir))
729
730
  searchDirs.push(dir);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.753",
4
+ "version": "0.2.755",
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.11",
130
130
  "@stacksjs/clapp": "^0.2.16",
131
- "@stacksjs/desktop": "0.2.753",
132
- "@stacksjs/sanitizer": "0.2.753",
131
+ "@stacksjs/desktop": "0.2.755",
132
+ "@stacksjs/sanitizer": "0.2.755",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
- "bun-plugin-stx": "0.2.753",
134
+ "bun-plugin-stx": "0.2.755",
135
135
  "bunfig": "^0.15.21",
136
- "stx-router": "0.2.753",
136
+ "stx-router": "0.2.755",
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{Ei,Ti,$i,xg,Ri,Ai,Sg,Pi,Ii,dl,kg}from"./chunk-pnpd7gz7.js";export{Ei as VideoProcessorCache,dl as analyzeVideo,xg as clearVideoCache,Ii as generateDASHManifest,Pi as generateHLSManifest,Ri as generatePoster,Sg as generateSpriteSheet,Ai as generateThumbnails,Ti as getCachedVideoResult,kg as processVideo,$i as setCachedVideoResult};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{uo,ha,ya,Ym}from"./chunk-rt5as4t6.js";export{uo as NATIVE_COMPONENTS,ha as compileToNative,ya as createHotReloadServer,Ym as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vm,wm,xm,Sm,km}from"./chunk-664tnv9e.js";export{wm as createSSRSuspense,Sm as generateSuspenseCSS,km as generateSuspenseRuntime,vm as processSuspenseDirectives,xm as renderSSRSuspense};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Tf,Bo}from"./chunk-qeh8f4bk.js";export{Tf as looksLikeGlob,Bo as resolveStxTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{_m,Cm,Em,Tm,$m}from"./chunk-neh3kewg.js";export{Cm as defineAsyncComponent,Tm as generateAsyncComponentCSS,$m as generateAsyncComponentRuntime,Em as isAsyncComponent,_m as processAsyncDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Eo,To,$o,ih,ns,ah}from"./chunk-tkp7npcj.js";export{ns as clearImageDeliveryCatalog,ih as deliveredImage,$o as efficientDeliverySources,Eo as getImageDelivery,To as isTransparentImage,ah as prepareImageDelivery};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ws,Ft,ll,dg}from"./chunk-8mkxge3a.js";export{Ws as generateServiceWorker,dg as generateServiceWorkerAuto,Ft as getServiceWorkerFileName,ll as isWorkboxEnabled};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ia,ql,jn,Zg,Kl,Gl,Xl,Qg}from"./chunk-80gbx1jn.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{jn as Validator,ql as defineForm,Kl as processErrorDirective,Gl as processErrorsDirective,Qg as processFormValidationDirectives,Xl as processHasErrorsDirective,ia as useForm,Zg as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wg}from"./chunk-tg8z1h11.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Wg as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{gt,Fn,Fm}from"./chunk-hnzfzm0k.js";import{le,zn,zm,Hn,ao,Vr,Ur,Hm,Vm,Um,Vn,Un,co,Wr,Wm}from"./chunk-rzqd4t77.js";import"./chunk-kyk4ekng.js";export{ao as batch,Fm as default,zn as derived,Hn as effect,gt as generateSignalsRuntime,Fn as generateSignalsRuntimeDev,Un as isDerived,Vn as isSignal,zm as memo,Ur as onDestroy,Vr as onMount,Wr as peek,Um as pendingLifecycleCounts,Vm as runDestroyCallbacks,Hm as runMountCallbacks,le as state,co as untrack,Wm as useOptimistic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$l,Kg,Rl,Al,Gg,Xg}from"./chunk-8qhw7me1.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Xg as applySlots,Gg as extractSlotContent,Kg as parseSlotElement,$l as parseSlots,Al as processSlots,Rl as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{m,ri,Oc,Nc,qf,Kf,Gf,Xf,Jf,Ns,Yf,Le,Y,je,Zf,xr,Qf,Lc,ai,Be,r,yn,jc,h,fe,_h}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{fe as clearComponentCache,ai as componentClientSignalNames,ri as convertToCommonJS,h as createDetailedErrorMessage,Jf as extractDirectiveNames,Oc as extractScriptFromTemplate,m as extractVariables,r as fileExists,_h as getComponentCacheStats,Kf as getPositionInfo,Y as getSharedTranspiler,jc as getSourceLineInfo,Xf as hasDirectives,Nc as hasVariables,Qf as isHydrateTrigger,Yf as isJavaScriptScript,Be as renderComponentWithSlot,yn as resolveTemplatePath,Zf as scopeOnRootElement,Ns as scopeSequenceKey,Le as shouldTranspileTypeScript,Lc as slotContentHasExpressions,je as transpileTypeScript,xr as userComponentFileExists,Gf as validateDirective,qf as validateTemplate};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Co}from"./chunk-02c0zcaw.js";export{Co as warnUnbalancedTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{dm,pm}from"./chunk-vzn029zn.js";export{pm as ensureTeleportTargets,dm as processTeleportDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Og}from"./chunk-s20j5yns.js";import"./chunk-1bk3t4s1.js";import"./chunk-hnzfzm0k.js";import"./chunk-9mtc6m11.js";import"./chunk-wjtn0ywp.js";import"./chunk-zpqqdyb4.js";import"./chunk-8x3axvek.js";import"./chunk-02c0zcaw.js";import"./chunk-k4yjbkgb.js";import"./chunk-3h2e5jte.js";import"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-we96m579.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Og as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{gl,qi,ml,hl,Ki,yl,bl,vl,wl,Gi,xl,$g}from"./chunk-g019qe9x.js";import{na,Tl}from"./chunk-n3t2cd17.js";import{Q,ee,te,In,me,Ee,zr,pt,qt,On,Nn,Dn,ne,Mn,Ln,Hr}from"./chunk-yax8wz93.js";import{Jl}from"./chunk-r3v1zaj0.js";import"./chunk-ftk2jdg8.js";export{ee as DEFAULT_FORMATS,te as DEFAULT_QUALITY,Q as DEFAULT_WIDTHS,Hr as ImageProcessingError,hl as clearImageCache,Ki as createImageDirective,Tl as createImageHandler,bl as createImagePlugin,$g as defaultImageConfig,Ln as formatSize,Gi as generateImageManifest,qt as generateSizes,pt as generateSrcSet,On as getFallbackVariant,zr as getImageMetadata,ne as getMimeType,Mn as getTotalSize,Nn as groupVariantsByFormat,na as handleImageRequest,yl as imageDirective,me as isImageBackendAvailable,Dn as isImageFile,In as isSharpAvailable,wl as optimizeDirectory,vl as optimizeImage,qi as parseImageComponent,Ee as processImage,ml as processImageComponents,gl as renderImageComponent,Jl as rewriteImagesWithSiblings,xl as writeImageManifest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{j,Ef,jo,a,P,hh,yh}from"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{P as config,j as defaultConfig,hh as defineStxConfig,jo as discoverConfig,a as loadStxConfig,Ef as resolveStxDirectories,yh as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mm,Lm}from"./chunk-572rs7vb.js";import"./chunk-vch68zrs.js";import"./chunk-wjtn0ywp.js";import"./chunk-19safa6y.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Lm as clearStoreCache,Mm as getStoreScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ch,ss,Io,os,sr,Oo,No,is,as,cs,Do,Ja,Sf,yt}from"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import{z}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{ch as clearScriptScanCache,is as convertServerLoopAttributesToDirectives,Oo as convertSignalDirectivesToAttributes,as as convertSignalLoopsToAttributes,sr as extractClientSignalNames,z as extractExports,Ja as findMarkupIndexOutsideScripts,os as hasSignalsSyntax,Io as parseLoopExpression,No as preEvalLiteralReactiveIfs,cs as processScriptSetup,Do as processSignals,Sf as rewriteStxImportSpecifiers,ss as scanScriptTags,yt as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Jl}from"./chunk-r3v1zaj0.js";export{Jl as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sl,Xi,Rg,kl,_l,Ag,Pg}from"./chunk-sva555j3.js";import"./chunk-ecpr2jsc.js";import"./chunk-vch68zrs.js";import"./chunk-wjtn0ywp.js";import"./chunk-19safa6y.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import{At,Lf}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Sl as buildVirtualSource,At as extractScriptBlocks,Lf as extractTemplateExpressions,kl as findRuntimeTypeDeclarations,_l as findStxModuleDeclarations,Pg as formatTypecheckDiagnostics,Rg as sourcePathFor,Ag as typecheckStxFiles,Xi as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zr,rr,vf}from"./chunk-k4yjbkgb.js";import"./chunk-tary163t.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import{Rt}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{vf as declareBareLoopHead,Rt as parseLoopBinding,rr as processLoops,Zr as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wo,qo,wt,ue,ur,bs,dr,vs,ws,$f,Rf,Af,pr,Pf,If,Of,Nf,dc,pc,fc,Ko,gc,Df,xt,St,kt,_t,Ct,Et,Qe,Mf}from"./chunk-mdsrnd6s.js";export{dr as Router,Of as abortNavigation,bs as bracketPathToRegex,xt as clearMiddleware,pc as createClientCookieManager,Ct as createMiddlewareContext,_t as createRouteLocation,dc as createServerCookieManager,fc as createStorageManager,Nf as defineMiddleware,Rf as defineRoute,Af as defineRoutes,vs as findErrorPage,ws as formatRoutes,qo as generateRouteManifest,Wo as generateRouteTypes,gc as getMiddleware,St as getMiddlewareNames,Qe as getRouterScript,Mf as getRouterScriptDev,Df as hasMiddleware,wt as isFileRequestPath,kt as loadMiddlewareFromDirectory,ur as matchRoute,If as navigateTo,ue as patternToRegex,Ko as registerMiddleware,Pf as resetRoutes,pr as route,Et as runMiddleware,$f as setAppUrl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{_g}from"./chunk-1sb6z37d.js";import"./chunk-zpqqdyb4.js";import"./chunk-8x3axvek.js";import"./chunk-02c0zcaw.js";import"./chunk-k4yjbkgb.js";import"./chunk-3h2e5jte.js";import"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-we96m579.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{_g as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pl,fl}from"./chunk-qmy12s7k.js";import"./chunk-1sb6z37d.js";import"./chunk-6z8rdsc6.js";import"./chunk-p4h5c79q.js";import"./chunk-g019qe9x.js";import"./chunk-sva555j3.js";import"./chunk-k7p9wkw3.js";import"./chunk-s20j5yns.js";import"./chunk-1bk3t4s1.js";import"./chunk-jq6gggcz.js";import"./chunk-n3t2cd17.js";import"./chunk-tg8z1h11.js";import"./chunk-3yz7fafy.js";import"./chunk-8qhw7me1.js";import"./chunk-yax8wz93.js";import"./chunk-qksbf2gt.js";import"./chunk-g7shwb6q.js";import"./chunk-80gbx1jn.js";import"./chunk-r3v1zaj0.js";import"./chunk-kf80wm87.js";import"./chunk-hc6m2t92.js";import"./chunk-vzn029zn.js";import"./chunk-smpb39kv.js";import"./chunk-664tnv9e.js";import"./chunk-neh3kewg.js";import"./chunk-9hfk5wf1.js";import"./chunk-572rs7vb.js";import"./chunk-ecpr2jsc.js";import"./chunk-hnzfzm0k.js";import"./chunk-vpzadc7t.js";import"./chunk-ftk2jdg8.js";import"./chunk-0p6fpsw5.js";import{Yt}from"./chunk-9mtc6m11.js";import"./chunk-vch68zrs.js";import"./chunk-wjtn0ywp.js";import"./chunk-19safa6y.js";import{Re,i}from"./chunk-zpqqdyb4.js";import"./chunk-8x3axvek.js";import"./chunk-02c0zcaw.js";import"./chunk-k4yjbkgb.js";import"./chunk-3h2e5jte.js";import"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-8q8202pj.js";import{be}from"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import{ar,cr}from"./chunk-we96m579.js";import{ds,j,a}from"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import{m,Me}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";import"./chunk-mcdwjq8t.js";import"./chunk-pnpd7gz7.js";export{ds as buildWebComponents,cr as cacheTemplate,ar as checkCache,Yt as classifyAllScripts,pl as createMiddleware,fl as createRoute,j as defaultConfig,m as extractVariables,be as injectRouterScript,a as loadStxConfig,Me as processClientScript,i as processDirectives,Re as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ng,Dg,Mg,Lg,El,jg,Bg,Fg,zg,Hg,Vg,Ug}from"./chunk-jq6gggcz.js";export{Vg as Broadcast,Ug as BroadcastServer,El as broadcast,zg as broadcastPresence,Fg as broadcastPrivate,Hg as channel,Ng as getBroadcastServer,Lg as loadChannels,Dg as startBroadcasting,Mg as stopBroadcasting,jg as toUser,Bg as toUsers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{na,Tl}from"./chunk-n3t2cd17.js";import"./chunk-yax8wz93.js";import"./chunk-ftk2jdg8.js";export{Tl as createImageHandler,na as handleImageRequest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{sh,wf,Ge,Ga,oh,Qr,es,ts}from"./chunk-3h2e5jte.js";import"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-5s8bt976.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{oh as clearOnceStore,Ga as onceStore,Ge as partialsCache,Qr as processIncludes,es as processStackPushDirectives,ts as processStackReplacements,sh as resetUnscopedSignalWarnings,wf as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Rm,Am,Pm,Im,Om,Nm,Dm}from"./chunk-9hfk5wf1.js";export{Am as createKeepAliveCache,Im as generateKeepAliveCSS,Om as generateKeepAliveRuntime,Nm as onActivated,Dm as onDeactivated,Rm as processKeepAliveDirectives,Pm as shouldCacheComponent};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{V}from"./chunk-9d9rn9qs.js";function n(t){return V(t)}
3
- export{n};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{io,jm,Bm}from"./chunk-ecpr2jsc.js";import"./chunk-vch68zrs.js";import"./chunk-wjtn0ywp.js";import"./chunk-19safa6y.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{Bm as clearComposableCache,jm as getComposableScript,io as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fm,gm,mm,hm,ym,bm}from"./chunk-smpb39kv.js";export{hm as generateTransitionCSS,ym as generateTransitionRuntime,fm as performEnter,gm as performLeave,bm as processTransitionAttributes,mm as processTransitionDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{we,si,oi,Wf,Ot,Dc,ii,Mc,kh,De,hn,Me}from"./chunk-9d9rn9qs.js";import{Hc,s}from"./chunk-dg1h0d9r.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{we as BROWSER_CORE_IMPORTS,Wf as STX_AUTO_IMPORTS,si as extractAndStripCssImports,De as extractBridgeData,Hc as findInterpolationEnd,Mc as generateAutoImportDestructuring,kh as generateBrowserAutoImportDestructuring,hn as generateServerDataBridge,Ot as injectBrowserCoreAutoImports,Me as processClientScript,ii as referencesName,oi as renderVendorStyleTags,s as stripCommentsAndLiterals,Dc as transformAutoImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pa,fa,ga,ma,Jm}from"./chunk-3tg9bsbc.js";import"./chunk-srjhnk6w.js";import"./chunk-vpzadc7t.js";import"./chunk-ftk2jdg8.js";import"./chunk-zpqqdyb4.js";import"./chunk-8x3axvek.js";import"./chunk-02c0zcaw.js";import"./chunk-k4yjbkgb.js";import"./chunk-3h2e5jte.js";import"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-8q8202pj.js";import"./chunk-qeyjbnpn.js";import"./chunk-5s8bt976.js";import"./chunk-we96m579.js";import"./chunk-37j288h1.js";import"./chunk-y1h6z9cy.js";import"./chunk-qeh8f4bk.js";import"./chunk-snfmgp7a.js";import"./chunk-c0v9ng82.js";import"./chunk-mdsrnd6s.js";import"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{pa as buildNative,Jm as default,fa as findCraftBinary,ma as getAvailableFormats,ga as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xf,rs}from"./chunk-tkp7npcj.js";import"./chunk-fmsrzpb4.js";import"./chunk-tary163t.js";import"./chunk-5s8bt976.js";import{vr}from"./chunk-9d9rn9qs.js";import"./chunk-fcp5mde5.js";import"./chunk-r6s35xw9.js";import{nt}from"./chunk-5hrm7rtx.js";import"./chunk-89h4snzd.js";import"./chunk-kyk4ekng.js";export{nt as freeIdentifiers,rs as processComponents,xf as processESImports,vr as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Fe,wn,Ms,di,O,Dt}from"./chunk-r6s35xw9.js";export{wn as currentRuntimeConfig,Dt as injectRuntimeConfig,O as resolveRuntimeConfig,di as useRuntimeConfig,Ms as useServerRuntimeConfig,Fe as withRuntimeConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zs,Ui,Lr,Qs,eo,Tn,Wt,Wi,jr,Br,to,no,Eg,Tg,ut}from"./chunk-p4h5c79q.js";export{ut as DeployError,Ui as calculateSha1,Lr as collectDeployFiles,Br as createDefaultNetlifyConfig,Qs as createFileManifest,Zs as createNetlifyClient,Eg as deploy,jr as detectProjectConfig,eo as filterRequiredFiles,Tn as formatSize,Wi as generateNetlifyToml,Wt as getTotalSize,no as hasNetlifyConfig,Tg as initNetlify,to as writeNetlifyConfig};