@stacksjs/stx 0.2.839 → 0.2.841
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-8q3pyq6a.js → chunk-0kwpehta.js} +1 -1
- package/dist/chunk-1z5mj5m5.js +2 -0
- package/dist/{chunk-zyeg9t2t.js → chunk-20rmh0be.js} +1 -1
- package/dist/{chunk-vr6qa0g2.js → chunk-2axvk5t9.js} +1 -1
- package/dist/{chunk-mv49hr9y.js → chunk-30zf567p.js} +1 -1
- package/dist/{chunk-8byydry7.js → chunk-32mf97nv.js} +1 -1
- package/dist/chunk-37ad1ewp.js +2 -0
- package/dist/{chunk-whmqfr3y.js → chunk-41s4jpkx.js} +2 -2
- package/dist/{chunk-xx3reejx.js → chunk-5xvxrnfh.js} +1 -1
- package/dist/{chunk-78nsbzcm.js → chunk-7hf37fqp.js} +1 -1
- package/dist/chunk-86dq5z6j.js +2 -0
- package/dist/{chunk-sm9f980t.js → chunk-8ye89bw9.js} +1 -1
- package/dist/{chunk-ynf16yz4.js → chunk-amh7h4bq.js} +1 -1
- package/dist/{chunk-aekq1zyn.js → chunk-aqvh8wx5.js} +4 -4
- package/dist/{chunk-5hmm01av.js → chunk-axhg6nn9.js} +1 -1
- package/dist/{chunk-8913k8g7.js → chunk-b85ss74r.js} +1 -1
- package/dist/{chunk-mtjt2z77.js → chunk-bbza2wrb.js} +1 -1
- package/dist/chunk-bqb9neap.js +2 -0
- package/dist/{chunk-pqg6j26p.js → chunk-c3gsnne5.js} +1 -1
- package/dist/chunk-cnqhbdsx.js +2 -0
- package/dist/chunk-d1b7h0n5.js +2 -0
- package/dist/{chunk-ksr6c2kh.js → chunk-d5h2qak7.js} +1 -1
- package/dist/{chunk-4w3qpewn.js → chunk-d5ryynr2.js} +1 -1
- package/dist/{chunk-r0ssa1xd.js → chunk-d6z2v5k7.js} +1 -1
- package/dist/{chunk-aywvbcae.js → chunk-dpmr4sym.js} +1 -1
- package/dist/{chunk-ryrdx5mw.js → chunk-e8dnsaxj.js} +1 -1
- package/dist/{chunk-np6h1ct6.js → chunk-eajm1dj6.js} +1 -1
- package/dist/{chunk-ndyj1d0z.js → chunk-edb768c0.js} +1 -1
- package/dist/{chunk-d2mdh669.js → chunk-ep17rnxb.js} +1 -1
- package/dist/{chunk-aza2zrhk.js → chunk-eqfs73sa.js} +4 -4
- package/dist/{chunk-d1vkjxb1.js → chunk-fhkdkpca.js} +2 -2
- package/dist/{chunk-efdfkfp1.js → chunk-fp4291zm.js} +1 -1
- package/dist/{chunk-jjyt3tsv.js → chunk-g7hd7eh0.js} +1 -1
- package/dist/{chunk-v49rvx9y.js → chunk-gw5bf8e7.js} +5 -5
- package/dist/{chunk-gpschnvk.js → chunk-hamc1fmd.js} +1 -1
- package/dist/{chunk-7mz6ze0x.js → chunk-hn6yd2az.js} +1 -1
- package/dist/{chunk-f69cmsz9.js → chunk-hnh12d0y.js} +1 -1
- package/dist/{chunk-w5h67xec.js → chunk-hvd3hxs4.js} +1 -1
- package/dist/{chunk-nk7nxzxf.js → chunk-j2vyhw8e.js} +1 -1
- package/dist/{chunk-xvhxxj4g.js → chunk-j2z7prcv.js} +6 -6
- package/dist/chunk-jap212a4.js +3 -0
- package/dist/{chunk-nb2tedk0.js → chunk-jten8e2c.js} +1 -1
- package/dist/{chunk-yn17484y.js → chunk-jxvxynnf.js} +3 -3
- package/dist/chunk-jxxyz9yp.js +2 -0
- package/dist/{chunk-8h0pnn5p.js → chunk-k1jfzzqz.js} +5 -5
- package/dist/{chunk-31cnrpd1.js → chunk-kk66r2me.js} +2 -2
- package/dist/{chunk-23zzbsms.js → chunk-m33na5j5.js} +1 -1
- package/dist/{chunk-1zfxmjrf.js → chunk-mpc840yc.js} +4 -4
- package/dist/{chunk-8y3f5fyg.js → chunk-nfdaem8g.js} +1 -1
- package/dist/{chunk-p83h2dbg.js → chunk-qca4e1ms.js} +2 -2
- package/dist/chunk-rwx9aby2.js +2 -0
- package/dist/{chunk-mzj71r0m.js → chunk-rze2qphx.js} +1 -1
- package/dist/{chunk-cax1wts7.js → chunk-v3ccft8t.js} +1 -1
- package/dist/{chunk-rdn1d4bf.js → chunk-vv71k945.js} +1 -1
- package/dist/{chunk-c2v38ghp.js → chunk-vxzsspgc.js} +1 -1
- package/dist/{chunk-cw1ar3dq.js → chunk-w2btre0d.js} +1 -1
- package/dist/{chunk-3tydmgwh.js → chunk-wf2h75wp.js} +2 -2
- package/dist/{chunk-jzh0n2ct.js → chunk-xjk5sxkz.js} +2 -2
- package/dist/{chunk-s85chp3w.js → chunk-y0zhfyw4.js} +1 -1
- package/dist/{chunk-rsn9rh07.js → chunk-y92nkb7x.js} +1 -1
- package/dist/chunk-ya7m4wgr.js +2 -0
- package/dist/{chunk-nsnzgdjt.js → chunk-ybmnf25a.js} +1 -1
- package/dist/{chunk-8em568fw.js → chunk-yecjczcy.js} +1 -1
- package/dist/{chunk-53j9wakh.js → chunk-zay0083s.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/native/runtime/craft-bridge.js +2 -10
- package/dist/native/runtime/craft.d.ts +11 -0
- package/dist/native/runtime/navigation-chrome.d.ts +2 -0
- package/dist/native/runtime/navigation-chrome.js +25 -3
- package/dist/native/testing.js +7 -1
- package/dist/pwa.js +1 -1
- package/dist/ssg.js +6 -9
- package/package.json +5 -5
- package/dist/chunk-7ka7pvj9.js +0 -2
- package/dist/chunk-7t9951at.js +0 -2
- package/dist/chunk-8z3yjex0.js +0 -2
- package/dist/chunk-8zzepd7g.js +0 -2
- package/dist/chunk-98258444.js +0 -2
- package/dist/chunk-mad4g0yx.js +0 -2
- package/dist/chunk-n8a4jm0p.js +0 -3
- package/dist/chunk-phxkmjnw.js +0 -2
- package/dist/chunk-rt29w5ns.js +0 -2
- package/dist/chunk-s92f8w68.js +0 -2
|
@@ -12,6 +12,8 @@ export declare function showsChromeButton(button: NativeChromeButton, route: Chr
|
|
|
12
12
|
export declare function mergeChromeButtons(own: readonly NativeNavigationButton[], chrome: NativeNavigationChrome | null, side: ButtonSide, route: ChromeRoute): NativeChromeButton[];
|
|
13
13
|
/** What the host is shown for a button: no callbacks, and nothing chrome-only. */
|
|
14
14
|
export declare function hostButton(button: NativeChromeButton): NativeNavigationButton;
|
|
15
|
+
/** What pressing each button, or choosing from its menu, does in the screen. */
|
|
16
|
+
export declare function buttonPresses(buttons: readonly NativeChromeButton[], open: (path: string) => unknown): Map<string, (event: { id: string }) => unknown>;
|
|
15
17
|
/** The key two sends compare by, so an unchanged bar is not sent again. */
|
|
16
18
|
export declare function buttonsKey(buttons: readonly NativeChromeButton[]): string;
|
|
17
19
|
/** The tab items of `chrome` that differ from what was last sent for each tab. */
|
|
@@ -24,12 +24,34 @@ export function showsChromeButton(button, route) {
|
|
|
24
24
|
export function mergeChromeButtons(own, chrome, side, route) {
|
|
25
25
|
if (!chrome || chrome.bare?.includes(route.name))
|
|
26
26
|
return [...own];
|
|
27
|
-
const shared = (chrome[side] ?? []).filter((button) => button && button.id != null && showsChromeButton(button, route))
|
|
27
|
+
const shared = (chrome[side] ?? []).filter((button) => button && button.id != null && showsChromeButton(button, route)).flatMap((button) => {
|
|
28
|
+
if (!button.menu)
|
|
29
|
+
return [button];
|
|
30
|
+
const menu = button.menu.filter((item) => item && item.id != null && !(item.open && route.path && chromePath(item.open) === chromePath(route.path)));
|
|
31
|
+
return menu.length ? [{ ...button, menu }] : [];
|
|
32
|
+
}), taken = new Set((chrome.leftButtons ?? []).concat(chrome.rightButtons ?? []).map((button) => String(button?.id)));
|
|
28
33
|
return [...own.filter((button) => !taken.has(String(button?.id))), ...shared];
|
|
29
34
|
}
|
|
30
35
|
export function hostButton(button) {
|
|
31
|
-
const { onPress, open, hideOn, ...rest } = button;
|
|
32
|
-
|
|
36
|
+
const { onPress, open, hideOn, menu, ...rest } = button;
|
|
37
|
+
if (!menu)
|
|
38
|
+
return rest;
|
|
39
|
+
return { ...rest, menu: menu.map(({ onPress: press, open: path, ...item }) => item) };
|
|
40
|
+
}
|
|
41
|
+
export function buttonPresses(buttons, open) {
|
|
42
|
+
const presses = new Map, add = (target) => {
|
|
43
|
+
const path = target.open;
|
|
44
|
+
if (typeof target.onPress === "function")
|
|
45
|
+
presses.set(String(target.id), target.onPress);
|
|
46
|
+
else if (path)
|
|
47
|
+
presses.set(String(target.id), () => open(path));
|
|
48
|
+
};
|
|
49
|
+
for (const button of buttons) {
|
|
50
|
+
add(button);
|
|
51
|
+
for (const item of button.menu ?? [])
|
|
52
|
+
add(item);
|
|
53
|
+
}
|
|
54
|
+
return presses;
|
|
33
55
|
}
|
|
34
56
|
export function buttonsKey(buttons) {
|
|
35
57
|
return JSON.stringify(buttons.map(hostButton));
|
package/dist/native/testing.js
CHANGED
|
@@ -476,8 +476,14 @@ export function mountNativeScreen(code, screen, options = {}) {
|
|
|
476
476
|
type: (node, text) => press(node, "onChangeText", { text }),
|
|
477
477
|
barButtons: () => (bars.findLast((bar) => bar.rightButtons !== void 0)?.rightButtons || []).map((button) => button.id),
|
|
478
478
|
tapBar: (id) => {
|
|
479
|
-
|
|
479
|
+
const buttons = bars.findLast((bar) => bar.rightButtons !== void 0)?.rightButtons || [], button = buttons.find((candidate) => candidate.id === id);
|
|
480
|
+
if (button?.menu?.length)
|
|
481
|
+
throw Error(`bar button ${id} opens a menu: tap one of ${button.menu.map((choice) => choice.id).join(", ")}`);
|
|
482
|
+
const choice = buttons.flatMap((candidate) => candidate.menu ?? []).find((candidate) => candidate.id === id);
|
|
483
|
+
if (!button && !choice)
|
|
480
484
|
throw Error(`no bar button ${id}`);
|
|
485
|
+
if (choice?.disabled)
|
|
486
|
+
throw Error(`bar menu choice ${id} is disabled`);
|
|
481
487
|
send("NAV_BUTTON", { id });
|
|
482
488
|
},
|
|
483
489
|
appState,
|
package/dist/pwa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import{no,Ut,Cl,Ag}from"./chunk-dgn87554.js";import{to,Ni,Tg,$g,Rg}from"./chunk-8qbp5skx.js";import{Sl,kl,_l,Cg,Eg}from"./chunk-8pj4v1eh.js";import{We,An,Mi}from"./chunk-rk2ex6qx.js";import{Pg,Ig,Og,Ng,ro,hy}from"./chunk-a1s5wqw4.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-
|
|
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-d1b7h0n5.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">
|
package/dist/ssg.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-4y6hes3h.js";import{x,il}from"./chunk-89d3h8mp.js";import"./chunk-23r3rby6.js";import"./chunk-zjqvbcwa.js";import{At,y}from"./chunk-
|
|
2
|
+
import"./chunk-4y6hes3h.js";import{x,il}from"./chunk-89d3h8mp.js";import"./chunk-23r3rby6.js";import"./chunk-zjqvbcwa.js";import{At,y}from"./chunk-j2z7prcv.js";import"./chunk-8370x30n.js";import"./chunk-g7hd7eh0.js";import"./chunk-11y84h2d.js";import{_t,Ct,Et,Tt,$t,Rt}from"./chunk-2j5yane9.js";import{a}from"./chunk-qca4e1ms.js";import{$s}from"./chunk-zg44cf8a.js";import"./chunk-4657mnht.js";import"./chunk-d5h2qak7.js";import{ye,nn,rn}from"./chunk-w2btre0d.js";import"./chunk-rze2qphx.js";import{b}from"./chunk-kk66r2me.js";import{bt,i}from"./chunk-mpc840yc.js";import"./chunk-vv71k945.js";import"./chunk-eqfs73sa.js";import{ms}from"./chunk-xjk5sxkz.js";import"./chunk-d5ryynr2.js";import"./chunk-4dxq7ft1.js";import{ec,tc,nc}from"./chunk-321e41ck.js";import{en,er,tr}from"./chunk-c18pafmf.js";import{tn}from"./chunk-5xvxrnfh.js";import"./chunk-jap212a4.js";import"./chunk-1b1ntgt7.js";import{G,ve}from"./chunk-aqvh8wx5.js";import"./chunk-2fj5zev7.js";import"./chunk-fp4291zm.js";import{c}from"./chunk-z4g64re8.js";import{s,me}from"./chunk-x4f7efgp.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function Pt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var kt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Dt(t){return Bun.hash(t).toString(16)}function ot(t,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(kt,(e,u,g,v)=>{let w=v.trim();if(!w)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)w=Pt(w);let p=Dt(w);if(!n.has(p))n.set(p,w);let P=r.integrity?` data-stx-integrity="sha384-${vt("sha384").update(w).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),l=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:l}}var It=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(It.has(r.get(u[1])||""))l.add(u[2]);let g=/<\/head\s*>/iy,v=y(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(l.size===0||v===-1)return t;let w=Array.from(l).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!w)return t;return t.slice(0,v)+w+t.slice(v)}var Bt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function X(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function jt(t){for(let r of Bt){let n=t[r];if(!n)continue;let o=X(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?X(n):null}async function Ft(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=n.resolve(t,o);if(!r(l))continue;try{let e=await import(l),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=X(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let l=await Ft(r);if(l)return{url:l,source:"site.config",via:"url"};let e=jt(n);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){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
|
`)}function J(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=me(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=o.exec(r))!==null){if(n[l.index]!==0)continue;let u=x(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=x(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(l.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(r))!==null){if(n[l.index]!==0)continue;let u=il(r,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let r="read";try{let n=await Bun.file(t).text();r="parse";let o=tn(n),l=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of l){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&At(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(J);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let w=await v();r="result";let p=Array.isArray(w)?{paths:w}:w;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let l=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);l=(l<<5)-l+u,l=l&l}return Math.abs(l).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=ft(r).some((u)=>D.existsSync(u)),l=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ms(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||l)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let l=this.getHash(r,n);this.cache.set(t,{hash:l,html:o,generatedAt:Date.now(),dependencies:n})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let l=o.replace(/_/g,"/").replace(".json","");if(t.test(l))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let l of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(l.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:l.params,props:l.props,revalidate:l.revalidate})}}return r}function ft(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let r of ft(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...l}=n;return l}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let l=o[1];if(!l.includes("getStaticProps"))return null;try{let e=l.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${e[1]}
|
|
6
6
|
})()
|
|
7
7
|
`)(r)}catch(e){return console.error(`Error executing getStaticProps in ${n}:`,e),null}}function Nt(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function mt(t,r,n={},o,l){let e=await Bun.file(t.filePath).text(),u=await Mt(t.filePath),g=await Gt(e,r,t.filePath),v={...u||{},...g||{},...n,params:r,$route:{path:t.pattern,params:r}},w=new Set,p=[],P=[],E={...l,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(R)=>{p.push(`${f.relative(process.cwd(),R.templatePath)}: ${R.message}
|
|
8
|
-
resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{P.push(`${f.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Nt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let S=await i(e,v,t.filePath,E,w);for(let R of[t.filePath,...w])for(let
|
|
8
|
+
resolved against partialsDir: ${R.partialsDir}`)},onServerScriptError:(R)=>{P.push(`${f.relative(process.cwd(),R.sourcePath)} (${R.kind}): ${R.message}`)}};if(Nt(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let S=await i(e,v,t.filePath,E,w);for(let R of[t.filePath,...w])for(let A of ye(R))w.add(A);if(Object.keys(r).length>0){let R=`<script>if(window.stx)window.stx._rp=${JSON.stringify(r)};else window.__stx_rp=${JSON.stringify(r)};</script>`;if(S.includes("</head>"))S=S.replace("</head>",`${R}
|
|
9
9
|
</head>`);else S=`${R}
|
|
10
10
|
${S}`}if(S=await ve(S,{router:o.router}),S=await b(S),o.minify!==!1)return{html:Ht(S),dependencies:Array.from(w),includeFailures:p,serverScriptFailures:P};return{html:S,dependencies:Array.from(w),includeFailures:p,serverScriptFailures:P}}function Ht(t){let r=[],n=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,l;while((l=o.exec(t))!==null){let u=t.slice(n,l.index);r.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let g=l[1],v=l[2],w=l[3];v=v.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),r.push(g+v+w),n=l.index+l[0].length}let e=t.slice(n);return r.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),r.join("").trim()}function zt(t){let r=0;for(let n=0;n<t.length;n++){let o=t.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return`"${Math.abs(r).toString(36)}"`}function Wt(t,r,n,o){if(n?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(r))return!0;return o.some((l)=>{if(l instanceof RegExp)return l.test(t);return l.endsWith("/")?t===l.slice(0,-1)||t.startsWith(l):t===l})}function qt(t,r){return`<?xml version="1.0" encoding="UTF-8"?>
|
|
11
11
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
@@ -37,18 +37,15 @@ ${t.map((o)=>{let l=new URL(o.loc,r).href,e=` <url>
|
|
|
37
37
|
${n.join(`
|
|
38
38
|
`)}
|
|
39
39
|
</channel>
|
|
40
|
-
</rss>`}async function Vt(t={}){let r=Date.now();rn();let n=await a(process.cwd()),o=n.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:n});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,w={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-
|
|
41
|
-
const validate = ${it[1]};
|
|
42
|
-
return validate(route);
|
|
43
|
-
`)({params:N})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await mt(k,N,St,e,n);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
40
|
+
</rss>`}async function Vt(t={}){let r=Date.now();rn();let n=await a(process.cwd()),o=n.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:n});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,w={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-hvd3hxs4.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:S}=await import("./chunk-edb768c0.js"),R=await S(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let A=new pt(e.cacheDir,E);if(e.cache)await A.load();try{let{generateCss:d}=await import("./chunk-hvd3hxs4.js");await d('<div class="bg-black"></div>')}catch{}_t();let wt=n?.routeMiddleware?.dir||"middleware";await Et(process.cwd(),wt);let V=Ct();if(V.length>0)console.log(`Loaded ${V.length} middleware: ${V.join(", ")}`);let yt=n?.routeMiddleware?.global||[];nc(n?.layoutsDir,c(process.cwd()));let Z=G(".",{pagesDir:e.pagesDir,pagesDirs:n?._layerPageDirs});console.log(`Found ${Z.length} routes`);let L=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)L.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=L.length+u.failedCount,console.log(`Generating ${L.length} pages...`);let U=[],Q=[];for(let d=0;d<L.length;d+=e.concurrency)Q.push(L.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:_,props:St,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let M=await Bun.file(k.filePath).text(),T=Yt(M),xt=T?.middleware?Array.isArray(T.middleware)?T.middleware:[T.middleware]:[],nt=[...yt,...xt];if(nt.length>0){let B=Tt(h,_,T||{}),H=$t(B,null,void 0,{isServer:!0}),j=await Rt(nt,H);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,z=Zt(String(C),h),O=Qt(h,e);await D.promises.mkdir(f.dirname(O),{recursive:!0}),await Bun.write(O,z),u.successCount++,u.pages.push({route:h,outputPath:O,size:Buffer.byteLength(z),cached:!1}),U.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=T?.validate;if(typeof it==="function")try{if(!await it({params:_})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=A.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await mt(k,_,St,e,n);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
44
41
|
${B.includeFailures.join(`
|
|
45
42
|
`)}
|
|
46
43
|
Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&B.serverScriptFailures.length>0)throw Error(`${B.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
|
47
44
|
${B.serverScriptFailures.join(`
|
|
48
45
|
`)}
|
|
49
|
-
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)
|
|
46
|
+
Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)A.set(h,k.filePath,B.dependencies,I)}let N;if(e.trailingSlash)N=f.join(e.outputDir,h,"index.html");else N=h==="/"?f.join(e.outputDir,"index.html"):f.join(e.outputDir,`${h}.html`);if(e.chunkIslands){let{html:B,chunks:H}=ot(I,{integrity:e.integrityIslands,minify:e.minify});if(H.length>0){let j=f.join(e.outputDir,"_stx","islands");await D.promises.mkdir(j,{recursive:!0});for(let C of H){let z=f.join(j,`${C.hash}.js`);if(!await Bun.file(z).exists())await Bun.write(z,C.code);if(!g.has(C.hash)){g.add(C.hash);let O=Buffer.byteLength(C.code,"utf8");v+=O,w[C.hash]={bytes:O,file:`/_stx/islands/${C.hash}.js`}}}if(p[h]=H.map((C)=>C.hash),I=B,e.prefetchIslands)I=ct(I)}}if(await D.promises.mkdir(f.dirname(N),{recursive:!0}),await Bun.write(N,I),!Wt(h,I,T,e.sitemapExclude))U.push({loc:h,lastmod:new Date().toISOString().split("T")[0],priority:h==="/"?1:0.8});let at={route:h,outputPath:N,size:Buffer.byteLength(I,"utf8"),cached:st};if(rt!==!1)at.revalidateAt=Date.now()+rt*1000;u.pages.push(at),u.successCount++,await e.hooks.onPageEnd?.(h,I)}catch(M){u.failedCount++,u.errors.push({route:h,error:M}),await e.hooks.onError?.(M,h),console.error(`Error generating ${h}:`,M)}}));let tt=nn();if(tt.length>0){let d=tt.map((m)=>`${m.filePath}: ${m.message}`).join(`
|
|
50
47
|
`);throw Error(`Client script bundling failed:
|
|
51
|
-
${d}`)}if(e.cache)await
|
|
48
|
+
${d}`)}if(e.cache)await A.save();if(e.generate404){let d=f.join(e.pagesDir,"404.stx");if(await Bun.file(d).exists()){let m=new Set,k={...n,minifyClient:!0,debug:!1,cache:!1},h=await i(await Bun.file(d).text(),{},d,k,m);await Bun.write(f.join(e.outputDir,"404.html"),h)}else await Bun.write(f.join(e.outputDir,"404.html"),`<!DOCTYPE html>
|
|
52
49
|
<html lang="en">
|
|
53
50
|
<head>
|
|
54
51
|
<meta charset="UTF-8">
|
|
@@ -69,7 +66,7 @@ ${d}`)}if(e.cache)await T.save();if(e.generate404){let d=f.join(e.pagesDir,"404.
|
|
|
69
66
|
<a href="/">Go home</a>
|
|
70
67
|
</div>
|
|
71
68
|
</body>
|
|
72
|
-
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},
|
|
69
|
+
</html>`)}for(let d of[500]){let m=f.join(e.pagesDir,`${d}.stx`);if(await Bun.file(m).exists()){let k=new Set,h={...n,minifyClient:!0,debug:!1,cache:!1},_=await i(await Bun.file(m).text(),{},m,h,k);await Bun.write(f.join(e.outputDir,`${d}.html`),_)}}let K=f.join(e.pagesDir,"error.stx");if(await Bun.file(K).exists()){let d=new Set,m={...n,minifyClient:!0,debug:!1,cache:!1},k=await i(await Bun.file(K).text(),{},K,m,d);await Bun.write(f.join(e.outputDir,"error.html"),k)}if(e.sitemap&&U.length>0){let d=qt(U,e.domain),m=f.join(e.outputDir,"sitemap.xml");await Bun.write(m,d),u.sitemapPath=m,console.log(`Generated sitemap.xml with ${U.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},m=[...e.sitemapExclude.filter((h)=>typeof h==="string"),...d.disallow||[]],k=$s({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...m.length>0?{disallow:m}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(f.join(e.outputDir,"robots.txt"),k),console.log("Generated robots.txt")}if(e.rss){let d=typeof e.rss==="object"?e.rss:{title:"Site Feed",description:"Latest updates",link:e.domain},m=[];if(d.getItems)m=await d.getItems();let k=Jt(d,m),h=f.join(e.outputDir,"rss.xml");await Bun.write(h,k),u.rssPath=h,console.log(`Generated rss.xml with ${m.length} items`)}let W=ec(e.outputDir);if(W.assets>0)console.log(`Externalized ${W.assets} asset(s) from ${W.pages} page(s) (${(W.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let q=tc(e.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} repeated asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&D.existsSync(e.publicDir))await Y(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let et=tr();if(et)await Y(et,f.join(e.outputDir,er)),console.log(`Copied assets from ${en}`)}catch(E){throw await e.hooks.onError?.(E),E}if(u.buildTime=Date.now()-r,g.size>0){u.islandChunks={count:g.size,totalBytes:v};let E={generatedChunks:g.size,totalBytes:v,chunks:w,pages:p};await Bun.write(f.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(E,null,2))}await e.hooks.onBuildEnd?.(u);let P=u.islandChunks?`
|
|
73
70
|
Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
|
|
74
71
|
Build complete!
|
|
75
72
|
Total: ${u.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.841",
|
|
5
5
|
"description": "A performant UI Framework. Powered by Bun.",
|
|
6
6
|
"author": "Chris Breuer <chris@stacksjs.org>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"dependencies": {
|
|
129
129
|
"@stacksjs/ts-css": "^0.3.21",
|
|
130
130
|
"@stacksjs/clapp": "^0.2.16",
|
|
131
|
-
"@stacksjs/desktop": "0.2.
|
|
132
|
-
"@stacksjs/sanitizer": "0.2.
|
|
131
|
+
"@stacksjs/desktop": "0.2.841",
|
|
132
|
+
"@stacksjs/sanitizer": "0.2.841",
|
|
133
133
|
"@stacksjs/ts-i18n": "^0.1.11",
|
|
134
|
-
"bun-plugin-stx": "0.2.
|
|
134
|
+
"bun-plugin-stx": "0.2.841",
|
|
135
135
|
"bunfig": "^0.15.21",
|
|
136
|
-
"stx-router": "0.2.
|
|
136
|
+
"stx-router": "0.2.841",
|
|
137
137
|
"ts-broadcasting": "^0.0.11",
|
|
138
138
|
"ts-images": "^0.2.22",
|
|
139
139
|
"ts-syntax-highlighter": "^0.2.1"
|
package/dist/chunk-7ka7pvj9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Jg}from"./chunk-ynf16yz4.js";import"./chunk-1zfxmjrf.js";import"./chunk-31cnrpd1.js";import"./chunk-aza2zrhk.js";import"./chunk-4dxq7ft1.js";import"./chunk-rdn1d4bf.js";import"./chunk-n8a4jm0p.js";import"./chunk-4w3qpewn.js";import"./chunk-1b1ntgt7.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-mzj71r0m.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{Jg as startInteractive};
|
package/dist/chunk-7t9951at.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{xo,fh,gh}from"./chunk-8q3pyq6a.js";import"./chunk-cw1ar3dq.js";import"./chunk-ksr6c2kh.js";import"./chunk-4y6hes3h.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{gh as clearComposableCache,fh as getComposableScript,xo as listComposableModules};
|
package/dist/chunk-8z3yjex0.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{sr,i}from"./chunk-1zfxmjrf.js";import"./chunk-31cnrpd1.js";import"./chunk-aza2zrhk.js";import"./chunk-4dxq7ft1.js";import"./chunk-rdn1d4bf.js";import"./chunk-n8a4jm0p.js";import"./chunk-4w3qpewn.js";import"./chunk-1b1ntgt7.js";import"./chunk-jzh0n2ct.js";import{ve}from"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-mzj71r0m.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import{Ne,Vs,Us}from"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{sr as buildModulesTag,ve as injectRouterScript,i as processDirectives,Vs as processJsonDirective,Us as processOnceDirective,Ne as validateClientScript};
|
package/dist/chunk-8zzepd7g.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Zg}from"./chunk-8913k8g7.js";import"./chunk-yn17484y.js";import"./chunk-xx3reejx.js";import"./chunk-ksr6c2kh.js";import"./chunk-n8a4jm0p.js";import"./chunk-aekq1zyn.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{Zg as startProductionServer};
|
package/dist/chunk-98258444.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{im}from"./chunk-zyeg9t2t.js";import"./chunk-yn17484y.js";import"./chunk-xbcnnk8x.js";import"./chunk-xx3reejx.js";import"./chunk-ksr6c2kh.js";import"./chunk-1zfxmjrf.js";import"./chunk-31cnrpd1.js";import"./chunk-aza2zrhk.js";import"./chunk-4dxq7ft1.js";import"./chunk-rdn1d4bf.js";import"./chunk-n8a4jm0p.js";import"./chunk-4w3qpewn.js";import"./chunk-1b1ntgt7.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-mzj71r0m.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{im as buildForProduction};
|
package/dist/chunk-mad4g0yx.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{$a,Ra,Aa,Pa,Eh}from"./chunk-vr6qa0g2.js";import"./chunk-ca3c5qx2.js";import"./chunk-d1vkjxb1.js";import"./chunk-9xps62ek.js";import"./chunk-1zfxmjrf.js";import"./chunk-31cnrpd1.js";import"./chunk-aza2zrhk.js";import"./chunk-4dxq7ft1.js";import"./chunk-rdn1d4bf.js";import"./chunk-n8a4jm0p.js";import"./chunk-4w3qpewn.js";import"./chunk-1b1ntgt7.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-mzj71r0m.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{$a as buildNative,Eh as default,Ra as findCraftBinary,Pa as getAvailableFormats,Aa as getAvailableTargets};
|
package/dist/chunk-n8a4jm0p.js
DELETED
package/dist/chunk-phxkmjnw.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ch,vo,lh,uh,dh,ph}from"./chunk-5hmm01av.js";import"./chunk-cw1ar3dq.js";import"./chunk-ksr6c2kh.js";import"./chunk-4y6hes3h.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{ph as clearStoreCache,ch as getStoreScript,dh as getStoreScriptFor,uh as pageStoresAll,vo as storesRead,lh as storesReadInFiles};
|
package/dist/chunk-rt29w5ns.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Rl,Al}from"./chunk-v49rvx9y.js";import"./chunk-qk079ca7.js";import"./chunk-ynf16yz4.js";import"./chunk-nk7nxzxf.js";import"./chunk-8913k8g7.js";import"./chunk-ngnr831a.js";import"./chunk-g7rsd8st.js";import"./chunk-gpschnvk.js";import"./chunk-zyeg9t2t.js";import"./chunk-yn17484y.js";import"./chunk-v3q126ys.js";import"./chunk-q0s0kc66.js";import"./chunk-jc5y35b7.js";import"./chunk-r0ssa1xd.js";import"./chunk-bq7qcndg.js";import"./chunk-wbgc2n04.js";import"./chunk-1m16mvt4.js";import"./chunk-7t57cnz9.js";import"./chunk-t3p0jy0s.js";import"./chunk-t0jed809.js";import"./chunk-pqg6j26p.js";import"./chunk-8y3f5fyg.js";import"./chunk-mhyd24bg.js";import"./chunk-zvy88beh.js";import"./chunk-a9tzjqny.js";import"./chunk-4j08cbjd.js";import"./chunk-5hmm01av.js";import"./chunk-8q3pyq6a.js";import"./chunk-xbcnnk8x.js";import"./chunk-d1vkjxb1.js";import"./chunk-9xps62ek.js";import"./chunk-321e41ck.js";import{tn}from"./chunk-xx3reejx.js";import"./chunk-cw1ar3dq.js";import"./chunk-ksr6c2kh.js";import"./chunk-4y6hes3h.js";import{Ae,i}from"./chunk-1zfxmjrf.js";import"./chunk-31cnrpd1.js";import"./chunk-aza2zrhk.js";import"./chunk-4dxq7ft1.js";import"./chunk-rdn1d4bf.js";import"./chunk-n8a4jm0p.js";import"./chunk-4w3qpewn.js";import"./chunk-1b1ntgt7.js";import"./chunk-jzh0n2ct.js";import{ve}from"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import{dr,pr}from"./chunk-mzj71r0m.js";import{ks,F,a}from"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import{m,je}from"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";import"./chunk-p9d2txcg.js";import"./chunk-x110ssw2.js";export{ks as buildWebComponents,pr as cacheTemplate,dr as checkCache,tn as classifyAllScripts,Rl as createMiddleware,Al as createRoute,F as defaultConfig,m as extractVariables,ve as injectRouterScript,a as loadStxConfig,je as processClientScript,i as processDirectives,Ae as readMarkdownFile};
|
package/dist/chunk-s92f8w68.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ca,nm,la,rm,Fl,zl,sm,om}from"./chunk-gpschnvk.js";import"./chunk-8q3pyq6a.js";import"./chunk-cw1ar3dq.js";import"./chunk-ksr6c2kh.js";import"./chunk-4y6hes3h.js";import"./chunk-jzh0n2ct.js";import"./chunk-aekq1zyn.js";import"./chunk-2fj5zev7.js";import"./chunk-p83h2dbg.js";import"./chunk-efdfkfp1.js";import"./chunk-11y84h2d.js";import"./chunk-4657mnht.js";import"./chunk-zg44cf8a.js";import"./chunk-2j5yane9.js";import{Ot,tg}from"./chunk-xvhxxj4g.js";import"./chunk-jjyt3tsv.js";import"./chunk-8370x30n.js";import"./chunk-89d3h8mp.js";import"./chunk-zjqvbcwa.js";import"./chunk-23r3rby6.js";export{ca as buildScriptVirtualFile,nm as buildVirtualSource,Ot as extractScriptBlocks,tg as extractTemplateExpressions,Fl as findRuntimeTypeDeclarations,zl as findStxModuleDeclarations,om as formatTypecheckDiagnostics,rm as sourcePathFor,sm as typecheckStxFiles,la as virtualPathFor};
|