@stacksjs/stx 0.2.888 → 0.2.890

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 (260) hide show
  1. package/dist/{chunk-c0g30cjs.js → chunk-05x1rd86.js} +2 -2
  2. package/dist/{chunk-6qq3wy3m.js → chunk-062qfv99.js} +2 -2
  3. package/dist/{chunk-s29hp1qw.js → chunk-0jdz31q1.js} +3 -3
  4. package/dist/{chunk-1kc0jyhj.js → chunk-0jkj8thz.js} +1 -1
  5. package/dist/chunk-0k437z3q.js +2 -0
  6. package/dist/chunk-0q0nbq50.js +2 -0
  7. package/dist/{chunk-5ysv0499.js → chunk-0wp23n1d.js} +1 -1
  8. package/dist/{chunk-9f31gs4m.js → chunk-115bb91s.js} +2 -2
  9. package/dist/chunk-12cjs6vs.js +2 -0
  10. package/dist/chunk-1a7a8cjs.js +2 -0
  11. package/dist/{chunk-wpa3r3b9.js → chunk-1bft48gk.js} +2 -2
  12. package/dist/{chunk-9tecekzq.js → chunk-1jtsr42q.js} +18 -18
  13. package/dist/{chunk-vazk5qbh.js → chunk-1knk403z.js} +2 -2
  14. package/dist/chunk-1p4q6t48.js +2 -0
  15. package/dist/chunk-1ph2yhfn.js +3 -0
  16. package/dist/{chunk-c1b0fy70.js → chunk-1t15z230.js} +5 -5
  17. package/dist/{chunk-2assyczz.js → chunk-1w0bqqh5.js} +2 -2
  18. package/dist/chunk-1z6pqvmf.js +2 -0
  19. package/dist/chunk-2nqmw4dv.js +2 -0
  20. package/dist/{chunk-e9tjxnhn.js → chunk-2xnbdqy4.js} +5 -5
  21. package/dist/chunk-35j7gaj5.js +2 -0
  22. package/dist/chunk-3b3mkgpj.js +3 -0
  23. package/dist/{chunk-7mcs59pr.js → chunk-3bsz7zj3.js} +2 -2
  24. package/dist/{chunk-w624s5jf.js → chunk-3qk8vf9m.js} +3 -3
  25. package/dist/chunk-3yvmaphj.js +2 -0
  26. package/dist/{chunk-mk6thhwf.js → chunk-40k0r6z9.js} +2 -2
  27. package/dist/{chunk-6t04tqvh.js → chunk-41z7f41b.js} +2 -2
  28. package/dist/chunk-44teqn0b.js +2 -0
  29. package/dist/{chunk-372xh1g1.js → chunk-49xwf7dk.js} +6 -6
  30. package/dist/chunk-4akw3bym.js +2 -0
  31. package/dist/chunk-4d85str1.js +2 -0
  32. package/dist/{chunk-whsdyf4t.js → chunk-4eescf3s.js} +7 -7
  33. package/dist/chunk-4xbtxeak.js +2 -0
  34. package/dist/chunk-53kcqdjj.js +2 -0
  35. package/dist/{chunk-1xpq83mc.js → chunk-67j2m620.js} +4 -4
  36. package/dist/chunk-690518hw.js +2 -0
  37. package/dist/chunk-6s3jwysv.js +2 -0
  38. package/dist/{chunk-znnvq1jp.js → chunk-6svc4kb8.js} +65 -65
  39. package/dist/chunk-732gb689.js +2 -0
  40. package/dist/{chunk-ah6nc29h.js → chunk-80ky40mm.js} +2 -2
  41. package/dist/chunk-80xzjxah.js +2 -0
  42. package/dist/chunk-850tye3c.js +2 -0
  43. package/dist/{chunk-b8528fra.js → chunk-8ccgty8s.js} +4 -4
  44. package/dist/{chunk-btsgt6w3.js → chunk-8f8qgjjr.js} +2 -2
  45. package/dist/{chunk-ry6w43p6.js → chunk-8hwfdwgn.js} +6 -6
  46. package/dist/chunk-9344rq4r.js +38 -0
  47. package/dist/chunk-94j4p584.js +2 -0
  48. package/dist/{chunk-y76znqmh.js → chunk-97snfzsy.js} +54 -54
  49. package/dist/chunk-9a9cec4x.js +2 -0
  50. package/dist/chunk-9afkttvz.js +2 -0
  51. package/dist/{chunk-0hj5apb9.js → chunk-9rjgq8k4.js} +1 -1
  52. package/dist/chunk-a0aqs5a8.js +3 -0
  53. package/dist/{chunk-9qrgdekg.js → chunk-a3zrwky3.js} +16 -16
  54. package/dist/{chunk-care745q.js → chunk-a7bqrjm5.js} +2 -2
  55. package/dist/{chunk-pm4kn9h2.js → chunk-adsqckg4.js} +10 -10
  56. package/dist/chunk-ah8az9vv.js +2 -0
  57. package/dist/{chunk-605g9qhp.js → chunk-aj5tsksz.js} +9 -9
  58. package/dist/chunk-amb7e0fp.js +2 -0
  59. package/dist/chunk-arr79m90.js +2 -0
  60. package/dist/{chunk-55kwxxm5.js → chunk-b0hj8eg2.js} +2 -2
  61. package/dist/{chunk-r57jz09p.js → chunk-bgfs3mbg.js} +5 -5
  62. package/dist/chunk-bm0mzk3b.js +2 -0
  63. package/dist/{chunk-ymqm898x.js → chunk-bvqgq18r.js} +2 -2
  64. package/dist/{chunk-wbxmn5gk.js → chunk-bw2m1e7g.js} +5 -5
  65. package/dist/{chunk-wm287dz2.js → chunk-c25q87ys.js} +3 -3
  66. package/dist/{chunk-98mj0es1.js → chunk-ch9028z3.js} +1 -1
  67. package/dist/{chunk-sbwvvjkc.js → chunk-cmg9x1ka.js} +3 -3
  68. package/dist/{chunk-11fxbd71.js → chunk-cphc60zw.js} +2 -2
  69. package/dist/{chunk-dj9ztcth.js → chunk-dvjv4c3a.js} +1 -1
  70. package/dist/{chunk-v8e2c2r1.js → chunk-e16ef18k.js} +2 -2
  71. package/dist/chunk-e28czxw3.js +2 -0
  72. package/dist/chunk-e8szp5wa.js +2 -0
  73. package/dist/chunk-eq86wzhr.js +1314 -0
  74. package/dist/chunk-essd43ad.js +2 -0
  75. package/dist/chunk-f60k8j9m.js +2 -0
  76. package/dist/chunk-fsk3rk2x.js +2 -0
  77. package/dist/{chunk-fce8wj3t.js → chunk-g3vce7ka.js} +2 -2
  78. package/dist/{chunk-em6fqvjy.js → chunk-g5nfqzfh.js} +2 -2
  79. package/dist/chunk-gfea8a9y.js +2 -0
  80. package/dist/chunk-hda7t8g6.js +2 -0
  81. package/dist/chunk-hk241gt2.js +2 -0
  82. package/dist/{chunk-c3ca056p.js → chunk-htx5yezj.js} +2 -2
  83. package/dist/{chunk-b0jekg4c.js → chunk-hxws025y.js} +3 -3
  84. package/dist/chunk-hyyh7qxw.js +25 -0
  85. package/dist/chunk-j6fs31va.js +2 -0
  86. package/dist/chunk-j9kejcrx.js +2 -0
  87. package/dist/chunk-j9vfv53x.js +20 -0
  88. package/dist/chunk-jhbz5w30.js +2 -0
  89. package/dist/chunk-jvnsz2x9.js +2 -0
  90. package/dist/chunk-k4x680e3.js +2 -0
  91. package/dist/chunk-k8bk685s.js +2 -0
  92. package/dist/chunk-kexqmwx8.js +2 -0
  93. package/dist/chunk-kfdmm240.js +2 -0
  94. package/dist/{chunk-fepezvdq.js → chunk-kg7vby72.js} +8 -8
  95. package/dist/{chunk-wf8pdjq5.js → chunk-khm56bfm.js} +1 -1
  96. package/dist/{chunk-303vzq80.js → chunk-kk2p2tgv.js} +3 -3
  97. package/dist/chunk-kpjq135z.js +2 -0
  98. package/dist/chunk-kqsm7gf1.js +2 -0
  99. package/dist/{chunk-j51wss7s.js → chunk-kr2400c3.js} +4 -4
  100. package/dist/{chunk-r8xper92.js → chunk-ksmn19qw.js} +2 -2
  101. package/dist/{chunk-7hm1tpw0.js → chunk-mhrnjaka.js} +6 -6
  102. package/dist/chunk-mtfymhy1.js +2 -0
  103. package/dist/{chunk-52mhrbps.js → chunk-n6q1d66k.js} +1 -1
  104. package/dist/chunk-neg6ckjg.js +12 -0
  105. package/dist/{chunk-wscry63p.js → chunk-nhv81gp2.js} +2 -2
  106. package/dist/{chunk-c73c0wf9.js → chunk-nq60tjkz.js} +2 -2
  107. package/dist/{chunk-v47xc2fr.js → chunk-nzpb263k.js} +9 -9
  108. package/dist/{chunk-p33npqjt.js → chunk-p0bjbtdx.js} +33 -33
  109. package/dist/{chunk-gdtj5rfa.js → chunk-p3hbsrk9.js} +6 -6
  110. package/dist/chunk-p82fzxdg.js +2 -0
  111. package/dist/{chunk-0d7ypcjb.js → chunk-pjj54ddk.js} +3 -3
  112. package/dist/{chunk-qsnpqa8q.js → chunk-pnmafbv5.js} +1 -1
  113. package/dist/{chunk-vgsasnwm.js → chunk-pvm48tse.js} +3 -3
  114. package/dist/{chunk-zek9t5za.js → chunk-pwpge9bj.js} +2 -2
  115. package/dist/{chunk-6zq3eh7d.js → chunk-q0y8gv18.js} +2 -2
  116. package/dist/{chunk-7s3j8pqq.js → chunk-qnf7w4xw.js} +3 -3
  117. package/dist/chunk-qsv84cwm.js +2 -0
  118. package/dist/{chunk-xavx271y.js → chunk-r5ecgcx2.js} +5 -5
  119. package/dist/chunk-r7m60q1m.js +2 -0
  120. package/dist/chunk-r98pye4h.js +2 -0
  121. package/dist/{chunk-zf29ahhd.js → chunk-rb2zbdqd.js} +4 -4
  122. package/dist/{chunk-vjfp8n6p.js → chunk-rd663v1m.js} +3 -3
  123. package/dist/{chunk-4nnmrp7w.js → chunk-rf0smj4c.js} +2 -2
  124. package/dist/{chunk-0dq9svfb.js → chunk-sh7a0g09.js} +3 -3
  125. package/dist/chunk-snkbn5y8.js +2 -0
  126. package/dist/chunk-sztr4d5g.js +2 -0
  127. package/dist/{chunk-4c9p434g.js → chunk-t0ttxayz.js} +2 -2
  128. package/dist/{chunk-5ymf5c8m.js → chunk-t3zmfh8w.js} +7 -7
  129. package/dist/chunk-t4gcsbna.js +2 -0
  130. package/dist/chunk-tbh7r1wh.js +2 -0
  131. package/dist/chunk-tspqdt8e.js +2 -0
  132. package/dist/{chunk-6fsnnj5v.js → chunk-v1mwwben.js} +6 -6
  133. package/dist/chunk-v3jyb8k6.js +2 -0
  134. package/dist/chunk-v6gkjg5f.js +3 -0
  135. package/dist/chunk-v90nz5xm.js +54 -0
  136. package/dist/{chunk-7nhgpjjw.js → chunk-vf4ejngv.js} +6 -6
  137. package/dist/chunk-vfcbz0an.js +3 -0
  138. package/dist/{chunk-hxhmhw23.js → chunk-vk2jy6mn.js} +3 -3
  139. package/dist/{chunk-e1qcfesw.js → chunk-vkfw9k1n.js} +8 -8
  140. package/dist/{chunk-mm1eg2pg.js → chunk-vxbvrbqs.js} +10 -10
  141. package/dist/chunk-wedwczed.js +2 -0
  142. package/dist/chunk-wg6fmren.js +4 -0
  143. package/dist/{chunk-s7wp7a2x.js → chunk-whcrca58.js} +31 -31
  144. package/dist/chunk-wmvvrsn0.js +2 -0
  145. package/dist/chunk-wnrh62by.js +2 -0
  146. package/dist/{chunk-q3bkxg2n.js → chunk-wy6vjz1e.js} +21 -21
  147. package/dist/{chunk-mbm3ma63.js → chunk-x5bn2svk.js} +2 -2
  148. package/dist/chunk-x6565mhk.js +2 -0
  149. package/dist/{chunk-brzjass3.js → chunk-xc5esqcb.js} +2 -2
  150. package/dist/{chunk-e2ws79vt.js → chunk-xeyq6d0t.js} +8 -8
  151. package/dist/{chunk-xw291tn7.js → chunk-xmg6bmh6.js} +27 -22
  152. package/dist/{chunk-3fbgpv1d.js → chunk-xvncq3m5.js} +2 -2
  153. package/dist/chunk-xwgdcc7w.js +2 -0
  154. package/dist/chunk-xwrjre34.js +2 -0
  155. package/dist/{chunk-1wkp3pks.js → chunk-xy8smv5e.js} +2 -2
  156. package/dist/{chunk-y8p59h6c.js → chunk-y1d3j2j7.js} +4 -4
  157. package/dist/{chunk-zje94z0k.js → chunk-yesh4dfe.js} +61 -61
  158. package/dist/chunk-ymc1wgb3.js +2 -0
  159. package/dist/{chunk-xy4j8t7w.js → chunk-ytjn0gq2.js} +2 -2
  160. package/dist/chunk-z4tdnfxd.js +2 -0
  161. package/dist/{chunk-w1q86c89.js → chunk-zf68afyh.js} +3 -3
  162. package/dist/{chunk-6c1vm6bs.js → chunk-zkwkhesc.js} +2 -2
  163. package/dist/{chunk-2rmqmajd.js → chunk-zpqjsnz9.js} +3 -3
  164. package/dist/{chunk-vgr7gd8k.js → chunk-zwqkbk2m.js} +2 -2
  165. package/dist/chunk-zxjdfgdx.js +3 -0
  166. package/dist/cli.js +29 -29
  167. package/dist/component-contract.d.ts +1 -0
  168. package/dist/component-contract.js +6 -4
  169. package/dist/component-library.d.ts +2 -1
  170. package/dist/component-library.js +218 -348
  171. package/dist/composition-api.d.ts +7 -1
  172. package/dist/craft-entry.js +2 -2
  173. package/dist/craft.js +2 -2
  174. package/dist/directive-arguments.js +39 -6
  175. package/dist/emits-declaration.d.ts +9 -0
  176. package/dist/emits-declaration.js +64 -0
  177. package/dist/parser/tokenizer.d.ts +2 -1
  178. package/dist/parser/tokenizer.js +7 -5
  179. package/dist/props-declaration.d.ts +66 -0
  180. package/dist/props-declaration.js +379 -0
  181. package/dist/pwa.js +3 -3
  182. package/dist/ssg.js +28 -28
  183. package/dist/utils.js +20 -109
  184. package/package.json +5 -5
  185. package/dist/chunk-000mwmfq.js +0 -1203
  186. package/dist/chunk-043d0en0.js +0 -2
  187. package/dist/chunk-0w66z6eq.js +0 -2
  188. package/dist/chunk-13wd9gf0.js +0 -3
  189. package/dist/chunk-1znqedae.js +0 -2
  190. package/dist/chunk-2drzzjcm.js +0 -2
  191. package/dist/chunk-3c7nt5qp.js +0 -2
  192. package/dist/chunk-3ed2erm6.js +0 -12
  193. package/dist/chunk-3zyzhcd9.js +0 -2
  194. package/dist/chunk-44rb9fk0.js +0 -2
  195. package/dist/chunk-472j3bhp.js +0 -2
  196. package/dist/chunk-4acce1m8.js +0 -2
  197. package/dist/chunk-4kasmp98.js +0 -2
  198. package/dist/chunk-53kkjn23.js +0 -2
  199. package/dist/chunk-5gwvy612.js +0 -2
  200. package/dist/chunk-61vbqrde.js +0 -2
  201. package/dist/chunk-6fpzwryt.js +0 -2
  202. package/dist/chunk-7195598h.js +0 -2
  203. package/dist/chunk-7zvf79vb.js +0 -2
  204. package/dist/chunk-88a735jw.js +0 -2
  205. package/dist/chunk-8v7yjq3b.js +0 -2
  206. package/dist/chunk-94mpe1ny.js +0 -3
  207. package/dist/chunk-97kgrevs.js +0 -4
  208. package/dist/chunk-a8c9j9cj.js +0 -2
  209. package/dist/chunk-acw851e8.js +0 -2
  210. package/dist/chunk-andfvr3g.js +0 -2
  211. package/dist/chunk-aqxh80vh.js +0 -2
  212. package/dist/chunk-ay5zkfdg.js +0 -2
  213. package/dist/chunk-b4gptdtc.js +0 -2
  214. package/dist/chunk-baaw9w7y.js +0 -2
  215. package/dist/chunk-bw2p9h2g.js +0 -2
  216. package/dist/chunk-ce0vv7kz.js +0 -2
  217. package/dist/chunk-d1yj29g2.js +0 -2
  218. package/dist/chunk-dbhmbef1.js +0 -20
  219. package/dist/chunk-dfsykk1r.js +0 -2
  220. package/dist/chunk-e9p596bp.js +0 -2
  221. package/dist/chunk-edysherg.js +0 -25
  222. package/dist/chunk-ftecsa8e.js +0 -2
  223. package/dist/chunk-ge2h5v46.js +0 -2
  224. package/dist/chunk-gqvnz8a7.js +0 -2
  225. package/dist/chunk-j41gp8p3.js +0 -2
  226. package/dist/chunk-jxvccj30.js +0 -2
  227. package/dist/chunk-k5bbre7d.js +0 -2
  228. package/dist/chunk-kd47vgs8.js +0 -2
  229. package/dist/chunk-keqjafdz.js +0 -2
  230. package/dist/chunk-kvxdyg7e.js +0 -3
  231. package/dist/chunk-kz3mejc4.js +0 -2
  232. package/dist/chunk-ngkh0t5b.js +0 -2
  233. package/dist/chunk-nx9895m6.js +0 -2
  234. package/dist/chunk-nxgtt1t1.js +0 -2
  235. package/dist/chunk-nyw2ztar.js +0 -2
  236. package/dist/chunk-p5q27adr.js +0 -2
  237. package/dist/chunk-p6hcrg3r.js +0 -3
  238. package/dist/chunk-pa2vt2ej.js +0 -2
  239. package/dist/chunk-pczb7xav.js +0 -2
  240. package/dist/chunk-ps37r6hj.js +0 -2
  241. package/dist/chunk-pvbhk17r.js +0 -2
  242. package/dist/chunk-q252qvsy.js +0 -2
  243. package/dist/chunk-q5b0vpmm.js +0 -2
  244. package/dist/chunk-qg1kw5yf.js +0 -2
  245. package/dist/chunk-qjy5yq25.js +0 -54
  246. package/dist/chunk-r561zt9v.js +0 -38
  247. package/dist/chunk-sbr85vda.js +0 -2
  248. package/dist/chunk-tkab24xr.js +0 -2
  249. package/dist/chunk-vn59yrjh.js +0 -2
  250. package/dist/chunk-w50yggy3.js +0 -3
  251. package/dist/chunk-w5zzwe2f.js +0 -2
  252. package/dist/chunk-wa9q1gyv.js +0 -2
  253. package/dist/chunk-wbmx0rge.js +0 -2
  254. package/dist/chunk-wpgxhrd7.js +0 -2
  255. package/dist/chunk-x3azrbpr.js +0 -2
  256. package/dist/chunk-x50hk1hq.js +0 -2
  257. package/dist/chunk-xbkbvfcg.js +0 -2
  258. package/dist/chunk-z55rpt3s.js +0 -3
  259. package/dist/chunk-zwde52kw.js +0 -2
  260. package/dist/chunk-zxff7kq9.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{AsyncLocalStorage as R}from"async_hooks";var b=Symbol.for("stx.runtime-config.scope"),y=globalThis,m=y[b]??=new R;function Ye(n,f){return m.run(n,f)}function Nn(){return m.getStore()}function ao(){let n=m.getStore();if(!n)throw Error("useServerRuntimeConfig requires a server request or template render");return Object.freeze(Object.defineProperty({public:n.public},"private",{value:n.private}))}function Ui(){return ao().public}function F(n={},f=process.env){let s=new Set;function o(e,i){if(i===null)return e===null;if(Array.isArray(i))return Array.isArray(e)&&(!i.length||e.every((r)=>i.some((u)=>o(r,u))));if(typeof i==="object")return e!==null&&typeof e==="object"&&!Array.isArray(e)&&Object.entries(i).every(([r,u])=>Object.hasOwn(e,r)&&o(e[r],u));return typeof e===typeof i}function g(e,i){if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`);let t=Object.create(null);for(let[c,l]of Object.entries(e)){if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(c)||["constructor","prototype","__proto__"].includes(c))throw TypeError(`Invalid runtime config key: ${c}`);t[c]=g(l,[...i,c])}return Object.freeze(t)}let r=`STX_RUNTIME_${i.map((t)=>t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()).join("__")}`;if(s.has(r))throw TypeError(`Ambiguous runtime config environment key: ${r}`);s.add(r);let u=f[r],a=e;if(u!==void 0){try{a=typeof e==="string"?u:JSON.parse(u)}catch{throw TypeError(`Invalid runtime config override: ${r}`)}if(!o(a,e))throw TypeError(`Wrong runtime config override type: ${r}`)}function p(t){if(t===null||typeof t==="string"||typeof t==="boolean")return t;if(typeof t==="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return Object.freeze(t.map(p));if(t&&typeof t==="object"&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null))return Object.freeze(Object.fromEntries(Object.entries(t).map(([c,l])=>[c,p(l)])));throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`)}return p(a)}return Object.freeze({public:g(n.public??{},["public"]),private:g(n.private??{},["private"])})}function C(n){return`<script data-stx-scoped data-stx-runtime-config type="application/json">${JSON.stringify(n.public).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function Gt(n,f){let s=n.replace(/<script\b[^>]*\bdata-stx-runtime-config\b[^>]*>[\s\S]*?<\/script>/gi,""),o=/<head\b[^>]*>/i.exec(s),g=o?o.index+o[0].length:0;return s.slice(0,g)+C(f)+s.slice(g)}
3
- export{Ye,Nn,ao,Ui,F,Gt};
2
+ import{AsyncLocalStorage as R}from"async_hooks";var b=Symbol.for("stx.runtime-config.scope"),y=globalThis,m=y[b]??=new R;function Ze(n,f){return m.run(n,f)}function Mn(){return m.getStore()}function uo(){let n=m.getStore();if(!n)throw Error("useServerRuntimeConfig requires a server request or template render");return Object.freeze(Object.defineProperty({public:n.public},"private",{value:n.private}))}function Ki(){return uo().public}function z(n={},f=process.env){let s=new Set;function o(e,i){if(i===null)return e===null;if(Array.isArray(i))return Array.isArray(e)&&(!i.length||e.every((r)=>i.some((u)=>o(r,u))));if(typeof i==="object")return e!==null&&typeof e==="object"&&!Array.isArray(e)&&Object.entries(i).every(([r,u])=>Object.hasOwn(e,r)&&o(e[r],u));return typeof e===typeof i}function g(e,i){if(e&&typeof e==="object"&&!Array.isArray(e)){if(Object.getPrototypeOf(e)!==Object.prototype&&Object.getPrototypeOf(e)!==null)throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`);let t=Object.create(null);for(let[c,l]of Object.entries(e)){if(!/^[a-zA-Z][a-zA-Z0-9_]*$/.test(c)||["constructor","prototype","__proto__"].includes(c))throw TypeError(`Invalid runtime config key: ${c}`);t[c]=g(l,[...i,c])}return Object.freeze(t)}let r=`STX_RUNTIME_${i.map((t)=>t.replace(/([a-z0-9])([A-Z])/g,"$1_$2").toUpperCase()).join("__")}`;if(s.has(r))throw TypeError(`Ambiguous runtime config environment key: ${r}`);s.add(r);let u=f[r],a=e;if(u!==void 0){try{a=typeof e==="string"?u:JSON.parse(u)}catch{throw TypeError(`Invalid runtime config override: ${r}`)}if(!o(a,e))throw TypeError(`Wrong runtime config override type: ${r}`)}function p(t){if(t===null||typeof t==="string"||typeof t==="boolean")return t;if(typeof t==="number"&&Number.isFinite(t))return t;if(Array.isArray(t))return Object.freeze(t.map(p));if(t&&typeof t==="object"&&(Object.getPrototypeOf(t)===Object.prototype||Object.getPrototypeOf(t)===null))return Object.freeze(Object.fromEntries(Object.entries(t).map(([c,l])=>[c,p(l)])));throw TypeError(`Runtime config ${i.join(".")} must contain JSON values`)}return p(a)}return Object.freeze({public:g(n.public??{},["public"]),private:g(n.private??{},["private"])})}function C(n){return`<script data-stx-scoped data-stx-runtime-config type="application/json">${JSON.stringify(n.public).replace(/</g,"\\u003c").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}</script>`}function Jt(n,f){let s=n.replace(/<script\b[^>]*\bdata-stx-runtime-config\b[^>]*>[\s\S]*?<\/script>/gi,""),o=/<head\b[^>]*>/i.exec(s),g=o?o.index+o[0].length:0;return s.slice(0,g)+C(f)+s.slice(g)}
3
+ export{Ze,Mn,uo,Ki,z,Jt};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Pa,Rm,Mo,Am,pu,fu,Pm,Im}from"./chunk-a3zrwky3.js";import"./chunk-9344rq4r.js";import"./chunk-j9vfv53x.js";import"./chunk-2xnbdqy4.js";import"./chunk-115bb91s.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import{_e,no}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Pa as buildScriptVirtualFile,Rm as buildVirtualSource,_e as extractScriptBlocks,no as extractTemplateExpressions,pu as findRuntimeTypeDeclarations,fu as findStxModuleDeclarations,Im as formatTypecheckDiagnostics,Am as sourcePathFor,Pm as typecheckStxFiles,Mo as virtualPathFor};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{xt,St,kt}from"./chunk-zek9t5za.js";import"./chunk-11fxbd71.js";import"./chunk-hxhmhw23.js";import"./chunk-s29hp1qw.js";import"./chunk-kvxdyg7e.js";import{h}from"./chunk-000mwmfq.js";import"./chunk-xw291tn7.js";import"./chunk-6t04tqvh.js";import"./chunk-fce8wj3t.js";import{tn,vo,nn,ma,vt,ha,xo,rn,ba,sn}from"./chunk-em6fqvjy.js";import M from"fs";import x from"path";function E(t,e){let r=[x.join(t.root,"stx.config.ts"),x.join(t.root,"stx.config.js"),x.join(t.root,"stx.config.mjs")],s=e.debounceMs??300,o=null,a=[];for(let c of r)try{if(!M.existsSync(c))continue;let n=M.watch(c,(d)=>{if(d==="change"){if(o)clearTimeout(o);o=setTimeout(async()=>{ha("Config file changed, restarting...");try{await e.onChange()}catch(p){vt(`Failed to restart: ${p}`)}},s)}});a.push(n)}catch{}return{stop(){if(o)clearTimeout(o);for(let c of a)c.close()}}}import w from"fs";import j from"path";var nt=".stx/story/analytics.json",st=1,A=1e4;class k{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(t){this.storagePath=j.join(t,nt),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let t=w.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:st,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let t=j.dirname(this.storagePath);if(await w.promises.mkdir(t,{recursive:!0}),this.storage.events.length>A)this.storage.events=this.storage.events.slice(-A);await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:at(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(t){this.storage.events.push({...t,timestamp:Date.now()}),this.dirty=!0}trackView(t,e){if(this.endViewTiming(t),this.viewStartTimes.set(t,Date.now()),this.track({type:"view",componentId:t,variantId:e}),this.currentSession&&!this.currentSession.componentViews.includes(t))this.currentSession.componentViews.push(t)}endViewTiming(t){let e=this.viewStartTimes.get(t);if(e){let r=Date.now()-e;this.track({type:"view",componentId:t,metadata:{duration:r,endView:!0}}),this.viewStartTimes.delete(t)}}trackPropChange(t,e,r){this.track({type:"prop_change",componentId:t,propName:e,metadata:{value:r}})}trackVariantSwitch(t,e){this.track({type:"variant_switch",componentId:t,variantId:e})}trackSearch(t,e){this.track({type:"search",query:t,metadata:{resultCount:e}})}getComponentAnalytics(t,e){let r=this.storage.events.filter((i)=>i.componentId===t),s=r.filter((i)=>i.type==="view"&&!i.metadata?.endView),o=r.filter((i)=>i.type==="prop_change"),a=r.filter((i)=>i.type==="variant_switch"),c={};for(let i of o)if(i.propName)c[i.propName]=(c[i.propName]||0)+1;let n={};for(let i of a)if(i.variantId)n[i.variantId]=(n[i.variantId]||0)+1;let d=new Set(this.storage.sessions.filter((i)=>i.componentViews.includes(t)).map((i)=>i.id)),p=r.filter((i)=>i.metadata?.duration).map((i)=>i.metadata.duration),u=p.length>0?p.reduce((i,l)=>i+l,0)/p.length:0,f=Object.entries(c).sort((i,l)=>l[1]-i[1]).slice(0,5).map(([i])=>i);return{componentId:t,componentName:e,viewCount:s.length,uniqueViews:d.size,lastViewed:s[s.length-1]?.timestamp,propChanges:c,topChangedProps:f,variantViews:n,avgTimeSpent:u}}getMostViewedComponents(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="view"&&r.componentId&&!r.metadata?.endView)e.set(r.componentId,(e.get(r.componentId)||0)+1);return Array.from(e.entries()).map(([r,s])=>({componentId:r,viewCount:s})).sort((r,s)=>s.viewCount-r.viewCount).slice(0,t)}getMostChangedProps(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="prop_change"&&r.propName)e.set(r.propName,(e.get(r.propName)||0)+1);return Array.from(e.entries()).map(([r,s])=>({propName:r,changeCount:s})).sort((r,s)=>s.changeCount-r.changeCount).slice(0,t)}getSearchAnalytics(){let t=this.storage.events.filter((o)=>o.type==="search"),e=new Map,r=0;for(let o of t){if(o.query)e.set(o.query,(e.get(o.query)||0)+1);if(o.metadata?.resultCount!==void 0)r+=o.metadata.resultCount}let s=Array.from(e.entries()).map(([o,a])=>({query:o,count:a})).sort((o,a)=>a.count-o.count).slice(0,10);return{totalSearches:t.length,topQueries:s,avgResultCount:t.length>0?r/t.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function at(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";import B from"path";var it=".stx/story/bookmarks.json",ct=1;class P{storage;storagePath;dirty=!1;constructor(t){this.storagePath=B.join(t,it),this.storage=this.loadStorage()}loadStorage(){try{let t=S.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:ct,bookmarks:[]}}}async save(){if(!this.dirty)return;let t=B.dirname(this.storagePath);await S.promises.mkdir(t,{recursive:!0}),await S.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(t,e,r,s={}){let o={id:dt(),name:s.name||`${t}/${e}`,storyId:t,variantId:e,props:r,created:Date.now(),notes:s.notes,color:s.color};return this.storage.bookmarks.push(o),this.dirty=!0,o}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(t){return this.storage.bookmarks.filter((e)=>e.storyId===t)}getBookmark(t){return this.storage.bookmarks.find((e)=>e.id===t)}isBookmarked(t,e){return this.storage.bookmarks.some((r)=>r.storyId===t&&r.variantId===e)}updateBookmark(t,e){let r=this.getBookmark(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deleteBookmark(t){let e=this.storage.bookmarks.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.bookmarks.splice(e,1),this.dirty=!0,!0}toggleBookmark(t,e,r){let s=this.storage.bookmarks.find((a)=>a.storyId===t&&a.variantId===e);if(s)return this.deleteBookmark(s.id),{added:!1};return{added:!0,bookmark:this.addBookmark(t,e,r)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(t,e=!0){let r=JSON.parse(t),s=0;for(let o of r.bookmarks){if(e){let a=this.storage.bookmarks.find((c)=>c.id===o.id);if(a)Object.assign(a,o);else this.storage.bookmarks.push(o)}else this.storage.bookmarks.push(o);s++}if(s>0)this.dirty=!0;return s}}function dt(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var v=new Set;function N(){return{open(t){v.add(t),t.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(t){v.delete(t)},message(t,e){}}}function C(t){let e=JSON.stringify({...t,timestamp:t.timestamp||Date.now()});for(let r of v)try{r.send(e)}catch{v.delete(r)}}function V(t,e){C({type:"story-update",data:{storyId:t,...e}})}function H(t,e){C({type:"story-add",data:{storyId:t,...e}})}function O(t){C({type:"story-remove",data:{storyId:t}})}function F(t){return`
2
+ import{kt,_t,Ct}from"./chunk-pwpge9bj.js";import"./chunk-cphc60zw.js";import"./chunk-vk2jy6mn.js";import"./chunk-0jdz31q1.js";import"./chunk-3b3mkgpj.js";import{y}from"./chunk-eq86wzhr.js";import"./chunk-xmg6bmh6.js";import"./chunk-41z7f41b.js";import"./chunk-g3vce7ka.js";import{nn,ko,rn,ha,St,ya,_o,sn,wa,on}from"./chunk-g5nfqzfh.js";import M from"fs";import x from"path";function E(t,e){let r=[x.join(t.root,"stx.config.ts"),x.join(t.root,"stx.config.js"),x.join(t.root,"stx.config.mjs")],s=e.debounceMs??300,o=null,a=[];for(let c of r)try{if(!M.existsSync(c))continue;let n=M.watch(c,(d)=>{if(d==="change"){if(o)clearTimeout(o);o=setTimeout(async()=>{ya("Config file changed, restarting...");try{await e.onChange()}catch(p){St(`Failed to restart: ${p}`)}},s)}});a.push(n)}catch{}return{stop(){if(o)clearTimeout(o);for(let c of a)c.close()}}}import w from"fs";import j from"path";var nt=".stx/story/analytics.json",st=1,A=1e4;class k{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(t){this.storagePath=j.join(t,nt),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let t=w.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:st,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let t=j.dirname(this.storagePath);if(await w.promises.mkdir(t,{recursive:!0}),this.storage.events.length>A)this.storage.events=this.storage.events.slice(-A);await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:at(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(t){this.storage.events.push({...t,timestamp:Date.now()}),this.dirty=!0}trackView(t,e){if(this.endViewTiming(t),this.viewStartTimes.set(t,Date.now()),this.track({type:"view",componentId:t,variantId:e}),this.currentSession&&!this.currentSession.componentViews.includes(t))this.currentSession.componentViews.push(t)}endViewTiming(t){let e=this.viewStartTimes.get(t);if(e){let r=Date.now()-e;this.track({type:"view",componentId:t,metadata:{duration:r,endView:!0}}),this.viewStartTimes.delete(t)}}trackPropChange(t,e,r){this.track({type:"prop_change",componentId:t,propName:e,metadata:{value:r}})}trackVariantSwitch(t,e){this.track({type:"variant_switch",componentId:t,variantId:e})}trackSearch(t,e){this.track({type:"search",query:t,metadata:{resultCount:e}})}getComponentAnalytics(t,e){let r=this.storage.events.filter((i)=>i.componentId===t),s=r.filter((i)=>i.type==="view"&&!i.metadata?.endView),o=r.filter((i)=>i.type==="prop_change"),a=r.filter((i)=>i.type==="variant_switch"),c={};for(let i of o)if(i.propName)c[i.propName]=(c[i.propName]||0)+1;let n={};for(let i of a)if(i.variantId)n[i.variantId]=(n[i.variantId]||0)+1;let d=new Set(this.storage.sessions.filter((i)=>i.componentViews.includes(t)).map((i)=>i.id)),p=r.filter((i)=>i.metadata?.duration).map((i)=>i.metadata.duration),u=p.length>0?p.reduce((i,l)=>i+l,0)/p.length:0,f=Object.entries(c).sort((i,l)=>l[1]-i[1]).slice(0,5).map(([i])=>i);return{componentId:t,componentName:e,viewCount:s.length,uniqueViews:d.size,lastViewed:s[s.length-1]?.timestamp,propChanges:c,topChangedProps:f,variantViews:n,avgTimeSpent:u}}getMostViewedComponents(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="view"&&r.componentId&&!r.metadata?.endView)e.set(r.componentId,(e.get(r.componentId)||0)+1);return Array.from(e.entries()).map(([r,s])=>({componentId:r,viewCount:s})).sort((r,s)=>s.viewCount-r.viewCount).slice(0,t)}getMostChangedProps(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="prop_change"&&r.propName)e.set(r.propName,(e.get(r.propName)||0)+1);return Array.from(e.entries()).map(([r,s])=>({propName:r,changeCount:s})).sort((r,s)=>s.changeCount-r.changeCount).slice(0,t)}getSearchAnalytics(){let t=this.storage.events.filter((o)=>o.type==="search"),e=new Map,r=0;for(let o of t){if(o.query)e.set(o.query,(e.get(o.query)||0)+1);if(o.metadata?.resultCount!==void 0)r+=o.metadata.resultCount}let s=Array.from(e.entries()).map(([o,a])=>({query:o,count:a})).sort((o,a)=>a.count-o.count).slice(0,10);return{totalSearches:t.length,topQueries:s,avgResultCount:t.length>0?r/t.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function at(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";import B from"path";var it=".stx/story/bookmarks.json",ct=1;class P{storage;storagePath;dirty=!1;constructor(t){this.storagePath=B.join(t,it),this.storage=this.loadStorage()}loadStorage(){try{let t=S.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:ct,bookmarks:[]}}}async save(){if(!this.dirty)return;let t=B.dirname(this.storagePath);await S.promises.mkdir(t,{recursive:!0}),await S.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(t,e,r,s={}){let o={id:dt(),name:s.name||`${t}/${e}`,storyId:t,variantId:e,props:r,created:Date.now(),notes:s.notes,color:s.color};return this.storage.bookmarks.push(o),this.dirty=!0,o}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(t){return this.storage.bookmarks.filter((e)=>e.storyId===t)}getBookmark(t){return this.storage.bookmarks.find((e)=>e.id===t)}isBookmarked(t,e){return this.storage.bookmarks.some((r)=>r.storyId===t&&r.variantId===e)}updateBookmark(t,e){let r=this.getBookmark(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deleteBookmark(t){let e=this.storage.bookmarks.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.bookmarks.splice(e,1),this.dirty=!0,!0}toggleBookmark(t,e,r){let s=this.storage.bookmarks.find((a)=>a.storyId===t&&a.variantId===e);if(s)return this.deleteBookmark(s.id),{added:!1};return{added:!0,bookmark:this.addBookmark(t,e,r)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(t,e=!0){let r=JSON.parse(t),s=0;for(let o of r.bookmarks){if(e){let a=this.storage.bookmarks.find((c)=>c.id===o.id);if(a)Object.assign(a,o);else this.storage.bookmarks.push(o)}else this.storage.bookmarks.push(o);s++}if(s>0)this.dirty=!0;return s}}function dt(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var v=new Set;function N(){return{open(t){v.add(t),t.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(t){v.delete(t)},message(t,e){}}}function C(t){let e=JSON.stringify({...t,timestamp:t.timestamp||Date.now()});for(let r of v)try{r.send(e)}catch{v.delete(r)}}function V(t,e){C({type:"story-update",data:{storyId:t,...e}})}function H(t,e){C({type:"story-add",data:{storyId:t,...e}})}function O(t){C({type:"story-remove",data:{storyId:t}})}function F(t){return`
3
3
  <script>
4
4
  (function() {
5
5
  const ws = new WebSocket('${t}');
@@ -556,9 +556,9 @@ window.__stxPerformance = {
556
556
 
557
557
  window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
558
558
  </script>
559
- `}import T from"fs";import K from"path";var lt=".stx/story/presets.json",R=1,mt=10;class I{storage;storagePath;dirty=!1;constructor(t){this.storagePath=K.join(t,lt),this.storage=this.loadStorage()}loadStorage(){try{let t=T.readFileSync(this.storagePath,"utf-8"),e=JSON.parse(t);if(e.version!==R)return this.migrateStorage(e);return e}catch{return{version:R,presets:[],recentIds:[]}}}migrateStorage(t){return{version:R,presets:t.presets||[],recentIds:t.recentIds||[]}}async save(){if(!this.dirty)return;let t=K.dirname(this.storagePath);await T.promises.mkdir(t,{recursive:!0}),await T.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(t,e,r={}){let s={id:ut(),name:t,description:r.description,props:e,componentId:r.componentId,created:Date.now(),usageCount:0,tags:r.tags};return this.storage.presets.push(s),this.dirty=!0,s}getPreset(t){return this.storage.presets.find((e)=>e.id===t)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(t){return this.storage.presets.filter((e)=>!e.componentId||e.componentId===t)}getRecentPresets(){return this.storage.recentIds.map((t)=>this.getPreset(t)).filter((t)=>t!==void 0)}usePreset(t){let e=this.getPreset(t);if(!e)return;return e.lastUsed=Date.now(),e.usageCount++,this.storage.recentIds=[t,...this.storage.recentIds.filter((r)=>r!==t)].slice(0,mt),this.dirty=!0,e}updatePreset(t,e){let r=this.getPreset(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deletePreset(t){let e=this.storage.presets.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.presets.splice(e,1),this.storage.recentIds=this.storage.recentIds.filter((r)=>r!==t),this.dirty=!0,!0}searchPresets(t){let e=t.toLowerCase();return this.storage.presets.filter((r)=>{if(r.name.toLowerCase().includes(e))return!0;if(r.description?.toLowerCase().includes(e))return!0;if(r.tags?.some((s)=>s.toLowerCase().includes(e)))return!0;return!1})}getMostUsedPresets(t=5){return[...this.storage.presets].sort((e,r)=>r.usageCount-e.usageCount).slice(0,t)}exportPresets(t){let e=t?this.storage.presets.filter((r)=>t.includes(r.id)):this.storage.presets;return JSON.stringify({presets:e},null,2)}importPresets(t,e=!1){let r=JSON.parse(t),s=0;for(let o of r.presets){let a=this.storage.presets.find((c)=>c.id===o.id);if(a&&!e)continue;if(a)Object.assign(a,o);else this.storage.presets.push(o);s++}if(s>0)this.dirty=!0;return s}}function ut(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import _ from"fs";var q=new Map;async function b(t,e,r={}){let s=performance.now(),o=[];try{let a=await _.promises.stat(e),c=q.get(e),n;if(c&&c.mtime===a.mtimeMs)n=c.content;else n=await _.promises.readFile(e,"utf-8"),q.set(e,{content:n,mtime:a.mtimeMs,analyzed:null});let{processDirectives:d}=await import("./chunk-pczb7xav.js"),p={},u=y(n);if(u)try{await h(u,p,e)}catch(g){o.push(`Warning: Could not extract script variables: ${g instanceof Error?g.message:String(g)}`)}if(r.props)Object.assign(p,r.props);let i=await d(n,p,e,{},new Set),l=Z(n),m=y(n);return i=Q(i),i=tt(i,p),{html:i,css:l,js:m,errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}async function gt(t){try{let e=await _.promises.readFile(t,"utf-8"),r=y(e);if(!r)return null;let s={};if(await h(r,s,t),Array.isArray(s.variants))return s.variants;return null}catch{return null}}async function Y(t,e,r,s){let o=e.story?.variants;if(!o){let n=await gt(e.path);if(n)o=n}if(!o&&r==="default")return b(t,e.path,{props:s||{}});if(!o)return b(t,e.path,{props:s||{}});let a=o.find((n)=>n.id===r);if(!a&&r==="default")return b(t,e.path,{props:s||{}});if(!a)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${r}' not found`],duration:0};let c={...a.state,...s};if(a.source)return ft(t,a.source,c);return b(t,e.path,{props:c})}async function ft(t,e,r={}){let s=performance.now(),o=[];try{let{processDirectives:a}=await import("./chunk-pczb7xav.js"),c={...r},n=y(e);if(n)try{await h(n,c,"inline-template.stx")}catch{}let p=await a(e,c,"inline-template.stx",{},new Set);return p=Q(p),p=tt(p,c),{html:p,css:Z(e),js:y(e),errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}function Z(t){let e=[],r=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
560
- `)}function Q(t){return t.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function y(t){let e=[],r=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
561
- `)}function tt(t,e){let r=`<script>window.__stxProps = ${JSON.stringify(e)};</script>`;return t+r}function et(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function rt(t,e){let r=await rn(t);St(t,r);let s=sn(t.config,r);kt(t,s),console.log(` Found ${r.length} story files`);let o=typeof e.host==="string"?e.host:e.host===!0?"0.0.0.0":"localhost",a=new I(t.root),c=new P(t.root),n=new k(t.root),d=N(),p=Bun.serve({port:e.port,hostname:o,fetch:async(i,l)=>{let g=new URL(i.url).pathname;if(g==="/__hmr"){if(l.upgrade(i,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(g.startsWith("/api/"))return yt(t,g,i,{presetsManager:a,bookmarksManager:c,analyticsTracker:n});return ht(t,g,e.port)},websocket:{open(i){d.open(i)},close(i){d.close(i)},message(i,l){d.message(i,l)}}}),u=`http://${o}:${e.port}`,f=ba(t,async(i,l)=>{console.log(` [${i}] ${l.relativePath}`);let m=await rn(t);St(t,m);let g=sn(t.config,m);if(kt(t,g),i==="add")H(l.id,{fileName:l.fileName});else if(i==="unlink")O(l.id);else V(l.id,{fileName:l.fileName})});if(e.open){let i=u;try{let{exec:l}=await import("child_process"),m=process.platform;l(`${m==="darwin"?"open":m==="win32"?"start":"xdg-open"} ${i}`)}catch{}}return{server:p,url:u,close:async()=>{f(),p.stop()}}}async function yt(t,e,r,s){let{presetsManager:o,bookmarksManager:a,analyticsTracker:c}=s;if(e==="/api/stories")return Response.json({files:t.storyFiles.map((n)=>({id:n.id,fileName:n.fileName,relativePath:n.relativePath,treePath:n.treePath})),tree:t.tree});if(e.startsWith("/api/story/")){let n=e.slice(11),d=t.storyFiles.find((p)=>p.id===n);if(!d)return new Response("Story not found",{status:404});try{let p=await Bun.file(d.path).text();return Response.json({id:d.id,fileName:d.fileName,relativePath:d.relativePath,content:p})}catch{return new Response("Error reading story",{status:500})}}if(e==="/api/config")return Response.json({theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets});if(e.startsWith("/api/render/")){let n=new URL(r.url),d=e.slice(12).split("/"),p=d[0],u=d[1]||"default",f,i=n.searchParams.get("props");if(i)try{f=JSON.parse(i)}catch{}let l=t.storyFiles.find((m)=>m.id===p);if(!l)return new Response("Story not found",{status:404});try{let m=await Y(t,l,u,f);return Response.json({html:m.html,css:m.css,js:m.js,errors:m.errors,duration:m.duration})}catch(m){return Response.json({html:"",css:"",js:"",errors:[m instanceof Error?m.message:String(m)],duration:0},{status:500})}}if(e==="/api/presets"&&r.method==="GET")return Response.json({presets:o.getAllPresets()});if(e==="/api/presets"&&r.method==="POST")try{let n=await r.json(),d=o.createPreset(n.name,n.props,{componentId:n.componentId,description:n.description});return await o.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/presets/")&&!e.includes("/use")&&r.method==="GET"){let n=e.slice(13),d=o.getPreset(n);if(!d)return new Response("Preset not found",{status:404});return Response.json(d)}if(e.endsWith("/use")&&r.method==="POST"){let n=e.slice(13,-4),d=o.usePreset(n);if(!d)return new Response("Preset not found",{status:404});return await o.save(),Response.json(d)}if(e.startsWith("/api/presets/")&&r.method==="DELETE"){let n=e.slice(13);if(!o.deletePreset(n))return new Response("Preset not found",{status:404});return await o.save(),Response.json({success:!0})}if(e==="/api/bookmarks"&&r.method==="GET")return Response.json({bookmarks:a.getAllBookmarks()});if(e==="/api/bookmarks"&&r.method==="POST")try{let n=await r.json(),d=a.addBookmark(n.storyId,n.variantId,n.props,{name:n.name,notes:n.notes,color:n.color});return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/bookmarks/toggle"&&r.method==="POST")try{let n=await r.json(),d=a.toggleBookmark(n.storyId,n.variantId,n.props);return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/bookmarks/")&&e!=="/api/bookmarks/toggle"&&r.method==="GET"){let n=e.slice(15),d=a.getBookmark(n);if(!d)return new Response("Bookmark not found",{status:404});return Response.json(d)}if(e.startsWith("/api/bookmarks/")&&r.method==="DELETE"){let n=e.slice(15);if(!a.deleteBookmark(n))return new Response("Bookmark not found",{status:404});return await a.save(),Response.json({success:!0})}if(e==="/api/analytics/track"&&r.method==="POST")try{let n=await r.json();if(n.type==="view"&&n.componentId)c.trackView(n.componentId,n.variantId);else if(n.type==="prop_change"&&n.componentId&&n.propName)c.trackPropChange(n.componentId,n.propName,null);else if(n.type==="variant_switch"&&n.componentId&&n.variantId)c.trackVariantSwitch(n.componentId,n.variantId);else if(n.type==="search"&&n.query)c.trackSearch(n.query,0);return await c.save(),Response.json({success:!0})}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/analytics/summary"&&r.method==="GET")return Response.json({mostViewed:c.getMostViewedComponents(10),mostChangedProps:c.getMostChangedProps(10),searchAnalytics:c.getSearchAnalytics()});if(e.startsWith("/api/analytics/component/")&&r.method==="GET"){let n=e.slice(25),d=t.storyFiles.find((u)=>u.id===n),p=c.getComponentAnalytics(n,d?.fileName||n);return Response.json(p)}return new Response("Not found",{status:404})}function ht(t,e,r){let s=bt(t,r);return new Response(s,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function bt(t,e){let{theme:r}=t.config,s=r.title||"STX Story",o=`ws://localhost:${e}/__hmr`,a=F(o);return`<!DOCTYPE html>
559
+ `}import T from"fs";import K from"path";var lt=".stx/story/presets.json",R=1,mt=10;class I{storage;storagePath;dirty=!1;constructor(t){this.storagePath=K.join(t,lt),this.storage=this.loadStorage()}loadStorage(){try{let t=T.readFileSync(this.storagePath,"utf-8"),e=JSON.parse(t);if(e.version!==R)return this.migrateStorage(e);return e}catch{return{version:R,presets:[],recentIds:[]}}}migrateStorage(t){return{version:R,presets:t.presets||[],recentIds:t.recentIds||[]}}async save(){if(!this.dirty)return;let t=K.dirname(this.storagePath);await T.promises.mkdir(t,{recursive:!0}),await T.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(t,e,r={}){let s={id:ut(),name:t,description:r.description,props:e,componentId:r.componentId,created:Date.now(),usageCount:0,tags:r.tags};return this.storage.presets.push(s),this.dirty=!0,s}getPreset(t){return this.storage.presets.find((e)=>e.id===t)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(t){return this.storage.presets.filter((e)=>!e.componentId||e.componentId===t)}getRecentPresets(){return this.storage.recentIds.map((t)=>this.getPreset(t)).filter((t)=>t!==void 0)}usePreset(t){let e=this.getPreset(t);if(!e)return;return e.lastUsed=Date.now(),e.usageCount++,this.storage.recentIds=[t,...this.storage.recentIds.filter((r)=>r!==t)].slice(0,mt),this.dirty=!0,e}updatePreset(t,e){let r=this.getPreset(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deletePreset(t){let e=this.storage.presets.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.presets.splice(e,1),this.storage.recentIds=this.storage.recentIds.filter((r)=>r!==t),this.dirty=!0,!0}searchPresets(t){let e=t.toLowerCase();return this.storage.presets.filter((r)=>{if(r.name.toLowerCase().includes(e))return!0;if(r.description?.toLowerCase().includes(e))return!0;if(r.tags?.some((s)=>s.toLowerCase().includes(e)))return!0;return!1})}getMostUsedPresets(t=5){return[...this.storage.presets].sort((e,r)=>r.usageCount-e.usageCount).slice(0,t)}exportPresets(t){let e=t?this.storage.presets.filter((r)=>t.includes(r.id)):this.storage.presets;return JSON.stringify({presets:e},null,2)}importPresets(t,e=!1){let r=JSON.parse(t),s=0;for(let o of r.presets){let a=this.storage.presets.find((c)=>c.id===o.id);if(a&&!e)continue;if(a)Object.assign(a,o);else this.storage.presets.push(o);s++}if(s>0)this.dirty=!0;return s}}function ut(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import _ from"fs";var q=new Map;async function b(t,e,r={}){let s=performance.now(),o=[];try{let a=await _.promises.stat(e),c=q.get(e),n;if(c&&c.mtime===a.mtimeMs)n=c.content;else n=await _.promises.readFile(e,"utf-8"),q.set(e,{content:n,mtime:a.mtimeMs,analyzed:null});let{processDirectives:d}=await import("./chunk-kpjq135z.js"),p={},u=h(n);if(u)try{await y(u,p,e)}catch(g){o.push(`Warning: Could not extract script variables: ${g instanceof Error?g.message:String(g)}`)}if(r.props)Object.assign(p,r.props);let i=await d(n,p,e,{},new Set),l=Z(n),m=h(n);return i=Q(i),i=tt(i,p),{html:i,css:l,js:m,errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}async function gt(t){try{let e=await _.promises.readFile(t,"utf-8"),r=h(e);if(!r)return null;let s={};if(await y(r,s,t),Array.isArray(s.variants))return s.variants;return null}catch{return null}}async function Y(t,e,r,s){let o=e.story?.variants;if(!o){let n=await gt(e.path);if(n)o=n}if(!o&&r==="default")return b(t,e.path,{props:s||{}});if(!o)return b(t,e.path,{props:s||{}});let a=o.find((n)=>n.id===r);if(!a&&r==="default")return b(t,e.path,{props:s||{}});if(!a)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${r}' not found`],duration:0};let c={...a.state,...s};if(a.source)return ft(t,a.source,c);return b(t,e.path,{props:c})}async function ft(t,e,r={}){let s=performance.now(),o=[];try{let{processDirectives:a}=await import("./chunk-kpjq135z.js"),c={...r},n=h(e);if(n)try{await y(n,c,"inline-template.stx")}catch{}let p=await a(e,c,"inline-template.stx",{},new Set);return p=Q(p),p=tt(p,c),{html:p,css:Z(e),js:h(e),errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}function Z(t){let e=[],r=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
560
+ `)}function Q(t){return t.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function h(t){let e=[],r=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
561
+ `)}function tt(t,e){let r=`<script>window.__stxProps = ${JSON.stringify(e)};</script>`;return t+r}function et(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function rt(t,e){let r=await sn(t);_t(t,r);let s=on(t.config,r);Ct(t,s),console.log(` Found ${r.length} story files`);let o=typeof e.host==="string"?e.host:e.host===!0?"0.0.0.0":"localhost",a=new I(t.root),c=new P(t.root),n=new k(t.root),d=N(),p=Bun.serve({port:e.port,hostname:o,fetch:async(i,l)=>{let g=new URL(i.url).pathname;if(g==="/__hmr"){if(l.upgrade(i,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(g.startsWith("/api/"))return yt(t,g,i,{presetsManager:a,bookmarksManager:c,analyticsTracker:n});return ht(t,g,e.port)},websocket:{open(i){d.open(i)},close(i){d.close(i)},message(i,l){d.message(i,l)}}}),u=`http://${o}:${e.port}`,f=wa(t,async(i,l)=>{console.log(` [${i}] ${l.relativePath}`);let m=await sn(t);_t(t,m);let g=on(t.config,m);if(Ct(t,g),i==="add")H(l.id,{fileName:l.fileName});else if(i==="unlink")O(l.id);else V(l.id,{fileName:l.fileName})});if(e.open){let i=u;try{let{exec:l}=await import("child_process"),m=process.platform;l(`${m==="darwin"?"open":m==="win32"?"start":"xdg-open"} ${i}`)}catch{}}return{server:p,url:u,close:async()=>{f(),p.stop()}}}async function yt(t,e,r,s){let{presetsManager:o,bookmarksManager:a,analyticsTracker:c}=s;if(e==="/api/stories")return Response.json({files:t.storyFiles.map((n)=>({id:n.id,fileName:n.fileName,relativePath:n.relativePath,treePath:n.treePath})),tree:t.tree});if(e.startsWith("/api/story/")){let n=e.slice(11),d=t.storyFiles.find((p)=>p.id===n);if(!d)return new Response("Story not found",{status:404});try{let p=await Bun.file(d.path).text();return Response.json({id:d.id,fileName:d.fileName,relativePath:d.relativePath,content:p})}catch{return new Response("Error reading story",{status:500})}}if(e==="/api/config")return Response.json({theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets});if(e.startsWith("/api/render/")){let n=new URL(r.url),d=e.slice(12).split("/"),p=d[0],u=d[1]||"default",f,i=n.searchParams.get("props");if(i)try{f=JSON.parse(i)}catch{}let l=t.storyFiles.find((m)=>m.id===p);if(!l)return new Response("Story not found",{status:404});try{let m=await Y(t,l,u,f);return Response.json({html:m.html,css:m.css,js:m.js,errors:m.errors,duration:m.duration})}catch(m){return Response.json({html:"",css:"",js:"",errors:[m instanceof Error?m.message:String(m)],duration:0},{status:500})}}if(e==="/api/presets"&&r.method==="GET")return Response.json({presets:o.getAllPresets()});if(e==="/api/presets"&&r.method==="POST")try{let n=await r.json(),d=o.createPreset(n.name,n.props,{componentId:n.componentId,description:n.description});return await o.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/presets/")&&!e.includes("/use")&&r.method==="GET"){let n=e.slice(13),d=o.getPreset(n);if(!d)return new Response("Preset not found",{status:404});return Response.json(d)}if(e.endsWith("/use")&&r.method==="POST"){let n=e.slice(13,-4),d=o.usePreset(n);if(!d)return new Response("Preset not found",{status:404});return await o.save(),Response.json(d)}if(e.startsWith("/api/presets/")&&r.method==="DELETE"){let n=e.slice(13);if(!o.deletePreset(n))return new Response("Preset not found",{status:404});return await o.save(),Response.json({success:!0})}if(e==="/api/bookmarks"&&r.method==="GET")return Response.json({bookmarks:a.getAllBookmarks()});if(e==="/api/bookmarks"&&r.method==="POST")try{let n=await r.json(),d=a.addBookmark(n.storyId,n.variantId,n.props,{name:n.name,notes:n.notes,color:n.color});return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/bookmarks/toggle"&&r.method==="POST")try{let n=await r.json(),d=a.toggleBookmark(n.storyId,n.variantId,n.props);return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/bookmarks/")&&e!=="/api/bookmarks/toggle"&&r.method==="GET"){let n=e.slice(15),d=a.getBookmark(n);if(!d)return new Response("Bookmark not found",{status:404});return Response.json(d)}if(e.startsWith("/api/bookmarks/")&&r.method==="DELETE"){let n=e.slice(15);if(!a.deleteBookmark(n))return new Response("Bookmark not found",{status:404});return await a.save(),Response.json({success:!0})}if(e==="/api/analytics/track"&&r.method==="POST")try{let n=await r.json();if(n.type==="view"&&n.componentId)c.trackView(n.componentId,n.variantId);else if(n.type==="prop_change"&&n.componentId&&n.propName)c.trackPropChange(n.componentId,n.propName,null);else if(n.type==="variant_switch"&&n.componentId&&n.variantId)c.trackVariantSwitch(n.componentId,n.variantId);else if(n.type==="search"&&n.query)c.trackSearch(n.query,0);return await c.save(),Response.json({success:!0})}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/analytics/summary"&&r.method==="GET")return Response.json({mostViewed:c.getMostViewedComponents(10),mostChangedProps:c.getMostChangedProps(10),searchAnalytics:c.getSearchAnalytics()});if(e.startsWith("/api/analytics/component/")&&r.method==="GET"){let n=e.slice(25),d=t.storyFiles.find((u)=>u.id===n),p=c.getComponentAnalytics(n,d?.fileName||n);return Response.json(p)}return new Response("Not found",{status:404})}function ht(t,e,r){let s=vt(t,r);return new Response(s,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function vt(t,e){let{theme:r}=t.config,s=r.title||"STX Story",o=`ws://localhost:${e}/__hmr`,a=F(o);return`<!DOCTYPE html>
562
562
  <html lang="en" class="${r.darkClass||"dark"}">
563
563
  <head>
564
564
  <meta charset="UTF-8">
@@ -1276,5 +1276,5 @@ else {
1276
1276
  <style>${W()}</style>
1277
1277
  ${D()}
1278
1278
  </body>
1279
- </html>`}import wt from"fs";import Pt from"path";var Ct=new Map,Tt=[],Rt=[],It=new Map;async function ot(t){let e=t.config.setupFile;if(!e)return;let r=Pt.resolve(t.root,e);try{await wt.promises.access(r)}catch{return}let s={storyContext:t,registerComponent:(o,a)=>{Ct.set(o,a)},addCSS:(o)=>{Tt.push(o)},addScript:(o)=>{Rt.push(o)},setState:(o,a)=>{It.set(o,a)}};try{let o=await import(r);if(typeof o.default==="function")await o.default(s);else if(typeof o.setupStory==="function")await o.setupStory(s)}catch(o){console.warn(`Warning: Failed to load setup file: ${o}`)}}async function he(t={}){tn();let e=await xt({mode:"dev"});if(!e.config.enabled){vt("Story feature is disabled in config.");return}await ot(e);let r=t.port??e.config.port,s,o=async()=>{s=await rt(e,{port:r,open:t.open,host:t.host}),nn(e.storyFiles.length),vo(s.url),xo()};await o();let a=E(e,{onChange:async()=>{await s.close();let n=await xt({mode:"dev"});Object.assign(e,n),await o()}}),c=async()=>{console.log(`
1280
- `),a.stop(),await s.close(),process.exit(0)};if(process.on("SIGINT",c),process.on("SIGTERM",c),process.stdin.isTTY)process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("data",async(n)=>{switch(n.toString()){case"h":xo();break;case"o":try{let{exec:p}=await import("child_process"),u=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";p(`${u} ${s.url}`)}catch{ma("Failed to open browser")}break;case"r":await s.close(),await o();break;case"c":console.clear(),tn(),nn(e.storyFiles.length),vo(s.url);break;case"q":case"\x03":await c();break}});await new Promise(()=>{})}export{he as devCommand};
1279
+ </html>`}import bt from"fs";import xt from"path";var wt=new Map,Pt=[],Tt=[],Rt=new Map;async function ot(t){let e=t.config.setupFile;if(!e)return;let r=xt.resolve(t.root,e);try{await bt.promises.access(r)}catch{return}let s={storyContext:t,registerComponent:(o,a)=>{wt.set(o,a)},addCSS:(o)=>{Pt.push(o)},addScript:(o)=>{Tt.push(o)},setState:(o,a)=>{Rt.set(o,a)}};try{let o=await import(r);if(typeof o.default==="function")await o.default(s);else if(typeof o.setupStory==="function")await o.setupStory(s)}catch(o){console.warn(`Warning: Failed to load setup file: ${o}`)}}async function he(t={}){nn();let e=await kt({mode:"dev"});if(!e.config.enabled){St("Story feature is disabled in config.");return}await ot(e);let r=t.port??e.config.port,s,o=async()=>{s=await rt(e,{port:r,open:t.open,host:t.host}),rn(e.storyFiles.length),ko(s.url),_o()};await o();let a=E(e,{onChange:async()=>{await s.close();let n=await kt({mode:"dev"});Object.assign(e,n),await o()}}),c=async()=>{console.log(`
1280
+ `),a.stop(),await s.close(),process.exit(0)};if(process.on("SIGINT",c),process.on("SIGTERM",c),process.stdin.isTTY)process.stdin.setRawMode(!0),process.stdin.resume(),process.stdin.on("data",async(n)=>{switch(n.toString()){case"h":_o();break;case"o":try{let{exec:p}=await import("child_process"),u=process.platform==="darwin"?"open":process.platform==="win32"?"start":"xdg-open";p(`${u} ${s.url}`)}catch{ha("Failed to open browser")}break;case"r":await s.close(),await o();break;case"c":console.clear(),nn(),rn(e.storyFiles.length),ko(s.url);break;case"q":case"\x03":await c();break}});await new Promise(()=>{})}export{he as devCommand};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ia,aa,ca,cm,lm,um,Zl,dm,pm}from"./chunk-ch9028z3.js";export{ia as ImageProcessorCache,Zl as applyTransformations,cm as clearImageCache,dm as generateResponsiveVariants,pm as generateSrcset,aa as getCachedImageResult,um as optimizeImage,lm as processImage,ca as setCachedImageResult};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ao,Ea,is,Po,Io,Un,an,Ta,as,cs,Oo,No,Em,Tm,Et}from"./chunk-aj5tsksz.js";export{Et as DeployError,Ea as calculateSha1,is as collectDeployFiles,cs as createDefaultNetlifyConfig,Po as createFileManifest,Ao as createNetlifyClient,Em as deploy,as as detectProjectConfig,Io as filterRequiredFiles,Un as formatSize,Ta as generateNetlifyToml,an as getTotalSize,No as hasNetlifyConfig,Tm as initNetlify,Oo as writeNetlifyConfig};
@@ -1,7 +1,7 @@
1
1
  // @bun
2
- import{h,y,g}from"./chunk-000mwmfq.js";import{W}from"./chunk-zje94z0k.js";import{i}from"./chunk-znnvq1jp.js";import k from"path";var q={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},T=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var M=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function H(e){let t=[],o=0,n;M.lastIndex=0;while((n=M.exec(e))!==null){if(n.index>o){let a=e.slice(o,n.index);if(a.trim())t.push({type:t.length===0?"shell":"content",content:a})}let s=n[1],r=n[2];t.push({type:"suspense",name:s,content:r}),o=n.index+n[0].length}if(o<e.length){let s=e.slice(o);if(s.trim())t.push({type:t.length===0?"shell":"content",content:s})}if(t.length===0)t.push({type:"shell",content:e});return t}async function uh(e,t={},o={}){let n={...W,...o,streaming:{...q,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),S=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),p=S?S[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),f={...t,__filename:e,__dirname:k.dirname(e)};if(p.trim())await h(p,f,e);let E=H(c),l=new Set;if(!E.some((w)=>w.type==="suspense")){let w=n.streaming?.strategy||"auto",x=new RegExp(T.source,"g");if(!(w!=="manual"&&x.test(c))){let u=await i(c,f,e,n,l);for(let b=0;b<u.length;b+=s)r.enqueue(u.slice(b,b+s)),await new Promise((m)=>setTimeout(m,0))}else{let u=[],b=new RegExp(T.source,"g"),m;while((m=b.exec(c))!==null)u.push({name:m[1],content:m[2],start:m.index,end:m.index+m[0].length});let v=0;for(let _ of u){if(_.start>v){let I=c.slice(v,_.start);if(I.trim()){let O=await i(I,f,e,n,l);r.enqueue(O),await new Promise((D)=>setTimeout(D,0))}}let C=await i(_.content,f,e,n,l);r.enqueue(C),await new Promise((I)=>setTimeout(I,0)),v=_.end}if(v<c.length){let _=c.slice(v);if(_.trim()){let C=await i(_,f,e,n,l);r.enqueue(C)}}}}else{let w=new Map;for(let d of E)if(d.type==="shell"||d.type==="content"){let u=await i(d.content,f,e,n,l);r.enqueue(u)}else if(d.type==="suspense"&&d.name){let u=`stx-suspense-${d.name}`;r.enqueue(`<div id="${u}" data-suspense="${d.name}" style="display:contents;">
2
+ import{y,b,g}from"./chunk-eq86wzhr.js";import{q}from"./chunk-yesh4dfe.js";import{i}from"./chunk-6svc4kb8.js";import k from"path";var M={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},T=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var O=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function z(e){let t=[],o=0,n;O.lastIndex=0;while((n=O.exec(e))!==null){if(n.index>o){let a=e.slice(o,n.index);if(a.trim())t.push({type:t.length===0?"shell":"content",content:a})}let s=n[1],r=n[2];t.push({type:"suspense",name:s,content:r}),o=n.index+n[0].length}if(o<e.length){let s=e.slice(o);if(s.trim())t.push({type:t.length===0?"shell":"content",content:s})}if(t.length===0)t.push({type:"shell",content:e});return t}async function dh(e,t={},o={}){let n={...q,...o,streaming:{...M,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),w=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),p=w?w[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),f={...t,__filename:e,__dirname:k.dirname(e)};if(p.trim())await y(p,f,e);let E=z(c),l=new Set;if(!E.some((h)=>h.type==="suspense")){let h=n.streaming?.strategy||"auto",S=new RegExp(T.source,"g");if(!(h!=="manual"&&S.test(c))){let u=await i(c,f,e,n,l);for(let x=0;x<u.length;x+=s)r.enqueue(u.slice(x,x+s)),await new Promise((m)=>setTimeout(m,0))}else{let u=[],x=new RegExp(T.source,"g"),m;while((m=x.exec(c))!==null)u.push({name:m[1],content:m[2],start:m.index,end:m.index+m[0].length});let v=0;for(let _ of u){if(_.start>v){let I=c.slice(v,_.start);if(I.trim()){let D=await i(I,f,e,n,l);r.enqueue(D),await new Promise((H)=>setTimeout(H,0))}}let C=await i(_.content,f,e,n,l);r.enqueue(C),await new Promise((I)=>setTimeout(I,0)),v=_.end}if(v<c.length){let _=c.slice(v);if(_.trim()){let C=await i(_,f,e,n,l);r.enqueue(C)}}}}else{let h=new Map;for(let d of E)if(d.type==="shell"||d.type==="content"){let u=await i(d.content,f,e,n,l);r.enqueue(u)}else if(d.type==="suspense"&&d.name){let u=`stx-suspense-${d.name}`;r.enqueue(`<div id="${u}" data-suspense="${d.name}" style="display:contents;">
3
3
  <template data-suspense-fallback>Loading...</template>
4
- </div>`),w.set(d.name,i(d.content,f,e,n,l))}r.enqueue(`
4
+ </div>`),h.set(d.name,i(d.content,f,e,n,l))}r.enqueue(`
5
5
  <script>
6
6
  (function() {
7
7
  window.__stxSuspense = window.__stxSuspense || {
@@ -17,13 +17,13 @@ import{h,y,g}from"./chunk-000mwmfq.js";import{W}from"./chunk-zje94z0k.js";import
17
17
  }
18
18
  };
19
19
  })();
20
- </script>`);let x=Array.from(w.entries()).map(async([d,u])=>{r.enqueue(await Ha(d,u))});await Promise.all(x)}r.close()}catch(a){r.error(a)}}})}async function Ha(e,t){try{let n=(await t).replace(/`/g,"\\`").replace(/<\/script>/gi,"<\\/script>");return`
20
+ </script>`);let S=Array.from(h.entries()).map(async([d,u])=>{r.enqueue(await Va(d,u))});await Promise.all(S)}r.close()}catch(a){r.error(a)}}})}async function Va(e,t){try{let n=(await t).replace(/`/g,"\\`").replace(/<\/script>/gi,"<\\/script>");return`
21
21
  <script>
22
22
  window.__stxSuspense.resolve('${e}', \`${n}\`);
23
23
  </script>`}catch(o){let n=o instanceof Error?o.message:String(o);return`
24
24
  <script>
25
25
  window.__stxSuspense.resolve('${e}', '<div class="stx-error">Error loading content: ${g(n)}</div>');
26
- </script>`}}var ju=`
26
+ </script>`}}var Bu=`
27
27
  <script>
28
28
  (function(){
29
29
  window.__stxSuspense = window.__stxSuspense || {
@@ -43,12 +43,12 @@ window.__stxSuspense.resolve('${e}', '<div class="stx-error">Error loading conte
43
43
  }
44
44
  };
45
45
  })();
46
- </script>`;function z(e,t,o){if(!t||t<=0)return e;let n,s=new Promise((r,a)=>{n=setTimeout(()=>a(Error(`streaming boundary "${o}" timed out after ${t}ms`)),t)});return Promise.race([e,s]).finally(()=>clearTimeout(n))}function dh(e,t=[],o={}){let n=o.timeoutMs??0;return new ReadableStream({async start(s){try{if(s.enqueue(e),t.length>0)s.enqueue(ju),await Promise.all(t.map(async(r)=>{let a=z(r.render(),n,r.id);s.enqueue(await Ha(r.id,a))}));s.close()}catch(r){s.error(r)}}})}var A=/@stream\s*\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)@endstream/gi;function ph(e,t){return e.replace(A,(o,n,s)=>{let r=n.trim(),a=s.split(/@fallback/i),S=a[0].trim(),p=a.length>1?a.slice(1).join("@fallback").trim():"";if(!t.__streamTemplates)t.__streamTemplates={};return t.__streamTemplates[r]=S,`<div data-suspense="${r}">${p}</div>`})}function fh(e){let t=e?.streamBoundaries;if(!t||typeof t!=="object")return;let o=Object.entries(t).filter(([,n])=>typeof n==="function");return o.length>0?o.map(([n,s])=>({id:n,render:s})):void 0}async function gh(e,t={},o={}){let n={...W,...o,streaming:{...q,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),S=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),p=S?S[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),f={...t,__filename:e,__dirname:k.dirname(e)};if(p.trim())await h(p,f,e);let E=new Set,l=n.streaming?.strategy||"auto",R=new RegExp(T.source,"g");if(!(l!=="manual"&&R.test(c))){let x=await i(c,f,e,n,E);for(let d=0;d<x.length;d+=s)r.enqueue(x.slice(d,d+s))}else{let x=[],d=new RegExp(T.source,"g"),u;while((u=d.exec(c))!==null)x.push({name:u[1],content:u[2],start:u.index,end:u.index+u[0].length});let b=0;for(let m of x){if(m.start>b){let _=c.slice(b,m.start);if(_.trim()){let C=await i(_,f,e,n,E);r.enqueue(C)}}let v=await i(m.content,f,e,n,E);r.enqueue(v),b=m.end}if(b<c.length){let m=c.slice(b);if(m.trim()){let v=await i(m,f,e,n,E);r.enqueue(v)}}}r.close()}catch(a){r.error(a)}}})}async function mh(e,t={}){let o={...W,...t,streaming:{...q,...t.streaming}},n=await Bun.file(e).text(),s=n.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),r=s?s[1]:"",a=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),S=a,p={},c;T.lastIndex=0;while((c=T.exec(a))!==null){let l=c[1],R=c[2];p[l]=R}let f=a.replace(T,"");return{renderShell:async(l={})=>{let R={...l,__filename:e,__dirname:k.dirname(e)};return await h(r,R,e),i(f,R,e,o,new Set)},renderSection:async(l,R={})=>{try{if(!p[l])return`<div class="error-message">Section "${g(l)}" not found in template "${g(e)}"</div>`;let w={...R,__filename:e,__dirname:k.dirname(e)};await h(r,w,e);let x=new Set;return await i(p[l],w,e,o,x)}catch(w){let x=w instanceof Error?w.message:String(w);return y("Expression",x,e,p[l]||"",0,p[l]||"")}},getSections:()=>Object.keys(p),getTemplate:()=>S}}var Bu={name:"suspense",hasEndTag:!0,handler:(e,t,o,n)=>{if(!t||t.length===0)throw Error("Suspense directive requires a name parameter");let s=t[0].replace(/['"`]/g,"");return`<!-- @suspense:${s} -->${e}<!-- @endsuspense:${s} -->`}},Fu={name:"island",hasEndTag:!0,handler:(e,t,o,n)=>{if(!t||t.length===0)throw Error("Island directive requires a name parameter");let s=t[0].replace(/['"`]/g,""),r=t[1]?t[1].replace(/['"`]/g,""):"lazy",a=`island-${s}-${Math.random().toString(36).substring(2,9)}`,S=e.match(/<script\s+props\s*>([\s\S]*?)<\/script>/i),p=S?S[1].trim():"",c=S?e.replace(S[0],""):e;return`<div data-island="${s}" data-island-id="${a}" data-priority="${r}">
46
+ </script>`;function A(e,t,o){if(!t||t<=0)return e;let n,s=new Promise((r,a)=>{n=setTimeout(()=>a(Error(`streaming boundary "${o}" timed out after ${t}ms`)),t)});return Promise.race([e,s]).finally(()=>clearTimeout(n))}function ph(e,t=[],o={}){let n=o.timeoutMs??0;return new ReadableStream({async start(s){try{if(s.enqueue(e),t.length>0)s.enqueue(Bu),await Promise.all(t.map(async(r)=>{let a=A(r.render(),n,r.id);s.enqueue(await Va(r.id,a))}));s.close()}catch(r){s.error(r)}}})}var B=/@stream\s*\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)@endstream/gi;function fh(e,t){return e.replace(B,(o,n,s)=>{let r=n.trim(),a=s.split(/@fallback/i),w=a[0].trim(),p=a.length>1?a.slice(1).join("@fallback").trim():"";if(!t.__streamTemplates)t.__streamTemplates={};return t.__streamTemplates[r]=w,`<div data-suspense="${r}">${p}</div>`})}function gh(e){let t=e?.streamBoundaries;if(!t||typeof t!=="object")return;let o=Object.entries(t).filter(([,n])=>typeof n==="function");return o.length>0?o.map(([n,s])=>({id:n,render:s})):void 0}async function mh(e,t={},o={}){let n={...q,...o,streaming:{...M,...o.streaming}},s=n.streaming?.bufferSize||16384;return new ReadableStream({async start(r){try{let a=await Bun.file(e).text(),w=a.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),p=w?w[1]:"",c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),f={...t,__filename:e,__dirname:k.dirname(e)};if(p.trim())await y(p,f,e);let E=new Set,l=n.streaming?.strategy||"auto",R=new RegExp(T.source,"g");if(!(l!=="manual"&&R.test(c))){let S=await i(c,f,e,n,E);for(let d=0;d<S.length;d+=s)r.enqueue(S.slice(d,d+s))}else{let S=[],d=new RegExp(T.source,"g"),u;while((u=d.exec(c))!==null)S.push({name:u[1],content:u[2],start:u.index,end:u.index+u[0].length});let x=0;for(let m of S){if(m.start>x){let _=c.slice(x,m.start);if(_.trim()){let C=await i(_,f,e,n,E);r.enqueue(C)}}let v=await i(m.content,f,e,n,E);r.enqueue(v),x=m.end}if(x<c.length){let m=c.slice(x);if(m.trim()){let v=await i(m,f,e,n,E);r.enqueue(v)}}}r.close()}catch(a){r.error(a)}}})}async function hh(e,t={}){let o={...q,...t,streaming:{...M,...t.streaming}},n=await Bun.file(e).text(),s=n.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),r=s?s[1]:"",a=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),w=a,p={},c;T.lastIndex=0;while((c=T.exec(a))!==null){let l=c[1],R=c[2];p[l]=R}let f=a.replace(T,"");return{renderShell:async(l={})=>{let R={...l,__filename:e,__dirname:k.dirname(e)};return await y(r,R,e),i(f,R,e,o,new Set)},renderSection:async(l,R={})=>{try{if(!p[l])return`<div class="error-message">Section "${g(l)}" not found in template "${g(e)}"</div>`;let h={...R,__filename:e,__dirname:k.dirname(e)};await y(r,h,e);let S=new Set;return await i(p[l],h,e,o,S)}catch(h){let S=h instanceof Error?h.message:String(h);return b("Expression",S,e,p[l]||"",0,p[l]||"")}},getSections:()=>Object.keys(p),getTemplate:()=>w}}var Fu={name:"suspense",hasEndTag:!0,handler:(e,t,o,n)=>{if(!t||t.length===0)throw Error("Suspense directive requires a name parameter");let s=t[0].replace(/['"`]/g,"");return`<!-- @suspense:${s} -->${e}<!-- @endsuspense:${s} -->`}},zu={name:"island",hasEndTag:!0,handler:(e,t,o,n)=>{if(!t||t.length===0)throw Error("Island directive requires a name parameter");let s=t[0].replace(/['"`]/g,""),r=t[1]?t[1].replace(/['"`]/g,""):"lazy",a=`island-${s}-${Math.random().toString(36).substring(2,9)}`,w=e.match(/<script\s+props\s*>([\s\S]*?)<\/script>/i),p=w?w[1].trim():"",c=w?e.replace(w[0],""):e;return`<div data-island="${s}" data-island-id="${a}" data-priority="${r}">
47
47
  ${c}
48
48
  <script type="application/json" data-island-props="${a}">
49
49
  ${p?`{${p}}`:"{}"}
50
50
  </script>
51
- </div>`}};function hh(e={}){let t=[];if(e.streaming?.enabled)t.push(Bu);if(e.hydration?.enabled)t.push(Fu);return t}async function yh(e,t,o,n={}){return e}function bh(e,t={}){let o=new TextEncoder,n=e.pipeThrough(new TransformStream({transform(r,a){a.enqueue(o.encode(r))}})),s=new Headers(t.headers);if(!s.has("Content-Type"))s.set("Content-Type","text/html; charset=utf-8");if(!s.has("Transfer-Encoding"))s.set("Transfer-Encoding","chunked");if(!s.has("X-Content-Type-Options"))s.set("X-Content-Type-Options","nosniff");if(!s.has("X-Accel-Buffering"))s.set("X-Accel-Buffering","no");return new Response(n,{...t,headers:s})}function wh(e={mode:"full"}){let{mode:t,components:o={},dynamicImports:n=!0}=e,s=Object.entries(o).map(([r,a])=>`'${r}': ${n?`() => import('${a}')`:`require('${a}')`}`).join(`,
51
+ </div>`}};function yh(e={}){let t=[];if(e.streaming?.enabled)t.push(Fu);if(e.hydration?.enabled)t.push(zu);return t}async function bh(e,t,o,n={}){return e}function wh(e,t={}){let o=new TextEncoder,n=e.pipeThrough(new TransformStream({transform(r,a){a.enqueue(o.encode(r))}})),s=new Headers(t.headers);if(!s.has("Content-Type"))s.set("Content-Type","text/html; charset=utf-8");if(!s.has("Transfer-Encoding"))s.set("Transfer-Encoding","chunked");if(!s.has("X-Content-Type-Options"))s.set("X-Content-Type-Options","nosniff");if(!s.has("X-Accel-Buffering"))s.set("X-Accel-Buffering","no");return new Response(n,{...t,headers:s})}function vh(e={mode:"full"}){let{mode:t,components:o={},dynamicImports:n=!0}=e,s=Object.entries(o).map(([r,a])=>`'${r}': ${n?`() => import('${a}')`:`require('${a}')`}`).join(`,
52
52
  `);if(t==="loader")return`
53
53
  (function() {
54
54
  window.__stx = window.__stx || {};
@@ -191,4 +191,4 @@ else {
191
191
  stx.hydrate();
192
192
  }
193
193
  })();`}
194
- export{uh,Ha,ju,dh,ph,fh,gh,mh,Bu,Fu,hh,yh,bh,wh};
194
+ export{dh,Va,Bu,ph,fh,gh,mh,hh,Fu,zu,yh,bh,wh,vh};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{At,rr,Hh}from"./chunk-1jtsr42q.js";import{xe,sr,Vh,or,zo,ps,gs,Uh,Wh,qh,ir,ar,Ho,ms,Kh}from"./chunk-1bft48gk.js";import"./chunk-cphc60zw.js";export{zo as batch,Hh as default,sr as derived,or as effect,At as generateSignalsRuntime,rr as generateSignalsRuntimeDev,ar as isDerived,ir as isSignal,Vh as memo,gs as onDestroy,ps as onMount,ms as peek,qh as pendingLifecycleCounts,Wh as runDestroyCallbacks,Uh as runMountCallbacks,xe as state,Ho as untrack,Kh as useOptimistic};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ts,ns,ym,bm,wm,vm,xm}from"./chunk-pjj54ddk.js";export{ts as collectMessageCatalogs,bm as loadPageMessages,wm as messageAreasIn,vm as pageLanguages,ym as pageMessagesEnabled,xm as pageMessagesScript,ns as pathSpellings};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{tt,Fn,ra}from"./chunk-0dq9svfb.js";function bo(e,a){let t=e.pwa;if(!t?.enabled)return"";let c=t.serviceWorker||{},d=t.routes||[],i=c.cacheVersion||"1.0.0",o=t.offline,l=o?.page?"/offline.html":"/offline.html",{push:r,backgroundSync:s,cacheStorage:n}=t,u=a?tt(a,e):null,h=u?Fn(u):"[]",f=["/","/manifest.json",...o?.enabled?[l]:[],...o?.precacheAssets||[]];return`/**
2
+ import{nt,Hn,sa}from"./chunk-sh7a0g09.js";function xo(e,a){let t=e.pwa;if(!t?.enabled)return"";let c=t.serviceWorker||{},d=t.routes||[],i=c.cacheVersion||"1.0.0",o=t.offline,l=o?.page?"/offline.html":"/offline.html",{push:r,backgroundSync:s,cacheStorage:n}=t,u=a?nt(a,e):null,h=u?Hn(u):"[]",f=["/","/manifest.json",...o?.enabled?[l]:[],...o?.precacheAssets||[]];return`/**
3
3
  * Service Worker - Auto-generated by stx
4
4
  * Cache Version: ${i}
5
5
  *
@@ -13,7 +13,7 @@ import{tt,Fn,ra}from"./chunk-0dq9svfb.js";function bo(e,a){let t=e.pwa;if(!t?.en
13
13
  * Additional features:
14
14
  * - Push notifications: ${r?.enabled?"enabled":"disabled"}
15
15
  * - Background sync: ${s?.enabled?"enabled":"disabled"}
16
- * - Cache limits: ${n?.maxSize?`${ra(n.maxSize*1024*1024)}`:"unlimited"}
16
+ * - Cache limits: ${n?.maxSize?`${sa(n.maxSize*1024*1024)}`:"unlimited"}
17
17
  */
18
18
 
19
19
  const CACHE_VERSION = '${i}';
@@ -825,5 +825,5 @@ self.addEventListener('message', (event) => {
825
825
  event.waitUntil(registerFormSync(event.data.payload));
826
826
  }
827
827
  });
828
- `}function en(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function Jl(e){return e.pwa?.enabled===!0&&e.pwa?.serviceWorker?.useWorkbox===!0}function nm(e,a){if(!e.pwa?.enabled)return"";if(Jl(e)){let{generateWorkboxServiceWorker:t}=import.meta.require("./chunk-vgr7gd8k.js");return t(e,a)}return bo(e,a)}
829
- export{bo,en,Jl,nm};
828
+ `}function tn(e){return e.pwa?.serviceWorker?.fileName||"sw.js"}function Yl(e){return e.pwa?.enabled===!0&&e.pwa?.serviceWorker?.useWorkbox===!0}function rm(e,a){if(!e.pwa?.enabled)return"";if(Yl(e)){let{generateWorkboxServiceWorker:t}=import.meta.require("./chunk-zwqkbk2m.js");return t(e,a)}return xo(e,a)}
829
+ export{xo,tn,Yl,rm};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vi,xi,Si,ki,zs,Hs,Sy,ky,_y,Cy,Vs,Ey}from"./chunk-t3zmfh8w.js";import"./chunk-xmg6bmh6.js";import"./chunk-0jdz31q1.js";export{Ey as generateDefaultRobotsTxt,Vs as generateRobotsTxt,ky as generateSitemap,_y as generateSitemapIndex,ki as injectSeoTags,zs as metaDirective,vi as processMetaDirectives,Si as processSeoDirective,xi as processStructuredData,Sy as registerSeoDirectives,Cy as scanForSitemapEntries,Hs as structuredDataDirective};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{km}from"./chunk-rd663v1m.js";import"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{km as startInteractive};