@stacksjs/stx 0.2.665 → 0.2.667

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 (157) hide show
  1. package/dist/chunk-028ee6q5.js +2 -0
  2. package/dist/chunk-02ymqwmj.js +2 -0
  3. package/dist/chunk-0syr525r.js +2 -0
  4. package/dist/chunk-1e79xcc8.js +2 -0
  5. package/dist/{chunk-2q50h7zv.js → chunk-1ffjj2c6.js} +5 -5
  6. package/dist/chunk-1pnp91wx.js +2 -0
  7. package/dist/{chunk-2h8ea0we.js → chunk-1sr6c0nk.js} +2 -2
  8. package/dist/chunk-1y5ampxc.js +2 -0
  9. package/dist/chunk-2265dwpm.js +2 -0
  10. package/dist/chunk-280p4q7a.js +2 -0
  11. package/dist/{chunk-hb08vrbb.js → chunk-2dp7hyv7.js} +21 -21
  12. package/dist/{chunk-x34scshq.js → chunk-2zzc7006.js} +2 -2
  13. package/dist/{chunk-wpm58d6p.js → chunk-30nes8ne.js} +2 -2
  14. package/dist/{chunk-zaaeneq6.js → chunk-365vg0eg.js} +2 -2
  15. package/dist/{chunk-2qbvsvwc.js → chunk-3850m7ab.js} +6 -6
  16. package/dist/{chunk-ewcrsyr7.js → chunk-3hxd5td3.js} +2 -2
  17. package/dist/{chunk-pxqh758g.js → chunk-3y41efsf.js} +64 -15
  18. package/dist/{chunk-cg3mvq4h.js → chunk-4701f9eh.js} +6 -6
  19. package/dist/{chunk-jrf01hfv.js → chunk-4c183zem.js} +1 -1
  20. package/dist/{chunk-dra341c0.js → chunk-4htp92hr.js} +15 -15
  21. package/dist/{chunk-pc48mjkc.js → chunk-4qh789bq.js} +4 -4
  22. package/dist/chunk-4s284y6c.js +2 -0
  23. package/dist/chunk-5zgrvj4b.js +2 -0
  24. package/dist/{chunk-38b3w1y4.js → chunk-6h06rqmj.js} +1 -1
  25. package/dist/{chunk-s3dyzxwx.js → chunk-6jwey47v.js} +4 -4
  26. package/dist/{chunk-yq021b3r.js → chunk-7d4z944r.js} +3 -3
  27. package/dist/{chunk-rjh2jwxx.js → chunk-7met6yva.js} +8 -8
  28. package/dist/chunk-7y2htsr8.js +2 -0
  29. package/dist/{chunk-zpc06ysq.js → chunk-85sa9q09.js} +1 -1
  30. package/dist/{chunk-2jh21f1n.js → chunk-89jbdtgw.js} +1 -1
  31. package/dist/{chunk-b6xv8jh9.js → chunk-8gy90n5q.js} +1 -1
  32. package/dist/chunk-an6y1v5h.js +2 -0
  33. package/dist/chunk-b42p0kvz.js +2 -0
  34. package/dist/{chunk-mrrrngzd.js → chunk-b4pcw34n.js} +1 -1
  35. package/dist/chunk-b54s3qde.js +2 -0
  36. package/dist/chunk-b7e07ybq.js +3 -0
  37. package/dist/{chunk-0jhdrgpr.js → chunk-b823zxq6.js} +2 -2
  38. package/dist/{chunk-c9k40352.js → chunk-bdg0fydw.js} +1 -1
  39. package/dist/{chunk-11zp67ds.js → chunk-bexp6dsp.js} +4 -4
  40. package/dist/chunk-bey0cjrp.js +2 -0
  41. package/dist/chunk-bheh3z8r.js +2 -0
  42. package/dist/chunk-bj2xzkv6.js +2 -0
  43. package/dist/{chunk-szyqxcfj.js → chunk-bnn7pd62.js} +2 -2
  44. package/dist/chunk-bs7hq5a3.js +2 -0
  45. package/dist/{chunk-qzy8ypk4.js → chunk-c7d09931.js} +40 -40
  46. package/dist/chunk-crcypbbq.js +2 -0
  47. package/dist/{chunk-w2zceynt.js → chunk-dpvxe52r.js} +1 -1
  48. package/dist/chunk-dq42tzg1.js +2 -0
  49. package/dist/chunk-dvrndj0q.js +2 -0
  50. package/dist/{chunk-np1k9vsr.js → chunk-e1fetwbr.js} +1 -1
  51. package/dist/chunk-e4vpr36s.js +2 -0
  52. package/dist/{chunk-43gr8ggc.js → chunk-ec9ztgxx.js} +2 -2
  53. package/dist/{chunk-yh0wb4n1.js → chunk-ecqrkyg8.js} +2 -2
  54. package/dist/{chunk-nm8yr8a9.js → chunk-f62hpbw8.js} +1 -1
  55. package/dist/{chunk-jh3r0qp7.js → chunk-fbcp9hm4.js} +1 -1
  56. package/dist/chunk-fmzhrwt1.js +2 -0
  57. package/dist/{chunk-gf4e5xtr.js → chunk-fqhmee37.js} +27 -27
  58. package/dist/{chunk-1z1632np.js → chunk-fsef9nvs.js} +41 -41
  59. package/dist/{chunk-een2wqah.js → chunk-fvtwec1r.js} +1 -1
  60. package/dist/{chunk-awe50wee.js → chunk-fwwt7nrc.js} +1 -1
  61. package/dist/{chunk-t9mfztcs.js → chunk-fzqj1mjz.js} +3 -3
  62. package/dist/chunk-gfmw85vw.js +2 -0
  63. package/dist/{chunk-tx6p6jnk.js → chunk-ghsmfkq9.js} +1 -1
  64. package/dist/{chunk-p2mrba1n.js → chunk-gjck0t32.js} +107 -107
  65. package/dist/chunk-hc70e121.js +2 -0
  66. package/dist/{chunk-0g4pr7ww.js → chunk-hjn7qqrq.js} +9 -9
  67. package/dist/chunk-hqwr25qg.js +2 -0
  68. package/dist/{chunk-5w2jy5r9.js → chunk-hvf2e7pr.js} +2 -2
  69. package/dist/{chunk-pmwb5kaf.js → chunk-j045bcpb.js} +2 -2
  70. package/dist/{chunk-nf9bykvg.js → chunk-j7mr8h2w.js} +5 -5
  71. package/dist/{chunk-edvmtk21.js → chunk-jzy0pqez.js} +5 -5
  72. package/dist/{chunk-r7kmsq3n.js → chunk-ka8befem.js} +1 -1
  73. package/dist/chunk-m72b5043.js +2 -0
  74. package/dist/{chunk-v2x9vzgw.js → chunk-md2jn67b.js} +2 -2
  75. package/dist/{chunk-zjsyw63k.js → chunk-mekhzhes.js} +9 -9
  76. package/dist/{chunk-2f1bk3bg.js → chunk-mn3mc6ax.js} +1 -1
  77. package/dist/chunk-n5r1xek6.js +2 -0
  78. package/dist/{chunk-8dcemd4a.js → chunk-ndffc344.js} +1 -1
  79. package/dist/{chunk-d3bsfd10.js → chunk-npa7gze7.js} +2 -2
  80. package/dist/{chunk-8nryyqb5.js → chunk-p472crv1.js} +1 -1
  81. package/dist/{chunk-4yf1w261.js → chunk-pn1ehs6a.js} +2 -2
  82. package/dist/{chunk-7rta163c.js → chunk-pxdww4rb.js} +2 -2
  83. package/dist/{chunk-eqrkhc18.js → chunk-qjtpxsyx.js} +2 -2
  84. package/dist/{chunk-bgra36az.js → chunk-qrq88ng0.js} +1 -1
  85. package/dist/{chunk-gf3bxnpq.js → chunk-qxmyaajq.js} +1 -1
  86. package/dist/{chunk-f2z8s2h9.js → chunk-qxsvd26z.js} +2 -2
  87. package/dist/chunk-r883qzmx.js +2 -0
  88. package/dist/{chunk-vjw3qrqj.js → chunk-rns1e0c5.js} +1 -1
  89. package/dist/{chunk-7ae140wv.js → chunk-sgj6dt85.js} +1 -1
  90. package/dist/{chunk-q1svy1nf.js → chunk-t226hswj.js} +1 -1
  91. package/dist/{chunk-a1p327a7.js → chunk-t886718q.js} +9 -9
  92. package/dist/{chunk-jkvr7e91.js → chunk-tp4eqfxq.js} +2 -2
  93. package/dist/chunk-w1qvq9jf.js +2 -0
  94. package/dist/{chunk-fzxyq6k5.js → chunk-w51q85zg.js} +61 -61
  95. package/dist/chunk-wfjq9ww1.js +2 -0
  96. package/dist/chunk-wpsm2p9x.js +2 -0
  97. package/dist/{chunk-xv43szx0.js → chunk-xqp4hstk.js} +1 -1
  98. package/dist/chunk-ydf4fmr6.js +3 -0
  99. package/dist/{chunk-c1dkh0es.js → chunk-yfvm7q6t.js} +3 -3
  100. package/dist/{chunk-d3vgtr0t.js → chunk-yphmswg3.js} +1 -1
  101. package/dist/{chunk-eecgcj41.js → chunk-yscr04dv.js} +1 -1
  102. package/dist/{chunk-v5916r3j.js → chunk-znb4y12p.js} +5 -5
  103. package/dist/{chunk-5z1n02nd.js → chunk-zwkc8yge.js} +37 -37
  104. package/dist/{chunk-577ntqeg.js → chunk-zx2vhrps.js} +1 -1
  105. package/dist/cli.js +36 -36
  106. package/dist/client/signals-for-runtime.js +51 -2
  107. package/dist/client/signals-process-element-runtime.js +1 -1
  108. package/dist/component-renderer.js +4 -2
  109. package/dist/craft-entry.js +1 -1
  110. package/dist/craft.js +1 -1
  111. package/dist/native/compiler/html-to-ir.js +14 -4
  112. package/dist/native/runtime/binding-tree.d.ts +1 -0
  113. package/dist/native/runtime/binding-tree.js +5 -0
  114. package/dist/native/runtime/craft-bridge.js +1 -0
  115. package/dist/native/runtime/craft.d.ts +1 -0
  116. package/dist/pwa.js +3 -3
  117. package/dist/signal-processing.js +1 -2
  118. package/dist/slot-scopes.js +10 -2
  119. package/dist/slots.d.ts +2 -2
  120. package/dist/slots.js +21 -5
  121. package/dist/ssg.js +5 -5
  122. package/dist/utils.js +1 -1
  123. package/package.json +5 -5
  124. package/dist/chunk-0eepx077.js +0 -2
  125. package/dist/chunk-0fhntp63.js +0 -2
  126. package/dist/chunk-2a4szpje.js +0 -3
  127. package/dist/chunk-3d39yer3.js +0 -2
  128. package/dist/chunk-4v9x7zz5.js +0 -2
  129. package/dist/chunk-5etmsv9z.js +0 -2
  130. package/dist/chunk-773frt6c.js +0 -2
  131. package/dist/chunk-8d2f2e42.js +0 -2
  132. package/dist/chunk-a2bw46t9.js +0 -2
  133. package/dist/chunk-d5pt75tp.js +0 -2
  134. package/dist/chunk-em3aepxz.js +0 -2
  135. package/dist/chunk-g53sg7e0.js +0 -2
  136. package/dist/chunk-gsw8g2ev.js +0 -2
  137. package/dist/chunk-gz90fqn8.js +0 -2
  138. package/dist/chunk-gzd7bmp5.js +0 -2
  139. package/dist/chunk-hcqyf26s.js +0 -2
  140. package/dist/chunk-hhmj9gpk.js +0 -2
  141. package/dist/chunk-k2byvram.js +0 -2
  142. package/dist/chunk-kph7cenp.js +0 -2
  143. package/dist/chunk-papqmch6.js +0 -2
  144. package/dist/chunk-qambfx8c.js +0 -2
  145. package/dist/chunk-stfqkgfv.js +0 -2
  146. package/dist/chunk-t34ds1e3.js +0 -2
  147. package/dist/chunk-t4cbrm81.js +0 -2
  148. package/dist/chunk-t60pt4gv.js +0 -2
  149. package/dist/chunk-t6yjxhn8.js +0 -2
  150. package/dist/chunk-w89mazpv.js +0 -2
  151. package/dist/chunk-wq2fq6b7.js +0 -2
  152. package/dist/chunk-wsp8sj9v.js +0 -3
  153. package/dist/chunk-x8knte1j.js +0 -2
  154. package/dist/chunk-y7xshkqn.js +0 -2
  155. package/dist/chunk-ypsym37h.js +0 -2
  156. package/dist/chunk-z58ybwsv.js +0 -2
  157. package/dist/chunk-zteaygxc.js +0 -2
@@ -196,7 +196,12 @@ function flattenText(node) {
196
196
  return node.children.map((child) => typeof child === "string" ? child : flattenText(child)).join("").replace(/\s+/g, " ").trim();
197
197
  }
198
198
  function settle(frame, diagnostics) {
199
- const node = frame.node, elements = node.children.filter((child) => typeof child !== "string"), text = node.children.filter((child) => typeof child === "string").join("").trim();
199
+ const node = frame.node;
200
+ if (node.props["data-stx-native-template"]) {
201
+ node.children = node.children.map((child) => typeof child === "string" ? createNode("Text", {}, {}, {}, [child]) : child);
202
+ return node;
203
+ }
204
+ const elements = node.children.filter((child) => typeof child !== "string"), text = node.children.filter((child) => typeof child === "string").join("").trim();
200
205
  if (frame.tag === "button" && node.type === "Button" && !frame.declaredNative && elements.length > 0) {
201
206
  node.type = "Pressable";
202
207
  node.props.role ??= "button";
@@ -292,9 +297,12 @@ export async function translateHtmlToIR(html, options = {}) {
292
297
  }, rules: stylesheetRules });
293
298
  if (tag === "html")
294
299
  variables = stylesheetVariables;
295
- const declared = props["data-native"];
300
+ const declared = props["data-native"], structuralTemplate = tag === "template" && attributes.some(([name]) => [":for", "x-for", "@for"].includes(name));
296
301
  let type;
297
- if (typeof declared === "string" && NATIVE_TYPES.has(declared)) {
302
+ if (structuralTemplate) {
303
+ type = "View";
304
+ props["data-stx-native-template"] = !0;
305
+ } else if (typeof declared === "string" && NATIVE_TYPES.has(declared)) {
298
306
  type = declared;
299
307
  delete props["data-native"];
300
308
  } else {
@@ -377,7 +385,7 @@ export async function translateHtmlToIR(html, options = {}) {
377
385
  declaredNative: typeof declared === "string" && NATIVE_TYPES.has(declared),
378
386
  dropped: dropped || inheritedDrop || BOX_ONLY.has(tag) || type === "Video",
379
387
  discard: dropped || inheritedDrop,
380
- unwrap: UNWRAP.has(tag)
388
+ unwrap: UNWRAP.has(tag) && !structuralTemplate
381
389
  };
382
390
  }
383
391
  function openSvg(tag, attributes, parent) {
@@ -488,6 +496,8 @@ export async function translateHtmlToIR(html, options = {}) {
488
496
  return { root, diagnostics };
489
497
  }
490
498
  function bindMustaches(node) {
499
+ if (node.props["data-stx-native-template"])
500
+ return;
491
501
  if (node.bindings?.text || node.children.length === 0 || !node.children.every((child) => typeof child === "string"))
492
502
  return;
493
503
  const expression = mustacheBinding(node.children.join(""));
@@ -19,6 +19,7 @@ export declare interface NativeBindingNode extends NativeNode {
19
19
  readonly nextElementSibling: NativeBindingNode | null
20
20
  namespaceURI: string
21
21
  isConnected: boolean
22
+ readonly content?: NativeBindingNode
22
23
  hasAttribute: (name: string) => boolean
23
24
  getAttribute: (name: string) => string | null
24
25
  setAttribute: (name: string, value: unknown) => void
@@ -29,6 +29,9 @@ function createBindingNode(id, type, bindings, connected = !0, classes = "", onC
29
29
  }
30
30
  },
31
31
  tagName: type === "TextInput" ? "INPUT" : type === "Picker" ? "SELECT" : type.toUpperCase(),
32
+ get content() {
33
+ return node.tagName === "TEMPLATE" ? node : void 0;
34
+ },
32
35
  attributes,
33
36
  parentNode: null,
34
37
  parentElement: null,
@@ -108,6 +111,8 @@ export function materializeNativeBindingTree(document, manifest, host) {
108
111
  const node = createBindingNode(id, source.type, runtimeBindings, !0, source._classes, (value) => host.setAttribute(node, "class", value));
109
112
  if (source.type === "Checkbox" && source.props.type === "checkbox")
110
113
  node.tagName = "INPUT";
114
+ if (source.props["data-stx-native-template"])
115
+ node.tagName = "TEMPLATE";
111
116
  for (const [name, value] of Object.entries(authoredTextEntryProps(authoredAccessibilityProps(source.props, source._accessibilitySource), source._textEntrySource))) {
112
117
  if (value === void 0 || value === null || name === "__stxId")
113
118
  continue;
@@ -572,6 +572,7 @@ export function installCraftBridge(protocol, nativeBridge, target = globalThis,
572
572
  getWorkouts: (options = {}) => request("Health", "getWorkouts", [options]),
573
573
  getDailyStatistics: (type, options = {}) => request("Health", "getDailyStatistics", [type, options]),
574
574
  getHeartRateSamples: (options = {}) => request("Health", "getHeartRateSamples", [options]),
575
+ getSamples: (type, options = {}) => request("Health", "getSamples", [type, options]),
575
576
  getSleepIntervals: (options = {}) => request("Health", "getSleepIntervals", [options]),
576
577
  saveMindfulSession: (session) => request("Health", "saveMindfulSession", [session]),
577
578
  getMindfulSessions: (options = {}) => request("Health", "getMindfulSessions", [options]),
@@ -251,6 +251,7 @@ export declare interface NativeCraft {
251
251
  getWorkouts: (options?: { startDate?: number, endDate?: number, limit?: number }) => Promise<Array<Record<string, unknown>>>
252
252
  getDailyStatistics: (type: string, options?: { startDate?: number, endDate?: number }) => Promise<Array<{ date: string, value: number }>>
253
253
  getHeartRateSamples: (options?: { startDate?: number, endDate?: number, limit?: number }) => Promise<Array<Record<string, unknown>>>
254
+ getSamples: (type: 'bloodGlucose' | 'insulinDelivery' | 'dietaryCarbohydrates', options?: { startDate?: number, endDate?: number, limit?: number }) => Promise<Array<Record<string, unknown>>>
254
255
  getSleepIntervals: (options?: { startDate?: number, endDate?: number }) => Promise<Array<Record<string, unknown>>>
255
256
  saveMindfulSession: (session: { id: string, startDate: number, endDate: number }) => Promise<{ id: string, externalId: string, existing: boolean }>
256
257
  getMindfulSessions: (options?: { startDate?: number, endDate?: number, limit?: number }) => Promise<Array<Record<string, unknown>>>
package/dist/pwa.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Es,jt,bc,gu}from"./chunk-yh0wb4n1.js";import{Cs,Xo,du,pu,fu}from"./chunk-xv43szx0.js";import{mc,hc,yc,lu,uu}from"./chunk-wpmrz872.js";import{Fe,wn,Jo}from"./chunk-wpm58d6p.js";import{mu,hu,yu,bu,Ts,qp}from"./chunk-qv6axke4.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-5etmsv9z.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>
2
+ import{Es,jt,bc,gu}from"./chunk-ecqrkyg8.js";import{Cs,Xo,du,pu,fu}from"./chunk-xqp4hstk.js";import{mc,hc,yc,lu,uu}from"./chunk-wpmrz872.js";import{ze,wn,Jo}from"./chunk-30nes8ne.js";import{mu,hu,yu,bu,Ts,qp}from"./chunk-qv6axke4.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-bheh3z8r.js"),o=await Bun.file(e).text();return await r(o,{},e,n,new Set)}catch(r){console.warn(`[PWA] Failed to process custom offline page: ${r}`)}else console.warn(`[PWA] Custom offline page not found: ${e}`)}return E(n)}function E(n){let t=n.pwa?.offline,e=n.pwa?.manifest,r=t?.fallbackTitle||"You are offline",o=t?.fallbackMessage||"Please check your internet connection and try again.",a=e?.themeColor||"#4f46e5",s=e?.shortName||e?.name||"App";return`<!DOCTYPE html>
4
4
  <html lang="en">
5
5
  <head>
6
6
  <meta charset="UTF-8">
@@ -233,4 +233,4 @@ Icon generation requires the sharp package for image processing.`),e.success=!1,
233
233
  }, 5000);
234
234
  </script>
235
235
  </body>
236
- </html>`}function b(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=Fe(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Es(n,t);if(a){let s=jt(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return Xo(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,hc as auditBuildOutput,mc as auditConfig,re as buildPwaAssets,yc as calculateAuditResult,uu as formatAuditResult,Jo as formatSize,j as generateManifest,_ as generateManifestJson,pu as generateManifestLink,F as generateOfflinePage,Fe as generatePrecacheManifest,wn as generatePrecacheManifestJs,M as generatePwaIcons,Cs as generatePwaTags,Es as generateServiceWorker,gu as generateServiceWorkerAuto,du as generateSwRegistrationScript,fu as generateThemeColorMeta,N as getExpectedIconPaths,jt as getServiceWorkerFileName,Xo as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,bc as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Ts as pwaDirectives,mu as pwaInstallDirective,yu as pwaOfflineDirective,bu as pwaPushDirective,hu as pwaUpdateDirective,qp as registerPwaDirectives,lu as runPwaAudit,D as validateManifest};
236
+ </html>`}function b(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}async function re(n,t){let e={success:!0,files:{icons:[]},errors:[],warnings:[]},r=n.pwa;if(!r?.enabled)return e;try{B.mkdirSync(t,{recursive:!0})}catch{return e.errors.push(`Failed to create output directory: ${t}`),e.success=!1,e}try{let a=_(n);if(a){let s=w.join(t,"manifest.json");await Bun.write(s,a),e.files.manifest=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate manifest.json: ${s}`),e.success=!1}if(r.icons?.src)if(await I()){let s=await M(n,t);if(e.files.icons=s.generatedFiles,e.warnings.push(...s.warnings),!s.success)e.errors.push(...s.errors),e.success=!1}else e.warnings.push("sharp is not installed. Skipping icon generation. Install with: bun add sharp");if(r.offline?.enabled)try{let a=await F(n);if(a){let s=w.join(t,"offline.html");await Bun.write(s,a),e.files.offlinePage=s}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate offline page: ${s}`),e.success=!1}let o;if(r.precache?.enabled){let a=ze(t,n);o={fileCount:a.fileCount,totalSize:a.totalSize},e.precacheStats=o}try{let a=Es(n,t);if(a){let s=jt(n),l=w.join(t,s);await Bun.write(l,a),e.files.serviceWorker=l}}catch(a){let s=a instanceof Error?a.message:String(a);e.errors.push(`Failed to generate service worker: ${s}`),e.success=!1}return e}function ae(n,t){return Xo(n,t)}function se(n){return n.pwa?.enabled===!0}export{S as APPLE_TOUCH_ICON_SIZES,v as DEFAULT_ICON_SIZES,P as FAVICON_SIZES,hc as auditBuildOutput,mc as auditConfig,re as buildPwaAssets,yc as calculateAuditResult,uu as formatAuditResult,Jo as formatSize,j as generateManifest,_ as generateManifestJson,pu as generateManifestLink,F as generateOfflinePage,ze as generatePrecacheManifest,wn as generatePrecacheManifestJs,M as generatePwaIcons,Cs as generatePwaTags,Es as generateServiceWorker,gu as generateServiceWorkerAuto,du as generateSwRegistrationScript,fu as generateThemeColorMeta,N as getExpectedIconPaths,jt as getServiceWorkerFileName,Xo as injectPwaTags,se as isPwaEnabled,I as isSharpAvailable,bc as isWorkboxEnabled,q as mergeManifestConfig,ae as processPwaHtml,Ts as pwaDirectives,mu as pwaInstallDirective,yu as pwaOfflineDirective,bu as pwaPushDirective,hu as pwaUpdateDirective,qp as registerPwaDirectives,lu as runPwaAudit,D as validateManifest};
@@ -839,8 +839,7 @@ export async function processScriptSetup(template, filePath, serverData, options
839
839
  let scriptContent = signalScripts[i].bundled ?? injectBrowserCoreAutoImports(signalScripts[i].content).code;
840
840
  if (!signalScripts[i].bundled && hasUserImports(scriptContent))
841
841
  scriptContent = await bundleClientScript(scriptContent, filePath || "", {
842
- projectRoot: process.cwd(),
843
- externalizeUserModules: options.forceClientSetup ? !1 : void 0
842
+ projectRoot: process.cwd()
844
843
  });
845
844
  scriptContent = stripStxRuntimeImports(scriptContent);
846
845
  const resolved = transformStoreImports(scriptContent);
@@ -1,5 +1,5 @@
1
1
  export function collectSlotScopes(source) {
2
- if (!source.includes("#") && !source.includes("v-slot:"))
2
+ if (!source.includes("#") && !source.includes("v-slot:") && !source.includes("data-stx-slot-binding"))
3
3
  return [];
4
4
  const scopes = [], stack = [], tags = /<!--[\s\S]*?-->|<script\b(?:"[^"]*"|'[^']*'|[^'">])*>[\s\S]*?<\/script\s*>|<style\b(?:"[^"]*"|'[^']*'|[^'">])*>[\s\S]*?<\/style\s*>|<\/?[a-z][\w:-]*\b(?:"[^"]*"|'[^']*'|[^'">])*>/gi;
5
5
  for (const match of source.matchAll(tags)) {
@@ -9,7 +9,15 @@ export function collectSlotScopes(source) {
9
9
  if (scope)
10
10
  scope.end = match.index;
11
11
  } else if (/^<template\b/i.test(tag) && !/\/\s*>$/.test(tag)) {
12
- const binding = [...tag.slice(9).matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g)].find((attr) => /^(?:#[\w-]+|v-slot:[\w-]+)$/i.test(attr[1])), value = (binding?.[2] ?? binding?.[3])?.trim(), scope = value ? { start: match.index + tag.length, end: source.length, binding: value } : void 0;
12
+ const binding = [...tag.slice(9).matchAll(/([^\s=/>]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g)].find((attr) => /^(?:#[\w-]+|v-slot:[\w-]+|data-stx-slot-binding)$/i.test(attr[1]));
13
+ let value = (binding?.[2] ?? binding?.[3])?.trim();
14
+ if (value && binding?.[1] === "data-stx-slot-binding")
15
+ try {
16
+ value = decodeURIComponent(value);
17
+ } catch {
18
+ value = void 0;
19
+ }
20
+ const scope = value ? { start: match.index + tag.length, end: source.length, binding: value } : void 0;
13
21
  stack.push(scope);
14
22
  if (scope)
15
23
  scopes.push(scope);
package/dist/slots.d.ts CHANGED
@@ -32,7 +32,7 @@ export declare function renderSlot(slotDef: SlotDefinition | undefined, slotProp
32
32
  *
33
33
  * Replaces <slot> elements with the appropriate content from parsed slots.
34
34
  */
35
- export declare function processSlots(template: string, parsedSlots: ParsedSlots, context: Record<string, unknown>): Promise<string>;
35
+ export declare function processSlots(template: string, parsedSlots: ParsedSlots, context: Record<string, unknown>, runtimeOwner?: string): Promise<string>;
36
36
  /**
37
37
  * Extract named slots from component children content.
38
38
  * This is called when processing a component to separate slot content.
@@ -45,7 +45,7 @@ export declare function extractSlotContent(childContent: string): {
45
45
  * Apply slots to a component template.
46
46
  * This replaces <slot> elements with the provided slot content.
47
47
  */
48
- export declare function applySlots(componentTemplate: string, defaultSlotContent: string, namedSlots: Map<string, SlotDefinition>, context: Record<string, unknown>): Promise<string>;
48
+ export declare function applySlots(componentTemplate: string, defaultSlotContent: string, namedSlots: Map<string, SlotDefinition>, context: Record<string, unknown>, runtimeOwner?: string): Promise<string>;
49
49
  // =============================================================================
50
50
  // Types
51
51
  // =============================================================================
package/dist/slots.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { escapeHtml } from "./expressions.js";
2
2
  import { isExpressionSafe, createSafeFunction } from "./safe-evaluator.js";
3
- import { readsAnyName } from "./loop-binding.js";
3
+ import { loopBoundNames, readsAnyName } from "./loop-binding.js";
4
4
  function findMatchingTemplateClose(content, startIndex) {
5
5
  let depth = 1, i = startIndex;
6
6
  const openTag = "<template", closeTag = "</template";
@@ -325,14 +325,30 @@ function evaluateSimpleExpression(expr, context) {
325
325
  return;
326
326
  }
327
327
  }
328
- export async function processSlots(template, parsedSlots, context) {
328
+ export async function processSlots(template, parsedSlots, context, runtimeOwner) {
329
329
  let result = template;
330
330
  result = await replaceAsync(result, /<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi, async (match, name, attrs, defaultContent) => {
331
- const slotDef = parsedSlots.named.get(name), defaultFallback = defaultContent?.trim() || "", propsStr = attrs || "", props = {}, propsRegex = /:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g;
331
+ const slotDef = parsedSlots.named.get(name), defaultFallback = defaultContent?.trim() || "", propsStr = attrs || "", props = {}, expressions = [], propsRegex = /:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g;
332
332
  let propMatch;
333
333
  while ((propMatch = propsRegex.exec(propsStr)) !== null) {
334
334
  const propName = propMatch[1], propExpr = propMatch[2];
335
335
  props[propName] = evaluateSimpleExpression(propExpr, context);
336
+ expressions.push([propName, propExpr]);
337
+ }
338
+ if (runtimeOwner !== void 0 && slotDef?.propsBinding && Object.values(props).some((value) => value === void 0)) {
339
+ const binding = slotDef.propsBinding.trim(), names = loopBoundNames(`${binding} in []`);
340
+ let local = "__stx_slot_props";
341
+ while (names.includes(local))
342
+ local += "_";
343
+ const source = expressions.map(([key, expression]) => {
344
+ const value = props[key];
345
+ let serialized;
346
+ try {
347
+ serialized = value === void 0 ? void 0 : JSON.stringify(value);
348
+ } catch {}
349
+ return `${JSON.stringify(key)}:(${serialized ?? expression})`;
350
+ }).join(","), scope = escapeHtml(JSON.stringify({ binding, names, owner: runtimeOwner }));
351
+ return `<template :for="${escapeHtml(`${local} in [{${source}}]`)}" data-stx-slot-binding="${encodeURIComponent(binding)}" data-stx-slot-scope="${scope}">${slotDef.content}</template>`;
336
352
  }
337
353
  return await renderSlot(slotDef, props, defaultFallback, context);
338
354
  });
@@ -368,9 +384,9 @@ export function extractSlotContent(childContent) {
368
384
  namedSlots: parsed.named
369
385
  };
370
386
  }
371
- export async function applySlots(componentTemplate, defaultSlotContent, namedSlots, context) {
387
+ export async function applySlots(componentTemplate, defaultSlotContent, namedSlots, context, runtimeOwner) {
372
388
  return await processSlots(componentTemplate, {
373
389
  default: defaultSlotContent,
374
390
  named: namedSlots
375
- }, context);
391
+ }, context, runtimeOwner);
376
392
  }
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-v2x9vzgw.js";import"./chunk-hb08vrbb.js";import"./chunk-7rta163c.js";import"./chunk-ce6zddpf.js";import"./chunk-qzy8ypk4.js";import"./chunk-2h8ea0we.js";import"./chunk-b6xv8jh9.js";import"./chunk-a3d0g4mr.js";import{vt,wt,xt,St,kt,_t}from"./chunk-zaaeneq6.js";import{o}from"./chunk-1z1632np.js";import{Yr}from"./chunk-t9mfztcs.js";import"./chunk-04kg16qs.js";import"./chunk-43gr8ggc.js";import{_e,Gt,Kt}from"./chunk-a1p327a7.js";import"./chunk-bgra36az.js";import{h}from"./chunk-nf9bykvg.js";import{ft,s}from"./chunk-fzxyq6k5.js";import"./chunk-0g4pr7ww.js";import"./chunk-zjsyw63k.js";import"./chunk-pc48mjkc.js";import"./chunk-2q50h7zv.js";import"./chunk-prf164ct.js";import{Ji,Yi,Zi}from"./chunk-6ajahb2x.js";import{qt,jn,Bn}from"./chunk-xaa36b0x.js";import"./chunk-r7kmsq3n.js";import{V,me}from"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-q1svy1nf.js";import{c}from"./chunk-zhf01af3.js";import x from"fs";import g from"path";import{createHash as mt}from"crypto";function yt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var bt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Pt(t){return Bun.hash(t).toString(16)}function nt(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let i=new Map,r=t.replace(bt,(e,l,w,y)=>{let f=y.trim();if(!f)return e;if(/\bdata-stx-src=/.test(w))return e;if(n.minify)f=yt(f);let S=Pt(f);if(!i.has(S))i.set(S,f);let P=n.integrity?` data-stx-integrity="sha384-${mt("sha384").update(f).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),a=Array.from(i,([e,l])=>({hash:e,code:l}));return{html:r,chunks:a}}var $t=new Set(["visible","idle"]);function it(t){if(!t.includes("data-stx-src="))return t;let n=new Map,i=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=i.exec(t))!==null)n.set(r[1],r[2]);let a=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if($t.has(n.get(l[1])||""))a.add(l[2]);let w=t.lastIndexOf("</head>");if(a.size===0||w===-1)return t;let y=Array.from(a).filter((f)=>!t.includes(`rel="prefetch" href="${f}"`)).map((f)=>`<link rel="prefetch" href="${f}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var Dt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function W(t){let n=t.trim();if(!n)return null;let i=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(i).origin+new URL(i).pathname.replace(/\/$/,"")}catch{return null}}function Rt(t){for(let n of Dt){let i=t[n];if(!i)continue;let r=W(i);if(r)return{url:r,source:"env",via:n}}return null}function st(t){if(!t||typeof t!=="object")return null;let n=t,i=n.site?.url??n.url??n.app?.url;return typeof i==="string"?W(i):null}async function Ct(t){let{existsSync:n}=await import("fs"),i=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let a=i.resolve(t,r);if(!n(a))continue;try{let e=await import(a),l=st(e.default??e);if(l)return l}catch{}}return null}async function at(t={}){let n=t.cwd??process.cwd(),i=t.env??process.env;if(t.explicit){let l=W(t.explicit);if(l)return{url:l,source:"option"}}let r=st(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let a=await Ct(n);if(a)return{url:a,source:"site.config",via:"url"};let e=Rt(i);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ot(){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-md2jn67b.js";import"./chunk-2dp7hyv7.js";import"./chunk-pxdww4rb.js";import"./chunk-ce6zddpf.js";import"./chunk-c7d09931.js";import"./chunk-1sr6c0nk.js";import"./chunk-8gy90n5q.js";import"./chunk-a3d0g4mr.js";import{wt,xt,St,kt,_t,Ct}from"./chunk-365vg0eg.js";import{o}from"./chunk-fsef9nvs.js";import{Yr}from"./chunk-fzqj1mjz.js";import"./chunk-04kg16qs.js";import"./chunk-ec9ztgxx.js";import{Ce,Gt,Kt}from"./chunk-t886718q.js";import"./chunk-qrq88ng0.js";import{h}from"./chunk-j7mr8h2w.js";import{gt,s}from"./chunk-w51q85zg.js";import"./chunk-hjn7qqrq.js";import"./chunk-mekhzhes.js";import"./chunk-4qh789bq.js";import"./chunk-1ffjj2c6.js";import"./chunk-prf164ct.js";import{Ji,Yi,Zi}from"./chunk-6ajahb2x.js";import{qt,jn,Bn}from"./chunk-xaa36b0x.js";import"./chunk-ka8befem.js";import{V,me}from"./chunk-jzy0pqez.js";import"./chunk-p472crv1.js";import"./chunk-t226hswj.js";import{c}from"./chunk-zhf01af3.js";import x from"fs";import g from"path";import{createHash as mt}from"crypto";function yt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var vt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function bt(t){return Bun.hash(t).toString(16)}function nt(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let i=new Map,r=t.replace(vt,(e,l,w,y)=>{let f=y.trim();if(!f)return e;if(/\bdata-stx-src=/.test(w))return e;if(n.minify)f=yt(f);let S=bt(f);if(!i.has(S))i.set(S,f);let P=n.integrity?` data-stx-integrity="sha384-${mt("sha384").update(f).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${l}" data-stx-src="/_stx/islands/${S}.js"${P}${w}></script>`}),a=Array.from(i,([e,l])=>({hash:e,code:l}));return{html:r,chunks:a}}var Pt=new Set(["visible","idle"]);function it(t){if(!t.includes("data-stx-src="))return t;let n=new Map,i=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,r;while((r=i.exec(t))!==null)n.set(r[1],r[2]);let a=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,l;while((l=e.exec(t))!==null)if(Pt.has(n.get(l[1])||""))a.add(l[2]);let w=t.lastIndexOf("</head>");if(a.size===0||w===-1)return t;let y=Array.from(a).filter((f)=>!t.includes(`rel="prefetch" href="${f}"`)).map((f)=>`<link rel="prefetch" href="${f}" as="script">`).join("");if(!y)return t;return t.slice(0,w)+y+t.slice(w)}var $t=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function W(t){let n=t.trim();if(!n)return null;let i=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(i).origin+new URL(i).pathname.replace(/\/$/,"")}catch{return null}}function Dt(t){for(let n of $t){let i=t[n];if(!i)continue;let r=W(i);if(r)return{url:r,source:"env",via:n}}return null}function st(t){if(!t||typeof t!=="object")return null;let n=t,i=n.site?.url??n.url??n.app?.url;return typeof i==="string"?W(i):null}async function Rt(t){let{existsSync:n}=await import("fs"),i=await import("path");for(let r of["site.config.ts","site.config.js",".config/site.config.ts"]){let a=i.resolve(t,r);if(!n(a))continue;try{let e=await import(a),l=st(e.default??e);if(l)return l}catch{}}return null}async function at(t={}){let n=t.cwd??process.cwd(),i=t.env??process.env;if(t.explicit){let l=W(t.explicit);if(l)return{url:l,source:"option"}}let r=st(t.stxConfig);if(r)return{url:r,source:"stx.config",via:"site.url"};let a=await Rt(n);if(a)return{url:a,source:"site.config",via:"url"};let e=Dt(i);if(e)return e;return{url:"http://localhost",source:"fallback"}}function ot(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
3
3
  `)}class ct{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=g.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[i,r]of Object.entries(n))this.cache.set(i,r)}catch{}this.loaded=!0}async save(){await x.promises.mkdir(this.cacheDir,{recursive:!0});let t=g.join(this.cacheDir,"build-cache.json"),n={};for(let[i,r]of this.cache)n[i]=r;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let i=x.statSync(t),r=`${this.salt}|${t}:${i.mtimeMs}`;for(let e of n)if(x.existsSync(e)){let l=x.statSync(e);r+=`:${e}:${l.mtimeMs}`}let a=0;for(let e=0;e<r.length;e++){let l=r.charCodeAt(e);a=(a<<5)-a+l,a=a&a}return Math.abs(a).toString(36)}get(t,n){let i=this.cache.get(t);if(!i)return null;let r=this.getHash(n,i.dependencies??[]);if(i.hash!==r)return this.cache.delete(t),null;return i.html}set(t,n,i,r){let a=this.getHash(n,i);this.cache.set(t,{hash:a,html:r,generatedAt:Date.now(),dependencies:i})}}class lt{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return g.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let i=this.getFilePath(t);await x.promises.mkdir(g.dirname(i),{recursive:!0}),await Bun.write(i,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await x.promises.unlink(n)}async invalidatePattern(t){let n=g.join(this.cacheDir,"isr");if(!x.existsSync(n))return;let i=await x.promises.readdir(n);for(let r of i){let a=r.replace(/_/g,"/").replace(".json","");if(t.test(a))await x.promises.unlink(g.join(n,r))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function Et(t){try{let i=(await Bun.file(t).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!i)return null;let r=i[1];if(!r.includes("getStaticPaths"))return null;let a=r.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!a)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${a[1]}
@@ -9,7 +9,7 @@ import"./chunk-v2x9vzgw.js";import"./chunk-hb08vrbb.js";import"./chunk-7rta163c.
9
9
  ${e[1]}
10
10
  })()
11
11
  `)(n)}catch(e){return console.error(`Error executing getStaticProps in ${i}:`,e),null}}function Ft(t){return/(?:^|[^\w$.])(?:export\s+)?(?:async\s+)?function\s+action\s*\(/.test(t)||/(?:^|[^\w$.])(?:export\s+)?(?:const|let|var)\s+action\s*=/.test(t)}async function ut(t,n,i={},r,a){let e=await Bun.file(t.filePath).text(),l=await Bt(t.filePath),w=await jt(e,n,t.filePath),y={...l||{},...w||{},...i,params:n,$route:{path:t.pattern,params:n}},f=new Set,S=[],P=[],D={...a,...r.partialsDir?{partialsDir:r.partialsDir}:{},...r.componentsDir?{componentsDir:r.componentsDir}:{},debug:!1,cache:!1,autoShell:!0,onIncludeError:(b)=>{S.push(`${g.relative(process.cwd(),b.templatePath)}: ${b.message}
12
- resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(Ft(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let p=await s(e,y,t.filePath,D,f);for(let b of[t.filePath,...f])for(let B of _e(b))f.add(B);if(Object.keys(n).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
12
+ resolved against partialsDir: ${b.partialsDir}`)},onServerScriptError:(b)=>{P.push(`${g.relative(process.cwd(),b.sourcePath)} (${b.kind}): ${b.message}`)}};if(Ft(e))console.warn(`Warning: ${t.pattern} exports a page action, which cannot run in a static build. Its form will submit to a file. Serve this route with the production server, or point the form's action at a route handler.`);let p=await s(e,y,t.filePath,D,f);for(let b of[t.filePath,...f])for(let B of Ce(b))f.add(B);if(Object.keys(n).length>0){let b=`<script>if(window.stx)window.stx._rp=${JSON.stringify(n)};else window.__stx_rp=${JSON.stringify(n)};</script>`;if(p.includes("</head>"))p=p.replace("</head>",`${b}
13
13
  </head>`);else p=`${b}
14
14
  ${p}`}if(p=await me(p,{router:r.router}),p=await h(p),r.minify!==!1)return{html:Ot(p),dependencies:Array.from(f),includeFailures:S,serverScriptFailures:P};return{html:p,dependencies:Array.from(f),includeFailures:S,serverScriptFailures:P}}function Ot(t){let n=[],i=0,r=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,a;while((a=r.exec(t))!==null){let l=t.slice(i,a.index);n.push(l.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><"));let w=a[1],y=a[2],f=a[3];y=y.replace(/([^:"\\'`])\/\/(?!\/)(?![*!])([^\n]*)/g,"$1"),n.push(w+y+f),i=a.index+a[0].length}let e=t.slice(i);return n.push(e.replace(/<!--(?!\[if)[\s\S]*?-->/g,"").replace(/\s+/g," ").replace(/>\s+</g,"><")),n.join("").trim()}function Tt(t){let n=0;for(let i=0;i<t.length;i++){let r=t.charCodeAt(i);n=(n<<5)-n+r,n=n&n}return`"${Math.abs(n).toString(36)}"`}function At(t,n,i,r){if(i?.sitemap===!1)return!0;if(/<meta[^>]+name=["']robots["'][^>]+content=["'][^"']*noindex/i.test(n))return!0;return r.some((a)=>{if(a instanceof RegExp)return a.test(t);return a.endsWith("/")?t===a.slice(0,-1)||t.startsWith(a):t===a})}function Lt(t,n){return`<?xml version="1.0" encoding="UTF-8"?>
15
15
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
@@ -41,10 +41,10 @@ ${t.map((r)=>{let a=new URL(r.loc,n).href,e=` <url>
41
41
  ${i.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function Ut(t={}){let n=Date.now();Kt();let i=await o(process.cwd()),r=i.build||{},a=await at({explicit:t.domain||r.domain,stxConfig:i});if(a.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ot());let e={router:t.router??i?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:a.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||i?.partialsDir||"",componentsDir:t.componentsDir||i?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,f={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-em3aepxz.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-vjw3qrqj.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new ct(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-em3aepxz.js");await u('<div class="bg-black"></div>')}catch{}vt();let dt=i?.routeMiddleware?.dir||"middleware";await xt(process.cwd(),dt);let z=wt();if(z.length>0)console.log(`Loaded ${z.length} middleware: ${z.join(", ")}`);let gt=i?.routeMiddleware?.global||[];Zi(i?.layoutsDir,c(process.cwd()));let J=V(".",{pagesDir:e.pagesDir,pagesDirs:i?._layerPageDirs});console.log(`Found ${J.length} routes`);let _=[];for(let u of J){let m=await It(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],K=[];for(let u=0;u<_.length;u+=e.concurrency)K.push(_.slice(u,u+e.concurrency));for(let u of K)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:pt,revalidate:Z}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Wt(j),ht=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],Q=[...gt,...ht];if(Q.length>0){let C=St(d,L,F||{}),O=kt(C,null,void 0,{isServer:!0}),E=await _t(Q,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Jt(String(R),d),T=Vt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let tt=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(tt)try{if(!await Function("route",`
44
+ </rss>`}async function Ut(t={}){let n=Date.now();Kt();let i=await o(process.cwd()),r=i.build||{},a=await at({explicit:t.domain||r.domain,stxConfig:i});if(a.source==="fallback"&&(t.sitemap??r.sitemap??!0))console.warn(ot());let e={router:t.router??i?.router??{},pagesDir:t.pagesDir||r.pagesDir||"pages",outputDir:t.outputDir||r.outputDir||"dist",baseUrl:t.baseUrl||r.baseUrl||"/",domain:a.url,revalidate:t.revalidate??r.revalidate??!1,sitemap:t.sitemap??r.sitemap??!0,sitemapExclude:t.sitemapExclude||r.sitemapExclude||[],robots:t.robots??r.robots??!0,rss:t.rss??r.rss??!1,concurrency:t.concurrency||r.concurrency||10,cache:t.cache??r.cache??!0,cacheDir:t.cacheDir||r.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??r.minify??!0,generate404:t.generate404??r.generate404??!0,publicDir:t.publicDir||r.publicDir||"public",trailingSlash:t.trailingSlash??r.trailingSlash??!1,cleanOutput:t.cleanOutput??r.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||i?.partialsDir||"",componentsDir:t.componentsDir||i?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},l={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},w=new Set,y=0,f={},S={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&x.existsSync(e.outputDir))await x.promises.rm(e.outputDir,{recursive:!0});await x.promises.mkdir(e.outputDir,{recursive:!0});let D=e.cacheSalt;if(!D){let{resolveUserCssConfig:u,fingerprintConfig:m}=await import("./chunk-r883qzmx.js");try{D=m(await u(process.cwd()))}catch{}}let{prepareImageDelivery:p}=await import("./chunk-rns1e0c5.js"),b=await p(e.publicDir,e.outputDir);if(b.count>0)console.log(`Optimized ${b.count} image(s) for responsive delivery`),D=[D,b.fingerprint].filter(Boolean).join(":");let B=new ct(e.cacheDir,D);if(e.cache)await B.load();try{let{generateCss:u}=await import("./chunk-r883qzmx.js");await u('<div class="bg-black"></div>')}catch{}wt();let dt=i?.routeMiddleware?.dir||"middleware";await St(process.cwd(),dt);let z=xt();if(z.length>0)console.log(`Loaded ${z.length} middleware: ${z.join(", ")}`);let pt=i?.routeMiddleware?.global||[];Zi(i?.layoutsDir,c(process.cwd()));let J=V(".",{pagesDir:e.pagesDir,pagesDirs:i?._layerPageDirs});console.log(`Found ${J.length} routes`);let _=[];for(let u of J){let m=await It(u);for(let v of m)_.push({route:u,url:v.url,params:v.params,props:v.props,revalidate:v.revalidate??e.revalidate})}l.totalPages=_.length,console.log(`Generating ${l.totalPages} pages...`);let A=[],K=[];for(let u=0;u<_.length;u+=e.concurrency)K.push(_.slice(u,u+e.concurrency));for(let u of K)await Promise.all(u.map(async(m)=>{let{route:v,url:d,params:L,props:ht,revalidate:Z}=m;try{await e.hooks.onPageStart?.(d);let j=await Bun.file(v.filePath).text(),F=Wt(j),ft=F?.middleware?Array.isArray(F.middleware)?F.middleware:[F.middleware]:[],Q=[...pt,...ft];if(Q.length>0){let C=kt(d,L,F||{}),O=_t(C,null,void 0,{isServer:!0}),E=await Ct(Q,O);if(E.redirect){let R=typeof E.redirect==="string"?E.redirect:E.redirect.path||E.redirect,U=Jt(String(R),d),T=Vt(d,e);await x.promises.mkdir(g.dirname(T),{recursive:!0}),await Bun.write(T,U),l.successCount++,l.pages.push({route:d,outputPath:T,size:Buffer.byteLength(U),cached:!1}),A.push({loc:d,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${d} \u2192 redirect to ${R}`);return}if(E.abort){let R=typeof E.abort==="string"?E.abort:E.abort?.error?.message||"aborted";console.warn(` \u21B3 ${d} \u2014 middleware aborted: ${R}`);return}}let tt=j.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(tt)try{if(!await Function("route",`
45
45
  const validate = ${tt[1]};
46
46
  return validate(route);
47
- `)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,et=!1;if(e.cache){if(k=B.get(d,v.filePath),k)et=!0,l.cachedCount++}if(!k){let C=await ut(v,L,pt,e,i);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
47
+ `)({params:L})){console.warn(`Validation failed for ${d}, skipping...`);return}}catch{}let k=null,et=!1;if(e.cache){if(k=B.get(d,v.filePath),k)et=!0,l.cachedCount++}if(!k){let C=await ut(v,L,ht,e,i);if(k=C.html,e.failOnIncludeError&&C.includeFailures.length>0)throw Error(`${C.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
48
48
  ${C.includeFailures.join(`
49
49
  `)}
50
50
  Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&C.serverScriptFailures.length>0)throw Error(`${C.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
@@ -82,7 +82,7 @@ Build complete!
82
82
  Failed: ${l.failedCount}
83
83
  Time: ${l.buildTime}ms${P}
84
84
  `),l}async function q(t,n){await x.promises.mkdir(n,{recursive:!0});let i=await x.promises.readdir(t,{withFileTypes:!0});for(let r of i){let a=g.join(t,r.name),e=g.join(n,r.name);if(r.isDirectory())await x.promises.mkdir(e,{recursive:!0}),await q(a,e);else await x.promises.copyFile(a,e)}}function Nt(t={}){let n=t.cacheDir||c(process.cwd(),"ssg-cache"),i=new lt(n),r=t.revalidate||3600;return{async get(a){let e=await i.get(a);if(!e)return null;if(Date.now()>e.revalidateAfter)this.revalidate(a).catch(console.error);return{html:e.html,headers:{"Cache-Control":`public, max-age=${r}, stale-while-revalidate=${r*2}`,ETag:e.etag,"X-ISR-Generated":new Date(e.generatedAt).toISOString(),...e.headers}}},async revalidate(a){let l=V(".",{pagesDir:t.pagesDir||"pages"}).find((P)=>a.match(P.regex)!==null);if(!l){console.warn(`Route not found for revalidation: ${a}`);return}let w=a.match(l.regex),y={};if(w)l.params.forEach((P,D)=>{y[P]=w[D+1]});let f=await o(),{html:S}=await ut(l,y,{},t,f);await i.set(a,{html:S,generatedAt:Date.now(),revalidateAfter:Date.now()+r*1000,etag:Tt(S)}),console.log(`Revalidated: ${a}`)},async invalidate(a){if(typeof a==="string")await i.invalidate(a);else await i.invalidatePattern(a)}}}function zt(t){return async()=>({paths:await t(),fallback:!1})}function Ht(){return{name:"markdown",extensions:[".md",".mdx"],async load(t){let n=await Bun.file(t).text(),i=n.match(/^---\n([\s\S]*?)\n---/),r={},a=n;if(i){let f=i[1];a=n.slice(i[0].length).trim();for(let S of f.split(`
85
- `)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));r[D]=p}}}let e=a.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>"),l=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,y;while((y=w.exec(e))!==null){let f=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:f})}return{content:e,data:r,toc:l}}}}function Wt(t){return ft(t)}function Jt(t,n){return`<!DOCTYPE html>
85
+ `)){let P=S.indexOf(":");if(P>0){let D=S.slice(0,P).trim(),p=S.slice(P+1).trim();if(p==="true")p=!0;else if(p==="false")p=!1;else if(/^\d+$/.test(p))p=parseInt(p,10);else if(/^\d+\.\d+$/.test(p))p=parseFloat(p);else if(p.startsWith("[")&&p.endsWith("]"))p=p.slice(1,-1).split(",").map((b)=>b.trim().replace(/^['"]|['"]$/g,""));r[D]=p}}}let e=a.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>"),l=[],w=/<h([1-6])>([^<]+)<\/h[1-6]>/gi,y;while((y=w.exec(e))!==null){let f=parseInt(y[1],10),S=y[2],P=S.toLowerCase().replace(/[^a-z0-9]+/g,"-");l.push({id:P,text:S,level:f})}return{content:e,data:r,toc:l}}}}function Wt(t){return gt(t)}function Jt(t,n){return`<!DOCTYPE html>
86
86
  <html>
87
87
  <head>
88
88
  <meta charset="utf-8">
package/dist/utils.js CHANGED
@@ -952,7 +952,7 @@ export async function renderComponentWithSlot(componentPath, props, slotContent,
952
952
  ...slot,
953
953
  content: projectRefs(slot.content)
954
954
  }]));
955
- templateContent = await applySlots(templateContent, projectRefs(defaultSlot), projectedSlots, componentContext);
955
+ templateContent = await applySlots(templateContent, projectRefs(defaultSlot), projectedSlots, componentContext, hasSignalScripts ? componentUid : "");
956
956
  const clientSignalNames = componentClientSignalNames(clientScripts), inheritedClientSignalNames = (Array.isArray(componentContext.__stx_client_signal_names) ? componentContext.__stx_client_signal_names : []).filter((name) => !ownServerNames.has(name));
957
957
  if (clientSignalNames.length > 0 || inheritedClientSignalNames.length > 0)
958
958
  componentContext.__stx_client_signal_names = [...new Set([...inheritedClientSignalNames, ...clientSignalNames])];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.665",
4
+ "version": "0.2.667",
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.665",
132
- "@stacksjs/sanitizer": "0.2.665",
131
+ "@stacksjs/desktop": "0.2.667",
132
+ "@stacksjs/sanitizer": "0.2.667",
133
133
  "@stacksjs/ts-i18n": "^0.1.11",
134
- "bun-plugin-stx": "0.2.665",
134
+ "bun-plugin-stx": "0.2.667",
135
135
  "bunfig": "^0.15.21",
136
- "stx-router": "0.2.665",
136
+ "stx-router": "0.2.667",
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{Mi,tl,Pn,td,nl,rl,sl,nd}from"./chunk-2f1bk3bg.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Pn as Validator,tl as defineForm,nl as processErrorDirective,rl as processErrorsDirective,nd as processFormValidationDirectives,sl as processHasErrorsDirective,Mi as useForm,td as v};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pc,ki,Iu,Ic,Oc,Ou,Nu}from"./chunk-d3vgtr0t.js";import"./chunk-pmwb5kaf.js";import"./chunk-a1p327a7.js";import"./chunk-43gr8ggc.js";import"./chunk-v2x9vzgw.js";import"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import{$t,Fl}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Pc as buildVirtualSource,$t as extractScriptBlocks,Fl as extractTemplateExpressions,Ic as findRuntimeTypeDeclarations,Oc as findStxModuleDeclarations,Nu as formatTypecheckDiagnostics,Iu as sourcePathFor,Ou as typecheckStxFiles,ki as virtualPathFor};
@@ -1,3 +0,0 @@
1
- // @bun
2
- var p=import.meta.require;
3
- export{p};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hi,Vi,Ui,Wi,tp}from"./chunk-dra341c0.js";import"./chunk-s3dyzxwx.js";import"./chunk-c1dkh0es.js";import"./chunk-fzxyq6k5.js";import"./chunk-nf9bykvg.js";import"./chunk-prf164ct.js";import"./chunk-pc48mjkc.js";import"./chunk-zjsyw63k.js";import"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-bgra36az.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hi as buildNative,tp as default,Vi as findCraftBinary,Wi as getAvailableFormats,Ui as getAvailableTargets};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$u}from"./chunk-jh3r0qp7.js";import"./chunk-v5916r3j.js";import"./chunk-43gr8ggc.js";import"./chunk-edvmtk21.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{$u as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Hn,s}from"./chunk-fzxyq6k5.js";import"./chunk-nf9bykvg.js";import"./chunk-prf164ct.js";import"./chunk-pc48mjkc.js";import"./chunk-zjsyw63k.js";import"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-2q50h7zv.js";import{me}from"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-bgra36az.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import{Re,ps,gs}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hn as buildModulesTag,me as injectRouterScript,s as processDirectives,ps as processJsonDirective,gs as processOnceDirective,Re as validateClientScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{f,Po,Va,Ua,Xl,Jl,Yl,Zl,Ql,ms,eu,Ne,G,De,tu,lr,nu,Ga,Do,Me,n,pn,Ka,g,de,Rp}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{de as clearComponentCache,Do as componentClientSignalNames,Po as convertToCommonJS,g as createDetailedErrorMessage,Ql as extractDirectiveNames,Va as extractScriptFromTemplate,f as extractVariables,n as fileExists,Rp as getComponentCacheStats,Jl as getPositionInfo,G as getSharedTranspiler,Ka as getSourceLineInfo,Zl as hasDirectives,Ua as hasVariables,nu as isHydrateTrigger,eu as isJavaScriptScript,Me as renderComponentWithSlot,pn as resolveTemplatePath,tu as scopeOnRootElement,ms as scopeSequenceKey,Ne as shouldTranspileTypeScript,Ga as slotContentHasExpressions,De as transpileTypeScript,lr as userComponentFileExists,Yl as validateDirective,Xl as validateTemplate};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{X,J,Y,Cn,pe,ke,Rr,Fc,ut,Ut,En,Tn,$n,Z,Rn,An,Ar}from"./chunk-0jhdrgpr.js";import"./chunk-c1dkh0es.js";export{J as DEFAULT_FORMATS,Y as DEFAULT_QUALITY,X as DEFAULT_WIDTHS,Ar as ImageProcessingError,An as formatSize,Ut as generateSizes,ut as generateSrcSet,En as getFallbackVariant,Rr as getImageMetadata,Z as getMimeType,Rn as getTotalSize,Tn as groupVariantsByFormat,pe as isImageBackendAvailable,$n as isImageFile,Cn as isSharpAvailable,ke as processImage,Fc as resizeAndConvert};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{zn,Ce}from"./chunk-v2x9vzgw.js";export{zn as describeBuildFailure,Ce as formatBuildFailure};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Nr,qn,xl}from"./chunk-pc48mjkc.js";import"./chunk-r7kmsq3n.js";import"./chunk-8nryyqb5.js";import{Et}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{xl as declareBareLoopHead,Et as parseLoopBinding,qn as processLoops,Nr as reportDeferredLoopWarnings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{op,na,ip,ra,yl,bl,en,Wn,ap,vl,wl,cp,h}from"./chunk-nf9bykvg.js";import"./chunk-bgra36az.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{en as buildCss,vl as extractClassNames,bl as fingerprintConfig,wl as generateCss,ap as getCachedCSS,op as getCssServeAsset,h as injectCss,na as loadCssEngine,ra as loadCssEngineConfig,Wn as rebuildCss,ip as resetCssCache,yl as resolveUserCssConfig,cp as withLinkedModuleBundles};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Zt,Gs,Ks,Xs,sp,Js}from"./chunk-43gr8ggc.js";import"./chunk-04kg16qs.js";import"./chunk-zaaeneq6.js";import"./chunk-2h8ea0we.js";export{Ks as buildServerApi,sp as createServerApi,Zt as discoverServerApi,Gs as generateApiTypes,Js as isServerApiSource,Xs as productionApiDispatcher};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ye,Io,Oo,Kl,Pt,Wa,No,qa,$p,Ie,dn,Oe}from"./chunk-qzy8ypk4.js";import{Za,i}from"./chunk-eqrkhc18.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{ye as BROWSER_CORE_IMPORTS,Kl as STX_AUTO_IMPORTS,Io as extractAndStripCssImports,Ie as extractBridgeData,Za as findInterpolationEnd,qa as generateAutoImportDestructuring,$p as generateBrowserAutoImportDestructuring,dn as generateServerDataBridge,Pt as injectBrowserCoreAutoImports,Oe as processClientScript,No as referencesName,Oo as renderVendorStyleTags,i as stripCommentsAndLiterals,Wa as transformAutoImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ii,Mc}from"./chunk-2jh21f1n.js";import"./chunk-0jhdrgpr.js";import"./chunk-c1dkh0es.js";export{Mc as createImageHandler,Ii as handleImageRequest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vo,wo,bt,ie,Zn,Zr,Qn,Qr,es,Pl,Il,Ol,er,Nl,Dl,Ml,Ll,xa,Sa,ka,xo,_a,jl,vt,wt,xt,St,kt,_t,Je,Bl}from"./chunk-zaaeneq6.js";export{Qn as Router,Ml as abortNavigation,Zr as bracketPathToRegex,vt as clearMiddleware,Sa as createClientCookieManager,kt as createMiddlewareContext,St as createRouteLocation,xa as createServerCookieManager,ka as createStorageManager,Ll as defineMiddleware,Il as defineRoute,Ol as defineRoutes,Qr as findErrorPage,es as formatRoutes,wo as generateRouteManifest,vo as generateRouteTypes,_a as getMiddleware,wt as getMiddlewareNames,Je as getRouterScript,Bl as getRouterScriptDev,jl as hasMiddleware,bt as isFileRequestPath,xt as loadMiddlewareFromDirectory,Zn as matchRoute,Dl as navigateTo,ie as patternToRegex,xo as registerMiddleware,Nl as resetRoutes,er as route,_t as runMiddleware,Pl as setAppUrl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{fp,_l,oo,Fr,io,ao,zr,Hr,Vr,co,ia,Cl,mt}from"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import{L}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{fp as clearScriptScanCache,zr as convertServerLoopAttributesToDirectives,io as convertSignalDirectivesToAttributes,Hr as convertSignalLoopsToAttributes,L as extractExports,ia as findMarkupIndexOutsideScripts,Fr as hasSignalsSyntax,oo as parseLoopExpression,ao as preEvalLiteralReactiveIfs,Vr as processScriptSetup,co as processSignals,Cl as rewriteStxImportSpecifiers,_l as scanScriptTags,mt as stripStxRuntimeImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Le,mn,ys,Bo,A,Ot}from"./chunk-2h8ea0we.js";export{mn as currentRuntimeConfig,Ot as injectRuntimeConfig,A as resolveRuntimeConfig,Bo as useRuntimeConfig,ys as useServerRuntimeConfig,Le as withRuntimeConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{El,gp,mp,hp,yp,Tl,$l,bp,vp,uo,wp,Xn,Jn,Wr}from"./chunk-bgra36az.js";import{Ye}from"./chunk-x34scshq.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{yp as __setSignalsGeneratorsForTest,Ye as cacheEngineFingerprint,Jn as cacheTemplate,Xn as checkCache,wp as clearDevCaches,$l as getCachedRouterScript,Tl as getCachedSignalsRuntime,bp as getServeClientAsset,uo as getServeModuleBundle,Wr as hashFilePath,mp as invalidateFileCache,hp as invalidateFileCacheByDir,gp as readFileCached,vp as registerServeModuleBundle,El as templateCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{rd,Li,il,sd,od,id,ad,cd,al,cl,ld,ud,dd,pd}from"./chunk-cg3mvq4h.js";import"./chunk-fzxyq6k5.js";import"./chunk-nf9bykvg.js";import"./chunk-prf164ct.js";import"./chunk-pc48mjkc.js";import"./chunk-zjsyw63k.js";import"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-bgra36az.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{il as SUSPENSE_RESOLVER_RUNTIME,Li as buildSuspenseResolveScript,cd as createStreamRenderer,id as extractStreamBoundaries,pd as generateHydrationRuntime,cl as islandDirective,ud as processSectionDirectives,od as processStreamDirectives,ld as registerStreamingDirectives,sd as renderStreamingPage,rd as streamTemplate,ad as streamTemplateSimple,dd as streamToResponse,al as streamingSuspenseDirective};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xc,Sc}from"./chunk-p2mrba1n.js";import"./chunk-awe50wee.js";import"./chunk-jh3r0qp7.js";import"./chunk-rjh2jwxx.js";import"./chunk-yq021b3r.js";import"./chunk-d3vgtr0t.js";import"./chunk-zqtbtqbq.js";import"./chunk-38b3w1y4.js";import{_i}from"./chunk-v5916r3j.js";import"./chunk-jxda11cg.js";import"./chunk-2jh21f1n.js";import"./chunk-nm8yr8a9.js";import"./chunk-rcadtv3x.js";import"./chunk-wsp8sj9v.js";import"./chunk-0jhdrgpr.js";import"./chunk-ym41ybz2.js";import"./chunk-n38yb274.js";import"./chunk-2f1bk3bg.js";import"./chunk-tre98h62.js";import"./chunk-cg3mvq4h.js";import"./chunk-dgb4z4kw.js";import"./chunk-r3e6x87d.js";import"./chunk-mmwedr93.js";import"./chunk-aprhqxky.js";import"./chunk-kgfgb971.js";import"./chunk-nrvwejdw.js";import"./chunk-f2z8s2h9.js";import"./chunk-pmwb5kaf.js";import"./chunk-pxqh758g.js";import"./chunk-s3dyzxwx.js";import"./chunk-c1dkh0es.js";import"./chunk-6ajahb2x.js";import"./chunk-a1p327a7.js";import"./chunk-43gr8ggc.js";import"./chunk-v2x9vzgw.js";import{Ee,s}from"./chunk-fzxyq6k5.js";import"./chunk-nf9bykvg.js";import"./chunk-prf164ct.js";import"./chunk-pc48mjkc.js";import"./chunk-zjsyw63k.js";import"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-2q50h7zv.js";import{me}from"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import{Xn,Jn}from"./chunk-bgra36az.js";import{qr,N,o}from"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import{f,Oe}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";import"./chunk-9p6efb17.js";import"./chunk-t2pzy3x1.js";export{qr as buildWebComponents,Jn as cacheTemplate,Xn as checkCache,_i as classifyAllScripts,xc as createMiddleware,Sc as createRoute,N as defaultConfig,f as extractVariables,me as injectRouterScript,o as loadStxConfig,Oe as processClientScript,s as processDirectives,Ee as readMarkdownFile};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{N,Rl,po,o,R,xp,Sp}from"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{R as config,N as defaultConfig,xp as defineStxConfig,po as discoverConfig,o as loadStxConfig,Rl as resolveStxDirectories,Sp as validateConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kl,Br}from"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-8nryyqb5.js";import{ar}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import{et}from"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{et as freeIdentifiers,Br as processComponents,kl as processESImports,ar as rendersAsElement};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{zs,zd,Hd}from"./chunk-pmwb5kaf.js";import"./chunk-a1p327a7.js";import"./chunk-43gr8ggc.js";import"./chunk-v2x9vzgw.js";import"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Hd as clearComposableCache,zd as getComposableScript,zs as listComposableModules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{lp,Sl,We,sa,up,Dr,Mr,Lr}from"./chunk-zjsyw63k.js";import"./chunk-0g4pr7ww.js";import"./chunk-r7kmsq3n.js";import"./chunk-8nryyqb5.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{up as clearOnceStore,sa as onceStore,We as partialsCache,Dr as processIncludes,Mr as processStackPushDirectives,Lr as processStackReplacements,lp as resetUnscopedSignalWarnings,Sl as topLevelElements};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Lc,Ju,jc,Bc,Yu,Zu}from"./chunk-wsp8sj9v.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Zu as applySlots,Yu as extractSlotContent,Ju as parseSlotElement,Lc as parseSlots,Bc as processSlots,jc as renderSlot};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ot,it,at}from"./chunk-jkvr7e91.js";export{ot as createContext,it as updateContextStoryFiles,at as updateContextTree};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{un,zl,Hl,Vl,Ul,Wl,f,ql,Po,Gl,Va,Ua}from"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{un as STX_ENGINE_BINDING_NAMES,Po as convertToCommonJS,Va as extractScriptFromTemplate,f as extractVariables,Ua as hasVariables,ql as isCompleteImport,Wl as isMissingBindingFailure,Vl as isModuleResolutionFailure,Ul as isSyntaxFailure,Gl as splitDeclaration,zl as stripTypeScript,Hl as withoutStxReferrer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Bd,Fd}from"./chunk-f2z8s2h9.js";import"./chunk-a1p327a7.js";import"./chunk-43gr8ggc.js";import"./chunk-v2x9vzgw.js";import"./chunk-2q50h7zv.js";import"./chunk-edvmtk21.js";import"./chunk-8nryyqb5.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Fd as clearStoreCache,Bd as getStoreScript};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{d,u}from"./chunk-hb08vrbb.js";import{ue,m}from"./chunk-qzy8ypk4.js";function A(t,o){let i=1,r=o,n="<template",e="</template";while(r<t.length&&i>0){let s=t.indexOf("<",r);if(s===-1)break;if(r=s,t.startsWith(n,r)&&(r+n.length>=t.length||/[\s>\/]/.test(t[r+n.length]))){i++,r+=n.length;continue}if(t.startsWith(e,r)){let a=t.indexOf(">",r+e.length);if(a!==-1){if(i--,i===0)return a+1;r=a+1;continue}}r++}return i===0?r:-1}var x=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function b(t,o){let i=null;for(let r=o;r<t.length;r++){let n=t[r];if(i){if(n==="\\"){r++;continue}if(n===i)i=null;continue}if(n==='"'||n==="'"){i=n;continue}if(n===">")return r+1}return-1}function N(t,o,i){let r=o.toLowerCase(),n=1,e=i;while(e<t.length){let s=t.indexOf("<",e);if(s===-1)return-1;if(t.startsWith("<!--",s)){let g=t.indexOf("-->",s+4);e=g===-1?t.length:g+3;continue}let a=b(t,s+1);if(a===-1)return-1;let f=t.slice(s,a),c=f.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(c&&c[2].toLowerCase()===r){if(c[1]==="/"){if(n--,n===0)return a}else if(!/\/\s*>$/.test(f))n++}e=a}return-1}function R(t){let o=[],i=[],r=/\bslot\s*=\s*(?:"([^"]+)"|'([^']+)')/i,n=0;while(n<t.length){let e=t.indexOf("<",n);if(e===-1)break;if(t.startsWith("<!--",e)){let l=t.indexOf("-->",e+4);n=l===-1?t.length:l+3;continue}let s=b(t,e+1);if(s===-1)break;let a=t.slice(e,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){n=s;continue}let c=f[2].toLowerCase();if(f[1]==="/"){let l=i.lastIndexOf(c);if(l!==-1)i.splice(l);n=s;continue}let g=/\/\s*>$/.test(a),h=i.length===0?a.match(r):null;if(h){let l=h[1]||h[2],p=a.replace(r,"").replace(/\s+(?=\/?>$)/,"").replace(/\s{2,}/g," "),S=g||x.has(c)?-1:N(t,c,s);if(S===-1)o.push({start:e,end:s,slotName:l,element:p}),n=s;else o.push({start:e,end:S,slotName:l,element:p+t.slice(s,S)}),n=S;continue}if(!g&&!x.has(c)){if(i.push(c),c==="script"||c==="style"){let l=t.toLowerCase().indexOf(`</${c}>`,s);if(l!==-1){n=l;continue}}}n=s}return o}function O(t){let o=[],i=[],r=/^<template\s+(?:#([a-zA-Z][\w-]*)|v-slot:([a-zA-Z][\w-]*)|slot="([a-zA-Z][\w-]*)")(?:\s*=\s*"([^"]*)")?[^>]*>$/i,n=0;while(n<t.length){let e=t.indexOf("<",n);if(e===-1)break;if(t.startsWith("<!--",e)){let l=t.indexOf("-->",e+4);n=l===-1?t.length:l+3;continue}let s=b(t,e+1);if(s===-1)break;let a=t.slice(e,s),f=a.match(/^<\s*(\/?)\s*([a-zA-Z][\w-]*)/);if(!f){n=s;continue}let c=f[1]==="/",g=f[2].toLowerCase();if(c){let l=i.lastIndexOf(g);if(l!==-1)i.splice(l);n=s;continue}if(g==="template"&&i.length===0){let l=a.match(r);if(l){let p=A(t,s);if(p!==-1){let S=l[1]||l[2]||l[3];o.push({start:e,end:p,slotName:S,content:t.slice(s,p-11).trim(),propsBinding:l[4]||void 0}),n=p;continue}}}if(!/\/\s*>$/.test(a)&&!x.has(g)){if(i.push(g),g==="script"||g==="style"){let l=t.toLowerCase().indexOf(`</${g}>`,s);if(l!==-1){n=l;continue}}}n=s}return o}function Lc(t){let o={default:"",named:new Map},i=t,r=O(t);for(let e of r)o.named.set(e.slotName,{name:e.slotName,content:e.content,propsBinding:e.propsBinding});r.sort((e,s)=>s.start-e.start);for(let e of r)i=i.slice(0,e.start)+i.slice(e.end);let n=R(i);for(let e of n){let s=o.named.get(e.slotName);if(s)s.content+=e.element;else o.named.set(e.slotName,{name:e.slotName,content:e.element})}for(let e=n.length-1;e>=0;e--){let s=n[e];i=i.slice(0,s.start)+i.slice(s.end)}return o.default=i.trim(),o}function Ju(t){let o=t.match(/name\s*=\s*["']([^"']+)["']/),i=o?o[1]:"",r={},n=/:([a-zA-Z][\w-]*)\s*=\s*["']([^"']+)["']/g,e;while((e=n.exec(t))!==null)r[e[1]]=e[2];let s=t.match(/<slot[^>]*>([\s\S]*?)<\/slot>/i),a=s?s[1].trim():"";return{name:i,props:r,defaultContent:a}}async function jc(t,o,i,r){if(!t)return i;let n=t.content;if(t.propsBinding&&Object.keys(o).length>0){let e=t.propsBinding.trim(),s={...r},a=new Set,f=new Set;if(e.startsWith("{")&&e.endsWith("}")){let c=e.slice(1,-1).split(",").map((g)=>g.trim()).filter(Boolean);for(let g of c){let[h,l]=g.split(":").map((S)=>S.trim()),p=l||h;if(s[p]=o[h],o[h]!==void 0)f.add(p);else a.add(p)}}else if(s[e]=o,Object.values(o).some((c)=>c===void 0))a.add(e);else f.add(e);n=C(n,s,a,f)}return n}function C(t,o,i,r){return t.replace(/\{\{\s*([^}]+)\s*\}\}/g,(n,e)=>{try{let s=e.trim();if(ue(s,i))return n;if(Array.isArray(o.__stx_preserved_client_expressions)&&o.__stx_preserved_client_expressions.includes(s)&&!ue(s,r))return n;let a=k(s,o);if(a===void 0)return n;return m(String(a??""))}catch{return`{{ ${e} }}`}})}function k(t,o){if(/^[a-zA-Z_$][\w$]*(\.[a-zA-Z_$][\w$]*)*$/.test(t)){let r=t.split("."),n=o;for(let e of r)if(n&&typeof n==="object"&&e in n)n=n[e];else return;return n}let i=t.match(/^([a-zA-Z_$][\w$]*)\s*([+\-*/])\s*(\d+)$/);if(i){let[,r,n,e]=i,s=o[r],a=parseInt(e,10);if(typeof s==="number")switch(n){case"+":return s+a;case"-":return s-a;case"*":return s*a;case"/":return s/a}}try{if(!d(t))return;return u(t,Object.keys(o))(...Object.values(o))}catch{return}}async function Bc(t,o,i){let r=t;r=await M(r,/<slot\s+name\s*=\s*["']([^"']+)["']([^>]*?)(?:\/>|>([\s\S]*?)<\/slot>)/gi,async(s,a,f,c)=>{let g=o.named.get(a),h=c?.trim()||"",l=f||"",p={},S=/:([a-zA-Z_$][\w$-]*)\s*=\s*["']([^"']+)["']/g,w;while((w=S.exec(l))!==null){let y=w[1],E=w[2];p[y]=k(E,i)}return await jc(g,p,h,i)});let e=/<slot\b((?:"[^"]*"|'[^']*'|[^>"'])*?)\s*(?:\/>|>([\s\S]*?)<\/slot>)/gi;return r=r.replace(e,(s,a,f)=>{if(/\bname\s*=/.test(a||""))return s;let c=f?.trim()||"";return o.default||c}),r}async function M(t,o,i){let r=[],n=[];t.replace(o,(a,...f)=>{let c=f[f.length-2];return n.push({match:a,index:c}),r.push(i(a,...f.slice(0,-2))),a});let e=await Promise.all(r),s=t;for(let a=n.length-1;a>=0;a--){let{match:f,index:c}=n[a];s=s.slice(0,c)+e[a]+s.slice(c+f.length)}return s}function Yu(t){let o=Lc(t);return{defaultSlot:o.default,namedSlots:o.named}}async function Zu(t,o,i,r){return await Bc(t,{default:o,named:i},r)}
3
- export{Lc,Ju,jc,Bc,Yu,Zu};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ll,ul,_e,dl,Qi,Gt,Kt,rp,ea,Xt,Fn,pl,fl,gl,qs,Jt,ml,Yt,hl}from"./chunk-a1p327a7.js";import"./chunk-43gr8ggc.js";import"./chunk-v2x9vzgw.js";import"./chunk-1z1632np.js";import"./chunk-q1svy1nf.js";import"./chunk-a3d0g4mr.js";import"./chunk-04kg16qs.js";import"./chunk-t9mfztcs.js";import"./chunk-zaaeneq6.js";import"./chunk-qzy8ypk4.js";import"./chunk-b6xv8jh9.js";import"./chunk-2h8ea0we.js";import"./chunk-hb08vrbb.js";import"./chunk-ce6zddpf.js";import"./chunk-7rta163c.js";export{Fn as MODULE_SPECIFIER_PREFIX,ll as bundleCacheDir,ul as bundleCacheEntryLimit,Yt as bundleClientScript,Kt as clearBundleFailures,_e as clientBundleDependencies,Gt as getBundleFailures,Xt as hasUserImports,Jt as moduleSubstitutionKey,fl as normalizeRegistrySpecifiers,ml as queueClientBundleBuild,Qi as recordBundleFailure,pl as registryIdForPath,ea as resolveBundlerFallback,gl as rewriteRegistryImports,rp as setBundlerFallbackMode,dl as shouldLogBundlerDiagnostics,hl as tempBuildName,qs as withModuleSubstitutes};