@stacksjs/stx 0.2.607 → 0.2.612
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-07rryvyt.js +2 -0
- package/dist/chunk-0dkd5z22.js +2 -0
- package/dist/chunk-0fgp13q4.js +2 -0
- package/dist/chunk-0hpng9by.js +2 -0
- package/dist/chunk-0nfysn6e.js +2 -0
- package/dist/{chunk-dxqwm8tr.js → chunk-0s6shhb3.js} +5 -5
- package/dist/chunk-0vmwp37n.js +2 -0
- package/dist/chunk-0x72g1jn.js +2 -0
- package/dist/{chunk-6xsm53pz.js → chunk-0zx1400y.js} +4 -4
- package/dist/{chunk-5j29466h.js → chunk-13xvn7vh.js} +2 -2
- package/dist/chunk-15wmzj8j.js +2 -0
- package/dist/{chunk-azpkje69.js → chunk-1c0zvjt3.js} +34 -10
- package/dist/chunk-1p7v0ytv.js +2 -0
- package/dist/{chunk-6by8dtan.js → chunk-1q06tw66.js} +2 -2
- package/dist/{chunk-sswjv8p9.js → chunk-2bcp699b.js} +2 -2
- package/dist/chunk-32y8adx3.js +2 -0
- package/dist/chunk-34a1jdhq.js +3 -0
- package/dist/{chunk-tydv84gj.js → chunk-34tbh570.js} +2 -2
- package/dist/chunk-3fb3m640.js +2 -0
- package/dist/chunk-3njhzgqa.js +2 -0
- package/dist/{chunk-jsktg3ab.js → chunk-45gz1yff.js} +5 -5
- package/dist/{chunk-r69jfs59.js → chunk-4h62y8dn.js} +1 -1
- package/dist/{chunk-y54fz9rk.js → chunk-4rtxkqwh.js} +2 -2
- package/dist/{chunk-bspryr4a.js → chunk-4x5zryhk.js} +9 -9
- package/dist/chunk-5003ncbh.js +2 -0
- package/dist/chunk-514ykzna.js +2 -0
- package/dist/{chunk-dmdhbwmn.js → chunk-58s20ceb.js} +3 -3
- package/dist/chunk-5fa9g7x1.js +2850 -0
- package/dist/{chunk-td30jg06.js → chunk-5fxh7fc3.js} +2 -2
- package/dist/{chunk-s4pjf2pc.js → chunk-5rtatjwq.js} +2 -2
- package/dist/{chunk-1jxdkp8x.js → chunk-5vs12p6m.js} +6 -6
- package/dist/{chunk-bsy8v1xj.js → chunk-66e4ga0z.js} +3 -3
- package/dist/chunk-6fmcs19t.js +18 -0
- package/dist/chunk-6jjbmfy0.js +2 -0
- package/dist/chunk-6pg74bkj.js +2 -0
- package/dist/{chunk-20k77e2a.js → chunk-6rd762vj.js} +4 -4
- package/dist/chunk-6ta850w8.js +3 -0
- package/dist/{chunk-81qmj3sd.js → chunk-6w0h6vpd.js} +7 -7
- package/dist/chunk-6yn7pc5s.js +2 -0
- package/dist/{chunk-y8h823cb.js → chunk-74j18qk0.js} +28 -28
- package/dist/chunk-792sscsk.js +2 -0
- package/dist/chunk-7ed685cs.js +2 -0
- package/dist/chunk-7mee8bte.js +2 -0
- package/dist/chunk-7mgbh13b.js +2 -0
- package/dist/chunk-7yjyzzcp.js +2 -0
- package/dist/{chunk-qh07a85k.js → chunk-83h5ydvw.js} +3 -3
- package/dist/chunk-851cd8sc.js +2 -0
- package/dist/{chunk-td5100fz.js → chunk-8dq3r6xw.js} +7 -7
- package/dist/{chunk-t9t66sz4.js → chunk-8jqdb1qr.js} +6 -6
- package/dist/{chunk-60wedefh.js → chunk-8n306p92.js} +2 -2
- package/dist/chunk-8vdsewsa.js +43 -0
- package/dist/chunk-8xp2r8s0.js +2 -0
- package/dist/{chunk-tbsjg23k.js → chunk-970j89r5.js} +4 -4
- package/dist/chunk-97ht3bw3.js +2 -0
- package/dist/{chunk-wzjf33es.js → chunk-99rfdydy.js} +2 -2
- package/dist/{chunk-1dd4qefr.js → chunk-adn5r0r4.js} +2 -2
- package/dist/{chunk-efy3038a.js → chunk-azj2cj8h.js} +2 -2
- package/dist/chunk-be89da2e.js +2 -0
- package/dist/chunk-bemx44n4.js +2 -0
- package/dist/{chunk-53y4z4p2.js → chunk-bgcn01mr.js} +3 -3
- package/dist/{chunk-vntpfbwy.js → chunk-bm632aaj.js} +1 -1
- package/dist/{chunk-0cb00ys2.js → chunk-btcc95hq.js} +5 -5
- package/dist/{chunk-x8q5przn.js → chunk-c9jav70j.js} +11 -11
- package/dist/chunk-cg8hg6cs.js +3 -0
- package/dist/chunk-cxv6mhky.js +2 -0
- package/dist/{chunk-cfpenvc7.js → chunk-d16jgsyv.js} +3 -3
- package/dist/{chunk-z2xrwmjr.js → chunk-d5nxsg1p.js} +11 -11
- package/dist/{chunk-yzj55rfs.js → chunk-dcs87qta.js} +3 -3
- package/dist/{chunk-vp3fzjsc.js → chunk-det49x62.js} +2 -2
- package/dist/{chunk-8fq6bvnw.js → chunk-ej2ka6g6.js} +33 -33
- package/dist/chunk-ejqt0kh2.js +2 -0
- package/dist/chunk-ekd11w9t.js +2 -0
- package/dist/chunk-ekfmad19.js +2 -0
- package/dist/{chunk-m9h7pmkh.js → chunk-ewmpbxhv.js} +5 -5
- package/dist/{chunk-jpxekhdh.js → chunk-f6pjf3tb.js} +3 -3
- package/dist/chunk-f8kh3s0k.js +2 -0
- package/dist/chunk-fdkr055a.js +2 -0
- package/dist/{chunk-aestp72s.js → chunk-frvn6psn.js} +2 -2
- package/dist/{chunk-ev6w9c69.js → chunk-g18pwk0t.js} +1 -1
- package/dist/chunk-g8hwrejy.js +2 -0
- package/dist/chunk-gmqr7v81.js +2 -0
- package/dist/chunk-h476qqq9.js +2 -0
- package/dist/chunk-h94znyac.js +2 -0
- package/dist/chunk-hjp38m0w.js +3 -0
- package/dist/{chunk-z8fhtym2.js → chunk-hw97qw4k.js} +2 -2
- package/dist/{chunk-tcd2zez3.js → chunk-j18z5nxq.js} +2 -2
- package/dist/chunk-j2gvr4n6.js +2 -0
- package/dist/{chunk-mvwcf4xy.js → chunk-j4smj8cr.js} +4 -4
- package/dist/{chunk-r4h8fg1x.js → chunk-j6nn0c5r.js} +1 -1
- package/dist/chunk-j7vjfzjx.js +2 -0
- package/dist/chunk-j9pcvc0z.js +2 -0
- package/dist/chunk-jahkmmhh.js +2 -0
- package/dist/{chunk-vw62fjpv.js → chunk-jbaedjyk.js} +3 -3
- package/dist/{chunk-79edpvb2.js → chunk-jskaacqy.js} +7 -7
- package/dist/chunk-jx1p2eza.js +2 -0
- package/dist/chunk-k1hpxgzq.js +40 -0
- package/dist/{chunk-c65q0svd.js → chunk-ktg9khmj.js} +5 -5
- package/dist/{chunk-w8g2ppnr.js → chunk-kwfwc32d.js} +2 -2
- package/dist/chunk-m4k7f63m.js +2 -0
- package/dist/chunk-mfh61qdr.js +127 -0
- package/dist/chunk-mg9931y0.js +2 -0
- package/dist/{chunk-rmv35cx0.js → chunk-mm8jdb4p.js} +2 -2
- package/dist/chunk-mtm39290.js +2 -0
- package/dist/{chunk-0v89nfz1.js → chunk-n1zyt21h.js} +2 -2
- package/dist/chunk-n4z6evey.js +2 -0
- package/dist/{chunk-bhf9yt2w.js → chunk-nmh4pn44.js} +2 -2
- package/dist/chunk-pjh4kftn.js +2 -0
- package/dist/chunk-pjqrcbtt.js +2 -0
- package/dist/{chunk-vehtypx0.js → chunk-q3a13hvc.js} +2 -2
- package/dist/{chunk-dnqq1ze0.js → chunk-q4t49t6z.js} +3 -3
- package/dist/{chunk-g63ye3fe.js → chunk-qh3b1w7q.js} +2 -2
- package/dist/{chunk-77kpsnf6.js → chunk-qkczk53w.js} +87 -87
- package/dist/{chunk-kxjd6e2h.js → chunk-qxr7e0y2.js} +2 -2
- package/dist/{chunk-67tpacz0.js → chunk-qzfq8342.js} +1 -1
- package/dist/chunk-rbwhdwa9.js +2 -0
- package/dist/{chunk-4tj0ap61.js → chunk-s43pj9n6.js} +5 -5
- package/dist/chunk-spkwmfbm.js +2 -0
- package/dist/chunk-swv69q75.js +4 -0
- package/dist/chunk-t535swnv.js +2 -0
- package/dist/{chunk-ktvr45qg.js → chunk-t61vdbje.js} +6 -6
- package/dist/chunk-t9pnkbg6.js +2 -0
- package/dist/{chunk-cp901m61.js → chunk-tawfv519.js} +1 -1
- package/dist/{chunk-xjxc4q3w.js → chunk-th4x1wbc.js} +21 -21
- package/dist/chunk-trah2z70.js +2 -0
- package/dist/{chunk-k3f4044e.js → chunk-twmq5m6r.js} +2 -2
- package/dist/{chunk-wqmm1qsz.js → chunk-vbzpc1yz.js} +5 -5
- package/dist/chunk-vrnb2xat.js +2 -0
- package/dist/{chunk-ghdyqt98.js → chunk-wn3d4gd6.js} +2 -2
- package/dist/{chunk-tfjcs55e.js → chunk-wy93yhce.js} +12 -12
- package/dist/{chunk-7095f0hb.js → chunk-x7jmchd5.js} +9 -9
- package/dist/chunk-xncqjkjm.js +2 -0
- package/dist/chunk-xq9f9ftz.js +2 -0
- package/dist/chunk-xv9qre1x.js +2 -0
- package/dist/{chunk-5e182xqt.js → chunk-xz7h73ra.js} +1 -1
- package/dist/{chunk-g04y5wyn.js → chunk-z83p4bme.js} +4 -4
- package/dist/chunk-zar7fhqr.js +2 -0
- package/dist/chunk-zhe35k6k.js +2 -0
- package/dist/{chunk-5s47qfp6.js → chunk-zsqfvwwf.js} +2 -2
- package/dist/chunk-zy266h8p.js +2 -0
- package/dist/cli.js +46 -46
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/expressions.d.ts +0 -23
- package/dist/expressions.js +14 -11
- package/dist/includes.js +6 -0
- package/dist/loops.js +4 -3
- package/dist/native/compiler/component-mapping.js +1 -0
- package/dist/native/compiler/headwind-to-style.js +17 -0
- package/dist/native/compiler/html-to-ir.js +1 -0
- package/dist/native/compiler/inline-style.js +2 -0
- package/dist/native/compiler/ir.d.ts +2 -0
- package/dist/native/components/primitives.d.ts +33 -9
- package/dist/native/components/primitives.js +1 -0
- package/dist/native/primitives/MapPolygon.stx +2 -0
- package/dist/native/prop-names.js +1 -3
- package/dist/native/runtime/craft-bridge.js +22 -1
- package/dist/native/runtime/craft.d.ts +10 -0
- package/dist/process.js +3 -2
- package/dist/pwa.js +3 -3
- package/dist/safe-evaluator.d.ts +16 -0
- package/dist/safe-evaluator.js +10 -4
- package/dist/script-validation.js +4 -4
- package/dist/serve.js +5 -1
- package/dist/ssg.js +13 -13
- package/dist/utils.js +15 -2
- package/package.json +5 -5
- package/dist/chunk-06wv8qwy.js +0 -40
- package/dist/chunk-0d6b3eeb.js +0 -2
- package/dist/chunk-0mgth7cm.js +0 -2
- package/dist/chunk-1fdrhfc0.js +0 -2
- package/dist/chunk-2n59ahd9.js +0 -2
- package/dist/chunk-2pwjnydp.js +0 -2
- package/dist/chunk-2r4an7bh.js +0 -2
- package/dist/chunk-304vaxnk.js +0 -2
- package/dist/chunk-32hr3qq7.js +0 -2
- package/dist/chunk-36n8yz6t.js +0 -2
- package/dist/chunk-39pgf5z3.js +0 -2
- package/dist/chunk-3xwzd9wp.js +0 -2845
- package/dist/chunk-3yttgk0s.js +0 -2
- package/dist/chunk-4ck2xc8m.js +0 -2
- package/dist/chunk-4jasfhh6.js +0 -2
- package/dist/chunk-4szajb1z.js +0 -2
- package/dist/chunk-61ztfana.js +0 -127
- package/dist/chunk-7f63z4xx.js +0 -2
- package/dist/chunk-7renf4zp.js +0 -2
- package/dist/chunk-8bzx0r0x.js +0 -2
- package/dist/chunk-974dxazw.js +0 -2
- package/dist/chunk-9fpnnfr3.js +0 -2
- package/dist/chunk-9sgt7v77.js +0 -2
- package/dist/chunk-9zzhpp2a.js +0 -2
- package/dist/chunk-aan7601v.js +0 -2
- package/dist/chunk-b4tbqz8r.js +0 -2
- package/dist/chunk-bakxqwnz.js +0 -2
- package/dist/chunk-be2kmw0p.js +0 -2
- package/dist/chunk-bnpb6ez9.js +0 -2
- package/dist/chunk-c48mh4d6.js +0 -18
- package/dist/chunk-dzbkgsv8.js +0 -4
- package/dist/chunk-ewkza45r.js +0 -2
- package/dist/chunk-exd1h9sd.js +0 -2
- package/dist/chunk-fcgf8d5k.js +0 -2
- package/dist/chunk-gw2dvp35.js +0 -2
- package/dist/chunk-h9drxwva.js +0 -2
- package/dist/chunk-hrr7k1qc.js +0 -2
- package/dist/chunk-j04brkj0.js +0 -2
- package/dist/chunk-jbvwg4gs.js +0 -2
- package/dist/chunk-jshj69dy.js +0 -2
- package/dist/chunk-k4wkfhvz.js +0 -2
- package/dist/chunk-km9a5gp4.js +0 -2
- package/dist/chunk-m95zjk91.js +0 -3
- package/dist/chunk-mgj0ngyq.js +0 -2
- package/dist/chunk-myqhdz1w.js +0 -2
- package/dist/chunk-n35yc890.js +0 -3
- package/dist/chunk-n39ezmxz.js +0 -2
- package/dist/chunk-n8eavnxf.js +0 -2
- package/dist/chunk-p8sv5fqs.js +0 -2
- package/dist/chunk-pghtgep5.js +0 -2
- package/dist/chunk-pt7e0be5.js +0 -2
- package/dist/chunk-q40ahbjs.js +0 -2
- package/dist/chunk-qjxxhdv7.js +0 -2
- package/dist/chunk-rp93n4z7.js +0 -3
- package/dist/chunk-rrw2jg26.js +0 -2
- package/dist/chunk-rxja040z.js +0 -2
- package/dist/chunk-sx0qbekt.js +0 -2
- package/dist/chunk-t83acmv2.js +0 -2
- package/dist/chunk-tc176d93.js +0 -2
- package/dist/chunk-wjhhb6dn.js +0 -2
- package/dist/chunk-wm8w2721.js +0 -2
- package/dist/chunk-wtax276j.js +0 -2
- package/dist/chunk-wy53pys4.js +0 -43
- package/dist/chunk-x49qdt4c.js +0 -2
- package/dist/chunk-y0zyzbjf.js +0 -2
- package/dist/chunk-yn2d8x8m.js +0 -3
- package/dist/chunk-z8mdsjzw.js +0 -2
- package/dist/chunk-zg87pybq.js +0 -2
- package/dist/chunk-zq345s76.js +0 -2
- package/dist/chunk-zs3ezqy3.js +0 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{H}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{H}from"./chunk-34a1jdhq.js";import R from"fs";import g from"path";import C from"crypto";var S=new Set(["webp","avif","jpeg","png"]),T=new Set(["cover","contain","fill","inside","outside"]),q=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),k=4096,D=80,U="cover";async function Do(e,t){let r=t.routePath??"/_stx/img",h=new URL(e.url);if(h.pathname!==r)return null;let a=A(h,t);if(!a.ok)return new Response(a.error,{status:a.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:n,srcUrl:d,width:l,height:i,format:s,quality:u,fit:c}=a,m;try{m=R.statSync(n)}catch{return new Response(`Source image not found: ${d}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!m.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let w=t.cacheDir??".stx/cache/img";await R.promises.mkdir(w,{recursive:!0});let b=`${n}:${m.mtimeMs}:${m.size}`,I=`${l}x${i}:${s}:${u}:${c}`,f=C.createHash("sha256").update(`${b}|${I}`).digest("hex").slice(0,16),o=g.join(w,`${f}.${s}`),p={"Content-Type":H(s),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${f}"`,"X-Stx-Image-Cache":"HIT"};if(e.headers.get("if-none-match")===`"${f}"`)return new Response(null,{status:304,headers:p});let v=Bun.file(o);if(await v.exists())return new Response(v,{headers:p});try{let x=Buffer.from(await Bun.file(n).arrayBuffer()),{resizeAndConvert:P}=await L(),F=await P(x,{width:l,height:i,format:s,quality:u,fit:c});return await Bun.write(o,F),p["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(F),{headers:p})}catch(x){let P=x.message;return new Response(`Image processing failed: ${P}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function Ea(e){return async(t)=>await Do(t,e)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}function A(e,t){let r=e.searchParams.get("src");if(!r)return{ok:!1,error:"Missing required param: src",status:400};if(!r.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(r.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let h=g.extname(r).toLowerCase();if(!q.has(h))return{ok:!1,error:`Unsupported source extension: ${h}`,status:400};let a=g.resolve(t.publicDir),n=g.resolve(a,r.slice(1));if(!n.startsWith(`${a}${g.sep}`)&&n!==a)return{ok:!1,error:"src is outside publicDir",status:400};let d=t.maxWidth??k,l=t.maxHeight??k,i=e.searchParams.get("w"),s=e.searchParams.get("h"),u=i?Number.parseInt(i,10):0,c=s?Number.parseInt(s,10):0;if(i&&(!Number.isFinite(u)||u<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(s&&(!Number.isFinite(c)||c<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!i&&!s)return{ok:!1,error:"At least one of w or h is required",status:400};let m=Math.min(u||d,d),w=Math.min(c||l,l),b=e.searchParams.get("f")||"webp";if(!S.has(b))return{ok:!1,error:`Invalid f (must be one of: ${[...S].join(", ")})`,status:400};let I=b,f=e.searchParams.get("q"),o=f?Number.parseInt(f,10):t.defaultQuality??D;if(!Number.isFinite(o)||o<1||o>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let y=e.searchParams.get("fit")||t.defaultFit||U;if(!T.has(y))return{ok:!1,error:`Invalid fit (must be one of: ${[...T].join(", ")})`,status:400};return{ok:!0,srcFsPath:n,srcUrl:r,width:m,height:w,format:I,quality:o,fit:y}}async function L(){return await import("./chunk-ejqt0kh2.js")}
|
|
3
|
+
export{Do,Ea};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function t(n){if(!n||typeof n!=="object")return!1;let i=n;return typeof i.message==="string"&&(i.name==="BuildMessage"||i.name==="ResolveMessage"||("position"in i))}function o(n){if(n&&typeof n==="object"&&Array.isArray(n.errors))return n.errors;return[n]}function
|
|
2
|
+
function t(n){if(!n||typeof n!=="object")return!1;let i=n;return typeof i.message==="string"&&(i.name==="BuildMessage"||i.name==="ResolveMessage"||("position"in i))}function o(n){if(n&&typeof n==="object"&&Array.isArray(n.errors))return n.errors;return[n]}function hn(n,i){let e=[];for(let r of o(n)){if(t(r)){let s=r.position||void 0;e.push({file:i||s?.file,line:s?.line,column:s?.column,message:r.message??"",lineText:s?.lineText});continue}e.push({file:i,message:r instanceof Error?r.message:String(r)})}return e}function pe(n,i){return hn(n,i).map((e)=>{let r=e.file?`${e.file}${e.line?`:${e.line}${e.column?`:${e.column}`:""}`:""}`:"",s=e.lineText?`
|
|
3
3
|
${e.lineText.trim()}`:"";return r?`${r}: ${e.message}${s}`:`${e.message}${s}`}).join(`
|
|
4
|
-
`)}export{
|
|
4
|
+
`)}export{hn,pe};
|
|
@@ -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 Va(){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 Ua(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 Wa(){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 qa(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 Ga(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 Ka(){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 Xa(e){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${e}"]`)?.classList.contains("hydrated")??!1}function Ja(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 Ya(e){return e.replace(/@static\s*([\s\S]*?)@endstatic/gi,(t,n)=>`<div class="stx-static">${n.trim()}</div>`)}function Za(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 Yl={processPartialHydrationDirectives:Ua,processStaticDirectives:Ya,generatePartialHydrationCSS:Wa,generateIslandManifest:Za,createIslandRegistry:Va,hydrateIsland:qa,hydrateByStrategy:Ga,hydrateAll:Ka,isHydrated:Xa,onHydrated:Ja};
|
|
391
|
+
export{Va,Ua,Wa,qa,Ga,Ka,Xa,Ja,Ya,Za,Yl};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function
|
|
2
|
+
function I(s){let o=/import\s*\{([^}]+)\}\s*from\s*['"](@stores|stx\/stores)['"]\s*;?\n?/g;s=s.replace(o,(e,t)=>`const { ${t.split(",").map((r)=>r.trim()).filter(Boolean).join(", ")} } = window.__STX_STORES__
|
|
3
3
|
`);let n=/import\s*\{([^}]+)\}\s*from\s*['"]@composables['"]\s*;?\n?/g;return s=s.replace(n,(e,t)=>`const { ${t.split(",").map((r)=>r.trim()).filter(Boolean).join(", ")} } = window.__composables
|
|
4
|
-
`),s}function
|
|
5
|
-
export{
|
|
4
|
+
`),s}function Ut(s){return s.replace(/^import\s+[^'"]*?from\s*['"][^'"]+['"]\s*;?[ \t]*$/gm,"").replace(/^import\s+['"][^'"]+['"]\s*;?[ \t]*$/gm,"")}
|
|
5
|
+
export{I,Ut};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{rr,We,Se,ke,hi,ar,se,Z,_n,d,n,A}from"./chunk-5fa9g7x1.js";function h(o){return o.endsWith(".md")||o.endsWith(".markdown")}function _(o){let e=[];m(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];m(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function m(s,p){let u;while((u=s.exec(o))!==null){let t=u.index,i=t+u[0].length;if(p?.some((l)=>t>=l.start&&i<=l.end))continue;e.push({start:t,end:i})}}if(e.length===0)return o;e.sort((s,p)=>s.start-p.start);let a="",c=0;for(let s of e){if(s.start<c)continue;a+=o.slice(c,s.start),a+=`@raw${o.slice(s.start,s.end)}@endraw`,c=s.end}return a+=o.slice(c),a}async function b(o,e={}){let{data:r,content:m}=rr(o),c=await(e.renderer??((s)=>We(s)))(m);return{html:_(c),frontmatter:r??{}}}import{dirname as C,resolve as R}from"path";function k(o){let e=o,r=se(o);if(r)e=r.content.trim();let m=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,a=[],c=[],s=[],p=(i)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(i),u;while((u=m.exec(o))!==null){let i=u[1],l=u[2],f=u[0],g=i.includes("server");if(p(l))s.push(f);else if(g)c.push(l);else a.push(f)}let t=e;{let i=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,f=[];while((l=i.exec(t))!==null){let g=l.index+l[0].length,x=t.indexOf("</script>",g);if(x===-1)continue;f.push({start:l.index,end:x+9}),i.lastIndex=x+9}for(let g=f.length-1;g>=0;g--)t=t.substring(0,f[g].start)+t.substring(f[g].end)}for(let i of a)t=t.replace(i,"");return{templateContent:t,serverScripts:c,clientScripts:a,signalsScripts:s}}function v(o,e){return`<!DOCTYPE html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>${(e||"stx").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
${o}
|
|
11
|
+
</body>
|
|
12
|
+
</html>`}async function Yo(o,e={}){let r=R(o),m=Bun.file(r);if(!await m.exists())throw Error(`Template file not found: ${r}`);let a=await m.text(),c=null;if(h(r)){let s=await b(a,{renderer:e.markdownRenderer});a=s.html,c=s.frontmatter}if(c)e={...e,context:{...c,...e.context||{}}};if(e.layout){let s=R(e.layout),p=Bun.file(s);if(!await p.exists())throw Error(`Layout template not found: ${s}`);let{layout:u,injectCSS:t,...i}=e,l={...e.context||{}};_n(l);let f=await S(a,r,{...i,context:{...l,__stx_defer_server_data:!0},injectCSS:!1}),g=await p.text(),x={...l,content:f},w={...i,context:x,injectCSS:t};return S(g,s,w)}return S(a,r,e)}async function S(o,e,r={}){let{templateContent:m,serverScripts:a,clientScripts:c}=k(o),s={...A,...r.options},p={__filename:e,__dirname:C(e),__stx:{},__stx_options:s,__stx_sfc_mode:!0,__stx_inject_css:r.injectCSS===!0,__stxServeContext:void 0,...ar(r.context??{}),definePageMeta:()=>{},...r.context||{}};for(let i of a)await d(i,p,e);let u=new Set,t=m;if(t=await n(t,p,e,s,u),hi(p,r.context),r.templateOnly){if(t=t.replace(/<script data-stx-scoped>[\s\S]*?<\/script>\s*/gi,""),t=t.replace(/<!-- stx SEO Tags -->[\s\S]*?(?=<)/i,""),c.length>0)t+=`
|
|
13
|
+
${c.join(`
|
|
14
|
+
`)}`}else{if(r.processClientScripts!==!1&&c.length>0){let i=p.__stx_event_bindings||[],l=Se(p),g=(await Promise.all(c.map(async(w)=>{let y=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!y)return w;return await ke(y[1],{eventBindings:i,templateContent:t,serverData:l,filePath:e})}))).join(`
|
|
15
|
+
`);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${g}
|
|
16
|
+
$1`);else t+=`
|
|
17
|
+
${g}`}t=await Z(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=v(t,r.title)}if(r.injectCSS)try{let{injectCss:i}=await import("./chunk-5003ncbh.js");t=await i(t)}catch{}return t}
|
|
18
|
+
export{Yo};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{jr,wo,qn,Br,Fr,Gt,xt,xo,Gn,Kn,zr,Hr,vl,wl,je}from"./chunk-x7jmchd5.js";export{je as DeployError,wo as calculateSha1,qn as collectDeployFiles,Kn as createDefaultNetlifyConfig,Br as createFileManifest,jr as createNetlifyClient,vl as deploy,Gn as detectProjectConfig,Fr as filterRequiredFiles,Gt as formatSize,xo as generateNetlifyToml,xt as getTotalSize,Hr as hasNetlifyConfig,wl as initNetlify,zr as writeNetlifyConfig};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
function o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+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 o(t,i){let n=t[i],e=i+1;while(e<t.length){if(t[e]==="\\"){e+=2;continue}if(t[e]===n)return e+1;e++}return t.length}function b(t,i){let n=i+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=Fi(t,n+2),n<t.length)n++;continue}n++}return t.length}function Fi(t,i){let n=1,e=i,r="{",f="";while(e<t.length){let l=t[e];if(l==="\\"){e+=2;continue}if(l==='"'||l==="'"){e=o(t,e),r=h,f="";continue}if(l==="`"){e=b(t,e),r=h,f="";continue}if(l==="/"&&t[e+1]==="/"){while(e<t.length&&t[e]!==`
|
|
3
3
|
`)e++;continue}if(l==="/"&&t[e+1]==="*"){e+=2;while(e<t.length&&t.slice(e,e+2)!=="*/")e++;e+=2;continue}if(l==="/"&&a(r,f)){let u=w(t,e);if(u!==-1){e=u,r=h,f="";continue}}if(l==="{")n++;else if(l==="}"){if(n--,n===0)return e}if(/[\w$]/.test(l))f=/[\w$]/.test(r)?f+l:l,r=l;else if(!/\s/.test(l))r=l,f="";e++}return t.length}var m=new Set(["return","typeof","instanceof","in","of","new","delete","void","throw","case","do","else","yield","await"]);function a(t,i){if(i)return m.has(i);return!(t===")"||t==="]"||t===h)}var h="\x00";function w(t,i){let n=i+1,e=!1;while(n<t.length){let r=t[n];if(r===`
|
|
4
4
|
`)return-1;if(r==="\\"){n+=2;continue}if(r==="[")e=!0;else if(r==="]")e=!1;else if(r==="/"&&!e){n++;while(n<t.length&&/[a-z]/i.test(t[n]))n++;return n}n++}return-1}function s(t){let i="",n=0,e="",r="";while(n<t.length){let f=t.slice(n,n+2);if(f==="//"){while(n<t.length&&t[n]!==`
|
|
5
5
|
`)i+=" ",n++;continue}if(f==="/*"){while(n<t.length&&t.slice(n,n+2)!=="*/")i+=t[n]===`
|
|
6
6
|
`?`
|
|
7
7
|
`:" ",n++;i+=" ",n+=2;continue}let l=t[n];if(l==='"'||l==="'"){let u=l;i+=" ",n++;while(n<t.length&&t[n]!==u){if(t[n]==="\\"){i+=" ",n+=2;continue}i+=t[n]===`
|
|
8
8
|
`?`
|
|
9
|
-
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=
|
|
9
|
+
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(l==="/"&&a(e,r)){let u=w(t,n);if(u!==-1){i+=`/${" ".repeat(u-n-2)}/`,n=u,e=h,r="";continue}}if(l==="`"){i+=" ",n++;while(n<t.length&&t[n]!=="`"){if(t[n]==="\\"){i+=" ",n+=2;continue}if(t[n]==="$"&&t[n+1]==="{"){let u=n+2,g=Fi(t,u);if(i+=" ",i+=s(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
|
|
10
10
|
`?`
|
|
11
|
-
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(i+=l,n++,/[\w$]/.test(l))r=/[\w$]/.test(e)?r+l:l,e=l;else if(!/\s/.test(l))e=l,r=""}return i}function
|
|
12
|
-
export{
|
|
11
|
+
`:" ",n++}i+=" ",n++,e=h,r="";continue}if(i+=l,n++,/[\w$]/.test(l))r=/[\w$]/.test(e)?r+l:l,e=l;else if(!/\s/.test(l))e=l,r=""}return i}function $e(t){let i=new Uint16Array(t.length),n=0,e=!0;for(let r=0;r<t.length;r++){let f=t[r];if(f===")"||f==="]"||f==="}")if(n===0)e=!1;else n--;if(i[r]=n,f==="("||f==="["||f==="{")n++}return{depths:i,balanced:e&&n===0}}
|
|
12
|
+
export{Fi,s,$e};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import i from"path";var Ft=".stx",o="STX_DIR",e=null;function Ui(t){e=t?.trim()||null}function En(){return process.env[o]?.trim()||e||Ft}function a(t=process.cwd(),...n){let r=En();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function Tn(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==Ft&&!n.startsWith(`${Ft}/`))return t;let r=n.slice(Ft.length+1);return r?i.join(En(),r):En()}
|
|
3
|
+
export{Ft,Ui,En,a,Tn};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Ue}from"./chunk-970j89r5.js";function tr(e){let n=e.pwa;if(!n?.enabled)return"";let r=n.manifest,t=n.icons?.outputDir?`/${n.icons.outputDir}`:"/pwa-icons",o=Ue(e),i=`
|
|
3
3
|
<!-- stx PWA Meta Tags -->
|
|
4
4
|
<link rel="manifest" href="/manifest.json">
|
|
5
5
|
<meta name="theme-color" content="${a(r?.themeColor||"#000000")}">
|
|
@@ -43,12 +43,12 @@ if ('serviceWorker' in navigator) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
</script>
|
|
46
|
-
<!-- End stx PWA -->`,i}function
|
|
47
|
-
`+e.slice(o)}return e+
|
|
48
|
-
</head>`)}function
|
|
46
|
+
<!-- End stx PWA -->`,i}function as(e,n){let r=n.pwa;if(!r?.enabled||r.autoInject===!1)return e;if(e.includes("<!-- stx PWA Meta Tags -->"))return e;if(!e.includes("</head>")){let o=e.lastIndexOf("</body>");if(o!==-1){let i=tr(n);return e.slice(0,o)+i+`
|
|
47
|
+
`+e.slice(o)}return e+tr(n)}let t=tr(n);return e.replace("</head>",`${t}
|
|
48
|
+
</head>`)}function lc(e){if(!e.pwa?.enabled)return"";return`<script>
|
|
49
49
|
if ('serviceWorker' in navigator) {
|
|
50
50
|
window.addEventListener('load', function() {
|
|
51
|
-
navigator.serviceWorker.register('/${
|
|
51
|
+
navigator.serviceWorker.register('/${Ue(e)}')
|
|
52
52
|
.then(function(registration) {
|
|
53
53
|
console.log('[PWA] Service Worker registered:', registration.scope);
|
|
54
54
|
})
|
|
@@ -57,5 +57,5 @@ if ('serviceWorker' in navigator) {
|
|
|
57
57
|
});
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
</script>`}function
|
|
61
|
-
export{
|
|
60
|
+
</script>`}function dc(){return'<link rel="manifest" href="/manifest.json">'}function uc(e){return`<meta name="theme-color" content="${a(e)}">`}function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}
|
|
61
|
+
export{tr,as,lc,dc,uc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Bt,jc,Bc,Fc,zc,Hc,d,Vc,Ps,Uc,$i,Ri}from"./chunk-5fa9g7x1.js";import"./chunk-q4t49t6z.js";import"./chunk-99rfdydy.js";import"./chunk-0zx1400y.js";import"./chunk-adn5r0r4.js";import"./chunk-nmh4pn44.js";import"./chunk-8dq3r6xw.js";import"./chunk-c9jav70j.js";import"./chunk-k1hpxgzq.js";import"./chunk-66e4ga0z.js";import"./chunk-2bcp699b.js";import"./chunk-1c0zvjt3.js";import"./chunk-mm8jdb4p.js";export{Bt as STX_ENGINE_BINDING_NAMES,Ps as convertToCommonJS,$i as extractScriptFromTemplate,d as extractVariables,Ri as hasVariables,Vc as isCompleteImport,Hc as isMissingBindingFailure,Fc as isModuleResolutionFailure,zc as isSyntaxFailure,Uc as splitDeclaration,jc as stripTypeScript,Bc as withoutStxReferrer};
|