@stacksjs/stx 0.2.467 → 0.2.469
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-2jbyks2t.js → chunk-01nx6zcw.js} +2 -2
- package/dist/{chunk-v3yqeh15.js → chunk-04qmr675.js} +2 -2
- package/dist/chunk-07mksefx.js +2 -0
- package/dist/chunk-129ernx4.js +2 -0
- package/dist/{chunk-y8923540.js → chunk-151d1av1.js} +5 -5
- package/dist/{chunk-k9sbgax8.js → chunk-2542vq5p.js} +1 -1
- package/dist/{chunk-e15a8txv.js → chunk-27kb6nrb.js} +2 -2
- package/dist/{chunk-z80d9dd2.js → chunk-28s5x7wv.js} +2 -2
- package/dist/chunk-29pn79t5.js +3 -0
- package/dist/{chunk-5j5msbks.js → chunk-2gmbxp60.js} +3 -3
- package/dist/chunk-2njt4vbe.js +2 -0
- package/dist/{chunk-6h93aacc.js → chunk-2swdrsrq.js} +2 -2
- package/dist/{chunk-tpvc8xnk.js → chunk-33gkx5z1.js} +7 -7
- package/dist/{chunk-d3mpxr3s.js → chunk-33h9ggbz.js} +4 -4
- package/dist/{chunk-bddjx2a2.js → chunk-3fjpg8kb.js} +3 -3
- package/dist/chunk-3gbjppvg.js +2 -0
- package/dist/{chunk-9fr19qe4.js → chunk-3pv6f998.js} +2 -2
- package/dist/chunk-3w22gpa9.js +2 -0
- package/dist/chunk-3ztpcnga.js +2 -0
- package/dist/chunk-4aw47rmg.js +2 -0
- package/dist/{chunk-90drf2ag.js → chunk-4ebwk9cw.js} +2 -2
- package/dist/chunk-50vq8k55.js +2 -0
- package/dist/chunk-549wm9qp.js +2 -0
- package/dist/chunk-5jak1hxp.js +2 -0
- package/dist/{chunk-n4wfef43.js → chunk-5rvbpmzc.js} +3 -3
- package/dist/chunk-5sb7gw66.js +2 -0
- package/dist/{chunk-9pt8fd2n.js → chunk-5t5ahhjp.js} +3 -3
- package/dist/{chunk-a8q8m5pp.js → chunk-5x9ftmve.js} +2 -2
- package/dist/chunk-5y4qxmaw.js +2 -0
- package/dist/{chunk-pbh4smw3.js → chunk-7ejq9n1v.js} +4 -4
- package/dist/{chunk-r80km6mn.js → chunk-7grtpdw5.js} +2 -2
- package/dist/chunk-7mh0fnrq.js +2 -0
- package/dist/chunk-7ppykfx2.js +2 -0
- package/dist/{chunk-14vnnx44.js → chunk-80hpdc22.js} +2 -2
- package/dist/chunk-81nqrcn0.js +4 -0
- package/dist/chunk-82nw3942.js +2 -0
- package/dist/{chunk-d2zw2e5m.js → chunk-8adstrk5.js} +3 -3
- package/dist/chunk-8h2adg8c.js +2 -0
- package/dist/{chunk-c2s3xx78.js → chunk-8h8pf1cj.js} +5 -5
- package/dist/chunk-8mxjd1ge.js +2 -0
- package/dist/{chunk-0v5dpk7r.js → chunk-8rx2v7zj.js} +1 -1
- package/dist/chunk-8scw1bes.js +4 -0
- package/dist/{chunk-w5m8xrs4.js → chunk-8xcg2dqy.js} +2 -2
- package/dist/{chunk-zydg3wgt.js → chunk-99kt56fn.js} +2 -2
- package/dist/chunk-9h1kq4hv.js +2 -0
- package/dist/chunk-9kzk7zyy.js +2 -0
- package/dist/chunk-9rpw3gqx.js +2 -0
- package/dist/{chunk-0gq32mfe.js → chunk-a0jyh65n.js} +5 -5
- package/dist/chunk-a6s6hvcd.js +2 -0
- package/dist/{chunk-ynvce0q6.js → chunk-ab7vh24b.js} +5 -5
- package/dist/{chunk-cmej3vrr.js → chunk-ah4qyrnn.js} +1 -1
- package/dist/{chunk-m08fk6ds.js → chunk-ak95401g.js} +4 -4
- package/dist/chunk-awsg50kd.js +2 -0
- package/dist/chunk-ax1xbz1k.js +2 -0
- package/dist/{chunk-ptek61ts.js → chunk-bqx3dqv1.js} +1 -1
- package/dist/{chunk-qxre7vw6.js → chunk-bvhr055w.js} +2 -2
- package/dist/chunk-bw0gkfb3.js +2 -0
- package/dist/{chunk-762z26nw.js → chunk-c9fj7t9b.js} +1 -1
- package/dist/{chunk-fh1qrp68.js → chunk-cgf2a166.js} +5 -5
- package/dist/chunk-cjb46akr.js +2 -0
- package/dist/{chunk-ee0gqprs.js → chunk-cnxf8e5p.js} +2 -2
- package/dist/{chunk-01zwbzyw.js → chunk-cwzkq9bs.js} +6 -6
- package/dist/{chunk-2cqymwe8.js → chunk-cxbp2m66.js} +4 -4
- package/dist/chunk-db2sy0f3.js +2 -0
- package/dist/chunk-dts9z53c.js +2 -0
- package/dist/chunk-eev60q15.js +2 -0
- package/dist/chunk-fe5xht52.js +2 -0
- package/dist/chunk-fqhewm3t.js +2 -0
- package/dist/chunk-g1562mcs.js +2 -0
- package/dist/chunk-g3xgcnh4.js +2 -0
- package/dist/chunk-g4dmjede.js +15 -0
- package/dist/{chunk-7rgds0w1.js → chunk-ggde5cqk.js} +34 -34
- package/dist/{chunk-rgwvqmhh.js → chunk-gkj42zq7.js} +2 -2
- package/dist/{chunk-hpm19gkn.js → chunk-gxbd7pwn.js} +3 -3
- package/dist/chunk-hgcvtfnz.js +2 -0
- package/dist/{chunk-m62a5a28.js → chunk-hhy33p5v.js} +6 -6
- package/dist/{chunk-f4c39nfh.js → chunk-j2zgh5yk.js} +2 -2
- package/dist/chunk-j338fs8k.js +2 -0
- package/dist/{chunk-0trfbqa7.js → chunk-j4afmryj.js} +4 -4
- package/dist/{chunk-vxsm8q1c.js → chunk-jjebxeee.js} +5 -5
- package/dist/{chunk-t1py7rbg.js → chunk-k4shjm8n.js} +5 -5
- package/dist/chunk-k84qkm21.js +2 -0
- package/dist/chunk-kk5cyjfs.js +3 -0
- package/dist/{chunk-vg7wfkt5.js → chunk-kp5tv8jx.js} +2 -2
- package/dist/chunk-kyd15xqj.js +2 -0
- package/dist/chunk-m5asyydz.js +2 -0
- package/dist/chunk-m5dgc757.js +2 -0
- package/dist/chunk-m6cfxjyy.js +2 -0
- package/dist/chunk-m8w4hve0.js +2 -0
- package/dist/chunk-mmh37ywa.js +2 -0
- package/dist/{chunk-v0vadrje.js → chunk-mqdnfn4h.js} +3 -3
- package/dist/chunk-ms5aj58v.js +2 -0
- package/dist/chunk-n454sydr.js +2 -0
- package/dist/{chunk-62ckway4.js → chunk-n8y0hp9b.js} +2 -2
- package/dist/chunk-nskfyvbv.js +2 -0
- package/dist/{chunk-jz7pvh7b.js → chunk-pcq6vphz.js} +2 -2
- package/dist/chunk-pt566gqb.js +2 -0
- package/dist/chunk-q0w6a9hv.js +2 -0
- package/dist/chunk-q9yhnqe5.js +2 -0
- package/dist/chunk-qtsymvxx.js +2 -0
- package/dist/chunk-rkzvmk04.js +2 -0
- package/dist/chunk-rx6a75yf.js +2 -0
- package/dist/{chunk-y36av1ac.js → chunk-s10r6hxp.js} +7 -7
- package/dist/{chunk-hh7r7zpe.js → chunk-s23ka56m.js} +10 -10
- package/dist/{chunk-zasd9166.js → chunk-sarr8kz1.js} +6 -6
- package/dist/chunk-se4b8sjc.js +2 -0
- package/dist/{chunk-1k01h1zb.js → chunk-se55qe2x.js} +1 -1
- package/dist/{chunk-0nnmk0xv.js → chunk-ss7wapbh.js} +187 -187
- package/dist/chunk-st1s30tn.js +2 -0
- package/dist/chunk-t4rgn046.js +2 -0
- package/dist/{chunk-4r2fg64t.js → chunk-t794av8e.js} +2 -2
- package/dist/{chunk-2tn3dkcy.js → chunk-t7s0pdtw.js} +3 -3
- package/dist/{chunk-v83bpj84.js → chunk-tbef3yyk.js} +4 -4
- package/dist/{chunk-fqpd0cfq.js → chunk-tdsajnjm.js} +3 -3
- package/dist/{chunk-ery19t9s.js → chunk-tr25zcf1.js} +9 -9
- package/dist/chunk-tr3e1qzf.js +2 -0
- package/dist/{chunk-amd6ey3t.js → chunk-v5rgebzz.js} +5 -5
- package/dist/chunk-v7ahbhbd.js +2 -0
- package/dist/chunk-vr4t7exr.js +2 -0
- package/dist/{chunk-2bdthb37.js → chunk-vvs75dse.js} +2 -2
- package/dist/chunk-w0vrmvh7.js +2 -0
- package/dist/{chunk-7h57dt0z.js → chunk-w6n2j62h.js} +3 -3
- package/dist/{chunk-2n5pjbw9.js → chunk-wkc34drs.js} +2 -2
- package/dist/{chunk-88px183j.js → chunk-x0mc2kv0.js} +4 -4
- package/dist/{chunk-8efg91ak.js → chunk-xnjcmhs5.js} +2 -2
- package/dist/chunk-yed9c66h.js +2 -0
- package/dist/{chunk-s0xpe9cj.js → chunk-ykqq6cw0.js} +11 -11
- package/dist/chunk-zb5p05v4.js +2 -0
- package/dist/{chunk-544e2jvd.js → chunk-zkg0rbmp.js} +6 -6
- package/dist/{chunk-1sdtg9np.js → chunk-zpcxx4pp.js} +2 -2
- package/dist/cli.js +19 -19
- package/dist/client-module-registry.js +6 -3
- package/dist/client-script-bundler.d.ts +10 -0
- package/dist/client-script-bundler.js +3 -3
- package/dist/craft-entry.js +2 -2
- package/dist/craft.js +2 -2
- package/dist/pwa.js +3 -3
- package/dist/ssg.js +3 -3
- package/package.json +5 -5
- package/dist/chunk-01jqpwpv.js +0 -2
- package/dist/chunk-02e24cym.js +0 -2
- package/dist/chunk-1mfggkga.js +0 -2
- package/dist/chunk-22972c8b.js +0 -2
- package/dist/chunk-2hddf9pn.js +0 -2
- package/dist/chunk-2k0x6yc2.js +0 -2
- package/dist/chunk-3ar8gdyd.js +0 -2
- package/dist/chunk-3q2z7cts.js +0 -2
- package/dist/chunk-4ahzhnfw.js +0 -2
- package/dist/chunk-4qv9me8f.js +0 -2
- package/dist/chunk-4rj1y6j2.js +0 -2
- package/dist/chunk-50xcmvad.js +0 -2
- package/dist/chunk-5127n7rc.js +0 -2
- package/dist/chunk-5564cka1.js +0 -2
- package/dist/chunk-58n62bxb.js +0 -3
- package/dist/chunk-60935ydz.js +0 -2
- package/dist/chunk-63kwa14j.js +0 -2
- package/dist/chunk-6876vczs.js +0 -2
- package/dist/chunk-7fjatz47.js +0 -2
- package/dist/chunk-7j1cpa9d.js +0 -2
- package/dist/chunk-7tt84v1y.js +0 -3
- package/dist/chunk-9mnfma5c.js +0 -2
- package/dist/chunk-9zx4p42m.js +0 -2
- package/dist/chunk-a32kqsff.js +0 -2
- package/dist/chunk-b772p9d9.js +0 -2
- package/dist/chunk-cfk3skk4.js +0 -2
- package/dist/chunk-dv4g1506.js +0 -2
- package/dist/chunk-ehwzvs2d.js +0 -2
- package/dist/chunk-gp4x34wk.js +0 -2
- package/dist/chunk-h4g5m641.js +0 -2
- package/dist/chunk-ha5z623e.js +0 -2
- package/dist/chunk-hqzq3a61.js +0 -2
- package/dist/chunk-hvx3pc13.js +0 -2
- package/dist/chunk-j9aberz0.js +0 -2
- package/dist/chunk-j9qcrwbg.js +0 -2
- package/dist/chunk-jmabeqfq.js +0 -2
- package/dist/chunk-jqppdrhr.js +0 -2
- package/dist/chunk-k2vcwa7m.js +0 -2
- package/dist/chunk-kw1p1140.js +0 -2
- package/dist/chunk-mhfwdyeg.js +0 -2
- package/dist/chunk-pypadz0a.js +0 -2
- package/dist/chunk-q7qchkvk.js +0 -2
- package/dist/chunk-qyq7j8hp.js +0 -2
- package/dist/chunk-r7a26zjz.js +0 -2
- package/dist/chunk-rcez4f14.js +0 -2
- package/dist/chunk-rz7xew70.js +0 -2
- package/dist/chunk-s6jh1701.js +0 -2
- package/dist/chunk-sjha9z8e.js +0 -2
- package/dist/chunk-tg39b5t1.js +0 -2
- package/dist/chunk-tmbytj7c.js +0 -2
- package/dist/chunk-vqdqf0cp.js +0 -17
- package/dist/chunk-w1vvzdp0.js +0 -2
- package/dist/chunk-wsftz3vj.js +0 -2
- package/dist/chunk-xf4s69fr.js +0 -4
- package/dist/chunk-xjb0yzvq.js +0 -2
- package/dist/chunk-xq4x3cy0.js +0 -2
- package/dist/chunk-ydjfar14.js +0 -2
- package/dist/chunk-ymk7eswy.js +0 -2
- package/dist/chunk-yq2mckms.js +0 -2
- package/dist/chunk-z990jtmx.js +0 -2
- package/dist/chunk-zak38e27.js +0 -2
- package/dist/chunk-zmcvjkpv.js +0 -2
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
3
|
-
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-
|
|
2
|
+
import{In,De,Mo,Na}from"./chunk-33h9ggbz.js";import{Pn,zr,Da,Oa,Ma}from"./chunk-33gkx5z1.js";import{Io,Do,Oo,Pa,Ia}from"./chunk-04qmr675.js";import{oe,ft,Hr}from"./chunk-kp5tv8jx.js";import{Bc,Fc,zc,Hc,dr,id}from"./chunk-27kb6nrb.js";import B from"fs";import w from"path";import O from"fs";import u from"path";var v=[72,96,128,144,152,192,384,512],S=[120,152,167,180],P=[16,32];async function M(n,t){let e={success:!0,generatedFiles:[],errors:[],warnings:[]},r=n.pwa?.icons;if(!r?.src)return e.errors.push("No source icon specified in pwa.icons.src"),e.success=!1,e;let o=u.isAbsolute(r.src)?r.src:u.resolve(process.cwd(),r.src);if(!await Bun.file(o).exists())return e.errors.push(`Source icon not found: ${o}`),e.success=!1,e;let a=u.resolve(t,r.outputDir||"pwa-icons");try{O.mkdirSync(a,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${a}`),e.success=!1,e}let s=r.sizes||v,l=r.generateWebP??!0,p=r.generateAppleIcons??!0;try{let c;try{c=await import("sharp")}catch{return e.errors.push(`sharp is not installed. Install it with: bun add sharp
|
|
3
|
+
Icon generation requires the sharp package for image processing.`),e.success=!1,e}let g=await c.default(o).metadata();if(g.width&&g.width<512)e.warnings.push(`Source icon is ${g.width}x${g.height}. Recommend using at least 512x512 for best quality.`);for(let i of s){let d=u.join(a,`icon-${i}x${i}.png`);if(await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d),l){let x=u.join(a,`icon-${i}x${i}.webp`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).webp({quality:90}).toFile(x),e.generatedFiles.push(x)}}if(p){for(let d of S){let x=u.join(a,`apple-touch-icon-${d}x${d}.png`);await c.default(o).resize(d,d,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(x),e.generatedFiles.push(x)}let i=u.join(a,"apple-touch-icon.png");await c.default(o).resize(180,180,{fit:"contain",background:{r:255,g:255,b:255,alpha:1}}).png().toFile(i),e.generatedFiles.push(i)}for(let i of P){let d=u.join(a,`favicon-${i}x${i}.png`);await c.default(o).resize(i,i,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).png().toFile(d),e.generatedFiles.push(d)}let f=512,y=u.join(a,`icon-maskable-${f}x${f}.png`),m=Math.floor(f*0.1),k=f-m*2;await c.default(o).resize(k,k,{fit:"contain",background:{r:0,g:0,b:0,alpha:0}}).extend({top:m,bottom:m,left:m,right:m,background:{r:255,g:255,b:255,alpha:1}}).png().toFile(y),e.generatedFiles.push(y)}catch(c){let h=c instanceof Error?c.message:String(c);e.errors.push(`Icon generation failed: ${h}`),e.success=!1}return e}function N(n){let t=n.sizes||v,e=n.outputDir?`/${n.outputDir}`:"/pwa-icons",r=n.generateWebP??!0,o=n.generateAppleIcons??!0,a=[];for(let s of t)if(a.push(`${e}/icon-${s}x${s}.png`),r)a.push(`${e}/icon-${s}x${s}.webp`);if(o){a.push(`${e}/apple-touch-icon.png`);for(let s of S)a.push(`${e}/apple-touch-icon-${s}x${s}.png`)}for(let s of P)a.push(`${e}/favicon-${s}x${s}.png`);return a.push(`${e}/icon-maskable-512x512.png`),a}async function I(){try{return await import("sharp"),!0}catch{return!1}}function A(n,t,e,r){let o=[],a=r.join(" ");for(let s of n)if(o.push({src:`${t}/icon-${s}x${s}.png`,sizes:`${s}x${s}`,type:"image/png",purpose:a}),e)o.push({src:`${t}/icon-${s}x${s}.webp`,sizes:`${s}x${s}`,type:"image/webp",purpose:a});return o}function C(n){return n.map((t)=>({name:t.name,short_name:t.shortName,description:t.description,url:t.url,icons:t.icons?.map((e)=>({src:e.src,sizes:e.sizes,type:e.type}))}))}function T(n){let t=n.pwa?.shareTarget;if(!t?.enabled)return;let e={action:t.action||"/share",method:t.method||"POST",enctype:t.enctype||"multipart/form-data",params:{title:t.params?.title||"title",text:t.params?.text||"text",url:t.params?.url||"url"}};if(t.acceptFiles&&t.acceptFiles.length>0)e.params.files=t.acceptFiles.map((r)=>({name:r.name,accept:r.accept}));return e}function H(n){let t=n.pwa?.fileHandlers;if(!t?.enabled||!t.accept)return;let e=[{action:t.action||"/",accept:t.accept,launch_type:t.launchType||"single-client"}];if(t.icons)e[0].icons=t.icons.map((r)=>({src:r.src,sizes:r.sizes,type:r.type}));return e}function W(n){let t=n.pwa?.protocolHandlers;if(!t||t.length===0)return;return t.map((e)=>({protocol:e.protocol,url:e.url}))}function j(n){let t=n.pwa;if(!t?.enabled||!t.manifest)return null;let{manifest:e,icons:r}=t,o=r?.sizes||[72,96,128,144,152,192,384,512],a=r?.outputDir?`/${r.outputDir}`:"/pwa-icons",s=r?.generateWebP??!0,l=r?.purpose||["any","maskable"],p={name:e.name,short_name:e.shortName||e.name,description:e.description,start_url:e.startUrl||"/",display:e.display||"standalone",display_override:e.displayOverride,orientation:e.orientation,theme_color:e.themeColor,background_color:e.backgroundColor,scope:e.scope||"/",lang:e.lang,dir:e.dir,id:e.id,categories:e.categories,icons:A(o,a,s,l)};if(e.shortcuts&&e.shortcuts.length>0)p.shortcuts=C(e.shortcuts);if(e.screenshots&&e.screenshots.length>0)p.screenshots=e.screenshots.map((f)=>({src:f.src,sizes:f.sizes,type:f.type,label:f.label,form_factor:f.platform}));let c=T(n);if(c)p.share_target=c;let h=H(n);if(h)p.file_handlers=h;let g=W(n);if(g)p.protocol_handlers=g;if(e.launchHandler)p.launch_handler={client_mode:e.launchHandler};if(e.handleLinks)p.handle_links=e.handleLinks;if(e.edgeSidePanel?.enabled)p.edge_side_panel={preferred_width:e.edgeSidePanel.preferredWidth};return p}function _(n){let t=j(n);if(!t)return"";let e=JSON.parse(JSON.stringify(t));return JSON.stringify(e,null,2)}function q(n,t){return{...t,...n,shortcuts:n.shortcuts||t.shortcuts,screenshots:n.screenshots||t.screenshots,categories:n.categories||t.categories}}function D(n){let t=[],e=n.pwa;if(!e?.enabled)return t;let r=e.manifest;if(!r)return t.push("PWA manifest configuration is missing"),t;if(!r.name)t.push("Manifest name is required");let o=["fullscreen","standalone","minimal-ui","browser"];if(r.display&&!o.includes(r.display))t.push(`Invalid display mode: ${r.display}. Must be one of: ${o.join(", ")}`);let a=["any","natural","landscape","landscape-primary","landscape-secondary","portrait","portrait-primary","portrait-secondary"];if(r.orientation&&!a.includes(r.orientation))t.push(`Invalid orientation: ${r.orientation}`);let s=/^#([0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;if(r.themeColor&&!s.test(r.themeColor))t.push(`Invalid theme color: ${r.themeColor}. Must be a valid hex color.`);if(r.backgroundColor&&!s.test(r.backgroundColor))t.push(`Invalid background color: ${r.backgroundColor}. Must be a valid hex color.`);if(e.shareTarget?.enabled){if(!e.shareTarget.action)t.push("Share target action URL is required")}if(e.fileHandlers?.enabled){if(!e.fileHandlers.accept||Object.keys(e.fileHandlers.accept).length===0)t.push("File handlers must specify accepted MIME types")}if(e.protocolHandlers)for(let l of e.protocolHandlers){if(!l.protocol)t.push("Protocol handler missing protocol");if(!l.url||!l.url.includes("%s"))t.push(`Protocol handler URL must contain %s placeholder: ${l.protocol}`)}return t}import z from"path";async function F(n){let t=n.pwa?.offline;if(!t?.enabled)return"";if(t.page){let e=z.isAbsolute(t.page)?t.page:z.resolve(process.cwd(),t.page);if(await Bun.file(e).exists())try{let{processDirectives:r}=await import("./chunk-129ernx4.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
|
|
4
4
|
<html lang="en">
|
|
5
5
|
<head>
|
|
6
6
|
<meta charset="UTF-8">
|
|
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
|
|
|
233
233
|
}, 5000);
|
|
234
234
|
</script>
|
|
235
235
|
</body>
|
|
236
|
-
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=oe(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=
|
|
236
|
+
</html>`}function b(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=oe(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=In(n,t);if(a){let s=De(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return zr(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,Do as auditBuildOutput,Io as auditConfig,re as buildPwaAssets,Oo as calculateAuditResult,Ia as formatAuditResult,Hr as formatSize,j as generateManifest,_ as generateManifestJson,Oa as generateManifestLink,F as generateOfflinePage,oe as generatePrecacheManifest,ft as generatePrecacheManifestJs,M as generatePwaIcons,Pn as generatePwaTags,In as generateServiceWorker,Na as generateServiceWorkerAuto,Da as generateSwRegistrationScript,Ma as generateThemeColorMeta,N as getExpectedIconPaths,De as getServiceWorkerFileName,zr as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,Mo as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,dr as pwaDirectives,Bc as pwaInstallDirective,zc as pwaOfflineDirective,Hc as pwaPushDirective,Fc as pwaUpdateDirective,id as registerPwaDirectives,Pa as runPwaAudit,D as validateManifest};
|
package/dist/ssg.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-8scw1bes.js";import"./chunk-ab7vh24b.js";import"./chunk-wkc34drs.js";import{Qe,et,tt,nt,rt,st}from"./chunk-x0mc2kv0.js";import"./chunk-01nx6zcw.js";import"./chunk-pf0d8y9n.js";import{f,je,N,K,n,o}from"./chunk-ss7wapbh.js";import"./chunk-tbef3yyk.js";import{er}from"./chunk-s10r6hxp.js";import"./chunk-99kt56fn.js";import"./chunk-8xcg2dqy.js";import"./chunk-pcq6vphz.js";import"./chunk-j4afmryj.js";import"./chunk-a0jyh65n.js";import{ie,gt,mt}from"./chunk-g4dmjede.js";import{Ro,Ao,Po}from"./chunk-2gmbxp60.js";import{pt,Gt,Jt}from"./chunk-5pjsc9zv.js";import"./chunk-8adstrk5.js";import{a}from"./chunk-kk5cyjfs.js";import x from"fs";import g from"path";import{createHash as $t}from"crypto";function Dt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Rt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function kt(t){return Bun.hash(t).toString(16)}function lt(t,i={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,r=t.replace(Rt,(e,l,w,y)=>{let h=y.trim();if(!h)return e;if(/\bdata-stx-src=/.test(w))return e;if(i.minify)h=Dt(h);let S=kt(h);if(!s.has(S))s.set(S,h);let P=i.integrity?` data-stx-integrity="sha384-${$t("sha384").update(h).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),c=Array.from(s,([e,l])=>({hash:e,code:l}));return{html:r,chunks:c}}var Ct=new Set(["visible","idle"]);function ut(t){if(!t.includes("data-stx-src="))return t;let i=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=s.exec(t))!==null)i.set(r[1],r[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Ct.has(i.get(l[1])||""))c.add(l[2]);let w=t.lastIndexOf("</head>");if(c.size===0||w===-1)return t;let y=Array.from(c).filter((h)=>!t.includes(`rel="prefetch" href="${h}"`)).map((h)=>`<link rel="prefetch" href="${h}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var Et=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function q(t){let i=t.trim();if(!i)return null;let s=/^https?:\/\//i.test(i)?i:`https://${i}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function It(t){for(let i of Et){let s=t[i];if(!s)continue;let r=q(s);if(r)return{url:r,source:"env",via:i}}return null}function dt(t){if(!t||typeof t!=="object")return null;let i=t,s=i.site?.url??i.url??i.app?.url;return typeof s==="string"?q(s):null}async function Bt(t){let{existsSync:i}=await import("fs"),s=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(t,r);if(!i(c))continue;try{let e=await import(c),l=dt(e.default??e);if(l)return l}catch{}}return null}async function ht(t={}){let i=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let l=q(t.explicit);if(l)return{url:l,source:"option"}}let r=dt(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let c=await Bt(i);if(c)return{url:c,source:"site.config",via:"url"};let e=It(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ft(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
3
|
`)}class wt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,i=""){this.cacheDir=t,this.salt=i}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let i=JSON.parse(await Bun.file(t).text());for(let[s,r]of Object.entries(i))this.cache.set(s,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),i={};for(let[s,r]of this.cache)i[s]=r;await Bun.write(t,JSON.stringify(i))}getHash(t,i){let s=x.statSync(t),r=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of i)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let c=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);c=(c<<5)-c+l,c=c&c}return Math.abs(c).toString(36)}get(t,i){let s=this.cache.get(t);if(!s)return null;let r=this.getHash(i,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(t),null;return s.html}set(t,i,s,r){let c=this.getHash(i,s);this.cache.set(t,{hash:c,html:r,generatedAt:Date.now(),dependencies:s})}}class yt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let i=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",i)}async get(t){let i=this.getFilePath(t);if(!await Bun.file(i).exists())return null;try{return JSON.parse(await Bun.file(i).text())}catch{return null}}async set(t,i){let s=this.getFilePath(t);await x.promises.mkdir(g.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(i))}async invalidate(t){let i=this.getFilePath(t);if(await Bun.file(i).exists())await x.promises.unlink(i)}async invalidatePattern(t){let i=g.join(this.cacheDir,"isr");if(!x.existsSync(i))return;let s=await x.promises.readdir(i);for(let r of s){let c=r.replace(/_/g,"/").replace(".json","");if(t.test(c))await x.promises.unlink(g.join(i,r))}}async needsRevalidation(t){let i=await this.get(t);if(!i)return!0;return Date.now()>i.revalidateAfter}}async function jt(t){try{let s=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!s)return null;let r=s[1];if(!r.includes("getStaticPaths"))return null;let c=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!c)return null;return await Function(`
|
|
4
4
|
return (async function getStaticPaths() {
|
|
5
5
|
${c[1]}
|
|
@@ -41,7 +41,7 @@ ${t.map((r)=>{let c=new URL(r.loc,i).href,e=` <url>
|
|
|
41
41
|
${s.join(`
|
|
42
42
|
`)}
|
|
43
43
|
</channel>
|
|
44
|
-
</rss>`}async function zt(t={}){let i=Date.now();mt();let s=await o(process.cwd()),r=s.build||{},c=await ht({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ft());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-
|
|
44
|
+
</rss>`}async function zt(t={}){let i=Date.now();mt();let s=await o(process.cwd()),r=s.build||{},c=await ht({explicit:t.domain||r.domain,stxConfig:s});if(c.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ft());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:c.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||a(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,h={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-awsg50kd.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-t4rgn046.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new wt(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-awsg50kd.js");await u('<div class="bg-black"></div>')}catch{}Qe();let xt=s?.routeMiddleware?.dir||"middleware";await tt(process.cwd(),xt);let H=et();if(H.length>0)console.log(`Loaded ${H.length} middleware: ${H.join(", ")}`);let vt=s?.routeMiddleware?.global||[];Po(s?.layoutsDir,a(process.cwd()));let V=N(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${V.length} routes`);let _=[];for(let u of V){let m=await Ft(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],X=[];for(let u=0;u<_.length;u+=e.concurrency)X.push(_.slice(u,u+e.concurrency));for(let u of X)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:bt,revalidate:Q}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Vt(j),Pt=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],it=[...vt,...Pt];if(it.length>0){let C=nt(d,L,F||{}),O=rt(C,null,void 0,{isServer:!0}),E=await st(it,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Kt(String(R),d),T=Xt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let at=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(at)try{if(!await Function("route",`
|
|
45
45
|
const validate = ${at[1]};
|
|
46
46
|
return validate(route);
|
|
47
47
|
`)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,ot=!1;if(e.cache){if(k=B.get(d,v.filePath),k)ot=!0,l.cachedCount++}if(!k){let C=await St(v,L,bt,e,s);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
@@ -73,7 +73,7 @@ ${u}`)}if(e.cache)await B.save();if(e.generate404){let u=g.join(e.pagesDir,"404.
|
|
|
73
73
|
<a href="/">Go home</a>
|
|
74
74
|
</div>
|
|
75
75
|
</body>
|
|
76
|
-
</html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...s,debug:!1,cache:!1},L=await n(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let W=g.join(e.pagesDir,"error.stx");if(await Bun.file(W).exists()){let u=new Set,m={...s,debug:!1,cache:!1},v=await n(await Bun.file(W).text(),{},W,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=_t(A,e.domain),m=g.join(e.outputDir,"sitemap.xml");await Bun.write(m,u),l.sitemapPath=m,console.log(`Generated sitemap.xml with ${A.length} URLs`)}if(e.robots!==!1){let u=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((d)=>typeof d==="string"),...u.disallow||[]],v=
|
|
76
|
+
</html>`)}for(let u of[500]){let m=g.join(e.pagesDir,`${u}.stx`);if(await Bun.file(m).exists()){let v=new Set,d={...s,debug:!1,cache:!1},L=await n(await Bun.file(m).text(),{},m,d,v);await Bun.write(g.join(e.outputDir,`${u}.html`),L)}}let W=g.join(e.pagesDir,"error.stx");if(await Bun.file(W).exists()){let u=new Set,m={...s,debug:!1,cache:!1},v=await n(await Bun.file(W).text(),{},W,m,u);await Bun.write(g.join(e.outputDir,"error.html"),v)}if(e.sitemap&&A.length>0){let u=_t(A,e.domain),m=g.join(e.outputDir,"sitemap.xml");await Bun.write(m,u),l.sitemapPath=m,console.log(`Generated sitemap.xml with ${A.length} URLs`)}if(e.robots!==!1){let u=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((d)=>typeof d==="string"),...u.disallow||[]],v=er({rules:[{userAgent:u.userAgent||"*",allow:u.allow||["/"],...m.length>0?{disallow:m}:{}}],...u.sitemap!==!1&&l.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(g.join(e.outputDir,"robots.txt"),v),console.log("Generated robots.txt")}if(e.rss){let u=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(u.getItems)m=await u.getItems();let v=Nt(u,m),d=g.join(e.outputDir,"rss.xml");await Bun.write(d,v),l.rssPath=d,console.log(`Generated rss.xml with ${m.length} items`)}let G=Ro(e.outputDir);if(G.assets>0)console.log(`Externalized ${G.assets} asset(s) from ${G.pages} page(s) (${(G.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let z=Ao(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} repeated asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&x.existsSync(e.publicDir))await J(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let Z=Jt();if(Z)await J(Z,g.join(e.outputDir,Gt)),console.log(`Copied assets from ${pt}`)}catch(D){throw await e.hooks.onError?.(D),D}if(l.buildTime=Date.now()-i,w.size>0){l.islandChunks={count:w.size,totalBytes:y};let D={generatedChunks:w.size,totalBytes:y,chunks:h,pages:S};await Bun.write(g.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(D,null,2))}await e.hooks.onBuildEnd?.(l);let P=l.islandChunks?`
|
|
77
77
|
Island chunks: ${l.islandChunks.count} (${(l.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
78
78
|
Build complete!
|
|
79
79
|
Total: ${l.totalPages} pages
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/stx",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.469",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -122,12 +122,12 @@
|
|
|
122
122
|
"dependencies": {
|
|
123
123
|
"@stacksjs/ts-css": "^0.3.2",
|
|
124
124
|
"@stacksjs/clapp": "^0.2.16",
|
|
125
|
-
"@stacksjs/desktop": "0.2.
|
|
126
|
-
"@stacksjs/sanitizer": "0.2.
|
|
125
|
+
"@stacksjs/desktop": "0.2.469",
|
|
126
|
+
"@stacksjs/sanitizer": "0.2.469",
|
|
127
127
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
128
|
-
"bun-plugin-stx": "0.2.
|
|
128
|
+
"bun-plugin-stx": "0.2.469",
|
|
129
129
|
"bunfig": "^0.15.19",
|
|
130
|
-
"stx-router": "0.2.
|
|
130
|
+
"stx-router": "0.2.469",
|
|
131
131
|
"ts-broadcasting": "^0.0.11",
|
|
132
132
|
"ts-images": "^0.2.22",
|
|
133
133
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-01jqpwpv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jc}from"./chunk-4r2fg64t.js";import"./chunk-y8923540.js";import"./chunk-01zwbzyw.js";import"./chunk-0gq32mfe.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Jc as buildForProduction};
|
package/dist/chunk-02e24cym.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ni,Ys,Li,ji,Zs,Bi,Fi,zi,Hi,Qs,Vi,Uc}from"./chunk-2cqymwe8.js";import{to,Gi}from"./chunk-rgwvqmhh.js";import{j,B,F,Ot,J,se,$n,Re,ut,Mt,Nt,Lt,z,jt,Bt,En}from"./chunk-z80d9dd2.js";import{Ea}from"./chunk-2bdthb37.js";export{B as DEFAULT_FORMATS,F as DEFAULT_QUALITY,j as DEFAULT_WIDTHS,En as ImageProcessingError,ji as clearImageCache,Zs as createImageDirective,Gi as createImageHandler,Fi as createImagePlugin,Uc as defaultImageConfig,Bt as formatSize,Qs as generateImageManifest,ut as generateSizes,Re as generateSrcSet,Mt as getFallbackVariant,$n as getImageMetadata,z as getMimeType,jt as getTotalSize,Nt as groupVariantsByFormat,to as handleImageRequest,Bi as imageDirective,J as isImageBackendAvailable,Lt as isImageFile,Ot as isSharpAvailable,Hi as optimizeDirectory,zi as optimizeImage,Ys as parseImageComponent,se as processImage,Li as processImageComponents,Ni as renderImageComponent,Ea as rewriteImagesWithSiblings,Vi as writeImageManifest};
|
package/dist/chunk-1mfggkga.js
DELETED
package/dist/chunk-22972c8b.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{_r,Tr,Rr,oa,Ar,Pr,ia,Ir,Dr,fo,aa}from"./chunk-7h57dt0z.js";export{_r as VideoProcessorCache,fo as analyzeVideo,oa as clearVideoCache,Dr as generateDASHManifest,Ir as generateHLSManifest,Ar as generatePoster,ia as generateSpriteSheet,Pr as generateThumbnails,Tr as getCachedVideoResult,aa as processVideo,Rr as setCachedVideoResult};
|
package/dist/chunk-2hddf9pn.js
DELETED
package/dist/chunk-2k0x6yc2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Oi,Mi}from"./chunk-7rgds0w1.js";import"./chunk-ery19t9s.js";import"./chunk-2cqymwe8.js";import"./chunk-hh7r7zpe.js";import"./chunk-90drf2ag.js";import"./chunk-hpm19gkn.js";import"./chunk-4r2fg64t.js";import"./chunk-a8q8m5pp.js";import"./chunk-rgwvqmhh.js";import"./chunk-6h93aacc.js";import"./chunk-ee0gqprs.js";import{no}from"./chunk-y8923540.js";import"./chunk-k9sbgax8.js";import"./chunk-z80d9dd2.js";import"./chunk-62ckway4.js";import"./chunk-1k01h1zb.js";import"./chunk-7h57dt0z.js";import"./chunk-544e2jvd.js";import"./chunk-zasd9166.js";import"./chunk-bddjx2a2.js";import"./chunk-2bdthb37.js";import"./chunk-fqpd0cfq.js";import"./chunk-9fr19qe4.js";import"./chunk-9pt8fd2n.js";import"./chunk-t1py7rbg.js";import"./chunk-fh1qrp68.js";import"./chunk-pbh4smw3.js";import"./chunk-amd6ey3t.js";import"./chunk-n4wfef43.js";import"./chunk-01zwbzyw.js";import"./chunk-m62a5a28.js";import"./chunk-vxsm8q1c.js";import"./chunk-5j5msbks.js";import"./chunk-vqdqf0cp.js";import"./chunk-0gq32mfe.js";import{me,Qt,en,K,d,n,Kn,I,o,ce}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Kn as buildWebComponents,en as cacheTemplate,Qt as checkCache,no as classifyAllScripts,Oi as createMiddleware,Mi as createRoute,I as defaultConfig,d as extractVariables,K as injectRouterScript,o as loadStxConfig,me as processClientScript,n as processDirectives,ce as readMarkdownFile};
|
package/dist/chunk-3ar8gdyd.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{j,B,F,Ot,J,se,$n,Ji,Re,ut,Mt,Nt,Lt,z,jt,Bt,En}from"./chunk-z80d9dd2.js";export{B as DEFAULT_FORMATS,F as DEFAULT_QUALITY,j as DEFAULT_WIDTHS,En as ImageProcessingError,Bt as formatSize,ut as generateSizes,Re as generateSrcSet,Mt as getFallbackVariant,$n as getImageMetadata,z as getMimeType,jt as getTotalSize,Nt as groupVariantsByFormat,J as isImageBackendAvailable,Lt as isImageFile,Ot as isSharpAvailable,se as processImage,Ji as resizeAndConvert};
|
package/dist/chunk-3q2z7cts.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{pa,fa,ga,ma,ha,ya,ba,wa,va,xa,ml}from"./chunk-zasd9166.js";export{pa as createIslandRegistry,ml as default,xa as generateIslandManifest,ga as generatePartialHydrationCSS,ya as hydrateAll,ha as hydrateByStrategy,ma as hydrateIsland,ba as isHydrated,wa as onHydrated,fa as processPartialHydrationDirectives,va as processStaticDirectives};
|
package/dist/chunk-4ahzhnfw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Yi,dl,Zi,Qi,pl,fl}from"./chunk-62ckway4.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{fl as applySlots,pl as extractSlotContent,dl as parseSlotElement,Yi as parseSlots,Qi as processSlots,Zi as renderSlot};
|
package/dist/chunk-4qv9me8f.js
DELETED
package/dist/chunk-4rj1y6j2.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ie,Na,Mo,gt,mt,yu,No,ht,Yt,La,ja,Ba,Fa,yt,za}from"./chunk-vqdqf0cp.js";import"./chunk-0gq32mfe.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Yt as MODULE_SPECIFIER_PREFIX,yt as bundleClientScript,mt as clearBundleFailures,ie as clientBundleDependencies,gt as getBundleFailures,ht as hasUserImports,ja as normalizeRegistrySpecifiers,Fa as queueClientBundleBuild,Mo as recordBundleFailure,La as registryIdForPath,No as resolveBundlerFallback,Ba as rewriteRegistryImports,yu as setBundlerFallbackMode,Na as shouldLogBundlerDiagnostics,za as tempBuildName};
|
package/dist/chunk-50xcmvad.js
DELETED
package/dist/chunk-5127n7rc.js
DELETED
package/dist/chunk-5564cka1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Os,Ms,Ze,G,mn,ir,hn,ar,cr,Rc,Ac,Pc,yn,Ic,Dc,Oc,Mc,Ai,Pi,Ii,Ns,Di,Nc,Qe,et,tt,nt,rt,st,Se,Lc}from"./chunk-88px183j.js";export{hn as Router,Oc as abortNavigation,ir as bracketPathToRegex,Qe as clearMiddleware,Pi as createClientCookieManager,rt as createMiddlewareContext,nt as createRouteLocation,Ai as createServerCookieManager,Ii as createStorageManager,Mc as defineMiddleware,Ac as defineRoute,Pc as defineRoutes,ar as findErrorPage,cr as formatRoutes,Ms as generateRouteManifest,Os as generateRouteTypes,Di as getMiddleware,et as getMiddlewareNames,Se as getRouterScript,Lc as getRouterScriptDev,Nc as hasMiddleware,Ze as isFileRequestPath,tt as loadMiddlewareFromDirectory,mn as matchRoute,Dc as navigateTo,G as patternToRegex,Ns as registerMiddleware,Ic as resetRoutes,yn as route,st as runMiddleware,Rc as setAppUrl};
|
package/dist/chunk-58n62bxb.js
DELETED
package/dist/chunk-60935ydz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{cl}from"./chunk-6h93aacc.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{cl as buildApp};
|
package/dist/chunk-63kwa14j.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ql,yo,_a,eu,tu,nu,ru,su,Ta,Ra,ou,iu,au,cu}from"./chunk-m62a5a28.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{_a as SUSPENSE_RESOLVER_RUNTIME,yo as buildSuspenseResolveScript,su as createStreamRenderer,nu as extractStreamBoundaries,cu as generateHydrationRuntime,Ra as islandDirective,iu as processSectionDirectives,tu as processStreamDirectives,ou as registerStreamingDirectives,eu as renderStreamingPage,Ql as streamTemplate,ru as streamTemplateSimple,au as streamToResponse,Ta as streamingSuspenseDirective};
|
package/dist/chunk-6876vczs.js
DELETED
package/dist/chunk-7fjatz47.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ks,Cs,$s,Es,Yn,Zn,Vu,Uu,Wu,qu,Qn,Ku}from"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";export{Ku as generateDefaultRobotsTxt,Qn as generateRobotsTxt,Uu as generateSitemap,Wu as generateSitemapIndex,Es as injectSeoTags,Yn as metaDirective,ks as processMetaDirectives,$s as processSeoDirective,Cs as processStructuredData,Vu as registerSeoDirectives,qu as scanForSitemapEntries,Zn as structuredDataDirective};
|
package/dist/chunk-7j1cpa9d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ts,Xu,Gu,vi,pe,Tc,nr,Ju,Yu,Zu,Qu,ed,td,nd,rd,sd}from"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";export{td as applyHead,Ju as definePageMeta,Ts as getHead,Xu as getPageMeta,pe as mergeHeadConfigs,nd as processHeadDirective,sd as processMetaDirective,rd as processTitleDirective,ed as renderBodyAttrs,Zu as renderHead,Qu as renderHtmlAttrs,Gu as resetHead,nr as seoMetaToHeadConfig,vi as useHead,Yu as usePageTitle,Tc as useSeoMeta,Yu as useTitle};
|
package/dist/chunk-7tt84v1y.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import i from"path";var $t=".stx",o="STX_DIR",e=null;function wi(t){e=t?.trim()||null}function on(){return process.env[o]?.trim()||e||$t}function a(t=process.cwd(),...n){let r=on();return i.isAbsolute(r)?i.join(r,...n):i.join(t,r,...n)}function an(t){if(!t||i.isAbsolute(t))return t;let n=t.replace(/\\/g,"/");if(n!==$t&&!n.startsWith(`${$t}/`))return t;let r=n.slice($t.length+1);return r?i.join(on(),r):on()}
|
|
3
|
-
export{$t,wi,on,a,an};
|
package/dist/chunk-9mnfma5c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{nn,sc,ss}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import{ve}from"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{ve as freeIdentifiers,ss as processComponents,sc as processESImports,nn as rendersAsElement};
|
package/dist/chunk-9zx4p42m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Pe,Wt,Xl}from"./chunk-01zwbzyw.js";import{V,_n,qt,Mr,Nr,Tn,Gl,Jl,Yl,Kt,Xt,Lr,Rn,Zl}from"./chunk-14vnnx44.js";import"./chunk-2jbyks2t.js";export{Mr as batch,Xl as default,_n as derived,qt as effect,Pe as generateSignalsRuntime,Wt as generateSignalsRuntimeDev,Xt as isDerived,Kt as isSignal,Tn as onDestroy,Nr as onMount,Rn as peek,Yl as pendingLifecycleCounts,Jl as runDestroyCallbacks,Gl as runMountCallbacks,V as state,Lr as untrack,Zl as useOptimistic};
|
package/dist/chunk-a32kqsff.js
DELETED
package/dist/chunk-b772p9d9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{I,Ec,o,R,zu,Hu}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{R as config,I as defaultConfig,zu as defineStxConfig,o as loadStxConfig,Ec as resolveStxDirectories,Hu as validateConfig};
|
package/dist/chunk-cfk3skk4.js
DELETED
package/dist/chunk-dv4g1506.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ll}from"./chunk-ee0gqprs.js";import"./chunk-y8923540.js";import"./chunk-0gq32mfe.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{ll as startProductionServer};
|
package/dist/chunk-ehwzvs2d.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ju,hc,ye,ii,Bu,ds,ps,gs}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Bu as clearOnceStore,ii as onceStore,ye as partialsCache,ds as processIncludes,ps as processStackPushDirectives,gs as processStackReplacements,ju as resetUnscopedSignalWarnings,hc as topLevelElements};
|
package/dist/chunk-gp4x34wk.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{kt,us,oi,mc}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{mc as declareBareLoopHead,kt as parseLoopBinding,oi as processLoops,us as reportDeferredLoopWarnings};
|
package/dist/chunk-h4g5m641.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Dn,Va,vu,Ua,xu,Wa,On,b,vt,he,qa,Yr,Ka,Su,q,Xa,ku,x,Cu}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Xa as applyFilters,xu as clearCustomFilters,qa as clientLoopScopes,Dn as defaultFilters,b as escapeHtml,vt as escapeHtmlValue,x as evaluateExpression,Wa as findMustacheEnd,Ua as getAllFilters,Ka as interpolateScriptAttributes,Yr as interpolateScriptExpressions,Su as interpolateScriptsInTemplate,q as processExpressions,Va as registerFilter,vu as registerFilters,On as replaceInterpolations,ku as resetRejectedExpressionWarnings,Cu as unescapeHtml,he as usesSignalsInScript};
|
package/dist/chunk-ha5z623e.js
DELETED
package/dist/chunk-hqzq3a61.js
DELETED
package/dist/chunk-hvx3pc13.js
DELETED
package/dist/chunk-j9aberz0.js
DELETED
package/dist/chunk-j9qcrwbg.js
DELETED
package/dist/chunk-jmabeqfq.js
DELETED
package/dist/chunk-jqppdrhr.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ct,cc,lc,uc,dc,pc,d,fc,ls,gc,ri,si}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Ct as STX_ENGINE_BINDING_NAMES,ls as convertToCommonJS,ri as extractScriptFromTemplate,d as extractVariables,si as hasVariables,fc as isCompleteImport,pc as isMissingBindingFailure,uc as isModuleResolutionFailure,dc as isSyntaxFailure,gc as splitDeclaration,cc as stripTypeScript,lc as withoutStxReferrer};
|
package/dist/chunk-k2vcwa7m.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Yc,Zc,Qc,el,Xi,tl,nl,rl,sl,ol,il,al}from"./chunk-a8q8m5pp.js";export{il as Broadcast,al as BroadcastServer,Xi as broadcast,sl as broadcastPresence,rl as broadcastPrivate,ol as channel,Yc as getBroadcastServer,el as loadChannels,Zc as startBroadcasting,Qc as stopBroadcasting,tl as toUser,nl as toUsers};
|
package/dist/chunk-kw1p1140.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ql,Kl}from"./chunk-n4wfef43.js";import"./chunk-vqdqf0cp.js";import"./chunk-0gq32mfe.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Kl as clearStoreCache,ql as getStoreScript};
|
package/dist/chunk-mhfwdyeg.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{hr,Gs,xn,yr,br,At,lt,Js,Sn,kn,wr,vr,Hc,Vc,_e}from"./chunk-ery19t9s.js";export{_e as DeployError,Gs as calculateSha1,xn as collectDeployFiles,kn as createDefaultNetlifyConfig,yr as createFileManifest,hr as createNetlifyClient,Hc as deploy,Sn as detectProjectConfig,br as filterRequiredFiles,At as formatSize,Js as generateNetlifyToml,lt as getTotalSize,vr as hasNetlifyConfig,Vc as initNetlify,wr as writeNetlifyConfig};
|
package/dist/chunk-pypadz0a.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Iu,Vo,Du,Uo,Za,Qa,xt,tn,Ou,ec,tc,nc,f}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{xt as buildCss,ec as extractClassNames,Qa as fingerprintConfig,tc as generateCss,Ou as getCachedCSS,Iu as getCssServeAsset,f as injectCss,Vo as loadCssEngine,Uo as loadCssEngineConfig,tn as rebuildCss,Du as resetCssCache,Za as resolveUserCssConfig,nc as withLinkedModuleBundles};
|
package/dist/chunk-q7qchkvk.js
DELETED
package/dist/chunk-qyq7j8hp.js
DELETED
package/dist/chunk-r7a26zjz.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{So,ko,Co,mu}from"./chunk-s0xpe9cj.js";import"./chunk-vxsm8q1c.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{So as buildNative,mu as default,Co as getAvailableFormats,ko as getAvailableTargets};
|
package/dist/chunk-rcez4f14.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{W,qr,Kr,Ha,wt,Lo,Xr,jo,wu,Ne,Gr,me}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import{mi,s}from"./chunk-m08fk6ds.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{W as BROWSER_CORE_IMPORTS,Ha as STX_AUTO_IMPORTS,qr as extractAndStripCssImports,Ne as extractBridgeData,mi as findInterpolationEnd,jo as generateAutoImportDestructuring,wu as generateBrowserAutoImportDestructuring,Gr as generateServerDataBridge,wt as injectBrowserCoreAutoImports,me as processClientScript,Xr as referencesName,Kr as renderVendorStyleTags,s as stripCommentsAndLiterals,Lo as transformAutoImports};
|
package/dist/chunk-rz7xew70.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{K,hs,ys,bs,n}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{K as injectRouterScript,n as processDirectives,hs as processJsonDirective,ys as processOnceDirective,bs as validateClientScript};
|
package/dist/chunk-s6jh1701.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Or,bl,wl}from"./chunk-fqpd0cfq.js";import"./chunk-vqdqf0cp.js";import"./chunk-0gq32mfe.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{wl as clearComposableCache,bl as getComposableScript,Or as listComposableModules};
|
package/dist/chunk-sjha9z8e.js
DELETED
package/dist/chunk-tg39b5t1.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{d,ls,ri,si,yc,bc,wc,vc,xc,Sc,Ve,L,Ue,kc,Wn,Cc,ci,$c,We,r,qn,li,g,ee,Fu}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{ee as clearComponentCache,$c as componentClientSignalNames,ls as convertToCommonJS,g as createDetailedErrorMessage,xc as extractDirectiveNames,ri as extractScriptFromTemplate,d as extractVariables,r as fileExists,Fu as getComponentCacheStats,bc as getPositionInfo,L as getSharedTranspiler,li as getSourceLineInfo,vc as hasDirectives,si as hasVariables,Cc as isHydrateTrigger,Sc as isJavaScriptScript,We as renderComponentWithSlot,qn as resolveTemplatePath,kc as scopeOnRootElement,Ve as shouldTranspileTypeScript,ci as slotContentHasExpressions,Ue as transpileTypeScript,Wn as userComponentFileExists,wc as validateDirective,yc as validateTemplate};
|
package/dist/chunk-tmbytj7c.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Ui,eo,Wc,Wi,qi,qc,Kc}from"./chunk-hh7r7zpe.js";import"./chunk-fqpd0cfq.js";import"./chunk-vqdqf0cp.js";import"./chunk-0gq32mfe.js";import{ze,rc}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Ui as buildVirtualSource,ze as extractScriptBlocks,rc as extractTemplateExpressions,Wi as findRuntimeTypeDeclarations,qi as findStxModuleDeclarations,Kc as formatTypecheckDiagnostics,Wc as sourcePathFor,qc as typecheckStxFiles,eo as virtualPathFor};
|
package/dist/chunk-vqdqf0cp.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{m,Zt,w,Me,o,R}from"./chunk-0nnmk0xv.js";import{Wr}from"./chunk-0gq32mfe.js";import{s,be}from"./chunk-m08fk6ds.js";import{a}from"./chunk-7tt84v1y.js";import g from"path";import S from"fs";function pe(e){if(!e||typeof e!=="object")return!1;let t=e;return typeof t.message==="string"&&(t.name==="BuildMessage"||t.name==="ResolveMessage"||("position"in t))}function fe(e){if(e&&typeof e==="object"&&Array.isArray(e.errors))return e.errors;return[e]}function P(e,t){let r=[];for(let l of fe(e)){if(pe(l)){let c=l.position||void 0;r.push({file:t||c?.file,line:c?.line,column:c?.column,message:l.message??"",lineText:c?.lineText});continue}r.push({file:t,message:l instanceof Error?l.message:String(l)})}return r}function De(e,t){return P(e,t).map((r)=>{let l=r.file?`${r.file}${r.line?`:${r.line}${r.column?`:${r.column}`:""}`:""}`:"",c=r.lineText?`
|
|
3
|
-
${r.lineText.trim()}`:"";return l?`${l}: ${r.message}${c}`:`${r.message}${c}`}).join(`
|
|
4
|
-
`)}var me=10;function V(e,t,r){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(g.basename(e))||Wr(e,t,r)}var re=1,se=new Map,W=600,ge=100,G=new Map;async function he(e){let t=G.get(e)??0;if(t>0&&t<ge){G.set(e,t+1);return}G.set(e,1);try{let r=(await S.promises.readdir(e)).filter((d)=>d.endsWith(".js"));if(r.length<=W)return;let c=(await Promise.all(r.map(async(d)=>{try{return{name:d,at:(await S.promises.stat(g.join(e,d))).mtimeMs}}catch{return null}}))).filter((d)=>d!==null);c.sort((d,u)=>u.at-d.at);for(let d of c.slice(W)){let u=d.name.slice(0,-3);await S.promises.rm(g.join(e,`${u}.js`),{force:!0}),await S.promises.rm(g.join(e,`${u}.deps.json`),{force:!0})}N("pruned bundle cache to",W,"entries")}catch{}}function ie(e){return se.get(e)??[]}function q(e,t){if(e)se.set(e,t)}function Na(e=process.env){return e.STX_DEBUG==="true"||e.STX_DEBUG==="1"}function N(...e){if(Na())console.log("[stx:bundler]",...e)}var Y=[];function Mo(e,t,r){Y.push({filePath:e||"<inline>",message:t,details:r})}function gt(){return Y.slice()}function mt(){Y.length=0}var H;function yu(e){H=e}function No(){if(H)return H;try{let e=R.strict;return typeof e==="object"&&e!==null?e.bundlerFallback??"warn":"warn"}catch{return"warn"}}var Z=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function ht(e){let t=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,r;while((r=t.exec(e))!==null){let c=r[1];if(!Z.some((u)=>u.test(c)))return N("detected user import:",c),!0}let l=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while((r=l.exec(e))!==null){let c=r[1];if(/\.css(?:\?.*)?$/.test(c))continue;if(!Z.some((u)=>u.test(c)))return N("detected side-effect import:",c),!0}return!1}var Yt="stx-module:",xe=/\.(?:[cm]?[jt]sx?|json)$/i;function La(e,t){return g.relative(e,t).split(g.sep).join("/")}function ja(e,t){if(t.size===0)return e;return e.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,(r,l,c,d)=>{let u=t.get(d);return u&&!d.startsWith(Yt)?`${l}${c}${u}${c}`:r})}function Ba(e,t){let r=0,l=(d)=>{let u=`__stxMod${r++}`,B=JSON.stringify(d);return t.push(`var ${u} = globalThis.__stxModules && globalThis.__stxModules[${B}];`,`if (${u} === undefined) throw new Error("[stx] module " + ${JSON.stringify(B)} + " is not registered on this page (#1957)");`),u},c=(d,u)=>{for(let B of d.split(",")){let _=B.trim();if(!_)continue;let f=_.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!f)continue;let n=f[1].startsWith('"')?JSON.parse(f[1]):f[1],i=f[2]??n;t.push(`var ${i} = ${u}[${JSON.stringify(n)}];`)}};return e=e.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,u,B)=>{let _=B.slice(Yt.length),f=l(_),n=u.trim(),i=n.match(/^([\w$]+)\s*(?:,\s*|$)/);if(i&&!n.startsWith("{")&&!n.startsWith("*"))t.push(`var ${i[1]} = ${f}.default;`),n=n.slice(i[0].length).trim();let p=n.match(/^\*\s*as\s+([\w$]+)$/);if(p)t.push(`var ${p[1]} = ${f};`);else if(n.startsWith("{"))c(n.replace(/^\{|\}$/g,""),f);return""}),e=e.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(d,u)=>(l(u.slice(Yt.length)),"")),e}function te(e){let t=[e,`${e}.ts`,`${e}.tsx`,`${e}.js`,`${e}.mjs`,`${e}.jsx`,g.join(e,"index.ts"),g.join(e,"index.tsx"),g.join(e,"index.js"),g.join(e,"index.mjs")];for(let r of t)try{if(S.existsSync(r)&&S.statSync(r,{throwIfNoEntry:!1})?.isFile())return r}catch{}return}function $e(e,t,r,l,c,d=new Map,u){let B=(f,n,i)=>{if(V(n,e,u))return null;if(!c||f!==r||!xe.test(n))return null;try{if(!S.statSync(n,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}l.add(n);let p=`${Yt}${La(process.cwd(),n)}`;return d.set(i,p),{path:p,external:!0}},_=(f,n)=>{let i=f===r?t:g.dirname(f),p=g.resolve(i,n);return te(p)??p};return{name:"stx-client-bundle",setup(f){if(f.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(n)=>({path:n.path,external:!0})),f.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(n)=>({path:n.path,external:!0})),f.onResolve({filter:/^\//},(n)=>{let i=te(n.path);if(i){let p=B(n.importer,i,n.path);if(p)return p;if(i!==r)l.add(i);return{path:i}}return{path:n.path,external:!0}}),f.onResolve({filter:/^\.\.?\//},(n)=>{let i=_(n.importer,n.path),p=B(n.importer,i,n.path);if(p)return p;return l.add(i),{path:i}}),f.onResolve({filter:/^[@~]\//},(n)=>{let i=g.resolve(e,n.path.slice(2)),p=[i,`${i}.ts`,`${i}.tsx`,`${i}.js`,`${i}.mjs`,`${i}.jsx`,g.join(i,"index.ts"),g.join(i,"index.tsx"),g.join(i,"index.js"),g.join(i,"index.mjs")];for(let E of p)if(S.existsSync(E)&&S.statSync(E,{throwIfNoEntry:!1})?.isFile()){let T=B(n.importer,E,n.path);if(T)return T;return N(`resolved ${n.path[0]}/ import:`,n.path,"\u2192",E),l.add(E),{path:E}}return console.warn(`[stx:bundler] could not resolve ${n.path[0]}/ import:`,n.path),{path:i}}),c)f.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(n)=>{if(n.importer!==r)return;let i=`${Yt}npm:${n.path}`;return d.set(n.path,i),{path:i,external:!0}});f.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(n)=>{if(V(n.path,e,u))throw Error(`Server-only API source cannot be imported by a client script: ${n.path}`);let i=g.extname(n.path).toLowerCase(),p=i===".json"?"json":i===".tsx"?"tsx":i===".jsx"?"jsx":i===".ts"||i===".mts"||i===".cts"?"ts":"js";if(n.path!==r)l.add(n.path);return{contents:S.readFileSync(n.path,"utf8"),loader:p}})}}}var X=new Map,U=m(64),ne=Symbol.for("stx.client-bundle-build-queue");function Fa(e){let t=globalThis,l=(t[ne]??Promise.resolve()).then(e,e);return t[ne]=l.then(()=>{return},()=>{return}),l}async function yt(e,t,r={}){let l=r.projectRoot||process.cwd(),c=(await o(l)).serverApi,d=r.minify??!1,u=r.externalizeUserModules??!0,B=r.expose?.length?[...new Set(r.expose)].sort():void 0,_=r.cacheDir||a(l,"bundle-cache"),f=new Bun.CryptoHasher("md5");f.update(`${me}\x00${Me()}\x00${JSON.stringify(c??!1)}\x00${u?"registry":"inline"}\x00${B?B.join(","):"*"}\x00${e}\x00${t}`);let n=f.digest("hex").slice(0,12),i=g.join(_,`${n}.js`),p=U.get(i);if(p){if(Zt(p.files)&&p.files.every((A)=>!V(A.path,l,c))){N("memo hit:",n);let A=p.files.map((v)=>v.path);return q(t,A),r.collectInputs?.push(...A),p.code}U.delete(i),N("memo invalidated by dep change:",n)}let E=g.join(_,`${n}.deps.json`),T=Bun.file(i);if(await T.exists()){let A=Bun.file(E),v=!1,D=null;if(await A.exists())try{let k=JSON.parse(await A.text());if(k.metadataVersion!==re||!Array.isArray(k.files))v=!1;else D=k.files,v=!0;if(D&&(!Zt(D)||D.some((I)=>V(I.path,l,c))))v=!1}catch{v=!1}if(v){if(N("cache hit:",n),D)q(t,D.map((I)=>I.path)),r.collectInputs?.push(...D.map((I)=>I.path));let k=await T.text();if(D)U.set(i,{code:k,files:D});return k}N("cache invalidated by dep change:",n)}let M=X.get(n);if(M){let A=await M;if(r.collectInputs)r.collectInputs.push(...(U.get(i)?.files??[]).map((v)=>v.path));return A}let z=Fa(()=>ye(e,t,{projectRoot:l,minify:d,cacheDir:_,hash:n,cachePath:i,depsPath:E,collectInputs:r.collectInputs,externalizeUserModules:u,serverApi:c,expose:B}));X.set(n,z);try{return await z}finally{X.delete(n)}}var we=0;function za(e){return`${e}-${process.pid}-${++we}`}async function ye(e,t,r){let{projectRoot:l,minify:c,cacheDir:d,hash:u,cachePath:B,depsPath:_,externalizeUserModules:f}=r,n=a(l,"bundle-tmp"),i=za(u),p=g.join(n,`${i}.ts`),E=g.join(n,"out",i);S.mkdirSync(n,{recursive:!0}),S.mkdirSync(E,{recursive:!0});let T=g.dirname(t),M=new Set,z=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,A=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,v=s(e),{depths:D,balanced:k}=be(v),I=(j)=>!k||D[j]===0,b;while((b=z.exec(v))!==null){if(b[1])continue;if(!I(b.index))continue;if(b[2])b[2].split(",").forEach((j)=>{let h=Be(j);if(h)M.add(h)});else if(b[3])M.add(b[3])}while((b=A.exec(v))!==null){if(b[1])continue;if(!I(b.index))continue;M.add(b[2])}let oe=/^[ \t]*import[ \t]+(?!type\b)(?:(\w+)\s*(?:,\s*)?)?(?:\*\s+as\s+(\w+)|\{([^}]+)\})?\s+from\b/gm;while((b=oe.exec(v))!==null){if(!I(b.index))continue;let j=/^\s*['"]([^'"]+)['"]/.exec(e.slice(b.index+b[0].length))?.[1];if(j&&Z.some((h)=>h.test(j)))continue;if(b[1])M.add(b[1]);if(b[2])M.add(b[2]);for(let h of(b[3]??"").split(",")){let y=h.trim();if(!y||/^type\s/.test(y))continue;let L=/\bas\s+(\w+)\s*$/.exec(y)?.[1]??/^\w+$/.exec(y)?.[0];if(L)M.add(L)}}for(let j of v.matchAll(/\bexport\s*\{([^}]+)\}/g))for(let h of j[1].split(",")){let y=/\bas\s+(\w+)\s*$/.exec(h)?.[1]??/^\s*(\w+)\s*$/.exec(h)?.[1];if(y)M.delete(y)}let le=M.size>0?`
|
|
5
|
-
export { ${[...M].join(", ")} }`:"";await Bun.write(p,e+le),N("bundling:",u,"from:",g.basename(t));let Q=new Set,K=new Map;try{let j=await Bun.build({entrypoints:[p],outdir:E,target:"browser",format:"esm",minify:c,plugins:[$e(l,T,p,Q,f,K,r.serverApi)],define:{"process.env.NODE_ENV":c?'"production"':'"development"',...w()},root:l});if(!j.success){let F=j.logs.filter((C)=>C.level==="error").map((C)=>C.message).join(", ")||`Unable to bundle ${g.basename(t)}`,O=P(j.logs,t||void 0);if(console.warn("[stx:bundler] build failed:",F),Mo(t||"",F,O),No()==="error")throw Error(F);return e}let h="";for(let x of j.outputs){h=await x.text();break}let y=[];for(let x of h.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let F of x[1].split(",")){let O=F.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(O){y.push([O[2],O[1]]);continue}let C=F.trim();if(/^[A-Za-z_$][\w$]*$/.test(C))y.push([C,C])}if(r.expose){let x=new Set(r.expose);for(let F=y.length-1;F>=0;F--)if(!x.has(y[F][0]))y.splice(F,1)}let L=[];h=Ba(ja(h,K),L);let ae=h.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];h=h.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let ee=`__stxBundle_${u}`,ce=y.map(([x,F])=>`${JSON.stringify(x)}: ${F}`).join(", "),ue=y.map(([x])=>`var ${x} = undefined;`).join(`
|
|
6
|
-
`),de=y.map(([x])=>`${x} = ${ee}[${JSON.stringify(x)}];`).join(`
|
|
7
|
-
`);if(h=`${ae.join(`
|
|
8
|
-
`)}
|
|
9
|
-
${ue}
|
|
10
|
-
var ${ee} = (function() {
|
|
11
|
-
${L.join(`
|
|
12
|
-
`)}
|
|
13
|
-
${h}
|
|
14
|
-
return { ${ce} };
|
|
15
|
-
})();
|
|
16
|
-
${de}`.trim(),N("bundled:",u,"output:",h.length,"bytes"),M.size>0&&y.length===0)return console.warn(`[stx:bundler] dropped every binding for ${g.basename(t)} (${u}); serving the unbundled source and not caching this result`),e;S.mkdirSync(d,{recursive:!0}),await Bun.write(B,h);let J=Array.from(Q).map((x)=>{try{return{path:x,mtimeMs:S.statSync(x).mtimeMs}}catch{return null}}).filter((x)=>x!==null);return await Bun.write(_,JSON.stringify({metadataVersion:re,files:J})),q(t,J.map((x)=>x.path)),r.collectInputs?.push(...J.map((x)=>x.path)),U.set(B,{code:h,files:J}),await he(d),h}catch(j){let h=P(j,t||void 0),y=De(j,t||void 0);if(console.warn(`[stx:bundler] error: ${y}`),Mo(t||"",y,h),No()==="error")throw j;return e}finally{try{S.rmSync(p,{force:!0}),S.rmSync(E,{recursive:!0,force:!0})}catch{}}}function Be(e){let t=e.trim();if(!t)return null;let r=t.indexOf("=");if(r!==-1)t=t.slice(0,r).trim();let l=t.indexOf(":");if(l!==-1)t=t.slice(l+1).trim();if(t.startsWith("..."))t=t.slice(3).trim();return/^[A-Za-z_$][\w$]*$/.test(t)?t:null}
|
|
17
|
-
export{De,ie,Na,Mo,gt,mt,yu,No,ht,Yt,La,ja,Ba,Fa,yt,za};
|
package/dist/chunk-w1vvzdp0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{bt,Hr,Vr,Ur,bu,Wr}from"./chunk-0gq32mfe.js";import"./chunk-0trfbqa7.js";import"./chunk-zydg3wgt.js";import"./chunk-88px183j.js";export{Vr as buildServerApi,bu as createServerApi,bt as discoverServerApi,Hr as generateApiTypes,Wr as isServerApiSource,Ur as productionApiDispatcher};
|
package/dist/chunk-wsftz3vj.js
DELETED
package/dist/chunk-xf4s69fr.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import g from"path";var y=/__stxModules\["((?:[^"\\]|\\.)*)"\]/g;function I(...r){let o=new Set;for(let s of r){if(!s||!s.includes("__stxModules["))continue;for(let e of s.matchAll(y))try{o.add(JSON.parse(`"${e[1]}"`))}catch{}}return[...o].sort()}async function M(r,o={}){if(r.length===0)return null;let s=process.cwd(),e=[],l=[];r.forEach((t,h)=>{let x=t.startsWith("npm:")?t.slice(4):g.resolve(s,t),a=`__stxRegistered${h}`,d=JSON.stringify(t);e.push(`import * as ${a} from ${JSON.stringify(x)};`),l.push(`if (!globalThis.__stxModules[${d}]) globalThis.__stxModules[${d}] = ${a};`)});let u=[...e,"globalThis.__stxModules = globalThis.__stxModules || {};",...l].join(`
|
|
3
|
-
`),n;try{let{bundleClientScript:t}=await import("./chunk-4rj1y6j2.js");n=await t(u,g.join(s,".stx-module-registry.ts"),{projectRoot:s,minify:o.minify,externalizeUserModules:!1,collectInputs:o.collectInputs})}catch(t){return console.warn("[stx] could not build the page module registry (#1957):",t),null}let{transformAutoImports:p,generateAutoImportDestructuring:m}=await import("./chunk-rcez4f14.js"),i=p(n),f=m(i.stxImports,i.browserImports),{transformStoreImports:_}=await import("./chunk-0e1rga0j.js");n=_(i.code);let c=JSON.stringify(new Bun.CryptoHasher("md5").update(u).digest("hex").slice(0,12));return[";(function() {"," var __stxBundles = globalThis.__stxModuleBundles || (globalThis.__stxModuleBundles = {});",` if (__stxBundles[${c}]) return;`,` __stxBundles[${c}] = true;`,f,n,"})();"].join(`
|
|
4
|
-
`)}export{M as buildModuleRegistryScript,I as registeredModuleIdsIn};
|
package/dist/chunk-xjb0yzvq.js
DELETED
package/dist/chunk-xq4x3cy0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Cr,$r,Er,ea,ta,na,po,ra,sa}from"./chunk-1k01h1zb.js";export{Cr as ImageProcessorCache,po as applyTransformations,ea as clearImageCache,ra as generateResponsiveVariants,sa as generateSrcset,$r as getCachedImageResult,na as optimizeImage,ta as processImage,Er as setCachedImageResult};
|
package/dist/chunk-ydjfar14.js
DELETED
package/dist/chunk-ymk7eswy.js
DELETED
package/dist/chunk-yq2mckms.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Gc}from"./chunk-hpm19gkn.js";import"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Gc as startInteractive};
|
package/dist/chunk-z990jtmx.js
DELETED
package/dist/chunk-zak38e27.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Me,Ga,$u,Eu,_u,Tu,Ja,Ya,Ru,Au,Ho,Pu,Qt,en,Mn}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Tu as __setSignalsGeneratorsForTest,Me as cacheEngineFingerprint,en as cacheTemplate,Qt as checkCache,Pu as clearDevCaches,Ya as getCachedRouterScript,Ja as getCachedSignalsRuntime,Ru as getServeClientAsset,Ho as getServeModuleBundle,Mn as hashFilePath,Eu as invalidateFileCache,_u as invalidateFileCacheByDir,$u as readFileCached,Au as registerServeModuleBundle,Ga as templateCache};
|
package/dist/chunk-zmcvjkpv.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Lu,oc,os,is,Qo,ei,as,cs,Fn,ic,ti,ni,ac,He}from"./chunk-0nnmk0xv.js";import"./chunk-d2zw2e5m.js";import"./chunk-2n5pjbw9.js";import"./chunk-0trfbqa7.js";import"./chunk-w5m8xrs4.js";import"./chunk-zydg3wgt.js";import"./chunk-y36av1ac.js";import"./chunk-v83bpj84.js";import"./chunk-ynvce0q6.js";import"./chunk-pf0d8y9n.js";import"./chunk-2jbyks2t.js";import"./chunk-88px183j.js";import"./chunk-jz7pvh7b.js";export{Lu as clearScriptScanCache,as as convertServerLoopAttributesToDirectives,Qo as convertSignalDirectivesToAttributes,cs as convertSignalLoopsToAttributes,ic as extractExports,ni as findMarkupIndexOutsideScripts,is as hasSignalsSyntax,os as parseLoopExpression,ei as preEvalLiteralReactiveIfs,Fn as processScriptSetup,ti as processSignals,ac as rewriteStxImportSpecifiers,oc as scanScriptTags,He as stripStxRuntimeImports};
|