@stacksjs/stx 0.2.302 → 0.2.304

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 (271) hide show
  1. package/dist/api-client.d.ts +26 -0
  2. package/dist/api-client.js +22 -0
  3. package/dist/api-handler.d.ts +6 -0
  4. package/dist/api-handler.js +3 -0
  5. package/dist/app-shell.js +11 -2
  6. package/dist/application-layers.d.ts +30 -0
  7. package/dist/application-layers.js +202 -0
  8. package/dist/build.js +9 -1
  9. package/dist/chunk-02hm88m5.js +2 -0
  10. package/dist/{chunk-7eea1cse.js → chunk-09zjty4k.js} +1 -1
  11. package/dist/{chunk-7nfn7nj9.js → chunk-0gz0rhvs.js} +1 -1
  12. package/dist/{chunk-jsfch50r.js → chunk-1c2j4eby.js} +1 -1
  13. package/dist/{chunk-m6wz1hf5.js → chunk-2h94c5hm.js} +2 -2
  14. package/dist/{chunk-mjpqz66q.js → chunk-2ver2s2y.js} +1 -1
  15. package/dist/{chunk-2wcd2031.js → chunk-30nbe9hr.js} +2 -2
  16. package/dist/chunk-39qzhpn6.js +18 -0
  17. package/dist/chunk-3z6bqqr7.js +2 -0
  18. package/dist/chunk-43p1qq7g.js +2 -0
  19. package/dist/{chunk-52rkkkmt.js → chunk-45y8bjrv.js} +287 -352
  20. package/dist/{chunk-2rp09y5j.js → chunk-4evbx7sz.js} +1 -1
  21. package/dist/chunk-4jgr954p.js +2 -0
  22. package/dist/chunk-51j2aqvb.js +2 -0
  23. package/dist/{chunk-8d15pd4g.js → chunk-54f8bpp6.js} +3 -3
  24. package/dist/{chunk-cbwp8prr.js → chunk-5k1hznvq.js} +2 -2
  25. package/dist/chunk-5qfpcgcs.js +2 -0
  26. package/dist/{chunk-7eg7ep8f.js → chunk-5tefa8qb.js} +2 -2
  27. package/dist/chunk-5x2fc4vk.js +30 -0
  28. package/dist/{chunk-683tfkz4.js → chunk-64djh88a.js} +1 -1
  29. package/dist/{chunk-btrmvj2y.js → chunk-695fkras.js} +1 -1
  30. package/dist/chunk-6hcc4973.js +2 -0
  31. package/dist/{chunk-svg37jzs.js → chunk-6vswphz4.js} +2 -2
  32. package/dist/chunk-7gqbr8nr.js +2 -0
  33. package/dist/{chunk-x4prtyjs.js → chunk-7kw3grq5.js} +1 -1
  34. package/dist/{chunk-7jebw3ea.js → chunk-7skk34dh.js} +2 -2
  35. package/dist/chunk-8215nhej.js +12 -0
  36. package/dist/chunk-8ee62a9q.js +2 -0
  37. package/dist/{chunk-jj6yp7gm.js → chunk-8jam44my.js} +1 -1
  38. package/dist/chunk-8z0n5mtg.js +2 -0
  39. package/dist/{chunk-3bc8bqw2.js → chunk-9368t9jm.js} +1 -1
  40. package/dist/chunk-9499k64n.js +6 -0
  41. package/dist/chunk-976g5qe5.js +2 -0
  42. package/dist/{chunk-3jwmcf4k.js → chunk-9c835qjn.js} +1 -1
  43. package/dist/chunk-9px4y692.js +2 -0
  44. package/dist/{chunk-38t0fxh0.js → chunk-9vqnrcrw.js} +2 -2
  45. package/dist/chunk-9wrrr7g3.js +4 -0
  46. package/dist/{chunk-q0y1yxg3.js → chunk-9xzszvn5.js} +1 -1
  47. package/dist/chunk-a07chbgj.js +2 -0
  48. package/dist/{chunk-454kar39.js → chunk-ankp4reb.js} +2 -2
  49. package/dist/{chunk-5d9cy7a0.js → chunk-awj7yy37.js} +1 -1
  50. package/dist/chunk-b1hd8kvy.js +2 -0
  51. package/dist/chunk-b4xwbh8a.js +2 -0
  52. package/dist/{chunk-d6wq91cw.js → chunk-bd9wrcq1.js} +277 -21
  53. package/dist/{chunk-q25mr70f.js → chunk-c131k3mt.js} +1 -1
  54. package/dist/chunk-c3tmzx7q.js +2 -0
  55. package/dist/{chunk-6btbgxh1.js → chunk-c79nfdyj.js} +1 -1
  56. package/dist/{chunk-cfgpk6bh.js → chunk-cbgh359m.js} +1 -1
  57. package/dist/chunk-ckzhp09g.js +2 -0
  58. package/dist/{chunk-weqpt9nt.js → chunk-cr8v8k53.js} +1 -1
  59. package/dist/{chunk-p3wwm6k4.js → chunk-d19tvdvv.js} +1 -1
  60. package/dist/{chunk-nb1zdh1y.js → chunk-d3srvh3q.js} +1 -1
  61. package/dist/{chunk-rqrfq305.js → chunk-d57gb0v2.js} +1 -1
  62. package/dist/{chunk-1xyhk1wr.js → chunk-d5cqnwdd.js} +1 -1
  63. package/dist/chunk-dgpjxmhs.js +2 -0
  64. package/dist/chunk-dvvx1wny.js +3 -0
  65. package/dist/{chunk-ctz53mbz.js → chunk-ej8mv2k6.js} +1 -1
  66. package/dist/{chunk-dv3z80gt.js → chunk-env6knrs.js} +1 -1
  67. package/dist/{chunk-rf10fkrf.js → chunk-ess2pgt5.js} +1 -1
  68. package/dist/chunk-ez28vck6.js +2 -0
  69. package/dist/{chunk-0tbgvp70.js → chunk-fczfdsab.js} +21 -5
  70. package/dist/{chunk-xdq52pwj.js → chunk-fp7ms6e7.js} +1 -1
  71. package/dist/{chunk-qg6pg6ze.js → chunk-fqq5k9ve.js} +1 -1
  72. package/dist/chunk-fvtv1s5j.js +3 -0
  73. package/dist/{chunk-5t0w4h6z.js → chunk-g912mb7x.js} +1 -1
  74. package/dist/chunk-g97atepq.js +2 -0
  75. package/dist/{chunk-wj25qt72.js → chunk-gbwhbasw.js} +1 -1
  76. package/dist/{chunk-38e9wgfc.js → chunk-gfc3qye3.js} +2 -2
  77. package/dist/{chunk-cratkhhb.js → chunk-ghw5p1yk.js} +1 -1
  78. package/dist/{chunk-f0g2q51j.js → chunk-gssbag3e.js} +1 -1
  79. package/dist/{chunk-c9vhtjtr.js → chunk-gt8ja700.js} +2 -2
  80. package/dist/chunk-hay1rzb0.js +3754 -0
  81. package/dist/{chunk-q5sw26s7.js → chunk-hg2afckn.js} +1 -1
  82. package/dist/chunk-hgjjnjas.js +7 -0
  83. package/dist/{chunk-hhnzd03k.js → chunk-hrcxfvh1.js} +1 -1
  84. package/dist/chunk-hzav4hyd.js +2 -0
  85. package/dist/{chunk-29gjwajm.js → chunk-jfzfrmzy.js} +1 -1
  86. package/dist/chunk-jjq9q9jr.js +2 -0
  87. package/dist/{chunk-ddqkj56r.js → chunk-jp2f8yzw.js} +1 -1
  88. package/dist/{chunk-ry3a2674.js → chunk-jsg1rthc.js} +1 -1
  89. package/dist/chunk-jxxv18a0.js +5 -0
  90. package/dist/chunk-kbw2qzqx.js +2 -0
  91. package/dist/chunk-kdxvraec.js +2 -0
  92. package/dist/chunk-krfjb7b8.js +2 -0
  93. package/dist/{chunk-6b4k8fay.js → chunk-kxavsh3m.js} +1 -1
  94. package/dist/{chunk-4tffxxpd.js → chunk-m31n9pkr.js} +1 -1
  95. package/dist/{chunk-fj6fbqgb.js → chunk-m3a20mmb.js} +1 -1
  96. package/dist/{chunk-j21csh4j.js → chunk-mbmqpaq1.js} +1 -1
  97. package/dist/{chunk-y9nyqcha.js → chunk-mwh3ymwc.js} +1 -1
  98. package/dist/{chunk-51g95yts.js → chunk-mygq61f5.js} +2 -2
  99. package/dist/chunk-nqq7y7m9.js +3 -0
  100. package/dist/chunk-nws8fbde.js +2 -0
  101. package/dist/{chunk-q6xfyasj.js → chunk-pcvayb2f.js} +1 -1
  102. package/dist/{chunk-nvxv2wxv.js → chunk-ppyz9623.js} +1 -1
  103. package/dist/chunk-pr14wjkn.js +2 -0
  104. package/dist/{chunk-jb2r696a.js → chunk-qev11kg8.js} +1 -1
  105. package/dist/{chunk-6njgsr6w.js → chunk-qeyw5za9.js} +1 -1
  106. package/dist/chunk-rpfcnq8n.js +2 -0
  107. package/dist/chunk-rrankpmj.js +3 -0
  108. package/dist/chunk-rst1rw09.js +2 -0
  109. package/dist/{chunk-3p0zgfgz.js → chunk-rzevgemj.js} +2 -2
  110. package/dist/{chunk-aa6kt84c.js → chunk-sart9ehj.js} +1 -1
  111. package/dist/chunk-sb7ana2z.js +19 -0
  112. package/dist/chunk-snt2773t.js +2 -0
  113. package/dist/{chunk-jptkc64r.js → chunk-t3qb9s6s.js} +2 -2
  114. package/dist/{chunk-w8yac9xp.js → chunk-t41aaehf.js} +1 -1
  115. package/dist/{chunk-qjkzpd68.js → chunk-t51mwjyq.js} +1 -1
  116. package/dist/chunk-tt4r8q4v.js +2 -0
  117. package/dist/chunk-vd3h9z7e.js +2 -0
  118. package/dist/{chunk-6rzwef28.js → chunk-vd5xvsnv.js} +1 -1
  119. package/dist/chunk-wbecqx03.js +2 -0
  120. package/dist/{chunk-dcxtrqfy.js → chunk-wfffa8zm.js} +1 -1
  121. package/dist/{chunk-22p0ezj6.js → chunk-wx13qmaw.js} +1 -1
  122. package/dist/chunk-xd5ahrtn.js +2 -0
  123. package/dist/{chunk-vh0qr8k9.js → chunk-xganfzgn.js} +2 -2
  124. package/dist/chunk-xq1swv2e.js +2 -0
  125. package/dist/chunk-xsfwcj6x.js +2 -0
  126. package/dist/{chunk-91007tan.js → chunk-xwxdwqn9.js} +1 -1
  127. package/dist/{chunk-634gaa9d.js → chunk-xz3evxqp.js} +1 -1
  128. package/dist/chunk-xzgvcrnz.js +2 -0
  129. package/dist/chunk-y2kmm6bt.js +43 -0
  130. package/dist/{chunk-v8474ah4.js → chunk-y4nzmkea.js} +1 -1
  131. package/dist/chunk-y7wsk78j.js +3 -0
  132. package/dist/{chunk-6w8fa3b8.js → chunk-ya5m5vbn.js} +1 -1
  133. package/dist/{chunk-ps20v1ah.js → chunk-ym3r8ktq.js} +1 -1
  134. package/dist/chunk-yyebm8q4.js +2 -0
  135. package/dist/chunk-yyyxt326.js +2 -0
  136. package/dist/chunk-yz16bgs3.js +28 -0
  137. package/dist/{chunk-em8p71et.js → chunk-z9ezmjwd.js} +2 -2
  138. package/dist/chunk-zbtfhxhn.js +2 -0
  139. package/dist/chunk-zggm7kjd.js +17 -0
  140. package/dist/{chunk-mdf3jbe6.js → chunk-zhcs8m2a.js} +2 -2
  141. package/dist/{chunk-f9d27v49.js → chunk-zs5y7xnt.js} +1 -1
  142. package/dist/cli.js +14 -14
  143. package/dist/client-script-bundler.js +22 -11
  144. package/dist/component-contract-checks.d.ts +19 -0
  145. package/dist/component-contract-checks.js +147 -0
  146. package/dist/component-contract.d.ts +20 -0
  147. package/dist/component-contract.js +108 -0
  148. package/dist/component-model.d.ts +29 -0
  149. package/dist/component-model.js +59 -0
  150. package/dist/component-registry.js +7 -64
  151. package/dist/component-renderer.d.ts +1 -26
  152. package/dist/component-renderer.js +4 -239
  153. package/dist/component-resolution.d.ts +21 -0
  154. package/dist/component-resolution.js +118 -0
  155. package/dist/component-tags.d.ts +9 -0
  156. package/dist/component-tags.js +174 -0
  157. package/dist/composable-loader.d.ts +2 -13
  158. package/dist/composable-loader.js +15 -26
  159. package/dist/composables/index.d.ts +1 -0
  160. package/dist/composables/index.js +1 -0
  161. package/dist/composables/use-fetch.d.ts +117 -42
  162. package/dist/composables/use-fetch.js +47 -4
  163. package/dist/composition-api.d.ts +43 -19
  164. package/dist/config.d.ts +1 -1
  165. package/dist/config.js +46 -4
  166. package/dist/craft-entry.js +1 -1
  167. package/dist/craft.js +1 -1
  168. package/dist/database.js +1 -1
  169. package/dist/dev-server/serve-app.js +57 -17
  170. package/dist/dev-server/serve-file.js +8 -1
  171. package/dist/expressions.js +1 -1
  172. package/dist/imported-signals.js +1 -1
  173. package/dist/includes.js +8 -2
  174. package/dist/index.d.ts +11 -0
  175. package/dist/index.js +7 -0
  176. package/dist/manifest.d.ts +6 -0
  177. package/dist/misc-directives.d.ts +2 -0
  178. package/dist/misc-directives.js +39 -1
  179. package/dist/process.js +18 -1
  180. package/dist/production-builder.d.ts +4 -0
  181. package/dist/production-builder.js +47 -8
  182. package/dist/production-server.d.ts +4 -1
  183. package/dist/production-server.js +119 -71
  184. package/dist/pwa.js +2 -2
  185. package/dist/render.js +9 -2
  186. package/dist/route-response-cache.d.ts +7 -0
  187. package/dist/route-response-cache.js +72 -0
  188. package/dist/route-rules.d.ts +17 -0
  189. package/dist/route-rules.js +40 -0
  190. package/dist/router.d.ts +1 -0
  191. package/dist/runtime-config-loader.d.ts +5 -0
  192. package/dist/runtime-config-loader.js +42 -0
  193. package/dist/runtime-config-server.d.ts +26 -0
  194. package/dist/runtime-config-server.js +77 -0
  195. package/dist/runtime-config-types.d.ts +2 -0
  196. package/dist/runtime-config-types.js +0 -0
  197. package/dist/runtime-config.d.ts +5 -0
  198. package/dist/runtime-config.js +9 -0
  199. package/dist/runtime-globals.js +3 -0
  200. package/dist/serve.js +32 -10
  201. package/dist/server-api.d.ts +27 -0
  202. package/dist/server-api.js +181 -0
  203. package/dist/server-data.d.ts +17 -0
  204. package/dist/server-data.js +40 -0
  205. package/dist/signal-processing.js +2 -2
  206. package/dist/signals.js +210 -17
  207. package/dist/ssg.js +2 -2
  208. package/dist/stx-virtual-ts.d.ts +6 -0
  209. package/dist/stx-virtual-ts.js +31 -7
  210. package/dist/stx.d.ts +28 -0
  211. package/dist/template-compiler.d.ts +1 -0
  212. package/dist/template-compiler.js +1 -1
  213. package/dist/template-hydrator.js +15 -4
  214. package/dist/typecheck.d.ts +1 -0
  215. package/dist/typecheck.js +4 -3
  216. package/dist/types/config-types.d.ts +17 -0
  217. package/dist/utils.js +15 -5
  218. package/dist/variable-extractor.d.ts +1 -1
  219. package/dist/variable-extractor.js +12 -1
  220. package/dist/visual-testing.js +1 -1
  221. package/dist/vue-template.js +19 -41
  222. package/package.json +5 -5
  223. package/stx.d.ts +28 -0
  224. package/dist/chunk-0p44z42s.js +0 -2
  225. package/dist/chunk-1na1dvda.js +0 -2
  226. package/dist/chunk-2yp8ang5.js +0 -2
  227. package/dist/chunk-35x7s4cr.js +0 -2
  228. package/dist/chunk-39qnycbc.js +0 -2
  229. package/dist/chunk-4qj6pq60.js +0 -2
  230. package/dist/chunk-4r1qdp25.js +0 -19
  231. package/dist/chunk-4xs545h1.js +0 -2
  232. package/dist/chunk-70cf5h11.js +0 -2
  233. package/dist/chunk-7k63nhap.js +0 -28
  234. package/dist/chunk-7w3dttqh.js +0 -2
  235. package/dist/chunk-813dt09p.js +0 -2
  236. package/dist/chunk-9cp3430d.js +0 -2
  237. package/dist/chunk-ac9vpa5z.js +0 -2
  238. package/dist/chunk-b26xazrf.js +0 -2
  239. package/dist/chunk-b2ghmxpj.js +0 -4
  240. package/dist/chunk-btnky17z.js +0 -12
  241. package/dist/chunk-c7av0px6.js +0 -2
  242. package/dist/chunk-cthpzv4p.js +0 -18
  243. package/dist/chunk-d41b0rqp.js +0 -2
  244. package/dist/chunk-dkd0bg8g.js +0 -2
  245. package/dist/chunk-e0s519df.js +0 -2
  246. package/dist/chunk-ebr2344x.js +0 -3
  247. package/dist/chunk-ehp6fez3.js +0 -2
  248. package/dist/chunk-fc5t3cxt.js +0 -2
  249. package/dist/chunk-g6ttsdz1.js +0 -2
  250. package/dist/chunk-gd73rpks.js +0 -2
  251. package/dist/chunk-gv42xz15.js +0 -17
  252. package/dist/chunk-h3t6fjba.js +0 -2
  253. package/dist/chunk-h65nep6y.js +0 -2
  254. package/dist/chunk-h7d01cy7.js +0 -2
  255. package/dist/chunk-jc57j887.js +0 -2
  256. package/dist/chunk-k5xtf38q.js +0 -3
  257. package/dist/chunk-mc4rtf5d.js +0 -2
  258. package/dist/chunk-me5kq4e6.js +0 -22
  259. package/dist/chunk-mzf6c0h7.js +0 -2
  260. package/dist/chunk-n1j7gfe1.js +0 -3
  261. package/dist/chunk-pczxwdes.js +0 -2
  262. package/dist/chunk-pq6rabcy.js +0 -3754
  263. package/dist/chunk-qr59yfq9.js +0 -2
  264. package/dist/chunk-s454ytp4.js +0 -2
  265. package/dist/chunk-s4sp78fn.js +0 -2
  266. package/dist/chunk-shr928nn.js +0 -2
  267. package/dist/chunk-that7v95.js +0 -2
  268. package/dist/chunk-vwnnbzsp.js +0 -2
  269. package/dist/chunk-w63052rn.js +0 -2
  270. package/dist/chunk-w9kzfesd.js +0 -2
  271. package/dist/chunk-zwy5e35f.js +0 -30
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{$f as e}from"./chunk-y2kmm6bt.js";import{Fg as EF,tg as t,vg as kF,wg as UF,xg as wF}from"./chunk-5x2fc4vk.js";import{Ig as BF}from"./chunk-dvvx1wny.js";import{yj as l,zj as d}from"./chunk-bd9wrcq1.js";import{Lk as HF,Mk as IF,Nk as KF}from"./chunk-09zjty4k.js";import{ul as YF,wl as ZF}from"./chunk-9499k64n.js";import{Op as GF,Wp as VF,Xm as s,_p as r,rm as p,ro as zF,tm as i,vr as o,xr as M,zp as $F}from"./chunk-hay1rzb0.js";import{_t as qF}from"./chunk-54f8bpp6.js";import{hu as XF}from"./chunk-jxxv18a0.js";import{pu as WF}from"./chunk-hgjjnjas.js";import{uu as QF}from"./chunk-nqq7y7m9.js";import{Sv as h,Uv as _F}from"./chunk-fczfdsab.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>e(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...o,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=t(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
3
+ [stx build] Done in ${D}ms \u2014 ${R.length} pages compiled`),{pageCount:R.length,assets:S,outputDir:X,duration:D}}
4
+ export{u as Rf,c as Sf,a as Tf,bF as Uf,FF as Vf,qJ as Wf};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{At as b,Bt as c,Ct as d,Dt as e,Et as f,Ft as g,Gt as h,Ht as i,It as j,Jt as k,Kt as l,zt as a}from"./chunk-8d15pd4g.js";import"./chunk-q25mr70f.js";import"./chunk-ddqkj56r.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
2
+ import{Pt as a,Qt as b,Rt as c,St as d,Tt as e,Ut as f,Vt as g,Wt as h,Xt as i,Yt as j,Zt as k,_t as l}from"./chunk-54f8bpp6.js";import"./chunk-c131k3mt.js";import"./chunk-jp2f8yzw.js";export{e as resolveUserCssConfig,c as resetCssCache,h as rebuildCss,d as loadCssEngineConfig,b as loadCssEngine,l as injectCss,a as getCssServeAsset,i as getCachedCSS,k as generateCss,f as fingerprintConfig,j as extractClassNames,g as buildCss};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{em as c,hm as d,im as e,jm as f,km as g,lm as h,mm as i,nm as j,om as k,pm as l,qm as m}from"./chunk-hay1rzb0.js";import"./chunk-2h94c5hm.js";import"./chunk-8jam44my.js";import{gt as a,ht as b}from"./chunk-t51mwjyq.js";import"./chunk-wfffa8zm.js";import"./chunk-54f8bpp6.js";import"./chunk-4evbx7sz.js";import"./chunk-jxxv18a0.js";import"./chunk-c131k3mt.js";import"./chunk-hgjjnjas.js";import"./chunk-nqq7y7m9.js";import"./chunk-1c2j4eby.js";import"./chunk-kxavsh3m.js";import"./chunk-qev11kg8.js";import"./chunk-rrankpmj.js";import"./chunk-fczfdsab.js";import"./chunk-fp7ms6e7.js";import"./chunk-jp2f8yzw.js";export{h as transformAutoImports,b as stripCommentsAndLiterals,e as renderVendorStyleTags,m as processClientScript,g as injectBrowserCoreAutoImports,l as generateServerDataBridge,j as generateBrowserAutoImportDestructuring,i as generateAutoImportDestructuring,a as findInterpolationEnd,k as extractBridgeData,d as extractAndStripCssImports,f as STX_AUTO_IMPORTS,c as BROWSER_CORE_IMPORTS};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Wp as M,_p as x}from"./chunk-pq6rabcy.js";import{gt as T}from"./chunk-8d15pd4g.js";import{wv as N}from"./chunk-ddqkj56r.js";import V from"fs";import Z from"path";var y=new Map,W=new Map;async function R(j){let z;for(let J=0;J<3;J++)try{let X=(await V.promises.stat(j)).mtime.getTime(),Q=W.get(j);if(Q&&Q.mtime===X)return Q.content;let Y=await Bun.file(j).text(),K=(await V.promises.stat(j)).mtime.getTime();if(K!==X)continue;return W.set(j,{content:Y,mtime:K}),Y}catch(I){z=I;break}throw W.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function S(j){W.delete(j)}function _(j){for(let B of W.keys())if(B.startsWith(j))W.delete(B)}var q=null,w=null,G=null;function C(j){G=j}async function b(j=!1){let B=G??await import("./chunk-q5sw26s7.js");if(j)return B.generateSignalsRuntimeDev();if(q===null)q=B.generateSignalsRuntime();return q}var D=null;async function A(){if(D===null){let{getRouterScript:j}=await import("./chunk-btrmvj2y.js");D=j()}return D}var L={};async function g(j,B=!1){let z=j==="runtime"?await b(B):await A(),J=j==="runtime"&&B?"runtime-debug":j,I=L[J];if(!I||I.content!==z)I={content:z,hash:Bun.hash(z).toString(16).padStart(16,"0").slice(0,16)},L[J]=I;return{content:z,hash:I.hash,url:`/_stx/${j}.${I.hash}.js`}}function u(){W.clear(),x(),T(),q=null,w=null,D=null}function O(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function P(j,B){try{if(!B.cachePath)return null;let z=Z.resolve(B.cachePath),J=Z.join(z,`${U(j)}.html`),I=Z.join(z,`${U(j)}.meta.json`);if(!await M(J)||!await M(I))return null;let X=await Bun.file(I).text(),Q=JSON.parse(X);if(Q.cacheVersion!==B.cacheVersion)return null;if(Q.optionsSignature!==O(B))return null;if((await V.promises.stat(j)).mtime.getTime()>Q.mtime)return null;for(let $ of Q.dependencies)if(await M($)){if((await V.promises.stat($)).mtime.getTime()>Q.mtime)return null}else return null;return await Bun.file(J).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function p(j,B,z,J){try{if(!J.cachePath)return;let I=Z.resolve(J.cachePath);await V.promises.mkdir(I,{recursive:!0});let X=Z.join(I,`${U(j)}.html`),Q=Z.join(I,`${U(j)}.meta.json`),Y=await V.promises.stat(j);await Bun.write(X,B);let $={sourcePath:j,mtime:Y.mtime.getTime(),dependencies:Array.from(z),cacheVersion:J.cacheVersion,optionsSignature:O(J),generatedAt:Date.now()};await Bun.write(Q,JSON.stringify($,null,2)),y.set(j,{output:B,mtime:Y.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var v=16;function U(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,v)}
3
- export{y as Pj,R as Qj,S as Rj,_ as Sj,C as Tj,b as Uj,A as Vj,g as Wj,u as Xj,P as Yj,p as Zj,U as _j};
2
+ import{nq as M,rq as x}from"./chunk-hay1rzb0.js";import{wt as T}from"./chunk-54f8bpp6.js";import{cw as N}from"./chunk-jp2f8yzw.js";import V from"fs";import Z from"path";var y=new Map,W=new Map;async function R(j){let z;for(let J=0;J<3;J++)try{let X=(await V.promises.stat(j)).mtime.getTime(),Q=W.get(j);if(Q&&Q.mtime===X)return Q.content;let Y=await Bun.file(j).text(),K=(await V.promises.stat(j)).mtime.getTime();if(K!==X)continue;return W.set(j,{content:Y,mtime:K}),Y}catch(I){z=I;break}throw W.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function S(j){W.delete(j)}function _(j){for(let B of W.keys())if(B.startsWith(j))W.delete(B)}var q=null,w=null,G=null;function C(j){G=j}async function b(j=!1){let B=G??await import("./chunk-hg2afckn.js");if(j)return B.generateSignalsRuntimeDev();if(q===null)q=B.generateSignalsRuntime();return q}var D=null;async function A(){if(D===null){let{getRouterScript:j}=await import("./chunk-695fkras.js");D=j()}return D}var L={};async function g(j,B=!1){let z=j==="runtime"?await b(B):await A(),J=j==="runtime"&&B?"runtime-debug":j,I=L[J];if(!I||I.content!==z)I={content:z,hash:Bun.hash(z).toString(16).padStart(16,"0").slice(0,16)},L[J]=I;return{content:z,hash:I.hash,url:`/_stx/${j}.${I.hash}.js`}}function u(){W.clear(),x(),T(),q=null,w=null,D=null}function O(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function P(j,B){try{if(!B.cachePath)return null;let z=Z.resolve(B.cachePath),J=Z.join(z,`${U(j)}.html`),I=Z.join(z,`${U(j)}.meta.json`);if(!await M(J)||!await M(I))return null;let X=await Bun.file(I).text(),Q=JSON.parse(X);if(Q.cacheVersion!==B.cacheVersion)return null;if(Q.optionsSignature!==O(B))return null;if((await V.promises.stat(j)).mtime.getTime()>Q.mtime)return null;for(let $ of Q.dependencies)if(await M($)){if((await V.promises.stat($)).mtime.getTime()>Q.mtime)return null}else return null;return await Bun.file(J).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function p(j,B,z,J){try{if(!J.cachePath)return;let I=Z.resolve(J.cachePath);await V.promises.mkdir(I,{recursive:!0});let X=Z.join(I,`${U(j)}.html`),Q=Z.join(I,`${U(j)}.meta.json`),Y=await V.promises.stat(j);await Bun.write(X,B);let $={sourcePath:j,mtime:Y.mtime.getTime(),dependencies:Array.from(z),cacheVersion:J.cacheVersion,optionsSignature:O(J),generatedAt:Date.now()};await Bun.write(Q,JSON.stringify($,null,2)),y.set(j,{output:B,mtime:Y.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var v=16;function U(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,v)}
3
+ export{y as Uj,R as Vj,S as Wj,_ as Xj,C as Yj,b as Zj,A as _j,g as $j,u as ak,P as bk,p as ck,U as dk};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ag as b,Bg as c,Cg as d,Dg as e,Eg as f,Fg as g,Gg as h,Hg as i,Ig as j,Jg as k,Kg as l,zg as a}from"./chunk-634gaa9d.js";import"./chunk-ddqkj56r.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
2
+ import{Jg as a,Kg as b,Lg as c,Mg as d,Ng as e,Og as f,Pg as g,Qg as h,Rg as i,Sg as j,Tg as k,Ug as l}from"./chunk-xz3evxqp.js";import"./chunk-jp2f8yzw.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{gl as a,hl as b,il as c,jl as d,kl as e,ll as f,ml as g,nl as h,ol as i,pl as j,ql as k,rl as l,sl as m,tl as n}from"./chunk-zggm7kjd.js";import"./chunk-9499k64n.js";import"./chunk-hay1rzb0.js";import"./chunk-2h94c5hm.js";import"./chunk-8jam44my.js";import"./chunk-t51mwjyq.js";import"./chunk-wfffa8zm.js";import"./chunk-54f8bpp6.js";import"./chunk-4evbx7sz.js";import"./chunk-jxxv18a0.js";import"./chunk-c131k3mt.js";import"./chunk-hgjjnjas.js";import"./chunk-nqq7y7m9.js";import"./chunk-1c2j4eby.js";import"./chunk-kxavsh3m.js";import"./chunk-qev11kg8.js";import"./chunk-rrankpmj.js";import"./chunk-fczfdsab.js";import"./chunk-fp7ms6e7.js";import"./chunk-jp2f8yzw.js";export{b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ek as a,fk as b,gk as c,hk as d}from"./chunk-pcvayb2f.js";import"./chunk-jp2f8yzw.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
@@ -1,5 +1,70 @@
1
1
  // @bun
2
- import{Bj as K,Cj as N,Dj as O,Ej as P,Fj as Q,Gj as T,Kj as U,Lj as V,Mj as W,Nj as Y}from"./chunk-w8yac9xp.js";import{yu as J}from"./chunk-k5xtf38q.js";function $(){let w=q(Z());try{let z=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(w);return z=z.replace(/\}(var |let |const |function )/g,"};$1"),z}catch{return w}}function q(w){let E=[],z=0,I="console.log(";while(z<w.length){let F=w.indexOf(I,z);if(F===-1){E.push(w.slice(z));break}E.push(w.slice(z,F));let G=1,x=F+I.length;while(x<w.length&&G>0){let B=w[x];if(B==='"'||B==="'"||B==="`"){let _=B;x++;while(x<w.length&&w[x]!==_){if(w[x]==="\\")x++;x++}x++;continue}if(B==="(")G++;else if(B===")")G--;x++}E.push("0"),z=x}return E.join("")}function Z(){return`
2
+ import{Gj as B,Hj as R,Ij as H,Jj as S,Kj as F,Lj as M,Pj as E,Qj as P,Rj as O,Sj as I}from"./chunk-t41aaehf.js";import{ev as L}from"./chunk-rrankpmj.js";var w=null;function j(){return w}function f(z,W){if(w)w.provides.set(z,W);else V.set(z,W)}function k(z,W){let Q=w;while(Q){if(Q.provides.has(z))return Q.provides.get(z);Q=Q.parent}if(V.has(z))return V.get(z);return W}var V=new Map;function v(z,W){V.set(z,W)}function U(z){let W=w,Q=W?.el,Z=Array.isArray(z)?z:z&&typeof z==="object"?Object.keys(z):[];if(Q&&Z.length>0){let $=Q.__stx_component_emits||=Object.create(null);for(let Y of Z)$[Y]=!0}let _=($,...Y)=>{if(typeof document>"u")return;if(Q){let X=Q.__stx_component_emits||=Object.create(null);X[$]=!0,Q.dispatchEvent(new CustomEvent($,{detail:Y.length===1?Y[0]:Y,bubbles:!0,cancelable:!0}))}};if(W)W.emit=_;return _}function g(z){if(w)w.exposed=z}function m(z){let W=Promise.resolve();return z?W.then(z):W}function y(z){if(w)w.errorCapturedHooks.push(z)}function h(z,W,Q){let Z=W?.parent;while(Z){for(let _ of Z.errorCapturedHooks)if(_(z,W,Q)===!1)return;Z=Z.parent}}function p(){return w?.slots??{}}function u(){return w?.slots??{}}function l(){return w?.attrs??{}}function d(z){let W=z.__provides?new Map(Object.entries(z.__provides)):new Map;return{...z,__provides:W,__provide(Q,Z){W.set(Q,Z)},__inject(Q,Z){if(W.has(Q))return W.get(Q);if(z.__provides){let _=z.__provides instanceof Map?z.__provides:new Map(Object.entries(z.__provides));if(_.has(Q))return _.get(Q)}return Z}}}function i(){return`
3
+ // STX Composition API Runtime
4
+ (function() {
5
+ const _provides = new Map();
6
+ const _scopes = window.__stx_scopes || (window.__stx_scopes = {});
7
+ const _exposed = window.__stx_exposed || (window.__stx_exposed = {});
8
+
9
+ // provide() stores values in the nearest scope's provide map
10
+ window.__stx_provide = function(key, value) {
11
+ _provides.set(key, value);
12
+ };
13
+
14
+ // inject() walks up DOM ancestors with data-stx-scope to find provided values
15
+ window.__stx_inject = function(key, defaultValue, el) {
16
+ // Walk up the DOM tree
17
+ let current = el ? el.closest('[data-stx-scope]') : null;
18
+ while (current) {
19
+ const scopeId = current.getAttribute('data-stx-scope');
20
+ const scope = _scopes[scopeId];
21
+ if (scope && scope.__provided && scope.__provided.has(key)) {
22
+ return scope.__provided.get(key);
23
+ }
24
+ current = current.parentElement ? current.parentElement.closest('[data-stx-scope]') : null;
25
+ }
26
+ // Check global provides
27
+ if (_provides.has(key)) return _provides.get(key);
28
+ return defaultValue;
29
+ };
30
+
31
+ // defineEmits() returns an emit function
32
+ window.__stx_defineEmits = function(scopeId) {
33
+ return function emit(event, ...args) {
34
+ const el = document.querySelector('[data-stx-scope="' + scopeId + '"]');
35
+ if (el) {
36
+ el.dispatchEvent(new CustomEvent(event, {
37
+ detail: args.length === 1 ? args[0] : args,
38
+ bubbles: true,
39
+ cancelable: true
40
+ }));
41
+ }
42
+ };
43
+ };
44
+
45
+ // defineExpose() registers exposed properties
46
+ window.__stx_defineExpose = function(scopeId, exposed) {
47
+ _exposed[scopeId] = exposed;
48
+ };
49
+
50
+ // nextTick()
51
+ window.__stx_nextTick = function(fn) {
52
+ return Promise.resolve().then(fn);
53
+ };
54
+
55
+ // Template ref resolution
56
+ window.__stx_resolveRefs = function(scopeId) {
57
+ const scope = document.querySelector('[data-stx-scope="' + scopeId + '"]');
58
+ if (!scope) return {};
59
+ const refs = {};
60
+ // eslint-disable-next-line pickier/no-unused-vars
61
+ scope.querySelectorAll('[data-stx-ref]').forEach(function(el) {
62
+ refs[el.getAttribute('data-stx-ref')] = el;
63
+ });
64
+ return refs;
65
+ };
66
+ })();
67
+ `}function T(z,W,Q,Z,_){let $=!0,Y=new Set,X=(J)=>Z.get?Z.get(J):J,G=()=>X(z());return Object.defineProperty(G,"_isSignal",{value:!0}),Object.defineProperty(G,"modifiers",{get:W}),G.set=(J)=>{if(!$)return;let N=W(),A=Z.set?Z.set(J,N):J;if(N.trim&&typeof A==="string")A=A.trim();if(N.number&&typeof A==="string"&&A!==""){let K=Number(A);if(!Number.isNaN(K))A=K}if(Object.is(z(),A))return;z.set(A),Q(A)},G.update=(J)=>G.set(J(G())),G.input=(J)=>{if(!W().lazy)G.set(J)},G.change=(J)=>{if(W().lazy)G.set(J)},G.subscribe=(J)=>{if(!$)return()=>{};let N=z.subscribe((A,K)=>J(X(A),X(K)));return Y.add(N),()=>{N(),Y.delete(N)}},Object.defineProperty(G,"value",{get:G,set:G.set}),_(()=>{$=!1,Y.forEach((J)=>J()),Y.clear()}),G}function n(z="modelValue",W={}){let Q=typeof z==="string"?z:"modelValue",Z=typeof z==="string"?W:z,_=j()?.props||{},$=U([`update:${Q}`]),Y=Q==="modelValue"?"modelModifiers":`${Q}Modifiers`,X=(N)=>E(_[N])||P(_[N])?_[N]():_[N],G=B(Z.default),J=H(()=>{let N=X(Q);G.set(N===void 0?Z.default:N)});return M(J),T(G,()=>X(Y)||{},(N)=>$(`update:${Q}`,N),Z,M)}function q(z,W=!0,Q){if(!W||!z||typeof window>"u")return;let Z=window;if(!Z.__STX_DATA__){let $=document.querySelector("script[data-stx-server-data]");try{let Y=JSON.parse($?.textContent||"{}");Z.__STX_DATA__=Y&&typeof Y==="object"&&!Array.isArray(Y)?Y:{}}catch{Z.__STX_DATA__={}}}let _=Z.__STX_DATA__;if(_&&Object.prototype.hasOwnProperty.call(_,z))try{return{data:Q?Q(_[z]):_[z]}}catch($){return{data:null,error:$ instanceof Error?$:Error(String($))}}return}function D(z){if(typeof window>"u")return;let W=window;if(z===void 0)W.__STX_DATA__={};else{if(!W.__STX_DATA__)try{let Q=JSON.parse(document.querySelector("script[data-stx-server-data]")?.textContent||"{}");W.__STX_DATA__=Q&&typeof Q==="object"&&!Array.isArray(Q)?Q:{}}catch{W.__STX_DATA__={}}if(W.__STX_DATA__)delete W.__STX_DATA__[z]}}function C(){let z=b(x());try{let Q=new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(z);return Q=Q.replace(/\}(var |let |const |function )/g,"};$1"),Q}catch{return z}}function b(z){let W=[],Q=0,Z="console.log(";while(Q<z.length){let _=z.indexOf(Z,Q);if(_===-1){W.push(z.slice(Q));break}W.push(z.slice(Q,_));let $=1,Y=_+Z.length;while(Y<z.length&&$>0){let X=z[Y];if(X==='"'||X==="'"||X==="`"){let G=X;Y++;while(Y<z.length&&z[Y]!==G){if(z[Y]==="\\")Y++;Y++}Y++;continue}if(X==="(")$++;else if(X===")")$--;Y++}W.push("0"),Q=Y}return W.join("")}function x(){return`
3
68
  // STX Signals Runtime (Development Build)
4
69
  console.log('[stx] signals runtime loading');
5
70
  // Pre-initialization shim: capture onMount/onDestroy calls made before the runtime IIFE runs
@@ -68,6 +133,13 @@ console.log('[stx] entering IIFE');
68
133
  // The body is attached rather than only interpolated: err.data is what a
69
134
  // caller needs to render field errors, and err.status is what it needs to
70
135
  // tell 401 from 500 without parsing the message.
136
+ function __stxRawBody(body) {
137
+ return (typeof FormData !== 'undefined' && body instanceof FormData)
138
+ || (typeof Blob !== 'undefined' && body instanceof Blob)
139
+ || (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams)
140
+ || (typeof ArrayBuffer !== 'undefined' && (body instanceof ArrayBuffer || ArrayBuffer.isView(body)));
141
+ }
142
+
71
143
  async function __stxHttpError(response) {
72
144
  var body = null;
73
145
  var text = '';
@@ -102,8 +174,63 @@ console.log('[stx] entering IIFE');
102
174
  // hook fails the request, which is what a token-refresh flow wants.
103
175
  var __stxFetchHooks = { onRequest: null, onResponse: null, onResponseError: null };
104
176
 
177
+ // Double-submit CSRF, echoed for every same-origin unsafe request. A server
178
+ // using the pattern (Stacks does, by default, on every POST/PUT/PATCH/DELETE)
179
+ // plants a readable cookie and rejects any unsafe request whose header does
180
+ // not repeat it. Nothing here repeated it, so a form posting through
181
+ // useMutation - or the framework's own CMS form block - got 403 "CSRF token
182
+ // mismatch" on a stock install. The same thing axios does for XSRF-TOKEN.
183
+ // Only same-origin: the token must never leave for another host.
184
+ var __stxCsrf = { cookie: 'X-CSRF-Token', header: 'X-CSRF-Token' };
185
+
186
+ function __stxCookie(name) {
187
+ if (typeof document === 'undefined' || !document.cookie) return null;
188
+ var parts = document.cookie.split(';');
189
+ for (var i = 0; i < parts.length; i++) {
190
+ var at = parts[i].indexOf('=');
191
+ if (at === -1) continue;
192
+ if (parts[i].slice(0, at).trim() !== name) continue;
193
+ var value = parts[i].slice(at + 1).trim();
194
+ try { return value ? decodeURIComponent(value) : null; } catch (e) { return value || null; }
195
+ }
196
+ return null;
197
+ }
198
+
199
+ function __stxApplyCsrf(url, opts) {
200
+ if (!__stxCsrf) return;
201
+ var method = String((opts && opts.method) || 'GET').toUpperCase();
202
+ if (method === 'GET' || method === 'HEAD' || method === 'OPTIONS') return;
203
+ // A path is same-origin by definition; only an absolute URL needs its
204
+ // origin compared, and one that cannot be parsed is not trusted.
205
+ var target = String(url);
206
+ if (/^[a-z][a-z0-9+.-]*:/i.test(target) || target.slice(0, 2) === '//') {
207
+ if (typeof location === 'undefined') return;
208
+ try {
209
+ if (new URL(target).origin !== location.origin) return;
210
+ } catch (e) { return; }
211
+ }
212
+ var token = __stxCookie(__stxCsrf.cookie);
213
+ if (!token) return;
214
+ var headers = __stxHeaders(opts.headers);
215
+ var wanted = __stxCsrf.header.toLowerCase();
216
+ for (var key in headers) {
217
+ // A token the caller set on purpose wins.
218
+ if (key.toLowerCase() === wanted) return;
219
+ }
220
+ headers[__stxCsrf.header] = token;
221
+ opts.headers = headers;
222
+ }
223
+
105
224
  function configureFetch(cfg) {
106
225
  cfg = cfg || {};
226
+ // Unlike the hooks below, CSRF settings persist unless named: an app that
227
+ // installs an Authorization hook has not asked to stop sending the token.
228
+ // \`csrf: false\` turns it off; \`{ cookie, header }\` renames either side.
229
+ if (Object.prototype.hasOwnProperty.call(cfg, 'csrf')) {
230
+ __stxCsrf = cfg.csrf === false || cfg.csrf === null
231
+ ? null
232
+ : { cookie: (cfg.csrf && cfg.csrf.cookie) || 'X-CSRF-Token', header: (cfg.csrf && (cfg.csrf.header || cfg.csrf.cookie)) || 'X-CSRF-Token' };
233
+ }
107
234
  // Replace rather than stack: a module re-evaluated by hot reload or by a
108
235
  // SPA script re-run must not end up with the same interceptor installed
109
236
  // twice, sending two Authorization headers or counting a 401 twice.
@@ -129,6 +256,8 @@ console.log('[stx] entering IIFE');
129
256
  async function __stxFetch(source, url, opts) {
130
257
  var t0 = __stxDevtoolsNow();
131
258
  opts = opts || {};
259
+ // Before the hooks, so an onRequest hook sees (and may override) it.
260
+ __stxApplyCsrf(url, opts);
132
261
  if (__stxFetchHooks.onRequest) {
133
262
  // Normalised first so a hook can write ctx.options.headers.Authorization
134
263
  // without having to create the bag itself.
@@ -605,6 +734,17 @@ else {
605
734
  };
606
735
 
607
736
  signal.update = (fn) => signal.set(fn(value));
737
+ // Notify as if the value changed, for an array or object mutated in place.
738
+ // set() cannot do it: the value is the same reference, so Object.is skips.
739
+ signal.trigger = () => {
740
+ subscribers.forEach(cb => cb(value, value));
741
+ if (isBatching) {
742
+ effects.forEach(effect => pendingEffects.add(effect));
743
+ }
744
+ else {
745
+ effects.forEach(effect => effect());
746
+ }
747
+ };
608
748
  signal.subscribe = (cb) => {
609
749
  subscribers.add(cb);
610
750
  return () => subscribers.delete(cb);
@@ -1064,20 +1204,25 @@ finally {
1064
1204
  // Declarative Data Fetching (Feature #6 - useFetch)
1065
1205
  // ==========================================================================
1066
1206
 
1207
+ var readHydratedData = ${q.toString()};
1208
+ var clearServerData = ${D.toString()};
1209
+
1067
1210
  function useFetch(urlOrFn, options = {}) {
1068
- const data = state(options.initialData ?? null);
1211
+ const hydrated = readHydratedData(options.key, options.hydrate !== false, options.transform);
1212
+ const initial = hydrated ? hydrated.data : (options.initialData ?? null);
1213
+ const data = state(initial);
1069
1214
  // Starts false when nothing will be requested. It used to start true
1070
1215
  // unconditionally while the only thing clearing it was the fetch that
1071
1216
  // immediate:false suppresses \u2014 so the documented way to declare a deferred
1072
1217
  // request produced a composable stuck loading forever, which is exactly the
1073
1218
  // case where a template is most likely driving a spinner off it (#1818).
1074
- const immediate = options.immediate !== false;
1219
+ const immediate = options.immediate !== false && !hydrated;
1075
1220
  const loading = state(immediate);
1076
1221
  // Any request in flight, background ones included. loading answers "is
1077
1222
  // there nothing to show yet"; isFetching answers "is a request open" \u2014 and
1078
1223
  // a background refresh is the case where those two stop agreeing (#1929).
1079
1224
  const isFetching = state(immediate);
1080
- const error = state(null);
1225
+ const error = state(hydrated ? (hydrated.error || null) : null);
1081
1226
  if (options.suspense) registerSuspense(loading, error);
1082
1227
 
1083
1228
  // A superseded or unmounted request must not resolve into a torn-down
@@ -1208,6 +1353,7 @@ else if (immediate) {
1208
1353
  // from the getter made an early component resolve refs from whichever
1209
1354
  // component happened to hydrate last.
1210
1355
  var ownerScope = currentLifecycleScope() || componentScope;
1356
+ var ownerRefs = ownerScope.$refs || (ownerScope.$refs = {});
1211
1357
 
1212
1358
  // Callable, as well as .current / .value.
1213
1359
  //
@@ -1222,7 +1368,7 @@ else if (immediate) {
1222
1368
  //
1223
1369
  // No backticks in here: this whole runtime is a template literal.
1224
1370
  var read = function () {
1225
- return (ownerScope.$refs && ownerScope.$refs[name]) || null;
1371
+ return ownerRefs[name] || null;
1226
1372
  };
1227
1373
  Object.defineProperty(read, 'current', { get: read, enumerable: true });
1228
1374
  Object.defineProperty(read, 'value', { get: read, enumerable: true });
@@ -1666,8 +1812,11 @@ finally {
1666
1812
  var resolvedUrl = typeof url === 'function' ? url() : url;
1667
1813
  var fetchOpts = {
1668
1814
  method: options.method || 'POST',
1669
- headers: { 'Content-Type': 'application/json', ...__stxHeaders(options.headers) },
1670
- body: typeof body === 'string' ? body : JSON.stringify(body)
1815
+ // A file upload is a FormData body. Stringifying it sent "{}", and
1816
+ // the browser has to write its own multipart Content-Type (the
1817
+ // boundary lives there), so raw bodies pass through untouched.
1818
+ headers: __stxRawBody(body) ? __stxHeaders(options.headers) : { 'Content-Type': 'application/json', ...__stxHeaders(options.headers) },
1819
+ body: typeof body === 'string' || __stxRawBody(body) ? body : JSON.stringify(body)
1671
1820
  };
1672
1821
  var response = await __stxFetch('useMutation', resolvedUrl, fetchOpts);
1673
1822
  if (!response.ok) throw await __stxHttpError(response);
@@ -1903,7 +2052,7 @@ catch (e) {
1903
2052
 
1904
2053
  function expressionUsesSignalMethod(expression, name) {
1905
2054
  var escapedName = name.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');
1906
- return new RegExp('(?:^|[^\\\\w$])' + escapedName + '\\\\s*\\\\.\\\\s*(?:set|update|subscribe|toggle)\\\\s*\\\\(').test(expression);
2055
+ return new RegExp('(?:^|[^\\\\w$])' + escapedName + '\\\\s*\\\\.\\\\s*(?:set|update|subscribe|toggle|input|change)\\\\s*\\\\(').test(expression);
1907
2056
  }
1908
2057
 
1909
2058
  function expressionUsesSignalValue(expression, name) {
@@ -2284,7 +2433,11 @@ catch (e) {
2284
2433
  value = undefined;
2285
2434
  }
2286
2435
 
2287
- if (value === false || value === null || value === undefined) {
2436
+ // ARIA states are strings, unlike HTML boolean attributes.
2437
+ if (name.startsWith('aria-') && typeof value === 'boolean') {
2438
+ el.setAttribute(name, String(value));
2439
+ }
2440
+ else if (value === false || value === null || value === undefined) {
2288
2441
  el.removeAttribute(name);
2289
2442
  }
2290
2443
  else if (value === true) {
@@ -2674,7 +2827,7 @@ catch (e2) {
2674
2827
  // :attr still works for backward compat but is reserved for structural directives.
2675
2828
  // x-text, x-html, x-model, x-show, x-if, x-for, x-cloak, x-ref, x-data are
2676
2829
  // handled by their own code paths below \u2014 exclude them here.
2677
- var X_HANDLED = ${J()};
2830
+ var X_HANDLED = ${L()};
2678
2831
  if (name.startsWith('@bind:') || name.startsWith('x-bind:')
2679
2832
  || (name.startsWith(':') && !name.startsWith('::') && !DIRECTIVE_NAMES[name.slice(1).split('.')[0]] && !EVENT_RE.test(name.slice(1)))
2680
2833
  || (name.startsWith('x-') && !X_HANDLED[name.split('.')[0]] && !X_HANDLED[name])) {
@@ -2745,7 +2898,10 @@ catch (e2) {
2745
2898
  }
2746
2899
  return;
2747
2900
  }
2748
- if (v === false || v === null || v === undefined) {
2901
+ if (attrName.startsWith('aria-') && typeof v === 'boolean') {
2902
+ el.setAttribute(attrName, String(v));
2903
+ }
2904
+ else if (v === false || v === null || v === undefined) {
2749
2905
  el.removeAttribute(attrName);
2750
2906
  }
2751
2907
  else if (v === true) {
@@ -2785,14 +2941,36 @@ else if (name === '@html' || name === ':html' || name === 'x-html') {
2785
2941
  el.removeAttribute(name);
2786
2942
  }
2787
2943
  else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data-stx-ref') {
2788
- // Store ref in scope.$refs and componentScope.$refs
2789
- if (scope.$refs) scope.$refs[value] = el;
2790
- if (componentScope.$refs) componentScope.$refs[value] = el;
2944
+ // A page ref can be projected through a component whose own $refs
2945
+ // replaced the compatibility scope's map. The compiler retains the
2946
+ // receiver boundary so named and signal refs use the same caller.
2947
+ var refRoot = el.closest && el.closest('[data-stx-scope]');
2948
+ var refCaller = el.getAttribute('data-stx-ref-caller');
2949
+ var refOwnerScope = findElementScope(el);
2950
+ if (refCaller) {
2951
+ var receiver = refRoot;
2952
+ while (receiver && receiver.getAttribute('data-stx-scope') !== refCaller
2953
+ && receiver.getAttribute('data-stx-template-scope') !== refCaller) {
2954
+ receiver = receiver.parentElement && receiver.parentElement.closest('[data-stx-scope]');
2955
+ }
2956
+ refOwnerScope = receiver && receiver.__stx_parent_scope;
2957
+ }
2958
+ // Only projected refs may reach outside their component. Caller
2959
+ // snapshots exclude unrelated, previously hydrated siblings.
2960
+ if (refCaller && refOwnerScope) {
2961
+ if (refOwnerScope.$refs) refOwnerScope.$refs[value] = el;
2962
+ }
2963
+ else {
2964
+ if (scope.$refs) scope.$refs[value] = el;
2965
+ if (componentScope.$refs) componentScope.$refs[value] = el;
2966
+ }
2791
2967
  // Also fill a same-named signal declared in the script block, so the
2792
2968
  // documented ref() + x-ref pair works and reading the signal returns
2793
2969
  // the element. Without this the signal stayed empty and every read of
2794
2970
  // it silently returned undefined.
2795
- var refTarget = (scope && scope[value]) || componentScope[value];
2971
+ var refTarget = refCaller && refOwnerScope
2972
+ ? refOwnerScope[value]
2973
+ : (scope && scope[value]) || componentScope[value];
2796
2974
  if (refTarget && typeof refTarget === 'function' && refTarget._isSignal && typeof refTarget.set === 'function') {
2797
2975
  refTarget.set(el);
2798
2976
  }
@@ -2800,7 +2978,12 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
2800
2978
  else if (name.startsWith('@') || name.startsWith(':')) {
2801
2979
  // Event handlers: @click, :click, @submit.prevent, :keydown.enter, etc.
2802
2980
  const parts = name.slice(1).split('.');
2803
- const eventName = parts[0];
2981
+ // HTML folds attribute names to lowercase; the forwarding metadata
2982
+ // retains the declared event spelling (e.g. update:modelValue).
2983
+ const parentEventNames = (el.getAttribute && el.getAttribute('data-stx-parent-events') || '').split(/\\s+/);
2984
+ const eventName = parentEventNames.find(function(event) {
2985
+ return event.toLowerCase() === parts[0].toLowerCase();
2986
+ }) || parts[0];
2804
2987
  const modifiers = parts.slice(1);
2805
2988
 
2806
2989
  // Skip special directives (already handled above or in processElement)
@@ -2814,7 +2997,6 @@ else if (name === 'ref' || name === ':ref' || name === 'x-ref' || name === 'data
2814
2997
  el[eventKey] = true;
2815
2998
 
2816
2999
  // Capture scope at setup time so @for loop variables are available when event fires
2817
- const parentEventNames = (el.getAttribute && el.getAttribute('data-stx-parent-events') || '').split(/\\s+/);
2818
3000
  const isForwardedComponentEvent = !!(el.__stx_parent_scope && parentEventNames.includes(eventName));
2819
3001
  const eventCapturedScope = isForwardedComponentEvent
2820
3002
  ? { ...globalHelpers, ...el.__stx_parent_scope }
@@ -5572,6 +5754,18 @@ catch (e) {} }
5572
5754
  return normalizedPrefix + '-' + __stxGeneratedIdCounter;
5573
5755
  }
5574
5756
 
5757
+ var createModelSignal = ${T.toString()};
5758
+ function useModel(name, options) {
5759
+ if (typeof name !== 'string') { options = name || {}; name = 'modelValue'; }
5760
+ options = options || {};
5761
+ var source = useReactiveProp(name, options.default, { parse: options.parse });
5762
+ var modifierName = name === 'modelValue' ? 'modelModifiers' : name + 'Modifiers';
5763
+ var modifiers = useReactiveProp(modifierName, {});
5764
+ var emit = window.stx.defineEmits(['update:' + name]);
5765
+ return createModelSignal(source, function() { return modifiers() || {}; },
5766
+ function(value) { emit('update:' + name, value); }, options, onDestroy);
5767
+ }
5768
+
5575
5769
  // Reactive prop binding. Bridges the gap between a parent's clientReactive
5576
5770
  // attribute (e.g. :open="modalOpen()" on a component) and the component's
5577
5771
  // internal state. Returns a signal whose value tracks the named attribute
@@ -6367,6 +6561,7 @@ catch (e) {} }
6367
6561
  onBeforeUnmount: onDestroy,
6368
6562
  onUnmounted: onDestroy,
6369
6563
  useFetch,
6564
+ clearServerData,
6370
6565
  useRef,
6371
6566
  navigate,
6372
6567
  refresh,
@@ -6406,6 +6601,7 @@ catch (e) {} }
6406
6601
  useCookie,
6407
6602
  useId,
6408
6603
  useReactiveProp,
6604
+ useModel,
6409
6605
  useEventListener,
6410
6606
  useWebSocket,
6411
6607
  useColorMode,
@@ -6543,6 +6739,60 @@ catch (e) {} }
6543
6739
  })(gKey, opts.getters[gKey]);
6544
6740
  }
6545
6741
  }
6742
+ // An action that mutates state in place \u2014 this.list.push(x),
6743
+ // this.list[i] = x, delete this.map[k] \u2014 never went through set(),
6744
+ // so nothing that read the list re-ran. A detail page upserting the
6745
+ // record it had just fetched kept rendering "not found" until some
6746
+ // unrelated action happened to reassign the whole list.
6747
+ //
6748
+ // So an array or plain object read through this comes back as a
6749
+ // view that notifies its signal on write. The view is shallow:
6750
+ // elements read through it are the raw ones, so identity checks
6751
+ // (includes, indexOf, ===) still hold.
6752
+ var mutatingArrayMethods = { push: 1, pop: 1, shift: 1, unshift: 1, splice: 1, sort: 1, reverse: 1, fill: 1, copyWithin: 1 };
6753
+ var viewRaw = new WeakMap();
6754
+ var viewCache = new WeakMap();
6755
+ var unwrapView = function(v) {
6756
+ return (v && typeof v === 'object' && viewRaw.has(v)) ? viewRaw.get(v) : v;
6757
+ };
6758
+ var isPlainContainer = function(v) {
6759
+ if (!v || typeof v !== 'object') return false;
6760
+ if (Array.isArray(v)) return true;
6761
+ var proto = Object.getPrototypeOf(v);
6762
+ return proto === Object.prototype || proto === null;
6763
+ };
6764
+ var mutableView = function(sig, raw) {
6765
+ var cached = viewCache.get(raw);
6766
+ if (cached && cached.sig === sig) return cached.view;
6767
+ var view = new Proxy(raw, {
6768
+ get: function(target, p) {
6769
+ if (Array.isArray(target) && typeof p === 'string' && mutatingArrayMethods[p]) {
6770
+ // One notification per call, not one per index it writes.
6771
+ return function() {
6772
+ var args = Array.prototype.map.call(arguments, unwrapView);
6773
+ var out = Array.prototype[p].apply(target, args);
6774
+ sig.trigger();
6775
+ return out === target ? view : out;
6776
+ };
6777
+ }
6778
+ return Reflect.get(target, p, target);
6779
+ },
6780
+ set: function(target, p, v) {
6781
+ target[p] = unwrapView(v);
6782
+ sig.trigger();
6783
+ return true;
6784
+ },
6785
+ deleteProperty: function(target, p) {
6786
+ var had = Object.prototype.hasOwnProperty.call(target, p);
6787
+ delete target[p];
6788
+ if (had) sig.trigger();
6789
+ return true;
6790
+ }
6791
+ });
6792
+ viewRaw.set(view, raw);
6793
+ viewCache.set(raw, { sig: sig, view: view });
6794
+ return view;
6795
+ };
6546
6796
  // Bind actions with proxy for this.propName access
6547
6797
  if (opts.actions) {
6548
6798
  for (var aKey in opts.actions) {
@@ -6550,12 +6800,17 @@ catch (e) {} }
6550
6800
  result[actionKey] = function() {
6551
6801
  var proxy = new Proxy({}, {
6552
6802
  get: function(_, p) {
6553
- if (result[p] && result[p]._isSignal) return result[p]();
6803
+ if (result[p] && result[p]._isSignal) {
6804
+ var current = result[p]();
6805
+ return (typeof result[p].trigger === 'function' && isPlainContainer(current))
6806
+ ? mutableView(result[p], current)
6807
+ : current;
6808
+ }
6554
6809
  if (result[p]) return result[p];
6555
6810
  return undefined;
6556
6811
  },
6557
6812
  set: function(_, p, v) {
6558
- if (result[p] && result[p]._isSignal) { result[p].set(v); return true; }
6813
+ if (result[p] && result[p]._isSignal) { result[p].set(unwrapView(v)); return true; }
6559
6814
  return false;
6560
6815
  }
6561
6816
  });
@@ -7143,6 +7398,7 @@ else {
7143
7398
  window.onMount = onMount;
7144
7399
  window.onDestroy = onDestroy;
7145
7400
  window.useFetch = useFetch;
7401
+ window.clearServerData = clearServerData;
7146
7402
  window.useRef = useRef;
7147
7403
  window.navigate = navigate;
7148
7404
  window.goBack = goBack;
@@ -8204,5 +8460,5 @@ catch (e) { console.warn('[stx] destroy callback error:', e); }
8204
8460
  }
8205
8461
  }
8206
8462
  })();
8207
- `}var C={state:K,derived:N,effect:O,batch:P,onMount:Q,onDestroy:T,isSignal:U,isDerived:V,untrack:W,peek:Y,generateSignalsRuntime:$,generateSignalsRuntimeDev:Z};
8208
- export{$ as tj,Z as uj,C as vj};
8463
+ `}var Yz={state:B,derived:R,effect:H,batch:S,onMount:F,onDestroy:M,isSignal:E,isDerived:P,untrack:O,peek:I,generateSignalsRuntime:C,generateSignalsRuntimeDev:x};
8464
+ export{f as jj,k as kj,v as lj,U as mj,g as nj,m as oj,y as pj,h as qj,p as rj,u as sj,l as tj,d as uj,i as vj,n as wj,D as xj,C as yj,x as zj,Yz as Aj};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  import C from"path";var G=".stx",K="STX_DIR",J=null;function O(j){J=j?.trim()||null}function H(){return process.env[K]?.trim()||J||G}function Q(j=process.cwd(),...q){let B=H();return C.isAbsolute(B)?C.join(B,...q):C.join(j,B,...q)}function W(j){if(!j||C.isAbsolute(j))return j;let q=j.replace(/\\/g,"/");if(q!==G&&!q.startsWith(`${G}/`))return j;let B=q.slice(G.length+1);return B?C.join(H(),B):H()}
3
- export{G as Lt,K as Mt,O as Nt,H as Ot,Q as Pt,W as Qt};
3
+ export{G as iu,K as ju,O as ku,H as lu,Q as mu,W as nu};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$i as e,Xi as a,Yi as b,Zi as c,_i as d,aj as f,bj as g,cj as h,dj as i,ej as j,fj as k,gj as l,hj as m,ij as n}from"./chunk-z9ezmjwd.js";import"./chunk-hay1rzb0.js";import"./chunk-2h94c5hm.js";import"./chunk-8jam44my.js";import"./chunk-t51mwjyq.js";import"./chunk-wfffa8zm.js";import"./chunk-54f8bpp6.js";import"./chunk-4evbx7sz.js";import"./chunk-jxxv18a0.js";import"./chunk-c131k3mt.js";import"./chunk-hgjjnjas.js";import"./chunk-nqq7y7m9.js";import"./chunk-1c2j4eby.js";import"./chunk-kxavsh3m.js";import"./chunk-qev11kg8.js";import"./chunk-rrankpmj.js";import"./chunk-fczfdsab.js";import"./chunk-fp7ms6e7.js";import"./chunk-jp2f8yzw.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -355,4 +355,4 @@ catch (error) {
355
355
  console.log('[stx] Async component runtime initialized');
356
356
  })();
357
357
  `}
358
- export{X as Gi,Y as Hi,Z as Ii,_ as Ji,$ as Ki};
358
+ export{X as wi,Y as xi,Z as yi,_ as zi,$ as Ai};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-ddqkj56r.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
2
+ import{l as a,m as b,n as c}from"./chunk-q9n5swx7.js";import"./chunk-jp2f8yzw.js";export{c as updateContextTree,b as updateContextStoryFiles,a as createContext};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$p as e,Po as a,Ro as b,To as c,Uo as d,aq as f,bq as g,cq as h,dq as i,eq as j,fq as k,gq as l,hq as m,iq as n,jq as o,kq as p,lq as q,mq as r,nq as s,oq as t,pq as u,qq as v,rq as w,sq as x}from"./chunk-hay1rzb0.js";import"./chunk-2h94c5hm.js";import"./chunk-8jam44my.js";import"./chunk-t51mwjyq.js";import"./chunk-wfffa8zm.js";import"./chunk-54f8bpp6.js";import"./chunk-4evbx7sz.js";import"./chunk-jxxv18a0.js";import"./chunk-c131k3mt.js";import"./chunk-hgjjnjas.js";import"./chunk-nqq7y7m9.js";import"./chunk-1c2j4eby.js";import"./chunk-kxavsh3m.js";import"./chunk-qev11kg8.js";import"./chunk-rrankpmj.js";import"./chunk-fczfdsab.js";import"./chunk-fp7ms6e7.js";import"./chunk-jp2f8yzw.js";export{e as validateTemplate,g as validateDirective,n as userComponentFileExists,m as transpileTypeScript,p as slotContentHasExpressions,k as shouldTranspileTypeScript,t as resolveTemplatePath,r as renderComponentWithSlot,j as isJavaScriptScript,o as isHydrateTrigger,d as hasVariables,h as hasDirectives,u as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,x as getComponentCacheStats,s as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,v as createDetailedErrorMessage,b as convertToCommonJS,q as componentClientSignalNames,w as clearComponentCache};
@@ -213,4 +213,4 @@ function w(Z,M){let{itemHeight:K,containerHeight:P,overscan:F=3,keyProperty:$="i
213
213
  })();
214
214
  </script>
215
215
  `})}var v={createVirtualList:w,processVirtualListDirectives:C,processInfiniteListDirectives:E,processVirtualGridDirectives:f,generateVirtualListCSS:b,useVirtualList:L};
216
- export{w as Si,C as Ti,b as Ui,L as Vi,E as Wi,f as Xi,v as Yi};
216
+ export{w as Ii,C as Ji,b as Ki,L as Li,E as Mi,f as Ni,v as Oi};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{if as a,jf as b,kf as c,lf as d,mf as e,nf as f,of as g,pf as h,qf as i,rf as j,sf as k,tf as l,uf as m,vf as n,wf as o}from"./chunk-ps20v1ah.js";import"./chunk-ddqkj56r.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};
2
+ import{$e as c,Ze as a,_e as b,af as d,bf as e,cf as f,df as g,ef as h,ff as i,gf as j,hf as k,if as l,jf as m,kf as n,lf as o}from"./chunk-ym3r8ktq.js";import"./chunk-jp2f8yzw.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};