@stacksjs/stx 0.2.754 → 0.2.755
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-v49jajzw.js → chunk-024m1xmd.js} +6 -6
- package/dist/{chunk-c3vsnz9h.js → chunk-0dsykna3.js} +5 -5
- package/dist/{chunk-n3t2cd17.js → chunk-0dt7ax79.js} +2 -2
- package/dist/{chunk-qksbf2gt.js → chunk-0fweckq5.js} +6 -6
- package/dist/{chunk-yax8wz93.js → chunk-0md73jp8.js} +2 -2
- package/dist/{chunk-5hrm7rtx.js → chunk-0tgrqhkr.js} +12 -12
- package/dist/{chunk-p4h5c79q.js → chunk-0vvb78yj.js} +5 -5
- package/dist/{chunk-67z3kesf.js → chunk-1a2cwee1.js} +2 -2
- package/dist/chunk-1gan06yr.js +2 -0
- package/dist/chunk-1menbxwb.js +2 -0
- package/dist/chunk-1n2d3cy5.js +2 -0
- package/dist/{chunk-pnpd7gz7.js → chunk-1tmq09ch.js} +3 -3
- package/dist/{chunk-kyk4ekng.js → chunk-236bdf7y.js} +2 -2
- package/dist/chunk-2vc2pkyz.js +2 -0
- package/dist/chunk-33bp9m4c.js +2 -0
- package/dist/chunk-361yezje.js +2 -0
- package/dist/{chunk-7t9wj2m4.js → chunk-3ap06zzx.js} +1 -1
- package/dist/{chunk-c0v9ng82.js → chunk-3z38swhv.js} +7 -7
- package/dist/{chunk-02c0zcaw.js → chunk-41sq06t2.js} +2 -2
- package/dist/chunk-45cvagp1.js +2 -0
- package/dist/{chunk-9hfk5wf1.js → chunk-4fc8zs15.js} +5 -5
- package/dist/{chunk-jq6gggcz.js → chunk-4zta7ay1.js} +2 -2
- package/dist/{chunk-srjhnk6w.js → chunk-5evgz54v.js} +30 -30
- package/dist/chunk-5f0wwwmw.js +2 -0
- package/dist/chunk-5h71xbzk.js +2 -0
- package/dist/{chunk-1rxzn4yx.js → chunk-5q2tfrcw.js} +2 -2
- package/dist/{chunk-3yz7fafy.js → chunk-5wcgg5t4.js} +1 -1
- package/dist/chunk-5z9a1vzw.js +2 -0
- package/dist/chunk-67jf2e8x.js +2 -0
- package/dist/chunk-6b7je8dc.js +2 -0
- package/dist/chunk-6fxjs3ay.js +3 -0
- package/dist/chunk-6n5jnd97.js +2 -0
- package/dist/chunk-6wvnfdqq.js +2 -0
- package/dist/{chunk-6qtzwqgc.js → chunk-6ywa41tr.js} +2 -2
- package/dist/{chunk-vzn029zn.js → chunk-73b6sst8.js} +3 -3
- package/dist/chunk-78jkbaz3.js +2 -0
- package/dist/{chunk-g7shwb6q.js → chunk-7djnbbeb.js} +6 -6
- package/dist/chunk-7e9hfrtb.js +2 -0
- package/dist/{chunk-g1sqap6x.js → chunk-7mm5mvg0.js} +2 -2
- package/dist/{chunk-g019qe9x.js → chunk-7r5vhqtz.js} +4 -4
- package/dist/chunk-7tc5fj96.js +2 -0
- package/dist/{chunk-myr79xxf.js → chunk-7ycf8a8d.js} +2 -2
- package/dist/{chunk-r3v1zaj0.js → chunk-81ysx0tc.js} +2 -2
- package/dist/chunk-82q0fy52.js +2 -0
- package/dist/chunk-8q5ec4s1.js +2 -0
- package/dist/{chunk-ext2gx7h.js → chunk-8w0cwcvk.js} +81 -81
- package/dist/{chunk-1mra8ejy.js → chunk-8wbcy0cn.js} +3 -3
- package/dist/{chunk-tn6gp72a.js → chunk-8wbgq43c.js} +3 -3
- package/dist/chunk-8ysk095d.js +2 -0
- package/dist/{chunk-hnzfzm0k.js → chunk-90gx5qxn.js} +4 -4
- package/dist/{chunk-h7y2pmd9.js → chunk-9q1kkfv1.js} +6 -6
- package/dist/{chunk-hc6m2t92.js → chunk-9r3ehqtx.js} +2 -2
- package/dist/chunk-9vbrj55v.js +2 -0
- package/dist/chunk-bcefawtc.js +2 -0
- package/dist/chunk-bd6s91p9.js +2 -0
- package/dist/chunk-bhkqzz91.js +2 -0
- package/dist/{chunk-36yq547r.js → chunk-bkkwdh13.js} +2 -2
- package/dist/chunk-bx1mjwhb.js +2 -0
- package/dist/{chunk-bd4c8af4.js → chunk-c3dphs36.js} +1 -1
- package/dist/{chunk-rt5as4t6.js → chunk-c85j39f7.js} +3 -3
- package/dist/{chunk-snfmgp7a.js → chunk-cb4ybh7g.js} +4 -4
- package/dist/{chunk-41yjah34.js → chunk-cmaxdd8d.js} +2 -2
- package/dist/{chunk-amwxbvdp.js → chunk-d2vsw1j7.js} +2 -2
- package/dist/{chunk-t9zvpsn7.js → chunk-d73hh5ar.js} +1 -1
- package/dist/{chunk-rzqd4t77.js → chunk-df8cbgf0.js} +2 -2
- package/dist/{chunk-8mkxge3a.js → chunk-dvakr9p9.js} +4 -4
- package/dist/chunk-dw0m259e.js +2 -0
- package/dist/chunk-dx4g2ec9.js +2 -0
- package/dist/chunk-evdskc25.js +2 -0
- package/dist/{chunk-neh3kewg.js → chunk-fa3ygt8c.js} +4 -4
- package/dist/{chunk-7p9nczea.js → chunk-fmxtnva8.js} +2 -2
- package/dist/{chunk-k7p9wkw3.js → chunk-fxftc455.js} +2 -2
- package/dist/{chunk-f66c2nzj.js → chunk-g223zsce.js} +3 -3
- package/dist/{chunk-vfe8xj8g.js → chunk-g22absm0.js} +2 -2
- package/dist/{chunk-dg1h0d9r.js → chunk-g45p4y4v.js} +3 -3
- package/dist/{chunk-6j2h3vf1.js → chunk-g5sctfwa.js} +10 -10
- package/dist/chunk-gppv6fez.js +2 -0
- package/dist/chunk-grjr8shp.js +2 -0
- package/dist/chunk-gz1w4cpp.js +2 -0
- package/dist/chunk-gzbmfwxr.js +42 -0
- package/dist/chunk-h0qtmmq3.js +2 -0
- package/dist/{chunk-tqp1pg1k.js → chunk-h6sewvt2.js} +4 -4
- package/dist/chunk-hb34m4pp.js +2 -0
- package/dist/chunk-hwvtpx3p.js +2 -0
- package/dist/{chunk-312jcg9x.js → chunk-j2hm8v8b.js} +4 -4
- package/dist/{chunk-8kdk28b4.js → chunk-j3d9zknp.js} +6 -6
- package/dist/{chunk-m8jfjzwb.js → chunk-j5p191zq.js} +7 -7
- package/dist/chunk-k3kav39s.js +2 -0
- package/dist/chunk-k46j2maz.js +2 -0
- package/dist/{chunk-mdsrnd6s.js → chunk-k4dn3ry6.js} +4 -4
- package/dist/{chunk-6268m3ss.js → chunk-k9m36nyw.js} +5 -5
- package/dist/chunk-ka2f844k.js +2 -0
- package/dist/chunk-kh4dr6gd.js +2 -0
- package/dist/{chunk-cnqhxt5y.js → chunk-kjfzkac7.js} +7 -7
- package/dist/{chunk-v4dswyqt.js → chunk-m0shnhth.js} +3 -3
- package/dist/{chunk-qeh8f4bk.js → chunk-m6w75sq2.js} +2 -2
- package/dist/{chunk-8ckjb7w8.js → chunk-mpmx0n3q.js} +28 -28
- package/dist/chunk-myd82d80.js +2 -0
- package/dist/chunk-nek0q523.js +130 -0
- package/dist/{chunk-4nmb776w.js → chunk-nmy72s6r.js} +2 -2
- package/dist/{chunk-pew1jk57.js → chunk-np8knskz.js} +1 -1
- package/dist/{chunk-5s8bt976.js → chunk-nsjkmpjf.js} +1 -1
- package/dist/chunk-nvbjcgzd.js +2 -0
- package/dist/{chunk-664tnv9e.js → chunk-nzy4set0.js} +5 -5
- package/dist/chunk-p13dxvaj.js +2 -0
- package/dist/{chunk-6fhcmg96.js → chunk-p2v0r96k.js} +2 -2
- package/dist/{chunk-qn580gr9.js → chunk-p33w8zst.js} +3 -3
- package/dist/chunk-pht5z7wa.js +2 -0
- package/dist/{chunk-x2w2m5fs.js → chunk-ppvdbstz.js} +3 -3
- package/dist/chunk-pwdk7jbx.js +2 -0
- package/dist/{chunk-ecf9tftk.js → chunk-pydmzvpq.js} +1 -1
- package/dist/{chunk-ftk2jdg8.js → chunk-q0f28539.js} +2 -2
- package/dist/chunk-qekyxjy6.js +2 -0
- package/dist/{chunk-fgg1stc0.js → chunk-qpb80r4b.js} +2 -2
- package/dist/{chunk-smpb39kv.js → chunk-qxrsm48h.js} +5 -5
- package/dist/chunk-r10eadgn.js +2 -0
- package/dist/chunk-r8184e10.js +2 -0
- package/dist/{chunk-n3g8fy3f.js → chunk-rshaz0df.js} +1 -1
- package/dist/{chunk-r6s35xw9.js → chunk-sj2a5twe.js} +2 -2
- package/dist/chunk-tcrpa52j.js +2 -0
- package/dist/{chunk-t6d7t825.js → chunk-thr1m7k7.js} +18 -18
- package/dist/{chunk-jk1kg30f.js → chunk-txgd0sj1.js} +5 -5
- package/dist/{chunk-tary163t.js → chunk-v0s52tmv.js} +2 -2
- package/dist/{chunk-fvbgbmm4.js → chunk-vc4jww9y.js} +13 -13
- package/dist/chunk-vp1p250v.js +2 -0
- package/dist/{chunk-mcdwjq8t.js → chunk-vpa4xzz3.js} +1 -1
- package/dist/chunk-vqrg5j83.js +2 -0
- package/dist/chunk-vzdfq3b5.js +2 -0
- package/dist/chunk-wzh4ene8.js +2 -0
- package/dist/{chunk-9rwqhrgw.js → chunk-x5sy0tym.js} +6 -6
- package/dist/chunk-x5vwkccx.js +2 -0
- package/dist/chunk-x6cmj5sa.js +2 -0
- package/dist/chunk-xnrfz4c3.js +2 -0
- package/dist/{chunk-5bkha4ej.js → chunk-xrzghjvy.js} +2 -2
- package/dist/{chunk-evpyaw33.js → chunk-xzz36k99.js} +2 -2
- package/dist/chunk-yaabhcss.js +2 -0
- package/dist/chunk-yazqtmq4.js +2 -0
- package/dist/{chunk-178recpt.js → chunk-yd2nj0rv.js} +1 -1
- package/dist/{chunk-0p6fpsw5.js → chunk-z5kdmget.js} +3 -3
- package/dist/{chunk-z0tnqt43.js → chunk-zqmvhg37.js} +10 -10
- package/dist/chunk-zygpvm1x.js +2 -0
- package/dist/chunk-zz247c1r.js +2 -0
- package/dist/cli.js +19 -19
- package/dist/component-image-usage.d.ts +2 -0
- package/dist/component-image-usage.js +13 -0
- package/dist/component-renderer.js +7 -2
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/native/compiler/inline-style.js +16 -6
- package/dist/native/compiler/ir.d.ts +2 -0
- package/dist/native/compiler/render-screen.js +1 -1
- package/dist/native/components/primitives.d.ts +2 -0
- package/dist/native/prop-names.js +2 -0
- package/dist/native/runtime/browser-renderer.js +6 -0
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +4 -4
- package/dist/utils.js +2 -1
- package/package.json +5 -5
- package/dist/chunk-02kkd7fy.js +0 -2
- package/dist/chunk-051evb5w.js +0 -2
- package/dist/chunk-0qqsnhz1.js +0 -2
- package/dist/chunk-0vmyr7kz.js +0 -2
- package/dist/chunk-1019v091.js +0 -2
- package/dist/chunk-1h9mcnvn.js +0 -2
- package/dist/chunk-1kdtapc1.js +0 -2
- package/dist/chunk-3a42s01p.js +0 -2
- package/dist/chunk-3w3avjyv.js +0 -2
- package/dist/chunk-59512t1y.js +0 -2
- package/dist/chunk-5w3qwnqc.js +0 -2
- package/dist/chunk-6561951c.js +0 -2
- package/dist/chunk-65wvwbnm.js +0 -2
- package/dist/chunk-69pcfw3y.js +0 -2
- package/dist/chunk-6jtjhx7w.js +0 -2
- package/dist/chunk-6x112bw3.js +0 -2
- package/dist/chunk-8kmhzsn7.js +0 -2
- package/dist/chunk-8wnjaz0x.js +0 -2
- package/dist/chunk-a6cwnhcw.js +0 -2
- package/dist/chunk-b5xc3cvz.js +0 -2
- package/dist/chunk-bwhv3fhm.js +0 -2
- package/dist/chunk-c7v9tw77.js +0 -2
- package/dist/chunk-cgyddqxw.js +0 -2
- package/dist/chunk-cs5gf4zp.js +0 -2
- package/dist/chunk-dex01879.js +0 -2
- package/dist/chunk-dkeceysd.js +0 -2
- package/dist/chunk-e1n4shdk.js +0 -2
- package/dist/chunk-e82k0mkx.js +0 -2
- package/dist/chunk-ejp9rg4j.js +0 -42
- package/dist/chunk-er1dnztv.js +0 -2
- package/dist/chunk-f0kbpzbb.js +0 -2
- package/dist/chunk-f83dksbn.js +0 -2
- package/dist/chunk-fcm67yad.js +0 -2
- package/dist/chunk-fk7gs41v.js +0 -2
- package/dist/chunk-g4gnq2zj.js +0 -2
- package/dist/chunk-gsawyk8q.js +0 -2
- package/dist/chunk-ha0ecbc9.js +0 -3
- package/dist/chunk-j0emb851.js +0 -2
- package/dist/chunk-k83z4nyg.js +0 -2
- package/dist/chunk-kg4zjb7a.js +0 -2
- package/dist/chunk-mjam7gyj.js +0 -2
- package/dist/chunk-nhm3qamb.js +0 -2
- package/dist/chunk-p2pbfen5.js +0 -2
- package/dist/chunk-pzryv3sz.js +0 -2
- package/dist/chunk-rhygq40y.js +0 -2
- package/dist/chunk-s4fr9cx8.js +0 -2
- package/dist/chunk-sp5c1pgg.js +0 -2
- package/dist/chunk-tyb22n6n.js +0 -2
- package/dist/chunk-vqjbqm6c.js +0 -2
- package/dist/chunk-vw6vw9gw.js +0 -2
- package/dist/chunk-vyznvnew.js +0 -2
- package/dist/chunk-xa1hsasb.js +0 -2
- package/dist/chunk-xc03bd64.js +0 -2
- package/dist/chunk-y100kb3n.js +0 -2
- package/dist/chunk-ycxwf633.js +0 -2
- package/dist/chunk-ydx3j69d.js +0 -2
- package/dist/chunk-ymbdctx1.js +0 -2
- package/dist/chunk-yp49yswk.js +0 -130
- package/dist/chunk-yq3p5y7y.js +0 -2
- package/dist/chunk-z3ggbhhc.js +0 -2
- package/dist/chunk-z5tejqpn.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function
|
|
2
|
+
var g=0;function p(){return`async-${++g}-${Date.now().toString(36)}`}function Cm(e,t={},c){let o=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@error\s*([\s\S]*?)@endasync/gi,i=/@async\s*\(([^)]*)\)\s*([\s\S]*?)@endasync/gi,n=e;return n=n.replace(o,(r,s,a,d)=>{let l=p(),y=u(s);return m(l,y,a.trim(),d.trim())}),n=n.replace(i,(r,s,a)=>{let d=p(),l=u(s);return m(d,l,a.trim(),'<div class="stx-async-error">Failed to load component</div>')}),n}function u(e){let t={component:"",timeout:30000,delay:200,suspensible:!0,retries:0},c=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,o;while((o=c.exec(e))!==null){let i=o[1],n=o[2]||o[3],r=o[4],s=o[5];switch(i){case"component":t.component=n||s||"";break;case"timeout":t.timeout=r?parseInt(r,10):30000;break;case"delay":t.delay=r?parseInt(r,10):200;break;case"suspensible":t.suspensible=s==="true";break;case"retries":t.retries=r?parseInt(r,10):0;break;case"loadingComponent":t.loadingComponent=n||s;break;case"errorComponent":t.errorComponent=n||s;break}}return t}function m(e,t,c,o){let{component:i,timeout:n,delay:r,suspensible:s,retries:a}=t;return`
|
|
3
3
|
<div class="stx-async-component" data-async-id="${e}" data-component="${i}" data-status="pending">
|
|
4
4
|
<div class="stx-async-loading" data-async-loading="${e}">
|
|
5
5
|
${c}
|
|
@@ -226,7 +226,7 @@ catch (error) {
|
|
|
226
226
|
loadComponent();
|
|
227
227
|
})();
|
|
228
228
|
</script>
|
|
229
|
-
`}function
|
|
229
|
+
`}function Em(e){return{__asyncComponent:!0,...typeof e==="function"?{loader:e}:e}}function Tm(e){return typeof e==="object"&&e!==null&&"__asyncComponent"in e&&e.__asyncComponent===!0}function $m(){return`
|
|
230
230
|
/* STX Async Component Styles */
|
|
231
231
|
.stx-async-component {
|
|
232
232
|
position: relative;
|
|
@@ -300,7 +300,7 @@ catch (error) {
|
|
|
300
300
|
background-size: 200% 100%;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
`}function
|
|
303
|
+
`}function Rm(){return`
|
|
304
304
|
// STX Async Component Runtime
|
|
305
305
|
(function() {
|
|
306
306
|
if (typeof window === 'undefined') return;
|
|
@@ -355,4 +355,4 @@ catch (error) {
|
|
|
355
355
|
console.log('[stx] Async component runtime initialized');
|
|
356
356
|
})();
|
|
357
357
|
`}
|
|
358
|
-
export{
|
|
358
|
+
export{Cm,Em,Tm,$m,Rm};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qe}from"./chunk-
|
|
2
|
+
import{Qe}from"./chunk-k4dn3ry6.js";import{gt,Fn}from"./chunk-90gx5qxn.js";import{Ne,fn,Fc,zc}from"./chunk-8w0cwcvk.js";import{Cr,Er,Tr,Rr,ke}from"./chunk-0tgrqhkr.js";import{O}from"./chunk-sj2a5twe.js";import{di}from"./chunk-7mm5mvg0.js";import{y}from"./chunk-x5sy0tym.js";import{i}from"./chunk-thr1m7k7.js";import{j,a}from"./chunk-g5sctfwa.js";import{dc}from"./chunk-cb4ybh7g.js";import{Rn,Ue,Ce,Qi,ea,An}from"./chunk-0dsykna3.js";import{rn,xo}from"./chunk-txgd0sj1.js";import{Pn}from"./chunk-d2vsw1j7.js";import{Jt,Xn,Jn}from"./chunk-tn40nh9e.js";import{G}from"./chunk-024m1xmd.js";import m from"fs";import c from"path";import{createHash as Q}from"crypto";function J(n){return Q("sha256").update(n).digest("hex").slice(0,8)}function U(n=!1){let l=n?Fn():gt(),o=J(l);return{content:l,filename:`runtime.${o}.js`,hash:o}}function V(){let n=Qe(),l=J(n);return{content:n,filename:`router.${l}.js`,hash:l}}import q 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 X(n,l,o={}){let r=q.resolve(n),e=await Bun.file(r).text(),S=ee("sha256").update(e).digest("hex").slice(0,16);Fc();let _={};try{_=await a(o.configDir)}catch{}let h=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))h.push(g[2])}let u=new Set(h.flatMap((R)=>Ne(R))),{context:D}=te({__filename:r,__dirname:q.dirname(r),__stx_serverDeclared:u}),A=new Set,T={...j,..._,...o,buildMode:"compile",strict:!1},b=await i(e,D,r,T,A),w=Rn(b)+Ue(b),P=zc();return{route:l,sourceFile:n,html:b,fragment:w,placeholders:P,hasServerScripts:h.length>0,serverScriptContent:h,dependencies:Array.from(A),contentHash:S,status:fn(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 h=m.readdirSync(S,{withFileTypes:!0});for(let d of h){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 Ng(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"),h=c.resolve(o,n.layoutsDir??e.layoutsDir??"layouts"),d=n.publicDir??e.publicDir??"public",g=ke(e.app?.head,{known:Rr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=n.routeRules??e.routeRules??{},T=Pn(A),b=n.serverApi??e.serverApi,w=typeof b==="object"?b:{};if(b)rn(o,w);if(e.runtimeConfig)O(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let P=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of P)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=G(o,{pagesDirs:e._layerPageDirs}),Y=["components","layouts","partials"],B=R.filter((s)=>!Y.some((f)=>s.pattern.startsWith(`/${f}/`)||s.pattern===`/${f}`));console.log(`[stx build] Found ${B.length} page routes (${R.length-B.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=U(n.debug),x=V();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 M=[],k=[];for(let s of B){let f=T(s.pattern),H=f.rendering==="prerender";if(H&&(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 X(s.filePath,s.pattern,{configDir:o,componentsDir:S,partialsDir:_,layoutsDir:h,debug:n.debug});if(M.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,x.filename),t.html=Tr(t.html,g,{bodyScripts:[`<script src="/__stx/${x.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=Cr(t.html,u);if(g.htmlAttrs)t.html=Er(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 W=p[1];t.html=t.html.replace(" "+W,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${W}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await y(t.html),H){let p=await An(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=Ce(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`),I=c.join("server","fragments",`${L}.html`);await Bun.write(c.join(r,z),JSON.stringify(t,null,2)),await Bun.write(c.join(r,I),t.fragment),k.push({pattern:s.pattern,compiledPath:z,fragmentPath:I,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:H}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(f).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let E=c.resolve(o,d);if(m.existsSync(E)){let{copied:s,bytes:f}=Z(E,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(f/1024).toFixed(1)}KB) from ${d}/`)}let F=Jn(o);if(F){let{copied:s,bytes:f}=Z(F,c.join(r,"public",Xn));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(f/1024).toFixed(1)}KB) from ${Jt}/`)}let N={runtime:v.filename,router:x.filename},C=Qi(k,N,r);if(C.routeRules=A,C.routerContainer=D,b)C.apiRoutes=await xo(o,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await di(o,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(dc(e._layerGraph),null,2));ea(C,r);let K=Date.now()-l;return console.log(`
|
|
3
3
|
[stx build] Done in ${K}ms \u2014 ${M.length} pages compiled`),{pageCount:M.length,assets:N,outputDir:r,duration:K}}
|
|
4
|
-
export{
|
|
4
|
+
export{Ng};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function
|
|
3
|
-
export{
|
|
2
|
+
var{WebView:p}=globalThis.Bun;import{existsSync as y,mkdirSync as b,readdirSync as v,statSync as S}from"fs";import l from"path";var h=16384;function M(e){if(/^https?:\/\//.test(e)||e.startsWith("file://"))return e;return`file://${l.resolve(e)}`}function g(e,n,t,o){return new Promise((s)=>{let i=!1,r,m,c=()=>{if(!i){if(i=!0,clearTimeout(m),r)clearTimeout(r);e.onNavigated=void 0,s()}};m=setTimeout(c,o),e.onNavigated=()=>{if(!i)r=setTimeout(c,t)};try{let u=e.navigate(n);if(u&&typeof u.catch==="function")u.catch(c)}catch{c()}})}async function w(e,n,t){let o=`!!document.querySelector(${JSON.stringify(n)})`,s=Date.now()+t;while(Date.now()<s){try{if(await e.evaluate(o))return}catch{}await new Promise((i)=>setTimeout(i,100))}}async function T(e){try{let n=await e.evaluate("Math.ceil(Math.max(document.documentElement.scrollHeight, document.documentElement.offsetHeight, document.body ? document.body.scrollHeight : 0, document.body ? document.body.offsetHeight : 0))");return typeof n==="number"&&Number.isFinite(n)&&n>0?Math.min(n,h):0}catch{return 0}}async function El(e,n,t={}){let o=Math.min(t.width??1440,h),s=Math.min(t.height??2200,h),i=t.waitMs??800,r=t.timeoutMs??15000,m=t.format??"png",c=M(e),u=(f)=>new p({width:o,height:f,headless:!0,...t.backend?{backend:t.backend}:{}}),a=u(s);try{if(await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r);if(t.fullPage){let d=await T(a);if(d>s){if(a.close(),a=u(d),await g(a,c,i,r),t.waitSelector)await w(a,t.waitSelector,r)}}let f=await a.screenshot({encoding:"buffer",format:m});b(l.dirname(l.resolve(n)),{recursive:!0}),await Bun.write(n,f)}finally{a.close()}if(!y(n))throw Error(`Screenshot was not produced for ${e}`);return{input:e,output:n,bytes:S(n).size}}async function Og(e,n,t={}){b(n,{recursive:!0});let o;if(!/^https?:\/\//.test(e)&&y(e)&&S(e).isDirectory())o=v(e).filter((r)=>r.endsWith(".html")).map((r)=>l.join(e,r));else o=[e];let s=t.format??"png",i=[];for(let r of o){let m=/^https?:\/\//.test(r)?new URL(r).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":l.basename(r).replace(/\.html?$/,"");i.push(await El(r,l.join(n,`${m}.${s}`),t))}return i}
|
|
3
|
+
export{El,Og};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{k}from"./chunk-
|
|
2
|
+
import{k}from"./chunk-8w0cwcvk.js";import{i}from"./chunk-thr1m7k7.js";import p from"fs";import g from"path";import*as y from"readline";var e={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},u={help:{description:"Show available commands",usage:"help [command]",handler:async(t,o)=>{if(t[0]&&u[t[0]]){let n=u[t[0]];console.log(`
|
|
3
3
|
${e.bold}${t[0]}${e.reset} - ${n.description}`),console.log(` Usage: ${e.cyan}${n.usage}${e.reset}
|
|
4
4
|
`)}else{console.log(`
|
|
5
5
|
${e.bold}Available Commands:${e.reset}
|
|
@@ -16,9 +16,9 @@ ${e.bold}Markdown:${e.reset}`),a.forEach((c)=>console.log(` ${e.blue}${c}${e.re
|
|
|
16
16
|
${e.bold}Other:${e.reset}`),d.forEach((c)=>console.log(` ${e.dim}${c}${e.reset}`));console.log()}},cat:{description:"Show file contents",usage:"cat <file>",handler:async(t,o)=>{if(!t[0]){console.log(`${e.red}Error: Please specify a file${e.reset}`);return}let n=g.resolve(o.cwd,t[0]);if(!await Bun.file(n).exists()){console.log(`${e.red}Error: File not found: ${n}${e.reset}`);return}let s=(await Bun.file(n).text()).split(`
|
|
17
17
|
`);console.log(),s.forEach((l,a)=>{let d=String(a+1).padStart(3," ");console.log(`${e.dim}${d}${e.reset} ${l}`)}),console.log()}},load:{description:"Load context from JSON file",usage:"load <file.json>",handler:async(t,o)=>{if(!t[0]){console.log(`${e.red}Error: Please specify a JSON file${e.reset}`);return}let n=g.resolve(o.cwd,t[0]);if(!await Bun.file(n).exists()){console.log(`${e.red}Error: File not found: ${n}${e.reset}`);return}try{let r=await Bun.file(n).text(),s=JSON.parse(r);o.context={...o.context,...s},console.log(`${e.green}\u2713${e.reset} Loaded ${Object.keys(s).length} variables from ${t[0]}`)}catch(r){console.log(`${e.red}Error parsing JSON:${e.reset}`,r)}}},save:{description:"Save context to JSON file",usage:"save <file.json>",handler:async(t,o)=>{if(!t[0]){console.log(`${e.red}Error: Please specify a file name${e.reset}`);return}let n=g.resolve(o.cwd,t[0]);try{await Bun.write(n,JSON.stringify(o.context,null,2)),console.log(`${e.green}\u2713${e.reset} Context saved to ${t[0]}`)}catch(r){console.log(`${e.red}Error saving file:${e.reset}`,r)}}},history:{description:"Show command history",usage:"history [count]",handler:async(t,o)=>{let n=t[0]?Number.parseInt(t[0],10):20,r=o.history.slice(-n);if(r.length===0){console.log(`${e.dim}No history${e.reset}`);return}console.log(),r.forEach((s,l)=>{let a=String(o.history.length-r.length+l+1).padStart(3," ");console.log(`${e.dim}${a}${e.reset} ${s}`)}),console.log()}},exit:{description:"Exit interactive mode",usage:"exit",handler:async(t,o)=>{o.running=!1,console.log(`
|
|
18
18
|
${e.dim}Goodbye!${e.reset}
|
|
19
|
-
`)}},quit:{description:"Exit interactive mode (alias for exit)",usage:"quit",handler:async(t,o)=>u.exit.handler(t,o)}};function h(t,o){let n=t.split(" "),r=n[0];if(n.length===1)return Object.keys(u).filter((s)=>s.startsWith(r));if(["render","cat","load","cd"].includes(r)){let s=n.slice(1).join(" "),l=g.dirname(s)||".",a=g.basename(s),d=g.resolve(o.cwd,l);if(p.existsSync(d)&&p.statSync(d).isDirectory())try{return p.readdirSync(d).filter((f)=>f.startsWith(a)).map((f)=>`${r} ${l==="."?"":`${l}/`}${f}`)}catch{return[]}}if(["unset","eval","set"].includes(r)){let s=n[1]||"";return Object.keys(o.context).filter((l)=>l.startsWith(s)).map((l)=>`${r} ${l}`)}return[]}async function
|
|
19
|
+
`)}},quit:{description:"Exit interactive mode (alias for exit)",usage:"quit",handler:async(t,o)=>u.exit.handler(t,o)}};function h(t,o){let n=t.split(" "),r=n[0];if(n.length===1)return Object.keys(u).filter((s)=>s.startsWith(r));if(["render","cat","load","cd"].includes(r)){let s=n.slice(1).join(" "),l=g.dirname(s)||".",a=g.basename(s),d=g.resolve(o.cwd,l);if(p.existsSync(d)&&p.statSync(d).isDirectory())try{return p.readdirSync(d).filter((f)=>f.startsWith(a)).map((f)=>`${r} ${l==="."?"":`${l}/`}${f}`)}catch{return[]}}if(["unset","eval","set"].includes(r)){let s=n[1]||"";return Object.keys(o.context).filter((l)=>l.startsWith(s)).map((l)=>`${r} ${l}`)}return[]}async function Cg(t={}){let o={context:t.context||{},cwd:t.cwd||process.cwd(),history:[],running:!0,lastResult:null},n=y.createInterface({input:process.stdin,output:process.stdout,completer:(s)=>[h(s,o),s],historySize:t.maxHistory||100});console.log(`
|
|
20
20
|
${e.bold}${e.blue}stx Interactive Mode${e.reset}
|
|
21
21
|
${e.dim}Type 'help' for available commands, 'exit' to quit${e.reset}
|
|
22
22
|
`);let r=()=>{let s=o.cwd.replace(process.env.HOME||"","~");n.question(`${e.cyan}stx${e.reset} ${e.dim}${s}${e.reset} ${e.green}>${e.reset} `,async(l)=>{let a=l.trim();if(!a){if(o.running)r();return}o.history.push(a);let d=a.match(/(?:[^\s"]|"[^"]*")+/g)||[],c=d[0]?.toLowerCase(),f=d.slice(1).map((m)=>m.replace(/^"|"$/g,""));if(c&&u[c])try{await u[c].handler(f,o)}catch(m){console.log(`${e.red}Error:${e.reset}`,m)}else if(c)if(a.includes("{{")||a.includes("}}"))try{let m=await k(a,o.context,"eval");console.log(`${e.green}\u2192${e.reset} ${m}`)}catch{console.log(`${e.red}Unknown command: ${c}${e.reset}`),console.log(`${e.dim}Type 'help' for available commands${e.reset}`)}else console.log(`${e.red}Unknown command: ${c}${e.reset}`),console.log(`${e.dim}Type 'help' for available commands${e.reset}`);if(o.running)r();else n.close()})};n.on("SIGINT",()=>{console.log(`
|
|
23
23
|
${e.dim}(Use 'exit' to quit)${e.reset}`),r()}),r()}
|
|
24
|
-
export{
|
|
24
|
+
export{Cg};
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import o from"fs";import u from"path";var h={".html":"includeHtml",".htm":"includeHtml",".js":"includeJs",".mjs":"includeJs",".css":"includeCss",".png":"includeImages",".jpg":"includeImages",".jpeg":"includeImages",".gif":"includeImages",".webp":"includeImages",".svg":"includeImages",".ico":"includeImages",".woff":"includeFonts",".woff2":"includeFonts",".ttf":"includeFonts",".eot":"includeFonts",".otf":"includeFonts"};function p(e){let r=0;for(let t=0;t<e.length;t++){let n=e[t];r=(r<<5)-r+n,r=r&r}return Math.abs(r).toString(16).padStart(8,"0")}function x(e,r){let t=u.basename(e);for(let n of r)if(n.startsWith("*.")){let i=n.slice(1);if(t.endsWith(i))return!0}else if(n.includes("*")){let i=new RegExp(`^${n.replace(/\*/g,".*")}$`);if(i.test(t)||i.test(e))return!0}else if(t===n||e.includes(n))return!0;return!1}function S(e,r,t){let n=u.extname(e).toLowerCase(),i=h[n],c=(t.maxFileSizeKB||500)*1024;if(r>c)return!1;if(t.exclude&&x(e,t.exclude))return!1;if(t.include&&t.include.length>0){for(let s of t.include)if(s.startsWith("*.")){if(e.endsWith(s.slice(1)))return!0}else if(e.includes(s))return!0}if(i&&t[i]===!0)return!0;if(!i)return!1;return!1}function f(e,r,t,n){let i=o.readdirSync(e,{withFileTypes:!0});for(let c of i){let s=u.join(e,c.name);if(c.isDirectory()){if(["node_modules",".git",".stx"].includes(c.name))continue;f(s,r,t,n)}else if(c.isFile()){let a=o.statSync(s),l=u.relative(r,s);if(S(l,a.size,t)){let d=o.readFileSync(s),g=p(d),m=`/${l.replace(/\\/g,"/")}`;n.push({url:m,revision:g,size:a.size})}}}}function Ve(e,r){let t=r.pwa?.precache,n=[];if(!t?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!o.existsSync(e))return{entries:[],totalSize:0,fileCount:0};f(e,e,t,n),n.sort((c,s)=>c.url.localeCompare(s.url));let i=n.reduce((c,s)=>c+s.size,0);return{entries:n,totalSize:i,fileCount:n.length}}function Cn(e){if(e.entries.length===0)return"[]";return`[
|
|
3
3
|
${e.entries.map((t)=>` { url: '${t.url}', revision: '${t.revision}' }`).join(`,
|
|
4
4
|
`)}
|
|
5
|
-
]`}function
|
|
6
|
-
export{Ve,Cn,
|
|
5
|
+
]`}function ki(e){if(e<1024)return`${e} B`;if(e<1048576)return`${(e/1024).toFixed(1)} KB`;return`${(e/1048576).toFixed(2)} MB`}
|
|
6
|
+
export{Ve,Cn,ki};
|
|
@@ -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=Vc(t,n+2),n<t.length)n++;continue}n++}return t.length}function Vc(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=Vc(t,u);if(i+=" ",i+=s(t.slice(u,g)),g<t.length)i+=" ";n=g+1;continue}i+=t[n]===`
|
|
10
10
|
`?`
|
|
11
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 ge(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{
|
|
12
|
+
export{Vc,s,ge};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{t,c}from"./chunk-
|
|
2
|
+
import{t,c}from"./chunk-0tgrqhkr.js";import{r,yn,h}from"./chunk-8w0cwcvk.js";import{Qe}from"./chunk-k4dn3ry6.js";import{hs,ys}from"./chunk-3z38swhv.js";import{uc,zo,gs,ms}from"./chunk-cb4ybh7g.js";import{ac,cc}from"./chunk-p33w8zst.js";import{vt}from"./chunk-am4wadh7.js";import{cn,hc,fr,gr}from"./chunk-7ycf8a8d.js";import{g}from"./chunk-0dve54ne.js";import{Ks}from"./chunk-xrzghjvy.js";import Q from"fs";import N from"path";import{loadConfigWithResult as Ht}from"bunfig";var B={duration:300,delay:0,ease:"ease",direction:"both"};function nt(e,s={}){let{duration:i,delay:o,ease:n,direction:l,custom:d}={...B,...s};if(e==="custom"&&d)return d;switch(e){case"fade":return`${l==="in"?"opacity: 0; animation: fadeIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"opacity: 1; animation: fadeOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"opacity: 1; transition: opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
|
|
3
3
|
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
|
4
4
|
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }`;case"slide":return`${l==="in"?"transform: translateY(20px); opacity: 0; animation: slideIn var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":l==="out"?"transform: translateY(0); opacity: 1; animation: slideOut var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms) forwards;":"transform: translateY(0); opacity: 1; transition: transform var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms), opacity var(--stx-transition-duration, 300ms) var(--stx-transition-ease, ease) var(--stx-transition-delay, 0ms);"}
|
|
5
5
|
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
|
|
@@ -234,7 +234,7 @@ else {
|
|
|
234
234
|
</script>
|
|
235
235
|
`}var De={name:"transition",handler:(e,s,i,o)=>{if(s.length<1)return`<div class="stx-error">@transition directive requires at least a transition type</div>${e}`;let n=s[0],l=s.length>1?Number.parseInt(s[1],10)||B.duration:B.duration,d=s.length>2?s[2]||B.ease:B.ease,p=s.length>3?Number.parseInt(s[3],10)||B.delay:B.delay,u=s.length>4?s[4]||B.direction:B.direction,m=`stx-transition-${Math.random().toString(36).substr(2,9)}`,y=nt(n,{duration:l,delay:p,ease:d,direction:u}),f="stx-transition",v="";if(n==="fade")v="stx-fade";else if(n==="slide")v="stx-slide";else if(n==="scale")v="stx-scale";else if(n==="flip")v="stx-flip";else if(n==="rotate")v="stx-rotate";return`<div id="${m}" class="${f} ${v} ${u==="out"?"stx-out":""}"
|
|
236
236
|
style="--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${p}ms;">${e}</div>`},hasEndTag:!0,description:"Applies transition effects to an element"},Pe={name:"scrollAnimate",handler:(e,s,i,o)=>{if(s.length<1)return`<div class="stx-error">@scrollAnimate directive requires at least an animation type</div>${e}`;let n=s[0],l=s.length>1?Number.parseInt(s[1],10)||300:300,d=s.length>2?s[2]||"ease":"ease",p=s.length>3?Number.parseFloat(s[3])||0.2:0.2,u=s.length>4?Number.parseInt(s[4],10)||0:0,m=`stx-scroll-${Math.random().toString(36).substr(2,9)}`,y=`--stx-transition-duration: ${l}ms; --stx-transition-ease: ${d}; --stx-transition-delay: ${u}ms; will-change: opacity, transform;`,f="stx-transition stx-observe stx-out";if(n==="fade")f+=" stx-fade";else if(n==="slide-up"||n==="slide")f+=" stx-from-bottom";else if(n==="slide-down")f+=" stx-from-top";else if(n==="slide-left")f+=" stx-from-right";else if(n==="slide-right")f+=" stx-from-left";else if(n==="scale")f+=" stx-scale";else if(n.includes("-"))f+=` stx-${n}`;else f+=` stx-${n}`;return`<div id="${m}" class="${f}" style="${y}" data-threshold="${p}">${e}</div>`},hasEndTag:!0,description:"Applies animations that trigger when scrolled into view"},ke={name:"animationGroup",handler:(e,s,i,o)=>{if(s.length<2)return`<div class="stx-error">@animationGroup directive requires a group name and at least one element selector</div>${e}`;let n=s[0],l=s.slice(1).map((m)=>m.startsWith("#")||m.startsWith(".")?m:`#${m}`),d=i.staggerDelay||50,p=i.sequence||!0,u=ct(n,l,{staggerDelay:d,sequence:p});return`${e}
|
|
237
|
-
${u}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ae={name:"motion",handler:(e,s,i,o)=>{let n=s.length>0?s[0].toLowerCase()==="true":!0,l=it();return`<div data-animate="${n?"auto":"true"}">${e}</div>${l}`},hasEndTag:!0,description:"Controls motion and animation preferences"};function
|
|
237
|
+
${u}`},hasEndTag:!1,description:"Coordinates multiple animations together as a group"},Ae={name:"motion",handler:(e,s,i,o)=>{let n=s.length>0?s[0].toLowerCase()==="true":!0,l=it();return`<div data-animate="${n?"auto":"true"}">${e}</div>${l}`},hasEndTag:!0,description:"Controls motion and animation preferences"};function tc(e,s,i,o){let n=e;if(o.animation?.enabled===!1)return n;let l=i.includes("test")&&i.includes("animation");if(!at(n)&&!l)return n;if(!n.includes('<style id="stx-animation-base">')){let p=lt();n=n.replace("</head>",`${p}
|
|
238
238
|
</head>`)}if(n.includes("stx-observe")){if(!n.includes("Intersection Observer for scroll animations")){let u=ot(),m=n.lastIndexOf("</body>");if(m!==-1)n=n.slice(0,m)+u+`
|
|
239
239
|
`+n.slice(m)}}return n}async function dt(e,s,i,o){let n=s[0]?.replace(/['"]/g,"")||"main",l=Qe();if(n!=="main")l=l.replace("container:'main'",`container:'${n}'`);return`<script data-stx-router>${l}</script>`}var _e={name:"stxRouter",handler:dt,hasEndTag:!1,description:"Inject the STX SPA router script for client-side navigation"};var ut={enabled:!1,trackMouse:!0,trackClicks:!0,trackScroll:!0,samplingRate:100,honorDnt:!0,batchSize:50,maxDataPoints:1000,sessionTimeout:30,persistData:!1,storagePrefix:"stx_heatmap",captureAttributes:["data-heatmap-id","data-track"],ignoreSelectors:["[data-heatmap-ignore]",".heatmap-ignore"],debugOverlay:!1};function Re(e){let s=e.heatmap;if(!s?.enabled)return"";let i={...ut,...s};return`
|
|
240
240
|
<!-- stx Heatmap - Privacy-Compliant Tracking -->
|
|
@@ -619,7 +619,7 @@ else {
|
|
|
619
619
|
};
|
|
620
620
|
})();
|
|
621
621
|
</script>
|
|
622
|
-
`}function
|
|
622
|
+
`}function nc(e,s){let i=Re(s);if(!i)return e;let o=e.lastIndexOf("</body>");if(o!==-1)return e.slice(0,o)+i+e.slice(o);return e+i}var Oe={name:"heatmap",hasEndTag:!1,description:"Inject privacy-compliant heatmap tracking script",handler:async(e,s,i,o)=>{let n=i.__stx_config||{};if(s.length>0){let l=pt(s.join(" "));n.heatmap={...n.heatmap,...l,enabled:!0}}return Re(n)}};function pt(e){let s={},i=e.match(/(\w+)=["']?([^"'\s]+)["']?/g)||[];for(let o of i){let[n,l]=o.split("="),d=l?.replace(/["']/g,"");switch(n){case"endpoint":s.endpoint=d;break;case"samplingRate":s.samplingRate=Number.parseInt(d,10);break;case"batchSize":s.batchSize=Number.parseInt(d,10);break;case"trackMouse":s.trackMouse=d==="true";break;case"trackClicks":s.trackClicks=d==="true";break;case"trackScroll":s.trackScroll=d==="true";break;case"honorDnt":s.honorDnt=d==="true";break;case"debugOverlay":s.debugOverlay=d==="true";break}}return s}function J(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ee(e){let s=e.trim().toLowerCase();return!s.startsWith("javascript:")&&!s.startsWith("vbscript:")&&!s.startsWith("data:text/html")}function lr(e){let s=/^---\r?\n([\s\S]*?)\r?\n---\r?\n/,i=e.match(s);if(!i)return{data:{},content:e.trim()};let o=i[1],n=e.slice(i[0].length),l={};for(let d of o.split(`
|
|
623
623
|
`)){let p=d.trim();if(!p||p.startsWith("#"))continue;let u=p.indexOf(":");if(u===-1)continue;let m=p.slice(0,u).trim(),y=p.slice(u+1).trim();if(typeof y==="string"){if(y.startsWith('"')&&y.endsWith('"')||y.startsWith("'")&&y.endsWith("'"))y=y.slice(1,-1);else if(y.startsWith("[")&&y.endsWith("]"))try{y=JSON.parse(y)}catch{}else if(y==="true")y=!0;else if(y==="false")y=!1;else if(/^-?\d+(?:\.\d+)?$/.test(y))y=Number(y)}l[m]=y}return{data:l,content:n.trim()}}function Ye(e,s={}){let{gfm:i=!0,breaks:o=!1}=s,n=e,l=[];if(n=n.replace(/```(\w*)\n([\s\S]*?)```/g,(y,f,v)=>{let b=l.length,x=f?` class="language-${J(f)}"`:"";return l.push(`<pre><code${x}>${J(v.trim())}</code></pre>`),`\x00CODEBLOCK${b}\x00`}),n=n.replace(/`([^`]*)`/g,(y,f)=>`<code>${J(f)}</code>`),n=n.replace(/^######\s+(.*)$/gm,"<h6>$1</h6>"),n=n.replace(/^#####\s+(.*)$/gm,"<h5>$1</h5>"),n=n.replace(/^####\s+(.*)$/gm,"<h4>$1</h4>"),n=n.replace(/^###\s+(.*)$/gm,"<h3>$1</h3>"),n=n.replace(/^##\s+(.*)$/gm,"<h2>$1</h2>"),n=n.replace(/^#\s+(.*)$/gm,"<h1>$1</h1>"),n=n.replace(/\*\*\*(.+?)\*\*\*/g,"<strong><em>$1</em></strong>"),n=n.replace(/___(.+?)___/g,"<strong><em>$1</em></strong>"),n=n.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>"),n=n.replace(/__(.+?)__/g,"<strong>$1</strong>"),n=n.replace(/\*(.+?)\*/g,"<em>$1</em>"),n=n.replace(/(?<![a-zA-Z0-9])_(.+?)_(?![a-zA-Z0-9])/g,"<em>$1</em>"),i)n=n.replace(/~~(.+?)~~/g,"<del>$1</del>");if(n=n.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,(y,f,v)=>`<img src="${Ee(v)?J(v):""}" alt="${J(f)}" />`),n=n.replace(/\[([^\]]+)\]\(([^)]+)\)/g,(y,f,v)=>`<a href="${Ee(v)?J(v):""}">${f}</a>`),n=n.replace(/^(?:---|\*\*\*|___)\s*$/gm,"<hr />"),n=n.replace(/^>\s+(.*)$/gm,"<blockquote>$1</blockquote>"),n=n.replace(/<\/blockquote>\n<blockquote>/g,`
|
|
624
624
|
`),n=n.replace(/^[*\-+]\s+(.*)$/gm,"<li data-ul>$1</li>"),n=n.replace(/(<li data-ul>.*<\/li>\n?)+/g,"<ul>$&</ul>"),n=n.replace(/<\/ul>\n<ul>/g,""),n=n.replace(/^\d+\.\s+(.*)$/gm,"<li data-ol>$1</li>"),n=n.replace(/(<li data-ol>.*<\/li>\n?)+/g,"<ol>$&</ol>"),n=n.replace(/<\/ol>\n<ol>/g,""),n=n.replace(/<li data-ul>/g,"<li>"),n=n.replace(/<li data-ol>/g,"<li>"),i)n=n.replace(/^\|(.+)\|\s*\n\|[-:\s|]+\|\s*\n((?:\|.+\|\s*\n)*)/gm,(y,f,v)=>{let x=`<tr>${f.split("|").map((S)=>S.trim()).filter(Boolean).map((S)=>`<th>${J(S)}</th>`).join("")}</tr>`,k=v.trim().split(`
|
|
625
625
|
`).map((S)=>`<tr>${S.split("|").map((A)=>A.trim()).filter(Boolean).map((A)=>`<td>${J(A)}</td>`).join("")}</tr>`).join(`
|
|
@@ -637,7 +637,7 @@ ${k}
|
|
|
637
637
|
`:`
|
|
638
638
|
`)}</p>`);if(n=p.join(`
|
|
639
639
|
`),o)n=n.replace(/\n/g,`<br />
|
|
640
|
-
`);for(let y=0;y<l.length;y++)n=n.replace(`\x00CODEBLOCK${y}\x00`,l[y]);return n=n.replace(/<p>\s*<\/p>/g,""),n.trim()}async function
|
|
640
|
+
`);for(let y=0;y<l.length;y++)n=n.replace(`\x00CODEBLOCK${y}\x00`,l[y]);return n=n.replace(/<p>\s*<\/p>/g,""),n.trim()}async function rc(e,s,i=""){let o=e,n=[],l=/@markdown(?:\([^)]*\))?/g,d;while((d=l.exec(e))!==null){let p=d.index,u=d[0].match(/@markdown\(([^)]*)\)/),m=u?u[1]:"",y=p+d[0].length,f=1,v=y,b=-1;while(f>0&&v<e.length){let S=e.indexOf("@markdown",v),_=e.indexOf("@endmarkdown",v);if(_===-1)break;if(S!==-1&&S<_&&S!==p){let A=e[S+9];if(A==="("||A===`
|
|
641
641
|
`||A==="\r"||A===" "||A===void 0)f++;v=S+9}else{if(f--,f===0){b=_;break}v=_+12}}if(b===-1)continue;let x=e.slice(y,b),k=e.slice(p,b+12);n.push({fullMatch:k,options:m,content:x,index:p}),l.lastIndex=b+12}for(let{fullMatch:p,options:u,content:m,index:y}of n)try{let f={};if(u)u.split(",").forEach((x)=>{let k=x.trim();if(k)f[k]=!0});let v={gfm:f.gfm??!0,breaks:f.breaks??!1},b=Ye(m.trim(),v);o=o.split(p).join(b)}catch(f){let v=f instanceof Error?f.message:String(f),b=h("Markdown Directive",`Error processing markdown: ${v}`,i,e,y,p);o=o.split(p).join(b)}return o}async function Ie(e,s,i,o){let n={gfm:!0,breaks:!1};return s.forEach((l)=>{let d=l.trim().replace(/['"]/g,"");if(d==="breaks")n.breaks=!0;if(d==="no-gfm")n.gfm=!1}),Ye(e.trim(),n)}var Z=[320,480,640,768,1024,1280,1536,1920,2560],mt=[1,1.5,2,3],te=["avif","webp","jpeg"],gt={avif:"image/avif",webp:"image/webp",jpeg:"image/jpeg",png:"image/png",gif:"image/gif"};function pe(e,s=Z,i={},o){return s.sort((n,l)=>n-l).map((n)=>`${re(e,{...i,w:n,fm:o})} ${n}w`).join(", ")}function Te(e,s,i=mt,o={},n){return i.sort((l,d)=>l-d).map((l)=>{let d=Math.round(s*l);return`${re(e,{...o,w:d,dpr:l,fm:n})} ${l}x`}).join(", ")}function me(e,s="100vw"){if(!e||Object.keys(e).length===0)return s;let o=Object.entries(e).map(([n,l])=>{let d=/^\d+$/.test(n)?`${n}px`:n;return{bp:d,size:l,numericBp:Number.parseInt(d)||0}}).sort((n,l)=>n.numericBp-l.numericBp).map(({bp:n,size:l})=>`(max-width: ${n}) ${l}`);return o.push(s),o.join(", ")}function re(e,s={}){let i=Object.entries(s).filter(([,l])=>l!==void 0&&l!==null).map(([l,d])=>{if(Array.isArray(d))return[l,d.join(",")];return[l,String(d)]});if(i.length===0)return e;let o=i.map(([l,d])=>`${l}=${encodeURIComponent(d)}`).join("&"),n=e.includes("?")?"&":"?";return`${e}${n}${o}`}function ge(e){return gt[e]||"application/octet-stream"}var ft={strategy:"thumbhash",width:20,quality:50,blurLevel:40,transitionDuration:300,easing:"ease-out"},he=`
|
|
642
642
|
.stx-img-placeholder {
|
|
643
643
|
position: relative;
|
|
@@ -684,7 +684,7 @@ ${k}
|
|
|
684
684
|
#${e}.stx-img-loaded img {
|
|
685
685
|
opacity: 1;
|
|
686
686
|
}
|
|
687
|
-
`.trim()}var fe=new Map;async function Ne(e,s={}){let i=`${e}:${JSON.stringify(s)}`;if(fe.has(i))return fe.get(i);let o=await yt(e,s);return fe.set(i,o),o}async function wt(){try{return await import("./chunk-
|
|
687
|
+
`.trim()}var fe=new Map;async function Ne(e,s={}){let i=`${e}:${JSON.stringify(s)}`;if(fe.has(i))return fe.get(i);let o=await yt(e,s);return fe.set(i,o),o}async function wt(){try{return await import("./chunk-qekyxjy6.js")}catch(e){if(!je)console.warn("[stx-media] Image processor not available, some features disabled:",e),je=!0;return null}}var je=!1,ye=80,oe="async",le="lazy",Ve=!1;async function ae(e,s={}){let i=s,o=e;if(o.process&&!o.skipOptimization){if(i.tsImagesConfig?.enabled&&!i.isDev)return Dt(o,i)}if(i.processedResult?.processed)return xe(e,i.processedResult,s);if(i.responsiveVariants)return We(e,i.responsiveVariants,s);let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,dpr:y,formats:f=te,quality:v=ye,params:b={},placeholder:x="none",placeholderOptions:k={},lazy:S=!0,priority:_=!1,loading:A=_?"eager":le,decoding:E=oe,fetchpriority:I,objectFit:w,objectPosition:C,crossorigin:D,referrerpolicy:L}=e,{class:W,style:T,id:V}=e,R=e.data||{},{isDev:z=!1,baseUrl:G=""}=s;if(z&&!s.optimize)return Ct(e);let F,O,H=V||`stx-img-${Math.random().toString(36).slice(2,8)}`;if(x!=="none"&&!_)try{F=await Ne(n,{strategy:x,...k}),O=Me(H,F,k)}catch{}let ne=y!==void 0&&d!==void 0,X;if(ne)X=St(e,H,F,s);else X=await $t(e,H,F,s);let ee;if(_){let Ce=f.includes("webp")?"webp":f[0],rt=pe(n,m,{...b,q:v},Ce),st=typeof u==="object"?me(u):u||"100vw";ee=`<link rel="preload" as="image" imagesrcset="${rt}" imagesizes="${st}" />`}let ie=[];if(!Ve&&x!=="none")ie.push(he),Ve=!0;if(O)ie.push(O);let tt=S?Le(H):void 0;return{html:X,preloadLink:ee,css:ie.length>0?ie.join(`
|
|
688
688
|
`):void 0,script:tt}}async function $t(e,s,i,o){let{src:n,alt:l,width:d,height:p,sizes:u,widths:m=Z,formats:y=te,quality:f=ye,params:v={},lazy:b=!0,priority:x=!1,loading:k=x?"eager":le,decoding:S=oe,fetchpriority:_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w}=e,{class:C,style:D}=e,L=e.data||{},W=typeof u==="object"?me(u):u||"100vw",T=[];for(let z of y){let G=pe(n,m,{...v,q:f},z),F=ge(z);if(b&&!x)T.push(` <source type="${F}" data-srcset="${G}" data-sizes="${W}" />`);else T.push(` <source type="${F}" srcset="${G}" sizes="${W}" />`)}let V=ve({src:re(n,{...v,q:f}),alt:l,width:d,height:p,loading:x?void 0:k,decoding:S,fetchpriority:x?"high":_,objectFit:A,objectPosition:E,crossorigin:I,referrerpolicy:w,className:ze(C,i),style:be(D,A,E,i),lazy:b&&!x,data:L}),R;if(i){let z=`background-image: url('${i.dataURL}'); background-size: cover; background-position: center;`;R=`<div id="${s}" class="stx-img-placeholder" style="${z}">
|
|
689
689
|
<picture>
|
|
690
690
|
${T.join(`
|
|
@@ -748,7 +748,7 @@ ${w.join(`
|
|
|
748
748
|
`):void 0,script:G}}async function We(e,s,i){let o={src:s.src,processed:!0,variants:[],placeholder:s.placeholder?.dataURL,originalWidth:s.placeholder?.width,originalHeight:s.placeholder?.height};for(let[n,l]of Object.entries(s.byFormat))if(l)o.variants.push(...l);return xe(e,o,i)}function Pt(){return vt({name:"img",hasEndTag:!1,description:"Render an optimized responsive image with srcset and lazy loading",transform:async(e,s,i,o)=>{let{src:n,alt:l,options:d}=kt(e,s,i);if(!n)return console.warn("@img directive: missing src argument"),"<!-- @img: missing src -->";let p={src:n,alt:l||"",widths:d.widths||Z,formats:d.formats||te,quality:d.quality,sizes:d.sizes,dpr:d.dpr,params:d.params,placeholder:d.placeholder,placeholderOptions:d.placeholderOptions,lazy:d.lazy!==!1,priority:d.priority||!1,loading:d.loading,decoding:d.decoding,fetchpriority:d.fetchpriority,objectFit:d.objectFit,objectPosition:d.objectPosition,class:d.class,style:d.style,id:d.id,width:d.width,height:d.height},u=i.__isDev||!1,m=await ae(p,{isDev:u}),y=m.html;if(m.preloadLink)y=m.preloadLink+`
|
|
749
749
|
`+y;if(m.css)y+=`
|
|
750
750
|
<style>${m.css}</style>`;if(m.script)y+=`
|
|
751
|
-
<script>${m.script}</script>`;return y},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function kt(e,s,i){if(s.src)return{src:String(s.src),alt:String(s.alt||""),options:s.options||{}};let o=e.trim();if(o.startsWith("@img(")||o.startsWith("("))o=o.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=At(o),l=we(n[0],i)||"",d=we(n[1],i)||"",p={};if(n[2]){let u=we(n[2],i);if(typeof u==="object"&&u!==null)p=u;else if(typeof n[2]==="string")try{p=JSON.parse(n[2])}catch{}}return{src:l,alt:d,options:p}}function At(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function we(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var Fe=Pt();async function He(){try{return await import("./chunk-
|
|
751
|
+
<script>${m.script}</script>`;return y},defaults:{src:"",alt:"",options:{lazy:!0,placeholder:"none"}}})}function kt(e,s,i){if(s.src)return{src:String(s.src),alt:String(s.alt||""),options:s.options||{}};let o=e.trim();if(o.startsWith("@img(")||o.startsWith("("))o=o.replace(/^@img\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=At(o),l=we(n[0],i)||"",d=we(n[1],i)||"",p={};if(n[2]){let u=we(n[2],i);if(typeof u==="object"&&u!==null)p=u;else if(typeof n[2]==="string")try{p=JSON.parse(n[2])}catch{}}return{src:l,alt:d,options:p}}function At(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function we(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var Fe=Pt();async function He(){try{return await import("./chunk-5h71xbzk.js")}catch(e){if(!qe)console.warn("[stx-media] Video processor not available, some features disabled:",e),qe=!0;return null}}var qe=!1,Ue=!0,Be="metadata",_t="https://cdn.jsdelivr.net/npm/ts-video-player@latest/dist/index.min.js";async function ce(e,s={}){let i=s,o=e;if(o.process&&!o.skipProcessing){if(i.tsVideosConfig?.enabled&&!i.isDev)return Tt(o,i)}if(i.processedResult?.processed)return Ke(e,i.processedResult,s);let n;if(o.generatePoster&&o.src&&!e.poster)n=await Mt(o,i);let{src:l,sources:d=[],poster:p,posterPlaceholder:u,controls:m=Ue,autoplay:y=!1,muted:f=!1,loop:v=!1,preload:b=Be,playsinline:x=!0,lazy:k=!0,player:S="native",type:_,width:A,height:E,crossorigin:I,disablePictureInPicture:w=!1,disableRemotePlayback:C=!1}=e,D=n||p,{class:L,style:W}=e,T=e.id||`stx-video-${Math.random().toString(36).slice(2,8)}`;if(S==="ts-video")return Ot(e,s);if(_&&_!=="video")return Rt(l||"",_,e);let V=d.length>0?d:l?[{src:l,type:Je(l)}]:[],R=[`id="${T}"`];if(m)R.push("controls");if(y)R.push("autoplay");if(f)R.push("muted");if(v)R.push("loop");if(x)R.push("playsinline");if(w)R.push("disablepictureinpicture");if(C)R.push("disableremoteplayback");if(I)R.push(`crossorigin="${I}"`);if(k){if(R.push(`data-preload="${b}"`),R.push('preload="none"'),D)R.push(`data-poster="${M(D)}"`);R.push("data-stx-lazy")}else if(R.push(`preload="${b}"`),D)R.push(`poster="${M(D)}"`);if(A)R.push(`width="${A}"`);if(E)R.push(`height="${E}"`);if(L)R.push(`class="${M(L)}"`);if(W)R.push(`style="${M(W)}"`);let z=V.map((O)=>` <source ${k?`data-src="${M(O.src)}"`:`src="${M(O.src)}"`} type="${O.type}"${O.media?` media="${O.media}"`:""} />`).join(`
|
|
752
752
|
`),G=`<video ${R.join(" ")}>
|
|
753
753
|
${z}
|
|
754
754
|
Your browser does not support the video tag.
|
|
@@ -1007,7 +1007,7 @@ ${V}
|
|
|
1007
1007
|
}
|
|
1008
1008
|
`.trim();return{html:V,script:R,css:z}}function Ge(){return vt({name:"video",hasEndTag:!1,description:"Render a video with optional ts-videos processing, streaming, and poster generation",transform:async(e,s,i,o)=>{let{src:n,options:l}=Nt(e,s,i);if(!n)return console.warn("@video directive: missing src argument"),"<!-- @video: missing src -->";let d={src:n,poster:l.poster,controls:l.controls!==!1,autoplay:l.autoplay||!1,muted:l.muted||!1,loop:l.loop||!1,preload:l.preload||"metadata",playsinline:l.playsinline!==!1,lazy:l.lazy!==!1,player:l.player||"native",type:l.type,width:l.width,height:l.height,class:l.class,style:l.style,id:l.id,crossorigin:l.crossorigin,disablePictureInPicture:l.disablePictureInPicture,disableRemotePlayback:l.disableRemotePlayback,title:l.title,quality:l.quality,platform:l.platform,process:l.process,generatePoster:l.generatePoster,streaming:l.streaming,transcode:l.transcode,spriteSheet:l.spriteSheet,waveform:l.waveform},u={isDev:i.__isDev||!1,tsVideosConfig:i.__tsVideosConfig},m=await ce(d,u),y=m.html;if(m.css)y+=`
|
|
1009
1009
|
<style>${m.css}</style>`;if(m.script)y+=`
|
|
1010
|
-
<script>${m.script}</script>`;return y},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Nt(e,s,i){if(s.src)return{src:String(s.src),options:s.options||{}};let o=e.trim();if(o.startsWith("@video(")||o.startsWith("("))o=o.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=jt(o),l=Xe(n[0],i)||"",d={};if(n[1]){let p=Xe(n[1],i);if(typeof p==="object"&&p!==null)d=p;else if(typeof n[1]==="string")try{d=JSON.parse(n[1])}catch{}}return{src:l,options:d}}function jt(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function Xe(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var $e=Ge();import Vt from"fs";import q from"path";async function
|
|
1010
|
+
<script>${m.script}</script>`;return y},defaults:{src:"",options:{controls:!0,lazy:!0,preload:"metadata"}}})}function Nt(e,s,i){if(s.src)return{src:String(s.src),options:s.options||{}};let o=e.trim();if(o.startsWith("@video(")||o.startsWith("("))o=o.replace(/^@video\(/,"").replace(/^\(/,"").replace(/\)$/,"");let n=jt(o),l=Xe(n[0],i)||"",d={};if(n[1]){let p=Xe(n[1],i);if(typeof p==="object"&&p!==null)d=p;else if(typeof n[1]==="string")try{d=JSON.parse(n[1])}catch{}}return{src:l,options:d}}function jt(e){let s=[],i="",o=!1,n="",l=0,d=0;for(let p=0;p<e.length;p++){let u=e[p],m=p>0?e[p-1]:"";if((u==='"'||u==="'"||u==="`")&&m!=="\\"){if(!o)o=!0,n=u;else if(u===n)o=!1,n="";else i+=u;continue}if(!o){if(u==="{")l++;if(u==="}")l--;if(u==="[")d++;if(u==="]")d--;if(u===","&&l===0&&d===0){s.push(i.trim()),i="";continue}}i+=u}if(i.trim())s.push(i.trim());return s}function Xe(e,s){if(typeof e!=="string")return e;let i=e.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1);if(!i.startsWith("/")&&!i.startsWith(".")&&!i.startsWith("http")&&!i.startsWith("{")){let o=s[i];if(o!==void 0)return o}if(i.startsWith("{")||i.startsWith("["))try{return JSON.parse(i)}catch{}return i}var $e=Ge();import Vt from"fs";import q from"path";async function ps(e,s){if(!e.webComponents?.enabled)return[];let i=e.webComponents.components||[],o=[];if(i.length>0){if(e.debug)console.log(`Building ${i.length} web components...`);for(let n of i)try{let l=await zt(n,e,s);if(l)o.push(l)}catch(l){if(console.error(`Error building web component ${n.name}:`,l),e.debug)throw l}}return o}async function zt(e,s,i){let{name:o,file:n,tag:l,extends:d}=e;if(!o||!n||!l)return console.error("Invalid web component configuration, missing required fields:",e),null;let p=null;if(q.isAbsolute(n)&&await r(n))p=n;else if(s.componentsDir){let k=q.join(s.componentsDir,n);if(await r(k))p=k}if(!p)p=await yn(n,process.cwd(),s,i);if(!p)return console.error(`Web component source file not found: ${n}`),null;let u=await Bun.file(p).text();i.add(p);let y=(e.outputFormat||"js")==="ts",f=y?Wt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[],attributeTypes:e.attributeTypes||{}}):Lt({name:o,tag:l,baseElement:d,source:u,shadowDOM:e.shadowDOM??!0,template:e.template??!0,styleSource:e.styleSource,attributes:e.attributes||[]}),v=s.webComponents?.outputDir||"dist/web-components";await Vt.promises.mkdir(v,{recursive:!0});let b=y?"ts":"js",x=q.join(v,`${l}.${b}`);if(await Bun.write(x,f),s.debug)console.log(`Built web component ${o} -> ${x}`);return x}function Lt(e){let{name:s,tag:i,baseElement:o="HTMLElement",source:n,shadowDOM:l,template:d,styleSource:p,attributes:u=[]}=e,m=n.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").trim();if(!l)m=m.replace(/<slot\s+name=["']([^"']+)["']\s*>([\s\S]*?)<\/slot>/gi,'<div data-slot="$1">$2</div>'),m=m.replace(/<slot\s+name=["']([^"']+)["']\s*\/>/gi,'<div data-slot="$1"></div>'),m=m.replace(/<slot\s*>([\s\S]*?)<\/slot>/gi,"<div data-default-slot>$1</div>"),m=m.replace(/<slot\s*\/>/gi,"<div data-default-slot></div>");let y="";if(p)y=`<link rel="stylesheet" href="${p}">`;return`/**
|
|
1011
1011
|
* ${s} Web Component
|
|
1012
1012
|
* Auto-generated from stx component
|
|
1013
1013
|
*/
|
|
@@ -1307,6 +1307,6 @@ ${y}
|
|
|
1307
1307
|
customElements.define('${s}', ${d});
|
|
1308
1308
|
`}async function Ze(e,s,i,o){if(s.length<1)return c("WebComponent","@webcomponent directive requires at least the tag name parameter",t.INVALID_DIRECTIVE_SYNTAX);let n=s[0].replace(/['"]/g,""),d=(i.__stx_options||{}).componentsDir||"components",p=q.isAbsolute(d)?[q.join(d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)]:[q.join(q.dirname(o),d,`${n}.stx`),q.join(process.cwd(),d,`${n}.stx`),q.join(q.dirname(o),`${n}.stx`)],u=null;for(let f of p)if(await r(f)){u=await Bun.file(f).text();break}if(!u)return c("WebComponent",`Component file not found: ${n}.stx`,t.FILE_NOT_FOUND);let m=Ft(u,n);return`<script type="module">
|
|
1309
1309
|
${qt(m)}
|
|
1310
|
-
</script>`}var j={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:cn,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},ic,ac,ms,hs,De,ke,Ae,Pe,_e,Oe,Fe,$e,...qs],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function Ef(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(mc(e.stateDir),e.stateDir=fr(),e.cachePath=gr(e.cachePath),e.build)e.build.cacheDir=gr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=gr(e.media.cache.directory);if(e.story)e.story.outDir=gr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function jo(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==ps(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-z5tejqpn.js"),{partialsCache:p}=await import("./chunk-j0emb851.js");if(d(),p.clear(),l&&i.configSignature===gs(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await Fo(y,s),de.set(s,{graph:y,signature:ps(y),configSignature:gs(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await jo({name:"ui",cwd:N.join(s,"config"),defaultConfig:j,errorPolicy:"throw",verbose:!1});u=(await jo({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await jo({name:"stx",alias:"ui",cwd:s,defaultConfig:j,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await lc(s,j);u=v.config,de.set(s,{graph:v.graph,signature:ps(v.graph),configSignature:gs(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-k83z4nyg.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-bwhv3fhm.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),Ef(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-ycxwf633.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
|
|
1311
|
-
`)}catch(A){console.warn(`[stx] Failed to load plugin ${S}:`,A.message)}}u._pluginComponentDirs=b,u._pluginPageDirs=x}return u})();if(Y.set(s,n),n.catch(()=>{if(Y.get(s)===n)Y.delete(s)}),!e)se=n,n.then((l)=>{K=l}).catch(()=>{});return n}var P=new Proxy(j,{get(e,s){if(K&&s in K)return K[s];if(!se)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[s]}});function
|
|
1312
|
-
export{
|
|
1310
|
+
</script>`}var j={enabled:!0,ssr:!1,partialsDir:"partials",componentsDir:"components",layoutsDir:"layouts",defaultLayout:"default",debug:!1,cache:!0,stateDir:cn,cachePath:".stx/cache",cacheVersion:"1.0.0",componentRenderCacheBytes:33554432,build:{pagesDir:"pages",outputDir:"dist",baseUrl:"/",sitemap:!0,minify:!0,cache:!0,cacheDir:".stx/ssg-cache",concurrency:10,generate404:!0,publicDir:"public",trailingSlash:!1,cleanOutput:!0},customDirectives:[{name:"markdown",handler:Ie,hasEndTag:!0,description:"Render markdown content to HTML"},{name:"webcomponent",handler:Ze,hasEndTag:!1,description:"Include a web component in the template"},ac,cc,hs,ys,De,ke,Ae,Pe,_e,Oe,Fe,$e,...Ks],middleware:[],i18n:{defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},webComponents:{enabled:!1,outputDir:"dist/web-components",components:[]},docs:{enabled:!1,outputDir:"docs",format:"markdown",components:!0,templates:!0,directives:!0},streaming:{enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},hydration:{enabled:!1,mode:"islands",clientEntry:"src/client.ts",autoMarkers:!0,preload:"lazy"},router:{enabled:!0,container:"main",linkSelector:"a[href]",viewTransitions:!0,scrollToTop:!0,scrollRestoration:!0,prefetch:!0,cache:!0,cacheTTL:300000,skipSelectors:'[data-no-router], [target="_blank"]',viewTransitionCSS:{oldRoot:"fade-out 0.15s ease-in",newRoot:"fade-in 0.2s ease-out",oldContent:"slide-out 0.2s ease-in",newContent:"slide-in 0.25s ease-out"}},a11y:{enabled:!0,addSrOnlyStyles:!0,level:"AA",autoFix:!1,ignoreChecks:[]},seo:{enabled:!0,socialPreview:!0,defaultConfig:{title:"stx Project",description:"A website built with stx templating engine"}},animation:{enabled:!0,defaultDuration:300,defaultEase:"ease",respectMotionPreferences:!0,staggerDelay:50},markdown:{enabled:!0,syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0,additionalThemes:["light-plus","one-dark-pro","dracula","monokai","solarized-light","nord","github-dark"]}},loops:{maxWhileIterations:1000,useAltLoopVariable:!1},story:{enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],port:6006},pwa:{enabled:!1,manifest:{name:"stx App",shortName:"stx",description:"A Progressive Web App built with stx",startUrl:"/",display:"standalone",orientation:"any",themeColor:"#000000",backgroundColor:"#ffffff",scope:"/"},icons:{src:"public/icon.png",sizes:[72,96,128,144,152,192,384,512],generateWebP:!0,generateAppleIcons:!0,outputDir:"pwa-icons",purpose:["any","maskable"]},routes:[{pattern:"/",strategy:"network-first"},{pattern:"/static/*",strategy:"cache-first",maxAgeSeconds:2592000},{pattern:"/api/*",strategy:"network-only"},{pattern:"*.js",strategy:"stale-while-revalidate"},{pattern:"*.css",strategy:"stale-while-revalidate"},{pattern:"*.png",strategy:"cache-first"},{pattern:"*.jpg",strategy:"cache-first"},{pattern:"*.webp",strategy:"cache-first"},{pattern:"*.svg",strategy:"cache-first"}],offline:{enabled:!0,fallbackTitle:"You are offline",fallbackMessage:"Please check your internet connection and try again.",precacheAssets:[]},serviceWorker:{fileName:"sw.js",cacheVersion:"1.0.0",skipWaiting:!0,clientsClaim:!0,navigationPreload:!1,excludeRoutes:["/api/auth/*"],cacheFileTypes:["html","css","js","png","jpg","jpeg","webp","svg","woff","woff2"],useWorkbox:!1},autoInject:!0,push:{enabled:!1,defaultOptions:{vibrate:[100,50,100],requireInteraction:!1}},backgroundSync:{enabled:!1,queueName:"stx-sync-queue",maxRetentionMinutes:1440,maxRetries:3,minInterval:1000,forms:[],endpoints:[]},shareTarget:{enabled:!1,action:"/share-target",method:"POST",enctype:"multipart/form-data",params:{title:"title",text:"text",url:"url"}},fileHandlers:{enabled:!1},protocolHandlers:[],cacheStorage:{maxSize:100,maxEntries:500,maxAge:30,purgeStrategy:"lru"},updates:{enabled:!0,promptUser:!0,autoReload:!1,message:"A new version is available. Reload to update?"},precache:{enabled:!0,includeHtml:!0,includeJs:!0,includeCss:!0,includeImages:!0,includeFonts:!0,include:[],exclude:["*.map","*.LICENSE.txt"],maxFileSizeKB:500}},media:{enabled:!0,image:{enabled:!0,defaultWidths:[320,480,640,768,1024,1280,1536,1920],defaultFormats:["avif","webp","jpeg"],defaultQuality:80,placeholderStrategy:"thumbhash",lazyByDefault:!0,enableDpr:!0,defaultDpr:[1,2,3],tsImages:{enabled:!0,outputDir:"dist/images",baseUrl:"/images",formatQuality:{jpeg:{quality:85,mozjpeg:!0,progressive:!0},png:{compressionLevel:9,palette:!1},webp:{quality:82,effort:5,smartSubsample:!0},avif:{quality:75,effort:4,lossless:!1}},breakpoints:[320,480,640,768,1024,1280,1536,1920],batchOptions:{concurrency:4,optimizationPreset:"web"}}},video:{enabled:!0,lazyByDefault:!0,defaultControls:!0,tsVideos:{enabled:!0,outputDir:"dist/videos",baseUrl:"/videos",defaultQuality:"high",streaming:{enabled:!0,format:"hls",segmentDuration:6,defaultQualities:[{label:"1080p",width:1920,height:1080,bitrate:5000000,audioBitrate:192000},{label:"720p",width:1280,height:720,bitrate:2500000,audioBitrate:128000},{label:"480p",width:854,height:480,bitrate:1e6,audioBitrate:96000}]},thumbnails:{enabled:!0,count:10,format:"webp",width:320},transcoding:{defaultCodec:"h264",defaultAudioCodec:"aac",speedPreset:"medium"}}},upload:{enabled:!0,maxSize:10485760,allowedTypes:["image/*","video/*","audio/*","application/pdf"],maxConcurrent:3},protected:{enabled:!0,expirationSeconds:3600,batchSize:10},cache:{enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500}},broadcasting:{enabled:!1,driver:"bun",host:"0.0.0.0",port:6001,scheme:"ws",verbose:!1}};function Ut(e,s,i){let o=s||"pages";if(e)return{root:e,pagesDir:o};let n=i||process.cwd(),l=N.join(n,"resources","views"),d=N.join(n,"resources","layouts");if(Q.existsSync(l)&&Q.existsSync(d))return{root:"resources",pagesDir:"views"};let p=N.join(n,"resources","views","pages");if(Q.existsSync(p))return{root:"resources/views",pagesDir:o};return{root:".",pagesDir:o}}var et=new Set,ue=["partialsDir","componentsDir","layoutsDir"],Se=new WeakMap;function Bt(e,s){let i=s.replace(/[\\/]+$/,"");if(!i||i===".")return!0;let o=e.replace(/\\/g,"/"),n=i.replace(/\\/g,"/");return o===n||o.startsWith(`${n}/`)}function Tf(e,s){let i=!e.root,o=Ut(e.root,e.pagesDir,s);if(e.root=o.root,e.pagesDir=o.pagesDir,i&&o.root!=="."){let n=`${s}::${o.root}`;if(!et.has(n))et.add(n),console.warn(`[stx] No "root" in config \u2014 inferred "${o.root}" from the project layout. Template directories are resolved under it; set root explicitly to pin this.`)}if(!Se.has(e)){let n={};for(let l of ue){let d=e[l];if(typeof d==="string"&&d)n[l]=d}Se.set(e,n)}if(e.root&&e.root!=="."){let n=e.root;for(let l of ue){let d=e[l];if(typeof d!=="string"||!d)continue;if(N.isAbsolute(d)||Bt(d,n))continue;e[l]=N.join(n,d)}}for(let n of ue){let l=e[n];if(typeof l!=="string"||!l||N.isAbsolute(l))continue;e[n]=N.resolve(s,l)}return e}function Jt(e,s){let i=Se.get(e);for(let o of ue){let n=e[o];if(typeof n!=="string"||!n)continue;let l=N.isAbsolute(n)?n:N.join(s,n);if(Q.existsSync(l))continue;let d=i?.[o]??n,p=e.root,u=!!p&&p!==".";console.warn(`[stx] ${String(o)} resolves to "${l}", which does not exist. Configured as "${d}"`+(u?`, resolved under root "${p}".`:"."))}}function Kt(e){if(e.customDirectives)e.customDirectives=[...e.customDirectives];if(e.middleware)e.middleware=[...e.middleware];if(e.apiRoutes)e.apiRoutes={...e.apiRoutes}}function Gt(e){if(hc(e.stateDir),e.stateDir=fr(),e.cachePath=gr(e.cachePath),e.build)e.build.cacheDir=gr(e.build.cacheDir);if(e.media?.cache)e.media.cache.directory=gr(e.media.cache.directory);if(e.story)e.story.outDir=gr(e.story.outDir)}var K=null,Y=new Map,de=new Map,se=null;async function Bo(e,s=Ht){try{return await s(e)}catch(i){if(i instanceof Error&&i.name==="ConfigNotFoundError")return{config:e.defaultConfig};throw i}}async function a(e){let s=e?N.resolve(e):process.cwd(),i=de.get(s);if(i&&i.signature!==gs(i.graph)){let l=Y.get(s);if(Y.delete(s),de.delete(s),!e)K=null,se=null;let{clearComponentCache:d}=await import("./chunk-zygpvm1x.js"),{partialsCache:p}=await import("./chunk-vqrg5j83.js");if(d(),p.clear(),l&&i.configSignature===ms(i.graph)){let u=l.then(async(m)=>{let y={...i.graph};await zo(y,s),de.set(s,{graph:y,signature:gs(y),configSignature:ms(y)});let f={...m,_layerGraph:y};if(!e)K=f;return f});return Y.set(s,u),u}}if(!e){if(K)return K;if(se)return se}let o=Y.get(s);if(o)return o;let n=(async()=>{let l=[".ts",".js",".mjs",".cjs",".json"],d=l.some((v)=>Q.existsSync(N.join(s,`stx.config${v}`))),p=l.some((v)=>Q.existsSync(N.join(s,"config",`ui${v}`))),u;if(d&&p){let v=await Bo({name:"ui",cwd:N.join(s,"config"),defaultConfig:j,errorPolicy:"throw",verbose:!1});u=(await Bo({name:"stx",alias:"ui",cwd:s,defaultConfig:v.config,errorPolicy:"throw",verbose:!1})).config}else u=(await Bo({name:"stx",alias:"ui",cwd:s,defaultConfig:j,errorPolicy:"throw",verbose:!1})).config;if(u.extends!==void 0||i){let v=await uc(s,j);u=v.config,de.set(s,{graph:v.graph,signature:gs(v.graph),configSignature:ms(v.graph)})}if(u.runtimeConfig){let{resolveRuntimeConfig:v}=await import("./chunk-tcrpa52j.js");v(u.runtimeConfig,{});let{generateRuntimeConfigTypes:b}=await import("./chunk-5z9a1vzw.js");await b(s,u.runtimeConfig)}Kt(u),Gt(u),Tf(u,s),Jt(u,s);let m=[],y=new Set((u.plugins??[]).map((v)=>typeof v==="string"?v:v[0]));for(let v of u.componentPackages??["@stacksjs/components"]){let b=`${v}/stx-plugin`;if(y.has(b)||y.has(v))continue;try{g.resolve(b,{paths:[s]}),m.push(b)}catch{}}let f=[...u.plugins??[],...m];if(f.length>0){let{pluginManager:v}=await import("./chunk-ka2f844k.js"),b=[],x=[];for(let k of f){let S=typeof k==="string"?k:k[0],_=typeof k==="string"?{}:k[1]||{};try{let A,E;try{let w=g.resolve(S,{paths:[s]});A=await import(w),E=N.dirname(w)}catch{let w=N.resolve(s,S);A=await import(w),E=N.dirname(w)}let I=A.default||A;if(!v.has(I.name))await v.register(I,u);if(I.components){let w=Array.isArray(I.components)?I.components:[I.components];for(let C of w)b.push(N.resolve(E,C))}if(I.pages){let w=N.resolve(E,I.pages),C=_.path||"/";x.push({dir:w,prefix:C})}if(I.setup){let w={addDirective:(C)=>{u.customDirectives=u.customDirectives||[],u.customDirectives.push(C)},addRoute:(C,D)=>{u.apiRoutes=u.apiRoutes||{},u.apiRoutes[C]=D},addMiddleware:(C)=>{u.middleware=u.middleware||[],u.middleware.push(C)},pluginDir:E,config:u};await I.setup(_,w)}process.stderr.write(`[stx] Plugin loaded: ${I.name||S}
|
|
1311
|
+
`)}catch(A){console.warn(`[stx] Failed to load plugin ${S}:`,A.message)}}u._pluginComponentDirs=b,u._pluginPageDirs=x}return u})();if(Y.set(s,n),n.catch(()=>{if(Y.get(s)===n)Y.delete(s)}),!e)se=n,n.then((l)=>{K=l}).catch(()=>{});return n}var P=new Proxy(j,{get(e,s){if(K&&s in K)return K[s];if(!se)a().catch((i)=>{console.warn("[stx] Failed to load config file:",i?.message||i)});return e[s]}});function yh(e){return e}function bh(e){let s=[],i=[];if(e.partialsDir!==void 0&&typeof e.partialsDir!=="string")s.push({path:"partialsDir",message:"partialsDir must be a string",severity:"error"});if(e.componentsDir!==void 0&&typeof e.componentsDir!=="string")s.push({path:"componentsDir",message:"componentsDir must be a string",severity:"error"});if(e.cache!==void 0&&typeof e.cache!=="boolean")s.push({path:"cache",message:"cache must be a boolean",severity:"error"});if(e.debug!==void 0&&typeof e.debug!=="boolean")s.push({path:"debug",message:"debug must be a boolean",severity:"error"});if(e.streaming){if(e.streaming.bufferSize!==void 0){if(typeof e.streaming.bufferSize!=="number"||e.streaming.bufferSize<=0)s.push({path:"streaming.bufferSize",message:"streaming.bufferSize must be a positive number",severity:"error"})}if(e.streaming.timeout!==void 0){if(typeof e.streaming.timeout!=="number"||e.streaming.timeout<=0)s.push({path:"streaming.timeout",message:"streaming.timeout must be a positive number",severity:"error"})}if(e.streaming.strategy!==void 0){let o=["auto","manual","sections"];if(!o.includes(e.streaming.strategy))s.push({path:"streaming.strategy",message:`streaming.strategy must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.i18n){if(e.i18n.format!==void 0){let o=["json","yaml","yml","js"];if(!o.includes(e.i18n.format))s.push({path:"i18n.format",message:`i18n.format must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.animation){if(e.animation.defaultDuration!==void 0){if(typeof e.animation.defaultDuration!=="number"||e.animation.defaultDuration<0)s.push({path:"animation.defaultDuration",message:"animation.defaultDuration must be a non-negative number",severity:"error"})}if(e.animation.staggerDelay!==void 0){if(typeof e.animation.staggerDelay!=="number"||e.animation.staggerDelay<0)s.push({path:"animation.staggerDelay",message:"animation.staggerDelay must be a non-negative number",severity:"error"})}}if(e.a11y){if(e.a11y.level!==void 0){let o=["AA","AAA"];if(!o.includes(e.a11y.level))s.push({path:"a11y.level",message:`a11y.level must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.hydration){if(e.hydration.mode!==void 0){let o=["progressive","islands"];if(!o.includes(e.hydration.mode))s.push({path:"hydration.mode",message:`hydration.mode must be one of: ${o.join(", ")}`,severity:"error"})}if(e.hydration.preload!==void 0){let o=["none","eager","lazy"];if(!o.includes(e.hydration.preload))s.push({path:"hydration.preload",message:`hydration.preload must be one of: ${o.join(", ")}`,severity:"error"})}}if(e.customDirectives)if(!Array.isArray(e.customDirectives))s.push({path:"customDirectives",message:"customDirectives must be an array",severity:"error"});else e.customDirectives.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`customDirectives[${n}].name`,message:"Custom directive must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`customDirectives[${n}].handler`,message:"Custom directive must have a handler function",severity:"error"})});if(e.middleware)if(!Array.isArray(e.middleware))s.push({path:"middleware",message:"middleware must be an array",severity:"error"});else e.middleware.forEach((o,n)=>{if(!o.name||typeof o.name!=="string")s.push({path:`middleware[${n}].name`,message:"Middleware must have a name string",severity:"error"});if(!o.handler||typeof o.handler!=="function")s.push({path:`middleware[${n}].handler`,message:"Middleware must have a handler function",severity:"error"});if(!o.timing||!["before","after"].includes(o.timing))s.push({path:`middleware[${n}].timing`,message:'Middleware timing must be "before" or "after"',severity:"error"})});if(e.debug===!0&&e.cache===!0)i.push({path:"debug+cache",message:"Debug mode with caching enabled may show stale content during development",severity:"warning"});if(e.seo?.enabled===!0&&!e.seo?.defaultConfig?.title)i.push({path:"seo.defaultConfig.title",message:"SEO is enabled but no default title is set",severity:"warning"});if(e.pwa){if(e.pwa.enabled===!0&&!e.pwa.manifest?.name)s.push({path:"pwa.manifest.name",message:"PWA manifest name is required when PWA is enabled",severity:"error"});if(e.pwa.manifest?.display!==void 0){let o=["fullscreen","standalone","minimal-ui","browser"];if(!o.includes(e.pwa.manifest.display))s.push({path:"pwa.manifest.display",message:`PWA display must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.manifest?.orientation!==void 0){let o=["portrait","landscape","any","portrait-primary","portrait-secondary","landscape-primary","landscape-secondary"];if(!o.includes(e.pwa.manifest.orientation))s.push({path:"pwa.manifest.orientation",message:`PWA orientation must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.routes){let o=["cache-first","network-first","stale-while-revalidate","network-only","cache-only"];e.pwa.routes.forEach((n,l)=>{if(!n.pattern||typeof n.pattern!=="string")s.push({path:`pwa.routes[${l}].pattern`,message:"PWA route must have a pattern string",severity:"error"});if(!o.includes(n.strategy))s.push({path:`pwa.routes[${l}].strategy`,message:`PWA route strategy must be one of: ${o.join(", ")}`,severity:"error"});if(n.maxAgeSeconds!==void 0&&(typeof n.maxAgeSeconds!=="number"||n.maxAgeSeconds<0))s.push({path:`pwa.routes[${l}].maxAgeSeconds`,message:"PWA route maxAgeSeconds must be a non-negative number",severity:"error"});if(n.maxEntries!==void 0&&(typeof n.maxEntries!=="number"||n.maxEntries<1))s.push({path:`pwa.routes[${l}].maxEntries`,message:"PWA route maxEntries must be a positive number",severity:"error"})})}if(e.pwa.icons?.sizes){if(!Array.isArray(e.pwa.icons.sizes))s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be an array of numbers",severity:"error"});else if(e.pwa.icons.sizes.filter((n)=>typeof n!=="number"||n<16||n>1024).length>0)s.push({path:"pwa.icons.sizes",message:"PWA icon sizes must be numbers between 16 and 1024",severity:"error"})}if(e.pwa.icons?.purpose){let o=["any","maskable","monochrome"];if(e.pwa.icons.purpose.filter((l)=>!o.includes(l)).length>0)s.push({path:"pwa.icons.purpose",message:`PWA icon purpose must be one of: ${o.join(", ")}`,severity:"error"})}if(e.pwa.enabled===!0&&!e.pwa.icons?.src)i.push({path:"pwa.icons.src",message:"PWA is enabled but no icon source specified. Provide a 512x512 PNG for best results.",severity:"warning"});if(e.pwa.enabled===!0&&!e.pwa.manifest?.themeColor)i.push({path:"pwa.manifest.themeColor",message:"PWA theme color not set, defaulting to black",severity:"warning"})}return{valid:s.length===0,errors:s,warnings:i}}
|
|
1312
|
+
export{tc,nc,lr,Ye,rc,ps,j,Tf,Bo,a,P,yh,bh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ho,Vo,Uo,Wo,hs,ys,vh,wh,xh,Sh,bs,kh}from"./chunk-3z38swhv.js";import"./chunk-0tgrqhkr.js";export{kh as generateDefaultRobotsTxt,bs as generateRobotsTxt,wh as generateSitemap,xh as generateSitemapIndex,Wo as injectSeoTags,hs as metaDirective,Ho as processMetaDirectives,Uo as processSeoDirective,Vo as processStructuredData,vh as registerSeoDirectives,Sh as scanForSitemapEntries,ys as structuredDataDirective};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{_f,uh,dh,ph,fh,Cf,Ef,gh,mh,jo,hh,ar,cr,ds}from"./chunk-xzz36k99.js";import{et}from"./chunk-j2mpqa4p.js";import"./chunk-8w0cwcvk.js";import"./chunk-7mm5mvg0.js";import"./chunk-sj2a5twe.js";import"./chunk-0tgrqhkr.js";import"./chunk-89h4snzd.js";import"./chunk-236bdf7y.js";export{fh as __setSignalsGeneratorsForTest,et as cacheEngineFingerprint,cr as cacheTemplate,ar as checkCache,hh as clearDevCaches,Ef as getCachedRouterScript,Cf as getCachedSignalsRuntime,gh as getServeClientAsset,jo as getServeModuleBundle,ds as hashFilePath,dh as invalidateFileCache,ph as invalidateFileCacheByDir,uh as readFileCached,mh as registerServeModuleBundle,_f as templateCache};
|