@stacksjs/stx 0.2.701 → 0.2.703

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.
Files changed (102) hide show
  1. package/dist/chunk-03rwab7g.js +2 -0
  2. package/dist/{chunk-hc8p4hdr.js → chunk-0e5vpnzr.js} +1 -1
  3. package/dist/chunk-0qdgt6gc.js +2 -0
  4. package/dist/chunk-0x2zqb7d.js +2 -0
  5. package/dist/{chunk-dg3p7esg.js → chunk-27n1yqtw.js} +11 -11
  6. package/dist/{chunk-tzvy4pms.js → chunk-2f7d7mjb.js} +1 -1
  7. package/dist/{chunk-0vpk16gq.js → chunk-2gzrx4ma.js} +7 -7
  8. package/dist/{chunk-cq21rc0g.js → chunk-2nqt1m3m.js} +2 -2
  9. package/dist/{chunk-6y2vagad.js → chunk-2vbnt58h.js} +5 -5
  10. package/dist/{chunk-x3hw124a.js → chunk-2xtzzx00.js} +1 -1
  11. package/dist/{chunk-edjgkheg.js → chunk-4t9cggwf.js} +1 -1
  12. package/dist/{chunk-db29j1pc.js → chunk-4v0w8h7w.js} +1 -1
  13. package/dist/{chunk-r7m0y6wk.js → chunk-4ykrvjss.js} +1 -1
  14. package/dist/chunk-51zgnftt.js +2 -0
  15. package/dist/{chunk-8mpszaz7.js → chunk-5349365w.js} +1 -1
  16. package/dist/{chunk-mt39bh7e.js → chunk-57vw2k0c.js} +4 -4
  17. package/dist/{chunk-3qtbdrfc.js → chunk-5j9mxa2q.js} +1 -1
  18. package/dist/{chunk-kqkfs9a7.js → chunk-5tdq6crw.js} +3 -3
  19. package/dist/{chunk-fkxt007p.js → chunk-8afh663x.js} +9 -9
  20. package/dist/{chunk-6vd0vpsj.js → chunk-8g6rqh9v.js} +1 -1
  21. package/dist/chunk-8ne5d50r.js +2 -0
  22. package/dist/chunk-9ctjadsk.js +2 -0
  23. package/dist/{chunk-a2z5emw7.js → chunk-9dz8xj1j.js} +1 -1
  24. package/dist/chunk-9yq5wttm.js +2 -0
  25. package/dist/{chunk-h2jbgvfs.js → chunk-a4fmk7qf.js} +5 -5
  26. package/dist/{chunk-nvtk2198.js → chunk-a6df4es1.js} +1 -1
  27. package/dist/{chunk-mpxnqpyw.js → chunk-a9qetxqw.js} +1 -1
  28. package/dist/{chunk-y9qbnvq4.js → chunk-bxcneh6f.js} +1 -1
  29. package/dist/{chunk-6r5p7p4t.js → chunk-c7kbywge.js} +2 -2
  30. package/dist/{chunk-3e350ywf.js → chunk-cp0889bs.js} +7 -7
  31. package/dist/{chunk-qzkm3ekg.js → chunk-cr1xkjg5.js} +1 -1
  32. package/dist/{chunk-meesnrhz.js → chunk-eejn8aqh.js} +2 -2
  33. package/dist/{chunk-yw4bs6fh.js → chunk-f66x2hff.js} +1 -1
  34. package/dist/{chunk-55mcxp2b.js → chunk-f6yzgf9s.js} +2 -2
  35. package/dist/{chunk-0ztgcyvw.js → chunk-ff68f7sm.js} +1 -1
  36. package/dist/{chunk-1rsfpx9h.js → chunk-ft534en1.js} +36 -36
  37. package/dist/{chunk-r6q8m9wz.js → chunk-fyaedq4a.js} +1 -1
  38. package/dist/{chunk-asr5yx4s.js → chunk-g575srz3.js} +1 -1
  39. package/dist/{chunk-4zsykpm6.js → chunk-gabr4cq6.js} +2 -2
  40. package/dist/chunk-ha4vb9a6.js +2 -0
  41. package/dist/chunk-ht0dycd1.js +2 -0
  42. package/dist/{chunk-7wgezbch.js → chunk-jahes462.js} +4 -4
  43. package/dist/{chunk-yft8yn6y.js → chunk-jkywbfb0.js} +2 -2
  44. package/dist/chunk-mrxmbenj.js +2 -0
  45. package/dist/{chunk-45es05ph.js → chunk-n2ema4wf.js} +2 -2
  46. package/dist/chunk-ndsw688j.js +2 -0
  47. package/dist/{chunk-fx2y2wv7.js → chunk-pmgwk7yr.js} +10 -10
  48. package/dist/{chunk-0h8k4jbx.js → chunk-prc2b120.js} +1 -1
  49. package/dist/chunk-ptv1ye08.js +2 -0
  50. package/dist/{chunk-csrahdyk.js → chunk-q510c32j.js} +2 -2
  51. package/dist/chunk-q60c63an.js +2 -0
  52. package/dist/{chunk-hckj9ejj.js → chunk-q7mcakeg.js} +5 -5
  53. package/dist/{chunk-dyx9zcwy.js → chunk-qxey1fsb.js} +1 -1
  54. package/dist/{chunk-emymxrhc.js → chunk-r2n8kpzq.js} +1 -1
  55. package/dist/{chunk-vm4ab62v.js → chunk-r2tmvna1.js} +1 -1
  56. package/dist/{chunk-avvngqyb.js → chunk-rf3haj5d.js} +1 -1
  57. package/dist/{chunk-12n3tyb2.js → chunk-rg94ez9c.js} +1 -1
  58. package/dist/{chunk-g15vfggh.js → chunk-s4qje08f.js} +3 -3
  59. package/dist/chunk-s8dc9bvk.js +2 -0
  60. package/dist/{chunk-r27qnema.js → chunk-t8zyce19.js} +1 -1
  61. package/dist/{chunk-9qj87w6v.js → chunk-v7xv88cv.js} +1 -1
  62. package/dist/{chunk-06dv852k.js → chunk-w7e28p74.js} +3 -3
  63. package/dist/chunk-w8fbyhr1.js +2 -0
  64. package/dist/chunk-wsdqxpjh.js +2 -0
  65. package/dist/{chunk-zzgc9dhz.js → chunk-xbckkzqb.js} +1 -1
  66. package/dist/{chunk-pdeg77hy.js → chunk-xen2gsqb.js} +1 -1
  67. package/dist/chunk-ynzhp77r.js +2 -0
  68. package/dist/{chunk-a51avg0f.js → chunk-yxwvj7fs.js} +3 -3
  69. package/dist/chunk-yyx89zxs.js +2 -0
  70. package/dist/chunk-z0x54ynx.js +3 -0
  71. package/dist/{chunk-hbs0140f.js → chunk-z1wmhe0g.js} +1 -1
  72. package/dist/{chunk-dcqjdbkp.js → chunk-z9csfarm.js} +1 -1
  73. package/dist/{chunk-qe0h2e7e.js → chunk-zw6jbzfm.js} +1 -1
  74. package/dist/cli.js +9 -9
  75. package/dist/craft-entry.js +1 -1
  76. package/dist/craft.js +1 -1
  77. package/dist/native/compiler/html-to-ir.js +16 -0
  78. package/dist/native/compiler/ir.d.ts +1 -0
  79. package/dist/native/runtime/native-host.d.ts +1 -1
  80. package/dist/native/runtime/native-host.js +3 -1
  81. package/dist/pwa.js +1 -1
  82. package/dist/ssg.js +8 -8
  83. package/package.json +5 -5
  84. package/dist/chunk-2v86a093.js +0 -2
  85. package/dist/chunk-3sr52w0c.js +0 -2
  86. package/dist/chunk-3w2b2t27.js +0 -2
  87. package/dist/chunk-3yb6j6wb.js +0 -2
  88. package/dist/chunk-4fhawjhe.js +0 -2
  89. package/dist/chunk-5jw550wk.js +0 -2
  90. package/dist/chunk-84sfk1ab.js +0 -2
  91. package/dist/chunk-a3rhve9y.js +0 -2
  92. package/dist/chunk-amcsa9xc.js +0 -2
  93. package/dist/chunk-k2hrwk7d.js +0 -3
  94. package/dist/chunk-kbvtnx10.js +0 -2
  95. package/dist/chunk-pe086860.js +0 -2
  96. package/dist/chunk-pksz8dq4.js +0 -2
  97. package/dist/chunk-s58y73kg.js +0 -2
  98. package/dist/chunk-sx3gnrpe.js +0 -2
  99. package/dist/chunk-tmhs3hev.js +0 -2
  100. package/dist/chunk-vdpmppe9.js +0 -2
  101. package/dist/chunk-vwdy0xyz.js +0 -2
  102. package/dist/chunk-zfjqw81c.js +0 -2
@@ -500,8 +500,24 @@ export async function translateHtmlToIR(html, options = {}) {
500
500
  project(child);
501
501
  };
502
502
  project(root);
503
+ boundScrollingViewports(root);
503
504
  return { root, diagnostics };
504
505
  }
506
+ function boundScrollingViewports(node) {
507
+ if (["ScrollView", "FlatList", "SectionList"].includes(node.type))
508
+ return !node.props.horizontal && (Number(node.style.flex) > 0 || Number(node.style.flexGrow) > 0);
509
+ if (!node.children.map((child) => typeof child === "string" ? !1 : boundScrollingViewports(child)).some(Boolean) || !["View", "SafeAreaView", "KeyboardAvoidingView"].includes(node.type))
510
+ return !1;
511
+ if (node.style.height !== void 0 || node.style.maxHeight !== void 0)
512
+ return !1;
513
+ if (node.style.flex === 0 || node.style.flexGrow === 0 || node.style.flexShrink === 0)
514
+ return !1;
515
+ if (node.style.flex === void 0 && node.style.flexGrow === void 0) {
516
+ node._layoutDefaults = { flex: 1, flexGrow: 1, flexShrink: 1, flexBasis: 0 };
517
+ node.style = { ...node._layoutDefaults, ...node.style };
518
+ }
519
+ return !0;
520
+ }
505
521
  function collapseOutsideMustaches(text, inside) {
506
522
  let out = "", i = 0;
507
523
  while (i < text.length) {
@@ -19,6 +19,7 @@ export declare interface STXNode {
19
19
  directives?: STXDirectives
20
20
  darkStyle?: STXStyle
21
21
  children: (STXNode | string)[]
22
+ _layoutDefaults?: STXStyle
22
23
  _inlineStyle?: STXStyle
23
24
  _styleSource?: string
24
25
  _styleAncestors?: string[]
@@ -52,7 +52,7 @@ export declare interface NativeHost {
52
52
  remove: (node: NativeNode) => void
53
53
  descendants: (node: NativeNode) => NativeNode[]
54
54
  scopesIn: (node: NativeNode) => string[]
55
- adopt: (node: NativeNode, type: string, owner?: NativeNode | null, descriptor?: Pick<STXNode, 'key' | 'props' | 'style' | 'events' | 'children' | '_classes' | '_inlineStyle' | '_styleSource' | '_styleAncestors'>) => NativeNode
55
+ adopt: (node: NativeNode, type: string, owner?: NativeNode | null, descriptor?: Pick<STXNode, 'key' | 'props' | 'style' | 'events' | 'children' | '_classes' | '_inlineStyle' | '_layoutDefaults' | '_styleSource' | '_styleAncestors'>) => NativeNode
56
56
  flush: () => void
57
57
  dispatch: (handlerId: string, payload?: unknown) => void
58
58
  pending: () => number
@@ -390,7 +390,7 @@ export function createNativeHost(options) {
390
390
  }
391
391
  Object.assign(classStyle, focused);
392
392
  }
393
- return { ...applyNativeLayoutDefaults({ ...classStyle, ...record.dividerStyle, ...resolved.styles[0], ...record.baseStyle, ...resolved.styles[1], ...resolved.styles[2] }), ...record.visible && !isHiddenInput(record) ? {} : { display: "none" } };
393
+ return { ...applyNativeLayoutDefaults({ ...record.layoutDefaults, ...classStyle, ...record.dividerStyle, ...resolved.styles[0], ...record.baseStyle, ...resolved.styles[1], ...resolved.styles[2] }), ...record.visible && !isHiddenInput(record) ? {} : { display: "none" } };
394
394
  }
395
395
  function refreshFocusChain(node) {
396
396
  for (let current = node;current; current = current.__stxOwner) {
@@ -588,6 +588,7 @@ export function createNativeHost(options) {
588
588
  props: authoredTextEntryProps(authoredAccessibilityProps(descriptor?.props ?? {}, descriptor?._accessibilitySource), descriptor?._textEntrySource),
589
589
  style: { ...descriptor?.style ?? {} },
590
590
  baseStyle,
591
+ layoutDefaults: descriptor?._layoutDefaults,
591
592
  styleSource: descriptor?._styleSource,
592
593
  styleAncestors: descriptor?._styleAncestors,
593
594
  inheritedVariables: owner ? descriptorOf(owner)?.variables : stylesheetVariables,
@@ -1120,6 +1121,7 @@ export function createNativeHost(options) {
1120
1121
  props: { ...descriptor.props, __stxId: copy.__stxId },
1121
1122
  style: { ...descriptor.style },
1122
1123
  baseStyle: { ...descriptor.baseStyle },
1124
+ layoutDefaults: { ...descriptor.layoutDefaults },
1123
1125
  styleSource: descriptor.styleSource,
1124
1126
  styleAncestors: descriptor.styleAncestors,
1125
1127
  inheritedVariables: descriptor.inheritedVariables,
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  import{Bs,Bt,nl,rg}from"./chunk-ywzh979k.js";import{js,gi,eg,tg,ng}from"./chunk-y91rz3rq.js";import{Qc,el,tl,Zf,Qf}from"./chunk-ccqe741j.js";import{He,kn,mi}from"./chunk-44c1mbye.js";import{sg,og,ig,ag,Fs,Dh}from"./chunk-c3hr5mm2.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-sx3gnrpe.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>
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-0x2zqb7d.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,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-45es05ph.js";import{y,Lc}from"./chunk-xc03cdet.js";import"./chunk-cq21rc0g.js";import"./chunk-k7pmzreg.js";import{Et}from"./chunk-1rsfpx9h.js";import"./chunk-3392k9vm.js";import"./chunk-mpxnqpyw.js";import"./chunk-2p34qf9c.js";import{wt,xt,St,kt,_t,Ct}from"./chunk-m4j9gedb.js";import{i}from"./chunk-6y2vagad.js";import{us}from"./chunk-p78v88ng.js";import"./chunk-fgr56q3w.js";import"./chunk-55mcxp2b.js";import{Ee,Jt,Yt}from"./chunk-mt39bh7e.js";import"./chunk-9qj87w6v.js";import{h}from"./chunk-7wgezbch.js";import{gt,o}from"./chunk-fkxt007p.js";import"./chunk-a51avg0f.js";import"./chunk-3e350ywf.js";import"./chunk-hckj9ejj.js";import"./chunk-meesnrhz.js";import"./chunk-bsr9wnq4.js";import{Oa,Na,Da}from"./chunk-b3sw5ykg.js";import{Gt,Wn,qn}from"./chunk-k2hrwk7d.js";import{Xt}from"./chunk-pdeg77hy.js";import"./chunk-cbdyns7r.js";import{q,ye}from"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-0ztgcyvw.js";import{c}from"./chunk-93ft5jea.js";import{r,fe}from"./chunk-hkmewh5h.js";import k from"fs";import p from"path";import{createHash as Pt}from"crypto";function $t(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Rt(t){return Bun.hash(t).toString(16)}function at(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let a=new Map,s=t.replace(Dt,(e,u,f,x)=>{let m=x.trim();if(!m)return e;if(/\bdata-stx-src=/.test(f))return e;if(n.minify)m=$t(m);let b=Rt(m);if(!a.has(b))a.set(b,m);let v=n.integrity?` data-stx-integrity="sha384-${Pt("sha384").update(m).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${b}.js"${v}${f}></script>`}),l=Array.from(a,([e,u])=>({hash:e,code:u}));return{html:s,chunks:l}}var It=new Set(["visible","idle"]);function ot(t){if(!t.includes("data-stx-src="))return t;let n=new Map,a=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,s;while((s=a.exec(t))!==null)n.set(s[1],s[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(It.has(n.get(u[1])||""))l.add(u[2]);let f=t.lastIndexOf("</head>");if(l.size===0||f===-1)return t;let x=Array.from(l).filter((m)=>!t.includes(`rel="prefetch" href="${m}"`)).map((m)=>`<link rel="prefetch" href="${m}" as="script">`).join("");if(!x)return t;return t.slice(0,f)+x+t.slice(f)}var Bt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let n=t.trim();if(!n)return null;let a=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(a).origin+new URL(a).pathname.replace(/\/$/,"")}catch{return null}}function jt(t){for(let n of Bt){let a=t[n];if(!a)continue;let s=K(a);if(s)return{url:s,source:"env",via:n}}return null}function ct(t){if(!t||typeof t!=="object")return null;let n=t,a=n.site?.url??n.url??n.app?.url;return typeof a==="string"?K(a):null}async function Ft(t){let{existsSync:n}=await import("fs"),a=await import("path");for(let s of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=a.resolve(t,s);if(!n(l))continue;try{let e=await import(l),u=ct(e.default??e);if(u)return u}catch{}}return null}async function lt(t={}){let n=t.cwd??process.cwd(),a=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let s=ct(t.stxConfig);if(s)return{url:s,source:"stx.config",via:"site.url"};let l=await Ft(n);if(l)return{url:l,source:"site.config",via:"url"};let e=jt(a);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ut(){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(`
2
+ import"./chunk-n2ema4wf.js";import{y,Lc}from"./chunk-xc03cdet.js";import"./chunk-2nqt1m3m.js";import"./chunk-k7pmzreg.js";import{Et}from"./chunk-ft534en1.js";import"./chunk-3392k9vm.js";import"./chunk-a9qetxqw.js";import"./chunk-2p34qf9c.js";import{wt,xt,St,kt,_t,Ct}from"./chunk-m4j9gedb.js";import{i}from"./chunk-2vbnt58h.js";import{us}from"./chunk-p78v88ng.js";import"./chunk-fgr56q3w.js";import"./chunk-f6yzgf9s.js";import{Ee,Jt,Yt}from"./chunk-57vw2k0c.js";import"./chunk-v7xv88cv.js";import{h}from"./chunk-jahes462.js";import{gt,o}from"./chunk-8afh663x.js";import"./chunk-yxwvj7fs.js";import"./chunk-cp0889bs.js";import"./chunk-q7mcakeg.js";import"./chunk-eejn8aqh.js";import"./chunk-bsr9wnq4.js";import{Oa,Na,Da}from"./chunk-b3sw5ykg.js";import{Kt,Wn,qn}from"./chunk-z0x54ynx.js";import{Xt}from"./chunk-xen2gsqb.js";import"./chunk-cbdyns7r.js";import{q,ye}from"./chunk-a4fmk7qf.js";import"./chunk-vfjenjez.js";import"./chunk-ff68f7sm.js";import{c}from"./chunk-93ft5jea.js";import{r,fe}from"./chunk-hkmewh5h.js";import k from"fs";import p from"path";import{createHash as Pt}from"crypto";function $t(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Rt(t){return Bun.hash(t).toString(16)}function at(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let a=new Map,s=t.replace(Dt,(e,u,f,x)=>{let m=x.trim();if(!m)return e;if(/\bdata-stx-src=/.test(f))return e;if(n.minify)m=$t(m);let b=Rt(m);if(!a.has(b))a.set(b,m);let v=n.integrity?` data-stx-integrity="sha384-${Pt("sha384").update(m).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${b}.js"${v}${f}></script>`}),l=Array.from(a,([e,u])=>({hash:e,code:u}));return{html:s,chunks:l}}var It=new Set(["visible","idle"]);function ot(t){if(!t.includes("data-stx-src="))return t;let n=new Map,a=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,s;while((s=a.exec(t))!==null)n.set(s[1],s[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(It.has(n.get(u[1])||""))l.add(u[2]);let f=t.lastIndexOf("</head>");if(l.size===0||f===-1)return t;let x=Array.from(l).filter((m)=>!t.includes(`rel="prefetch" href="${m}"`)).map((m)=>`<link rel="prefetch" href="${m}" as="script">`).join("");if(!x)return t;return t.slice(0,f)+x+t.slice(f)}var Bt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let n=t.trim();if(!n)return null;let a=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(a).origin+new URL(a).pathname.replace(/\/$/,"")}catch{return null}}function jt(t){for(let n of Bt){let a=t[n];if(!a)continue;let s=K(a);if(s)return{url:s,source:"env",via:n}}return null}function ct(t){if(!t||typeof t!=="object")return null;let n=t,a=n.site?.url??n.url??n.app?.url;return typeof a==="string"?K(a):null}async function Ft(t){let{existsSync:n}=await import("fs"),a=await import("path");for(let s of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=a.resolve(t,s);if(!n(l))continue;try{let e=await import(l),u=ct(e.default??e);if(u)return u}catch{}}return null}async function lt(t={}){let n=t.cwd??process.cwd(),a=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let s=ct(t.stxConfig);if(s)return{url:s,source:"stx.config",via:"site.url"};let l=await Ft(n);if(l)return{url:l,source:"site.config",via:"url"};let e=jt(a);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ut(){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 W(t){return async()=>({paths:await t(),fallback:!1})}var Tt;function Ot(t){let n=r(t),{depths:a}=fe(n),s=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=s.exec(n))!==null){if(a[l.index]!==0)continue;let u=y(n,"(",")",s.lastIndex-1),f=n.indexOf("{",u+1),x=y(n,"{","}",f);if(u<0||f<0||x<0)break;return t.slice(l.index,x+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(n))!==null){if(a[l.index]!==0)continue;let u=Lc(n,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 dt(t){let n="read";try{let a=await Bun.file(t).text();n="parse";let s=Xt(a),l=[...s.server,...s.client,...s.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(r(e.attrs))).sort((e,u)=>a.indexOf(e.fullTag)-a.indexOf(u.fullTag));for(let e of l){if(!/\bgetStaticPaths\b/.test(r(e.content)))continue;let u=(Tt??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(r(u)))continue;let f=Ot(u);if(/\bdefineStaticPaths\b/.test(r(f))&&Et(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let x=Function("defineStaticPaths",`return (${f})`)(W);if(typeof x!=="function")throw TypeError("getStaticPaths must be a function");let m=await x();n="result";let b=Array.isArray(m)?{paths:m}:m;if(!b||typeof b!=="object"||!("paths"in b)||!Array.isArray(b.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let v of b.paths)if(!v||typeof v!=="object"||!v.params||typeof v.params!=="object"||Array.isArray(v.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:b}}return{kind:"absent"}}catch(a){return{kind:"error",phase:n,error:a instanceof Error?a:Error(String(a))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=p.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[a,s]of Object.entries(n))this.cache.set(a,s)}catch{}this.loaded=!0}async save(){await k.promises.mkdir(this.cacheDir,{recursive:!0});let t=p.join(this.cacheDir,"build-cache.json"),n={};for(let[a,s]of this.cache)n[a]=s;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let a=k.statSync(t),s=`${this.salt}|${t}:${a.mtimeMs}`;for(let e of n)if(k.existsSync(e)){let u=k.statSync(e);s+=`:${e}:${u.mtimeMs}`}let l=0;for(let e=0;e<s.length;e++){let u=s.charCodeAt(e);l=(l<<5)-l+u,l=l&l}return Math.abs(l).toString(36)}get(t,n){let a=this.cache.get(t);if(!a)return null;let s=this.getHash(n,a.dependencies??[]);if(a.hash!==s)return this.cache.delete(t),null;return a.html}set(t,n,a,s){let l=this.getHash(n,a);this.cache.set(t,{hash:l,html:s,generatedAt:Date.now(),dependencies:a})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return p.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let a=this.getFilePath(t);await k.promises.mkdir(p.dirname(a),{recursive:!0}),await Bun.write(a,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await k.promises.unlink(n)}async invalidatePattern(t){let n=p.join(this.cacheDir,"isr");if(!k.existsSync(n))return;let a=await k.promises.readdir(n);for(let s of a){let l=s.replace(/_/g,"/").replace(".json","");if(t.test(l))await k.promises.unlink(p.join(n,s))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function At(t){let n=[];if(!t.isDynamic)n.push({url:t.pattern,params:{}});else{let a=await dt(t.filePath);if(a.kind==="error")throw Error(`getStaticPaths ${a.phase} failed for ${t.pattern} (${t.filePath}): ${a.error.message}`,{cause:a.error});if(a.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),n;let s=a.value;if(s.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),n;for(let l of s.paths){let e=t.pattern;for(let[u,f]of Object.entries(l.params))e=e.replace(`:${u}`,f).replace(`:${u}*`,f);n.push({url:e,params:l.params,props:l.props,revalidate:l.revalidate})}}return n}async function Lt(t){let n=[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"];for(let a of n)if(await Bun.file(a).exists())try{let s=await import(a);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:l,...e}=s;return e}}catch(s){console.error(`Error loading data file ${a}:`,s)}return null}async function Ut(t,n,a){let s=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!s)return null;let l=s[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]}
@@ -7,7 +7,7 @@ import"./chunk-45es05ph.js";import{y,Lc}from"./chunk-xc03cdet.js";import"./chunk
7
7
  `)(n)}catch(e){return console.error(`Error executing getStaticProps in ${a}:`,e),null}}function Mt(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 ft(t,n,a={},s,l){let e=await Bun.file(t.filePath).text(),u=await Lt(t.filePath),f=await Ut(e,n,t.filePath),x={...u||{},...f||{},...a,params:n,$route:{path:t.pattern,params:n}},m=new Set,b=[],v=[],R={...l,minifyClient:!0,...s.partialsDir?{partialsDir:s.partialsDir}:{},...s.componentsDir?{componentsDir:s.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(D)=>{b.push(`${p.relative(process.cwd(),D.templatePath)}: ${D.message}
8
8
  resolved against partialsDir: ${D.partialsDir}`)},onServerScriptError:(D)=>{v.push(`${p.relative(process.cwd(),D.sourcePath)} (${D.kind}): ${D.message}`)}};if(Mt(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 o(e,x,t.filePath,R,m);for(let D of[t.filePath,...m])for(let F of Ee(D))m.add(F);if(Object.keys(n).length>0){let D=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(S.includes("</head>"))S=S.replace("</head>",`${D}
9
9
  </head>`);else S=`${D}
10
- ${S}`}if(S=await ye(S,{router:s.router}),S=await h(S),s.minify!==!1)return{html:Nt(S),dependencies:Array.from(m),includeFailures:b,serverScriptFailures:v};return{html:S,dependencies:Array.from(m),includeFailures:b,serverScriptFailures:v}}function Nt(t){let n=[],a=0,s=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,l;while((l=s.exec(t))!==null){let u=t.slice(a,l.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let f=l[1],x=l[2],m=l[3];x=x.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),n.push(f+x+m),a=l.index+l[0].length}let e=t.slice(a);return n.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function zt(t){let n=0;for(let a=0;a<t.length;a++){let s=t.charCodeAt(a);n=(n<<5)-n+s,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Ht(t,n,a,s){if(a?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return s.some((l)=>{if(l instanceof RegExp)return l.test(t);return l.endsWith("/")?t===l.slice(0,-1)||t.startsWith(l):t===l})}function Wt(t,n){return`<?xml version="1.0" encoding="UTF-8"?>
10
+ ${S}`}if(S=await ye(S,{router:s.router}),S=await h(S),s.minify!==!1)return{html:Gt(S),dependencies:Array.from(m),includeFailures:b,serverScriptFailures:v};return{html:S,dependencies:Array.from(m),includeFailures:b,serverScriptFailures:v}}function Gt(t){let n=[],a=0,s=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,l;while((l=s.exec(t))!==null){let u=t.slice(a,l.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let f=l[1],x=l[2],m=l[3];x=x.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),n.push(f+x+m),a=l.index+l[0].length}let e=t.slice(a);return n.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function Nt(t){let n=0;for(let a=0;a<t.length;a++){let s=t.charCodeAt(a);n=(n<<5)-n+s,n=n&n}return`"${Math.abs(n).toString(36)}"`}function zt(t,n,a,s){if(a?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return s.some((l)=>{if(l instanceof RegExp)return l.test(t);return l.endsWith("/")?t===l.slice(0,-1)||t.startsWith(l):t===l})}function Ht(t,n){return`<?xml version="1.0" encoding="UTF-8"?>
11
11
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
12
12
  ${t.map((s)=>{let l=new URL(s.loc,n).href,e=` <url>
13
13
  <loc>${j(l)}</loc>`;if(s.lastmod)e+=`
@@ -16,7 +16,7 @@ ${t.map((s)=>{let l=new URL(s.loc,n).href,e=` <url>
16
16
  <priority>${s.priority}</priority>`;return e+=`
17
17
  </url>`,e}).join(`
18
18
  `)}
19
- </urlset>`}function j(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function qt(t,n){let a=n.map((s)=>{let l=" <item>";if(l+=`
19
+ </urlset>`}function j(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}function Wt(t,n){let a=n.map((s)=>{let l=" <item>";if(l+=`
20
20
  <title>${j(s.title)}</title>`,l+=`
21
21
  <link>${j(s.link)}</link>`,s.description)l+=`
22
22
  <description>${j(s.description)}</description>`;if(s.pubDate)l+=`
@@ -37,7 +37,7 @@ ${t.map((s)=>{let l=new URL(s.loc,n).href,e=` <url>
37
37
  ${a.join(`
38
38
  `)}
39
39
  </channel>
40
- </rss>`}async function Vt(t={}){let n=Date.now();Yt();let a=await i(process.cwd()),s=a.build||{},l=await lt({explicit:t.domain||s.domain,stxConfig:a});if(l.source==="fallback"&&(t.sitemap??s.sitemap??!0))console.warn(ut());let e={router:t.router??a?.router??{},pagesDir:t.pagesDir||s.pagesDir||"pages",outputDir:t.outputDir||s.outputDir||"dist",baseUrl:t.baseUrl||s.baseUrl||"/",domain:l.url,revalidate:t.revalidate??s.revalidate??!1,sitemap:t.sitemap??s.sitemap??!0,sitemapExclude:t.sitemapExclude||s.sitemapExclude||[],robots:t.robots??s.robots??!0,rss:t.rss??s.rss??!1,concurrency:t.concurrency||s.concurrency||10,cache:t.cache??s.cache??!0,cacheDir:t.cacheDir||s.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??s.minify??!0,generate404:t.generate404??s.generate404??!0,publicDir:t.publicDir||s.publicDir||"public",trailingSlash:t.trailingSlash??s.trailingSlash??!1,cleanOutput:t.cleanOutput??s.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||a?.partialsDir||"",componentsDir:t.componentsDir||a?.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:[]},f=new Set,x=0,m={},b={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&k.existsSync(e.outputDir))await k.promises.rm(e.outputDir,{recursive:!0});await k.promises.mkdir(e.outputDir,{recursive:!0});let R=e.cacheSalt;if(!R){let{resolveUserCssConfig:d,fingerprintConfig:w}=await import("./chunk-zfjqw81c.js");try{R=w(await d(process.cwd()))}catch{}}let{prepareImageDelivery:S}=await import("./chunk-hbs0140f.js"),D=await S(e.publicDir,e.outputDir);if(D.count>0)console.log(`Optimized ${D.count} image(s) for responsive delivery`),R=[R,D.fingerprint].filter(Boolean).join(":");let F=new pt(e.cacheDir,R);if(e.cache)await F.load();try{let{generateCss:d}=await import("./chunk-zfjqw81c.js");await d('<div class="bg-black"></div>')}catch{}wt();let mt=a?.routeMiddleware?.dir||"middleware";await St(process.cwd(),mt);let J=xt();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let yt=a?.routeMiddleware?.global||[];Da(a?.layoutsDir,c(process.cwd()));let Y=q(".",{pagesDir:e.pagesDir,pagesDirs:a?._layerPageDirs});console.log(`Found ${Y.length} routes`);let U=[];for(let d of Y)try{let w=await At(d);for(let P of w)U.push({route:d,url:P.url,params:P.params,props:P.props,revalidate:P.revalidate??e.revalidate})}catch(w){let P=w instanceof Error?w:Error(String(w));u.failedCount++,u.errors.push({route:d.pattern,error:P}),await e.hooks.onError?.(P,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,P)}u.totalPages=U.length+u.failedCount,console.log(`Generating ${U.length} pages...`);let M=[],Z=[];for(let d=0;d<U.length;d+=e.concurrency)Z.push(U.slice(d,d+e.concurrency));for(let d of Z)await Promise.all(d.map(async(w)=>{let{route:P,url:g,params:_,props:bt,revalidate:et}=w;try{await e.hooks.onPageStart?.(g);let T=await Bun.file(P.filePath).text(),O=Qt(T),vt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],rt=[...yt,...vt];if(rt.length>0){let I=kt(g,_,O||{}),A=_t(I,null,void 0,{isServer:!0}),B=await Ct(rt,A);if(B.redirect){let E=typeof B.redirect==="string"?B.redirect:B.redirect.path||B.redirect,N=te(String(E),g),L=ee(g,e);await k.promises.mkdir(p.dirname(L),{recursive:!0}),await Bun.write(L,N),u.successCount++,u.pages.push({route:g,outputPath:L,size:Buffer.byteLength(N),cached:!1}),M.push({loc:g,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${g} \u2192 redirect to ${E}`);return}if(B.abort){let E=typeof B.abort==="string"?B.abort:B.abort?.error?.message||"aborted";console.warn(` \u21B3 ${g} \u2014 middleware aborted: ${E}`);return}}let nt=T.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(nt)try{if(!await Function("route",`
40
+ </rss>`}async function qt(t={}){let n=Date.now();Yt();let a=await i(process.cwd()),s=a.build||{},l=await lt({explicit:t.domain||s.domain,stxConfig:a});if(l.source==="fallback"&&(t.sitemap??s.sitemap??!0))console.warn(ut());let e={router:t.router??a?.router??{},pagesDir:t.pagesDir||s.pagesDir||"pages",outputDir:t.outputDir||s.outputDir||"dist",baseUrl:t.baseUrl||s.baseUrl||"/",domain:l.url,revalidate:t.revalidate??s.revalidate??!1,sitemap:t.sitemap??s.sitemap??!0,sitemapExclude:t.sitemapExclude||s.sitemapExclude||[],robots:t.robots??s.robots??!0,rss:t.rss??s.rss??!1,concurrency:t.concurrency||s.concurrency||10,cache:t.cache??s.cache??!0,cacheDir:t.cacheDir||s.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??s.minify??!0,generate404:t.generate404??s.generate404??!0,publicDir:t.publicDir||s.publicDir||"public",trailingSlash:t.trailingSlash??s.trailingSlash??!1,cleanOutput:t.cleanOutput??s.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||a?.partialsDir||"",componentsDir:t.componentsDir||a?.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:[]},f=new Set,x=0,m={},b={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&k.existsSync(e.outputDir))await k.promises.rm(e.outputDir,{recursive:!0});await k.promises.mkdir(e.outputDir,{recursive:!0});let R=e.cacheSalt;if(!R){let{resolveUserCssConfig:d,fingerprintConfig:w}=await import("./chunk-ndsw688j.js");try{R=w(await d(process.cwd()))}catch{}}let{prepareImageDelivery:S}=await import("./chunk-z1wmhe0g.js"),D=await S(e.publicDir,e.outputDir);if(D.count>0)console.log(`Optimized ${D.count} image(s) for responsive delivery`),R=[R,D.fingerprint].filter(Boolean).join(":");let F=new pt(e.cacheDir,R);if(e.cache)await F.load();try{let{generateCss:d}=await import("./chunk-ndsw688j.js");await d('<div class="bg-black"></div>')}catch{}wt();let mt=a?.routeMiddleware?.dir||"middleware";await St(process.cwd(),mt);let J=xt();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let yt=a?.routeMiddleware?.global||[];Da(a?.layoutsDir,c(process.cwd()));let Y=q(".",{pagesDir:e.pagesDir,pagesDirs:a?._layerPageDirs});console.log(`Found ${Y.length} routes`);let U=[];for(let d of Y)try{let w=await At(d);for(let P of w)U.push({route:d,url:P.url,params:P.params,props:P.props,revalidate:P.revalidate??e.revalidate})}catch(w){let P=w instanceof Error?w:Error(String(w));u.failedCount++,u.errors.push({route:d.pattern,error:P}),await e.hooks.onError?.(P,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,P)}u.totalPages=U.length+u.failedCount,console.log(`Generating ${U.length} pages...`);let M=[],Z=[];for(let d=0;d<U.length;d+=e.concurrency)Z.push(U.slice(d,d+e.concurrency));for(let d of Z)await Promise.all(d.map(async(w)=>{let{route:P,url:g,params:_,props:bt,revalidate:et}=w;try{await e.hooks.onPageStart?.(g);let T=await Bun.file(P.filePath).text(),O=Qt(T),vt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],rt=[...yt,...vt];if(rt.length>0){let I=kt(g,_,O||{}),A=_t(I,null,void 0,{isServer:!0}),B=await Ct(rt,A);if(B.redirect){let E=typeof B.redirect==="string"?B.redirect:B.redirect.path||B.redirect,N=te(String(E),g),L=ee(g,e);await k.promises.mkdir(p.dirname(L),{recursive:!0}),await Bun.write(L,N),u.successCount++,u.pages.push({route:g,outputPath:L,size:Buffer.byteLength(N),cached:!1}),M.push({loc:g,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${g} \u2192 redirect to ${E}`);return}if(B.abort){let E=typeof B.abort==="string"?B.abort:B.abort?.error?.message||"aborted";console.warn(` \u21B3 ${g} \u2014 middleware aborted: ${E}`);return}}let nt=T.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(nt)try{if(!await Function("route",`
41
41
  const validate = ${nt[1]};
42
42
  return validate(route);
43
43
  `)({params:_})){console.warn(`Validation failed for ${g}, skipping...`);return}}catch{}let C=null,it=!1;if(e.cache){if(C=F.get(g,P.filePath),C)it=!0,u.cachedCount++}if(!C){let I=await ft(P,_,bt,e,a);if(C=I.html,e.failOnIncludeError&&I.includeFailures.length>0)throw Error(`${I.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
@@ -46,7 +46,7 @@ ${a.join(`
46
46
  Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&I.serverScriptFailures.length>0)throw Error(`${I.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
47
47
  ${I.serverScriptFailures.join(`
48
48
  `)}
49
- Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)F.set(g,P.filePath,I.dependencies,C)}let G;if(e.trailingSlash)G=p.join(e.outputDir,g,"index.html");else G=g==="/"?p.join(e.outputDir,"index.html"):p.join(e.outputDir,`${g}.html`);if(e.chunkIslands){let{html:I,chunks:A}=at(C,{integrity:e.integrityIslands,minify:e.minify});if(A.length>0){let B=p.join(e.outputDir,"_stx","islands");await k.promises.mkdir(B,{recursive:!0});for(let E of A){let N=p.join(B,`${E.hash}.js`);if(!await Bun.file(N).exists())await Bun.write(N,E.code);if(!f.has(E.hash)){f.add(E.hash);let L=Buffer.byteLength(E.code,"utf8");x+=L,m[E.hash]={bytes:L,file:`/_stx/islands/${E.hash}.js`}}}if(b[g]=A.map((E)=>E.hash),C=I,e.prefetchIslands)C=ot(C)}}if(await k.promises.mkdir(p.dirname(G),{recursive:!0}),await Bun.write(G,C),!Ht(g,C,O,e.sitemapExclude))M.push({loc:g,lastmod:new Date().toISOString().split("T")[0],priority:g==="/"?1:0.8});let st={route:g,outputPath:G,size:Buffer.byteLength(C,"utf8"),cached:it};if(et!==!1)st.revalidateAt=Date.now()+et*1000;u.pages.push(st),u.successCount++,await e.hooks.onPageEnd?.(g,C)}catch(T){u.failedCount++,u.errors.push({route:g,error:T}),await e.hooks.onError?.(T,g),console.error(`Error generating ${g}:`,T)}}));let Q=Jt();if(Q.length>0){let d=Q.map((w)=>`${w.filePath}: ${w.message}`).join(`
49
+ Set ssg.failOnServerScriptError to false to build anyway.`);if(e.cache)F.set(g,P.filePath,I.dependencies,C)}let G;if(e.trailingSlash)G=p.join(e.outputDir,g,"index.html");else G=g==="/"?p.join(e.outputDir,"index.html"):p.join(e.outputDir,`${g}.html`);if(e.chunkIslands){let{html:I,chunks:A}=at(C,{integrity:e.integrityIslands,minify:e.minify});if(A.length>0){let B=p.join(e.outputDir,"_stx","islands");await k.promises.mkdir(B,{recursive:!0});for(let E of A){let N=p.join(B,`${E.hash}.js`);if(!await Bun.file(N).exists())await Bun.write(N,E.code);if(!f.has(E.hash)){f.add(E.hash);let L=Buffer.byteLength(E.code,"utf8");x+=L,m[E.hash]={bytes:L,file:`/_stx/islands/${E.hash}.js`}}}if(b[g]=A.map((E)=>E.hash),C=I,e.prefetchIslands)C=ot(C)}}if(await k.promises.mkdir(p.dirname(G),{recursive:!0}),await Bun.write(G,C),!zt(g,C,O,e.sitemapExclude))M.push({loc:g,lastmod:new Date().toISOString().split("T")[0],priority:g==="/"?1:0.8});let st={route:g,outputPath:G,size:Buffer.byteLength(C,"utf8"),cached:it};if(et!==!1)st.revalidateAt=Date.now()+et*1000;u.pages.push(st),u.successCount++,await e.hooks.onPageEnd?.(g,C)}catch(T){u.failedCount++,u.errors.push({route:g,error:T}),await e.hooks.onError?.(T,g),console.error(`Error generating ${g}:`,T)}}));let Q=Jt();if(Q.length>0){let d=Q.map((w)=>`${w.filePath}: ${w.message}`).join(`
50
50
  `);throw Error(`Client script bundling failed:
51
51
  ${d}`)}if(e.cache)await F.save();if(e.generate404){let d=p.join(e.pagesDir,"404.stx");if(await Bun.file(d).exists()){let w=new Set,P={...a,minifyClient:!0,debug:!1,cache:!1},g=await o(await Bun.file(d).text(),{},d,P,w);await Bun.write(p.join(e.outputDir,"404.html"),g)}else await Bun.write(p.join(e.outputDir,"404.html"),`<!DOCTYPE html>
52
52
  <html lang="en">
@@ -69,7 +69,7 @@ ${d}`)}if(e.cache)await F.save();if(e.generate404){let d=p.join(e.pagesDir,"404.
69
69
  <a href="/">Go home</a>
70
70
  </div>
71
71
  </body>
72
- </html>`)}for(let d of[500]){let w=p.join(e.pagesDir,`${d}.stx`);if(await Bun.file(w).exists()){let P=new Set,g={...a,minifyClient:!0,debug:!1,cache:!1},_=await o(await Bun.file(w).text(),{},w,g,P);await Bun.write(p.join(e.outputDir,`${d}.html`),_)}}let V=p.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,w={...a,minifyClient:!0,debug:!1,cache:!1},P=await o(await Bun.file(V).text(),{},V,w,d);await Bun.write(p.join(e.outputDir,"error.html"),P)}if(e.sitemap&&M.length>0){let d=Wt(M,e.domain),w=p.join(e.outputDir,"sitemap.xml");await Bun.write(w,d),u.sitemapPath=w,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},w=[...e.sitemapExclude.filter((g)=>typeof g==="string"),...d.disallow||[]],P=us({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...w.length>0?{disallow:w}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(p.join(e.outputDir,"robots.txt"),P),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},w=[];if(d.getItems)w=await d.getItems();let P=qt(d,w),g=p.join(e.outputDir,"rss.xml");await Bun.write(g,P),u.rssPath=g,console.log(`Generated rss.xml with ${w.length} items`)}let z=Oa(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let H=Na(e.outputDir);if(H.assets>0)console.log(`Externalized ${H.assets} repeated asset(s) from ${H.pages} page(s) (${(H.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&k.existsSync(e.publicDir))await X(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let tt=qn();if(tt)await X(tt,p.join(e.outputDir,Wn)),console.log(`Copied assets from ${Gt}`)}catch(R){throw await e.hooks.onError?.(R),R}if(u.buildTime=Date.now()-n,f.size>0){u.islandChunks={count:f.size,totalBytes:x};let R={generatedChunks:f.size,totalBytes:x,chunks:m,pages:b};await Bun.write(p.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(R,null,2))}await e.hooks.onBuildEnd?.(u);let v=u.islandChunks?`
72
+ </html>`)}for(let d of[500]){let w=p.join(e.pagesDir,`${d}.stx`);if(await Bun.file(w).exists()){let P=new Set,g={...a,minifyClient:!0,debug:!1,cache:!1},_=await o(await Bun.file(w).text(),{},w,g,P);await Bun.write(p.join(e.outputDir,`${d}.html`),_)}}let V=p.join(e.pagesDir,"error.stx");if(await Bun.file(V).exists()){let d=new Set,w={...a,minifyClient:!0,debug:!1,cache:!1},P=await o(await Bun.file(V).text(),{},V,w,d);await Bun.write(p.join(e.outputDir,"error.html"),P)}if(e.sitemap&&M.length>0){let d=Ht(M,e.domain),w=p.join(e.outputDir,"sitemap.xml");await Bun.write(w,d),u.sitemapPath=w,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(e.robots!==!1){let d=typeof e.robots==="object"?e.robots:{},w=[...e.sitemapExclude.filter((g)=>typeof g==="string"),...d.disallow||[]],P=us({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...w.length>0?{disallow:w}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",e.domain).href}:{}});await Bun.write(p.join(e.outputDir,"robots.txt"),P),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},w=[];if(d.getItems)w=await d.getItems();let P=Wt(d,w),g=p.join(e.outputDir,"rss.xml");await Bun.write(g,P),u.rssPath=g,console.log(`Generated rss.xml with ${w.length} items`)}let z=Oa(e.outputDir);if(z.assets>0)console.log(`Externalized ${z.assets} asset(s) from ${z.pages} page(s) (${(z.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let H=Na(e.outputDir);if(H.assets>0)console.log(`Externalized ${H.assets} repeated asset(s) from ${H.pages} page(s) (${(H.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(e.publicDir&&k.existsSync(e.publicDir))await X(e.publicDir,e.outputDir),console.log(`Copied public assets from ${e.publicDir}`);let tt=qn();if(tt)await X(tt,p.join(e.outputDir,Wn)),console.log(`Copied assets from ${Kt}`)}catch(R){throw await e.hooks.onError?.(R),R}if(u.buildTime=Date.now()-n,f.size>0){u.islandChunks={count:f.size,totalBytes:x};let R={generatedChunks:f.size,totalBytes:x,chunks:m,pages:b};await Bun.write(p.join(e.outputDir,"_stx","islands-manifest.json"),JSON.stringify(R,null,2))}await e.hooks.onBuildEnd?.(u);let v=u.islandChunks?`
73
73
  Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
74
74
  Build complete!
75
75
  Total: ${u.totalPages} pages
@@ -77,7 +77,7 @@ Build complete!
77
77
  Cached: ${u.cachedCount}
78
78
  Failed: ${u.failedCount}
79
79
  Time: ${u.buildTime}ms${v}
80
- `),u}async function X(t,n){await k.promises.mkdir(n,{recursive:!0});let a=await k.promises.readdir(t,{withFileTypes:!0});for(let s of a){let l=p.join(t,s.name),e=p.join(n,s.name);if(s.isDirectory())await k.promises.mkdir(e,{recursive:!0}),await X(l,e);else await k.promises.copyFile(l,e)}}function Kt(t={}){let n=t.cacheDir||c(process.cwd(),"ssg-cache"),a=new ht(n),s=t.revalidate||3600;return{async get(l){let e=await a.get(l);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(l).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${s}, stale-while-revalidate=${s*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(l){let u=q(".",{pagesDir:t.pagesDir||"pages"}).find((v)=>l.match(v.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${l}`);return}let f=l.match(u.regex),x={};if(f)u.params.forEach((v,R)=>{x[v]=f[R+1]});let m=await i(),{html:b}=await ft(u,x,{},t,m);await a.set(l,{html:b,generatedAt:Date.now(),revalidateAfter:Date.now()+s*1000,etag:zt(b)}),console.log(`Revalidated: ${l}`)},async invalidate(l){if(typeof l==="string")await a.invalidate(l);else await a.invalidatePattern(l)}}}function Zt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let n=await Bun.file(t).text(),a=n.match(/^---\n([\s\S]*?)\n---/),s={},l=n;if(a){let m=a[1];l=n.slice(a[0].length).trim();for(let b of m.split(`
80
+ `),u}async function X(t,n){await k.promises.mkdir(n,{recursive:!0});let a=await k.promises.readdir(t,{withFileTypes:!0});for(let s of a){let l=p.join(t,s.name),e=p.join(n,s.name);if(s.isDirectory())await k.promises.mkdir(e,{recursive:!0}),await X(l,e);else await k.promises.copyFile(l,e)}}function Vt(t={}){let n=t.cacheDir||c(process.cwd(),"ssg-cache"),a=new ht(n),s=t.revalidate||3600;return{async get(l){let e=await a.get(l);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(l).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${s}, stale-while-revalidate=${s*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(l){let u=q(".",{pagesDir:t.pagesDir||"pages"}).find((v)=>l.match(v.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${l}`);return}let f=l.match(u.regex),x={};if(f)u.params.forEach((v,R)=>{x[v]=f[R+1]});let m=await i(),{html:b}=await ft(u,x,{},t,m);await a.set(l,{html:b,generatedAt:Date.now(),revalidateAfter:Date.now()+s*1000,etag:Nt(b)}),console.log(`Revalidated: ${l}`)},async invalidate(l){if(typeof l==="string")await a.invalidate(l);else await a.invalidatePattern(l)}}}function Zt(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let n=await Bun.file(t).text(),a=n.match(/^---\n([\s\S]*?)\n---/),s={},l=n;if(a){let m=a[1];l=n.slice(a[0].length).trim();for(let b of m.split(`
81
81
  `)){let v=b.indexOf(":");if(v>0){let R=b.slice(0,v).trim(),S=b.slice(v+1).trim();if(S==="true")S=!0;else if(S==="false")S=!1;else if(/^\d+$/.test(S))S=parseInt(S,10);else if(/^\d+\.\d+$/.test(S))S=parseFloat(S);else if(S.startsWith("[")&&S.endsWith("]"))S=S.slice(1,-1).split(",").map((D)=>D.trim().replace(/^['"]|['"]$/g,""));s[R]=S}}}let e=l.replace(/^### (.*$)/gim,"<h3>$1</h3>").replace(/^## (.*$)/gim,"<h2>$1</h2>").replace(/^# (.*$)/gim,"<h1>$1</h1>").replace(/\*\*(.*)\*\*/gim,"<strong>$1</strong>").replace(/\*(.*)\*/gim,"<em>$1</em>").replace(/`([^`]+)`/gim,"<code>$1</code>").replace(/\[([^\]]+)\]\(([^)]+)\)/gim,'<a href="$2">$1</a>').replace(/\n/gim,"<br>"),u=[],f=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,x;while((x=f.exec(e))!==null){let m=parseInt(x[1],10),b=x[2],v=b.toLowerCase().replace(/[^a-z0-9]+/g,"-");u.push({id:v,text:b,level:m})}return{content:e,data:s,toc:u}}}}function Qt(t){return gt(t)}function te(t,n){return`<!DOCTYPE html>
82
82
  <html>
83
83
  <head>
@@ -90,4 +90,4 @@ Build complete!
90
90
  <p>Redirecting to <a href="${t}">${t}</a>...</p>
91
91
  <script>window.location.replace('${t}')</script>
92
92
  </body>
93
- </html>`}function ee(t,n){if(t==="/"||t==="")return p.join(n.outputDir,"index.html");let a=t.replace(/^\/|\/$/g,"");if(n.trailingSlash)return p.join(n.outputDir,a,"index.html");return p.join(n.outputDir,`${a}.html`)}var je={generateStaticSite:Vt,createISRHandler:Kt,defineStaticPaths:W,createMarkdownLoader:Zt};export{Kt as createISRHandler,Zt as createMarkdownLoader,Mt as declaresPageAction,je as default,W as defineStaticPaths,Vt as generateStaticSite,Ht as isExcludedFromSitemap};
93
+ </html>`}function ee(t,n){if(t==="/"||t==="")return p.join(n.outputDir,"index.html");let a=t.replace(/^\/|\/$/g,"");if(n.trailingSlash)return p.join(n.outputDir,a,"index.html");return p.join(n.outputDir,`${a}.html`)}var je={generateStaticSite:qt,createISRHandler:Vt,defineStaticPaths:W,createMarkdownLoader:Zt};export{Vt as createISRHandler,Zt as createMarkdownLoader,Mt as declaresPageAction,je as default,W as defineStaticPaths,qt as generateStaticSite,zt as isExcludedFromSitemap};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.701",
4
+ "version": "0.2.703",
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.11",
130
130
  "@stacksjs/clapp": "^0.2.16",
131
- "@stacksjs/desktop": "0.2.701",
132
- "@stacksjs/sanitizer": "0.2.701",
131
+ "@stacksjs/desktop": "0.2.703",
132
+ "@stacksjs/sanitizer": "0.2.703",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
- "bun-plugin-stx": "0.2.701",
134
+ "bun-plugin-stx": "0.2.703",
135
135
  "bunfig": "^0.15.21",
136
- "stx-router": "0.2.701",
136
+ "stx-router": "0.2.703",
137
137
  "ts-broadcasting": "^0.0.11",
138
138
  "ts-images": "^0.2.22",
139
139
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lg}from"./chunk-nvtk2198.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Lg as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qg,ta,Ul,Kg,Gg,Xg,Jg,Yg,Wl,ql,Zg,Qg,em,tm}from"./chunk-g15vfggh.js";import"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-9qj87w6v.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Ul as SUSPENSE_RESOLVER_RUNTIME,ta as buildSuspenseResolveScript,Yg as createStreamRenderer,Xg as extractStreamBoundaries,tm as generateHydrationRuntime,ql as islandDirective,Qg as processSectionDirectives,Gg as processStreamDirectives,Zg as registerStreamingDirectives,Kg as renderStreamingPage,qg as streamTemplate,Jg as streamTemplateSimple,em as streamToResponse,Wl as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{pf,Zr}from"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-vfjenjez.js";import{mr}from"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import{tt}from"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{tt as freeIdentifiers,Zr as processComponents,pf as processESImports,mr as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ml,Hi,xg,hl,yl,Sg,kg}from"./chunk-csrahdyk.js";import"./chunk-r7m0y6wk.js";import"./chunk-mt39bh7e.js";import"./chunk-55mcxp2b.js";import"./chunk-45es05ph.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import{Rt,Rf}from"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{ml as buildVirtualSource,Rt as extractScriptBlocks,Rf as extractTemplateExpressions,hl as findRuntimeTypeDeclarations,yl as findStxModuleDeclarations,kg as formatTypecheckDiagnostics,xg as sourcePathFor,Sg as typecheckStxFiles,Hi as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{yg}from"./chunk-6vd0vpsj.js";import"./chunk-kqkfs9a7.js";import"./chunk-pdeg77hy.js";import"./chunk-55mcxp2b.js";import"./chunk-h2jbgvfs.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{yg as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xl,Bg,Sl,kl,Fg,zg}from"./chunk-a2z5emw7.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{zg as applySlots,Fg as extractSlotContent,Bg as parseSlotElement,xl as parseSlots,kl as processSlots,Sl as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zm,df,Ke,za,Qm,Gr,Xr,Jr}from"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-vfjenjez.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Qm as clearOnceStore,za as onceStore,Ke as partialsCache,Gr as processIncludes,Xr as processStackPushDirectives,Jr as processStackReplacements,Zm as resetUnscopedSignalWarnings,df as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$m,Rm}from"./chunk-avvngqyb.js";import"./chunk-mt39bh7e.js";import"./chunk-55mcxp2b.js";import"./chunk-45es05ph.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Rm as clearStoreCache,$m as getStoreScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Gn,Te}from"./chunk-45es05ph.js";export{Gn as describeBuildFailure,Te as formatBuildFailure};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import t from"fs";import r from"path";var Gt="resources/assets",Wn="assets";function qn(o=process.cwd()){let s=r.resolve(o,Gt);return t.existsSync(s)&&t.statSync(s).isDirectory()?s:null}
3
- export{Gt,Wn,qn};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ia,aa,ca,la,Um}from"./chunk-12n3tyb2.js";import"./chunk-0vpk16gq.js";import"./chunk-4zsykpm6.js";import"./chunk-9ra3ne11.js";import"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-9qj87w6v.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{ia as buildNative,Um as default,aa as findCraftBinary,la as getAvailableFormats,ca as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{eo,Am,Pm}from"./chunk-r7m0y6wk.js";import"./chunk-mt39bh7e.js";import"./chunk-55mcxp2b.js";import"./chunk-45es05ph.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Pm as clearComposableCache,Am as getComposableScript,eo as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qs,Li,Or,Ks,Gs,Cn,Ut,ji,Nr,Dr,Xs,Js,bg,vg,lt}from"./chunk-06dv852k.js";export{lt as DeployError,Li as calculateSha1,Or as collectDeployFiles,Dr as createDefaultNetlifyConfig,Ks as createFileManifest,qs as createNetlifyClient,bg as deploy,Nr as detectProjectConfig,Gs as filterRequiredFiles,Cn as formatSize,ji as generateNetlifyToml,Ut as getTotalSize,Js as hasNetlifyConfig,vg as initNetlify,Xs as writeNetlifyConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hg}from"./chunk-qe0h2e7e.js";import"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-9qj87w6v.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{hg as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xn,o}from"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import{ye}from"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-9qj87w6v.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import{Pe,Es,Ts}from"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Xn as buildModulesTag,ye as injectRouterScript,o as processDirectives,Es as processJsonDirective,Ts as processOnceDirective,Pe as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Kr,Qn,uf}from"./chunk-meesnrhz.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import{$t}from"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{uf as declareBareLoopHead,$t as parseLoopBinding,Qn as processLoops,Kr as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cg}from"./chunk-3qtbdrfc.js";import"./chunk-kqkfs9a7.js";import"./chunk-dcqjdbkp.js";import"./chunk-pdeg77hy.js";import"./chunk-55mcxp2b.js";import"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import"./chunk-9qj87w6v.js";import"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{Cg as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ol,il}from"./chunk-dg3p7esg.js";import"./chunk-qe0h2e7e.js";import"./chunk-6vd0vpsj.js";import"./chunk-06dv852k.js";import"./chunk-bfhks7zf.js";import"./chunk-csrahdyk.js";import"./chunk-8w4y3dx3.js";import"./chunk-3qtbdrfc.js";import"./chunk-kqkfs9a7.js";import"./chunk-k296qq0p.js";import"./chunk-b2j7s1a2.js";import"./chunk-nvtk2198.js";import"./chunk-1kr1mpft.js";import"./chunk-a2z5emw7.js";import"./chunk-983zpa57.js";import"./chunk-d597d0dp.js";import"./chunk-sxf17xfc.js";import"./chunk-yw4bs6fh.js";import"./chunk-416jy1m5.js";import"./chunk-g15vfggh.js";import"./chunk-2v7t87n8.js";import"./chunk-zggdhtmn.js";import"./chunk-e3yhx053.js";import"./chunk-njhd845r.js";import"./chunk-t27fecet.js";import"./chunk-4sesw88b.js";import"./chunk-avvngqyb.js";import"./chunk-r7m0y6wk.js";import"./chunk-dcqjdbkp.js";import"./chunk-4zsykpm6.js";import"./chunk-9ra3ne11.js";import"./chunk-b3sw5ykg.js";import{Xt}from"./chunk-pdeg77hy.js";import"./chunk-mt39bh7e.js";import"./chunk-55mcxp2b.js";import"./chunk-45es05ph.js";import{$e,o}from"./chunk-fkxt007p.js";import"./chunk-7wgezbch.js";import"./chunk-bsr9wnq4.js";import"./chunk-meesnrhz.js";import"./chunk-3e350ywf.js";import"./chunk-a51avg0f.js";import"./chunk-cbdyns7r.js";import"./chunk-hckj9ejj.js";import{ye}from"./chunk-h2jbgvfs.js";import"./chunk-vfjenjez.js";import{rr,sr}from"./chunk-9qj87w6v.js";import{os,N,i}from"./chunk-6y2vagad.js";import"./chunk-0ztgcyvw.js";import"./chunk-2p34qf9c.js";import"./chunk-fgr56q3w.js";import"./chunk-p78v88ng.js";import"./chunk-m4j9gedb.js";import{g,De}from"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";import"./chunk-3ys3sa08.js";import"./chunk-7smgebdq.js";export{os as buildWebComponents,sr as cacheTemplate,rr as checkCache,Xt as classifyAllScripts,ol as createMiddleware,il as createRoute,N as defaultConfig,g as extractVariables,ye as injectRouterScript,i as loadStxConfig,De as processClientScript,o as processDirectives,$e as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Gm,Ba,Xm,Fa,of,af,rn,Zn,Jm,cf,lf,Ym,h}from"./chunk-7wgezbch.js";import"./chunk-9qj87w6v.js";import"./chunk-1rsfpx9h.js";import"./chunk-mpxnqpyw.js";import"./chunk-3392k9vm.js";import"./chunk-xc03cdet.js";import"./chunk-k7pmzreg.js";import"./chunk-cq21rc0g.js";export{rn as buildCss,cf as extractClassNames,af as fingerprintConfig,lf as generateCss,Jm as getCachedCSS,Gm as getCssServeAsset,h as injectCss,Ba as loadCssEngine,Fa as loadCssEngineConfig,Zn as rebuildCss,Xm as resetCssCache,of as resolveUserCssConfig,Ym as withLinkedModuleBundles};