@stacksjs/stx 0.2.783 → 0.2.785

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 (92) hide show
  1. package/dist/{chunk-s0t7ffrx.js → chunk-05xa75nb.js} +4 -4
  2. package/dist/{chunk-8wt4c799.js → chunk-0q2v7k1m.js} +1 -1
  3. package/dist/{chunk-emjt4a58.js → chunk-0vm1ys7q.js} +1 -1
  4. package/dist/{chunk-mj7agxkf.js → chunk-2b34ce4g.js} +1 -1
  5. package/dist/{chunk-9cmvsbpe.js → chunk-2z69cw5m.js} +2 -2
  6. package/dist/{chunk-jvpp6ds2.js → chunk-3vzee3z9.js} +1 -1
  7. package/dist/{chunk-gnkyh1ax.js → chunk-3ywnsdha.js} +4 -4
  8. package/dist/{chunk-jbw2dpx1.js → chunk-462dyzmx.js} +1 -1
  9. package/dist/chunk-4te06cpw.js +2 -0
  10. package/dist/{chunk-6wttrxfq.js → chunk-4wsdx9vy.js} +1 -1
  11. package/dist/{chunk-pnn0x21f.js → chunk-4yr14p2w.js} +1 -1
  12. package/dist/{chunk-sdtmerd5.js → chunk-5behs1dk.js} +1 -1
  13. package/dist/{chunk-pty7k0d2.js → chunk-65s4mjxb.js} +1 -1
  14. package/dist/{chunk-kc5npv29.js → chunk-6mj7fx2x.js} +1 -1
  15. package/dist/{chunk-412jdkys.js → chunk-7d7aj7rh.js} +1 -1
  16. package/dist/{chunk-v4dwt843.js → chunk-7rtcmxhd.js} +2 -2
  17. package/dist/{chunk-pet0pact.js → chunk-7w1373q6.js} +1 -1
  18. package/dist/{chunk-3jgb1vcc.js → chunk-8yjmf3gv.js} +3 -3
  19. package/dist/{chunk-krkzkp91.js → chunk-9ba2z5fe.js} +2 -2
  20. package/dist/chunk-9fh3h9p3.js +2 -0
  21. package/dist/{chunk-x9ev48te.js → chunk-bancsgvx.js} +1 -1
  22. package/dist/{chunk-76g51m0r.js → chunk-bj1dmqa1.js} +1 -1
  23. package/dist/chunk-cqv28wmk.js +2 -0
  24. package/dist/chunk-d1ngw481.js +2 -0
  25. package/dist/{chunk-8dgxebzq.js → chunk-dcnjpjc1.js} +1 -1
  26. package/dist/{chunk-npav1grn.js → chunk-dt4435zf.js} +1 -1
  27. package/dist/{chunk-9073rpgf.js → chunk-dyn8hwy1.js} +1 -1
  28. package/dist/{chunk-dd6ekezj.js → chunk-e0ze9x4e.js} +2 -2
  29. package/dist/{chunk-83yd1h6k.js → chunk-e3y78men.js} +1 -1
  30. package/dist/chunk-evshahyj.js +2 -0
  31. package/dist/chunk-gd6hxe85.js +2 -0
  32. package/dist/{chunk-t371tew4.js → chunk-ghfw9cgr.js} +1 -1
  33. package/dist/{chunk-9wb2kk92.js → chunk-gm9cag4s.js} +1 -1
  34. package/dist/chunk-hef2dr38.js +2 -0
  35. package/dist/{chunk-rgvrt6mw.js → chunk-hpt354jm.js} +2 -2
  36. package/dist/{chunk-yewd8836.js → chunk-j2qv5ra2.js} +9 -4
  37. package/dist/chunk-jazkazdy.js +2 -0
  38. package/dist/chunk-k8srkymx.js +2 -0
  39. package/dist/{chunk-bys2jh42.js → chunk-kk7seavb.js} +1 -1
  40. package/dist/{chunk-dg0jp3s3.js → chunk-m627y6xq.js} +1 -1
  41. package/dist/{chunk-8n4zff12.js → chunk-mhkftysj.js} +2 -2
  42. package/dist/{chunk-dd9bt8df.js → chunk-mjpv9r5m.js} +10 -10
  43. package/dist/{chunk-5pjvhgej.js → chunk-mxbzqyvp.js} +1 -1
  44. package/dist/{chunk-88jqeekv.js → chunk-pxfrshr6.js} +1 -1
  45. package/dist/chunk-q0v6y356.js +2 -0
  46. package/dist/chunk-qe9dqhpr.js +2 -0
  47. package/dist/{chunk-7nvxgt19.js → chunk-rhpn4s5s.js} +1 -1
  48. package/dist/{chunk-681t1ts7.js → chunk-rzb6bdby.js} +2 -2
  49. package/dist/{chunk-cfyntnhe.js → chunk-ss2mk7zm.js} +1 -1
  50. package/dist/{chunk-zds8fmd3.js → chunk-t3wfrb5x.js} +5 -5
  51. package/dist/{chunk-qtcxy3y3.js → chunk-t619ap22.js} +1 -1
  52. package/dist/chunk-t61m22mj.js +2 -0
  53. package/dist/{chunk-9sp2jz6a.js → chunk-thajeb3z.js} +1 -1
  54. package/dist/{chunk-sgj36ds4.js → chunk-tk08pr4b.js} +1 -1
  55. package/dist/{chunk-rmg1eesq.js → chunk-tmd1qwx7.js} +49 -49
  56. package/dist/{chunk-h2tkfak2.js → chunk-tx628jpx.js} +1 -1
  57. package/dist/{chunk-1cm6011j.js → chunk-w6gfpxz3.js} +1 -1
  58. package/dist/{chunk-h232y76x.js → chunk-x27rzb5w.js} +1 -1
  59. package/dist/{chunk-70ete7t4.js → chunk-xgvsaj4e.js} +1 -1
  60. package/dist/{chunk-6w2zqayq.js → chunk-ya150593.js} +1 -1
  61. package/dist/{chunk-dnr8jmcy.js → chunk-yazy1vk7.js} +1 -1
  62. package/dist/{chunk-efz96s8y.js → chunk-ycyn0jrr.js} +1 -1
  63. package/dist/{chunk-g1sg1w0g.js → chunk-yehbnf0t.js} +1 -1
  64. package/dist/{chunk-wbtca8ga.js → chunk-yzapw5rk.js} +4 -4
  65. package/dist/{chunk-m24mv9fe.js → chunk-z9678kfn.js} +1 -1
  66. package/dist/chunk-zj3dz854.js +3 -0
  67. package/dist/cli.js +7 -7
  68. package/dist/craft-entry.js +1 -1
  69. package/dist/craft.js +1 -1
  70. package/dist/native/runtime/initial-media-mutations.d.ts +3 -0
  71. package/dist/native/runtime/initial-media-mutations.js +40 -0
  72. package/dist/native/runtime/native-host.js +16 -3
  73. package/dist/native/testing.js +21 -0
  74. package/dist/native/ui.d.ts +24 -0
  75. package/dist/native/ui.js +9 -0
  76. package/dist/pwa.js +1 -1
  77. package/dist/ssg.js +2 -2
  78. package/dist/utils.js +1 -1
  79. package/package.json +5 -5
  80. package/dist/chunk-03vwhpj8.js +0 -2
  81. package/dist/chunk-0f6h23m1.js +0 -3
  82. package/dist/chunk-2xafghw0.js +0 -2
  83. package/dist/chunk-6eck3ner.js +0 -2
  84. package/dist/chunk-81x01c9b.js +0 -2
  85. package/dist/chunk-86rnatzb.js +0 -2
  86. package/dist/chunk-8w211y5h.js +0 -2
  87. package/dist/chunk-cernr99x.js +0 -2
  88. package/dist/chunk-d0mrdbdw.js +0 -2
  89. package/dist/chunk-fcb9c5p6.js +0 -2
  90. package/dist/chunk-jrhttwd8.js +0 -2
  91. package/dist/chunk-vyy6768n.js +0 -2
  92. package/dist/chunk-y1zq7txb.js +0 -2
@@ -10,6 +10,7 @@ import { authoredTextEntryProps, projectTextEntry, TEXT_ENTRY_SOURCES, textEntry
10
10
  import { cloneNativeBindingNode } from "./binding-tree.js";
11
11
  import { NATIVE_FORM_ENTRIES } from "./jsc-globals.js";
12
12
  import { createNativeOverlayPresenter } from "./overlay-presenter.js";
13
+ import { prepareInitialMedia } from "./initial-media-mutations.js";
13
14
  import { nativeViewError } from "./view-operations.js";
14
15
  function isHiddenInput(record) {
15
16
  return record.type === "View" && record.props.type === "hidden";
@@ -61,7 +62,7 @@ export const HOST_METHODS = [
61
62
  function followsHref() {}
62
63
  export function createNativeHost(options) {
63
64
  const records = new Map, attributeObservers = new WeakMap, childObservers = new WeakMap, handlers = new Map, eventRegistrations = new WeakMap, componentListeners = new WeakMap, controlsWithDefaultListeners = new WeakSet, implicitSubmitListeners = new WeakMap, formResetCallbacks = new WeakMap;
64
- let queue = [], scheduled = !1, counter = 0, colorScheme = options.colorScheme ?? "light", viewportWidth = Number.isFinite(options.viewportWidth) ? Math.max(0, options.viewportWidth) : 0, stylesheetVariables = createStyleVariables(options.stylesheetTheme?.[colorScheme] ?? []).computed(), disposed = !1;
65
+ let queue = [], mediaFlushTimer, scheduled = !1, counter = 0, colorScheme = options.colorScheme ?? "light", viewportWidth = Number.isFinite(options.viewportWidth) ? Math.max(0, options.viewportWidth) : 0, stylesheetVariables = createStyleVariables(options.stylesheetTheme?.[colorScheme] ?? []).computed(), disposed = !1;
65
66
  const schedule = options.schedule ?? ((flush) => queueMicrotask(flush)), { followLink, linkState } = options, nextId = (prefix) => `${prefix}${++counter}`;
66
67
  function notifyAttributes(node, name) {
67
68
  for (const observer of attributeObservers.get(node) ?? [])
@@ -97,12 +98,21 @@ export function createNativeHost(options) {
97
98
  notify();
98
99
  }
99
100
  function flush() {
101
+ if (mediaFlushTimer !== void 0)
102
+ clearTimeout(mediaFlushTimer);
103
+ mediaFlushTimer = void 0;
100
104
  scheduled = !1;
101
105
  if (queue.length === 0)
102
106
  return;
103
107
  const batch = queue;
104
108
  queue = [];
105
- options.send(batch);
109
+ options.send(prepareInitialMedia(batch));
110
+ }
111
+ function scheduledFlush() {
112
+ if (typeof setTimeout === "function" && typeof clearTimeout === "function" && queue.some((op) => op.op === "createNode" && (op.node.type === "Image" || op.node.type === "Video")))
113
+ mediaFlushTimer = setTimeout(flush, 0);
114
+ else
115
+ flush();
106
116
  }
107
117
  function emit(operation) {
108
118
  if (disposed)
@@ -110,7 +120,7 @@ export function createNativeHost(options) {
110
120
  queue.push(operation);
111
121
  if (!scheduled) {
112
122
  scheduled = !0;
113
- schedule(flush);
123
+ schedule(scheduledFlush);
114
124
  }
115
125
  }
116
126
  function recordOf(node) {
@@ -715,6 +725,9 @@ export function createNativeHost(options) {
715
725
  pending: () => queue.length,
716
726
  flush,
717
727
  dispose() {
728
+ if (mediaFlushTimer !== void 0)
729
+ clearTimeout(mediaFlushTimer);
730
+ mediaFlushTimer = void 0;
718
731
  overlayPresenter.dispose();
719
732
  disposed = !0;
720
733
  queue = [];
@@ -4,6 +4,16 @@ import { compileSharedScreenBundle } from "./compiler/bundle.js";
4
4
  import { NativeFormData } from "./runtime/jsc-globals.js";
5
5
  import { validateTestMutations } from "./testing-mutations.js";
6
6
  import { createTempDir } from "../temp-dir.js";
7
+ function nativeTapAction(node) {
8
+ if (node.props.disabled === !0)
9
+ return { kind: "blocked" };
10
+ if (["Link", "TouchableOpacity", "TouchableHighlight", "Pressable"].includes(node.type)) {
11
+ for (const value of [node.props.href, node.props.to])
12
+ if (typeof value === "string" && value.trim())
13
+ return { kind: "navigate", target: value.trim() };
14
+ }
15
+ return { kind: "event" };
16
+ }
7
17
 
8
18
  export class StatusAnswer {
9
19
  status;
@@ -410,6 +420,17 @@ export function mountNativeScreen(code, screen, options = {}) {
410
420
  const send = (type, payload = {}) => receive(JSON.stringify({ type, payload })), all = () => [...nodes.values()], press = (node, event = "onPress", nativeEvent = {}) => {
411
421
  if (!node)
412
422
  throw Error(`nothing to ${event}`);
423
+ if (event === "onPress" || event === "onClick") {
424
+ if (ended || nodes.get(node.id) !== node)
425
+ return;
426
+ const action = nativeTapAction(node);
427
+ if (action.kind === "blocked")
428
+ return;
429
+ if (action.kind === "navigate") {
430
+ opened.push(action.target);
431
+ return;
432
+ }
433
+ }
413
434
  if (!node.events[event])
414
435
  throw Error(`${node.type} has no ${event}`);
415
436
  send("EVENT", { handlerId: node.events[event], nativeEvent });
@@ -1,3 +1,14 @@
1
+ /**
2
+ * Native lineHeight is a length; CSS's bare number is a font-size multiplier.
3
+ * Adapt explicitly when a shared view binds native typography through :style.
4
+ * Other style properties, including unitless font weights, keep their meaning.
5
+ *
6
+ * nativeTextStyle({ fontFamily: 'Signature', fontSize: 48, lineHeight: 60 }, 'web')
7
+ * // { fontFamily: 'Signature', fontSize: '48px', lineHeight: '60px' }
8
+ */
9
+ export declare function nativeTextStyle<T extends NativeTextMetrics>(style: T, target: 'native'): T;
10
+ export declare function nativeTextStyle<T extends NativeTextMetrics>(style: T, target: 'web'): WebTextStyle<T>;
11
+ export declare function nativeTextStyle<T extends NativeTextMetrics>(style: T, target: NativeTextTarget): T | WebTextStyle<T>;
1
12
  /**
2
13
  * The grouped look a native screen is built from, in role classes.
3
14
  *
@@ -93,4 +104,17 @@ export declare const nativeUi: {
93
104
  noticeDanger: 'p-3 rounded-panel bg-danger-soft';
94
105
  noticeDangerText: 'text-[15px] text-danger-soft-ink'
95
106
  };
107
+ /** Typography authored in native points, shared with an ordinary browser view. */
108
+ export declare interface NativeTextMetrics {
109
+ [property: string]: unknown
110
+ fontFamily?: string
111
+ fontSize?: number
112
+ lineHeight?: number
113
+ letterSpacing?: number
114
+ }
96
115
  export type NativeUiClass = keyof typeof nativeUi;
116
+ export type NativeTextTarget = 'native' | 'web';
117
+ declare type WebTextMetric<Value> = Value extends number ? string : Value;
118
+ export type WebTextStyle<T> = {
119
+ [K in keyof T]: K extends 'fontSize' | 'lineHeight' | 'letterSpacing' ? WebTextMetric<T[K]> : T[K]
120
+ }
package/dist/native/ui.js CHANGED
@@ -36,3 +36,12 @@ export const nativeUi = {
36
36
  noticeDanger: "p-3 rounded-panel bg-danger-soft",
37
37
  noticeDangerText: "text-[15px] text-danger-soft-ink"
38
38
  };
39
+ export function nativeTextStyle(style, target) {
40
+ if (target === "native")
41
+ return { ...style };
42
+ const css = { ...style };
43
+ for (const metric of ["fontSize", "lineHeight", "letterSpacing"])
44
+ if (typeof css[metric] === "number")
45
+ css[metric] = `${css[metric]}px`;
46
+ return css;
47
+ }
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
2
  import{Zs,Ht,wl,Sg}from"./chunk-4wc5pc19.js";import{Ys,Ai,wg,vg,xg}from"./chunk-e1gxykm8.js";import{hl,yl,bl,yg,bg}from"./chunk-y38swh5t.js";import{Ue,Tn,Pi}from"./chunk-k4bdf0dw.js";import{kg,_g,Cg,Eg,Qs,cy}from"./chunk-et1vz3wd.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-y1zq7txb.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-evshahyj.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
4
4
  <html lang="en">
5
5
  <head>
6
6
  <meta charset="UTF-8">
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-7sh9fa3q.js";import{w,el}from"./chunk-bq9xf8nq.js";import"./chunk-9f6qx8b9.js";import"./chunk-2yxva96k.js";import{Rt,S}from"./chunk-rmg1eesq.js";import"./chunk-27rzdq3n.js";import"./chunk-7nvxgt19.js";import"./chunk-zxfptbac.js";import{kt,_t,Ct,Et,Tt,$t}from"./chunk-yewd8836.js";import{a}from"./chunk-681t1ts7.js";import{Cs}from"./chunk-x8js27hd.js";import"./chunk-605b93pe.js";import"./chunk-8n4zff12.js";import{he,en,tn}from"./chunk-kc5npv29.js";import"./chunk-8wt4c799.js";import{y}from"./chunk-rgvrt6mw.js";import{yt,i}from"./chunk-wbtca8ga.js";import"./chunk-bys2jh42.js";import"./chunk-s0t7ffrx.js";import{ds}from"./chunk-9cmvsbpe.js";import"./chunk-sgj36ds4.js";import"./chunk-2gqhfge6.js";import{Ga,Ja,Ya}from"./chunk-d18xd9x5.js";import{Zt,Yn,Zn}from"./chunk-ndjmt3vg.js";import{Qt}from"./chunk-1cm6011j.js";import"./chunk-0f6h23m1.js";import"./chunk-he85ksa7.js";import{X,we}from"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-76g51m0r.js";import{l}from"./chunk-jdj1358b.js";import{s,ge}from"./chunk-m4mpyq3d.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function Pt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Dt,(e,u,g,v)=>{let x=v.trim();if(!x)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)x=Pt(x);let p=It(x);if(!n.has(p))n.set(p,x);let P=r.integrity?` data-stx-integrity="sha384-${vt("sha384").update(x).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let x=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!x)return t;return t.slice(0,v)+x+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=K(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?K(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
2
+ import"./chunk-7sh9fa3q.js";import{w,el}from"./chunk-bq9xf8nq.js";import"./chunk-9f6qx8b9.js";import"./chunk-2yxva96k.js";import{Rt,S}from"./chunk-tmd1qwx7.js";import"./chunk-27rzdq3n.js";import"./chunk-rhpn4s5s.js";import"./chunk-zxfptbac.js";import{kt,_t,Ct,Et,Tt,$t}from"./chunk-j2qv5ra2.js";import{a}from"./chunk-rzb6bdby.js";import{Cs}from"./chunk-x8js27hd.js";import"./chunk-605b93pe.js";import"./chunk-mhkftysj.js";import{he,en,tn}from"./chunk-6mj7fx2x.js";import"./chunk-0q2v7k1m.js";import{y}from"./chunk-hpt354jm.js";import{yt,i}from"./chunk-yzapw5rk.js";import"./chunk-kk7seavb.js";import"./chunk-05xa75nb.js";import{ds}from"./chunk-2z69cw5m.js";import"./chunk-tk08pr4b.js";import"./chunk-2gqhfge6.js";import{Ga,Ja,Ya}from"./chunk-d18xd9x5.js";import{Zt,Yn,Zn}from"./chunk-ndjmt3vg.js";import{Qt}from"./chunk-w6gfpxz3.js";import"./chunk-zj3dz854.js";import"./chunk-he85ksa7.js";import{X,we}from"./chunk-3ywnsdha.js";import"./chunk-wj78td69.js";import"./chunk-bj1dmqa1.js";import{l}from"./chunk-jdj1358b.js";import{s,ge}from"./chunk-m4mpyq3d.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function Pt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,r={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let n=new Map,o=t.replace(Dt,(e,u,g,v)=>{let x=v.trim();if(!x)return e;if(/\bdata-stx-src=/.test(g))return e;if(r.minify)x=Pt(x);let p=It(x);if(!n.has(p))n.set(p,x);let P=r.integrity?` data-stx-integrity="sha384-${vt("sha384").update(x).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),c=Array.from(n,([e,u])=>({hash:e,code:u}));return{html:o,chunks:c}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let r=new Map,n=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=n.exec(t))!==null)r.set(o[1],o[2]);let c=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(r.get(u[1])||""))c.add(u[2]);let g=/<\/head\s*>/iy,v=S(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(c.size===0||v===-1)return t;let x=Array.from(c).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!x)return t;return t.slice(0,v)+x+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let r=t.trim();if(!r)return null;let n=/^https?:\/\//i.test(r)?r:`https://${r}`;try{return new URL(n).origin+new URL(n).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let r of jt){let n=t[r];if(!n)continue;let o=K(n);if(o)return{url:o,source:"env",via:r}}return null}function lt(t){if(!t||typeof t!=="object")return null;let r=t,n=r.site?.url??r.url??r.app?.url;return typeof n==="string"?K(n):null}async function At(t){let{existsSync:r}=await import("fs"),n=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let c=n.resolve(t,o);if(!r(c))continue;try{let e=await import(c),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let r=t.cwd??process.cwd(),n=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let c=await At(r);if(c)return{url:c,source:"site.config",via:"url"};let e=Ft(n);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
3
  `)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Ot;function Lt(t){let r=s(t),{depths:n}=ge(r),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,c;while((c=o.exec(r))!==null){if(n[c.index]!==0)continue;let u=w(r,"(",")",o.lastIndex-1),g=r.indexOf("{",u+1),v=w(r,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(c.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((c=e.exec(r))!==null){if(n[c.index]!==0)continue;let u=el(r,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let r="read";try{let n=await Bun.file(t).text();r="parse";let o=Qt(n),c=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(s(e.attrs))).sort((e,u)=>n.indexOf(e.fullTag)-n.indexOf(u.fullTag));for(let e of c){if(!/\bgetStaticPaths\b/.test(s(e.content)))continue;let u=(Ot??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(s(u)))continue;let g=Lt(u);if(/\bdefineStaticPaths\b/.test(s(g))&&Rt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");r="execute";let v=Function("defineStaticPaths",`return (${g})`)(q);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let x=await v();r="result";let p=Array.isArray(x)?{paths:x}:x;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(n){return{kind:"error",phase:r,error:n instanceof Error?n:Error(String(n))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,r=""){this.cacheDir=t,this.salt=r}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let r=JSON.parse(await Bun.file(t).text());for(let[n,o]of Object.entries(r))this.cache.set(n,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),r={};for(let[n,o]of this.cache)r[n]=o;await Bun.write(t,JSON.stringify(r))}getHash(t,r){let n=D.statSync(t),o=`${this.salt}|${t}:${n.mtimeMs}`;for(let e of r)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let c=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);c=(c<<5)-c+u,c=c&c}return Math.abs(c).toString(36)}get(t,r){let n=this.cache.get(t);if(!n)return null;let o=ft(r).some((u)=>D.existsSync(u)),c=[r,...n.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ds(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||c)return this.cache.delete(t),null;let e=this.getHash(r,n.dependencies??[]);if(n.hash!==e)return this.cache.delete(t),null;return n.html}set(t,r,n,o){let c=this.getHash(r,n);this.cache.set(t,{hash:c,html:o,generatedAt:Date.now(),dependencies:n})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let r=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",r)}async get(t){let r=this.getFilePath(t);if(!await Bun.file(r).exists())return null;try{return JSON.parse(await Bun.file(r).text())}catch{return null}}async set(t,r){let n=this.getFilePath(t);await D.promises.mkdir(f.dirname(n),{recursive:!0}),await Bun.write(n,JSON.stringify(r))}async invalidate(t){let r=this.getFilePath(t);if(await Bun.file(r).exists())await D.promises.unlink(r)}async invalidatePattern(t){let r=f.join(this.cacheDir,"isr");if(!D.existsSync(r))return;let n=await D.promises.readdir(r);for(let o of n){let c=o.replace(/_/g,"/").replace(".json","");if(t.test(c))await D.promises.unlink(f.join(r,o))}}async needsRevalidation(t){let r=await this.get(t);if(!r)return!0;return Date.now()>r.revalidateAfter}}async function Ut(t){let r=[];if(!t.isDynamic)r.push({url:t.pattern,params:{}});else{let n=await gt(t.filePath);if(n.kind==="error")throw Error(`getStaticPaths ${n.phase} failed for ${t.pattern} (${t.filePath}): ${n.error.message}`,{cause:n.error});if(n.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),r;let o=n.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),r;for(let c of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(c.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);r.push({url:e,params:c.params,props:c.props,revalidate:c.revalidate})}}return r}function ft(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let r of ft(t))if(await Bun.file(r).exists())try{let n=await import(r);if(typeof n.default==="function")return await n.default();else if(typeof n.default==="object")return n.default;else if(typeof n.getData==="function")return await n.getData();else{let{default:o,...c}=n;return c}}catch(n){console.error(`Error loading data file ${r}:`,n)}return null}async function Gt(t,r,n){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let c=o[1];if(!c.includes("getStaticProps"))return null;try{let e=c.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
4
4
  return (async function getStaticProps() {
5
5
  ${e[1]}
@@ -37,7 +37,7 @@ ${t.map((o)=>{let c=new URL(o.loc,r).href,e=` <url>
37
37
  ${n.join(`
38
38
  `)}
39
39
  </channel>
40
- </rss>`}async function Vt(t={}){let r=Date.now();tn();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,x={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-pnn0x21f.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-9sp2jz6a.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-pnn0x21f.js");await d('<div class="bg-black"></div>')}catch{}kt();let wt=n?.routeMiddleware?.dir||"middleware";await Ct(process.cwd(),wt);let J=_t();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let St=n?.routeMiddleware?.global||[];Ya(n?.layoutsDir,l(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:n?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:G,props:xt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=Yt(A),bt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...St,...bt];if(nt.length>0){let B=Et(h,G,O||{}),L=Tt(B,null,void 0,{isServer:!0}),j=await $t(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=te(String(C),h),U=ee(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,H),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(H),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
40
+ </rss>`}async function Vt(t={}){let r=Date.now();tn();let n=await a(process.cwd()),o=n.build||{},c=await ut({explicit:t.domain||o.domain,stxConfig:n});if(c.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??n?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:c.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||l(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||n?.partialsDir||"",componentsDir:t.componentsDir||n?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,x={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-4yr14p2w.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:b}=await import("./chunk-thajeb3z.js"),R=await b(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let T=new pt(e.cacheDir,E);if(e.cache)await T.load();try{let{generateCss:d}=await import("./chunk-4yr14p2w.js");await d('<div class="bg-black"></div>')}catch{}kt();let wt=n?.routeMiddleware?.dir||"middleware";await Ct(process.cwd(),wt);let J=_t();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let St=n?.routeMiddleware?.global||[];Ya(n?.layoutsDir,l(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:n?._layerPageDirs});console.log(`Found ${Z.length} routes`);let M=[];for(let d of Z)try{let m=await Ut(d);for(let k of m)M.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=M.length+u.failedCount,console.log(`Generating ${M.length} pages...`);let _=[],Q=[];for(let d=0;d<M.length;d+=e.concurrency)Q.push(M.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:G,props:xt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let A=await Bun.file(k.filePath).text(),O=Yt(A),bt=O?.middleware?Array.isArray(O.middleware)?O.middleware:[O.middleware]:[],nt=[...St,...bt];if(nt.length>0){let B=Et(h,G,O||{}),L=Tt(B,null,void 0,{isServer:!0}),j=await $t(nt,L);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=te(String(C),h),U=ee(h,e);await D.promises.mkdir(f.dirname(U),{recursive:!0}),await Bun.write(U,H),u.successCount++,u.pages.push({route:h,outputPath:U,size:Buffer.byteLength(H),cached:!1}),_.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=A.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(it)try{if(!await Function("route",`
41
41
  const validate = ${it[1]};
42
42
  return validate(route);
43
43
  `)({params:G})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=T.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await mt(k,G,xt,e,n);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
package/dist/utils.js CHANGED
@@ -1065,7 +1065,7 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
1065
1065
  try {
1066
1066
  propsJson = ` data-stx-props="${escapeAttr(JSON.stringify(props))}"`;
1067
1067
  } catch {}
1068
- const hydrateJson = hydrateTrigger ? ` stx-hydrate="${escapeAttr(hydrateTrigger)}"` : "", slotPresence = Object.fromEntries(Object.entries($slots).map(([name, content]) => [name, Boolean(content)])), slotsJson = Object.keys(slotPresence).length > 0 ? ` data-stx-slots="${escapeAttr(JSON.stringify(slotPresence))}"` : "", scopeAttrs = ` data-stx-scope="${scopeId}"${propsJson}${slotsJson}${hydrateJson}`, inlineRoot = /^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(result), layoutRoot = /^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(result), wrapperTag = inlineRoot ? "span" : "div", wrapperStyle = layoutRoot && options._nativeHostAttrs ? ' style="display:flex;flex-direction:column;flex:1;min-height:0;min-width:0"' : inlineRoot || layoutRoot ? ' style="display:contents"' : "";
1068
+ const hydrateJson = hydrateTrigger ? ` stx-hydrate="${escapeAttr(hydrateTrigger)}"` : "", slotPresence = Object.fromEntries(Object.entries($slots).map(([name, content]) => [name, Boolean(content)])), slotsJson = Object.keys(slotPresence).length > 0 ? ` data-stx-slots="${escapeAttr(JSON.stringify(slotPresence))}"` : "", scopeAttrs = ` data-stx-scope="${scopeId}"${propsJson}${slotsJson}${hydrateJson}`, inlineRoot = /^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<span(?=[\s/>])/i.test(result), layoutRoot = /^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-layout-root(?:\s|=|>)/i.test(result), fillRoot = /^\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*<[^>]+\bdata-stx-fill-root(?:\s|=|>)/i.test(result), wrapperTag = inlineRoot ? "span" : "div", wrapperStyle = layoutRoot && options._nativeHostAttrs ? ' style="display:flex;flex-direction:column;flex:1;min-height:0;min-width:0"' : fillRoot && options._nativeHostAttrs ? ' style="width:100%;height:100%"' : inlineRoot || layoutRoot ? ' style="display:contents"' : "";
1069
1069
  output = scopeOnRootElement(result, scopeAttrs) ?? `<${wrapperTag}${scopeAttrs} data-stx-component-wrapper${wrapperStyle}>${result}</${wrapperTag}>`;
1070
1070
  const scopedScripts = await Promise.all(clientScripts.map(async (script) => {
1071
1071
  const scriptMatch = script.match(/<script([^>]*)>([\s\S]*)<\/script>/i);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.783",
4
+ "version": "0.2.785",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -128,12 +128,12 @@
128
128
  "dependencies": {
129
129
  "@stacksjs/ts-css": "^0.3.11",
130
130
  "@stacksjs/clapp": "^0.2.16",
131
- "@stacksjs/desktop": "0.2.783",
132
- "@stacksjs/sanitizer": "0.2.783",
131
+ "@stacksjs/desktop": "0.2.785",
132
+ "@stacksjs/sanitizer": "0.2.785",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
- "bun-plugin-stx": "0.2.783",
134
+ "bun-plugin-stx": "0.2.785",
135
135
  "bunfig": "^0.15.21",
136
- "stx-router": "0.2.783",
136
+ "stx-router": "0.2.785",
137
137
  "ts-broadcasting": "^0.0.11",
138
138
  "ts-images": "^0.2.22",
139
139
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ug}from"./chunk-412jdkys.js";import"./chunk-3jgb1vcc.js";import"./chunk-1cm6011j.js";import"./chunk-8n4zff12.js";import"./chunk-0f6h23m1.js";import"./chunk-gnkyh1ax.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Ug as startProductionServer};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{V}from"./chunk-rmg1eesq.js";function n(t){return V(t)}
3
- export{n};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{yo,sh,oh}from"./chunk-t371tew4.js";import"./chunk-kc5npv29.js";import"./chunk-8n4zff12.js";import"./chunk-7sh9fa3q.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{oh as clearComposableCache,sh as getComposableScript,yo as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kl,_l}from"./chunk-zds8fmd3.js";import"./chunk-9tec9eap.js";import"./chunk-9wb2kk92.js";import"./chunk-npav1grn.js";import"./chunk-412jdkys.js";import"./chunk-yzs2afn7.js";import"./chunk-ady8cnpb.js";import"./chunk-cfyntnhe.js";import"./chunk-h2tkfak2.js";import"./chunk-3jgb1vcc.js";import"./chunk-cz8mka1b.js";import"./chunk-vct6dec8.js";import"./chunk-sxwgq49z.js";import"./chunk-6w2zqayq.js";import"./chunk-cfpw4c6b.js";import"./chunk-416jy1m5.js";import"./chunk-k0aejzg9.js";import"./chunk-gbx5vw81.js";import"./chunk-r1jzbqr3.js";import"./chunk-9ct3gbyv.js";import"./chunk-jvpp6ds2.js";import"./chunk-pet0pact.js";import"./chunk-x8anspa5.js";import"./chunk-td3qp5my.js";import"./chunk-eapt899m.js";import"./chunk-5mng4x26.js";import"./chunk-9073rpgf.js";import"./chunk-t371tew4.js";import"./chunk-ra8f8sm2.js";import"./chunk-v4dwt843.js";import"./chunk-c0ejyxfj.js";import"./chunk-d18xd9x5.js";import{Qt}from"./chunk-1cm6011j.js";import"./chunk-kc5npv29.js";import"./chunk-8n4zff12.js";import"./chunk-7sh9fa3q.js";import{Re,i}from"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import{we}from"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import{lr,ur}from"./chunk-8wt4c799.js";import{vs,j,a}from"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import{m,Le}from"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";import"./chunk-w9d18r1t.js";import"./chunk-kf8hzvb7.js";export{vs as buildWebComponents,ur as cacheTemplate,lr as checkCache,Qt as classifyAllScripts,kl as createMiddleware,_l as createRoute,j as defaultConfig,m as extractVariables,we as injectRouterScript,a as loadStxConfig,Le as processClientScript,i as processDirectives,Re as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Yg}from"./chunk-h2tkfak2.js";import"./chunk-3jgb1vcc.js";import"./chunk-ra8f8sm2.js";import"./chunk-1cm6011j.js";import"./chunk-8n4zff12.js";import"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-8wt4c799.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Yg as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Nl,sa,Xg,Dl,Ml,Gg,Jg}from"./chunk-cfyntnhe.js";import"./chunk-t371tew4.js";import"./chunk-kc5npv29.js";import"./chunk-8n4zff12.js";import"./chunk-7sh9fa3q.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import{It,Xf}from"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Nl as buildVirtualSource,It as extractScriptBlocks,Xf as extractTemplateExpressions,Dl as findRuntimeTypeDeclarations,Ml as findStxModuleDeclarations,Jg as formatTypecheckDiagnostics,Xg as sourcePathFor,Gg as typecheckStxFiles,sa as virtualPathFor};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ka,_a,Ca,Ea,yh}from"./chunk-dnr8jmcy.js";import"./chunk-qby3e5nm.js";import"./chunk-v4dwt843.js";import"./chunk-c0ejyxfj.js";import"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-8wt4c799.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{ka as buildNative,yh as default,_a as findCraftBinary,Ea as getAvailableFormats,Ca as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{us,or,Pf}from"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import{Pt}from"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Pf as declareBareLoopHead,Pt as parseLoopBinding,or as processLoops,us as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Rm,ha,cu,Am,Pm,Im,Om,Nm,lu,uu,Dm,Mm,Lm,jm}from"./chunk-pet0pact.js";import"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-8wt4c799.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{cu as SUSPENSE_RESOLVER_RUNTIME,ha as buildSuspenseResolveScript,Nm as createStreamRenderer,Im as extractStreamBoundaries,jm as generateHydrationRuntime,uu as islandDirective,Mm as processSectionDirectives,Pm as processStreamDirectives,Dm as registerStreamingDirectives,Am as renderStreamingPage,Rm as streamTemplate,Om as streamTemplateSimple,Lm as streamToResponse,lu as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hg}from"./chunk-9wb2kk92.js";import"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-8wt4c799.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Hg as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qm,ho,eh,th,nh,rh}from"./chunk-9073rpgf.js";import"./chunk-kc5npv29.js";import"./chunk-8n4zff12.js";import"./chunk-7sh9fa3q.js";import"./chunk-9cmvsbpe.js";import"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{rh as clearStoreCache,Qm as getStoreScript,nh as getStoreScriptFor,th as pageStoresAll,ho as storesRead,eh as storesReadInFiles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Vg}from"./chunk-npav1grn.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{Vg as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{tr,i}from"./chunk-wbtca8ga.js";import"./chunk-rgvrt6mw.js";import"./chunk-s0t7ffrx.js";import"./chunk-2gqhfge6.js";import"./chunk-bys2jh42.js";import"./chunk-0f6h23m1.js";import"./chunk-sgj36ds4.js";import"./chunk-he85ksa7.js";import"./chunk-9cmvsbpe.js";import{we}from"./chunk-gnkyh1ax.js";import"./chunk-wj78td69.js";import"./chunk-8wt4c799.js";import"./chunk-681t1ts7.js";import"./chunk-76g51m0r.js";import"./chunk-zxfptbac.js";import"./chunk-605b93pe.js";import"./chunk-x8js27hd.js";import"./chunk-yewd8836.js";import{Oe,Bs,Fs}from"./chunk-rmg1eesq.js";import"./chunk-7nvxgt19.js";import"./chunk-27rzdq3n.js";import"./chunk-bq9xf8nq.js";import"./chunk-2yxva96k.js";import"./chunk-9f6qx8b9.js";export{tr as buildModulesTag,we as injectRouterScript,i as processDirectives,Bs as processJsonDirective,Fs as processOnceDirective,Oe as validateClientScript};