@stacksjs/stx 0.2.287 → 0.2.288
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-mf4n3x1j.js → chunk-02af607x.js} +1 -1
- package/dist/chunk-06706a9a.js +2 -0
- package/dist/chunk-0896td83.js +2 -0
- package/dist/chunk-08yja60e.js +2 -0
- package/dist/{chunk-6hmnaza7.js → chunk-13tawjw8.js} +10 -10
- package/dist/{chunk-71t0yan0.js → chunk-1e83cj7k.js} +1 -1
- package/dist/chunk-1g6pvs7k.js +11 -0
- package/dist/chunk-1gvebxh4.js +2 -0
- package/dist/{chunk-ferav3bw.js → chunk-1t9g3mhg.js} +2 -2
- package/dist/{chunk-ypmqf7tm.js → chunk-2e6xafcm.js} +1 -1
- package/dist/chunk-2rfxs7zm.js +2 -0
- package/dist/{chunk-qc1f74ek.js → chunk-2vza9m2x.js} +1 -1
- package/dist/{chunk-ccspd3mc.js → chunk-2wtn443n.js} +1 -1
- package/dist/{chunk-rbb7dvja.js → chunk-34qkshwh.js} +2 -2
- package/dist/{chunk-dgrt76d2.js → chunk-3br3pt6k.js} +1 -1
- package/dist/{chunk-kdh37tp8.js → chunk-3p0n9ryv.js} +1 -1
- package/dist/chunk-437n7hyx.js +2 -0
- package/dist/{chunk-de7fye10.js → chunk-461br5nn.js} +1 -1
- package/dist/chunk-4tr92e0v.js +2 -0
- package/dist/{chunk-t6nseeb9.js → chunk-4vpsvh6x.js} +1 -1
- package/dist/{chunk-k56rjjc0.js → chunk-5j9tvhpq.js} +2 -2
- package/dist/{chunk-zqqx1qaj.js → chunk-5yp3vt00.js} +1 -1
- package/dist/{chunk-kxzb4et3.js → chunk-5zcg61j9.js} +2 -2
- package/dist/{chunk-nkb3scg6.js → chunk-6085vha7.js} +1 -1
- package/dist/{chunk-wrzwgkbx.js → chunk-72c7gyqc.js} +3 -3
- package/dist/chunk-811cxzn4.js +2 -0
- package/dist/{chunk-g4vpzv6b.js → chunk-8883pgj8.js} +1 -1
- package/dist/{chunk-vqxmxgaj.js → chunk-8bxtvsgm.js} +1 -1
- package/dist/{chunk-fvhm8psm.js → chunk-8daczchh.js} +1 -1
- package/dist/chunk-91ffbzmh.js +2 -0
- package/dist/chunk-96cqevhm.js +2 -0
- package/dist/chunk-978faewt.js +2 -0
- package/dist/{chunk-866y9d8b.js → chunk-9veqmqb6.js} +1 -1
- package/dist/{chunk-7q9mwh4v.js → chunk-a668m28h.js} +1 -1
- package/dist/{chunk-pzm13sdc.js → chunk-a9fxxwrv.js} +2 -2
- package/dist/chunk-adkjxvy6.js +2 -0
- package/dist/{chunk-sscwkffs.js → chunk-agx0620p.js} +1 -1
- package/dist/chunk-ak06mywr.js +2 -0
- package/dist/chunk-ayaz0wcj.js +2 -0
- package/dist/{chunk-1kah92n2.js → chunk-bphx7ngb.js} +2 -2
- package/dist/chunk-bw48gj8j.js +2 -0
- package/dist/{chunk-csbgwaa5.js → chunk-byq2xpgb.js} +1 -1
- package/dist/chunk-bzsjhyet.js +2 -0
- package/dist/{chunk-acn1b56m.js → chunk-ch31zddx.js} +2 -2
- package/dist/chunk-cqzqfm7m.js +2 -0
- package/dist/{chunk-dhh5q7qt.js → chunk-d0f60jrg.js} +2 -2
- package/dist/{chunk-8mjdpr94.js → chunk-dcxtrqfy.js} +1 -1
- package/dist/{chunk-b6ej2fdf.js → chunk-drbbt69f.js} +35 -10
- package/dist/chunk-e0aybavh.js +2 -0
- package/dist/chunk-e63a220e.js +28 -0
- package/dist/chunk-e67w1bge.js +2 -0
- package/dist/chunk-e7kd0ny8.js +2 -0
- package/dist/{chunk-9wr7zcad.js → chunk-ee2tfpec.js} +2 -2
- package/dist/{chunk-9n0gvfrg.js → chunk-efr3ejqt.js} +1 -1
- package/dist/chunk-evfct6hb.js +2 -0
- package/dist/{chunk-5w1e3yxs.js → chunk-favq46aa.js} +1 -1
- package/dist/{chunk-19nfvxfw.js → chunk-fcfphfpw.js} +2 -2
- package/dist/{chunk-b8rrnqry.js → chunk-ffmtamm2.js} +1 -1
- package/dist/{chunk-5kk8gsj2.js → chunk-fv923f7g.js} +1 -1
- package/dist/{chunk-jr3jp3ev.js → chunk-fvh9ca47.js} +1 -1
- package/dist/chunk-fxk9j0rm.js +2 -0
- package/dist/{chunk-zg75gjns.js → chunk-gy933rct.js} +1 -1
- package/dist/{chunk-r3ayvdz3.js → chunk-h61qt916.js} +1 -1
- package/dist/{chunk-v5e1gxwm.js → chunk-h7v70dbp.js} +1 -1
- package/dist/{chunk-bz820epz.js → chunk-hmf9z4jx.js} +1 -1
- package/dist/{chunk-7b329e5v.js → chunk-hqh7x9h5.js} +2 -2
- package/dist/{chunk-h4xh8cms.js → chunk-hv5v6vc2.js} +2 -2
- package/dist/{chunk-xttsqmkm.js → chunk-jem20v5k.js} +1 -1
- package/dist/{chunk-pkaabd8h.js → chunk-jj6yp7gm.js} +1 -1
- package/dist/{chunk-1kms3b9d.js → chunk-jv91rkhx.js} +1 -1
- package/dist/{chunk-a0nfbmeh.js → chunk-jyc9eha6.js} +1 -1
- package/dist/{chunk-w3ycm4na.js → chunk-k0y7ta0d.js} +1 -1
- package/dist/chunk-k4jt9t4p.js +2 -0
- package/dist/{chunk-9y0g8kzt.js → chunk-k70fgb2f.js} +1 -1
- package/dist/{chunk-74cv4ta1.js → chunk-k78gvm0g.js} +1 -1
- package/dist/{chunk-x650vjcp.js → chunk-kb5j08tq.js} +1 -1
- package/dist/{chunk-qy73j6m4.js → chunk-kf8t2wq7.js} +1 -1
- package/dist/chunk-kfy1jh6p.js +2 -0
- package/dist/chunk-kws4rewx.js +17 -0
- package/dist/{chunk-nnd4wq8j.js → chunk-mc58fhgm.js} +1 -1
- package/dist/{chunk-n3ggrhb3.js → chunk-mjpqz66q.js} +1 -1
- package/dist/{chunk-xgnc1wy6.js → chunk-mmnqd035.js} +1 -1
- package/dist/{chunk-54st8g2j.js → chunk-mywp77gt.js} +1 -1
- package/dist/{chunk-qzkhpsam.js → chunk-n0j85038.js} +1 -1
- package/dist/{chunk-se0p17c2.js → chunk-n5y9gh1q.js} +1 -1
- package/dist/{chunk-btav940g.js → chunk-n9kk3jz1.js} +1 -1
- package/dist/{chunk-248e84r1.js → chunk-nmkra8q5.js} +1 -1
- package/dist/{chunk-1q4y74mh.js → chunk-np5dc1q1.js} +1 -1
- package/dist/chunk-nygtwffe.js +5 -0
- package/dist/{chunk-tndhnk9e.js → chunk-p0zq5ckb.js} +1 -1
- package/dist/chunk-pb16azfa.js +4 -0
- package/dist/{chunk-nx5qkm8k.js → chunk-ps20v1ah.js} +1 -1
- package/dist/chunk-pv9apyrr.js +2 -0
- package/dist/{chunk-y11cxbxd.js → chunk-qj2s3r1w.js} +154 -155
- package/dist/chunk-qjkzpd68.js +11 -0
- package/dist/chunk-qww39be9.js +2 -0
- package/dist/chunk-r90w3x6h.js +2 -0
- package/dist/chunk-rb87b7kr.js +2 -0
- package/dist/{chunk-qr82je1m.js → chunk-rjqfa3g8.js} +2 -2
- package/dist/{chunk-2tk1zkrz.js → chunk-sag55qv7.js} +1 -1
- package/dist/chunk-srcbkg7g.js +2 -0
- package/dist/chunk-sxderfaa.js +12 -0
- package/dist/{chunk-38ejahd9.js → chunk-t5c7rk0h.js} +1 -1
- package/dist/chunk-v2z3creg.js +2 -0
- package/dist/chunk-vtjfv7kg.js +2 -0
- package/dist/{chunk-mkd9kjgb.js → chunk-vvqe2gaz.js} +2 -2
- package/dist/{chunk-bfqfs07m.js → chunk-vwzqg4fh.js} +2 -2
- package/dist/{chunk-vrrax298.js → chunk-vxxxczmn.js} +1 -1
- package/dist/chunk-vzzkhjw7.js +2 -0
- package/dist/{chunk-wcm80anz.js → chunk-wvq1g6gr.js} +1 -1
- package/dist/{chunk-y7m2dpd3.js → chunk-wyxw61az.js} +1 -1
- package/dist/{chunk-rj4kajww.js → chunk-xpct12p7.js} +1 -1
- package/dist/chunk-xvndd7h6.js +2 -0
- package/dist/{chunk-dtq7y5ym.js → chunk-y5jjrnfa.js} +1 -1
- package/dist/{chunk-ya386h70.js → chunk-ym4ggcpy.js} +1 -1
- package/dist/{chunk-92mj1t26.js → chunk-ymc99r5x.js} +2 -2
- package/dist/{chunk-refwkt87.js → chunk-ynt7y2n5.js} +1 -1
- package/dist/chunk-z6azwfb4.js +2 -0
- package/dist/chunk-zfnabevq.js +2 -0
- package/dist/{chunk-y98jsjqq.js → chunk-zqwmy0av.js} +1 -1
- package/dist/{chunk-hcq5dw7a.js → chunk-zvw2qgwt.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/client-module-registry.d.ts +36 -0
- package/dist/client-module-registry.js +55 -0
- package/dist/client-script-bundler.d.ts +39 -0
- package/dist/client-script-bundler.js +89 -12
- package/dist/client-script.js +5 -18
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/process.js +24 -3
- package/dist/pwa.js +2 -2
- package/dist/signal-processing.js +5 -4
- package/dist/ssg.js +2 -2
- package/dist/store-loader.js +1 -1
- package/dist/strip-literals.d.ts +20 -0
- package/dist/strip-literals.js +16 -0
- package/dist/utils.js +1 -1
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-122tyfre.js +0 -2
- package/dist/chunk-24ps8kft.js +0 -2
- package/dist/chunk-2et5hxfv.js +0 -2
- package/dist/chunk-2r1rd8f0.js +0 -2
- package/dist/chunk-3zv4wz87.js +0 -2
- package/dist/chunk-4122k1bh.js +0 -2
- package/dist/chunk-45az9zht.js +0 -2
- package/dist/chunk-4qr85f07.js +0 -2
- package/dist/chunk-4ww3znrr.js +0 -15
- package/dist/chunk-5a19dhx5.js +0 -2
- package/dist/chunk-6gdycmxr.js +0 -2
- package/dist/chunk-74v15e8z.js +0 -2
- package/dist/chunk-8fwerspy.js +0 -2
- package/dist/chunk-9b22663r.js +0 -2
- package/dist/chunk-9hjdgm4d.js +0 -2
- package/dist/chunk-awkq3xfx.js +0 -2
- package/dist/chunk-bs6kapy7.js +0 -2
- package/dist/chunk-d8t4sjsp.js +0 -2
- package/dist/chunk-dap191q2.js +0 -2
- package/dist/chunk-dsffsqnt.js +0 -2
- package/dist/chunk-g9csmj0s.js +0 -2
- package/dist/chunk-gtcrpmz1.js +0 -2
- package/dist/chunk-h8yqsz9m.js +0 -2
- package/dist/chunk-hm0xha6c.js +0 -12
- package/dist/chunk-jegt35zh.js +0 -2
- package/dist/chunk-mxfh1nxg.js +0 -2
- package/dist/chunk-nsp1cw38.js +0 -11
- package/dist/chunk-p3242nck.js +0 -2
- package/dist/chunk-p98kfh94.js +0 -2
- package/dist/chunk-q4p5k2p3.js +0 -2
- package/dist/chunk-qpyjak7z.js +0 -2
- package/dist/chunk-r7r66978.js +0 -2
- package/dist/chunk-rp4rjjmf.js +0 -2
- package/dist/chunk-sj9pmene.js +0 -2
- package/dist/chunk-svpqxn2c.js +0 -2
- package/dist/chunk-t8y1ggdy.js +0 -2
- package/dist/chunk-xpp135ad.js +0 -11
- package/dist/chunk-ydrz60kr.js +0 -2
- package/dist/chunk-z4jhj5e5.js +0 -28
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
export{M as
|
|
2
|
+
import{er as E}from"./chunk-qj2s3r1w.js";import{kv as D}from"./chunk-2vza9m2x.js";import I from"path";async function M(k={}){let G=performance.now(),J=k.root||process.cwd(),j=await E(),q=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${q.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(q==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,router:j.router,...k.ssg})}else{let{buildForProduction:z}=await import("./chunk-z6azwfb4.js");B=await z({outputDir:".output",debug:k.debug,...k.ssr})}let H=Math.round(performance.now()-G);return{mode:q,ssg:A,ssr:B,duration:H}}
|
|
3
|
+
export{M as Mg};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{hg as a,jg as JF,kg as ZF,lg as qF}from"./chunk-34qkshwh.js";import{rg as p}from"./chunk-rjqfa3g8.js";import{sj as C,tj as D}from"./chunk-9veqmqb6.js";import{Ek as QF,Fk as XF,Gk as YF}from"./chunk-58f0mthg.js";import{$n as o,Dp as FF,Hp as c,Km as u,cm as d,cr as n,em as l,er as N,gp as e,vp as t}from"./chunk-qj2s3r1w.js";import{yt as r}from"./chunk-72c7gyqc.js";import{_u as S,av as WF}from"./chunk-drbbt69f.js";import G from"fs";import Z from"path";import{createHash as $F}from"crypto";WF();function g(J){return $F("sha256").update(J).digest("hex").slice(0,8)}function f(J=!1){let q=J?D():C(),z=g(q);return{content:q,filename:`runtime.${z}.js`,hash:z}}function m(){let J=S(),q=g(J);return{content:J,filename:`router.${q}.js`,hash:q}}function UF(J){return{runtimeTag:J.runtime?`<script src="/__stx/${J.runtime.filename}"></script>`:"",routerTag:J.router?`<script src="/__stx/${J.router.filename}"></script>`:"",cssTag:J.css?`<link rel="stylesheet" href="/__stx/${J.css.filename}">`:""}}import h from"path";import{createHash as GF}from"crypto";function VF(J={}){let q=new Set;return{context:new Proxy(J,{get(Q,X){if(X in Q)return Q[X];if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return},has(Q,X){if(X in Q)return!0;if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return!1}}),accessedKeys:q}}async function i(J,q,z={}){let Q=h.resolve(J),X=await Bun.file(Q).text(),I=GF("sha256").update(X).digest("hex").slice(0,16);d();let K={};try{K=await N()}catch{}let B=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(X))!==null){let $=k[1];if(/\bserver\b/.test($))B.push(k[2])}let W=new Set(B.flatMap(($)=>p($))),{context:w}=VF({__filename:Q,__dirname:h.dirname(Q),__stx_serverDeclared:W}),E=new Set,L={...n,...K,...z,buildMode:"compile",strict:!1},_=await c(X,w,Q,L,E),U=a(_),H=l();return{route:q,sourceFile:J,html:_,fragment:U,placeholders:H,hasServerScripts:B.length>0,serverScriptContent:B,dependencies:Array.from(E),contentHash:I,status:u(X),streamTemplates:w.__streamTemplates}}var kF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function s(J,q){let z=0,Q=0;if(!G.existsSync(J))return{copied:z,bytes:Q};G.mkdirSync(q,{recursive:!0});function X(I,K){let B=G.readdirSync(I,{withFileTypes:!0});for(let V of B){if(kF.has(V.name))continue;let k=Z.join(I,V.name),W=Z.join(K,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),X(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),z++,Q+=G.statSync(W).size}}}return X(J,q),{copied:z,bytes:Q}}async function dF(J={}){let q=Date.now(),z=Z.resolve(J.root||process.cwd()),Q=Z.resolve(z,J.outputDir||".output");console.log("[stx build] Starting production build...");let X={};try{X=await N()}catch{}let I=J.componentsDir??X.componentsDir??"components",K=J.partialsDir??X.partialsDir??"partials",B=J.layoutsDir??X.layoutsDir??"layouts",V=J.publicDir??X.publicDir??"public",k=X.app?.head||{},W=X.app?.colorMode,w=X.router?.container||"main";if(G.existsSync(Q))G.rmSync(Q,{recursive:!0});let E=[Z.join(Q,"public","__stx"),Z.join(Q,"public","assets"),Z.join(Q,"server","pages"),Z.join(Q,"server","fragments")];for(let Y of E)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let L=o(z),_=["components","layouts","partials"],U=L.filter((Y)=>{return!_.some((F)=>Y.pattern.startsWith(`/${F}/`)||Y.pattern===`/${F}`)});console.log(`[stx build] Found ${U.length} page routes (${L.length-U.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let H=f(J.debug),$=m();await Bun.write(Z.join(Q,"public","__stx",H.filename),H.content),await Bun.write(Z.join(Q,"public","__stx",$.filename),$.content),console.log(`[stx build] Runtime: ${H.filename} (${(H.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let O=[],j=[];for(let Y of U)try{let F=await i(Y.filePath,Y.pattern,{componentsDir:I,partialsDir:K,layoutsDir:B,debug:J.debug});if(O.push(F),F.html=F.html.replace(/runtime\.__STX_HASH__\.js/g,H.filename).replace(/router\.__STX_HASH__\.js/g,$.filename),F.html=FF(F.html,k,{bodyScripts:[`<script src="/__stx/${$.filename}"></script>`],...W&&{colorMode:W}}),W)F.html=e(F.html,W);if(k.htmlAttrs)F.html=t(F.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(F.html)){let T=F.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(T&&T[1]){let P=T[1];F.html=F.html.replace(" "+P,""),F.html=F.html.replace(/<body([^>]*)>/,`<body$1 ${P}>`)}}F.html=F.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),F.html=await r(F.html),F.fragment=JF(F.html,w);let y=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),b=Z.join("server","pages",`${y}.compiled.json`),A=Z.join("server","fragments",`${y}.html`);await Bun.write(Z.join(Q,b),JSON.stringify(F,null,2)),await Bun.write(Z.join(Q,A),F.fragment),j.push({pattern:Y.pattern,compiledPath:b,fragmentPath:A,isDynamic:F.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("[")}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(F){console.error(`[stx build] \u2717 ${Y.pattern}:`,F instanceof Error?F.message:F)}let M=Z.resolve(z,V);if(G.existsSync(M)){let{copied:Y,bytes:F}=s(M,Z.join(Q,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${V}/`)}let v=YF(z);if(v){let{copied:Y,bytes:F}=s(v,Z.join(Q,"public",XF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${QF}/`)}let R={runtime:H.filename,router:$.filename},zF=ZF(j,R,Q);qF(zF,Q);let x=Date.now()-q;return console.log(`
|
|
3
3
|
[stx build] Done in ${x}ms \u2014 ${O.length} pages compiled`),{pageCount:O.length,assets:R,outputDir:Q,duration:x}}
|
|
4
|
-
export{g as
|
|
4
|
+
export{g as Rf,f as Sf,m as Tf,UF as Uf,i as Vf,dF as Wf};
|
|
@@ -213,4 +213,4 @@ function w(Z,M){let{itemHeight:K,containerHeight:P,overscan:F=3,keyProperty:$="i
|
|
|
213
213
|
})();
|
|
214
214
|
</script>
|
|
215
215
|
`})}var v={createVirtualList:w,processVirtualListDirectives:C,processInfiniteListDirectives:E,processVirtualGridDirectives:f,generateVirtualListCSS:b,useVirtualList:L};
|
|
216
|
-
export{w as
|
|
216
|
+
export{w as Ri,C as Si,b as Ti,L as Ui,E as Vi,f as Wi,v as Xi};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{existsSync as U,statSync as V}from"fs";import z from"path";var W=/[*?[\]{}]/;function X(D){return W.test(D)}async function $(D,E={}){let H=E.cwd??process.cwd(),N=E.recursive!==!1,Q=E.ignorePaths??[],J=globalThis.Bun.Glob,K=new Set,F=(j)=>{if(j.includes(`${z.sep}node_modules${z.sep}`)||j.includes(`${z.sep}dist${z.sep}`))return;if(Q.some((q)=>q&&j.includes(z.normalize(q))))return;K.add(j)},R=async(j)=>{try{for await(let q of new J(j).scan({cwd:H,absolute:!0}))F(q)}catch{}};for(let j of D){if(!j)continue;if(X(j)){await R(j);continue}let q=z.resolve(H,j);if(!U(q))continue;if(V(q).isDirectory()){for await(let T of new J(N?"**/*.stx":"*.stx").scan({cwd:q,absolute:!0}))F(T);continue}F(q)}return[...K].sort()}
|
|
3
|
-
export{X as
|
|
3
|
+
export{X as Ws,$ as Xs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{$h as c,Zh as a,_h as b,ai as d,bi as e,ci as f,di as g,ei as h,fi as i,gi as j,hi as k}from"./chunk-mywp77gt.js";import"./chunk-2vza9m2x.js";export{i as processStaticDirectives,b as processPartialHydrationDirectives,h as onHydrated,g as isHydrated,d as hydrateIsland,e as hydrateByStrategy,f as hydrateAll,c as generatePartialHydrationCSS,j as generateIslandManifest,k as default,a as createIslandRegistry};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Wp as D,_p as T}from"./chunk-qj2s3r1w.js";import{gt as N}from"./chunk-72c7gyqc.js";import{kv as L}from"./chunk-2vza9m2x.js";import Q from"fs";import Y from"path";var b=new Map,V=new Map;async function v(j){let z;for(let K=0;K<3;K++)try{let W=(await Q.promises.stat(j)).mtime.getTime(),J=V.get(j);if(J&&J.mtime===W)return J.content;let X=await Bun.file(j).text(),U=(await Q.promises.stat(j)).mtime.getTime();if(U!==W)continue;return V.set(j,{content:X,mtime:U}),X}catch(I){z=I;break}throw V.delete(j),Error(`File not found: ${j}${z?` (${z.message})`:""}`)}function E(j){V.delete(j)}function F(j){for(let B of V.keys())if(B.startsWith(j))V.delete(B)}var $=null,G=null,k=null;function R(j){k=j}async function S(j=!1){let B=k??await import("./chunk-gy933rct.js");if(j)return B.generateSignalsRuntimeDev();if($===null)$=B.generateSignalsRuntime();return $}var q=null;async function _(){if(q===null){let{getRouterScript:j}=await import("./chunk-3br3pt6k.js");q=j()}return q}function g(){V.clear(),T(),N(),$=null,G=null,q=null}function y(j){let B={debug:j.debug===!0,middleware:(j.middleware??[]).map((z)=>({name:z.name,timing:z.timing,handler:String(z.handler)})),customDirectives:(j.customDirectives??[]).map((z)=>({name:z.name,hasEndTag:z.hasEndTag===!0,handler:String(z.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(B)).digest("hex")}async function C(j,B){try{if(!B.cachePath)return null;let z=Y.resolve(B.cachePath),K=Y.join(z,`${M(j)}.html`),I=Y.join(z,`${M(j)}.meta.json`);if(!await D(K)||!await D(I))return null;let W=await Bun.file(I).text(),J=JSON.parse(W);if(J.cacheVersion!==B.cacheVersion)return null;if(J.optionsSignature!==y(B))return null;if((await Q.promises.stat(j)).mtime.getTime()>J.mtime)return null;for(let Z of J.dependencies)if(await D(Z)){if((await Q.promises.stat(Z)).mtime.getTime()>J.mtime)return null}else return null;return await Bun.file(K).text()}catch(z){return console.warn(`Cache error for ${j}:`,z),null}}async function u(j,B,z,K){try{if(!K.cachePath)return;let I=Y.resolve(K.cachePath);await Q.promises.mkdir(I,{recursive:!0});let W=Y.join(I,`${M(j)}.html`),J=Y.join(I,`${M(j)}.meta.json`),X=await Q.promises.stat(j);await Bun.write(W,B);let Z={sourcePath:j,mtime:X.mtime.getTime(),dependencies:Array.from(z),cacheVersion:K.cacheVersion,optionsSignature:y(K),generatedAt:Date.now()};await Bun.write(J,JSON.stringify(Z,null,2)),b.set(j,{output:B,mtime:X.mtime.getTime(),dependencies:z})}catch(I){console.warn(`Failed to cache template ${j}:`,I)}}var O=16;function M(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,O)}
|
|
3
3
|
export{b as Oj,v as Pj,E as Qj,F as Rj,R as Sj,S as Tj,_ as Uj,g as Vj,C as Wj,u as Xj,M as Yj};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import G from"path";var L=new Set([".jpg",".jpeg",".png",".gif"]),O=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function M(j,z){let H=z.formats??O;if(!z.publicDir)return j;let C=N(j),J=[],Y=/<img\b[^>]*?>/gi,K=[],Q;while((Q=Y.exec(j))!==null){let q=Q[0],y=q.match(/\bsrc=["']([^"']+)["']/i);if(!y)continue;if(_(Q.index,C))continue;K.push({idx:Q.index,length:q.length,src:y[1],raw:q})}if(K.length===0)return j;let Z=await Promise.all(K.map(async(q)=>{let y=await X(q.src,z.publicDir,H);return{match:q,sources:y}}));for(let{match:q,sources:y}of Z){if(y.length===0)continue;let I=`<picture>${y.map(($)=>`<source type="${$.mime}" srcset="${w($.url)}">`).join("")}${q.raw}</picture>`;J.push({start:q.idx,end:q.idx+q.length,replacement:I})}if(J.length===0)return j;let V="",W=0;for(let q of J)V+=j.slice(W,q.start),V+=q.replacement,W=q.end;return V+=j.slice(W),V}async function X(j,z,H){if(!F(j))return[];let C=G.extname(j).toLowerCase();if(!L.has(C))return[];if(!j.startsWith("/"))return[];let J=G.join(z,j.slice(1)),Y=G.dirname(J),K=G.basename(J,C),Q=G.resolve(Y),Z=G.resolve(z);if(!Q.startsWith(Z))return[];let V=G.posix.dirname(j),W=H.map(async(y)=>{let k=G.join(Y,`${K}${y.ext}`);if(!await Bun.file(k).exists())return null;return{url:G.posix.join(V,`${K}${y.ext}`),mime:y.mime}});return(await Promise.all(W)).filter((y)=>y!==null)}function F(j){if(!j)return!1;if(j.startsWith("http://")||j.startsWith("https://"))return!1;if(j.startsWith("//"))return!1;if(j.startsWith("data:"))return!1;return!0}function N(j){let z=[],H=/<picture\b[^>]*>[\s\S]*?<\/picture>/gi,C;while((C=H.exec(j))!==null)z.push([C.index,C.index+C[0].length]);return z}function _(j,z){for(let[H,C]of z)if(j>=H&&j<C)return!0;return!1}function w(j){return j.replace(/&/g,"&").replace(/"/g,""")}
|
|
3
|
-
export{M as
|
|
3
|
+
export{M as qi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ao as a,Bo as b}from"./chunk-qj2s3r1w.js";import"./chunk-ymc99r5x.js";import"./chunk-dcxtrqfy.js";import"./chunk-jj6yp7gm.js";import"./chunk-qjkzpd68.js";import"./chunk-t5c7rk0h.js";import"./chunk-72c7gyqc.js";import"./chunk-fv923f7g.js";import"./chunk-2e6xafcm.js";import"./chunk-nygtwffe.js";import"./chunk-461br5nn.js";import"./chunk-h7v70dbp.js";import"./chunk-drbbt69f.js";import"./chunk-kb5j08tq.js";import"./chunk-2vza9m2x.js";export{b as processLoops,a as parseLoopBinding};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{createHash as Y}from"crypto";import{readFile as M,stat as w}from"fs/promises";async function G(q){try{let z=await M(q);return Y("sha256").update(z).digest("hex").slice(0,16)}catch{return""}}function u(q){return Y("sha256").update(q).digest("hex").slice(0,16)}function $(q){return Y("sha256").update(q).digest("hex").slice(0,16)}function X(q,z){let B=JSON.stringify(z,Object.keys(z).sort());return`${$(q)}-${$(B)}`}async function Z(q){try{return(await w(q)).mtimeMs}catch{return 0}}async function b(q){try{return await w(q),!0}catch{return!1}}import{mkdir as S,readFile as V,writeFile as E,readdir as A,rm as _,stat as j}from"fs/promises";import{join as U,dirname as x}from"path";var R=new Map,W={enabled:!0,directory:".stx/media-cache",maxAge:30,maxSize:500};async function F(q){try{await S(q,{recursive:!0})}catch{}}function K(q,z,B){return U(q,B,`${z}.json`)}async function v(q,z,B){if((Date.now()-q.createdAt)/86400000>B)return!1;if(await Z(z)!==q.srcMtime)return!1;return!0}async function g(q,z,B,J=W){if(!J.enabled)return null;let I=X(q,z),L=R.get(I);if(L){if(await v(L,q,J.maxAge))return L.lastAccessedAt=Date.now(),L.data;R.delete(I)}let Q=K(J.directory,I,B);if(await b(Q))try{let N=await V(Q,"utf-8"),O=JSON.parse(N);if(await v(O,q,J.maxAge))return O.lastAccessedAt=Date.now(),R.set(I,O),O.data}catch{}return null}async function l(q,z,B,J,I=W){if(!I.enabled)return;let L=X(q,z),Q=await G(q),N=await Z(q),O={key:L,src:q,srcHash:Q,srcMtime:N,optionsHash:X("",z),data:B,createdAt:Date.now(),lastAccessedAt:Date.now()};R.set(L,O);let T=K(I.directory,L,J);try{await F(x(T)),await E(T,JSON.stringify(O,null,2))}catch(H){console.warn(`[stx-media] Failed to write cache: ${H}`)}}async function m(q,z=W){if(q==="all")R.clear();else R.clear();let B=q==="all"?["image","video"]:[q];for(let J of B){let I=U(z.directory,J);try{await _(I,{recursive:!0,force:!0})}catch{}}}async function y(q=W){let z={memoryEntries:R.size,diskEntries:{image:0,video:0},totalSizeMB:0};for(let B of["image","video"]){let J=U(q.directory,B);try{let I=await A(J);z.diskEntries[B]=I.length;for(let L of I){let Q=U(J,L),N=await j(Q);z.totalSizeMB+=N.size/1048576}}catch{}}return z}async function f(q=W){let z=0,B=q.maxAge*24*60*60*1000;for(let J of["image","video"]){let I=U(q.directory,J);try{let L=await A(I);for(let Q of L){let N=U(I,Q);try{let O=await V(N,"utf-8"),T=JSON.parse(O);if(Date.now()-T.createdAt>B)await _(N),R.delete(T.key),z++}catch{await _(N).catch(()=>{}),z++}}}catch{}}return z}
|
|
3
|
-
export{G as
|
|
3
|
+
export{G as lh,u as mh,$ as nh,X as oh,Z as ph,b as qh,g as rh,l as sh,m as th,y as uh,f as vh};
|
|
@@ -299,4 +299,4 @@ catch (error) {
|
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
301
|
</script>`}var N={name:"pwa.installButton",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return H(j,q)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},Q={name:"pwa.updatePrompt",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return J(j,q)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},T={name:"pwa.offlineIndicator",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return L(j,q)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},V={name:"pwa.pushSubscribe",handler:(j,z,k,E)=>{let q=k.__stx_options||{};return M(j,q)},hasEndTag:!0,description:"Renders a push notification subscription button"},X=[N,Q,T,V];function Z(j){return[...j,...X]}
|
|
302
|
-
export{N as
|
|
302
|
+
export{N as bv,Q as cv,T as dv,V as ev,X as fv,Z as gv};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-2vza9m2x.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
|
|
3
3
|
(function() {
|
|
4
4
|
'use strict';
|
|
5
5
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Sl as KJ,fr as WJ}from"./chunk-qj2s3r1w.js";import{Zs as e,_s as JJ}from"./chunk-qjkzpd68.js";import{ft as ZJ,jt as g}from"./chunk-72c7gyqc.js";import{Dt as h}from"./chunk-fv923f7g.js";import z from"path";import O from"fs";function XJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function jJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function D(J,K){let Z=[];for(let W of jJ(J)){if(XJ(W)){let H=W.position||void 0;Z.push({file:K||H?.file,line:H?.line,column:H?.column,message:W.message??"",lineText:H?.lineText});continue}Z.push({file:K,message:W instanceof Error?W.message:String(W)})}return Z}function d(J,K){return D(J,K).map((Z)=>{let W=Z.file?`${Z.file}${Z.line?`:${Z.line}${Z.column?`:${Z.column}`:""}`:""}`:"",H=Z.lineText?`
|
|
3
|
+
${Z.lineText.trim()}`:"";return W?`${W}: ${Z.message}${H}`:`${Z.message}${H}`}).join(`
|
|
4
|
+
`)}var VJ=6,$J=1,GJ=new Map,P=600,kJ=100,f=new Map;async function OJ(J){let K=f.get(J)??0;if(K>0&&K<kJ){f.set(J,K+1);return}f.set(J,1);try{let Z=(await O.promises.readdir(J)).filter((Y)=>Y.endsWith(".js"));if(Z.length<=P)return;let H=(await Promise.all(Z.map(async(Y)=>{try{return{name:Y,at:(await O.promises.stat(z.join(J,Y))).mtimeMs}}catch{return null}}))).filter((Y)=>Y!==null);H.sort((Y,q)=>q.at-Y.at);for(let Y of H.slice(P)){let q=Y.name.slice(0,-3);await O.promises.rm(z.join(J,`${q}.js`),{force:!0}),await O.promises.rm(z.join(J,`${q}.deps.json`),{force:!0})}S("pruned bundle cache to",P,"entries")}catch{}}function DJ(J){return GJ.get(J)??[]}function m(J,K){if(J)GJ.set(J,K)}function wJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function S(...J){if(wJ())console.log("[stx:bundler]",...J)}var p=[];function r(J,K,Z){p.push({filePath:J||"<inline>",message:K,details:Z})}function EJ(){return p.slice()}function PJ(){p.length=0}var u;function fJ(J){u=J}function i(){if(u)return u;try{let J=WJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var s=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function bJ(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,Z;while((Z=K.exec(J))!==null){let H=Z[1];if(!s.some((q)=>q.test(H)))return S("detected user import:",H),!0}let W=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((Z=W.exec(J))!==null){let H=Z[1];if(/\.css(?:\?.*)?$/.test(H))continue;if(!s.some((q)=>q.test(H)))return S("detected side-effect import:",H),!0}return!1}var E="stx-module:",AJ=/\.(?:[cm]?[jt]sx?|json)$/i;function UJ(J,K){return z.relative(J,K).split(z.sep).join("/")}function CJ(J,K){let Z=0,W=(Y)=>{let q=`__stxMod${Z++}`,X=JSON.stringify(Y);return K.push(`var ${q} = globalThis.__stxModules && globalThis.__stxModules[${X}];`,`if (${q} === undefined) throw new Error("[stx] module " + ${JSON.stringify(X)} + " is not registered on this page (#1957)");`),q},H=(Y,q)=>{for(let X of Y.split(",")){let $=X.trim();if(!$)continue;let G=$.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!G)continue;let Q=G[1].startsWith('"')?JSON.parse(G[1]):G[1],j=G[2]??Q;K.push(`var ${j} = ${q}[${JSON.stringify(Q)}];`)}};return J=J.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(Y,q,X)=>{let $=X.slice(E.length),G=W($),Q=q.trim(),j=Q.match(/^([\w$]+)\s*(?:,\s*|$)/);if(j&&!Q.startsWith("{")&&!Q.startsWith("*"))K.push(`var ${j[1]} = ${G}.default;`),Q=Q.slice(j[0].length).trim();let w=Q.match(/^\*\s*as\s+([\w$]+)$/);if(w)K.push(`var ${w[1]} = ${G};`);else if(Q.startsWith("{"))H(Q.replace(/^\{|\}$/g,""),G);return""}),J=J.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(Y,q)=>{return W(q.slice(E.length)),""}),J}function t(J){let K=[J,`${J}.ts`,`${J}.tsx`,`${J}.js`,`${J}.mjs`,`${J}.jsx`,z.join(J,"index.ts"),z.join(J,"index.tsx"),z.join(J,"index.js"),z.join(J,"index.mjs")];for(let Z of K)try{if(O.existsSync(Z)&&O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return Z}catch{}return}function LJ(J,K,Z,W,H){let Y=(X,$)=>{if(!H||X!==Z||!AJ.test($))return null;try{if(!O.statSync($,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}return W.add($),{path:`${E}${UJ(process.cwd(),$)}`,external:!0}},q=(X,$)=>{let G=X===Z?K:z.dirname(X),Q=z.resolve(G,$);return t(Q)??Q};return{name:"stx-client-bundle",setup(X){X.onResolve({filter:/^(stx|@stacksjs\/stx)$/},($)=>({path:$.path,external:!0})),X.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},($)=>({path:$.path,external:!0})),X.onResolve({filter:/^\//},($)=>{let G=t($.path);if(G){let Q=Y($.importer,G);if(Q)return Q;if(G!==Z)W.add(G);return{path:G}}return{path:$.path,external:!0}}),X.onResolve({filter:/^\.\.?\//},($)=>{let G=q($.importer,$.path),Q=Y($.importer,G);if(Q)return Q;return W.add(G),{path:G}}),X.onResolve({filter:/^[@~]\//},($)=>{let G=z.resolve(J,$.path.slice(2)),Q=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,z.join(G,"index.ts"),z.join(G,"index.tsx"),z.join(G,"index.js"),z.join(G,"index.mjs")];for(let j of Q)if(O.existsSync(j)&&O.statSync(j,{throwIfNoEntry:!1})?.isFile()){let w=Y($.importer,j);if(w)return w;return S(`resolved ${$.path[0]}/ import:`,$.path,"\u2192",j),W.add(j),{path:j}}return console.warn(`[stx:bundler] could not resolve ${$.path[0]}/ import:`,$.path),{path:G}}),X.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},($)=>{if(!H||$.importer!==Z)return;return{path:`${E}npm:${$.path}`,external:!0}}),X.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},($)=>{let G=z.extname($.path).toLowerCase(),Q=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if($.path!==Z)W.add($.path);return{contents:O.readFileSync($.path,"utf8"),loader:Q}})}}}var b=new Map,B=ZJ(64),a=Symbol.for("stx.client-bundle-build-queue");function SJ(J){let K=globalThis,W=(K[a]??Promise.resolve()).then(J,J);return K[a]=W.then(()=>{return},()=>{return}),W}async function gJ(J,K,Z={}){let W=Z.projectRoot||process.cwd(),H=Z.minify??!1,Y=Z.externalizeUserModules??!0,q=Z.cacheDir||h(W,"bundle-cache"),X=new Bun.CryptoHasher("md5");X.update(`${VJ}\x00${Y?"registry":"inline"}\x00${J}\x00${K}`);let $=X.digest("hex").slice(0,12),G=z.join(q,`${$}.js`),Q=B.get(G);if(Q){if(g(Q.files)){S("memo hit:",$);let M=Q.files.map((L)=>L.path);return m(K,M),Z.collectInputs?.push(...M),Q.code}B.delete(G),S("memo invalidated by dep change:",$)}let j=z.join(q,`${$}.deps.json`),w=Bun.file(G);if(await w.exists()){let M=Bun.file(j),L=!0,A=null;if(await M.exists())try{let I=JSON.parse(await M.text());if(I.metadataVersion!==$J||!Array.isArray(I.files))L=!1;else A=I.files;if(A&&!g(A))L=!1}catch{L=!1}if(L){if(S("cache hit:",$),A)m(K,A.map((_)=>_.path)),Z.collectInputs?.push(...A.map((_)=>_.path));let I=await w.text();if(A)B.set(G,{code:I,files:A});return I}S("cache invalidated by dep change:",$)}let F=b.get($);if(F){let M=await F;if(Z.collectInputs)Z.collectInputs.push(...(B.get(G)?.files??[]).map((L)=>L.path));return M}let T=SJ(()=>TJ(J,K,{projectRoot:W,minify:H,cacheDir:q,hash:$,cachePath:G,depsPath:j,collectInputs:Z.collectInputs,externalizeUserModules:Y}));b.set($,T);try{return await T}finally{b.delete($)}}async function TJ(J,K,Z){let{projectRoot:W,minify:H,cacheDir:Y,hash:q,cachePath:X,depsPath:$,externalizeUserModules:G}=Z,Q=h(W,"bundle-tmp"),j=z.join(Q,`${q}.ts`),w=z.join(Q,"out",q);O.mkdirSync(Q,{recursive:!0}),O.mkdirSync(w,{recursive:!0});let F=z.dirname(K),T=new Set,M=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,A=e(J),{depths:I,balanced:_}=JJ(A),c=(U)=>!_||I[U]===0,C;while((C=M.exec(A))!==null){if(C[1])continue;if(!c(C.index))continue;if(C[2])C[2].split(",").forEach((U)=>{let k=MJ(U);if(k)T.add(k)});else if(C[3])T.add(C[3])}while((C=L.exec(A))!==null){if(C[1])continue;if(!c(C.index))continue;T.add(C[2])}let QJ=T.size>0?`
|
|
5
|
+
export { ${[...T].join(", ")} }`:"";await Bun.write(j,J+QJ),S("bundling:",q,"from:",z.basename(K));let o=new Set;try{let U=await Bun.build({entrypoints:[j],outdir:w,target:"browser",format:"esm",minify:H,plugins:[LJ(W,F,j,o,G)],define:{"process.env.NODE_ENV":H?'"production"':'"development"',...KJ()},root:W});if(!U.success){let x=U.logs.filter((N)=>N.level==="error").map((N)=>N.message).join(", ")||`Unable to bundle ${z.basename(K)}`,R=D(U.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",x),r(K||"",x,R),i()==="error")throw Error(x);return J}let k="";for(let V of U.outputs){k=await V.text();break}let y=[];for(let V of k.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let x of V[1].split(",")){let R=x.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(R){y.push([R[2],R[1]]);continue}let N=x.trim();if(/^[A-Za-z_$][\w$]*$/.test(N))y.push([N,N])}let n=[];k=CJ(k,n);let qJ=k.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];k=k.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let l=`__stxBundle_${q}`,YJ=y.map(([V,x])=>`${JSON.stringify(V)}: ${x}`).join(", "),HJ=y.map(([V])=>`var ${V} = undefined;`).join(`
|
|
6
|
+
`),zJ=y.map(([V])=>`${V} = ${l}[${JSON.stringify(V)}];`).join(`
|
|
7
|
+
`);if(k=`${qJ.join(`
|
|
8
|
+
`)}
|
|
9
|
+
${HJ}
|
|
10
|
+
var ${l} = (function() {
|
|
11
|
+
${n.join(`
|
|
12
|
+
`)}
|
|
13
|
+
${k}
|
|
14
|
+
return { ${YJ} };
|
|
15
|
+
})();
|
|
16
|
+
${zJ}`.trim(),S("bundled:",q,"output:",k.length,"bytes"),T.size>0&&y.length===0)return console.warn(`[stx:bundler] dropped every binding for ${z.basename(K)} (${q}); serving the unbundled source and not caching this result`),J;O.mkdirSync(Y,{recursive:!0}),await Bun.write(X,k);let v=Array.from(o).map((V)=>{try{return{path:V,mtimeMs:O.statSync(V).mtimeMs}}catch{return null}}).filter((V)=>V!==null);return await Bun.write($,JSON.stringify({metadataVersion:$J,files:v})),m(K,v.map((V)=>V.path)),Z.collectInputs?.push(...v.map((V)=>V.path)),B.set(X,{code:k,files:v}),await OJ(Y),k}catch(U){let k=D(U,K||void 0),y=d(U,K||void 0);if(console.warn(`[stx:bundler] error: ${y}`),r(K||"",y,k),i()==="error")throw U;return J}finally{try{O.rmSync(j,{force:!0}),O.rmSync(w,{recursive:!0,force:!0})}catch{}}}function MJ(J){let K=J.trim();if(!K)return null;let Z=K.indexOf("=");if(Z!==-1)K=K.slice(0,Z).trim();let W=K.indexOf(":");if(W!==-1)K=K.slice(W+1).trim();if(K.startsWith("..."))K=K.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(K)?K:null}
|
|
17
|
+
export{d as _k,DJ as $k,wJ as al,r as bl,EJ as cl,PJ as dl,fJ as el,i as fl,bJ as gl,E as hl,UJ as il,CJ as jl,SJ as kl,gJ as ll};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-2vza9m2x.js";var N=0;function P(){return`eb-${++N}-${Date.now().toString(36)}`}function W(q,z={},A){let j=/@errorBoundary(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@enderrorBoundary/gi;return q.replace(j,(D,F,J,K)=>{let L=P(),M=Q(F||"");return T(L,J.trim(),K.trim(),M)})}function Q(q){let z={},A=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\w+))/g,j;while((j=A.exec(q))!==null){let D=j[1],F=j[2]||j[3]||j[4];switch(D){case"id":z.id=F;break;case"logErrors":z.logErrors=F==="true";break}}return z}function T(q,z,A,j){let D=j.logErrors!==!1;return`
|
|
3
3
|
<div class="stx-error-boundary" data-boundary-id="${q}" data-has-error="false">
|
|
4
4
|
<div class="stx-error-boundary-content" data-boundary-content="${q}">
|
|
5
5
|
${z}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var{WebView:F}=globalThis.Bun;import{existsSync as V,mkdirSync as k,readdirSync as O,statSync as E}from"fs";import $ from"path";var C=16384;function X(j){if(/^https?:\/\//.test(j)||j.startsWith("file://"))return j;return`file://${$.resolve(j)}`}function K(j,B,z,L){return new Promise((Q)=>{let J=!1,G,Y,R=()=>{if(!J){if(J=!0,clearTimeout(Y),G)clearTimeout(G);j.onNavigated=void 0,Q()}};Y=setTimeout(R,L),j.onNavigated=()=>{if(!J)G=setTimeout(R,z)};try{let Z=j.navigate(B);if(Z&&typeof Z.catch==="function")Z.catch(R)}catch{R()}})}async function U(j,B,z){let L=`!!document.querySelector(${JSON.stringify(B)})`,Q=Date.now()+z;while(Date.now()<Q){try{if(await j.evaluate(L))return}catch{}await new Promise((J)=>setTimeout(J,100))}}async function _(j){try{let B=await j.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 B==="number"&&Number.isFinite(B)&&B>0?Math.min(B,C):0}catch{return 0}}async function x(j,B,z={}){let L=Math.min(z.width??1440,C),Q=Math.min(z.height??2200,C),J=z.waitMs??800,G=z.timeoutMs??15000,Y=z.format??"png",R=X(j),Z=(q)=>new F({width:L,height:q,headless:!0,...z.backend?{backend:z.backend}:{}}),P=Z(Q);try{if(await K(P,R,J,G),z.waitSelector)await U(P,z.waitSelector,G);if(z.fullPage){let H=await _(P);if(H>Q){if(P.close(),P=Z(H),await K(P,R,J,G),z.waitSelector)await U(P,z.waitSelector,G)}}let q=await P.screenshot({encoding:"buffer",format:Y});k($.dirname($.resolve(B)),{recursive:!0}),await Bun.write(B,q)}finally{P.close()}if(!V(B))throw Error(`Screenshot was not produced for ${j}`);return{input:j,output:B,bytes:E(B).size}}async function W(j,B,z={}){k(B,{recursive:!0});let L;if(!/^https?:\/\//.test(j)&&V(j)&&E(j).isDirectory())L=O(j).filter((G)=>G.endsWith(".html")).map((G)=>$.join(j,G));else L=[j];let Q=z.format??"png",J=[];for(let G of L){let Y=/^https?:\/\//.test(G)?new URL(G).pathname.replace(/\W+/g,"-").replace(/^-|-$/g,"")||"index":$.basename(G).replace(/\.html?$/,"");J.push(await x(G,$.join(B,`${Y}.${Q}`),z))}return J}
|
|
3
|
-
export{x as
|
|
3
|
+
export{x as Pf,W as Qf};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-
|
|
2
|
+
import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-2vza9m2x.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -394,4 +394,4 @@ else {
|
|
|
394
394
|
${JSON.stringify(j)}
|
|
395
395
|
</script>
|
|
396
396
|
`}var r={processPartialHydrationDirectives:b,processStaticDirectives:x,generatePartialHydrationCSS:H,generateIslandManifest:y,createIslandRegistry:f,hydrateIsland:S,hydrateByStrategy:h,hydrateAll:g,isHydrated:v,onHydrated:u};
|
|
397
|
-
export{B as
|
|
397
|
+
export{B as Vh,I as Wh,E as Xh,V as Yh,f as Zh,b as _h,H as $h,S as ai,h as bi,g as ci,v as di,u as ei,x as fi,y as gi,r as hi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{kv as Y}from"./chunk-2vza9m2x.js";import{mkdir as O,writeFile as q}from"fs/promises";import{join as X}from"path";var T="https://api.iconify.design";async function k(){let E=await fetch(`${T}/collections`);if(!E.ok)throw Error(`Failed to fetch collections: ${E.statusText}`);return await E.json()}async function P(E,z){try{let U=Y.resolve("@iconify/json"),S=`${`${U.substring(0,U.lastIndexOf("/node_modules/@iconify/json/"))}/node_modules/@iconify/json`}/json/${E}.json`,M=Bun.file(S);if(await M.exists()){let V=await M.json();if(z&&z.length>0){let Z={};for(let L of z)if(V.icons[L])Z[L]=V.icons[L];return{...V,icons:Z}}return V}}catch{}let K=z&&z.length>0?`${T}/${E}.json?icons=${z.join(",")}`:`${T}/${E}.json`,Q=await fetch(K);if(!Q.ok)throw Error(`Failed to fetch icons for ${E}: ${Q.statusText}`);return await Q.json()}function j(E,z=24,K=24){return{body:E.body,width:E.width||z,height:E.height||K,viewBox:`0 0 ${E.width||z} ${E.height||K}`}}function F(E,z){let K=B(E);return`import type { IconData } from '@stacksjs/iconify-core'
|
|
3
3
|
|
|
4
4
|
export const ${K}: IconData = ${JSON.stringify(z,null,2)}
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{kv as y}from"./chunk-2vza9m2x.js";function S4(){if(typeof Notification<"u"&&Notification.permission==="granted")return!0;return!1}function jZ(){return typeof window<"u"&&typeof document<"u"}async function w4(){if(typeof Notification>"u")return!1;if(Notification.permission==="granted")return!0;if(Notification.permission==="denied")return!1;return await Notification.requestPermission()==="granted"}var g=new Map;function B4(){return`alert-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}function f4(Z){switch(Z){case"info":return"ℹ";case"success":return"✔";case"warning":return"⚠";case"error":return"✖";default:return"ℹ"}}function v4(Z="top-right"){if(!jZ())throw Error("Toast container requires browser environment");try{let $=document.querySelector(`.stx-toast-container[data-position="${Z}"]`);if($)return $}catch{}let Y=document.createElement("div");Y.className=`stx-toast-container ${Z}`,Y.dataset.position=Z;try{if(document.body)document.body.appendChild(Y)}catch{}return Y}function y4(Z){let{options:Y}=Z,$=f4(Y.type),J=Y.type||"info",Q=Y.duration!==0;return`
|
|
3
3
|
<div class="stx-toast ${J}" data-alert-id="${Z.id}" role="alert" aria-live="polite">
|
|
4
4
|
<div class="stx-toast-icon">${$}</div>
|
|
5
5
|
<div class="stx-toast-content">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{if as a,jf as b,kf as c,lf as d,mf as e,nf as f,of as g,pf as h,qf as i,rf as j,sf as k,tf as l,uf as m,vf as n,wf as o}from"./chunk-ps20v1ah.js";import"./chunk-2vza9m2x.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{Aj as _}from"./chunk-fed3xsp9.js";function Y(q,z){let B={};for(let C of q)B[C]=_(z(C));return new Proxy({},{get:(C,G)=>B[G]?.(),set:(C,G,L)=>{if(B[G])B[G].set(L);else B[G]=_(L);return!0},has:(C,G)=>(G in B),deleteProperty:(C,G)=>{return delete B[G],!0},ownKeys:()=>Reflect.ownKeys(B),getOwnPropertyDescriptor:(C,G)=>(G in B)?{enumerable:!0,configurable:!0,writable:!0,value:B[G]()}:void 0})}function T(q,z){let B={};for(let C of z)B[C]=q[C];return B}function $(q,z){let B=Object.keys(q),C=Y(B,(I)=>z?.[I]??q[I].getDefaultValue()),G=Y(B,()=>[]),L=Y(B,()=>!1),W=Y(B,()=>!1),X=Y(B,()=>!1),J=_(!1);async function M(I){X[I]=!0;let Q=await q[I].validate(C[I],C);return G[I]=Q,X[I]=!1,Q.length===0}async function O(){J.set(!0);let I=await Promise.all(B.map(M));return J.set(!1),I.every(Boolean)}function j(){for(let I of B)C[I]=z?.[I]??q[I].getDefaultValue(),G[I]=[],L[I]=!1,W[I]=!1}function A(I){for(let Q of B)if(Q in I)C[Q]=I[Q],W[Q]=!0}function H(I,Q){C[I]=Q,W[I]=!0}function K(I,Q=!0){if(L[I]=Q,Q)M(I)}function U(I){return{value:C[I],errors:G[I],touched:L[I],dirty:W[I],valid:G[I].length===0,validating:X[I]}}function k(I){return async(Q)=>{Q?.preventDefault?.();for(let N of B)L[N]=!0;if(await O())await I(T(C,B))}}return{values:C,errors:G,touched:L,dirty:W,get isValid(){return B.every((I)=>G[I].length===0)},get isValidating(){return J()||B.some((I)=>X[I])},get isDirty(){return B.some((I)=>W[I])},validate:O,validateField:M,reset:j,setValues:A,setFieldValue:H,setFieldTouched:K,getFieldState:U,handleSubmit:k}}var E=$;class Z{rules=[];defaultValue="";addRule(q){let z=new Z;return z.rules=[...this.rules,q],z.defaultValue=this.defaultValue,z}required(q="This field is required"){return this.addRule({name:"required",message:q,validate:(z)=>{if(z===null||z===void 0)return q;if(typeof z==="string"&&z.trim()==="")return q;if(Array.isArray(z)&&z.length===0)return q;return!0}})}email(q="Please enter a valid email"){return this.addRule({name:"email",message:q,validate:(z)=>{if(!z)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(z))||q}})}url(q="Please enter a valid URL"){return this.addRule({name:"url",message:q,validate:(z)=>{if(!z)return!0;try{return new URL(String(z)),!0}catch{return q}}})}min(q,z){let B=z||`Must be at least ${q} characters`;return this.addRule({name:"min",message:B,validate:(C)=>{if(!C)return!0;return String(C).length>=q||B}})}max(q,z){let B=z||`Must be no more than ${q} characters`;return this.addRule({name:"max",message:B,validate:(C)=>{if(!C)return!0;return String(C).length<=q||B}})}length(q,z,B){let C=B||`Must be between ${q} and ${z} characters`;return this.addRule({name:"length",message:C,validate:(G)=>{if(!G)return!0;let L=String(G).length;return L>=q&&L<=z||C}})}pattern(q,z="Invalid format"){return this.addRule({name:"pattern",message:z,validate:(B)=>{if(!B)return!0;return q.test(String(B))||z}})}hasUppercase(q="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,q)}hasLowercase(q="Must contain a lowercase letter"){return this.pattern(/[a-z]/,q)}hasNumber(q="Must contain a number"){return this.pattern(/\d/,q)}hasSpecial(q="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,q)}alphanumeric(q="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,q)}startsWithLetter(q="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,q)}noSpaces(q="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:q,validate:(z)=>{if(!z)return!0;return!String(z).includes(" ")||q}})}number(q="Must be a number"){let z=this.addRule({name:"number",message:q,validate:(B)=>{if(!B&&B!==0)return!0;return!Number.isNaN(Number(B))||q}});return z.defaultValue=0,z}integer(q="Must be a whole number"){return this.addRule({name:"integer",message:q,validate:(z)=>{if(!z&&z!==0)return!0;return Number.isInteger(Number(z))||q}})}positive(q="Must be a positive number"){return this.addRule({name:"positive",message:q,validate:(z)=>{if(!z&&z!==0)return!0;return Number(z)>0||q}})}negative(q="Must be a negative number"){return this.addRule({name:"negative",message:q,validate:(z)=>{if(!z&&z!==0)return!0;return Number(z)<0||q}})}minValue(q,z){let B=z||`Must be at least ${q}`;return this.addRule({name:"minValue",message:B,validate:(C)=>{if(!C&&C!==0)return!0;return Number(C)>=q||B}})}maxValue(q,z){let B=z||`Must be no more than ${q}`;return this.addRule({name:"maxValue",message:B,validate:(C)=>{if(!C&&C!==0)return!0;return Number(C)<=q||B}})}between(q,z,B){let C=B||`Must be between ${q} and ${z}`;return this.addRule({name:"between",message:C,validate:(G)=>{if(!G&&G!==0)return!0;let L=Number(G);return L>=q&&L<=z||C}})}matches(q,z){let B=z||`Must match ${q}`;return this.addRule({name:"matches",message:B,validate:(C,G)=>{if(!G)return!0;return C===G[q]||B}})}oneOf(q,z){let B=z||`Must be one of: ${q.join(", ")}`;return this.addRule({name:"oneOf",message:B,validate:(C)=>{if(!C)return!0;return q.includes(C)||B}})}notOneOf(q,z){let B=z||`Cannot be one of: ${q.join(", ")}`;return this.addRule({name:"notOneOf",message:B,validate:(C)=>{if(!C)return!0;return!q.includes(C)||B}})}date(q="Must be a valid date"){return this.addRule({name:"date",message:q,validate:(z)=>{if(!z)return!0;let B=new Date(String(z));return!Number.isNaN(B.getTime())||q}})}before(q,z){let B=new Date(q),C=z||`Must be before ${B.toLocaleDateString()}`;return this.addRule({name:"before",message:C,validate:(G)=>{if(!G)return!0;return new Date(String(G))<B||C}})}after(q,z){let B=new Date(q),C=z||`Must be after ${B.toLocaleDateString()}`;return this.addRule({name:"after",message:C,validate:(G)=>{if(!G)return!0;return new Date(String(G))>B||C}})}custom(q,z="Invalid value"){return this.addRule({name:"custom",message:z,validate:q})}async(q,z="Invalid value"){return this.addRule({name:"async",message:z,async:!0,validate:q})}when(q,z){let B=new Z;B.rules=[...this.rules],B.defaultValue=this.defaultValue;for(let C of z.getRules())B.rules.push({...C,validate:(G,L)=>{if(!q(G,L||{}))return!0;return C.validate(G,L)}});return B}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(q){let z=new Z;return z.rules=[...this.rules],z.defaultValue=q,z}async validate(q,z){let B=[];for(let C of this.rules){let G=await C.validate(q,z);if(G!==!0)B.push(G)}return B}validateSync(q,z){let B=[];for(let C of this.rules){if(C.async)continue;let G=C.validate(q,z);if(G!==!0)B.push(G)}return B}}var y=new Z;function w(q,z,B){let C=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return q.replace(C,(G,L,W)=>{try{let X=L.trim().split("."),J=z;for(let O of X)if(J&&typeof J==="object"&&O in J)J=J[O];else return"";let M=J;if(!M||!Array.isArray(M)||M.length===0)return"";return M.map((O)=>{return W.replace(/\{\{\s*message\s*\}\}/g,O)}).join(`
|
|
3
3
|
`)}catch{return""}})}function D(q,z,B){let C=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return q.replace(C,(G,L,W)=>{try{let X=L.trim().split("."),J=z;for(let O of X)if(J&&typeof J==="object"&&O in J)J=J[O];else return"";let M=J;if(!M||!Array.isArray(M)||M.length===0)return"";return M.map((O)=>W.replace(/\{\{\s*message\s*\}\}/g,O)).join(`
|
|
4
|
-
`)}catch{return""}})}function S(q,z,B){let C=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return q.replace(C,(G,L,W)=>{try{let X=L.trim().split("."),J=z;for(let O of X)if(J&&typeof J==="object"&&O in J)J=J[O];else return"";let M=J;if(!M||!Array.isArray(M)||M.length===0)return"";return W}catch{return""}})}function V(q,z,B){let C=q;return C=w(C,z,B),C=D(C,z,B),C=S(C,z,B),C}export{$ as
|
|
4
|
+
`)}catch{return""}})}function S(q,z,B){let C=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return q.replace(C,(G,L,W)=>{try{let X=L.trim().split("."),J=z;for(let O of X)if(J&&typeof J==="object"&&O in J)J=J[O];else return"";let M=J;if(!M||!Array.isArray(M)||M.length===0)return"";return W}catch{return""}})}function V(q,z,B){let C=q;return C=w(C,z,B),C=D(C,z,B),C=S(C,z,B),C}export{$ as ii,E as ji,Z as ki,y as li,w as mi,D as ni,S as oi,V as pi};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{hv as W,iv as k,jv as G}from"./chunk-2vza9m2x.js";import A from"fs";import B from"path";function h(j){let q=0;for(let K=0;K<j.length;K++){let Q=j[K];q=(q<<5)-q+Q,q=q&q}return Math.abs(q).toString(16).padStart(8,"0")}function u(j,q){let K=B.basename(j);for(let Q of q)if(Q.startsWith("*.")){let Y=Q.slice(1);if(K.endsWith(Y))return!0}else if(Q.includes("*")){let Y=new RegExp(`^${Q.replace(/\*/g,".*")}$`);if(Y.test(K)||Y.test(j))return!0}else if(K===Q||j.includes(Q))return!0;return!1}function f(j,q,K){let Q=B.extname(j).toLowerCase(),Y=l[Q],X=(K.maxFileSizeKB||500)*1024;if(q>X)return!1;if(K.exclude&&u(j,K.exclude))return!1;if(K.include&&K.include.length>0){for(let Z of K.include)if(Z.startsWith("*.")){if(j.endsWith(Z.slice(1)))return!0}else if(j.includes(Z))return!0}if(Y&&K[Y]===!0)return!0;if(!Y)return!1;return!1}function T(j,q,K,Q){let Y=A.readdirSync(j,{withFileTypes:!0});for(let X of Y){let Z=B.join(j,X.name);if(X.isDirectory()){if(["node_modules",".git",".stx"].includes(X.name))continue;T(Z,q,K,Q)}else if(X.isFile()){let O=A.statSync(Z),_=B.relative(q,Z);if(f(_,O.size,K)){let $=A.readFileSync(Z),L=h($),V=`/${_.replace(/\\/g,"/")}`;Q.push({url:V,revision:L,size:O.size})}}}}function U(j,q){let K=q.pwa?.precache,Q=[];if(!K?.enabled)return{entries:[],totalSize:0,fileCount:0};if(!A.existsSync(j))return{entries:[],totalSize:0,fileCount:0};T(j,j,K,Q),Q.sort((X,Z)=>X.url.localeCompare(Z.url));let Y=Q.reduce((X,Z)=>X+Z.size,0);return{entries:Q,totalSize:Y,fileCount:Q.length}}function J(j){if(j.entries.length===0)return"[]";return`[
|
|
3
3
|
${j.entries.map((K)=>` { url: '${K.url}', revision: '${K.revision}' }`).join(`,
|
|
4
4
|
`)}
|
|
5
5
|
]`}function E(j){if(j<1024)return`${j} B`;if(j<1048576)return`${(j/1024).toFixed(1)} KB`;return`${(j/1048576).toFixed(2)} MB`}var l;var F=G(()=>{l={".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 g(j){let q={"cache-first":{className:"CacheFirst",importFrom:"workbox-strategies"},"network-first":{className:"NetworkFirst",importFrom:"workbox-strategies"},"stale-while-revalidate":{className:"StaleWhileRevalidate",importFrom:"workbox-strategies"},"network-only":{className:"NetworkOnly",importFrom:"workbox-strategies"},"cache-only":{className:"CacheOnly",importFrom:"workbox-strategies"}};return q[j]||q["network-first"]}function R(j){return g(j).className}function M(j){let q=j.pwa;if(!q?.enabled)return"";let K=q.routes||[],Q=q.cacheStorage,Y=[];for(let X of K){let Z=R(X.strategy),O=[];if(X.maxAgeSeconds||X.maxEntries||Q?.maxEntries){let $=X.maxEntries||Q?.maxEntries||100,L=X.maxAgeSeconds||(Q?.maxAge?Q.maxAge*24*60*60:void 0);O.push(`new ExpirationPlugin({
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
function A(h){let q=/import\s*\{([^}]+)\}\s*from\s*['"](@stores|stx\/stores)['"]\s*;?\n?/g;h=h.replace(q,(w,j)=>{return`const { ${j.split(",").map((k)=>k.trim()).filter(Boolean).join(", ")} } = window.__STX_STORES__
|
|
3
|
+
`});let v=/import\s*\{([^}]+)\}\s*from\s*['"]@composables['"]\s*;?\n?/g;return h=h.replace(v,(w,j)=>{return`const { ${j.split(",").map((k)=>k.trim()).filter(Boolean).join(", ")} } = window.__composables
|
|
4
|
+
`}),h}function B(h){return h.replace(/^import\s+[^'"]*?from\s*['"][^'"]+['"]\s*;?[ \t]*$/gm,"").replace(/^import\s+['"][^'"]+['"]\s*;?[ \t]*$/gm,"")}
|
|
5
|
+
export{A as Vt,B as Wt};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Hk as a,Ik as b,Jk as c,Kk as d,Lk as e}from"./chunk-hpybjwwf.js";import"./chunk-
|
|
2
|
+
import{Hk as a,Ik as b,Jk as c,Kk as d,Lk as e}from"./chunk-hpybjwwf.js";import"./chunk-2vza9m2x.js";export{d as runPwaAudit,e as formatAuditResult,c as calculateAuditResult,a as auditConfig,b as auditBuildOutput};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{kv as H}from"./chunk-2vza9m2x.js";import P from"path";var $=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function G(...v){let w=new Set;for(let q of v){if(!q||!q.includes("__stxModules["))continue;for(let z of q.matchAll($))try{w.add(JSON.parse(`"${z[1]}"`))}catch{}}return[...w].sort()}async function T(v,w={}){if(v.length===0)return null;let q=process.cwd(),z=[],J=[];v.forEach((j,X)=>{let Z=j.startsWith("npm:")?j.slice(4):P.resolve(q,j),N=`__stxRegistered${X}`,O=JSON.stringify(j);z.push(`import * as ${N} from ${JSON.stringify(Z)};`),J.push(`if (!globalThis.__stxModules[${O}]) globalThis.__stxModules[${O}] = ${N};`)});let L=[...z,"globalThis.__stxModules = globalThis.__stxModules || {};",...J].join(`
|
|
3
|
+
`),B;try{let{bundleClientScript:j}=await import("./chunk-91ffbzmh.js");B=await j(L,P.join(q,".stx-module-registry.ts"),{projectRoot:q,minify:w.minify,externalizeUserModules:!1})}catch(j){return console.warn("[stx] could not build the page module registry (#1957):",j),null}let{transformAutoImports:Q,generateAutoImportDestructuring:U}=await import("./chunk-vtjfv7kg.js"),F=Q(B),V=U(F.stxImports,F.browserImports),{transformStoreImports:W}=await import("./chunk-437n7hyx.js");B=W(F.code);let M=JSON.stringify(new Bun.CryptoHasher("md5").update(L).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${M}]) return;`,` __stxBundles[${M}] = true;`,V,B,"})();"].join(`
|
|
4
|
+
`)}export{G as registeredModuleIdsIn,T as buildModuleRegistryScript};
|
|
@@ -27,4 +27,4 @@ Check your site ID or create a new site at https://app.netlify.com`,"SITE_NOT_FO
|
|
|
27
27
|
`))Q+=`
|
|
28
28
|
`}Q+=`NETLIFY_SITE_ID=${K.siteId}
|
|
29
29
|
`,await Bun.write(W,Q)}return{configPath:V,siteId:K.siteId}}class R extends Error{code;constructor(K,L){super(K);this.name="DeployError",this.code=L}}function d(K){let L=process.platform,V=L==="darwin"?"open":L==="win32"?"start":"xdg-open";Bun.spawn([V,K],{stdio:["ignore","ignore","ignore"]})}
|
|
30
|
-
export{D as
|
|
30
|
+
export{D as if,h as jf,x as kf,T as lf,v as mf,z as nf,N as of,u as pf,j as qf,q as rf,b as sf,P as tf,n as uf,i as vf,R as wf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-3p0n9ryv.js";import"./chunk-qj2s3r1w.js";import"./chunk-ymc99r5x.js";import"./chunk-dcxtrqfy.js";import"./chunk-jj6yp7gm.js";import"./chunk-qjkzpd68.js";import"./chunk-t5c7rk0h.js";import"./chunk-72c7gyqc.js";import"./chunk-fv923f7g.js";import"./chunk-2e6xafcm.js";import"./chunk-nygtwffe.js";import"./chunk-461br5nn.js";import"./chunk-h7v70dbp.js";import"./chunk-drbbt69f.js";import"./chunk-kb5j08tq.js";import"./chunk-2vza9m2x.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
|