@stacksjs/stx 0.2.400 → 0.2.402

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 (169) hide show
  1. package/dist/appearance-bootstrap.d.ts +30 -2
  2. package/dist/appearance-bootstrap.js +26 -17
  3. package/dist/chunk-020a4q6e.js +2 -0
  4. package/dist/chunk-0j5wwmha.js +2 -0
  5. package/dist/{chunk-197z74b9.js → chunk-111tdjzz.js} +1 -1
  6. package/dist/{chunk-q25qsg28.js → chunk-14rh4kd0.js} +1 -1
  7. package/dist/chunk-1a569y4r.js +2 -0
  8. package/dist/chunk-1chgn7qv.js +2 -0
  9. package/dist/chunk-1hw8p2g4.js +2 -0
  10. package/dist/{chunk-fffbzsmv.js → chunk-21adgg8e.js} +1 -1
  11. package/dist/{chunk-x86qttwm.js → chunk-2g3ffsc9.js} +1 -1
  12. package/dist/{chunk-awz5cx5w.js → chunk-2hy87cn4.js} +1 -1
  13. package/dist/{chunk-dz29q408.js → chunk-2m17v3yx.js} +1 -1
  14. package/dist/{chunk-k2nydt80.js → chunk-2n3twnde.js} +1 -1
  15. package/dist/{chunk-h55mae9h.js → chunk-3t953qe0.js} +1 -1
  16. package/dist/{chunk-1ktxk84n.js → chunk-3tmnemhq.js} +1 -1
  17. package/dist/{chunk-wva3ggqj.js → chunk-42tn0t54.js} +1 -1
  18. package/dist/{chunk-cy8hgd86.js → chunk-4azk3jdd.js} +1 -1
  19. package/dist/{chunk-v7q2nf37.js → chunk-4m2e8w2g.js} +1 -1
  20. package/dist/{chunk-c9kj8p6j.js → chunk-4yc9gx6h.js} +1 -1
  21. package/dist/chunk-55d66wh7.js +2 -0
  22. package/dist/{chunk-zh3q10wd.js → chunk-5kzcyx1w.js} +1 -1
  23. package/dist/{chunk-cd6pe75s.js → chunk-6jns68ee.js} +1 -1
  24. package/dist/chunk-702rda41.js +2 -0
  25. package/dist/chunk-7r7qcpw2.js +2 -0
  26. package/dist/{chunk-yj5gkn17.js → chunk-7vftjm43.js} +1 -1
  27. package/dist/{chunk-dazf77tr.js → chunk-8aa32p8v.js} +1 -1
  28. package/dist/{chunk-zrnppyqz.js → chunk-8e287qw8.js} +1 -1
  29. package/dist/{chunk-e1rv01pn.js → chunk-8ghwewek.js} +2 -2
  30. package/dist/{chunk-p81zbym6.js → chunk-9a79ev5a.js} +1 -1
  31. package/dist/chunk-9csrj2k2.js +2 -0
  32. package/dist/{chunk-88tt0qg0.js → chunk-9rp8f7jz.js} +2 -2
  33. package/dist/chunk-9xs1ekk3.js +2 -0
  34. package/dist/{chunk-7tgjn256.js → chunk-ah8gs0q2.js} +1 -1
  35. package/dist/{chunk-aewsgyzc.js → chunk-av7a1sct.js} +1 -1
  36. package/dist/{chunk-d4km7egg.js → chunk-b1hqgm6j.js} +1 -1
  37. package/dist/{chunk-rswsrggp.js → chunk-b5na4j0k.js} +1 -1
  38. package/dist/{chunk-dzaf7qx8.js → chunk-b5rc4t8t.js} +1 -1
  39. package/dist/{chunk-aeaf5nsy.js → chunk-b89mqprp.js} +1 -1
  40. package/dist/{chunk-j9x1hxhg.js → chunk-baa5pana.js} +1 -1
  41. package/dist/{chunk-5zmppe0c.js → chunk-bd0eyzgz.js} +1 -1
  42. package/dist/{chunk-caj47vtj.js → chunk-bdy1fpqq.js} +1 -1
  43. package/dist/chunk-bgyh22e9.js +2 -0
  44. package/dist/{chunk-gjpq3pmz.js → chunk-bs2a7a2b.js} +1 -1
  45. package/dist/{chunk-rxz43r6k.js → chunk-cevkpyn9.js} +1 -1
  46. package/dist/{chunk-83ewzshg.js → chunk-cf05s8c1.js} +1 -1
  47. package/dist/{chunk-ymkv623c.js → chunk-chn6e3en.js} +1 -1
  48. package/dist/chunk-cqn8qq4v.js +2 -0
  49. package/dist/chunk-crjn0b04.js +2 -0
  50. package/dist/{chunk-0rdhrgff.js → chunk-cvkty3ha.js} +1 -1
  51. package/dist/{chunk-x2wmn8m7.js → chunk-d6rkgay9.js} +2 -2
  52. package/dist/{chunk-h4nydbnx.js → chunk-db1bf5yj.js} +2 -2
  53. package/dist/{chunk-r1d9x0dy.js → chunk-ddh21d04.js} +1 -1
  54. package/dist/{chunk-ar5stjnb.js → chunk-dnew7qmv.js} +1 -1
  55. package/dist/{chunk-8ded3tn8.js → chunk-e5aqq9ms.js} +1 -1
  56. package/dist/{chunk-3818kp2d.js → chunk-eg30ksd8.js} +2 -2
  57. package/dist/{chunk-vs4dafbz.js → chunk-ek069b44.js} +1 -1
  58. package/dist/{chunk-eqtc6w4a.js → chunk-etah20m0.js} +2 -2
  59. package/dist/{chunk-b3b3s1kr.js → chunk-ezwtd7s2.js} +1 -1
  60. package/dist/chunk-f4f5dzfg.js +2 -0
  61. package/dist/chunk-fkht7kzs.js +2 -0
  62. package/dist/{chunk-57yhrery.js → chunk-fpqz7msz.js} +1 -1
  63. package/dist/{chunk-rwtj7j0r.js → chunk-fpxz25xz.js} +1 -1
  64. package/dist/{chunk-pdxbys31.js → chunk-fwc5p9bn.js} +1 -1
  65. package/dist/{chunk-4x73bm95.js → chunk-gbwqy9py.js} +1 -1
  66. package/dist/{chunk-dvpk2rer.js → chunk-gs67nnfb.js} +1 -1
  67. package/dist/{chunk-mt0j29hr.js → chunk-gv6fnbw5.js} +2 -2
  68. package/dist/{chunk-nvpjt609.js → chunk-h37e97qq.js} +1 -1
  69. package/dist/{chunk-nrgcfg8h.js → chunk-h3zqzczc.js} +1 -1
  70. package/dist/{chunk-kdwbpcm4.js → chunk-h7qv6sc5.js} +1 -1
  71. package/dist/{chunk-gtn2agxa.js → chunk-ht9rdkf3.js} +1 -1
  72. package/dist/{chunk-h01bbt3r.js → chunk-hw96m872.js} +1 -1
  73. package/dist/{chunk-xfedcdb2.js → chunk-j665en0c.js} +1 -1
  74. package/dist/{chunk-w4nmvn5v.js → chunk-j6p78bma.js} +1 -1
  75. package/dist/{chunk-27wgfqs0.js → chunk-j89wctm5.js} +1 -1
  76. package/dist/{chunk-74ebps1a.js → chunk-jbtzq3xt.js} +2 -2
  77. package/dist/{chunk-3769e62c.js → chunk-jct6cs2k.js} +1 -1
  78. package/dist/chunk-jmek11fc.js +2 -0
  79. package/dist/{chunk-4eyzkbzj.js → chunk-kdqcb0r5.js} +1 -1
  80. package/dist/chunk-kvdd2zfn.js +2 -0
  81. package/dist/{chunk-1bvm3byf.js → chunk-m28xqhyz.js} +1 -1
  82. package/dist/chunk-mjdsjxm5.js +2 -0
  83. package/dist/{chunk-g7qmxjyc.js → chunk-mjearf0g.js} +1 -1
  84. package/dist/{chunk-980w4zcq.js → chunk-mntzk6ga.js} +1 -1
  85. package/dist/{chunk-kyw2cbvn.js → chunk-msecn1gm.js} +1 -1
  86. package/dist/chunk-n9cgqpe2.js +2 -0
  87. package/dist/{chunk-06h5zrm2.js → chunk-n9nb4e1v.js} +168 -168
  88. package/dist/chunk-n9wmhtap.js +2 -0
  89. package/dist/{chunk-wjzcggh6.js → chunk-ndydf37f.js} +3 -3
  90. package/dist/{chunk-eqhsprr0.js → chunk-nn42gs3q.js} +1 -1
  91. package/dist/{chunk-hm66z7e8.js → chunk-nt03zdme.js} +1 -1
  92. package/dist/{chunk-3ey6ha6w.js → chunk-pj0jjn5b.js} +1 -1
  93. package/dist/chunk-pp8e3t71.js +2 -0
  94. package/dist/{chunk-6am7e1be.js → chunk-ptad3t7a.js} +335 -326
  95. package/dist/{chunk-d0qy1ezf.js → chunk-qbc0bebg.js} +2 -2
  96. package/dist/chunk-qmr1we72.js +2 -0
  97. package/dist/{chunk-fsvkqeya.js → chunk-qnye902b.js} +1 -1
  98. package/dist/{chunk-bdz7nznw.js → chunk-rk8p4b1z.js} +2 -2
  99. package/dist/chunk-s35w8xjx.js +2 -0
  100. package/dist/{chunk-h8zp2fz9.js → chunk-saf4xhac.js} +1 -1
  101. package/dist/chunk-scak53zc.js +2 -0
  102. package/dist/chunk-scn75qrm.js +2 -0
  103. package/dist/{chunk-8gwby0r0.js → chunk-szcxpbfn.js} +118 -27
  104. package/dist/chunk-t3pfdz1r.js +2 -0
  105. package/dist/{chunk-76q768gt.js → chunk-tev79q0a.js} +1 -1
  106. package/dist/{chunk-csgshaeh.js → chunk-v54tq312.js} +1 -1
  107. package/dist/{chunk-wh8vwykh.js → chunk-vaxepwj5.js} +1 -1
  108. package/dist/chunk-vwe0fvez.js +2 -0
  109. package/dist/chunk-vxxj6sqn.js +2 -0
  110. package/dist/{chunk-ekvejzvk.js → chunk-wheh08v2.js} +1 -1
  111. package/dist/{chunk-5zapxgys.js → chunk-wm07h8q1.js} +1 -1
  112. package/dist/{chunk-8qzc5n61.js → chunk-x1c4vcds.js} +1 -1
  113. package/dist/{chunk-4bnv6c6t.js → chunk-xd2bapap.js} +1 -1
  114. package/dist/{chunk-rem5ne21.js → chunk-xe06rkka.js} +2 -2
  115. package/dist/chunk-xn9t0hnt.js +2 -0
  116. package/dist/{chunk-4cv7bw5e.js → chunk-y9f9g2kh.js} +2 -2
  117. package/dist/{chunk-0tak2f33.js → chunk-za3zzk6p.js} +1 -1
  118. package/dist/cli.js +14 -14
  119. package/dist/color-mode-boot.d.ts +20 -0
  120. package/dist/color-mode-boot.js +5 -3
  121. package/dist/composables/use-color-mode.d.ts +1 -0
  122. package/dist/composables/use-color-mode.js +9 -5
  123. package/dist/composables/use-offline.d.ts +6 -5
  124. package/dist/composables/use-offline.js +20 -1
  125. package/dist/craft-entry.js +1 -1
  126. package/dist/craft.js +1 -1
  127. package/dist/database.js +1 -1
  128. package/dist/doctor.d.ts +35 -0
  129. package/dist/doctor.js +95 -0
  130. package/dist/offline/app-service-worker.js +15 -6
  131. package/dist/process.d.ts +0 -3
  132. package/dist/process.js +12 -3
  133. package/dist/pwa.js +2 -2
  134. package/dist/script-validation.js +1 -1
  135. package/dist/signal-processing.d.ts +29 -11
  136. package/dist/signal-processing.js +40 -0
  137. package/dist/signals.js +117 -26
  138. package/dist/ssg.js +2 -2
  139. package/dist/visual-testing.js +1 -1
  140. package/package.json +5 -5
  141. package/dist/chunk-07syq64h.js +0 -2
  142. package/dist/chunk-126tkba9.js +0 -2
  143. package/dist/chunk-18qyx80g.js +0 -2
  144. package/dist/chunk-1f8kqg6a.js +0 -2
  145. package/dist/chunk-1h9rc1jm.js +0 -2
  146. package/dist/chunk-1qbj1kz4.js +0 -2
  147. package/dist/chunk-2t41acdt.js +0 -2
  148. package/dist/chunk-38an983e.js +0 -2
  149. package/dist/chunk-3xpws4kd.js +0 -2
  150. package/dist/chunk-4tpsw999.js +0 -2
  151. package/dist/chunk-65y5abx7.js +0 -2
  152. package/dist/chunk-6n0jamtd.js +0 -2
  153. package/dist/chunk-6wcfe0s5.js +0 -2
  154. package/dist/chunk-7vnkqnyh.js +0 -2
  155. package/dist/chunk-9hh5eg8y.js +0 -2
  156. package/dist/chunk-b4d5pbhs.js +0 -2
  157. package/dist/chunk-d6q7cv8w.js +0 -2
  158. package/dist/chunk-ej2mb0t3.js +0 -2
  159. package/dist/chunk-es5qfybg.js +0 -2
  160. package/dist/chunk-h1qtbdfs.js +0 -2
  161. package/dist/chunk-kp4ja0w3.js +0 -2
  162. package/dist/chunk-m4q3nsch.js +0 -2
  163. package/dist/chunk-vd7thynz.js +0 -2
  164. package/dist/chunk-vs3zfaxp.js +0 -2
  165. package/dist/chunk-x04ktd35.js +0 -2
  166. package/dist/chunk-x5z3r1d9.js +0 -2
  167. package/dist/chunk-xs7f8h2r.js +0 -2
  168. package/dist/chunk-yc3x3rmf.js +0 -2
  169. package/dist/chunk-zm92mg10.js +0 -2
package/dist/signals.js CHANGED
@@ -137,7 +137,39 @@ console.log('[stx] entering IIFE');
137
137
  anchor: function(label) { return document.createComment(label); },
138
138
  clone: function(node) { return node.cloneNode(true); },
139
139
  insert: function(parent, node, before) { parent.insertBefore(node, before); },
140
- remove: function(node) { if (node.parentNode) node.parentNode.removeChild(node); }
140
+ remove: function(node) { if (node.parentNode) node.parentNode.removeChild(node); },
141
+
142
+ // Teardown needs to reach a subtree, and both ways of reaching one were
143
+ // selector queries -- the last DOM assumption left in the binding layer
144
+ // (#1984). A view hierarchy has no selectors, and a native host already
145
+ // knows what it built, so being asked is cheaper for it than searching is
146
+ // for the document.
147
+ //
148
+ // descendants() is every node under this one, for the per-node teardown
149
+ // state the runtime hangs off elements. scopesIn() is the scope IDS in the
150
+ // subtree, this node included -- ids and not nodes, because the only thing
151
+ // done with them is a lookup in window.stx._scopes.
152
+ descendants: function(node) {
153
+ var out = [];
154
+ if (!node || !node.querySelectorAll) return out;
155
+ var all = node.querySelectorAll('*');
156
+ for (var i = 0; i < all.length; i++) out.push(all[i]);
157
+ return out;
158
+ },
159
+ scopesIn: function(node) {
160
+ var ids = [];
161
+ if (!node) return ids;
162
+ var own = node.getAttribute && node.getAttribute('data-stx-scope');
163
+ if (own) ids.push(own);
164
+ if (node.querySelectorAll) {
165
+ var matches = node.querySelectorAll('[data-stx-scope]');
166
+ for (var i = 0; i < matches.length; i++) {
167
+ var id = matches[i].getAttribute('data-stx-scope');
168
+ if (id) ids.push(id);
169
+ }
170
+ }
171
+ return ids;
172
+ }
141
173
  };
142
174
 
143
175
  // Inject x-cloak CSS to prevent FOUC (Flash of Unstyled Content)
@@ -3058,6 +3090,28 @@ catch (e2) {
3058
3090
  const value = attr.value;
3059
3091
  if (!name) return;
3060
3092
 
3093
+ /*
3094
+ * A doubled colon escapes the prefix, the way a doubled at-sign does in
3095
+ * a directive: @@if renders @if, so ::foo renders :foo.
3096
+ *
3097
+ * It was excluded from the generic attribute path, which is why it was
3098
+ * never evaluated as an expression -- but a name beginning with two
3099
+ * colons also begins with one, so the event catch-all below claimed it,
3100
+ * registered a listener for an event named :foo, and removed the
3101
+ * attribute. The author got neither a binding nor their attribute: it
3102
+ * disappeared, silently, and nothing took its place.
3103
+ *
3104
+ * Unescaped here rather than on the server, because an unescaped :foo
3105
+ * reaching this pass is indistinguishable from one the author wrote and
3106
+ * would be bound as an event. The attributes were snapshotted before
3107
+ * this loop, so the one written now is not revisited.
3108
+ */
3109
+ if (name.startsWith('::')) {
3110
+ el.removeAttribute(name);
3111
+ el.setAttribute(name.slice(1), value);
3112
+ return;
3113
+ }
3114
+
3061
3115
  // Dynamic attribute binding: @bind:attr, x-bind:attr, :attr, OR x-attr
3062
3116
  // x-attr (e.g. x-class, x-style, x-href, x-src) is the canonical binding prefix.
3063
3117
  // :attr still works for backward compat but is reserved for structural directives.
@@ -4444,19 +4498,51 @@ catch (e) {
4444
4498
  // _isStxStore marker). Only fires on the warn path, which is
4445
4499
  // rare, so the extra Object.keys / spread cost is negligible.
4446
4500
  var diagScope;
4501
+ var rootName = '?';
4502
+ var rootInScope = true;
4503
+ var rootVal;
4447
4504
  try {
4448
4505
  var diagMerged = { ...globalHelpers, ...passedScope, ...(capturedScope || {}) };
4449
4506
  var firstIdent = listExpr.match(/^[A-Za-z_$][\\w$]*/);
4450
- var rootName = firstIdent ? firstIdent[0] : '?';
4451
- var rootInScope = Object.prototype.hasOwnProperty.call(diagMerged, rootName);
4452
- var rootVal = rootInScope ? diagMerged[rootName] : '<NOT-IN-SCOPE>';
4507
+ rootName = firstIdent ? firstIdent[0] : '?';
4508
+ rootInScope = Object.prototype.hasOwnProperty.call(diagMerged, rootName);
4509
+ rootVal = rootInScope ? diagMerged[rootName] : '<NOT-IN-SCOPE>';
4453
4510
  var rootKeys = (rootVal && typeof rootVal === 'object')
4454
4511
  ? Object.keys(rootVal).slice(0, 8).join(',')
4455
4512
  : '-';
4456
4513
  diagScope = '[root=' + rootName + ' inScope=' + rootInScope + ' type=' + (typeof rootVal) + ' isStxStore=' + !!(rootVal && rootVal._isStxStore) + ' keys=' + rootKeys + ']';
4457
4514
  }
4458
- catch (_e) { diagScope = '[diag-error]'; }
4459
- console.warn('[STX] :for expected an array; got ' + (list === '' ? 'empty/error' : typeof list) + ' for expression "' + listExpr + '". ' + diagScope + ' If this is a signal call, try the bare reference (signal instead of signal()).');
4515
+ catch (_e) { diagScope = '[diag-error]'; rootInScope = true; }
4516
+
4517
+ /*
4518
+ * Name the cause rather than guessing at it (stacksjs/stx#2051).
4519
+ *
4520
+ * This used to end with "If this is a signal call, try the bare
4521
+ * reference" every single time. In the most common failure the
4522
+ * identifier is not a signal at all -- it is a bare name the client
4523
+ * scope has never heard of, usually a declaration from a
4524
+ * script-server block, which :for cannot see because it is expanded
4525
+ * on the client. The hint sent people to the wrong layer: one app
4526
+ * read it, concluded the signals-and-:for pattern was unreliable, and
4527
+ * was rebuilt on hand-written getElementById wiring.
4528
+ *
4529
+ * The scope dump already answered the question -- inScope=false was
4530
+ * right there, ahead of the guess -- so lead with it, and keep the
4531
+ * signal advice for when the value really is a signal, which is the
4532
+ * one case where it applies.
4533
+ */
4534
+ var advice;
4535
+ if (!rootInScope) {
4536
+ advice = 'Nothing named ' + rootName + ' is in the client scope. A script-server declaration is not available here: :for is expanded on the client. '
4537
+ + 'Either wrap it in state() inside a script-client block, or iterate it with the server-side @foreach(' + rootName + ' as item).';
4538
+ }
4539
+ else if (typeof rootVal === 'function' && (rootVal._isSignal || rootVal._isDerived)) {
4540
+ advice = rootName + ' is a signal, so try the bare reference: ' + rootName + ' instead of ' + rootName + '().';
4541
+ }
4542
+ else {
4543
+ advice = rootName + ' resolved to a ' + (typeof rootVal) + ', not an array.';
4544
+ }
4545
+ console.warn('[STX] :for expected an array; got ' + (list === '' ? 'empty/error' : typeof list) + ' for expression "' + listExpr + '". ' + diagScope + ' ' + advice);
4460
4546
  return;
4461
4547
  }
4462
4548
 
@@ -5773,6 +5859,18 @@ else if (timer === null) {
5773
5859
  var attribute = pick(options.attribute, fromBoot('attribute'), null);
5774
5860
  var autoValueOption = pick(options.autoValue, fromBoot('autoValue'), undefined);
5775
5861
  var disableTransitions = options.disableTransitions !== false;
5862
+ // A mode the page was served already stamped with, which outranks this
5863
+ // composable's own resolution: for a page whose theme is not the visitor's
5864
+ // to choose (stacksjs/stx#2050). Taken from the boot global's forced key
5865
+ // rather than by reading the attribute, because the boot script has
5866
+ // stamped it by now either way and the DOM can no longer say which it was.
5867
+ //
5868
+ // No backticks in this comment, or any other in this file: the runtime is
5869
+ // generated from a template literal, so one would end the literal and
5870
+ // break the whole emitted script.
5871
+ var respectExisting = options.respectExisting === true || fromBoot('respectExisting') === true;
5872
+ var bootForced = fromBoot('forced');
5873
+ var forcedMode = (respectExisting && (bootForced === 'light' || bootForced === 'dark')) ? bootForced : null;
5776
5874
  var resolved = 'light';
5777
5875
  var listeners = [];
5778
5876
  var cleanups = [];
@@ -5792,6 +5890,9 @@ else if (timer === null) {
5792
5890
  return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
5793
5891
  }
5794
5892
  function resolve(pref) { return pref === 'auto' ? getSystem() : pref; }
5893
+ // Used wherever the resolved mode is assigned, so a forced page survives
5894
+ // a system-theme change and another tab's write, not just the first mount.
5895
+ function effective(pref) { return forcedMode || resolve(pref); }
5795
5896
  function applyDOM(mode) {
5796
5897
  var el = document.documentElement;
5797
5898
  if (disableTransitions) el.style.setProperty('transition', 'none', 'important');
@@ -5824,7 +5925,7 @@ catch (e) {} }
5824
5925
  // composable didn't recognise, destroying it.
5825
5926
  function update(pref, persistChoice) {
5826
5927
  preference = normalizeMode(pref) || 'auto';
5827
- resolved = resolve(preference);
5928
+ resolved = effective(preference);
5828
5929
  applyDOM(resolved);
5829
5930
  if (persistChoice !== false) persist(preference);
5830
5931
  listeners.forEach(function(fn) { fn(resolved, preference); });
@@ -5835,7 +5936,7 @@ catch (e) {} }
5835
5936
  var mql = window.matchMedia('(prefers-color-scheme: dark)');
5836
5937
  var onSystemChange = function() {
5837
5938
  if (preference === 'auto') {
5838
- resolved = getSystem();
5939
+ resolved = forcedMode || getSystem();
5839
5940
  applyDOM(resolved);
5840
5941
  listeners.forEach(function(fn) { fn(resolved, preference); });
5841
5942
  }
@@ -5850,7 +5951,7 @@ catch (e) {} }
5850
5951
  // Track the other tab's spelling too, so a write from here doesn't
5851
5952
  // convert the key out from under it.
5852
5953
  if (v === 'auto' && (e.newValue === 'auto' || e.newValue === 'system')) autoValue = e.newValue;
5853
- preference = v; resolved = resolve(v); applyDOM(resolved);
5954
+ preference = v; resolved = effective(v); applyDOM(resolved);
5854
5955
  listeners.forEach(function(fn) { fn(resolved, preference); });
5855
5956
  }
5856
5957
  };
@@ -8527,11 +8628,7 @@ catch (e) {
8527
8628
  // Descendants first, then the root, the order cleanupContainer always used.
8528
8629
  function disposeSubtreeEffects(root) {
8529
8630
  if (!root) return;
8530
- var nodes = [];
8531
- if (root.querySelectorAll) {
8532
- var all = root.querySelectorAll('*');
8533
- for (var i = 0; i < all.length; i++) nodes.push(all[i]);
8534
- }
8631
+ var nodes = stxHost.descendants(root);
8535
8632
  nodes.push(root);
8536
8633
  var owned = ['__stx_disposers', '__stx_effect_disposers', '__stx_if_disposers', '__stx_chain_disposers'];
8537
8634
  for (var n = 0; n < nodes.length; n++) {
@@ -8565,18 +8662,12 @@ catch (e) {
8565
8662
 
8566
8663
  function disposeSubtreeScopes(root) {
8567
8664
  if (!root || !window.stx || !window.stx._scopes) return;
8568
- // Build the list of nodes to inspect: root + descendants with the
8569
- // [data-stx-scope] attribute. Avoid Array.from on a generator since
8570
- // we want browser-broad compatibility from the minified runtime.
8571
- var nodes = [];
8572
- if (root.getAttribute && root.getAttribute('data-stx-scope')) nodes.push(root);
8573
- if (root.querySelectorAll) {
8574
- var matches = root.querySelectorAll('[data-stx-scope]');
8575
- for (var i = 0; i < matches.length; i++) nodes.push(matches[i]);
8576
- }
8577
- for (var n = 0; n < nodes.length; n++) {
8578
- var el = nodes[n];
8579
- var scopeId = el.getAttribute('data-stx-scope');
8665
+ // The host reports which scopes live in this subtree: the document finds
8666
+ // them with a selector, a native host reads the map it keeps as it builds
8667
+ // views (#1984).
8668
+ var scopeIds = stxHost.scopesIn(root);
8669
+ for (var n = 0; n < scopeIds.length; n++) {
8670
+ var scopeId = scopeIds[n];
8580
8671
  if (!scopeId) continue;
8581
8672
  var scopeVars = window.stx._scopes[scopeId];
8582
8673
  if (!scopeVars) continue;
package/dist/ssg.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ak as Uq,Bk as Iq,Fk as wq}from"./chunk-gtn2agxa.js";import{Gk as Eq,Hk as Tq,Ik as Dq}from"./chunk-7eea1cse.js";import{bl as _q,el as zq,fl as Aq}from"./chunk-q25qsg28.js";import"./chunk-eqtc6w4a.js";import"./chunk-2andsajh.js";import{Fr as n,Tp as C,Xm as Oq,no as l,qo as Hq}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import{vt as Xq}from"./chunk-wjzcggh6.js";import{At as d}from"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import{fu as Bq}from"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import{Bw as Yq,Cw as Vq,Dw as jq,Ew as Gq,Fw as Lq,Gw as Nq}from"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import{$w as P}from"./chunk-rxz43r6k.js";import X from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,_,z)=>{let L=z.trim();if(!L)return J;if(/\bdata-stx-src=/.test(_))return J;if(Z.minify)L=yq(L);let A=Cq(L);if(!$.has(A))$.set(A,L);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(L).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${A}.js"${B}${_}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let _=q.lastIndexOf("</head>");if(K.size===0||_===-1)return q;let z=Array.from(K).filter((L)=>!q.includes(`rel="prefetch" href="${L}"`)).map((L)=>`<link rel="prefetch" href="${L}" as="script">`).join("");if(!z)return q;return q.slice(0,_)+z+q.slice(_)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){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{Ak as Uq,Bk as Iq,Fk as wq}from"./chunk-ht9rdkf3.js";import{Gk as Eq,Hk as Tq,Ik as Dq}from"./chunk-7eea1cse.js";import{bl as _q,el as zq,fl as Aq}from"./chunk-14rh4kd0.js";import"./chunk-etah20m0.js";import"./chunk-2andsajh.js";import{Gr as n,Up as C,Xm as Oq,no as l,qo as Hq}from"./chunk-ptad3t7a.js";import"./chunk-y9f9g2kh.js";import"./chunk-ah8gs0q2.js";import"./chunk-saf4xhac.js";import"./chunk-wheh08v2.js";import"./chunk-jct6cs2k.js";import{wt as Xq}from"./chunk-ndydf37f.js";import{Bt as d}from"./chunk-7vftjm43.js";import"./chunk-4azk3jdd.js";import"./chunk-jbtzq3xt.js";import"./chunk-mjearf0g.js";import{gu as Bq}from"./chunk-9rp8f7jz.js";import"./chunk-8ghwewek.js";import"./chunk-rk8p4b1z.js";import"./chunk-fpxz25xz.js";import"./chunk-nn42gs3q.js";import"./chunk-v54tq312.js";import{Cw as Yq,Dw as Vq,Ew as jq,Fw as Gq,Gw as Lq,Hw as Nq}from"./chunk-qbc0bebg.js";import"./chunk-4yc9gx6h.js";import"./chunk-d6rkgay9.js";import{ax as P}from"./chunk-cevkpyn9.js";import X from"fs";import j from"path";import{createHash as xq}from"crypto";function yq(q){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(q).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return q}}var Pq=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function Cq(q){return Bun.hash(q).toString(16)}function Qq(q,Z={}){if(!q.includes('type="stx/island"'))return{html:q,chunks:[]};let $=new Map,Q=q.replace(Pq,(J,W,_,z)=>{let L=z.trim();if(!L)return J;if(/\bdata-stx-src=/.test(_))return J;if(Z.minify)L=yq(L);let A=Cq(L);if(!$.has(A))$.set(A,L);let B=Z.integrity?` data-stx-integrity="sha384-${xq("sha384").update(L).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${W}" data-stx-src="/_stx/islands/${A}.js"${B}${_}></script>`}),K=Array.from($,([J,W])=>({hash:J,code:W}));return{html:Q,chunks:K}}var gq=new Set(["visible","idle"]);function Zq(q){if(!q.includes("data-stx-src="))return q;let Z=new Map,$=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,Q;while((Q=$.exec(q))!==null)Z.set(Q[1],Q[2]);let K=new Set,J=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,W;while((W=J.exec(q))!==null)if(gq.has(Z.get(W[1])||""))K.add(W[2]);let _=q.lastIndexOf("</head>");if(K.size===0||_===-1)return q;let z=Array.from(K).filter((L)=>!q.includes(`rel="prefetch" href="${L}"`)).map((L)=>`<link rel="prefetch" href="${L}" as="script">`).join("");if(!z)return q;return q.slice(0,_)+z+q.slice(_)}var fq=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function h(q){let Z=q.trim();if(!Z)return null;let $=/^https?:\/\//i.test(Z)?Z:`https://${Z}`;try{return new URL($).origin+new URL($).pathname.replace(/\/$/,"")}catch{return null}}function mq(q){for(let Z of fq){let $=q[Z];if(!$)continue;let Q=h($);if(Q)return{url:Q,source:"env",via:Z}}return null}function $q(q){if(!q||typeof q!=="object")return null;let Z=q,$=Z.site?.url??Z.url??Z.app?.url;return typeof $==="string"?h($):null}async function dq(q){let{existsSync:Z}=await import("fs"),$=await import("path");for(let Q of["site.config.ts","site.config.js",".config/site.config.ts"]){let K=$.resolve(q,Q);if(!Z(K))continue;try{let J=await import(K),W=$q(J.default??J);if(W)return W}catch{}}return null}async function Kq(q={}){let Z=q.cwd??process.cwd(),$=q.env??process.env;if(q.explicit){let W=h(q.explicit);if(W)return{url:W,source:"option"}}let Q=$q(q.stxConfig);if(Q)return{url:Q,source:"stx.config",via:"site.url"};let K=await dq(Z);if(K)return{url:K,source:"site.config",via:"url"};let J=mq($);if(J)return J;return{url:"http://localhost",source:"fallback"}}function Wq(){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 Fq{cacheDir;cache=new Map;loaded=!1;salt;constructor(q,Z=""){this.cacheDir=q,this.salt=Z}async load(){if(this.loaded)return;let q=j.join(this.cacheDir,"build-cache.json");if(await Bun.file(q).exists())try{let Z=JSON.parse(await Bun.file(q).text());for(let[$,Q]of Object.entries(Z))this.cache.set($,Q)}catch{}this.loaded=!0}async save(){await X.promises.mkdir(this.cacheDir,{recursive:!0});let q=j.join(this.cacheDir,"build-cache.json"),Z={};for(let[$,Q]of this.cache)Z[$]=Q;await Bun.write(q,JSON.stringify(Z))}getHash(q,Z){let $=X.statSync(q),Q=`${this.salt}|${q}:${$.mtimeMs}`;for(let J of Z)if(X.existsSync(J)){let W=X.statSync(J);Q+=`:${J}:${W.mtimeMs}`}let K=0;for(let J=0;J<Q.length;J++){let W=Q.charCodeAt(J);K=(K<<5)-K+W,K=K&K}return Math.abs(K).toString(36)}get(q,Z){let $=this.cache.get(q);if(!$)return null;let Q=this.getHash(Z,$.dependencies??[]);if($.hash!==Q)return this.cache.delete(q),null;return $.html}set(q,Z,$,Q){let K=this.getHash(Z,$);this.cache.set(q,{hash:K,html:Q,generatedAt:Date.now(),dependencies:$})}}class Rq{cacheDir;constructor(q){this.cacheDir=q}getFilePath(q){let Z=q.replace(/[^a-zA-Z0-9]/g,"_")+".json";return j.join(this.cacheDir,"isr",Z)}async get(q){let Z=this.getFilePath(q);if(!await Bun.file(Z).exists())return null;try{return JSON.parse(await Bun.file(Z).text())}catch{return null}}async set(q,Z){let $=this.getFilePath(q);await X.promises.mkdir(j.dirname($),{recursive:!0}),await Bun.write($,JSON.stringify(Z))}async invalidate(q){let Z=this.getFilePath(q);if(await Bun.file(Z).exists())await X.promises.unlink(Z)}async invalidatePattern(q){let Z=j.join(this.cacheDir,"isr");if(!X.existsSync(Z))return;let $=await X.promises.readdir(Z);for(let Q of $){let K=Q.replace(/_/g,"/").replace(".json","");if(q.test(K))await X.promises.unlink(j.join(Z,Q))}}async needsRevalidation(q){let Z=await this.get(q);if(!Z)return!0;return Date.now()>Z.revalidateAfter}}async function pq(q){try{let $=(await Bun.file(q).text()).match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!$)return null;let Q=$[1];if(!Q.includes("getStaticPaths"))return null;let K=Q.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticPaths\s*\([^)]*\)\s*\{([\s\S]*?)\n[\t ]*\}/);if(!K)return null;return await Function(`
4
4
  return (async function getStaticPaths() {
5
5
  ${K[1]}
@@ -41,7 +41,7 @@ ${q.map((Q)=>{let K=new URL(Q.loc,Z).href,J=` <url>
41
41
  ${$.join(`
42
42
  `)}
43
43
  </channel>
44
- </rss>`}async function rq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,failOnServerScriptError:q.failOnServerScriptError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},_=new Set,z=0,L={},A={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&X.existsSync(J.outputDir))await X.promises.rm(J.outputDir,{recursive:!0});await X.promises.mkdir(J.outputDir,{recursive:!0});let U=J.cacheSalt;if(!U){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-b3b3s1kr.js");try{U=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:G}=await import("./chunk-aewsgyzc.js"),H=await G(J.publicDir,J.outputDir);if(H.count>0)console.log(`Optimized ${H.count} image(s) for responsive delivery`),U=[U,H.fingerprint].filter(Boolean).join(":");let F=new Fq(J.cacheDir,U);if(J.cache)await F.load();try{let{generateCss:Y}=await import("./chunk-b3b3s1kr.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];wq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let O of N)g.push({route:Y,url:O.url,params:O.params,props:O.props,revalidate:O.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let S=[],s=[];for(let Y=0;Y<g.length;Y+=J.concurrency)s.push(g.slice(Y,Y+J.concurrency));for(let Y of s)await Promise.all(Y.map(async(N)=>{let{route:O,url:V,params:v,props:Sq,revalidate:r}=N;try{await J.hooks.onPageStart?.(V);let R=await Bun.file(O.filePath).text(),M=JJ(R),vq=M?.middleware?Array.isArray(M.middleware)?M.middleware:[M.middleware]:[],t=[...bq,...vq];if(t.length>0){let T=Gq(V,v,M||{}),k=Lq(T,null,void 0,{isServer:!0}),D=await Nq(t,k);if(D.redirect){let I=typeof D.redirect==="string"?D.redirect:D.redirect.path||D.redirect,y=QJ(String(I),V),b=ZJ(V,J);await X.promises.mkdir(j.dirname(b),{recursive:!0}),await Bun.write(b,y),W.successCount++,W.pages.push({route:V,outputPath:b,size:Buffer.byteLength(y),cached:!1}),S.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${I}`);return}if(D.abort){let I=typeof D.abort==="string"?D.abort:D.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${I}`);return}}let e=R.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
44
+ </rss>`}async function rq(q={}){let Z=Date.now();Aq();let $=await n(process.cwd()),Q=$.build||{},K=await Kq({explicit:q.domain||Q.domain,stxConfig:$});if(K.source==="fallback"&&(q.sitemap??Q.sitemap??!0))console.warn(Wq());let J={router:q.router??$?.router??{},pagesDir:q.pagesDir||Q.pagesDir||"pages",outputDir:q.outputDir||Q.outputDir||"dist",baseUrl:q.baseUrl||Q.baseUrl||"/",domain:K.url,revalidate:q.revalidate??Q.revalidate??!1,sitemap:q.sitemap??Q.sitemap??!0,sitemapExclude:q.sitemapExclude||Q.sitemapExclude||[],robots:q.robots??Q.robots??!0,rss:q.rss??Q.rss??!1,concurrency:q.concurrency||Q.concurrency||10,cache:q.cache??Q.cache??!0,cacheDir:q.cacheDir||Q.cacheDir||d(process.cwd(),"ssg-cache"),contentLoaders:q.contentLoaders||[],hooks:q.hooks||{},minify:q.minify??Q.minify??!0,generate404:q.generate404??Q.generate404??!0,publicDir:q.publicDir||Q.publicDir||"public",trailingSlash:q.trailingSlash??Q.trailingSlash??!1,cleanOutput:q.cleanOutput??Q.cleanOutput??!0,cacheSalt:q.cacheSalt??"",partialsDir:q.partialsDir||$?.partialsDir||"",componentsDir:q.componentsDir||$?.componentsDir||"",failOnIncludeError:q.failOnIncludeError??!0,failOnServerScriptError:q.failOnServerScriptError??!0,chunkIslands:q.chunkIslands===!0,prefetchIslands:q.prefetchIslands===!0,integrityIslands:q.integrityIslands===!0},W={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},_=new Set,z=0,L={},A={};await J.hooks.onBuildStart?.();try{if(J.cleanOutput&&X.existsSync(J.outputDir))await X.promises.rm(J.outputDir,{recursive:!0});await X.promises.mkdir(J.outputDir,{recursive:!0});let U=J.cacheSalt;if(!U){let{resolveUserCssConfig:Y,fingerprintConfig:N}=await import("./chunk-ezwtd7s2.js");try{U=N(await Y(process.cwd()))}catch{}}let{prepareImageDelivery:G}=await import("./chunk-av7a1sct.js"),H=await G(J.publicDir,J.outputDir);if(H.count>0)console.log(`Optimized ${H.count} image(s) for responsive delivery`),U=[U,H.fingerprint].filter(Boolean).join(":");let F=new Fq(J.cacheDir,U);if(J.cache)await F.load();try{let{generateCss:Y}=await import("./chunk-ezwtd7s2.js");await Y('<div class="bg-black"></div>')}catch{}Yq();let kq=$?.routeMiddleware?.dir||"middleware";await jq(process.cwd(),kq);let p=Vq();if(p.length>0)console.log(`Loaded ${p.length} middleware: ${p.join(", ")}`);let bq=$?.routeMiddleware?.global||[];wq($?.layoutsDir,d(process.cwd()));let i=l(".",{pagesDir:J.pagesDir,pagesDirs:$?._layerPageDirs});console.log(`Found ${i.length} routes`);let g=[];for(let Y of i){let N=await uq(Y);for(let O of N)g.push({route:Y,url:O.url,params:O.params,props:O.props,revalidate:O.revalidate??J.revalidate})}W.totalPages=g.length,console.log(`Generating ${W.totalPages} pages...`);let S=[],s=[];for(let Y=0;Y<g.length;Y+=J.concurrency)s.push(g.slice(Y,Y+J.concurrency));for(let Y of s)await Promise.all(Y.map(async(N)=>{let{route:O,url:V,params:v,props:Sq,revalidate:r}=N;try{await J.hooks.onPageStart?.(V);let R=await Bun.file(O.filePath).text(),M=JJ(R),vq=M?.middleware?Array.isArray(M.middleware)?M.middleware:[M.middleware]:[],t=[...bq,...vq];if(t.length>0){let T=Gq(V,v,M||{}),k=Lq(T,null,void 0,{isServer:!0}),D=await Nq(t,k);if(D.redirect){let I=typeof D.redirect==="string"?D.redirect:D.redirect.path||D.redirect,y=QJ(String(I),V),b=ZJ(V,J);await X.promises.mkdir(j.dirname(b),{recursive:!0}),await Bun.write(b,y),W.successCount++,W.pages.push({route:V,outputPath:b,size:Buffer.byteLength(y),cached:!1}),S.push({loc:V,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${V} \u2192 redirect to ${I}`);return}if(D.abort){let I=typeof D.abort==="string"?D.abort:D.abort?.error?.message||"aborted";console.warn(` \u21B3 ${V} \u2014 middleware aborted: ${I}`);return}}let e=R.match(/definePageMeta\s*\(\s*\{[\s\S]*?validate\s*:\s*((?:\([^)]*\)|[^,}])*(?:\{[\s\S]*?\})?)/m);if(e)try{if(!await Function("route",`
45
45
  const validate = ${e[1]};
46
46
  return validate(route);
47
47
  `)({params:v})){console.warn(`Validation failed for ${V}, skipping...`);return}}catch{}let E=null,qq=!1;if(J.cache){if(E=F.get(V,O.filePath),E)qq=!0,W.cachedCount++}if(!E){let T=await Mq(O,v,Sq,J,$);if(E=T.html,J.failOnIncludeError&&T.includeFailures.length>0)throw Error(`${T.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-rxz43r6k.js";import B from"fs";import $ from"path";import k from"crypto";var V=[{name:"mobile",width:375,height:667,isMobile:!0,hasTouch:!0},{name:"tablet",width:768,height:1024,isMobile:!0,hasTouch:!0},{name:"desktop",width:1280,height:800,isMobile:!1,hasTouch:!1},{name:"wide",width:1920,height:1080,isMobile:!1,hasTouch:!1}];function J(N={}){let Y={snapshotDir:N.snapshotDir||"__snapshots__",screenshotDir:N.screenshotDir||"__screenshots__",updateSnapshots:N.updateSnapshots||process.env.UPDATE_SNAPSHOTS==="true",threshold:N.threshold??0.01,viewports:N.viewports||V,generateDiff:N.generateDiff??!0,diffDir:N.diffDir||"__diffs__",compare:N.compare||b,ci:N.ci??process.env.CI==="true",retries:N.retries??(N.ci?3:1)};return{async snapshot(M,X){let q=$.join(Y.snapshotDir,`${X}.html`),G=C(M),Q=K(G);if(await Bun.file(q).exists()){let W=await Bun.file(q).text(),Z=K(C(W));if(Q===Z)return{passed:!0,snapshotPath:q,message:"Snapshot matches"};if(Y.updateSnapshots)return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};let F=$.join(Y.diffDir,`${X}.actual.html`),U=$.join(Y.diffDir,`${X}.diff.html`);return await B.promises.mkdir(Y.diffDir,{recursive:!0}),await Bun.write(F,G),await Bun.write(U,I(W,G)),{passed:!1,snapshotPath:q,actualPath:F,diffPath:U,message:"Snapshot does not match"}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},async snapshotJson(M,X){let q=$.join(Y.snapshotDir,`${X}.json`),G=JSON.stringify(M,null,2);if(await Bun.file(q).exists()){let Q=await Bun.file(q).text();if(G===Q)return{passed:!0,snapshotPath:q};if(Y.updateSnapshots)return await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};return{passed:!1,snapshotPath:q,message:`JSON snapshot mismatch:
2
+ import"./chunk-cevkpyn9.js";import B from"fs";import $ from"path";import k from"crypto";var V=[{name:"mobile",width:375,height:667,isMobile:!0,hasTouch:!0},{name:"tablet",width:768,height:1024,isMobile:!0,hasTouch:!0},{name:"desktop",width:1280,height:800,isMobile:!1,hasTouch:!1},{name:"wide",width:1920,height:1080,isMobile:!1,hasTouch:!1}];function J(N={}){let Y={snapshotDir:N.snapshotDir||"__snapshots__",screenshotDir:N.screenshotDir||"__screenshots__",updateSnapshots:N.updateSnapshots||process.env.UPDATE_SNAPSHOTS==="true",threshold:N.threshold??0.01,viewports:N.viewports||V,generateDiff:N.generateDiff??!0,diffDir:N.diffDir||"__diffs__",compare:N.compare||b,ci:N.ci??process.env.CI==="true",retries:N.retries??(N.ci?3:1)};return{async snapshot(M,X){let q=$.join(Y.snapshotDir,`${X}.html`),G=C(M),Q=K(G);if(await Bun.file(q).exists()){let W=await Bun.file(q).text(),Z=K(C(W));if(Q===Z)return{passed:!0,snapshotPath:q,message:"Snapshot matches"};if(Y.updateSnapshots)return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};let F=$.join(Y.diffDir,`${X}.actual.html`),U=$.join(Y.diffDir,`${X}.diff.html`);return await B.promises.mkdir(Y.diffDir,{recursive:!0}),await Bun.write(F,G),await Bun.write(U,I(W,G)),{passed:!1,snapshotPath:q,actualPath:F,diffPath:U,message:"Snapshot does not match"}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},async snapshotJson(M,X){let q=$.join(Y.snapshotDir,`${X}.json`),G=JSON.stringify(M,null,2);if(await Bun.file(q).exists()){let Q=await Bun.file(q).text();if(G===Q)return{passed:!0,snapshotPath:q};if(Y.updateSnapshots)return await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"Snapshot updated"};return{passed:!1,snapshotPath:q,message:`JSON snapshot mismatch:
3
3
  ${z(Q,G)}`}}return await B.promises.mkdir($.dirname(q),{recursive:!0}),await Bun.write(q,G),{passed:!0,snapshotPath:q,message:"New snapshot created"}},matchInlineSnapshot(M,X){let q=C(M);if(X===void 0)return{passed:!0,expected:q};let G=C(X);return{passed:q===G,expected:q}},getConfig(){return Y}}}function D(N={}){let Y=J(N),M=Y.getConfig();return{async compareScreenshots(X,q,G="desktop"){let Q=$.join(M.screenshotDir,G,`${X}.png`),W=$.join(M.diffDir,G,`${X}.actual.png`),Z=$.join(M.diffDir,G,`${X}.diff.png`);if(await Bun.file(Q).exists()){let F=await Bun.file(Q).arrayBuffer(),U=Buffer.from(F),_=await M.compare(q,U);if(_.match||_.diffPercentage<=M.threshold)return{viewport:G,passed:!0,baselinePath:Q};if(M.updateSnapshots)return await B.promises.mkdir($.dirname(Q),{recursive:!0}),await Bun.write(Q,q),{viewport:G,passed:!0,baselinePath:Q};if(await B.promises.mkdir($.dirname(W),{recursive:!0}),await Bun.write(W,q),_.diffImage&&M.generateDiff)await Bun.write(Z,_.diffImage);return{viewport:G,passed:!1,baselinePath:Q,actualPath:W,diffPath:M.generateDiff?Z:void 0,diffPercentage:_.diffPercentage}}return await B.promises.mkdir($.dirname(Q),{recursive:!0}),await Bun.write(Q,q),{viewport:G,passed:!0,baselinePath:Q}},async testViewports(X,q,G=M.viewports){let Q=[];for(let W of G){let Z=null;for(let F=0;F<M.retries;F++)try{let U=await q(W),_=await this.compareScreenshots(X,U,W.name);Q.push(_),Z=null;break}catch(U){if(Z=U,F<M.retries-1)await new Promise((_)=>setTimeout(_,100*(F+1)))}if(Z)Q.push({viewport:W.name,passed:!1,baselinePath:"",diffPercentage:100})}return Q},getSnapshotTester(){return Y}}}function L(N={}){let M=D(N).getSnapshotTester(),X=new Map;return{addStory(q){X.set(`${q.component}/${q.name}`,q)},addStories(q){for(let G of q)this.addStory(G)},getStories(){return Array.from(X.values())},getStoriesForComponent(q){return Array.from(X.values()).filter((G)=>G.component===q)},async testStory(q){let G=X.get(q);if(!G)return{name:q,passed:!1,duration:0,snapshots:[],screenshots:[],errors:[Error(`Story not found: ${q}`)]};let Q=Date.now(),W={name:q,passed:!0,duration:0,snapshots:[],screenshots:[],errors:[]};try{let Z=await G.render(),F=await M.snapshot(Z,q.replace(/\//g,"-"));if(W.snapshots.push(F),!F.passed)W.passed=!1}catch(Z){W.passed=!1,W.errors.push(Z)}return W.duration=Date.now()-Q,W},async testAllStories(){let q=[];for(let G of X.keys()){let Q=await this.testStory(G);q.push(Q)}return q},async generateStoryIndex(){let q={};for(let G of X.values()){if(!q[G.component])q[G.component]=[];q[G.component].push({name:G.name,args:G.args})}return JSON.stringify(q,null,2)}}}async function S(N,Y={}){let M={outputDir:Y.outputDir||"visual-test-report",format:Y.format||"html",title:Y.title||"Visual Test Report",includeScreenshots:Y.includeScreenshots??!0};await B.promises.mkdir(M.outputDir,{recursive:!0});let X=N.length,q=N.filter((F)=>F.passed).length,G=X-q,Q=N.reduce((F,U)=>F+U.duration,0);if(M.format==="json"){let F={title:M.title,summary:{total:X,passed:q,failed:G,duration:Q},results:N,generatedAt:new Date().toISOString()},U=$.join(M.outputDir,"report.json");return await Bun.write(U,JSON.stringify(F,null,2)),U}if(M.format==="markdown"){let F=`# ${M.title}
4
4
 
5
5
  `;F+=`## Summary
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/stx",
3
3
  "type": "module",
4
- "version": "0.2.400",
4
+ "version": "0.2.402",
5
5
  "description": "A performant UI Framework. Powered by Bun.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
@@ -118,12 +118,12 @@
118
118
  "dependencies": {
119
119
  "@stacksjs/ts-css": "^0.3.2",
120
120
  "@stacksjs/clapp": "^0.2.16",
121
- "@stacksjs/desktop": "0.2.400",
122
- "@stacksjs/sanitizer": "0.2.400",
121
+ "@stacksjs/desktop": "0.2.402",
122
+ "@stacksjs/sanitizer": "0.2.402",
123
123
  "@stacksjs/ts-i18n": "^0.1.11",
124
- "bun-plugin-stx": "0.2.400",
124
+ "bun-plugin-stx": "0.2.402",
125
125
  "bunfig": "^0.15.19",
126
- "stx-router": "0.2.400",
126
+ "stx-router": "0.2.402",
127
127
  "ts-broadcasting": "^0.0.11",
128
128
  "ts-images": "^0.2.22",
129
129
  "ts-syntax-highlighter": "^0.2.1"
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Av as a,Bv as b}from"./chunk-rwtj7j0r.js";import"./chunk-rxz43r6k.js";export{a as transformStoreImports,b as stripModuleImports};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ho as a,Io as b,Jo as c,Ko as d,Lo as e,Mo as f,No as g,Oo as h,Po as i,Qo as j,Ro as k,So as l}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{c as withoutStxReferrer,b as stripTypeScript,j as splitDeclaration,e as isSyntaxFailure,d as isModuleResolutionFailure,f as isMissingBindingFailure,h as isCompleteImport,l as hasVariables,g as extractVariables,k as extractScriptFromTemplate,i as convertToCommonJS,a as STX_ENGINE_BINDING_NAMES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$o as e,Xo as a,Yo as b,Zo as c,_o as d,ap as f,bp as g}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as resetUnscopedSignalWarnings,g as processStackReplacements,f as processStackPushDirectives,e as processIncludes,b as partialsCache,c as onceStore,d as clearOnceStore};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ot as a,Pt as b}from"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-rxz43r6k.js";export{a as prepareRuntimeConfig,b as generateRuntimeConfigTypes};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Og as a,Pg as b,Qg as c,Rg as d,Sg as e,Tg as f}from"./chunk-gjpq3pmz.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{_f as a}from"./chunk-dazf77tr.js";import"./chunk-3818kp2d.js";import"./chunk-g64qyhhb.js";import"./chunk-8gwby0r0.js";import"./chunk-mnk5mdwp.js";import"./chunk-7eea1cse.js";import"./chunk-eqtc6w4a.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as buildForProduction};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ok as a,pk as b,qk as c,rk as d}from"./chunk-rswsrggp.js";import"./chunk-rem5ne21.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Am as d,Bm as e,Cm as f,Dm as g,Em as h,Fm as i,Gm as j,Hm as k,Im as l,Jm as m,Km as n,Lm as o,Mm as p,Nm as q,Om as r,Pm as s,xm as a,ym as b,zm as c}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{j as usesSignalsInScript,s as unescapeHtml,q as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,o as processExpressions,n as interpolateScriptsInTemplate,l as interpolateScriptExpressions,m as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,r as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,k as clientLoopScopes,e as clearCustomFilters,p as applyFilters};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$i as l,Qi as a,Ri as b,Si as c,Ti as d,Ui as e,Vi as f,Wi as g,Xi as h,Yi as i,Zi as j,_i as k,aj as m,bj as n}from"./chunk-ymkv623c.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Li as a,Mi as b}from"./chunk-27wgfqs0.js";import"./chunk-452k8psm.js";import"./chunk-q25qsg28.js";import"./chunk-eqtc6w4a.js";import"./chunk-2andsajh.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as getStoreScript,b as clearStoreCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{li as a}from"./chunk-1t5vwavd.js";import"./chunk-rxz43r6k.js";export{a as processDeferDirectives};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hi as a}from"./chunk-mwh3ymwc.js";import"./chunk-rxz43r6k.js";export{a as rewriteImagesWithSiblings};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ii as a,ji as b,ki as c}from"./chunk-3ey6ha6w.js";import"./chunk-452k8psm.js";import"./chunk-q25qsg28.js";import"./chunk-eqtc6w4a.js";import"./chunk-2andsajh.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{vs as a,ws as b}from"./chunk-7tgjn256.js";import"./chunk-rxz43r6k.js";export{b as resolveStxTargets,a as looksLikeGlob};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cf as a,Df as b}from"./chunk-fsvkqeya.js";import"./chunk-980w4zcq.js";import"./chunk-rxz43r6k.js";export{a as handleImageRequest,b as createImageHandler};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ao as j,Bo as k,Co as l,Do as m,ro as a,so as b,to as c,uo as d,vo as e,wo as f,xo as g,yo as h,zo as i}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{m as stripStxRuntimeImports,b as scanScriptTags,l as rewriteStxImportSpecifiers,j as processSignals,h as processScriptSetup,f as preEvalLiteralReactiveIfs,c as parseLoopExpression,d as hasSignalsSyntax,k as findMarkupIndexOutsideScripts,i as extractExports,g as convertSignalLoopsToAttributes,e as convertSignalDirectivesToAttributes,a as clearScriptScanCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{To as a,Uo as b,Vo as c,Wo as d}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{dm as c,gm as d,hm as e,im as f,jm as g,km as h,lm as i,mm as j,nm as k,om as l,pm as m,qm as n}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import{xs as a,ys as b}from"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{h as transformAutoImports,b as stripCommentsAndLiterals,e as renderVendorStyleTags,i as referencesName,n as processClientScript,g as injectBrowserCoreAutoImports,m as generateServerDataBridge,k as generateBrowserAutoImportDestructuring,j as generateAutoImportDestructuring,a as findInterpolationEnd,l as extractBridgeData,d as extractAndStripCssImports,f as STX_AUTO_IMPORTS,c as BROWSER_CORE_IMPORTS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Dr as a,Er as b,Fr as c,Gr as d,Hr as e,Ir as f}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{f as validateConfig,b as resolveStxDirectories,c as loadStxConfig,e as defineStxConfig,a as defaultConfig,d as config};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Nj as b,Oj as c,Pj as d,Qj as e,Rj as f,Sj as g,Tj as h,Uj as i,Vj as j,Wj as k,Xj as l,Yj as m,Zj as n,_j as o}from"./chunk-awz5cx5w.js";import{xl as a}from"./chunk-2andsajh.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cv as a,Dv as b}from"./chunk-eqhsprr0.js";import"./chunk-rxz43r6k.js";export{b as warnUnbalancedTags,a as findUnbalancedTags};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ye as a}from"./chunk-nrgcfg8h.js";import"./chunk-g64qyhhb.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as buildApp};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Xe as a}from"./chunk-83ewzshg.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as startInteractive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qp as b,Rp as c,Sp as d,Tp as e,qo as a}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ko as b,lo as c,mo as d}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import{wv as a}from"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{b as rendersAsElement,c as processESImports,d as processComponents,a as freeIdentifiers};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{bl as a,cl as b,dl as c,el as d,fl as e,gl as f,hl as g,il as h,jl as i,kl as j,ll as k,ml as l,nl as m,ol as n,pl as o}from"./chunk-q25qsg28.js";import"./chunk-eqtc6w4a.js";import"./chunk-2andsajh.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Aq as y,No as a,Po as b,Ro as c,So as d,gq as e,hq as f,iq as g,jq as h,kq as i,lq as j,mq as k,nq as l,oq as m,pq as n,qq as o,rq as p,sq as q,tq as r,uq as s,vq as t,wq as u,xq as v,yq as w,zq as x}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{e as validateTemplate,g as validateDirective,o as userComponentFileExists,m as transpileTypeScript,q as slotContentHasExpressions,k as shouldTranspileTypeScript,n as scopeOnRootElement,u as resolveTemplatePath,s as renderComponentWithSlot,j as isJavaScriptScript,p as isHydrateTrigger,d as hasVariables,h as hasDirectives,v as getSourceLineInfo,l as getSharedTranspiler,f as getPositionInfo,y as getComponentCacheStats,t as fileExists,a as extractVariables,c as extractScriptFromTemplate,i as extractDirectiveNames,w as createDetailedErrorMessage,b as convertToCommonJS,r as componentClientSignalNames,x as clearComponentCache};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{af as a}from"./chunk-dzaf7qx8.js";import"./chunk-3818kp2d.js";import"./chunk-g64qyhhb.js";import"./chunk-eqtc6w4a.js";import"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{a as startProductionServer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Oe as c,Pe as d,Qe as e,Re as f,Se as g,Te as h,Ue as i}from"./chunk-0tak2f33.js";import"./chunk-3ey6ha6w.js";import"./chunk-452k8psm.js";import"./chunk-q25qsg28.js";import"./chunk-eqtc6w4a.js";import"./chunk-2andsajh.js";import{Up as a,Xp as b}from"./chunk-6am7e1be.js";import"./chunk-4cv7bw5e.js";import"./chunk-7tgjn256.js";import"./chunk-h8zp2fz9.js";import"./chunk-ekvejzvk.js";import"./chunk-3769e62c.js";import"./chunk-wjzcggh6.js";import"./chunk-yj5gkn17.js";import"./chunk-cy8hgd86.js";import"./chunk-74ebps1a.js";import"./chunk-g7qmxjyc.js";import"./chunk-88tt0qg0.js";import"./chunk-e1rv01pn.js";import"./chunk-bdz7nznw.js";import"./chunk-rwtj7j0r.js";import"./chunk-eqhsprr0.js";import"./chunk-csgshaeh.js";import"./chunk-d0qy1ezf.js";import"./chunk-c9kj8p6j.js";import"./chunk-x2wmn8m7.js";import"./chunk-rxz43r6k.js";export{d as virtualPathFor,h as typecheckStxFiles,e as sourcePathFor,i as formatTypecheckDiagnostics,g as findStxModuleDeclarations,f as findRuntimeTypeDeclarations,b as extractTemplateExpressions,a as extractScriptBlocks,c as buildVirtualSource};