@stacksjs/stx 0.2.681 → 0.2.683
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-19kc8xnw.js → chunk-0h22d9cb.js} +1 -1
- package/dist/{chunk-6xtzsw17.js → chunk-0t65m9nw.js} +1 -1
- package/dist/{chunk-9fnt6q57.js → chunk-1dbw2j4q.js} +1 -1
- package/dist/{chunk-rxmmrafq.js → chunk-246k73ga.js} +1 -1
- package/dist/chunk-29c177cz.js +2 -0
- package/dist/{chunk-haqbkrdk.js → chunk-2rvprm39.js} +1 -1
- package/dist/{chunk-j3qcxtvc.js → chunk-3353tc28.js} +4 -4
- package/dist/{chunk-g2h12kza.js → chunk-3vgfwsft.js} +2 -2
- package/dist/{chunk-hy4j4r8a.js → chunk-3waphqhe.js} +1 -1
- package/dist/{chunk-0kk86z2m.js → chunk-551vqymy.js} +1 -1
- package/dist/{chunk-pfvjqvzd.js → chunk-56w1njc8.js} +6 -6
- package/dist/{chunk-2efy5ftv.js → chunk-5wpny9k3.js} +5 -5
- package/dist/chunk-6rrr362d.js +2 -0
- package/dist/{chunk-d2z2kvyj.js → chunk-70fdw728.js} +1 -1
- package/dist/{chunk-7afqwh0m.js → chunk-7fgsqs43.js} +2 -2
- package/dist/{chunk-8fetb3cr.js → chunk-840aejkc.js} +27 -27
- package/dist/chunk-8s10jjf1.js +2 -0
- package/dist/chunk-979g7g0r.js +2 -0
- package/dist/{chunk-9nzx4fv4.js → chunk-aenajaxk.js} +1 -1
- package/dist/{chunk-zcht5y0v.js → chunk-bsvwzma0.js} +1 -1
- package/dist/chunk-c3dqsjv0.js +2 -0
- package/dist/{chunk-0w1132a5.js → chunk-cd6s5k6e.js} +1 -1
- package/dist/{chunk-gvpwc9hr.js → chunk-cfbev664.js} +1 -1
- package/dist/{chunk-3cr308sm.js → chunk-d2nkm1jt.js} +1 -1
- package/dist/{chunk-5s9pjs20.js → chunk-d4f6dkrt.js} +1 -1
- package/dist/{chunk-avthzrdg.js → chunk-drd4t5v4.js} +2 -2
- package/dist/chunk-e1fgpb46.js +2 -0
- package/dist/{chunk-6aahems6.js → chunk-ff3d0eh9.js} +1 -1
- package/dist/{chunk-ar4yk1rk.js → chunk-g93jkztp.js} +1 -1
- package/dist/{chunk-5cvdc2a0.js → chunk-gny4j06b.js} +1 -1
- package/dist/{chunk-0c6ag7mk.js → chunk-gtktv6nn.js} +2 -2
- package/dist/chunk-hfk17t81.js +2 -0
- package/dist/{chunk-y5ase5av.js → chunk-j87n6mh0.js} +2 -2
- package/dist/chunk-jf717wps.js +2 -0
- package/dist/{chunk-gfa0dxjd.js → chunk-jg4932ma.js} +1 -1
- package/dist/{chunk-esz22r0a.js → chunk-js8ytnrn.js} +1 -1
- package/dist/{chunk-144wmtba.js → chunk-kbagpk8a.js} +1 -1
- package/dist/{chunk-a358zpqd.js → chunk-kbt9r41q.js} +1 -1
- package/dist/{chunk-wqn17d09.js → chunk-kq8t4xn9.js} +2 -2
- package/dist/chunk-mjqf15e7.js +2 -0
- package/dist/chunk-p1a6y65v.js +2 -0
- package/dist/{chunk-5yc7btc2.js → chunk-p21prjzh.js} +1 -1
- package/dist/{chunk-aezxgrd2.js → chunk-pqg3ghvh.js} +1 -1
- package/dist/{chunk-5ha6gkfr.js → chunk-px9p7q26.js} +4 -4
- package/dist/{chunk-3h7k7cnr.js → chunk-q7z1ybcn.js} +1 -1
- package/dist/{chunk-a2fa9aj4.js → chunk-qjccq0yd.js} +7 -7
- package/dist/{chunk-x65g450d.js → chunk-qpvasda5.js} +1 -1
- package/dist/{chunk-4nst5nj4.js → chunk-qq40hxg9.js} +60 -60
- package/dist/chunk-sk2ae1qj.js +2 -0
- package/dist/chunk-smdxvjhn.js +25 -0
- package/dist/{chunk-793qv470.js → chunk-sme7phry.js} +3 -3
- package/dist/{chunk-1x0jwz8m.js → chunk-t0644y3k.js} +2 -2
- package/dist/{chunk-ms9v5tc9.js → chunk-t257ye4c.js} +1 -1
- package/dist/chunk-thkw9ez9.js +54 -0
- package/dist/{chunk-km92eh3c.js → chunk-tkypg1xx.js} +1 -1
- package/dist/{chunk-q7v05zcy.js → chunk-w1wzydvp.js} +1 -1
- package/dist/chunk-wbn3x66p.js +2 -0
- package/dist/{chunk-a6h6ansh.js → chunk-xv8yy1cz.js} +5 -5
- package/dist/{chunk-yzf8g9h1.js → chunk-yfr4tsn1.js} +2 -2
- package/dist/chunk-yq9dtdkn.js +2 -0
- package/dist/{chunk-r8xzqz8z.js → chunk-yrq24gyy.js} +3 -3
- package/dist/chunk-yxy3brpr.js +2 -0
- package/dist/chunk-z9xhpkn6.js +2 -0
- package/dist/{chunk-ekztn3f5.js → chunk-zj5x4yk2.js} +2 -2
- package/dist/{chunk-ab5fc7cj.js → chunk-zx468wjw.js} +1 -1
- package/dist/cli.js +8 -8
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +2 -2
- package/dist/utils.js +13 -1
- package/package.json +5 -5
- package/dist/chunk-1h995e54.js +0 -2
- package/dist/chunk-4vxe0605.js +0 -54
- package/dist/chunk-540jj8a7.js +0 -2
- package/dist/chunk-5b1q41vy.js +0 -2
- package/dist/chunk-877tm3sp.js +0 -2
- package/dist/chunk-8q3j4jxr.js +0 -2
- package/dist/chunk-9cmmdbzc.js +0 -25
- package/dist/chunk-d3qxmety.js +0 -2
- package/dist/chunk-ehe5f2yn.js +0 -2
- package/dist/chunk-gjaqez01.js +0 -2
- package/dist/chunk-gr1331xc.js +0 -2
- package/dist/chunk-hsgbsj0g.js +0 -2
- package/dist/chunk-j7rzh56k.js +0 -2
- package/dist/chunk-me4f7ekt.js +0 -2
- package/dist/chunk-mndxjbmy.js +0 -2
- package/dist/chunk-ythdsen4.js +0 -2
- package/dist/chunk-zc6bkctv.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{vn}from"./chunk-w28wc7mv.js";import{F,z,At,Pt,dr,g,tc,zo,V,_}from"./chunk-
|
|
2
|
+
import{vn}from"./chunk-w28wc7mv.js";import{F,z,At,Pt,dr,g,tc,zo,V,_}from"./chunk-qq40hxg9.js";import{Kt}from"./chunk-t257ye4c.js";import{W}from"./chunk-2ajbhefk.js";var H=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function B(e){let n=[],t=/<!--[\s\S]*?(?:-->|$)|<(script|style|textarea|title|template)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,r;while((r=t.exec(e))!==null)n.push({start:r.index,end:r.index+r[0].length});return n}function P(e,n){return n.some((t)=>e>=t.start&&e<t.end)}function q(e){let n=(e||"").trim();if(!n)return null;if(/[\s>+~,:]/.test(n))return null;let t={},r=n,s=r.match(/^[a-z][\w-]*/i);if(s)t.tag=s[0].toLowerCase(),r=r.slice(s[0].length);while(r.length>0){let o=r.match(/^\[([\w-]+)(?:=(["']?)([^\]"']*)\2)?\]/);if(o){if(t.attr=o[1],o[3]!==void 0&&o[3]!=="")t.attrValue=o[3];r=r.slice(o[0].length);continue}let a=r.match(/^#([\w-]+)/);if(a){t.id=a[1],r=r.slice(a[0].length);continue}let i=r.match(/^\.([\w-]+)/);if(i){t.className=i[1],r=r.slice(i[0].length);continue}return null}if(!t.tag&&!t.attr&&!t.id&&!t.className)return null;return t}function U(e,n){if(n.attr){if(!(n.attrValue===void 0?new RegExp(`\\b${n.attr}(?=[\\s=>/]|$)`,"i"):new RegExp(`\\b${n.attr}\\s*=\\s*(["'])\\s*${n.attrValue}\\s*\\1`,"i")).test(e))return!1}if(n.id){if(!new RegExp(`\\bid\\s*=\\s*(["'])\\s*${n.id}\\s*\\1`,"i").test(e))return!1}if(n.className){let t=e.match(/\bclass\s*=\s*(["'])([\s\S]*?)\1/i);if(!t)return!1;if(!t[2].split(/\s+/).includes(n.className))return!1}return!0}function T(e,n="main"){let t=q(n);if(!t)return null;let r=/<([a-z][\w-]*)\b([^>]*)>/gi,s=B(e),o;while((o=r.exec(e))!==null){if(P(o.index,s))continue;let a=o[1].toLowerCase(),i=o[2]||"";if(i.trimEnd().endsWith("/")||H.has(a))continue;if(t.tag&&t.tag!==a)continue;if(!U(i,t))continue;let c=o[0],u=o.index+c.length,l=new RegExp(`<(/?)${a}\\b([^>]*)>`,"gi");l.lastIndex=u;let f=1,m;while((m=l.exec(e))!==null){if(P(m.index,s))continue;let x=m[1]==="/";if(!x&&(m[2]||"").trimEnd().endsWith("/"))continue;if(f+=x?-1:1,f===0)return{openTag:c,openIndex:o.index,start:u,end:m.index,tagName:a}}return null}return null}var ut="private, no-store";function Ri(e){return e.replace(/&#(\d+);/g,(n,t)=>M(Number(t),n)).replace(/&#x([0-9a-f]+);/gi,(n,t)=>M(Number.parseInt(t,16),n)).replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function M(e,n){if(!Number.isInteger(e)||e<0||e>1114111)return n;try{return String.fromCodePoint(e)}catch{return n}}function ke(e){return e.headers.get("X-STX-Router")==="true"}function G(e,n){if(!e)return n;return e.split(",").some((r)=>r.trim().toLowerCase()===n.toLowerCase())?e:`${e}, ${n}`}function O(e){return{Vary:G(e,"X-STX-Router")}}import E from"path";var X="stx-page-head:",J=/<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/,C={dev:null,prod:null};function K(){let e=W()?"dev":"prod",n=C[e];if(n!==null)return n;try{let t=import.meta.require("./chunk-pvn0fc7j.js"),r=e==="dev"&&typeof t.getRouterScriptDev==="function"?t.getRouterScriptDev:t.getRouterScript;C[e]=`<script>${r()}</script>`}catch{C[e]=""}return C[e]}async function Ai(e,n){if(n===!1)return null;if(n&&typeof n==="string"){let r=E.resolve(e,n);if(await Bun.file(r).exists())return r;return null}let t=E.join(e,"app.stx");if(await Bun.file(t).exists())return t;return null}async function Hs(e,n){try{let t=await Bun.file(e).text(),r=t,s=t.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);if(s)r=s[1].trim();let o=Kt(t),a=[...o.client.map((d)=>d.fullTag),...o.signals.map((d)=>d.fullTag)],i=[],c=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,u;while((u=c.exec(t))!==null)i.push(u[0]);let l=r;for(let d of o.server)l=l.replace(d.fullTag,"");for(let d of o.client)l=l.replace(d.fullTag,"");l=l.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let f="<!--__STX_PAGE_SLOT__-->";if(l=l.replace(/<slot\s*\/>/gi,f).replace(/<slot\s*>\s*<\/slot>/gi,f),!l.includes(f))return console.warn(`[stx] Shell ${e} has no <slot /> \u2014 pages won't be injected`),null;let{processDirectives:m,extractVariables:x,defaultConfig:y,loadStxConfig:R}=await import("./chunk-z9xhpkn6.js"),S=await R(),p={__filename:e,__dirname:E.dirname(e)};for(let d of a){let w=d.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(w&&!d.includes("client")&&!d.includes('type="module"'))await x(w[1],p,e)}let b=await m(l,p,e,{...y,...S,...n},new Set),h=b.indexOf(f);if(h===-1)return console.warn("[stx] Shell slot placeholder lost during processing"),null;return{beforeSlot:b.substring(0,h),afterSlot:b.substring(h+f.length),filePath:e,shellScripts:a,shellStyles:i}}catch(t){return console.error(`[stx] Error processing shell ${e}:`,t),null}}function Pr(e,n,t){let r,s="",o=n.match(J);if(o){n=n.replace(o[0],"");try{let l=Buffer.from(o[1],"base64").toString("utf8"),f=l.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(f)r=f[1].trim();s=l.replace(/<title[^>]*>[\s\S]*?<\/title>/i,"").trim()}catch{}}let a=t||r||"stx App",i=K(),c="<script>window.__stxRouterConfig={container:'[data-stx-content]'};</script>";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -27,5 +27,5 @@ ${i}
|
|
|
27
27
|
`));if(s.length>0)S.push(s.filter((p)=>!c.has(p)).join(`
|
|
28
28
|
`));if(x.length>0)S.push(x.filter((p)=>!c.has(p)).join(`
|
|
29
29
|
`));return S.push(m),S.join(`
|
|
30
|
-
`)}import v from"fs";import I from"path";function Ii(e,n,t){return{version:1,buildTime:new Date().toISOString(),routes:e,assets:n,outputDir:t}}function Oi(e,n){let t=I.join(n,"manifest.json");v.writeFileSync(t,JSON.stringify(e,null,2))}function Ni(e){let n=I.join(e,"manifest.json");if(!v.existsSync(n))return null;try{let t=v.readFileSync(n,"utf-8"),r=JSON.parse(t);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(t){return console.warn("[stx] Failed to load manifest:",t),null}}function k(e,n,t={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`;if(t.maxAge!==void 0)r+=`; Max-Age=${t.maxAge}`;if(t.expires)r+=`; Expires=${t.expires.toUTCString()}`;if(t.path)r+=`; Path=${t.path}`;if(t.domain)r+=`; Domain=${t.domain}`;if(t.secure)r+="; Secure";if(t.httpOnly)r+="; HttpOnly";if(t.sameSite)r+=`; SameSite=${t.sameSite}`;return r}async function Z(e){let n=e.headers.get("content-type")||"",t={},r=(s,o)=>{let a=t[s];if(a===void 0)t[s]=o;else if(Array.isArray(a))a.push(o);else t[s]=[a,o]};if(n.includes("multipart/form-data")){let s=await e.formData();for(let[o,a]of s.entries())if(typeof a==="string")r(o,a);return t}if(n.includes("application/x-www-form-urlencoded")){for(let[s,o]of new URLSearchParams(await e.text()).entries())r(s,o);return t}return t}function Vs(e){if(!e)return!1;let n=e.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function D(e,n={}){let t=n.request,r=n.method??t?.method;if(!t||!Vs(r))return{ran:!1};if(typeof e.action!=="function")return{ran:!1};let s={};try{s=await Z(t)}catch{}let o=await e.action({request:t,form:s,params:n.params??{},query:e.query??{},cookies:n.cookies??{}});if(o&&typeof o==="object"){let a=o,i=Q(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:u,redirect:l,...f}=a;if(Object.assign(e,f),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function Q(e){if(!e||typeof e!=="object"||Array.isArray(e))return[];let n=[];for(let[t,r]of Object.entries(e)){if(!t)continue;if(typeof r==="string"){n.push(k(t,r));continue}if(r&&typeof r==="object"){let s=r;if(typeof s.value!=="string")continue;n.push(k(t,s.value,s))}}return n}function Di(e,n=[],t){let r=new Headers({Location:e,"Cache-Control":"no-store"});for(let s of n)r.append("Set-Cookie",s);for(let[s,o]of Object.entries(t??{}))if(s.toLowerCase()!=="location")r.set(s,o);return new Response(null,{status:303,headers:r})}async function Cn(e,n={}){let{html:t,context:r,redirect:s,cookies:o}=await tt(e,n),a=At(r),i=Pt(r);if(s)return{html:t,redirect:s,cookies:o,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-
|
|
30
|
+
`)}import v from"fs";import I from"path";function Ii(e,n,t){return{version:1,buildTime:new Date().toISOString(),routes:e,assets:n,outputDir:t}}function Oi(e,n){let t=I.join(n,"manifest.json");v.writeFileSync(t,JSON.stringify(e,null,2))}function Ni(e){let n=I.join(e,"manifest.json");if(!v.existsSync(n))return null;try{let t=v.readFileSync(n,"utf-8"),r=JSON.parse(t);if(r.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${r.version}`),null;return r}catch(t){return console.warn("[stx] Failed to load manifest:",t),null}}function k(e,n,t={}){let r=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`;if(t.maxAge!==void 0)r+=`; Max-Age=${t.maxAge}`;if(t.expires)r+=`; Expires=${t.expires.toUTCString()}`;if(t.path)r+=`; Path=${t.path}`;if(t.domain)r+=`; Domain=${t.domain}`;if(t.secure)r+="; Secure";if(t.httpOnly)r+="; HttpOnly";if(t.sameSite)r+=`; SameSite=${t.sameSite}`;return r}async function Z(e){let n=e.headers.get("content-type")||"",t={},r=(s,o)=>{let a=t[s];if(a===void 0)t[s]=o;else if(Array.isArray(a))a.push(o);else t[s]=[a,o]};if(n.includes("multipart/form-data")){let s=await e.formData();for(let[o,a]of s.entries())if(typeof a==="string")r(o,a);return t}if(n.includes("application/x-www-form-urlencoded")){for(let[s,o]of new URLSearchParams(await e.text()).entries())r(s,o);return t}return t}function Vs(e){if(!e)return!1;let n=e.toUpperCase();return n!=="GET"&&n!=="HEAD"}async function D(e,n={}){let t=n.request,r=n.method??t?.method;if(!t||!Vs(r))return{ran:!1};if(typeof e.action!=="function")return{ran:!1};let s={};try{s=await Z(t)}catch{}let o=await e.action({request:t,form:s,params:n.params??{},query:e.query??{},cookies:n.cookies??{}});if(o&&typeof o==="object"){let a=o,i=Q(a.cookies),c=a.redirect;if(typeof c==="string"&&c)return{redirect:c,ran:!0,...i.length>0?{cookies:i}:{}};let{cookies:u,redirect:l,...f}=a;if(Object.assign(e,f),i.length>0)return{ran:!0,cookies:i}}return{ran:!0}}function Q(e){if(!e||typeof e!=="object"||Array.isArray(e))return[];let n=[];for(let[t,r]of Object.entries(e)){if(!t)continue;if(typeof r==="string"){n.push(k(t,r));continue}if(r&&typeof r==="object"){let s=r;if(typeof s.value!=="string")continue;n.push(k(t,s.value,s))}}return n}function Di(e,n=[],t){let r=new Headers({Location:e,"Cache-Control":"no-store"});for(let s of n)r.append("Set-Cookie",s);for(let[s,o]of Object.entries(t??{}))if(s.toLowerCase()!=="location")r.set(s,o);return new Response(null,{status:303,headers:r})}async function Cn(e,n={}){let{html:t,context:r,redirect:s,cookies:o}=await tt(e,n),a=At(r),i=Pt(r);if(s)return{html:t,redirect:s,cookies:o,status:a,headers:i};let{extractStreamBoundaries:c}=await import("./chunk-jf717wps.js"),u=c(r),l=e.streamTemplates;if(l&&Object.keys(l).length>0){let{processDirectives:f}=await import("./chunk-8s10jjf1.js"),{defaultConfig:m}=await import("./chunk-70fdw728.js"),x=r.streamBoundaries||{},y={...m,autoShell:!1},R=Object.keys(l).map((p)=>({id:p,render:async()=>{let b=typeof x[p]==="function"?await x[p]():void 0;return f(l[p],{...r,$boundary:b},e.sourceFile,y,new Set)}})),S=new Set(R.map((p)=>p.id));u=[...(u||[]).filter((p)=>!S.has(p.id)),...R]}return{html:t,boundaries:u&&u.length>0?u:void 0,cookies:o,status:a,headers:i}}async function tt(e,n){let t={__filename:e.sourceFile,__dirname:e.sourceFile.replace(/[/\\][^/\\]+$/,""),...n};if(!e.hasServerScripts&&!zo(e.html))return{html:e.html,context:t};for(let a of e.serverScriptContent)try{await g(a,t,e.sourceFile)}catch(i){if(n.__stx_strict_hydration)throw i;console.warn(`[stx] Server script error in ${e.sourceFile}:`,i)}let r=await D(t,{request:n.request,method:n.method,params:n.params??{},cookies:n.cookies??{}}),s=(a)=>{let i=a.replace(/<script\b[^>]*\bdata-stx-server-data\b[^>]*>[\s\S]*?<\/script>/gi,""),c=dr(t);if(!c)return i;let u=i.indexOf("</head>");return u<0?c+i:i.slice(0,u)+c+i.slice(u)};if(r.redirect)return{html:e.html,context:t,redirect:r.redirect,cookies:r.cookies};if(!zo(e.html))return{html:s(e.html),context:t,cookies:r.cookies};let o=new Map;for(let[a,i]of Object.entries(e.placeholders))if(i.expression)try{let c=_(i.expression,t);if(i.type==="raw")o.set(a,c!==void 0&&c!==null?String(c):"");else o.set(a,c!==void 0&&c!==null?V(String(c)):"")}catch(c){if(n.__stx_strict_hydration)throw c;o.set(a,"")}return{html:s(tc(e.html,o)),context:t,cookies:r.cookies}}
|
|
31
31
|
export{ut,Ri,ke,O,Ai,Hs,Pr,Ve,Pi,_e,Ii,Oi,Ni,Vs,Di,Cn};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{zu}from"./chunk-bsvwzma0.js";import"./chunk-kq8t4xn9.js";import"./chunk-w1wzydvp.js";import"./chunk-t257ye4c.js";import"./chunk-d4f6dkrt.js";import"./chunk-840aejkc.js";import"./chunk-t0644y3k.js";import"./chunk-9bgb9n12.js";import"./chunk-smdxvjhn.js";import"./chunk-thkw9ez9.js";import"./chunk-kbt9r41q.js";import"./chunk-2a1eeywj.js";import"./chunk-drd4t5v4.js";import"./chunk-px9p7q26.js";import"./chunk-zt5hp5w5.js";import"./chunk-246k73ga.js";import"./chunk-zj5x4yk2.js";import"./chunk-cfbev664.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-qq40hxg9.js";import"./chunk-gny4j06b.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{zu as buildForProduction};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Iu}from"./chunk-sme7phry.js";import"./chunk-840aejkc.js";import"./chunk-t0644y3k.js";import"./chunk-9bgb9n12.js";import"./chunk-smdxvjhn.js";import"./chunk-thkw9ez9.js";import"./chunk-kbt9r41q.js";import"./chunk-2a1eeywj.js";import"./chunk-drd4t5v4.js";import"./chunk-px9p7q26.js";import"./chunk-zt5hp5w5.js";import"./chunk-246k73ga.js";import"./chunk-zj5x4yk2.js";import"./chunk-cfbev664.js";import"./chunk-tenbwcts.js";import"./chunk-912r15hr.js";import"./chunk-nbjyed3q.js";import"./chunk-gymmbbzc.js";import"./chunk-qq40hxg9.js";import"./chunk-gny4j06b.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{Iu as startInteractive};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{gp,Tl,Ge,ca,mp,Br,Fr,zr}from"./chunk-
|
|
2
|
+
import{gp,Tl,Ge,ca,mp,Br,Fr,zr}from"./chunk-thkw9ez9.js";import"./chunk-kbt9r41q.js";import"./chunk-2a1eeywj.js";import"./chunk-zt5hp5w5.js";import"./chunk-qq40hxg9.js";import"./chunk-gny4j06b.js";import"./chunk-t6m5d64b.js";import"./chunk-w28wc7mv.js";import"./chunk-6beg47t4.js";import"./chunk-gtktv6nn.js";export{mp as clearOnceStore,ca as onceStore,Ge as partialsCache,Br as processIncludes,Fr as processStackPushDirectives,zr as processStackReplacements,gp as resetUnscopedSignalWarnings,Tl as topLevelElements};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{ft,Dn,Kd}from"./chunk-
|
|
2
|
+
import{ft,Dn,Kd}from"./chunk-w1wzydvp.js";import{ce,Mn,Xd,Ln,qs,Nr,Dr,Jd,Yd,Zd,jn,Bn,Gs,Mr,Qd}from"./chunk-2ar5g9pa.js";import"./chunk-gtktv6nn.js";export{qs as batch,Kd as default,Mn as derived,Ln as effect,ft as generateSignalsRuntime,Dn as generateSignalsRuntimeDev,Bn as isDerived,jn as isSignal,Xd as memo,Dr as onDestroy,Nr as onMount,Mr as peek,Zd as pendingLifecycleCounts,Yd as runDestroyCallbacks,Jd as runMountCallbacks,ce as state,Gs as untrack,Qd as useOptimistic};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{nr}from"./chunk-gymmbbzc.js";import{gr}from"./chunk-w28wc7mv.js";import{i}from"./chunk-
|
|
2
|
+
import{nr}from"./chunk-gymmbbzc.js";import{gr}from"./chunk-w28wc7mv.js";import{i}from"./chunk-zj5x4yk2.js";import{G,Ke}from"./chunk-jkywbfb0.js";import{fa}from"./chunk-k3e0hcv7.js";var p=/<style\b[^>]*>/iy,x=/<\/style>/gi,R=/<script\b[^>]*>/iy,b=/<template(?=[\s>/])[^>]*>/iy,S=/<\/template\s*>/iy;function Jn(e){let r=0,t=0,o=-1;while(r<e.length){let n=e.indexOf("<",r);if(n===-1)return-1;if(e.startsWith("<!--",n)){let d=e.indexOf("-->",n+4);r=d===-1?e.length:d+3;continue}p.lastIndex=n;let u=p.exec(e);if(u){x.lastIndex=n+u[0].length;let d=x.exec(e);r=d===null?e.length:d.index+8;continue}b.lastIndex=n;let c=b.exec(e);if(c){if(t===0)o=n;t++,r=n+c[0].length;continue}S.lastIndex=n;let a=S.exec(e);if(a){if(t>0)t--;r=n+a[0].length;continue}if(R.lastIndex=n,R.test(e))return t>0?o:n;r=n+1}return-1}function q(e,r={}){return new nr(e,r).routes}import w from"path";var T=new Map;async function y(e,r){let t=e,o=r;if(!t||!o)try{let a=await i();t||=a?.pagesDir||"pages",o||=a?.root||"."}catch{t||="pages",o||="."}let n=w.isAbsolute(t)?t:w.join(o,t),u=T.get(n);if(u)return u;let c=[];try{c=q(".",{pagesDir:n,emit:!1}).map((a)=>a.regex.source).filter(Boolean)}catch{c=[]}return T.set(n,c),c}function O(e){return e.replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function l(e){return O(JSON.stringify(e))}function he(e){return e.includes("data-stx-runtime")}function da(e){let r=/window\.stx\s*\.\s*[A-Za-z_$]|\}\s*=\s*window\.stx\s*;/g;for(let t=r.exec(e);t!==null;t=r.exec(e)){let o=e.slice(Math.max(0,t.index-80),t.index);if(/if\s*\(\s*window\.stx\s*\)|window\.stx\s*&&/.test(o))continue;return!0}return!1}function f(e,r){let t=Jn(e),o=e.search(/<!doctype\b/i);if(t!==-1&&(o===-1||t>o))return e.slice(0,t)+r+`
|
|
3
3
|
`+e.slice(t);let n=gr(e);if(n!==null)return`${e.slice(0,n)}
|
|
4
4
|
${r}${e.slice(n)}`;if(e.includes("</head>")){let c=e.indexOf("</head>");return e.slice(0,c)+r+`
|
|
5
5
|
`+e.slice(c)}if(G(e))return Ke(e,(c)=>`${c}
|
|
6
6
|
${r}`);return`${r}
|
|
7
|
-
${e}`}async function Yn(e,r){if(e.includes("data-stx-runtime")||e.includes("window.stx.state")||e.includes("STX Signals Runtime"))return e;if(r.buildMode==="serve"){let{getServeClientAsset:n}=await import("./chunk-
|
|
7
|
+
${e}`}async function Yn(e,r){if(e.includes("data-stx-runtime")||e.includes("window.stx.state")||e.includes("STX Signals Runtime"))return e;if(r.buildMode==="serve"){let{getServeClientAsset:n}=await import("./chunk-jg4932ma.js"),{url:u}=await n("runtime",r.debug===!0);return f(e,`<script data-stx-runtime src="${u}"></script>`)}if(r.buildMode==="compile")return f(e,'<script data-stx-runtime src="/__stx/runtime.__STX_HASH__.js"></script>');let{getCachedSignalsRuntime:t}=await import("./chunk-jg4932ma.js"),o=await t(r.debug);return f(e,`<script data-stx-scoped data-stx-runtime>${o}</script>`)}function m(e){return/<[a-z][^>]*?\sx-tooltip\s*=/i.test(e)}function pa(e){if(e.includes("data-stx-tooltip-runtime")||!m(e))return e;let r=`<script data-stx-scoped data-stx-tooltip-runtime>${fa()}</script>`,t=e.lastIndexOf("</body>");if(t===-1)return`${e}
|
|
8
8
|
${r}`;return`${e.slice(0,t)}${r}
|
|
9
|
-
${e.slice(t)}`}var E=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function C(e){return E.test(e)||e.includes("__stxRouter)return")||e.includes("__stxRouter=true")}async function ye(e,r){if(!e.includes("</body>"))return e;if(C(e))return e;let t=r?.router,o="",n="";{let s={};if(t){if(t.container)s.container=t.container;if(t.interceptAllLinks!==void 0)s.interceptAllLinks=t.interceptAllLinks;if(t.progress!==void 0)s.progress=t.progress;if(t.viewTransitions!==void 0)s.viewTransitions=t.viewTransitions;if(t.viewTransitionDuration!==void 0)s.viewTransitionDuration=t.viewTransitionDuration;if(t.viewTransitionEasing!==void 0)s.viewTransitionEasing=t.viewTransitionEasing;if(t.scrollToTop!==void 0)s.scrollToTop=t.scrollToTop;if(t.scrollRestoration!==void 0)s.scrollRestoration=t.scrollRestoration;if(t.prefetch!==void 0)s.prefetch=t.prefetch;if(t.cache!==void 0)s.cache=t.cache;if(t.progressColor!==void 0)s.progressColor=t.progressColor;if(t.progressHeight!==void 0)s.progressHeight=t.progressHeight;if(t.prefetchVisible!==void 0)s.prefetchVisible=t.prefetchVisible;if(t.prefetchVisibleMax!==void 0)s.prefetchVisibleMax=t.prefetchVisibleMax;if(t.keepOpening!==void 0)s.keepOpening=t.keepOpening}try{let g=await y(r?.pagesDir,r?.root);if(g.length>0)if(r?.buildMode==="serve"){let{registerServeModuleBundle:h}=await import("./chunk-
|
|
9
|
+
${e.slice(t)}`}var E=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function C(e){return E.test(e)||e.includes("__stxRouter)return")||e.includes("__stxRouter=true")}async function ye(e,r){if(!e.includes("</body>"))return e;if(C(e))return e;let t=r?.router,o="",n="";{let s={};if(t){if(t.container)s.container=t.container;if(t.interceptAllLinks!==void 0)s.interceptAllLinks=t.interceptAllLinks;if(t.progress!==void 0)s.progress=t.progress;if(t.viewTransitions!==void 0)s.viewTransitions=t.viewTransitions;if(t.viewTransitionDuration!==void 0)s.viewTransitionDuration=t.viewTransitionDuration;if(t.viewTransitionEasing!==void 0)s.viewTransitionEasing=t.viewTransitionEasing;if(t.scrollToTop!==void 0)s.scrollToTop=t.scrollToTop;if(t.scrollRestoration!==void 0)s.scrollRestoration=t.scrollRestoration;if(t.prefetch!==void 0)s.prefetch=t.prefetch;if(t.cache!==void 0)s.cache=t.cache;if(t.progressColor!==void 0)s.progressColor=t.progressColor;if(t.progressHeight!==void 0)s.progressHeight=t.progressHeight;if(t.prefetchVisible!==void 0)s.prefetchVisible=t.prefetchVisible;if(t.prefetchVisibleMax!==void 0)s.prefetchVisibleMax=t.prefetchVisibleMax;if(t.keepOpening!==void 0)s.keepOpening=t.keepOpening}try{let g=await y(r?.pagesDir,r?.root);if(g.length>0)if(r?.buildMode==="serve"){let{registerServeModuleBundle:h}=await import("./chunk-jg4932ma.js");n=`<script data-stx-owned-routes src="${h(`(window.__stxRouterConfig=window.__stxRouterConfig||{}).ownedRoutes=${l(g)};
|
|
10
10
|
`)}"></script>
|
|
11
11
|
`}else s.ownedRoutes=g}catch{}if(Object.keys(s).length>0)o=`<script>window.__stxRouterConfig=${l(s)};</script>
|
|
12
|
-
`}let{getCachedRouterScript:u,getServeClientAsset:c}=await import("./chunk-
|
|
12
|
+
`}let{getCachedRouterScript:u,getServeClientAsset:c}=await import("./chunk-jg4932ma.js"),a=r?.buildMode==="compile"?'<script data-stx-router src="/__stx/router.__STX_HASH__.js"></script>':r?.buildMode==="serve"?`<script data-stx-router src="${(await c("router")).url}"></script>`:`<script data-stx-router>${await u()}</script>`,d=e.lastIndexOf("</body>");return e.slice(0,d)+o+n+a+`
|
|
13
13
|
</body>`+e.slice(d+7)}
|
|
14
14
|
export{Jn,q,he,da,Yn,pa,ye};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{i}from"./chunk-
|
|
2
|
+
import{i}from"./chunk-zj5x4yk2.js";import{Ue,ne}from"./chunk-03xn8244.js";import{Zi}from"./chunk-7fgsqs43.js";import{f}from"./chunk-b7e07ybq.js";import{existsSync as A,mkdirSync as x,copyFileSync as T,chmodSync as P,rmSync as ue}from"fs";import{join as c,basename as be,resolve as H}from"path";import{spawn as q}from"child_process";import{platform as ge}from"os";var ep=`
|
|
3
3
|
<script>
|
|
4
4
|
(function() {
|
|
5
5
|
'use strict';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
${r.trim()}`)}catch(r){console.warn(`[stx] Failed to load composable ${o}:`,r)}if(
|
|
4
|
-
`),j=JSON.stringify([...
|
|
2
|
+
import{S}from"./chunk-gtktv6nn.js";import{T,xn}from"./chunk-6beg47t4.js";import{on,b,w,k,J}from"./chunk-qq40hxg9.js";import{i}from"./chunk-zj5x4yk2.js";import{Ee,Yt,Zt,Qt}from"./chunk-5wpny9k3.js";import{ht}from"./chunk-drd4t5v4.js";import{pt,Nn,qt,ae}from"./chunk-2pga7zzb.js";import{C,wr}from"./chunk-2ajbhefk.js";import h from"path";var x=new Map,D=new Map,A=b(64),E=new Map,Z=["composables","functions"];function z(t){let n=h.basename(t,".ts");return n==="index"||n==="types"||t.endsWith(".d.ts")}async function q(t){if(t)return h.resolve(t);let n=`<default>:${process.cwd()}`,a=E.get(n);if(a!==void 0)return a;let e=await Q();if(e!==null)E.set(n,e);return e}async function Q(){let t=await i(),n=t.root||process.cwd(),a=t.composablesDir;if(a)return h.resolve(n,a);for(let e of Z){let s=h.resolve(n,e);try{let d=new Bun.Glob("**/*.ts");for await(let c of d.scan({cwd:s,absolute:!0}))if(!z(c))return s}catch{}}return null}async function G(t){let n=Array.isArray(t)?t:t?[h.resolve(t)]:(await i())._layerComposableDirs??[await q()].filter((e)=>!!e),a=new Map;for(let e of n){let s=new Bun.Glob("**/*.ts");try{for await(let d of s.scan({cwd:e,absolute:!0})){let c=h.relative(e,d);if(!z(d)&&!a.has(c))a.set(c,d)}}catch{}}return{key:n.join("\x00"),files:[...a.values()].sort()}}async function Ws(t){let{files:n}=await G(t),a=J({loader:"ts",target:"browser",define:k()}),e=[];for(let s of n)try{let d=await Bun.file(s).text(),c=a.scan(d).exports.filter((m)=>m!=="default");if(c.length>0)e.push({file:s,names:c})}catch{}return e}function V(t,n){return new RegExp(`\\b${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(t)}function L(t,n){let a=new Set(t.match(/\w+/g)),e=new Set;for(let s of n)if(/^\w+$/.test(s)?a.has(s):V(t,s))e.add(s);return e}var U=b(64);function Y(t,n){let a=w(t,n.size),e=U.get(a);if(e)return e;let s;try{s=on(t,n)}catch{s=L(t,n)}let d=[...t.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...t.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let c of d)for(let m of c[1].split(",")){let p=m.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(p&&n.has(p))s.add(p)}return U.set(a,s),s}function ee(t,n,a){let e=new Map;for(let{file:u,names:l}of t)for(let f of l)if(!e.has(f))e.set(f,u);let s=(u)=>{let l=[];for(let f of L(u,e.keys()))l.push(e.get(f));return l},d=new Set(e.keys()),c=(u)=>{let l=[];for(let f of Y(u,d))l.push(e.get(f));return l},m=new Set,p=a.flatMap((u,l)=>l===0?s(u):c(u));while(p.length>0){let u=[];for(let l of p){if(m.has(l))continue;m.add(l);for(let f of c(n.get(l)??""))if(!m.has(f))u.push(f)}p=u}return m}async function qd(t,n,a){let{key:e,files:s}=await G(t);if(!e)return null;let d=()=>[...new Set([...s,...s.flatMap((o)=>Ee(o))])],c=pt(d());if(s.length===0)return ae(x,e,c,""),null;s.sort();let m=J({loader:"ts",target:"browser",define:k()}),p=qt(D,e,c);if(!p){let o=new Map,r=[];for(let g of s)try{let y=await Bun.file(g).text();o.set(g,y);let _=m.scan(y).exports.filter((X)=>X!=="default");if(_.length>0)r.push({file:g,names:_})}catch{o.set(g,"")}p=ae(D,e,c,{codeByFile:o,modules:r})}let{codeByFile:u,modules:l}=p,f;if(n===void 0)f=new Set(s);else{let o=a?[n,...a]:[n],r=w(o.join("\x00"),e,o.length,c),g=A.get(r);if(f=g??ee(l,u,o),!g)A.set(r,f)}if(f.size===0)return null;let I=s.filter((o)=>f.has(o)),B=`${e}\x00${I.join("\x00")}\x00${Zt()}`,F=qt(x,B,c);if(F!==void 0)return F||null;let M=[],v=new Set,R=new Set;for(let o of I)try{let r=u.get(o)??await Bun.file(o).text(),g=h.basename(o,".ts");for(let _ of r.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(_[1])R.add(_[1]);let y=[];try{for(let _ of m.scan(r).exports)if(_!=="default")v.add(_),y.push(_)}catch{}if(r=T(r),Yt(r))r=await Qt(r,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:y}),r=ht(r);r=xn(r),r=r.replace(/^export\s+(default\s+)?/gm,""),r=m.transformSync(r),M.push(`// Composable: ${g}
|
|
3
|
+
${r.trim()}`)}catch(r){console.warn(`[stx] Failed to load composable ${o}:`,r)}if(M.length===0||v.size===0)return ae(x,B,c,""),null;let H=[...v].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
|
|
4
|
+
`),j=JSON.stringify([...v]),N=M.join(`
|
|
5
5
|
|
|
6
|
-
`),W=
|
|
7
|
-
`),P=JSON.stringify(new Bun.CryptoHasher("md5").update(`${j}\x00${
|
|
6
|
+
`),W=S.filter((o)=>!R.has(o)&&new RegExp(`\\b${o}\\b`).test(N)).map((o)=>`var ${o} = __stx[${JSON.stringify(o)}];`).join(`
|
|
7
|
+
`),P=JSON.stringify(new Bun.CryptoHasher("md5").update(`${j}\x00${N}`).digest("hex").slice(0,12)),K=`;(function(){
|
|
8
8
|
var __bundles = window.__stxComposableBundles || (window.__stxComposableBundles = {});
|
|
9
9
|
if (__bundles[${P}]) return;
|
|
10
10
|
__bundles[${P}] = true;
|
|
@@ -13,7 +13,7 @@ window.__composables = window.__composables || {};
|
|
|
13
13
|
var __c = window.__composables;
|
|
14
14
|
var __stx = window.stx || {};
|
|
15
15
|
${W}
|
|
16
|
-
${
|
|
16
|
+
${N}
|
|
17
17
|
${H}
|
|
18
18
|
var __names = ${j};
|
|
19
19
|
for (var __i = 0; __i < __names.length; __i++) {
|
|
@@ -29,5 +29,5 @@ ${H}
|
|
|
29
29
|
window[__n] = __c[__n];
|
|
30
30
|
__published[__n] = true;
|
|
31
31
|
}
|
|
32
|
-
})();`,O=C()?wr(K):K;return c=pt(d()),ae(
|
|
32
|
+
})();`,O=C()?wr(K):K;return c=pt(d()),ae(x,B,c,O),O}function Gd(){x.clear(),Nn(),D.clear(),A.clear(),E.clear()}
|
|
33
33
|
export{Ws,qd,Gd};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{en,Ys,Zs,Qs,lp,eo}from"./chunk-
|
|
2
|
+
import{en,Ys,Zs,Qs,lp,eo}from"./chunk-d4f6dkrt.js";import"./chunk-912r15hr.js";import"./chunk-gymmbbzc.js";import"./chunk-t6m5d64b.js";export{Zs as buildServerApi,lp as createServerApi,en as discoverServerApi,Ys as generateApiTypes,eo as isServerApiSource,Qs as productionApiDispatcher};
|