@stacksjs/stx 0.2.194 → 0.2.196

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.
Files changed (130) hide show
  1. package/dist/chunk-0ae6chzd.js +4 -0
  2. package/dist/chunk-0w0mrtme.js +2 -0
  3. package/dist/chunk-0y46fbkx.js +3 -0
  4. package/dist/chunk-118a77bs.js +4471 -0
  5. package/dist/chunk-12nvcvtn.js +3 -0
  6. package/dist/chunk-14ynv5ah.js +2 -0
  7. package/dist/chunk-1e25ksp6.js +3 -0
  8. package/dist/chunk-1mhc4g86.js +43 -0
  9. package/dist/chunk-1thssz8x.js +2 -0
  10. package/dist/chunk-1yk07x7b.js +2 -0
  11. package/dist/chunk-2zkj69dg.js +13 -0
  12. package/dist/chunk-338316c2.js +2 -0
  13. package/dist/chunk-3952ykhb.js +1655 -0
  14. package/dist/chunk-3es366z4.js +3 -0
  15. package/dist/chunk-3m49eb4v.js +2 -0
  16. package/dist/chunk-3nmpfsw5.js +2 -0
  17. package/dist/chunk-3vy1q9da.js +2 -0
  18. package/dist/chunk-4a4h28pp.js +3022 -0
  19. package/dist/chunk-4pf61rcb.js +2 -0
  20. package/dist/chunk-5anpcnde.js +2 -0
  21. package/dist/chunk-5mkkre22.js +505 -0
  22. package/dist/chunk-5n0dt838.js +2 -0
  23. package/dist/chunk-5s2y052b.js +2 -0
  24. package/dist/chunk-5v64c8tr.js +2 -0
  25. package/dist/chunk-5xd7vge2.js +2 -0
  26. package/dist/chunk-6bxcjdp4.js +2 -0
  27. package/dist/chunk-6msvxnbr.js +2 -0
  28. package/dist/chunk-7kger0se.js +1280 -0
  29. package/dist/chunk-7ry55nms.js +3 -0
  30. package/dist/chunk-7s0wfa4e.js +24 -0
  31. package/dist/chunk-7w4c5w2b.js +2 -0
  32. package/dist/chunk-8src5smc.js +15 -0
  33. package/dist/chunk-937effkz.js +2 -0
  34. package/dist/chunk-9b82d4g5.js +3 -0
  35. package/dist/chunk-9xh78snm.js +3 -0
  36. package/dist/chunk-a2899x2t.js +2 -0
  37. package/dist/chunk-abpw3b39.js +2 -0
  38. package/dist/chunk-avwj12at.js +194 -0
  39. package/dist/chunk-b6jhznkh.js +71 -0
  40. package/dist/chunk-bpa2jeyw.js +3 -0
  41. package/dist/chunk-cbc56wpd.js +3 -0
  42. package/dist/chunk-dhpy0h9y.js +2 -0
  43. package/dist/chunk-dtmwr674.js +302 -0
  44. package/dist/chunk-dxfcyj8t.js +2 -0
  45. package/dist/chunk-e0460y7f.js +29 -0
  46. package/dist/chunk-ede7zpjf.js +2 -0
  47. package/dist/chunk-ehfzp7xe.js +2 -0
  48. package/dist/chunk-fd77g6t6.js +2 -0
  49. package/dist/chunk-fnkxbnka.js +30 -0
  50. package/dist/chunk-fvjh7rx0.js +84 -0
  51. package/dist/chunk-g19skgmw.js +18 -0
  52. package/dist/chunk-gcnrdgrq.js +3 -0
  53. package/dist/chunk-h2wpnxrh.js +8 -0
  54. package/dist/chunk-hb83d0qc.js +2 -0
  55. package/dist/chunk-hncp9gz6.js +8 -0
  56. package/dist/chunk-ht51fz7w.js +4 -0
  57. package/dist/chunk-hyrjade7.js +321 -0
  58. package/dist/chunk-hyyzp99b.js +2 -0
  59. package/dist/chunk-jpbk42j7.js +2 -0
  60. package/dist/chunk-jr5tp4ks.js +2 -0
  61. package/dist/chunk-k03b9z9e.js +898 -0
  62. package/dist/chunk-kjr22neh.js +3 -0
  63. package/dist/chunk-mjt5e2jy.js +2 -0
  64. package/dist/chunk-mkm91b6w.js +2 -0
  65. package/dist/chunk-mtr2f82n.js +2 -0
  66. package/dist/chunk-n8zpm7xb.js +397 -0
  67. package/dist/chunk-ndnc7k2n.js +22 -0
  68. package/dist/chunk-nenge2m2.js +2 -0
  69. package/dist/chunk-nngpktr2.js +2 -0
  70. package/dist/chunk-nsjyn31z.js +2 -0
  71. package/dist/chunk-nye9brje.js +147 -0
  72. package/dist/chunk-p5kp35dy.js +2 -0
  73. package/dist/chunk-pw0rzgpv.js +3 -0
  74. package/dist/chunk-q020t182.js +2 -0
  75. package/dist/chunk-q4gp9egt.js +4 -0
  76. package/dist/chunk-q8szpd6w.js +3 -0
  77. package/dist/chunk-q9n5swx7.js +3 -0
  78. package/dist/chunk-qpcwahse.js +2 -0
  79. package/dist/chunk-qz75kx6n.js +231 -0
  80. package/dist/chunk-r41nsgym.js +116 -0
  81. package/dist/chunk-r4qnvxhv.js +18 -0
  82. package/dist/chunk-r6p4ws0a.js +3809 -0
  83. package/dist/chunk-rdf7d42n.js +2 -0
  84. package/dist/chunk-rs2fa3g1.js +2 -0
  85. package/dist/chunk-ryjpp51z.js +499 -0
  86. package/dist/chunk-s018d32j.js +30 -0
  87. package/dist/chunk-spn8e3b3.js +2 -0
  88. package/dist/chunk-sry9atvv.js +2 -0
  89. package/dist/chunk-st5qggks.js +3 -0
  90. package/dist/chunk-tywvd1zc.js +11 -0
  91. package/dist/chunk-v3ryxw4v.js +2 -0
  92. package/dist/chunk-va9k88da.js +2 -0
  93. package/dist/chunk-vgk5v31k.js +216 -0
  94. package/dist/chunk-vj320kyr.js +2 -0
  95. package/dist/chunk-vr3qtsj4.js +2 -0
  96. package/dist/chunk-w0ng9e1m.js +341 -0
  97. package/dist/chunk-w29sv5jf.js +2 -0
  98. package/dist/chunk-whq99ytc.js +7987 -0
  99. package/dist/chunk-wnaddtv3.js +288 -0
  100. package/dist/chunk-wtengj6h.js +2 -0
  101. package/dist/chunk-x0ks1fer.js +1194 -0
  102. package/dist/chunk-x0zh76yv.js +4 -0
  103. package/dist/chunk-x13f5bbe.js +358 -0
  104. package/dist/chunk-xfp10a23.js +2 -0
  105. package/dist/chunk-xp3fp266.js +11 -0
  106. package/dist/chunk-xz019t7t.js +2 -0
  107. package/dist/chunk-y35rktea.js +12 -0
  108. package/dist/chunk-y4hkqsgw.js +4 -0
  109. package/dist/chunk-yab6d6kb.js +28 -0
  110. package/dist/chunk-yckd6ks5.js +3 -0
  111. package/dist/chunk-ycn1vnv2.js +5 -0
  112. package/dist/chunk-yf3bmmkk.js +8 -0
  113. package/dist/chunk-ygr11tgz.js +3 -0
  114. package/dist/chunk-ymccpdg6.js +351 -0
  115. package/dist/chunk-yr2wc2pa.js +3 -0
  116. package/dist/chunk-yv340gxj.js +2 -0
  117. package/dist/chunk-z2sp0k8d.js +3 -0
  118. package/dist/chunk-z5cm0bwn.js +11 -0
  119. package/dist/chunk-zda3hvde.js +14 -0
  120. package/dist/chunk-zgvga8rc.js +5 -0
  121. package/dist/chunk-zqbw8zqq.js +3 -0
  122. package/dist/cli.js +108 -27481
  123. package/dist/craft-entry.js +9 -5
  124. package/dist/craft.js +7 -18503
  125. package/dist/database.js +2 -2
  126. package/dist/pwa.js +8 -16603
  127. package/dist/ssg.js +52 -15512
  128. package/dist/variable-extractor.js +12 -2
  129. package/dist/visual-testing.js +1 -1
  130. package/package.json +5 -5
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Vl as F,Xl as V,jm as I}from"./chunk-r6p4ws0a.js";function R(j,W){let U=1,z=W,G="<template",X="</template";while(z<j.length&&U>0){let J=j.indexOf("<",z);if(J===-1)break;if(z=J,j.startsWith(G,z)&&(z+G.length>=j.length||/[\s>\/]/.test(j[z+G.length]))){U++,z+=G.length;continue}if(j.startsWith(X,z)){let Y=j.indexOf(">",z+X.length);if(Y!==-1){if(U--,U===0)return Y+1;z=Y+1;continue}}z++}return U===0?z:-1}var P=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function D(j,W){let U=null;for(let z=W;z<j.length;z++){let G=j[z];if(U){if(G==="\\"){z++;continue}if(G===U)U=null;continue}if(G==='"'||G==="'"){U=G;continue}if(G===">")return z+1}return-1}function b(j){let W=[],U=[],z=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,G=0;while(G<j.length){let X=j.indexOf("<",G);if(X===-1)break;if(j.startsWith("<!--",X)){let $=j.indexOf("-->",X+4);G=$===-1?j.length:$+3;continue}let J=D(j,X+1);if(J===-1)break;let Y=j.slice(X,J),Q=Y.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!Q){G=J;continue}let Z=Q[1]==="/",H=Q[2].toLowerCase();if(Z){let $=U.lastIndexOf(H);if($!==-1)U.splice($);G=J;continue}if(H==="template"&&U.length===0){let $=Y.match(z);if($){let K=R(j,J);if(K!==-1){let O=$[1]||$[2]||$[3];W.push({start:X,end:K,slotName:O,content:j.slice(J,K-11).trim(),propsBinding:$[4]||void 0}),G=K;continue}}}if(!/\/\s*>$/.test(Y)&&!P.has(H)){if(U.push(H),H==="script"||H==="style"){let $=j.toLowerCase().indexOf(`</${H}>`,J);if($!==-1){G=$;continue}}}G=J}return W}function w(j){let W={default:"",named:new Map},U=j,z=b(j);for(let Q of z)W.named.set(Q.slotName,{name:Q.slotName,content:Q.content,propsBinding:Q.propsBinding});z.sort((Q,Z)=>Z.start-Q.start);for(let Q of z)U=U.slice(0,Q.start)+U.slice(Q.end);let G=[],X=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*)>([\s\S]*?)<\/\1>/gi,J;while((J=X.exec(U))!==null){let[Q,Z,H,_,$,K]=J,O=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),L=(O+B).trim(),q=`<${Z}${L?" "+L:""}>${K}</${Z}>`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:q})}let Y=/<([a-zA-Z][a-zA-Z0-9-]*)\b([^>]*?)\bslot="([^"]+)"([^>]*?)\/>/gi;while((J=Y.exec(U))!==null){let[Q,Z,H,_,$]=J,K=H.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),O=$.replace(/\s*slot="[^"]*"\s*/," ").trimEnd(),B=(K+O).trim(),L=`<${Z}${B?" "+B:""} />`;G.push({start:J.index,end:J.index+Q.length,slotName:_,element:L})}G.sort((Q,Z)=>Z.start-Q.start);for(let Q of G){let Z=W.named.get(Q.slotName);if(Z)Z.content+=Q.element;else W.named.set(Q.slotName,{name:Q.slotName,content:Q.element});U=U.slice(0,Q.start)+U.slice(Q.end)}return W.default=U.trim(),W}function C(j){let W=j.match(/name\s*=\s*["']([^"']+)["']/),U=W?W[1]:"",z={},G=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,X;while((X=G.exec(j))!==null)z[X[1]]=X[2];let J=j.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),Y=J?J[1].trim():"";return{name:U,props:z,defaultContent:Y}}async function N(j,W,U,z){if(!j)return U;let G=j.content;if(j.propsBinding&&Object.keys(W).length>0){let X=j.propsBinding.trim(),J={...z};if(X.startsWith("{")&&X.endsWith("}")){let Y=X.slice(1,-1).split(",").map((Q)=>Q.trim()).filter(Boolean);for(let Q of Y){let[Z,H]=Q.split(":").map(($)=>$.trim()),_=H||Z;if(W[Z]!==void 0)J[_]=W[Z]}}else J[X]=W;G=k(G,J)}return G}function k(j,W){return j.replace(/\{\{\s*([^}]+)\s*\}\}/g,(U,z)=>{try{let G=z.trim(),X=y(G,W);return I(String(X??""))}catch{return`{{ ${z} }}`}})}function y(j,W){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(j)){let z=j.split("."),G=W;for(let X of z)if(G&&typeof G==="object"&&X in G)G=G[X];else return;return G}let U=j.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(U){let[,z,G,X]=U,J=W[z],Y=parseInt(X,10);if(typeof J==="number")switch(G){case"+":return J+Y;case"-":return J-Y;case"*":return J*Y;case"/":return J/Y}}try{if(!F(j))return;return V(j,Object.keys(W))(...Object.values(W))}catch{return}}async function A(j,W,U){let z=j;z=await v(z,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(J,Y,Q,Z)=>{let H=W.named.get(Y),_=Z?.trim()||"",$=Q||"",K={},O=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,B;while((B=O.exec($))!==null){let L=B[1],q=B[2];K[L]=y(q,U)}return await N(H,K,_,U)});let X=/<slot\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return z=z.replace(X,(J,Y)=>{if(J.includes("name="))return J;let Q=Y?.trim()||"";return W.default||Q}),z}async function v(j,W,U){let z=[],G=[];j.replace(W,(Y,...Q)=>{let Z=Q[Q.length-2];return G.push({match:Y,index:Z}),z.push(U(Y,...Q.slice(0,-2))),Y});let X=await Promise.all(z),J=j;for(let Y=G.length-1;Y>=0;Y--){let{match:Q,index:Z}=G[Y];J=J.slice(0,Z)+X[Y]+J.slice(Z+Q.length)}return J}function E(j){let W=w(j);return{defaultSlot:W.default,namedSlots:W.named}}async function M(j,W,U,z){return await A(j,{default:W,named:U},z)}
3
+ export{w as fh,C as gh,N as hh,A as ih,E as jh,M as kh};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{fh as a,gh as b,hh as c,ih as d,jh as e,kh as f}from"./chunk-12nvcvtn.js";import"./chunk-r6p4ws0a.js";import"./chunk-8src5smc.js";import"./chunk-gcnrdgrq.js";import"./chunk-xp3fp266.js";import"./chunk-nye9brje.js";import"./chunk-tywvd1zc.js";import"./chunk-cbc56wpd.js";import"./chunk-x0zh76yv.js";import"./chunk-0ae6chzd.js";import"./chunk-kjr22neh.js";import"./chunk-3952ykhb.js";import"./chunk-dtmwr674.js";import"./chunk-pw0rzgpv.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{og as T}from"./chunk-ygr11tgz.js";import{hu as I}from"./chunk-pw0rzgpv.js";import E from"fs";import X from"path";import U from"crypto";var _=new Set(["webp","avif","jpeg","png"]),F=new Set(["cover","contain","fill","inside","outside"]),A=new Set([".jpg",".jpeg",".png",".webp",".avif",".gif"]),S=4096,y=80,D="cover";async function g(k,G){let J=G.routePath??"/_stx/img",B=new URL(k.url);if(B.pathname!==J)return null;let $=q(B,G);if(!$.ok)return new Response($.error,{status:$.status,headers:{"Content-Type":"text/plain"}});let{srcFsPath:j,srcUrl:K,width:H,height:v,format:Z,quality:Y,fit:z}=$,C;try{C=E.statSync(j)}catch{return new Response(`Source image not found: ${K}`,{status:404,headers:{"Content-Type":"text/plain"}})}if(!C.isFile())return new Response("Not a file",{status:404,headers:{"Content-Type":"text/plain"}});let N=G.cacheDir??".stx/cache/img";await E.promises.mkdir(N,{recursive:!0});let V=`${j}:${C.mtimeMs}:${C.size}`,O=`${H}x${v}:${Z}:${Y}:${z}`,b=U.createHash("sha256").update(`${V}|${O}`).digest("hex").slice(0,16),Q=X.join(N,`${b}.${Z}`),W={"Content-Type":T(Z),"Cache-Control":"public, max-age=31536000, immutable",ETag:`"${b}"`,"X-Stx-Image-Cache":"HIT"};if(k.headers.get("if-none-match")===`"${b}"`)return new Response(null,{status:304,headers:W});let L=Bun.file(Q);if(await L.exists())return new Response(L,{headers:W});try{let R=Buffer.from(await Bun.file(j).arrayBuffer()),{resizeAndConvert:M}=await P(),w=await M(R,{width:H,height:v,format:Z,quality:Y,fit:z});return await Bun.write(Q,w),W["X-Stx-Image-Cache"]="MISS",new Response(new Uint8Array(w),{headers:W})}catch(R){let M=R.message;return new Response(`Image processing failed: ${M}`,{status:500,headers:{"Content-Type":"text/plain"}})}}function l(k){return async(G)=>{return await g(G,k)??new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain"}})}}function q(k,G){let J=k.searchParams.get("src");if(!J)return{ok:!1,error:"Missing required param: src",status:400};if(!J.startsWith("/"))return{ok:!1,error:"src must be an absolute URL path (start with /)",status:400};if(J.startsWith("//"))return{ok:!1,error:"src must be a local path",status:400};let B=X.extname(J).toLowerCase();if(!A.has(B))return{ok:!1,error:`Unsupported source extension: ${B}`,status:400};let $=X.resolve(G.publicDir),j=X.resolve($,J.slice(1));if(!j.startsWith(`${$}${X.sep}`)&&j!==$)return{ok:!1,error:"src is outside publicDir",status:400};let K=G.maxWidth??S,H=G.maxHeight??S,v=k.searchParams.get("w"),Z=k.searchParams.get("h"),Y=v?Number.parseInt(v,10):0,z=Z?Number.parseInt(Z,10):0;if(v&&(!Number.isFinite(Y)||Y<=0))return{ok:!1,error:"Invalid w (must be positive integer)",status:400};if(Z&&(!Number.isFinite(z)||z<=0))return{ok:!1,error:"Invalid h (must be positive integer)",status:400};if(!v&&!Z)return{ok:!1,error:"At least one of w or h is required",status:400};let C=Math.min(Y||K,K),N=Math.min(z||H,H),V=k.searchParams.get("f")||"webp";if(!_.has(V))return{ok:!1,error:`Invalid f (must be one of: ${[..._].join(", ")})`,status:400};let O=V,b=k.searchParams.get("q"),Q=b?Number.parseInt(b,10):G.defaultQuality??y;if(!Number.isFinite(Q)||Q<1||Q>100)return{ok:!1,error:"Invalid q (must be 1-100)",status:400};let x=k.searchParams.get("fit")||G.defaultFit||D;if(!F.has(x))return{ok:!1,error:`Invalid fit (must be one of: ${[...F].join(", ")})`,status:400};return{ok:!0,srcFsPath:j,srcUrl:J,width:C,height:N,format:O,quality:Q,fit:x}}async function P(){return await import("./chunk-abpw3b39.js")}
3
+ export{g as Tf,l as Uf};
@@ -0,0 +1,43 @@
1
+ // @bun
2
+ import{bg as L,cg as w,dg as x,eg as p,fg as F,gg as T,jg as I,kg as f,lg as l,mg as n,ng as i,og as P,pg as o,qg as a}from"./chunk-ygr11tgz.js";import{ms as ZG}from"./chunk-nye9brje.js";function HG(X,Z={}){let{src:G,alt:J,width:q,height:$,sizes:K="100vw",loading:Q="lazy",priority:Y=!1,quality:M=x,placeholder:N="none",formats:j=w,widths:C=L,decoding:B="async",fetchpriority:V,objectFit:O,objectPosition:W}=X,H=X.class,z=X.style,{processedImage:R,variants:_,optimize:E=!0,isDev:S=!1}=Z;if(_&&_.length>0)return OG(X,_,R);if(S||!E)return MG(X);return VG(X)}function OG(X,Z,G){let{src:J,alt:q,width:$,height:K,sizes:Q="100vw",loading:Y="lazy",priority:M=!1,decoding:N="async",fetchpriority:j,objectFit:C,objectPosition:B,placeholder:V="none"}=X,O=X.class,W=X.style,H=n(Z),z=l(Z),R=typeof Q==="object"?f(Q):Q,_=G?G.aspectRatio:$&&K?Number($)/Number(K):void 0,E=[];if(_)E.push(`aspect-ratio: ${_}`);if(C)E.push(`object-fit: ${C}`);if(B)E.push(`object-position: ${B}`);if(W)E.push(W);let S=E.length>0?` style="${E.join("; ")}"`:"",b=O?` class="${O}"`:"",u=M?"":` loading="${Y}"`,d=` decoding="${N}"`,h=j?` fetchpriority="${j}"`:M?' fetchpriority="high"':"",r=["avif","webp","jpeg","png"],s=[];for(let U of r){let D=H.get(U);if(D&&D.length>0){let m=I(D),QG=P(U);s.push(` <source type="${QG}" srcset="${m}" sizes="${R}" />`)}}let e="",t="",g;if(V!=="none"&&G?.placeholder){let U=`img-${Math.random().toString(36).slice(2,8)}`;if(e=`<div class="stx-image-wrapper" id="${U}">`,t="</div>",V==="blur")g=`
3
+ #${U} {
4
+ position: relative;
5
+ background-image: url('${G.placeholder}');
6
+ background-size: cover;
7
+ background-position: center;
8
+ }
9
+ #${U} img {
10
+ transition: opacity 0.3s ease;
11
+ }
12
+ #${U}.loaded img {
13
+ opacity: 1;
14
+ }
15
+ `.trim();else if(V==="color")g=`
16
+ #${U} {
17
+ background-color: ${G.placeholder};
18
+ }
19
+ `.trim()}let BG=$?` width="${$}"`:G?` width="${G.width}"`:"",NG=K?` height="${K}"`:G?` height="${G.height}"`:"",WG=`${e}<picture>
20
+ ${s.join(`
21
+ `)}
22
+ <img
23
+ src="${z?.url||J}"
24
+ alt="${c(q)}"${BG}${NG}${b}${S}${u}${d}${h}
25
+ />
26
+ </picture>${t}`,GG;if(M&&z){let U=H.get("webp"),D=U?.[Math.floor(U.length/2)]||z,m=P(D.format);GG=`<link rel="preload" as="image" href="${D.url}" type="${m}" />`}return{html:WG,preloadLink:GG,placeholderCss:g}}function MG(X){let{src:Z,alt:G,width:J,height:q,loading:$="lazy",decoding:K="async",priority:Q=!1,fetchpriority:Y,objectFit:M,objectPosition:N}=X,j=X.class,C=X.style,B=[];if(M)B.push(`object-fit: ${M}`);if(N)B.push(`object-position: ${N}`);if(C)B.push(C);let V=B.length>0?` style="${B.join("; ")}"`:"",O=j?` class="${j}"`:"",W=J?` width="${J}"`:"",H=q?` height="${q}"`:"",z=Q?"":` loading="${$}"`,R=` decoding="${K}"`,_=Y?` fetchpriority="${Y}"`:Q?' fetchpriority="high"':"";return{html:`<img src="${Z}" alt="${c(G)}"${W}${H}${O}${V}${z}${R}${_} />`}}function VG(X){let{src:Z,alt:G,width:J,height:q,sizes:$="100vw",loading:K="lazy",priority:Q=!1,quality:Y=x,formats:M=w,widths:N=L,decoding:j="async",fetchpriority:C,objectFit:B,objectPosition:V}=X,O=X.class,W=X.style,H=[];if(B)H.push(`object-fit: ${B}`);if(V)H.push(`object-position: ${V}`);if(W)H.push(W);let z=H.length>0?` style="${H.join("; ")}"`:"",R=O?` class="${O}"`:"",_=J?` width="${J}"`:"",E=q?` height="${q}"`:"",S=Q?"":` loading="${K}"`,b=` decoding="${j}"`,u=C?` fetchpriority="${C}"`:Q?' fetchpriority="high"':"",d=typeof $==="object"?f($):$,h=`
27
+ data-stx-image
28
+ data-src="${Z}"
29
+ data-sizes="${d}"
30
+ data-quality="${Y}"
31
+ data-formats="${M.join(",")}"
32
+ data-widths="${N.join(",")}"
33
+ `.replace(/\s+/g," ").trim();return{html:`<img src="${Z}" alt="${c(G)}"${_}${E}${R}${z}${S}${b}${u} ${h} />`}}function JG(X){let Z=X.match(/<Image\s+([^>]*?)\/?>/);if(!Z)return null;let G=Z[1],J={},q=/(\w+)(?:=(?:"([^"]*)"|'([^']*)'|(\{[^}]+\})))?/g,$;while(($=q.exec(G))!==null){let[,K,Q,Y,M]=$,N=Q??Y??M??!0;switch(K){case"src":J.src=String(N);break;case"alt":J.alt=String(N);break;case"width":J.width=Number(N)||N;break;case"height":J.height=Number(N)||N;break;case"sizes":J.sizes=String(N);break;case"loading":J.loading=N;break;case"priority":J.priority=N===!0||N==="true";break;case"quality":J.quality=Number(N);break;case"placeholder":J.placeholder=N;break;case"class":J.class=String(N);break;case"style":J.style=String(N);break;case"decoding":J.decoding=N;break;case"fetchpriority":J.fetchpriority=N;break;case"objectFit":J.objectFit=N;break;case"objectPosition":J.objectPosition=String(N);break}}if(!J.src||!J.alt)return null;return J}async function jG(X,Z){let G=/<Image\s+[^>]*?\/?>/g,J=[],q=[],$=X,K,Q=[];while((K=G.exec(X))!==null)Q.push({match:K[0],index:K.index});for(let Y=Q.length-1;Y>=0;Y--){let{match:M}=Q[Y],N=JG(M);if(N){let j=await Z(N);if($=$.replace(M,j.html),j.preloadLink)J.push(j.preloadLink);if(j.placeholderCss)q.push(j.placeholderCss)}}return{html:$,preloadLinks:J,styles:q}}function c(X){return X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}var y=new Map;function CG(){y.clear()}async function _G(X,Z){let G=`${X}:${JSON.stringify(Z)}`;if(y.has(G))return y.get(G);try{let J=await T(X,Z);return y.set(G,J),J}catch{return null}}function $G(){return ZG({name:"image",hasEndTag:!1,description:"Render an optimized image with responsive variants",transform:async(X,Z,G)=>{let{src:J,alt:q,options:$}=EG(X,Z,G);if(!J)return console.warn("@image directive: missing src argument"),"<!-- @image: missing src -->";let K={widths:$.widths||($.width?[$.width]:L),formats:$.formats||w,quality:$.quality||x,placeholder:($.placeholder==="color"?"dominant-color":$.placeholder)||"none"};if(!await F())return XG(J,q||"",$);let Y=await _G(J,K);if(!Y)return XG(J,q||"",$);return zG(Y,q||"",$)}})}function EG(X,Z,G){if(Z.src)return{src:String(Z.src),alt:String(Z.alt||""),options:Z.options||{}};let q=X.trim();if(q.startsWith("@image(")||q.startsWith("("))q=q.replace(/^@image\(/,"").replace(/^\(/,"").replace(/\)$/,"");let $=RG(q),K=$[0]||"",Q=$[1]||"",Y={};if(K&&!K.startsWith("/")&&!K.startsWith(".")&&!K.startsWith("http")){let M=G[K];if(typeof M==="string")K=M}if($[2])try{if(typeof $[2]==="string")Y=JSON.parse($[2]);else Y=$[2]}catch{}return{src:K,alt:Q,options:Y}}function RG(X){let Z=[],G="",J=!1,q="",$=0,K=0;for(let Q=0;Q<X.length;Q++){let Y=X[Q],M=Q>0?X[Q-1]:"";if((Y==='"'||Y==="'")&&M!=="\\"){if(!J)J=!0,q=Y;else if(Y===q)J=!1,q="";else G+=Y;continue}if(!J){if(Y==="{")$++;if(Y==="}")$--;if(Y==="[")K++;if(Y==="]")K--;if(Y===","&&$===0&&K===0){Z.push(G.trim()),G="";continue}}G+=Y}if(G.trim())Z.push(G.trim());return Z}function XG(X,Z,G){let J=[`src="${k(X)}"`];if(Z)J.push(`alt="${k(Z)}"`);if(G.width)J.push(`width="${G.width}"`);if(G.height)J.push(`height="${G.height}"`);if(G.class)J.push(`class="${k(G.class)}"`);if(G.style)J.push(`style="${k(G.style)}"`);if(G.lazy!==!1)J.push('loading="lazy"');return J.push('decoding="async"'),`<img ${J.join(" ")} />`}function zG(X,Z,G){let{variants:J,placeholder:q,width:$,height:K,aspectRatio:Q}=X,Y=new Map;for(let W of J){let H=Y.get(W.format)||[];H.push(W),Y.set(W.format,H)}let M=["avif","webp","jpeg","png"],N=[];for(let W of M){let H=Y.get(W);if(H&&H.length>0){let z=I(H),R=P(W),_=G.sizes||"100vw";N.push(` <source type="${R}" srcset="${k(z)}" sizes="${k(_)}" />`)}}let j=Y.get("jpeg")||[],C=j.length>0?j[Math.floor(j.length/2)]:J[Math.floor(J.length/2)],B=[`src="${C?.url||X.src}"`,`alt="${k(Z)}"`];if(G.width||$)B.push(`width="${G.width||$}"`);if(G.height||K)B.push(`height="${G.height||K}"`);if(G.class)B.push(`class="${k(G.class)}"`);let V=[];if(Q)V.push(`aspect-ratio: ${Q.toFixed(4)}`);if(G.style)V.push(G.style);if(V.length>0)B.push(`style="${V.join("; ")}"`);if(G.lazy!==!1&&!G.priority)B.push('loading="lazy"');if(B.push('decoding="async"'),G.priority)B.push('fetchpriority="high"');let O=`<picture>
34
+ `;if(O+=N.join(`
35
+ `)+`
36
+ `,O+=` <img ${B.join(" ")} />
37
+ `,O+="</picture>",G.placeholder&&q){let W=`stx-img-${Math.random().toString(36).slice(2,8)}`;if(G.placeholder==="blur"||G.placeholder==="thumbhash"){let H=q.replace(/'/g,"%27").replace(/"/g,"%22");O=`<div id="${W}" class="stx-image-placeholder" style="background-image: url('${H}'); background-size: cover;">
38
+ ${O}
39
+ </div>`}else if(G.placeholder==="color"){let H=q.replace(/[^a-zA-Z0-9#(),.\s%-]/g,"");O=`<div id="${W}" class="stx-image-placeholder" style="background-color: ${H};">
40
+ ${O}
41
+ </div>`}}if(G.priority&&C){let W=P(C.format);O=`<link rel="preload" as="image" href="${k(C.url)}" type="${W}" />
42
+ `+O}return O}function k(X){return X.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#039;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}var UG=$G();import v from"fs";import A from"path";function LG(X={}){let{inputDirs:Z=["public","src/assets","assets"],outputDir:G="dist/images",baseUrl:J="/images",formats:q=w,widths:$=L,quality:K=x,placeholder:Q="none",concurrency:Y=4,cache:M=!0,cacheDir:N=".stx/image-cache",referencedOnly:j=!1,verbose:C=!1}=X,B={imageReferences:new Set,processedImages:new Map,stats:{totalImages:0,optimizedImages:0,savedBytes:0,variants:0}};return{name:"stx-image-optimization",async setup(V){if(!await F()){console.warn("[stx-images] no image backend available, optimization disabled");return}if(M)await v.promises.mkdir(N,{recursive:!0});if(C){let W=await p();console.log("[stx-images] Plugin initialized"),console.log(` Backend: ${W?"sharp (native fast path) + ts-images":"ts-images (pure TS)"}`),console.log(` Input dirs: ${Z.join(", ")}`),console.log(` Output dir: ${G}`),console.log(` Formats: ${q.join(", ")}`),console.log(` Widths: ${$.join(", ")}`)}},async buildStart(){B.imageReferences.clear(),B.processedImages.clear(),B.stats={totalImages:0,optimizedImages:0,savedBytes:0,variants:0}},async transform(V,O){if(O.endsWith(".html")||O.endsWith(".stx")){let W=wG(V);for(let H of W)B.imageReferences.add(H)}if(V.includes("<Image")||V.includes("@image"))return await kG(V,{formats:q,widths:$,quality:K,placeholder:Q,outputDir:G,baseUrl:J,processedImages:B.processedImages});return V},async buildEnd(V){if(!await F())return;await v.promises.mkdir(G,{recursive:!0});let W=[];for(let R of Z){if(!v.existsSync(R))continue;let _=await KG(R);W.push(..._)}let H=j?W.filter((R)=>xG(R,B.imageReferences)):W;if(B.stats.totalImages=H.length,C)console.log(`[stx-images] Processing ${H.length} images...`);let z=qG(H,Y);for(let R of z)await Promise.all(R.map(async(_)=>{try{let E=await T(_,{formats:q,widths:$,quality:K,placeholder:Q,outputDir:G,baseUrl:J});B.processedImages.set(_,E),B.stats.optimizedImages++,B.stats.variants+=E.variants.length;let S=v.statSync(_).size,b=o(E.variants);if(B.stats.savedBytes+=Math.max(0,S-b/E.variants.length),C)console.log(` \u2713 ${A.basename(_)} \u2192 ${E.variants.length} variants`)}catch(E){console.error(`[stx-images] Error processing ${_}:`,E)}}));if(console.log("[stx-images] Optimization complete:"),console.log(` Images: ${B.stats.optimizedImages}/${B.stats.totalImages}`),console.log(` Variants: ${B.stats.variants}`),B.stats.savedBytes>0)console.log(` Saved: ~${a(B.stats.savedBytes)}`)}}}function wG(X){let Z=[],G=/src=["']([^"']+\.(jpg|jpeg|png|webp|avif|gif))["']/gi,J;while((J=G.exec(X))!==null)Z.push(J[1]);let q=/<Image[^>]+src=["']([^"']+)["']/gi;while((J=q.exec(X))!==null)Z.push(J[1]);let $=/@image\s*\(\s*['"]([^'"]+)['"]/gi;while((J=$.exec(X))!==null)Z.push(J[1]);let K=/background(?:-image)?:\s*url\(["']?([^"')]+\.(jpg|jpeg|png|webp|avif|gif))["']?\)/gi;while((J=K.exec(X))!==null)Z.push(J[1]);return Z}function xG(X,Z){let G=A.basename(X);for(let J of Z)if(J.endsWith(G)||J.includes(G))return!0;return!1}async function kG(X,Z){return X}async function KG(X){let Z=[];async function G(J){let q=await v.promises.readdir(J,{withFileTypes:!0});for(let $ of q){let K=A.join(J,$.name);if($.isDirectory())await G(K);else if($.isFile()&&i(K))Z.push(K)}}return await G(X),Z}function qG(X,Z){let G=[];for(let J=0;J<X.length;J+=Z)G.push(X.slice(J,J+Z));return G}async function FG(X,Z,G={}){if(!await F())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");return T(X,{...G,outputDir:Z})}async function SG(X,Z,G={}){let{formats:J=w,widths:q=L,quality:$=x,placeholder:K="none",concurrency:Q=4,verbose:Y=!1}=G;if(!await F())throw Error("No image backend available \u2014 install sharp or ensure ts-images is bundled");await v.promises.mkdir(Z,{recursive:!0});let N=await KG(X),j=[],C={totalImages:N.length,optimizedImages:0,savedBytes:0,variants:0},B=qG(N,Q);for(let V of B){let O=await Promise.all(V.map(async(W)=>{try{let H=await T(W,{formats:J,widths:q,quality:$,placeholder:K,outputDir:Z,baseUrl:"/"});if(C.optimizedImages++,C.variants+=H.variants.length,Y)console.log(` \u2713 ${A.basename(W)}`);return H}catch(H){return console.error(`Error processing ${W}:`,H),null}}));j.push(...O.filter((W)=>W!==null))}return{processed:j,stats:C}}function YG(X){let Z={};for(let G of X)Z[G.src]={variants:G.variants,placeholder:G.placeholder};return Z}async function PG(X,Z){let G=YG(X);await Bun.write(Z,JSON.stringify(G,null,2))}var cG={enabled:!0,widths:[320,640,768,1024,1280,1536,1920],formats:["webp","jpeg"],quality:80,devOptimize:!1,cacheDir:".stx/image-cache",placeholder:"none",inputDirs:["public","src/assets","assets"],outputDir:"dist/images",baseUrl:"/images"};
43
+ export{HG as Hf,JG as If,jG as Jf,CG as Kf,$G as Lf,UG as Mf,LG as Nf,FG as Of,SG as Pf,YG as Qf,PG as Rf,cG as Sf};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ff as a}from"./chunk-zqbw8zqq.js";import"./chunk-r6p4ws0a.js";import"./chunk-8src5smc.js";import"./chunk-gcnrdgrq.js";import"./chunk-xp3fp266.js";import"./chunk-nye9brje.js";import"./chunk-tywvd1zc.js";import"./chunk-cbc56wpd.js";import"./chunk-x0zh76yv.js";import"./chunk-0ae6chzd.js";import"./chunk-kjr22neh.js";import"./chunk-3952ykhb.js";import"./chunk-dtmwr674.js";import"./chunk-pw0rzgpv.js";export{a as buildApp};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{As as g,Bs as h,Cs as i,Ds as j,Es as k,Fs as l,Gs as m,us as a,vs as b,ws as c,xs as d,ys as e,zs as f}from"./chunk-tywvd1zc.js";import"./chunk-cbc56wpd.js";import"./chunk-pw0rzgpv.js";export{f as resolveUserCrosswindConfig,c as resetCssCache,d as resetCrosswindCache,i as rebuildCrosswindCSS,e as loadCrosswindConfig,b as loadCrosswind,m as injectCrosswindCSS,a as getCrosswindServeAsset,j as getCachedCSS,l as generateCrosswindCSS,g as fingerprintConfig,k as extractClassNames,h as buildCrosswindCSS};
@@ -0,0 +1,13 @@
1
+ // @bun
2
+ import{bl as _,cl as h}from"./chunk-zgvga8rc.js";import{Kl as g,Lr as p}from"./chunk-r6p4ws0a.js";import{Ls as N}from"./chunk-cbc56wpd.js";import W from"path";import q from"fs";var l=5,u=1;function t(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function L(...J){if(t())console.log("[stx:bundler]",...J)}var D=[];function v(J,K,$){D.push({filePath:J||"<inline>",message:K,details:$})}function Yz(){return D.slice()}function Zz(){D.length=0}var F;function $z(J){F=J}function b(){if(F)return F;try{let J=p.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var f=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function wz(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let M=$[1];if(!f.some((z)=>z.test(M)))return L("detected user import:",M),!0}let Q=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=Q.exec(J))!==null){let M=$[1];if(/\.css(?:\?.*)?$/.test(M))continue;if(!f.some((z)=>z.test(M)))return L("detected side-effect import:",M),!0}return!1}function i(J,K,$,Q){let M=(Z,z)=>{let G=Z===$?K:W.dirname(Z),Y=W.resolve(G,z),H=[Y,`${Y}.ts`,`${Y}.tsx`,`${Y}.js`,`${Y}.mjs`,`${Y}.jsx`,W.join(Y,"index.ts"),W.join(Y,"index.tsx"),W.join(Y,"index.js"),W.join(Y,"index.mjs")];for(let j of H)try{if(q.existsSync(j)&&q.statSync(j,{throwIfNoEntry:!1})?.isFile())return j}catch{}return Y};return{name:"stx-client-bundle",setup(Z){Z.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(z)=>({path:z.path,external:!0})),Z.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(z)=>({path:z.path,external:!0})),Z.onResolve({filter:/^\//},(z)=>{if(q.existsSync(z.path))return{path:z.path};return{path:z.path,external:!0}}),Z.onResolve({filter:/^\.\.?\//},(z)=>{let G=M(z.importer,z.path);return Q.add(G),{path:G}}),Z.onResolve({filter:/^[@~]\//},(z)=>{let G=W.resolve(J,z.path.slice(2)),Y=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,W.join(G,"index.ts"),W.join(G,"index.tsx"),W.join(G,"index.js"),W.join(G,"index.mjs")];for(let H of Y)if(q.existsSync(H)&&q.statSync(H,{throwIfNoEntry:!1})?.isFile())return L(`resolved ${z.path[0]}/ import:`,z.path,"\u2192",H),Q.add(H),{path:H};return console.warn(`[stx:bundler] could not resolve ${z.path[0]}/ import:`,z.path),{path:G}}),Z.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(z)=>{let G=W.extname(z.path).toLowerCase(),Y=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(z.path!==$)Q.add(z.path);return{contents:q.readFileSync(z.path,"utf8"),loader:Y}})}}}var R=new Map,m=Symbol.for("stx.client-bundle-build-queue");function s(J){let K=globalThis,Q=(K[m]??Promise.resolve()).then(J,J);return K[m]=Q.then(()=>{return},()=>{return}),Q}async function Qz(J,K,$={}){let Q=$.projectRoot||process.cwd(),M=$.minify??!1,Z=$.cacheDir||N(Q,"bundle-cache"),z=new Bun.CryptoHasher("md5");z.update(`${l}\x00${J}\x00${K}`);let G=z.digest("hex").slice(0,12),Y=W.join(Z,`${G}.js`),H=W.join(Z,`${G}.deps.json`),j=Bun.file(Y);if(await j.exists()){let V=Bun.file(H),k=!0;if(await V.exists())try{let T=JSON.parse(await V.text());if(T.metadataVersion!==u||!Array.isArray(T.files))k=!1;for(let S of Array.isArray(T.files)?T.files:[])try{if(q.statSync(S.path).mtimeMs!==S.mtimeMs){k=!1;break}}catch{k=!1;break}}catch{k=!1}if(k)return L("cache hit:",G),await j.text();L("cache invalidated by dep change:",G)}let y=R.get(G);if(y)return await y;let x=s(()=>a(J,K,{projectRoot:Q,minify:M,cacheDir:Z,hash:G,cachePath:Y,depsPath:H}));R.set(G,x);try{return await x}finally{R.delete(G)}}async function a(J,K,$){let{projectRoot:Q,minify:M,cacheDir:Z,hash:z,cachePath:G,depsPath:Y}=$,H=N(Q,"bundle-tmp"),j=W.join(H,`${z}.ts`),y=W.join(H,"out",z);q.mkdirSync(H,{recursive:!0}),q.mkdirSync(y,{recursive:!0});let x=W.dirname(K),V=[],k=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,T=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,S;while((S=k.exec(J))!==null){if(S[1])continue;if(S[2])S[2].split(",").forEach((I)=>{let X=I.split(":")[0].trim();if(X)V.push(X)});else if(S[3])V.push(S[3])}while((S=T.exec(J))!==null){if(S[1])continue;V.push(S[2])}let B=V.length>0?`
3
+ export { ${V.join(", ")} }`:"";await Bun.write(j,J+B),L("bundling:",z,"from:",W.basename(K));let P=new Set;try{let I=await Bun.build({entrypoints:[j],outdir:y,target:"browser",format:"esm",minify:M,plugins:[i(Q,x,j,P)],define:{"process.env.NODE_ENV":M?'"production"':'"development"',...g()},root:Q});if(!I.success){let U=I.logs.filter((C)=>C.level==="error").map((C)=>C.message).join(", ")||`Unable to bundle ${W.basename(K)}`,A=_(I.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",U),v(K||"",U,A),b()==="error")throw Error(U);return J}let X="";for(let w of I.outputs){X=await w.text();break}let O=[];for(let w of X.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let U of w[1].split(",")){let A=U.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(A){O.push([A[2],A[1]]);continue}let C=U.trim();if(/^[A-Za-z_$][\w$]*$/.test(C))O.push([C,C])}let c=X.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];X=X.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let E=`__stxBundle_${z}`,n=O.map(([w,U])=>`${JSON.stringify(w)}: ${U}`).join(", "),o=O.map(([w])=>`var ${w} = undefined;`).join(`
4
+ `),r=O.map(([w])=>`${w} = ${E}[${JSON.stringify(w)}];`).join(`
5
+ `);if(X=`${c.join(`
6
+ `)}
7
+ ${o}
8
+ var ${E} = (function() {
9
+ ${X}
10
+ return { ${n} };
11
+ })();
12
+ ${r}`.trim(),L("bundled:",z,"output:",X.length,"bytes"),V.length>0&&O.length===0)return console.warn(`[stx:bundler] dropped every binding for ${W.basename(K)} (${z}); serving the unbundled source and not caching this result`),J;q.mkdirSync(Z,{recursive:!0}),await Bun.write(G,X);let d=Array.from(P).map((w)=>{try{return{path:w,mtimeMs:q.statSync(w).mtimeMs}}catch{return null}}).filter((w)=>w!==null);return await Bun.write(Y,JSON.stringify({metadataVersion:u,files:d})),X}catch(I){let X=_(I,K||void 0),O=h(I,K||void 0);if(console.warn(`[stx:bundler] error: ${O}`),v(K||"",O,X),b()==="error")throw I;return J}finally{try{q.rmSync(j,{force:!0}),q.rmSync(y,{recursive:!0,force:!0})}catch{}}}
13
+ export{t as Uk,v as Vk,Yz as Wk,Zz as Xk,$z as Yk,b as Zk,wz as _k,s as $k,Qz as al};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Yp as a,iq as b,jq as c,kq as d,lq as e}from"./chunk-r6p4ws0a.js";import"./chunk-8src5smc.js";import"./chunk-gcnrdgrq.js";import"./chunk-xp3fp266.js";import"./chunk-nye9brje.js";import"./chunk-tywvd1zc.js";import"./chunk-cbc56wpd.js";import"./chunk-x0zh76yv.js";import"./chunk-0ae6chzd.js";import"./chunk-kjr22neh.js";import"./chunk-3952ykhb.js";import"./chunk-dtmwr674.js";import"./chunk-pw0rzgpv.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};