@stacksjs/stx 0.2.358 → 0.2.360
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-wkyt4j9e.js → chunk-0dkaztpp.js} +1 -1
- package/dist/{chunk-jmdxn2mq.js → chunk-0p52xkk9.js} +1 -1
- package/dist/{chunk-3y8vvkar.js → chunk-0ppgyq8q.js} +1 -1
- package/dist/{chunk-0dj2gne3.js → chunk-0vrn78j5.js} +1 -1
- package/dist/chunk-0vvqxeq3.js +2 -0
- package/dist/{chunk-2gtwha4k.js → chunk-0w12p79j.js} +1 -1
- package/dist/chunk-11hfa3kp.js +2 -0
- package/dist/{chunk-19m7hed6.js → chunk-135mme4g.js} +1 -1
- package/dist/{chunk-ms25gb16.js → chunk-175da6nh.js} +1 -1
- package/dist/{chunk-hy79zwyy.js → chunk-198fr2d4.js} +1 -1
- package/dist/{chunk-e48050x3.js → chunk-1c2k7713.js} +1 -1
- package/dist/{chunk-2s3wvns6.js → chunk-1e0jj83h.js} +1 -1
- package/dist/{chunk-f72c62s7.js → chunk-1hvxs7rh.js} +1 -1
- package/dist/chunk-1tfhw9c0.js +2 -0
- package/dist/{chunk-q4kgqqed.js → chunk-1tz8fb87.js} +2 -2
- package/dist/{chunk-3ssjb8cx.js → chunk-2119txb8.js} +201 -201
- package/dist/{chunk-mdbj7sq8.js → chunk-2c907a77.js} +1 -1
- package/dist/{chunk-ez003q74.js → chunk-2xpdcr8c.js} +1 -1
- package/dist/{chunk-qnptmtqh.js → chunk-3v63btq1.js} +1 -1
- package/dist/{chunk-7v1g7prf.js → chunk-3xspzgrq.js} +1 -1
- package/dist/{chunk-tf16jtj4.js → chunk-4arms0am.js} +1 -1
- package/dist/chunk-4qhhbzx9.js +2 -0
- package/dist/{chunk-rydb5n5b.js → chunk-5fzgdrfy.js} +1 -1
- package/dist/{chunk-nybn003d.js → chunk-5j3v0p6s.js} +1 -1
- package/dist/{chunk-x5b8az2h.js → chunk-5mjz2qgs.js} +1 -1
- package/dist/chunk-6nf5g9bh.js +2 -0
- package/dist/chunk-6pdfvpa6.js +2 -0
- package/dist/chunk-71gg4a7z.js +2 -0
- package/dist/chunk-7k7vqrj3.js +2 -0
- package/dist/{chunk-0smr2xjs.js → chunk-7kfv1q2r.js} +1 -1
- package/dist/chunk-7ppey2yt.js +2 -0
- package/dist/{chunk-aa8015mk.js → chunk-7racewc5.js} +1 -1
- package/dist/{chunk-t23kccpz.js → chunk-7rj4h2t2.js} +2 -2
- package/dist/{chunk-apbr1kb1.js → chunk-7wj5je2t.js} +1 -1
- package/dist/{chunk-284kattb.js → chunk-83af26bs.js} +1 -1
- package/dist/{chunk-qrvey4wk.js → chunk-84577w4y.js} +1 -1
- package/dist/{chunk-9qdn9y72.js → chunk-89xwdc1d.js} +1 -1
- package/dist/{chunk-f2jypsax.js → chunk-8akj7f4h.js} +1 -1
- package/dist/chunk-8e6fgnk5.js +2 -0
- package/dist/chunk-93z5qt1s.js +2 -0
- package/dist/{chunk-94dz7hrj.js → chunk-a5cybvfv.js} +1 -1
- package/dist/{chunk-a4jhcbsh.js → chunk-a68y9s2j.js} +2 -2
- package/dist/{chunk-m0eg86q3.js → chunk-b381xgvw.js} +1 -1
- package/dist/{chunk-dtdwjpvf.js → chunk-bab01mkf.js} +1 -1
- package/dist/{chunk-79fj9zem.js → chunk-benx1c4p.js} +1 -1
- package/dist/chunk-bqm306xw.js +2 -0
- package/dist/chunk-bxkr3ts9.js +2 -0
- package/dist/{chunk-hcf8399w.js → chunk-ct8tvahc.js} +1 -1
- package/dist/chunk-d0350ak9.js +2 -0
- package/dist/chunk-d5gzma79.js +2 -0
- package/dist/{chunk-kjd9hbg4.js → chunk-dj24n5n7.js} +3 -3
- package/dist/{chunk-hkrzv980.js → chunk-dnard9gp.js} +2 -2
- package/dist/{chunk-sa6cgj9h.js → chunk-dwyad9gb.js} +1 -1
- package/dist/{chunk-trva71am.js → chunk-e03m4har.js} +2 -2
- package/dist/{chunk-c17ybabd.js → chunk-enjfp0tp.js} +1 -1
- package/dist/chunk-erbyg322.js +2 -0
- package/dist/chunk-g6av70d6.js +2 -0
- package/dist/{chunk-j6kec9kp.js → chunk-g8k2zj4z.js} +1 -1
- package/dist/chunk-gzr4mcp2.js +2 -0
- package/dist/{chunk-awyyskad.js → chunk-hkq7d4t2.js} +1 -1
- package/dist/{chunk-ykevda74.js → chunk-jc6wrxrh.js} +2 -2
- package/dist/{chunk-rcbt11p8.js → chunk-k11mck47.js} +1 -1
- package/dist/{chunk-3kd0zn9c.js → chunk-k91ej0ts.js} +1 -1
- package/dist/{chunk-tv04k7gq.js → chunk-karkhcja.js} +1 -1
- package/dist/{chunk-5270fyk7.js → chunk-kd95t585.js} +1 -1
- package/dist/{chunk-emjmshj8.js → chunk-m8kem5ca.js} +1 -1
- package/dist/{chunk-n5tpqzcb.js → chunk-m8nmsr4g.js} +1 -1
- package/dist/{chunk-v1qm7p7t.js → chunk-masf0yq5.js} +2 -2
- package/dist/{chunk-czj6nq0b.js → chunk-met6wtbk.js} +2 -2
- package/dist/{chunk-ep034wt0.js → chunk-mzrejx5e.js} +1 -1
- package/dist/chunk-n6eg071x.js +2 -0
- package/dist/chunk-nabannen.js +2 -0
- package/dist/{chunk-wz4fnsat.js → chunk-necx4e30.js} +1 -1
- package/dist/chunk-p1ycxzwx.js +2 -0
- package/dist/{chunk-7jcntsp4.js → chunk-p41s1y4v.js} +1 -1
- package/dist/{chunk-j8wycqve.js → chunk-pf8575bx.js} +1 -1
- package/dist/{chunk-b8ywrx2w.js → chunk-pt74619a.js} +1 -1
- package/dist/{chunk-krt45cqy.js → chunk-pwctc0m1.js} +1 -1
- package/dist/{chunk-degz74nv.js → chunk-qg0w5tjb.js} +1 -1
- package/dist/{chunk-z50ex86m.js → chunk-r55bx7r8.js} +1 -1
- package/dist/chunk-r6sacvqn.js +2 -0
- package/dist/{chunk-6yfccnr7.js → chunk-r6xmsxaz.js} +1 -1
- package/dist/{chunk-3kyydhzt.js → chunk-r7q89mv2.js} +1 -1
- package/dist/{chunk-ec8jsqgm.js → chunk-rargfb5s.js} +2 -2
- package/dist/chunk-s3q7k0bf.js +2 -0
- package/dist/{chunk-6qhatdte.js → chunk-s4jbvdx3.js} +2 -2
- package/dist/chunk-sd57d9bq.js +2 -0
- package/dist/chunk-syxe0cyd.js +2 -0
- package/dist/{chunk-6gsgayq3.js → chunk-t9m81dj8.js} +1 -1
- package/dist/{chunk-zxfejz72.js → chunk-ta6z7k4p.js} +1 -1
- package/dist/chunk-tfjv0567.js +2 -0
- package/dist/{chunk-kyyt9xhs.js → chunk-v90kxg77.js} +1 -1
- package/dist/{chunk-czypgdc1.js → chunk-vcdd231w.js} +1 -1
- package/dist/{chunk-qbz6yn8c.js → chunk-vgx5077x.js} +2 -2
- package/dist/{chunk-gn2qc03b.js → chunk-vj5ywxmb.js} +1 -1
- package/dist/chunk-vnwzzw9j.js +2 -0
- package/dist/{chunk-rtfwn4cm.js → chunk-vsqx756d.js} +1 -1
- package/dist/{chunk-cf9gt3h9.js → chunk-vyhrzsnf.js} +10 -10
- package/dist/{chunk-ejwfnttb.js → chunk-w1asc0zd.js} +1 -1
- package/dist/{chunk-f11z7q5g.js → chunk-x0c5vqss.js} +1 -1
- package/dist/{chunk-zxnf0c9x.js → chunk-x6c2t5dv.js} +1 -1
- package/dist/{chunk-h99qxgbr.js → chunk-xb23pzwa.js} +1 -1
- package/dist/{chunk-eg8k598q.js → chunk-xb2fcf36.js} +1 -1
- package/dist/{chunk-1nnza3m6.js → chunk-xk402w4a.js} +1 -1
- package/dist/chunk-xn226qe0.js +2 -0
- package/dist/{chunk-aacfyyya.js → chunk-xnbbnbtm.js} +1 -1
- package/dist/{chunk-n1y0hjk1.js → chunk-ypgyhr2p.js} +1 -1
- package/dist/{chunk-hh0aaxxy.js → chunk-z2rvc8d5.js} +2 -2
- package/dist/chunk-za8wxkx6.js +2 -0
- package/dist/{chunk-8xjasa91.js → chunk-zd172hvg.js} +1 -1
- package/dist/{chunk-4gtsf1xw.js → chunk-zf66zyyy.js} +1 -1
- package/dist/chunk-zmvgsgtd.js +2 -0
- package/dist/{chunk-0c49cy69.js → chunk-zxf0deg6.js} +1 -1
- package/dist/{chunk-mere396d.js → chunk-zxptxz2b.js} +1 -1
- package/dist/cli.js +14 -14
- package/dist/client-declarations.d.ts +24 -0
- package/dist/client-declarations.js +33 -0
- package/dist/client-script.js +2 -33
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/database.js +1 -1
- package/dist/loop-binding.d.ts +23 -0
- package/dist/loop-binding.js +12 -0
- package/dist/loops.d.ts +20 -23
- package/dist/loops.js +9 -13
- package/dist/pwa.js +2 -2
- package/dist/ssg.js +2 -2
- package/dist/stx-virtual-ts.d.ts +27 -0
- package/dist/stx-virtual-ts.js +57 -10
- package/dist/visual-testing.js +1 -1
- package/package.json +5 -5
- package/dist/chunk-0chkqvs1.js +0 -2
- package/dist/chunk-0d6qgbks.js +0 -2
- package/dist/chunk-2x3zy811.js +0 -2
- package/dist/chunk-38mpg3kn.js +0 -2
- package/dist/chunk-3f782ywp.js +0 -2
- package/dist/chunk-4mkqzhfh.js +0 -2
- package/dist/chunk-54w1tgzq.js +0 -2
- package/dist/chunk-5x0zjm34.js +0 -2
- package/dist/chunk-7nf8azjh.js +0 -2
- package/dist/chunk-8wgsjh65.js +0 -2
- package/dist/chunk-a6x0czvr.js +0 -2
- package/dist/chunk-abtxpqna.js +0 -2
- package/dist/chunk-c4rpdtvw.js +0 -2
- package/dist/chunk-cgs5xpsn.js +0 -2
- package/dist/chunk-dpyc7pht.js +0 -2
- package/dist/chunk-e0f3qs59.js +0 -2
- package/dist/chunk-f3eb1f6z.js +0 -2
- package/dist/chunk-fzq2n865.js +0 -2
- package/dist/chunk-g3cmkyk2.js +0 -2
- package/dist/chunk-gxgrzeeh.js +0 -2
- package/dist/chunk-p78b80dp.js +0 -2
- package/dist/chunk-pr3hz3ec.js +0 -2
- package/dist/chunk-skdfq4hq.js +0 -2
- package/dist/chunk-w1a8dwgx.js +0 -2
- package/dist/chunk-w9gserf7.js +0 -2
- package/dist/chunk-x131a0jq.js +0 -2
- package/dist/chunk-xk782v5z.js +0 -2
- package/dist/chunk-xxrv2p42.js +0 -2
- package/dist/chunk-ynj1y0qm.js +0 -2
- package/dist/chunk-z8gccz1q.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nf as t,of as u,pf as v,qf as w,rf as x,sf as y,tf as z,uf as A,vf as B,wf as C,xf as D,yf as E}from"./chunk-
|
|
2
|
+
import{nf as t,of as u,pf as v,qf as w,rf as x,sf as y,tf as z,uf as A,vf as B,wf as C,xf as D,yf as E}from"./chunk-84577w4y.js";import{Af as s,zf as r}from"./chunk-5j3v0p6s.js";import{Bf as b,Cf as c,Df as d,Ef as e,Ff as f,Gf as g,Hf as h,Jf as i,Kf as j,Lf as k,Mf as l,Nf as m,Of as n,Pf as o,Qf as p,Rf as q}from"./chunk-198fr2d4.js";import{ei as a}from"./chunk-g1vxsvqv.js";import"./chunk-135mme4g.js";import"./chunk-m8kem5ca.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Am as g,Bm as h,Cm as i,Dm as j,Em as k,Fm as l,Gm as m,Hm as n,Im as o,Jm as p,Km as q,Lm as r,um as a,vm as b,wm as c,xm as d,ym as e,zm as f}from"./chunk-
|
|
2
|
+
import{Am as g,Bm as h,Cm as i,Dm as j,Em as k,Fm as l,Gm as m,Hm as n,Im as o,Jm as p,Km as q,Lm as r,um as a,vm as b,wm as c,xm as d,ym as e,zm as f}from"./chunk-2119txb8.js";import"./chunk-jc6wrxrh.js";import"./chunk-2xpdcr8c.js";import"./chunk-v90kxg77.js";import"./chunk-4arms0am.js";import"./chunk-135mme4g.js";import"./chunk-dj24n5n7.js";import"./chunk-w1asc0zd.js";import"./chunk-kd95t585.js";import"./chunk-1tz8fb87.js";import"./chunk-xk402w4a.js";import"./chunk-dnard9gp.js";import"./chunk-vgx5077x.js";import"./chunk-met6wtbk.js";import"./chunk-ta6z7k4p.js";import"./chunk-zxptxz2b.js";import"./chunk-7racewc5.js";import"./chunk-e03m4har.js";import"./chunk-vsqx756d.js";import"./chunk-m8kem5ca.js";export{j as usesSignalsInScript,r as unescapeHtml,p as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,n as processExpressions,m as interpolateScriptsInTemplate,k as interpolateScriptExpressions,l as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,q as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,e as clearCustomFilters,o as applyFilters};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ki as T,Li as u,Mi as A}from"./chunk-ra1s4s6b.js";import{_k as g,fl as h,ll as b}from"./chunk-
|
|
2
|
+
import{Ki as T,Li as u,Mi as A}from"./chunk-ra1s4s6b.js";import{_k as g,fl as h,ll as b}from"./chunk-qg0w5tjb.js";import{bm as k,fq as B,xr as I,zo as f}from"./chunk-2119txb8.js";import{vv as D,wv as S}from"./chunk-ta6z7k4p.js";import{Av as F}from"./chunk-7racewc5.js";import P from"path";var j=new Map,K=new Map,n=["composables","functions"];function p(z){let H=P.basename(z,".ts");return H==="index"||H==="types"||z.endsWith(".d.ts")}async function r(z){if(z)return P.resolve(z);let H=`<default>:${process.cwd()}`,Y=K.get(H);if(Y!==void 0)return Y;let J=await l();if(J!==null)K.set(H,J);return J}async function l(){let z=await I(),H=z.root||process.cwd(),Y=z.composablesDir;if(Y)return P.resolve(H,Y);for(let J of n){let V=P.resolve(H,J);try{let Z=new Bun.Glob("**/*.ts");for await(let W of Z.scan({cwd:V,absolute:!0}))if(!p(W))return V}catch{}}return null}async function m(z){let H=Array.isArray(z)?z:z?[P.resolve(z)]:(await I())._layerComposableDirs??[await r()].filter((J)=>!!J),Y=new Map;for(let J of H){let V=new Bun.Glob("**/*.ts");try{for await(let Z of V.scan({cwd:J,absolute:!0})){let W=P.relative(J,Z);if(!p(Z)&&!Y.has(W))Y.set(W,Z)}}catch{}}return{key:H.join("\x00"),files:[...Y.values()].sort()}}async function Wq(z){let{files:H}=await m(z),Y=B({loader:"ts",target:"browser",define:k()}),J=[];for(let V of H)try{let Z=await Bun.file(V).text(),W=Y.scan(Z).exports.filter((G)=>G!=="default");if(W.length>0)J.push({file:V,names:W})}catch{}return J}function c(z,H){return new RegExp(`\\b${H.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(z)}function a(z,H,Y){let J=new Map;for(let{file:G,names:$}of z)for(let O of $)if(!J.has(O))J.set(O,G);let V=(G)=>{let $=[];for(let[O,w]of J)if(c(G,O))$.push(w);return $},Z=new Set,W=Y.flatMap(V);while(W.length>0){let G=[];for(let $ of W){if(Z.has($))continue;Z.add($);for(let O of V(H.get($)??""))if(!Z.has(O))G.push(O)}W=G}return Z}async function Yq(z,H,Y){let{key:J,files:V}=await m(z);if(!J)return null;let Z=()=>[...new Set([...V,...V.flatMap((q)=>g(q))])],W=T(Z());if(V.length===0)return A(j,J,W,""),null;V.sort();let G=B({loader:"ts",target:"browser",define:k()}),$=new Map,O=[];for(let q of V)try{let Q=await Bun.file(q).text();$.set(q,Q);let U=G.scan(Q).exports.filter((X)=>X!=="default");if(U.length>0)O.push({file:q,names:U})}catch{$.set(q,"")}let w=H===void 0?new Set(V):a(O,$,Y?[H,...Y]:[H]);if(w.size===0)return null;let _=V.filter((q)=>w.has(q)),M=`${J}\x00${_.join("\x00")}`,v=u(j,M,W);if(v!==void 0)return v||null;let R=[],L=new Set,C=new Set;for(let q of _)try{let Q=$.get(q)??await Bun.file(q).text(),U=P.basename(q,".ts");for(let X of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(X[1])C.add(X[1]);try{for(let X of G.scan(Q).exports)if(X!=="default")L.add(X)}catch{}if(Q=D(Q),h(Q))Q=await b(Q,q,{projectRoot:process.cwd(),externalizeUserModules:!1}),Q=f(Q);Q=S(Q),Q=Q.replace(/^export\s+(default\s+)?/gm,""),Q=G.transformSync(Q),R.push(`// Composable: ${U}
|
|
3
3
|
${Q.trim()}`)}catch(Q){console.warn(`[stx] Failed to load composable ${q}:`,Q)}if(R.length===0||L.size===0)return A(j,M,W,""),null;let t=[...L].map((q)=>` try { if (!(${JSON.stringify(q)} in __c)) __c[${JSON.stringify(q)}] = ${q}; } catch (e) {}`).join(`
|
|
4
4
|
`),N=JSON.stringify([...L]),E=R.join(`
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{sk as m}from"./chunk-
|
|
2
|
+
import{sk as m}from"./chunk-rargfb5s.js";import{Sw as z}from"./chunk-m8kem5ca.js";import{existsSync as s,mkdirSync as T,copyFileSync as F,chmodSync as A}from"fs";import{join as Z,basename as Yq}from"path";import{spawn as j,execSync as Zq}from"child_process";import{tmpdir as c,homedir as P,platform as Lq}from"os";var Iq=`
|
|
3
3
|
<script>
|
|
4
4
|
(function() {
|
|
5
5
|
'use strict';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Le as c,Me as d,Ne as e,Oe as f,Pe as g,Qe as h,Re as i}from"./chunk-b381xgvw.js";import"./chunk-0ppgyq8q.js";import"./chunk-ra1s4s6b.js";import"./chunk-qg0w5tjb.js";import"./chunk-7rj4h2t2.js";import"./chunk-qjvny3wf.js";import{Mp as a,Pp as b}from"./chunk-2119txb8.js";import"./chunk-jc6wrxrh.js";import"./chunk-2xpdcr8c.js";import"./chunk-v90kxg77.js";import"./chunk-4arms0am.js";import"./chunk-135mme4g.js";import"./chunk-dj24n5n7.js";import"./chunk-w1asc0zd.js";import"./chunk-kd95t585.js";import"./chunk-1tz8fb87.js";import"./chunk-xk402w4a.js";import"./chunk-dnard9gp.js";import"./chunk-vgx5077x.js";import"./chunk-met6wtbk.js";import"./chunk-ta6z7k4p.js";import"./chunk-zxptxz2b.js";import"./chunk-7racewc5.js";import"./chunk-e03m4har.js";import"./chunk-vsqx756d.js";import"./chunk-m8kem5ca.js";export{d as virtualPathFor,h as typecheckStxFiles,e as sourcePathFor,i as formatTypecheckDiagnostics,g as findStxModuleDeclarations,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ag as b,Bg as c,Cg as d,Dg as e,Eg as f,Fg as g,Gg as h,Hg as i,Ig as j,Jg as k,Kg as l,zg as a}from"./chunk-634gaa9d.js";import"./chunk-
|
|
2
|
+
import{Ag as b,Bg as c,Cg as d,Dg as e,Eg as f,Fg as g,Gg as h,Hg as i,Ig as j,Jg as k,Kg as l,zg as a}from"./chunk-634gaa9d.js";import"./chunk-m8kem5ca.js";export{g as toUsers,f as toUser,c as stopBroadcasting,b as startBroadcasting,d as loadChannels,a as getBroadcastServer,j as channel,h as broadcastPrivate,i as broadcastPresence,e as broadcast,l as BroadcastServer,k as Broadcast};
|
|
@@ -144,4 +144,4 @@ var N=new Map,Q=new Map;function T(A){if(N.set(A.name,A),A.client)Q.set(A.name,A
|
|
|
144
144
|
console.log('[stx] Directive runtime initialized');
|
|
145
145
|
})();
|
|
146
146
|
`}function $(A){let B=/v-(\w+)(?::(\w+))?(?:\.([\w.]+))?="([^"]*)"/g;return A.replace(B,(C,F,H,L,J)=>{let E=(L?L.split("."):[]).reduce((M,S)=>{return M[S]=!0,M},{});return`data-stx-directive="${F}:${J}" data-stx-directive-arg="${H||""}" data-stx-directive-modifiers='${JSON.stringify(E)}'`})}
|
|
147
|
-
export{T as
|
|
147
|
+
export{T as ys,V as zs,W as As,X as Bs,G as Cs,Y as Ds,Z as Es,_ as Fs,$ as Gs};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Bi as a,Ci as b,Di as c,Ei as d,Fi as e,Gi as f,Hi as g}from"./chunk-ej8mv2k6.js";import"./chunk-
|
|
2
|
+
import{Bi as a,Ci as b,Di as c,Ei as d,Fi as e,Gi as f,Hi as g}from"./chunk-ej8mv2k6.js";import"./chunk-m8kem5ca.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Sw as l}from"./chunk-m8kem5ca.js";import U from"fs";import G from"path";import I from"os";import H from"crypto";import{generatePlaceholder as m,processImage as g}from"ts-images";var d=[320,640,768,1024,1280,1536,1920],h=["webp","jpeg"],b=80,u=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],P={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},N=null,W=!1;async function Y(){if(W)return N;W=!0;try{let J=await import("sharp");return N=J.default||J,N}catch{return null}}async function e(){return await Y()!==null}async function t(){return!0}async function JJ(J,K={}){let{widths:Z=d,formats:$=h,quality:q=b,fit:C="cover",placeholder:X="none",outputDir:Q=".stx/images",baseUrl:_="/images"}=K,j,x;if(typeof J==="string"){if(x=J,!await Bun.file(J).exists())throw new L(`Image not found: ${J}`,"NOT_FOUND");j=await Bun.file(J).arrayBuffer().then((V)=>Buffer.from(V))}else x="buffer-input",j=J;let w=H.createHash("sha256").update(j).digest("hex").slice(0,12),y=await O(j),{width:B,height:D}=y,A=B/D;await U.promises.mkdir(Q,{recursive:!0});let T=[],v=G.basename(x,G.extname(x)),z=Z.filter((V)=>V<=B);if(!z.includes(B)&&B<=Math.max(...Z))z.push(B);z.sort((V,R)=>V-R);for(let V of z){let R=Math.round(V/A);for(let F of $){let S=`${v}-${V}w-${w}.${F}`,k=G.join(Q,S),c=`${_}/${S}`,E=await n(j,{width:V,height:R,format:F,quality:q,fit:C});await Bun.write(k,E),T.push({path:k,url:c,width:V,height:R,format:F,size:E.length})}}let M;if(X!=="none")M=await o(j,X);return{src:x,variants:T,placeholder:M,width:B,height:D,aspectRatio:A,hash:w}}async function O(J){let K=typeof J==="string"?Buffer.from(await Bun.file(J).arrayBuffer()):J,Z=await Y();if(Z){let q=await Z(K).metadata();return{width:q.width||0,height:q.height||0,format:q.format||"unknown",hasAlpha:q.hasAlpha}}return p(K)}function p(J){if(J[0]===137&&J[1]===80&&J[2]===78&&J[3]===71){let K=J.readUInt32BE(16),Z=J.readUInt32BE(20);return{width:K,height:Z,format:"png",hasAlpha:!0}}if(J[0]===255&&J[1]===216){let K=2;while(K<J.length){if(J[K]!==255)break;let Z=J[K+1];if(Z>=192&&Z<=207&&Z!==196&&Z!==200&&Z!==204){let q=J.readUInt16BE(K+5);return{width:J.readUInt16BE(K+7),height:q,format:"jpeg",hasAlpha:!1}}let $=J.readUInt16BE(K+2);K+=2+$}}if(J.toString("utf8",0,4)==="RIFF"&&J.toString("utf8",8,12)==="WEBP"){let K=J.toString("utf8",12,16);if(K==="VP8 "){let Z=J.readUInt16LE(26)&16383,$=J.readUInt16LE(28)&16383;return{width:Z,height:$,format:"webp",hasAlpha:!1}}if(K==="VP8L"){let Z=J.readUInt32LE(21),$=(Z&16383)+1,q=(Z>>14&16383)+1;return{width:$,height:q,format:"webp",hasAlpha:!0}}}if(J.toString("utf8",0,3)==="GIF"){let K=J.readUInt16LE(6),Z=J.readUInt16LE(8);return{width:K,height:Z,format:"gif",hasAlpha:!0}}throw new L("Unable to parse image dimensions","PARSE_ERROR")}async function n(J,K){let Z=await Y();if(Z){let q=Z(J).resize(K.width,K.height,{fit:K.fit});switch(K.format){case"webp":q=q.webp({quality:K.quality});break;case"avif":q=q.avif({quality:K.quality});break;case"jpeg":q=q.jpeg({quality:K.quality});break;case"png":q=q.png({quality:K.quality});break}return q.toBuffer()}let $=G.join(I.tmpdir(),`stx-img-${H.randomBytes(8).toString("hex")}.${K.format}`);try{return await g({input:J,output:$,format:K.format,quality:K.quality,resize:{width:K.width,height:K.height,fit:K.fit}}),Buffer.from(await Bun.file($).arrayBuffer())}finally{await U.promises.unlink($).catch(()=>{})}}async function o(J,K){let Z=await Y();if(K==="blur"&&Z){let X=(await Z(J).resize(20).blur(10).toBuffer()).toString("base64"),Q=await O(J);return`data:${P[Q.format]||"image/jpeg"};base64,${X}`}if(K==="dominant-color"&&Z){let{dominant:C}=await Z(J).resize(1,1).toBuffer().then(async(X)=>{let Q=await Z(X).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${C.r}, ${C.g}, ${C.b})`}let $=await O(J),q=G.join(I.tmpdir(),`stx-ph-${H.randomBytes(8).toString("hex")}.${$.format==="unknown"?"bin":$.format}`);try{await Bun.write(q,J);let C=K==="blur"?"blur":K==="thumbhash"?"thumbhash":"dominant-color",Q=await m(q,{strategy:C,width:C==="thumbhash"?void 0:32});if(K==="dominant-color"&&Q.dominantColor)return Q.dominantColor;if(Q.dataURL)return Q.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{await U.promises.unlink(q).catch(()=>{})}}function KJ(J,K){return(K?J.filter(($)=>$.format===K):J).sort(($,q)=>$.width-q.width).map(($)=>`${$.url} ${$.width}w`).join(", ")}function ZJ(J){if(!J||Object.keys(J).length===0)return"100vw";return Object.entries(J).sort((Z,$)=>{let q=Number.parseInt(Z[0].replace(/\D/g,""))||0;return(Number.parseInt($[0].replace(/\D/g,""))||0)-q}).map(([Z,$])=>`(max-width: ${Z}) ${$}`).join(", ")+", 100vw"}function $J(J){let K=J.filter(($)=>$.format==="jpeg");if(K.length===0)return J[Math.floor(J.length/2)];let Z=K.sort(($,q)=>$.width-q.width);return Z[Math.floor(Z.length/2)]}function qJ(J){let K=new Map;for(let Z of J){let $=K.get(Z.format)||[];$.push(Z),K.set(Z.format,$)}return K}function CJ(J){let K=G.extname(J).toLowerCase();return u.includes(K)}function QJ(J){return P[J]||"application/octet-stream"}function VJ(J){return J.reduce((K,Z)=>K+Z.size,0)}function XJ(J){if(J<1024)return`${J} B`;if(J<1048576)return`${(J/1024).toFixed(1)} KB`;return`${(J/1048576).toFixed(2)} MB`}class L extends Error{code;constructor(J,K){super(J);this.name="ImageProcessingError",this.code=K}}
|
|
3
3
|
export{d as Bf,h as Cf,b as Df,e as Ef,t as Ff,JJ as Gf,O as Hf,n as If,KJ as Jf,ZJ as Kf,$J as Lf,qJ as Mf,CJ as Nf,QJ as Of,VJ as Pf,XJ as Qf,L as Rf};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ch as a,Dh as b,Eh as c,Fh as d,Gh as e,Hh as f,Ih as g}from"./chunk-g7bpkpd4.js";import"./chunk-
|
|
2
|
+
import{Ch as a,Dh as b,Eh as c,Fh as d,Gh as e,Hh as f,Ih as g}from"./chunk-g7bpkpd4.js";import"./chunk-m8kem5ca.js";export{d as useVirtualList,b as processVirtualListDirectives,f as processVirtualGridDirectives,e as processInfiniteListDirectives,c as generateVirtualListCSS,g as default,a as createVirtualList};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{oj as o,pj as p,qj as q}from"./chunk-
|
|
2
|
+
import{oj as o,pj as p,qj as q}from"./chunk-pwctc0m1.js";import{Aj as e,Bj as f,Cj as g,Dj as h,Ej as i,Fj as j,Gj as k,Hj as l,Ij as m,Jj as n,wj as a,xj as b,yj as c,zj as d}from"./chunk-0t1yyn1d.js";import"./chunk-7racewc5.js";import"./chunk-m8kem5ca.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{bg as ZJ,dg as g,fg as A,lg as n,og as GJ,rg as WJ,tg as YJ,vg as jJ}from"./chunk-
|
|
2
|
+
import{bg as ZJ,dg as g,fg as A,lg as n,og as GJ,rg as WJ,tg as YJ,vg as jJ}from"./chunk-a68y9s2j.js";import{yg as $J}from"./chunk-0knxnyq6.js";import{rl as XJ}from"./chunk-7rj4h2t2.js";import{lo as h}from"./chunk-2119txb8.js";import{Hs as e}from"./chunk-dj24n5n7.js";import{It as QJ,Mt as i,Ot as p}from"./chunk-xk402w4a.js";import{Dw as l,Iw as VJ,aw as KJ}from"./chunk-e03m4har.js";import{Sw as DJ}from"./chunk-m8kem5ca.js";import JJ from"fs";import k from"path";var{serve:wJ}=globalThis.Bun;VJ();import y from"zlib";import{promisify as a}from"util";var IJ=a(y.brotliCompress),OJ=a(y.gzip),UJ=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],BJ=["text/event-stream","multipart/x-mixed-replace"],_J=1024;function zJ(K){if(!K)return!1;let J=K.toLowerCase();if(BJ.some((G)=>J.startsWith(G)))return!1;return UJ.some((G)=>J.startsWith(G))}function FJ(K){let J=new Map;for(let G of K.split(",")){let[Z,...W]=G.trim().split(";"),O=Z.trim().toLowerCase();if(!O)continue;let U=1;for(let B of W){let w=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(B);if(!w)continue;let F=Number.parseFloat(w[1]);if(Number.isFinite(F))U=F}J.set(O,U)}return J}function LJ(K){if(!K)return null;let J=FJ(K),G=J.get("*"),Z=(W)=>J.get(W)??G??0;if(Z("br")>0)return"br";if(Z("gzip")>0)return"gzip";return null}async function t(K,J,G={}){if(J.headers.get("content-encoding"))return J;if(J.status===204||J.status===304||!J.body)return J;if(!zJ(J.headers.get("content-type")))return J;let Z=LJ(K.headers.get("accept-encoding"));if(!Z)return J;let W;try{W=new Uint8Array(await J.arrayBuffer())}catch{return J}let O=()=>new Response(W,{status:J.status,statusText:J.statusText,headers:s(J.headers)});if(W.length<(G.threshold??_J))return O();try{let U=Z==="br"?await IJ(W,{params:{[y.constants.BROTLI_PARAM_QUALITY]:G.quality??5,[y.constants.BROTLI_PARAM_SIZE_HINT]:W.length}}):await OJ(W);if(U.length>=W.length)return O();let B=s(J.headers);return B.set("Content-Encoding",Z),B.set("Content-Length",String(U.length)),new Response(U,{status:J.status,statusText:J.statusText,headers:B})}catch{return O()}}function s(K){let J=new Headers(K),G=J.get("Vary");if(!G)return J.set("Vary","Accept-Encoding"),J;if(!G.split(",").some((W)=>W.trim().toLowerCase()==="accept-encoding"))J.set("Vary",`${G}, Accept-Encoding`);return J}class d{now;entries=new e(1000,{maxBytes:33554432,sizeOf:(K)=>K.body.byteLength+JSON.stringify(K.headers).length*2});pending=new Map;generation=0;constructor(K=Date.now){this.now=K}invalidate(K){this.generation++,this.pending.clear();for(let J of Array.from(this.entries.keys()))if(K===void 0||this.entries.get(J)?.path===K)this.entries.delete(J)}async respond(K,J,G){let Z,W=async()=>{let X=Z??await G();return X.headers.set("Cache-Control","private, no-store"),X.headers.set("Vary",A(X.headers.get("Vary")).Vary),X};if(!J||K.method!=="GET"||K.headers.has("Cookie")||K.headers.has("Authorization")||K.headers.has("Range"))return W();let O=new URL(K.url),U=`${O.origin}${O.pathname}${O.search}|${g(K)?"fragment":"document"}`,B=this.entries.get(U),w=(X)=>{let T=new Headers(X.headers);return T.set("Cache-Control","private, no-store"),T.set("Age",String(Math.max(0,Math.floor((this.now()-X.created)/1000)))),new Response(X.body.slice(0),{headers:T})},F=B?(this.now()-B.created)/1000:1/0;if(B&&F<J.maxAge)return w(B);let S=this.generation,q=async()=>{let X=await G();Z=X;let T=(X.headers.get("Vary")??"").toLowerCase().split(",").map((L)=>L.trim()).filter(Boolean);if(X.status!==200||X.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(X.headers.get("Cache-Control")??"")||T.some((L)=>L!=="x-stx-router"&&L!=="accept-encoding"))return null;let M=await X.clone().arrayBuffer();if(M.byteLength>1048576)return null;X.headers.set("Vary",A(X.headers.get("Vary")).Vary);let Q={body:M,headers:Array.from(X.headers.entries()),created:this.now(),path:O.pathname};if(this.generation===S)this.entries.set(U,Q);return Q},H=this.pending.get(U);if(!H){if(this.pending.size>=1000)return W();H=q().finally(()=>{if(this.pending.get(U)===H)this.pending.delete(U)}),this.pending.set(U,H)}if(B&&F<J.maxAge+(J.swr??0))return H.catch(()=>{}),w(B);let x=await H;return x?w(x):W()}}var HJ={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function uJ(K={}){let J=k.resolve(K.outputDir||".output"),G=K.port??3000,Z=GJ(J);if(!Z)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${Z.routes.length} routes...`);let W=$J(Z.routeRules),O=new d,U=XJ(J,Z.apiRoutes??[]),B=Bun.file(k.join(J,"server/runtime-config.json")),w=K.runtimeConfig??(await B.exists()?await B.json():void 0),F=w?i(w):void 0,S=new Map,q=new Map,H=new Map,x=new Map;for(let Q of Z.routes)try{let L=k.join(J,Q.compiledPath),Y=JSON.parse(await Bun.file(L).text());if(F)Y.html=p(Y.html,F);S.set(Q.pattern,Y),H.set(Q.pattern,l(Y.html)),x.set(Q.pattern,h(Y.html));let C=k.join(J,Q.fragmentPath);if(await Bun.file(C).exists()){let P=await Bun.file(C).text();q.set(Q.pattern,F?p(P,F):P)}}catch(L){console.warn(`[stx] Failed to load route ${Q.pattern}:`,L)}let X=new Map,T=[];for(let Q of Z.routes)if(Q.hasParams){let{regex:L,params:Y}=KJ(Q.pattern);T.push({regex:L,route:Q,paramNames:Y})}else X.set(Q.pattern,Q);let M=wJ({port:G,async fetch(Q){return t(Q,await QJ(F??i(),async()=>{let Y=new URL(Q.url).pathname;if(K.onRequest){let j=await K.onRequest(Q);if(j)return j}if(K.apiRouter){let j=await K.apiRouter.handleRequest(Q);if(j.status!==404)return j}if(K.apiRoutes?.[Y])return K.apiRoutes[Y](Q);let C=await U(Q);if(C)return C;if((Q.method==="GET"||Q.method==="HEAD")&&Y!=="/"){let j=k.resolve(J,"public"),_;try{_=decodeURIComponent(Y)}catch{_=Y}if(!_.includes("\x00")){let I=k.resolve(j,`.${_}`);if(I===j||I.startsWith(`${j}${k.sep}`))try{if(JJ.existsSync(I)&&JJ.statSync(I).isFile()){let z=k.extname(I).toLowerCase(),E=HJ[z]||"application/octet-stream",v=Y.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(Y);return new Response(Bun.file(I),{headers:{"Content-Type":E,"Cache-Control":v?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let P=g(Q),D=null,o={};if(D=X.get(Y)||null,!D)for(let{regex:j,route:_,paramNames:I}of T){let $=Y.match(j);if($){D=_,I.forEach((z,E)=>{o[z]=$[E+1]});break}}if(!D){let j=X.get("/404")||null;if(j){let _=S.get(j.pattern);if(_)return new Response(_.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}let R=W(Y),r=Object.keys(R).length>0;return O.respond(Q,R.cache,async()=>{let j=S.get(D.pattern);if(P&&Q.method==="GET"&&j&&!j.hasServerScripts&&Object.keys(j.placeholders).length===0){let $=q.get(D.pattern);if($){let z=H.get(D.pattern);return new Response($,{status:j.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...x.has(D.pattern)?{"X-STX-Runtime":x.get(D.pattern)?"true":"false"}:{},...z?{"X-STX-Layout":z.layout,"X-STX-Layout-Group":z.group}:{},...A(),...R.cache?{}:{"Cache-Control":ZJ}}})}}let _=WJ(Q.method),I=S.get(D.pattern);if(!I){let $=X.get("/500")||null;if($){let z=S.get($.pattern);if(z)return new Response(z.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(D.prerendered&&_)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!_&&!I.hasServerScripts&&Object.keys(I.placeholders).length===0)return new Response(I.html,{status:I.status??200,headers:{"Content-Type":"text/html",...A(),"Cache-Control":"public, max-age=60"}});try{let{html:$,boundaries:z,redirect:E,cookies:v,status:m,headers:c}=await jJ(I,{params:o,request:Q,method:Q.method,__stx_strict_hydration:r,__stx_runtime_config:F});if(E)return YJ(E,v,c);if(z&&z.length>0){let{renderStreamingPage:N,streamToResponse:u}=await import("./chunk-xn226qe0.js"),b=new Headers({...A(),...c,"Cache-Control":"private, no-store"});for(let f of v??[])b.append("Set-Cookie",f);if(P&&!_){let f=l($);b.set("X-STX-Fragment","true"),b.set("X-STX-Runtime",h($)?"true":"false"),b.set("X-STX-Layout",f.layout),b.set("X-STX-Layout-Group",f.group)}return u(N(P&&!_?n($,Z.routerContainer||"main"):$,z,{timeoutMs:30000}),{status:m??I.status??200,headers:b})}let V=new Headers({"Content-Type":"text/html",...A(),...R.cache?{}:{"Cache-Control":"private, no-store"}});for(let N of v??[])V.append("Set-Cookie",N);for(let[N,u]of Object.entries(c??{}))V.set(N,u);if(V.set("Vary",A(V.get("Vary")).Vary),P&&!_){let N=l($);return V.set("X-STX-Fragment","true"),V.set("X-STX-Runtime",h($)?"true":"false"),V.set("X-STX-Layout",N.layout),V.set("X-STX-Layout-Group",N.group),new Response(n($,Z.routerContainer||"main"),{status:m??I.status??200,headers:V})}return new Response($,{status:m??I.status??200,headers:V})}catch($){if(console.error(`[stx] Hydration error for ${Y}:`,$),r)return new Response("Internal Server Error",{status:500});return new Response(I.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${M.port}`),console.log(`[stx] Serving ${Z.routes.length} routes (${S.size} pre-loaded)`),{port:M.port,stop:()=>{O.invalidate(),M.stop()},invalidate:(Q)=>O.invalidate(Q)}}
|
|
3
3
|
export{zJ as We,LJ as Xe,t as Ye,uJ as Ze};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Oo as a,Po as b,Qo as c,Ro as d}from"./chunk-2119txb8.js";import"./chunk-jc6wrxrh.js";import"./chunk-2xpdcr8c.js";import"./chunk-v90kxg77.js";import"./chunk-4arms0am.js";import"./chunk-135mme4g.js";import"./chunk-dj24n5n7.js";import"./chunk-w1asc0zd.js";import"./chunk-kd95t585.js";import"./chunk-1tz8fb87.js";import"./chunk-xk402w4a.js";import"./chunk-dnard9gp.js";import"./chunk-vgx5077x.js";import"./chunk-met6wtbk.js";import"./chunk-ta6z7k4p.js";import"./chunk-zxptxz2b.js";import"./chunk-7racewc5.js";import"./chunk-e03m4har.js";import"./chunk-vsqx756d.js";import"./chunk-m8kem5ca.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Jt as H,Mt as F}from"./chunk-xk402w4a.js";import{Sw as I}from"./chunk-m8kem5ca.js";import J from"fs";import z from"path";async function N(w,A,j){if(w.__stx_runtime_config)return;let b=H();if(b||j){w.__stx_runtime_config=b??F(j);return}let q=z.dirname(z.resolve(A));while(!0){if(["stx.config.ts","stx.config.js",".config/stx.config.ts",".config/stx.config.js"].some((D)=>J.existsSync(z.join(q,D)))){let{loadStxConfig:D}=await import("./chunk-nabannen.js"),G=await D(q);if(G.runtimeConfig)w.__stx_runtime_config=F(G.runtimeConfig);return}let B=z.dirname(q);if(B===q)return;q=B}}async function O(w,A){function j(b){if(b===null)return"null";if(Array.isArray(b))return`Array<${b.length?[...new Set(b.map(j))].join(" | "):"unknown"}>`;if(typeof b==="object")return`{ ${Object.entries(b).map(([q,B])=>`readonly ${JSON.stringify(q)}: ${j(B)}`).join("; ")} }`;return typeof b}await Bun.write(z.join(w,".stx/runtime-config.d.ts"),`import '@stacksjs/stx/runtime-config'
|
|
3
3
|
declare module '@stacksjs/stx/runtime-config' { interface PublicRuntimeConfig ${j(A.public??{})} }
|
|
4
4
|
`),await Bun.write(z.join(w,".stx/runtime-config-server.d.ts"),`import '@stacksjs/stx/runtime-config-server'
|
|
5
5
|
declare module '@stacksjs/stx/runtime-config-server' { interface PrivateRuntimeConfig ${j(A.private??{})} }
|
|
6
6
|
`)}
|
|
7
|
-
export{N as
|
|
7
|
+
export{N as Gt,O as Ht};
|