@stacksjs/stx 0.2.396 → 0.2.398
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.
- package/dist/chunk-07syq64h.js +2 -0
- package/dist/{chunk-y4nzmkea.js → chunk-092qw0ps.js} +1 -1
- package/dist/{chunk-es9jp0c7.js → chunk-0rdhrgff.js} +1 -1
- package/dist/{chunk-cmzyyjwz.js → chunk-0trm18n0.js} +2 -2
- package/dist/{chunk-dj9capvb.js → chunk-0w6ghfqw.js} +2 -2
- package/dist/{chunk-3rg4ykrh.js → chunk-197z74b9.js} +1 -1
- package/dist/{chunk-pt8vq6be.js → chunk-1bdbrkt3.js} +1 -1
- package/dist/{chunk-q4jymqj3.js → chunk-1bdvnmxd.js} +3 -3
- package/dist/{chunk-q01hqekk.js → chunk-1ktxk84n.js} +1 -1
- package/dist/{chunk-fqq5k9ve.js → chunk-1t5vwavd.js} +1 -1
- package/dist/{chunk-qjvny3wf.js → chunk-2andsajh.js} +1 -1
- package/dist/{chunk-rxf0264w.js → chunk-2d0xzf2c.js} +2 -2
- package/dist/chunk-2vjkzrhy.js +2 -0
- package/dist/{chunk-1wm6zqj5.js → chunk-2weyb03p.js} +2 -2
- package/dist/{chunk-q9zsjgpf.js → chunk-3769e62c.js} +1 -1
- package/dist/{chunk-hbcf36nw.js → chunk-3wmdjemm.js} +2 -2
- package/dist/{chunk-ra1s4s6b.js → chunk-452k8psm.js} +1 -1
- package/dist/{chunk-c79nfdyj.js → chunk-4bb28mz5.js} +1 -1
- package/dist/{chunk-fc8471kb.js → chunk-4cv7bw5e.js} +2 -2
- package/dist/{chunk-9aj6v538.js → chunk-4eyzkbzj.js} +1 -1
- package/dist/chunk-4qm9rj1p.js +2 -0
- package/dist/chunk-4x73bm95.js +2 -0
- package/dist/{chunk-4dj5b57q.js → chunk-57yhrery.js} +1 -1
- package/dist/chunk-5h8q6dqb.js +2 -0
- package/dist/chunk-5zapxgys.js +2 -0
- package/dist/{chunk-mrnk4hbx.js → chunk-5zmppe0c.js} +1 -1
- package/dist/chunk-65y5abx7.js +2 -0
- package/dist/{chunk-y4zddt5r.js → chunk-683tfkz4.js} +1 -1
- package/dist/{chunk-atwrajjq.js → chunk-6b8j6812.js} +2 -2
- package/dist/chunk-6n0jamtd.js +2 -0
- package/dist/{chunk-bcpjhcpn.js → chunk-6rzwef28.js} +1 -1
- package/dist/{chunk-jea2901n.js → chunk-6s204hr5.js} +3 -3
- package/dist/{chunk-1c5w4nq4.js → chunk-76q768gt.js} +1 -1
- package/dist/{chunk-frp9fc7j.js → chunk-7eea1cse.js} +1 -1
- package/dist/{chunk-3wa1ybzj.js → chunk-7tgjn256.js} +1 -1
- package/dist/chunk-7vnkqnyh.js +2 -0
- package/dist/{chunk-jsggyhcg.js → chunk-81n38ak1.js} +1 -1
- package/dist/{chunk-qsq1eha8.js → chunk-88tt0qg0.js} +2 -2
- package/dist/{chunk-x45kj2fa.js → chunk-8ded3tn8.js} +2 -2
- package/dist/{chunk-pzhk6186.js → chunk-8qzc5n61.js} +1 -1
- package/dist/{chunk-ej8mv2k6.js → chunk-90zfg77v.js} +1 -1
- package/dist/{chunk-k33778kc.js → chunk-9368t9jm.js} +1 -1
- package/dist/{chunk-efsr5fbm.js → chunk-980w4zcq.js} +2 -2
- package/dist/chunk-9h3xq9j3.js +2 -0
- package/dist/chunk-9hh5eg8y.js +2 -0
- package/dist/{chunk-g7bpkpd4.js → chunk-9r2xgf5k.js} +1 -1
- package/dist/{chunk-634gaa9d.js → chunk-9vwpf0bk.js} +1 -1
- package/dist/chunk-a9702a2m.js +2 -0
- package/dist/{chunk-s7t37c7w.js → chunk-aeaf5nsy.js} +1 -1
- package/dist/{chunk-9wbys24b.js → chunk-aewsgyzc.js} +1 -1
- package/dist/chunk-ar5stjnb.js +2 -0
- package/dist/chunk-awrsqtve.js +2 -0
- package/dist/{chunk-5b8by1w4.js → chunk-azkk2n57.js} +1 -1
- package/dist/{chunk-pxy0wtn3.js → chunk-batgkbft.js} +145 -145
- package/dist/chunk-bd5gvhsw.js +2 -0
- package/dist/{chunk-3ha78evt.js → chunk-bdz7nznw.js} +2 -2
- package/dist/chunk-bj2aaf9j.js +2 -0
- package/dist/{chunk-zn70s4gs.js → chunk-c9kj8p6j.js} +1 -1
- package/dist/{chunk-tr02vys6.js → chunk-caj47vtj.js} +1 -1
- package/dist/chunk-cd6pe75s.js +2 -0
- package/dist/{chunk-ya5m5vbn.js → chunk-cks5rbzt.js} +1 -1
- package/dist/{chunk-vg8xrkbg.js → chunk-cq6e6de4.js} +3 -3
- package/dist/chunk-csgshaeh.js +3 -0
- package/dist/{chunk-y70wabha.js → chunk-cy8hgd86.js} +1 -1
- package/dist/{chunk-5mh3fpha.js → chunk-d0qy1ezf.js} +78 -11
- package/dist/{chunk-8np6m7vv.js → chunk-d4km7egg.js} +1 -1
- package/dist/{chunk-5y9tbnzb.js → chunk-dbfj1skz.js} +2 -2
- package/dist/chunk-dn6ayf7s.js +2 -0
- package/dist/{chunk-54323c6n.js → chunk-dvpk2rer.js} +1 -1
- package/dist/{chunk-j8jteztt.js → chunk-dz29q408.js} +1 -1
- package/dist/{chunk-3rf705aq.js → chunk-e1rv01pn.js} +2 -2
- package/dist/chunk-e8y26wfg.js +2 -0
- package/dist/{chunk-y33pm4g5.js → chunk-ekvejzvk.js} +1 -1
- package/dist/chunk-embs7re0.js +2 -0
- package/dist/{chunk-mvnjpwes.js → chunk-eqhsprr0.js} +1 -1
- package/dist/{chunk-n0d7nwhd.js → chunk-ewxbx67c.js} +1 -1
- package/dist/{chunk-1t80az59.js → chunk-ff6y270q.js} +2 -2
- package/dist/{chunk-cm5v3eep.js → chunk-fffbzsmv.js} +1 -1
- package/dist/{chunk-kaet6r9w.js → chunk-fj6fbqgb.js} +1 -1
- package/dist/{chunk-wf45k2yw.js → chunk-fsvkqeya.js} +2 -2
- package/dist/{chunk-0knxnyq6.js → chunk-g64qyhhb.js} +1 -1
- package/dist/{chunk-hestqebq.js → chunk-g7qmxjyc.js} +1 -1
- package/dist/chunk-gs4b132g.js +2 -0
- package/dist/{chunk-32vxn9kd.js → chunk-gtn2agxa.js} +2 -2
- package/dist/{chunk-y3vgzvwn.js → chunk-h01bbt3r.js} +1 -1
- package/dist/{chunk-apqq86bx.js → chunk-h55mae9h.js} +1 -1
- package/dist/{chunk-89tp5zsn.js → chunk-h8zp2fz9.js} +1 -1
- package/dist/chunk-h9eft9vj.js +2 -0
- package/dist/{chunk-58a6bzn0.js → chunk-hf784dsc.js} +2 -2
- package/dist/chunk-hfwknxbe.js +2 -0
- package/dist/{chunk-tdn55vs4.js → chunk-hm66z7e8.js} +1 -1
- package/dist/{chunk-khh1d2a9.js → chunk-hwzbc2v3.js} +2 -2
- package/dist/{chunk-tegrvgyn.js → chunk-j9x1hxhg.js} +1 -1
- package/dist/{chunk-nptdshhw.js → chunk-k2nydt80.js} +1 -1
- package/dist/{chunk-ehhqy624.js → chunk-kbyf95hm.js} +2 -2
- package/dist/{chunk-dct8xw04.js → chunk-kdwbpcm4.js} +2 -2
- package/dist/chunk-kp4ja0w3.js +2 -0
- package/dist/{chunk-7kw3grq5.js → chunk-kpg48dhw.js} +1 -1
- package/dist/chunk-kpqypx1g.js +2 -0
- package/dist/{chunk-z46czwd3.js → chunk-ky06aav6.js} +2 -2
- package/dist/{chunk-pv2trpk9.js → chunk-kyw2cbvn.js} +1 -1
- package/dist/{chunk-x21hdhjw.js → chunk-m3s6kzxv.js} +1 -1
- package/dist/{chunk-fb2cy0xx.js → chunk-m6par27a.js} +2 -2
- package/dist/chunk-macgqjre.js +2 -0
- package/dist/chunk-mhbexqwa.js +2 -0
- package/dist/chunk-mkfxc8ak.js +2 -0
- package/dist/{chunk-y32dbdta.js → chunk-mnk5mdwp.js} +1 -1
- package/dist/{chunk-g1vxsvqv.js → chunk-mwh3ymwc.js} +1 -1
- package/dist/{chunk-rc159ysy.js → chunk-n46e3gkr.js} +2 -2
- package/dist/{chunk-1260e2yv.js → chunk-p81zbym6.js} +1 -1
- package/dist/{chunk-n6fcg584.js → chunk-pdxbys31.js} +1 -1
- package/dist/{chunk-7hb89n3z.js → chunk-pkspqh0m.js} +1 -1
- package/dist/chunk-ppaqz92f.js +2 -0
- package/dist/{chunk-4byxvkzn.js → chunk-pvme0rs1.js} +3 -3
- package/dist/chunk-py5jmk33.js +2 -0
- package/dist/{chunk-pf80cwp6.js → chunk-qp4x0mwv.js} +185 -180
- package/dist/{chunk-jqq0h9sd.js → chunk-r1d9x0dy.js} +1 -1
- package/dist/{chunk-y9f2csr0.js → chunk-rwtj7j0r.js} +1 -1
- package/dist/{chunk-n0hrb3ek.js → chunk-rxz43r6k.js} +1 -1
- package/dist/{chunk-ys4hpkrp.js → chunk-st9vrfw7.js} +2 -2
- package/dist/{chunk-ats1a74d.js → chunk-tf964vs3.js} +33 -2
- package/dist/{chunk-rzp3bagj.js → chunk-v7q2nf37.js} +1 -1
- package/dist/chunk-vkg6rz7w.js +2 -0
- package/dist/chunk-vs4dafbz.js +2 -0
- package/dist/chunk-w4nmvn5v.js +2 -0
- package/dist/chunk-wfp942rp.js +2 -0
- package/dist/{chunk-m8z5450r.js → chunk-wh8vwykh.js} +1 -1
- package/dist/{chunk-8ph7mee2.js → chunk-x2wmn8m7.js} +2 -2
- package/dist/{chunk-k7f7391g.js → chunk-x86qttwm.js} +2 -2
- package/dist/{chunk-5mnj5ttg.js → chunk-xfedcdb2.js} +1 -1
- package/dist/{chunk-n98anpe9.js → chunk-yj5gkn17.js} +1 -1
- package/dist/chunk-ypxywr4x.js +2 -0
- package/dist/chunk-zc878avg.js +2 -0
- package/dist/chunk-zfy796r4.js +2 -0
- package/dist/{chunk-ra9hbqx4.js → chunk-zh3q10wd.js} +1 -1
- package/dist/{chunk-qvjhzwm8.js → chunk-zrnppyqz.js} +1 -1
- package/dist/{chunk-jzq847yd.js → chunk-ztffbc6a.js} +2 -2
- package/dist/cli.js +14 -14
- package/dist/composables/index.d.ts +4 -0
- package/dist/composables/index.js +3 -0
- package/dist/composables/use-storage.d.ts +20 -0
- package/dist/composables/use-storage.js +25 -0
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/pwa.js +2 -2
- package/dist/runtime-globals.js +2 -0
- package/dist/script-validation.d.ts +2 -9
- package/dist/script-validation.js +87 -2
- package/dist/signal-processing.js +1 -1
- package/dist/signals.js +31 -0
- package/dist/ssg.js +2 -2
- package/dist/stx-module.d.ts +2 -0
- package/dist/stx.d.ts +6 -0
- package/dist/types/config-types.d.ts +16 -1
- package/dist/utils.js +1 -1
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/stx-module.d.ts +2 -0
- package/stx.d.ts +6 -0
- package/dist/chunk-0daceza4.js +0 -2
- package/dist/chunk-127ypa40.js +0 -2
- package/dist/chunk-2efz2s54.js +0 -2
- package/dist/chunk-2nt55z1b.js +0 -2
- package/dist/chunk-2xj61qk5.js +0 -2
- package/dist/chunk-3tde530g.js +0 -2
- package/dist/chunk-4pse0geh.js +0 -2
- package/dist/chunk-4rf7mxs6.js +0 -2
- package/dist/chunk-817833d8.js +0 -2
- package/dist/chunk-8axek0a6.js +0 -2
- package/dist/chunk-8hqayvjh.js +0 -3
- package/dist/chunk-8zeqzwsd.js +0 -2
- package/dist/chunk-a62080cs.js +0 -2
- package/dist/chunk-b2kagama.js +0 -2
- package/dist/chunk-b9tzp38b.js +0 -2
- package/dist/chunk-bkhxfr92.js +0 -2
- package/dist/chunk-bqajw5yd.js +0 -2
- package/dist/chunk-c10nf8ef.js +0 -2
- package/dist/chunk-c41zj3zg.js +0 -2
- package/dist/chunk-d2zrde0h.js +0 -2
- package/dist/chunk-dbxk0wym.js +0 -2
- package/dist/chunk-dpafnyqg.js +0 -2
- package/dist/chunk-em3jpym6.js +0 -2
- package/dist/chunk-er2twjr1.js +0 -2
- package/dist/chunk-fgqc5wne.js +0 -2
- package/dist/chunk-hh4vy76v.js +0 -2
- package/dist/chunk-kaaqzwqf.js +0 -2
- package/dist/chunk-km5t630j.js +0 -2
- package/dist/chunk-mayprgb9.js +0 -2
- package/dist/chunk-mv4b8b28.js +0 -2
- package/dist/chunk-rs70a3j6.js +0 -2
- package/dist/chunk-rz4vp8t9.js +0 -2
- package/dist/chunk-twtaa0nh.js +0 -2
- package/dist/chunk-vzt8h4vw.js +0 -2
- package/dist/chunk-w3ajb1nk.js +0 -2
- package/dist/chunk-w7zaavk8.js +0 -2
- package/dist/chunk-xhpjh1ja.js +0 -2
- package/dist/chunk-zmwj9r73.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var M=null,R=[],N=0,U=new Set;function X(){return M}function Y(j){let H=M;return R.push(j),M=j,H}function Z(j){R.pop(),M=j}function _(){return N>0}function $(j){U.add(j)}function B(j){N++;try{j()}finally{if(N--,N===0){let H=[...U];U.clear();for(let F of H)F()}}}function A(j){let H=M;M=null;try{return j()}finally{M=H}}var O=[],P=[];function q(j){let H=j,F=new Set,G=new Set,I=()=>{let z=X();if(z)G.add(z);return H};return I.set=(z)=>{if(!Object.is(z,H)){let J=H;if(H=z,F.forEach((K)=>{try{K(H,J)}catch(L){console.error("[stx] subscriber error:",L)}}),_())G.forEach((K)=>$(K));else G.forEach((K)=>K())}},I.update=(z)=>{I.set(z(H))},I.subscribe=(z)=>{return F.add(z),()=>F.delete(z)},Object.defineProperty(I,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(I,"value",{get:()=>I(),set:(z)=>I.set(z),configurable:!0}),I}function E(j){let H,F=!0,G=new Set,I=()=>{if(!F)if(F=!0,_())G.forEach((J)=>$(J));else G.forEach((J)=>J())},z=()=>{let J=X();if(J)G.add(J);if(F){let K=Y(I);try{H=j()}finally{Z(K)}F=!1}return H};return Object.defineProperty(z,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(z,"value",{get:()=>z(),configurable:!0}),z}function V(j,H={}){let F,G=!1,I=()=>{if(G)return;if(F){let J=F;F=void 0;try{J()}catch(K){console.error("[stx] effect cleanup error:",K)}}let z=Y(I);try{let J=j();F=typeof J==="function"?J:void 0}catch(J){G=!0,console.error("[stx] effect error (the effect is disposed):",J)}finally{Z(z)}};if(H.immediate!==!1)I();return()=>{if(G=!0,F){let z=F;F=void 0,z()}}}function h(j){B(j)}function k(j){O.push(j)}function g(j){P.push(j)}function o(){W(O,"onMount",P)}function v(){W(P,"onDestroy")}function W(j,H,F){let G=j.splice(0,j.length);for(let I of G)try{let z=I();if(F&&typeof z==="function")F.push(z)}catch(z){console.error(`[stx] ${H} callback threw:`,z)}}function d(){return{mount:O.length,destroy:P.length}}function m(j){return typeof j==="function"&&j._isSignal===!0}function w(j){return typeof j==="function"&&j._isDerived===!0}function p(j){if(m(j)||w(j))return j();return j}function D(j){return A(j)}function f(j,H){let F=typeof j==="function"?j:()=>j,G=q([]),I=E(()=>G().reduce((K,L)=>H(K,L.action),F())),z=!1;return V(()=>{if(F(),!z){z=!0;return}if(D(()=>G().length))G.set([])}),[I,(K,L)=>{let T={action:K};G.set([...G(),T]);let Q=()=>{let x=G().filter((C)=>C!==T);if(x.length!==G().length)G.set(x)};if(L&&typeof L.then==="function")Promise.resolve(L).then(Q,Q);return Q}]}
|
|
3
|
-
export{X as
|
|
3
|
+
export{X as uj,Y as vj,Z as wj,_ as xj,$ as yj,q as zj,E as Aj,V as Bj,h as Cj,k as Dj,g as Ej,o as Fj,v as Gj,d as Hj,m as Ij,w as Jj,p as Kj,D as Lj,f as Mj};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import G from"path";var L=new Set([".jpg",".jpeg",".png",".gif"]),O=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function M(j,z){let H=z.formats??O;if(!z.publicDir)return j;let C=N(j),J=[],Y=/<img\b[^>]*?>/gi,K=[],Q;while((Q=Y.exec(j))!==null){let q=Q[0],y=q.match(/\bsrc=["']([^"']+)["']/i);if(!y)continue;if(_(Q.index,C))continue;K.push({idx:Q.index,length:q.length,src:y[1],raw:q})}if(K.length===0)return j;let Z=await Promise.all(K.map(async(q)=>{let y=await X(q.src,z.publicDir,H);return{match:q,sources:y}}));for(let{match:q,sources:y}of Z){if(y.length===0)continue;let I=`<picture>${y.map(($)=>`<source type="${$.mime}" srcset="${w($.url)}">`).join("")}${q.raw}</picture>`;J.push({start:q.idx,end:q.idx+q.length,replacement:I})}if(J.length===0)return j;let V="",W=0;for(let q of J)V+=j.slice(W,q.start),V+=q.replacement,W=q.end;return V+=j.slice(W),V}async function X(j,z,H){if(!F(j))return[];let C=G.extname(j).toLowerCase();if(!L.has(C))return[];if(!j.startsWith("/"))return[];let J=G.join(z,j.slice(1)),Y=G.dirname(J),K=G.basename(J,C),Q=G.resolve(Y),Z=G.resolve(z);if(!Q.startsWith(Z))return[];let V=G.posix.dirname(j),W=H.map(async(y)=>{let k=G.join(Y,`${K}${y.ext}`);if(!await Bun.file(k).exists())return null;return{url:G.posix.join(V,`${K}${y.ext}`),mime:y.mime}});return(await Promise.all(W)).filter((y)=>y!==null)}function F(j){if(!j)return!1;if(j.startsWith("http://")||j.startsWith("https://"))return!1;if(j.startsWith("//"))return!1;if(j.startsWith("data:"))return!1;return!0}function N(j){let z=[],H=/<picture\b[^>]*>[\s\S]*?<\/picture>/gi,C;while((C=H.exec(j))!==null)z.push([C.index,C.index+C[0].length]);return z}function _(j,z){for(let[H,C]of z)if(j>=H&&j<C)return!0;return!1}function w(j){return j.replace(/&/g,"&").replace(/"/g,""")}
|
|
3
|
-
export{M as
|
|
3
|
+
export{M as hi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ni as T,Oi as u,Pi as A}from"./chunk-452k8psm.js";import{bl as g,il as h,ol as b}from"./chunk-6b8j6812.js";import{Do as f,Fr as I,em as k,nq as B}from"./chunk-qp4x0mwv.js";import{Av as D,Bv as S}from"./chunk-rwtj7j0r.js";import{Fv as F}from"./chunk-csgshaeh.js";import P from"path";var j=new Map,K=new Map,n=["composables","functions"];function p(z){let H=P.basename(z,".ts");return H==="index"||H==="types"||z.endsWith(".d.ts")}async function r(z){if(z)return P.resolve(z);let H=`<default>:${process.cwd()}`,Y=K.get(H);if(Y!==void 0)return Y;let J=await l();if(J!==null)K.set(H,J);return J}async function l(){let z=await I(),H=z.root||process.cwd(),Y=z.composablesDir;if(Y)return P.resolve(H,Y);for(let J of n){let V=P.resolve(H,J);try{let Z=new Bun.Glob("**/*.ts");for await(let W of Z.scan({cwd:V,absolute:!0}))if(!p(W))return V}catch{}}return null}async function m(z){let H=Array.isArray(z)?z:z?[P.resolve(z)]:(await I())._layerComposableDirs??[await r()].filter((J)=>!!J),Y=new Map;for(let J of H){let V=new Bun.Glob("**/*.ts");try{for await(let Z of V.scan({cwd:J,absolute:!0})){let W=P.relative(J,Z);if(!p(Z)&&!Y.has(W))Y.set(W,Z)}}catch{}}return{key:H.join("\x00"),files:[...Y.values()].sort()}}async function Wq(z){let{files:H}=await m(z),Y=B({loader:"ts",target:"browser",define:k()}),J=[];for(let V of H)try{let Z=await Bun.file(V).text(),W=Y.scan(Z).exports.filter((G)=>G!=="default");if(W.length>0)J.push({file:V,names:W})}catch{}return J}function c(z,H){return new RegExp(`\\b${H.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(z)}function a(z,H,Y){let J=new Map;for(let{file:G,names:$}of z)for(let O of $)if(!J.has(O))J.set(O,G);let V=(G)=>{let $=[];for(let[O,w]of J)if(c(G,O))$.push(w);return $},Z=new Set,W=Y.flatMap(V);while(W.length>0){let G=[];for(let $ of W){if(Z.has($))continue;Z.add($);for(let O of V(H.get($)??""))if(!Z.has(O))G.push(O)}W=G}return Z}async function Yq(z,H,Y){let{key:J,files:V}=await m(z);if(!J)return null;let Z=()=>[...new Set([...V,...V.flatMap((q)=>g(q))])],W=T(Z());if(V.length===0)return A(j,J,W,""),null;V.sort();let G=B({loader:"ts",target:"browser",define:k()}),$=new Map,O=[];for(let q of V)try{let Q=await Bun.file(q).text();$.set(q,Q);let U=G.scan(Q).exports.filter((X)=>X!=="default");if(U.length>0)O.push({file:q,names:U})}catch{$.set(q,"")}let w=H===void 0?new Set(V):a(O,$,Y?[H,...Y]:[H]);if(w.size===0)return null;let _=V.filter((q)=>w.has(q)),M=`${J}\x00${_.join("\x00")}`,v=u(j,M,W);if(v!==void 0)return v||null;let R=[],L=new Set,C=new Set;for(let q of _)try{let Q=$.get(q)??await Bun.file(q).text(),U=P.basename(q,".ts");for(let X of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])C.add(X[1]);try{for(let X of G.scan(Q).exports)if(X!=="default")L.add(X)}catch{}if(Q=D(Q),h(Q))Q=await b(Q,q,{projectRoot:process.cwd(),externalizeUserModules:!1}),Q=f(Q);Q=S(Q),Q=Q.replace(/^export\s+(default\s+)?/gm,""),Q=G.transformSync(Q),R.push(`// Composable: ${U}
|
|
3
3
|
${Q.trim()}`)}catch(Q){console.warn(`[stx] Failed to load composable ${q}:`,Q)}if(R.length===0||L.size===0)return A(j,M,W,""),null;let t=[...L].map((q)=>` try { if (!(${JSON.stringify(q)} in __c)) __c[${JSON.stringify(q)}] = ${q}; } catch (e) {}`).join(`
|
|
4
4
|
`),N=JSON.stringify([...L]),E=R.join(`
|
|
5
5
|
|
|
@@ -30,4 +30,4 @@ ${t}
|
|
|
30
30
|
__published[__n] = true;
|
|
31
31
|
}
|
|
32
32
|
})();`;return W=T(Z()),A(j,M,W,x),x}function Zq(){j.clear(),K.clear()}
|
|
33
|
-
export{Wq as
|
|
33
|
+
export{Wq as ii,Yq as ji,Zq as ki};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{$v as
|
|
2
|
+
import{$v as a,Aw as B,Bw as C,Cw as D,Dw as E,Ew as F,Fw as G,Gw as H,Hw as I,Iw as J,Kw as K,Lw as L,Nw as M,aw as b,bw as c,cw as d,dw as e,ew as f,fw as g,gw as h,hw as i,iw as j,jw as k,kw as l,lw as m,mw as n,nw as o,ow as p,pw as q,qw as r,rw as s,sw as t,tw as u,uw as v,vw as w,ww as x,xw as y,yw as z,zw as A}from"./chunk-d0qy1ezf.js";import"./chunk-rxz43r6k.js";M();export{o as setAppUrl,H as runMiddleware,r as route,j as resolveLayoutChain,s as resetRoutes,z as registerMiddleware,g as patternToRegex,t as navigateTo,h as matchRoute,E as loadMiddlewareFromDirectory,c as isNonPageRoutePattern,b as isNonPageRoutePath,B as hasMiddleware,L as getRouterScriptDev,K as getRouterScript,D as getMiddlewareNames,A as getMiddleware,d as generateRouteTypes,e as generateRouteManifest,n as formatRoutes,m as findErrorPage,f as filePathToPattern,J as extractLayoutMetadata,I as deriveLayoutGroup,q as defineRoutes,p as defineRoute,v as defineMiddleware,y as createStorageManager,w as createServerCookieManager,l as createRouter,F as createRouteLocation,G as createMiddlewareContext,x as createClientCookieManager,C as clearMiddleware,i as bracketPathToRegex,u as abortNavigation,k as Router,a as NON_PAGE_DIRS};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Fh as a,Gh as b,Hh as c,Ih as d,Jh as e,Kh as f,Lh as g}from"./chunk-9r2xgf5k.js";import"./chunk-rxz43r6k.js";export{d as useVirtualList,b as processVirtualListDirectives,f as processVirtualGridDirectives,e as processInfiniteListDirectives,c as generateVirtualListCSS,g as default,a as createVirtualList};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var{WebView:F}=globalThis.Bun;import{existsSync as V,mkdirSync as k,readdirSync as O,statSync as E}from"fs";import $ from"path";var C=16384;function X(j){if(/^https?:\/\//.test(j)||j.startsWith("file://"))return j;return`file://${$.resolve(j)}`}function K(j,B,z,L){return new Promise((Q)=>{let J=!1,G,Y,R=()=>{if(!J){if(J=!0,clearTimeout(Y),G)clearTimeout(G);j.onNavigated=void 0,Q()}};Y=setTimeout(R,L),j.onNavigated=()=>{if(!J)G=setTimeout(R,z)};try{let Z=j.navigate(B);if(Z&&typeof Z.catch==="function")Z.catch(R)}catch{R()}})}async function U(j,B,z){let L=`!!document.querySelector(${JSON.stringify(B)})`,Q=Date.now()+z;while(Date.now()<Q){try{if(await j.evaluate(L))return}catch{}await new Promise((J)=>setTimeout(J,100))}}async function _(j){try{let B=await j.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof B==="number"&&Number.isFinite(B)&&B>0?Math.min(B,C):0}catch{return 0}}async function x(j,B,z={}){let L=Math.min(z.width??1440,C),Q=Math.min(z.height??2200,C),J=z.waitMs??800,G=z.timeoutMs??15000,Y=z.format??"png",R=X(j),Z=(q)=>new F({width:L,height:q,headless:!0,...z.backend?{backend:z.backend}:{}}),P=Z(Q);try{if(await K(P,R,J,G),z.waitSelector)await U(P,z.waitSelector,G);if(z.fullPage){let H=await _(P);if(H>Q){if(P.close(),P=Z(H),await K(P,R,J,G),z.waitSelector)await U(P,z.waitSelector,G)}}let q=await P.screenshot({encoding:"buffer",format:Y});k($.dirname($.resolve(B)),{recursive:!0}),await Bun.write(B,q)}finally{P.close()}if(!V(B))throw Error(`Screenshot was not produced for ${j}`);return{input:j,output:B,bytes:E(B).size}}async function W(j,B,z={}){k(B,{recursive:!0});let L;if(!/^https?:\/\//.test(j)&&V(j)&&E(j).isDirectory())L=O(j).filter((G)=>G.endsWith(".html")).map((G)=>$.join(j,G));else L=[j];let Q=z.format??"png",J=[];for(let G of L){let Y=/^https?:\/\//.test(G)?new URL(G).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":$.basename(G).replace(/\.html?$/,"");J.push(await x(G,$.join(B,`${Y}.${Q}`),z))}return J}
|
|
3
|
-
export{x as
|
|
3
|
+
export{x as Ve,W as We};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Aq as y,No as a,Po as b,Ro as c,So as d,gq as e,hq as f,iq as g,jq as h,kq as i,lq as j,mq as k,nq as l,oq as m,pq as n,qq as o,rq as p,sq as q,tq as r,uq as s,vq as t,wq as u,xq as v,yq as w,zq as x}from"./chunk-qp4x0mwv.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-1bdvnmxd.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-3wmdjemm.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{e as validateTemplate,g as validateDirective,o as userComponentFileExists,m as transpileTypeScript,q as slotContentHasExpressions,k as shouldTranspileTypeScript,n as scopeOnRootElement,u as resolveTemplatePath,s as renderComponentWithSlot,j as isJavaScriptScript,p as isHydrateTrigger,d as hasVariables,h as hasDirectives,v as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,y as getComponentCacheStats,t as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,w as createDetailedErrorMessage,b as convertToCommonJS,r as componentClientSignalNames,x as clearComponentCache};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Fm as P,Go as i,Mp as h,No as T,Om as k,cn as c,dn as l,vm as R,wm as O}from"./chunk-qp4x0mwv.js";import{Xs as S,Zs as y}from"./chunk-1bdvnmxd.js";import{Jw as ZJ,Mw as $J,Nw as UJ}from"./chunk-d0qy1ezf.js";import{Vw as m,Xw as YJ}from"./chunk-x2wmn8m7.js";import{$w as q,Yw as XJ}from"./chunk-rxz43r6k.js";var r=/\b(?:state|derived|effect|batch|ref|reactive|computed|watch|watchEffect)\s*(?:<[^>]*>)?\s*\(/;function s(J,Y,Q){let X={fullTag:Q,content:Y,attrs:J};if(/\bserver\b/.test(J))return{...X,type:"server"};if(/\bdata-stx-scoped\b/.test(J))return{...X,type:"client"};if(r.test(Y))return{...X,type:"signals"};if(/\bclient\b/.test(J)||/\btype\s*=\s*["']module["']/.test(J)||/\bsrc\s*=/.test(J))return{...X,type:"client"};return{...X,type:"server"}}var o=/^<script\b([^>]*)>([\s\S]*)<\/script\s*>$/i;function C(J){let Y=[],Q=[],X=[],$=0;while($<J.length){let Z=J.indexOf("<",$);if(Z===-1)break;let U=y(J,Z);if(U>Z){$=U;continue}let W=S(J,Z);if(W>Z){let j=J.slice(Z,W),F=o.exec(j);if(F){let K=s(F[1],F[2],j);switch(K.type){case"signals":Y.push(K);break;case"client":Q.push(K);break;case"server":X.push(K);break}}$=W;continue}$=Z+(J.startsWith("<!--",Z)?4:1)}return{signals:Y,client:Q,server:X}}var a=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function t(J){let Y=[],Q=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,X;while((X=Q.exec(J))!==null)Y.push({start:X.index,end:X.index+X[0].length});return Y}function v(J,Y){return Y.some((Q)=>J>=Q.start&&J<Q.end)}function e(J){let Y=(J||"").trim();if(!Y)return null;if(/[\s>+~,:]/.test(Y))return null;let Q={},X=Y,$=X.match(/^[a-z][\w-]*/i);if($)Q.tag=$[0].toLowerCase(),X=X.slice($[0].length);while(X.length>0){let Z=X.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(Z){if(Q.attr=Z[1],Z[3]!==void 0&&Z[3]!=="")Q.attrValue=Z[3];X=X.slice(Z[0].length);continue}let U=X.match(/^#([\w-]+)/);if(U){Q.id=U[1],X=X.slice(U[0].length);continue}let W=X.match(/^\.([\w-]+)/);if(W){Q.className=W[1],X=X.slice(W[0].length);continue}return null}if(!Q.tag&&!Q.attr&&!Q.id&&!Q.className)return null;return Q}function JJ(J,Y){if(Y.attr){if(!(Y.attrValue===void 0?new RegExp(`\\b${Y.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${Y.attr}\\s*=\\s*(["'])\\s*${Y.attrValue}\\s*\\1`,"i")).test(J))return!1}if(Y.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${Y.id}\\s*\\1`,"i").test(J))return!1}if(Y.className){let Q=J.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!Q)return!1;if(!Q[2].split(/\s+/).includes(Y.className))return!1}return!0}function x(J,Y="main"){let Q=e(Y);if(!Q)return null;let X=/<([a-z][\w-]*)\b([^>]*)>/gi,$=t(J),Z;while((Z=X.exec(J))!==null){if(v(Z.index,$))continue;let U=Z[1].toLowerCase(),W=Z[2]||"";if(W.trimEnd().endsWith("/")||a.has(U))continue;if(Q.tag&&Q.tag!==U)continue;if(!JJ(W,Q))continue;let j=Z[0],F=Z.index+j.length,K=new RegExp(`<(/?)${U}\\b([^>]*)>`,"gi");K.lastIndex=F;let G=1,B;while((B=K.exec(J))!==null){if(v(B.index,$))continue;let w=B[1]==="/";if(!w&&(B[2]||"").trimEnd().endsWith("/"))continue;if(G+=w?-1:1,G===0)return{openTag:j,openIndex:Z.index,start:F,end:B.index,tagName:U}}return null}return null}var _J="X-STX-Router",AJ="private, no-store";function IJ(J){return J.replace(/&#(\d+);/g,(Y,Q)=>f(Number(Q),Y)).replace(/&#x([0-9a-f]+);/gi,(Y,Q)=>f(Number.parseInt(Q,16),Y)).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function f(J,Y){if(!Number.isInteger(J)||J<0||J>1114111)return Y;try{return String.fromCodePoint(J)}catch{return Y}}function g(J){return J.headers.get("X-STX-Router")==="true"}function QJ(J,Y){if(!J)return Y;return J.split(",").some((X)=>X.trim().toLowerCase()===Y.toLowerCase())?J:`${J}, ${Y}`}function HJ(J){return{Vary:QJ(J,"X-STX-Router")}}import E from"path";YJ();ZJ();var WJ="stx-page-head:",jJ=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,D={dev:null,prod:null};function KJ(){let J=m()?"dev":"prod",Y=D[J];if(Y!==null)return Y;try{let Q=(UJ(),XJ($J)),X=J==="dev"&&typeof Q.getRouterScriptDev==="function"?Q.getRouterScriptDev:Q.getRouterScript;D[J]=`<script>${X()}</script>`}catch{D[J]=""}return D[J]}async function PJ(J,Y){if(Y===!1)return null;if(Y&&typeof Y==="string"){let X=E.resolve(J,Y);if(await Bun.file(X).exists())return X;return null}let Q=E.join(J,"app.stx");if(await Bun.file(Q).exists())return Q;return null}async function kJ(J,Y){try{let Q=await Bun.file(J).text(),X=Q,$=Q.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if($)X=$[1].trim();let Z=C(Q),U=[...Z.client.map((V)=>V.fullTag),...Z.signals.map((V)=>V.fullTag)],W=[],j=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,F;while((F=j.exec(Q))!==null)W.push(F[0]);let K=X;for(let V of Z.server)K=K.replace(V.fullTag,"");for(let V of Z.client)K=K.replace(V.fullTag,"");K=K.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let G="<!--__STX_PAGE_SLOT__-->";if(K=K.replace(/<slot\s*\/>/gi,G).replace(/<slot\s*>\s*<\/slot>/gi,G),!K.includes(G))return console.warn(`[stx] Shell ${J} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:B,extractVariables:w,defaultConfig:N,loadStxConfig:A}=await import("./chunk-mkfxc8ak.js"),I=await A(),z={__filename:J,__dirname:E.dirname(J)};for(let V of U){let L=V.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(L&&!V.includes("client")&&!V.includes('type="module"'))await w(L[1],z,J)}let _=await B(K,z,J,{...N,...I,...Y},new Set),H=_.indexOf(G);if(H===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:_.substring(0,H),afterSlot:_.substring(H+G.length),filePath:J,shellScripts:U,shellStyles:W}}catch(Q){return console.error(`[stx] Error processing shell ${J}:`,Q),null}}function TJ(J,Y,Q){let X,$="",Z=Y.match(jJ);if(Z){Y=Y.replace(Z[0],"");try{let K=Buffer.from(Z[1],"base64").toString("utf8"),G=K.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(G)X=G[1].trim();$=K.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let U=Q||X||"stx App",W=KJ(),j="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -26,5 +26,5 @@ ${W}
|
|
|
26
26
|
`));if($.length>0)N.push($.join(`
|
|
27
27
|
`));if(G.length>0)N.push(G.join(`
|
|
28
28
|
`));return N.push(K),N.join(`
|
|
29
|
-
`)}import M from"fs";import p from"path";function gJ(J,Y,Q){return{version:1,buildTime:new Date().toISOString(),routes:J,assets:Y,outputDir:Q}}function uJ(J,Y){let Q=p.join(Y,"manifest.json");M.writeFileSync(Q,JSON.stringify(J,null,2))}function mJ(J){let Y=p.join(J,"manifest.json");if(!M.existsSync(Y))return null;try{let Q=M.readFileSync(Y,"utf-8"),X=JSON.parse(Q);if(X.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${X.version}`),null;return X}catch(Q){return console.warn("[stx] Failed to load manifest:",Q),null}}function b(J,Y,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(Y)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function GJ(J){let Y=J.headers.get("content-type")||"",Q={},X=($,Z)=>{let U=Q[$];if(U===void 0)Q[$]=Z;else if(Array.isArray(U))U.push(Z);else Q[$]=[U,Z]};if(Y.includes("multipart/form-data")){let $=await J.formData();for(let[Z,U]of $.entries())if(typeof U==="string")X(Z,U);return Q}if(Y.includes("application/x-www-form-urlencoded")){for(let[$,Z]of new URLSearchParams(await J.text()).entries())X($,Z);return Q}return Q}function zJ(J){if(!J)return!1;let Y=J.toUpperCase();return Y!=="GET"&&Y!=="HEAD"}async function d(J,Y={}){let Q=Y.request,X=Y.method??Q?.method;if(!Q||!zJ(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let $={};try{$=await GJ(Q)}catch{}let Z=await J.action({request:Q,form:$,params:Y.params??{},query:J.query??{},cookies:Y.cookies??{}});if(Z&&typeof Z==="object"){let U=Z,W=BJ(U.cookies),j=U.redirect;if(typeof j==="string"&&j)return{redirect:j,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:F,redirect:K,...G}=U;if(Object.assign(J,G),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function BJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let Y=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){Y.push(b(Q,X));continue}if(X&&typeof X==="object"){let $=X;if(typeof $.value!=="string")continue;Y.push(b(Q,$.value,$))}}return Y}function cJ(J,Y=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let $ of Y)X.append("Set-Cookie",$);for(let[$,Z]of Object.entries(Q??{}))if($.toLowerCase()!=="location")X.set($,Z);return new Response(null,{status:303,headers:X})}async function tJ(J,Y={}){return(await n(J,Y)).html}async function eJ(J,Y={}){let{html:Q,context:X,redirect:$,cookies:Z}=await n(J,Y),U=c(X),W=l(X);if($)return{html:Q,redirect:$,cookies:Z,status:U,headers:W};let{extractStreamBoundaries:j}=await import("./chunk-
|
|
30
|
-
export{s as
|
|
29
|
+
`)}import M from"fs";import p from"path";function gJ(J,Y,Q){return{version:1,buildTime:new Date().toISOString(),routes:J,assets:Y,outputDir:Q}}function uJ(J,Y){let Q=p.join(Y,"manifest.json");M.writeFileSync(Q,JSON.stringify(J,null,2))}function mJ(J){let Y=p.join(J,"manifest.json");if(!M.existsSync(Y))return null;try{let Q=M.readFileSync(Y,"utf-8"),X=JSON.parse(Q);if(X.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${X.version}`),null;return X}catch(Q){return console.warn("[stx] Failed to load manifest:",Q),null}}function b(J,Y,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(Y)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function GJ(J){let Y=J.headers.get("content-type")||"",Q={},X=($,Z)=>{let U=Q[$];if(U===void 0)Q[$]=Z;else if(Array.isArray(U))U.push(Z);else Q[$]=[U,Z]};if(Y.includes("multipart/form-data")){let $=await J.formData();for(let[Z,U]of $.entries())if(typeof U==="string")X(Z,U);return Q}if(Y.includes("application/x-www-form-urlencoded")){for(let[$,Z]of new URLSearchParams(await J.text()).entries())X($,Z);return Q}return Q}function zJ(J){if(!J)return!1;let Y=J.toUpperCase();return Y!=="GET"&&Y!=="HEAD"}async function d(J,Y={}){let Q=Y.request,X=Y.method??Q?.method;if(!Q||!zJ(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let $={};try{$=await GJ(Q)}catch{}let Z=await J.action({request:Q,form:$,params:Y.params??{},query:J.query??{},cookies:Y.cookies??{}});if(Z&&typeof Z==="object"){let U=Z,W=BJ(U.cookies),j=U.redirect;if(typeof j==="string"&&j)return{redirect:j,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:F,redirect:K,...G}=U;if(Object.assign(J,G),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function BJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let Y=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){Y.push(b(Q,X));continue}if(X&&typeof X==="object"){let $=X;if(typeof $.value!=="string")continue;Y.push(b(Q,$.value,$))}}return Y}function cJ(J,Y=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let $ of Y)X.append("Set-Cookie",$);for(let[$,Z]of Object.entries(Q??{}))if($.toLowerCase()!=="location")X.set($,Z);return new Response(null,{status:303,headers:X})}async function tJ(J,Y={}){return(await n(J,Y)).html}async function eJ(J,Y={}){let{html:Q,context:X,redirect:$,cookies:Z}=await n(J,Y),U=c(X),W=l(X);if($)return{html:Q,redirect:$,cookies:Z,status:U,headers:W};let{extractStreamBoundaries:j}=await import("./chunk-zfy796r4.js"),F=j(X),K=J.streamTemplates;if(K&&Object.keys(K).length>0){let{processDirectives:G}=await import("./chunk-bd5gvhsw.js"),{defaultConfig:B}=await import("./chunk-hfwknxbe.js"),w=X.streamBoundaries||{},N={...B,autoShell:!1},A=Object.keys(K).map((z)=>({id:z,render:async()=>{let _=typeof w[z]==="function"?await w[z]():void 0;return G(K[z],{...X,$boundary:_},J.sourceFile,N,new Set)}})),I=new Set(A.map((z)=>z.id));F=[...(F||[]).filter((z)=>!I.has(z.id)),...A]}return{html:Q,boundaries:F&&F.length>0?F:void 0,cookies:Z,status:U,headers:W}}async function n(J,Y){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};if(!J.hasServerScripts&&!O(J.html))return{html:J.html,context:Q};for(let U of J.serverScriptContent)try{await T(U,Q,J.sourceFile)}catch(W){if(Y.__stx_strict_hydration)throw W;console.warn(`[stx] Server script error in ${J.sourceFile}:`,W)}let X=await d(Q,{request:Y.request,method:Y.method,params:Y.params??{},cookies:Y.cookies??{}}),$=(U)=>{let W=U.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),j=i(Q);if(!j)return W;let F=W.indexOf("</head>");return F<0?j+W:W.slice(0,F)+j+W.slice(F)};if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!O(J.html))return{html:$(J.html),context:Q,cookies:X.cookies};let Z=new Map;for(let[U,W]of Object.entries(J.placeholders))if(W.expression)try{let j=k(W.expression,Q);if(W.type==="raw")Z.set(U,j!==void 0&&j!==null?String(j):"");else Z.set(U,j!==void 0&&j!==null?P(String(j)):"")}catch(j){if(Y.__stx_strict_hydration)throw j;Z.set(U,"")}return{html:$(R(J.html,Z)),context:Q,cookies:X.cookies}}async function JQ(J,Y={}){if(!J.hasServerScripts&&!O(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...Y};for(let $ of J.serverScriptContent)try{await T($,Q,J.sourceFile)}catch(Z){console.warn(`[stx] Server script error in ${J.sourceFile}:`,Z)}if(!O(J.fragment))return J.fragment;let X=new Map;for(let[$,Z]of Object.entries(J.placeholders))if(Z.expression)try{let U=k(Z.expression,Q);if(Z.type==="raw")X.set($,U!==void 0&&U!==null?String(U):"");else X.set($,U!==void 0&&U!==null?P(String(U)):"")}catch{X.set($,"")}return R(J.fragment,X)}
|
|
30
|
+
export{s as $f,C as ag,e as bg,x as cg,_J as dg,AJ as eg,IJ as fg,g as gg,QJ as hg,HJ as ig,PJ as jg,kJ as kg,TJ as lg,FJ as mg,SJ as ng,yJ as og,gJ as pg,uJ as qg,mJ as rg,b as sg,GJ as tg,zJ as ug,d as vg,cJ as wg,tJ as xg,eJ as yg,JQ as zg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ok as a,pk as b,qk as c,rk as d}from"./chunk-0trm18n0.js";import"./chunk-cq6e6de4.js";import"./chunk-qp4x0mwv.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-1bdvnmxd.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-3wmdjemm.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
|