@stacksjs/stx 0.2.416 → 0.2.417
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-072f6hnz.js +2 -0
- package/dist/{chunk-a47yp92z.js → chunk-072mzamc.js} +5 -5
- package/dist/{chunk-dd5fa7d6.js → chunk-08p07eq7.js} +2 -2
- package/dist/chunk-0x076wz1.js +2 -0
- package/dist/{chunk-zyxp0nb3.js → chunk-0xgf3xgy.js} +16 -16
- package/dist/chunk-1680nbq4.js +2816 -0
- package/dist/{chunk-7tabykst.js → chunk-25n4gmek.js} +2 -2
- package/dist/chunk-2gfj59pt.js +2 -0
- package/dist/chunk-2gntnw7e.js +2 -0
- package/dist/chunk-2hvvwhmv.js +2 -0
- package/dist/{chunk-rfdqrv5v.js → chunk-31a8eh0j.js} +4 -4
- package/dist/{chunk-vvs75dse.js → chunk-3aqe7wy7.js} +2 -2
- package/dist/{chunk-x0mq57pe.js → chunk-3f5td68v.js} +2 -2
- package/dist/chunk-3senpdjt.js +3 -0
- package/dist/{chunk-jr4dwkvc.js → chunk-3wmxb126.js} +2 -2
- package/dist/{chunk-znbay168.js → chunk-47h689h6.js} +2 -2
- package/dist/chunk-4bhertga.js +2 -0
- package/dist/chunk-4s9dypby.js +2 -0
- package/dist/{chunk-rqc4jx2v.js → chunk-5f3k2mke.js} +1 -1
- package/dist/{chunk-nj8edn4m.js → chunk-5fwy3xap.js} +3 -3
- package/dist/{chunk-zcctf7tx.js → chunk-5vzamjf6.js} +4 -4
- package/dist/chunk-5z56g0n4.js +2 -0
- package/dist/chunk-68rq2fqt.js +12 -0
- package/dist/chunk-6ad0nseq.js +2 -0
- package/dist/{chunk-rhw7pqhy.js → chunk-76japd6k.js} +4 -4
- package/dist/chunk-7eazcxzf.js +2 -0
- package/dist/chunk-7hy29tcy.js +2 -0
- package/dist/{chunk-gxrewzhv.js → chunk-7q1yy18q.js} +2 -2
- package/dist/{chunk-rp4khnan.js → chunk-85bm5xrm.js} +3 -3
- package/dist/{chunk-bfjzfrw3.js → chunk-865xvpp2.js} +2 -2
- package/dist/chunk-8fyqbq14.js +2 -0
- package/dist/chunk-92xzpt6p.js +2 -0
- package/dist/{chunk-sh5c60a2.js → chunk-94ky725r.js} +2 -2
- package/dist/{chunk-89xcpdsp.js → chunk-9af8qbwb.js} +5 -5
- package/dist/{chunk-m9xdkzm6.js → chunk-9bq4w4d6.js} +3 -3
- package/dist/chunk-9kmmafp4.js +2 -0
- package/dist/{chunk-gq97zh73.js → chunk-9r5ycpdg.js} +3 -3
- package/dist/{chunk-fctjn68q.js → chunk-9yt899e7.js} +6 -6
- package/dist/chunk-atgwc7r7.js +2 -0
- package/dist/{chunk-a688m6js.js → chunk-ayd5r3se.js} +2 -2
- package/dist/{chunk-yzv8n6qw.js → chunk-bk5ndwv3.js} +2 -2
- package/dist/chunk-bs6y5wy2.js +2 -0
- package/dist/{chunk-j8rxdbe5.js → chunk-bt11a8z4.js} +3 -3
- package/dist/{chunk-fkhxz1dx.js → chunk-c8p4v1rd.js} +5 -5
- package/dist/chunk-ccg6xjr1.js +2 -0
- package/dist/chunk-ckv4aty5.js +2 -0
- package/dist/{chunk-1ctvgd7v.js → chunk-d0ynfema.js} +1 -1
- package/dist/chunk-d6h9rpm4.js +30 -0
- package/dist/chunk-dbh7h0kt.js +2 -0
- package/dist/chunk-dhqkg0ph.js +2 -0
- package/dist/{chunk-6agy2x1f.js → chunk-dw961rvn.js} +2 -2
- package/dist/{chunk-h8wegkb5.js → chunk-dym1eteb.js} +1 -1
- package/dist/{chunk-41k0th97.js → chunk-e2m674vf.js} +4 -4
- package/dist/{chunk-9t2xx2y4.js → chunk-e83j8xe9.js} +4 -4
- package/dist/chunk-ettat5ah.js +2 -0
- package/dist/{chunk-cn9hgyh5.js → chunk-ev8bhsc0.js} +2 -2
- package/dist/chunk-f4ws0qcd.js +2 -0
- package/dist/chunk-f97v10zr.js +2 -0
- package/dist/chunk-fe5st320.js +2 -0
- package/dist/chunk-fet3hce8.js +2 -0
- package/dist/chunk-fq7128p1.js +2 -0
- package/dist/{chunk-y5cqkmkf.js → chunk-fr8jq2ys.js} +2 -2
- package/dist/chunk-fwy2h1ms.js +2 -0
- package/dist/{chunk-ddk6fx5b.js → chunk-fxhvkenf.js} +2 -2
- package/dist/{chunk-v096a6fw.js → chunk-g947brd0.js} +6 -6
- package/dist/{chunk-wjag92ch.js → chunk-gfm7g98y.js} +85 -85
- package/dist/chunk-gtkhykc4.js +2 -0
- package/dist/{chunk-vvp4cmfq.js → chunk-h8f18cc5.js} +6 -6
- package/dist/chunk-h8pkm7c5.js +2 -0
- package/dist/{chunk-yt6h8c6g.js → chunk-hg3tyzn5.js} +11 -11
- package/dist/{chunk-std6xw3y.js → chunk-hkxxfzfd.js} +2 -2
- package/dist/{chunk-3wrmz1j9.js → chunk-hm2k9a04.js} +7 -7
- package/dist/chunk-hneg0155.js +2 -0
- package/dist/chunk-hs90en70.js +2 -0
- package/dist/{chunk-n5k88y07.js → chunk-jfjym18d.js} +5 -5
- package/dist/chunk-jgsgd6rt.js +17 -0
- package/dist/chunk-jn3njpxs.js +2 -0
- package/dist/chunk-ka8x4sw6.js +18 -0
- package/dist/{chunk-9rnh52t2.js → chunk-kds79hq3.js} +11 -11
- package/dist/{chunk-rg6csnkw.js → chunk-kkj5x9rp.js} +1 -1
- package/dist/chunk-mcqn70v8.js +3 -0
- package/dist/chunk-mcs7p3fy.js +2 -0
- package/dist/{chunk-wpe72ann.js → chunk-mj6fme15.js} +5 -5
- package/dist/{chunk-yk63jd7v.js → chunk-mj9yv1vb.js} +1 -1
- package/dist/chunk-mmtg0jxd.js +2 -0
- package/dist/chunk-mrsxwd0h.js +2 -0
- package/dist/chunk-mscky0ww.js +2 -0
- package/dist/chunk-mtphm33a.js +2 -0
- package/dist/chunk-p2jbc71s.js +2 -0
- package/dist/{chunk-p1tb8kxq.js → chunk-pb0fgdvn.js} +4 -4
- package/dist/{chunk-at0ar6t3.js → chunk-psmdbcbc.js} +4 -4
- package/dist/chunk-pvd9k3kx.js +2 -0
- package/dist/chunk-pz1jc3db.js +2 -0
- package/dist/chunk-q8swb7na.js +4 -0
- package/dist/{chunk-7mbpjv9e.js → chunk-qmzwhtr2.js} +2 -2
- package/dist/chunk-qvr6e2ve.js +3 -0
- package/dist/chunk-ra0pkkvd.js +2 -0
- package/dist/chunk-rcbtd4w3.js +2 -0
- package/dist/chunk-rd2r9jvn.js +2 -0
- package/dist/chunk-s8srb8bg.js +2 -0
- package/dist/{chunk-3t0yaexe.js → chunk-sjjc670z.js} +9 -9
- package/dist/chunk-snf2b68p.js +2 -0
- package/dist/chunk-t2bfwr9v.js +2 -0
- package/dist/chunk-tbmwdahm.js +2 -0
- package/dist/{chunk-388rx71h.js → chunk-v15g9jjh.js} +6 -6
- package/dist/{chunk-de2pv6ys.js → chunk-vdqa5gt7.js} +2 -2
- package/dist/{chunk-rv5bk83t.js → chunk-vepc9rbt.js} +2 -2
- package/dist/{chunk-0es4h5v1.js → chunk-vfdwvt23.js} +2 -2
- package/dist/chunk-vpv896zx.js +2 -0
- package/dist/{chunk-3g8zzdgs.js → chunk-vyfg2qd2.js} +5 -5
- package/dist/{chunk-tfhjbjq5.js → chunk-w5zmvn7b.js} +3 -3
- package/dist/chunk-w6h63b48.js +2 -0
- package/dist/{chunk-cq408jrm.js → chunk-wgzxmh7w.js} +3 -3
- package/dist/{chunk-ppse812s.js → chunk-wpkxbggq.js} +1 -1
- package/dist/chunk-wrk3gkgg.js +2 -0
- package/dist/chunk-wtd71jsa.js +2 -0
- package/dist/{chunk-c4bkj1xw.js → chunk-wweasgq9.js} +18 -18
- package/dist/chunk-wymf1ek6.js +2 -0
- package/dist/chunk-wz8hyh8h.js +4 -0
- package/dist/chunk-x32wpjs0.js +2 -0
- package/dist/chunk-x4q2eyt0.js +2 -0
- package/dist/chunk-x95ejws0.js +2 -0
- package/dist/chunk-xket8ejt.js +2 -0
- package/dist/{chunk-t9axxwy9.js → chunk-xt6d3zws.js} +4 -4
- package/dist/{chunk-qff4qkx5.js → chunk-xvn3sv3v.js} +3 -3
- package/dist/{chunk-tfexmdkt.js → chunk-xwkdv585.js} +2 -2
- package/dist/{chunk-ae7j3n39.js → chunk-y9t55tv7.js} +6 -6
- package/dist/chunk-ypfzy1mq.js +2 -0
- package/dist/{chunk-7zjvsacw.js → chunk-yrbzsrde.js} +2 -2
- package/dist/chunk-zg68pwy8.js +2 -0
- package/dist/chunk-zs58fnme.js +2 -0
- package/dist/chunk-zy3p0vmx.js +3 -0
- package/dist/cli.js +21 -21
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/dev-server/ts-css.d.ts +11 -0
- package/dist/dev-server/ts-css.js +13 -1
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +17 -17
- package/package.json +5 -5
- package/dist/chunk-02k2v1mb.js +0 -2
- package/dist/chunk-0dh1rgg8.js +0 -2
- package/dist/chunk-0hrqt5c2.js +0 -2
- package/dist/chunk-0vtk2rpr.js +0 -2
- package/dist/chunk-1rd3jzrq.js +0 -2
- package/dist/chunk-26j2q9rq.js +0 -32
- package/dist/chunk-2py27bzq.js +0 -2
- package/dist/chunk-2qa7hjp2.js +0 -3
- package/dist/chunk-35e6zj5x.js +0 -2
- package/dist/chunk-3ch40ebr.js +0 -2
- package/dist/chunk-49cpqjx2.js +0 -2
- package/dist/chunk-4k1nkp9r.js +0 -2
- package/dist/chunk-50vq8k55.js +0 -2
- package/dist/chunk-56pkjk55.js +0 -2
- package/dist/chunk-5hnh00ry.js +0 -2
- package/dist/chunk-5j52h3e3.js +0 -2
- package/dist/chunk-5y1mekxe.js +0 -2
- package/dist/chunk-5zryk911.js +0 -2
- package/dist/chunk-72w28vm8.js +0 -2
- package/dist/chunk-7s7k94as.js +0 -2
- package/dist/chunk-7wb6jf17.js +0 -2
- package/dist/chunk-8cbkqckh.js +0 -2
- package/dist/chunk-8ycy1b0e.js +0 -2
- package/dist/chunk-8ygks6dx.js +0 -3
- package/dist/chunk-95165j9c.js +0 -4
- package/dist/chunk-9fyss0yk.js +0 -3
- package/dist/chunk-aqrnpgn7.js +0 -2
- package/dist/chunk-b9rebdtq.js +0 -2
- package/dist/chunk-c4thhfx9.js +0 -2
- package/dist/chunk-cw6kqb63.js +0 -2
- package/dist/chunk-d3vtgnep.js +0 -2
- package/dist/chunk-d4ynv4z2.js +0 -2
- package/dist/chunk-d7xrewxq.js +0 -2
- package/dist/chunk-dg1n3g1d.js +0 -2785
- package/dist/chunk-ecr598p7.js +0 -2
- package/dist/chunk-eev80mpy.js +0 -2
- package/dist/chunk-ef5vz9w5.js +0 -2
- package/dist/chunk-et0rr8c7.js +0 -3
- package/dist/chunk-f5qd84w8.js +0 -2
- package/dist/chunk-g69tnqga.js +0 -2
- package/dist/chunk-gacycmb0.js +0 -2
- package/dist/chunk-ggywfyzm.js +0 -2
- package/dist/chunk-gp1bhn7t.js +0 -2
- package/dist/chunk-gr3r9xdh.js +0 -2
- package/dist/chunk-gyv1t0f0.js +0 -30
- package/dist/chunk-hec0bvvf.js +0 -12
- package/dist/chunk-hg1eq72d.js +0 -2
- package/dist/chunk-hvyqs5tf.js +0 -2
- package/dist/chunk-kbysqxmd.js +0 -2
- package/dist/chunk-kjbv8a3m.js +0 -2
- package/dist/chunk-kmnsrvrp.js +0 -2
- package/dist/chunk-m6fvj7g1.js +0 -2
- package/dist/chunk-mgw2cvb7.js +0 -2
- package/dist/chunk-mvwt1c8f.js +0 -2
- package/dist/chunk-nvh31cxn.js +0 -2
- package/dist/chunk-p34gbb4z.js +0 -2
- package/dist/chunk-peyt18ce.js +0 -2
- package/dist/chunk-qpx8kvd8.js +0 -2
- package/dist/chunk-qzkebqm3.js +0 -4
- package/dist/chunk-rb272g9d.js +0 -3
- package/dist/chunk-rh1dyfsn.js +0 -2
- package/dist/chunk-rspc8gn8.js +0 -2
- package/dist/chunk-rvs61c88.js +0 -2
- package/dist/chunk-sf1vhfrb.js +0 -2
- package/dist/chunk-tc274fcv.js +0 -18
- package/dist/chunk-ty7t3gp4.js +0 -3
- package/dist/chunk-vc9wa97m.js +0 -2
- package/dist/chunk-wjzqz3yr.js +0 -2
- package/dist/chunk-x7j0krz8.js +0 -2
- package/dist/chunk-xkv0evbf.js +0 -2
- package/dist/chunk-y6rahx7t.js +0 -17
- package/dist/chunk-yt452b4a.js +0 -2
- package/dist/chunk-yxfx44fv.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import c from"fs";import i from"path";import{createHash as k}from"crypto";var j=["pages","components","layouts","partials","composables"],w=new Set;function
|
|
3
|
-
`)}`);let o=r.outputs.find((a)=>a.kind==="entry-point");if(!o||r.outputs.length!==1)throw Error(`Unsupported layer config output: ${e}`);let s=(await import(`data:text/javascript;base64,${Buffer.from(await o.text()).toString("base64")}`)).default;if(!x(s))throw Error(`Layer ${e} must default-export a config object`);return s}async function
|
|
4
|
-
`)}function
|
|
5
|
-
export{
|
|
2
|
+
import c from"fs";import i from"path";import{createHash as k}from"crypto";var j=["pages","components","layouts","partials","composables"],w=new Set;function ao(e){try{return w.has(c.realpathSync(e))}catch{return w.has(i.resolve(e))}}var _=new Set(["extends","root",...j.map((e)=>`${e}Dir`),"publicDir","stateDir","cachePath"]),x=(e)=>e!==null&&typeof e==="object"&&(Object.getPrototypeOf(e)===Object.prototype||Object.getPrototypeOf(e)===null);function b(e,n,r=""){if(Array.isArray(n))return["middleware","plugins"].includes(r)?[...Array.isArray(e)?e:[],...n]:[...n];if(!x(n))return n;let o={...x(e)?e:{}};for(let[s,a]of Object.entries(n)){if(["__proto__","constructor","prototype"].includes(s))throw Error(`Invalid layer config key: ${s}`);o[s]=b(o[s],a,s)}return o}function v(e){for(let n of["stx.config.ts","stx.config.js","stx.config.mjs",".config/stx.config.ts",".config/stx.ts","ui.config.ts"]){let r=i.join(e,n);if(c.existsSync(r))return c.realpathSync(r)}throw Error(`Application layer has no stx.config.ts: ${e}`)}function E(e,n,r){if(typeof e!=="string"||!e||/^(?:https?:|git[+:])/.test(e))throw Error(`Invalid application layer ${JSON.stringify(e)} in ${n}; use a local path or installed package`);if(e.startsWith(".")||i.isAbsolute(e)){let s=i.resolve(n,e);return c.statSync(s).isDirectory()?v(s):c.realpathSync(s)}let o=n;while(!0){let s=i.join(o,"node_modules",e),a=i.join(s,"package.json");if(c.existsSync(a)){r.add(c.realpathSync(a));let g=JSON.parse(c.readFileSync(a,"utf8"));return g.stx?.layer?c.realpathSync(i.resolve(s,g.stx.layer)):v(s)}let p=i.dirname(o);if(p===o)break;o=p}throw Error(`Cannot resolve application layer ${JSON.stringify(e)} from ${n}`)}async function C(e,n){let r=await Bun.build({entrypoints:[e],target:"bun",format:"esm",splitting:!1,plugins:[{name:"stx-layer-config",setup(a){a.onResolve({filter:/^[^./]/},(p)=>{if(p.path.startsWith("node:"))return{path:p.path,external:!0};return{path:Bun.resolveSync(p.path,p.resolveDir),external:!0}}),a.onLoad({filter:/./},(p)=>{let g=c.realpathSync(p.path);n.add(g),w.add(g);return})}}]});if(!r.success)throw Error(`Cannot load layer ${e}: ${r.logs.join(`
|
|
3
|
+
`)}`);let o=r.outputs.find((a)=>a.kind==="entry-point");if(!o||r.outputs.length!==1)throw Error(`Unsupported layer config output: ${e}`);let s=(await import(`data:text/javascript;base64,${Buffer.from(await o.text()).toString("base64")}`)).default;if(!x(s))throw Error(`Layer ${e} must default-export a config object`);return s}async function co(e,n){let r=new Set,o=[],s=[],a=new Set,p=[];async function g(t,l){if(t=c.realpathSync(t),p.includes(t))throw Error(`Application layer cycle: ${[...p,t].join(" -> ")}`);if(a.has(t))return;a.add(t),p.push(t);let d=await C(t,r);l??=i.basename(i.dirname(t))===".config"?i.dirname(i.dirname(t)):i.dirname(t),l=c.realpathSync(l);let D=i.resolve(l,d.root??"."),L=Object.fromEntries(j.map((y)=>[y,i.resolve(D,d[`${y}Dir`]??(y==="composables"?"functions":y))]));o.push({root:l,configFile:t,resources:L});let u={...d};if(u.plugins)u.plugins=u.plugins.map((y)=>{let h=typeof y==="string"?y:y[0],S=h.startsWith(".")?i.resolve(l,h):i.isAbsolute(h)?h:Bun.resolveSync(h,l);return r.add(c.realpathSync(S)),typeof y==="string"?S:[S,y[1]]});if(typeof u.css==="string")u.css=i.resolve(l,u.css);if(u.serverApi)u.serverApi={...typeof u.serverApi==="object"?u.serverApi:{},dir:i.resolve(l,typeof u.serverApi==="object"?u.serverApi.dir??"server/api":"server/api")};if(s.push(u),d.extends!==void 0&&!Array.isArray(d.extends))throw Error(`extends in ${t} must be an array`);for(let y of d.extends??[])await g(E(y,l,r));p.pop()}await g(v(e),e);for(let t of["package.json","bun.lock","package-lock.json","pnpm-lock.yaml"]){let l=i.join(e,t);if(c.existsSync(l))r.add(c.realpathSync(l))}let f=b({},n);for(let t=s.length-1;t>=0;t--){let l=t===0?s[t]:Object.fromEntries(Object.entries(s[t]).filter(([d])=>!_.has(d)));f=b(f,l)}let m={layers:o,configDependencies:[...r].sort()};return f._layerGraph=m,f._layerPageDirs=o.map((t)=>t.resources.pages),f._layerComponentDirs=o.map((t)=>t.resources.components),f._layerLayoutDirs=o.map((t)=>t.resources.layouts),f._layerPartialDirs=o.map((t)=>t.resources.partials),f._layerComposableDirs=o.map((t)=>t.resources.composables),await ds(m,e),{config:f,graph:m}}async function ds(e,n){let r=new Map,o=[];for(let s of e.layers)for(let[a,p]of Object.entries(s.resources)){if(!c.existsSync(p))continue;let g=new Bun.Glob(a==="composables"?"**/*.ts":"**/*.stx");for(let f of[...g.scanSync({cwd:p})].sort()){let m=`${a}/${f}`,t=i.join(p,f),l=r.get(m);if(l)o.push({resource:m,winner:l,shadowed:t});else r.set(m,t)}}Object.assign(e,{overrides:o}),await Bun.write(i.join(n,".stx/layers.json"),JSON.stringify(e,null,2))}function A(e){let n=new Set(e.configDependencies);function r(o){if(!c.existsSync(o))return;n.add(o);for(let s of c.readdirSync(o,{withFileTypes:!0}).sort((a,p)=>a.name.localeCompare(p.name))){if(s.name.startsWith(".")||s.name==="node_modules")continue;let a=i.join(o,s.name);if(s.isDirectory())r(a);else if(s.isFile())n.add(a)}}for(let o of e.layers)for(let s of Object.values(o.resources))r(s);return[...n].sort()}function Vn(e){return O(A(e))}function Un(e){return O(e.configDependencies)}function O(e){return e.map((n)=>{try{let r=c.statSync(n);return`${n}:${r.mtimeMs}:${r.size}`}catch{return`${n}:missing`}}).join(`
|
|
4
|
+
`)}function lo(e){return e.layers.map((n)=>({config:i.relative(n.root,n.configFile),files:A({layers:[n],configDependencies:e.configDependencies.filter((r)=>r.startsWith(`${n.root}${i.sep}`))}).filter((r)=>c.statSync(r).isFile()).map((r)=>({path:i.relative(n.root,r).replaceAll(i.sep,"/"),sha256:k("sha256").update(c.readFileSync(r)).digest("hex")}))}))}
|
|
5
|
+
export{ao,co,ds,Vn,Un,lo};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function a(t,e){let n=t[e],i=e+1;while(i<t.length){if(t[i]==="\\"){i+=2;continue}if(t[i]===n)return i+1;i++}return t.length}function w(t,e){let n=e+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=
|
|
2
|
+
function a(t,e){let n=t[e],i=e+1;while(i<t.length){if(t[i]==="\\"){i+=2;continue}if(t[i]===n)return i+1;i++}return t.length}function w(t,e){let n=e+1;while(n<t.length){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`")return n+1;if(t[n]==="$"&&t[n+1]==="{"){if(n=oo(t,n+2),n<t.length)n++;continue}n++}return t.length}function oo(t,e){let n=1,i=e;while(i<t.length){let l=t[i];if(l==="\\"){i+=2;continue}if(l==='"'||l==="'"){i=a(t,i);continue}if(l==="`"){i=w(t,i);continue}if(l==="/"&&t[i+1]==="/"){while(i<t.length&&t[i]!==`
|
|
3
3
|
`)i++;continue}if(l==="/"&&t[i+1]==="*"){i+=2;while(i<t.length&&t.slice(i,i+2)!=="*/")i++;i+=2;continue}if(l==="{"){n++,i++;continue}if(l==="}"){if(n--,n===0)return i;i++;continue}i++}return t.length}var o=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function b(t,e){if(e)return o.has(e);return!(t===")"||t==="]"||t===h)}var h="\x00";function m(t,e){let n=e+1,i=!1;while(n<t.length){let l=t[n];if(l===`
|
|
4
4
|
`)return-1;if(l==="\\"){n+=2;continue}if(l==="[")i=!0;else if(l==="]")i=!1;else if(l==="/"&&!i){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let e="",n=0,i="",l="";while(n<t.length){let u=t.slice(n,n+2);if(u==="//"){while(n<t.length&&t[n]!==`
|
|
5
5
|
`)e+=" ",n++;continue}if(u==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")e+=t[n]===`
|
|
6
6
|
`?`
|
|
7
7
|
`:" ",n++;e+=" ",n+=2;continue}let r=t[n];if(r==='"'||r==="'"){let f=r;e+=" ",n++;while(n<t.length&&t[n]!==f){if(t[n]==="\\"){e+=" ",n+=2;continue}e+=t[n]===`
|
|
8
8
|
`?`
|
|
9
|
-
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(r==="/"&&b(i,l)){let f=m(t,n);if(f!==-1){e+=`/${" ".repeat(f-n-2)}/`,n=f,i=h,l="";continue}}if(r==="`"){e+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){e+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let f=n+2,g=
|
|
9
|
+
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(r==="/"&&b(i,l)){let f=m(t,n);if(f!==-1){e+=`/${" ".repeat(f-n-2)}/`,n=f,i=h,l="";continue}}if(r==="`"){e+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){e+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let f=n+2,g=oo(t,f);if(e+=" ",e+=s(t.slice(f,g)),g<t.length)e+=" ";n=g+1;continue}e+=t[n]===`
|
|
10
10
|
`?`
|
|
11
|
-
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(e+=r,n++,/[\w$]/.test(r))l=/[\w$]/.test(i)?l+r:r,i=r;else if(!/\s/.test(r))i=r,l=""}return e}function
|
|
12
|
-
export{
|
|
11
|
+
`:" ",n++}e+=" ",n++,i=h,l="";continue}if(e+=r,n++,/[\w$]/.test(r))l=/[\w$]/.test(i)?l+r:r,i=r;else if(!/\s/.test(r))i=r,l=""}return e}function ye(t){let e=new Uint16Array(t.length),n=0,i=!0;for(let l=0;l<t.length;l++){let u=t[l];if(u===")"||u==="]"||u==="}")if(n===0)i=!1;else n--;if(e[l]=n,u==="("||u==="["||u==="{")n++}return{depths:e,balanced:i&&n===0}}
|
|
12
|
+
export{oo,s,ye};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ru,he,Ui,Au,es,ts,ns}from"./chunk-1680nbq4.js";import"./chunk-xvn3sv3v.js";import"./chunk-fxhvkenf.js";import"./chunk-e2m674vf.js";import"./chunk-vepc9rbt.js";import"./chunk-7q1yy18q.js";import"./chunk-0xgf3xgy.js";import"./chunk-31a8eh0j.js";import"./chunk-wweasgq9.js";import"./chunk-vdqa5gt7.js";import"./chunk-bk5ndwv3.js";import"./chunk-76japd6k.js";import"./chunk-865xvpp2.js";export{Au as clearOnceStore,Ui as onceStore,he as partialsCache,es as processIncludes,ts as processStackPushDirectives,ns as processStackReplacements,Ru as resetUnscopedSignalWarnings};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var l=null,k=[],a=0,p=new Set;function v(){return l}function b(e){let i=l;return k.push(e),l=e,i}function T(e){k.pop(),l=e}function y(){return a>0}function g(e){p.add(e)}function m(e){a++;try{e()}finally{if(a--,a===0){let i=[...p];p.clear();for(let n of i)n()}}}function D(e){let i=l;l=null;try{return e()}finally{l=i}}var h=[],f=[];function
|
|
3
|
-
export{
|
|
2
|
+
var l=null,k=[],a=0,p=new Set;function v(){return l}function b(e){let i=l;return k.push(e),l=e,i}function T(e){k.pop(),l=e}function y(){return a>0}function g(e){p.add(e)}function m(e){a++;try{e()}finally{if(a--,a===0){let i=[...p];p.clear();for(let n of i)n()}}}function D(e){let i=l;l=null;try{return e()}finally{l=i}}var h=[],f=[];function z(e){let i=e,n=new Set,r=new Set,o=()=>{let t=v();if(t)r.add(t);return i};return o.set=(t)=>{if(!Object.is(t,i)){let c=i;if(i=t,n.forEach((s)=>{try{s(i,c)}catch(u){console.error("[stx] subscriber error:",u)}}),y())r.forEach((s)=>g(s));else r.forEach((s)=>s())}},o.update=(t)=>{o.set(t(i))},o.subscribe=(t)=>(n.add(t),()=>n.delete(t)),Object.defineProperty(o,"_isSignal",{value:!0,writable:!1}),Object.defineProperty(o,"value",{get:()=>o(),set:(t)=>o.set(t),configurable:!0}),o}function Cn(e){let i,n=!0,r=new Set,o=()=>{if(!n)if(n=!0,y())r.forEach((c)=>g(c));else r.forEach((c)=>c())},t=()=>{let c=v();if(c)r.add(c);if(n){let s=b(o);try{i=e()}finally{T(s)}n=!1}return i};return Object.defineProperty(t,"_isDerived",{value:!0,writable:!1}),Object.defineProperty(t,"value",{get:()=>t(),configurable:!0}),t}function Vt(e,i={}){let n,r=!1,o=()=>{if(r)return;if(n){let c=n;n=void 0;try{c()}catch(s){console.error("[stx] effect cleanup error:",s)}}let t=b(o);try{let c=e();n=typeof c==="function"?c:void 0}catch(c){r=!0,console.error("[stx] effect error (the effect is disposed):",c)}finally{T(t)}};if(i.immediate!==!1)o();return()=>{if(r=!0,n){let t=n;n=void 0,t()}}}function _r(e){m(e)}function Rr(e){h.push(e)}function $n(e){f.push(e)}function Fl(){C(h,"onMount",f)}function zl(){C(f,"onDestroy")}function C(e,i,n){let r=e.splice(0,e.length);for(let o of r)try{let t=o();if(n&&typeof t==="function")n.push(t)}catch(t){console.error(`[stx] ${i} callback threw:`,t)}}function Hl(){return{mount:h.length,destroy:f.length}}function Ut(e){return typeof e==="function"&&e._isSignal===!0}function Wt(e){return typeof e==="function"&&e._isDerived===!0}function Ar(e){if(Ut(e)||Wt(e))return e();return e}function En(e){return D(e)}function Vl(e,i){let n=typeof e==="function"?e:()=>e,r=z([]),o=Cn(()=>r().reduce((s,u)=>i(s,u.action),n())),t=!1;return Vt(()=>{if(n(),!t){t=!0;return}if(En(()=>r().length))r.set([])}),[o,(s,u)=>{let x={action:s};r.set([...r(),x]);let d=()=>{let S=r().filter((A)=>A!==x);if(S.length!==r().length)r.set(S)};if(u&&typeof u.then==="function")Promise.resolve(u).then(d,d);return d}]}
|
|
3
|
+
export{z,Cn,Vt,_r,Rr,$n,Fl,zl,Hl,Ut,Wt,Ar,En,Vl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{$o,Eo}from"./chunk-gfm7g98y.js";import"./chunk-sjjc670z.js";import"./chunk-h8f18cc5.js";import"./chunk-kds79hq3.js";import"./chunk-qmzwhtr2.js";import"./chunk-jfjym18d.js";import"./chunk-wz8hyh8h.js";import"./chunk-fr8jq2ys.js";import"./chunk-3f5td68v.js";import"./chunk-yrbzsrde.js";import"./chunk-3senpdjt.js";import{Xs}from"./chunk-d6h9rpm4.js";import"./chunk-dym1eteb.js";import"./chunk-vfdwvt23.js";import"./chunk-94ky725r.js";import"./chunk-d0ynfema.js";import"./chunk-wgzxmh7w.js";import"./chunk-9yt899e7.js";import"./chunk-g947brd0.js";import"./chunk-9r5ycpdg.js";import"./chunk-3aqe7wy7.js";import"./chunk-5vzamjf6.js";import"./chunk-3wmxb126.js";import"./chunk-w5zmvn7b.js";import"./chunk-vyfg2qd2.js";import"./chunk-9af8qbwb.js";import"./chunk-xt6d3zws.js";import"./chunk-c8p4v1rd.js";import"./chunk-psmdbcbc.js";import"./chunk-y9t55tv7.js";import"./chunk-v15g9jjh.js";import"./chunk-ka8x4sw6.js";import"./chunk-5fwy3xap.js";import"./chunk-jgsgd6rt.js";import"./chunk-mj6fme15.js";import{ge,Jt,Yt,q,d,r,Hn,A,i,ce}from"./chunk-1680nbq4.js";import"./chunk-xvn3sv3v.js";import"./chunk-fxhvkenf.js";import"./chunk-e2m674vf.js";import"./chunk-vepc9rbt.js";import"./chunk-7q1yy18q.js";import"./chunk-0xgf3xgy.js";import"./chunk-31a8eh0j.js";import"./chunk-wweasgq9.js";import"./chunk-vdqa5gt7.js";import"./chunk-bk5ndwv3.js";import"./chunk-76japd6k.js";import"./chunk-865xvpp2.js";export{Hn as buildWebComponents,Yt as cacheTemplate,Jt as checkCache,Xs as classifyAllScripts,$o as createMiddleware,Eo as createRoute,A as defaultConfig,d as extractVariables,q as injectRouterScript,i as loadStxConfig,ge as processClientScript,r as processDirectives,ce as readMarkdownFile};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ul,ai,ba,Wl,ql,Xl,Kl,Gl,va,wa,Jl,Yl,Zl,Ql}from"./chunk-v15g9jjh.js";import"./chunk-1680nbq4.js";import"./chunk-xvn3sv3v.js";import"./chunk-fxhvkenf.js";import"./chunk-e2m674vf.js";import"./chunk-vepc9rbt.js";import"./chunk-7q1yy18q.js";import"./chunk-0xgf3xgy.js";import"./chunk-31a8eh0j.js";import"./chunk-wweasgq9.js";import"./chunk-vdqa5gt7.js";import"./chunk-bk5ndwv3.js";import"./chunk-76japd6k.js";import"./chunk-865xvpp2.js";export{ba as SUSPENSE_RESOLVER_RUNTIME,ai as buildSuspenseResolveScript,Gl as createStreamRenderer,Xl as extractStreamBoundaries,Ql as generateHydrationRuntime,wa as islandDirective,Yl as processSectionDirectives,ql as processStreamDirectives,Jl as registerStreamingDirectives,Wl as renderStreamingPage,Ul as streamTemplate,Kl as streamTemplateSimple,Zl as streamToResponse,va as streamingSuspenseDirective};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tr,ll,ul}from"./chunk-5vzamjf6.js";import"./chunk-jgsgd6rt.js";import"./chunk-mj6fme15.js";import"./chunk-1680nbq4.js";import"./chunk-xvn3sv3v.js";import"./chunk-fxhvkenf.js";import"./chunk-e2m674vf.js";import"./chunk-vepc9rbt.js";import"./chunk-7q1yy18q.js";import"./chunk-0xgf3xgy.js";import"./chunk-31a8eh0j.js";import"./chunk-wweasgq9.js";import"./chunk-vdqa5gt7.js";import"./chunk-bk5ndwv3.js";import"./chunk-76japd6k.js";import"./chunk-865xvpp2.js";export{ul as clearComposableCache,ll as getComposableScript,Tr as listComposableModules};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Broadcast as s,BroadcastServer as h}from"ts-broadcasting";import{channel as
|
|
3
|
-
export{
|
|
2
|
+
import{Broadcast as s,BroadcastServer as h}from"ts-broadcasting";import{channel as Jc}from"ts-broadcasting";import{Broadcast as Yc,BroadcastServer as Zc}from"ts-broadcasting";var e=null,u=[];function Hc(){return e}async function Vc(n){if(e)return e;let t=n.driver??"bun",r=n.host??"0.0.0.0",c=n.port??6001,l=n.scheme??"ws",a={verbose:n.verbose??!1,driver:t,default:t,connections:{[t]:{driver:t,host:r,port:c,scheme:l}}};return e=new h(a),s.setServer(e),await e.start(),e}async function Uc(){for(let n of u)clearInterval(n);if(u.length=0,!e)return;await e.stop(),e=null}async function Wc(n){let t=await import(n),r=t.default??t;if(typeof r!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof r}`);let c=0;return r({channel(a,o){if(c++,o.authorize&&e)e.channels.channel(a,o.authorize);if(o.interval&&o.data){let d=o.event??`${a}.updated`,p=o.data,v=setInterval(async()=>{try{let g=await p();Bo(a,d,g)}catch{}},o.interval);u.push(v)}}}),c}var f=!1;function i(){if(e)return!0;if(!f)f=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function Bo(n,t,r){if(!i())return;s.send(n,t,r)}function qc(n,t,r){if(!i())return;s.toUser(n,t,r)}function Xc(n,t,r){if(!i())return;s.toUsers(n,t,r)}function Kc(n,t,r){if(!i())return;s.send(`private-${n}`,t,r)}function Gc(n,t,r){if(!i())return;s.presence(n,t,r)}
|
|
3
|
+
export{Hc,Vc,Uc,Wc,Bo,qc,Xc,Kc,Gc,Jc,Yc,Zc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{To,Hs,_o,Ro,Vs,Ao,Po,Io,Do,Us,Oo,Mc}from"./chunk-h8f18cc5.js";import{qs,Fo}from"./chunk-3f5td68v.js";import{L,j,B,Pt,G,se,xn,_e,ct,It,Dt,Ot,F,Mt,Nt,Sn}from"./chunk-vfdwvt23.js";import{ya}from"./chunk-3aqe7wy7.js";export{j as DEFAULT_FORMATS,B as DEFAULT_QUALITY,L as DEFAULT_WIDTHS,Sn as ImageProcessingError,Ro as clearImageCache,Vs as createImageDirective,Fo as createImageHandler,Po as createImagePlugin,Mc as defaultImageConfig,Nt as formatSize,Us as generateImageManifest,ct as generateSizes,_e as generateSrcSet,It as getFallbackVariant,xn as getImageMetadata,F as getMimeType,Mt as getTotalSize,Dt as groupVariantsByFormat,qs as handleImageRequest,Ao as imageDirective,G as isImageBackendAvailable,Ot as isImageFile,Pt as isSharpAvailable,Do as optimizeDirectory,Io as optimizeImage,Hs as parseImageComponent,se as processImage,_o as processImageComponents,To as renderImageComponent,ya as rewriteImagesWithSiblings,Oo as writeImageManifest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{existsSync as g,statSync as p}from"fs";import e from"path";var w=/[*?[\]{}]/;function
|
|
3
|
-
export{
|
|
2
|
+
import{existsSync as g,statSync as p}from"fs";import e from"path";var w=/[*?[\]{}]/;function bc(o){return w.test(o)}async function us(o,n={}){let i=n.cwd??process.cwd(),u=n.recursive!==!1,l=n.ignorePaths??[],c=globalThis.Bun.Glob,a=new Set,r=(t)=>{if(t.includes(`${e.sep}node_modules${e.sep}`)||t.includes(`${e.sep}dist${e.sep}`))return;if(l.some((s)=>s&&t.includes(e.normalize(s))))return;a.add(t)},d=async(t)=>{try{for await(let s of new c(t).scan({cwd:i,absolute:!0}))r(s)}catch{}};for(let t of o){if(!t)continue;if(bc(t)){await d(t);continue}let s=e.resolve(i,t);if(!g(s))continue;if(p(s).isDirectory()){for await(let f of new c(u?"**/*.stx":"*.stx").scan({cwd:s,absolute:!0}))r(f);continue}r(s)}return[...a].sort()}
|
|
3
|
+
export{bc,us};
|
|
@@ -159,7 +159,7 @@ else {
|
|
|
159
159
|
stxIslands.initIslands();
|
|
160
160
|
}
|
|
161
161
|
})();
|
|
162
|
-
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function
|
|
162
|
+
</script>`}function b(e){let t=e.match(/<([A-Z][a-zA-Z0-9]+)[\s/>]/);if(t)return t[1];let n=e.match(/<([a-z][a-z0-9]*-[a-z0-9-]+)[\s/>]/);if(n)return n[1];return null}function w(e,t){let n={},r=/:([a-zA-Z_][\w-]*)\s*=\s*"([^"]+)"/g,i;while((i=r.exec(e))!==null){let d=i[1],o=i[2];if(o in t)n[d]=t[o];else n[d]=o}return n}function ra(){let e=new Map;return{islands:e,register(t){e.set(t.id,t)},get(t){return e.get(t)},async hydrate(t){let n=e.get(t);if(!n||n.hydrated)return;if(n.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:t,component:n.component}}))},async hydrateAll(){let t=Array.from(e.values()).filter((n)=>!n.hydrated).map((n)=>this.hydrate(n.id));await Promise.all(t)}}}function I(e){return`
|
|
163
163
|
<script data-hydrate="${e}">
|
|
164
164
|
(function() {
|
|
165
165
|
const island = document.querySelector('[data-island="${e}"]');
|
|
@@ -311,7 +311,7 @@ else {
|
|
|
311
311
|
});
|
|
312
312
|
})();
|
|
313
313
|
</script>
|
|
314
|
-
`}function
|
|
314
|
+
`}function sa(e,t={},n){let r=e,i=!1,d=/@client:(load|idle|visible|media|only|hover|event)/i.test(e);if(r=u(r,"load",t),r=u(r,"idle",t),r=u(r,"visible",t),r=u(r,"media",t),r=M(r),r=u(r,"hover",t),r=u(r,"event",t),i=d&&r!==e,i)r+=`
|
|
315
315
|
`+v();return r}function u(e,t,n){let r=new RegExp(`@client:${t}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return e.replace(r,(i,d,o)=>{let a={strategy:t};if(d)try{let E=d.split(",").map((h)=>h.trim());for(let h of E){let[m,g]=h.split(":").map((p)=>p.trim());if(m&&g){let p=g.replace(/^['"]|['"]$/g,"");a[m]=p}}}catch{}let s=`island-${Math.random().toString(36).substring(2,9)}`,y=b(o.trim()),f=w(o.trim(),n),c=[];if(a.rootMargin)c.push(`data-root-margin="${a.rootMargin}"`);if(a.threshold!==void 0)c.push(`data-threshold="${a.threshold}"`);if(a.media)c.push(`data-media="${a.media}"`);if(a.event)c.push(`data-event="${a.event}"`);if(y)c.push(`data-component="${y}"`);let x=Object.keys(f).length>0?`
|
|
316
316
|
<script type="application/json" data-island-props="${s}">${JSON.stringify(f)}</script>`:"",l="";switch(t){case"load":l=I(s);break;case"idle":l=L(s,a);break;case"visible":l=C(s,a);break;case"media":l=S(s,a);break;case"hover":l=k(s);break;case"event":l=H(s,a);break}return`
|
|
317
317
|
<div data-island="${s}"
|
|
@@ -342,7 +342,7 @@ else {
|
|
|
342
342
|
}
|
|
343
343
|
})();
|
|
344
344
|
</script>
|
|
345
|
-
`})}function
|
|
345
|
+
`})}function ia(){return`
|
|
346
346
|
/* Island base styles */
|
|
347
347
|
.stx-island {
|
|
348
348
|
display: contents;
|
|
@@ -383,9 +383,9 @@ else {
|
|
|
383
383
|
.stx-island.hydrated {
|
|
384
384
|
opacity: 1;
|
|
385
385
|
}
|
|
386
|
-
`}function
|
|
386
|
+
`}function oa(e){if(typeof window>"u")return;let t=document.querySelector(`[data-island="${e}"]`);if(!t||t.classList.contains("hydrated"))return;t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function aa(e){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${e}"]:not(.hydrated)`).forEach((n)=>{n.classList.add("hydrated"),n.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function ca(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((t)=>{t.classList.add("hydrated"),t.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function la(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function ua(e){return new Promise((t)=>{if(typeof window>"u"){t();return}let n=document.querySelector(`[data-island="${e}"]`);if(!n){t();return}if(n.classList.contains("hydrated")){t();return}n.addEventListener("stx:hydrated",()=>t(),{once:!0})})}function da(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function pa(e){let t=e.map((n)=>({id:n.id,component:n.component,strategy:n.options.strategy,props:n.props}));return`
|
|
387
387
|
<script type="application/json" id="stx-island-manifest">
|
|
388
388
|
${JSON.stringify(t)}
|
|
389
389
|
</script>
|
|
390
|
-
`}var
|
|
391
|
-
export{
|
|
390
|
+
`}var ol={processPartialHydrationDirectives:sa,processStaticDirectives:da,generatePartialHydrationCSS:ia,generateIslandManifest:pa,createIslandRegistry:ra,hydrateIsland:oa,hydrateByStrategy:aa,hydrateAll:ca,isHydrated:la,onHydrated:ua};
|
|
391
|
+
export{ra,sa,ia,oa,aa,ca,la,ua,da,pa,ol};
|