@stacksjs/stx 0.2.875 → 0.2.880
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-fdjx4vs3.js → chunk-00tq7ghn.js} +2 -2
- package/dist/{chunk-nv4c25zj.js → chunk-02qmvcmv.js} +3 -3
- package/dist/chunk-08cb7cyw.js +2 -0
- package/dist/chunk-0h1dyd38.js +2 -0
- package/dist/{chunk-4m11kcxz.js → chunk-0m4c42qt.js} +10 -10
- package/dist/{chunk-6ykfy7eh.js → chunk-19k15mfc.js} +2 -2
- package/dist/chunk-1avy0p8v.js +2 -0
- package/dist/chunk-1jk46ve0.js +2 -0
- package/dist/chunk-1r612xxs.js +2 -0
- package/dist/chunk-1z6rrqvm.js +2 -0
- package/dist/chunk-2d68p12e.js +2 -0
- package/dist/chunk-2haf7t5h.js +2 -0
- package/dist/{chunk-1q5w3xav.js → chunk-2r0nrvqe.js} +2 -2
- package/dist/chunk-3jp5z1qj.js +2 -0
- package/dist/{chunk-644ckv6e.js → chunk-3q0w0bzd.js} +10 -10
- package/dist/{chunk-eknm4jrm.js → chunk-3sema2js.js} +2 -2
- package/dist/{chunk-vznf808n.js → chunk-3wb82rxw.js} +5 -5
- package/dist/chunk-3zds0gmd.js +2 -0
- package/dist/{chunk-qnwd5bz4.js → chunk-463weehv.js} +1 -1
- package/dist/{chunk-wm029dh0.js → chunk-4fkcn6z5.js} +18 -12
- package/dist/{chunk-976kgb3r.js → chunk-4n45qa0b.js} +9 -9
- package/dist/chunk-4pjqj54a.js +2 -0
- package/dist/{chunk-9anqwafq.js → chunk-4r2rfdmr.js} +5 -5
- package/dist/{chunk-ft6em3wm.js → chunk-50cnypys.js} +6 -6
- package/dist/chunk-53cc06w7.js +2 -0
- package/dist/{chunk-y2e2zm6y.js → chunk-57q4nvs9.js} +3 -3
- package/dist/{chunk-3mz9bdf7.js → chunk-59er0fc7.js} +3 -3
- package/dist/{chunk-dw0ttj6p.js → chunk-5eftxrvv.js} +2 -2
- package/dist/chunk-5p3825qw.js +2 -0
- package/dist/chunk-5rd0an89.js +2 -0
- package/dist/{chunk-pk714ynv.js → chunk-69ezjc8k.js} +4 -4
- package/dist/{chunk-75v0yxeh.js → chunk-6c1vm6bs.js} +2 -2
- package/dist/{chunk-d3q0cg47.js → chunk-6df3j3qq.js} +3 -3
- package/dist/{chunk-kzc2tqzr.js → chunk-6t04tqvh.js} +2 -2
- package/dist/chunk-78zgmqhd.js +2 -0
- package/dist/chunk-7bsrnpmh.js +33 -0
- package/dist/chunk-7dq6ebvp.js +2 -0
- package/dist/chunk-7kqgp3p7.js +2 -0
- package/dist/{chunk-wzvdr4ta.js → chunk-7mcs59pr.js} +2 -2
- package/dist/chunk-83b9k17j.js +2 -0
- package/dist/chunk-86nsbxep.js +61 -0
- package/dist/{chunk-0g2mg8cw.js → chunk-8e1cv1hh.js} +3 -3
- package/dist/chunk-8h5nje66.js +2 -0
- package/dist/{chunk-ae8q4gze.js → chunk-8va3fs07.js} +5 -5
- package/dist/{chunk-fnjm3xbf.js → chunk-93jhfbeg.js} +6 -6
- package/dist/{chunk-xmws1gaf.js → chunk-94ctmp0j.js} +2 -2
- package/dist/chunk-97kgrevs.js +4 -0
- package/dist/{chunk-qvrew79n.js → chunk-9cbf0seq.js} +2 -2
- package/dist/{chunk-mce3g2wb.js → chunk-9f31gs4m.js} +2 -2
- package/dist/chunk-9kza7gxd.js +2 -0
- package/dist/{chunk-b4d4tjvx.js → chunk-a0q0kb0s.js} +5 -5
- package/dist/chunk-a5gnxdfe.js +2 -0
- package/dist/chunk-a60ztvnp.js +3 -0
- package/dist/{chunk-s7fhpkvf.js → chunk-a7ryj8z8.js} +6 -6
- package/dist/{chunk-gqtb53s8.js → chunk-aaea157p.js} +2 -2
- package/dist/{chunk-wp0qpa50.js → chunk-agd2b928.js} +59 -27
- package/dist/chunk-aqxh80vh.js +2 -0
- package/dist/{chunk-az5rh7fs.js → chunk-awp8a3t4.js} +2 -2
- package/dist/chunk-axra1yas.js +2 -0
- package/dist/chunk-az8b0726.js +21 -0
- package/dist/chunk-b7d3n4aw.js +2 -0
- package/dist/{chunk-r2bxjna3.js → chunk-c0g30cjs.js} +2 -2
- package/dist/{chunk-jt5tzddc.js → chunk-c73c0wf9.js} +2 -2
- package/dist/{chunk-88xayf21.js → chunk-cad7e5q1.js} +9 -9
- package/dist/{chunk-bjjfr7qt.js → chunk-care745q.js} +2 -2
- package/dist/chunk-ce0zbpr5.js +2 -0
- package/dist/chunk-cjv89tnb.js +20 -0
- package/dist/chunk-cv1vm1w0.js +2 -0
- package/dist/{chunk-mw0rb1sf.js → chunk-czcx3nbx.js} +6 -6
- package/dist/chunk-d7b30bg6.js +2 -0
- package/dist/{chunk-stn7p7f1.js → chunk-dwyhpbpx.js} +2 -2
- package/dist/{chunk-y75bds1g.js → chunk-e362e615.js} +30 -30
- package/dist/{chunk-ydppkb8y.js → chunk-e41pgmgk.js} +2 -2
- package/dist/{chunk-6az66mrc.js → chunk-ec5q4nnw.js} +66 -66
- package/dist/{chunk-0h6r7nvn.js → chunk-egjmb32c.js} +126 -71
- package/dist/{chunk-q7zc78az.js → chunk-ew3vs3jq.js} +8 -8
- package/dist/{chunk-jqxerj6k.js → chunk-ezna4dhj.js} +2 -2
- package/dist/chunk-f3j1h3ch.js +2 -0
- package/dist/{chunk-vmssv78v.js → chunk-f7znj9xg.js} +3 -3
- package/dist/chunk-fz4c5e9m.js +2 -0
- package/dist/{chunk-esjr9qhe.js → chunk-g2xy0z0e.js} +2 -2
- package/dist/{chunk-fy6ts0n4.js → chunk-g83ph305.js} +2 -2
- package/dist/{chunk-kywe0f1v.js → chunk-gbncp2gp.js} +2 -2
- package/dist/chunk-gm67jt8p.js +2 -0
- package/dist/chunk-gmp10259.js +2 -0
- package/dist/{chunk-0sa9gqmc.js → chunk-h2tq6cbr.js} +11 -11
- package/dist/chunk-h3fv0q25.js +2 -0
- package/dist/{chunk-r09kz9bf.js → chunk-h63ma36g.js} +2 -2
- package/dist/chunk-hkx51atf.js +2 -0
- package/dist/{chunk-95hbmv7k.js → chunk-hmntqqyd.js} +7 -7
- package/dist/{chunk-3w7gacva.js → chunk-hxhmhw23.js} +3 -3
- package/dist/chunk-jghpzx5m.js +2 -0
- package/dist/chunk-k206d3pn.js +2 -0
- package/dist/chunk-k40e0ete.js +4 -0
- package/dist/chunk-k6c5t9we.js +38 -0
- package/dist/{chunk-f4vgagjb.js → chunk-kee5a3ce.js} +3 -3
- package/dist/chunk-kn9tqjgv.js +25 -0
- package/dist/chunk-kna1bdm2.js +54 -0
- package/dist/{chunk-a5yb8w7s.js → chunk-mygsektn.js} +3 -3
- package/dist/chunk-nb6erf75.js +9 -0
- package/dist/chunk-ngzyzcrp.js +2 -0
- package/dist/{chunk-3f9wctns.js → chunk-nysbdr4r.js} +2 -2
- package/dist/chunk-p55a910x.js +1198 -0
- package/dist/chunk-p6hcrg3r.js +3 -0
- package/dist/chunk-p746twww.js +2 -0
- package/dist/chunk-pa2vt2ej.js +2 -0
- package/dist/chunk-pa6kgbmw.js +2 -0
- package/dist/{chunk-saqzk45g.js → chunk-pdprhg5k.js} +1 -1
- package/dist/chunk-pjjrx9pk.js +2 -0
- package/dist/{chunk-g7qpnmbm.js → chunk-pm4rpc4a.js} +23 -23
- package/dist/chunk-pt3rp3zg.js +2 -0
- package/dist/{chunk-4517hny7.js → chunk-q1mb0fbt.js} +2 -2
- package/dist/{chunk-k1ew643q.js → chunk-q74affc4.js} +2 -2
- package/dist/chunk-qd9v1v8z.js +2 -0
- package/dist/chunk-qfwk93fk.js +2 -0
- package/dist/chunk-qg1kw5yf.js +2 -0
- package/dist/chunk-qn6y5ttj.js +2 -0
- package/dist/chunk-qxcc0aar.js +2 -0
- package/dist/{chunk-rzd9hyhv.js → chunk-ram5944w.js} +2 -2
- package/dist/{chunk-p5m1z6e1.js → chunk-rcxer2km.js} +4 -4
- package/dist/chunk-rdxph1tp.js +2 -0
- package/dist/chunk-rnrdngnn.js +2 -0
- package/dist/{chunk-x2ftkaz3.js → chunk-rsxxajv6.js} +2 -2
- package/dist/chunk-rw5sxr5a.js +2 -0
- package/dist/chunk-rzcdwybt.js +26 -0
- package/dist/chunk-s29hp1qw.js +14 -0
- package/dist/chunk-s7xywsqd.js +3 -0
- package/dist/{chunk-d6gqh2wv.js → chunk-satrf398.js} +1 -1
- package/dist/{chunk-zn6n075d.js → chunk-shcnt6aa.js} +3 -3
- package/dist/{chunk-ysfgabpf.js → chunk-sn4ndpd7.js} +3 -3
- package/dist/{chunk-zc8a2erc.js → chunk-ssg6ne5b.js} +4 -4
- package/dist/{chunk-afxfkb60.js → chunk-sv7fdqmc.js} +6 -6
- package/dist/chunk-swz0xprw.js +2 -0
- package/dist/chunk-t8r40wgf.js +2 -0
- package/dist/{chunk-dbvsa5ya.js → chunk-t94y8g35.js} +2 -2
- package/dist/{chunk-g33ycxe3.js → chunk-t9hxyvvc.js} +5 -5
- package/dist/{chunk-cmh0bfkb.js → chunk-tgzs1kbj.js} +5 -5
- package/dist/chunk-tka73egx.js +2 -0
- package/dist/{chunk-xtaq95em.js → chunk-v1s838fe.js} +1 -1
- package/dist/chunk-v3747589.js +12 -0
- package/dist/chunk-v9h2bbhf.js +2 -0
- package/dist/chunk-v9mxhch2.js +2 -0
- package/dist/chunk-vm42j29z.js +2 -0
- package/dist/chunk-w2kdhm7k.js +2 -0
- package/dist/chunk-w5zzwe2f.js +2 -0
- package/dist/chunk-wbmx0rge.js +2 -0
- package/dist/chunk-wjafpvjv.js +2 -0
- package/dist/chunk-ws2h92mm.js +3 -0
- package/dist/chunk-ws9kr80x.js +2 -0
- package/dist/{chunk-45rzd16g.js → chunk-xf0xacc9.js} +44 -44
- package/dist/chunk-xhr35ctb.js +2 -0
- package/dist/chunk-xmmr0916.js +2 -0
- package/dist/{chunk-yxdhz4ps.js → chunk-xpbakn6t.js} +2 -2
- package/dist/chunk-xz4v9tg1.js +3 -0
- package/dist/chunk-y7e61pz3.js +3 -0
- package/dist/{chunk-v0tdg16k.js → chunk-ybjgnnyf.js} +5 -5
- package/dist/chunk-yh2hnt3m.js +12 -0
- package/dist/{chunk-w6pzkcjp.js → chunk-ymqm898x.js} +2 -2
- package/dist/{chunk-2zaatnnh.js → chunk-yp4tn4zn.js} +4 -4
- package/dist/chunk-z7k1xn6k.js +2 -0
- package/dist/{chunk-t4g3ka8c.js → chunk-z9ffr9gy.js} +7 -7
- package/dist/{chunk-nnp6rf4c.js → chunk-zch65qrd.js} +1 -1
- package/dist/{chunk-pbakxcv8.js → chunk-zek9t5za.js} +2 -2
- package/dist/cli.js +23 -23
- package/dist/client/signals-dom-ready-runtime.js +6 -0
- package/dist/client/signals-mount-runtime.js +1 -1
- package/dist/client-module-registry.js +10 -4
- package/dist/client-parameter-bindings.d.ts +5 -0
- package/dist/client-parameter-bindings.js +47 -6
- package/dist/client-script-bundler.js +4 -3
- package/dist/component-library.d.ts +1 -0
- package/dist/component-library.js +42 -14
- package/dist/composable-loader.js +19 -9
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/html-masking.d.ts +2 -0
- package/dist/html-masking.js +10 -0
- package/dist/inherited-context.d.ts +1 -1
- package/dist/inherited-context.js +43 -14
- package/dist/module-syntax.d.ts +2 -0
- package/dist/module-syntax.js +21 -0
- package/dist/native-component-context.js +44 -17
- package/dist/page-module-order.d.ts +10 -0
- package/dist/page-module-order.js +139 -0
- package/dist/process.js +6 -4
- package/dist/pwa.js +3 -3
- package/dist/script-attributes.d.ts +4 -0
- package/dist/script-attributes.js +10 -0
- package/dist/ssg.js +39 -39
- package/dist/strip-literals.d.ts +2 -0
- package/dist/strip-literals.js +12 -6
- package/dist/stx-virtual-ts.d.ts +1 -0
- package/dist/stx-virtual-ts.js +21 -27
- package/dist/typecheck.js +8 -0
- package/package.json +5 -5
- package/dist/chunk-003ph86a.js +0 -2
- package/dist/chunk-027meh1k.js +0 -2
- package/dist/chunk-0bc3mwqd.js +0 -2
- package/dist/chunk-0gv2mmr0.js +0 -2
- package/dist/chunk-0j8zre1m.js +0 -2
- package/dist/chunk-0qwbhv3f.js +0 -33
- package/dist/chunk-1gfg6qmr.js +0 -2
- package/dist/chunk-1tqp2s13.js +0 -2
- package/dist/chunk-1y7kfp5d.js +0 -2
- package/dist/chunk-1ztp5vkh.js +0 -3
- package/dist/chunk-24e4dapm.js +0 -2
- package/dist/chunk-2qb9kp21.js +0 -25
- package/dist/chunk-32wvc376.js +0 -2
- package/dist/chunk-3te2y9qf.js +0 -2
- package/dist/chunk-447jc6zc.js +0 -2
- package/dist/chunk-51ymssz5.js +0 -2
- package/dist/chunk-6dz5za5z.js +0 -2
- package/dist/chunk-6ezt9kbe.js +0 -54
- package/dist/chunk-6grkdknk.js +0 -2
- package/dist/chunk-6q9a5bph.js +0 -2
- package/dist/chunk-6rqef7wp.js +0 -2
- package/dist/chunk-72p5annm.js +0 -33
- package/dist/chunk-74x6j229.js +0 -4
- package/dist/chunk-7j11vgm1.js +0 -3
- package/dist/chunk-7ngfcdv9.js +0 -2
- package/dist/chunk-7njy024g.js +0 -2
- package/dist/chunk-9e3ggwk7.js +0 -2
- package/dist/chunk-9mz2n39m.js +0 -2
- package/dist/chunk-a262spx7.js +0 -2
- package/dist/chunk-a8wn0snv.js +0 -2
- package/dist/chunk-af6m1s2b.js +0 -3
- package/dist/chunk-b1tcym2x.js +0 -2
- package/dist/chunk-b61dq7pz.js +0 -12
- package/dist/chunk-bdh73gxd.js +0 -4
- package/dist/chunk-bs7g6jtt.js +0 -2
- package/dist/chunk-bspj1rf1.js +0 -2
- package/dist/chunk-bx3hpsxn.js +0 -2
- package/dist/chunk-byq488g4.js +0 -2
- package/dist/chunk-c8pzj57b.js +0 -2
- package/dist/chunk-e2b2f502.js +0 -2
- package/dist/chunk-ec6mrad6.js +0 -2
- package/dist/chunk-eh2gec79.js +0 -2
- package/dist/chunk-em31p5pb.js +0 -2
- package/dist/chunk-eqfsw6x4.js +0 -2
- package/dist/chunk-ey1vwfpc.js +0 -24
- package/dist/chunk-fa57bncd.js +0 -2
- package/dist/chunk-fk79jbzn.js +0 -2
- package/dist/chunk-g97krv0d.js +0 -2
- package/dist/chunk-gn16yq49.js +0 -2
- package/dist/chunk-gvs61tqn.js +0 -2
- package/dist/chunk-h2928108.js +0 -2
- package/dist/chunk-hd5bny2c.js +0 -2
- package/dist/chunk-j1ytbd6r.js +0 -1184
- package/dist/chunk-jm7qa3v3.js +0 -2
- package/dist/chunk-jmjgj3nh.js +0 -2
- package/dist/chunk-jqtpzzz4.js +0 -12
- package/dist/chunk-kq8mffgf.js +0 -2
- package/dist/chunk-kx06jzdw.js +0 -2
- package/dist/chunk-n344ss97.js +0 -2
- package/dist/chunk-n5pvdrkb.js +0 -2
- package/dist/chunk-ne8q191s.js +0 -2
- package/dist/chunk-np8wgbsa.js +0 -3
- package/dist/chunk-p4e8myzj.js +0 -17
- package/dist/chunk-pp99rmjm.js +0 -72
- package/dist/chunk-pqmjeea6.js +0 -2
- package/dist/chunk-q0k2gmva.js +0 -2
- package/dist/chunk-qggwr60r.js +0 -2
- package/dist/chunk-qm3v4qb7.js +0 -2
- package/dist/chunk-qrn1nza9.js +0 -2
- package/dist/chunk-qty0t69x.js +0 -2
- package/dist/chunk-rzadf7vx.js +0 -20
- package/dist/chunk-snz2cxqv.js +0 -2
- package/dist/chunk-ts37jw3s.js +0 -2
- package/dist/chunk-vnrbjbrw.js +0 -3
- package/dist/chunk-wkb7dhp7.js +0 -2
- package/dist/chunk-wxyqp6g9.js +0 -2
- package/dist/chunk-x76qvq1n.js +0 -2
- package/dist/chunk-y4hn1qh0.js +0 -2
- package/dist/chunk-yc8ggeh2.js +0 -2
- package/dist/chunk-ydy0tfar.js +0 -2
- package/dist/chunk-yfed67yc.js +0 -2
package/dist/chunk-2qb9kp21.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{E,ji,ro,d,m,O,ut,p,so,t,u,k}from"./chunk-pp99rmjm.js";import{Te,jt,te,j,En,re,R}from"./chunk-j1ytbd6r.js";import{gr}from"./chunk-4m11kcxz.js";import{de}from"./chunk-dbvsa5ya.js";import{Es}from"./chunk-xtaq95em.js";var he=1000,me=!1;function xe(n,r){let i=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,s;while((s=i.exec(n))!==null){let l=s.index+s[0].length,b=s.index+s[0].indexOf("("),x=k(n,"(",")",b);if(x===-1)continue;let f=n.slice(l,x).trim();if(!f)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(f)))continue;let h;try{let a=O(f,r);if(!a||typeof a!=="object")continue;h=JSON.stringify(a)}catch{continue}e+=n.slice(o,l)+h,o=x,i.lastIndex=x}return o===0?n:e+n.slice(o)}function be(n,r){let i=/@component\s*\(/g,e=n,o,s=[];while((o=i.exec(e))!==null){let l=o.index,b=l+o[0].length-1,x=1,f=b+1;while(f<e.length&&x>0){if(e[f]==="(")x++;else if(e[f]===")"){if(x--,x===0)break}f++}if(x!==0)continue;let c=e.substring(b+1,f),h=f+1,a=c.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let y=a[1],g=c.slice(a[0].length),w=g.match(/^\s*,\s*/);if(!w)continue;let S=g.slice(w[0].length).trim();if(!S)continue;try{let F=O(S,r),B=JSON.stringify(F),v=`@component('${y}', ${B})`;s.push({start:l,end:h,replacement:v})}catch{continue}}for(let l=s.length-1;l>=0;l--){let{start:b,end:x,replacement:f}=s[l];e=e.substring(0,b)+f+e.substring(x)}return e}function ie(n,r,i){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),s;while((s=o.exec(e))!==null){let l=s.index,b=l+s[0].length-1,x=1,f=b+1,c=null,h=!1;while(f<e.length&&x>0){let g=e[f];if(h){h=!1,f++;continue}if(g==="\\"&&c){h=!0,f++;continue}if(c){if(g===c)c=null;f++;continue}if(g==='"'||g==="'"||g==="`"){c=g,f++;continue}if(g==="(")x++;else if(g===")"){if(x--,x===0)break}f++}if(x!==0)break;let a=e.substring(b+1,f),y=i(a);e=e.substring(0,l)+y+e.substring(f+1)}return e}function ye(n,r){let i=n;return i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),i=i.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,s)=>{try{if(j(s,r.__stx_client_signal_names||[]))return e;let l=Object.keys(r),b=Object.values(r);ji(s);let x=!1,c=p(s,l,()=>{x=!0})(...b);if(x)return e;let h=JSON.stringify(c);if(h===void 0){if(!ut(s).some((g)=>!(g in r)))return"";return e}let a=Buffer.from(h,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(l){return e}}),i}var Q="<!--__STX_BREAK__-->",ee="<!--__STX_CONTINUE__-->";function ae(n,r){let i=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let s=i.exec(n);s;s=i.exec(n)){if(!s[1]){let f=s[0].length===3&&s[0]==="{{{"?3:2,c=s[0]==="{!!"?n.indexOf("!!}",i.lastIndex):Te(n,s.index,f);if(c<0)break;i.lastIndex=c+(s[0]==="{!!"?3:f);continue}let l=i.lastIndex,b=!0,x=/^\s*\(/.exec(n.slice(l));if(x){let f=l+x[0].length-1,c=k(n,"(",")",f);if(c<0)break;l=c+1;try{let h=`!!(${n.slice(f+1,c).trim()})`;b=m(h)?Boolean(p(h,Object.keys(r))(...Object.values(r))):Boolean(d(h,r))}catch{b=!1}}if(e+=n.slice(o,s.index),b)return e+(s[1]==="break"?Q:ee);o=l,i.lastIndex=l}return e+n.slice(o)}function ue(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),i="",e=0;return En(n,(o,s,l)=>(i+=ce(r(n.slice(e,l))),i+=`\${__stxRenderLoopValue(${l}, (${s}), ${o.length})}`,e=l+o.length,o)),i+ce(r(n.slice(e)))}function fe(n,r,i,e){return re(n,r,i==null?"":String(i),!1,e)}function ce(n){let r=n;return r=ie(r,"@break",(i)=>{let e=i.trim();if(!so(e))return"";return`\`; if (${e}) { break; } result += \``}),r=ie(r,"@continue",(i)=>{let e=i.trim();if(!so(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function Ee(n){let r=/@forelse\s*\(/g,i,e=[],o=/@foreach\s*\(/g,s=/@endforeach/g,l;while((l=o.exec(n))!==null)e.push({pos:l.index,delta:1});while((l=s.exec(n))!==null)e.push({pos:l.index,delta:-1});e.sort((c,h)=>c.pos-h.pos);let b=[],x=0;for(let c of e)x+=c.delta,b.push({pos:c.pos,depth:x});function f(c){let h=0,a=b.length-1,y=0;while(h<=a){let g=h+a>>1;if(b[g].pos<=c)y=b[g].depth,h=g+1;else a=g-1}return y}while((i=r.exec(n))!==null){if(f(i.index)>0)continue;let c=i.index,h=i.index+i[0].length-1,a=1,y=h+1,g=-1;while(y<n.length&&a>0){if(n[y]==="(")a++;else if(n[y]===")"){if(a--,a===0){g=y;break}}y++}if(g===-1)continue;let w=n.substring(h+1,g),S=jt(w);if(!S)continue;let{arrayExpr:F,itemVar:B}=S,v=g+1,A=1,T=v,K=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(A>0&&T<n.length){K.lastIndex=T,L.lastIndex=T;let P=K.exec(n),_=L.exec(n);if(!_)break;if(P&&P.index<_.index)A++,T=P.index+P[0].length;else{if(A--,A===0){V=_.index;break}T=_.index+11}}if(V===-1)continue;let I=n.substring(v,V),Z=V+11,z=-1,D=0,N=0;while(N<I.length){let P=I.indexOf("@",N);if(P===-1)break;let _=I.substring(P);if(/^@forelse\s*\(/.test(_))D++,N=P+1;else if(_.startsWith("@endforelse"))D--,N=P+11;else if(D===0&&_.startsWith("@empty")){if(I.length<=P+6||!/[a-z]/i.test(I[P+6])){z=P;break}N=P+1}else N=P+1}if(z===-1)continue;return{start:c,end:Z,arrayExpr:F,itemVar:B,foreachContent:I.substring(0,z),emptyContent:I.substring(z+6)}}return null}function le(n,r){let i=n;while(!0){let e=Ee(i);if(!e)break;let{start:o,end:s,arrayExpr:l,itemVar:b,foreachContent:x,emptyContent:f}=e;try{let c;if(m(l))c=p(l,Object.keys(r))(...Object.values(r));else c=d(l,r);let h;if(!Array.isArray(c)||c.length===0)h=f;else h=`@foreach (${l} as ${b})${x}@endforeach`;i=i.substring(0,o)+h+i.substring(s)}catch(c){let h=c instanceof Error?c.message:String(c),a=u("Forelse",`Error in @forelse(${l} as ${b}): ${h}`,t.EVALUATION_ERROR);i=i.substring(0,o)+a+i.substring(s)}}return i}var ge="<!--stx:foreach-not-iterable:",_e=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function $e(n,r){return`${ge}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function Re(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function vs(n){if(!n.includes(ge))return n;return n.replace(_e,(r,i,e)=>(Re(decodeURIComponent(i),decodeURIComponent(e)),""))}function Qf(n,r,i,e,o=!1){let s=ne(n,r,i,e,o),l=s.next();while(!l.done)l=s.next();return l.value}async function Yo(n,r,i,e,o=!1){let s=ne(n,r,i,e,o),l=s.next();while(!l.done)await E(),l=s.next();return l.value}function*ne(n,r,i,e,o=!1){let s=n,l=new Set(r.__stx_client_signal_names||[]);for(let c of gr(n))l.add(c);if(l.size)r={...r,__stx_client_signal_names:[...l]};s=le(s,r);function b(c){let h=/@foreach\s*\(/g,a;while((a=h.exec(c))!==null){let y=a.index,g=a.index+a[0].length-1,w=1,S=g+1,F=-1;while(S<c.length&&w>0){if(c[S]==="(")w++;else if(c[S]===")"){if(w--,w===0){F=S;break}}S++}if(F===-1)continue;let B=c.substring(g+1,F),v=jt(B);if(!v)continue;let A=y,{arrayExpr:T,itemVar:K}=v,L=F+1,V=1,I=L,Z=/@foreach\s*\(/g,z=/@endforeach/g;while(V>0&&I<c.length){Z.lastIndex=I,z.lastIndex=I;let D=Z.exec(c),N=z.exec(c);if(!N)break;if(D&&D.index<N.index)V++,I=D.index+D[0].length;else{if(V--,V===0){let P=c.substring(L,N.index),_=N.index+11;return{start:A,end:_,arrayExpr:T,itemVar:K,content:P}}I=N.index+11}}}return null}function*x(c,h){let a=c;while(!0){let y=b(a);if(!y)break;let{start:g,end:w,arrayExpr:S,itemVar:F,content:B}=y;try{let v=S.trim(),A;if(m(v))A=p(v,Object.keys(h))(...Object.values(h));else A=d(v,h);let T=!1;if(!Array.isArray(A))if(A instanceof Map)A=Array.from(A),T=!0;else if(A instanceof Set)A=Array.from(A);else if(typeof A==="string")A=Array.from(A);else if(A&&typeof A==="object"&&!(A instanceof Date)&&!(A instanceof RegExp))A=Object.entries(A),T=!0;else{let _=$e(v,i)+u("Foreach",`Error in @foreach: ${v} is not iterable`,t.TYPE_ERROR);a=a.substring(0,g)+_+a.substring(w);continue}let K=e?.loops?.useAltLoopVariable??me,L=F.trim(),V=null,I,Z=!1;if(L.includes("=>")){let _=L.split("=>").map((W)=>W.trim());if(_.length===2&&_[0]&&_[1])V=_[0],I=_[1];else I=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let _=L.split(",").map((W)=>W.trim());if(_.length===2&&_[0]&&_[1])I=_[0],V=_[1],Z=!0;else I=L}else I=L;let z="",D=new Set(te(`${S} as ${F}`)),N=A,P=h[ro]??new WeakMap;for(let _=0;_<N.length;_++){if(_%16===0)yield;let W=N[_],se={index:_,iteration:_+1,first:_===0,last:_===N.length-1,count:N.length},M={...h,loop:se,$loop:se,[ro]:P};if(Array.isArray(h.__stx_client_signal_names))M.__stx_client_signal_names=h.__stx_client_signal_names.filter((H)=>!D.has(H));if(I.startsWith("[")&&I.endsWith("]")){let H=I.slice(1,-1).split(",").map((U)=>U.trim());if(Array.isArray(W))H.forEach((U,X)=>{if(U)M[U]=W[X]});else M[I]=W}else if(I.startsWith("{")&&I.endsWith("}")){let H=I.slice(1,-1).split(",").map((U)=>U.trim()).filter(Boolean);if(W!==null&&typeof W==="object")H.forEach((U)=>{let X=U.indexOf(":"),Y=(X===-1?U:U.slice(0,X)).trim(),oe=X===-1?Y:U.slice(X+1).trim();if(Y&&oe)M[oe]=W[Y]});else M[I]=W}else M[I]=W;if(V)if(!Z&&T&&Array.isArray(W)&&W.length===2)M[V]=W[0],M[I]=W[1];else M[V]=_;let C=le(B,M);C=yield*ne(C,M,i,e,!0),C=de(C,M,i),C=ae(C,M);let J=C.indexOf(Q),G=C.indexOf(ee),q=J<0?G:G<0?J:Math.min(J,G);if(q>=0)C=C.slice(0,q);if(C=R(C,M,i),C=ye(C,M),C=be(C,M),C=xe(C,M),z+=C,q>=0&&q===J)break}a=a.substring(0,g)+z+a.substring(w)}catch(v){let A=u("Foreach",`Error in @foreach(${S.trim()} as ${F.trim()}): ${v instanceof Error?v.message:String(v)}`,t.EVALUATION_ERROR);a=a.substring(0,g)+A+a.substring(w)}}return a}s=yield*x(s,r),s=Ae(s,r,i,e);let f=e?.loops?.maxWhileIterations??he;return s=ke(s,r,f),o?s:vs(s)}function eg(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function pe(n){return so(n)}function Ae(n,r,i,e){let o=n,s=!0;while(s){s=!1;let l=o.match(/@for\s*\(/);if(!l||l.index===void 0)break;let b=l.index,x=b+l[0].length-1,f=k(o,"(",")",x);if(f===-1)break;let c=eg(o.slice(x+1,f)),h=f+1,a=Es(o.slice(b),"for","endfor");if(a.length===0)break;let y=a[0].content,g=b+a[0].end;if(!pe(c)){let w=u("For",`Unsafe expression in @for: ${c}`,t.UNSAFE_EXPRESSION);o=o.substring(0,b)+w+o.substring(g),s=!0;continue}try{let w=we(c),S=/@(?:for|foreach|if|unless)\s*\(/.test(y);if(w.length>0&&S){let K=Oe({forExpr:c,content:y,iterVarNames:w,context:r,filePath:i,options:e});o=o.substring(0,b)+K+o.substring(g),s=!0;continue}let F=Object.keys(r),B=Object.values(r),v=ue(y),T=Function(...F,"__stxRenderLoopValue",`
|
|
3
|
-
let result = '';
|
|
4
|
-
for (${c}) {
|
|
5
|
-
result += \`${v}\`;
|
|
6
|
-
}
|
|
7
|
-
return result;
|
|
8
|
-
`)(...B,(K,L,V)=>fe(y,K,L,V));o=o.substring(0,b)+T+o.substring(g),s=!0}catch(w){let S=u("For",`Error in @for(${c}): ${w instanceof Error?w.message:String(w)}`,t.EVALUATION_ERROR);o=o.substring(0,b)+S+o.substring(g),s=!0}}return o}function we(n){let r=n.trim(),i=r.match(/^(?:const|let|var)\s+(\[[^\]]+\]|\{[^}]+\})\s+(?:of|in)\s+/);if(i){let s=i[1];return s.slice(1,-1).split(",").map((b)=>{let x=b.trim();if(!x)return"";let f=x.indexOf(":");if(f>=0&&s.startsWith("{")){let a=x.slice(f+1).trim(),y=a.indexOf("=");return(y>=0?a.slice(0,y):a).trim()}let c=x.indexOf("="),h=(c>=0?x.slice(0,c):x).trim();return/^[A-Za-z_$][\w$]*$/.test(h)?h:""}).filter(Boolean)}let e=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s+(?:of|in)\s+/);if(e)return[e[1]];let o=r.match(/^(?:const|let|var)\s+([A-Za-z_$][\w$]*)\s*=[^;]*;/);if(o)return[o[1]];return[]}function Oe(n){let{forExpr:r,content:i,iterVarNames:e,context:o,filePath:s,options:l}=n,b=Object.keys(o),x=Object.values(o),f=s??"inline.stx",c="";return Function(...b,"__renderIteration",`
|
|
9
|
-
for (${r}) {
|
|
10
|
-
if (!__renderIteration([${e.join(", ")}])) break;
|
|
11
|
-
}
|
|
12
|
-
`)(...x,(a)=>{let y={...o};e.forEach((B,v)=>{y[B]=a[v]});let g=Qf(i,y,f,l,!0);g=de(g,y,f),g=ae(g,y);let w=g.indexOf(Q),S=g.indexOf(ee),F=w<0?S:S<0?w:Math.min(w,S);if(F>=0)g=g.slice(0,F);return c+=R(g,y,f),F<0||F!==w}),c}function ke(n,r,i){let e=n,o=!0;while(o){o=!1;let s=e.match(/@while\s*\(/);if(!s||s.index===void 0)break;let l=s.index,b=l+s[0].length-1,x=k(e,"(",")",b);if(x===-1)break;let f=e.slice(b+1,x),c=Es(e.slice(l),"while","endwhile");if(c.length===0)break;let h=c[0].content,a=l+c[0].end;if(!pe(f)){let y=u("While",`Unsafe expression in @while: ${f}`,t.UNSAFE_EXPRESSION);e=e.substring(0,l)+y+e.substring(a),o=!0;continue}try{let y=Object.keys(r),g=Object.values(r),w=ue(h),F=Function(...y,"__stxRenderLoopValue",`
|
|
13
|
-
let result = '';
|
|
14
|
-
let maxIterations = ${i}; // Configurable safety limit
|
|
15
|
-
let counter = 0;
|
|
16
|
-
while (${f} && counter < maxIterations) {
|
|
17
|
-
counter++;
|
|
18
|
-
result += \`${w}\`;
|
|
19
|
-
}
|
|
20
|
-
if (counter > maxIterations) {
|
|
21
|
-
result += '<!-- [While Error [1104]]: Maximum iterations (${i}) exceeded in while loop. Configure via options.loops.maxWhileIterations -->';
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
`)(...g,(B,v,A)=>fe(h,B,v,A));e=e.substring(0,l)+F+e.substring(a),o=!0}catch(y){let g=u("While",`Error in @while(${f}): ${y instanceof Error?y.message:String(y)}`,t.EVALUATION_ERROR);e=e.substring(0,l)+g+e.substring(a),o=!0}}return e}
|
|
25
|
-
export{vs,Qf,Yo,eg};
|
package/dist/chunk-32wvc376.js
DELETED
package/dist/chunk-3te2y9qf.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{km,_m,Cm,Em,nu,Tm,$m,Rm,Am,Pm,Im,Om}from"./chunk-1q5w3xav.js";export{Im as Broadcast,Om as BroadcastServer,nu as broadcast,Am as broadcastPresence,Rm as broadcastPrivate,Pm as channel,km as getBroadcastServer,Em as loadChannels,_m as startBroadcasting,Cm as stopBroadcasting,Tm as toUser,$m as toUsers};
|
package/dist/chunk-447jc6zc.js
DELETED
package/dist/chunk-51ymssz5.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Xh,Yf,nt,Sc,Jh,ms,hs,ys}from"./chunk-6ezt9kbe.js";import"./chunk-88xayf21.js";import"./chunk-7j11vgm1.js";import"./chunk-dbvsa5ya.js";import"./chunk-xtaq95em.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{Jh as clearOnceStore,Sc as onceStore,nt as partialsCache,ms as processIncludes,hs as processStackPushDirectives,ys as processStackReplacements,Xh as resetUnscopedSignalWarnings,Yf as topLevelElements};
|
package/dist/chunk-6dz5za5z.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{vs,Qf,Yo,eg}from"./chunk-2qb9kp21.js";import"./chunk-dbvsa5ya.js";import"./chunk-4m11kcxz.js";import"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import{jt}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{eg as declareBareLoopHead,jt as parseLoopBinding,Qf as processLoops,Yo as processLoopsAsync,vs as reportDeferredLoopWarnings};
|
package/dist/chunk-6ezt9kbe.js
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{P,d,m,O,p,Y}from"./chunk-pp99rmjm.js";import{K,Bs,Fe,L,Mt,Pr,Ue,We,s,y,Re,R}from"./chunk-j1ytbd6r.js";import{ft}from"./chunk-fdjx4vs3.js";import{N}from"./chunk-3w7gacva.js";import{de}from"./chunk-dbvsa5ya.js";import{V,rt}from"./chunk-bjjfr7qt.js";import{A,In}from"./chunk-1ztp5vkh.js";import M from"path";import{existsSync as ye}from"fs";function ae(c,e){let a=0;for(let r=e;r<c.length;r++){let b=c[r];if(b==="("||b==="["||b==="{")a++;else if(b===")"||b==="]"||b==="}")a--;else if(b===","&&a===0)return r}return-1}function $e(c,e,a){let r=c,b=new RegExp(`${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),n=b.exec(r);while(n){let u=n.index,t=u+n[0].length-1,T=1,W=t+1;while(W<r.length&&T>0){if(r[W]==="(")T++;else if(r[W]===")")T--;W++}if(T!==0)break;let ie=r.substring(t+1,W-1),B=`${a}(${ie})`;r=r.substring(0,u)+B+r.substring(W),b.lastIndex=u+B.length,n=b.exec(r)}return r}function Ee(c){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(c)}function he(c){let e=c,a=[],r=new Set,b=0,n=0,u=e.length,t=(B)=>{n++;while(n<u){if(e[n]==="\\"){n+=2;continue}if(e[n]===B){n++;return}n++}},T=()=>{n++;while(n<u){if(e[n]==="\\"){n+=2;continue}if(e[n]==="`"){n++;return}if(e[n]==="$"&&e[n+1]==="{"){n+=2;let B=1;while(n<u&&B>0)if(e[n]==="{")B++,n++;else if(e[n]==="}")B--,n++;else if(e[n]==="'"||e[n]==='"')t(e[n]);else if(e[n]==="`")T();else n++;continue}n++}},W=()=>{if(e[n]==="/"&&e[n+1]==="/"){while(n<u&&e[n]!==`
|
|
3
|
-
`)n++;return!0}if(e[n]==="/"&&e[n+1]==="*"){n+=2;while(n<u-1&&!(e[n]==="*"&&e[n+1]==="/"))n++;return n+=2,!0}return!1},ie=()=>{if(b!==0)return;let B=e.slice(n).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(B){let Z=B[2];if(!r.has(Z))a.push(Z),r.add(Z);return}let se=e.slice(n).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(se){let Z=se[1];if(!r.has(Z))a.push(Z),r.add(Z);return}let ee=e.slice(n).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(ee){let Z=ee[1];if(!r.has(Z))a.push(Z),r.add(Z)}};while(n<u){if(W())continue;if(e[n]==="'"||e[n]==='"'){t(e[n]);continue}if(e[n]==="`"){T();continue}if(e[n]==="{"){b++,n++;continue}if(e[n]==="}"){b--,n++;continue}if(b===0&&/[a-z]/i.test(e[n])&&(n===0||/\s|[;{}()]/.test(e[n-1])))ie();n++}return a.join(", ")}function ve(c,e=""){let a=he(c).split(",").map((r)=>r.trim()).filter(Boolean);return`
|
|
4
|
-
(function() {
|
|
5
|
-
${ft("var",a)}
|
|
6
|
-
var __destroyHooks = [];
|
|
7
|
-
var __origOnDestroy = onDestroy;
|
|
8
|
-
onDestroy = function(fn) { __origOnDestroy(fn); __destroyHooks.push(fn); };
|
|
9
|
-
|
|
10
|
-
${c}
|
|
11
|
-
${e}})();
|
|
12
|
-
`}function ke(c,e){let r=he(c).split(",").map((u)=>u.trim()).filter(Boolean),b=new Set(K(c,!0).split(",").map((u)=>u.trim())),n=r.map((u)=>b.has(u)?` try { ${u}; Object.defineProperty(__scopeRegistration, ${JSON.stringify(u)}, ${Bs(u)}); } catch (e) { /* not actually top-level */ }`:` try { __scopeRegistration[${JSON.stringify(u)}] = ${u}; } catch (e) { /* not actually top-level */ }`).join(`
|
|
13
|
-
`);return`
|
|
14
|
-
// Register scope variables for STX runtime
|
|
15
|
-
if (!window.stx._scopes) window.stx._scopes = {};
|
|
16
|
-
var __scopeRegistration = window.stx._scopes['${e}'] || { __destroyCallbacks: __destroyHooks };
|
|
17
|
-
${n}
|
|
18
|
-
// #1767: when the bundler renamed a component const that collided with an
|
|
19
|
-
// inlined import (foo -> foo2), rebind the ORIGINAL template name to the
|
|
20
|
-
// renamed declaration so it resolves to the component's value, not the
|
|
21
|
-
// shadowing import. __stxScopeRenames is emitted by bundleClientScript.
|
|
22
|
-
try { if (typeof __stxScopeRenames !== 'undefined' && __stxScopeRenames) { for (var __stxRK in __stxScopeRenames) __scopeRegistration[__stxRK] = __stxScopeRenames[__stxRK]; } } catch (e) { /* no renames */ }
|
|
23
|
-
if (typeof __stxLiveBindings !== 'undefined') Object.defineProperties(__scopeRegistration, Object.getOwnPropertyDescriptors(__stxLiveBindings));
|
|
24
|
-
window.stx._scopes['${e}'] = __scopeRegistration;
|
|
25
|
-
`}function Ie(c,e){return c.replace(/<script data-stx-scoped data-stx-run="always" data-stx-owner="([^"]*)"/g,(a,r)=>r===e?a:'<script data-stx-scoped data-stx-run="always"')}function ue(c,e){let a=ke(c,e);return Me(ve(c,a),e)}function Me(c,e){let a=`
|
|
26
|
-
(function() {
|
|
27
|
-
var __stxScopeEl = (typeof document !== 'undefined') ? document.querySelector('[data-stx-scope="${e}"]') : null;
|
|
28
|
-
var __stxPrevEl = (typeof window !== 'undefined') ? window.__STX_CURRENT_ELEMENT__ : undefined;
|
|
29
|
-
if (__stxScopeEl && typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxScopeEl;
|
|
30
|
-
if (__stxScopeEl && typeof window !== 'undefined' && window.stx) {
|
|
31
|
-
if (!window.stx._scopes) window.stx._scopes = {};
|
|
32
|
-
window.stx._scopes['${e}'] = {};
|
|
33
|
-
}
|
|
34
|
-
var __stxEndEffects = (typeof window !== 'undefined' && window.stx && window.stx._beginEffects) ? window.stx._beginEffects() : null;
|
|
35
|
-
try {`,r=`
|
|
36
|
-
} finally {
|
|
37
|
-
// The body's effects end where its onDestroy callbacks run: with the scope
|
|
38
|
-
// when the partial has a root, with the page when it has none.
|
|
39
|
-
if (__stxEndEffects) {
|
|
40
|
-
var __stxDisposeEffects = __stxEndEffects();
|
|
41
|
-
var __stxRegistered = __stxScopeEl && window.stx._scopes && window.stx._scopes['${e}'];
|
|
42
|
-
if (__stxRegistered) __stxRegistered.__disposeEffects = __stxDisposeEffects;
|
|
43
|
-
else if (window.stx._destroyCallbacks) window.stx._destroyCallbacks.push(__stxDisposeEffects);
|
|
44
|
-
}
|
|
45
|
-
if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
|
|
46
|
-
}
|
|
47
|
-
})();`;return a+c+r}function Te(c,e){if(V(c)){let n=V(c).tag.match(/data-stx-scope="([^"]*)"/);if(n)return{html:c,mergedIntoExisting:n[1],stamped:!0,root:"body"};return{html:rt(c,(u,t)=>`<body${t} data-stx-scope="${e}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let a=Mt(c),r=c.slice(a).match(/^(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(r){let b=r[1]+r[2],n=r[1].slice(1),u=b.match(/data-stx-scope="([^"]*)"/);if(u)return{html:c,mergedIntoExisting:u[1],stamped:!0,root:n};let t=c.slice(0,a),T=r[1],W=r[2];return{html:`${t}${T} data-stx-scope="${e}"${W}${c.slice(a+r[0].length)}`,mergedIntoExisting:null,stamped:!0,root:n}}return{html:c,mergedIntoExisting:null,stamped:!1,root:null}}var Ae=0;function fe(c,e){let a=M.basename(c,".stx").replace(/[^a-zA-Z0-9]/g,"_"),r=e.__stx_scope_seq;return r?`stx_scope_${a}_${++r.n}_${r.key}`:`stx_scope_${a}_${++Ae}`}var le=new Set,pe=new Set;function Xh(){le.clear(),pe.clear()}var Ce=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function Yf(c){let e=(t)=>t.replace(/[^\n]/g," "),a=c.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,e).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,e).replace(/<!--[\s\S]*?-->/g,e).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,e).replace(/\{\{[\s\S]*?\}\}/g,e).replace(/\{!![\s\S]*?!!\}/g,e),r=[],b=0,n=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,u;while((u=n.exec(a))!==null){let t=u[1]==="/",T=u[2],W=u[3]==="/"||Ce.has(T.toLowerCase());if(t){b=Math.max(0,b-1);continue}if(b===0)r.push(T);if(!W)b++}return r}function me(c){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(c)}var nt=new P(500),Sc=new Set;function Jh(){Sc.clear()}function De(c){if(c.__onceStore instanceof Set)return c.__onceStore;return Sc}async function ms(c,e,a,r,b,n=new Set){let u=r.partialsDir||M.join(M.dirname(a),"partials");if(u&&!M.isAbsolute(u))u=M.resolve(process.cwd(),u);let t=$e(c,"@partial","@include"),T=De(e);t=t.replace(/@once([\s\S]*?)@endonce/g,(f,v,h)=>{let g=v.trim(),i=`${a}:${g}`;if(T.has(i))return"";return T.add(i),v});{let f=/@includeIf\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")")i--;x++}if(i!==0)break;let l=t.substring(g+1,x-1),o=l.match(/^\s*['"]([^'"]+)['"]/);if(!o){f.lastIndex=x;continue}let C=o[1],z=W(C,u,a),E="";if(z&&await Bun.file(z).exists())b.add(z),E=`@include(${l})`;t=t.substring(0,h)+E+t.substring(x),f.lastIndex=0}}for(let[f,v]of[["@includeWhen",!1],["@includeUnless",!0]]){let h=new RegExp(`${f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),g;while((g=h.exec(t))!==null){let i=g.index,x=i+g[0].length-1,l=1,o=x+1;while(o<t.length&&l>0){if(t[o]==="(")l++;else if(t[o]===")")l--;o++}if(l!==0)break;let C=t.substring(x+1,o-1),z=ae(C,0);if(z===-1){h.lastIndex=o;continue}let E=C.substring(0,z).trim(),H=C.substring(z+1).trim(),F=H.match(/^\s*['"]([^'"]+)['"]/);if(!F){h.lastIndex=o;continue}let _=F[1],J=H.substring(F[0].length),D,k=ae(J,0);if(k!==-1)D=J.substring(k+1).trim();try{let I=`Boolean(${E})`,j;if(m(I)){let oe=p(I,Object.keys(e));j=Boolean(oe(...Object.values(e)))}else j=Boolean(d(I,e));let te=v?!j:j,re="";if(te){let oe=W(_,u,a);if(oe&&await Bun.file(oe).exists())b.add(oe);re=`@include('${_}'${D?`, ${D}`:""})`}t=t.substring(0,i)+re+t.substring(o),h.lastIndex=0}catch(I){let j=I instanceof Error?I.message:String(I),te=y("Include",`Error evaluating ${f} condition: ${j}`,a,c,i);t=t.substring(0,i)+te+t.substring(o),h.lastIndex=0}}}{let f=/@each\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")"){if(i--,i===0)break}x++}if(i!==0)break;let l=t.substring(g+1,x),o=t.substring(h,x+1),C=l.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!C){f.lastIndex=0,t=t.replace(o,"");continue}let[,z,E,H,F]=C;try{let _,J=E.trim();if(m(J))_=p(J,Object.keys(e))(...Object.values(e));else _=d(J,e);let D="";if(Array.isArray(_)&&_.length>0)for(let k of _){let I={...e,[H]:k},j=await se(z,I,c,h);D+=j}else if(F)D=await se(F,{},c,h);t=t.substring(0,h)+D+t.substring(x+1),f.lastIndex=0}catch(_){let J=_ instanceof Error?_.message:String(_);t=t.substring(0,h)+y("Each",`Error in @each: ${J}`,a,c,h)+t.substring(x+1),f.lastIndex=0}}}{let f=/@includeFirst\s*\(/g,v;while((v=f.exec(t))!==null){let h=v.index,g=h+v[0].length-1,i=1,x=g+1;while(x<t.length&&i>0){if(t[x]==="(")i++;else if(t[x]===")"){if(i--,i===0)break}x++}if(i!==0)break;let l=t.substring(g+1,x),o=t.substring(h,x+1),C=l.match(/^\s*(\[[^\]]+\])/);if(!C){f.lastIndex=0,t=t.replace(o,"");continue}let z=C[1],E=l.slice(C[0].length),H,F=E.match(/^\s*,\s*\{/);if(F){E=E.slice(F[0].length-1);let D=1,k=1;while(k<E.length&&D>0){if(E[k]==="{")D++;else if(E[k]==="}"){if(D--,D===0)break}k++}H=E.substring(0,k+1),E=E.slice(k+1)}let _,J=E.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(J)_=J[1];try{let D=JSON.parse(z.replace(/'/g,'"')),k={};if(H)try{k=O(H,e)}catch(j){let te=j instanceof Error?j.message:String(j);if(r.debug){let re=y("Include",`Error parsing includeFirst variables: ${te}`,a,c,h,o);t=t.replace(o,()=>re)}else t=t.replace(o,()=>_||"");continue}let I=!1;for(let j of D){let te=W(j,u,a);if(!te)continue;if(await s(te)){let re=await se(j,k,c,h);t=t.replace(o,()=>re),I=!0;break}}if(!I)if(_!==void 0)t=t.replace(o,()=>_);else if(r.debug){let j=y("Include",`None of the includeFirst paths exist: ${z}`,a,c,h,o);t=t.replace(o,()=>j)}else t=t.replace(o,"")}catch(D){let k=D instanceof Error?D.message:String(D),I=y("Include",`Error processing @includeFirst: ${k}`,a,c,h,o);t=t.replace(o,()=>I)}f.lastIndex=0}}function W(f,v,h){try{let g=f;if(!f.endsWith(".stx"))g=`${f}.stx`;let i=M.resolve(v),x=M.resolve(M.dirname(h)),l;if(!g.startsWith("./")&&!g.startsWith("../")){for(let F of r._layerPartialDirs??[]){let _=M.resolve(F,g);if(_.startsWith(`${M.resolve(F)}${M.sep}`)&&ye(_))return _}l=M.resolve(v,g)}else l=M.resolve(x,g);let o=M.normalize(l),C=o.startsWith(i+M.sep)||o===i,z=o.startsWith(x+M.sep)||o===x,E=!1,H=M.dirname(x);if(o.startsWith(H+M.sep)){if(!M.relative(H,o).split(M.sep).some((D)=>D.startsWith(".")&&D!=="."&&D!==".."))E=!0}if(!C&&!z&&!E)return console.error(`Security: Path traversal attempt blocked for include path: ${f}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${i}, ${x}`),null;return o}catch(g){return console.error(`Error resolving path ${f}: ${g}`),null}}let ie=M.resolve(a);n.add(ie);function B(f,v,h,g){return r.onIncludeError?.({includePath:f,templatePath:a,message:v,partialsDir:u}),y("Include",v,a,h,g)}async function se(f,v={},h,g){let i=W(f,u,a);if(!i)return B(f,`Could not resolve path for include: ${f}`,h,g);let x=M.resolve(i);if(n.has(x)){let l=[...n,x].map((o)=>M.basename(o)).join(" -> ");return B(f,`Circular include detected: ${l}`,h,g)}try{b.add(i);let l;if(!l)try{l=await Bun.file(i).text()}catch(S){let q=S instanceof Error?S.message:String(S);return B(f,`Error loading include file ${f}: ${q}`,h,g)}if(l)l=l.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(l&&l.includes("@stream")){let{processStreamDirectives:S}=await import("./chunk-24e4dapm.js");l=S(l,e)}if(l&&(r.debug||!A()&&!In()))try{let{warnUnbalancedTags:S}=await import("./chunk-e2b2f502.js");S(l,i)}catch{}try{let{processESImports:S}=await import("./chunk-n344ss97.js");l=await S(l,e,i,r,b)}catch(S){if(r.debug)console.warn(`[stx] partial ES import extraction skipped for ${i}:`,S instanceof Error?S.message:S)}let o=l,C=L(o);if(C)o=C.content.trim();let E=l.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),H="";if(E)H=`<style${E[1]}>${E[2]}</style>`;let F=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(S,q,w)=>{if(!me(q))return"";return F.push({attrs:q,body:w}),`__STX_DATA_BLOCK_${F.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let _={...e};_.__stx_signals_gate=Re(l,i);for(let[S,q]of Object.entries(v))_[S]=q;let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,D=[...l.matchAll(J)].sort((S,q)=>{let w=(S[1]||"").includes("server"),X=(q[1]||"").includes("server");return Number(X)-Number(w)}),k="",I=null,j=!1,te=!1;for(let S of D){let q=S[1]||"",w=S[2]||"";if(me(q))continue;let X=q.includes("server"),be=Ue(q);if(!X&&!/\bsrc\s*=/i.test(q))Fe(w,i,r.strict);if(!X&&w.trim()){let{interpolateScriptExpressions:U}=await import("./chunk-9e3ggwk7.js");w=U(w,_,f)}let ce="";try{let{extractAndStripCssImports:U,renderVendorStyleTags:Q}=await import("./chunk-1tqp2s13.js"),ne=U(w,{filePath:i,projectRoot:process.cwd()});w=ne.code,ce=Q(ne.styles)}catch(U){if(r.debug)console.warn(`[stx] vendor-css extractor skipped for ${i}:`,U instanceof Error?U.message:U)}if(be&&w.trim())w=We(w);if(!X){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-1tqp2s13.js");w=Q(w).code;let{hasUserImports:ne,bundleClientScript:Se}=await import("./chunk-em31p5pb.js");if(ne(w))w=await Se(w,i,{projectRoot:process.cwd()})}catch(Q){if(r.debug)console.warn(`[stx] bundler skipped for ${i}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:U}=await import("./chunk-7ngfcdv9.js");w=U(w)}let ge=Ee(w);if(!X){let{extractBridgeData:U,generateServerDataBridge:Q}=await import("./chunk-1tqp2s13.js"),ne=Q(w,U(_));if(ne)w=`${ne}
|
|
48
|
-
${w}`}if(ge&&!X){j=!0,I=fe(i,e);let U=N(w),Q=ue(U,I);k+=`${ce}<script data-stx-scoped data-stx-run="always" data-stx-owner="${I}">${Q}</script>
|
|
49
|
-
`;continue}if(X)try{let{extractVariables:U}=await import("./chunk-0gv2mmr0.js");await U(w,_,i)}catch(U){if(r.debug)console.warn(`Warning: Could not extract variables from server script in ${i}:`,U)}if(!X&&!ge){let U=q.replace(/\bclient\b/i,"").trim();I=fe(i,e);let Q=N(w),ne=ue(Q,I);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(ne))te=!0;k+=`${ce}<script data-stx-scoped data-stx-run="always" data-stx-owner="${I}"${U?` ${U}`:""}>${ne}</script>
|
|
50
|
-
`}}if(F.length>0){let{interpolateScriptExpressions:S}=await import("./chunk-9e3ggwk7.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(q,w)=>{let X=F[Number(w)];return`<script${X.attrs}>${S(X.body,_,f)}</script>`})}if(I){let S=Te(o,I);if(o=S.html,S.mergedIntoExisting){let w=I,X=S.mergedIntoExisting;k=k.split(`'${w}'`).join(`'${X}'`).split(`"${w}"`).join(`"${X}"`),I=X}else if(!S.stamped&&j&&!le.has(i))le.add(i),console.warn(`[stx] ${M.relative(process.cwd(),i)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`);if(S.stamped&&S.root!=="body"&&(j||te)&&!pe.has(i)){let w=Yf(o);if(w.length>1)pe.add(i),console.warn(`[stx] ${M.relative(process.cwd(),i)} declares ${j?"signals":"bindings"} and has ${w.length} top-level elements (${w.map((X)=>`<${X}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let q=S.stamped&&S.root!==null&&Pr(S.root);k=Ie(k,q?I:null)}if(o.includes("@include")||o.includes("@partial"))o=await ms(o,_,i,r,b,n);let{processLoops:re,reportDeferredLoopWarnings:oe}=await import("./chunk-6dz5za5z.js"),G=re(o,_,i,void 0,!0);G=de(G,_,i),G=oe(G);let{processMetaDirectives:xe,processSeoDirective:_e,processStructuredData:we}=await import("./chunk-0j8zre1m.js");if(G=xe(G,_,i,r),G=we(G,_,i),G=_e(G,_,i,r),G=R(G,_,i),H)G+=`
|
|
51
|
-
`+H;if(k)G+=`
|
|
52
|
-
`+k;return G}catch(l){if(l instanceof Y)throw l;let o=l instanceof Error?l.message:String(l);return B(f,`Error processing include ${f}: ${o}`,h,g)}}let ee=/@include\s*\(/g,Z;while((Z=ee.exec(t))!==null){let f=Z.index,v=f+Z[0].length-1,h=1,g=v+1;while(g<t.length&&h>0){if(t[g]==="(")h++;else if(t[g]===")")h--;g++}if(h!==0)break;let i=t.substring(f,g),x=t.substring(v+1,g-1),l=x.match(/^\s*['"]([^'"]+)['"]/);if(!l){ee.lastIndex=g;continue}let o=l[1],C,z=x.substring(l[0].length),E=ae(z,0);if(E!==-1)C=z.substring(E+1).trim();let H={};if(C)try{H=O(C,e)}catch(_){let J=_ instanceof Error?_.message:String(_);t=t.replace(i,y("Include",`Error parsing include variables for ${o}: ${J}`,a,c,f)),ee.lastIndex=0;continue}let F=await se(o,H,c,f);t=t.substring(0,f)+F+t.substring(g),ee.lastIndex=0}return t}function hs(c,e){let a=c;function r(b,n,u,t){let T=b,W=!0;while(W){W=!1;let ie=new RegExp(`@${n}\\(['"]([^'"]+)['"]\\)`),B=T.match(ie);if(!B||B.index===void 0)break;let se=B.index,ee=B[1],Z=se+B[0].length,f=new RegExp(`@${n}\\(`),v=new RegExp(`@${u}(?![a-z])`),h=1,g=Z,i=-1;while(h>0&&g<T.length){let l=T.slice(g),o=l.match(f),C=l.match(v),z=o?g+o.index:1/0,E=C?g+C.index:1/0;if(z<E)h++,g=z+(o[0].length||1);else if(E<1/0){if(h--,h===0){i=E;break}g=E+u.length+1}else break}if(i===-1)break;let x=T.slice(Z,i);if(!e[ee])e[ee]=[];if(t)e[ee].unshift(x);else e[ee].push(x);T=T.substring(0,se)+T.substring(i+`@${u}`.length),W=!0}return T}return a=r(a,"push","endpush",!1),a=r(a,"prepend","endprepend",!0),a}function ys(c,e){return c.replace(/@stack\(['"]([^'"]+)['"]\)/g,(a,r)=>{if(!e[r]||e[r].length===0)return"";return e[r].join(`
|
|
53
|
-
`)})}
|
|
54
|
-
export{Xh,Yf,nt,Sc,Jh,ms,hs,ys};
|
package/dist/chunk-6grkdknk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{pm}from"./chunk-9anqwafq.js";import"./chunk-0h6r7nvn.js";import"./chunk-644ckv6e.js";import"./chunk-6ezt9kbe.js";import"./chunk-r2bxjna3.js";import"./chunk-88xayf21.js";import"./chunk-7j11vgm1.js";import"./chunk-2qb9kp21.js";import"./chunk-dbvsa5ya.js";import"./chunk-4m11kcxz.js";import"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import"./chunk-dw0ttj6p.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{pm as startInteractive};
|
package/dist/chunk-6q9a5bph.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{St,Jn,Ph}from"./chunk-wm029dh0.js";import{ye,Yn,Ih,Zn,Po,rs,ss,Oh,Nh,Dh,Qn,er,Io,os,Mh}from"./chunk-x2ftkaz3.js";import"./chunk-fdjx4vs3.js";export{Po as batch,Ph as default,Yn as derived,Zn as effect,St as generateSignalsRuntime,Jn as generateSignalsRuntimeDev,er as isDerived,Qn as isSignal,Ih as memo,ss as onDestroy,rs as onMount,os as peek,Dh as pendingLifecycleCounts,Nh as runDestroyCallbacks,Oh as runMountCallbacks,ye as state,Io as untrack,Mh as useOptimistic};
|
package/dist/chunk-6rqef7wp.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rg,ny,ry,sy,oy,sg,og,iy,ay,ii,cy,yr,br,Ts}from"./chunk-dw0ttj6p.js";import{ct}from"./chunk-75v0yxeh.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{oy as __setSignalsGeneratorsForTest,ct as cacheEngineFingerprint,br as cacheTemplate,yr as checkCache,cy as clearDevCaches,og as getCachedRouterScript,sg as getCachedSignalsRuntime,iy as getServeClientAsset,ii as getServeModuleBundle,Ts as hashFilePath,ry as invalidateFileCache,sy as invalidateFileCacheByDir,ny as readFileCached,ay as registerServeModuleBundle,rg as templateCache};
|
package/dist/chunk-72p5annm.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Be,S,_,T,ne}from"./chunk-j1ytbd6r.js";import{C}from"./chunk-fdjx4vs3.js";import{N,Nn}from"./chunk-3w7gacva.js";import{a}from"./chunk-6az66mrc.js";import{ke,un,dn,pn}from"./chunk-rzadf7vx.js";import{Ct}from"./chunk-4m11kcxz.js";import{xt,Xn,nn,he}from"./chunk-bdh73gxd.js";import{A,On}from"./chunk-1ztp5vkh.js";import h from"path";var v=new Map,E=new Map,I=S(64),F=new Map,V=["composables","functions"];function H(e){let s=h.basename(e,".ts");return s==="index"||s==="types"||e.endsWith(".d.ts")}async function Y(e){if(e)return h.resolve(e);let s=`<default>:${process.cwd()}`,r=F.get(s);if(r!==void 0)return r;let t=await ee();if(t!==null)F.set(s,t);return t}async function ee(){let e=await a(),s=e.root||process.cwd(),r=e.composablesDir;if(r)return h.resolve(s,r);for(let t of V){let n=h.resolve(s,t);try{let c=new Bun.Glob("**/*.ts");for await(let i of c.scan({cwd:n,absolute:!0}))if(!H(i))return n}catch{}}return null}async function W(e){let s=Array.isArray(e)?e:e?[h.resolve(e)]:(await a())._layerComposableDirs??[await Y()].filter((t)=>!!t),r=new Map;for(let t of s){let n=new Bun.Glob("**/*.ts");try{for await(let c of n.scan({cwd:t,absolute:!0})){let i=h.relative(t,c);if(!H(c)&&!r.has(i))r.set(i,c)}}catch{}}return{key:s.join("\x00"),files:[...r.values()].sort()}}async function Ao(e){let{files:s}=await W(e),r=ne({loader:"ts",target:"browser",define:T()}),t=[];for(let n of s)try{let c=await Bun.file(n).text(),i=r.scan(c).exports.filter((u)=>u!=="default");if(i.length>0)t.push({file:n,names:i})}catch{}return t}function te(e,s){return new RegExp(`\\b${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(e)}function R(e,s){let r=new Set(e.match(/\w+/g)),t=new Set;for(let n of s)if(/^\w+$/.test(n)?r.has(n):te(e,n))t.add(n);return t}var J=S(64);function X(e,s){let r=_(e,s.size),t=J.get(r);if(t)return t;let n;try{n=Be(e,s)}catch{n=R(e,s)}let c=[...e.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...e.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let i of c)for(let u of i[1].split(",")){let f=u.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(f&&s.has(f))n.add(f)}return J.set(r,n),n}function se(e){return!e||/^(?:module|(?:text|application)\/(?:java|ecma)script|application\/stx-[\w-]+)$/i.test(e)}var L=S(256);function oe(e,s){let r=new Set(s),t="",n=0,c=new Set;for(let i of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi)){t+=e.slice(n,i.index),n=i.index+i[0].length;let u=i[1]??"",f=i[2]??"",d=/\btype\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(u),m=d?(d[1]??d[2]??d[3]??"").trim():void 0;if(!se(m)){if(!/json/i.test(m??""))t+=` ${f} `;continue}let y=R(f,r);if(y.size===0)continue;let b=_(f,[...y].sort().join(",")),w=L.get(b);if(!w)w=X(f,y),L.set(b,w);for(let B of w)c.add(B)}t+=e.slice(n);for(let i of R(t,r))c.add(i);return c}function ie(e,s,r){let t=new Map;for(let{file:f,names:d}of e)for(let m of d)if(!t.has(m))t.set(m,f);let n=new Set(t.keys()),c=(f)=>{let d=[];for(let m of X(f,n))d.push(t.get(m));return d},i=new Set,u=r.flatMap((f,d)=>d===0?[...oe(f,t.keys())].map((m)=>t.get(m)):c(f));while(u.length>0){let f=[];for(let d of u){if(i.has(d))continue;i.add(d);for(let m of c(s.get(d)??""))if(!i.has(m))f.push(m)}u=f}return i}async function Rh(e,s,r,t){let{key:n,files:c}=await W(e);if(!n)return null;let i=()=>[...new Set([...c,...c.flatMap((o)=>ke(o))])],u=xt(i());if(c.length===0)return he(v,n,u,""),null;c.sort();let f=ne({loader:"ts",target:"browser",define:T()}),d=nn(E,n,u);if(!d){let o=new Map,l=[];for(let p of c)try{let x=await Bun.file(p).text();o.set(p,x);let g=f.scan(x).exports.filter((Q)=>Q!=="default");if(g.length>0)l.push({file:p,names:g})}catch{o.set(p,"")}d=he(E,n,u,{codeByFile:o,modules:l})}let{codeByFile:m,modules:y}=d,b;if(s===void 0)b=new Set(c);else{let o=r?[s,...r]:[s],l=_(o.join("\x00"),n,o.length,u),p=I.get(l);if(b=p??ie(y,m,o),!p)I.set(l,b)}if(b.size===0)return null;let w=c.filter((o)=>b.has(o)),B=()=>{if(!t)return;for(let o of w)t.push(o,...ke(o))},k=`${n}\x00${w.join("\x00")}\x00${dn()}`,P=nn(v,k,u);if(P!==void 0)return B(),P||null;let D=[],M=new Set,U=new Set;for(let o of w)try{let l=m.get(o)??await Bun.file(o).text(),p=h.basename(o,".ts");for(let g of l.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(g[1])U.add(g[1]);let x=[];try{for(let g of f.scan(l).exports)if(g!=="default")M.add(g),x.push(g)}catch{}if(l=N(l),un(l))l=await pn(l,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:x}),l=Ct(l);l=Nn(l),l=l.replace(/^export\s+(default\s+)?/gm,""),l=f.transformSync(l),D.push(`// Composable: ${p}
|
|
3
|
-
${l.trim()}`)}catch(l){console.warn(`[stx] Failed to load composable ${o}:`,l)}if(D.length===0||M.size===0)return he(v,k,u,""),null;let Z=[...M].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
|
|
4
|
-
`),z=JSON.stringify([...M]),j=D.join(`
|
|
5
|
-
|
|
6
|
-
`),q=C.filter((o)=>!U.has(o)&&new RegExp(`\\b${o}\\b`).test(j)).map((o)=>`var ${o} = __stx[${JSON.stringify(o)}];`).join(`
|
|
7
|
-
`),K=JSON.stringify(new Bun.CryptoHasher("md5").update(`${z}\x00${j}`).digest("hex").slice(0,12)),O=`;(function(){
|
|
8
|
-
var __bundles = window.__stxComposableBundles || (window.__stxComposableBundles = {});
|
|
9
|
-
if (__bundles[${K}]) return;
|
|
10
|
-
__bundles[${K}] = true;
|
|
11
|
-
var __published = window.__stxComposableGlobals || (window.__stxComposableGlobals = {});
|
|
12
|
-
window.__composables = window.__composables || {};
|
|
13
|
-
var __c = window.__composables;
|
|
14
|
-
var __stx = window.stx || {};
|
|
15
|
-
${q}
|
|
16
|
-
${j}
|
|
17
|
-
${Z}
|
|
18
|
-
var __names = ${z};
|
|
19
|
-
for (var __i = 0; __i < __names.length; __i++) {
|
|
20
|
-
var __n = __names[__i];
|
|
21
|
-
if (!(__n in __c) || __published[__n]) continue;
|
|
22
|
-
var __takenByBuiltin = !!(window.stx && __n in window.stx);
|
|
23
|
-
if (__takenByBuiltin || __n in window) {
|
|
24
|
-
console.warn('[stx] composable "' + __n + '" is not available as a bare identifier: '
|
|
25
|
-
+ (__takenByBuiltin ? 'a built-in of that name already exists' : 'window already defines that property')
|
|
26
|
-
+ '. Rename it, or use: import { ' + __n + ' } from "@composables"');
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
window[__n] = __c[__n];
|
|
30
|
-
__published[__n] = true;
|
|
31
|
-
}
|
|
32
|
-
})();`,G=A()?On(O):O;return u=xt(i()),he(v,k,u,G),B(),G}function Ah(){v.clear(),Xn(),E.clear(),I.clear(),F.clear()}
|
|
33
|
-
export{Ao,Rh,Ah};
|
package/dist/chunk-74x6j229.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{at}from"./chunk-wp0qpa50.js";import{St,Jn}from"./chunk-wm029dh0.js";import{Mr,Lr,jr,Fr,Pe}from"./chunk-pp99rmjm.js";import{ge,xn,ml,hl}from"./chunk-j1ytbd6r.js";import{B}from"./chunk-kzc2tqzr.js";import{Mi}from"./chunk-6ykfy7eh.js";import{x}from"./chunk-644ckv6e.js";import{i}from"./chunk-0h6r7nvn.js";import{U,a}from"./chunk-6az66mrc.js";import{Bc}from"./chunk-zc8a2erc.js";import{jn,Bn,Ye,Oe,_a,Ca,Fn}from"./chunk-0qwbhv3f.js";import{fn,Ho}from"./chunk-cmh0bfkb.js";import{zn}from"./chunk-jt5tzddc.js";import{on,or,ir}from"./chunk-vnrbjbrw.js";import{Q}from"./chunk-95hbmv7k.js";import m from"fs";import c from"path";import{createHash as Y}from"crypto";function I(n){return Y("sha256").update(n).digest("hex").slice(0,8)}function W(n=!1){let l=n?Jn():St(),o=I(l);return{content:l,filename:`runtime.${o}.js`,hash:o}}function J(){let n=at(),l=I(n);return{content:n,filename:`router.${l}.js`,hash:l}}import V from"path";import{createHash as ee}from"crypto";function te(n={}){let l=new Set;return{context:new Proxy(n,{get(r,e){if(e in r)return r[e];if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return},has(r,e){if(e in r)return!0;if(typeof e==="string"&&!e.startsWith("__"))l.add(e);return!1}}),accessedKeys:l}}async function q(n,l,o={}){let r=V.resolve(n),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);ml();let _={};try{_=await a(o.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>ge(R))),{context:D}=te({__filename:r,__dirname:V.dirname(r),__stx_serverDeclared:u}),A=new Set,T={...U,..._,...o,buildMode:"compile",strict:!1},f=await i(e,D,r,T,A),w=jn(f)+Bn(f)+Ye(f),j=hl();return{route:l,sourceFile:n,html:f,fragment:w,placeholders:j,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:S,status:xn(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function X(n,l){let o=0,r=0;if(!m.existsSync(n))return{copied:o,bytes:r};m.mkdirSync(l,{recursive:!0});function e(S,_){let y=m.readdirSync(S,{withFileTypes:!0});for(let d of y){if(re.has(d.name))continue;let g=c.join(S,d.name),u=c.join(_,d.name);if(d.isDirectory())m.mkdirSync(u,{recursive:!0}),e(g,u);else if(d.isFile()){if(m.existsSync(u))continue;m.copyFileSync(g,u),o++,r+=m.statSync(u).size}}}return e(n,l),{copied:o,bytes:r}}async function Sm(n={}){let l=Date.now(),o=c.resolve(n.root||process.cwd()),r=c.resolve(o,n.outputDir||".output");console.log("[stx build] Starting production build...");let e=await a(o),S=c.resolve(o,n.componentsDir??e.componentsDir??"components"),_=c.resolve(o,n.partialsDir??e.partialsDir??"partials"),y=c.resolve(o,n.layoutsDir??e.layoutsDir??"layouts"),d=n.publicDir??e.publicDir??"public",g=Pe(e.app?.head,{known:Fr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=n.routeRules??e.routeRules??{},T=zn(A),f=n.serverApi??e.serverApi,w=typeof f==="object"?f:{};if(f)fn(o,w);if(e.runtimeConfig)B(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let j=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of j)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=Q(o,{pagesDirs:e._layerPageDirs}),Z=["components","layouts","partials"],P=R.filter((s)=>!Z.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${P.length} page routes (${R.length-P.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=W(n.debug),b=J();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",b.filename),b.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${b.filename} (${(b.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let M=[],H=[];for(let s of P){let h=T(s.pattern),O=h.rendering==="prerender";if(O&&(s.pattern.includes(":")||s.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${s.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let t=await q(s.filePath,s.pattern,{configDir:o,componentsDir:S,partialsDir:_,layoutsDir:y,debug:n.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,b.filename),t.html=jr(t.html,g,{bodyScripts:[`<script src="/__stx/${b.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Mr(t.html,u);if(g.htmlAttrs)t.html=Lr(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let G=p[1];t.html=t.html.replace(" "+G,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${G}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await x(t.html),O){let p=await Fn(t,{params:{},request:new Request(`http://stx.build${s.pattern}`),method:"GET",__stx_strict_hydration:!0});if(p.redirect||p.cookies?.length||p.boundaries?.length||p.headers&&Object.keys(p.headers).length)throw Error(`Prerendered route ${s.pattern} cannot set response headers/cookies, redirect or stream`);t.html=p.html,t.status=p.status??t.status,t.hasServerScripts=!1,t.serverScriptContent=[],t.placeholders={}}t.fragment=Oe(t.html,D,!0);let K=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),L=c.join("server","pages",`${K}.compiled.json`),z=c.join("server","fragments",`${K}.html`);await Bun.write(c.join(r,L),JSON.stringify(t,null,2)),await Bun.write(c.join(r,z),t.fragment),H.push({pattern:s.pattern,compiledPath:L,fragmentPath:z,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:O}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let k=c.resolve(o,d);if(m.existsSync(k)){let{copied:s,bytes:h}=X(k,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let E=ir(o);if(E){let{copied:s,bytes:h}=X(E,c.join(r,"public",or));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${on}/`)}let F={runtime:v.filename,router:b.filename},C=_a(H,F,r);if(C.routeRules=A,C.routerContainer=D,f)C.apiRoutes=await Ho(o,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Mi(o,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(Bc(e._layerGraph),null,2));Ca(C,r);let N=Date.now()-l;return console.log(`
|
|
3
|
-
[stx build] Done in ${N}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:F,outputDir:r,duration:N}}
|
|
4
|
-
export{Sm};
|
package/dist/chunk-7j11vgm1.js
DELETED
package/dist/chunk-7ngfcdv9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ty,xs,ti,Ss,gr,ni,ri,tg,ks,_s,Cs,si,_c,ng,Ct}from"./chunk-4m11kcxz.js";import"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import{K}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{tg as bindLoopInterpolations,ty as clearScriptScanCache,ks as convertServerLoopAttributesToDirectives,ni as convertSignalDirectivesToAttributes,_s as convertSignalLoopsToAttributes,gr as extractClientSignalNames,K as extractExports,_c as findMarkupIndexOutsideScripts,Ss as hasSignalsSyntax,ti as parseLoopExpression,ri as preEvalLiteralReactiveIfs,Cs as processScriptSetup,si as processSignals,ng as rewriteStxImportSpecifiers,xs as scanScriptTags,Ct as stripStxRuntimeImports};
|
package/dist/chunk-7njy024g.js
DELETED
package/dist/chunk-9e3ggwk7.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Te,eo,Dg,by,Mg,wy,En,g,X,re,Tn,Re,Lg,Ni,jg,vy,R,Di,Bg,xy,I,Sy}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{Bg as applyFilters,wy as clearCustomFilters,Lg as clientLoopScopes,eo as defaultFilters,Tn as escapeAttributeValue,g as escapeHtml,X as escapeHtmlValue,re as escapeInterpolatedHtmlValue,I as evaluateExpression,Te as findMustacheEnd,Mg as getAllFilters,jg as interpolateScriptAttributes,Ni as interpolateScriptExpressions,vy as interpolateScriptsInTemplate,R as processExpressions,Di as processExpressionsChunked,Dg as registerFilter,by as registerFilters,En as replaceInterpolations,xy as resetRejectedExpressionWarnings,Sy as unescapeHtml,Re as usesSignalsInScript};
|
package/dist/chunk-9mz2n39m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{fu,gu,mu,hu,yu,bu,wu,vu,xu,Su,Ym}from"./chunk-s7fhpkvf.js";export{fu as createIslandRegistry,Ym as default,Su as generateIslandManifest,mu as generatePartialHydrationCSS,bu as hydrateAll,yu as hydrateByStrategy,hu as hydrateIsland,wu as isHydrated,vu as onHydrated,gu as processPartialHydrationDirectives,xu as processStaticDirectives};
|
package/dist/chunk-a262spx7.js
DELETED
package/dist/chunk-a8wn0snv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ao,Rh,Ah}from"./chunk-72p5annm.js";import"./chunk-rzadf7vx.js";import"./chunk-cmh0bfkb.js";import"./chunk-mce3g2wb.js";import"./chunk-4m11kcxz.js";import"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{Ah as clearComposableCache,Rh as getComposableScript,Ao as listComposableModules};
|
package/dist/chunk-af6m1s2b.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-pp99rmjm.js";import"./chunk-fdjx4vs3.js";import"./chunk-3w7gacva.js";import"./chunk-j1ytbd6r.js";import"./chunk-kzc2tqzr.js";import"./chunk-6ykfy7eh.js";import"./chunk-r09kz9bf.js";import"./chunk-a5yb8w7s.js";import{l}from"./chunk-np8wgbsa.js";import u from"fs";import m from"path";async function d(e,t={}){let s=Date.now(),n={total:0,passed:0,failed:0,new:0,failures:[],duration:0},i=t.snapshotDir||l(e.root,"story","snapshots");await u.promises.mkdir(i,{recursive:!0});let r=e.storyFiles;if(t.filter&&t.filter.length>0)r=r.filter((a)=>t.filter.some((o)=>a.fileName.toLowerCase().includes(o.toLowerCase())));for(let a of r)await h(a,i,t,n);return n.duration=Date.now()-s,n}async function h(e,t,s,n){let i=e.story;if(!i)return;for(let r of i.variants){n.total++;let a=m.join(t,`${e.id}-${r.id}.snap`),o=g(r.source||""),f=await w(a);if(s.update||!f){let p={storyId:e.id,variantId:r.id,component:e.fileName,timestamp:Date.now(),hash:o};if(await u.promises.writeFile(a,JSON.stringify(p,null,2)),!f)n.new++;n.passed++}else try{let p=await u.promises.readFile(a,"utf-8"),c=JSON.parse(p);if(c.hash===o)n.passed++;else n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:"Snapshot mismatch",difference:y(c.hash,o)})}catch(p){n.failed++,n.failures.push({storyId:e.id,variantId:r.id,component:e.fileName,message:`Error reading snapshot: ${p}`})}}}async function x(e,t={}){return(await d(e,{...t,update:!0})).total}function g(e){let t=0;for(let s=0;s<e.length;s++){let n=e.charCodeAt(s);t=(t<<5)-t+n,t=t&t}return t.toString(16)}function y(e,t){if(e===t)return 0;let s=Math.abs(Number.parseInt(e,16)-Number.parseInt(t,16));return Math.min(s/1e6,1)}async function w(e){try{return await u.promises.access(e),!0}catch{return!1}}function F(e){let t=[];if(t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(" STX Story Visual Regression Tests"),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),e.failures.length>0){t.push(" \u274C Failures:"),t.push("");for(let s of e.failures){if(t.push(` \u2022 ${s.component} / ${s.variantId}`),t.push(` ${s.message}`),s.difference!==void 0)t.push(` Difference: ${(s.difference*100).toFixed(2)}%`);t.push("")}}if(t.push(" Summary:"),t.push(` Total: ${e.total}`),t.push(` Passed: ${e.passed} \u2713`),t.push(` Failed: ${e.failed} \u2717`),e.new>0)t.push(` New: ${e.new} \u26A1`);return t.push(` Time: ${e.duration}ms`),t.push(""),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push(""),t.join(`
|
|
3
|
-
`)}export{F as formatTestResults,d as runVisualTests,x as updateSnapshots};
|
package/dist/chunk-b1tcym2x.js
DELETED
package/dist/chunk-b61dq7pz.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import"./chunk-fdjx4vs3.js";import"./chunk-3w7gacva.js";import"./chunk-pp99rmjm.js";import{S,_,T,ne}from"./chunk-j1ytbd6r.js";import"./chunk-kzc2tqzr.js";import"./chunk-6ykfy7eh.js";import{fr}from"./chunk-wzvdr4ta.js";import{existsSync as C}from"fs";import l from"path";var b=["applyOfflineUpdate","broadcast","cacheMedia","calculateDistance","canNotify","clearCookies","clearFetchCache","clearOfflineData","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","onOfflineUpdateReady","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAmbientSound","useAnimationFrame","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBreathPacer","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useCompletion","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useOutbox","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVirtualList","useVisibility","useWakeLock","useWindowSize"],L=new Set(b);var u=new Map,h=S(64),w=new Set,v=0,E=new Set(b);function z(){u.clear(),h.clear()}function R(s){let o=new Map;for(let t of s){let i=l.basename(t);if(i.endsWith(".d.ts"))continue;let r=i.replace(/\.[jt]s$/,"");if(r==="index")continue;if(r===i)continue;let a=o.get(r);if(a&&!a.endsWith(".js"))continue;o.set(r,t)}return[...o.values()].sort()}function P(s,o){let t=o.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${t}\\b`).test(s)}function I(s){if(!s)return[];let o=_(s,v),t=h.get(o);if(t)return t.slice();let i=s.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),r=[];for(let a of E){if(w.has(a))continue;let p=a.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${p}\\s*\\(`).test(i))r.push(a)}return r.sort(),h.set(o,r),r.slice()}function M(){let s=l.join(import.meta.dir,"composables"),o=import.meta.url.endsWith(".ts")?"ts":"js";if(C(l.join(s,`index.${o}`)))return s;let t=fr("@stacksjs/stx/composables");return t?l.dirname(t):void 0}async function V(s,o){let t=I(s);if(t.length===0)return null;let i=o??M();if(!i)return null;let r=`${i}\x00${t.join(",")}`,a=u.get(r);if(a!==void 0)return a||null;let p=ne({loader:"ts",target:"browser",define:T()}),k=new Set(t),m=[],d=new Set,f=[];try{let n=new Bun.Glob("*.{ts,js}");for await(let e of n.scan({cwd:i,absolute:!0}))f.push(e)}catch{return u.set(r,""),null}f=R(f);for(let n of f){let e;try{e=await Bun.file(n).text()}catch{continue}let g=[];try{g=p.scan(e).exports.filter((c)=>c!=="default")}catch{continue}if(!g.some((c)=>k.has(c)))continue;try{e=e.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^import\s+type\s+.*$/gm,""),e=e.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),e=e.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),e=e.replace(/^export\s+default\s+/gm,""),e=e.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),m.push(`// ${l.basename(n).replace(/\.[jt]s$/,"")}
|
|
3
|
-
${p.transformSync(e).trim()}`);for(let c of g)d.add(c)}catch(c){console.warn(`[stx] framework composable ${l.basename(n)} could not be bundled:`,c)}}let x=t.filter((n)=>!d.has(n)&&!P(s,n));if(x.length>0)console.warn(`[stx] could not bundle ${x.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(m.length===0)return u.set(r,""),null;let O=[...d].map((n)=>` try { if (!(${JSON.stringify(n)} in __s)) { __s[${JSON.stringify(n)}] = ${n}; if (!(${JSON.stringify(n)} in window)) window[${JSON.stringify(n)}] = ${n}; } } catch (e) {}`).join(`
|
|
4
|
-
`),y=`<script data-stx-scoped data-stx-run="always" data-stx-framework-composables>
|
|
5
|
-
;(function(){
|
|
6
|
-
var __s = window.stx = window.stx || {};
|
|
7
|
-
${m.join(`
|
|
8
|
-
|
|
9
|
-
`)}
|
|
10
|
-
${O}
|
|
11
|
-
})();
|
|
12
|
-
</script>`;return u.set(r,y),y}function q(s){w.clear();for(let o of s)w.add(o);v++}export{q as __setRuntimeOwnedForTest,z as clearFrameworkComposableCache,V as getFrameworkComposableScript,I as referencedFrameworkComposables,R as selectComposableFiles};
|
package/dist/chunk-bdh73gxd.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import a from"fs";function xt(r){return o(r)}var g=1000,i=new Map;function Xn(){i.clear()}function o(r){return[...r].sort().map((n)=>{try{let t=a.statSync(n);return`${n}:${t.size}:${t.mtimeMs}`}catch{return`${n}:missing`}}).join(`
|
|
3
|
-
`)}function nn(r,n,t){let e=r.get(n);return e!==void 0&&e.signature===t?e.value:void 0}function he(r,n,t,e){return r.set(n,{signature:t,value:e}),e}
|
|
4
|
-
export{xt,Xn,nn,he};
|
package/dist/chunk-bs7g6jtt.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{su,Dm,ou,iu,Mm,Lm}from"./chunk-az5rh7fs.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{Lm as applySlots,Mm as extractSlotContent,Dm as parseSlotElement,su as parseSlots,iu as processSlots,ou as renderSlot};
|
package/dist/chunk-bspj1rf1.js
DELETED
package/dist/chunk-bx3hpsxn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ji,Yi,Zi,Yg,Zg,Qg,Fl,em,tm}from"./chunk-qnwd5bz4.js";export{Ji as ImageProcessorCache,Fl as applyTransformations,Yg as clearImageCache,em as generateResponsiveVariants,tm as generateSrcset,Yi as getCachedImageResult,Qg as optimizeImage,Zg as processImage,Zi as setCachedImageResult};
|
package/dist/chunk-byq488g4.js
DELETED
package/dist/chunk-c8pzj57b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{qf,vc,qh,xc,Kf,Gf,mn,pr,Kh,Xf,Jf,Gh,x}from"./chunk-644ckv6e.js";import"./chunk-dw0ttj6p.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{mn as buildCss,Xf as extractClassNames,Gf as fingerprintConfig,Jf as generateCss,Kh as getCachedCSS,qf as getCssServeAsset,x as injectCss,vc as loadCssEngine,xc as loadCssEngineConfig,pr as rebuildCss,qh as resetCssCache,Kf as resolveUserCssConfig,Gh as withLinkedModuleBundles};
|
package/dist/chunk-e2b2f502.js
DELETED
package/dist/chunk-ec6mrad6.js
DELETED
package/dist/chunk-eh2gec79.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{U,ig,ai,Pc,a,M,ly,uy}from"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{M as config,U as defaultConfig,ly as defineStxConfig,ai as discoverConfig,a as loadStxConfig,Pc as resolveInstalledPackage,ig as resolveStxDirectories,uy as validateConfig};
|
package/dist/chunk-em31p5pb.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lf,jf,ke,Bf,mc,cn,ln,Vh,hc,un,ar,Ff,zf,Hf,ps,Vf,Uf,yc,dn,Wf,pn,bc,Uh}from"./chunk-rzadf7vx.js";import"./chunk-cmh0bfkb.js";import"./chunk-mce3g2wb.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{ar as MODULE_SPECIFIER_PREFIX,yc as assertBundleBuildCanSettle,Lf as bundleCacheDir,jf as bundleCacheEntryLimit,Uh as bundleClientEntriesSplit,pn as bundleClientScript,ln as clearBundleFailures,ke as clientBundleDependencies,cn as getBundleFailures,un as hasUserImports,Uf as isWithinBundlerCallback,dn as moduleSubstitutionKey,zf as normalizeRegistrySpecifiers,Wf as queueClientBundleBuild,mc as recordBundleFailure,Ff as registryIdForPath,hc as resolveBundlerFallback,Hf as rewriteRegistryImports,Vh as setBundlerFallbackMode,Bf as shouldLogBundlerDiagnostics,bc as tempBuildName,ps as withModuleSubstitutes,Vf as withinBundlerCallback};
|
package/dist/chunk-eqfsw6x4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Vl,Ul}from"./chunk-45rzd16g.js";import"./chunk-xmws1gaf.js";import"./chunk-9anqwafq.js";import"./chunk-fy6ts0n4.js";import"./chunk-3f9wctns.js";import"./chunk-976kgb3r.js";import"./chunk-mw0rb1sf.js";import"./chunk-ey1vwfpc.js";import"./chunk-74x6j229.js";import"./chunk-0qwbhv3f.js";import"./chunk-1q5w3xav.js";import"./chunk-4517hny7.js";import"./chunk-saqzk45g.js";import"./chunk-az5rh7fs.js";import"./chunk-k1ew643q.js";import"./chunk-kywe0f1v.js";import"./chunk-2zaatnnh.js";import"./chunk-ae8q4gze.js";import"./chunk-afxfkb60.js";import"./chunk-s7fhpkvf.js";import"./chunk-vmssv78v.js";import"./chunk-fnjm3xbf.js";import"./chunk-gqtb53s8.js";import"./chunk-0g2mg8cw.js";import"./chunk-v0tdg16k.js";import"./chunk-b4d4tjvx.js";import"./chunk-q7zc78az.js";import"./chunk-72p5annm.js";import"./chunk-wm029dh0.js";import"./chunk-g33ycxe3.js";import"./chunk-f4vgagjb.js";import"./chunk-3mz9bdf7.js";import{an}from"./chunk-qvrew79n.js";import{Vf}from"./chunk-rzadf7vx.js";import"./chunk-cmh0bfkb.js";import"./chunk-mce3g2wb.js";import{Me,i}from"./chunk-0h6r7nvn.js";import"./chunk-644ckv6e.js";import"./chunk-6ezt9kbe.js";import"./chunk-r2bxjna3.js";import"./chunk-88xayf21.js";import"./chunk-7j11vgm1.js";import"./chunk-2qb9kp21.js";import"./chunk-dbvsa5ya.js";import"./chunk-4m11kcxz.js";import{Ee}from"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import{yr,br}from"./chunk-dw0ttj6p.js";import{Rs,U,a}from"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import{L,h,Ve}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";import{Xi}from"./chunk-yxdhz4ps.js";import"./chunk-qnwd5bz4.js";import"./chunk-zn6n075d.js";export{Rs as buildWebComponents,br as cacheTemplate,yr as checkCache,an as classifyAllScripts,Vl as createMiddleware,Ul as createRoute,U as defaultConfig,h as extractVariables,L as findSfcTemplateBlock,Ee as injectRouterScript,Xi as insertBeforeBodyClose,a as loadStxConfig,Ve as processClientScript,i as processDirectives,Me as readMarkdownFile,Vf as withinBundlerCallback};
|
package/dist/chunk-ey1vwfpc.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$e,Ws,qs,Ks,ve,xi,wn,Xc,Jc,Si,Yc,Zc,Gs,_i,Ci,Qc,Ei,kn}from"./chunk-j1ytbd6r.js";import{C}from"./chunk-fdjx4vs3.js";import{a}from"./chunk-6az66mrc.js";import{Ao}from"./chunk-72p5annm.js";import{l}from"./chunk-np8wgbsa.js";import{existsSync as G,readFileSync as U}from"fs";import h from"path";var ke=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),oe=kn.filter((e)=>!ke.has(e)).sort(),ce=[...C].sort(),we=[...new Set([...oe,...ce])].sort(),De=new Set(oe),Te=new Set(ce),Ee=new Set(we),se=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Ce(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ae(e,t){let o=[];for(let d of t){if(d.offset===void 0)continue;let i=d.kind==="server"?De:Te;se.lastIndex=0;for(let c of d.code.matchAll(se)){let m=c.index+c[0].indexOf("{")+1;for(let f of c[1].matchAll(/[^,]+/g)){let k=f[0];if(/^\s*type\s/.test(k))continue;let b=/^\s*([A-Za-z_$][\w$]*)/.exec(k);if(!b)continue;let r=b[1];if(!Ee.has(r)||i.has(r))continue;let u=d.offset+m+f.index+b[0].length-r.length,g=e.slice(0,u),E=g.split(`
|
|
3
|
-
`).length;o.push({line:E,column:u-(g.lastIndexOf(`
|
|
4
|
-
`)+1)+1,offset:u,length:r.length,name:r,kind:d.kind,message:Ce(r,d.kind)})}}}return o}import M from"path";var Ne="@stacksjs/stx-typescript-plugin";function Oe(e,t){let o=M.resolve(e);for(;;){let d=M.join(o,"tsconfig.json");if(t(d))return d;let i=M.dirname(o);if(i===o)return;o=i}}function le(e,t,o){let d=Oe(e,o);if(!d)return;let i=new Set,c=(m)=>{if(i.has(m))return;i.add(m);let f=t(m);if(!f)return;let k=f.compilerOptions?.plugins;if(Array.isArray(k)){let r=k.find((g)=>g?.name===Ne),u=Array.isArray(r?.libs)?r.libs.filter((g)=>typeof g==="string"):[];return r?{configPath:m,libs:u.map((g)=>M.resolve(M.dirname(m),g))}:null}let b=typeof f.extends==="string"?[f.extends]:Array.isArray(f.extends)?f.extends:[];for(let r of[...b].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let u=M.resolve(M.dirname(m),r.endsWith(".json")?r:`${r}.json`),g=c(u);if(g!==void 0)return g}return};return c(d)??void 0}function xa(e,t="",o="",d=t,i){let c=e.startLine>1?`
|
|
5
|
-
`.repeat(e.startLine-1):"",m=xi(_i(e)+e.code,d),f=e.kind==="client"&&i?i.project(m.code):void 0,k=wn(f?.code??m.code),b=e.kind==="client"||e.kind==="plain"?Yc(t,e.code):"",r=(c+k).split(`
|
|
6
|
-
`),u=r.length,g=new Map;for(let S of m.declarations)for(let[D,A]of S.text.split(`
|
|
7
|
-
`).entries())if(r.push(A),S.origin)g.set(r.length,{...S.origin,line:e.startLine+S.origin.line-1+D,column:D===0?S.origin.column:1});r.push(...b.split(`
|
|
8
|
-
`),...(i?.declarations??"").split(`
|
|
9
|
-
`),...(e.kind==="server"?qs(e.code):"").split(`
|
|
10
|
-
`)),r.push("export {}","");let E=Gs(r.join(`
|
|
11
|
-
`),o);return{text:E.code,sourceLineCount:u,lineMap:g,scriptColumns:new Map([...m.columns].map(([S,D])=>[S+e.startLine-1,D])),importColumns:E.columns,componentColumns:f?new Map([...f.columns].map(([S,D])=>[S+e.startLine-1,D])):void 0}}function bm(e,t="",o=""){return xa(e,t,o).text}var _e=new Set(["name","status","length","location","history","origin","closed","close","open","focus","blur","print","scroll","scrollTo","scrollBy","stop","top","parent","self","frames","event","external","menubar","toolbar"]);function Me(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],o=new Set(C),d=[];for(let{file:i,names:c}of e){let m=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));d.push(` export * from ${m}`);for(let f of c){if(o.has(f)||_e.has(f))continue;o.add(f),t.push(`declare const ${f}: typeof import(${m})[${JSON.stringify(f)}]`)}}return t.push("declare module '@composables' {",...d,"}"),t.join(`
|
|
12
|
-
`)}function Co(e,t,o){return`${e}.__stx_${t}${o}.ts`}function wm(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function eu(){return ue("stx.d.ts")}function tu(){return ue("stx-module.d.ts")}function ue(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(G(t))return t;return null}var Re=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function pe(e){return e>=1000&&e<2000}function de(e){let t="",o=!1,d=!1;for(let i=0;i<e.length;i++){let c=e[i];if(o){if(t+=c,d)d=!1;else if(c==="\\")d=!0;else if(c==='"')o=!1;continue}if(c==='"'){o=!0,t+=c;continue}if(c==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
|
|
13
|
-
`)i++;t+=`
|
|
14
|
-
`;continue}if(c==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=c}return t.replace(/,(\s*[}\]])/g,"$1")}function je(e){try{return JSON.parse(de(U(e,"utf8")))}catch{return}}function Pe(e){let t=h.resolve(e),o;for(;;){let r=h.join(t,"tsconfig.json");if(G(r)){o=r;break}let u=h.dirname(t);if(u===t)break;t=u}if(!o)return{};let d=new Set,i=o,c,m,f=o;while(i&&!d.has(i)){d.add(i);let r;try{r=JSON.parse(de(U(i,"utf8")))}catch{break}let u=r?.compilerOptions??{};if(!c&&u.paths&&typeof u.paths==="object")c=u.paths,f=i;if(!m&&typeof u.baseUrl==="string")m=h.resolve(h.dirname(i),u.baseUrl);if(c&&m)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!c)return{};let k=m??h.dirname(f),b={};for(let[r,u]of Object.entries(c)){if(!Array.isArray(u))continue;b[r]=u.map((g)=>typeof g==="string"&&!h.isAbsolute(g)?h.resolve(k,g):g)}return{paths:b}}async function vm(e,t={}){let o=t.client!==!1,d=t.server!==!1,i=t.templates!==!1,c=i?await a():void 0,m=t.componentsDir??c?.componentsDir,f=t.partialsDir??c?.partialsDir,k=t.layoutsDir??c?.layoutsDir,b=new Map(await Promise.all(e.map(async(n)=>[n,await Bun.file(n).text()]))),r=[...b.values()].some((n)=>Ws(ve(n).filter((s)=>s.kind==="server").map((s)=>s.code).join(`
|
|
15
|
-
`))),u=new Map,g=new Map,E=[],S=[],D=0,A=0,O=eu();for(let n of e){let s=b.get(n),x=ve(s).filter((p)=>{if(p.kind==="server")return d;return o}),T=ve(s).filter((p)=>p.kind==="server").map((p)=>p.code).join(`
|
|
16
|
-
`),B=Si(ve(s)),_=Ks(s);for(let p of ae(s,x))E.push({file:n,line:p.line,column:p.column,code:0,message:p.message,category:"error",blockKind:p.kind});if(o&&T){let p=x.filter((v)=>v.kind!=="server"),y=[...new Set(p.flatMap((v)=>Zc(T,v.code)))];if(y.length>0)g.set(n,{names:y,line:p[0].startLine,kind:p[0].kind})}let L=h.dirname(h.resolve(n)),w=i?Ci(s,{runtimeGlobals:!O,originDir:L,filePath:h.resolve(n),componentsDir:m,partialsDir:f,layoutsDir:k,inheritedContractsKnown:r}):null,I=w?[...w.lineMap.values()].filter((p)=>p.expression).length:0;if(x.length===0&&I===0&&!_?.checks.length)continue;if(S.push(n),D+=x.length,A+=I,_&&o&&(x.some((p)=>p.kind!=="server")||!i&&_.checks.length)){let p=Ci(s,{runtimeGlobals:!1,globals:!1,originDir:L,templateExpressions:!1,scriptKinds:["client","plain"],nativeChecks:!i});u.set(Co(n,"client",0),{virtual:p,source:p.text,origin:n,kind:"client"})}if(x.forEach((p,y)=>{if(_&&p.kind!=="server")return;let v=xa(p,T,L,B);u.set(Co(n,p.kind,y),{virtual:v,source:v.text,origin:n,kind:p.kind})}),w&&(I>0||_?.checks.length))u.set(Co(n,"template",0),{source:w.text,origin:n,kind:"template",virtual:w})}if(u.size===0)return{diagnostics:E,checkedFiles:S,blockCount:0,expressionCount:0};let R=(t.extraLibs??[]).map((n)=>h.resolve(n)),fe=le(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),je,G);for(let n of fe?.libs??[])if(!R.includes(n)&&G(n))R.push(n);if(O)R.push(O);let W=O?tu():null;if(W)R.push(W);let z=`${l()}/typecheck/__stx_globals.d.ts`,me=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",Xc(O?Jc(U(O,"utf8")):void 0),...O?[]:["declare const window: any",...C.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...$e.map((n)=>`declare const ${n}: any`)].join(`
|
|
17
|
-
`),Me(await Ao())].filter(Boolean).join(`
|
|
18
|
-
`),j=`${l()}/typecheck`;await Bun.$`rm -rf ${j}`.quiet().nothrow(),await Bun.$`mkdir -p ${j}`.quiet().nothrow(),await Bun.write(z,me);let P=new Map,ge=0;for(let[n,s]of u){let x=`${ge++}_${n.replace(/[^\w.-]+/g,"_")}`;await Bun.write(`${j}/${x}`,s.source),P.set(x,s)}let he={target:"ESNext",module:"ESNext",moduleResolution:"bundler",strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!0,esModuleInterop:!0,resolveJsonModule:!0,lib:["ESNext","DOM","DOM.Iterable"],types:[],...Pe(e.length>0?h.dirname(h.resolve(e[0])):process.cwd()),...t.compilerOptions??{}},q=async(n,s)=>{let x=`${j}/tsconfig${s===1?"":`.${s}`}.json`;await Bun.write(x,JSON.stringify({compilerOptions:he,files:n.map((B)=>`${j}/${B}`).concat(z,...R)},null,2));let T=Bun.spawnSync(["bun","x","tsc","-p",x,"--pretty","false"],{stdout:"pipe",stderr:"pipe"});return{output:new TextDecoder().decode(T.stdout)+new TextDecoder().decode(T.stderr),exitCode:T.exitCode??0}},H=await q([...P.keys()],1),Z=H.output,K=[],Q=H.exitCode,Y=0,xe=new Set(R.map((n)=>n.split("/").pop())),ee=0,F=new Set,te=(n)=>{for(let s of n.replace(/\n[\t ]+([^\n]*)/g," $1").split(`
|
|
19
|
-
`)){let x=s.match(Re);if(!x)continue;if(Y++,xe.has(x[1].split("/").pop()))ee++;let[,T,B,_,L,w,I]=x,p=T.split("/").pop(),y=P.get(p);if(!y)continue;if(pe(Number(w)))F.add(p);let v=Number(B),X=Number(_),re,J=y.kind;if(y.virtual){let N=Ei(y.virtual,v,X)??(y.kind!=="template"&&pe(Number(w))?Ei(y.virtual,y.virtual.sourceLineCount,1):null);if(!N||y.kind==="template"&&!N.expression&&!N.diagnosticOrigin)continue;if(Qc(N,Number(w)))continue;v=N.line,X=N.column,re=N.expression?.code.trim(),J=N.diagnosticOrigin??J}K.push({file:y.origin,line:v,column:X,code:Number(w),message:I,category:L==="error"?"error":"warning",blockKind:J,expression:re})}};te(Z);let ye=Y,be=ee;if(F.size>0&&F.size<P.size){let n=[...P.keys()].filter((s)=>!F.has(s));te((await q(n,2)).output)}if(o)for(let[n,s]of g){if(s.names.length===0)continue;K.push({file:n,line:s.line,column:1,code:0,message:`${s.names.length===1?"1 value reaches":`${s.names.length} values reach`} this block on the implicit bridge and ${s.names.length===1?"is":"are"} untyped: ${s.names.join(", ")}. Declare them with defineClientPayload({ ${s.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:s.kind})}K.push(...E);let ne=new Set,V=K.filter((n)=>{let s=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(ne.has(s))return!1;return ne.add(s),!0});V.sort((n,s)=>n.file.localeCompare(s.file)||n.line-s.line||n.column-s.column);let ie=be>0&&V.length===0,Se=ie||Q!==0&&ye===0?`${ie?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${Q} without reporting any diagnostic, so nothing was checked`}. `+"A syntax error in an ambient declaration file does this \u2014 skipLibCheck suppresses "+`SEMANTIC diagnostics only. tsc said:
|
|
20
|
-
${Z.trim().split(`
|
|
21
|
-
`).slice(0,12).join(`
|
|
22
|
-
`)||"(no output)"}`:void 0;return{diagnostics:V,checkedFiles:S,blockCount:D,expressionCount:A,failure:Se}}function xm(e){return e.map((t)=>{let o=t.blockKind==="template"?`[template: ${t.expression??""}]`:`[${t.blockKind==="plain"?"<script>":`<script ${t.blockKind}>`}]`;return`${t.file}:${t.line}:${t.column} ${t.category} TS${t.code} ${t.message} ${o}`}).join(`
|
|
23
|
-
`)}
|
|
24
|
-
export{xa,bm,Co,wm,eu,tu,vm,xm};
|
package/dist/chunk-fa57bncd.js
DELETED
package/dist/chunk-fk79jbzn.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ia,ku,Gn,Zm,_u,Cu,Eu,Qm}from"./chunk-vmssv78v.js";import"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{Gn as Validator,ku as defineForm,_u as processErrorDirective,Cu as processErrorsDirective,Qm as processFormValidationDirectives,Eu as processHasErrorsDirective,Ia as useForm,Zm as v};
|
package/dist/chunk-g97krv0d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{h,Ri,cl,ll,Tg,$g,Rg,Ag,Pg,Qs,Ig,Ue,ne,We,Og,Or,Ng,pl,fl,Ii,qe,s,Cn,gl,y,xe,yy}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{fl as SIGNAL_COMPOSABLE_CALL,xe as clearComponentCache,Ii as componentClientSignalNames,Ri as convertToCommonJS,y as createDetailedErrorMessage,Pg as extractDirectiveNames,cl as extractScriptFromTemplate,h as extractVariables,s as fileExists,yy as getComponentCacheStats,$g as getPositionInfo,ne as getSharedTranspiler,gl as getSourceLineInfo,Ag as hasDirectives,ll as hasVariables,Ng as isHydrateTrigger,Ig as isJavaScriptScript,qe as renderComponentWithSlot,Cn as resolveTemplatePath,Og as scopeOnRootElement,Qs as scopeSequenceKey,Ue as shouldTranspileTypeScript,pl as slotContentHasExpressions,We as transpileTypeScript,Or as userComponentFileExists,Rg as validateDirective,Tg as validateTemplate};
|
package/dist/chunk-gn16yq49.js
DELETED
package/dist/chunk-gvs61tqn.js
DELETED
package/dist/chunk-h2928108.js
DELETED
package/dist/chunk-hd5bny2c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lr,i}from"./chunk-0h6r7nvn.js";import"./chunk-644ckv6e.js";import"./chunk-6ezt9kbe.js";import"./chunk-r2bxjna3.js";import"./chunk-88xayf21.js";import"./chunk-7j11vgm1.js";import"./chunk-2qb9kp21.js";import"./chunk-dbvsa5ya.js";import"./chunk-4m11kcxz.js";import{Ee}from"./chunk-95hbmv7k.js";import"./chunk-xtaq95em.js";import"./chunk-dw0ttj6p.js";import"./chunk-6az66mrc.js";import"./chunk-a5yb8w7s.js";import"./chunk-r09kz9bf.js";import"./chunk-zc8a2erc.js";import"./chunk-0sa9gqmc.js";import"./chunk-wp0qpa50.js";import{Fe,Ys,Zs}from"./chunk-j1ytbd6r.js";import"./chunk-6ykfy7eh.js";import"./chunk-kzc2tqzr.js";import"./chunk-pp99rmjm.js";import"./chunk-3w7gacva.js";import"./chunk-fdjx4vs3.js";export{lr as buildModulesTag,Ee as injectRouterScript,i as processDirectives,Ys as processJsonDirective,Zs as processOnceDirective,Fe as validateClientScript};
|