@stacksjs/stx 0.2.907 → 0.2.910
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-x39v2ch2.js → chunk-0mxkw6m6.js} +10 -5
- package/dist/{chunk-qvj0bzw5.js → chunk-13kfjnyn.js} +4 -4
- package/dist/chunk-1a911c4c.js +2 -0
- package/dist/{chunk-vbh5tknp.js → chunk-24hrd8sg.js} +1 -1
- package/dist/{chunk-j90sfypd.js → chunk-29trx6h3.js} +1 -1
- package/dist/{chunk-sjrx0dj8.js → chunk-2cbrcb9m.js} +1 -1
- package/dist/{chunk-xfjp5q2m.js → chunk-2r84qtat.js} +2 -2
- package/dist/{chunk-gjnxnfrg.js → chunk-3760wpvw.js} +1 -1
- package/dist/chunk-3rzpkjmn.js +2 -0
- package/dist/{chunk-9bc23bv2.js → chunk-44qcbbc4.js} +1 -1
- package/dist/{chunk-wk6g0b9h.js → chunk-4ccbj4z6.js} +1 -1
- package/dist/{chunk-rt6fn071.js → chunk-4ge69wvr.js} +1 -1
- package/dist/{chunk-jj78m9k1.js → chunk-4kh0616n.js} +4 -4
- package/dist/{chunk-ab1z38gj.js → chunk-4zw9trtx.js} +1 -1
- package/dist/{chunk-zrsrhdxw.js → chunk-5k55yk8g.js} +1 -1
- package/dist/{chunk-yqs88qj4.js → chunk-688hf1mx.js} +1 -1
- package/dist/chunk-6w9sgs52.js +2 -0
- package/dist/{chunk-nmywrw6v.js → chunk-7apr0ww2.js} +1 -1
- package/dist/chunk-7w9ksdbp.js +2 -0
- package/dist/{chunk-mkm9drk3.js → chunk-850b0cxa.js} +1 -1
- package/dist/{chunk-gjzs6p2v.js → chunk-87aqcw1w.js} +1 -1
- package/dist/{chunk-p3et6xjr.js → chunk-8d6wkfdx.js} +1 -1
- package/dist/{chunk-afmmrqee.js → chunk-94k80qpp.js} +1 -1
- package/dist/{chunk-6bgerbgh.js → chunk-9grwqzpe.js} +1 -1
- package/dist/{chunk-42z7zv92.js → chunk-9nf58keq.js} +1 -1
- package/dist/chunk-9yvhj108.js +2 -0
- package/dist/{chunk-zcwx8z8z.js → chunk-a259mfax.js} +2 -2
- package/dist/{chunk-5m4zgt4m.js → chunk-ah615efp.js} +1 -1
- package/dist/{chunk-fwffn130.js → chunk-anj2j86n.js} +2 -2
- package/dist/{chunk-bcspywrd.js → chunk-azyq6fds.js} +1 -1
- package/dist/{chunk-exc8y30f.js → chunk-ba27s9vr.js} +1 -1
- package/dist/{chunk-w1pga3s6.js → chunk-c829tgwv.js} +1 -1
- package/dist/{chunk-yt8k715e.js → chunk-caaexbqy.js} +1 -1
- package/dist/{chunk-q2jag6wt.js → chunk-ccq7d7ar.js} +1 -1
- package/dist/{chunk-wxk0t61p.js → chunk-cd2jc724.js} +1 -1
- package/dist/chunk-cf4apy9s.js +3 -0
- package/dist/{chunk-se0pjx71.js → chunk-cqcxj08t.js} +1 -1
- package/dist/{chunk-4a6mptfc.js → chunk-cw7vnkc8.js} +1 -1
- package/dist/{chunk-3611xczp.js → chunk-d5szrgdq.js} +1 -1
- package/dist/{chunk-3yr0wyc9.js → chunk-dh4p07cc.js} +1 -1
- package/dist/{chunk-20zx1msx.js → chunk-dqt1kw68.js} +1 -1
- package/dist/{chunk-4nc8vdef.js → chunk-e4fseqnv.js} +1 -1
- package/dist/{chunk-bpx9cys7.js → chunk-g17g6w1t.js} +2 -2
- package/dist/{chunk-fds6vvq0.js → chunk-ggez55jb.js} +107 -107
- package/dist/{chunk-kcphqn2k.js → chunk-gt3426kc.js} +1 -1
- package/dist/{chunk-83g4169y.js → chunk-gwvkqf5r.js} +4 -4
- package/dist/{chunk-9xzej52j.js → chunk-jcp3rs1t.js} +1 -1
- package/dist/{chunk-r5xt6vdq.js → chunk-kvcz1926.js} +1 -1
- package/dist/{chunk-xpcqyzdc.js → chunk-kvrbdez2.js} +1 -1
- package/dist/{chunk-z0d1asbw.js → chunk-magfdzdj.js} +1 -1
- package/dist/{chunk-nzqr3w35.js → chunk-pgqc8895.js} +4 -4
- package/dist/{chunk-c5cxpkfy.js → chunk-ph8k7jdx.js} +2 -2
- package/dist/{chunk-96wdxfn4.js → chunk-pmmctgdd.js} +1 -1
- package/dist/{chunk-wna2herj.js → chunk-pn3gj7zm.js} +1 -1
- package/dist/{chunk-4dh1b9yr.js → chunk-q33tyfpp.js} +1 -1
- package/dist/{chunk-xahn0h9f.js → chunk-q6jecdtg.js} +1 -1
- package/dist/{chunk-6qgrr453.js → chunk-r2ns89f7.js} +1 -1
- package/dist/{chunk-ta5fpj2a.js → chunk-r425m35g.js} +1 -1
- package/dist/chunk-ssdjny2r.js +2 -0
- package/dist/chunk-sx1jg8dw.js +2 -0
- package/dist/{chunk-m9cye9t8.js → chunk-vd03gnnb.js} +5 -5
- package/dist/chunk-vf29gp9a.js +2 -0
- package/dist/{chunk-e4tbq8a0.js → chunk-x40j9ta1.js} +2 -2
- package/dist/{chunk-tszhkmny.js → chunk-xjbj655y.js} +3 -3
- package/dist/{chunk-4345d8s9.js → chunk-ya8nwtdn.js} +1 -1
- package/dist/{chunk-vmphrcaa.js → chunk-zbzfkh3m.js} +1 -1
- package/dist/cli.js +8 -8
- package/dist/client/signals-loop-conditional-runtime.js +5 -0
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/stx-virtual-ts.js +5 -9
- package/package.json +5 -5
- package/dist/chunk-218pnbaf.js +0 -2
- package/dist/chunk-257msenj.js +0 -3
- package/dist/chunk-291860br.js +0 -2
- package/dist/chunk-3dy3hr8r.js +0 -2
- package/dist/chunk-47ver0g7.js +0 -2
- package/dist/chunk-4b9jx2c1.js +0 -2
- package/dist/chunk-j661q889.js +0 -2
- package/dist/chunk-qq31bcsq.js +0 -2
- package/dist/chunk-wchz1sye.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Dn,Ji}from"./chunk-
|
|
2
|
+
import{Dn,Ji}from"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";export{Ji as generateRuntimeConfigTypes,Dn as prepareRuntimeConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ns,$o,vm,su,Ro}from"./chunk-
|
|
2
|
+
import{ns,$o,vm,su,Ro}from"./chunk-g17g6w1t.js";import"./chunk-13awnyq0.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";export{vm as buildModuleRegistryScript,Ro as buildSharedModuleRegistries,su as exportsMutableBinding,ns as registeredModuleIdsIn,$o as registeredModuleNamesIn};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{il,s,Ce}from"./chunk-
|
|
2
|
+
import{il,s,Ce}from"./chunk-ggez55jb.js";import{gt}from"./chunk-zkwkhesc.js";import{l}from"./chunk-w4177qn3.js";import o from"fs";import u from"path";var wg=new Map,m=new Map;async function yy(e){let n;for(let i=0;i<3;i++)try{let g=(await o.promises.stat(e)).mtime.getTime(),a=m.get(e);if(a&&a.mtime===g)return a.content;let h=await Bun.file(e).text(),w=(await o.promises.stat(e)).mtime.getTime();if(w!==g)continue;return m.set(e,{content:h,mtime:w}),h}catch(r){n=r;break}throw m.delete(e),Error(`File not found: ${e}${n?` (${n.message})`:""}`)}function by(e){m.delete(e)}function wy(e){for(let t of m.keys())if(t.startsWith(e))m.delete(t)}var f=null,B=null,x=null;function vy(e){x=e}async function vg(e=!1){let t=x??await import("./chunk-4ge69wvr.js");if(e)return t.generateSignalsRuntimeDev();if(f===null)f=t.generateSignalsRuntime();return f}var S=null;async function xg(){if(S===null){let{getRouterScript:e}=await import("./chunk-pp89n1et.js");S=e()}return S}var y={};async function xy(e,t=!1){let n=e==="runtime"?await vg(t):await xg(),i=e==="runtime"&&t?"runtime-debug":e,r=y[i];if(!r||r.content!==n)r={content:n,hash:Bun.hash(n).toString(16).padStart(16,"0").slice(0,16)},y[i]=r;return{content:n,hash:r.hash,url:`/_stx/${e}.${r.hash}.js`}}var E=500,T=33554432,c=new Map,p=0;function C(e){return l(process.cwd(),"module-bundles",`${e}.js`)}function Sy(e){let t=Bun.hash(e).toString(16).padStart(16,"0").slice(0,16),n=c.get(t),i=n!==void 0;if(i)c.delete(t),p-=n.length*2;c.set(t,e),p+=e.length*2;while(c.size>1&&(c.size>E||p>T)){let r=c.keys().next().value;p-=c.get(r).length*2,c.delete(r)}if(!i)try{let r=C(t);if(!o.existsSync(r))o.mkdirSync(u.dirname(r),{recursive:!0}),o.writeFileSync(r,e)}catch{}return`/_stx/modules.${t}.js`}function wi(e){if(!/^[0-9a-f]{16}$/.test(e))return;let t=c.get(e);if(t!==void 0)return t;try{return o.readFileSync(C(e),"utf8")}catch{return}}function ky(){m.clear(),Ce(),il(),f=null,B=null,S=null}function v(e){let t={debug:e.debug===!0,middleware:(e.middleware??[]).map((n)=>({name:n.name,timing:n.timing,handler:String(n.handler)})),customDirectives:(e.customDirectives??[]).map((n)=>({name:n.name,hasEndTag:n.hasEndTag===!0,rawParams:n.rawParams===!0,handler:String(n.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(t)).digest("hex")}async function Er(e,t){try{if(!t.cachePath)return null;let n=u.resolve(t.cachePath),i=u.join(n,`${Bs(e)}.html`),r=u.join(n,`${Bs(e)}.meta.json`);if(!await s(i)||!await s(r))return null;let g=await Bun.file(r).text(),a=JSON.parse(g);if(a.cacheVersion!==t.cacheVersion)return null;if(a.engine!==gt())return null;if(a.optionsSignature!==v(t))return null;if((await o.promises.stat(e)).mtime.getTime()>a.mtime)return null;for(let d of a.dependencies)if(await s(d)){if((await o.promises.stat(d)).mtime.getTime()>a.mtime)return null}else return null;return await Bun.file(i).text()}catch(n){return console.warn(`Cache error for ${e}:`,n),null}}async function Tr(e,t,n,i){try{if(!i.cachePath)return;let r=u.resolve(i.cachePath);await o.promises.mkdir(r,{recursive:!0});let g=u.join(r,`${Bs(e)}.html`),a=u.join(r,`${Bs(e)}.meta.json`),h=await o.promises.stat(e);await Bun.write(g,t);let d={sourcePath:e,mtime:h.mtime.getTime(),dependencies:Array.from(n),cacheVersion:i.cacheVersion,engine:gt(),optionsSignature:v(i),generatedAt:Date.now()};await Bun.write(a,JSON.stringify(d,null,2)),wg.set(e,{output:t,mtime:h.mtime.getTime(),dependencies:n})}catch(r){console.warn(`Failed to cache template ${e}:`,r)}}var _=16;function Bs(e){return new Bun.CryptoHasher("sha1").update(e).digest("hex").substring(0,_)}
|
|
3
3
|
export{wg,yy,by,wy,vy,vg,xg,xy,Sy,wi,ky,Er,Tr,Bs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ft}from"./chunk-b234w3mf.js";import{At,or}from"./chunk-
|
|
2
|
+
import{ft}from"./chunk-b234w3mf.js";import{At,or}from"./chunk-0mxkw6m6.js";import{ye,An,Rl,Al}from"./chunk-ggez55jb.js";import{qr,Kr,Xr,Jr,Le}from"./chunk-c08jvjqt.js";import{z}from"./chunk-w98yt4d4.js";import{Ji}from"./chunk-4zw9trtx.js";import{S}from"./chunk-x40j9ta1.js";import{i}from"./chunk-4kh0616n.js";import{q,a}from"./chunk-2r84qtat.js";import{Qc}from"./chunk-mpfm5ctr.js";import{Kn,Xn,ot,Fe,ja,Ba,Gn}from"./chunk-xjbj655y.js";import{vn,ti}from"./chunk-8d6wkfdx.js";import{Jn}from"./chunk-fznjm7qt.js";import{fn,gr,mr}from"./chunk-357qjcj1.js";import{re}from"./chunk-pgqc8895.js";import m from"fs";import c from"path";import{createHash as Y}from"crypto";function I(n){return Y("sha256").update(n).digest("hex").slice(0,8)}function W(n=!1){let l=n?or():At(),o=I(l);return{content:l,filename:`runtime.${o}.js`,hash:o}}function J(){let n=ft(),l=I(n);return{content:n,filename:`router.${l}.js`,hash:l}}import U from"path";import{createHash as Q}from"crypto";function ee(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 V(n,l,o={}){let r=U.resolve(n),e=await Bun.file(r).text(),x=Q("sha256").update(e).digest("hex").slice(0,16);Rl();let _={};try{_=await a(o.configDir)}catch{}let y=[],d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g;while((g=d.exec(e))!==null){let R=g[1];if(/\bserver\b/.test(R))y.push(g[2])}let u=new Set(y.flatMap((R)=>ye(R))),{context:D}=ee({__filename:r,__dirname:U.dirname(r),__stx_serverDeclared:u}),A=new Set,T={...q,..._,...o,buildMode:"compile",strict:!1},f=await i(e,D,r,T,A),w=Kn(f)+Xn(f)+ot(f),j=Al();return{route:l,sourceFile:n,html:f,fragment:w,placeholders:j,hasServerScripts:y.length>0,serverScriptContent:y,dependencies:Array.from(A),contentHash:x,status:An(e),streamTemplates:D.__streamTemplates}}var te=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function X(n,l){let o=0,r=0;if(!m.existsSync(n))return{copied:o,bytes:r};m.mkdirSync(l,{recursive:!0});function e(x,_){let y=m.readdirSync(x,{withFileTypes:!0});for(let d of y){if(te.has(d.name))continue;let g=c.join(x,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 Lm(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),x=c.resolve(o,n.componentsDir??e.componentsDir??"components"),_=c.resolve(o,n.partialsDir??e.partialsDir??"partials"),y=c.resolve(o,n.layoutsDir??e.layoutsDir??"layouts"),d=n.publicDir??e.publicDir??"public",g=Le(e.app?.head,{known:Jr,source:"app.head"}),u=e.app?.colorMode,D=e.router?.container||"main",A=n.routeRules??e.routeRules??{},T=Jn(A),f=n.serverApi??e.serverApi,w=typeof f==="object"?f:{};if(f)vn(o,w);if(e.runtimeConfig)z(e.runtimeConfig,{});if(m.existsSync(r))m.rmSync(r,{recursive:!0});let j=[c.join(r,"public","__stx"),c.join(r,"public","assets"),c.join(r,"server","pages"),c.join(r,"server","fragments")];for(let s of j)m.mkdirSync(s,{recursive:!0});console.log("[stx build] Discovering routes...");let R=re(o,{pagesDirs:e._layerPageDirs}),Z=["components","layouts","partials"],P=R.filter((s)=>!Z.some((h)=>s.pattern.startsWith(`/${h}/`)||s.pattern===`/${h}`));console.log(`[stx build] Found ${P.length} page routes (${R.length-P.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let v=W(n.debug),b=J();await Bun.write(c.join(r,"public","__stx",v.filename),v.content),await Bun.write(c.join(r,"public","__stx",b.filename),b.content),console.log(`[stx build] Runtime: ${v.filename} (${(v.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${b.filename} (${(b.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let B=[],O=[];for(let s of P){let h=T(s.pattern),M=h.rendering==="prerender";if(M&&(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 V(s.filePath,s.pattern,{configDir:o,componentsDir:x,partialsDir:_,layoutsDir:y,debug:n.debug});if(B.push(t),t.html=t.html.replace(/runtime\.__STX_HASH__\.js/g,v.filename).replace(/router\.__STX_HASH__\.js/g,b.filename),t.html=Xr(t.html,g,{bodyScripts:[`<script src="/__stx/${b.filename}"></script>`],...u&&{colorMode:u}}),u)t.html=qr(t.html,u);if(g.htmlAttrs)t.html=Kr(t.html,g.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(t.html)){let p=t.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(p&&p[1]){let G=p[1];t.html=t.html.replace(" "+G,""),t.html=t.html.replace(/<body([^>]*)>/,`<body$1 ${G}>`)}}if(t.html=t.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),t.html=await S(t.html),M){let p=await Gn(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=Fe(t.html,D,!0);let N=s.pattern==="/"?"index":s.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),K=c.join("server","pages",`${N}.compiled.json`),L=c.join("server","fragments",`${N}.html`);await Bun.write(c.join(r,K),JSON.stringify(t,null,2)),await Bun.write(c.join(r,L),t.fragment),O.push({pattern:s.pattern,compiledPath:K,fragmentPath:L,isDynamic:t.hasServerScripts,hasParams:s.pattern.includes(":")||s.pattern.includes("["),prerendered:M}),console.log(`[stx build] \u2713 ${s.pattern}`)}catch(t){if(Object.keys(h).length)throw t;console.error(`[stx build] \u2717 ${s.pattern}:`,t instanceof Error?t.message:t)}}let H=c.resolve(o,d);if(m.existsSync(H)){let{copied:s,bytes:h}=X(H,c.join(r,"public"));if(s>0)console.log(`[stx build] Copied ${s} public asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${d}/`)}let k=mr(o);if(k){let{copied:s,bytes:h}=X(k,c.join(r,"public",gr));if(s>0)console.log(`[stx build] Copied ${s} asset${s===1?"":"s"} (${(h/1024).toFixed(1)}KB) from ${fn}/`)}let E={runtime:v.filename,router:b.filename},C=ja(O,E,r);if(C.routeRules=A,C.routerContainer=D,f)C.apiRoutes=await ti(o,r,w);if(e.runtimeConfig)await Bun.write(c.join(r,"server/runtime-config.json"),JSON.stringify(e.runtimeConfig)),await Ji(o,e.runtimeConfig);if(e._layerGraph)await Bun.write(c.join(r,"server/layers.json"),JSON.stringify(Qc(e._layerGraph),null,2));Ba(C,r);let F=Date.now()-l;return console.log(`
|
|
3
3
|
[stx build] Done in ${F}ms \u2014 ${B.length} pages compiled`),{pageCount:B.length,assets:E,outputDir:r,duration:F}}
|
|
4
4
|
export{Lm};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ar}from"./chunk-b234w3mf.js";import{Wr}from"./chunk-c08jvjqt.js";import{a}from"./chunk-
|
|
2
|
+
import{Ar}from"./chunk-b234w3mf.js";import{Wr}from"./chunk-c08jvjqt.js";import{a}from"./chunk-2r84qtat.js";import{W,ut}from"./chunk-1jxkc6d0.js";import{zc}from"./chunk-sdf4c754.js";import{L,c}from"./chunk-8tfpv6zf.js";var x=/<style\b[^>]*>/iy,R=/<\/style>/gi,b=/<script\b[^>]*>/iy,S=/<template(?=[\s>/])[^>]*>/iy,w=/<\/template\s*>/iy;function _r(e){let r=0,t=0,s=-1;while(r<e.length){let n=e.indexOf("<",r);if(n===-1)return-1;if(e.startsWith("<!--",n)){let g=e.indexOf("-->",n+4);r=g===-1?e.length:g+3;continue}x.lastIndex=n;let u=x.exec(e);if(u){R.lastIndex=n+u[0].length;let g=R.exec(e);r=g===null?e.length:g.index+8;continue}S.lastIndex=n;let o=S.exec(e);if(o){if(t===0)s=n;t++,r=n+o[0].length;continue}w.lastIndex=n;let d=w.exec(e);if(d){if(t>0)t--;r=n+d[0].length;continue}if(b.lastIndex=n,b.test(e))return t>0?s:n;r=n+1}return-1}function re(e,r={}){return new Ar(e,r).routes}import y from"path";var T=new Map;async function h(e,r){let t=e,s=r;if(!t||!s)try{let d=await a();t||=d?.pagesDir||"pages",s||=d?.root||"."}catch{t||="pages",s||="."}let n=y.isAbsolute(t)?t:y.join(s,t),u=T.get(n);if(u)return u;let o=[];try{o=re(".",{pagesDir:n,emit:!1}).map((d)=>d.regex.source).filter(Boolean)}catch{o=[]}return T.set(n,o),o}function E(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function l(e){return E(JSON.stringify(e))}function Ae(e){return e.includes("data-stx-runtime")}function Bc(e){let r=/window\.stx\s*\.\s*[A-Za-z_$]|\}\s*=\s*window\.stx\s*;/g;for(let t=r.exec(e);t!==null;t=r.exec(e)){let s=e.slice(Math.max(0,t.index-80),t.index);if(/if\s*\(\s*window\.stx\s*\)|window\.stx\s*&&/.test(s))continue;return!0}return!1}function p(e,r){let t=_r(e),s=e.search(/<!doctype\b/i);if(t!==-1&&(s===-1||t>s))return e.slice(0,t)+r+`
|
|
3
3
|
`+e.slice(t);let n=Wr(e);if(n!==null)return`${e.slice(0,n)}
|
|
4
4
|
${r}${e.slice(n)}`;if(e.includes("</head>")){let o=L(e);return e.slice(0,o)+r+`
|
|
5
5
|
`+e.slice(o)}if(W(e))return ut(e,(o)=>`${o}
|
|
6
6
|
${r}`);return`${r}
|
|
7
|
-
${e}`}async function Cr(e,r){if(e.includes("data-stx-runtime")||e.includes("window.stx.state")||e.includes("STX Signals Runtime"))return e;if(r.buildMode==="serve"){let{getServeClientAsset:n}=await import("./chunk-
|
|
7
|
+
${e}`}async function Cr(e,r){if(e.includes("data-stx-runtime")||e.includes("window.stx.state")||e.includes("STX Signals Runtime"))return e;if(r.buildMode==="serve"){let{getServeClientAsset:n}=await import("./chunk-29trx6h3.js"),{url:u}=await n("runtime",r.debug===!0);return p(e,`<script data-stx-runtime src="${u}"></script>`)}if(r.buildMode==="compile")return p(e,'<script data-stx-runtime src="/__stx/runtime.__STX_HASH__.js"></script>');let{getCachedSignalsRuntime:t}=await import("./chunk-29trx6h3.js"),s=await t(r.debug);return p(e,`<script data-stx-scoped data-stx-runtime>${s}</script>`)}function O(e){return/<[a-z][^>]*?\sx-tooltip\s*=/i.test(e)}function Fc(e){if(e.includes("data-stx-tooltip-runtime")||!O(e))return e;let r=`<script data-stx-scoped data-stx-tooltip-runtime>${zc()}</script>`,t=c(e);if(t===-1)return`${e}
|
|
8
8
|
${r}`;return`${e.slice(0,t)}${r}
|
|
9
|
-
${e.slice(t)}`}var C=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function M(e){return C.test(e)||e.includes("__stxRouter)return")||e.includes("__stxRouter=true")}async function Pe(e,r){if(!e.includes("</body>"))return e;if(M(e))return e;let t=r?.router,s="",n="";{let i={};if(t){if(t.container)i.container=t.container;if(t.interceptAllLinks!==void 0)i.interceptAllLinks=t.interceptAllLinks;if(t.progress!==void 0)i.progress=t.progress;if(t.viewTransitions!==void 0)i.viewTransitions=t.viewTransitions;if(t.viewTransitionDuration!==void 0)i.viewTransitionDuration=t.viewTransitionDuration;if(t.viewTransitionEasing!==void 0)i.viewTransitionEasing=t.viewTransitionEasing;if(t.scrollToTop!==void 0)i.scrollToTop=t.scrollToTop;if(t.scrollRestoration!==void 0)i.scrollRestoration=t.scrollRestoration;if(t.prefetch!==void 0)i.prefetch=t.prefetch;if(t.cache!==void 0)i.cache=t.cache;if(t.progressColor!==void 0)i.progressColor=t.progressColor;if(t.progressHeight!==void 0)i.progressHeight=t.progressHeight;if(t.prefetchVisible!==void 0)i.prefetchVisible=t.prefetchVisible;if(t.prefetchVisibleMax!==void 0)i.prefetchVisibleMax=t.prefetchVisibleMax;if(t.prefetchBudgetBytes!==void 0)i.prefetchBudgetBytes=t.prefetchBudgetBytes;if(t.keepOpening!==void 0)i.keepOpening=t.keepOpening}try{let f=await h(r?.pagesDir,r?.root);if(f.length>0)if(r?.buildMode==="serve"){let{registerServeModuleBundle:_}=await import("./chunk-
|
|
9
|
+
${e.slice(t)}`}var C=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function M(e){return C.test(e)||e.includes("__stxRouter)return")||e.includes("__stxRouter=true")}async function Pe(e,r){if(!e.includes("</body>"))return e;if(M(e))return e;let t=r?.router,s="",n="";{let i={};if(t){if(t.container)i.container=t.container;if(t.interceptAllLinks!==void 0)i.interceptAllLinks=t.interceptAllLinks;if(t.progress!==void 0)i.progress=t.progress;if(t.viewTransitions!==void 0)i.viewTransitions=t.viewTransitions;if(t.viewTransitionDuration!==void 0)i.viewTransitionDuration=t.viewTransitionDuration;if(t.viewTransitionEasing!==void 0)i.viewTransitionEasing=t.viewTransitionEasing;if(t.scrollToTop!==void 0)i.scrollToTop=t.scrollToTop;if(t.scrollRestoration!==void 0)i.scrollRestoration=t.scrollRestoration;if(t.prefetch!==void 0)i.prefetch=t.prefetch;if(t.cache!==void 0)i.cache=t.cache;if(t.progressColor!==void 0)i.progressColor=t.progressColor;if(t.progressHeight!==void 0)i.progressHeight=t.progressHeight;if(t.prefetchVisible!==void 0)i.prefetchVisible=t.prefetchVisible;if(t.prefetchVisibleMax!==void 0)i.prefetchVisibleMax=t.prefetchVisibleMax;if(t.prefetchBudgetBytes!==void 0)i.prefetchBudgetBytes=t.prefetchBudgetBytes;if(t.keepOpening!==void 0)i.keepOpening=t.keepOpening}try{let f=await h(r?.pagesDir,r?.root);if(f.length>0)if(r?.buildMode==="serve"){let{registerServeModuleBundle:_}=await import("./chunk-29trx6h3.js");n=`<script data-stx-owned-routes src="${_(`(window.__stxRouterConfig=window.__stxRouterConfig||{}).ownedRoutes=${l(f)};
|
|
10
10
|
`)}"></script>
|
|
11
11
|
`}else i.ownedRoutes=f}catch{}if(Object.keys(i).length>0)s=`<script>window.__stxRouterConfig=${l(i)};</script>
|
|
12
|
-
`}let{getCachedRouterScript:u,getServeClientAsset:o}=await import("./chunk-
|
|
12
|
+
`}let{getCachedRouterScript:u,getServeClientAsset:o}=await import("./chunk-29trx6h3.js"),d=r?.buildMode==="compile"?'<script data-stx-router src="/__stx/router.__STX_HASH__.js"></script>':r?.buildMode==="serve"?`<script data-stx-router src="${(await o("router")).url}"></script>`:`<script data-stx-router>${await u()}</script>`,g=c(e);return e.slice(0,g)+s+n+d+`
|
|
13
13
|
</body>`+e.slice(g+7)}
|
|
14
14
|
export{_r,re,Ae,Bc,Cr,Fc,Pe};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{St,kt,_t}from"./chunk-5jc9hmwg.js";import"./chunk-4b110x6r.js";import"./chunk-phzhmnnm.js";import"./chunk-0jdz31q1.js";import"./chunk-ck4ypzet.js";import{y}from"./chunk-
|
|
2
|
+
import{St,kt,_t}from"./chunk-5jc9hmwg.js";import"./chunk-4b110x6r.js";import"./chunk-phzhmnnm.js";import"./chunk-0jdz31q1.js";import"./chunk-ck4ypzet.js";import{y}from"./chunk-ggez55jb.js";import"./chunk-c08jvjqt.js";import"./chunk-w98yt4d4.js";import"./chunk-4zw9trtx.js";import{nn,Eo,rn,va,xt,xa,To,sn,ka,on}from"./chunk-gfp39bzr.js";import M from"fs";import x from"path";function E(t,e){let r=[x.join(t.root,"stx.config.ts"),x.join(t.root,"stx.config.js"),x.join(t.root,"stx.config.mjs")],s=e.debounceMs??300,o=null,a=[];for(let c of r)try{if(!M.existsSync(c))continue;let n=M.watch(c,(d)=>{if(d==="change"){if(o)clearTimeout(o);o=setTimeout(async()=>{xa("Config file changed, restarting...");try{await e.onChange()}catch(p){xt(`Failed to restart: ${p}`)}},s)}});a.push(n)}catch{}return{stop(){if(o)clearTimeout(o);for(let c of a)c.close()}}}import w from"fs";import j from"path";var nt=".stx/story/analytics.json",st=1,A=1e4;class k{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(t){this.storagePath=j.join(t,nt),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let t=w.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:st,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let t=j.dirname(this.storagePath);if(await w.promises.mkdir(t,{recursive:!0}),this.storage.events.length>A)this.storage.events=this.storage.events.slice(-A);await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:at(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(t){this.storage.events.push({...t,timestamp:Date.now()}),this.dirty=!0}trackView(t,e){if(this.endViewTiming(t),this.viewStartTimes.set(t,Date.now()),this.track({type:"view",componentId:t,variantId:e}),this.currentSession&&!this.currentSession.componentViews.includes(t))this.currentSession.componentViews.push(t)}endViewTiming(t){let e=this.viewStartTimes.get(t);if(e){let r=Date.now()-e;this.track({type:"view",componentId:t,metadata:{duration:r,endView:!0}}),this.viewStartTimes.delete(t)}}trackPropChange(t,e,r){this.track({type:"prop_change",componentId:t,propName:e,metadata:{value:r}})}trackVariantSwitch(t,e){this.track({type:"variant_switch",componentId:t,variantId:e})}trackSearch(t,e){this.track({type:"search",query:t,metadata:{resultCount:e}})}getComponentAnalytics(t,e){let r=this.storage.events.filter((i)=>i.componentId===t),s=r.filter((i)=>i.type==="view"&&!i.metadata?.endView),o=r.filter((i)=>i.type==="prop_change"),a=r.filter((i)=>i.type==="variant_switch"),c={};for(let i of o)if(i.propName)c[i.propName]=(c[i.propName]||0)+1;let n={};for(let i of a)if(i.variantId)n[i.variantId]=(n[i.variantId]||0)+1;let d=new Set(this.storage.sessions.filter((i)=>i.componentViews.includes(t)).map((i)=>i.id)),p=r.filter((i)=>i.metadata?.duration).map((i)=>i.metadata.duration),u=p.length>0?p.reduce((i,l)=>i+l,0)/p.length:0,f=Object.entries(c).sort((i,l)=>l[1]-i[1]).slice(0,5).map(([i])=>i);return{componentId:t,componentName:e,viewCount:s.length,uniqueViews:d.size,lastViewed:s[s.length-1]?.timestamp,propChanges:c,topChangedProps:f,variantViews:n,avgTimeSpent:u}}getMostViewedComponents(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="view"&&r.componentId&&!r.metadata?.endView)e.set(r.componentId,(e.get(r.componentId)||0)+1);return Array.from(e.entries()).map(([r,s])=>({componentId:r,viewCount:s})).sort((r,s)=>s.viewCount-r.viewCount).slice(0,t)}getMostChangedProps(t=10){let e=new Map;for(let r of this.storage.events)if(r.type==="prop_change"&&r.propName)e.set(r.propName,(e.get(r.propName)||0)+1);return Array.from(e.entries()).map(([r,s])=>({propName:r,changeCount:s})).sort((r,s)=>s.changeCount-r.changeCount).slice(0,t)}getSearchAnalytics(){let t=this.storage.events.filter((o)=>o.type==="search"),e=new Map,r=0;for(let o of t){if(o.query)e.set(o.query,(e.get(o.query)||0)+1);if(o.metadata?.resultCount!==void 0)r+=o.metadata.resultCount}let s=Array.from(e.entries()).map(([o,a])=>({query:o,count:a})).sort((o,a)=>a.count-o.count).slice(0,10);return{totalSearches:t.length,topQueries:s,avgResultCount:t.length>0?r/t.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function at(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";import B from"path";var it=".stx/story/bookmarks.json",ct=1;class P{storage;storagePath;dirty=!1;constructor(t){this.storagePath=B.join(t,it),this.storage=this.loadStorage()}loadStorage(){try{let t=S.readFileSync(this.storagePath,"utf-8");return JSON.parse(t)}catch{return{version:ct,bookmarks:[]}}}async save(){if(!this.dirty)return;let t=B.dirname(this.storagePath);await S.promises.mkdir(t,{recursive:!0}),await S.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(t,e,r,s={}){let o={id:dt(),name:s.name||`${t}/${e}`,storyId:t,variantId:e,props:r,created:Date.now(),notes:s.notes,color:s.color};return this.storage.bookmarks.push(o),this.dirty=!0,o}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(t){return this.storage.bookmarks.filter((e)=>e.storyId===t)}getBookmark(t){return this.storage.bookmarks.find((e)=>e.id===t)}isBookmarked(t,e){return this.storage.bookmarks.some((r)=>r.storyId===t&&r.variantId===e)}updateBookmark(t,e){let r=this.getBookmark(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deleteBookmark(t){let e=this.storage.bookmarks.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.bookmarks.splice(e,1),this.dirty=!0,!0}toggleBookmark(t,e,r){let s=this.storage.bookmarks.find((a)=>a.storyId===t&&a.variantId===e);if(s)return this.deleteBookmark(s.id),{added:!1};return{added:!0,bookmark:this.addBookmark(t,e,r)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(t,e=!0){let r=JSON.parse(t),s=0;for(let o of r.bookmarks){if(e){let a=this.storage.bookmarks.find((c)=>c.id===o.id);if(a)Object.assign(a,o);else this.storage.bookmarks.push(o)}else this.storage.bookmarks.push(o);s++}if(s>0)this.dirty=!0;return s}}function dt(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var v=new Set;function N(){return{open(t){v.add(t),t.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(t){v.delete(t)},message(t,e){}}}function C(t){let e=JSON.stringify({...t,timestamp:t.timestamp||Date.now()});for(let r of v)try{r.send(e)}catch{v.delete(r)}}function V(t,e){C({type:"story-update",data:{storyId:t,...e}})}function H(t,e){C({type:"story-add",data:{storyId:t,...e}})}function O(t){C({type:"story-remove",data:{storyId:t}})}function F(t){return`
|
|
3
3
|
<script>
|
|
4
4
|
(function() {
|
|
5
5
|
const ws = new WebSocket('${t}');
|
|
@@ -556,7 +556,7 @@ window.__stxPerformance = {
|
|
|
556
556
|
|
|
557
557
|
window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
|
|
558
558
|
</script>
|
|
559
|
-
`}import T from"fs";import K from"path";var lt=".stx/story/presets.json",R=1,mt=10;class I{storage;storagePath;dirty=!1;constructor(t){this.storagePath=K.join(t,lt),this.storage=this.loadStorage()}loadStorage(){try{let t=T.readFileSync(this.storagePath,"utf-8"),e=JSON.parse(t);if(e.version!==R)return this.migrateStorage(e);return e}catch{return{version:R,presets:[],recentIds:[]}}}migrateStorage(t){return{version:R,presets:t.presets||[],recentIds:t.recentIds||[]}}async save(){if(!this.dirty)return;let t=K.dirname(this.storagePath);await T.promises.mkdir(t,{recursive:!0}),await T.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(t,e,r={}){let s={id:ut(),name:t,description:r.description,props:e,componentId:r.componentId,created:Date.now(),usageCount:0,tags:r.tags};return this.storage.presets.push(s),this.dirty=!0,s}getPreset(t){return this.storage.presets.find((e)=>e.id===t)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(t){return this.storage.presets.filter((e)=>!e.componentId||e.componentId===t)}getRecentPresets(){return this.storage.recentIds.map((t)=>this.getPreset(t)).filter((t)=>t!==void 0)}usePreset(t){let e=this.getPreset(t);if(!e)return;return e.lastUsed=Date.now(),e.usageCount++,this.storage.recentIds=[t,...this.storage.recentIds.filter((r)=>r!==t)].slice(0,mt),this.dirty=!0,e}updatePreset(t,e){let r=this.getPreset(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deletePreset(t){let e=this.storage.presets.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.presets.splice(e,1),this.storage.recentIds=this.storage.recentIds.filter((r)=>r!==t),this.dirty=!0,!0}searchPresets(t){let e=t.toLowerCase();return this.storage.presets.filter((r)=>{if(r.name.toLowerCase().includes(e))return!0;if(r.description?.toLowerCase().includes(e))return!0;if(r.tags?.some((s)=>s.toLowerCase().includes(e)))return!0;return!1})}getMostUsedPresets(t=5){return[...this.storage.presets].sort((e,r)=>r.usageCount-e.usageCount).slice(0,t)}exportPresets(t){let e=t?this.storage.presets.filter((r)=>t.includes(r.id)):this.storage.presets;return JSON.stringify({presets:e},null,2)}importPresets(t,e=!1){let r=JSON.parse(t),s=0;for(let o of r.presets){let a=this.storage.presets.find((c)=>c.id===o.id);if(a&&!e)continue;if(a)Object.assign(a,o);else this.storage.presets.push(o);s++}if(s>0)this.dirty=!0;return s}}function ut(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import _ from"fs";var q=new Map;async function b(t,e,r={}){let s=performance.now(),o=[];try{let a=await _.promises.stat(e),c=q.get(e),n;if(c&&c.mtime===a.mtimeMs)n=c.content;else n=await _.promises.readFile(e,"utf-8"),q.set(e,{content:n,mtime:a.mtimeMs,analyzed:null});let{processDirectives:d}=await import("./chunk-
|
|
559
|
+
`}import T from"fs";import K from"path";var lt=".stx/story/presets.json",R=1,mt=10;class I{storage;storagePath;dirty=!1;constructor(t){this.storagePath=K.join(t,lt),this.storage=this.loadStorage()}loadStorage(){try{let t=T.readFileSync(this.storagePath,"utf-8"),e=JSON.parse(t);if(e.version!==R)return this.migrateStorage(e);return e}catch{return{version:R,presets:[],recentIds:[]}}}migrateStorage(t){return{version:R,presets:t.presets||[],recentIds:t.recentIds||[]}}async save(){if(!this.dirty)return;let t=K.dirname(this.storagePath);await T.promises.mkdir(t,{recursive:!0}),await T.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(t,e,r={}){let s={id:ut(),name:t,description:r.description,props:e,componentId:r.componentId,created:Date.now(),usageCount:0,tags:r.tags};return this.storage.presets.push(s),this.dirty=!0,s}getPreset(t){return this.storage.presets.find((e)=>e.id===t)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(t){return this.storage.presets.filter((e)=>!e.componentId||e.componentId===t)}getRecentPresets(){return this.storage.recentIds.map((t)=>this.getPreset(t)).filter((t)=>t!==void 0)}usePreset(t){let e=this.getPreset(t);if(!e)return;return e.lastUsed=Date.now(),e.usageCount++,this.storage.recentIds=[t,...this.storage.recentIds.filter((r)=>r!==t)].slice(0,mt),this.dirty=!0,e}updatePreset(t,e){let r=this.getPreset(t);if(!r)return;return Object.assign(r,e),this.dirty=!0,r}deletePreset(t){let e=this.storage.presets.findIndex((r)=>r.id===t);if(e===-1)return!1;return this.storage.presets.splice(e,1),this.storage.recentIds=this.storage.recentIds.filter((r)=>r!==t),this.dirty=!0,!0}searchPresets(t){let e=t.toLowerCase();return this.storage.presets.filter((r)=>{if(r.name.toLowerCase().includes(e))return!0;if(r.description?.toLowerCase().includes(e))return!0;if(r.tags?.some((s)=>s.toLowerCase().includes(e)))return!0;return!1})}getMostUsedPresets(t=5){return[...this.storage.presets].sort((e,r)=>r.usageCount-e.usageCount).slice(0,t)}exportPresets(t){let e=t?this.storage.presets.filter((r)=>t.includes(r.id)):this.storage.presets;return JSON.stringify({presets:e},null,2)}importPresets(t,e=!1){let r=JSON.parse(t),s=0;for(let o of r.presets){let a=this.storage.presets.find((c)=>c.id===o.id);if(a&&!e)continue;if(a)Object.assign(a,o);else this.storage.presets.push(o);s++}if(s>0)this.dirty=!0;return s}}function ut(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import _ from"fs";var q=new Map;async function b(t,e,r={}){let s=performance.now(),o=[];try{let a=await _.promises.stat(e),c=q.get(e),n;if(c&&c.mtime===a.mtimeMs)n=c.content;else n=await _.promises.readFile(e,"utf-8"),q.set(e,{content:n,mtime:a.mtimeMs,analyzed:null});let{processDirectives:d}=await import("./chunk-ssdjny2r.js"),p={},u=h(n);if(u)try{await y(u,p,e)}catch(g){o.push(`Warning: Could not extract script variables: ${g instanceof Error?g.message:String(g)}`)}if(r.props)Object.assign(p,r.props);let i=await d(n,p,e,{},new Set),l=Z(n),m=h(n);return i=Q(i),i=tt(i,p),{html:i,css:l,js:m,errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}async function gt(t){try{let e=await _.promises.readFile(t,"utf-8"),r=h(e);if(!r)return null;let s={};if(await y(r,s,t),Array.isArray(s.variants))return s.variants;return null}catch{return null}}async function Y(t,e,r,s){let o=e.story?.variants;if(!o){let n=await gt(e.path);if(n)o=n}if(!o&&r==="default")return b(t,e.path,{props:s||{}});if(!o)return b(t,e.path,{props:s||{}});let a=o.find((n)=>n.id===r);if(!a&&r==="default")return b(t,e.path,{props:s||{}});if(!a)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${r}' not found`],duration:0};let c={...a.state,...s};if(a.source)return ft(t,a.source,c);return b(t,e.path,{props:c})}async function ft(t,e,r={}){let s=performance.now(),o=[];try{let{processDirectives:a}=await import("./chunk-ssdjny2r.js"),c={...r},n=h(e);if(n)try{await y(n,c,"inline-template.stx")}catch{}let p=await a(e,c,"inline-template.stx",{},new Set);return p=Q(p),p=tt(p,c),{html:p,css:Z(e),js:h(e),errors:o,duration:performance.now()-s}}catch(a){return o.push(a instanceof Error?a.message:String(a)),{html:`<div class="stx-render-error">${et(o[0])}</div>`,css:"",js:"",errors:o,duration:performance.now()-s}}}function Z(t){let e=[],r=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
|
|
560
560
|
`)}function Q(t){return t.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function h(t){let e=[],r=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,s=r.exec(t);while(s!==null)e.push(s[1].trim()),s=r.exec(t);return e.join(`
|
|
561
561
|
`)}function tt(t,e){let r=`<script>window.__stxProps = ${JSON.stringify(e)};</script>`;return t+r}function et(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}async function rt(t,e){let r=await sn(t);kt(t,r);let s=on(t.config,r);_t(t,s),console.log(` Found ${r.length} story files`);let o=typeof e.host==="string"?e.host:e.host===!0?"0.0.0.0":"localhost",a=new I(t.root),c=new P(t.root),n=new k(t.root),d=N(),p=Bun.serve({port:e.port,hostname:o,fetch:async(i,l)=>{let g=new URL(i.url).pathname;if(g==="/__hmr"){if(l.upgrade(i,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(g.startsWith("/api/"))return yt(t,g,i,{presetsManager:a,bookmarksManager:c,analyticsTracker:n});return ht(t,g,e.port)},websocket:{open(i){d.open(i)},close(i){d.close(i)},message(i,l){d.message(i,l)}}}),u=`http://${o}:${e.port}`,f=ka(t,async(i,l)=>{console.log(` [${i}] ${l.relativePath}`);let m=await sn(t);kt(t,m);let g=on(t.config,m);if(_t(t,g),i==="add")H(l.id,{fileName:l.fileName});else if(i==="unlink")O(l.id);else V(l.id,{fileName:l.fileName})});if(e.open){let i=u;try{let{exec:l}=await import("child_process"),m=process.platform;l(`${m==="darwin"?"open":m==="win32"?"start":"xdg-open"} ${i}`)}catch{}}return{server:p,url:u,close:async()=>{f(),p.stop()}}}async function yt(t,e,r,s){let{presetsManager:o,bookmarksManager:a,analyticsTracker:c}=s;if(e==="/api/stories")return Response.json({files:t.storyFiles.map((n)=>({id:n.id,fileName:n.fileName,relativePath:n.relativePath,treePath:n.treePath})),tree:t.tree});if(e.startsWith("/api/story/")){let n=e.slice(11),d=t.storyFiles.find((p)=>p.id===n);if(!d)return new Response("Story not found",{status:404});try{let p=await Bun.file(d.path).text();return Response.json({id:d.id,fileName:d.fileName,relativePath:d.relativePath,content:p})}catch{return new Response("Error reading story",{status:500})}}if(e==="/api/config")return Response.json({theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets});if(e.startsWith("/api/render/")){let n=new URL(r.url),d=e.slice(12).split("/"),p=d[0],u=d[1]||"default",f,i=n.searchParams.get("props");if(i)try{f=JSON.parse(i)}catch{}let l=t.storyFiles.find((m)=>m.id===p);if(!l)return new Response("Story not found",{status:404});try{let m=await Y(t,l,u,f);return Response.json({html:m.html,css:m.css,js:m.js,errors:m.errors,duration:m.duration})}catch(m){return Response.json({html:"",css:"",js:"",errors:[m instanceof Error?m.message:String(m)],duration:0},{status:500})}}if(e==="/api/presets"&&r.method==="GET")return Response.json({presets:o.getAllPresets()});if(e==="/api/presets"&&r.method==="POST")try{let n=await r.json(),d=o.createPreset(n.name,n.props,{componentId:n.componentId,description:n.description});return await o.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/presets/")&&!e.includes("/use")&&r.method==="GET"){let n=e.slice(13),d=o.getPreset(n);if(!d)return new Response("Preset not found",{status:404});return Response.json(d)}if(e.endsWith("/use")&&r.method==="POST"){let n=e.slice(13,-4),d=o.usePreset(n);if(!d)return new Response("Preset not found",{status:404});return await o.save(),Response.json(d)}if(e.startsWith("/api/presets/")&&r.method==="DELETE"){let n=e.slice(13);if(!o.deletePreset(n))return new Response("Preset not found",{status:404});return await o.save(),Response.json({success:!0})}if(e==="/api/bookmarks"&&r.method==="GET")return Response.json({bookmarks:a.getAllBookmarks()});if(e==="/api/bookmarks"&&r.method==="POST")try{let n=await r.json(),d=a.addBookmark(n.storyId,n.variantId,n.props,{name:n.name,notes:n.notes,color:n.color});return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/bookmarks/toggle"&&r.method==="POST")try{let n=await r.json(),d=a.toggleBookmark(n.storyId,n.variantId,n.props);return await a.save(),Response.json(d)}catch(n){return Response.json({error:String(n)},{status:400})}if(e.startsWith("/api/bookmarks/")&&e!=="/api/bookmarks/toggle"&&r.method==="GET"){let n=e.slice(15),d=a.getBookmark(n);if(!d)return new Response("Bookmark not found",{status:404});return Response.json(d)}if(e.startsWith("/api/bookmarks/")&&r.method==="DELETE"){let n=e.slice(15);if(!a.deleteBookmark(n))return new Response("Bookmark not found",{status:404});return await a.save(),Response.json({success:!0})}if(e==="/api/analytics/track"&&r.method==="POST")try{let n=await r.json();if(n.type==="view"&&n.componentId)c.trackView(n.componentId,n.variantId);else if(n.type==="prop_change"&&n.componentId&&n.propName)c.trackPropChange(n.componentId,n.propName,null);else if(n.type==="variant_switch"&&n.componentId&&n.variantId)c.trackVariantSwitch(n.componentId,n.variantId);else if(n.type==="search"&&n.query)c.trackSearch(n.query,0);return await c.save(),Response.json({success:!0})}catch(n){return Response.json({error:String(n)},{status:400})}if(e==="/api/analytics/summary"&&r.method==="GET")return Response.json({mostViewed:c.getMostViewedComponents(10),mostChangedProps:c.getMostChangedProps(10),searchAnalytics:c.getSearchAnalytics()});if(e.startsWith("/api/analytics/component/")&&r.method==="GET"){let n=e.slice(25),d=t.storyFiles.find((u)=>u.id===n),p=c.getComponentAnalytics(n,d?.fileName||n);return Response.json(p)}return new Response("Not found",{status:404})}function ht(t,e,r){let s=vt(t,r);return new Response(s,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function vt(t,e){let{theme:r}=t.config,s=r.title||"STX Story",o=`ws://localhost:${e}/__hmr`,a=F(o);return`<!DOCTYPE html>
|
|
562
562
|
<html lang="en" class="${r.darkClass||"dark"}">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ie,fo,Jg,Oy,Yg,Ny,Nn,g,Y,ae,Mn,Me,Zg,Xi,Qg,My,P,Gi,em,Dy,N,Ly}from"./chunk-
|
|
2
|
+
import{Ie,fo,Jg,Oy,Yg,Ny,Nn,g,Y,ae,Mn,Me,Zg,Xi,Qg,My,P,Gi,em,Dy,N,Ly}from"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{em as applyFilters,Ny as clearCustomFilters,Zg as clientLoopScopes,fo as defaultFilters,Mn as escapeAttributeValue,g as escapeHtml,Y as escapeHtmlValue,ae as escapeInterpolatedHtmlValue,N as evaluateExpression,Ie as findMustacheEnd,Yg as getAllFilters,Qg as interpolateScriptAttributes,Xi as interpolateScriptExpressions,My as interpolateScriptsInTemplate,P as processExpressions,Gi as processExpressionsChunked,Jg as registerFilter,Oy as registerFilters,Nn as replaceInterpolations,Dy as resetRejectedExpressionWarnings,Ly as unescapeHtml,Me as usesSignalsInScript};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{k,E,A,ee,O,so,ie}from"./chunk-
|
|
2
|
+
import{k,E,A,ee,O,so,ie}from"./chunk-ggez55jb.js";import{je}from"./chunk-ck4ypzet.js";import{Z}from"./chunk-13awnyq0.js";import{C}from"./chunk-4b110x6r.js";import{D,zn}from"./chunk-phzhmnnm.js";import{a}from"./chunk-2r84qtat.js";import{$e,yn,bn,wn}from"./chunk-4ccbj4z6.js";import{Ot}from"./chunk-anj2j86n.js";import{Rt,sr,un,ve}from"./chunk-jz37h2z0.js";import{I,rt}from"./chunk-e5rag6rh.js";import w from"path";var x=new Map,P=new Map,R=k(64),T=new Map,ne=["composables","functions"];function W(e){let s=w.basename(e,".ts");return s==="index"||s==="types"||e.endsWith(".d.ts")}async function se(e){if(e)return w.resolve(e);let s=`<default>:${process.cwd()}`,i=T.get(s);if(i!==void 0)return i;let t=await oe();if(t!==null)T.set(s,t);return t}async function oe(){let e=await a(),s=e.root||process.cwd(),i=e.composablesDir;if(i)return w.resolve(s,i);for(let t of ne){let n=w.resolve(s,t);try{let c=new Bun.Glob("**/*.ts");for await(let r of c.scan({cwd:n,absolute:!0}))if(!W(r))return n}catch{}}return null}async function X(e){let s=Array.isArray(e)?e:e?[w.resolve(e)]:(await a())._layerComposableDirs??[await se()].filter((t)=>!!t),i=new Map;for(let t of s){let n=new Bun.Glob("**/*.ts");try{for await(let c of n.scan({cwd:t,absolute:!0})){let r=w.relative(t,c);if(!W(c)&&!i.has(r))i.set(r,c)}}catch{}}return{key:s.join("\x00"),files:[...i.values()].sort()}}async function Uo(e){let{files:s}=await X(e),i=ie({loader:"ts",target:"browser",define:A()}),t=[];for(let n of s)try{let c=await Bun.file(n).text(),r=i.scan(c).exports.filter((d)=>d!=="default");if(r.length>0)t.push({file:n,names:r})}catch{}return t}function re(e,s){return new RegExp(`\\b${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(e)}function Q(e,s){let i=new Set(e.match(/\w+/g)),t=new Set;for(let n of s)if(/^\w+$/.test(n)?i.has(n):re(e,n))t.add(n);return t}var H=k(64);function U(e,s){let i=E(e,s.size),t=H.get(i);if(t)return t;let n;try{n=je(e,s)}catch{n=Q(e,s)}let c=[...e.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...e.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let r of c)for(let d of r[1].split(",")){let f=d.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(f&&s.has(f))n.add(f)}return H.set(i,n),n}function ae(e){return!e||/^(?:module|(?:text|application)\/(?:java|ecma)script|application\/stx-[\w-]+)$/i.test(e)}var q=k(256);function ce(e,s){let i=new Set(s),t="",n=0,c=new Set;for(let r of ee(e)){t+=e.slice(n,r.start),n=r.end;let d=O(r.attrs),f=e.slice(r.bodyStart,r.bodyEnd),u=d.get("type"),m=typeof u==="string"?u.trim():void 0;if(!ae(m)){if(!/json/i.test(m??""))t+=` ${f} `;continue}let h=Q(f,i);if(h.size===0)continue;let _=E(f,[...h].sort().join(",")),b=q.get(_);if(!b)b=U(f,h),q.set(_,b);for(let v of b)c.add(v)}t+=e.slice(n);for(let r of so(t))for(let d of U(r.code,i))c.add(d);return c}function le(e,s,i){let t=new Map;for(let{file:f,names:u}of e)for(let m of u)if(!t.has(m))t.set(m,f);let n=new Set(t.keys()),c=(f)=>{let u=[];for(let m of U(f,n))u.push(t.get(m));return u},r=new Set,d=i.flatMap((f,u)=>u===0?[...ce(f,t.keys())].map((m)=>t.get(m)):c(f));while(d.length>0){let f=[];for(let u of d){if(r.has(u))continue;r.add(u);for(let m of c(s.get(u)??""))if(!r.has(m))f.push(m)}d=f}return r}async function Vh(e,s,i,t){let{key:n,files:c}=await X(e);if(!n)return null;let r=()=>[...new Set([...c,...c.flatMap((o)=>$e(o))])],d=Rt(r());if(c.length===0)return ve(x,n,d,""),null;c.sort();let f=ie({loader:"ts",target:"browser",define:A()}),u=un(P,n,d);if(!u){let o=new Map,l=[];for(let p of c)try{let S=await Bun.file(p).text();o.set(p,S);let g=f.scan(S).exports.filter((te)=>te!=="default");if(g.length>0)l.push({file:p,names:g})}catch{o.set(p,"")}u=ve(P,n,d,{codeByFile:o,modules:l})}let{codeByFile:m,modules:h}=u,_;if(s===void 0)_=new Set(c);else{let o=i?[s,...i]:[s],l=E(o.join("\x00"),n,o.length,d),p=R.get(l);if(_=p??le(h,m,o),!p)R.set(l,_)}if(_.size===0)return null;let b=c.filter((o)=>_.has(o)),v=()=>{if(!t)return;for(let o of b)t.push(o,...$e(o))},N=`${n}\x00${b.join("\x00")}\x00${bn()}`,z=un(x,N,d);if(z!==void 0)return v(),z||null;let F=[],B=new Set,K=new Set;for(let o of b)try{let l=m.get(o)??await Bun.file(o).text(),p=w.basename(o,".ts");for(let g of l.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(g[1])K.add(g[1]);let S=[];try{for(let g of f.scan(l).exports)if(g!=="default")B.add(g),S.push(g)}catch{}if(l=D(l),yn(l))l=await wn(l,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:S}),l=Ot(l);l=zn(l),l=l.replace(/^export\s+(default\s+)?/gm,""),l=f.transformSync(l),F.push(`// Composable: ${p}
|
|
3
3
|
${l.trim()}`)}catch(l){console.warn(`[stx] Failed to load composable ${o}:`,l)}if(F.length===0||B.size===0)return ve(x,N,d,""),null;let V=[...B].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
|
|
4
4
|
`),G=JSON.stringify([...B]),M=F.join(`
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Qf,eg,$e,tg,Rc,mn,hn,sy,Ac,yn,hr,ng,rg,sg,Cs,og,ig,Pc,bn,ag,wn,Ic,oy}from"./chunk-
|
|
2
|
+
import{Qf,eg,$e,tg,Rc,mn,hn,sy,Ac,yn,hr,ng,rg,sg,Cs,og,ig,Pc,bn,ag,wn,Ic,oy}from"./chunk-4ccbj4z6.js";import"./chunk-8d6wkfdx.js";import"./chunk-cwcmmgvz.js";import"./chunk-13awnyq0.js";import"./chunk-2r84qtat.js";import"./chunk-r2ns89f7.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{hr as MODULE_SPECIFIER_PREFIX,Pc as assertBundleBuildCanSettle,Qf as bundleCacheDir,eg as bundleCacheEntryLimit,oy as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,$e as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,ig as isWithinBundlerCallback,bn as moduleSubstitutionKey,rg as normalizeRegistrySpecifiers,ag as queueClientBundleBuild,Rc as recordBundleFailure,ng as registryIdForPath,Ac as resolveBundlerFallback,sg as rewriteRegistryImports,sy as setBundlerFallbackMode,tg as shouldLogBundlerDiagnostics,Ic as tempBuildName,Cs as withModuleSubstitutes,og as withinBundlerCallback};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{cg,Nc,ay,Mc,lg,ug,Sn,xr,cy,dg,pg,ly,S}from"./chunk-
|
|
2
|
+
import{cg,Nc,ay,Mc,lg,ug,Sn,xr,cy,dg,pg,ly,S}from"./chunk-x40j9ta1.js";import"./chunk-kvrbdez2.js";import"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Sn as buildCss,dg as extractClassNames,ug as fingerprintConfig,pg as generateCss,cy as getCachedCSS,cg as getCssServeAsset,S as injectCss,Nc as loadCssEngine,Mc as loadCssEngineConfig,xr as rebuildCss,ay as resetCssCache,lg as resolveUserCssConfig,ly as withLinkedModuleBundles};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{M,n,u}from"./chunk-c08jvjqt.js";import{ae}from"./chunk-
|
|
2
|
+
import{M,n,u}from"./chunk-c08jvjqt.js";import{ae}from"./chunk-ggez55jb.js";import{xi}from"./chunk-razwegar.js";import E from"path";var S;async function W(){if(S!==void 0)return S;try{let e=await import("@stacksjs/ts-i18n");S=e.loadLocale??null}catch{S=null}return S}var T={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},v={},L={},k={};function J(e,s=0){if(s<=0)return!1;return Date.now()-e.loadedAt>s}async function G(e,s){if({...T,...s.i18n}.cache&&v[e]){let t=v[e],o=s.i18n?.cacheMaxAge??0;if(!J(t,o))return t.translations}if(L[e]?.state==="loading")return L[e].promise;k[e]="loading";let r=C(e,s).then((t)=>(k[e]="loaded",delete L[e],t)).catch((t)=>{throw k[e]="error",L[e]={promise:r,state:"error",error:t instanceof Error?t:Error(String(t))},t});return L[e]={promise:r,state:"loading"},r}async function C(e,s){let i={...T,...s.i18n},r=E.isAbsolute(i.translationsDir)?i.translationsDir:E.resolve(s.root||process.cwd(),i.translationsDir);try{let t=await W(),o=t?await t(e,{translationsDir:r,defaultLocale:i.defaultLocale,sources:ee(i.format)}):await Y(e,i,r);if(o===void 0){let c=e!==i.defaultLocale?await C(i.defaultLocale,s):{};if(i.cache)v[e]={translations:c,loadedAt:Date.now(),locale:e};return c}let l=o;if(i.cache)v[e]={translations:l,loadedAt:Date.now(),locale:e};return l}catch(t){if(s.debug)console.error(`Error loading translation file for locale "${e}":`,t);if(e!==i.defaultLocale)return C(i.defaultLocale,s);return{}}}async function Y(e,s,i){let r=E.join(i,`${e}${Z(s.format)}`);try{let t=await import(r);return t.default||t}catch(t){try{let o=await Bun.file(r).text();if(s.format==="yaml"||s.format==="yml")return Q(o);if(s.format==="json")return JSON.parse(o);throw t}catch{return}}}function Z(e){switch(e){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function Q(e){let s={},i=e.split(`
|
|
3
3
|
`),r=[{obj:s,indent:-1}];for(let t of i){let o=t.replace(/#.*$/,"").trimEnd();if(!o.trim())continue;let l=o.search(/\S/);if(l===-1)continue;while(r.length>1&&r[r.length-1].indent>=l)r.pop();let c=r[r.length-1].obj,a=o.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(a){let[,,g,p]=a,f=g.trim(),m=p.trim();if(m==="")c[f]={},r.push({obj:c[f],indent:l});else c[f]=X(m)}}return s}function X(e){if(e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"'))return e.slice(1,-1);let s=e.toLowerCase();if(s==="true"||s==="yes")return!0;if(s==="false"||s==="no")return!1;if(s==="null"||s==="~")return null;let i=Number(e);if(!Number.isNaN(i)&&e!=="")return i;return e}function ee(e){switch(e){case"yaml":case"yml":return["yaml"];case"js":case"ts":return["ts"];case"json":default:return["json"]}}async function te(e,s){return G(e,s)}function re(e,s){for(let i of e){let r=i.trim(),t=r.match(/^\{(\d+)\}\s*(.*)$/);if(t){let l=Number.parseInt(t[1],10);if(s===l)return t[2];continue}let o=r.match(/^\[(\d+),(\d+|\*)\]\s*(.*)$/);if(o){let l=Number.parseInt(o[1],10),c=o[2]==="*"?Number.POSITIVE_INFINITY:Number.parseInt(o[2],10);if(s>=l&&s<=c)return o[3];continue}}if(e.length===2)return s===1?e[0].trim():e[1].trim();if(s<e.length)return e[s].trim();return e[e.length-1].trim()}function ne(e,s={}){return j(e,s)}function j(e,s){let i="",r=0;while(r<e.length)if(e[r]==="{"){let t=ie(e,r);if(t===-1){i+=e[r],r++;continue}let o=e.slice(r+1,t);i+=se(o,s),r=t+1}else if(e[r]==="'"&&r+1<e.length)if(e[r+1]==="'")i+="'",r+=2;else if(e[r+1]==="{"||e[r+1]==="}")i+=e[r+1],r+=2;else i+=e[r],r++;else i+=e[r],r++;return i}function ie(e,s){let i=0;for(let r=s;r<e.length;r++)if(e[r]==="{")i++;else if(e[r]==="}"){if(i--,i===0)return r}return-1}function se(e,s){let i=oe(e);if(i.length===0)return`{${e}}`;let r=i[0].trim(),t=s[r];if(i.length===1)return t!==void 0?String(t):`{${r}}`;switch(i[1].trim().toLowerCase()){case"plural":return le(t,i.slice(2).join(","),s);case"select":return ue(t,i.slice(2).join(","));case"selectordinal":return de(t,i.slice(2).join(","));case"number":return pe(t,i[2]?.trim());case"date":return fe(t,i[2]?.trim());case"time":return me(t,i[2]?.trim());default:return t!==void 0?String(t):`{${e}}`}}function oe(e){let s=[],i="",r=0;for(let t=0;t<e.length;t++){let o=e[t];if(o==="{")r++,i+=o;else if(o==="}")r--,i+=o;else if(o===","&&r===0)s.push(i),i="";else i+=o}if(i)s.push(i);return s}function le(e,s,i){let r=Number(e)||0,t=P(s),o=`=${r}`;if(t[o])return R(t[o],r,i);let l=ce(r);if(t[l])return R(t[l],r,i);if(t.other)return R(t.other,r,i);return String(r)}function R(e,s,i){let r=e.replace(/#/g,String(s));return j(r,i)}function ce(e){let s=Math.abs(e),i=Math.floor(s),r=String(e).includes(".")?String(e).split(".")[1].length:0;if(i===1&&r===0)return"one";return"other"}function ue(e,s){let i=String(e||""),r=P(s);if(r[i])return r[i];return r.other||String(e)}function de(e,s){let i=Number(e)||0,r=P(s),t=ge(i);if(r[t])return r[t].replace(/#/g,String(i));if(r.other)return r.other.replace(/#/g,String(i));return String(i)}function ge(e){let s=Math.abs(e),i=s%10,r=s%100;if(i===1&&r!==11)return"one";if(i===2&&r!==12)return"two";if(i===3&&r!==13)return"few";return"other"}function P(e){let s={},i=/(\w+|=\d+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,r=i.exec(e);while(r!==null)s[r[1]]=r[2],r=i.exec(e);return s}function pe(e,s){let i=Number(e);if(Number.isNaN(i))return String(e);switch(s){case"integer":return Math.floor(i).toLocaleString();case"percent":return`${(i*100).toFixed(0)}%`;case"currency":return i.toLocaleString(void 0,{style:"currency",currency:"USD"});default:return i.toLocaleString()}}function fe(e,s){let i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e);let r={};switch(s){case"short":r.dateStyle="short";break;case"medium":r.dateStyle="medium";break;case"long":r.dateStyle="long";break;case"full":r.dateStyle="full";break;default:r.dateStyle="medium"}return i.toLocaleDateString(void 0,r)}function me(e,s){let i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e);let r={};switch(s){case"short":r.timeStyle="short";break;case"medium":r.timeStyle="medium";break;case"long":r.timeStyle="long";break;case"full":r.timeStyle="full";break;default:r.timeStyle="short"}return i.toLocaleTimeString(void 0,r)}function be(e){return/\{[^}]+,\s*(?:plural|select|selectordinal|number|date|time)\s*,/.test(e)}function O(e,s,i=!0,r={}){let t=e.split("."),o=s;for(let c of t){if(o===void 0||o===null)break;o=o[c]}if(o===void 0||o===null)return i?e:"";let l=String(o);if(be(l))return ne(l,r);if(l.includes("|")&&"count"in r){let c=Number(r.count),a=l.split("|");l=re(a,c)}for(let[c,a]of Object.entries(r)){let g=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`:${g}`,"g"),()=>String(a))}return l}var D=new Set(["ar","arc","ckb","dv","fa","he","khw","ks","nqo","prs","ps","sd","syr","ug","ur","uz-af","yi"]),he=new Set(["adlm","arab","aran","hebr","nkoo","rohg","syrc","thaa","yezi"]);function q(e){if(!e)return"ltr";let s=e.trim().toLowerCase().replace(/_/g,"-").split("-"),i=s[0];if(!i)return"ltr";let r=s[1]?.length===4?s[1]:void 0;if(r)return he.has(r)?"rtl":"ltr";if(s.length>1&&D.has(`${i}-${s[1]}`))return"rtl";return D.has(i)?"rtl":"ltr"}async function qc(e,s,i,r){let t=e,o=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)([\s\S]*?)@endtranslate/g,l={...T,...r.i18n},c=await te(l.locale,r);s.__translations=c,s.__locale=l.locale,s.__i18nConfig=l,t=await F(t,o,async(p,f,m,w,h)=>{try{let b={};if(m)try{let d=[()=>JSON.parse(m),()=>{let x=`{"data":${m}}`,A=JSON.parse(x);return typeof A.data==="object"?A.data:{}},()=>M(m,s)];for(let x of d)try{if(b=x(),Object.keys(b).length>0)break}catch{}}catch(d){if(r.debug)console.error("Error parsing parameters for @translate directive:",d)}let y=O(f,c,l.fallbackToKey,b);return y?ae(t,h,y,!1,p.length):w.trim()}catch(b){if(r.debug)console.error("Error processing @translate directive:",b);return u("Translate",`Error in @translate('${f}'): ${b instanceof Error?b.message:String(b)}`,n.EVALUATION_ERROR)}});let a=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]+\})\s*)?\)/g;if(r.debug){console.warn(`Processing translations in template. Sections: ${t.includes("<h2>Translation with Parameters</h2>")?"Parameters section found":"Parameters section missing"}`);let p=[...t.matchAll(a)];console.warn(`Found ${p.length} @translate matches`),p.forEach((f,m)=>console.warn(`Match ${m}: ${f[0]}, Key: ${f[1]}, Params: ${f[2]||"none"}`))}return t=await F(t,/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)/g,async(p,f,m,w)=>{try{let h={};if(m)try{let b=[()=>JSON.parse(m),()=>{let y=`{"data":${m}}`,d=JSON.parse(y);return typeof d.data==="object"?d.data:{}},()=>M(m,s)];for(let y of b)try{if(h=y(),Object.keys(h).length>0)break}catch{}}catch(b){if(r.debug)console.error("Error parsing parameters for @translate directive:",b)}return ae(t,w,O(f,c,l.fallbackToKey,h),!1,p.length)}catch(h){if(r.debug)console.error("Error processing @translate directive:",h);return u("Translate",`Error in @translate('${f}'): ${h instanceof Error?h.message:String(h)}`,n.EVALUATION_ERROR)}}),t}async function F(e,s,i){let r=[];return e.replace(s,(o,...l)=>{let c=i(o,...l).then((a)=>({match:o,replacement:a}));return r.push(c),o}),(await Promise.all(r)).reduce((o,{match:l,replacement:c})=>o.replace(l,()=>c),e)}function _(e,s){if(!e||q(e)!=="rtl")return!1;return!s||s.trim().toLowerCase()!=="rtl"}function V(e){if(!e)return!1;return e.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||e.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function I(e,s){let i=new RegExp(`\\b${s}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);if(!i)return null;return i[2]??i[3]??i[4]??null}function Kc(e,s,i,r){let t=e;t=t.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(l,c,a)=>{let p={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[c]||"Make this element accessible";return`<!-- a11y-hint: ${a||p} -->`});let o=/@screenReader\(([^@]*)\)@endScreenReader/g;return t=t.replace(o,(l,c)=>`<span class="sr-only">${c.trim()}</span>`),t=t.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(l,c,a)=>`<span id="${`desc-${c}`}" class="sr-only">${a}</span>`),t}function ye(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function xe(e){let s=new Map,i=e.replace(/<(\/?)([A-Z][\w:.-]*)(?=[\s/>])/g,(t,o,l)=>{let c=s.get(l);if(!c)c=`stx-a11y-component-${s.size}`,s.set(l,c);return`<${o}${c}`}),r=new Map([...s.entries()].map(([t,o])=>[o,t]));return{protectedSource:i,restore:(t)=>t.replace(/<(\/?)(stx-a11y-component-\d+)(?=[\s/>])/g,(o,l,c)=>{let a=r.get(c);return a?`<${l}${a}`:o})}}function we(e,s){let i=[],r=/<img\s+([^>]*)>/gi,t;t=r.exec(e);while(t!==null){let d=t[1];if(!/\balt\s*=/i.test(d))i.push({type:"missing-alt",element:t[0].substring(0,100),message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"});t=r.exec(e)}let o=/<button([^>]*)>\s*<\/button>/gi;t=o.exec(e);while(t!==null){let d=t[1];if(!/\baria-label\s*=/i.test(d)&&!/\btitle\s*=/i.test(d))i.push({type:"missing-accessible-name",element:t[0].substring(0,100),message:"Empty button missing accessible name",impact:"critical",help:"Add text content, aria-label, or title",helpUrl:"https://web.dev/learn/accessibility/aria-html/"});t=o.exec(e)}let l=/<a\s+([^>]*)>\s*<\/a>/gi;t=l.exec(e);while(t!==null){let d=t[1];if(!/\baria-label\s*=/i.test(d)&&!/\btitle\s*=/i.test(d))i.push({type:"link-missing-text",element:t[0].substring(0,100),message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"});t=l.exec(e)}let c=/<(input|select|textarea)\s+([^>]*)>/gi;t=c.exec(e);while(t!==null){let d=t[2];if(/\btype\s*=\s*["']hidden["']/i.test(d)){t=c.exec(e);continue}let x=/\baria-label\s*=/i.test(d)||/\baria-labelledby\s*=/i.test(d),A=d.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!x){let B=A&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${A[1]}["']`,"i").test(e),U=t.index,N=e.substring(0,U),Se=e.substring(U),H=(N.match(/<label\b/gi)||[]).length,z=(N.match(/<\/label>/gi)||[]).length,K=H>z;if(!B&&!K)i.push({type:"input-missing-label",element:t[0].substring(0,100),message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})}t=c.exec(e)}let a=/<h([1-6])[^>]*>/gi,g=[];t=a.exec(e);while(t!==null)g.push(Number.parseInt(t[1],10)),t=a.exec(e);let p=0;for(let d of g){if(p>0&&d>p+1)i.push({type:"heading-skip",element:`<h${d}>`,message:`Heading level skipped from h${p} to h${d}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});p=d}if(/<html\b/i.test(e)&&!/<html[^>]*\slang\s*=/i.test(e))i.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});let f=e.match(/<html\b([^>]*)>/i);if(f&&_(I(f[1],"lang"),I(f[1],"dir")))i.push({type:"missing-dir",element:f[0].substring(0,100),message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});let m=/<table([^>]*)>([\s\S]*?)<\/table>/gi;t=m.exec(e);while(t!==null){let d=t[2];if(!V(I(t[1],"role"))&&!/<th\b/i.test(d))i.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});t=m.exec(e)}let w=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;t=w.exec(e);while(t!==null){if(!/\bmuted\b/i.test(t[0]))i.push({type:"autoplay-audio",element:`<${t[1]}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"});t=w.exec(e)}let h=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;t=h.exec(e);while(t!==null)i.push({type:"positive-tabindex",element:`tabindex="${t[1]}"`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"}),t=h.exec(e);let b=/<iframe\s+([^>]*)>/gi;t=b.exec(e);while(t!==null){let d=t[1];if(!/\btitle\s*=/i.test(d)&&!/\baria-label\s*=/i.test(d))i.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"});t=b.exec(e)}let y=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;t=y.exec(e);while(t!==null){let d=t[1].toLowerCase(),x=t[2];if(d!=="button"&&!/\btabindex\s*=/i.test(x))i.push({type:"button-not-focusable",element:t[0].substring(0,100),message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"});t=y.exec(e)}return i}async function Ae(e,s){let{protectedSource:i}=xe(e);if(!ye())return we(i,s);let r=[];try{let t=globalThis.document.createElement("div");t.innerHTML=i,t.querySelectorAll("img").forEach((a)=>{if(!a.hasAttribute("alt"))r.push({type:"missing-alt",element:`<${a.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),t.querySelectorAll('button, a, [role="button"]').forEach((a)=>{if(!(a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby")||a.textContent&&a.textContent.trim().length>0))r.push({type:"missing-accessible-name",element:`<${a.outerHTML}>`,message:"Interactive element missing accessible name",impact:"critical",help:"Add text content, aria-label, or aria-labelledby",helpUrl:"https://web.dev/learn/accessibility/aria-html/"})}),t.querySelectorAll("input, select, textarea").forEach((a)=>{let g=a.getAttribute("id"),p=g&&t.querySelector(`label[for="${g}"]`),f=a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby"),m=a.closest("label")!==null;if(!p&&!f&&!m)r.push({type:"input-missing-label",element:`<${a.outerHTML}>`,message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})});let o=Array.from(t.querySelectorAll("h1, h2, h3, h4, h5, h6")),l=0;for(let a of o){let g=Number.parseInt(a.tagName.charAt(1));if(l>0&&g>l+1)r.push({type:"heading-skip",element:`<${a.outerHTML}>`,message:`Heading level skipped from h${l} to h${g}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});l=g}let c=t.querySelector("html");if(i.includes("<html")&&c&&!c.hasAttribute("lang"))r.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});if(c&&_(c.getAttribute("lang"),c.getAttribute("dir")))r.push({type:"missing-dir",element:"<html>",message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});if(t.querySelectorAll("a").forEach((a)=>{let g=a.textContent&&a.textContent.trim().length>0,p=a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby"),f=a.hasAttribute("title"),m=a.querySelector("img[alt]");if(!g&&!p&&!f&&!m)r.push({type:"link-missing-text",element:`<${a.outerHTML}>`,message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"})}),i.includes("<nav")||i.includes("<header")){if(!t.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&t.querySelectorAll("a").length>5)r.push({type:"missing-skip-link",element:"<nav>",message:"Consider adding a skip navigation link",impact:"minor",help:"Add a skip link to allow keyboard users to bypass navigation",helpUrl:"https://web.dev/learn/accessibility/focus/#skip-links"})}if(t.querySelectorAll("table").forEach((a)=>{if(V(a.getAttribute("role")))return;let g=a.querySelector("caption");if(!a.querySelector("th"))r.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});if(!g&&!a.hasAttribute("aria-label")&&!a.hasAttribute("aria-labelledby"))r.push({type:"table-missing-caption",element:"<table>",message:"Table missing caption or accessible name",impact:"minor",help:"Add a caption element or aria-label to describe the table",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"})}),t.querySelectorAll('[style*="color"]').forEach((a)=>{let g=a.getAttribute("style")||"";if(g.includes("color:")&&!g.includes("background"))r.push({type:"potential-contrast-issue",element:`<${a.tagName.toLowerCase()}>`,message:"Element has inline color style - verify contrast ratio",impact:"minor",help:"Ensure text has sufficient contrast ratio (4.5:1 for normal text)",helpUrl:"https://web.dev/learn/accessibility/color-contrast/"})}),t.querySelectorAll("video[autoplay], audio[autoplay]").forEach((a)=>{if(!a.hasAttribute("muted"))r.push({type:"autoplay-audio",element:`<${a.tagName.toLowerCase()}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"})}),t.querySelectorAll("[tabindex]").forEach((a)=>{if(Number.parseInt(a.getAttribute("tabindex")||"0")>0)r.push({type:"positive-tabindex",element:`<${a.tagName.toLowerCase()}>`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"})}),t.querySelectorAll('[role="button"]').forEach((a)=>{if(!a.hasAttribute("tabindex"))r.push({type:"button-not-focusable",element:`<${a.outerHTML}>`,message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"})}),i.includes("<body")&&!t.querySelector('main, [role="main"]'))r.push({type:"missing-main-landmark",element:"<body>",message:"Document missing main landmark region",impact:"moderate",help:"Add a main element to identify the primary content",helpUrl:"https://web.dev/learn/accessibility/structure/#landmarks"});t.querySelectorAll("iframe").forEach((a)=>{if(!a.hasAttribute("title")&&!a.hasAttribute("aria-label"))r.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"})})}catch(t){console.error(`Error checking accessibility in ${s}:`,t)}return r}async function Xc(e,s={}){let i={},{recursive:r=!0,ignorePaths:t=[]}=s,o=Array.isArray(e)?e:[e],l=await xi(o,{recursive:r,ignorePaths:t}),c=[];for(let a of l)try{let g=await Bun.file(a).text();if(a.endsWith("good-a11y.stx"))continue;let p=await Ae(g,a);if(c.push(a),p.length>0)i[a]=p}catch(g){console.error(`Error scanning ${a}:`,g)}return{results:i,scannedFiles:c}}var Gc={name:"a11y",handler:(e,s,i,r)=>{if(!s.length)return e;let t=s[0].replace(/['"]/g,""),o=s.length>1?s[1].replace(/['"]/g,""):"",c={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[t]||"Make this element accessible";return`<!-- a11y-hint: ${o||c} -->${e}`},hasEndTag:!1},Jc={name:"screenReader",handler:(e)=>`<span class="sr-only">${e}</span>`,hasEndTag:!0};
|
|
4
4
|
export{qc,Kc,Xc,Gc,Jc};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{hy,Os,gi,Ns,kr,mi,hi,yg,Ms,Ds,Ls,yi,jc,bg,Ot}from"./chunk-
|
|
2
|
+
import{hy,Os,gi,Ns,kr,mi,hi,yg,Ms,Ds,Ls,yi,jc,bg,Ot}from"./chunk-anj2j86n.js";import"./chunk-pgqc8895.js";import"./chunk-v0yay1kw.js";import"./chunk-2r84qtat.js";import"./chunk-r2ns89f7.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{G}from"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{yg as bindLoopInterpolations,hy as clearScriptScanCache,Ms as convertServerLoopAttributesToDirectives,mi as convertSignalDirectivesToAttributes,Ds as convertSignalLoopsToAttributes,kr as extractClientSignalNames,G as extractExports,jc as findMarkupIndexOutsideScripts,Ns as hasSignalsSyntax,gi as parseLoopExpression,hi as preEvalLiteralReactiveIfs,Ls as processScriptSetup,yi as processSignals,bg as rewriteStxImportSpecifiers,Os as scanScriptTags,Ot as stripStxRuntimeImports};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{br,i}from"./chunk-4kh0616n.js";import"./chunk-x40j9ta1.js";import"./chunk-13kfjnyn.js";import"./chunk-fs43342z.js";import"./chunk-ba27s9vr.js";import"./chunk-cf4apy9s.js";import"./chunk-c829tgwv.js";import"./chunk-9bexzgws.js";import"./chunk-anj2j86n.js";import{Pe}from"./chunk-pgqc8895.js";import"./chunk-v0yay1kw.js";import"./chunk-kvrbdez2.js";import"./chunk-13awnyq0.js";import"./chunk-2r84qtat.js";import"./chunk-r2ns89f7.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{Ke,lo,uo}from"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{br as buildModulesTag,Pe as injectRouterScript,i as processDirectives,lo as processJsonDirective,uo as processOnceDirective,Ke as validateClientScript};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ou,iu}from"./chunk-vd03gnnb.js";import"./chunk-72pbhpq8.js";import"./chunk-5k55yk8g.js";import"./chunk-zbzfkh3m.js";import"./chunk-d5szrgdq.js";import"./chunk-3m457a9q.js";import"./chunk-ta7cwykn.js";import"./chunk-94k80qpp.js";import"./chunk-magfdzdj.js";import"./chunk-xjbj655y.js";import"./chunk-6yketqa1.js";import"./chunk-9atdw0p8.js";import"./chunk-5jn2qyv7.js";import"./chunk-dh4p07cc.js";import"./chunk-gyv2bsmn.js";import"./chunk-2m4d8jkv.js";import"./chunk-gg31th5s.js";import"./chunk-1ezcxbpg.js";import"./chunk-jttzrv0w.js";import"./chunk-ekyx5z50.js";import"./chunk-cd2jc724.js";import"./chunk-688hf1mx.js";import"./chunk-nan0ysys.js";import"./chunk-zk1c6tg7.js";import"./chunk-jhegz7az.js";import"./chunk-pc89t52s.js";import"./chunk-9nf58keq.js";import"./chunk-pn3gj7zm.js";import"./chunk-0mxkw6m6.js";import"./chunk-a259mfax.js";import"./chunk-0vyytd9v.js";import"./chunk-8n42epb6.js";import{gn}from"./chunk-7apr0ww2.js";import{og}from"./chunk-4ccbj4z6.js";import"./chunk-8d6wkfdx.js";import"./chunk-cwcmmgvz.js";import{Ue,i}from"./chunk-4kh0616n.js";import"./chunk-x40j9ta1.js";import"./chunk-13kfjnyn.js";import"./chunk-fs43342z.js";import"./chunk-ba27s9vr.js";import"./chunk-cf4apy9s.js";import"./chunk-c829tgwv.js";import"./chunk-9bexzgws.js";import"./chunk-anj2j86n.js";import{Pe}from"./chunk-pgqc8895.js";import"./chunk-v0yay1kw.js";import{Er,Tr}from"./chunk-kvrbdez2.js";import"./chunk-13awnyq0.js";import{zs,q,a}from"./chunk-2r84qtat.js";import"./chunk-r2ns89f7.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{B,y,Je}from"./chunk-ggez55jb.js";import"./chunk-4zw9trtx.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";import{la}from"./chunk-8tfpv6zf.js";import"./chunk-fycxc75p.js";import"./chunk-d4hnj3ct.js";export{zs as buildWebComponents,Tr as cacheTemplate,Er as checkCache,gn as classifyAllScripts,ou as createMiddleware,iu as createRoute,q as defaultConfig,y as extractVariables,B as findSfcTemplateBlock,Pe as injectRouterScript,la as insertBeforeBodyClose,a as loadStxConfig,Je as processClientScript,i as processDirectives,Ue as readMarkdownFile,og as withinBundlerCallback};
|