@stacksjs/stx 0.2.572 → 0.2.574

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 (499) hide show
  1. package/dist/a11y.d.ts +51 -111
  2. package/dist/animation.d.ts +131 -74
  3. package/dist/api-client.d.ts +11 -21
  4. package/dist/api-handler.d.ts +4 -4
  5. package/dist/appearance-bootstrap.d.ts +16 -77
  6. package/dist/application-layers.d.ts +11 -20
  7. package/dist/asset-roots.d.ts +7 -27
  8. package/dist/assets.d.ts +7 -9
  9. package/dist/async-components.d.ts +56 -78
  10. package/dist/auth.d.ts +0 -3
  11. package/dist/browser-core-imports.d.ts +2 -2
  12. package/dist/build-externalize-repeated.d.ts +0 -25
  13. package/dist/build-externalize.d.ts +18 -53
  14. package/dist/build-id.d.ts +40 -28
  15. package/dist/build-message.d.ts +20 -44
  16. package/dist/builtins/attrs.d.ts +0 -14
  17. package/dist/builtins/drawer.d.ts +3 -22
  18. package/dist/builtins/icon.d.ts +17 -19
  19. package/dist/builtins/image-alpha.d.ts +8 -8
  20. package/dist/builtins/image-delivery.d.ts +38 -40
  21. package/dist/builtins/image-placeholder.d.ts +12 -50
  22. package/dist/builtins/image-warmup-worker.d.ts +1 -1
  23. package/dist/builtins/image-worker.d.ts +6 -32
  24. package/dist/builtins/index.d.ts +16 -6
  25. package/dist/builtins/modal.d.ts +13 -23
  26. package/dist/builtins/safe-image.d.ts +2 -42
  27. package/dist/builtins/stx-image.d.ts +44 -24
  28. package/dist/builtins/stx-link.d.ts +5 -8
  29. package/dist/builtins/stx-loading-indicator.d.ts +11 -10
  30. package/dist/builtins/suspense.d.ts +6 -27
  31. package/dist/builtins/toast.d.ts +15 -16
  32. package/dist/builtins/transition-group.d.ts +1 -25
  33. package/dist/caching.d.ts +24 -21
  34. package/dist/{chunk-a6jq7hex.js → chunk-06hx32h4.js} +3 -3
  35. package/dist/{chunk-cyg9w31a.js → chunk-0gt7e1ns.js} +1 -1
  36. package/dist/{chunk-15g5sc0p.js → chunk-0ppzstqj.js} +2 -2
  37. package/dist/{chunk-qcymqscj.js → chunk-0px2ab3m.js} +9 -9
  38. package/dist/chunk-0q5s55km.js +2 -0
  39. package/dist/{chunk-7t3ykgsm.js → chunk-1c8sdf9a.js} +3 -3
  40. package/dist/chunk-1m5pagp3.js +2 -0
  41. package/dist/{chunk-mzqyv7s5.js → chunk-1n9bxdnh.js} +3 -3
  42. package/dist/{chunk-58tz7tmf.js → chunk-1swmxkdt.js} +2 -2
  43. package/dist/{chunk-4easd8da.js → chunk-1x2x3xgc.js} +4 -4
  44. package/dist/chunk-27ja2rpd.js +2 -0
  45. package/dist/chunk-2b0p7am3.js +2 -0
  46. package/dist/{chunk-qj4j547f.js → chunk-30acme5g.js} +2 -2
  47. package/dist/{chunk-1n64749x.js → chunk-32pxa1r0.js} +1 -1
  48. package/dist/{chunk-g66m3g2r.js → chunk-37d52q0d.js} +1 -1
  49. package/dist/{chunk-sfwprq8q.js → chunk-3dr757vb.js} +9 -9
  50. package/dist/chunk-3k6q1481.js +2 -0
  51. package/dist/{chunk-2z0trbbm.js → chunk-3kc7af8c.js} +2 -2
  52. package/dist/chunk-3pr388w5.js +2 -0
  53. package/dist/chunk-42h0kvng.js +2 -0
  54. package/dist/chunk-4eff1v2p.js +2 -0
  55. package/dist/{chunk-gzgc8zk5.js → chunk-4k6cb5fg.js} +5 -5
  56. package/dist/{chunk-s12b57m9.js → chunk-4xvbc0mb.js} +2 -2
  57. package/dist/{chunk-83fdt4yj.js → chunk-501h1mer.js} +4 -4
  58. package/dist/{chunk-tv784gv0.js → chunk-550q827h.js} +2 -2
  59. package/dist/chunk-5n2v9g2c.js +2 -0
  60. package/dist/{chunk-q79kmad5.js → chunk-5xwmkxkk.js} +1 -1
  61. package/dist/chunk-68ygpbta.js +2 -0
  62. package/dist/{chunk-0bt0fbs1.js → chunk-69k5t6pj.js} +52 -52
  63. package/dist/{chunk-232jswfm.js → chunk-6c2y9h5h.js} +1 -1
  64. package/dist/chunk-6gjfres0.js +2 -0
  65. package/dist/chunk-6z57saf5.js +2 -0
  66. package/dist/chunk-71zwgxws.js +2 -0
  67. package/dist/{chunk-b9r88ysg.js → chunk-76437eb4.js} +2 -2
  68. package/dist/{chunk-beqkrwt1.js → chunk-7a0ewpz0.js} +2 -2
  69. package/dist/chunk-7debnvz9.js +2 -0
  70. package/dist/{chunk-jwvzvapp.js → chunk-7gxn7mvd.js} +2 -2
  71. package/dist/{chunk-vp31ff54.js → chunk-7hr63cp5.js} +2 -2
  72. package/dist/{chunk-5t1whxxt.js → chunk-825m59jr.js} +5 -5
  73. package/dist/{chunk-74xwzxwz.js → chunk-8efe5vpm.js} +2 -2
  74. package/dist/{chunk-jqefcghh.js → chunk-8hp6722y.js} +5 -5
  75. package/dist/{chunk-kgj852hx.js → chunk-9yht5n7g.js} +2 -2
  76. package/dist/{chunk-kzjrgh0b.js → chunk-a3w3jc0t.js} +6 -6
  77. package/dist/chunk-a77gbp9x.js +2 -0
  78. package/dist/chunk-ampr3fpv.js +2 -0
  79. package/dist/{chunk-2ads8rw5.js → chunk-b10n7cpe.js} +2 -2
  80. package/dist/{chunk-0q6n3by0.js → chunk-bb5a8adb.js} +3 -3
  81. package/dist/chunk-bgbz0wzq.js +2 -0
  82. package/dist/chunk-bgr7fqhs.js +2 -0
  83. package/dist/chunk-bjfrwcfh.js +2 -0
  84. package/dist/{chunk-9k7bq97t.js → chunk-byhsfnkc.js} +1 -1
  85. package/dist/{chunk-zyk12484.js → chunk-c0ewddb3.js} +2 -2
  86. package/dist/{chunk-b2q8bk8p.js → chunk-c6jyp7ss.js} +2 -2
  87. package/dist/chunk-cdt5pg28.js +2 -0
  88. package/dist/chunk-cfh798k7.js +2 -0
  89. package/dist/{chunk-pnag11c4.js → chunk-cp5903cg.js} +2 -2
  90. package/dist/{chunk-4bgfpkwx.js → chunk-crj0yqc6.js} +1 -1
  91. package/dist/chunk-dax3zkmm.js +2 -0
  92. package/dist/chunk-dn676tdp.js +2 -0
  93. package/dist/chunk-dtbj816p.js +2 -0
  94. package/dist/chunk-e23cg45k.js +2 -0
  95. package/dist/{chunk-qzbzn1yf.js → chunk-e27njk86.js} +12 -12
  96. package/dist/{chunk-vr36s2en.js → chunk-e40qpeg5.js} +2 -2
  97. package/dist/{chunk-q83w8edy.js → chunk-e7pjsrfc.js} +2 -2
  98. package/dist/chunk-ecwpsjpd.js +2 -0
  99. package/dist/{chunk-pqcvh9pp.js → chunk-f0mbj8w9.js} +1 -1
  100. package/dist/chunk-f1zyc84x.js +2 -0
  101. package/dist/{chunk-f4jh9vrj.js → chunk-g8dx2jew.js} +246 -243
  102. package/dist/{chunk-phzs239m.js → chunk-gdxhe7ae.js} +4 -4
  103. package/dist/{chunk-5dmkkvs7.js → chunk-gh0q6jrm.js} +2 -2
  104. package/dist/chunk-h8vk3q9n.js +2 -0
  105. package/dist/{chunk-k7ht6tqe.js → chunk-hq8vxds5.js} +2 -2
  106. package/dist/{chunk-zd01r00t.js → chunk-hqda3vcw.js} +1 -1
  107. package/dist/chunk-j8pamkbh.js +2 -0
  108. package/dist/{chunk-2jjff8kv.js → chunk-jwe7yq8m.js} +5 -5
  109. package/dist/chunk-k5rrp1bt.js +2 -0
  110. package/dist/{chunk-yk3wh2xv.js → chunk-kcq2ed1d.js} +2 -2
  111. package/dist/{chunk-9yar9rfq.js → chunk-ktc1ecsm.js} +1 -1
  112. package/dist/chunk-mfm7ezh6.js +2 -0
  113. package/dist/chunk-mp16jxcg.js +2 -0
  114. package/dist/chunk-myhh1zsm.js +2 -0
  115. package/dist/chunk-n1c9j5qv.js +2 -0
  116. package/dist/{chunk-dcpf6kas.js → chunk-n8hnrgen.js} +6 -6
  117. package/dist/{chunk-36agnyhe.js → chunk-nc0ba89b.js} +6 -6
  118. package/dist/chunk-nf63pk4s.js +2 -0
  119. package/dist/{chunk-1edvsndv.js → chunk-nxw03sy9.js} +2 -2
  120. package/dist/{chunk-jze68d0z.js → chunk-p3xkj7pm.js} +2 -2
  121. package/dist/chunk-p5cry5s7.js +2 -0
  122. package/dist/{chunk-0dz1b6a1.js → chunk-pxk0tpw2.js} +3 -3
  123. package/dist/chunk-qd4snptd.js +2 -0
  124. package/dist/{chunk-h4k3hyny.js → chunk-r5ce7mkg.js} +2 -2
  125. package/dist/chunk-r8qhex33.js +2 -0
  126. package/dist/chunk-rqvn1s52.js +2 -0
  127. package/dist/{chunk-79vdkvhf.js → chunk-sej3ng5k.js} +5 -5
  128. package/dist/chunk-sjsant53.js +2 -0
  129. package/dist/chunk-snzh9z3g.js +3 -0
  130. package/dist/{chunk-ymawe0y5.js → chunk-ss4h5ch3.js} +1 -1
  131. package/dist/{chunk-2crxkm7j.js → chunk-svvavwp2.js} +4 -4
  132. package/dist/{chunk-qt3x1sh3.js → chunk-t79xnvzr.js} +3 -3
  133. package/dist/{chunk-rrj5m9xv.js → chunk-ta50ym5j.js} +2 -2
  134. package/dist/chunk-ty8g61y9.js +2 -0
  135. package/dist/chunk-v1k6w4z5.js +2 -0
  136. package/dist/{chunk-rfnr4xz6.js → chunk-vde4mtfr.js} +2 -2
  137. package/dist/chunk-vm7zv0gc.js +2 -0
  138. package/dist/{chunk-xckzvbvn.js → chunk-vnh550b5.js} +1 -1
  139. package/dist/chunk-vnxc48en.js +2 -0
  140. package/dist/chunk-y7vbwhh7.js +2 -0
  141. package/dist/{chunk-ydx3mfpp.js → chunk-yf90vn5t.js} +6 -6
  142. package/dist/{chunk-6wc2t6cd.js → chunk-yhqhv8mp.js} +13 -13
  143. package/dist/{chunk-s34g3awk.js → chunk-ytf3qkaw.js} +3 -3
  144. package/dist/chunk-yvyypd92.js +2 -0
  145. package/dist/{chunk-c4zpzxex.js → chunk-z33z3rr4.js} +4 -4
  146. package/dist/chunk-zfw39q56.js +2 -0
  147. package/dist/chunk-zpm02e15.js +2 -0
  148. package/dist/chunk-zzr0p4bb.js +2 -0
  149. package/dist/cli.js +18 -18
  150. package/dist/client/directive.d.ts +0 -7
  151. package/dist/client/index.d.ts +1 -0
  152. package/dist/client/signals-appearance-runtime.d.ts +1 -1
  153. package/dist/client/signals-binding-utils-runtime.d.ts +1 -1
  154. package/dist/client/signals-bootstrap-runtime.d.ts +2 -2
  155. package/dist/client/signals-class-runtime.d.ts +1 -1
  156. package/dist/client/signals-component-api-runtime.d.ts +1 -1
  157. package/dist/client/signals-component-hydration-runtime.d.ts +1 -1
  158. package/dist/client/signals-component-props-runtime.d.ts +1 -1
  159. package/dist/client/signals-conditional-chain-runtime.d.ts +1 -1
  160. package/dist/client/signals-conditional-component-runtime.d.ts +1 -1
  161. package/dist/client/signals-container-cleanup-runtime.d.ts +1 -1
  162. package/dist/client/signals-context-runtime.d.ts +1 -1
  163. package/dist/client/signals-cookie-runtime.d.ts +1 -1
  164. package/dist/client/signals-devtools-runtime.d.ts +1 -1
  165. package/dist/client/signals-dialog-runtime.d.ts +1 -1
  166. package/dist/client/signals-dom-ready-runtime.d.ts +1 -1
  167. package/dist/client/signals-drawer-runtime.d.ts +1 -1
  168. package/dist/client/signals-effect-runtime.d.ts +1 -1
  169. package/dist/client/signals-event-shorthand-runtime.d.ts +1 -1
  170. package/dist/client/signals-expression-compiler-runtime.d.ts +1 -1
  171. package/dist/client/signals-expression-runtime.d.ts +1 -1
  172. package/dist/client/signals-fetch-transport-runtime.d.ts +1 -1
  173. package/dist/client/signals-for-runtime.d.ts +1 -1
  174. package/dist/client/signals-globals-runtime.d.ts +1 -1
  175. package/dist/client/signals-handler-runtime.d.ts +1 -1
  176. package/dist/client/signals-head-runtime.d.ts +1 -1
  177. package/dist/client/signals-helpers-runtime.d.ts +1 -1
  178. package/dist/client/signals-host-runtime.d.ts +1 -1
  179. package/dist/client/signals-hydration-audit-runtime.d.ts +1 -1
  180. package/dist/client/signals-hydration-runtime.d.ts +1 -1
  181. package/dist/client/signals-if-chain-runtime.d.ts +1 -1
  182. package/dist/client/signals-if-runtime.d.ts +1 -1
  183. package/dist/client/signals-lazy-hydration-runtime.d.ts +1 -1
  184. package/dist/client/signals-lifecycle-runtime.d.ts +1 -1
  185. package/dist/client/signals-loop-component-remap-runtime.d.ts +1 -1
  186. package/dist/client/signals-loop-conditional-runtime.d.ts +1 -1
  187. package/dist/client/signals-loop-row-runtime.d.ts +1 -1
  188. package/dist/client/signals-manifest-hydration-runtime.d.ts +1 -1
  189. package/dist/client/signals-model-runtime.d.ts +1 -1
  190. package/dist/client/signals-mount-runtime.d.ts +1 -1
  191. package/dist/client/signals-navigation-runtime.d.ts +1 -1
  192. package/dist/client/signals-notify-runtime.d.ts +1 -1
  193. package/dist/client/signals-optimistic-runtime.d.ts +1 -1
  194. package/dist/client/signals-overlay-runtime.d.ts +1 -1
  195. package/dist/client/signals-pipe-runtime.d.ts +1 -1
  196. package/dist/client/signals-proxy-runtime.d.ts +1 -1
  197. package/dist/client/signals-query-runtime.d.ts +1 -1
  198. package/dist/client/signals-reactive-runtime.d.ts +1 -1
  199. package/dist/client/signals-ref-runtime.d.ts +1 -1
  200. package/dist/client/signals-scope-disposal-runtime.d.ts +1 -1
  201. package/dist/client/signals-scope-traversal-runtime.d.ts +1 -1
  202. package/dist/client/signals-show-runtime.d.ts +1 -1
  203. package/dist/client/signals-spa-load-control-runtime.d.ts +1 -1
  204. package/dist/client/signals-spa-load-runtime.d.ts +1 -1
  205. package/dist/client/signals-state-runtime.d.ts +1 -1
  206. package/dist/client/signals-storage-runtime.d.ts +1 -1
  207. package/dist/client/signals-store-registry-runtime.d.ts +1 -1
  208. package/dist/client/signals-style-runtime.d.ts +1 -1
  209. package/dist/client/signals-suspense-runtime.d.ts +1 -1
  210. package/dist/client/signals-timer-runtime.d.ts +1 -1
  211. package/dist/client/signals-toast-runtime.d.ts +1 -1
  212. package/dist/client/signals-tooltip-runtime.d.ts +1 -1
  213. package/dist/client/signals-transition-group-runtime.d.ts +1 -1
  214. package/dist/client/signals-websocket-runtime.d.ts +1 -1
  215. package/dist/client-helpers.d.ts +1 -312
  216. package/dist/client-module-registry.d.ts +4 -27
  217. package/dist/client-parameter-bindings.d.ts +4 -9
  218. package/dist/client-parameter-bindings.js +30 -10
  219. package/dist/client-script-bundler.d.ts +55 -103
  220. package/dist/client-script.d.ts +69 -127
  221. package/dist/client-script.js +4 -7
  222. package/dist/color-mode-boot.d.ts +21 -58
  223. package/dist/component-client-factories.d.ts +8 -9
  224. package/dist/component-contract-checks.d.ts +15 -18
  225. package/dist/component-contract.d.ts +6 -6
  226. package/dist/component-hmr.d.ts +8 -7
  227. package/dist/component-model.d.ts +14 -20
  228. package/dist/component-processing.d.ts +51 -59
  229. package/dist/component-registry.d.ts +28 -99
  230. package/dist/component-renderer.d.ts +19 -16
  231. package/dist/component-resolution.d.ts +8 -8
  232. package/dist/component-tags.d.ts +1 -1
  233. package/dist/composable-loader.d.ts +6 -41
  234. package/dist/composables/use-fetch.d.ts +45 -114
  235. package/dist/composables/use-form.d.ts +2 -56
  236. package/dist/composables/use-intersection-observer.d.ts +1 -1
  237. package/dist/composables.d.ts +75 -74
  238. package/dist/composition-api.d.ts +19 -43
  239. package/dist/computed.d.ts +93 -86
  240. package/dist/conditionals.d.ts +0 -24
  241. package/dist/config.d.ts +30 -24
  242. package/dist/config.js +3 -0
  243. package/dist/craft-bridge.d.ts +1 -467
  244. package/dist/craft-components.d.ts +234 -680
  245. package/dist/craft-entry.js +2 -2
  246. package/dist/craft.js +2 -2
  247. package/dist/csp.d.ts +41 -107
  248. package/dist/database.d.ts +1 -1
  249. package/dist/defer.d.ts +0 -24
  250. package/dist/dev-server/terminal-colors.d.ts +32 -32
  251. package/dist/dev-server/ts-css.d.ts +26 -35
  252. package/dist/dev-server/types.d.ts +33 -29
  253. package/dist/directive-api.d.ts +42 -85
  254. package/dist/directive-arguments.d.ts +14 -39
  255. package/dist/document-shell.d.ts +49 -81
  256. package/dist/dynamic-components.d.ts +0 -9
  257. package/dist/engine-bindings.d.ts +1 -1
  258. package/dist/env.d.ts +26 -0
  259. package/dist/error-boundaries.d.ts +36 -43
  260. package/dist/error-handling.d.ts +1 -1
  261. package/dist/errors/codes.d.ts +43 -51
  262. package/dist/errors/formatter.d.ts +38 -58
  263. package/dist/errors/index.d.ts +61 -5
  264. package/dist/errors/logger.d.ts +40 -114
  265. package/dist/errors/sanitizer.d.ts +28 -53
  266. package/dist/errors/types.d.ts +31 -44
  267. package/dist/events.d.ts +32 -94
  268. package/dist/expressions.d.ts +57 -62
  269. package/dist/find-body-tag.d.ts +5 -34
  270. package/dist/first-script-tag.d.ts +0 -23
  271. package/dist/forms-validation.d.ts +117 -149
  272. package/dist/forms.d.ts +161 -120
  273. package/dist/framework-composables.d.ts +0 -32
  274. package/dist/head-injection.d.ts +30 -32
  275. package/dist/head-keys.d.ts +12 -15
  276. package/dist/head.d.ts +110 -139
  277. package/dist/heatmap.d.ts +76 -152
  278. package/dist/html-masking.d.ts +38 -62
  279. package/dist/hydration-runtime.d.ts +24 -20
  280. package/dist/hydration.d.ts +11 -10
  281. package/dist/i18n.d.ts +34 -95
  282. package/dist/image-optimization/auto-sibling.d.ts +4 -32
  283. package/dist/imported-signals.d.ts +0 -36
  284. package/dist/includes.d.ts +6 -69
  285. package/dist/index.d.ts +2 -1
  286. package/dist/init.d.ts +12 -20
  287. package/dist/internal-markdown.d.ts +8 -12
  288. package/dist/interpolation-context.d.ts +15 -15
  289. package/dist/island-chunking.d.ts +13 -30
  290. package/dist/keep-alive.d.ts +52 -72
  291. package/dist/layout-types.d.ts +2 -27
  292. package/dist/lazy-module.d.ts +0 -10
  293. package/dist/loading-indicator.d.ts +8 -5
  294. package/dist/loop-binding.d.ts +4 -7
  295. package/dist/loops.d.ts +25 -67
  296. package/dist/markdown.d.ts +1 -0
  297. package/dist/media/image/component.d.ts +9 -25
  298. package/dist/media/image/directive.d.ts +1 -15
  299. package/dist/media/image/placeholder.d.ts +9 -20
  300. package/dist/media/image/processor/cache.d.ts +18 -40
  301. package/dist/media/image/processor/index.d.ts +10 -1
  302. package/dist/media/image/processor/optimizer.d.ts +1 -12
  303. package/dist/media/image/processor/responsive.d.ts +6 -16
  304. package/dist/media/image/srcset.d.ts +49 -47
  305. package/dist/media/shared/cache.d.ts +31 -51
  306. package/dist/media/shared/hash.d.ts +0 -7
  307. package/dist/media/types.d.ts +754 -1235
  308. package/dist/media/video/directive.d.ts +1 -15
  309. package/dist/media/video/index.d.ts +17 -39
  310. package/dist/media/video/processor/cache.d.ts +19 -42
  311. package/dist/media/video/processor/index.d.ts +18 -1
  312. package/dist/media/video/processor/streaming.d.ts +10 -17
  313. package/dist/media/video/processor/thumbnail.d.ts +15 -21
  314. package/dist/media/video/processor/transcoder.d.ts +1 -11
  315. package/dist/meta-arguments.d.ts +14 -39
  316. package/dist/method-spoofing.d.ts +0 -7
  317. package/dist/middleware.d.ts +0 -60
  318. package/dist/native/bridge/protocol.d.ts +2 -1
  319. package/dist/native/compiler/headwind-to-style.d.ts +383 -359
  320. package/dist/native/compiler/icons.d.ts +249 -243
  321. package/dist/native/compiler/svg.d.ts +35 -24
  322. package/dist/native/runtime/jsc-globals.d.ts +1 -1
  323. package/dist/native/runtime/native-host.d.ts +1 -1
  324. package/dist/native/runtime/native-host.js +3 -0
  325. package/dist/offline/app-service-worker.d.ts +50 -114
  326. package/dist/offline/kept-store.d.ts +23 -37
  327. package/dist/offline/query-cache.d.ts +55 -126
  328. package/dist/owned-routes.d.ts +0 -31
  329. package/dist/page-response.d.ts +8 -39
  330. package/dist/parser/directive-parser.d.ts +45 -57
  331. package/dist/parser/expression-parser.d.ts +35 -33
  332. package/dist/parser/index.d.ts +39 -4
  333. package/dist/parser/tokenizer.d.ts +49 -61
  334. package/dist/partial-hydration.d.ts +51 -82
  335. package/dist/performance-utils.d.ts +115 -255
  336. package/dist/placeholder.d.ts +9 -18
  337. package/dist/plugin-system.d.ts +115 -264
  338. package/dist/process.d.ts +4 -9
  339. package/dist/process.js +6 -4
  340. package/dist/prop-sentinels.d.ts +11 -11
  341. package/dist/public-env.d.ts +0 -14
  342. package/dist/pwa/directives.d.ts +20 -12
  343. package/dist/pwa/inject.d.ts +0 -10
  344. package/dist/pwa/precache.d.ts +16 -22
  345. package/dist/pwa/service-worker.d.ts +0 -12
  346. package/dist/pwa.js +3 -3
  347. package/dist/reactive-bindings.d.ts +11 -34
  348. package/dist/reactive-tracking.d.ts +0 -36
  349. package/dist/reactive.d.ts +41 -58
  350. package/dist/render-memo.d.ts +5 -23
  351. package/dist/resolve-stx-targets.d.ts +6 -44
  352. package/dist/route-middleware.d.ts +35 -2
  353. package/dist/route-rules.d.ts +10 -13
  354. package/dist/router.d.ts +9 -8
  355. package/dist/routes.d.ts +3 -1
  356. package/dist/runtime-config-server.d.ts +14 -17
  357. package/dist/runtime-config.d.ts +2 -3
  358. package/dist/runtime-globals.d.ts +90 -122
  359. package/dist/runtime-injection.d.ts +0 -8
  360. package/dist/scaffolding.d.ts +30 -26
  361. package/dist/script-emit.d.ts +0 -30
  362. package/dist/script-validation.d.ts +6 -12
  363. package/dist/seo.d.ts +75 -153
  364. package/dist/server-api.d.ts +9 -12
  365. package/dist/server-bindings.d.ts +1 -26
  366. package/dist/server-data.d.ts +4 -5
  367. package/dist/sfc-template.d.ts +8 -8
  368. package/dist/signal-processing.d.ts +37 -53
  369. package/dist/signals-api.d.ts +58 -135
  370. package/dist/signals.d.ts +18 -24
  371. package/dist/site-url.d.ts +31 -28
  372. package/dist/slots.d.ts +20 -86
  373. package/dist/source-signature.d.ts +5 -28
  374. package/dist/ssg.d.ts +158 -337
  375. package/dist/ssg.js +4 -4
  376. package/dist/state-dir.d.ts +4 -4
  377. package/dist/store-loader.d.ts +0 -10
  378. package/dist/story/analytics.d.ts +60 -138
  379. package/dist/story/bookmarks.d.ts +34 -87
  380. package/dist/story/cli.d.ts +69 -123
  381. package/dist/story/collect/scanner.d.ts +0 -4
  382. package/dist/story/collect/tree.d.ts +1 -8
  383. package/dist/story/commands/build.d.ts +6 -11
  384. package/dist/story/commands/dev.d.ts +8 -15
  385. package/dist/story/commands/preview.d.ts +7 -13
  386. package/dist/story/config-watcher.d.ts +13 -20
  387. package/dist/story/config.d.ts +8 -11
  388. package/dist/story/context.d.ts +8 -14
  389. package/dist/story/hmr.d.ts +26 -24
  390. package/dist/story/hot-swap.d.ts +23 -34
  391. package/dist/story/keyboard-shortcuts.d.ts +18 -23
  392. package/dist/story/output.d.ts +44 -46
  393. package/dist/story/performance.d.ts +45 -107
  394. package/dist/story/presets.d.ts +41 -107
  395. package/dist/story/renderer.d.ts +27 -41
  396. package/dist/story/search.d.ts +12 -23
  397. package/dist/story/server.d.ts +11 -21
  398. package/dist/story/setup.d.ts +15 -23
  399. package/dist/story/testing.d.ts +40 -65
  400. package/dist/story/types.d.ts +160 -262
  401. package/dist/streaming.d.ts +57 -119
  402. package/dist/strip-literals.d.ts +1 -25
  403. package/dist/stx-module-imports.d.ts +7 -0
  404. package/dist/stx-virtual-ts.d.ts +102 -253
  405. package/dist/stx-virtual-ts.js +5 -4
  406. package/dist/style-scoping.d.ts +8 -21
  407. package/dist/suspense.d.ts +52 -67
  408. package/dist/teleport.d.ts +0 -22
  409. package/dist/template-syntax-escape.d.ts +8 -8
  410. package/dist/template-tag-balance.d.ts +6 -22
  411. package/dist/testing.d.ts +26 -11
  412. package/dist/theme-tokens.d.ts +388 -134
  413. package/dist/transitions.d.ts +55 -66
  414. package/dist/ts-css-config.d.ts +12 -70
  415. package/dist/types/component-types.d.ts +122 -187
  416. package/dist/types/config-types.d.ts +341 -956
  417. package/dist/types/context-types.d.ts +24 -46
  418. package/dist/types/csp-types.d.ts +66 -70
  419. package/dist/types/directive-types.d.ts +156 -223
  420. package/dist/types/index.d.ts +110 -6
  421. package/dist/types/pwa-types.d.ts +148 -273
  422. package/dist/types.d.ts +1 -0
  423. package/dist/unresolved-identifiers.d.ts +22 -24
  424. package/dist/url-safety.d.ts +32 -32
  425. package/dist/utils.d.ts +21 -36
  426. package/dist/utils.js +6 -2
  427. package/dist/validator.d.ts +26 -28
  428. package/dist/variable-extractor.d.ts +19 -49
  429. package/dist/view-composers.d.ts +81 -80
  430. package/dist/virtual-scrolling.d.ts +82 -101
  431. package/dist/visual-testing.d.ts +10 -9
  432. package/dist/vue-template.d.ts +0 -23
  433. package/dist/web-components/css-scoping.d.ts +11 -21
  434. package/dist/web-components.d.ts +58 -81
  435. package/dist/x-element.d.ts +1 -0
  436. package/package.json +6 -6
  437. package/stx.d.ts +2 -2
  438. package/dist/app-service-worker.d.ts +0 -165
  439. package/dist/chunk-01mxer9s.js +0 -2
  440. package/dist/chunk-09gtbb1w.js +0 -2
  441. package/dist/chunk-0g2ybnht.js +0 -3
  442. package/dist/chunk-15erabm6.js +0 -2
  443. package/dist/chunk-1z6c6dyk.js +0 -2
  444. package/dist/chunk-1zfg1kd5.js +0 -2
  445. package/dist/chunk-279jv0yf.js +0 -2
  446. package/dist/chunk-2a1q5y6r.js +0 -2
  447. package/dist/chunk-2cqbyb8w.js +0 -2
  448. package/dist/chunk-2jsnrfc8.js +0 -2
  449. package/dist/chunk-3gft8zng.js +0 -2
  450. package/dist/chunk-49gwmcrn.js +0 -2
  451. package/dist/chunk-4wfr074d.js +0 -2
  452. package/dist/chunk-5afw7z6v.js +0 -2
  453. package/dist/chunk-5fv4g4et.js +0 -2
  454. package/dist/chunk-604rs9sq.js +0 -2
  455. package/dist/chunk-636sfxyj.js +0 -2
  456. package/dist/chunk-6f4qrd0s.js +0 -2
  457. package/dist/chunk-6va5pe2m.js +0 -2
  458. package/dist/chunk-8k61b4ae.js +0 -2
  459. package/dist/chunk-asbq9cgs.js +0 -2
  460. package/dist/chunk-b7t8jejd.js +0 -2
  461. package/dist/chunk-b894fxfc.js +0 -2
  462. package/dist/chunk-bm2q1srp.js +0 -2
  463. package/dist/chunk-cgwyd9aq.js +0 -2
  464. package/dist/chunk-cvswrbzw.js +0 -2
  465. package/dist/chunk-d8206zbp.js +0 -2
  466. package/dist/chunk-f10299sf.js +0 -2
  467. package/dist/chunk-f1apaqfk.js +0 -2
  468. package/dist/chunk-g6zeqvvb.js +0 -2
  469. package/dist/chunk-ghy82tsc.js +0 -2
  470. package/dist/chunk-jw33eys8.js +0 -2
  471. package/dist/chunk-k6wgh598.js +0 -2
  472. package/dist/chunk-m2a1fxpb.js +0 -2
  473. package/dist/chunk-m6mxqepz.js +0 -2
  474. package/dist/chunk-n6qp05t9.js +0 -2
  475. package/dist/chunk-nn174xjh.js +0 -2
  476. package/dist/chunk-ntgy4e1q.js +0 -2
  477. package/dist/chunk-nw4axkpx.js +0 -2
  478. package/dist/chunk-p5chk3s9.js +0 -2
  479. package/dist/chunk-pw9verqx.js +0 -2
  480. package/dist/chunk-ta8bhz27.js +0 -2
  481. package/dist/chunk-tc5r2vmw.js +0 -2
  482. package/dist/chunk-ts80ktq7.js +0 -2
  483. package/dist/chunk-vyg8bvkt.js +0 -2
  484. package/dist/chunk-xq2ck69k.js +0 -2
  485. package/dist/chunk-y4ajd836.js +0 -2
  486. package/dist/chunk-zddzjd60.js +0 -2
  487. package/dist/chunk-zgxj1q7w.js +0 -2
  488. package/dist/chunk-zs7qhh40.js +0 -2
  489. package/dist/signals-context-runtime.d.ts +0 -2
  490. package/dist/signals-drawer-runtime.d.ts +0 -2
  491. package/dist/signals-host-runtime.d.ts +0 -9
  492. package/dist/signals-loop-conditional-runtime.d.ts +0 -2
  493. package/dist/signals-manifest-hydration-runtime.d.ts +0 -2
  494. package/dist/signals-notify-runtime.d.ts +0 -2
  495. package/dist/signals-optimistic-runtime.d.ts +0 -2
  496. package/dist/signals-overlay-runtime.d.ts +0 -2
  497. package/dist/signals-scope-disposal-runtime.d.ts +0 -2
  498. package/dist/signals-spa-load-control-runtime.d.ts +0 -2
  499. package/dist/signals-storage-runtime.d.ts +0 -2
@@ -1,49 +1,12 @@
1
- /**
2
- * Client Script Bundler
3
- *
4
- * Uses Bun.build to resolve and bundle imports in `<script client>` blocks.
5
- * Only activates when real user imports are detected (local files, npm packages).
6
- * stx runtime, @stores, and @composables are marked as external — handled
7
- * by existing auto-import and store-import transforms.
8
- *
9
- * @module client-script-bundler
10
- */
11
1
  import type { BuildFailureDetail } from './build-message';
12
2
  export declare function clientBundleDependencies(filePath: string): string[];
13
- export declare function shouldLogBundlerDiagnostics(environment?: {
14
- STX_DEBUG?: string;
15
- }): boolean;
16
- /**
17
- * Client-script bundle failures recorded during the current process.
18
- *
19
- * When a `<script client>` block fails to bundle, the bundler falls back to
20
- * shipping the ORIGINAL, unbundled source so the page still renders. That is a
21
- * reasonable dev-server behaviour and a terrible build behaviour: imports never
22
- * resolve, bindings silently do nothing, and `stx build` still exited 0, so CI
23
- * published a broken page as a success.
24
- *
25
- * Nothing was counting these. `ssg.failedCount` only ever saw render-time throws,
26
- * never a bundle failure, because the fallback swallowed it and returned a
27
- * string. The registry gives the build a way to ask, without the bundler having
28
- * to know whether it is running under a dev server or a build. See #1884.
29
- */
30
- export interface BundleFailure {
31
- filePath: string;
32
- message: string;
33
- /**
34
- * The same failure with its position intact, for a dev-server overlay to
35
- * draw a code frame from. Absent only when the thrower gave no position.
36
- */
37
- details?: BuildFailureDetail[];
38
- }
3
+ export declare function shouldLogBundlerDiagnostics(environment?: { STX_DEBUG?: string }): boolean;
39
4
  /** Record a bundle failure. Called from the bundler's fallback path. */
40
5
  export declare function recordBundleFailure(filePath: string, message: string, details?: BuildFailureDetail[]): void;
41
6
  /** Every bundle failure since the last reset. */
42
7
  export declare function getBundleFailures(): BundleFailure[];
43
8
  /** Drop recorded failures — call at the start of a build, and in tests. */
44
9
  export declare function clearBundleFailures(): void;
45
- /** What to do when a client script will not bundle. */
46
- export type BundlerFallbackMode = 'warn' | 'error';
47
10
  /**
48
11
  * Override the configured fallback mode, for tests and embedders.
49
12
  *
@@ -69,27 +32,6 @@ export declare function resolveBundlerFallback(): BundlerFallbackMode;
69
32
  * - `import { ... } from '@composables'` (handled by transformStoreImports)
70
33
  */
71
34
  export declare function hasUserImports(code: string): boolean;
72
- /**
73
- * Specifier prefix for an import the PAGE serves rather than the bundle
74
- * inlines (stacksjs/stx#1957).
75
- *
76
- * Every component's `<script client>` used to be bundled with its imports
77
- * inlined, one Bun.build per script. Two components importing one module each
78
- * carried their own copy of it, so module state -- a cache, a registry, an
79
- * in-flight promise -- existed once per component instead of once per page,
80
- * and the page shipped the same code several times. A real page made five
81
- * `GET /api/me` calls on load because its auth module had five copies.
82
- *
83
- * A component's direct imports are now externalised to `stx-module:<id>` and
84
- * rewritten into reads of `globalThis.__stxModules`, which one page-level
85
- * bundle populates (see client-module-registry.ts): each imported module is
86
- * bundled once and evaluated once per page.
87
- *
88
- * The id is the path relative to the project root, or `npm:<specifier>` for a
89
- * package. Never an absolute path: that would put the server's filesystem
90
- * layout into every page's HTML.
91
- */
92
- export declare const MODULE_SPECIFIER_PREFIX = "stx-module:";
93
35
  export declare function registryIdForPath(projectRoot: string, resolved: string): string;
94
36
  /**
95
37
  * Put the `stx-module:` specifier back on imports Bun printed with the one the
@@ -135,53 +77,63 @@ export declare function rewriteRegistryImports(code: string, reads: string[]): s
135
77
  */
136
78
  export declare function queueClientBundleBuild<T>(task: () => Promise<T>): Promise<T>;
137
79
  export declare function bundleClientScript(code: string, filePath: string, options?: {
138
- projectRoot?: string;
139
- minify?: boolean;
140
- cacheDir?: string;
141
- /**
142
- * Receives the files this bundle was built from, for a caller that needs
143
- * them for its own cache key.
144
- *
145
- * `clientBundleDependencies()` answers the same question from a map keyed
146
- * by host file path, which is only correct while calls for one host are
147
- * serialized. They are not: a component with two bundling `<script client>`
148
- * blocks builds them under one `Promise.all`, so the second call's
149
- * `recordBundleInputs` can land between the first's await and its read, and
150
- * the first caller gets the second's file list. That map is a
151
- * process-global keyed on the host, so it cannot distinguish them; this
152
- * hands each caller its own answer.
153
- */
154
- collectInputs?: string[];
155
- /**
156
- * Serve the script's own imports from the page registry instead of
157
- * inlining them (#1957). Default true; the registry's own build turns it
158
- * off, since that bundle is where the modules are actually inlined.
159
- */
160
- externalizeUserModules?: boolean;
161
- /**
162
- * Re-expose only these names outside the bundle's closure. By default every
163
- * top-level binding of the script comes back, imports included, because a
164
- * page's template reads whatever its script declared. A composable is
165
- * concatenated with the others into one scope instead, and publishes only
166
- * its exports: re-declaring a name it merely imported collided with the
167
- * composable that owns it (`var X` here, `const X` there, a SyntaxError
168
- * that took every composable on the page down).
169
- */
170
- expose?: readonly string[];
171
- /**
172
- * Throw on a failed build instead of returning the script unbundled.
173
- *
174
- * The unbundled fallback keeps a dev server usable for a page's own
175
- * script. It is no use to a caller whose source is nothing BUT imports -
176
- * the page registry's entry is `import * as m from '...'` lines that only
177
- * mean something once bundled, so falling back shipped them inside an IIFE,
178
- * a SyntaxError, and the build error never reached the browser.
179
- */
180
- throwOnFailure?: boolean;
181
- }): Promise<string>;
80
+ projectRoot?: string
81
+ minify?: boolean
82
+ cacheDir?: string
83
+
84
+ collectInputs?: string[]
85
+
86
+ externalizeUserModules?: boolean
87
+
88
+ expose?: readonly string[]
89
+
90
+ throwOnFailure?: boolean
91
+ }): Promise<string>;
182
92
  /**
183
93
  * The name one build's temp entry and output directory go by: the script's
184
94
  * hash, this process and a count, so no other build — here or in another dev
185
95
  * server on the same checkout — shares them. See where they are made.
186
96
  */
187
97
  export declare function tempBuildName(hash: string): string;
98
+ /**
99
+ * Specifier prefix for an import the PAGE serves rather than the bundle
100
+ * inlines (stacksjs/stx#1957).
101
+ *
102
+ * Every component's `<script client>` used to be bundled with its imports
103
+ * inlined, one Bun.build per script. Two components importing one module each
104
+ * carried their own copy of it, so module state -- a cache, a registry, an
105
+ * in-flight promise -- existed once per component instead of once per page,
106
+ * and the page shipped the same code several times. A real page made five
107
+ * `GET /api/me` calls on load because its auth module had five copies.
108
+ *
109
+ * A component's direct imports are now externalised to `stx-module:<id>` and
110
+ * rewritten into reads of `globalThis.__stxModules`, which one page-level
111
+ * bundle populates (see client-module-registry.ts): each imported module is
112
+ * bundled once and evaluated once per page.
113
+ *
114
+ * The id is the path relative to the project root, or `npm:<specifier>` for a
115
+ * package. Never an absolute path: that would put the server's filesystem
116
+ * layout into every page's HTML.
117
+ */
118
+ export declare const MODULE_SPECIFIER_PREFIX: 'stx-module:';
119
+ /**
120
+ * Client-script bundle failures recorded during the current process.
121
+ *
122
+ * When a `<script client>` block fails to bundle, the bundler falls back to
123
+ * shipping the ORIGINAL, unbundled source so the page still renders. That is a
124
+ * reasonable dev-server behaviour and a terrible build behaviour: imports never
125
+ * resolve, bindings silently do nothing, and `stx build` still exited 0, so CI
126
+ * published a broken page as a success.
127
+ *
128
+ * Nothing was counting these. `ssg.failedCount` only ever saw render-time throws,
129
+ * never a bundle failure, because the fallback swallowed it and returned a
130
+ * string. The registry gives the build a way to ask, without the bundler having
131
+ * to know whether it is running under a dev server or a build. See #1884.
132
+ */
133
+ export declare interface BundleFailure {
134
+ filePath: string
135
+ message: string
136
+ details?: BuildFailureDetail[]
137
+ }
138
+ /** What to do when a client script will not bundle. */
139
+ export type BundlerFallbackMode = 'warn' | 'error';
@@ -1,46 +1,6 @@
1
- /**
2
- * Client Script Processor
3
- *
4
- * Transforms <script client> blocks in SFC (.stx) components:
5
- * 1. Auto-imports from 'stx' and '@stacksjs/browser' (no import statements needed)
6
- * 2. Resolves `import { store } from '@stores'` to runtime store access
7
- * 3. Transpiles TypeScript to JavaScript (strips type annotations, interfaces, import type)
8
- * 4. Injects event binding code (from @click, @input, etc.) into the script scope
9
- * 5. Auto-wraps in a scoped IIFE for isolation
10
- *
11
- * This enables clean component authoring:
12
- * ```stx
13
- * <template>
14
- * <button @click="handleClick()">Count: {{ count() }}</button>
15
- * </template>
16
- *
17
- * <script>
18
- * // No imports needed! state, onMount, Trail, etc. are auto-imported
19
- * const count = state(0)
20
- *
21
- * onMount(async () => {
22
- * const trails = await Trail.all()
23
- * console.log(trails)
24
- * })
25
- *
26
- * function handleClick() {
27
- * count.set(count() + 1)
28
- * }
29
- * </script>
30
- * ```
31
- *
32
- * @module client-script
33
- */
1
+ import { BROWSER_CORE_IMPORTS } from './browser-core-imports';
2
+ import { findInterpolationEnd, stripCommentsAndLiterals } from './strip-literals';
34
3
  import type { ParsedEvent } from './events';
35
- export { findInterpolationEnd, stripCommentsAndLiterals } from './strip-literals';
36
- export interface VendorCssImport {
37
- /** The original specifier as written in the import — kept verbatim for the data attribute. */
38
- source: string;
39
- /** The resolved absolute filesystem path — used for dedupe and reads. */
40
- resolvedPath: string;
41
- /** The CSS file contents at build time. */
42
- contents: string;
43
- }
44
4
  /**
45
5
  * Strip side-effect `.css` imports from a `<script client>` body and read
46
6
  * their contents off disk.
@@ -63,14 +23,7 @@ export interface VendorCssImport {
63
23
  * call. Cross-component dedupe still relies on the caller's HTML response
64
24
  * (CSS rules collapse harmlessly at the browser level either way).
65
25
  */
66
- export declare function extractAndStripCssImports(code: string, options: {
67
- filePath?: string;
68
- projectRoot?: string;
69
- }): {
70
- code: string;
71
- styles: VendorCssImport[];
72
- unresolved: string[];
73
- };
26
+ export declare function extractAndStripCssImports(code: string, options: { filePath?: string, projectRoot?: string }): { code: string, styles: VendorCssImport[], unresolved: string[] };
74
27
  /**
75
28
  * Render collected vendor CSS as one `<style>` tag per resolved source,
76
29
  * each wrapped in `@layer vendor { … }` so the styles can never out-specificity
@@ -82,84 +35,7 @@ export declare function extractAndStripCssImports(code: string, options: {
82
35
  * below un-layered rules, so vendor styles default to lowest precedence.
83
36
  */
84
37
  export declare function renderVendorStyleTags(styles: VendorCssImport[]): string;
85
- /**
86
- * Exports from 'stx' auto-imported into classic `<script>` / `<script client>`
87
- * blocks.
88
- *
89
- * Derived from {@link STX_RUNTIME_GLOBALS} rather than hand-maintained (#1804).
90
- * This was a separate 82-name literal, and it had drifted: 16 of those names
91
- * were not on `window.stx` at all. Because the generated prologue destructures
92
- * (`var { … } = window.stx`), a missing name is not an error — it binds
93
- * `undefined`, and the author sees "undefined is not a function" at the call
94
- * site with nothing naming the identifier or saying why. `provide` worked and
95
- * `inject` did not; `onMounted` worked and `onUpdated` did not.
96
- *
97
- * Five of the 16 (`isDerived`, `inject`, `useSlots`, `watchMultiple`,
98
- * `onBeforeMount`) are now implemented in the runtime and live in the shared
99
- * list. The remaining 11 are server- or compile-time only — `h` and `Fragment`
100
- * belong to the JSX runtime, `useMeta`/`getCurrentInstance`/`useAttrs`/
101
- * `onErrorCaptured`/`onBeforeUpdate`/`onUpdated`/`createStore`/`createSelector`
102
- * are module exports with no client counterpart, and `action` has no
103
- * implementation anywhere — so they are no longer offered. A `ReferenceError`
104
- * naming the identifier beats a silent `undefined`.
105
- */
106
- export declare const STX_AUTO_IMPORTS: readonly string[];
107
- /**
108
- * Core exports from '@stacksjs/browser' that are auto-imported.
109
- * App-specific models are detected dynamically (PascalCase identifiers
110
- * used with query methods like .all(), .find(), .where(), etc.)
111
- */
112
- export { BROWSER_CORE_IMPORTS } from './browser-core-imports';
113
- export interface BrowserCoreAutoImportResult {
114
- code: string;
115
- imports: string[];
116
- models: string[];
117
- }
118
38
  export declare function injectBrowserCoreAutoImports(code: string): BrowserCoreAutoImportResult;
119
- export interface ClientScriptOptions {
120
- /** Event bindings collected from template @event attributes */
121
- eventBindings?: ParsedEvent[];
122
- /** Whether to enable auto-imports (default: true) */
123
- autoImports?: boolean;
124
- /** Original script tag attributes (e.g., 'type="module"') */
125
- attrs?: string;
126
- /** Whether the component template contains : prefix directives */
127
- hasColonDirectives?: boolean;
128
- /** Template HTML content for auto-binding analysis (Phase 2: auto-detect which scripts need stx.mount()) */
129
- templateContent?: string;
130
- /** File path of the template (for relative import resolution in bundler) */
131
- filePath?: string;
132
- /** Project root directory (for @/ path resolution in bundler) */
133
- projectRoot?: string;
134
- /** Whether this is a production build (enables minification in bundler) */
135
- production?: boolean;
136
- /**
137
- * Server → client data bridge. Top-level `<script server>` variables (and
138
- * other template-context values) made available to `<script client>` code:
139
- * any JSON-serializable value referenced — but not redeclared — by the client
140
- * script is serialized into the client bundle, so reactive state can be seeded
141
- * from build-time data (e.g. `const items = state(serverItems)`) without a
142
- * round-trip fetch. Functions/non-serializable values are skipped.
143
- */
144
- serverData?: Record<string, unknown>;
145
- /**
146
- * The component instance this script sets up, stamped on the emitted tag as
147
- * data-stx-instance (#1958). Passed only by the component renderer, for a
148
- * component with no scope root: a component with one names it in
149
- * data-stx-owner instead. A page's own script runs on every navigation, so
150
- * it is never stamped.
151
- *
152
- * Outside the router's container the stamp marks the script as part of the
153
- * layout's chrome, whose instance a same-layout navigation leaves running:
154
- * fragments leave it out, and the router's full-document path skips it.
155
- */
156
- instanceId?: string;
157
- }
158
- interface AutoImportResult {
159
- code: string;
160
- stxImports: string[];
161
- browserImports: string[];
162
- }
163
39
  export declare function transformAutoImports(code: string): AutoImportResult;
164
40
  /**
165
41
  * Whether `name` is used as a binding in `code`: not a property of something
@@ -216,3 +92,69 @@ export declare function generateServerDataBridge(code: string, serverData?: Reco
216
92
  * @returns A complete `<script>...</script>` tag ready for browser injection
217
93
  */
218
94
  export declare function processClientScript(scriptContent: string, options?: ClientScriptOptions): Promise<string>;
95
+ /**
96
+ * Exports from 'stx' auto-imported into classic `<script>` / `<script client>`
97
+ * blocks.
98
+ *
99
+ * Derived from {@link STX_RUNTIME_GLOBALS} rather than hand-maintained (#1804).
100
+ * This was a separate 82-name literal, and it had drifted: 16 of those names
101
+ * were not on `window.stx` at all. Because the generated prologue destructures
102
+ * (`var { … } = window.stx`), a missing name is not an error — it binds
103
+ * `undefined`, and the author sees "undefined is not a function" at the call
104
+ * site with nothing naming the identifier or saying why. `provide` worked and
105
+ * `inject` did not; `onMounted` worked and `onUpdated` did not.
106
+ *
107
+ * Five of the 16 (`isDerived`, `inject`, `useSlots`, `watchMultiple`,
108
+ * `onBeforeMount`) are now implemented in the runtime and live in the shared
109
+ * list. The remaining 11 are server- or compile-time only — `h` and `Fragment`
110
+ * belong to the JSX runtime, `useMeta`/`getCurrentInstance`/`useAttrs`/
111
+ * `onErrorCaptured`/`onBeforeUpdate`/`onUpdated`/`createStore`/`createSelector`
112
+ * are module exports with no client counterpart, and `action` has no
113
+ * implementation anywhere — so they are no longer offered. A `ReferenceError`
114
+ * naming the identifier beats a silent `undefined`.
115
+ */
116
+ export declare const STX_AUTO_IMPORTS: readonly string[];
117
+ export declare interface VendorCssImport {
118
+ source: string
119
+ resolvedPath: string
120
+ contents: string
121
+ }
122
+ export declare interface BrowserCoreAutoImportResult {
123
+ code: string
124
+ imports: string[]
125
+ models: string[]
126
+ }
127
+ // =============================================================================
128
+ // Types
129
+ // =============================================================================
130
+ export declare interface ClientScriptOptions {
131
+ eventBindings?: ParsedEvent[]
132
+ autoImports?: boolean
133
+ attrs?: string
134
+ hasColonDirectives?: boolean
135
+ templateContent?: string
136
+ filePath?: string
137
+ projectRoot?: string
138
+ production?: boolean
139
+ serverData?: Record<string, unknown>
140
+ instanceId?: string
141
+ }
142
+ // =============================================================================
143
+ // Auto-Import Transformation
144
+ // =============================================================================
145
+ declare interface AutoImportResult {
146
+ code: string
147
+ stxImports: string[]
148
+ browserImports: string[]
149
+ }
150
+ // Re-exported from its old home. It moved to `strip-literals.ts` so the
151
+ // editor-facing extractor could share it without pulling the bundler in behind
152
+ // it, and the runtime bridge and `stx typecheck` MUST agree on what counts as a
153
+ // reference (#1868 ask 4). Anything importing it from here keeps working.
154
+ export { findInterpolationEnd, stripCommentsAndLiterals } from './strip-literals';
155
+ /**
156
+ * Core exports from '@stacksjs/browser' that are auto-imported.
157
+ * App-specific models are detected dynamically (PascalCase identifiers
158
+ * used with query methods like .all(), .find(), .where(), etc.)
159
+ */
160
+ export { BROWSER_CORE_IMPORTS } from './browser-core-imports';
@@ -3,7 +3,7 @@ import fs from "node:fs";
3
3
  import { asInvocableStatement, listensPassively } from "./events.js";
4
4
  import { transformStoreImports } from "./store-imports.js";
5
5
  import { declaresClientIdentifier } from "./client-declarations.js";
6
- import { declaredNames, parameterAnalysis } from "./client-parameter-bindings.js";
6
+ import { declaredNames, parameterAnalysis, unboundNames } from "./client-parameter-bindings.js";
7
7
  import { findInterpolationEnd, stripCommentsAndLiterals } from "./strip-literals.js";
8
8
  export { findInterpolationEnd, stripCommentsAndLiterals } from "./strip-literals.js";
9
9
  import { shouldTranspileTypeScript, transpileTypeScript } from "./utils.js";
@@ -447,9 +447,6 @@ export function extractBridgeData(context) {
447
447
  }
448
448
  return out;
449
449
  }
450
- function referencesIdentifier(searchable, name) {
451
- return new RegExp(`(?<![.#\\w$])${name}(?![\\w$])`).test(searchable);
452
- }
453
450
  const CREDENTIAL_NAME = /token|secret|passw|apikey|api_key|privatekey|private_key|credential|webhook|bearer|jwt|signature/i, warnedBridgeKeys = new Set;
454
451
  function warnAboutBridgedValue(name, json) {
455
452
  const credential = CREDENTIAL_NAME.test(name), oversized = json.length > 32768;
@@ -466,13 +463,13 @@ function warnAboutBridgedValue(name, json) {
466
463
  export function generateServerDataBridge(code, serverData) {
467
464
  if (!serverData)
468
465
  return "";
469
- const searchable = stripCommentsAndLiterals(code), declaredPayload = serverData.__stxDeclaredPayload === !0, lines = [];
470
- for (const [name, value] of Object.entries(serverData)) {
466
+ const referenced = unboundNames(code, new Set(Object.keys(serverData))), declaredPayload = serverData.__stxDeclaredPayload === !0, lines = [], entries = Object.entries(serverData).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
467
+ for (const [name, value] of entries) {
471
468
  if (!/^[A-Za-z_$][\w$]*$/.test(name))
472
469
  continue;
473
470
  if (name.startsWith("__") || name.startsWith("$"))
474
471
  continue;
475
- if (!declaredPayload && !referencesIdentifier(searchable, name))
472
+ if (!declaredPayload && !referenced.has(name))
476
473
  continue;
477
474
  if (declaresClientIdentifier(code, name)) {
478
475
  if (declaredPayload)
@@ -1,61 +1,3 @@
1
- /** Marker attribute — makes injection idempotent and findable by tests. */
2
- export declare const COLOR_MODE_BOOT_MARKER = "data-stx-color-mode-boot";
3
- /** The global the boot script publishes its resolved config on. */
4
- export declare const COLOR_MODE_BOOT_GLOBAL = "__STX_COLOR_MODE__";
5
- export type ColorModeBootMode = 'light' | 'dark' | 'auto' | 'system';
6
- /** Spelling written to storage for "follow the system". */
7
- export type ColorModeBootAutoValue = 'auto' | 'system';
8
- /**
9
- * Pre-paint options. A strict subset of `ColorModeOptions` — only the fields
10
- * that affect what lands on the root element before paint. `disableTransitions`
11
- * is deliberately absent: nothing has painted yet, so there is no transition to
12
- * suppress, and forcing a reflow in the critical path would only cost time.
13
- */
14
- export interface ColorModeBootConfig {
15
- /** localStorage key holding the preference. @default 'stx-color-mode' */
16
- storageKey?: string;
17
- /**
18
- * Mode used when nothing valid is stored. @default 'auto'
19
- * `'system'` is accepted as an alias for `'auto'`.
20
- */
21
- initialMode?: ColorModeBootMode;
22
- /**
23
- * Class applied to `<html>` when dark. @default 'dark'
24
- * Pass `null` to opt out — the attribute alone then carries the mode.
25
- */
26
- darkClass?: string | null;
27
- /**
28
- * Attribute set to the resolved mode on `<html>`, e.g. `'data-theme'`.
29
- * Applied *alongside* `darkClass`, mirroring `useColorMode` (#1788).
30
- */
31
- attribute?: string | null;
32
- /**
33
- * Spelling `useColorMode` writes back for "follow the system". Published to
34
- * the client so the composable doesn't convert an app's existing `'system'`
35
- * key to `'auto'`. @default whatever is stored, else 'auto'
36
- */
37
- autoValue?: ColorModeBootAutoValue;
38
- /**
39
- * Leave `attribute` alone when it already carries a concrete mode, and
40
- * render that instead of the visitor's stored preference. @default false
41
- *
42
- * For a page whose theme is not the visitor's to choose: a public status
43
- * page whose owner forces light or dark for everyone, stamped server-side
44
- * during render. Without this the boot script computes from storage and
45
- * stamps unconditionally, so a visitor who had browsed in dark saw the
46
- * forced-light page in dark (stacksjs/stx#2050).
47
- *
48
- * Only `'light'` and `'dark'` count as concrete. `'auto'` and `'system'`
49
- * are instructions to resolve, not answers, so they are ignored here and
50
- * the stored preference wins as usual.
51
- *
52
- * The adopted value is published as `forced` on the boot global, because
53
- * once this script has stamped the attribute nothing downstream can tell a
54
- * forced value from a computed one by looking at the DOM. `useColorMode`
55
- * reads it and renders it over its own resolution.
56
- */
57
- respectExisting?: boolean;
58
- }
59
1
  /**
60
2
  * Build the synchronous pre-paint `<script>`.
61
3
  *
@@ -110,3 +52,24 @@ export declare function normalizeCriticalHeadOrder(html: string): string;
110
52
  * A no-op when the document has no boot script or it is already in place.
111
53
  */
112
54
  export declare function hoistColorModeBootScript(html: string): string;
55
+ /** Marker attribute — makes injection idempotent and findable by tests. */
56
+ export declare const COLOR_MODE_BOOT_MARKER: 'data-stx-color-mode-boot';
57
+ /** The global the boot script publishes its resolved config on. */
58
+ export declare const COLOR_MODE_BOOT_GLOBAL: '__STX_COLOR_MODE__';
59
+ /**
60
+ * Pre-paint options. A strict subset of `ColorModeOptions` — only the fields
61
+ * that affect what lands on the root element before paint. `disableTransitions`
62
+ * is deliberately absent: nothing has painted yet, so there is no transition to
63
+ * suppress, and forcing a reflow in the critical path would only cost time.
64
+ */
65
+ export declare interface ColorModeBootConfig {
66
+ storageKey?: string
67
+ initialMode?: ColorModeBootMode
68
+ darkClass?: string | null
69
+ attribute?: string | null
70
+ autoValue?: ColorModeBootAutoValue
71
+ respectExisting?: boolean
72
+ }
73
+ export type ColorModeBootMode = 'light' | 'dark' | 'auto' | 'system';
74
+ /** Spelling written to storage for "follow the system". */
75
+ export type ColorModeBootAutoValue = 'auto' | 'system';
@@ -1,4 +1,3 @@
1
- export declare const COMPONENT_CLIENT_FACTORIES_CONTEXT_KEY = "__stx_component_client_factories";
2
1
  export declare function initializeComponentClientFactories(context: Record<string, unknown>): void;
3
2
  export declare function registerComponentClientFactory(context: Record<string, unknown>, factoryBody: string): string | null;
4
3
  export declare function injectComponentClientFactories(html: string, context: Record<string, unknown>): string;
@@ -22,12 +21,12 @@ export declare function injectComponentClientFactories(html: string, context: Re
22
21
  */
23
22
  export declare function snapshotComponentClientFactoryCounts(context: Record<string, unknown>): Map<string, number>;
24
23
  /** The factories registered since `before`, with how many instances each gained. */
25
- export declare function componentClientFactoriesRegisteredSince(context: Record<string, unknown>, before: Map<string, number>): Array<{
26
- body: string;
27
- count: number;
28
- }>;
24
+ export declare function componentClientFactoriesRegisteredSince(context: Record<string, unknown>, before: Map<string, number>): Array<{ body: string, count: number }>;
29
25
  /** Re-register what a cached render registered, so the instance counts match. */
30
- export declare function replayComponentClientFactories(context: Record<string, unknown>, registered: Array<{
31
- body: string;
32
- count: number;
33
- }>): void;
26
+ export declare function replayComponentClientFactories(context: Record<string, unknown>, registered: Array<{ body: string, count: number }>): void;
27
+ export declare const COMPONENT_CLIENT_FACTORIES_CONTEXT_KEY: '__stx_component_client_factories';
28
+ declare interface ComponentClientFactory {
29
+ body: string
30
+ instances: number
31
+ }
32
+ declare type ComponentClientFactoryRegistry = Map<string, ComponentClientFactory>;
@@ -1,22 +1,19 @@
1
1
  import type { TemplateExpression } from './stx-virtual-ts';
2
- export interface ContractCheck {
3
- expression: TemplateExpression;
4
- statement: {
5
- text: string;
6
- prefixLength: number;
7
- };
8
- }
9
- export interface ContractCheckOptions {
10
- filePath: string;
11
- componentsDir?: string;
12
- projectRoot?: string;
13
- readComponent?: (file: string) => string | undefined;
14
- scriptCode: (source: string, file: string) => string;
15
- }
16
2
  /** Parent call-site checks; shared unchanged by CLI and editor virtual buffers. */
17
3
  export declare function componentContractChecks(source: string, masked: string, options: ContractCheckOptions): {
18
- declarations: string;
19
- checks: ContractCheck[];
20
- events: Map<number, string>;
21
- dependencies: Map<string, string>;
4
+ declarations: string
5
+ checks: ContractCheck[]
6
+ events: Map<number, string>
7
+ dependencies: Map<string, string>
22
8
  };
9
+ export declare interface ContractCheck {
10
+ expression: TemplateExpression
11
+ statement: { text: string, prefixLength: number }
12
+ }
13
+ export declare interface ContractCheckOptions {
14
+ filePath: string
15
+ componentsDir?: string
16
+ projectRoot?: string
17
+ readComponent?: (file: string) => string | undefined
18
+ scriptCode: (source: string, file: string) => string
19
+ }
@@ -1,12 +1,12 @@
1
- export interface ComponentContract {
2
- declarations: string;
3
- props: string | null;
4
- events: string | null;
5
- }
6
- export declare const COMPONENT_CONTRACT_HELPERS = "\ntype __StxCtor<T> = T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends ArrayConstructor ? unknown[] : T extends ObjectConstructor ? object : T extends readonly unknown[] ? __StxCtor<T[number]> : T extends abstract new (...args: any[]) => infer V ? V : unknown;\ntype __StxWiden<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T;\ntype __StxOption<T> = T extends { type: infer C } ? __StxCtor<C> : T extends { default: infer D } ? D extends (...args: any[]) => infer V ? V : __StxWiden<D> : __StxCtor<T>;\ntype __StxRequired<O> = { [K in keyof O]-?: O[K] extends { required: true } ? K : never }[keyof O];\ntype __StxDefaulted<O> = { [K in keyof O]-?: O[K] extends { default: unknown } ? K : never }[keyof O];\ntype __StxOptions<O> = { [K in Exclude<__StxRequired<O>, __StxDefaulted<O>>]: __StxOption<O[K]> } & { [K in Exclude<keyof O, Exclude<__StxRequired<O>, __StxDefaulted<O>>>]?: __StxOption<O[K]> };\ntype __StxDefaults<P, K> = Omit<P, Extract<keyof P, K>> & Partial<Pick<P, Extract<keyof P, K>>>;\n";
7
1
  /**
8
2
  * Project a child's declared contract into its parent's virtual TS module.
9
3
  * TypeScript, not this scanner, resolves aliases, imports and assignability.
10
4
  * Original script bodies stay isolated inside a namespace; they are never run.
11
5
  */
12
6
  export declare function componentContract(code: string, namespace: string): ComponentContract;
7
+ export declare const COMPONENT_CONTRACT_HELPERS: string;
8
+ export declare interface ComponentContract {
9
+ declarations: string
10
+ props: string | null
11
+ events: string | null
12
+ }
@@ -14,6 +14,13 @@ export declare function getHMRHandler(config?: ComponentHMRConfig): ComponentHMR
14
14
  * Reset global HMR handler
15
15
  */
16
16
  export declare function resetHMRHandler(): void;
17
+ declare const __dtsx_default_export__: {
18
+ ComponentHMRHandler: typeof ComponentHMRHandler;
19
+ getHMRHandler: typeof getHMRHandler;
20
+ resetHMRHandler: typeof resetHMRHandler;
21
+ generateHMRClientScript: typeof generateHMRClientScript;
22
+ wrapComponentForHMR: typeof wrapComponentForHMR
23
+ };
17
24
  /* eslint-disable prefer-const, style/max-statements-per-line, no-super-linear-backtracking, regexp/no-unused-capturing-group */
18
25
  /**
19
26
  * Component HMR (Hot Module Replacement)
@@ -98,10 +105,4 @@ export declare class ComponentHMRHandler {
98
105
  // =============================================================================
99
106
  // Exports
100
107
  // =============================================================================
101
- export default {
102
- ComponentHMRHandler,
103
- getHMRHandler,
104
- resetHMRHandler,
105
- generateHMRClientScript,
106
- wrapComponentForHMR,
107
- };
108
+ export default __dtsx_default_export__;