@stacksjs/stx 0.2.861 → 0.2.863
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/analytics.js +3 -2
- package/dist/animation.js +3 -3
- package/dist/app-shell.js +4 -3
- package/dist/{chunk-14cvwsy1.js → chunk-01c16zw4.js} +2 -2
- package/dist/chunk-021tjkd6.js +3 -0
- package/dist/chunk-0bfgsv31.js +2 -0
- package/dist/chunk-0twkeh31.js +2 -0
- package/dist/chunk-0xtda6aw.js +2 -0
- package/dist/chunk-15m7jnc0.js +33 -0
- package/dist/{chunk-7bajrfb1.js → chunk-1grdbpsk.js} +8 -8
- package/dist/{chunk-9syvkm5z.js → chunk-1mqcttg3.js} +6 -6
- package/dist/chunk-2asyyky3.js +2 -0
- package/dist/{chunk-eye156nv.js → chunk-2c18y094.js} +1 -1
- package/dist/chunk-2n932qtv.js +20 -0
- package/dist/{chunk-76360zky.js → chunk-32ty2zx6.js} +9 -9
- package/dist/chunk-36j129p1.js +2 -0
- package/dist/chunk-3gk1e2b1.js +2 -0
- package/dist/chunk-3ryp43f3.js +2 -0
- package/dist/{chunk-12r22pf0.js → chunk-3z1mmar2.js} +2 -2
- package/dist/{chunk-zhxdpzga.js → chunk-46ddesnf.js} +3 -3
- package/dist/chunk-46pxmpeb.js +3 -0
- package/dist/chunk-4pr29yrx.js +2 -0
- package/dist/{chunk-tjz3r7rj.js → chunk-55zq2ha8.js} +5 -5
- package/dist/{chunk-avp271q4.js → chunk-58sh82aj.js} +2 -2
- package/dist/{chunk-gggadrs4.js → chunk-5a0d3048.js} +3 -3
- package/dist/{chunk-121cgm3s.js → chunk-5p1k2h5q.js} +8 -8
- package/dist/chunk-5s1fb8z4.js +4 -0
- package/dist/{chunk-x69457q9.js → chunk-5zzrrxns.js} +8 -8
- package/dist/chunk-64ebysb4.js +2 -0
- package/dist/{chunk-4rrxrxp6.js → chunk-669b2bya.js} +4 -4
- package/dist/{chunk-38qp2pg2.js → chunk-67dgp45w.js} +2 -2
- package/dist/{chunk-5xdkmn39.js → chunk-6ftee542.js} +2 -2
- package/dist/{chunk-5wr1qqz3.js → chunk-6k4ac74t.js} +2 -2
- package/dist/{chunk-c2w4wc9f.js → chunk-6m6y9bbx.js} +1 -1
- package/dist/chunk-6pczzq5f.js +2 -0
- package/dist/{chunk-6tp0w6hf.js → chunk-7ayvybdy.js} +3 -3
- package/dist/chunk-7mjf144y.js +2 -0
- package/dist/chunk-7wqevtks.js +2 -0
- package/dist/{chunk-bag9q4m0.js → chunk-8502xb4n.js} +39 -39
- package/dist/chunk-85zmxbt0.js +33 -0
- package/dist/{chunk-cxpq2zna.js → chunk-8arfg8kp.js} +3 -3
- package/dist/{chunk-xmy6g81m.js → chunk-8hhhmscy.js} +2 -2
- package/dist/{chunk-fyfvqd2s.js → chunk-8me8hamk.js} +2 -2
- package/dist/{chunk-pb09xy77.js → chunk-8s6s6nd0.js} +2 -2
- package/dist/chunk-8v1zpdef.js +2 -0
- package/dist/chunk-94mpe1ny.js +3 -0
- package/dist/{chunk-mzes9ds7.js → chunk-9zrvh3pz.js} +2 -2
- package/dist/chunk-a4cn8rf4.js +2 -0
- package/dist/{chunk-fpkp0bqf.js → chunk-adqh1gp1.js} +1 -1
- package/dist/chunk-ap84eenm.js +2 -0
- package/dist/chunk-as2ffje6.js +2 -0
- package/dist/chunk-az5xw3w8.js +2 -0
- package/dist/chunk-b6w0f610.js +712 -0
- package/dist/chunk-ba91r7q9.js +2 -0
- package/dist/{chunk-qkcn0exq.js → chunk-brzjass3.js} +6 -6
- package/dist/chunk-bwdbj60y.js +3 -0
- package/dist/{chunk-3wg9kr5z.js → chunk-bx5d87xx.js} +6 -7
- package/dist/chunk-c0t2tdfk.js +2 -0
- package/dist/chunk-caxqwrnc.js +2 -0
- package/dist/{chunk-37tefp7s.js → chunk-cqhwzd9y.js} +5 -5
- package/dist/chunk-cvgbtmxp.js +2 -0
- package/dist/chunk-czca8yds.js +42 -0
- package/dist/chunk-d0afg5f7.js +2 -0
- package/dist/chunk-d9vzfbdp.js +2 -0
- package/dist/{chunk-65cbfx5x.js → chunk-dpmayc2w.js} +2 -2
- package/dist/{chunk-d6216bcw.js → chunk-dtarm8x9.js} +9 -9
- package/dist/chunk-e634vffz.js +3 -0
- package/dist/chunk-eafqxbr0.js +2 -0
- package/dist/{chunk-qjm23ma2.js → chunk-ew5cey88.js} +1 -1
- package/dist/{chunk-xppm4cs4.js → chunk-farh4p7f.js} +3 -3
- package/dist/chunk-fnv94wc6.js +2 -0
- package/dist/chunk-g4gcf4jn.js +2 -0
- package/dist/chunk-g65dptx2.js +2 -0
- package/dist/{chunk-q6w7a1vc.js → chunk-gbtbfg7e.js} +3 -3
- package/dist/{chunk-15jymk6t.js → chunk-gd56arnm.js} +2 -2
- package/dist/{chunk-5ka3h8dy.js → chunk-gjngg182.js} +45 -46
- package/dist/{chunk-8hck9qqm.js → chunk-gp8hgpt9.js} +4 -4
- package/dist/chunk-gw7t6a3t.js +2 -0
- package/dist/chunk-h2qgqjkn.js +2 -0
- package/dist/chunk-h65shwe9.js +2 -0
- package/dist/{chunk-zpkgs5d3.js → chunk-h816ta81.js} +6 -6
- package/dist/chunk-hc6111md.js +54 -0
- package/dist/{chunk-cq2hedwn.js → chunk-hev4t4d5.js} +6 -6
- package/dist/{chunk-7yhhwv07.js → chunk-hmdkf6c6.js} +2 -2
- package/dist/{chunk-vggtxttf.js → chunk-j1efsjsb.js} +5 -5
- package/dist/chunk-j4zrq17p.js +2 -0
- package/dist/chunk-jfmj0wsy.js +2 -0
- package/dist/{chunk-bg0ywp5w.js → chunk-jgra00m8.js} +2 -2
- package/dist/{chunk-5rxks14t.js → chunk-k32q90b2.js} +2 -2
- package/dist/{chunk-naj146zq.js → chunk-k7dxm48r.js} +2 -2
- package/dist/chunk-ks5p5w6z.js +25 -0
- package/dist/chunk-kw11yydy.js +2 -0
- package/dist/chunk-m9cperj4.js +2 -0
- package/dist/{chunk-zs4s9fcq.js → chunk-mcnwvh06.js} +6 -6
- package/dist/chunk-meqsd5bt.js +2 -0
- package/dist/{chunk-dba4bwkd.js → chunk-mfa07erx.js} +16 -16
- package/dist/{chunk-jh2v1vvb.js → chunk-mrh08821.js} +3 -3
- package/dist/{chunk-9n8t7v78.js → chunk-n3jw3xpj.js} +2 -2
- package/dist/chunk-ns04v3am.js +2 -0
- package/dist/chunk-ntbe5q5x.js +16 -0
- package/dist/chunk-nttsc0aw.js +14 -0
- package/dist/chunk-p0tkhd12.js +2 -0
- package/dist/chunk-p2etn78y.js +2 -0
- package/dist/{chunk-1nankvf6.js → chunk-pbakxcv8.js} +2 -2
- package/dist/{chunk-h4aqpf2r.js → chunk-prrvggcy.js} +5 -5
- package/dist/chunk-pyckafsb.js +12 -0
- package/dist/{chunk-t5q31st4.js → chunk-q1wxgw5s.js} +2 -2
- package/dist/chunk-qa5y30sy.js +72 -0
- package/dist/{chunk-m3p4hksq.js → chunk-qbghf76y.js} +4 -4
- package/dist/{chunk-a6d92kv6.js → chunk-qcxrcypb.js} +2 -2
- package/dist/{chunk-1jwcp2k0.js → chunk-qjey0jk6.js} +2 -2
- package/dist/chunk-qmkaqjba.js +2 -0
- package/dist/chunk-qxw9h564.js +2 -0
- package/dist/chunk-r23zq8yk.js +2 -0
- package/dist/{chunk-68w65mhs.js → chunk-r4v4vswq.js} +3 -3
- package/dist/chunk-reeaknf2.js +2 -0
- package/dist/chunk-rqa92xm4.js +2 -0
- package/dist/chunk-rqmb09ss.js +2 -0
- package/dist/chunk-s92j8k4z.js +2 -0
- package/dist/chunk-s9df8srx.js +6 -0
- package/dist/{chunk-dt73ww6m.js → chunk-sb8n32rn.js} +1 -1
- package/dist/{chunk-5neezkj1.js → chunk-sj3ry5ck.js} +33 -25
- package/dist/chunk-snz2cxqv.js +2 -0
- package/dist/{chunk-36vksrry.js → chunk-srgnevws.js} +2 -2
- package/dist/chunk-sz6d3v6b.js +2 -0
- package/dist/{chunk-9pyvc0dc.js → chunk-tnp2ta5q.js} +2 -2
- package/dist/{chunk-gx96hctv.js → chunk-v37zmez0.js} +2 -2
- package/dist/chunk-v408qsze.js +2 -0
- package/dist/{chunk-thdnk1kd.js → chunk-v4xes880.js} +3 -3
- package/dist/chunk-va07zs9v.js +2 -0
- package/dist/chunk-vc42mvjn.js +2 -0
- package/dist/chunk-vk98r75z.js +2 -0
- package/dist/{chunk-yj9nyt93.js → chunk-vvzys1x7.js} +3 -3
- package/dist/chunk-vwwpbhd2.js +3 -0
- package/dist/{chunk-hyea17hp.js → chunk-w468n41y.js} +155 -157
- package/dist/{chunk-f1vvhbmw.js → chunk-w6pzkcjp.js} +2 -2
- package/dist/{chunk-15rkvc0t.js → chunk-wk4wg6sn.js} +5 -5
- package/dist/chunk-wtfamngc.js +20 -0
- package/dist/chunk-x3p4emdp.js +2 -0
- package/dist/{chunk-3gfd9t8a.js → chunk-x512h2gv.js} +4 -4
- package/dist/{chunk-nwxjh1gv.js → chunk-x7redxyd.js} +4 -4
- package/dist/chunk-xcjvx6zt.js +2 -0
- package/dist/chunk-xfd3yqgj.js +1327 -0
- package/dist/chunk-xjxcwrqs.js +2 -0
- package/dist/chunk-xymr4ys9.js +3 -0
- package/dist/chunk-xzdkjkyp.js +2 -0
- package/dist/{chunk-b1tctqn5.js → chunk-y036cwc7.js} +10 -10
- package/dist/chunk-y190sh29.js +16 -0
- package/dist/{chunk-wrbhq1y2.js → chunk-yakdcak2.js} +3 -3
- package/dist/chunk-ybkwnscv.js +2 -0
- package/dist/{chunk-6nb49h13.js → chunk-yhc1c4tr.js} +125 -126
- package/dist/chunk-ymdw4fhd.js +3 -0
- package/dist/chunk-ynkbv9jq.js +4 -0
- package/dist/chunk-yr1zx78b.js +3 -0
- package/dist/{chunk-e8nzbz66.js → chunk-ysfeg3cn.js} +2 -2
- package/dist/chunk-ytzzth34.js +2 -0
- package/dist/chunk-yxpjj003.js +2 -0
- package/dist/chunk-z1rs6b4x.js +2 -0
- package/dist/chunk-z383x16t.js +2 -0
- package/dist/chunk-z3gz5fy4.js +2 -0
- package/dist/{chunk-tm201m9x.js → chunk-z512gt4v.js} +3 -3
- package/dist/{chunk-5n7m8vqx.js → chunk-zbvfjm4a.js} +2 -2
- package/dist/chunk-zr22gtpf.js +2 -0
- package/dist/chunk-zsnmk5me.js +2 -0
- package/dist/chunk-ztbexx3h.js +2 -0
- package/dist/cli.js +35 -35
- package/dist/client/signals-timer-runtime.js +12 -4
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/dev-server/serve-app.js +3 -2
- package/dist/dev-server/serve-multi.js +3 -4
- package/dist/dev-server/ts-css.js +4 -5
- package/dist/document-shell.js +4 -3
- package/dist/document-tags.d.ts +8 -0
- package/dist/document-tags.js +37 -0
- package/dist/events.js +2 -1
- package/dist/head-injection.js +2 -1
- package/dist/heatmap.js +2 -1
- package/dist/hot-reload.js +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/native-build.js +3 -3
- package/dist/process.js +5 -6
- package/dist/production-build.js +3 -3
- package/dist/pwa/inject.js +3 -3
- package/dist/pwa.js +3 -3
- package/dist/reactive-bindings.js +2 -1
- package/dist/reactive.js +2 -1
- package/dist/render.js +1 -1
- package/dist/runtime-injection.js +6 -6
- package/dist/serve.js +1 -1
- package/dist/site-builder/build.js +1 -1
- package/dist/site-builder/i18n.js +2 -2
- package/dist/site-builder/router.js +1 -1
- package/dist/site-builder/theme.js +1 -1
- package/dist/ssg.js +30 -31
- package/dist/template-hydrator.js +2 -1
- package/dist/web-components/css-scoping.js +3 -3
- package/dist/x-element.js +2 -1
- package/package.json +5 -5
- package/dist/body-close.d.ts +0 -13
- package/dist/body-close.js +0 -8
- package/dist/chunk-02css3vk.js +0 -14
- package/dist/chunk-0hqr6bff.js +0 -2
- package/dist/chunk-15sgdvyd.js +0 -2
- package/dist/chunk-261t62q4.js +0 -712
- package/dist/chunk-2b4a8tbd.js +0 -3
- package/dist/chunk-2fw36w1x.js +0 -2
- package/dist/chunk-2jcxsw75.js +0 -2
- package/dist/chunk-2pbhdaka.js +0 -2
- package/dist/chunk-2wba5ypm.js +0 -2
- package/dist/chunk-353gnvfe.js +0 -2
- package/dist/chunk-3cr5y8v1.js +0 -2
- package/dist/chunk-3y7yp0ka.js +0 -2
- package/dist/chunk-41wwqw0q.js +0 -2
- package/dist/chunk-4a1y51fs.js +0 -2
- package/dist/chunk-4a751brg.js +0 -2
- package/dist/chunk-4jgcd4d9.js +0 -33
- package/dist/chunk-5awhm4na.js +0 -2
- package/dist/chunk-5fhp9hxd.js +0 -2
- package/dist/chunk-5mg443dw.js +0 -2
- package/dist/chunk-5q4tncfw.js +0 -18
- package/dist/chunk-5x9ajbq0.js +0 -2
- package/dist/chunk-6g7tkmty.js +0 -2
- package/dist/chunk-72bj7ea4.js +0 -2
- package/dist/chunk-74g64pzt.js +0 -20
- package/dist/chunk-7de5y29a.js +0 -54
- package/dist/chunk-7ycmnsh5.js +0 -2
- package/dist/chunk-811hh6vp.js +0 -2
- package/dist/chunk-830ej8d2.js +0 -72
- package/dist/chunk-8fkmxrat.js +0 -2
- package/dist/chunk-8p9npc8y.js +0 -2
- package/dist/chunk-9fz3h6sx.js +0 -2
- package/dist/chunk-9jr30fns.js +0 -2
- package/dist/chunk-9xr628ew.js +0 -3
- package/dist/chunk-a9m6ajd7.js +0 -2
- package/dist/chunk-aj6vqdf7.js +0 -25
- package/dist/chunk-asr5v51s.js +0 -2
- package/dist/chunk-b7nmgkwa.js +0 -42
- package/dist/chunk-bv14vry8.js +0 -3
- package/dist/chunk-byx82s10.js +0 -2
- package/dist/chunk-c9y1g61m.js +0 -2
- package/dist/chunk-ck5nzbbv.js +0 -2
- package/dist/chunk-cvdm0hgq.js +0 -2
- package/dist/chunk-e0fxgbcc.js +0 -2
- package/dist/chunk-ed2m6pjf.js +0 -2
- package/dist/chunk-ednwdhv0.js +0 -2
- package/dist/chunk-egtphftq.js +0 -2
- package/dist/chunk-f18rxz70.js +0 -2
- package/dist/chunk-fahqq7c4.js +0 -2
- package/dist/chunk-fcbpzdyz.js +0 -2
- package/dist/chunk-gc79s0wh.js +0 -20
- package/dist/chunk-gjnrmz2q.js +0 -4
- package/dist/chunk-gp1dt8b8.js +0 -33
- package/dist/chunk-h0dsxxz4.js +0 -2
- package/dist/chunk-h2cvfp9y.js +0 -2
- package/dist/chunk-jhm1228j.js +0 -4
- package/dist/chunk-k3yym9zg.js +0 -2
- package/dist/chunk-k9fsd6t3.js +0 -2
- package/dist/chunk-kepxsjfx.js +0 -2
- package/dist/chunk-kgrvvtcy.js +0 -3
- package/dist/chunk-kh01rvag.js +0 -2
- package/dist/chunk-kv40xq53.js +0 -1329
- package/dist/chunk-mad172af.js +0 -2
- package/dist/chunk-mjkdskeg.js +0 -12
- package/dist/chunk-npt0mdzb.js +0 -2
- package/dist/chunk-p95fsnbk.js +0 -2
- package/dist/chunk-ptc3yqn3.js +0 -2
- package/dist/chunk-pybm7c9p.js +0 -2
- package/dist/chunk-q87hkwfg.js +0 -3
- package/dist/chunk-qe6631me.js +0 -2
- package/dist/chunk-qnx71b17.js +0 -2
- package/dist/chunk-qx8cav4w.js +0 -2
- package/dist/chunk-rb7cwck6.js +0 -2
- package/dist/chunk-s1e0t3hv.js +0 -2
- package/dist/chunk-s7vfmasx.js +0 -2
- package/dist/chunk-scwbttvt.js +0 -3
- package/dist/chunk-shy2hkvj.js +0 -2
- package/dist/chunk-sxtvy0sm.js +0 -3
- package/dist/chunk-t7z67vf6.js +0 -2
- package/dist/chunk-tarvase5.js +0 -2
- package/dist/chunk-tqs9pcga.js +0 -2
- package/dist/chunk-twjfrywv.js +0 -2
- package/dist/chunk-v0wdgxga.js +0 -3
- package/dist/chunk-vyna2rsq.js +0 -2
- package/dist/chunk-w4gjx2zs.js +0 -18
- package/dist/chunk-xhe7pw6e.js +0 -2
- package/dist/chunk-y86mpnrg.js +0 -2
- package/dist/chunk-z99bf0q0.js +0 -3
- package/dist/chunk-zm0g7ntw.js +0 -2
- package/dist/chunk-zrm2x65c.js +0 -2
package/dist/chunk-gc79s0wh.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ke,it,gi,zs,Hc,Vc,mi,Uc,Wc,Hs,yi,qc,Kc,bi,wn}from"./chunk-261t62q4.js";import{k}from"./chunk-1jwcp2k0.js";import{a}from"./chunk-6nb49h13.js";import{ko}from"./chunk-gp1dt8b8.js";import{c}from"./chunk-sxtvy0sm.js";import{existsSync as B,readFileSync as F}from"fs";import h from"path";var ge=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),te=wn.filter((e)=>!ge.has(e)).sort(),ne=[...k].sort(),he=[...new Set([...te,...ne])].sort(),be=new Set(te),xe=new Set(ne),ye=new Set(he),ee=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function Se(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 ie(e,t){let s=[];for(let p of t){if(p.offset===void 0)continue;let i=p.kind==="server"?be:xe;ee.lastIndex=0;for(let u of p.code.matchAll(ee)){let f=u.index+u[0].indexOf("{")+1;for(let m of u[1].matchAll(/[^,]+/g)){let b=m[0];if(/^\s*type\s/.test(b))continue;let S=/^\s*([A-Za-z_$][\w$]*)/.exec(b);if(!S)continue;let r=S[1];if(!ye.has(r)||i.has(r))continue;let d=p.offset+f+m.index+S[0].length-r.length,o=e.slice(0,d),w=o.split(`
|
|
3
|
-
`).length;s.push({line:w,column:d-(o.lastIndexOf(`
|
|
4
|
-
`)+1)+1,offset:d,length:r.length,name:r,kind:p.kind,message:Se(r,p.kind)})}}}return s}import N from"path";var we="@stacksjs/stx-typescript-plugin";function $e(e,t){let s=N.resolve(e);for(;;){let p=N.join(s,"tsconfig.json");if(t(p))return p;let i=N.dirname(s);if(i===s)return;s=i}}function re(e,t,s){let p=$e(e,s);if(!p)return;let i=new Set,u=(f)=>{if(i.has(f))return;i.add(f);let m=t(f);if(!m)return;let b=m.compilerOptions?.plugins;if(Array.isArray(b)){let r=b.find((o)=>o?.name===we),d=Array.isArray(r?.libs)?r.libs.filter((o)=>typeof o==="string"):[];return r?{configPath:f,libs:d.map((o)=>N.resolve(N.dirname(f),o))}:null}let S=typeof m.extends==="string"?[m.extends]:Array.isArray(m.extends)?m.extends:[];for(let r of[...S].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let d=N.resolve(N.dirname(f),r.endsWith(".json")?r:`${r}.json`),o=u(d);if(o!==void 0)return o}return};return u(p)??void 0}function fa(e,t="",s="",p=t){let i=e.startLine>1?`
|
|
5
|
-
`.repeat(e.startLine-1):"",u=gi(yi(e)+e.code,p),f=zs(u.code),m=e.kind==="client"||e.kind==="plain"?Uc(t,e.code):"",b=(i+f).split(`
|
|
6
|
-
`),S=b.length,r=new Map;for(let o of u.declarations)for(let[w,I]of o.text.split(`
|
|
7
|
-
`).entries())if(b.push(I),o.origin)r.set(b.length,{...o.origin,line:e.startLine+o.origin.line-1+w,column:w===0?o.origin.column:1});b.push(m,"export {}","");let d=Hs(b.join(`
|
|
8
|
-
`),s);return{text:d.code,sourceLineCount:S,lineMap:r,scriptColumns:new Map([...u.columns].map(([o,w])=>[o+e.startLine-1,w])),importColumns:d.columns}}function pm(e,t="",s=""){return fa(e,t,s).text}var ve=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 Te(e){if(e.length===0)return"";let t=["// Generated \u2014 the composables the runtime publishes as bare globals."],s=new Set(k),p=[];for(let{file:i,names:u}of e){let f=JSON.stringify(i.replace(/\\/g,"/").replace(/\.ts$/,""));p.push(` export * from ${f}`);for(let m of u){if(s.has(m)||ve.has(m))continue;s.add(m),t.push(`declare const ${m}: typeof import(${f})[${JSON.stringify(m)}]`)}}return t.push("declare module '@composables' {",...p,"}"),t.join(`
|
|
9
|
-
`)}function ga(e,t,s){return`${e}.__stx_${t}${s}.ts`}function fm(e){return e.replace(/\.__stx_(?:server|client|plain|template)\d+\.ts$/,"")}function Gl(){return oe("stx.d.ts")}function Xl(){return oe("stx-module.d.ts")}function oe(e){for(let t of[h.resolve(import.meta.dir,"..",e),h.resolve(import.meta.dir,"..","..",e)])if(B(t))return t;return null}var De=/^(.*?)\((\d+),(\d+)\):\s+(error|warning)\s+TS(\d+):\s+(.*)$/;function se(e){return e>=1000&&e<2000}function ce(e){let t="",s=!1,p=!1;for(let i=0;i<e.length;i++){let u=e[i];if(s){if(t+=u,p)p=!1;else if(u==="\\")p=!0;else if(u==='"')s=!1;continue}if(u==='"'){s=!0,t+=u;continue}if(u==="/"&&e[i+1]==="/"){while(i<e.length&&e[i]!==`
|
|
10
|
-
`)i++;t+=`
|
|
11
|
-
`;continue}if(u==="/"&&e[i+1]==="*"){i+=2;while(i<e.length&&!(e[i]==="*"&&e[i+1]==="/"))i++;i++;continue}t+=u}return t.replace(/,(\s*[}\]])/g,"$1")}function Ee(e){try{return JSON.parse(ce(F(e,"utf8")))}catch{return}}function Ne(e){let t=h.resolve(e),s;for(;;){let r=h.join(t,"tsconfig.json");if(B(r)){s=r;break}let d=h.dirname(t);if(d===t)break;t=d}if(!s)return{};let p=new Set,i=s,u,f,m=s;while(i&&!p.has(i)){p.add(i);let r;try{r=JSON.parse(ce(F(i,"utf8")))}catch{break}let d=r?.compilerOptions??{};if(!u&&d.paths&&typeof d.paths==="object")u=d.paths,m=i;if(!f&&typeof d.baseUrl==="string")f=h.resolve(h.dirname(i),d.baseUrl);if(u&&f)break;i=typeof r?.extends==="string"?h.resolve(h.dirname(i),r.extends.endsWith(".json")?r.extends:`${r.extends}.json`):void 0}if(!u)return{};let b=f??h.dirname(m),S={};for(let[r,d]of Object.entries(u)){if(!Array.isArray(d))continue;S[r]=d.map((o)=>typeof o==="string"&&!h.isAbsolute(o)?h.resolve(b,o):o)}return{paths:S}}async function gm(e,t={}){let s=t.client!==!1,p=t.server!==!1,i=t.templates!==!1,u=t.componentsDir??(i?(await a()).componentsDir:void 0),f=new Map,m=new Map,b=[],S=[],r=0,d=0,o=Gl();for(let n of e){let l=await Bun.file(n).text(),y=it(l).filter((g)=>{if(g.kind==="server")return p;return s}),v=it(l).filter((g)=>g.kind==="server").map((g)=>g.code).join(`
|
|
12
|
-
`),M=mi(it(l));for(let g of ie(l,y))b.push({file:n,line:g.line,column:g.column,code:0,message:g.message,category:"error",blockKind:g.kind});if(s&&v){let g=y.filter((x)=>x.kind!=="server"),E=[...new Set(g.flatMap((x)=>Wc(v,x.code)))];if(E.length>0)m.set(n,{names:E,line:g[0].startLine,kind:g[0].kind})}let j=h.dirname(h.resolve(n)),D=i?qc(l,{runtimeGlobals:!o,originDir:j,filePath:h.resolve(n),componentsDir:u}):null,T=D?[...D.lineMap.values()].filter((g)=>g.expression).length:0;if(y.length===0&&T===0)continue;if(S.push(n),r+=y.length,d+=T,y.forEach((g,E)=>{let x=fa(g,v,j,M);f.set(ga(n,g.kind,E),{virtual:x,source:x.text,origin:n,kind:g.kind})}),D&&T>0)f.set(ga(n,"template",0),{source:D.text,origin:n,kind:"template",virtual:D})}if(f.size===0)return{diagnostics:b,checkedFiles:S,blockCount:0,expressionCount:0};let w=(t.extraLibs??[]).map((n)=>h.resolve(n)),I=re(e.length>0?h.dirname(h.resolve(e[0])):process.cwd(),Ee,B);for(let n of I?.libs??[])if(!w.includes(n)&&B(n))w.push(n);if(o)w.push(o);let G=o?Xl():null;if(G)w.push(G);let V=`${c()}/typecheck/__stx_globals.d.ts`,ae=["// Generated \u2014 the context serve.ts injects into <script server> blocks.",Hc(o?Vc(F(o,"utf8")):void 0),...o?[]:["declare const window: any",...k.map((n)=>`declare const ${n}: any`)],["// Generated \u2014 the names stx auto-imports from @stacksjs/browser.",...ke.map((n)=>`declare const ${n}: any`)].join(`
|
|
13
|
-
`),Te(await ko())].filter(Boolean).join(`
|
|
14
|
-
`),_=`${c()}/typecheck`;await Bun.$`rm -rf ${_}`.quiet().nothrow(),await Bun.$`mkdir -p ${_}`.quiet().nothrow(),await Bun.write(V,ae);let C=new Map,le=0;for(let[n,l]of f){let y=`${le++}_${n.replace(/[^\w.-]+/g,"_")}`;await Bun.write(`${_}/${y}`,l.source),C.set(y,l)}let ue={target:"ESNext",module:"ESNext",moduleResolution:"bundler",strict:!0,noEmit:!0,skipLibCheck:!0,allowJs:!0,esModuleInterop:!0,resolveJsonModule:!0,lib:["ESNext","DOM","DOM.Iterable"],types:[],...Ne(e.length>0?h.dirname(h.resolve(e[0])):process.cwd()),...t.compilerOptions??{}},X=async(n,l)=>{let y=`${_}/tsconfig${l===1?"":`.${l}`}.json`;await Bun.write(y,JSON.stringify({compilerOptions:ue,files:n.map((M)=>`${_}/${M}`).concat(V,...w)},null,2));let v=Bun.spawnSync(["bun","x","tsc","-p",y,"--pretty","false"],{stdout:"pipe",stderr:"pipe"});return{output:new TextDecoder().decode(v.stdout)+new TextDecoder().decode(v.stderr),exitCode:v.exitCode??0}},J=await X([...C.keys()],1),U=J.output,R=[],W=J.exitCode,z=0,pe=new Set(w.map((n)=>n.split("/").pop())),q=0,P=new Set,H=(n)=>{for(let l of n.replace(/\n[\t ]+([^\n]*)/g," $1").split(`
|
|
15
|
-
`)){let y=l.match(De);if(!y)continue;if(z++,pe.has(y[1].split("/").pop()))q++;let[,v,M,j,D,T,g]=y,E=v.split("/").pop(),x=C.get(E);if(!x)continue;if(se(Number(T)))P.add(E);let A=Number(M),K=Number(j),Y;if(x.virtual){let O=bi(x.virtual,A,K)??(x.kind!=="template"&&se(Number(T))?bi(x.virtual,x.virtual.sourceLineCount,1):null);if(!O||x.kind==="template"&&!O.expression)continue;if(Kc(O,Number(T)))continue;A=O.line,K=O.column,Y=O.expression?.code.trim()}R.push({file:x.origin,line:A,column:K,code:Number(T),message:g,category:D==="error"?"error":"warning",blockKind:x.kind,expression:Y})}};H(U);let de=z,fe=q;if(P.size>0&&P.size<C.size){let n=[...C.keys()].filter((l)=>!P.has(l));H((await X(n,2)).output)}if(s)for(let[n,l]of m){if(l.names.length===0)continue;R.push({file:n,line:l.line,column:1,code:0,message:`${l.names.length===1?"1 value reaches":`${l.names.length} values reach`} this block on the implicit bridge and ${l.names.length===1?"is":"are"} untyped: ${l.names.join(", ")}. Declare them with defineClientPayload({ ${l.names.join(", ")} }) in the server block to have them checked.`,category:"warning",blockKind:l.kind})}R.push(...b);let Z=new Set,L=R.filter((n)=>{let l=`${n.file}:${n.line}:${n.column}:${n.code}:${n.message}`;if(Z.has(l))return!1;return Z.add(l),!0});L.sort((n,l)=>n.file.localeCompare(l.file)||n.line-l.line||n.column-l.column);let Q=fe>0&&L.length===0,me=Q||W!==0&&de===0?`${Q?"a file passed with --lib has errors of its own, so nothing in your code was checked":`tsc exited ${W} 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:
|
|
16
|
-
${U.trim().split(`
|
|
17
|
-
`).slice(0,12).join(`
|
|
18
|
-
`)||"(no output)"}`:void 0;return{diagnostics:L,checkedFiles:S,blockCount:r,expressionCount:d,failure:me}}function mm(e){return e.map((t)=>{let s=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} ${s}`}).join(`
|
|
19
|
-
`)}
|
|
20
|
-
export{fa,pm,ga,fm,Gl,Xl,gm,mm};
|
package/dist/chunk-gjnrmz2q.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{rt}from"./chunk-3gfd9t8a.js";import{wt,qn}from"./chunk-5neezkj1.js";import{Ir,Or,Nr,Dr,Ee}from"./chunk-830ej8d2.js";import{Le,yn,ll,ul}from"./chunk-261t62q4.js";import{M}from"./chunk-5rxks14t.js";import{$i}from"./chunk-naj146zq.js";import{b}from"./chunk-5q4tncfw.js";import{i}from"./chunk-kv40xq53.js";import{F,a}from"./chunk-6nb49h13.js";import{Oc}from"./chunk-4rrxrxp6.js";import{Nn,Mn,Ke,$e,ya,ba,Dn}from"./chunk-4jgcd4d9.js";import{un,Mo}from"./chunk-15rkvc0t.js";import{Ln}from"./chunk-12r22pf0.js";import{nn,tr,nr}from"./chunk-q87hkwfg.js";import{X}from"./chunk-02css3vk.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function W(n){return Q("sha256").update(n).digest("hex").slice(0,8)}function J(n=!1){let l=n?qn():wt(),o=W(l);return{content:l,filename:`runtime.${o}.js`,hash:o}}function U(){let n=rt(),l=W(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);ll();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)=>Le(R))),{context:D}=te({__filename:r,__dirname:V.dirname(r),__stx_serverDeclared:u}),A=new Set,T={...F,..._,...o,buildMode:"compile",strict:!1},f=await i(e,D,r,T,A),w=Nn(f)+Mn(f)+Ke(f),j=ul();return{route:l,sourceFile:n,html:f,fragment:w,placeholders:j,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:S,status:yn(e),streamTemplates:D.__streamTemplates}}var re=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function Z(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 hm(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=Ee(e.app?.head,{known:Dr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=n.routeRules??e.routeRules??{},T=Ln(A),f=n.serverApi??e.serverApi,w=typeof f==="object"?f:{};if(f)un(o,w);if(e.runtimeConfig)M(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=X(o,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],P=R.filter((s)=>!Y.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=J(n.debug),x=U();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",x.filename),x.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${x.filename} (${(x.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let B=[],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(B.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Nr(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Ir(t.html,u);if(g.htmlAttrs)t.html=Or(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 I=p[1];t.html=t.html.replace(" "+I,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${I}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await b(t.html),O){let p=await Dn(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=$e(t.html,D,!0);let L=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),z=c.join("server","pages",`${L}.compiled.json`),G=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,G),t.fragment),H.push({pattern:s.pattern,compiledPath:z,fragmentPath:G,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}=Z(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=nr(o);if(E){let{copied:s,bytes:h}=Z(E,c.join(r,"public",tr));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${nn}/`)}let N={runtime:v.filename,router:x.filename},C=ya(H,N,r);if(C.routeRules=A,C.routerContainer=D,f)C.apiRoutes=await Mo(o,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await $i(o,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(Oc(e._layerGraph),null,2));ba(C,r);let K=Date.now()-l;return console.log(`
|
|
3
|
-
[stx build] Done in ${K}ms \u2014 ${B.length} pages compiled`),{pageCount:B.length,assets:N,outputDir:r,duration:K}}
|
|
4
|
-
export{hm};
|
package/dist/chunk-gp1dt8b8.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ne,w,S,C,Z}from"./chunk-261t62q4.js";import{k}from"./chunk-1jwcp2k0.js";import{I,An}from"./chunk-xppm4cs4.js";import{a}from"./chunk-6nb49h13.js";import{be,an,cn,ln}from"./chunk-74g64pzt.js";import{St}from"./chunk-b1tctqn5.js";import{bt,Wn,Qt,ue}from"./chunk-jhm1228j.js";import{T,Rn}from"./chunk-9xr628ew.js";import h from"path";var v=new Map,A=new Map,E=w(64),F=new Map,Y=["composables","functions"];function H(e){let s=h.basename(e,".ts");return s==="index"||s==="types"||e.endsWith(".d.ts")}async function ee(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 te();if(t!==null)F.set(s,t);return t}async function te(){let e=await a(),s=e.root||process.cwd(),r=e.composablesDir;if(r)return h.resolve(s,r);for(let t of Y){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 ee()].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 ko(e){let{files:s}=await W(e),r=Z({loader:"ts",target:"browser",define:C()}),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 ne(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):ne(e,n))t.add(n);return t}var J=w(64);function X(e,s){let r=S(e,s.size),t=J.get(r);if(t)return t;let n;try{n=Ne(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=w(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 _=S(f,[...y].sort().join(",")),b=L.get(_);if(!b)b=X(f,y),L.set(_,b);for(let B of b)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 kh(e,s,r,t){let{key:n,files:c}=await W(e);if(!n)return null;let i=()=>[...new Set([...c,...c.flatMap((o)=>be(o))])],u=bt(i());if(c.length===0)return ue(v,n,u,""),null;c.sort();let f=Z({loader:"ts",target:"browser",define:C()}),d=Qt(A,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((V)=>V!=="default");if(g.length>0)l.push({file:p,names:g})}catch{o.set(p,"")}d=ue(A,n,u,{codeByFile:o,modules:l})}let{codeByFile:m,modules:y}=d,_;if(s===void 0)_=new Set(c);else{let o=r?[s,...r]:[s],l=S(o.join("\x00"),n,o.length,u),p=E.get(l);if(_=p??ie(y,m,o),!p)E.set(l,_)}if(_.size===0)return null;let b=c.filter((o)=>_.has(o)),B=()=>{if(!t)return;for(let o of b)t.push(o,...be(o))},N=`${n}\x00${b.join("\x00")}\x00${cn()}`,P=Qt(v,N,u);if(P!==void 0)return B(),P||null;let D=[],M=new Set,U=new Set;for(let o of b)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=I(l),an(l))l=await ln(l,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:x}),l=St(l);l=An(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 ue(v,N,u,""),null;let q=[...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=k.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
|
-
${q}
|
|
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=T()?Rn(O):O;return u=bt(i()),ue(v,N,u,G),B(),G}function _h(){v.clear(),Wn(),A.clear(),E.clear(),F.clear()}
|
|
33
|
-
export{ko,kh,_h};
|
package/dist/chunk-h0dsxxz4.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{F,eg,ei,Cc,a,O,ry,sy}from"./chunk-6nb49h13.js";import"./chunk-68w65mhs.js";import"./chunk-9pyvc0dc.js";import"./chunk-4rrxrxp6.js";import"./chunk-dba4bwkd.js";import"./chunk-3gfd9t8a.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{O as config,F as defaultConfig,ry as defineStxConfig,ei as discoverConfig,a as loadStxConfig,Cc as resolveInstalledPackage,eg as resolveStxDirectories,sy as validateConfig};
|
package/dist/chunk-h2cvfp9y.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{x}from"./chunk-830ej8d2.js";function et(e,r){let n=y(e,r);return n.ok?{expression:n.expression,endPos:n.endPos}:null}function y(e,r){let n=r;while(n<e.length&&/\s/.test(e[n]))n++;if(e[n]!=="(")return{ok:!1,reason:"missing-open-paren",pos:n};let c=x(e,"(",")",n);if(c===-1)return{ok:!1,reason:"unclosed-paren",pos:n};return{ok:!0,expression:e.slice(n+1,c),endPos:c+1}}function k(e,r){let n=e.lastIndexOf("<",r);if(n===-1)return!1;return n>e.lastIndexOf(">",r)}function kt(e,r,n,c){let o=1,i=c,u=new RegExp(`@${r}\\s*\\(`,"g"),a=new RegExp(`@${n}(?![a-z])`,"g");while(i<e.length&&o>0){u.lastIndex=i,a.lastIndex=i;let p=u.exec(e),t=a.exec(e),s=p?p.index:1/0,f=t?t.index:1/0;if(s<f)o++,i=s+p[0].length;else if(f<1/0){if(o--,o===0)return f;i=f+t[0].length}else break}return-1}function v(e,r){let n=e.slice(r).match(/^@if\s*/);if(!n)return null;let c=r+n[0].length,o=et(e,c);if(!o)return null;let i=o.endPos,u=kt(e,"if","endif",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s="if",f=o.expression,l=0,g=0;while(t<a.length){let h=a.indexOf("@",t);if(h===-1)break;t=h;let d=a.substring(h);if(k(a,h)){t++;continue}if(/^@if\s*\(/.test(d)){g++,t++;continue}if(/^@endif(?![a-z])/.test(d)){g--,t+=6;continue}if(g===0){let b=d.match(/^@elseif\s*/);if(b){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t});let E=t+b[0].length,m=et(a,E);if(!m){t++;continue}s="elseif",f=m.expression,t=m.endPos,l=t;continue}else if(/^@else(?![a-z])/.test(d)){p.push({type:s,condition:f,content:a.substring(l,t),start:i+l,end:i+t}),s="else",f=void 0,t+=5,l=t;continue}}t++}return p.push({type:s,condition:f,content:a.slice(l),start:i+l,end:i+a.length}),{fullMatch:e.slice(r,u+6),branches:p,start:r,end:u+6}}function fn(e){let r=[],n=/@if\s*\(/g,c=n.exec(e);while(c!==null){if(r.some((u)=>c.index>u.start&&c.index<u.end)){c=n.exec(e);continue}let i=v(e,c.index);if(i)r.push(i),n.lastIndex=i.end;c=n.exec(e)}return r}function Ss(e,r,n){let c=[],o=new RegExp(`@${r}\\s*\\(`,"g"),i=o.exec(e);while(i!==null){if(c.some((d)=>i.index>d.start&&i.index<d.end)){i=o.exec(e);continue}let a=i.index,p=a+i[0].length-1,t=x(e,"(",")",p);if(t===-1){i=o.exec(e);continue}let s=e.slice(p+1,t),f=t+1,l=kt(e,r,n,f);if(l===-1){i=o.exec(e);continue}let g=e.slice(f,l),h=l+`@${n}`.length;c.push({fullMatch:e.slice(a,h),name:r,params:s,content:g,start:a,end:h}),o.lastIndex=h,i=o.exec(e)}return c}function Zo(e,r){let n=e.slice(r).match(/^@switch\s*/);if(!n)return null;let c=r+n[0].length,o=et(e,c);if(!o)return null;let i=o.endPos,u=kt(e,"switch","endswitch",i);if(u===-1)return null;let a=e.slice(i,u),p=[],t=0,s=null,f=0;while(t<a.length){let l=a.slice(t),g=l.match(/^@switch\s*\(/),h=l.match(/^@endswitch(?![a-z])/);if(g){if(f++,s)s.content+=g[0];t+=g[0].length;continue}if(h){if(f--,s)s.content+=h[0];t+=h[0].length;continue}if(f>0){if(s)s.content+=a[t];t++;continue}let d=l.match(/^@case\s*/),b=l.match(/^@default(?![a-z])/),E=l.match(/^@break(?![a-z])/);if(d&&l.startsWith("@case")){if(s)p.push(s);let m=t+d[0].length,P=et(a,m);if(!P){t++;continue}s={type:"case",value:P.expression,content:""},t=P.endPos}else if(b&&l.startsWith("@default")){if(s)p.push(s);s={type:"default",content:""},t+=b[0].length}else if(E&&l.startsWith("@break"))t+=E[0].length;else{if(s)s.content+=a[t];t++}}if(s)p.push(s);return{fullMatch:e.slice(r,u+10),expression:o.expression,cases:p,start:r,end:u+10}}export{et,kt,fn,Ss,Zo};
|
package/dist/chunk-jhm1228j.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import a from"fs";function bt(r){return o(r)}var g=1000,i=new Map;function Wn(){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 Qt(r,n,t){let e=r.get(n);return e!==void 0&&e.signature===t?e.value:void 0}function ue(r,n,t,e){return r.set(n,{signature:t,value:e}),e}
|
|
4
|
-
export{bt,Wn,Qt,ue};
|
package/dist/chunk-k3yym9zg.js
DELETED
package/dist/chunk-k9fsd6t3.js
DELETED
package/dist/chunk-kepxsjfx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ca,yu,Un,qm,bu,wu,vu,Km}from"./chunk-wrbhq1y2.js";import"./chunk-261t62q4.js";import"./chunk-naj146zq.js";import"./chunk-5rxks14t.js";import"./chunk-830ej8d2.js";import"./chunk-xppm4cs4.js";import"./chunk-1jwcp2k0.js";export{Un as Validator,yu as defineForm,bu as processErrorDirective,wu as processErrorsDirective,Km as processFormValidationDirectives,vu as processHasErrorsDirective,Ca as useForm,qm as v};
|
package/dist/chunk-kgrvvtcy.js
DELETED
package/dist/chunk-kh01rvag.js
DELETED