@stacksjs/stx 0.2.890 → 0.2.892

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 (126) hide show
  1. package/dist/{chunk-94j4p584.js → chunk-0ky8gsvf.js} +1 -1
  2. package/dist/{chunk-vxbvrbqs.js → chunk-0wd2h9b2.js} +2 -2
  3. package/dist/chunk-18vtanxc.js +2 -0
  4. package/dist/chunk-1hvr0kan.js +2 -0
  5. package/dist/{chunk-wedwczed.js → chunk-1jza82sh.js} +1 -1
  6. package/dist/{chunk-yesh4dfe.js → chunk-2carg287.js} +4 -4
  7. package/dist/{chunk-xwrjre34.js → chunk-2eq3aret.js} +1 -1
  8. package/dist/{chunk-kr2400c3.js → chunk-2gp2m4fq.js} +1 -1
  9. package/dist/{chunk-v1mwwben.js → chunk-2tm29n87.js} +2 -2
  10. package/dist/{chunk-3yvmaphj.js → chunk-3bxq3nbz.js} +1 -1
  11. package/dist/chunk-3ngbdap1.js +2 -0
  12. package/dist/{chunk-49xwf7dk.js → chunk-40wq4yde.js} +2 -2
  13. package/dist/chunk-484x27q5.js +2 -0
  14. package/dist/{chunk-9344rq4r.js → chunk-584w4x9q.js} +1 -1
  15. package/dist/{chunk-wy6vjz1e.js → chunk-5b9y6cae.js} +19 -19
  16. package/dist/{chunk-1bft48gk.js → chunk-5zs5hrgz.js} +2 -2
  17. package/dist/{chunk-vkfw9k1n.js → chunk-6chwb38w.js} +8 -8
  18. package/dist/chunk-6pzrv1fd.js +2 -0
  19. package/dist/{chunk-0wp23n1d.js → chunk-6xyqhbrp.js} +1 -1
  20. package/dist/{chunk-bm0mzk3b.js → chunk-79agzry9.js} +1 -1
  21. package/dist/chunk-7mag1jnj.js +2 -0
  22. package/dist/{chunk-1w0bqqh5.js → chunk-7x0tfpfs.js} +1 -1
  23. package/dist/{chunk-nhv81gp2.js → chunk-8raf8qpm.js} +2 -2
  24. package/dist/{chunk-zf68afyh.js → chunk-8y39f6z3.js} +3 -3
  25. package/dist/{chunk-4akw3bym.js → chunk-90qwzwsm.js} +1 -1
  26. package/dist/{chunk-ch9028z3.js → chunk-9f8fda1j.js} +1 -1
  27. package/dist/{chunk-97snfzsy.js → chunk-9jysje1r.js} +19 -19
  28. package/dist/chunk-a33zxt0c.js +2 -0
  29. package/dist/{chunk-xmg6bmh6.js → chunk-ac3e6nhg.js} +3 -3
  30. package/dist/{chunk-1t15z230.js → chunk-adgwf5p0.js} +2 -2
  31. package/dist/{chunk-sztr4d5g.js → chunk-b5ag687r.js} +1 -1
  32. package/dist/{chunk-v90nz5xm.js → chunk-b74heqjh.js} +4 -4
  33. package/dist/chunk-b7ps2e5m.js +2 -0
  34. package/dist/{chunk-9a9cec4x.js → chunk-bf9363rs.js} +1 -1
  35. package/dist/{chunk-eq86wzhr.js → chunk-bnqjj9a6.js} +35 -27
  36. package/dist/{chunk-8f8qgjjr.js → chunk-d52v5808.js} +1 -1
  37. package/dist/chunk-d8t463k9.js +2 -0
  38. package/dist/{chunk-6svc4kb8.js → chunk-da5dyp40.js} +9 -9
  39. package/dist/{chunk-p0bjbtdx.js → chunk-dd0atx19.js} +5 -5
  40. package/dist/{chunk-40k0r6z9.js → chunk-dsdhft2k.js} +1 -1
  41. package/dist/{chunk-k8bk685s.js → chunk-e3ec9c31.js} +1 -1
  42. package/dist/{chunk-xeyq6d0t.js → chunk-fyyfsjy1.js} +1 -1
  43. package/dist/chunk-g4zbfjd4.js +2 -0
  44. package/dist/{chunk-1jtsr42q.js → chunk-gcjqxvbb.js} +6 -2
  45. package/dist/{chunk-adsqckg4.js → chunk-gdg89bp0.js} +4 -4
  46. package/dist/{chunk-r7m60q1m.js → chunk-gh6skca7.js} +1 -1
  47. package/dist/{chunk-35j7gaj5.js → chunk-gk0h2hp7.js} +1 -1
  48. package/dist/chunk-gpe2qdaa.js +2 -0
  49. package/dist/chunk-gscc3cyr.js +3 -0
  50. package/dist/{chunk-8ccgty8s.js → chunk-gzc16hs8.js} +2 -2
  51. package/dist/{chunk-xy8smv5e.js → chunk-h7yme97q.js} +2 -2
  52. package/dist/chunk-jf9a4vdq.js +2 -0
  53. package/dist/{chunk-rd663v1m.js → chunk-k4gkjabr.js} +1 -1
  54. package/dist/{chunk-aj5tsksz.js → chunk-kd7k31x3.js} +4 -4
  55. package/dist/{chunk-t0ttxayz.js → chunk-kfbw96c5.js} +2 -2
  56. package/dist/chunk-krdkkg1m.js +2 -0
  57. package/dist/chunk-kv5st7dx.js +2 -0
  58. package/dist/{chunk-g3vce7ka.js → chunk-m4h31n4w.js} +1 -1
  59. package/dist/{chunk-qnf7w4xw.js → chunk-mkpgr3cy.js} +3 -3
  60. package/dist/{chunk-gfea8a9y.js → chunk-mrw23g6x.js} +1 -1
  61. package/dist/{chunk-whcrca58.js → chunk-mxf6cfbg.js} +6 -6
  62. package/dist/{chunk-9rjgq8k4.js → chunk-n64zbwzr.js} +1 -1
  63. package/dist/chunk-n6rqssaf.js +2 -0
  64. package/dist/chunk-nh5pna5s.js +2 -0
  65. package/dist/{chunk-690518hw.js → chunk-pjpf21y9.js} +1 -1
  66. package/dist/chunk-ppf1dey1.js +2 -0
  67. package/dist/{chunk-c25q87ys.js → chunk-q102460n.js} +1 -1
  68. package/dist/{chunk-12cjs6vs.js → chunk-q9pnps31.js} +1 -1
  69. package/dist/{chunk-0k437z3q.js → chunk-qn45rk5n.js} +1 -1
  70. package/dist/{chunk-t3zmfh8w.js → chunk-qrk535j6.js} +4 -4
  71. package/dist/{chunk-zpqjsnz9.js → chunk-r9m7c7nq.js} +1 -1
  72. package/dist/chunk-rdzt8vxa.js +2 -0
  73. package/dist/{chunk-a3zrwky3.js → chunk-s8kvj5v8.js} +1 -1
  74. package/dist/{chunk-4eescf3s.js → chunk-sp65wfth.js} +4 -4
  75. package/dist/{chunk-2xnbdqy4.js → chunk-sqbq2q45.js} +2 -2
  76. package/dist/{chunk-kg7vby72.js → chunk-t8kzetfr.js} +5 -5
  77. package/dist/{chunk-j9vfv53x.js → chunk-thnna9h7.js} +1 -1
  78. package/dist/chunk-vm57848v.js +2 -0
  79. package/dist/{chunk-4d85str1.js → chunk-vya7cck4.js} +1 -1
  80. package/dist/chunk-wpdag2gh.js +2 -0
  81. package/dist/{chunk-cphc60zw.js → chunk-x9036mfd.js} +2 -2
  82. package/dist/{chunk-80ky40mm.js → chunk-xvprhdcb.js} +1 -1
  83. package/dist/{chunk-nzpb263k.js → chunk-yjptf9na.js} +5 -5
  84. package/dist/chunk-ynw19f6q.js +2 -0
  85. package/dist/{chunk-cmg9x1ka.js → chunk-z012vpdz.js} +3 -3
  86. package/dist/{chunk-2nqmw4dv.js → chunk-z8sv926e.js} +1 -1
  87. package/dist/chunk-z98d529z.js +2 -0
  88. package/dist/{chunk-b0hj8eg2.js → chunk-zb6yy424.js} +1 -1
  89. package/dist/{chunk-hyyh7qxw.js → chunk-zteb8tdv.js} +1 -1
  90. package/dist/cli.js +14 -14
  91. package/dist/client/signals-timer-runtime.js +4 -0
  92. package/dist/component-library.js +11 -3
  93. package/dist/component-renderer.js +23 -10
  94. package/dist/craft-entry.js +2 -2
  95. package/dist/craft.js +2 -2
  96. package/dist/native/prop-names.js +7 -2
  97. package/dist/native/runtime/craft-bridge.js +29 -2
  98. package/dist/native/runtime/craft.d.ts +32 -0
  99. package/dist/native/runtime/native-host.js +27 -11
  100. package/dist/pwa.js +1 -1
  101. package/dist/ssg.js +10 -10
  102. package/package.json +5 -5
  103. package/stx.d.ts +2 -1
  104. package/dist/chunk-0q0nbq50.js +0 -2
  105. package/dist/chunk-44teqn0b.js +0 -2
  106. package/dist/chunk-4xbtxeak.js +0 -2
  107. package/dist/chunk-6s3jwysv.js +0 -2
  108. package/dist/chunk-850tye3c.js +0 -2
  109. package/dist/chunk-amb7e0fp.js +0 -2
  110. package/dist/chunk-e8szp5wa.js +0 -2
  111. package/dist/chunk-hda7t8g6.js +0 -2
  112. package/dist/chunk-j6fs31va.js +0 -2
  113. package/dist/chunk-jvnsz2x9.js +0 -2
  114. package/dist/chunk-kexqmwx8.js +0 -2
  115. package/dist/chunk-kpjq135z.js +0 -2
  116. package/dist/chunk-kqsm7gf1.js +0 -2
  117. package/dist/chunk-mtfymhy1.js +0 -2
  118. package/dist/chunk-p82fzxdg.js +0 -2
  119. package/dist/chunk-qsv84cwm.js +0 -2
  120. package/dist/chunk-r98pye4h.js +0 -2
  121. package/dist/chunk-t4gcsbna.js +0 -2
  122. package/dist/chunk-tbh7r1wh.js +0 -2
  123. package/dist/chunk-vfcbz0an.js +0 -3
  124. package/dist/chunk-wmvvrsn0.js +0 -2
  125. package/dist/chunk-wnrh62by.js +0 -2
  126. package/dist/chunk-ymc1wgb3.js +0 -2
@@ -102,13 +102,17 @@ const NATIVE_PROP_NAMES = [
102
102
  "ghostText",
103
103
  "rowHeight",
104
104
  "labelFontSize",
105
+ "labelFontWeight",
106
+ "selectionInset",
107
+ "contentInset",
105
108
  "pictureInPicture",
106
109
  "transitionID",
107
110
  "dragData",
108
111
  "dragURL",
109
112
  "dropTypes",
110
113
  "dropInside",
111
- "selectTextOnFocus"
114
+ "selectTextOnFocus",
115
+ "iconOnly"
112
116
  ];
113
117
  export const NATIVE_BOOLEAN_PROPS = new Set([
114
118
  "alwaysBounceHorizontal",
@@ -149,7 +153,8 @@ export const NATIVE_BOOLEAN_PROPS = new Set([
149
153
  "showsCompass",
150
154
  "showsScale",
151
155
  "pictureInPicture",
152
- "grabberVisible"
156
+ "grabberVisible",
157
+ "iconOnly"
153
158
  ]);
154
159
  const nativePropNames = new Map(NATIVE_PROP_NAMES.map((name) => [normaliseKey(name), name]));
155
160
  function normaliseKey(name) {
@@ -8,6 +8,7 @@ const permissionFallbacks = new WeakSet;
8
8
  function capabilityFlags(capabilities) {
9
9
  return {
10
10
  desktop: capabilities.has("desktop"),
11
+ updater: capabilities.has("updater"),
11
12
  haptics: capabilities.has("haptics"),
12
13
  rawMotionSensors: capabilities.has("rawMotionSensors"),
13
14
  barometer: capabilities.has("barometer"),
@@ -413,6 +414,32 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
413
414
  setDefaultBrowser: () => request("Desktop", "setDefaultBrowser", [])
414
415
  };
415
416
  }
417
+ if (capabilities.has("updater") || capabilities.has("desktop")) {
418
+ const isStatus = (value) => !!value && typeof value === "object" && typeof value.state === "string", unavailable = () => ({
419
+ currentVersion: craft.app.version,
420
+ state: "unavailable",
421
+ selfUpdating: !1,
422
+ reason: "This version of the app cannot update itself."
423
+ }), failed = (error) => {
424
+ const code = String(error?.code ?? "");
425
+ if (["CAPABILITY_DISABLED", "UNSUPPORTED", "UNSUPPORTED_METHOD", "UNSUPPORTED_MODULE"].includes(code))
426
+ return unavailable();
427
+ const message = typeof error?.message === "string" ? error.message : String(error);
428
+ return { currentVersion: craft.app.version, state: "error", selfUpdating: !1, error: message };
429
+ }, answer = (method) => request("Updater", method, []).then((value) => isStatus(value) ? value : unavailable(), failed);
430
+ craft.updater = {
431
+ status: () => answer("status"),
432
+ check: () => answer("check"),
433
+ install: () => answer("install"),
434
+ relaunch: () => request("Updater", "relaunch", []).then(() => {
435
+ return;
436
+ }),
437
+ onChange: (callback) => protocol.on("CRAFT_EVENT", ({ payload }) => {
438
+ if (payload?.event === "craftUpdaterChange" && isStatus(payload.detail))
439
+ callback(payload.detail);
440
+ })
441
+ };
442
+ }
416
443
  if (capabilities.has("web")) {
417
444
  const call = (method, args) => request("Web", method, args), web = {
418
445
  create: (options = {}) => call("create", [options]),
@@ -1100,7 +1127,7 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
1100
1127
  return Promise.reject(TypeError("fetch in a native screen sends string bodies only"));
1101
1128
  if (body != null && (method === "GET" || method === "HEAD"))
1102
1129
  return Promise.reject(TypeError("A GET or HEAD request cannot have a body"));
1103
- const signal = init.signal || source.signal;
1130
+ const signal = init.signal || source.signal, omitCredentials = (init.credentials || source.credentials) === "omit";
1104
1131
  if (signal?.aborted)
1105
1132
  return Promise.reject(abortError(signal.reason));
1106
1133
  if (typeof init.onUploadProgress === "function" && !capabilities.has("uploadProgress"))
@@ -1113,7 +1140,7 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
1113
1140
  if (!signal?.aborted)
1114
1141
  init.onUploadProgress(value);
1115
1142
  });
1116
- return protocol.request("API_REQUEST", { version: 1, module: "Network", method: "fetch", args: [{ url, method, headers, body: body == null ? null : body, ...form ? { form } : {}, ...uploadProgressId ? { uploadProgressId } : {} }], ...form ? { untimed: !0 } : {} }, form ? null : void 0, signal).then((data) => {
1143
+ return protocol.request("API_REQUEST", { version: 1, module: "Network", method: "fetch", args: [{ url, method, headers, body: body == null ? null : body, ...omitCredentials ? { credentials: "omit" } : {}, ...form ? { form } : {}, ...uploadProgressId ? { uploadProgressId } : {} }], ...form ? { untimed: !0 } : {} }, form ? null : void 0, signal).then((data) => {
1117
1144
  const responseBody = data?.body == null ? "" : String(data.body);
1118
1145
  let bodyUsed = !1;
1119
1146
  return response(data, { get bodyUsed() {
@@ -256,6 +256,7 @@ export declare interface NativeCraft {
256
256
  barometer?: NativeBarometer
257
257
  liveActivity?: NativeLiveActivities
258
258
  desktop?: NativeDesktop
259
+ updater?: NativeUpdater
259
260
  web?: NativeWeb
260
261
  platform: string
261
262
  capabilityProtocolVersion: number
@@ -416,6 +417,35 @@ export declare interface NativeCraft {
416
417
  app: { url: string, version: string, build: string }
417
418
  background?: { complete: (ok?: boolean, id?: string) => Promise<boolean> }
418
419
  }
420
+ /** What `craft.updater` reports: in every answer and in every change. */
421
+ export declare interface NativeUpdateStatus {
422
+ currentVersion: string
423
+ state: NativeUpdateState
424
+ selfUpdating: boolean
425
+ reason?: string
426
+ version?: string
427
+ notes?: string
428
+ publishedAt?: string
429
+ progress?: number
430
+ error?: string
431
+ lastCheckedAt?: string
432
+ }
433
+ /**
434
+ * In-app updates (`craft.updater`), answered by the host's `Updater` module.
435
+ *
436
+ * Present on Craft's AppKit host. A host that has the surface but cannot
437
+ * update (no `updates` in its config, a Mac App Store build, a host older than
438
+ * the module) answers every call with `state: 'unavailable'` and
439
+ * `selfUpdating: false`, so a screen draws from the status and never from
440
+ * whether a call threw.
441
+ */
442
+ export declare interface NativeUpdater {
443
+ status: () => Promise<NativeUpdateStatus>
444
+ check: () => Promise<NativeUpdateStatus>
445
+ install: () => Promise<NativeUpdateStatus>
446
+ relaunch: () => Promise<void>
447
+ onChange: (callback: (status: NativeUpdateStatus) => void) => () => void
448
+ }
419
449
  export declare interface NativeDesktop {
420
450
  openWindow: (options: { name: string, route: string, title?: string, titlebarStyle?: 'standard' | 'transparent', width?: number, height?: number, minWidth?: number, minHeight?: number, floating?: boolean, params?: Record<string, unknown> }) => Promise<{ name: string }>
421
451
  closeWindow: () => Promise<void>
@@ -567,6 +597,8 @@ export type NativePedometerEvent = | { state: 'sample', kind: 'interval', startD
567
597
  | { state: 'sample', kind: 'step', count: 1, timestampMs: number }
568
598
  | { state: 'stopped', reason: 'requested' | 'background' | 'disposed' | 'sensorError' | 'permissionDenied' }
569
599
  export type NativePasskeyCredential = NativePasskeyRegistration | NativePasskeyAssertion;
600
+ /** Where an in-app update stands. */
601
+ export type NativeUpdateState = 'unavailable' | 'idle' | 'checking' | 'current' | 'available' | 'downloading' | 'installing' | 'installed' | 'error';
570
602
  export type NativeWebEvent = | ({ type: 'state' } & NativeWebTabState)
571
603
  | { type: 'navigationStart' | 'navigationFinish', tab: string, url: string }
572
604
  | { type: 'navigationError', tab: string, url: string, code: number, domain: string, message: string }
@@ -623,26 +623,28 @@ export function createNativeHost(options) {
623
623
  return !1;
624
624
  return !0;
625
625
  }
626
- function forwardedHostRoot(node, name) {
626
+ function forwardedHostRoots(node, name) {
627
+ const found = [];
627
628
  if (!isBindingNode(node))
628
- return;
629
+ return found;
629
630
  const forward = node.getAttribute("data-stx-native-forward");
630
631
  if (!forward || !words(forward).includes(name))
631
- return;
632
+ return found;
632
633
  const find = (candidate) => {
633
634
  if (candidate !== node && isBindingNode(candidate) && candidate.hasAttribute("data-stx-native-host-owner"))
634
635
  return;
635
- if (isBindingNode(candidate) && candidate.hasAttribute("data-stx-native-host-root"))
636
- return candidate;
636
+ if (isBindingNode(candidate) && candidate.hasAttribute("data-stx-native-host-root")) {
637
+ found.push(candidate);
638
+ return;
639
+ }
637
640
  for (const child of recordOf(candidate).children) {
638
641
  if (isBindingNode(child) && child.hasAttribute("data-stx-component-wrapper"))
639
642
  continue;
640
- const match = find(child);
641
- if (match)
642
- return match;
643
+ find(child);
643
644
  }
644
645
  };
645
- return find(node);
646
+ find(node);
647
+ return found;
646
648
  }
647
649
  function callerBindingOnWrapper(node, name) {
648
650
  if (!isBindingNode(node) || !node.hasAttribute("data-stx-component-wrapper"))
@@ -1128,7 +1130,14 @@ export function createNativeHost(options) {
1128
1130
  }
1129
1131
  },
1130
1132
  setAttribute(node, name, value) {
1131
- const forwarded = forwardedHostRoot(node, name);
1133
+ const [forwarded, ...alternates] = forwardedHostRoots(node, name);
1134
+ for (const alternate of alternates) {
1135
+ if (alternate === node)
1136
+ continue;
1137
+ reflectAttribute(alternate, name, value);
1138
+ if (!applyForwardedStyle(alternate, name, value))
1139
+ this.setAttribute(alternate, name, value);
1140
+ }
1132
1141
  reflectAttribute(node, name, value);
1133
1142
  if (forwarded) {
1134
1143
  if (forwarded !== node)
@@ -1197,7 +1206,14 @@ export function createNativeHost(options) {
1197
1206
  emit({ op: "updateNode", id: node.__stxId, patch: { props: patch } });
1198
1207
  },
1199
1208
  removeAttribute(node, name) {
1200
- const forwarded = forwardedHostRoot(node, name);
1209
+ const [forwarded, ...alternates] = forwardedHostRoots(node, name);
1210
+ for (const alternate of alternates) {
1211
+ if (alternate === node)
1212
+ continue;
1213
+ reflectAttribute(alternate, name, void 0, !0);
1214
+ if (!applyForwardedStyle(alternate, name, void 0))
1215
+ this.removeAttribute(alternate, name);
1216
+ }
1201
1217
  reflectAttribute(node, name, void 0, !0);
1202
1218
  if (forwarded) {
1203
1219
  reflectAttribute(forwarded, name, void 0, !0);
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  import{xo,tn,Yl,rm}from"./chunk-67j2m620.js";import{vo,ra,em,tm,nm}from"./chunk-p3hbsrk9.js";import{Gl,Xl,Jl,Zg,Qg}from"./chunk-rf0smj4c.js";import{nt,Hn,sa}from"./chunk-sh7a0g09.js";import{sm,om,im,am,So,Wy}from"./chunk-ksmn19qw.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-kpjq135z.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-nh5pna5s.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,12 +1,12 @@
1
1
  // @bun
2
- import"./chunk-0jdz31q1.js";import"./chunk-3b3mkgpj.js";import"./chunk-115bb91s.js";import{_,Rl}from"./chunk-xmg6bmh6.js";import"./chunk-cphc60zw.js";import"./chunk-vk2jy6mn.js";import{Vt,x}from"./chunk-eq86wzhr.js";import"./chunk-41z7f41b.js";import"./chunk-g3vce7ka.js";import"./chunk-q0y8gv18.js";import{Lt,jt,Bt,Ft,zt,Ht}from"./chunk-8ccgty8s.js";import{a}from"./chunk-yesh4dfe.js";import{Vs}from"./chunk-t3zmfh8w.js";import"./chunk-rb2zbdqd.js";import"./chunk-2xnbdqy4.js";import{Te,mn,hn}from"./chunk-j9vfv53x.js";import"./chunk-b0hj8eg2.js";import{S}from"./chunk-adsqckg4.js";import{Pt,i}from"./chunk-6svc4kb8.js";import"./chunk-vkfw9k1n.js";import"./chunk-v90nz5xm.js";import{As}from"./chunk-vxbvrbqs.js";import"./chunk-hyyh7qxw.js";import"./chunk-05x1rd86.js";import{Sc,kc,_c}from"./chunk-kk2p2tgv.js";import{fn,pr,fr}from"./chunk-1ph2yhfn.js";import{gn}from"./chunk-1w0bqqh5.js";import"./chunk-vfcbz0an.js";import"./chunk-80ky40mm.js";import{re,Ae}from"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-qnf7w4xw.js";import{l}from"./chunk-zxjdfgdx.js";import{tt}from"./chunk-a0aqs5a8.js";import{t,h}from"./chunk-neg6ckjg.js";import{f}from"./chunk-hxws025y.js";import R from"fs";import w from"path";import{createHash as $t}from"crypto";function kt(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Rt(e){return Bun.hash(e).toString(16)}function lt(e,n={}){if(!e.includes('type="stx/island"'))return{html:e,chunks:[]};let s=new Map,o=e.replace(Dt,(r,u,g,P)=>{let b=P.trim();if(!b)return r;if(/\bdata-stx-src=/.test(g))return r;if(n.minify)b=kt(b);let p=Rt(b);if(!s.has(p))s.set(p,b);let k=n.integrity?` data-stx-integrity="sha384-${$t("sha384").update(b).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${k}${g}></script>`}),c=Array.from(s,([r,u])=>({hash:r,code:u}));return{html:o,chunks:c}}var Et=new Set(["visible","idle"]);function ut(e){if(!e.includes("data-stx-src="))return e;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(e))!==null)n.set(o[1],o[2]);let c=new Set,r=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=r.exec(e))!==null)if(Et.has(n.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,P=x(e,(p,k)=>(g.lastIndex=k,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||P===-1)return e;let b=Array.from(c).filter((p)=>!e.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!b)return e;return e.slice(0,P)+b+e.slice(P)}var Ct=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function Y(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function It(e){for(let n of Ct){let s=e[n];if(!s)continue;let o=Y(s);if(o)return{url:o,source:"env",via:n}}return null}function dt(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?Y(s):null}async function Tt(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=dt(r.default??r);if(u)return u}catch{}}return null}async function gt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=Y(e.explicit);if(u)return{url:u,source:"option"}}let o=dt(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await Tt(n);if(c)return{url:c,source:"site.config",via:"url"};let r=It(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function pt(){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
- `)}function V(e){return async()=>({paths:await e(),fallback:!1})}var At;function Ot(e){let n=t(e),{depths:s}=h(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),P=_(n,"{","}",g);if(u<0||g<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=Rl(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function ft(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=gn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(At??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let g=Ot(u);if(/\bdefineStaticPaths\b/.test(t(g))&&Vt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let P=Function("defineStaticPaths",`return (${g})`)(V);if(typeof P!=="function")throw TypeError("getStaticPaths must be a function");let b=await P();n="result";let p=Array.isArray(b)?{paths:b}:b;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 k of p.paths)if(!k||typeof k!=="object"||!k.params||typeof k.params!=="object"||Array.isArray(k.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class ht{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=w.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await R.promises.mkdir(this.cacheDir,{recursive:!0});let e=w.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=R.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(R.existsSync(r)){let u=R.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=wt(n).some((u)=>R.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&R.existsSync(u)&&As(R.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class mt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return w.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await R.promises.mkdir(w.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await R.promises.unlink(n)}async invalidatePattern(e){let n=w.join(this.cacheDir,"isr");if(!R.existsSync(n))return;let s=await R.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await R.promises.unlink(w.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function Ut(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await ft(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,g]of Object.entries(c.params))r=r.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function wt(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function _t(e){for(let n of wt(e))if(await Bun.file(n).exists())try{let s=await import(n);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:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Mt(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
2
+ import"./chunk-0jdz31q1.js";import"./chunk-3b3mkgpj.js";import"./chunk-115bb91s.js";import{_,Rl}from"./chunk-ac3e6nhg.js";import"./chunk-x9036mfd.js";import"./chunk-vk2jy6mn.js";import{Ut,x}from"./chunk-bnqjj9a6.js";import"./chunk-41z7f41b.js";import"./chunk-m4h31n4w.js";import"./chunk-q0y8gv18.js";import{Lt,jt,Bt,Ft,zt,Ht}from"./chunk-gzc16hs8.js";import{a}from"./chunk-2carg287.js";import{Us}from"./chunk-qrk535j6.js";import"./chunk-rb2zbdqd.js";import"./chunk-sqbq2q45.js";import{Te,mn,hn}from"./chunk-thnna9h7.js";import"./chunk-zb6yy424.js";import{S}from"./chunk-gdg89bp0.js";import{Pt,i}from"./chunk-da5dyp40.js";import"./chunk-6chwb38w.js";import"./chunk-b74heqjh.js";import{As}from"./chunk-0wd2h9b2.js";import"./chunk-zteb8tdv.js";import"./chunk-05x1rd86.js";import{Sc,kc,_c}from"./chunk-kk2p2tgv.js";import{fn,pr,fr}from"./chunk-1ph2yhfn.js";import{gn}from"./chunk-7x0tfpfs.js";import"./chunk-gscc3cyr.js";import"./chunk-xvprhdcb.js";import{re,Ae}from"./chunk-t8kzetfr.js";import"./chunk-n64zbwzr.js";import"./chunk-n6q1d66k.js";import"./chunk-mkpgr3cy.js";import{l}from"./chunk-zxjdfgdx.js";import{tt}from"./chunk-a0aqs5a8.js";import{t,h}from"./chunk-neg6ckjg.js";import{f}from"./chunk-hxws025y.js";import R from"fs";import w from"path";import{createHash as $t}from"crypto";function kt(e){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(e).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return e}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Rt(e){return Bun.hash(e).toString(16)}function lt(e,n={}){if(!e.includes('type="stx/island"'))return{html:e,chunks:[]};let s=new Map,o=e.replace(Dt,(r,u,g,P)=>{let b=P.trim();if(!b)return r;if(/\bdata-stx-src=/.test(g))return r;if(n.minify)b=kt(b);let p=Rt(b);if(!s.has(p))s.set(p,b);let k=n.integrity?` data-stx-integrity="sha384-${$t("sha384").update(b).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${k}${g}></script>`}),c=Array.from(s,([r,u])=>({hash:r,code:u}));return{html:o,chunks:c}}var Et=new Set(["visible","idle"]);function ut(e){if(!e.includes("data-stx-src="))return e;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(e))!==null)n.set(o[1],o[2]);let c=new Set,r=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=r.exec(e))!==null)if(Et.has(n.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,P=x(e,(p,k)=>(g.lastIndex=k,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||P===-1)return e;let b=Array.from(c).filter((p)=>!e.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!b)return e;return e.slice(0,P)+b+e.slice(P)}var Ct=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function Y(e){let n=e.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function It(e){for(let n of Ct){let s=e[n];if(!s)continue;let o=Y(s);if(o)return{url:o,source:"env",via:n}}return null}function dt(e){if(!e||typeof e!=="object")return null;let n=e,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?Y(s):null}async function Tt(e){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=s.resolve(e,o);if(!n(c))continue;try{let r=await import(c),u=dt(r.default??r);if(u)return u}catch{}}return null}async function gt(e={}){let n=e.cwd??process.cwd(),s=e.env??process.env;if(e.explicit){let u=Y(e.explicit);if(u)return{url:u,source:"option"}}let o=dt(e.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await Tt(n);if(c)return{url:c,source:"site.config",via:"url"};let r=It(s);if(r)return r;return{url:"http://localhost",source:"fallback"}}function pt(){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
+ `)}function V(e){return async()=>({paths:await e(),fallback:!1})}var At;function Ot(e){let n=t(e),{depths:s}=h(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(n))!==null){if(s[c.index]!==0)continue;let u=_(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),P=_(n,"{","}",g);if(u<0||g<0||P<0)break;return e.slice(c.index,P+1)}let r=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=r.exec(n))!==null){if(s[c.index]!==0)continue;let u=Rl(n,r.lastIndex).endPos;return e.slice(r.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function ft(e){let n="read";try{let s=await Bun.file(e).text();n="parse";let o=gn(s),c=[...o.server,...o.client,...o.signals].filter((r)=>/(?:^|\s)server(?:\s|=|$)/i.test(t(r.attrs))).sort((r,u)=>s.indexOf(r.fullTag)-s.indexOf(u.fullTag));for(let r of c){if(!/\bgetStaticPaths\b/.test(t(r.content)))continue;let u=(At??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(r.content);if(!/\bgetStaticPaths\b/.test(t(u)))continue;let g=Ot(u);if(/\bdefineStaticPaths\b/.test(t(g))&&Ut(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let P=Function("defineStaticPaths",`return (${g})`)(V);if(typeof P!=="function")throw TypeError("getStaticPaths must be a function");let b=await P();n="result";let p=Array.isArray(b)?{paths:b}:b;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 k of p.paths)if(!k||typeof k!=="object"||!k.params||typeof k.params!=="object"||Array.isArray(k.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class ht{cacheDir;cache=new Map;loaded=!1;salt;constructor(e,n=""){this.cacheDir=e,this.salt=n}async load(){if(this.loaded)return;let e=w.join(this.cacheDir,"build-cache.json");if(await Bun.file(e).exists())try{let n=JSON.parse(await Bun.file(e).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await R.promises.mkdir(this.cacheDir,{recursive:!0});let e=w.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(e,JSON.stringify(n))}getHash(e,n){let s=R.statSync(e),o=`${this.salt}|${e}:${s.mtimeMs}`;for(let r of n)if(R.existsSync(r)){let u=R.statSync(r);o+=`:${r}:${u.mtimeMs}`}let c=0;for(let r=0;r<o.length;r++){let u=o.charCodeAt(r);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(e,n){let s=this.cache.get(e);if(!s)return null;let o=wt(n).some((u)=>R.existsSync(u)),c=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&R.existsSync(u)&&As(R.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(e),null;let r=this.getHash(n,s.dependencies??[]);if(s.hash!==r)return this.cache.delete(e),null;return s.html}set(e,n,s,o){let c=this.getHash(n,s);this.cache.set(e,{hash:c,html:o,generatedAt:Date.now(),dependencies:s})}}class mt{cacheDir;constructor(e){this.cacheDir=e}getFilePath(e){let n=e.replace(/[^a-zA-Z0-9]/g,"_")+".json";return w.join(this.cacheDir,"isr",n)}async get(e){let n=this.getFilePath(e);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(e,n){let s=this.getFilePath(e);await R.promises.mkdir(w.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(e){let n=this.getFilePath(e);if(await Bun.file(n).exists())await R.promises.unlink(n)}async invalidatePattern(e){let n=w.join(this.cacheDir,"isr");if(!R.existsSync(n))return;let s=await R.promises.readdir(n);for(let o of s){let c=o.replace(/_/g,"/").replace(".json","");if(e.test(c))await R.promises.unlink(w.join(n,o))}}async needsRevalidation(e){let n=await this.get(e);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function _t(e){let n=[];if(!e.isDynamic)n.push({url:e.pattern,params:{}});else{let s=await ft(e.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${e.pattern} (${e.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${e.pattern} (${e.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${e.pattern} (${e.filePath})`),n;for(let c of o.paths){let r=e.pattern;for(let[u,g]of Object.entries(c.params))r=r.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:r,params:c.params,props:c.props,revalidate:c.revalidate})}}return n}function wt(e){return[e.replace(/\.stx$/,".data.ts"),e.replace(/\.stx$/,".data.js"),e+".data.ts",e+".data.js"]}async function Mt(e){for(let n of wt(e))if(await Bun.file(n).exists())try{let s=await import(n);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:o,...c}=s;return c}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Gt(e,n,s){let o=e.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let r=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!r)return null;return await Function("params",`
4
4
  return (async function getStaticProps() {
5
5
  ${r[1]}
6
6
  })()
7
- `)(n)}catch(r){return console.error(`Error executing getStaticProps in ${s}:`,r),null}}function Gt(e){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(e)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(e)}async function yt(e,n,s={},o,c){let r=await Bun.file(e.filePath).text(),u=await _t(e.filePath),g=await Mt(r,n,e.filePath),P={...u||{},...g||{},...s,params:n,$route:{path:e.pattern,params:n}},b=new Set,p=[],k=[],C={...c,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(E)=>{p.push(`${w.relative(process.cwd(),E.templatePath)}: ${E.message}
8
- resolved against partialsDir: ${E.partialsDir}`)},onServerScriptError:(E)=>{k.push(`${w.relative(process.cwd(),E.sourcePath)} (${E.kind}): ${E.message}`)}};if(Gt(r))console.warn(`Warning: ${e.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 v=await i(r,P,e.filePath,C,b);for(let E of[e.filePath,...b])for(let O of Te(E))b.add(O);if(Object.keys(n).length>0){let E=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(v.includes("</head>"))v=f(v,E);else v=`${E}
9
- ${v}`}if(v=await Ae(v,{router:o.router}),v=await S(v),o.minify!==!1)return{html:Nt(v),dependencies:Array.from(b),includeFailures:p,serverScriptFailures:k};return{html:v,dependencies:Array.from(b),includeFailures:p,serverScriptFailures:k}}function Nt(e){let n=[],s=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(e))!==null){let u=e.slice(s,c.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let g=c[1],P=c[2],b=c[3];P=tt(P).replace(/<\/script/gi,"<\\/script"),n.push(g+P+b),s=c.index+c[0].length}let r=e.slice(s);return n.push(r.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function Wt(e){let n=0;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);n=(n<<5)-n+o,n=n&n}return`"${Math.abs(n).toString(36)}"`}function qt(e,n,s,o){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(e);return c.endsWith("/")?e===c.slice(0,-1)||e.startsWith(c):e===c})}function Jt(e,n){return`<?xml version="1.0" encoding="UTF-8"?>
7
+ `)(n)}catch(r){return console.error(`Error executing getStaticProps in ${s}:`,r),null}}function Nt(e){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(e)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(e)}async function yt(e,n,s={},o,c){let r=await Bun.file(e.filePath).text(),u=await Mt(e.filePath),g=await Gt(r,n,e.filePath),P={...u||{},...g||{},...s,params:n,$route:{path:e.pattern,params:n}},b=new Set,p=[],k=[],C={...c,minifyClient:!0,...o.partialsDir?{partialsDir:o.partialsDir}:{},...o.componentsDir?{componentsDir:o.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(E)=>{p.push(`${w.relative(process.cwd(),E.templatePath)}: ${E.message}
8
+ resolved against partialsDir: ${E.partialsDir}`)},onServerScriptError:(E)=>{k.push(`${w.relative(process.cwd(),E.sourcePath)} (${E.kind}): ${E.message}`)}};if(Nt(r))console.warn(`Warning: ${e.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 v=await i(r,P,e.filePath,C,b);for(let E of[e.filePath,...b])for(let O of Te(E))b.add(O);if(Object.keys(n).length>0){let E=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(v.includes("</head>"))v=f(v,E);else v=`${E}
9
+ ${v}`}if(v=await Ae(v,{router:o.router}),v=await S(v),o.minify!==!1)return{html:Wt(v),dependencies:Array.from(b),includeFailures:p,serverScriptFailures:k};return{html:v,dependencies:Array.from(b),includeFailures:p,serverScriptFailures:k}}function Wt(e){let n=[],s=0,o=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,c;while((c=o.exec(e))!==null){let u=e.slice(s,c.index);n.push(u.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let g=c[1],P=c[2],b=c[3];P=tt(P).replace(/<\/script/gi,"<\\/script"),n.push(g+P+b),s=c.index+c[0].length}let r=e.slice(s);return n.push(r.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function qt(e){let n=0;for(let s=0;s<e.length;s++){let o=e.charCodeAt(s);n=(n<<5)-n+o,n=n&n}return`"${Math.abs(n).toString(36)}"`}function Jt(e,n,s,o){if(s?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return o.some((c)=>{if(c instanceof RegExp)return c.test(e);return c.endsWith("/")?e===c.slice(0,-1)||e.startsWith(c):e===c})}function Vt(e,n){return`<?xml version="1.0" encoding="UTF-8"?>
10
10
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
11
11
  ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
12
12
  <loc>${T(c)}</loc>`;if(o.lastmod)r+=`
@@ -36,13 +36,13 @@ ${e.map((o)=>{let c=new URL(o.loc,n).href,r=` <url>
36
36
  ${s.join(`
37
37
  `)}
38
38
  </channel>
39
- </rss>`}async function Xt(e={}){let n=Date.now();hn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,P=0,b={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let C=r.cacheSalt;if(!C){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-p82fzxdg.js");try{C=y(await d(process.cwd()))}catch{}}let{prepareImageDelivery:v}=await import("./chunk-k8bk685s.js"),E=await v(r.publicDir,r.outputDir);if(E.count>0)console.log(`Optimized ${E.count} image(s) for responsive delivery`),C=[C,E.fingerprint].filter(Boolean).join(":");let O=new ht(r.cacheDir,C);if(r.cache)await O.load();try{let{generateCss:d}=await import("./chunk-p82fzxdg.js");await d('<div class="bg-black"></div>')}catch{}Lt();let St=s?.routeMiddleware?.dir||"middleware";await Bt(process.cwd(),St);let K=jt();if(K.length>0)console.log(`Loaded ${K.length} middleware: ${K.join(", ")}`);let xt=s?.routeMiddleware?.global||[];_c(s?.layoutsDir,l(process.cwd()));let Q=re(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Q.length} routes`);let U=[];for(let d of Q)try{let y=await Ut(d);for(let D of y)U.push({route:d,url:D.url,params:D.params,props:D.props,revalidate:D.revalidate??r.revalidate})}catch(y){let D=y instanceof Error?y:Error(String(y));u.failedCount++,u.errors.push({route:d.pattern,error:D}),await r.hooks.onError?.(D,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,D)}u.totalPages=U.length+u.failedCount,console.log(`Generating ${U.length} pages...`);let M=[],et=[];for(let d=0;d<U.length;d+=r.concurrency)et.push(U.slice(d,d+r.concurrency));for(let d of et)await Promise.all(d.map(async(y)=>{let{route:D,url:m,params:G,props:bt,revalidate:it}=y;try{await r.hooks.onPageStart?.(m);let H=await Bun.file(D.filePath).text(),A=Qt(H),vt=A?.middleware?Array.isArray(A.middleware)?A.middleware:[A.middleware]:[],st=[...xt,...vt];if(st.length>0){let j=Ft(m,G,A||{}),z=zt(j,null,void 0,{isServer:!0}),F=await Ht(st,z);if(F.redirect){let I=typeof F.redirect==="string"?F.redirect:F.redirect.path||F.redirect,W=te(String(I),m),L=ee(m,r);await R.promises.mkdir(w.dirname(L),{recursive:!0}),await Bun.write(L,W),u.successCount++,u.pages.push({route:m,outputPath:L,size:Buffer.byteLength(W),cached:!1}),M.push({loc:m,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${m} \u2192 redirect to ${I}`);return}if(F.abort){let I=typeof F.abort==="string"?F.abort:F.abort?.error?.message||"aborted";console.warn(` \u21B3 ${m} \u2014 middleware aborted: ${I}`);return}}let at=A?.validate;if(typeof at==="function")try{if(!await at({params:G})){console.warn(`Validation failed for ${m}, skipping...`);return}}catch{}let B=null,ot=!1;if(r.cache){if(B=O.get(m,D.filePath),B)ot=!0,u.cachedCount++}if(!B){let j=await yt(D,G,bt,r,s);if(B=j.html,r.failOnIncludeError&&j.includeFailures.length>0)throw Error(`${j.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
39
+ </rss>`}async function Xt(e={}){let n=Date.now();hn();let s=await a(process.cwd()),o=s.build||{},c=await gt({explicit:e.domain||o.domain,stxConfig:s});if(c.source==="fallback"&&(e.sitemap??o.sitemap??!0))console.warn(pt());let r={router:e.router??s?.router??{},pagesDir:e.pagesDir||o.pagesDir||"pages",outputDir:e.outputDir||o.outputDir||"dist",baseUrl:e.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:e.revalidate??o.revalidate??!1,sitemap:e.sitemap??o.sitemap??!0,sitemapExclude:e.sitemapExclude||o.sitemapExclude||[],robots:e.robots??o.robots??!0,rss:e.rss??o.rss??!1,concurrency:e.concurrency||o.concurrency||10,cache:e.cache??o.cache??!0,cacheDir:e.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:e.contentLoaders||[],hooks:e.hooks||{},minify:e.minify??o.minify??!0,generate404:e.generate404??o.generate404??!0,publicDir:e.publicDir||o.publicDir||"public",trailingSlash:e.trailingSlash??o.trailingSlash??!1,cleanOutput:e.cleanOutput??o.cleanOutput??!0,cacheSalt:e.cacheSalt??"",partialsDir:e.partialsDir||s?.partialsDir||"",componentsDir:e.componentsDir||s?.componentsDir||"",failOnIncludeError:e.failOnIncludeError??!0,failOnServerScriptError:e.failOnServerScriptError??!0,chunkIslands:e.chunkIslands===!0,prefetchIslands:e.prefetchIslands===!0,integrityIslands:e.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,P=0,b={},p={};await r.hooks.onBuildStart?.();try{if(r.cleanOutput&&R.existsSync(r.outputDir))await R.promises.rm(r.outputDir,{recursive:!0});await R.promises.mkdir(r.outputDir,{recursive:!0});let C=r.cacheSalt;if(!C){let{resolveUserCssConfig:d,fingerprintConfig:y}=await import("./chunk-kv5st7dx.js");try{C=y(await d(process.cwd()))}catch{}}let{prepareImageDelivery:v}=await import("./chunk-e3ec9c31.js"),E=await v(r.publicDir,r.outputDir);if(E.count>0)console.log(`Optimized ${E.count} image(s) for responsive delivery`),C=[C,E.fingerprint].filter(Boolean).join(":");let O=new ht(r.cacheDir,C);if(r.cache)await O.load();try{let{generateCss:d}=await import("./chunk-kv5st7dx.js");await d('<div class="bg-black"></div>')}catch{}Lt();let St=s?.routeMiddleware?.dir||"middleware";await Bt(process.cwd(),St);let K=jt();if(K.length>0)console.log(`Loaded ${K.length} middleware: ${K.join(", ")}`);let xt=s?.routeMiddleware?.global||[];_c(s?.layoutsDir,l(process.cwd()));let Q=re(".",{pagesDir:r.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Q.length} routes`);let U=[];for(let d of Q)try{let y=await _t(d);for(let D of y)U.push({route:d,url:D.url,params:D.params,props:D.props,revalidate:D.revalidate??r.revalidate})}catch(y){let D=y instanceof Error?y:Error(String(y));u.failedCount++,u.errors.push({route:d.pattern,error:D}),await r.hooks.onError?.(D,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,D)}u.totalPages=U.length+u.failedCount,console.log(`Generating ${U.length} pages...`);let M=[],et=[];for(let d=0;d<U.length;d+=r.concurrency)et.push(U.slice(d,d+r.concurrency));for(let d of et)await Promise.all(d.map(async(y)=>{let{route:D,url:m,params:G,props:bt,revalidate:it}=y;try{await r.hooks.onPageStart?.(m);let H=await Bun.file(D.filePath).text(),A=Qt(H),vt=A?.middleware?Array.isArray(A.middleware)?A.middleware:[A.middleware]:[],st=[...xt,...vt];if(st.length>0){let j=Ft(m,G,A||{}),z=zt(j,null,void 0,{isServer:!0}),F=await Ht(st,z);if(F.redirect){let I=typeof F.redirect==="string"?F.redirect:F.redirect.path||F.redirect,W=te(String(I),m),L=ee(m,r);await R.promises.mkdir(w.dirname(L),{recursive:!0}),await Bun.write(L,W),u.successCount++,u.pages.push({route:m,outputPath:L,size:Buffer.byteLength(W),cached:!1}),M.push({loc:m,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${m} \u2192 redirect to ${I}`);return}if(F.abort){let I=typeof F.abort==="string"?F.abort:F.abort?.error?.message||"aborted";console.warn(` \u21B3 ${m} \u2014 middleware aborted: ${I}`);return}}let at=A?.validate;if(typeof at==="function")try{if(!await at({params:G})){console.warn(`Validation failed for ${m}, skipping...`);return}}catch{}let B=null,ot=!1;if(r.cache){if(B=O.get(m,D.filePath),B)ot=!0,u.cachedCount++}if(!B){let j=await yt(D,G,bt,r,s);if(B=j.html,r.failOnIncludeError&&j.includeFailures.length>0)throw Error(`${j.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
40
40
  ${j.includeFailures.join(`
41
41
  `)}
42
42
  Set ssg.failOnIncludeError to false to build anyway.`);if(r.failOnServerScriptError&&j.serverScriptFailures.length>0)throw Error(`${j.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
43
43
  ${j.serverScriptFailures.join(`
44
44
  `)}
45
- Set ssg.failOnServerScriptError to false to build anyway.`);if(r.cache)O.set(m,D.filePath,j.dependencies,B)}let N;if(r.trailingSlash)N=w.join(r.outputDir,m,"index.html");else N=m==="/"?w.join(r.outputDir,"index.html"):w.join(r.outputDir,`${m}.html`);if(r.chunkIslands){let{html:j,chunks:z}=lt(B,{integrity:r.integrityIslands,minify:r.minify});if(z.length>0){let F=w.join(r.outputDir,"_stx","islands");await R.promises.mkdir(F,{recursive:!0});for(let I of z){let W=w.join(F,`${I.hash}.js`);if(!await Bun.file(W).exists())await Bun.write(W,I.code);if(!g.has(I.hash)){g.add(I.hash);let L=Buffer.byteLength(I.code,"utf8");P+=L,b[I.hash]={bytes:L,file:`/_stx/islands/${I.hash}.js`}}}if(p[m]=z.map((I)=>I.hash),B=j,r.prefetchIslands)B=ut(B)}}if(await R.promises.mkdir(w.dirname(N),{recursive:!0}),await Bun.write(N,B),!qt(m,B,A,r.sitemapExclude))M.push({loc:m,lastmod:new Date().toISOString().split("T")[0],priority:m==="/"?1:0.8});let ct={route:m,outputPath:N,size:Buffer.byteLength(B,"utf8"),cached:ot};if(it!==!1)ct.revalidateAt=Date.now()+it*1000;u.pages.push(ct),u.successCount++,await r.hooks.onPageEnd?.(m,B)}catch(H){u.failedCount++,u.errors.push({route:m,error:H}),await r.hooks.onError?.(H,m),console.error(`Error generating ${m}:`,H)}}));let rt=mn();if(rt.length>0){let d=rt.map((y)=>`${y.filePath}: ${y.message}`).join(`
45
+ Set ssg.failOnServerScriptError to false to build anyway.`);if(r.cache)O.set(m,D.filePath,j.dependencies,B)}let N;if(r.trailingSlash)N=w.join(r.outputDir,m,"index.html");else N=m==="/"?w.join(r.outputDir,"index.html"):w.join(r.outputDir,`${m}.html`);if(r.chunkIslands){let{html:j,chunks:z}=lt(B,{integrity:r.integrityIslands,minify:r.minify});if(z.length>0){let F=w.join(r.outputDir,"_stx","islands");await R.promises.mkdir(F,{recursive:!0});for(let I of z){let W=w.join(F,`${I.hash}.js`);if(!await Bun.file(W).exists())await Bun.write(W,I.code);if(!g.has(I.hash)){g.add(I.hash);let L=Buffer.byteLength(I.code,"utf8");P+=L,b[I.hash]={bytes:L,file:`/_stx/islands/${I.hash}.js`}}}if(p[m]=z.map((I)=>I.hash),B=j,r.prefetchIslands)B=ut(B)}}if(await R.promises.mkdir(w.dirname(N),{recursive:!0}),await Bun.write(N,B),!Jt(m,B,A,r.sitemapExclude))M.push({loc:m,lastmod:new Date().toISOString().split("T")[0],priority:m==="/"?1:0.8});let ct={route:m,outputPath:N,size:Buffer.byteLength(B,"utf8"),cached:ot};if(it!==!1)ct.revalidateAt=Date.now()+it*1000;u.pages.push(ct),u.successCount++,await r.hooks.onPageEnd?.(m,B)}catch(H){u.failedCount++,u.errors.push({route:m,error:H}),await r.hooks.onError?.(H,m),console.error(`Error generating ${m}:`,H)}}));let rt=mn();if(rt.length>0){let d=rt.map((y)=>`${y.filePath}: ${y.message}`).join(`
46
46
  `);throw Error(`Client script bundling failed:
47
47
  ${d}`)}if(r.cache)await O.save();if(r.generate404){let d=w.join(r.pagesDir,"404.stx");if(await Bun.file(d).exists()){let y=new Set,D={...s,minifyClient:!0,debug:!1,cache:!1},m=await i(await Bun.file(d).text(),{},d,D,y);await Bun.write(w.join(r.outputDir,"404.html"),m)}else await Bun.write(w.join(r.outputDir,"404.html"),`<!DOCTYPE html>
48
48
  <html lang="en">
@@ -65,7 +65,7 @@ ${d}`)}if(r.cache)await O.save();if(r.generate404){let d=w.join(r.pagesDir,"404.
65
65
  <a href="/">Go home</a>
66
66
  </div>
67
67
  </body>
68
- </html>`)}for(let d of[500]){let y=w.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,m,D);await Bun.write(w.join(r.outputDir,`${d}.html`),G)}}let X=w.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(w.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Jt(M,r.domain),y=w.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((m)=>typeof m==="string"),...d.disallow||[]],D=Vs({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...y.length>0?{disallow:y}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(w.join(r.outputDir,"robots.txt"),D),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},y=[];if(d.getItems)y=await d.getItems();let D=Kt(d,y),m=w.join(r.outputDir,"rss.xml");await Bun.write(m,D),u.rssPath=m,console.log(`Generated rss.xml with ${y.length} items`)}let q=Sc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let J=kc(r.outputDir);if(J.assets>0)console.log(`Externalized ${J.assets} repeated asset(s) from ${J.pages} page(s) (${(J.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&R.existsSync(r.publicDir))await Z(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let nt=fr();if(nt)await Z(nt,w.join(r.outputDir,pr)),console.log(`Copied assets from ${fn}`)}catch(C){throw await r.hooks.onError?.(C),C}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:P};let C={generatedChunks:g.size,totalBytes:P,chunks:b,pages:p};await Bun.write(w.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(C,null,2))}await r.hooks.onBuildEnd?.(u);let k=u.islandChunks?`
68
+ </html>`)}for(let d of[500]){let y=w.join(r.pagesDir,`${d}.stx`);if(await Bun.file(y).exists()){let D=new Set,m={...s,minifyClient:!0,debug:!1,cache:!1},G=await i(await Bun.file(y).text(),{},y,m,D);await Bun.write(w.join(r.outputDir,`${d}.html`),G)}}let X=w.join(r.pagesDir,"error.stx");if(await Bun.file(X).exists()){let d=new Set,y={...s,minifyClient:!0,debug:!1,cache:!1},D=await i(await Bun.file(X).text(),{},X,y,d);await Bun.write(w.join(r.outputDir,"error.html"),D)}if(r.sitemap&&M.length>0){let d=Vt(M,r.domain),y=w.join(r.outputDir,"sitemap.xml");await Bun.write(y,d),u.sitemapPath=y,console.log(`Generated sitemap.xml with ${M.length} URLs`)}if(r.robots!==!1){let d=typeof r.robots==="object"?r.robots:{},y=[...r.sitemapExclude.filter((m)=>typeof m==="string"),...d.disallow||[]],D=Us({rules:[{userAgent:d.userAgent||"*",allow:d.allow||["/"],...y.length>0?{disallow:y}:{}}],...d.sitemap!==!1&&u.sitemapPath?{sitemap:new URL("/sitemap.xml",r.domain).href}:{}});await Bun.write(w.join(r.outputDir,"robots.txt"),D),console.log("Generated robots.txt")}if(r.rss){let d=typeof r.rss==="object"?r.rss:{title:"Site Feed",description:"Latest updates",link:r.domain},y=[];if(d.getItems)y=await d.getItems();let D=Kt(d,y),m=w.join(r.outputDir,"rss.xml");await Bun.write(m,D),u.rssPath=m,console.log(`Generated rss.xml with ${y.length} items`)}let q=Sc(r.outputDir);if(q.assets>0)console.log(`Externalized ${q.assets} asset(s) from ${q.pages} page(s) (${(q.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);let J=kc(r.outputDir);if(J.assets>0)console.log(`Externalized ${J.assets} repeated asset(s) from ${J.pages} page(s) (${(J.bytesInlined/1024).toFixed(1)}KB removed from HTML)`);if(r.publicDir&&R.existsSync(r.publicDir))await Z(r.publicDir,r.outputDir),console.log(`Copied public assets from ${r.publicDir}`);let nt=fr();if(nt)await Z(nt,w.join(r.outputDir,pr)),console.log(`Copied assets from ${fn}`)}catch(C){throw await r.hooks.onError?.(C),C}if(u.buildTime=Date.now()-n,g.size>0){u.islandChunks={count:g.size,totalBytes:P};let C={generatedChunks:g.size,totalBytes:P,chunks:b,pages:p};await Bun.write(w.join(r.outputDir,"_stx","islands-manifest.json"),JSON.stringify(C,null,2))}await r.hooks.onBuildEnd?.(u);let k=u.islandChunks?`
69
69
  Island chunks: ${u.islandChunks.count} (${(u.islandChunks.totalBytes/1024).toFixed(1)} KB lifted out of inline HTML)`:"";return console.log(`
70
70
  Build complete!
71
71
  Total: ${u.totalPages} pages
@@ -73,7 +73,7 @@ Build complete!
73
73
  Cached: ${u.cachedCount}
74
74
  Failed: ${u.failedCount}
75
75
  Time: ${u.buildTime}ms${k}
76
- `),u}async function Z(e,n){await R.promises.mkdir(n,{recursive:!0});let s=await R.promises.readdir(e,{withFileTypes:!0});for(let o of s){let c=w.join(e,o.name),r=w.join(n,o.name);if(o.isDirectory())await R.promises.mkdir(r,{recursive:!0}),await Z(c,r);else await R.promises.copyFile(c,r)}}function Yt(e={}){let n=e.cacheDir||l(process.cwd(),"ssg-cache"),s=new mt(n),o=e.revalidate||3600;return{async get(c){let r=await s.get(c);if(!r)return null;if(Date.now()>r.revalidateAfter)this.revalidate(c).catch(console.error);return{html:r.html,headers:{"Cache-Control":`public, max-age=${o}, stale-while-revalidate=${o*2}`,ETag:r.etag,"X-ISR-Generated":new Date(r.generatedAt).toISOString(),...r.headers}}},async revalidate(c){let u=re(".",{pagesDir:e.pagesDir||"pages"}).find((k)=>c.match(k.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${c}`);return}let g=c.match(u.regex),P={};if(g)u.params.forEach((k,C)=>{P[k]=g[C+1]});let b=await a(),{html:p}=await yt(u,P,{},e,b);await s.set(c,{html:p,generatedAt:Date.now(),revalidateAfter:Date.now()+o*1000,etag:Wt(p)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Zt(){return{name:"markdown",extensions:[".md",".mdx"],async load(e){let n=await Bun.file(e).text(),s=n.match(/^---\n([\s\S]*?)\n---/),o={},c=n;if(s){let b=s[1];c=n.slice(s[0].length).trim();for(let p of b.split(`
76
+ `),u}async function Z(e,n){await R.promises.mkdir(n,{recursive:!0});let s=await R.promises.readdir(e,{withFileTypes:!0});for(let o of s){let c=w.join(e,o.name),r=w.join(n,o.name);if(o.isDirectory())await R.promises.mkdir(r,{recursive:!0}),await Z(c,r);else await R.promises.copyFile(c,r)}}function Yt(e={}){let n=e.cacheDir||l(process.cwd(),"ssg-cache"),s=new mt(n),o=e.revalidate||3600;return{async get(c){let r=await s.get(c);if(!r)return null;if(Date.now()>r.revalidateAfter)this.revalidate(c).catch(console.error);return{html:r.html,headers:{"Cache-Control":`public, max-age=${o}, stale-while-revalidate=${o*2}`,ETag:r.etag,"X-ISR-Generated":new Date(r.generatedAt).toISOString(),...r.headers}}},async revalidate(c){let u=re(".",{pagesDir:e.pagesDir||"pages"}).find((k)=>c.match(k.regex)!==null);if(!u){console.warn(`Route not found for revalidation: ${c}`);return}let g=c.match(u.regex),P={};if(g)u.params.forEach((k,C)=>{P[k]=g[C+1]});let b=await a(),{html:p}=await yt(u,P,{},e,b);await s.set(c,{html:p,generatedAt:Date.now(),revalidateAfter:Date.now()+o*1000,etag:qt(p)}),console.log(`Revalidated: ${c}`)},async invalidate(c){if(typeof c==="string")await s.invalidate(c);else await s.invalidatePattern(c)}}}function Zt(){return{name:"markdown",extensions:[".md",".mdx"],async load(e){let n=await Bun.file(e).text(),s=n.match(/^---\n([\s\S]*?)\n---/),o={},c=n;if(s){let b=s[1];c=n.slice(s[0].length).trim();for(let p of b.split(`
77
77
  `)){let k=p.indexOf(":");if(k>0){let C=p.slice(0,k).trim(),v=p.slice(k+1).trim();if(v==="true")v=!0;else if(v==="false")v=!1;else if(/^\d+$/.test(v))v=parseInt(v,10);else if(/^\d+\.\d+$/.test(v))v=parseFloat(v);else if(v.startsWith("[")&&v.endsWith("]"))v=v.slice(1,-1).split(",").map((E)=>E.trim().replace(/^['"]|['"]$/g,""));o[C]=v}}}let r=c.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=[],g=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,P;while((P=g.exec(r))!==null){let b=parseInt(P[1],10),p=P[2],k=p.toLowerCase().replace(/[^a-z0-9]+/g,"-");u.push({id:k,text:p,level:b})}return{content:r,data:o,toc:u}}}}function Qt(e){return Pt(e)}function te(e,n){return`<!DOCTYPE html>
78
78
  <html>
79
79
  <head>
@@ -86,4 +86,4 @@ Build complete!
86
86
  <p>Redirecting to <a href="${e}">${e}</a>...</p>
87
87
  <script>window.location.replace('${e}')</script>
88
88
  </body>
89
- </html>`}function ee(e,n){if(e==="/"||e==="")return w.join(n.outputDir,"index.html");let s=e.replace(/^\/|\/$/g,"");if(n.trailingSlash)return w.join(n.outputDir,s,"index.html");return w.join(n.outputDir,`${s}.html`)}var Oe={generateStaticSite:Xt,createISRHandler:Yt,defineStaticPaths:V,createMarkdownLoader:Zt};export{Yt as createISRHandler,Zt as createMarkdownLoader,Gt as declaresPageAction,Oe as default,V as defineStaticPaths,Xt as generateStaticSite,qt as isExcludedFromSitemap};
89
+ </html>`}function ee(e,n){if(e==="/"||e==="")return w.join(n.outputDir,"index.html");let s=e.replace(/^\/|\/$/g,"");if(n.trailingSlash)return w.join(n.outputDir,s,"index.html");return w.join(n.outputDir,`${s}.html`)}var Oe={generateStaticSite:Xt,createISRHandler:Yt,defineStaticPaths:V,createMarkdownLoader:Zt};export{Yt as createISRHandler,Zt as createMarkdownLoader,Nt as declaresPageAction,Oe as default,V as defineStaticPaths,Xt as generateStaticSite,Jt 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.890",
4
+ "version": "0.2.892",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -127,14 +127,14 @@
127
127
  },
128
128
  "dependencies": {
129
129
  "@stacksjs/clapp": "^0.2.17",
130
- "@stacksjs/desktop": "0.2.890",
131
- "@stacksjs/sanitizer": "0.2.890",
130
+ "@stacksjs/desktop": "0.2.892",
131
+ "@stacksjs/sanitizer": "0.2.892",
132
132
  "@stacksjs/ts-css": "^0.3.21",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
134
  "@types/dom-speech-recognition": "^0.0.12",
135
- "bun-plugin-stx": "0.2.890",
135
+ "bun-plugin-stx": "0.2.892",
136
136
  "bunfig": "^0.15.21",
137
- "stx-router": "0.2.890",
137
+ "stx-router": "0.2.892",
138
138
  "ts-broadcasting": "^0.0.13",
139
139
  "ts-images": "^0.2.22",
140
140
  "ts-syntax-highlighter": "^0.2.1"
package/stx.d.ts CHANGED
@@ -414,7 +414,8 @@ declare function useEventListener(
414
414
  declare function useScrollLock(
415
415
  _target?: HTMLElement | null | { current?: HTMLElement | null, value?: HTMLElement | null } | (() => HTMLElement | null | undefined),
416
416
  ): StxSignal<boolean>
417
- declare function useClickOutside(_target: HTMLElement | StxRef<HTMLElement | null> | string | null, _handler: (event: MouseEvent) => void): StxCleanup
417
+ /** `_target` is an element, a selector, a ref, or a getter for the element (`() => box.current`), read on every press. */
418
+ declare function useClickOutside(_target: HTMLElement | StxRef<HTMLElement | null> | (() => HTMLElement | null | undefined) | string | null, _handler: (event: MouseEvent) => void): StxCleanup
418
419
  declare function useFocus(_target: HTMLElement | StxRef<HTMLElement | null> | string | null): { focused: StxSignal<boolean>, focus: () => void, blur: () => void }
419
420
 
420
421
  // ============================================================================
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{q,bg,yi,zc,a,j,vy,xy}from"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{j as config,q as defaultConfig,vy as defineStxConfig,yi as discoverConfig,a as loadStxConfig,zc as resolveInstalledPackage,bg as resolveStxDirectories,xy as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pa,Rm,Mo,Am,pu,fu,Pm,Im}from"./chunk-a3zrwky3.js";import"./chunk-9344rq4r.js";import"./chunk-j9vfv53x.js";import"./chunk-2xnbdqy4.js";import"./chunk-115bb91s.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import{_e,no}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Pa as buildScriptVirtualFile,Rm as buildVirtualSource,_e as extractScriptBlocks,no as extractTemplateExpressions,pu as findRuntimeTypeDeclarations,fu as findStxModuleDeclarations,Im as formatTypecheckDiagnostics,Am as sourcePathFor,Pm as typecheckStxFiles,Mo as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{At,rr,Hh}from"./chunk-1jtsr42q.js";import{xe,sr,Vh,or,zo,ps,gs,Uh,Wh,qh,ir,ar,Ho,ms,Kh}from"./chunk-1bft48gk.js";import"./chunk-cphc60zw.js";export{zo as batch,Hh as default,sr as derived,or as effect,At as generateSignalsRuntime,rr as generateSignalsRuntimeDev,ar as isDerived,ir as isSignal,Vh as memo,gs as onDestroy,ps as onMount,ms as peek,qh as pendingLifecycleCounts,Wh as runDestroyCallbacks,Uh as runMountCallbacks,xe as state,Ho as untrack,Kh as useOptimistic};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{km}from"./chunk-rd663v1m.js";import"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{km as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ja,Ya,Za,Qa,Qh}from"./chunk-p0bjbtdx.js";import"./chunk-whcrca58.js";import"./chunk-1t15z230.js";import"./chunk-pvm48tse.js";import"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Ja as buildNative,Qh as default,Ya as findCraftBinary,Qa as getAvailableFormats,Za as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{tu,nu}from"./chunk-97snfzsy.js";import"./chunk-ytjn0gq2.js";import"./chunk-rd663v1m.js";import"./chunk-40k0r6z9.js";import"./chunk-nhv81gp2.js";import"./chunk-aj5tsksz.js";import"./chunk-mhrnjaka.js";import"./chunk-a3zrwky3.js";import"./chunk-c25q87ys.js";import"./chunk-nzpb263k.js";import"./chunk-t0ttxayz.js";import"./chunk-e16ef18k.js";import"./chunk-pnmafbv5.js";import"./chunk-8f8qgjjr.js";import"./chunk-062qfv99.js";import"./chunk-xvncq3m5.js";import"./chunk-y1d3j2j7.js";import"./chunk-r5ecgcx2.js";import"./chunk-8hwfdwgn.js";import"./chunk-vf4ejngv.js";import"./chunk-zpqjsnz9.js";import"./chunk-4eescf3s.js";import"./chunk-1knk403z.js";import"./chunk-3qk8vf9m.js";import"./chunk-bgfs3mbg.js";import"./chunk-bw2m1e7g.js";import"./chunk-xeyq6d0t.js";import"./chunk-9344rq4r.js";import"./chunk-1jtsr42q.js";import"./chunk-1t15z230.js";import"./chunk-pvm48tse.js";import"./chunk-kk2p2tgv.js";import{gn}from"./chunk-1w0bqqh5.js";import{tg}from"./chunk-j9vfv53x.js";import"./chunk-2xnbdqy4.js";import"./chunk-115bb91s.js";import{He,i}from"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import{Ae}from"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import{_r,Cr}from"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import{js,q,a}from"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import{B,y,Ge}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";import{oa}from"./chunk-hxws025y.js";import"./chunk-ch9028z3.js";import"./chunk-zf68afyh.js";export{js as buildWebComponents,Cr as cacheTemplate,_r as checkCache,gn as classifyAllScripts,tu as createMiddleware,nu as createRoute,q as defaultConfig,y as extractVariables,B as findSfcTemplateBlock,Ae as injectRouterScript,oa as insertBeforeBodyClose,a as loadStxConfig,Ge as processClientScript,i as processDirectives,He as readMarkdownFile,tg as withinBundlerCallback};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qi,Ny,My,Ml,et,Yg,yo,Dy,Ly,jy,By,Fy,zy,Hy,Vy,Uy}from"./chunk-xmg6bmh6.js";import"./chunk-0jdz31q1.js";export{zy as applyHead,Dy as definePageMeta,Qi as getHead,Ny as getPageMeta,et as mergeHeadConfigs,Hy as processHeadDirective,Uy as processMetaDirective,Vy as processTitleDirective,Fy as renderBodyAttrs,jy as renderHead,By as renderHtmlAttrs,My as resetHead,yo as seoMetaToHeadConfig,Ml as useHead,Ly as usePageTitle,Yg as useSeoMeta,Ly as useTitle};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{dh,Va,Bu,ph,fh,gh,mh,hh,Fu,zu,yh,bh,wh,vh}from"./chunk-4eescf3s.js";import"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Bu as SUSPENSE_RESOLVER_RUNTIME,Va as buildSuspenseResolveScript,hh as createStreamRenderer,gh as extractStreamBoundaries,vh as generateHydrationRuntime,zu as islandDirective,bh as processSectionDirectives,fh as processStreamDirectives,yh as registerStreamingDirectives,ph as renderStreamingPage,dh as streamTemplate,mh as streamTemplateSimple,wh as streamToResponse,Fu as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ha,Mu,tr,lh,Du,Lu,ju,uh}from"./chunk-zpqjsnz9.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{tr as Validator,Mu as defineForm,Du as processErrorDirective,Lu as processErrorsDirective,uh as processFormValidationDirectives,ju as processHasErrorsDirective,Ha as useForm,lh as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{_m}from"./chunk-40k0r6z9.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{_m as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ht,Rg,Ag,Pg,Ig,Og,y,Ng,Bi,Mg,bl,wl}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{ht as STX_ENGINE_BINDING_NAMES,Bi as convertToCommonJS,bl as extractScriptFromTemplate,y as extractVariables,wl as hasVariables,Ng as isCompleteImport,Og as isMissingBindingFailure,Pg as isModuleResolutionFailure,Ig as isSyntaxFailure,Mg as splitDeclaration,Rg as stripTypeScript,Ag as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hr,i}from"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import{Ae}from"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import{We,io,ao}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{hr as buildModulesTag,Ae as injectRouterScript,i as processDirectives,io as processJsonDirective,ao as processOnceDirective,We as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Rs,dg,ai,pg}from"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import{Wt}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{pg as declareBareLoopHead,Wt as parseLoopBinding,dg as processLoops,ai as processLoopsAsync,Rs as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hu,qm,yu,bu,Km,Gm}from"./chunk-8f8qgjjr.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Gm as applySlots,Km as extractSlotContent,qm as parseSlotElement,hu as parseSlots,bu as processSlots,yu as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{sg,Ac,ry,Pc,og,ig,Sn,wr,sy,ag,cg,oy,S}from"./chunk-adsqckg4.js";import"./chunk-b0hj8eg2.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Sn as buildCss,ag as extractClassNames,ig as fingerprintConfig,cg as generateCss,sy as getCachedCSS,sg as getCssServeAsset,S as injectCss,Ac as loadCssEngine,Pc as loadCssEngineConfig,wr as rebuildCss,ry as resetCssCache,og as resolveUserCssConfig,oy as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{iy,lg,ct,Ic,ay,_s,Cs,Es}from"./chunk-v90nz5xm.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-80ky40mm.js";import"./chunk-9rjgq8k4.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{ay as clearOnceStore,Ic as onceStore,ct as partialsCache,_s as processIncludes,Cs as processStackPushDirectives,Es as processStackReplacements,iy as resetUnscopedSignalWarnings,lg as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cm}from"./chunk-nhv81gp2.js";import"./chunk-nzpb263k.js";import"./chunk-1w0bqqh5.js";import"./chunk-2xnbdqy4.js";import"./chunk-vfcbz0an.js";import"./chunk-kg7vby72.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Cm as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{uy,dy,ug,$s}from"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-80ky40mm.js";import"./chunk-9rjgq8k4.js";import{jr}from"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import{yt}from"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{yt as freeIdentifiers,$s as processComponents,ug as processESImports,jr as rendersAsElement,uy as resetMarginStackWarnings,dy as resetTemplateLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Vo,Ua,Wa,Gh}from"./chunk-cmg9x1ka.js";export{Vo as NATIVE_COMPONENTS,Ua as compileToNative,Wa as createHotReloadServer,Gh as default};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Y}from"./chunk-eq86wzhr.js";function r(t){return Y(t)}
3
- export{r};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Fo,Fh,zh}from"./chunk-9344rq4r.js";import"./chunk-j9vfv53x.js";import"./chunk-2xnbdqy4.js";import"./chunk-115bb91s.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{zh as clearComposableCache,Fh as getComposableScript,Fo as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Om}from"./chunk-c25q87ys.js";import"./chunk-nzpb263k.js";import"./chunk-1jtsr42q.js";import"./chunk-1w0bqqh5.js";import"./chunk-2xnbdqy4.js";import"./chunk-6svc4kb8.js";import"./chunk-adsqckg4.js";import"./chunk-v90nz5xm.js";import"./chunk-05x1rd86.js";import"./chunk-vkfw9k1n.js";import"./chunk-vfcbz0an.js";import"./chunk-hyyh7qxw.js";import"./chunk-80ky40mm.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-b0hj8eg2.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Om as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Mh,Bo,Dh,Lh,jh,Bh}from"./chunk-xeyq6d0t.js";import"./chunk-j9vfv53x.js";import"./chunk-2xnbdqy4.js";import"./chunk-115bb91s.js";import"./chunk-vxbvrbqs.js";import"./chunk-kg7vby72.js";import"./chunk-9rjgq8k4.js";import"./chunk-n6q1d66k.js";import"./chunk-yesh4dfe.js";import"./chunk-qnf7w4xw.js";import"./chunk-q0y8gv18.js";import"./chunk-rb2zbdqd.js";import"./chunk-t3zmfh8w.js";import"./chunk-8ccgty8s.js";import"./chunk-eq86wzhr.js";import"./chunk-g3vce7ka.js";import"./chunk-41z7f41b.js";import"./chunk-xmg6bmh6.js";import"./chunk-vk2jy6mn.js";import"./chunk-3b3mkgpj.js";import"./chunk-0jdz31q1.js";import"./chunk-cphc60zw.js";export{Bh as clearStoreCache,Mh as getStoreScript,jh as getStoreScriptFor,Lh as pageStoresAll,Bo as storesRead,Dh as storesReadInFiles};