@stacksjs/stx 0.2.904 → 0.2.907
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/app-shell.d.ts +1 -1
- package/dist/app-shell.js +1 -1
- package/dist/{chunk-n3fgrsva.js → chunk-0d3pkkrv.js} +2 -2
- package/dist/{chunk-9y83pdcb.js → chunk-0vyytd9v.js} +3 -3
- package/dist/{chunk-v5y66rwr.js → chunk-13awnyq0.js} +1 -1
- package/dist/chunk-1dc6h93m.js +2 -0
- package/dist/{chunk-ffytbb4x.js → chunk-1ezcxbpg.js} +5 -5
- package/dist/{chunk-eb5v9npc.js → chunk-1hx6dyy9.js} +2 -2
- package/dist/{chunk-a7bqrjm5.js → chunk-1jxkc6d0.js} +2 -2
- package/dist/chunk-20hy5p3p.js +2 -0
- package/dist/chunk-20zx1msx.js +2 -0
- package/dist/chunk-218pnbaf.js +2 -0
- package/dist/chunk-257msenj.js +3 -0
- package/dist/chunk-291860br.js +2 -0
- package/dist/chunk-2fyey6pn.js +2 -0
- package/dist/chunk-2jkq15je.js +2 -0
- package/dist/{chunk-eb5cma4b.js → chunk-2m4d8jkv.js} +2 -2
- package/dist/{chunk-p89rpak1.js → chunk-2qk2ppgm.js} +1 -1
- package/dist/{chunk-arfpzf17.js → chunk-357qjcj1.js} +2 -2
- package/dist/chunk-3611xczp.js +3 -0
- package/dist/chunk-3dy3hr8r.js +2 -0
- package/dist/{chunk-edpsk4bg.js → chunk-3m457a9q.js} +9 -9
- package/dist/{chunk-nc5d3a5r.js → chunk-3syagjd7.js} +5 -5
- package/dist/{chunk-9fcanx7q.js → chunk-3yr0wyc9.js} +2 -2
- package/dist/{chunk-n9axtmxs.js → chunk-42z7zv92.js} +5 -5
- package/dist/chunk-4345d8s9.js +2 -0
- package/dist/chunk-43kz6rx9.js +2 -0
- package/dist/chunk-47ver0g7.js +2 -0
- package/dist/chunk-4a6mptfc.js +2 -0
- package/dist/{chunk-hdfhaddy.js → chunk-4b110x6r.js} +2 -2
- package/dist/chunk-4b9jx2c1.js +2 -0
- package/dist/chunk-4dh1b9yr.js +2 -0
- package/dist/chunk-4nc8vdef.js +2 -0
- package/dist/{chunk-pwpge9bj.js → chunk-5jc9hmwg.js} +2 -2
- package/dist/{chunk-ern5hyvr.js → chunk-5jn2qyv7.js} +1 -1
- package/dist/{chunk-fcqc9yws.js → chunk-5m4zgt4m.js} +14 -14
- package/dist/{chunk-0hcek8nq.js → chunk-6bgerbgh.js} +1 -1
- package/dist/{chunk-n1wn4wvm.js → chunk-6qgrr453.js} +3 -3
- package/dist/{chunk-ayady5ws.js → chunk-6w9av0n9.js} +2 -2
- package/dist/{chunk-hnjeqxqy.js → chunk-6yketqa1.js} +2 -2
- package/dist/{chunk-5yvgzh6n.js → chunk-72pbhpq8.js} +2 -2
- package/dist/chunk-7k1thytm.js +2 -0
- package/dist/{chunk-jwvv842z.js → chunk-83g4169y.js} +19 -19
- package/dist/chunk-8f5x16ht.js +2 -0
- package/dist/{chunk-vfctk20v.js → chunk-8n42epb6.js} +3 -3
- package/dist/{chunk-k3ytyhkr.js → chunk-8p3vqt2q.js} +3 -3
- package/dist/{chunk-p92272k0.js → chunk-8tfpv6zf.js} +2 -2
- package/dist/chunk-94r6mkcy.js +2 -0
- package/dist/chunk-96wdxfn4.js +2 -0
- package/dist/{chunk-rdrstnn9.js → chunk-9atdw0p8.js} +2 -2
- package/dist/chunk-9bc23bv2.js +2 -0
- package/dist/{chunk-5jrpzepc.js → chunk-9bexzgws.js} +2 -2
- package/dist/{chunk-0gc1hez6.js → chunk-9tj16d70.js} +3 -3
- package/dist/chunk-9xzej52j.js +2 -0
- package/dist/{chunk-rzmk73fz.js → chunk-ab1z38gj.js} +2 -2
- package/dist/chunk-abxwggen.js +2 -0
- package/dist/{chunk-n642g6n0.js → chunk-afmmrqee.js} +15 -15
- package/dist/{chunk-68r2zs20.js → chunk-ahf9j8wb.js} +4 -4
- package/dist/chunk-asewbsct.js +2 -0
- package/dist/{chunk-0b57fgpn.js → chunk-b234w3mf.js} +30 -10
- package/dist/chunk-bcspywrd.js +2 -0
- package/dist/chunk-bprjp80g.js +2 -0
- package/dist/{chunk-n7rwbccm.js → chunk-bpx9cys7.js} +6 -6
- package/dist/{chunk-945zygwa.js → chunk-c08jvjqt.js} +27 -27
- package/dist/{chunk-gyqg3xjp.js → chunk-c5cxpkfy.js} +5 -5
- package/dist/chunk-c60egpe6.js +2 -0
- package/dist/chunk-cjq455ve.js +2 -0
- package/dist/chunk-ck4ypzet.js +3 -0
- package/dist/{chunk-46khhke2.js → chunk-cpt9sg6d.js} +1 -1
- package/dist/{chunk-73ebyhqq.js → chunk-cq4cwfqf.js} +2 -2
- package/dist/chunk-cqq68aw8.js +2 -0
- package/dist/{chunk-qs0zk04y.js → chunk-cwcmmgvz.js} +2 -2
- package/dist/{chunk-5gnt3qtn.js → chunk-d4hnj3ct.js} +3 -3
- package/dist/{chunk-6c8s1pax.js → chunk-e4tbq8a0.js} +9 -9
- package/dist/{chunk-qykbjg3z.js → chunk-e5rag6rh.js} +2 -2
- package/dist/{chunk-150cz8qq.js → chunk-eca022er.js} +7 -7
- package/dist/{chunk-fksmr50h.js → chunk-ekyx5z50.js} +6 -6
- package/dist/{chunk-xr1s56k5.js → chunk-eptzpvn0.js} +3 -3
- package/dist/chunk-exc8y30f.js +42 -0
- package/dist/{chunk-ty5frr9t.js → chunk-fds6vvq0.js} +150 -149
- package/dist/{chunk-de61k0ab.js → chunk-fs43342z.js} +2 -2
- package/dist/{chunk-essmq8yb.js → chunk-fwffn130.js} +9 -9
- package/dist/{chunk-54x7h3sb.js → chunk-fycxc75p.js} +1 -1
- package/dist/chunk-fzh73jtc.js +2 -0
- package/dist/{chunk-gnf1e5q7.js → chunk-fznjm7qt.js} +2 -2
- package/dist/{chunk-r0az4z6d.js → chunk-gfp39bzr.js} +2 -2
- package/dist/{chunk-8xb09hnn.js → chunk-gg31th5s.js} +4 -4
- package/dist/chunk-gjnxnfrg.js +2 -0
- package/dist/chunk-gjzs6p2v.js +2 -0
- package/dist/chunk-gmczbe3j.js +2 -0
- package/dist/{chunk-7nf7mp27.js → chunk-gyv2bsmn.js} +2 -2
- package/dist/chunk-h7xqba9k.js +2 -0
- package/dist/{chunk-9w7whtbx.js → chunk-hhspwfva.js} +2 -2
- package/dist/chunk-hpxhxwda.js +2 -0
- package/dist/chunk-j661q889.js +2 -0
- package/dist/chunk-j90sfypd.js +2 -0
- package/dist/{chunk-4hk1mjtv.js → chunk-jhegz7az.js} +5 -5
- package/dist/{chunk-tqm66mh3.js → chunk-jj78m9k1.js} +132 -51
- package/dist/chunk-jnk3nk5k.js +2 -0
- package/dist/{chunk-mry67rsk.js → chunk-jttzrv0w.js} +6 -6
- package/dist/{chunk-5tm1pvt3.js → chunk-jz37h2z0.js} +2 -2
- package/dist/chunk-jzbte09f.js +2 -0
- package/dist/chunk-k5v22gn4.js +2 -0
- package/dist/{chunk-e3svj8ex.js → chunk-kcphqn2k.js} +1 -1
- package/dist/{chunk-50wjk5ap.js → chunk-kmy34he2.js} +2 -2
- package/dist/{chunk-bx5y6qsg.js → chunk-m9cye9t8.js} +43 -43
- package/dist/chunk-mgcakk1m.js +2 -0
- package/dist/chunk-mkm9drk3.js +2 -0
- package/dist/{chunk-vw7crz0z.js → chunk-mpfm5ctr.js} +4 -4
- package/dist/chunk-n3bt1sv5.js +2 -0
- package/dist/chunk-n62nqhey.js +2 -0
- package/dist/{chunk-k3566kgd.js → chunk-nan0ysys.js} +2 -2
- package/dist/{chunk-w96jck0a.js → chunk-nmywrw6v.js} +1 -1
- package/dist/chunk-nrap20qt.js +2 -0
- package/dist/{chunk-4z926gay.js → chunk-nzqr3w35.js} +7 -7
- package/dist/{chunk-g5nts6e0.js → chunk-p3et6xjr.js} +5 -5
- package/dist/{chunk-9hwg13ec.js → chunk-pc89t52s.js} +5 -5
- package/dist/{chunk-7b3dqeyr.js → chunk-phzhmnnm.js} +2 -2
- package/dist/chunk-pp89n1et.js +2 -0
- package/dist/chunk-ptrz5xwt.js +2 -0
- package/dist/chunk-q2jag6wt.js +2 -0
- package/dist/chunk-q9yahsww.js +2 -0
- package/dist/chunk-qgc59a7d.js +2 -0
- package/dist/chunk-qjkpwjg6.js +2 -0
- package/dist/chunk-qq31bcsq.js +2 -0
- package/dist/{chunk-8vbx58s6.js → chunk-qvj0bzw5.js} +10 -10
- package/dist/chunk-r5xt6vdq.js +2 -0
- package/dist/{chunk-5mrt1enm.js → chunk-razwegar.js} +2 -2
- package/dist/chunk-rt6fn071.js +2 -0
- package/dist/{chunk-67pq803s.js → chunk-sdf4c754.js} +2 -2
- package/dist/chunk-se0pjx71.js +2 -0
- package/dist/chunk-senrtnx2.js +2 -0
- package/dist/chunk-sjrx0dj8.js +2 -0
- package/dist/chunk-ta5fpj2a.js +2 -0
- package/dist/{chunk-bgkj0rxe.js → chunk-ta7cwykn.js} +4 -4
- package/dist/{chunk-jj1f1v1r.js → chunk-tszhkmny.js} +7 -7
- package/dist/{chunk-vbmvft7g.js → chunk-v0yay1kw.js} +1 -1
- package/dist/{chunk-2sz1kh9m.js → chunk-va4xam1q.js} +1 -1
- package/dist/chunk-vbh5tknp.js +2 -0
- package/dist/{chunk-q33x40dg.js → chunk-vmphrcaa.js} +2 -2
- package/dist/{chunk-s8v6dxhg.js → chunk-w1pga3s6.js} +4 -4
- package/dist/{chunk-bzd387yx.js → chunk-w3y8408q.js} +4 -4
- package/dist/chunk-w4177qn3.js +3 -0
- package/dist/{chunk-esm0pnpz.js → chunk-w98yt4d4.js} +2 -2
- package/dist/{chunk-7nn5s0c3.js → chunk-wbsbrm6n.js} +30 -30
- package/dist/chunk-wchz1sye.js +2 -0
- package/dist/{chunk-9ze3xvsr.js → chunk-wk6g0b9h.js} +4 -4
- package/dist/{chunk-m0p328a3.js → chunk-wna2herj.js} +3 -3
- package/dist/{chunk-71d353be.js → chunk-wxk0t61p.js} +3 -3
- package/dist/chunk-x1svtz8k.js +2 -0
- package/dist/{chunk-qt2mr3f0.js → chunk-x39v2ch2.js} +5 -5
- package/dist/chunk-xahn0h9f.js +2 -0
- package/dist/{chunk-65c11t6g.js → chunk-xfjp5q2m.js} +15 -15
- package/dist/{chunk-27qkwvbe.js → chunk-xpcqyzdc.js} +2 -2
- package/dist/chunk-ykx4zt07.js +2 -0
- package/dist/{chunk-w10vj4rc.js → chunk-yqs88qj4.js} +6 -6
- package/dist/chunk-yt8k715e.js +2 -0
- package/dist/{chunk-g32hc78c.js → chunk-yzgtsrjb.js} +2 -2
- package/dist/{chunk-btyb4bfz.js → chunk-z0d1asbw.js} +2 -2
- package/dist/{chunk-tx27trcp.js → chunk-zcwx8z8z.js} +5 -5
- package/dist/{chunk-t14bn66j.js → chunk-zk1c6tg7.js} +3 -3
- package/dist/{chunk-9rxxm68c.js → chunk-zrsrhdxw.js} +3 -3
- package/dist/cli.js +21 -21
- package/dist/client-parameter-bindings.js +12 -5
- package/dist/component-renderer.js +2 -24
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/native/runtime/craft-bridge.js +5 -1
- package/dist/native/runtime/craft.d.ts +4 -0
- package/dist/offline/app-service-worker.d.ts +1 -0
- package/dist/offline/app-service-worker.js +99 -17
- package/dist/production-server.d.ts +0 -9
- package/dist/production-server.js +26 -11
- package/dist/pwa.js +3 -3
- package/dist/route-response-cache.js +4 -3
- package/dist/server-bindings.js +3 -1
- package/dist/spa-nav.d.ts +6 -0
- package/dist/spa-nav.js +5 -1
- package/dist/ssg.js +10 -10
- package/dist/stx-virtual-ts.d.ts +4 -0
- package/dist/stx-virtual-ts.js +22 -0
- package/dist/utils.js +22 -2
- package/package.json +5 -5
- package/dist/chunk-0ht6exrv.js +0 -2
- package/dist/chunk-1pbghytr.js +0 -2
- package/dist/chunk-31r1tk86.js +0 -2
- package/dist/chunk-3ahvypx3.js +0 -2
- package/dist/chunk-576wtm6d.js +0 -2
- package/dist/chunk-5astk182.js +0 -2
- package/dist/chunk-5g5khx0m.js +0 -3
- package/dist/chunk-5tvse0vw.js +0 -2
- package/dist/chunk-5zcjcyys.js +0 -2
- package/dist/chunk-6h6aahc8.js +0 -2
- package/dist/chunk-726w7fm2.js +0 -2
- package/dist/chunk-7r294vc9.js +0 -2
- package/dist/chunk-7rn7w53f.js +0 -2
- package/dist/chunk-81qvg3yd.js +0 -2
- package/dist/chunk-96jntfwp.js +0 -3
- package/dist/chunk-9pjzj75t.js +0 -2
- package/dist/chunk-a1k0aj2r.js +0 -2
- package/dist/chunk-am2v9pqa.js +0 -2
- package/dist/chunk-cb9h2wwq.js +0 -2
- package/dist/chunk-cp82351f.js +0 -2
- package/dist/chunk-cvxg2rc1.js +0 -2
- package/dist/chunk-dmc91qke.js +0 -2
- package/dist/chunk-dpgc8wmw.js +0 -2
- package/dist/chunk-dw23nre3.js +0 -2
- package/dist/chunk-dyz7cmf4.js +0 -2
- package/dist/chunk-fznzn35q.js +0 -2
- package/dist/chunk-gyzebnpx.js +0 -2
- package/dist/chunk-hc8ks7y3.js +0 -2
- package/dist/chunk-hs2a040z.js +0 -2
- package/dist/chunk-jr3fmkq7.js +0 -2
- package/dist/chunk-k2fw6paw.js +0 -2
- package/dist/chunk-k79dvx67.js +0 -2
- package/dist/chunk-kf6j1ht4.js +0 -2
- package/dist/chunk-km1k3c4e.js +0 -2
- package/dist/chunk-kvjbpbmw.js +0 -2
- package/dist/chunk-m2dgf6pt.js +0 -2
- package/dist/chunk-mhv84p0x.js +0 -2
- package/dist/chunk-mmk5xqhr.js +0 -2
- package/dist/chunk-pd8ck9p3.js +0 -2
- package/dist/chunk-pjpy86c3.js +0 -3
- package/dist/chunk-q3ztpbz4.js +0 -2
- package/dist/chunk-qchmvwds.js +0 -2
- package/dist/chunk-qx4wkt90.js +0 -2
- package/dist/chunk-qzx6h6af.js +0 -2
- package/dist/chunk-r9rwdg9k.js +0 -3
- package/dist/chunk-s0sxq6ap.js +0 -2
- package/dist/chunk-scdkctdb.js +0 -2
- package/dist/chunk-sxqq3tft.js +0 -2
- package/dist/chunk-tf0feafg.js +0 -2
- package/dist/chunk-tgwwa872.js +0 -2
- package/dist/chunk-tspqdt8e.js +0 -2
- package/dist/chunk-tzebte8p.js +0 -2
- package/dist/chunk-v0r6zb87.js +0 -2
- package/dist/chunk-vbq6vt0e.js +0 -2
- package/dist/chunk-vh9yx344.js +0 -2
- package/dist/chunk-vxtna1b1.js +0 -2
- package/dist/chunk-wh07jf0t.js +0 -2
- package/dist/chunk-x43x2c6v.js +0 -2
- package/dist/chunk-xqx8t9w5.js +0 -2
- package/dist/chunk-xzmsfrez.js +0 -2
- package/dist/chunk-ymeemdg9.js +0 -42
- package/dist/chunk-z33r3pzy.js +0 -2
- package/dist/chunk-z43xcwnk.js +0 -2
- package/dist/chunk-zb6fa26w.js +0 -2
- package/dist/chunk-zkr42285.js +0 -2
- package/dist/chunk-zrs22j09.js +0 -2
- package/dist/chunk-zve1xqvs.js +0 -2
- package/dist/chunk-zw6tgr0s.js +0 -2
package/dist/app-shell.d.ts
CHANGED
|
@@ -100,4 +100,4 @@ export declare interface ProcessedShell {
|
|
|
100
100
|
shellScripts: string[]
|
|
101
101
|
shellStyles: string[]
|
|
102
102
|
}
|
|
103
|
-
export { extractLayoutMetadata } from 'stx-router/layout-metadata';
|
|
103
|
+
export { extractLayoutMetadata, HAVE_LAYOUT_GROUP_HEADER, HAVE_LAYOUT_HEADER, layoutChanges, layoutTheRouterHas } from 'stx-router/layout-metadata';
|
package/dist/app-shell.js
CHANGED
|
@@ -8,7 +8,7 @@ import { matchScriptElement, scanAtElementPosition } from "./html-masking.js";
|
|
|
8
8
|
import { isDevelopment } from "./env.js";
|
|
9
9
|
import { isSpaNavRequest } from "./spa-nav.js";
|
|
10
10
|
import { pageCssFragment, pageHeadFragment } from "./page-head.js";
|
|
11
|
-
export { extractLayoutMetadata } from "stx-router/layout-metadata";
|
|
11
|
+
export { extractLayoutMetadata, HAVE_LAYOUT_GROUP_HEADER, HAVE_LAYOUT_HEADER, layoutChanges, layoutTheRouterHas } from "stx-router/layout-metadata";
|
|
12
12
|
const PAGE_HEAD_MARKER = "stx-page-head:", PAGE_HEAD_MARKER_RE = /<!--stx-page-head:([A-Za-z0-9+/=]+)-->\n?/, _cachedRouterScripts = { dev: null, prod: null };
|
|
13
13
|
function getRouterScriptCached() {
|
|
14
14
|
const variant = isDevelopment() ? "dev" : "prod", cached = _cachedRouterScripts[variant];
|
|
@@ -298,5 +298,5 @@ catch (error) {
|
|
|
298
298
|
init();
|
|
299
299
|
}
|
|
300
300
|
})();
|
|
301
|
-
</script>`}var
|
|
302
|
-
export{
|
|
301
|
+
</script>`}var cm={name:"pwa.installButton",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return r(t,n)},hasEndTag:!0,description:"Renders a PWA install prompt button that appears when the app can be installed"},lm={name:"pwa.updatePrompt",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return p(t,n)},hasEndTag:!0,description:"Renders a PWA update notification UI when a new version is available"},um={name:"pwa.offlineIndicator",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return d(t,n)},hasEndTag:!0,description:"Renders an offline status indicator that shows when the user loses connection"},dm={name:"pwa.pushSubscribe",handler:(t,i,e,a)=>{let n=e.__stx_options||{};return l(t,n)},hasEndTag:!0,description:"Renders a push notification subscription button"},Co=[cm,lm,um,dm];function Gy(t){return[...t,...Co]}
|
|
302
|
+
export{cm,lm,um,dm,Co,Gy};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{existsSync as A,mkdtempSync as D,readdirSync as M,realpathSync as b,rmSync as k,statSync as g,writeFileSync as P}from"fs";import{constants as _,tmpdir as x}from"os";import{join as s}from"path";import t from"process";var I=/^stx-(?:.+-)?p(\d+)-\w{6}$/,v=".stx-keep",N=60000,R=["SIGINT","SIGTERM","SIGHUP"],i=new Set,y=new Set,c=!1,S=new Set;function p(e){try{k(e,{recursive:!0,force:!0})}catch{}}function C(){for(let e of i)p(e);i.clear(),f()}function E(){for(let e of i)p(e);i.clear()}function G(e){if(C(),t.listenerCount(e)===0)t.exit(128+(_.signals[e]??1))}var h=new Map(R.map((e)=>[e,()=>G(e)]));function K(){if(c)return;c=!0,t.on("exit",E);for(let[e,n]of h)try{t.on(e,n)}catch{}}function f(){if(!c)return;c=!1,t.off("exit",E);for(let[e,n]of h)t.off(e,n)}function O(e){try{return t.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function L(e={}){let n=e.root??x(),r=e.isAlive??O,w=e.minAgeMs??N,T=e.now??Date.now(),a=[],u;try{u=M(n)}catch{return a}for(let l of u){let d=I.exec(l);if(!d)continue;let m=Number(d[1]);if(m===t.pid||r(m))continue;let o=s(n,l);try{if(!g(o).isDirectory())continue;if(T-g(o).mtimeMs<w)continue;if(A(s(o,v)))continue}catch{continue}p(o),a.push(o)}return a}function z(e){let n=e.replace(/^stx-/,"").replace(/-+$/,"");return n?`stx-${n}-p${t.pid}-`:`stx-p${t.pid}-`}function H(e=t.env){let n=e.STX_KEEP_TEMP?.trim().toLowerCase();return!!n&&n!=="0"&&n!=="false"}function
|
|
3
|
-
`)}catch{}if(y.add(e),i.delete(e),i.size===0)f()}async function
|
|
4
|
-
export{
|
|
2
|
+
import{existsSync as A,mkdtempSync as D,readdirSync as M,realpathSync as b,rmSync as k,statSync as g,writeFileSync as P}from"fs";import{constants as _,tmpdir as x}from"os";import{join as s}from"path";import t from"process";var I=/^stx-(?:.+-)?p(\d+)-\w{6}$/,v=".stx-keep",N=60000,R=["SIGINT","SIGTERM","SIGHUP"],i=new Set,y=new Set,c=!1,S=new Set;function p(e){try{k(e,{recursive:!0,force:!0})}catch{}}function C(){for(let e of i)p(e);i.clear(),f()}function E(){for(let e of i)p(e);i.clear()}function G(e){if(C(),t.listenerCount(e)===0)t.exit(128+(_.signals[e]??1))}var h=new Map(R.map((e)=>[e,()=>G(e)]));function K(){if(c)return;c=!0,t.on("exit",E);for(let[e,n]of h)try{t.on(e,n)}catch{}}function f(){if(!c)return;c=!1,t.off("exit",E);for(let[e,n]of h)t.off(e,n)}function O(e){try{return t.kill(e,0),!0}catch(n){return n.code==="EPERM"}}function L(e={}){let n=e.root??x(),r=e.isAlive??O,w=e.minAgeMs??N,T=e.now??Date.now(),a=[],u;try{u=M(n)}catch{return a}for(let l of u){let d=I.exec(l);if(!d)continue;let m=Number(d[1]);if(m===t.pid||r(m))continue;let o=s(n,l);try{if(!g(o).isDirectory())continue;if(T-g(o).mtimeMs<w)continue;if(A(s(o,v)))continue}catch{continue}p(o),a.push(o)}return a}function z(e){let n=e.replace(/^stx-/,"").replace(/-+$/,"");return n?`stx-${n}-p${t.pid}-`:`stx-p${t.pid}-`}function H(e=t.env){let n=e.STX_KEEP_TEMP?.trim().toLowerCase();return!!n&&n!=="0"&&n!=="false"}function it(e="stx",n=x()){if(!S.has(n))S.add(n),L({root:n});let r=b(D(s(n,z(e))));if(H())return W(r),console.warn(`[stx] STX_KEEP_TEMP: keeping ${r}`),r;return K(),i.add(r),r}function fe(e){if(y.has(e))return;if(p(e),i.delete(e),i.size===0)f()}function W(e){try{P(s(e,v),`kept by pid ${t.pid}
|
|
3
|
+
`)}catch{}if(y.add(e),i.delete(e),i.size===0)f()}async function Cc(e,n){let r=it(e);try{return await n(r)}finally{fe(r)}}
|
|
4
|
+
export{it,fe,Cc};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{T}from"./chunk-0jdz31q1.js";import{
|
|
2
|
+
import{T}from"./chunk-0jdz31q1.js";import{zl}from"./chunk-ck4ypzet.js";var t=new T(256,{maxBytes:16777216,sizeOf:(n)=>n.source.length*2});function Z(n){let r=t.get(n);if(r)return r.asynchronous;let s=o(n);return t.set(n,{source:n,asynchronous:s}),s}function o(n){let r=new Bun.Transpiler({loader:"js"});if(zl(n))return r.transformSync(`(async function(){
|
|
3
3
|
${n}
|
|
4
4
|
})()`),!0;try{return r.transformSync(`(function(){
|
|
5
5
|
${n}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Oo,Aa,cs,No,Mo,qn,an,Pa,ls,us,Do,Lo,Am,Pm,Ct}from"./chunk-3m457a9q.js";export{Ct as DeployError,Aa as calculateSha1,cs as collectDeployFiles,us as createDefaultNetlifyConfig,No as createFileManifest,Oo as createNetlifyClient,Am as deploy,ls as detectProjectConfig,Mo as filterRequiredFiles,qn as formatSize,Pa as generateNetlifyToml,an as getTotalSize,Lo as hasNetlifyConfig,Pm as initNetlify,Do as writeNetlifyConfig};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function
|
|
2
|
+
var d=0;function l(){return`keep-alive-${++d}-${Date.now().toString(36)}`}function sh(e,t={},n){let i=/@keepAlive(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@endkeepAlive/gi;return e.replace(i,(a,c,o)=>{let s=l(),r=u(c||"");return p(s,o.trim(),r)})}function u(e){let t={max:10},n=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\d+)|(\w+))/g,i;while((i=n.exec(e))!==null){let a=i[1],c=i[2]||i[3],o=i[4];switch(a){case"max":t.max=o?parseInt(o,10):10;break;case"include":t.include=c;break;case"exclude":t.exclude=c;break;case"id":t.id=c;break}}return t}function p(e,t,n){let{max:i,include:a,exclude:c}=n,o=n.id||e;return`
|
|
3
3
|
<div class="stx-keep-alive" data-keep-alive-id="${e}" data-custom-id="${o}">
|
|
4
4
|
<div class="stx-keep-alive-content" data-keep-alive-content="${e}">
|
|
5
5
|
${t}
|
|
@@ -286,7 +286,7 @@ else {
|
|
|
286
286
|
});
|
|
287
287
|
})();
|
|
288
288
|
</script>
|
|
289
|
-
`}function
|
|
289
|
+
`}function oh(e={}){return{id:e.id||l(),cache:new Map,max:e.max||10,include:e.include?e.include.split(",").map((n)=>n.trim()):null,exclude:e.exclude?e.exclude.split(",").map((n)=>n.trim()):null}}function ih(e,t){if(t.exclude&&t.exclude.includes(e))return!1;if(t.include&&!t.include.includes(e))return!1;return!0}function ah(){return`
|
|
290
290
|
/* STX Keep-Alive Styles */
|
|
291
291
|
.stx-keep-alive {
|
|
292
292
|
position: relative;
|
|
@@ -311,7 +311,7 @@ else {
|
|
|
311
311
|
.stx-keep-alive-content > [data-activated] {
|
|
312
312
|
opacity: 1;
|
|
313
313
|
}
|
|
314
|
-
`}function
|
|
314
|
+
`}function ch(){return`
|
|
315
315
|
// STX Keep-Alive Runtime
|
|
316
316
|
(function() {
|
|
317
317
|
if (typeof window === 'undefined') return;
|
|
@@ -347,5 +347,5 @@ else {
|
|
|
347
347
|
|
|
348
348
|
console.log('[stx] Keep-alive runtime initialized');
|
|
349
349
|
})();
|
|
350
|
-
`}function
|
|
351
|
-
export{
|
|
350
|
+
`}function lh(e){if(typeof document<"u")document.addEventListener("stx:activated",(t)=>{e(t.detail)})}function uh(e){if(typeof document<"u")document.addEventListener("stx:deactivated",(t)=>{e(t.detail)})}
|
|
351
|
+
export{sh,oh,ih,ah,ch,lh,uh};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import i from"os";import{join as s}from"path";function
|
|
3
|
-
export{
|
|
2
|
+
import i from"os";import{join as s}from"path";function Sr(t,r=process.cwd()){try{let n=typeof Bun<"u"?Bun.resolveSync(t,r):void 0;return n&&o(n)?n:void 0}catch{return}}function o(t,r=process.env){let n=t.replace(/\\/g,"/");if(n.split("/").some((e)=>/@\d[^/]*@@@\d+$/.test(e)))return!1;return![r.BUN_INSTALL_CACHE_DIR,s(r.BUN_INSTALL||s(i.homedir(),".bun"),"install","cache")].filter((e)=>!!e).map((e)=>`${e.replace(/\\/g,"/").replace(/\/$/,"")}/`).some((e)=>n.startsWith(e))}
|
|
3
|
+
export{Sr};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var d=[{open:/<!--/g,close:/-->/g},{open:/<script\b/gi,close:/<\/script\s*>/gi},{open:/<style\b/gi,close:/<\/style\s*>/gi}],u=/<body\b([^>]*)>/gi;function W(n){let i=0,e,c=d.map(()=>{return});while(i<n.length){if(e===void 0||e!==null&&e.index<i)u.lastIndex=i,e=u.exec(n);if(!e)return null;let a=e.index,r=-1,o=null;for(let l=0;l<d.length;l++){let g=d[l],t=c[l];if(t===void 0||t!==null&&t.index<i)g.open.lastIndex=i,t=g.open.exec(n),c[l]=t;if(!t)continue;if(t.index<a&&(r===-1||t.index<r))r=t.index,o=g.close}if(r===-1||!o)return{index:a,tag:e[0],attrs:e[1]??""};o.lastIndex=r;let s=o.exec(n);if(!s)return null;i=s.index+s[0].length}return null}function
|
|
3
|
-
export{W,
|
|
2
|
+
var d=[{open:/<!--/g,close:/-->/g},{open:/<script\b/gi,close:/<\/script\s*>/gi},{open:/<style\b/gi,close:/<\/style\s*>/gi}],u=/<body\b([^>]*)>/gi;function W(n){let i=0,e,c=d.map(()=>{return});while(i<n.length){if(e===void 0||e!==null&&e.index<i)u.lastIndex=i,e=u.exec(n);if(!e)return null;let a=e.index,r=-1,o=null;for(let l=0;l<d.length;l++){let g=d[l],t=c[l];if(t===void 0||t!==null&&t.index<i)g.open.lastIndex=i,t=g.open.exec(n),c[l]=t;if(!t)continue;if(t.index<a&&(r===-1||t.index<r))r=t.index,o=g.close}if(r===-1||!o)return{index:a,tag:e[0],attrs:e[1]??""};o.lastIndex=r;let s=o.exec(n);if(!s)return null;i=s.index+s[0].length}return null}function ut(n,i){let e=W(n);if(!e)return n;return n.slice(0,e.index)+i(e.tag,e.attrs)+n.slice(e.index+e.tag.length)}
|
|
3
|
+
export{W,ut};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{gy,my,gg,Ps}from"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-9bexzgws.js";import"./chunk-v0yay1kw.js";import{Fr}from"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import{Ee}from"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Ee as freeIdentifiers,Ps as processComponents,gg as processESImports,Fr as rendersAsElement,gy as resetMarginStackWarnings,my as resetTemplateLoopWarnings};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{br,i}from"./chunk-jj78m9k1.js";import"./chunk-e4tbq8a0.js";import"./chunk-qvj0bzw5.js";import"./chunk-fs43342z.js";import"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-w1pga3s6.js";import"./chunk-9bexzgws.js";import"./chunk-fwffn130.js";import{Pe}from"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import"./chunk-xpcqyzdc.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{Ke,lo,uo}from"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{br as buildModulesTag,Pe as injectRouterScript,i as processDirectives,lo as processJsonDirective,uo as processOnceDirective,Ke as validateClientScript};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Tm}from"./chunk-zrsrhdxw.js";import"./chunk-jj78m9k1.js";import"./chunk-e4tbq8a0.js";import"./chunk-qvj0bzw5.js";import"./chunk-fs43342z.js";import"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-w1pga3s6.js";import"./chunk-9bexzgws.js";import"./chunk-fwffn130.js";import"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import"./chunk-xpcqyzdc.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Tm as startInteractive};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import s from"path";var h=new Set([".jpg",".jpeg",".png",".gif"]),d=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function
|
|
3
|
-
export{
|
|
2
|
+
import s from"path";var h=new Set([".jpg",".jpeg",".png",".gif"]),d=[{ext:".avif",mime:"image/avif"},{ext:".webp",mime:"image/webp"}];async function _u(e,r){let a=r.formats??d;if(!r.publicDir)return e;let i=y(e),o=[],m=/<img\b[^>]*?>/gi,c=[],u;while((u=m.exec(e))!==null){let t=u[0],n=t.match(/\bsrc=["']([^"']+)["']/i);if(!n)continue;if(A(u.index,i))continue;c.push({idx:u.index,length:t.length,src:n[1],raw:t})}if(c.length===0)return e;let f=await Promise.all(c.map(async(t)=>{let n=await S(t.src,r.publicDir,a);return{match:t,sources:n}}));for(let{match:t,sources:n}of f){if(n.length===0)continue;let x=`<picture>${n.map((p)=>`<source type="${p.mime}" srcset="${P(p.url)}">`).join("")}${t.raw}</picture>`;o.push({start:t.idx,end:t.idx+t.length,replacement:x})}if(o.length===0)return e;let l="",g=0;for(let t of o)l+=e.slice(g,t.start),l+=t.replacement,g=t.end;return l+=e.slice(g),l}async function S(e,r,a){if(!w(e))return[];let i=s.extname(e).toLowerCase();if(!h.has(i))return[];if(!e.startsWith("/"))return[];let o=s.join(r,e.slice(1)),m=s.dirname(o),c=s.basename(o,i),u=s.resolve(m),f=s.resolve(r);if(!u.startsWith(f))return[];let l=s.posix.dirname(e),g=a.map(async(n)=>{let b=s.join(m,`${c}${n.ext}`);if(!await Bun.file(b).exists())return null;return{url:s.posix.join(l,`${c}${n.ext}`),mime:n.mime}});return(await Promise.all(g)).filter((n)=>n!==null)}function w(e){if(!e)return!1;if(e.startsWith("http://")||e.startsWith("https://"))return!1;if(e.startsWith("//"))return!1;if(e.startsWith("data:"))return!1;return!0}function y(e){let r=[],a=/<picture\b[^>]*>[\s\S]*?<\/picture>/gi,i;while((i=a.exec(e))!==null)r.push([i.index,i.index+i[0].length]);return r}function A(e,r){for(let[a,i]of r)if(e>=a&&e<i)return!0;return!1}function P(e){return e.replace(/&/g,"&").replace(/"/g,""")}
|
|
3
|
+
export{_u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{kt,_t
|
|
2
|
+
import{St,kt,_t}from"./chunk-5jc9hmwg.js";import{nn,rn,xt,Sa,sn,on}from"./chunk-gfp39bzr.js";import o from"fs";import i from"path";var c=[];function m(a){c=[];for(let e of a.storyFiles)if(c.push({text:e.fileName.toLowerCase(),original:e.fileName,type:"story",storyId:e.id}),c.push({text:e.relativePath.toLowerCase(),original:e.relativePath,type:"story",storyId:e.id}),e.story)for(let t of e.story.variants)c.push({text:t.title.toLowerCase(),original:t.title,type:"story",storyId:e.id,variantId:t.id})}function f(){return JSON.stringify(c)}async function F(a={}){let e=Date.now();nn();let t=await St({mode:"build"});if(!t.config.enabled){xt("Story feature is disabled in config.");return}let n=await sn(t);kt(t,n);let l=on(t.config,n);_t(t,l),rn(n.length);let d=a.outDir??t.config.outDir,s=i.resolve(t.root,d);await o.promises.mkdir(s,{recursive:!0}),console.log(` Building to ${d}...`);let g=v(t);await o.promises.writeFile(i.join(s,"index.html"),g);let y={files:n.map((r)=>({id:r.id,fileName:r.fileName,relativePath:r.relativePath,treePath:r.treePath})),tree:l};await o.promises.writeFile(i.join(s,"stories.json"),JSON.stringify(y,null,2));let u={theme:t.config.theme,responsivePresets:t.config.responsivePresets,backgroundPresets:t.config.backgroundPresets};await o.promises.writeFile(i.join(s,"config.json"),JSON.stringify(u,null,2));let p=i.join(s,"stories");await o.promises.mkdir(p,{recursive:!0});for(let r of n){let b=await o.promises.readFile(r.path,"utf-8");await o.promises.writeFile(i.join(p,`${r.id}.stx`),b)}m(t);let h=f();await o.promises.writeFile(i.join(s,"search-index.json"),h);let x=Date.now()-e;Sa(n.length,d,x)}function v(a){let{theme:e}=a.config,t=e.title||"STX Story";return`<!DOCTYPE html>
|
|
3
3
|
<html lang="en">
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="UTF-8">
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import t from"fs";import r from"path";var fn="resources/assets",
|
|
3
|
-
export{fn,
|
|
2
|
+
import t from"fs";import r from"path";var fn="resources/assets",gr="assets";function mr(o=process.cwd()){let s=r.resolve(o,fn);return t.existsSync(s)&&t.statSync(s).isDirectory()?s:null}
|
|
3
|
+
export{fn,gr,mr};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{et,z,Jt}from"./chunk-w98yt4d4.js";import{T}from"./chunk-0jdz31q1.js";import{Et,Be,V,ds,Tt,Fe,Fa,Fo,za,Gn}from"./chunk-tszhkmny.js";import{Dt,Se,We,Ai,Pi}from"./chunk-b234w3mf.js";import{ni}from"./chunk-p3et6xjr.js";import{Jn}from"./chunk-fznjm7qt.js";import{Ae}from"./chunk-nzqr3w35.js";import ae from"fs";import P from"path";var{serve:ge}=globalThis.Bun;import k from"zlib";import{promisify as re}from"util";var ce=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],ue=["text/event-stream","multipart/x-mixed-replace"],pe=1024;function le(t){if(!t)return!1;let e=t.toLowerCase();if(ue.some((o)=>e.startsWith(o)))return!1;return ce.some((o)=>e.startsWith(o))}function me(t){let e=new Map;for(let o of t.split(",")){let[r,...c]=o.trim().split(";"),m=r.trim().toLowerCase();if(!m)continue;let v=1;for(let d of c){let u=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(d);if(!u)continue;let l=Number.parseFloat(u[1]);if(Number.isFinite(l))v=l}e.set(m,v)}return e}function fe(t){if(!t)return null;let e=me(t),o=e.get("*"),r=(c)=>e.get(c)??o??0;if(r("br")>0)return"br";if(r("gzip")>0)return"gzip";return null}var se=33554432,F=new Map,W=0;function de(t,e){if(e.length>se/8)return;F.set(t,e),W+=e.length;for(let[o,r]of F){if(W<=se)break;F.delete(o),W-=r.length}}async function Wn(t,e,o={}){if(e.headers.get("content-encoding"))return e;if(e.status===204||e.status===304||!e.body)return e;if(!le(e.headers.get("content-type")))return e;let r=fe(t.headers.get("accept-encoding"));if(!r)return e;let c;try{c=new Uint8Array(await e.arrayBuffer())}catch{return e}let m=()=>new Response(c,{status:e.status,statusText:e.statusText,headers:oe(e.headers)});if(c.length<(o.threshold??pe))return m();try{let v=o.quality??5,d=`${r}:${v}:${c.length}:${Bun.hash(c)}`,u=F.get(d);if(!u)u=r==="br"?await re(k.brotliCompress)(c,{params:{[k.constants.BROTLI_PARAM_QUALITY]:v,[k.constants.BROTLI_PARAM_SIZE_HINT]:c.length}}):await re(k.gzip)(c),de(d,u);if(u.length>=c.length)return m();let l=oe(e.headers);return l.set("Content-Encoding",r),l.set("Content-Length",String(u.length)),new Response(u,{status:e.status,statusText:e.statusText,headers:l})}catch{return m()}}function oe(t){let e=new Headers(t),o=e.get("Vary");if(!o)return e.set("Vary","Accept-Encoding"),e;if(!o.split(",").some((c)=>c.trim().toLowerCase()==="accept-encoding"))e.set("Vary",`${o}, Accept-Encoding`);return e}var he=new Set(["x-stx-router","accept-encoding",...ds.map((t)=>t.toLowerCase())]);class J{now;entries=new T(1000,{maxBytes:33554432,sizeOf:(t)=>t.body.byteLength+JSON.stringify(t.headers).length*2});pending=new Map;generation=0;constructor(t=Date.now){this.now=t}invalidate(t){this.generation++,this.pending.clear();for(let e of Array.from(this.entries.keys()))if(t===void 0||this.entries.get(e)?.path===t)this.entries.delete(e)}async respond(t,e,o){let r,c=async()=>{let a=r??await o();return a.headers.set("Cache-Control","private, no-store"),a.headers.set("Vary",V(a.headers.get("Vary")).Vary),a};if(!e||t.method!=="GET"||t.headers.has("Cookie")||t.headers.has("Authorization")||t.headers.has("Range"))return c();let m=new URL(t.url),v=Be(t)?`fragment|${ds.map((a)=>t.headers.get(a)??"").join("|")}`:"document",d=`${m.origin}${m.pathname}${m.search}|${v}`,u=this.entries.get(d),l=(a)=>{let S=new Headers(a.headers);return S.set("Cache-Control","private, no-store"),S.set("Age",String(Math.max(0,Math.floor((this.now()-a.created)/1000)))),new Response(a.body.slice(0),{headers:S})},b=u?(this.now()-u.created)/1000:1/0;if(u&&b<e.maxAge)return l(u);let N=this.generation,X=async()=>{let a=await o();r=a;let S=(a.headers.get("Vary")??"").toLowerCase().split(",").map((s)=>s.trim()).filter(Boolean);if(a.status!==200||a.headers.has("Set-Cookie")||/(?:private|no-store|no-cache)/i.test(a.headers.get("Cache-Control")??"")||S.some((s)=>!he.has(s)))return null;let n=await a.clone().arrayBuffer();if(n.byteLength>1048576)return null;a.headers.set("Vary",V(a.headers.get("Vary")).Vary);let A={body:n,headers:Array.from(a.headers.entries()),created:this.now(),path:m.pathname};if(this.generation===N)this.entries.set(d,A);return A},w=this.pending.get(d);if(!w){if(this.pending.size>=1000)return c();w=X().finally(()=>{if(this.pending.get(d)===w)this.pending.delete(d)}),this.pending.set(d,w)}if(u&&b<e.maxAge+(e.swr??0))return w.catch(()=>{}),l(u);let E=await w;return E?l(E):c()}}var Re={".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"};function q(t,e){if(!e)return null;let o=Pi(t.headers);return o&&Ai(o,e)?e:null}function K(t){return t?{"X-STX-Layout":t.layout,"X-STX-Layout-Group":t.group}:{}}async function Rm(t={}){let e=P.resolve(t.outputDir||".output"),o=t.port??3000,r=Fa(e);if(!r)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${r.routes.length} routes...`);let c=Jn(r.routeRules),m=new J,v=ni(e,r.apiRoutes??[]),d=Bun.file(P.join(e,"server/runtime-config.json")),u=t.runtimeConfig??(await d.exists()?await d.json():void 0),l=u?z(u):void 0,b=new Map,N=new Map,X=new Map,w=new Map;for(let n of r.routes)try{let A=P.join(e,n.compiledPath),s=JSON.parse(await Bun.file(A).text());if(l)s.html=Jt(s.html,l);b.set(n.pattern,s),X.set(n.pattern,We(s.html)),w.set(n.pattern,Ae(s.html));let j=P.join(e,n.fragmentPath);if(Tt(s.html,r.routerContainer||"main")&&await Bun.file(j).exists()){let M=await Bun.file(j).text();N.set(n.pattern,l?Jt(M,l):M)}}catch(A){console.warn(`[stx] Failed to load route ${n.pattern}:`,A)}let E=new Map,a=[];for(let n of r.routes)if(n.hasParams){let{regex:A,params:s}=Se(n.pattern,{page:!0});a.push({regex:A,route:n,paramNames:s})}else E.set(n.pattern,n);let S=ge({port:o,async fetch(n){return Wn(n,await et(l??z(),async()=>{let s=new URL(n.url).pathname;if(t.onRequest){let p=await t.onRequest(n);if(p)return p}if(t.apiRouter){let p=await t.apiRouter.handleRequest(n);if(p.status!==404)return p}if(t.apiRoutes?.[s])return t.apiRoutes[s](n);let j=await v(n);if(j)return j;if((n.method==="GET"||n.method==="HEAD")&&s!=="/"){let p=P.resolve(e,"public"),y;try{y=decodeURIComponent(s)}catch{y=s}if(!y.includes("\x00")){let f=P.resolve(p,`.${y}`);if(f===p||f.startsWith(`${p}${P.sep}`))try{if(ae.existsSync(f)&&ae.statSync(f).isFile()){let i=P.extname(f).toLowerCase(),g=Re[i]||"application/octet-stream",H=s.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(s);return new Response(Bun.file(f),{headers:{"Content-Type":g,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let M=Be(n),R=null,Q={};if(R=E.get(s)||null,!R)for(let{regex:p,route:y,paramNames:f}of a){let h=s.match(p);if(h){R=y,f.forEach((i,g)=>{Q[i]=h[g+1]});break}}if(!R){let p=Dt(s)?null:E.get("/404")||null;if(p){let y=b.get(p.pattern);if(y)return new Response(y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404,headers:{"Content-Type":"text/plain; charset=utf-8"}})}let O=c(s),Z=Object.keys(O).length>0;return m.respond(n,O.cache,async()=>{let p=b.get(R.pattern),y=M?q(n,X.get(R.pattern)):null;if(M&&!y&&n.method==="GET"&&p&&!p.hasServerScripts&&Object.keys(p.placeholders).length===0){let i=N.get(R.pattern);if(i){let g=X.get(R.pattern);return new Response(i,{status:p.status??200,headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...w.has(R.pattern)?{"X-STX-Runtime":w.get(R.pattern)?"true":"false"}:{},...g?{"X-STX-Layout":g.layout,"X-STX-Layout-Group":g.group}:{},...V(),...O.cache?{}:{"Cache-Control":Et}}})}}let f=Fo(n.method),h=b.get(R.pattern);if(!h){let i=E.get("/500")||null;if(i){let g=b.get(i.pattern);if(g)return new Response(g.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(R.prerendered&&f)return new Response("Prerendered pages do not accept actions",{status:405,headers:{Allow:"GET, HEAD"}});if(!f&&!h.hasServerScripts&&Object.keys(h.placeholders).length===0)return new Response(h.html,{status:h.status??200,headers:{"Content-Type":"text/html",...V(),"Cache-Control":"public, max-age=60",...K(y)}});try{let{html:i,boundaries:g,redirect:H,cookies:I,status:D,headers:U}=await Gn(h,{params:Q,request:n,method:n.method,__stx_strict_hydration:Z,__stx_runtime_config:l});if(H)return za(H,I,U);if(g&&g.length>0){let{renderStreamingPage:x,streamToResponse:B}=await import("./chunk-4b9jx2c1.js"),L=new Headers({...V(),...U,"Cache-Control":"private, no-store"});for(let Y of I??[])L.append("Set-Cookie",Y);let _=M&&!f?We(i):null,te=_?q(n,_):null,ne=M&&!f&&!te&&Tt(i,r.routerContainer||"main");if(ne&&_)L.set("X-STX-Fragment","true"),L.set("X-STX-Runtime",Ae(i)?"true":"false"),L.set("X-STX-Layout",_.layout),L.set("X-STX-Layout-Group",_.group);for(let[Y,ie]of Object.entries(K(te)))L.set(Y,ie);return B(x(ne?Fe(i,r.routerContainer||"main",!0):i,g,{timeoutMs:30000}),{status:D??h.status??200,headers:L})}let C=new Headers({"Content-Type":"text/html",...V(),...O.cache?{}:{"Cache-Control":"private, no-store"}});for(let x of I??[])C.append("Set-Cookie",x);for(let[x,B]of Object.entries(U??{}))C.set(x,B);C.set("Vary",V(C.get("Vary")).Vary);let G=M&&!f?We(i):null,ee=G?q(n,G):null;for(let[x,B]of Object.entries(K(ee)))C.set(x,B);if(M&&!f&&!ee&&Tt(i,r.routerContainer||"main")){let x=G??We(i);return C.set("X-STX-Fragment","true"),C.set("X-STX-Runtime",Ae(i)?"true":"false"),C.set("X-STX-Layout",x.layout),C.set("X-STX-Layout-Group",x.group),new Response(Fe(i,r.routerContainer||"main",!0),{status:D??h.status??200,headers:C})}return new Response(i,{status:D??h.status??200,headers:C})}catch(i){if(console.error(`[stx] Hydration error for ${s}:`,i),Z)return new Response("Internal Server Error",{status:500});return new Response(h.html,{headers:{"Content-Type":"text/html"}})}})}))}});return console.log(`[stx] Production server running at http://localhost:${S.port}`),console.log(`[stx] Serving ${r.routes.length} routes (${b.size} pre-loaded)`),{port:S.port,stop:()=>{m.invalidate(),S.stop()},invalidate:(n)=>m.invalidate(n)}}
|
|
3
|
+
export{Wn,Rm};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ou,iu}from"./chunk-m9cye9t8.js";import"./chunk-72pbhpq8.js";import"./chunk-zrsrhdxw.js";import"./chunk-vmphrcaa.js";import"./chunk-3611xczp.js";import"./chunk-3m457a9q.js";import"./chunk-ta7cwykn.js";import"./chunk-afmmrqee.js";import"./chunk-z0d1asbw.js";import"./chunk-tszhkmny.js";import"./chunk-6yketqa1.js";import"./chunk-9atdw0p8.js";import"./chunk-5jn2qyv7.js";import"./chunk-3yr0wyc9.js";import"./chunk-gyv2bsmn.js";import"./chunk-2m4d8jkv.js";import"./chunk-gg31th5s.js";import"./chunk-1ezcxbpg.js";import"./chunk-jttzrv0w.js";import"./chunk-ekyx5z50.js";import"./chunk-wxk0t61p.js";import"./chunk-yqs88qj4.js";import"./chunk-nan0ysys.js";import"./chunk-zk1c6tg7.js";import"./chunk-jhegz7az.js";import"./chunk-pc89t52s.js";import"./chunk-42z7zv92.js";import"./chunk-wna2herj.js";import"./chunk-x39v2ch2.js";import"./chunk-zcwx8z8z.js";import"./chunk-0vyytd9v.js";import"./chunk-8n42epb6.js";import{gn}from"./chunk-nmywrw6v.js";import{og}from"./chunk-wk6g0b9h.js";import"./chunk-p3et6xjr.js";import"./chunk-cwcmmgvz.js";import{Ue,i}from"./chunk-jj78m9k1.js";import"./chunk-e4tbq8a0.js";import"./chunk-qvj0bzw5.js";import"./chunk-fs43342z.js";import"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-w1pga3s6.js";import"./chunk-9bexzgws.js";import"./chunk-fwffn130.js";import{Pe}from"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import{Er,Tr}from"./chunk-xpcqyzdc.js";import"./chunk-13awnyq0.js";import{zs,q,a}from"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{B,y,Je}from"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";import{la}from"./chunk-8tfpv6zf.js";import"./chunk-fycxc75p.js";import"./chunk-d4hnj3ct.js";export{zs as buildWebComponents,Tr as cacheTemplate,Er as checkCache,gn as classifyAllScripts,ou as createMiddleware,iu as createRoute,q as defaultConfig,y as extractVariables,B as findSfcTemplateBlock,Pe as injectRouterScript,la as insertBeforeBodyClose,a as loadStxConfig,Je as processClientScript,i as processDirectives,Ue as readMarkdownFile,og as withinBundlerCallback};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import S from"fs";import _ from"path";function
|
|
2
|
+
import S from"fs";import _ from"path";function Oo(e){let{token:t,baseUrl:i="https://api.netlify.com/api/v1"}=e;async function s(n,r,l={}){let p=`${i}${r}`,f={Authorization:`Bearer ${t}`,"User-Agent":"stx-deploy/1.0"},u;if(l.rawBody)f["Content-Type"]=l.contentType||"application/octet-stream",u=l.rawBody;else if(l.body)f["Content-Type"]="application/json",u=JSON.stringify(l.body);let o=await fetch(p,{method:n,headers:f,body:u});if(!o.ok){let g=Error(`Netlify API error: ${o.status} ${o.statusText}`);g.status=o.status;try{let b=await o.json();g.message=b.message||g.message,g.code=b.code,g.details=b}catch{}throw g}let a=await o.text();if(!a)return{};return JSON.parse(a)}return{async getSite(n){return s("GET",`/sites/${n}`)},async listSites(){return s("GET","/sites")},async createSite(n){let r={};if(n)r.name=n;return s("POST","/sites",{body:r})},async createDeploy(n,r){let l={files:r.files,draft:r.draft??!0,async:r.async??!0};if(r.title)l.title=r.title;if(r.branch)l.branch=r.branch;if(r.functions)l.functions=r.functions;return s("POST",`/sites/${n}/deploys`,{body:l})},async uploadFile(n,r,l){let p=r.startsWith("/")?r.slice(1):r;await s("PUT",`/deploys/${n}/files/${p}`,{rawBody:l,contentType:"application/octet-stream"})},async uploadFiles(n,r){let p=[...r],f=async()=>{while(p.length>0){let o=p.shift();if(o)await this.uploadFile(n,o.path,o.content)}},u=Array.from({length:Math.min(5,r.length)},()=>f());await Promise.all(u)},async getDeploy(n){return s("GET",`/deploys/${n}`)},async waitForDeploy(n,r={}){let{timeout:l=300000,pollInterval:p=2000,onProgress:f}=r,u=Date.now();while(!0){let o=await this.getDeploy(n);if(f)f(o);if(o.state==="ready")return o;if(o.state==="error"){let a=Error(`Deploy failed: ${o.error_message||"Unknown error"}`);throw a.status=500,a.details=o,a}if(Date.now()-u>l){let a=Error(`Deploy timed out after ${l}ms`);throw a.status=408,a.details=o,a}await new Promise((a)=>setTimeout(a,p))}},async lockDeploy(n){return s("POST",`/deploys/${n}/lock`)},async unlockDeploy(n){return s("POST",`/deploys/${n}/unlock`)}}}async function Aa(e){let t=await crypto.subtle.digest("SHA-1",e);return Array.from(new Uint8Array(t)).map((s)=>s.toString(16).padStart(2,"0")).join("")}async function cs(e,t={}){let{ignore:i=["node_modules",".git",".env*","*.map"]}=t,s=[],n=new Bun.Glob("**/*");for await(let r of n.scan({cwd:e,onlyFiles:!0,dot:!1})){if(i.some((a)=>{if(a.includes("*"))return new RegExp(`^${a.replace(/\*/g,".*")}$`).test(r);return r.includes(a)}))continue;let p=`${e}/${r}`,u=await Bun.file(p).arrayBuffer(),o=await Aa(u);s.push({path:r,content:new Uint8Array(u),sha1:o})}return s}function No(e){let t={};for(let i of e)t[`/${i.path}`]=i.sha1;return t}function Mo(e,t){let i=new Set(t.map((s)=>s.startsWith("/")?s.slice(1):s));return e.filter((s)=>i.has(s.path))}function qn(e){if(e<1024)return`${e} B`;if(e<1048576)return`${(e/1024).toFixed(1)} KB`;if(e<1073741824)return`${(e/1048576).toFixed(1)} MB`;return`${(e/1073741824).toFixed(1)} GB`}function an(e){return e.reduce((t,i)=>t+i.content.byteLength,0)}import m from"fs";import y from"path";function Pa(e){let t=[];if(t.push("[build]"),t.push(` command = "${d(e.build.command)}"`),t.push(` publish = "${d(e.build.publish)}"`),e.build.functions)t.push(` functions = "${d(e.build.functions)}"`);if(e.build.edge_functions)t.push(` edge_functions = "${d(e.build.edge_functions)}"`);if(e.build.environment&&Object.keys(e.build.environment).length>0){t.push(""),t.push("[build.environment]");for(let[i,s]of Object.entries(e.build.environment))t.push(` ${i} = "${d(s)}"`)}if(e.functions){if(t.push(""),t.push("[functions]"),e.functions.directory)t.push(` directory = "${d(e.functions.directory)}"`);if(e.functions.node_bundler)t.push(` node_bundler = "${e.functions.node_bundler}"`);if(e.functions.external_node_modules&&e.functions.external_node_modules.length>0)t.push(` external_node_modules = [${e.functions.external_node_modules.map((i)=>`"${i}"`).join(", ")}]`)}if(e.edge_functions&&e.edge_functions.length>0){t.push("");for(let i of e.edge_functions)t.push("[[edge_functions]]"),t.push(` function = "${d(i.function)}"`),t.push(` path = "${d(i.path)}"`)}if(e.redirects&&e.redirects.length>0){t.push("");for(let i of e.redirects){if(t.push("[[redirects]]"),t.push(` from = "${d(i.from)}"`),t.push(` to = "${d(i.to)}"`),i.status!==void 0)t.push(` status = ${i.status}`);if(i.force!==void 0)t.push(` force = ${i.force}`);if(i.conditions&&Object.keys(i.conditions).length>0){t.push(" [redirects.conditions]");for(let[s,n]of Object.entries(i.conditions))t.push(` ${s} = "${d(n)}"`)}}}if(e.headers&&e.headers.length>0){t.push("");for(let i of e.headers){t.push("[[headers]]"),t.push(` for = "${d(i.for)}"`),t.push(" [headers.values]");for(let[s,n]of Object.entries(i.values))t.push(` ${s} = "${d(n)}"`)}}if(e.plugins&&e.plugins.length>0){t.push("");for(let i of e.plugins)if(t.push("[[plugins]]"),t.push(` package = "${d(i.package)}"`),i.inputs&&Object.keys(i.inputs).length>0){t.push(" [plugins.inputs]");for(let[s,n]of Object.entries(i.inputs))if(typeof n==="string")t.push(` ${s} = "${d(n)}"`);else if(typeof n==="boolean"||typeof n==="number")t.push(` ${s} = ${n}`)}}if(e.context&&Object.keys(e.context).length>0)for(let[i,s]of Object.entries(e.context)){if(t.push(""),t.push(`[context.${i}]`),s.command)t.push(` command = "${d(s.command)}"`);if(s.publish)t.push(` publish = "${d(s.publish)}"`);if(s.environment&&Object.keys(s.environment).length>0){t.push(` [context.${i}.environment]`);for(let[n,r]of Object.entries(s.environment))t.push(` ${n} = "${d(r)}"`)}}return t.join(`
|
|
3
3
|
`)+`
|
|
4
|
-
`}function d(e){return e.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}async function
|
|
4
|
+
`}function d(e){return e.replace(/\\/g,"\\\\").replace(/"/g,"\\\"").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}async function ls(e){let t={framework:"stx",buildCommand:"bun run build",outputDir:"dist"},i=y.join(e,"package.json");if(await Bun.file(i).exists())try{let u=JSON.parse(await Bun.file(i).text());if(u.scripts?.build)t.buildCommand="bun run build";let o={...u.dependencies,...u.devDependencies};if(o["@stacksjs/stx"]||o.stx)t.framework="stx"}catch{}let s=y.join(e,"stx.config.ts"),n=y.join(e,".config","stx.config.ts");if(await Bun.file(s).exists()||await Bun.file(n).exists())t.framework="stx";let r=["dist","build","out","public",".output"];for(let u of r){let o=y.join(e,u);if(m.existsSync(o)&&m.statSync(o).isDirectory()){t.outputDir=u;break}}let l=["functions","netlify/functions","api"];for(let u of l){let o=y.join(e,u);if(m.existsSync(o)&&m.statSync(o).isDirectory()){t.functionsDir=u;break}}let p=y.join(e,"netlify","edge-functions");if(m.existsSync(p))t.edgeFunctionsDir="netlify/edge-functions";let f=y.join(e,t.outputDir||"dist");if(m.existsSync(f)){let u=m.existsSync(y.join(f,"index.html")),o=m.readdirSync(f).filter((a)=>a.endsWith(".html"));t.isSPA=u&&o.length===1}return t}function us(e={}){let t={build:{command:e.buildCommand||"bun run build",publish:e.outputDir||"dist"}};if(e.functionsDir)t.build.functions=e.functionsDir,t.functions={directory:e.functionsDir,node_bundler:"esbuild"};if(e.edgeFunctionsDir)t.build.edge_functions=e.edgeFunctionsDir;if(t.headers=[{for:"/*",values:{"X-Frame-Options":"DENY","X-Content-Type-Options":"nosniff","X-XSS-Protection":"1; mode=block","Referrer-Policy":"strict-origin-when-cross-origin"}},{for:"/assets/*",values:{"Cache-Control":"public, max-age=31536000, immutable"}}],e.isSPA!==!1)t.redirects=[{from:"/*",to:"/index.html",status:200}];return t.context={production:{environment:{NODE_ENV:"production"}},"deploy-preview":{environment:{NODE_ENV:"development"}}},t}async function Do(e,t){let i=await ls(e),s=t||us(i),n=Pa(s),r=y.join(e,"netlify.toml");return await Bun.write(r,n),r}function Lo(e){return m.existsSync(y.join(e,"netlify.toml"))}async function Am(e={}){let t=Date.now(),i=[],s=e.cwd||process.cwd(),n=(c)=>{i.push(c)},r=(c)=>{if(e.onProgress)e.onProgress(c)},l=_.resolve(s,e.directory||"dist"),p=e.token||process.env.NETLIFY_AUTH_TOKEN,f=e.siteId||process.env.NETLIFY_SITE_ID;if(!p)throw new Ct(`No Netlify auth token found.
|
|
5
5
|
|
|
6
6
|
To deploy to Netlify:
|
|
7
7
|
1. Create account at https://app.netlify.com
|
|
8
8
|
2. Get token at https://app.netlify.com/user/applications#personal-access-tokens
|
|
9
9
|
3. Set NETLIFY_AUTH_TOKEN environment variable
|
|
10
10
|
|
|
11
|
-
export NETLIFY_AUTH_TOKEN=your_token_here`,"NO_TOKEN");if(!f)throw new
|
|
11
|
+
export NETLIFY_AUTH_TOKEN=your_token_here`,"NO_TOKEN");if(!f)throw new Ct(`No Netlify site ID found.
|
|
12
12
|
|
|
13
13
|
Either:
|
|
14
14
|
1. Set NETLIFY_SITE_ID environment variable
|
|
15
15
|
2. Pass --site-id option
|
|
16
16
|
3. Run \`stx deploy --init\` to set up
|
|
17
17
|
|
|
18
|
-
Find your site ID at: https://app.netlify.com/sites/YOUR_SITE/settings/general`,"NO_SITE_ID");if(!S.existsSync(l))throw new
|
|
18
|
+
Find your site ID at: https://app.netlify.com/sites/YOUR_SITE/settings/general`,"NO_SITE_ID");if(!S.existsSync(l))throw new Ct(`Build directory not found: ${l}
|
|
19
19
|
|
|
20
|
-
Run \`stx build\` first or specify a different directory with --directory`,"NO_BUILD_DIR");if(!(S.readdirSync(l).length>0))throw new
|
|
20
|
+
Run \`stx build\` first or specify a different directory with --directory`,"NO_BUILD_DIR");if(!(S.readdirSync(l).length>0))throw new Ct(`Build directory is empty: ${l}
|
|
21
21
|
|
|
22
|
-
Run \`stx build\` to generate files`,"EMPTY_BUILD_DIR");if(e.dryRun){r({stage:"collect",message:"Collecting files..."});let c=await
|
|
22
|
+
Run \`stx build\` to generate files`,"EMPTY_BUILD_DIR");if(e.dryRun){r({stage:"collect",message:"Collecting files..."});let c=await cs(l),w=an(c);return n(`Would deploy ${c.length} files (${qn(w)})`),n(`From: ${l}`),n(`To: Site ${f}`),n(`Mode: ${e.production?"production":"draft"}`),{success:!0,url:`https://${f}.netlify.app (dry-run)`,deployId:"dry-run",logs:i,duration:Date.now()-t,filesUploaded:c.length,totalSize:w}}let o=Oo({token:p});r({stage:"collect",message:"Verifying site..."});try{let c=await o.getSite(f);n(`Deploying to: ${c.name} (${c.url})`)}catch(c){if(c.status===404)throw new Ct(`Site not found: ${f}
|
|
23
23
|
|
|
24
|
-
Check your site ID or create a new site at https://app.netlify.com`,"SITE_NOT_FOUND");throw c}r({stage:"collect",message:"Collecting files..."});let a=await
|
|
24
|
+
Check your site ID or create a new site at https://app.netlify.com`,"SITE_NOT_FOUND");throw c}r({stage:"collect",message:"Collecting files..."});let a=await cs(l),g=an(a);if(n(`Found ${a.length} files (${qn(g)})`),a.length===0)throw new Ct(`No files found in ${l}`,"NO_FILES");let b=No(a);r({stage:"upload",message:"Creating deploy...",percent:0});let D=await o.createDeploy(f,{title:e.message||"Deploy from stx CLI",draft:!e.production,files:b});n(`Created deploy: ${D.id}`);let h=Mo(a,D.required||[]);if(n(`Uploading ${h.length} files...`),h.length>0){let c=0,w=an(h);for(let x of h){await o.uploadFile(D.id,x.path,x.content),c++;let C=Math.round(c/h.length*100);r({stage:"upload",message:`Uploading: ${x.path}`,percent:C,details:{uploaded:c,total:h.length}})}n(`Uploaded ${qn(w)}`)}else n("All files already on CDN (no upload needed)");r({stage:"process",message:"Processing deploy..."});let N=await o.waitForDeploy(D.id,{onProgress:(c)=>{r({stage:"process",message:`Status: ${c.state}`,details:c})}}),P=Date.now()-t;if(r({stage:"done",message:"Deploy complete!"}),n(`Deploy complete in ${(P/1000).toFixed(1)}s`),n(`URL: ${N.deploy_ssl_url}`),e.production)n(`Site: ${N.ssl_url}`);if(e.open){let c=e.production?N.ssl_url:N.deploy_ssl_url;I(c)}return{success:!0,url:N.deploy_ssl_url,siteUrl:e.production?N.ssl_url:void 0,deployId:N.id,logs:i,duration:P,filesUploaded:h.length,totalSize:an(h)}}async function Pm(e={}){let t=e.directory||process.cwd(),i;if(Lo(t))i=_.join(t,"netlify.toml");else{let s=await ls(t);i=await Do(t,us(s))}if(e.siteId){let s=_.join(t,".env.local"),n="";if(await Bun.file(s).exists()){if(n=await Bun.file(s).text(),n=n.split(`
|
|
25
25
|
`).filter((r)=>!r.startsWith("NETLIFY_SITE_ID=")).join(`
|
|
26
26
|
`),n&&!n.endsWith(`
|
|
27
27
|
`))n+=`
|
|
28
28
|
`}n+=`NETLIFY_SITE_ID=${e.siteId}
|
|
29
|
-
`,await Bun.write(s,n)}return{configPath:i,siteId:e.siteId}}class
|
|
30
|
-
export{
|
|
29
|
+
`,await Bun.write(s,n)}return{configPath:i,siteId:e.siteId}}class Ct extends Error{code;constructor(e,t){super(e);this.name="DeployError",this.code=t}}function I(e){let t=process.platform,i=t==="darwin"?"open":t==="win32"?"start":"xdg-open";Bun.spawn([i,e],{stdio:["ignore","ignore","ignore"]})}
|
|
30
|
+
export{Oo,Aa,cs,No,Mo,qn,an,Pa,ls,us,Do,Lo,Am,Pm,Ct};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{tn}from"./chunk-
|
|
2
|
+
import{tn}from"./chunk-w3y8408q.js";import{c,f}from"./chunk-8tfpv6zf.js";function ko(e){let n=e.pwa;if(!n?.enabled)return"";let r=n.manifest,t=n.icons?.outputDir?`/${n.icons.outputDir}`:"/pwa-icons",o=tn(e),i=`
|
|
3
3
|
<!-- stx PWA Meta Tags -->
|
|
4
4
|
<link rel="manifest" href="/manifest.json">
|
|
5
5
|
<meta name="theme-color" content="${a(r?.themeColor||"#000000")}">
|
|
@@ -43,8 +43,8 @@ if ('serviceWorker' in navigator) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
</script>
|
|
46
|
-
<!-- End stx PWA -->`,i}function
|
|
47
|
-
`+e.slice(o)}return e+
|
|
46
|
+
<!-- End stx PWA -->`,i}function aa(e,n){let r=n.pwa;if(!r?.enabled||r.autoInject===!1)return e;if(e.includes("<!-- stx PWA Meta Tags -->"))return e;if(!e.includes("</head>")){let o=c(e);if(o!==-1){let i=ko(n);return e.slice(0,o)+i+`
|
|
47
|
+
`+e.slice(o)}return e+ko(n)}let t=ko(n);return f(e,t)}function sm(e){if(!e.pwa?.enabled)return"";return`<script>
|
|
48
48
|
if ('serviceWorker' in navigator) {
|
|
49
49
|
window.addEventListener('load', function() {
|
|
50
50
|
navigator.serviceWorker.register('/${tn(e)}')
|
|
@@ -56,5 +56,5 @@ if ('serviceWorker' in navigator) {
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
</script>`}function
|
|
60
|
-
export{
|
|
59
|
+
</script>`}function om(){return'<link rel="manifest" href="/manifest.json">'}function im(e){return`<meta name="theme-color" content="${a(e)}">`}function a(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}
|
|
60
|
+
export{ko,aa,sm,om,im};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{m,p}from"./chunk-
|
|
3
|
-
export{
|
|
2
|
+
import{m,p}from"./chunk-c08jvjqt.js";import{oe,F,g}from"./chunk-fds6vvq0.js";function z(t,o){let i=1,r=o,e="<template",n="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(e,r)&&(r+e.length>=t.length||/[\s>\/]/.test(t[r+e.length]))){i++,r+=e.length;continue}if(t.startsWith(n,r)){let a=t.indexOf(">",r+n.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var N=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function k(t,o){let i=null;for(let r=o;r<t.length;r++){let e=t[r];if(i){if(e==="\\"){r++;continue}if(e===i)i=null;continue}if(e==='"'||e==="'"){i=e;continue}if(e===">")return r+1}return-1}function B(t,o,i){let r=o.toLowerCase(),e=1,n=i;while(n<t.length){let s=t.indexOf("<",n);if(s===-1)return-1;if(t.startsWith("<!--",s)){let f=t.indexOf("-->",s+4);n=f===-1?t.length:f+3;continue}let a=k(t,s+1);if(a===-1)return-1;let u=t.slice(s,a),c=u.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(e--,e===0)return a}else if(!/\/\s*>$/.test(u))e++}n=a}return-1}function Z(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[2].toLowerCase();if(u[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);e=s;continue}let f=/\/\s*>$/.test(a),d=i.length===0?a.match(r):null;if(d){let l=d[1]||d[2],h=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=f||N.has(c)?-1:B(t,c,s);if(S===-1)o.push({start:n,end:s,slotName:l,element:h}),e=s;else o.push({start:n,end:S,slotName:l,element:h+t.slice(s,S)}),e=S;continue}if(!f&&!N.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function L(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,e=0;while(e<t.length){let n=t.indexOf("<",e);if(n===-1)break;if(t.startsWith("<!--",n)){let l=t.indexOf("-->",n+4);e=l===-1?t.length:l+3;continue}let s=k(t,n+1);if(s===-1)break;let a=t.slice(n,s),u=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!u){e=s;continue}let c=u[1]==="/",f=u[2].toLowerCase();if(c){let l=i.lastIndexOf(f);if(l!==-1)i.splice(l);e=s;continue}if(f==="template"&&i.length===0){let l=a.match(r);if(l){let h=z(t,s);if(h!==-1){let S=l[1]||l[2]||l[3];o.push({start:n,end:h,slotName:S,content:t.slice(s,h-11).trim(),propsBinding:l[4]||void 0}),e=h;continue}}}if(!/\/\s*>$/.test(a)&&!N.has(f)){if(i.push(f),f==="script"||f==="style"){let l=t.toLowerCase().indexOf(`</${f}>`,s);if(l!==-1){e=l;continue}}}e=s}return o}function vu(t){let o={default:"",named:new Map},i=t,r=L(t);for(let n of r)o.named.set(n.slotName,{name:n.slotName,content:n.content,propsBinding:n.propsBinding});r.sort((n,s)=>s.start-n.start);for(let n of r)i=i.slice(0,n.start)+i.slice(n.end);let e=Z(i);for(let n of e){let s=o.named.get(n.slotName);if(s)s.content+=n.element;else o.named.set(n.slotName,{name:n.slotName,content:n.element})}for(let n=e.length-1;n>=0;n--){let s=e[n];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Jm(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},e=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,n;while((n=e.exec(t))!==null)r[n[1]]=n[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function xu(t,o,i,r){if(!t)return i;let e=t.content;if(t.propsBinding&&Object.keys(o).length>0){let n=t.propsBinding.trim(),s={...r},a=new Set,u=new Set;if(n.startsWith("{")&&n.endsWith("}")){let c=n.slice(1,-1).split(",").map((f)=>f.trim()).filter(Boolean);for(let f of c){let[d,l]=f.split(":").map((S)=>S.trim()),h=l||d;if(s[h]=o[d],o[d]!==void 0)u.add(h);else a.add(h)}}else if(s[n]=o,Object.values(o).some((c)=>c===void 0))a.add(n);else u.add(n);e=j(e,s,a,u)}return e}function j(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(e,n)=>{try{let s=n.trim();if(F(s,i))return e;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!F(s,r))return e;let a=_(s,o);if(a===void 0)return e;return g(String(a??""))}catch{return`{{ ${n} }}`}})}function _(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),e=o;for(let n of r)if(e&&typeof e==="object"&&n in e)e=e[n];else return;return e}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,e,n]=i,s=o[r],a=parseInt(n,10);if(typeof s==="number")switch(e){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!m(t))return;return p(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Su(t,o,i,r){let e=t;e=await I(e,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(a,u,c,f)=>{let d=o.named.get(u),l=f?.trim()||"",h=c||"",S={},E=[],C=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,b;while((b=C.exec(h))!==null){let w=b[1],x=b[2];S[w]=_(x,i),E.push([w,x])}if(r!==void 0&&d?.propsBinding&&Object.values(S).some((w)=>w===void 0)){let w=d.propsBinding.trim(),x=oe(`${w} in []`),y="__stx_slot_props";while(x.includes(y))y+="_";let M=E.map(([A,P])=>{let O=S[A],R;try{R=O===void 0?void 0:JSON.stringify(O)}catch{}return`${JSON.stringify(A)}:(${R??P})`}).join(","),v=g(JSON.stringify({binding:w,names:x,owner:r}));return`<template :for="${g(`${y} in [{${M}}]`)}" data-stx-slot-binding="${encodeURIComponent(w)}" data-stx-slot-scope="${v}">${d.content}</template>`}return await xu(d,S,l,i)});let s=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return e=e.replace(s,(a,u,c)=>{if(/\bname\s*=/.test(u||""))return a;let f=c?.trim()||"";return o.default||f}),e}async function I(t,o,i){let r=[],e=[];t.replace(o,(a,...u)=>{let c=u[u.length-2];return e.push({match:a,index:c}),r.push(i(a,...u.slice(0,-2))),a});let n=await Promise.all(r),s=t;for(let a=e.length-1;a>=0;a--){let{match:u,index:c}=e[a];s=s.slice(0,c)+n[a]+s.slice(c+u.length)}return s}function Ym(t){let o=vu(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Zm(t,o,i,r,e){return await Su(t,{default:o,named:i},r,e)}
|
|
3
|
+
export{vu,Jm,xu,Su,Ym,Zm};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{je}from"./chunk-ck4ypzet.js";import{C}from"./chunk-4b110x6r.js";import{D,zn}from"./chunk-phzhmnnm.js";import{A,ie}from"./chunk-fds6vvq0.js";import{a}from"./chunk-xfjp5q2m.js";import{$e,yn,bn,wn}from"./chunk-wk6g0b9h.js";import{Ot}from"./chunk-fwffn130.js";import{Rt,sr,un,ve}from"./chunk-jz37h2z0.js";import{I,rt}from"./chunk-e5rag6rh.js";import v from"fs";import b from"path";import x from"process";function U(s,o){for(let e of s.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(e[1])o.add(e[1]);for(let e of s.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let t of(e[1]??"").split(",")){let r=((t.includes(":")?t.split(":").pop():t)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(r))o.add(r)}for(let e of s.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let t of(e[1]??"").split(",")){let n=t.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(n))o.add(n)}}var h=new Map;async function O(s,o=I()){let e;if(s)e=b.resolve(s);else{let l=await a();e=b.resolve(l.root||x.cwd(),l.storesDir||"stores")}let t=`${e}\x00${bn()}\x00${o?"shared":"inline"}`,n=new Bun.Glob("*.ts"),r=[];try{for await(let l of n.scan({cwd:e,absolute:!0})){let c=b.basename(l,".ts");if(["index","types"].includes(c))continue;if(l.includes(".d.ts"))continue;r.push(l)}}catch{return ve(h,t,"",{chunks:[]}),null}let i=()=>[...new Set([...r,...r.flatMap((l)=>$e(l))])],f=Rt(i()),u=un(h,t,f);if(u!==void 0)return u.chunks.length>0?u:null;if(r.length===0)return ve(h,t,f,{chunks:[]}),null;let m=[];for(let l of r){let c=await Bun.file(l).text();m.push({file:l,hasUseStore:/useStore\s*\(/.test(c)})}m.sort((l,c)=>{if(l.hasUseStore===c.hasUseStore)return 0;return l.hasUseStore?1:-1});let p=m.map((l)=>l.file),g=[],d=ie({loader:"ts",target:"browser",define:A()});for(let l of p)try{let c=await Bun.file(l).text(),k=b.basename(l,".ts"),_=new Set;U(c,_);let y=[...c.matchAll(/\bdefineStore\s*(?:<[^>()]*>)?\(\s*(['"`])([^'"`$\\]+)\1/g)].map((N)=>N[2]),E=c.match(/\bdefineStore\s*(?:<[^>()]*>)?\(/g)?.length??0;if(yn(c))c=await wn(c,l,{projectRoot:x.cwd(),externalizeUserModules:o});c=Ot(c),c=D(c),c=zn(c),c=c.replace(/^export\s+(default\s+)?/gm,""),c=d.transformSync(c),g.push({name:k,ids:y.length===E?y:[],declared:_,code:`// Store: ${k}
|
|
3
3
|
${c.trim()}`})}catch(c){console.warn(`[stx] Failed to load store ${l}:`,c)}if(g.length===0)return ve(h,t,f,{chunks:[]}),null;f=Rt(i());let S={chunks:g};return ve(h,t,f,S),S}function R(s){let o=new Set;for(let r of s)for(let i of r.declared)o.add(i);let e=s.map((r)=>r.code).join(`
|
|
4
4
|
|
|
5
5
|
`),n=`;(function(){
|
|
@@ -7,12 +7,12 @@ var __stx = window.stx || {};
|
|
|
7
7
|
${C.filter((r)=>!o.has(r)&&new RegExp(`\\b${r}\\b`).test(e)).map((r)=>`var ${r} = __stx[${JSON.stringify(r)}];`).join(`
|
|
8
8
|
`)}
|
|
9
9
|
${e}
|
|
10
|
-
})();`;return I()?
|
|
10
|
+
})();`;return I()?rt(n):n}function B(s){let o=new Set;for(let e of s.matchAll(/^(?:export\s+)?(?:async\s+)?(?:const|let|var|function\*?|class)\s+([A-Z_a-z$][\w$]*)/gm))o.add(e[1]);for(let e of s.matchAll(/^(?:const|let|var)\s*[{[]([^=]*)[}\]]\s*=/gm))for(let t of(e[1]??"").split(",")){let n=(t.includes(":")?t.split(":").pop():t).replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(n))o.add(n)}return o}function j(s){let o=s.map((e)=>B(e.code));for(let[e,t]of s.entries()){let n=new Set;for(let[i,f]of o.entries()){if(i===e)continue;for(let u of f)if(!o[e].has(u)&&!t.declared.has(u))n.add(u)}if(n.size===0)continue;let r;try{r=je(t.code,n)}catch{r=new Set([...n].filter((i)=>new RegExp(`(?<![\\w$.])${i.replace(/\$/g,"\\$")}(?![\\w$])`).test(t.code)))}if(r.size>0)return null}return s.map((e,t)=>{let n=new Set([...e.declared,...o[t]]);return`function() {
|
|
11
11
|
var __stx = window.stx || {};
|
|
12
12
|
${C.filter((i)=>!n.has(i)&&new RegExp(`\\b${i}\\b`).test(e.code)).map((i)=>`var ${i} = __stx[${JSON.stringify(i)}];`).join(`
|
|
13
13
|
`)}
|
|
14
14
|
${e.code}
|
|
15
|
-
}`})}var M=new WeakMap;async function
|
|
15
|
+
}`})}var M=new WeakMap;async function Bh(s){let o=await O(s);if(!o)return null;let e=M.get(o);if(e===void 0)e=R(o.chunks),M.set(o,e);return e}function T(s){if(!/\buseStore\b/.test(s))return!1;if(/\buseStore\s+as\s+[A-Za-z_$]/.test(s))return!0;if(/\{[^{}]*\buseStore\s*:\s*[A-Za-z_$[{][^{}]*\}\s*=(?!=)/.test(s))return!0;if(/\[\s*(['"`])useStore\1\s*\]/.test(s.replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g," ")))return!0;let o=s.replace(/\/\*[\s\S]*?\*\//g," ").replace(/(^|[^:\\'"`])\/\/[^\n]*/g,"$1 ").replace(/\b(?:var|let|const)\s+useStore\s*=\s*[\w$.]*\[\s*(['"`])useStore\1\s*\]/g," ").replace(/\b(?:const|let|var)\s*\{[^{}]*\}\s*=/g," ").replace(/\bimport\s*(?:type\s+)?\{[^{}]*\}\s*from\b/g," ").replace(/\bexport\s*(?:type\s+)?\{[^{}]*\}/g," ").replace(/\btypeof\s+useStore\b/g," ").replace(/(['"`])useStore\1/g," ");for(let e of o.matchAll(/\buseStore\b/g)){let t=o.slice(Math.max(0,e.index-9),e.index);if(/\bfunction\s*$/.test(t))continue;let n=o.slice(e.index+8).trimStart();if(n.startsWith("(")||n.startsWith("<")||n.startsWith("?.("))continue;if(/^=(?![=>])/.test(n))continue;return!0}return!1}function Ho(...s){let o=new Set,e=!1;for(let t of s){if(!t)continue;if(/__STX_STORES__|\b_stores\b/.test(t))e=!0;if(T(t))e=!0;let n=t.match(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(/g)?.length??0;if(n===0)continue;let r=0;for(let i of t.matchAll(/\buseStore\s*(?:<[^>()]*>)?\s*(?:\?\.\s*)?\(\s*(['"`])([^'"`$\\]+)\1\s*[,)]/g))o.add(i[2]),r++;if(r!==n)e=!0}return{names:o,all:e}}var z=new Map;function Fh(s){let o=new Set,e=!1;for(let t of s){if(/\.(?:css|json|svg|wasm|png|jpe?g|gif|webp|avif|woff2?|ttf|txt|md)$/i.test(t))continue;let n;try{let r=v.statSync(t),i=z.get(t);if(i&&i.mtimeMs===r.mtimeMs&&i.size===r.size)n=i.read;else n=Ho(v.readFileSync(t,"utf8")),z.set(t,{mtimeMs:r.mtimeMs,size:r.size,read:n})}catch{n={names:new Set,all:!0}}if(n.all)e=!0;for(let r of n.names)o.add(r)}return{names:o,all:e}}function zh(s=x.env){return s.STX_PAGE_STORES==="all"}async function Hh(s,o,e={}){let t=await O(s,e.sharedModules);if(!t)return null;let{chunks:n}=t,r=Ho(...o);if(e.reads){if(e.reads.all)r.all=!0;for(let u of e.reads.names)r.names.add(u)}let i=e.runOnce?W(t):void 0,f;if(e.all||r.all||n.some((u)=>u.ids.length===0)||i===null)f=n;else{let u=new Map;for(let d of n)for(let S of d.ids)u.set(S,d);let m=new Set,p=[...r.names],g=!1;while(p.length>0&&!g){let d=u.get(p.pop());if(!d||m.has(d))continue;m.add(d);let S=Ho(d.code);if(S.all)g=!0;else p.push(...S.names)}f=g?n:n.filter((d)=>m.has(d))}if(f.length===0)return null;if(i){let u=f.map((d)=>i.get(d)),m=f.map((d)=>d.name),p=F.get(t);if(!p)F.set(t,p=new Map);let g=p.get(m.join("\x00"));if(g===void 0)p.set(m.join("\x00"),g=Z(m,u));return{code:g,stores:m,functions:u}}return{code:R(f),stores:f.map((u)=>u.name),functions:j(f)}}var F=new WeakMap,w=new WeakMap;function W(s){if(w.has(s))return w.get(s);let o=j(s.chunks),e=o?new Map(s.chunks.map((t,n)=>[t,o[n]])):null;return w.set(s,e),e}function Z(s,o){let t=`;(function(){
|
|
16
16
|
var ran = window.__stxStoreFiles || (window.__stxStoreFiles = {});
|
|
17
17
|
function run(name, define) {
|
|
18
18
|
if (ran[name]) return;
|
|
@@ -22,5 +22,5 @@ function run(name, define) {
|
|
|
22
22
|
}
|
|
23
23
|
${s.map((n,r)=>`run(${JSON.stringify(n)}, ${o[r]})`).join(`;
|
|
24
24
|
`)};
|
|
25
|
-
})();`;return I()?
|
|
26
|
-
export{
|
|
25
|
+
})();`;return I()?rt(t):t}function Uh(){h.clear(),sr()}
|
|
26
|
+
export{Bh,Ho,Fh,zh,Hh,Uh};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Ma,Om,jo,Nm,hu,yu,Mm,Dm}from"./chunk-afmmrqee.js";import"./chunk-wna2herj.js";import"./chunk-wk6g0b9h.js";import"./chunk-p3et6xjr.js";import"./chunk-cwcmmgvz.js";import"./chunk-fwffn130.js";import"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import{_e,so}from"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Ma as buildScriptVirtualFile,Om as buildVirtualSource,_e as extractScriptBlocks,so as extractTemplateExpressions,hu as findRuntimeTypeDeclarations,yu as findStxModuleDeclarations,Dm as formatTypecheckDiagnostics,Nm as sourcePathFor,Mm as typecheckStxFiles,jo as virtualPathFor};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{ec,tc,nc,rc,ry}from"./chunk-5m4zgt4m.js";import"./chunk-wbsbrm6n.js";import"./chunk-zcwx8z8z.js";import"./chunk-0vyytd9v.js";import"./chunk-jj78m9k1.js";import"./chunk-e4tbq8a0.js";import"./chunk-qvj0bzw5.js";import"./chunk-fs43342z.js";import"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-w1pga3s6.js";import"./chunk-9bexzgws.js";import"./chunk-fwffn130.js";import"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import"./chunk-xpcqyzdc.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{ec as buildNative,ry as default,tc as findCraftBinary,rc as getAvailableFormats,nc as getAvailableTargets};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Oe,Vi,Wi,Fg,Gt,_l,zg,Cl,Py,Ge,In,Je}from"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import{Hl,t}from"./chunk-ahf9j8wb.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Oe as BROWSER_CORE_IMPORTS,Fg as STX_AUTO_IMPORTS,Vi as extractAndStripCssImports,Ge as extractBridgeData,Hl as findInterpolationEnd,Cl as generateAutoImportDestructuring,Py as generateBrowserAutoImportDestructuring,In as generateServerDataBridge,Gt as injectBrowserCoreAutoImports,Je as processClientScript,zg as referencesName,Wi as renderVendorStyleTags,t as stripCommentsAndLiterals,_l as transformAutoImports};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import l from"fs";import u from"path";var m=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useModel)\s*(?:<[^<>()]*>)?\s*\(/,g=/(?:^|\n)\s*(?:import|export)\s+(?:[^'"]*?\sfrom\s+)?['"](\.[^'"]*)['"]/g,b=["",".ts",".tsx",".js",".jsx",".mts",".mjs","/index.ts","/index.js"],x=3;function h(e,t){let r=u.resolve(u.dirname(t),e);for(let o of b){let s=r+o;try{if(l.statSync(s).isFile())return s}catch{}}return null}function
|
|
3
|
-
export{
|
|
2
|
+
import l from"fs";import u from"path";var m=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useModel)\s*(?:<[^<>()]*>)?\s*\(/,g=/(?:^|\n)\s*(?:import|export)\s+(?:[^'"]*?\sfrom\s+)?['"](\.[^'"]*)['"]/g,b=["",".ts",".tsx",".js",".jsx",".mts",".mjs","/index.ts","/index.js"],x=3;function h(e,t){let r=u.resolve(u.dirname(t),e);for(let o of b){let s=r+o;try{if(l.statSync(s).isFile())return s}catch{}}return null}function Zr(e,t,r=0,o=new Set){if(!t||r>=x)return!1;for(let s of e.matchAll(g)){let n=h(s[1],t);if(!n||o.has(n))continue;o.add(n);let i;try{i=l.readFileSync(n,"utf8")}catch{continue}if(m.test(i))return!0;if(Zr(i,n,r+1,o))return!0}return!1}var C=["batch","cachedQuery","clearServerData","computed","configureFetch","defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","defineStore","derived","effect","flushKeptState","forgetKeptState","goBack","goForward","inject","invalidateRoute","isDerived","isSignal","keptState","memo","navigate","nextTick","onBeforeMount","onBeforeUnmount","onDestroy","onMount","onMounted","onUnmounted","peek","provide","reactive","ref","refDebounced","refresh","registerStoresClient","setKeptScope","setRouteParams","sharedRequest","state","untrack","useAsync","useBroadcastStream","useClickOutside","useColorMode","useCookie","useCounter","useDark","useDebounce","useDebounceFn","useDebouncedValue","useDocumentVisibility","useEventListener","useFetch","useFocus","useHead","useId","useInterval","useLocalStorage","useMediaQuery","useModel","useMutation","useNativeDesktop","useOptimistic","usePreferredContrast","usePreferredDark","usePreferredLight","usePreferredReducedMotion","useQuery","useReactiveProp","useRef","useRoute","useRouteParam","useRouteParams","useScrollLock","useSearchParams","useSeoMeta","useSessionStorage","useSlots","useStore","useThrottle","useThrottleFn","useTimeout","useTimeoutFn","useToggle","useWebSocket","watch","watchEffect","watchMultiple","withDefaults"],Ul=["onMount","onDestroy"];function vt(e="const",t=[],r){let o=t.length?C.filter((s)=>!t.includes(s)):C;if(r!==void 0)o=o.filter((s)=>{let n=s.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(^|[^\\w$])${n}(?![\\w$])`).test(r)});return`${e} { ${o.join(", ")} } = window.stx;`}var y=["defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","withDefaults"];var S=C.filter((e)=>!y.includes(e));function oa(e){if(!e)return!1;return S.some((t)=>new RegExp(`\\b${t}\\s*(?:<[^>]*>)?\\s*\\(`).test(e))}var v=[/@if\s*=/,/@for\s*=/,/@show\s*=/,/@model\s*=/,/@bind:/,/@class\s*=/,/@style\s*=/,/\bx-data\s*=/,/\bstate\s*(?:<[^>]*>)?\s*\(/,/\bderived\s*(?:<[^>]*>)?\s*\(/,/\beffect\s*(?:<[^>]*>)?\s*\(/,/\bref\s*(?:<[^>]*>)?\s*\(/,/\bcomputed\s*(?:<[^>]*>)?\s*\(/,/\breactive\s*(?:<[^>]*>)?\s*\(/,/\bwatch\s*(?:<[^>]*>)?\s*\(/,/\bwatchEffect\s*(?:<[^>]*>)?\s*\(/,/\s:[a-z][\w-]*\s*=\s*["']/i,/\s:(?:if|else-if|else|for|show|text|html|model)\s*=/,/data-stx(?:-auto)?(?![-\w])/,/data-stx-scoped/],E=/\s@[a-z][\w.:-]*\s*=/i;function Vl(e,t){if(!e)return!1;let r=f(e);return d(r,t)}function d(e,t){if(v.some((r)=>r.test(e)))return!0;if(oa(e))return!0;return T(e,t)}function T(e,t){if(!t)return!1;for(let r of e.matchAll(/<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script\s*>/gi))if(Zr(r[1],t))return!0;return!1}function Wl(e,t){if(!e)return!1;let r=f(e);return E.test(r)||d(r,t)}var R=["if","else-if","elseif","else","for","show","key","text","html","model","ref"];function ql(e){return R.includes(e.toLowerCase())}var So=["x-text","x-html","x-model","x-show","x-if","x-for","x-cloak","x-ref","x-data","x-bind","x-class","x-style","x-tooltip","x-tooltip-position"],_=["x-init","x-transition","x-effect","x-on"],Kl=[...So,..._];function Xl(){return`{${So.map((e)=>`'${e}':1`).join(",")}}`}var ia=["class","style","text","html","show","model","if","ref"];function Gl(){return`{${ia.map((e)=>e==="if"?"'if':1":`${e}:1`).join(",")}}`}var p=["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","keydown","keyup","keypress","input","change","submit","focus","blur","scroll","resize","touchstart","touchend","touchmove","contextmenu","wheel","pointerdown","pointerup","pointermove"];function Jl(){return`/^(${p.join("|")})(?:\\.|$)/`}function Yl(e){return p.some((t)=>e===t||e.startsWith(`${t}.`))}var w=65536,A=4,c=new Map;function f(e){if(!e)return e;if(!e.includes("<!--")&&!/<(?:pre|code)\b/i.test(e))return e;let t=e.length>=w;if(t){let s=c.get(e);if(s!==void 0)return s}let r=(s)=>s.replace(/(<[^>]*>)|([^<]+)/g,(n,i,a)=>i??" ".repeat(a.length)),o=e.replace(/(<pre\b[^>]*>)([\s\S]*?)(<\/pre>)/gi,(s,n,i,a)=>n+r(i)+a).replace(/(<code\b[^>]*>)([\s\S]*?)(<\/code>)/gi,(s,n,i,a)=>n+r(i)+a).replace(/<!--[\s\S]*?-->/g,(s)=>" ".repeat(s.length));if(t){while(c.size>=A){let s=c.keys().next();if(s.done)break;c.delete(s.value)}c.set(e,o)}return o}
|
|
3
|
+
export{Zr,C,Ul,vt,oa,Vl,Wl,ql,So,Kl,Xl,ia,Gl,Jl,Yl};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{mh,Ka,Uu,hh,yh,bh,wh,vh,Vu,Wu,xh,Sh,kh,_h}from"./chunk-yqs88qj4.js";import"./chunk-jj78m9k1.js";import"./chunk-e4tbq8a0.js";import"./chunk-qvj0bzw5.js";import"./chunk-fs43342z.js";import"./chunk-exc8y30f.js";import"./chunk-257msenj.js";import"./chunk-w1pga3s6.js";import"./chunk-9bexzgws.js";import"./chunk-fwffn130.js";import"./chunk-nzqr3w35.js";import"./chunk-v0yay1kw.js";import"./chunk-xpcqyzdc.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Uu as SUSPENSE_RESOLVER_RUNTIME,Ka as buildSuspenseResolveScript,vh as createStreamRenderer,bh as extractStreamBoundaries,_h as generateHydrationRuntime,Wu as islandDirective,Sh as processSectionDirectives,yh as processStreamDirectives,xh as registerStreamingDirectives,hh as renderStreamingPage,mh as streamTemplate,wh as streamTemplateSimple,kh as streamToResponse,Vu as streamingSuspenseDirective};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Qf,eg,$e,tg,Rc,mn,hn,sy,Ac,yn,hr,ng,rg,sg,Cs,og,ig,Pc,bn,ag,wn,Ic,oy}from"./chunk-wk6g0b9h.js";import"./chunk-p3et6xjr.js";import"./chunk-cwcmmgvz.js";import"./chunk-13awnyq0.js";import"./chunk-xfjp5q2m.js";import"./chunk-6qgrr453.js";import"./chunk-razwegar.js";import"./chunk-mpfm5ctr.js";import"./chunk-eca022er.js";import"./chunk-b234w3mf.js";import"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{hr as MODULE_SPECIFIER_PREFIX,Pc as assertBundleBuildCanSettle,Qf as bundleCacheDir,eg as bundleCacheEntryLimit,oy as bundleClientEntriesSplit,wn as bundleClientScript,hn as clearBundleFailures,$e as clientBundleDependencies,mn as getBundleFailures,yn as hasUserImports,ig as isWithinBundlerCallback,bn as moduleSubstitutionKey,rg as normalizeRegistrySpecifiers,ag as queueClientBundleBuild,Rc as recordBundleFailure,ng as registryIdForPath,Ac as resolveBundlerFallback,sg as rewriteRegistryImports,sy as setBundlerFallbackMode,tg as shouldLogBundlerDiagnostics,Ic as tempBuildName,Cs as withModuleSubstitutes,og as withinBundlerCallback};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{vu,Jm,xu,Su,Ym,Zm}from"./chunk-3yr0wyc9.js";import"./chunk-fds6vvq0.js";import"./chunk-ab1z38gj.js";import"./chunk-w98yt4d4.js";import"./chunk-c08jvjqt.js";import"./chunk-phzhmnnm.js";import"./chunk-ck4ypzet.js";import"./chunk-0jdz31q1.js";import"./chunk-4b110x6r.js";export{Zm as applySlots,Ym as extractSlotContent,Jm as parseSlotElement,vu as parseSlots,Su as processSlots,xu as renderSlot};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function
|
|
3
|
-
export{kt,_t
|
|
2
|
+
import c from"path";var s=[{label:"Mobile (Small)",width:320,height:568},{label:"Mobile (Medium)",width:375,height:667},{label:"Mobile (Large)",width:414,height:896},{label:"Tablet",width:768,height:1024},{label:"Laptop",width:1024},{label:"Desktop",width:1280},{label:"Desktop (Large)",width:1920}],n=[{label:"Transparent",color:"transparent",contrastColor:"#333"},{label:"White",color:"#ffffff",contrastColor:"#333"},{label:"Light Gray",color:"#f5f5f5",contrastColor:"#333"},{label:"Dark Gray",color:"#333333",contrastColor:"#fff"},{label:"Black",color:"#000000",contrastColor:"#fff"}],i={file:"title",order:"asc",groups:[]},d={enabled:!0,outDir:".stx/dist/story",storyMatch:["**/*.story.stx"],storyIgnored:["**/node_modules/**","**/dist/**","**/.stx/**"],tree:i,theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark"},responsivePresets:s,backgroundPresets:n,autoApplyContrastColor:!1,port:6006};function l(e){let t={...d,...e};return{enabled:t.enabled??!0,outDir:t.outDir??".stx/dist/story",storyMatch:t.storyMatch??["**/*.story.stx"],storyIgnored:t.storyIgnored??["**/node_modules/**","**/dist/**","**/.stx/**"],tree:{...i,...t.tree},theme:{title:"STX Components",defaultColorScheme:"auto",darkClass:"dark",...t.theme},responsivePresets:t.responsivePresets??s,backgroundPresets:t.backgroundPresets??n,autoApplyContrastColor:t.autoApplyContrastColor??!1,setupFile:t.setupFile,port:t.port??6006}}async function St(e){let t=e.root??process.cwd(),o;try{let r=await import(c.join(t,"stx.config.ts"));o=(r.default||r).story}catch{}let a={...o,...e.config},f=l(a);return{root:t,config:f,storyFiles:[],tree:void 0,mode:e.mode}}function kt(e,t){e.storyFiles=t}function _t(e,t){e.tree=t}
|
|
3
|
+
export{St,kt,_t};
|