@stacksjs/stx 0.2.633 → 0.2.635
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-0d7dqt4d.js +2 -0
- package/dist/chunk-0grt24vd.js +2 -0
- package/dist/{chunk-7q55jxf5.js → chunk-0tm9ep8b.js} +2 -2
- package/dist/{chunk-7gq7w95h.js → chunk-14yjt309.js} +3 -3
- package/dist/{chunk-ygpa12ez.js → chunk-1d25z8q2.js} +3 -3
- package/dist/{chunk-6bhaa9g7.js → chunk-1wb98s7b.js} +13 -13
- package/dist/{chunk-nh7bcc4h.js → chunk-2efrxnnt.js} +2 -2
- package/dist/chunk-2vzfn6vy.js +2 -0
- package/dist/chunk-3bsz101e.js +2 -0
- package/dist/{chunk-w9e17a74.js → chunk-3e2v2fdh.js} +4 -4
- package/dist/{chunk-jq7ymh7q.js → chunk-3f4xy76k.js} +6 -6
- package/dist/chunk-3jwjesb5.js +2 -0
- package/dist/{chunk-968jp303.js → chunk-3td99hnc.js} +3 -3
- package/dist/chunk-4b4es5wg.js +2 -0
- package/dist/{chunk-phbnrw2h.js → chunk-4n24jbfs.js} +2 -2
- package/dist/{chunk-72p9brmx.js → chunk-4vkpgz28.js} +9 -9
- package/dist/chunk-4xeafdr6.js +2 -0
- package/dist/chunk-4xkqdfqd.js +2 -0
- package/dist/chunk-5k989nr4.js +2 -0
- package/dist/chunk-5v95x083.js +3 -0
- package/dist/chunk-5yf9yzkp.js +2 -0
- package/dist/{chunk-923vrf9c.js → chunk-6gwrmn3w.js} +7 -7
- package/dist/{chunk-p77g4mhy.js → chunk-6w1ngwsd.js} +2 -2
- package/dist/chunk-7m5xrqnj.js +2852 -0
- package/dist/chunk-7mtdjjbt.js +2 -0
- package/dist/{chunk-94yycjz8.js → chunk-7vdcsr14.js} +2 -2
- package/dist/{chunk-k5atee35.js → chunk-839m1t8t.js} +1 -1
- package/dist/chunk-88dxeynx.js +2 -0
- package/dist/chunk-8er7jc3c.js +2 -0
- package/dist/chunk-8phbb8wj.js +2 -0
- package/dist/{chunk-p4hmv654.js → chunk-8y3mff5c.js} +2 -2
- package/dist/{chunk-gqdh68vx.js → chunk-954tcahb.js} +2 -2
- package/dist/{chunk-sg5zgq5v.js → chunk-97zrn4wb.js} +5 -5
- package/dist/{chunk-q6evk3a4.js → chunk-9gx5p7zh.js} +2 -2
- package/dist/{chunk-g2rxbaah.js → chunk-a6hv03yw.js} +3 -3
- package/dist/chunk-a7s1j320.js +127 -0
- package/dist/chunk-a83r1xx9.js +2 -0
- package/dist/chunk-abpeac2d.js +2 -0
- package/dist/chunk-adzsqsjt.js +2 -0
- package/dist/{chunk-4fv3jq16.js → chunk-ahyq08mp.js} +2 -2
- package/dist/chunk-b1ndskw9.js +2 -0
- package/dist/chunk-b7fp3zta.js +2 -0
- package/dist/{chunk-pbphq5pj.js → chunk-b7hv69ty.js} +2 -2
- package/dist/{chunk-avt9cske.js → chunk-baw176ay.js} +6 -6
- package/dist/chunk-bgfkbesj.js +2 -0
- package/dist/{chunk-cy1j2zpr.js → chunk-bk9bx2ns.js} +2 -2
- package/dist/{chunk-gh34r6qb.js → chunk-bsts9pr5.js} +2 -2
- package/dist/{chunk-jzmz66a3.js → chunk-bysyrwfa.js} +3 -3
- package/dist/{chunk-y89m80pf.js → chunk-c4ysk7x2.js} +4 -4
- package/dist/{chunk-90pe63me.js → chunk-camd8j1q.js} +3 -3
- package/dist/{chunk-0qt1887j.js → chunk-cdab66xt.js} +2 -2
- package/dist/{chunk-gv15dd41.js → chunk-cjr8cpb7.js} +3 -3
- package/dist/{chunk-y8h823cb.js → chunk-cw9pc5yx.js} +41 -41
- package/dist/chunk-cy83yfy9.js +2 -0
- package/dist/chunk-dbqb1a51.js +2 -0
- package/dist/{chunk-pk757m0k.js → chunk-e0nq8g9j.js} +1 -1
- package/dist/chunk-e8t64hxk.js +2 -0
- package/dist/chunk-e943xk88.js +2 -0
- package/dist/{chunk-w8bf4mbw.js → chunk-emcbmr0r.js} +3 -3
- package/dist/{chunk-kpxty3pe.js → chunk-f30t1g74.js} +2 -2
- package/dist/{chunk-tx4xxpgg.js → chunk-f3agc1a3.js} +3 -3
- package/dist/{chunk-27784ceh.js → chunk-fm80xpxn.js} +4 -4
- package/dist/{chunk-xrrkf04f.js → chunk-fwawm5r3.js} +2 -2
- package/dist/chunk-g039c67x.js +2 -0
- package/dist/{chunk-gxpgwpq7.js → chunk-g9dz0mx9.js} +2 -2
- package/dist/{chunk-bd5na0h0.js → chunk-g9sdjgfw.js} +5 -5
- package/dist/{chunk-k2nrx78c.js → chunk-gcj5jfbv.js} +2 -2
- package/dist/chunk-ghfxfcr9.js +2 -0
- package/dist/chunk-gvyq9xt6.js +2 -0
- package/dist/chunk-h30y9k44.js +2 -0
- package/dist/{chunk-236twqn4.js → chunk-hbzk179w.js} +3 -3
- package/dist/chunk-hwp3m8a8.js +2 -0
- package/dist/{chunk-2bxsc7gf.js → chunk-j79f6syh.js} +4 -4
- package/dist/chunk-jarptkbv.js +2 -0
- package/dist/{chunk-ftkrsvqp.js → chunk-jtr30kkz.js} +1 -1
- package/dist/{chunk-fdy0hka5.js → chunk-kjtvdqb9.js} +13 -13
- package/dist/chunk-kk6tq07c.js +3 -0
- package/dist/chunk-km4xp898.js +2 -0
- package/dist/{chunk-j1rnhv0w.js → chunk-kr14jt4m.js} +3 -3
- package/dist/{chunk-az1y9jks.js → chunk-kwwrrasa.js} +2 -2
- package/dist/chunk-kxbw0e2f.js +3 -0
- package/dist/{chunk-a887js9p.js → chunk-m56ee2tw.js} +5 -5
- package/dist/chunk-meze7k8v.js +2 -0
- package/dist/chunk-mfwrxz9z.js +2 -0
- package/dist/chunk-mmpm1awz.js +2 -0
- package/dist/{chunk-0whv8hnp.js → chunk-mn97jhaq.js} +2 -2
- package/dist/{chunk-3yh585yv.js → chunk-mpb0ezee.js} +3 -3
- package/dist/{chunk-g35zftfn.js → chunk-mvt5n2q4.js} +1 -1
- package/dist/chunk-n7vetrt4.js +2 -0
- package/dist/chunk-nd716zha.js +2 -0
- package/dist/{chunk-0hs8jgw5.js → chunk-npn3h566.js} +2 -2
- package/dist/{chunk-5x59qjzs.js → chunk-pak6ngv0.js} +6 -6
- package/dist/{chunk-v5500ews.js → chunk-pp6ycfay.js} +2 -2
- package/dist/{chunk-vhktd16g.js → chunk-psranzfr.js} +2 -2
- package/dist/chunk-ptjz4f2e.js +2 -0
- package/dist/{chunk-8qrhz7n7.js → chunk-ptv5f34x.js} +6 -6
- package/dist/{chunk-86zj56pf.js → chunk-q0kbn64j.js} +5 -5
- package/dist/chunk-q4hmgj72.js +2 -0
- package/dist/chunk-q841b6x4.js +2 -0
- package/dist/{chunk-v4tmwamd.js → chunk-qa58qdz8.js} +2 -2
- package/dist/{chunk-8hjrr8j3.js → chunk-qczse5w4.js} +33 -33
- package/dist/{chunk-tn7hgtyn.js → chunk-qjfgdcck.js} +5 -5
- package/dist/chunk-qnh5x7vv.js +2 -0
- package/dist/chunk-qxjfvkjt.js +2 -0
- package/dist/chunk-rhhwz7e9.js +2 -0
- package/dist/chunk-rpbe5h6v.js +2 -0
- package/dist/chunk-rrdn4qnn.js +2 -0
- package/dist/{chunk-xm911f1g.js → chunk-ry1w4ghk.js} +1 -1
- package/dist/chunk-s7c9kb53.js +2 -0
- package/dist/chunk-sfj84n72.js +2 -0
- package/dist/chunk-sgr2hhsc.js +2 -0
- package/dist/{chunk-jbmjcs83.js → chunk-shcn4wve.js} +2 -2
- package/dist/{chunk-zs7t42b5.js → chunk-sn0a8cjd.js} +5 -5
- package/dist/chunk-taztcvv3.js +2 -0
- package/dist/chunk-vczt5k2j.js +2 -0
- package/dist/chunk-vj5fghnv.js +2 -0
- package/dist/{chunk-6dzqjbsz.js → chunk-vyjdzpb8.js} +2 -2
- package/dist/chunk-wj4rf7sb.js +2 -0
- package/dist/chunk-wn1s8af8.js +2 -0
- package/dist/{chunk-t7e9y46s.js → chunk-x7g0946r.js} +1 -1
- package/dist/{chunk-rq1c46zb.js → chunk-xdwpbqzz.js} +34 -9
- package/dist/chunk-y3jyk5bj.js +2 -0
- package/dist/chunk-y51ndrdb.js +2 -0
- package/dist/{chunk-xrkechs8.js → chunk-y5b25eks.js} +5 -5
- package/dist/{chunk-tc7gm68a.js → chunk-ycz5th6b.js} +2 -2
- package/dist/{chunk-3kkf43fv.js → chunk-ym0e374a.js} +2 -2
- package/dist/{chunk-pxpmx8vc.js → chunk-ymntav9f.js} +1 -1
- package/dist/{chunk-8kc6byaz.js → chunk-yp8tk3v3.js} +5 -5
- package/dist/{chunk-bng1ayzm.js → chunk-ytv0k9gy.js} +9 -9
- package/dist/chunk-ytxzy6eg.js +2 -0
- package/dist/chunk-ywf319rp.js +2 -0
- package/dist/chunk-yww6c9we.js +2 -0
- package/dist/chunk-yy43hxb7.js +2 -0
- package/dist/chunk-z42jb949.js +2 -0
- package/dist/{chunk-y04hzz4w.js → chunk-zfrpss8y.js} +4 -4
- package/dist/{chunk-8b2452m1.js → chunk-zpzk4wd2.js} +11 -11
- package/dist/chunk-zw20a7q4.js +2 -0
- package/dist/cli.js +76 -76
- package/dist/client/signals-public-api-runtime.js +1 -0
- package/dist/client/signals-timer-runtime.js +24 -0
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/lazy-module.js +2 -1
- package/dist/menubar.d.ts +2 -0
- package/dist/menubar.js +15 -2
- package/dist/native/compiler/headwind-to-style.d.ts +6 -3
- package/dist/native/compiler/headwind-to-style.js +25 -3
- package/dist/native/compiler/html-to-ir.js +4 -4
- package/dist/native/prop-names.d.ts +1 -1
- package/dist/native/prop-names.js +3 -1
- package/dist/native/runtime/native-host.js +66 -7
- package/dist/pwa.js +3 -3
- package/dist/runtime-globals.js +1 -0
- package/dist/ssg.js +9 -9
- package/dist/stx-module.d.ts +1 -0
- package/package.json +5 -5
- package/stx-module.d.ts +1 -0
- package/stx.d.ts +7 -0
- package/dist/chunk-0mgtrbaa.js +0 -2
- package/dist/chunk-0xc6rncm.js +0 -2852
- package/dist/chunk-1tpr8d8n.js +0 -2
- package/dist/chunk-20kjbf3h.js +0 -2
- package/dist/chunk-3gcg3gvy.js +0 -2
- package/dist/chunk-3wsrhj0k.js +0 -2
- package/dist/chunk-575cqc6z.js +0 -2
- package/dist/chunk-5x836mv3.js +0 -2
- package/dist/chunk-5yceay9n.js +0 -2
- package/dist/chunk-6pg2kxsq.js +0 -2
- package/dist/chunk-7nthebqr.js +0 -2
- package/dist/chunk-7s5304ae.js +0 -2
- package/dist/chunk-8dybd0g5.js +0 -2
- package/dist/chunk-8em788gc.js +0 -2
- package/dist/chunk-9svygzeg.js +0 -2
- package/dist/chunk-9z4qr5w9.js +0 -2
- package/dist/chunk-af4ss0p5.js +0 -2
- package/dist/chunk-aj34t5h3.js +0 -2
- package/dist/chunk-atcy4zq6.js +0 -2
- package/dist/chunk-az28kd7f.js +0 -2
- package/dist/chunk-cncdgxk3.js +0 -2
- package/dist/chunk-d2t2pq1s.js +0 -3
- package/dist/chunk-dcx2t3sy.js +0 -2
- package/dist/chunk-dn28q0m3.js +0 -2
- package/dist/chunk-dn89zg1v.js +0 -2
- package/dist/chunk-dwddzp5f.js +0 -2
- package/dist/chunk-enchx79c.js +0 -2
- package/dist/chunk-ev8ma4ph.js +0 -2
- package/dist/chunk-ftrsaag8.js +0 -2
- package/dist/chunk-g6efz3ww.js +0 -2
- package/dist/chunk-gd59tkhr.js +0 -2
- package/dist/chunk-h1g9m148.js +0 -2
- package/dist/chunk-h8tew5mz.js +0 -2
- package/dist/chunk-hdrcgepx.js +0 -127
- package/dist/chunk-hn64343d.js +0 -2
- package/dist/chunk-htaed68z.js +0 -2
- package/dist/chunk-j5jkh05f.js +0 -2
- package/dist/chunk-j90yng9b.js +0 -2
- package/dist/chunk-jabb3v4c.js +0 -2
- package/dist/chunk-jczvjn7z.js +0 -2
- package/dist/chunk-kqkhcbrx.js +0 -2
- package/dist/chunk-mgzegkvk.js +0 -2
- package/dist/chunk-mk71833d.js +0 -2
- package/dist/chunk-n3s3w1f5.js +0 -2
- package/dist/chunk-nj0b4ryt.js +0 -2
- package/dist/chunk-ny6enm8b.js +0 -3
- package/dist/chunk-p8ndfekp.js +0 -2
- package/dist/chunk-qhjm9hvz.js +0 -2
- package/dist/chunk-qzy34xmt.js +0 -2
- package/dist/chunk-ra40trfh.js +0 -2
- package/dist/chunk-rjq597cn.js +0 -2
- package/dist/chunk-rrdwynz4.js +0 -2
- package/dist/chunk-sddytf9n.js +0 -2
- package/dist/chunk-shhtbdnj.js +0 -2
- package/dist/chunk-t4g97h08.js +0 -2
- package/dist/chunk-t7f9zmy8.js +0 -2
- package/dist/chunk-tme29zh9.js +0 -3
- package/dist/chunk-x1xx8qt0.js +0 -2
- package/dist/chunk-xmfhb2v0.js +0 -2
- package/dist/chunk-xsw183n7.js +0 -2
- package/dist/chunk-xtwe2rnp.js +0 -2
- package/dist/chunk-xxnh7gv8.js +0 -2
- package/dist/chunk-y84n0dvg.js +0 -2
- package/dist/chunk-zr0k9pz5.js +0 -2
- package/dist/chunk-zytcxy8p.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{p,c}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{p,c}from"./chunk-ptv5f34x.js";import{re,b}from"./chunk-7m5xrqnj.js";function A(t,o){let i=1,r=o,n="<template",e="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(n,r)&&(r+n.length>=t.length||/[\s>\/]/.test(t[r+n.length]))){i++,r+=n.length;continue}if(t.startsWith(e,r)){let a=t.indexOf(">",r+e.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var w=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function x(t,o){let i=null;for(let r=o;r<t.length;r++){let n=t[r];if(i){if(n==="\\"){r++;continue}if(n===i)i=null;continue}if(n==='"'||n==="'"){i=n;continue}if(n===">")return r+1}return-1}function N(t,o,i){let r=o.toLowerCase(),n=1,e=i;while(e<t.length){let s=t.indexOf("<",e);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);e=g===-1?t.length:g+3;continue}let a=x(t,s+1);if(a===-1)return-1;let f=t.slice(s,a),u=f.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(u&&u[2].toLowerCase()===r){if(u[1]==="/"){if(n--,n===0)return a}else if(!/\/\s*>$/.test(f))n++}e=a}return-1}function R(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,n=0;while(n<t.length){let e=t.indexOf("<",n);if(e===-1)break;if(t.startsWith("<!--",e)){let l=t.indexOf("-->",e+4);n=l===-1?t.length:l+3;continue}let s=x(t,e+1);if(s===-1)break;let a=t.slice(e,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){n=s;continue}let u=f[2].toLowerCase();if(f[1]==="/"){let l=i.lastIndexOf(u);if(l!==-1)i.splice(l);n=s;continue}let g=/\/\s*>$/.test(a),m=i.length===0?a.match(r):null;if(m){let l=m[1]||m[2],d=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),h=g||w.has(u)?-1:N(t,u,s);if(h===-1)o.push({start:e,end:s,slotName:l,element:d}),n=s;else o.push({start:e,end:h,slotName:l,element:d+t.slice(s,h)}),n=h;continue}if(!g&&!w.has(u)){if(i.push(u),u==="script"||u==="style"){let l=t.toLowerCase().indexOf(`</${u}>`,s);if(l!==-1){n=l;continue}}}n=s}return o}function O(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,n=0;while(n<t.length){let e=t.indexOf("<",n);if(e===-1)break;if(t.startsWith("<!--",e)){let l=t.indexOf("-->",e+4);n=l===-1?t.length:l+3;continue}let s=x(t,e+1);if(s===-1)break;let a=t.slice(e,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){n=s;continue}let u=f[1]==="/",g=f[2].toLowerCase();if(u){let l=i.lastIndexOf(g);if(l!==-1)i.splice(l);n=s;continue}if(g==="template"&&i.length===0){let l=a.match(r);if(l){let d=A(t,s);if(d!==-1){let h=l[1]||l[2]||l[3];o.push({start:e,end:d,slotName:h,content:t.slice(s,d-11).trim(),propsBinding:l[4]||void 0}),n=d;continue}}}if(!/\/\s*>$/.test(a)&&!w.has(g)){if(i.push(g),g==="script"||g==="style"){let l=t.toLowerCase().indexOf(`</${g}>`,s);if(l!==-1){n=l;continue}}}n=s}return o}function Ia(t){let o={default:"",named:new Map},i=t,r=O(t);for(let e of r)o.named.set(e.slotName,{name:e.slotName,content:e.content,propsBinding:e.propsBinding});r.sort((e,s)=>s.start-e.start);for(let e of r)i=i.slice(0,e.start)+i.slice(e.end);let n=R(i);for(let e of n){let s=o.named.get(e.slotName);if(s)s.content+=e.element;else o.named.set(e.slotName,{name:e.slotName,content:e.element})}for(let e=n.length-1;e>=0;e--){let s=n[e];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Wl(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},n=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,e;while((e=n.exec(t))!==null)r[e[1]]=e[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function Oa(t,o,i,r){if(!t)return i;let n=t.content;if(t.propsBinding&&Object.keys(o).length>0){let e=t.propsBinding.trim(),s={...r},a=new Set,f=new Set;if(e.startsWith("{")&&e.endsWith("}")){let u=e.slice(1,-1).split(",").map((g)=>g.trim()).filter(Boolean);for(let g of u){let[m,l]=g.split(":").map((h)=>h.trim()),d=l||m;if(s[d]=o[m],o[m]!==void 0)f.add(d);else a.add(d)}}else if(s[e]=o,Object.values(o).some((u)=>u===void 0))a.add(e);else f.add(e);n=C(n,s,a,f)}return n}function C(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(n,e)=>{try{let s=e.trim();if(re(s,i))return n;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!re(s,r))return n;let a=k(s,o);if(a===void 0)return n;return b(String(a??""))}catch{return`{{ ${e} }}`}})}function k(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),n=o;for(let e of r)if(n&&typeof n==="object"&&e in n)n=n[e];else return;return n}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,n,e]=i,s=o[r],a=parseInt(e,10);if(typeof s==="number")switch(n){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!p(t))return;return c(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Na(t,o,i){let r=t;r=await M(r,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(s,a,f,u)=>{let g=o.named.get(a),m=u?.trim()||"",l=f||"",d={},h=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,S;while((S=h.exec(l))!==null){let y=S[1],E=S[2];d[y]=k(E,i)}return await Oa(g,d,m,i)});let e=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return r=r.replace(e,(s,a,f)=>{if(/\bname\s*=/.test(a||""))return s;let u=f?.trim()||"";return o.default||u}),r}async function M(t,o,i){let r=[],n=[];t.replace(o,(a,...f)=>{let u=f[f.length-2];return n.push({match:a,index:u}),r.push(i(a,...f.slice(0,-2))),a});let e=await Promise.all(r),s=t;for(let a=n.length-1;a>=0;a--){let{match:f,index:u}=n[a];s=s.slice(0,u)+e[a]+s.slice(u+f.length)}return s}function ql(t){let o=Ia(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Gl(t,o,i,r){return await Na(t,{default:o,named:i},r)}
|
|
3
|
+
export{Ia,Wl,Oa,Na,ql,Gl};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{D}from"./chunk-
|
|
2
|
+
import{D}from"./chunk-shcn4wve.js";var t={UNCLOSED_DIRECTIVE:1001,UNCLOSED_EXPRESSION:1002,INVALID_DIRECTIVE_SYNTAX:1003,MALFORMED_EXPRESSION:1004,UNEXPECTED_TOKEN:1005,UNDEFINED_VARIABLE:1101,TYPE_ERROR:1102,EVALUATION_ERROR:1103,INFINITE_LOOP:1104,CIRCULAR_REFERENCE:1105,UNSAFE_EXPRESSION:1201,PATH_TRAVERSAL:1202,XSS_ATTEMPT:1203,CODE_INJECTION:1204,DOM_API_VIOLATION:1205,FILE_NOT_FOUND:1301,FILE_READ_ERROR:1302,INVALID_FILE_PATH:1303,PERMISSION_DENIED:1304,INVALID_CONFIG:1401,MISSING_REQUIRED_CONFIG:1402,DEPRECATED_CONFIG:1403,COMPONENT_NOT_FOUND:1501,INVALID_PROPS:1502,COMPONENT_RENDER_ERROR:1503,FILTER_NOT_FOUND:1601,INVALID_FILTER_ARGS:1602,EXPRESSION_TIMEOUT:1603};function A(e){for(let[r,n]of Object.entries(t))if(n===e)return r;return}import ue from"path";var ge={showRelativePaths:!1,enableAutoRecovery:D(),logRecoveryWarnings:!0},P={...ge};function k(){return{...P}}function _(e){if(!P.showRelativePaths||!e)return e;let r=P.baseDir||process.cwd();try{let n=ue.relative(r,e);return n.startsWith("..")?e:n}catch{return e}}class R extends Error{code;filePath;line;column;context;numericCode;constructor(e,r,n,o,s,a,g){super(e);this.code=r;this.filePath=n;this.line=o;this.column=s;this.context=a;if(this.name="StxError",this.numericCode=g||t.EVALUATION_ERROR,this.filePath)this.filePath=_(this.filePath)}}class W extends R{constructor(e,r,n,o,s,a){super(e,"stx_RUNTIME_ERROR",r,n,o,s,a||t.EVALUATION_ERROR);this.name="StxRuntimeError"}}class Ln extends R{constructor(e,r,n,o,s,a){super(e,"stx_FILE_ERROR",r,n,o,s,a||t.FILE_NOT_FOUND);this.name="StxFileError"}}class q extends R{isFatal=!0;constructor(e,r,n,o,s,a){super(e,"stx_VALIDATION_ERROR",r,n,o,s,a||t.DOM_API_VIOLATION);this.name="StxValidationError"}}function H(e){let{type:r,message:n,code:o,filePath:s,line:a,column:g,template:u,offset:h,snippet:m,suggestion:d,format:f="text"}=e,E=a,x=g;if(!E&&u&&h!==void 0){let X=Ee(u,h);E=X.line,x=X.column}let w=s?_(s):void 0,y=o?A(o):void 0,S={type:r,code:o,codeName:y,message:n,filePath:w,line:E,column:x,snippet:m,suggestion:d,timestamp:new Date().toISOString()},v;switch(f){case"html":v=me(S);break;case"json":v=JSON.stringify(S,null,2);break;case"console":v=pe(S,u,h);break;case"text":default:v=fe(S,u,h);break}return{formatted:v,data:S}}function fe(e,r,n){let o=[],s=e.code?` [${e.codeName||e.code}]`:"";if(o.push(`[${e.type} Error${s}]`),e.filePath){let a=e.filePath;if(e.line){if(a+=`:${e.line}`,e.column)a+=`:${e.column}`}o.push(`at ${a}`)}if(o.push(`
|
|
3
3
|
${e.message}`),r&&e.line){let a=de(r,e.line,2);if(a)o.push(`
|
|
4
4
|
${a}`)}if(e.snippet)o.push(`
|
|
5
5
|
Snippet: ${e.snippet}`);if(e.suggestion)o.push(`
|
|
@@ -17,15 +17,15 @@ ${"\x1B[31m"}\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\
|
|
|
17
17
|
`)}function he(e,r,n){let o=e.split(`
|
|
18
18
|
`),s=Math.max(0,r-n-1),a=Math.min(o.length-1,r+n-1),g="\x1B[90m",u="\x1B[31m",h="\x1B[0m",m=[];for(let d=s;d<=a;d++){let f=(d+1).toString().padStart(4),E=d===r-1,x=E?"\x1B[31m>\x1B[0m":" ",w=E?`\x1B[31m${o[d]}\x1B[0m`:`\x1B[90m${o[d]}\x1B[0m`;m.push(`${x}\x1B[90m${f}\x1B[0m | ${w}`)}return m.join(`
|
|
19
19
|
`)}function G(e){return e.replace(/--/g,"- -").replace(/>/g,">")}function Ee(e,r){let o=e.substring(0,r).split(`
|
|
20
|
-
`);return{line:o.length,column:o[o.length-1].length}}function i(e,r,n){return H({type:e,message:r,code:n,format:"html"}).formatted}async function ae(e,r,n){try{return await e()}catch(o){if(n&&o instanceof Error)n(o);return r}}var
|
|
20
|
+
`);return{line:o.length,column:o[o.length-1].length}}function i(e,r,n){return H({type:e,message:r,code:n,format:"html"}).formatted}async function ae(e,r,n){try{return await e()}catch(o){if(n&&o instanceof Error)n(o);return r}}var ro={isEnabled(){return k().enableAutoRecovery},fixCommonSyntaxErrors(e){let r=k();if(!r.enableAutoRecovery)return{fixed:e,fixes:[]};let n=e,o=[],s=(n.match(/\{\{/g)||[]).length,a=(n.match(/\}\}/g)||[]).length;if(s>a){let u=s-a;n+="}}".repeat(u),o.push(`Added ${u} missing closing braces '}}'`)}let g=["if","foreach","for","switch","section"];for(let u of g){let h=(n.match(new RegExp(`@${u}\\b`,"g"))||[]).length,m=(n.match(new RegExp(`@end${u}\\b`,"g"))||[]).length;if(h>m){let d=h-m;for(let f=0;f<d;f++)n+=`
|
|
21
21
|
@end${u}`;o.push(`Added ${d} missing @end${u}`)}}if(o.length>0&&r.logRecoveryWarnings)console.warn("[stx] Auto-recovery applied fixes:"),o.forEach((u)=>console.warn(` - ${u}`)),console.warn(" Consider fixing these issues in your template.");return{fixed:n,fixes:o}},createFallbackContent(e,r){if(D())return`<!-- ${e} failed: ${r.message} -->`;return"<!-- stx rendering error -->"}};class I{errors=[];maxErrors;enableFileLogging;logFilePath;logFormat;maxFileSize;maxLogFiles;minLevel;writeQueue=Promise.resolve();constructor(e={}){this.maxErrors=e.maxErrors??1000,this.enableFileLogging=e.enableFileLogging??!1,this.logFilePath=e.logFilePath??".stx/errors.log",this.logFormat=e.logFormat??"json",this.maxFileSize=e.maxFileSize??10485760,this.maxLogFiles=e.maxLogFiles??5,this.minLevel=e.minLevel??"all"}configure(e){if(e.maxErrors!==void 0)this.maxErrors=e.maxErrors;if(e.enableFileLogging!==void 0)this.enableFileLogging=e.enableFileLogging;if(e.logFilePath!==void 0)this.logFilePath=e.logFilePath;if(e.logFormat!==void 0)this.logFormat=e.logFormat;if(e.maxFileSize!==void 0)this.maxFileSize=e.maxFileSize;if(e.maxLogFiles!==void 0)this.maxLogFiles=e.maxLogFiles;if(e.minLevel!==void 0)this.minLevel=e.minLevel}log(e,r,n="error"){let o={timestamp:new Date,error:e,context:r,level:n};if(this.errors.push(o),this.errors.length>this.maxErrors)this.errors=this.errors.slice(-this.maxErrors);if(this.enableFileLogging&&this.shouldLog(n))this.writeToFile(o)}shouldLog(e){if(this.minLevel==="all")return!0;if(this.minLevel==="warning")return e==="error"||e==="warning";if(this.minLevel==="error")return e==="error";return!0}formatEntry(e){if(this.logFormat==="json")return JSON.stringify({timestamp:e.timestamp.toISOString(),level:e.level||"error",type:e.error.constructor.name,message:e.error.message,stack:e.error.stack,context:e.context});let r=[`[${e.timestamp.toISOString()}] [${(e.level||"error").toUpperCase()}] ${e.error.constructor.name}: ${e.error.message}`];if(e.error.stack)r.push(` Stack: ${e.error.stack.split(`
|
|
22
22
|
`).slice(1).join(`
|
|
23
23
|
`)}`);if(e.context)r.push(` Context: ${JSON.stringify(e.context)}`);return r.join(`
|
|
24
24
|
`)}writeToFile(e){this.writeQueue=this.writeQueue.then(async()=>{try{let r=await import("fs"),n=await import("path"),o=n.dirname(this.logFilePath);if(!r.existsSync(o))r.mkdirSync(o,{recursive:!0});await this.rotateIfNeeded(r);let s=`${this.formatEntry(e)}
|
|
25
25
|
`;r.appendFileSync(this.logFilePath,s,"utf-8")}catch(r){if(process.env.STX_DEBUG==="true")console.error("Failed to write to error log:",r)}})}async rotateIfNeeded(e){try{if(!e.existsSync(this.logFilePath))return;if(e.statSync(this.logFilePath).size<this.maxFileSize)return;for(let n=this.maxLogFiles-1;n>=1;n--){let o=`${this.logFilePath}.${n}`,s=`${this.logFilePath}.${n+1}`;if(e.existsSync(o))if(n>=this.maxLogFiles-1)e.unlinkSync(o);else e.renameSync(o,s)}if(this.maxLogFiles<=1)e.writeFileSync(this.logFilePath,"");else e.renameSync(this.logFilePath,`${this.logFilePath}.1`)}catch(r){if(process.env.STX_DEBUG==="true")console.error("Failed to rotate error logs:",r)}}getRecentErrors(e=10){return this.errors.slice(-e)}getErrorsByType(e){return this.errors.filter((r)=>r.error.constructor.name===e)}getErrorsByLevel(e){return this.errors.filter((r)=>r.level===e)}clear(){this.errors.length=0}async clearLogFile(){try{let e=await import("fs");if(e.existsSync(this.logFilePath))e.writeFileSync(this.logFilePath,"","utf-8")}catch(e){if(process.env.STX_DEBUG==="true")console.error("Failed to clear error log:",e)}}getStats(){let e={},r={error:0,warning:0,info:0};for(let n of this.errors){let o=n.error.constructor.name;e[o]=(e[o]||0)+1;let s=n.level||"error";r[s]=(r[s]||0)+1}return{total:this.errors.length,byType:e,byLevel:r}}async exportToFile(e,r="json"){let n=await import("fs"),o=await import("path"),s=o.dirname(e);if(!n.existsSync(s))n.mkdirSync(s,{recursive:!0});if(r==="json"){let a=this.errors.map((g)=>({timestamp:g.timestamp.toISOString(),level:g.level||"error",type:g.error.constructor.name,message:g.error.message,stack:g.error.stack,context:g.context}));n.writeFileSync(e,JSON.stringify(a,null,2),"utf-8")}else{let a=this.errors.map((g)=>this.formatEntry(g));n.writeFileSync(e,a.join(`
|
|
26
26
|
|
|
27
|
-
`),"utf-8")}}async flush(){await this.writeQueue}}var O=new I,
|
|
28
|
-
`)}};var xe={maxSanitizeDepth:10,allowBracketNotation:!1},ee={...xe};var F=/\bnew\s+/,L="__stx_safe_ctors",te=["Bun","Deno","Buffer","fetch","atob","btoa","console","Response","Request","Headers","WebAssembly","structuredClone","queueMicrotask","crypto","performance","navigator","Worker","WebSocket","BroadcastChannel","EventSource","XMLHttpRequest","localStorage","sessionStorage"],T=[...te,"Function","setTimeout","setInterval","setImmediate","process","require","exports","module","window","document","global","globalThis","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry"],J=T.map(()=>{return}),M=Object.freeze(Object.assign(Object.create(null),{keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,hasOwn:Object.hasOwn,is:Object.is})),j=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,F,/\bdelete\s+/,/\bthis\b/,/\\u(?:\{[\dA-Fa-f]+\}|[\dA-Fa-f]{4})/],U=new Set([...te,"eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",L]),B=new Set(["__proto__","constructor","prototype"]);function re(e){let r="",n=[],o=null,s=!1;for(let a=0;a<e.length;a++){let g=e[a];if(s){s=!1;continue}if(g==="\\"&&o){s=!0;continue}if(o){if(o==="`"&&g==="$"&&a+1<e.length&&e[a+1]==="{"){let u=1;a+=2;while(a<e.length&&u>0){if(e[a]==="{")u++;else if(e[a]==="}")u--;if(u>0)r+=e[a],n.push(a),a++}continue}if(g===o)o=null;continue}if(g==='"'||g==="'"||g==="`"){o=g;continue}r+=g,n.push(a)}return{text:r,map:n}}function ne(e){return re(e).text}var oe=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],se=(()=>{let e={Date,URL,URLSearchParams},r=Intl;for(let n of oe)if(typeof r[n]==="function")e[`Intl_${n}`]=r[n];return Object.freeze(Object.assign(Object.create(null),e))})(),be=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,Z=/(?<![\w$])new(?![\w$])/g,Q=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${oe.join(",")}}() are allowed`;function ye(e){let{text:r,map:n}=re(e),o=[];Z.lastIndex=0;let s;while((s=Z.exec(r))!==null){let g=s.index;if(/(?<!\.)\.\s*$/.test(r.slice(0,g)))continue;let u=be.exec(r.slice(g)),h=u?.[3],m=!u?null:h?`Intl_${h}`:u[2];if(!u||!m||!(m in se))throw new b(`matched /${F.source}/; ${Q}`,e);let d=g+u[0].length,f=n[g],E=n[d-1]+1;if(e.slice(f,E)!==r.slice(g,d))throw new b(`matched /${F.source}/; ${Q}`,e);let x=f+3+u[1].length;o.push({start:x,end:x+u[2].length,key:m})}let a=e;for(let g=o.length-1;g>=0;g--){let u=o[g];a=`${a.slice(0,u.start)}${L}.${u.key}${a.slice(u.end)}`}return{source:a,usesSafeConstructors:o.length>0}}class b extends Error{rule;expression;constructor(e,r,n){super(n??`Potentially unsafe expression (${e}): ${r}`);this.name="UnsafeExpressionError",this.rule=e,this.expression=r}}function
|
|
27
|
+
`),"utf-8")}}async flush(){await this.writeQueue}}var O=new I,Wt={isDevelopment(){return D()},logDetailedError(e,r){if(!this.isDevelopment())return;if(console.error("=== stx Detailed Error ==="),console.error("Error:",e.message),console.error("Stack:",e.stack),r)console.error("Context:",r);console.error("========================")},createErrorReport(e,r){let n=["=== stx Error Report ===",`Time: ${new Date().toISOString()}`,`Error: ${e.message}`,`Type: ${e.constructor.name}`,`Stack: ${e.stack}`];if(r)n.push(`Context: ${JSON.stringify(r,null,2)}`);return n.push("========================"),n.join(`
|
|
28
|
+
`)}};var xe={maxSanitizeDepth:10,allowBracketNotation:!1},ee={...xe};var F=/\bnew\s+/,L="__stx_safe_ctors",te=["Bun","Deno","Buffer","fetch","atob","btoa","console","Response","Request","Headers","WebAssembly","structuredClone","queueMicrotask","crypto","performance","navigator","Worker","WebSocket","BroadcastChannel","EventSource","XMLHttpRequest","localStorage","sessionStorage"],T=[...te,"Function","setTimeout","setInterval","setImmediate","process","require","exports","module","window","document","global","globalThis","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry"],J=T.map(()=>{return}),M=Object.freeze(Object.assign(Object.create(null),{keys:Object.keys,values:Object.values,entries:Object.entries,fromEntries:Object.fromEntries,assign:Object.assign,hasOwn:Object.hasOwn,is:Object.is})),j=[/\b(eval|Function|setTimeout|setInterval|setImmediate)\b/,/\b(process|require|import|exports|module)\b/,/\b(window|document|global|globalThis)\b/,/\b(constructor|prototype|__proto__)\b/,/\b(Reflect|Proxy)\b/,/\bSymbol\b/,/\b(WeakMap|WeakSet|WeakRef|FinalizationRegistry)\b/,/\b(Generator|AsyncGenerator)\b/,/__\w+__/,/\.(bind|call|apply)\s*\(/,F,/\bdelete\s+/,/\bthis\b/,/\\u(?:\{[\dA-Fa-f]+\}|[\dA-Fa-f]{4})/],U=new Set([...te,"eval","Function","setTimeout","setInterval","setImmediate","process","require","import","exports","module","window","document","global","globalThis","constructor","prototype","Reflect","Proxy","Symbol","WeakMap","WeakSet","WeakRef","FinalizationRegistry","Generator","AsyncGenerator","delete","this",L]),B=new Set(["__proto__","constructor","prototype"]);function re(e){let r="",n=[],o=null,s=!1;for(let a=0;a<e.length;a++){let g=e[a];if(s){s=!1;continue}if(g==="\\"&&o){s=!0;continue}if(o){if(o==="`"&&g==="$"&&a+1<e.length&&e[a+1]==="{"){let u=1;a+=2;while(a<e.length&&u>0){if(e[a]==="{")u++;else if(e[a]==="}")u--;if(u>0)r+=e[a],n.push(a),a++}continue}if(g===o)o=null;continue}if(g==='"'||g==="'"||g==="`"){o=g;continue}r+=g,n.push(a)}return{text:r,map:n}}function ne(e){return re(e).text}var oe=["Collator","DateTimeFormat","DisplayNames","ListFormat","Locale","NumberFormat","PluralRules","RelativeTimeFormat","Segmenter"],se=(()=>{let e={Date,URL,URLSearchParams},r=Intl;for(let n of oe)if(typeof r[n]==="function")e[`Intl_${n}`]=r[n];return Object.freeze(Object.assign(Object.create(null),e))})(),be=/^new(\s+)(Date|URLSearchParams|URL|Intl\s*\.\s*([A-Z_a-z]\w*))\s*\(/,Z=/(?<![\w$])new(?![\w$])/g,Q=`only new Date(), new URL(), new URLSearchParams() and new Intl.{${oe.join(",")}}() are allowed`;function ye(e){let{text:r,map:n}=re(e),o=[];Z.lastIndex=0;let s;while((s=Z.exec(r))!==null){let g=s.index;if(/(?<!\.)\.\s*$/.test(r.slice(0,g)))continue;let u=be.exec(r.slice(g)),h=u?.[3],m=!u?null:h?`Intl_${h}`:u[2];if(!u||!m||!(m in se))throw new b(`matched /${F.source}/; ${Q}`,e);let d=g+u[0].length,f=n[g],E=n[d-1]+1;if(e.slice(f,E)!==r.slice(g,d))throw new b(`matched /${F.source}/; ${Q}`,e);let x=f+3+u[1].length;o.push({start:x,end:x+u[2].length,key:m})}let a=e;for(let g=o.length-1;g>=0;g--){let u=o[g];a=`${a.slice(0,u.start)}${L}.${u.key}${a.slice(u.end)}`}return{source:a,usesSafeConstructors:o.length>0}}class b extends Error{rule;expression;constructor(e,r,n){super(n??`Potentially unsafe expression (${e}): ${r}`);this.name="UnsafeExpressionError",this.rule=e,this.expression=r}}function jn(e){try{return V(e),null}catch(r){return r instanceof b?r.rule:r instanceof Error?r.message:String(r)}}function ie(e,r){let n=/[$A-Z_a-z][$\w]*/g,o;while((o=n.exec(e))!==null){let s=o[0],a=e[o.index-1];if(U.has(s))throw new b(`matched /\\b${s}\\b/; identifier ${s}`,r);if(a==="."&&B.has(s))throw new b(`matched /.${s}/; property ${s}`,r)}}function ce(e,r=!0){let n=/(?:[$\w)\].]|\?\.)\s*\[([^\]]*)\]/g,o=new Set,s;while((s=n.exec(e))!==null){let a=s.index+s[0].indexOf("["),g=e.slice(0,a);if(/(?:^|[^$\w])(?:let|const|var)\s*$/.test(g))continue;let u=s[1].trim(),h=/^'(?:[^'\\]|\\.)*'$/.test(u),m=/^"(?:[^"\\]|\\.)*"$/.test(u);if(/^\d+$/.test(u))continue;if(h||m){let f=u.slice(1,-1);if(B.has(f))throw new b(`bracket key ${f}`,e);if(!ee.allowBracketNotation)throw new b("bracket notation with a string key; enable with configureSafeEvaluator({ allowBracketNotation: true })",e,`Bracket notation with strings not allowed: ${e}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);continue}if(r&&/^[$A-Z_a-z][$\w]*$/.test(u)){o.add(u);continue}throw new b("dynamic bracket notation is not allowed",e)}return[...o]}function V(e){let r=e.trim(),n=ne(r);ie(n,r);let o=ce(r);for(let s of j){if(s===F)continue;if(s.test(n))throw new b(`matched /${s.source}/`,r)}return{...ye(r),dynamicKeys:o}}function so(e){return V(e),e.trim()}var Tr=Symbol("stx.sanitizeCache");function $r(e){let r={},n=e[Tr];r.Math=Math,r.JSON=JSON,r.Date=Date,r.String=String,r.Number=Number,r.Boolean=Boolean,r.Array=Array,r.Object=M,r.parseInt=Number.parseInt,r.parseFloat=Number.parseFloat,r.isNaN=Number.isNaN,r.isFinite=Number.isFinite,r.encodeURIComponent=encodeURIComponent,r.decodeURIComponent=decodeURIComponent;for(let[o,s]of Object.entries(e)){if(o.startsWith("__")||j.some((a)=>a.test(o)))continue;if(s&&typeof s==="object"&&!Array.isArray(s)){let a=n?.get(s);if(a===void 0)a=z(s),n?.set(s,a);r[o]=a}else r[o]=s}return r}function z(e,r=0){if(r>=ee.maxSanitizeDepth)return"[Object too deep]";if(e===null||typeof e!=="object")return e;if(Array.isArray(e))return e.map((o)=>z(o,r+1));if(e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error)return e;let n={};for(let[o,s]of Object.entries(e)){if(o.startsWith("__")||o==="constructor"||o==="prototype")continue;if(s&&typeof s==="object")n[o]=z(s,r+1);else n[o]=s}return n}function l(e,r){try{let n=$r(r),o=Object.keys(n),s=Object.values(n);return c(e,o)(...s)}catch{return}}function p(e){try{return so(e),!0}catch{return!1}}function ta(e,r){try{let n=$r(r),o=Object.keys(n),s=Object.values(n),a=!1,u=c(e,o,()=>{a=!0})(...s);return!a&&Boolean(u)}catch{return!1}}function N(e,r){try{let n=l(e,r);if(n&&typeof n==="object"&&!Array.isArray(n))return n;return{}}catch{return{}}}var le=new Set(["break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","false","finally","for","function","if","import","in","instanceof","new","null","return","super","switch","this","throw","true","try","typeof","var","void","while","with","yield","let","static","implements","interface","package","private","protected","public","arguments","eval","await"]),we=2000,C=new Map;function Y(e,r){let n=`${e.join(",")}\x00${r}`,o=C.get(n);if(o)return o;let s=Function(...e,r);if(C.size>=we)C.clear();return C.set(n,s),s}function Oe(e){return e.replace(/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*`/g," ").replace(/\??\.\s*[a-zA-Z_$][\w$]*/g," ").replace(/([{,]\s*)[a-zA-Z_$][\w$]*(\s*:)/g,"$1$2").match(/\b[a-zA-Z_$][\w$]*\b/g)||[]}var Se=/^[A-Za-z_$][\w$]*$/;function dt(e){return Se.test(e)&&!le.has(e)}function c(e,r,n){let{source:o,usesSafeConstructors:s,dynamicKeys:a}=V(e),g=[];for(let f=0;f<r.length;f++){if(!dt(r[f]))continue;if(r[f]===L||r[f]==="Object"||U.has(r[f]))continue;g.push({key:r[f],index:f})}g.sort((f,E)=>f.key.localeCompare(E.key));let u=g.map((f)=>f.key),h=g.map((f)=>f.index),m=`
|
|
29
29
|
'use strict';
|
|
30
30
|
try {
|
|
31
31
|
return ${o};
|
|
@@ -36,5 +36,5 @@ catch (e) {
|
|
|
36
36
|
}
|
|
37
37
|
throw e;
|
|
38
38
|
}
|
|
39
|
-
`;return ve(Re(s?(f)=>{let E=Y([L,"Object",...T,...u,...f],m);return(...x)=>E(se,M,...J,...x)}:(f)=>{let E=Y(["Object",...T,...u,...f],m);return(...x)=>E(M,...J,...x)},u,r,g,h,n),r,a)}function ve(e,r,n){if(n.length===0)return e;let o=n.map((s)=>r.indexOf(s));return(...s)=>{for(let a of o){if(a<0)continue;let g=s[a];if(typeof g==="string"&&B.has(g))return}return e(...s)}}function Re(e,r,n,o,s,a){let g=e([]),u=o.every((m,d)=>m.index===d);if(r.length===n.length&&u)return K(g,r,e,void 0,a);return K((...m)=>{let d=Array(s.length);for(let f=0;f<s.length;f++)d[f]=m[s[f]];return g(...d)},r,e,(m)=>{g=e(m)},a)}function K(e,r,n,o,s){let g=/^(\w+) is not defined$/,u=e,h=[],m=new Set(r);return(...d)=>{for(let f=0;f<=8;f++)try{return u(...d)}catch(E){let x=E instanceof Error?E.message:"",w=g.exec(x);if(!(E instanceof ReferenceError)||!w)return;let y=w[1];if(m.has(y)||le.has(y)||U.has(y))return;if(s?.(y),m.add(y),h.push(y),o)o(h);else u=n(h)}return}}function
|
|
40
|
-
export{t,W,
|
|
39
|
+
`;return ve(Re(s?(f)=>{let E=Y([L,"Object",...T,...u,...f],m);return(...x)=>E(se,M,...J,...x)}:(f)=>{let E=Y(["Object",...T,...u,...f],m);return(...x)=>E(M,...J,...x)},u,r,g,h,n),r,a)}function ve(e,r,n){if(n.length===0)return e;let o=n.map((s)=>r.indexOf(s));return(...s)=>{for(let a of o){if(a<0)continue;let g=s[a];if(typeof g==="string"&&B.has(g))return}return e(...s)}}function Re(e,r,n,o,s,a){let g=e([]),u=o.every((m,d)=>m.index===d);if(r.length===n.length&&u)return K(g,r,e,void 0,a);return K((...m)=>{let d=Array(s.length);for(let f=0;f<s.length;f++)d[f]=m[s[f]];return g(...d)},r,e,(m)=>{g=e(m)},a)}function K(e,r,n,o,s){let g=/^(\w+) is not defined$/,u=e,h=[],m=new Set(r);return(...d)=>{for(let f=0;f<=8;f++)try{return u(...d)}catch(E){let x=E instanceof Error?E.message:"",w=g.exec(x);if(!(E instanceof ReferenceError)||!w)return;let y=w[1];if(m.has(y)||le.has(y)||U.has(y))return;if(s?.(y),m.add(y),h.push(y),o)o(h);else u=n(h)}return}}function Rr(e){let r=e.trim();try{let n=ne(r);if(/\b(?:eval|function|import|require|process|globalthis|window|document|fetch|bun|deno|buffer|console|reflect|proxy|prototype|constructor|this)\b/i.test(n))return!1;ie(n,r),ce(r);for(let o of j)if(o.test(n))return!1}catch{return!1}return!0}
|
|
40
|
+
export{t,W,Ln,q,i,ae,ro,O,Wt,jn,so,Tr,$r,l,p,ta,N,Oe,dt,c,Rr};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function
|
|
2
|
+
var c=0;function l(){return`suspense-${++c}-${Date.now().toString(36)}`}function hu(s,n={},t){let e=/@suspense(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@endsuspense/gi;return s.replace(e,(r,i,o,d)=>{let u=l(),a=p(i||"");return f(u,o.trim(),d.trim(),a)})}function p(s){let n={},t=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,e;while((e=t.exec(s))!==null){let r=e[1],i=e[2]||e[3],o=e[4];switch(r){case"id":n.id=i;break;case"timeout":n.timeout=o?parseInt(o,10):void 0;break}}return n}function f(s,n,t,e){let r=e.timeout||30000,i=e.id||s;return`
|
|
3
3
|
<div class="stx-suspense" data-suspense-id="${s}" data-custom-id="${i}" data-status="pending">
|
|
4
4
|
<div class="stx-suspense-fallback" data-suspense-fallback="${s}">
|
|
5
5
|
${t}
|
|
@@ -189,7 +189,7 @@ else {
|
|
|
189
189
|
}, 0);
|
|
190
190
|
})();
|
|
191
191
|
</script>
|
|
192
|
-
`}function
|
|
192
|
+
`}function yu(s,n,t){return{id:s,fallback:t,content:n}}async function bu(s){let n=s.map((e)=>`
|
|
193
193
|
<div id="stx-ssr-suspense-${e.id}" class="stx-ssr-suspense">
|
|
194
194
|
${e.fallback}
|
|
195
195
|
</div>
|
|
@@ -214,7 +214,7 @@ else {
|
|
|
214
214
|
}
|
|
215
215
|
})();
|
|
216
216
|
</script>
|
|
217
|
-
`}}return{initial:n,streaming:t()}}function
|
|
217
|
+
`}}return{initial:n,streaming:t()}}function vu(){return`
|
|
218
218
|
/* STX Suspense Styles */
|
|
219
219
|
.stx-suspense {
|
|
220
220
|
position: relative;
|
|
@@ -270,7 +270,7 @@ else {
|
|
|
270
270
|
background-size: 200% 100%;
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
|
-
`}function
|
|
273
|
+
`}function wu(){return`
|
|
274
274
|
// STX Suspense Runtime
|
|
275
275
|
(function() {
|
|
276
276
|
if (typeof window === 'undefined') return;
|
|
@@ -338,4 +338,4 @@ else {
|
|
|
338
338
|
console.log('[stx] Suspense runtime initialized');
|
|
339
339
|
})();
|
|
340
340
|
`}
|
|
341
|
-
export{
|
|
341
|
+
export{hu,yu,bu,vu,wu};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ke,Ic,id,ad,cd,ld,Oc,Nc,ud,dd,yi,pd,xn,Sn,lr}from"./chunk-7m5xrqnj.js";import"./chunk-bysyrwfa.js";import"./chunk-f30t1g74.js";import"./chunk-j79f6syh.js";import"./chunk-bk9bx2ns.js";import"./chunk-fwawm5r3.js";import"./chunk-1wb98s7b.js";import"./chunk-zpzk4wd2.js";import"./chunk-ptv5f34x.js";import"./chunk-ahyq08mp.js";import"./chunk-kk6tq07c.js";import"./chunk-c4ysk7x2.js";import"./chunk-ym0e374a.js";export{ld as __setSignalsGeneratorsForTest,Ke as cacheEngineFingerprint,Sn as cacheTemplate,xn as checkCache,pd as clearDevCaches,Nc as getCachedRouterScript,Oc as getCachedSignalsRuntime,ud as getServeClientAsset,yi as getServeModuleBundle,lr as hashFilePath,ad as invalidateFileCache,cd as invalidateFileCacheByDir,id as readFileCached,dd as registerServeModuleBundle,Ic as templateCache};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{kl}from"./chunk-npn3h566.js";import"./chunk-qjfgdcck.js";import"./chunk-yp8tk3v3.js";import"./chunk-7m5xrqnj.js";import"./chunk-bysyrwfa.js";import"./chunk-f30t1g74.js";import"./chunk-j79f6syh.js";import"./chunk-bk9bx2ns.js";import"./chunk-fwawm5r3.js";import"./chunk-1wb98s7b.js";import"./chunk-zpzk4wd2.js";import"./chunk-ptv5f34x.js";import"./chunk-ahyq08mp.js";import"./chunk-kk6tq07c.js";import"./chunk-c4ysk7x2.js";import"./chunk-ym0e374a.js";export{kl as startProductionServer};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function K(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function
|
|
3
|
-
export{K,
|
|
2
|
+
var f=null,D=[],v=0,g=new Set;function x(){return f}function S(e){let n=f;return D.push(e),f=e,n}function h(e){D.pop(),f=e}var A=new WeakMap;function w(e,n){A.set(e,n)}function p(e,n){for(let r of e){let i=A.get(r);if(i)i(n);else n.add(r)}}function b(e){if(v>0){p(e,g);return}let n=new Set;p(e,n);for(let r of n)r()}function C(e){v++;try{e()}finally{if(v--,v===0){let n=[...g];g.clear();for(let r of n)r()}}}function m(e){let n=f;f=null;try{return e()}finally{f=n}}var k=[],T=[];function K(e){let n=e,r=new Set,i=new Set,o=()=>{let t=x();if(t)i.add(t);return n};return o.set=(t)=>{if(!Object.is(t,n)){let c=n;n=t,r.forEach((u)=>{try{u(n,c)}catch(l){console.error("[stx] subscriber error:",l)}}),b(i)}},o.update=(t)=>{o.set(t(n))},o.subscribe=(t)=>(r.add(t),()=>r.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function dn(e,n={}){let r,i=!0,o=!1,t=new Set,c=typeof n.equals==="function"?n.equals:null,u=()=>{let s=S(d);try{r=e(),o=!0}finally{h(s)}i=!1},l=()=>{let s=r,y=o;try{u()}catch{return i=!0,!0}return!y||!c(s,r)},d=()=>{if(i)return;if(c&&t.size){if(l())b(t);return}i=!0,b(t)};w(d,(s)=>{if(i)return;if(c&&t.size){if(l())p(t,s);return}i=!0,p(t,s)});let a=()=>{let s=x();if(s)t.add(s);if(i)u();return r};return Object.defineProperty(a,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(a,"value",{get:()=>a(),configurable:!0}),a}function Ru(e,n=Object.is){return dn(e,{equals:n})}function pn(e,n={}){let r,i=!1,o=()=>{if(i)return;if(r){let c=r;r=void 0;try{c()}catch(u){console.error("[stx] effect cleanup error:",u)}}let t=S(o);try{let c=e();r=typeof c==="function"?c:void 0}catch(c){i=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{h(t)}};if(n.immediate!==!1)o();return()=>{if(i=!0,r){let t=r;r=void 0,t()}}}function is(e){C(e)}function er(e){k.push(e)}function tr(e){T.push(e)}function Au(){O(k,"onMount",T)}function Pu(){O(T,"onDestroy")}function O(e,n,r){let i=e.splice(0,e.length);for(let o of i)try{let t=o();if(r&&typeof t==="function")r.push(t)}catch(t){console.error(`[stx] ${n} callback threw:`,t)}}function Iu(){return{mount:k.length,destroy:T.length}}function fn(e){return typeof e==="function"&&e._isSignal===!0}function gn(e){return typeof e==="function"&&e._isDerived===!0}function as(e){if(fn(e)||gn(e))return m(()=>e());return e}function nr(e){return m(e)}function Ou(e,n){let r=typeof e==="function"?e:()=>e,i=K([]),o=dn(()=>i().reduce((u,l)=>n(u,l.action),r())),t=!1;return pn(()=>{if(r(),!t){t=!0;return}if(nr(()=>i().length))i.set([])}),[o,(u,l)=>{let d={action:u};i.set([...i(),d]);let a=()=>{let s=i().filter((y)=>y!==d);if(s.length!==i().length)i.set(s)};if(l&&typeof l.then==="function")Promise.resolve(l).then(a,a);return a}]}
|
|
3
|
+
export{K,dn,Ru,pn,is,er,tr,Au,Pu,Iu,fn,gn,as,nr,Ou};
|