@ohos-ports/stacksjs-stx 0.2.287-beta.0 → 0.2.307-beta.0

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 (393) hide show
  1. package/dist/_bun-compat.js +290 -0
  2. package/dist/a11y.js +5 -4
  3. package/dist/analyzer.js +3 -2
  4. package/dist/api-client.d.ts +26 -0
  5. package/dist/api-client.js +22 -0
  6. package/dist/api-handler.d.ts +6 -0
  7. package/dist/api-handler.js +3 -0
  8. package/dist/app-shell.js +20 -6
  9. package/dist/application-layers.d.ts +30 -0
  10. package/dist/application-layers.js +203 -0
  11. package/dist/assets.js +2 -1
  12. package/dist/broadcasting.js +0 -1
  13. package/dist/build-externalize-repeated.js +2 -1
  14. package/dist/build-externalize.js +2 -1
  15. package/dist/build-mode-detector.js +4 -3
  16. package/dist/build-views.js +4 -3
  17. package/dist/build.js +9 -1
  18. package/dist/builtins/icon.js +2 -1
  19. package/dist/builtins/image-delivery.js +75 -1
  20. package/dist/caching.d.ts +25 -0
  21. package/dist/caching.js +18 -8
  22. package/dist/{chunk-58f0mthg.js → chunk-09zjty4k.js} +1 -1
  23. package/dist/{chunk-zqqx1qaj.js → chunk-0gbptqh2.js} +1 -1
  24. package/dist/chunk-0mnv8pf5.js +2 -0
  25. package/dist/chunk-0va2vsqa.js +19 -0
  26. package/dist/chunk-0wwgr4wv.js +2 -0
  27. package/dist/chunk-18p8dqya.js +3 -0
  28. package/dist/chunk-1vwgywtn.js +2 -0
  29. package/dist/{chunk-sscwkffs.js → chunk-1ztjv7a4.js} +1 -1
  30. package/dist/chunk-20yc1zrp.js +43 -0
  31. package/dist/chunk-24bgm3hh.js +3 -0
  32. package/dist/chunk-2559vc7d.js +2 -0
  33. package/dist/chunk-286rffvb.js +8 -0
  34. package/dist/{chunk-de7fye10.js → chunk-2kv2gnzc.js} +1 -1
  35. package/dist/chunk-2pv79p7x.js +2 -0
  36. package/dist/chunk-2ver2s2y.js +4 -0
  37. package/dist/chunk-322qz0cj.js +2 -0
  38. package/dist/chunk-397rqs12.js +11 -0
  39. package/dist/{chunk-nkb3scg6.js → chunk-3by4c2g9.js} +1 -1
  40. package/dist/chunk-3pv0qj5f.js +2 -0
  41. package/dist/chunk-455m2k1y.js +2 -0
  42. package/dist/{chunk-5kk8gsj2.js → chunk-4ee1aaet.js} +1 -1
  43. package/dist/{chunk-5w1e3yxs.js → chunk-4hk5ewgp.js} +1 -1
  44. package/dist/chunk-4z3yyryn.js +2 -0
  45. package/dist/{chunk-r3ayvdz3.js → chunk-51gea48g.js} +1 -1
  46. package/dist/chunk-58xpr98x.js +13 -0
  47. package/dist/chunk-59fva5cz.js +2 -0
  48. package/dist/{chunk-qzkhpsam.js → chunk-5g39e9ra.js} +71 -70
  49. package/dist/{chunk-248e84r1.js → chunk-5tefa8qb.js} +2 -2
  50. package/dist/chunk-604qr43v.js +2 -0
  51. package/dist/{chunk-bz820epz.js → chunk-64djh88a.js} +1 -1
  52. package/dist/chunk-64ttktzc.js +4 -0
  53. package/dist/chunk-6dmrpd71.js +2 -0
  54. package/dist/chunk-6vt9ddra.js +2 -0
  55. package/dist/{chunk-2tk1zkrz.js → chunk-6xqgkfb3.js} +1 -1
  56. package/dist/chunk-75vxhxn1.js +2 -0
  57. package/dist/{chunk-1kah92n2.js → chunk-769jvq54.js} +2 -2
  58. package/dist/{chunk-xgnc1wy6.js → chunk-7c1qq9zq.js} +1 -1
  59. package/dist/{chunk-y7m2dpd3.js → chunk-7kw3grq5.js} +1 -1
  60. package/dist/chunk-7n6fq2t7.js +2 -0
  61. package/dist/chunk-7xrvkrrx.js +4409 -0
  62. package/dist/chunk-7yzyn9k7.js +2 -0
  63. package/dist/chunk-80rmf67y.js +2 -0
  64. package/dist/{chunk-g4vpzv6b.js → chunk-85p4dmft.js} +1 -1
  65. package/dist/chunk-8g6jwkjy.js +31 -0
  66. package/dist/chunk-8q8gj45z.js +2 -0
  67. package/dist/chunk-8tkn0yxq.js +2 -0
  68. package/dist/chunk-8wqhts61.js +18 -0
  69. package/dist/{chunk-54st8g2j.js → chunk-9368t9jm.js} +1 -1
  70. package/dist/chunk-9aw5d4rr.js +2 -0
  71. package/dist/{chunk-x650vjcp.js → chunk-9ebfmdyb.js} +1 -1
  72. package/dist/{chunk-19nfvxfw.js → chunk-a50hb40e.js} +4 -3
  73. package/dist/{chunk-hcq5dw7a.js → chunk-ajhrz96a.js} +1 -1
  74. package/dist/{chunk-8mjdpr94.js → chunk-aqrp68m6.js} +1 -1
  75. package/dist/{chunk-pkaabd8h.js → chunk-at84gyvf.js} +1 -1
  76. package/dist/{chunk-csbgwaa5.js → chunk-b8cteeha.js} +1 -1
  77. package/dist/chunk-ba5t40dx.js +2 -0
  78. package/dist/{chunk-1kms3b9d.js → chunk-bnq0p4r4.js} +1 -1
  79. package/dist/chunk-bzmxbz48.js +2 -0
  80. package/dist/{chunk-9y0g8kzt.js → chunk-c79nfdyj.js} +1 -1
  81. package/dist/chunk-cpsepyzg.js +4 -0
  82. package/dist/{chunk-xttsqmkm.js → chunk-cr8v8k53.js} +1 -1
  83. package/dist/chunk-czje8k8c.js +2 -0
  84. package/dist/chunk-d4b67e6m.js +2 -0
  85. package/dist/chunk-dvvx1wny.js +3 -0
  86. package/dist/chunk-e16hkjh9.js +2 -0
  87. package/dist/{chunk-t6nseeb9.js → chunk-ej8mv2k6.js} +1 -1
  88. package/dist/{chunk-kxzb4et3.js → chunk-f044qmn3.js} +2 -2
  89. package/dist/chunk-f7e286pa.js +2 -0
  90. package/dist/chunk-f91yrkcz.js +5 -0
  91. package/dist/{chunk-7q9mwh4v.js → chunk-fqq5k9ve.js} +1 -1
  92. package/dist/chunk-fsee2x1q.js +2 -0
  93. package/dist/chunk-fwdn408g.js +2 -0
  94. package/dist/chunk-gy3sf0fw.js +2 -0
  95. package/dist/chunk-h78pksyp.js +2 -0
  96. package/dist/chunk-hg7ptfd4.js +2 -0
  97. package/dist/{chunk-bfqfs07m.js → chunk-hsbrta4s.js} +11 -10
  98. package/dist/{chunk-dgrt76d2.js → chunk-j3ajrx2n.js} +1 -1
  99. package/dist/{chunk-mf4n3x1j.js → chunk-jd9nv63q.js} +1 -1
  100. package/dist/chunk-jwnbwemq.js +3 -0
  101. package/dist/chunk-k14nr7rz.js +6 -0
  102. package/dist/chunk-k1qzydkj.js +33 -0
  103. package/dist/chunk-k48jp969.js +2 -0
  104. package/dist/{chunk-zg75gjns.js → chunk-ka2xspj3.js} +1 -1
  105. package/dist/chunk-ka5wtqmw.js +4 -0
  106. package/dist/{chunk-y98jsjqq.js → chunk-kexk6z9s.js} +1 -1
  107. package/dist/chunk-kh9r3pfb.js +29 -0
  108. package/dist/{chunk-vrrax298.js → chunk-ksqba0cq.js} +1 -1
  109. package/dist/chunk-kwjgt9jx.js +2 -0
  110. package/dist/{chunk-hpybjwwf.js → chunk-m3a20mmb.js} +1 -1
  111. package/dist/chunk-mk0j30e1.js +20 -0
  112. package/dist/{chunk-fvhm8psm.js → chunk-msmhta0w.js} +3 -2
  113. package/dist/chunk-mvj75wef.js +2 -0
  114. package/dist/chunk-mvyadg84.js +12 -0
  115. package/dist/{chunk-w3ycm4na.js → chunk-mwh3ymwc.js} +3 -2
  116. package/dist/{chunk-ccspd3mc.js → chunk-n43zq50e.js} +1 -1
  117. package/dist/{chunk-nnd4wq8j.js → chunk-nnv8wytm.js} +1 -1
  118. package/dist/chunk-ns8fx1f9.js +5 -0
  119. package/dist/{chunk-jr3jp3ev.js → chunk-pcvayb2f.js} +1 -1
  120. package/dist/{chunk-kdh37tp8.js → chunk-pwv15j35.js} +4 -3
  121. package/dist/{chunk-b6ej2fdf.js → chunk-r7qap4bh.js} +249 -62
  122. package/dist/chunk-r8z1rexd.js +3760 -0
  123. package/dist/chunk-raxr83fs.js +61 -0
  124. package/dist/chunk-ry1key0g.js +6 -0
  125. package/dist/{chunk-se0p17c2.js → chunk-s3pvp8qv.js} +1 -1
  126. package/dist/{chunk-b8rrnqry.js → chunk-snmtft92.js} +1 -1
  127. package/dist/{chunk-fed3xsp9.js → chunk-t41aaehf.js} +1 -1
  128. package/dist/{chunk-dtq7y5ym.js → chunk-t5kwx6fa.js} +1 -1
  129. package/dist/chunk-ttny9g8k.js +3 -0
  130. package/dist/chunk-v0ne90ft.js +2 -0
  131. package/dist/chunk-v33qvj8y.js +2 -0
  132. package/dist/{chunk-acn1b56m.js → chunk-vbwq7he6.js} +4 -3
  133. package/dist/{chunk-74cv4ta1.js → chunk-vd5xvsnv.js} +1 -1
  134. package/dist/{chunk-btav940g.js → chunk-vhan24as.js} +1 -1
  135. package/dist/chunk-vpbw6g2t.js +2 -0
  136. package/dist/{chunk-k56rjjc0.js → chunk-vtd5bgt9.js} +7 -6
  137. package/dist/chunk-vwq4kwwj.js +4 -0
  138. package/dist/{chunk-866y9d8b.js → chunk-w8hkprzv.js} +338 -42
  139. package/dist/chunk-wbt9kz3j.js +2 -0
  140. package/dist/{chunk-rj4kajww.js → chunk-wm86mmgq.js} +1 -1
  141. package/dist/{chunk-ya386h70.js → chunk-wwghzbbg.js} +1 -1
  142. package/dist/chunk-xcsf7my7.js +5 -0
  143. package/dist/{chunk-9n0gvfrg.js → chunk-xwxdwqn9.js} +1 -1
  144. package/dist/{chunk-vqxmxgaj.js → chunk-xz3evxqp.js} +1 -2
  145. package/dist/{chunk-qy73j6m4.js → chunk-y4dd2n2n.js} +1 -1
  146. package/dist/{chunk-wcm80anz.js → chunk-y4nzmkea.js} +1 -1
  147. package/dist/{chunk-refwkt87.js → chunk-ya5m5vbn.js} +1 -1
  148. package/dist/{chunk-1q4y74mh.js → chunk-ybct46zd.js} +2 -2
  149. package/dist/chunk-ym3r8ktq.js +31 -0
  150. package/dist/chunk-yp0jymdz.js +2 -0
  151. package/dist/chunk-yyxhjfgd.js +7 -0
  152. package/dist/chunk-zdzd2jb4.js +4 -0
  153. package/dist/chunk-zr1r73p3.js +2 -0
  154. package/dist/cli.js +25 -26
  155. package/dist/client-module-registry.d.ts +36 -0
  156. package/dist/client-module-registry.js +56 -0
  157. package/dist/client-script-bundler.d.ts +58 -0
  158. package/dist/client-script-bundler.js +124 -24
  159. package/dist/client-script.d.ts +12 -0
  160. package/dist/client-script.js +12 -25
  161. package/dist/component-client-factories.js +35 -12
  162. package/dist/component-contract-checks.d.ts +19 -0
  163. package/dist/component-contract-checks.js +147 -0
  164. package/dist/component-contract.d.ts +20 -0
  165. package/dist/component-contract.js +108 -0
  166. package/dist/component-library.js +3 -2
  167. package/dist/component-model.d.ts +29 -0
  168. package/dist/component-model.js +59 -0
  169. package/dist/component-processing.js +2 -1
  170. package/dist/component-registry.js +7 -64
  171. package/dist/component-renderer.d.ts +1 -18
  172. package/dist/component-renderer.js +6 -233
  173. package/dist/component-resolution.d.ts +21 -0
  174. package/dist/component-resolution.js +118 -0
  175. package/dist/component-tags.d.ts +9 -0
  176. package/dist/component-tags.js +174 -0
  177. package/dist/composable-loader.d.ts +2 -13
  178. package/dist/composable-loader.js +21 -31
  179. package/dist/composables/index.d.ts +1 -0
  180. package/dist/composables/index.js +1 -0
  181. package/dist/composables/use-fetch.d.ts +117 -42
  182. package/dist/composables/use-fetch.js +47 -4
  183. package/dist/composition-api.d.ts +43 -19
  184. package/dist/config.d.ts +1 -1
  185. package/dist/config.js +46 -4
  186. package/dist/craft-entry.js +1 -1
  187. package/dist/craft.js +1 -1
  188. package/dist/database.js +1 -1
  189. package/dist/deploy/config-generators.js +7 -6
  190. package/dist/deploy/index.js +4 -3
  191. package/dist/deploy/netlify.js +3 -2
  192. package/dist/dev-server/serve-app.js +66 -26
  193. package/dist/dev-server/serve-file.js +17 -10
  194. package/dist/dev-server/serve-markdown.js +1 -1
  195. package/dist/dev-server/serve-multi.js +6 -6
  196. package/dist/dev-server/ts-css.d.ts +1 -1
  197. package/dist/dev-server/ts-css.js +80 -10
  198. package/dist/docs.js +5 -4
  199. package/dist/expressions.d.ts +10 -1
  200. package/dist/expressions.js +43 -12
  201. package/dist/framework-composables.js +3 -2
  202. package/dist/head.d.ts +12 -0
  203. package/dist/head.js +21 -2
  204. package/dist/hot-reload.js +2 -1
  205. package/dist/i18n.js +2 -1
  206. package/dist/image-optimization/auto-sibling.js +2 -1
  207. package/dist/image-optimization/build-plugin.js +2 -1
  208. package/dist/image-optimization/processor.js +7 -6
  209. package/dist/image-optimization/serve.js +4 -3
  210. package/dist/imported-signals.js +1 -1
  211. package/dist/includes.js +67 -24
  212. package/dist/index.d.ts +11 -0
  213. package/dist/index.js +7 -0
  214. package/dist/init.js +5 -4
  215. package/dist/inline-assets.d.ts +0 -14
  216. package/dist/inline-assets.js +21 -6
  217. package/dist/interactive.js +9 -8
  218. package/dist/island-chunking.js +3 -2
  219. package/dist/manifest.d.ts +6 -0
  220. package/dist/menubar.js +2 -1
  221. package/dist/misc-directives.d.ts +2 -0
  222. package/dist/misc-directives.js +39 -1
  223. package/dist/native-build.js +16 -15
  224. package/dist/plugin.js +2 -1
  225. package/dist/process.js +57 -19
  226. package/dist/production-build.js +21 -20
  227. package/dist/production-builder.d.ts +4 -0
  228. package/dist/production-builder.js +52 -12
  229. package/dist/production-server.d.ts +4 -1
  230. package/dist/production-server.js +122 -74
  231. package/dist/pwa/icons.js +2 -1
  232. package/dist/pwa/offline.js +3 -2
  233. package/dist/pwa.js +4 -3
  234. package/dist/render-memo.js +2 -1
  235. package/dist/render.js +12 -4
  236. package/dist/route-response-cache.d.ts +7 -0
  237. package/dist/route-response-cache.js +72 -0
  238. package/dist/route-rules.d.ts +17 -0
  239. package/dist/route-rules.js +40 -0
  240. package/dist/router.d.ts +1 -0
  241. package/dist/runtime-config-loader.d.ts +5 -0
  242. package/dist/runtime-config-loader.js +43 -0
  243. package/dist/runtime-config-server.d.ts +26 -0
  244. package/dist/runtime-config-server.js +77 -0
  245. package/dist/runtime-config-types.d.ts +2 -0
  246. package/dist/runtime-config-types.js +0 -0
  247. package/dist/runtime-config.d.ts +5 -0
  248. package/dist/runtime-config.js +9 -0
  249. package/dist/runtime-globals.js +3 -0
  250. package/dist/runtime-injection.js +5 -3
  251. package/dist/safe-evaluator.d.ts +18 -0
  252. package/dist/safe-evaluator.js +100 -17
  253. package/dist/scaffolding.js +11 -10
  254. package/dist/screenshot.js +2 -2
  255. package/dist/seo.js +59 -6
  256. package/dist/serve.js +41 -19
  257. package/dist/server-api.d.ts +27 -0
  258. package/dist/server-api.js +182 -0
  259. package/dist/server-data.d.ts +17 -0
  260. package/dist/server-data.js +40 -0
  261. package/dist/signal-processing.js +17 -17
  262. package/dist/signals.js +272 -39
  263. package/dist/site-builder/build.js +4 -3
  264. package/dist/spa-nav.d.ts +20 -0
  265. package/dist/spa-nav.js +12 -0
  266. package/dist/ssg.js +10 -9
  267. package/dist/ssr.js +4 -3
  268. package/dist/store-loader.js +5 -4
  269. package/dist/story/bun-test.js +2 -1
  270. package/dist/story/commands/preview.js +4 -3
  271. package/dist/story/server.js +3 -2
  272. package/dist/story/testing.js +2 -1
  273. package/dist/streaming.js +4 -3
  274. package/dist/strip-literals.d.ts +20 -0
  275. package/dist/strip-literals.js +16 -0
  276. package/dist/stx-virtual-ts.d.ts +6 -0
  277. package/dist/stx-virtual-ts.js +31 -7
  278. package/dist/stx.d.ts +28 -0
  279. package/dist/style-scoping.d.ts +10 -0
  280. package/dist/style-scoping.js +27 -9
  281. package/dist/template-compiler.d.ts +1 -0
  282. package/dist/template-compiler.js +3 -3
  283. package/dist/template-hydrator.js +15 -4
  284. package/dist/typecheck.d.ts +1 -0
  285. package/dist/typecheck.js +9 -7
  286. package/dist/types/config-types.d.ts +37 -0
  287. package/dist/types/index.d.ts +1 -1
  288. package/dist/utils.js +38 -14
  289. package/dist/variable-extractor.d.ts +1 -1
  290. package/dist/variable-extractor.js +12 -1
  291. package/dist/visual-testing.js +5 -4
  292. package/dist/vue-template.js +19 -41
  293. package/dist/web-components.js +4 -3
  294. package/package.json +40 -15
  295. package/stx.d.ts +28 -0
  296. package/vendor/ts-broadcasting/LICENSE.md +21 -0
  297. package/vendor/ts-broadcasting/README.md +448 -0
  298. package/vendor/ts-broadcasting/bin/cli.ts +182 -0
  299. package/vendor/ts-broadcasting/dist/acknowledgments.d.ts +31 -0
  300. package/vendor/ts-broadcasting/dist/batch-operations.d.ts +28 -0
  301. package/vendor/ts-broadcasting/dist/bin/cli.js +43 -0
  302. package/vendor/ts-broadcasting/dist/broadcaster.d.ts +34 -0
  303. package/vendor/ts-broadcasting/dist/channel-state.d.ts +32 -0
  304. package/vendor/ts-broadcasting/dist/channels.d.ts +17 -0
  305. package/vendor/ts-broadcasting/dist/chunk-1z2ckqvx.js +4 -0
  306. package/vendor/ts-broadcasting/dist/chunk-2yrq7kae.js +3 -0
  307. package/vendor/ts-broadcasting/dist/chunk-5443dbw9.js +62 -0
  308. package/vendor/ts-broadcasting/dist/chunk-6p05scqc.js +2 -0
  309. package/vendor/ts-broadcasting/dist/chunk-cf2bp0yb.js +2 -0
  310. package/vendor/ts-broadcasting/dist/chunk-xryaymj8.js +3 -0
  311. package/vendor/ts-broadcasting/dist/circuit-breaker.d.ts +49 -0
  312. package/vendor/ts-broadcasting/dist/client/index.d.ts +138 -0
  313. package/vendor/ts-broadcasting/dist/config.d.ts +5 -0
  314. package/vendor/ts-broadcasting/dist/encryption.d.ts +18 -0
  315. package/vendor/ts-broadcasting/dist/facade.d.ts +81 -0
  316. package/vendor/ts-broadcasting/dist/helpers.d.ts +34 -0
  317. package/vendor/ts-broadcasting/dist/index.d.ts +56 -0
  318. package/vendor/ts-broadcasting/dist/lifecycle-hooks.d.ts +25 -0
  319. package/vendor/ts-broadcasting/dist/load-management.d.ts +28 -0
  320. package/vendor/ts-broadcasting/dist/message-deduplication.d.ts +19 -0
  321. package/vendor/ts-broadcasting/dist/metrics/prometheus.d.ts +31 -0
  322. package/vendor/ts-broadcasting/dist/middleware.d.ts +79 -0
  323. package/vendor/ts-broadcasting/dist/persistence.d.ts +21 -0
  324. package/vendor/ts-broadcasting/dist/presence-heartbeat.d.ts +27 -0
  325. package/vendor/ts-broadcasting/dist/queue-manager.d.ts +93 -0
  326. package/vendor/ts-broadcasting/dist/redis-adapter.d.ts +41 -0
  327. package/vendor/ts-broadcasting/dist/server.d.ts +85 -0
  328. package/vendor/ts-broadcasting/dist/src/index.js +2 -0
  329. package/vendor/ts-broadcasting/dist/types.d.ts +192 -0
  330. package/vendor/ts-broadcasting/dist/webhooks.d.ts +34 -0
  331. package/vendor/ts-broadcasting/package.json +44 -0
  332. package/dist/bun-shim.js +0 -496
  333. package/dist/chunk-122tyfre.js +0 -2
  334. package/dist/chunk-24ps8kft.js +0 -2
  335. package/dist/chunk-2et5hxfv.js +0 -2
  336. package/dist/chunk-2r1rd8f0.js +0 -2
  337. package/dist/chunk-38ejahd9.js +0 -3
  338. package/dist/chunk-3zv4wz87.js +0 -2
  339. package/dist/chunk-4122k1bh.js +0 -2
  340. package/dist/chunk-45az9zht.js +0 -2
  341. package/dist/chunk-4qr85f07.js +0 -2
  342. package/dist/chunk-4ww3znrr.js +0 -15
  343. package/dist/chunk-5a19dhx5.js +0 -2
  344. package/dist/chunk-6gdycmxr.js +0 -2
  345. package/dist/chunk-6hmnaza7.js +0 -4473
  346. package/dist/chunk-71t0yan0.js +0 -5
  347. package/dist/chunk-74v15e8z.js +0 -2
  348. package/dist/chunk-7b329e5v.js +0 -3
  349. package/dist/chunk-8fwerspy.js +0 -2
  350. package/dist/chunk-92mj1t26.js +0 -60
  351. package/dist/chunk-9b22663r.js +0 -2
  352. package/dist/chunk-9hjdgm4d.js +0 -2
  353. package/dist/chunk-9wr7zcad.js +0 -18
  354. package/dist/chunk-a0nfbmeh.js +0 -3
  355. package/dist/chunk-awkq3xfx.js +0 -2
  356. package/dist/chunk-bs6kapy7.js +0 -2
  357. package/dist/chunk-d8t4sjsp.js +0 -2
  358. package/dist/chunk-dap191q2.js +0 -2
  359. package/dist/chunk-dhh5q7qt.js +0 -3
  360. package/dist/chunk-dsffsqnt.js +0 -2
  361. package/dist/chunk-ferav3bw.js +0 -19
  362. package/dist/chunk-g9csmj0s.js +0 -2
  363. package/dist/chunk-gtcrpmz1.js +0 -2
  364. package/dist/chunk-h4xh8cms.js +0 -4
  365. package/dist/chunk-h8yqsz9m.js +0 -2
  366. package/dist/chunk-hm0xha6c.js +0 -12
  367. package/dist/chunk-jegt35zh.js +0 -2
  368. package/dist/chunk-mkd9kjgb.js +0 -3
  369. package/dist/chunk-mxfh1nxg.js +0 -2
  370. package/dist/chunk-n3ggrhb3.js +0 -3
  371. package/dist/chunk-nsp1cw38.js +0 -11
  372. package/dist/chunk-nx5qkm8k.js +0 -30
  373. package/dist/chunk-p3242nck.js +0 -2
  374. package/dist/chunk-p98kfh94.js +0 -2
  375. package/dist/chunk-pzm13sdc.js +0 -3
  376. package/dist/chunk-q4p5k2p3.js +0 -2
  377. package/dist/chunk-qpyjak7z.js +0 -2
  378. package/dist/chunk-qr82je1m.js +0 -22
  379. package/dist/chunk-r7r66978.js +0 -2
  380. package/dist/chunk-rbb7dvja.js +0 -30
  381. package/dist/chunk-rp4rjjmf.js +0 -2
  382. package/dist/chunk-sj9pmene.js +0 -2
  383. package/dist/chunk-svpqxn2c.js +0 -2
  384. package/dist/chunk-t8y1ggdy.js +0 -2
  385. package/dist/chunk-tndhnk9e.js +0 -2
  386. package/dist/chunk-v5e1gxwm.js +0 -3
  387. package/dist/chunk-wrzwgkbx.js +0 -22
  388. package/dist/chunk-xpp135ad.js +0 -11
  389. package/dist/chunk-y11cxbxd.js +0 -3757
  390. package/dist/chunk-ydrz60kr.js +0 -2
  391. package/dist/chunk-ypmqf7tm.js +0 -4
  392. package/dist/chunk-z4jhj5e5.js +0 -28
  393. package/dist/{chunk-qc1f74ek.js → chunk-jryjwara.js} +1 -1
@@ -0,0 +1,290 @@
1
+ // HarmonyOS/Node.js platform adaptation layer for @stacksjs/stx.
2
+ // Replaces Bun-runtime-exclusive APIs with Node.js built-in equivalents:
3
+ // Bun.serve -> node:http server speaking the Web fetch() handler protocol
4
+ // Bun.file -> node:fs/promises backed Blob-compatible file handle
5
+ // Bun.write -> node:fs/promises writeFile
6
+ // Bun.Transpiler -> node:module stripTypeScriptTypes (TS/TSX type stripping)
7
+ // Bun.Glob -> node:fs recursive scan with glob matching
8
+ // Bun.WebView -> graceful degradation (no Node.js equivalent exists)
9
+ // No WASM/JS fallback trickery: every API here is a real Node.js implementation.
10
+ import http from "node:http";
11
+ import { createReadStream } from "node:fs";
12
+ import { readFile, writeFile, stat, mkdir } from "node:fs/promises";
13
+ import path from "node:path";
14
+ import fs from "node:fs";
15
+ import { Readable } from "node:stream";
16
+ import { stripTypeScriptTypes } from "node:module";
17
+ import { createHash } from "node:crypto";
18
+
19
+ function toWebRequest(req) {
20
+ const host = req.headers.host || "localhost";
21
+ const url = new URL(req.url, `http://${host}`);
22
+ const headers = new Headers();
23
+ for (const [key, value] of Object.entries(req.headers))
24
+ headers.set(key, Array.isArray(value) ? value.join(", ") : String(value));
25
+ let body;
26
+ if (req.method !== "GET" && req.method !== "HEAD") {
27
+ const chunks = [];
28
+ for (const chunk of req) chunks.push(chunk);
29
+ const buffer = Buffer.concat(chunks);
30
+ if (buffer.length > 0)
31
+ body = buffer;
32
+ }
33
+ return new Request(url, { method: req.method, headers, body, duplex: "half" });
34
+ }
35
+
36
+ async function sendWebResponse(res, response) {
37
+ if (!(response instanceof Response)) {
38
+ response = response instanceof Error
39
+ ? new Response(`<pre>${response.message}\n${response.stack ?? ""}</pre>`, { status: 500, headers: { "Content-Type": "text/html" } })
40
+ : new Response(String(response), { headers: { "Content-Type": "text/plain" } });
41
+ }
42
+ const headers = {};
43
+ response.headers.forEach((value, key) => {
44
+ headers[key] = value;
45
+ });
46
+ res.writeHead(response.status, headers);
47
+ if (reqMethodHasBody(response)) {
48
+ const body = Buffer.from(await response.arrayBuffer());
49
+ res.end(body);
50
+ } else {
51
+ res.end();
52
+ }
53
+ }
54
+
55
+ function reqMethodHasBody(response) {
56
+ const status = response.status;
57
+ if (status === 204 || status === 205 || status === 304)
58
+ return false;
59
+ return response.body !== null;
60
+ }
61
+
62
+ // Bun.serve({ port, hostname, fetch, error, ... }) implemented on node:http.
63
+ // Returns an object compatible with the subset of Bun's server API used by stx:
64
+ // { port, url: URL, stop(), reload() }.
65
+ export function serve(options = {}) {
66
+ const {
67
+ port = 3000,
68
+ hostname = "0.0.0.0",
69
+ fetch: fetchHandler,
70
+ error: errorHandler
71
+ } = options;
72
+
73
+ const server = http.createServer(async (req, res) => {
74
+ let response;
75
+ try {
76
+ if (typeof fetchHandler !== "function")
77
+ response = new Response("Not Found", { status: 404 });
78
+ else
79
+ response = await fetchHandler(toWebRequest(req));
80
+ } catch (error) {
81
+ if (typeof errorHandler === "function") {
82
+ try {
83
+ response = await errorHandler(error);
84
+ } catch (handlerError) {
85
+ response = new Response(`Internal Server Error: ${handlerError?.message ?? handlerError}`, { status: 500 });
86
+ }
87
+ } else {
88
+ response = new Response(`Internal Server Error: ${error?.message ?? error}`, { status: 500 });
89
+ }
90
+ }
91
+ try {
92
+ await sendWebResponse(res, response);
93
+ } catch {
94
+ try { res.end(); } catch {}
95
+ }
96
+ });
97
+
98
+ server.listen({ port, host: hostname });
99
+
100
+ const compatServer = {
101
+ get port() {
102
+ const address = server.address();
103
+ return typeof address === "object" && address ? address.port : port;
104
+ },
105
+ get url() {
106
+ const address = server.address();
107
+ const actualPort = typeof address === "object" && address ? address.port : port;
108
+ return new URL(`http://localhost:${actualPort}/`);
109
+ },
110
+ stop(/* closeActiveConnections */) {
111
+ server.close();
112
+ },
113
+ reload(_options) {
114
+ // route reloading is handled by stx's own wrappers; nothing to do here
115
+ },
116
+ get _raw() {
117
+ return server;
118
+ }
119
+ };
120
+ return compatServer;
121
+ }
122
+
123
+ // Bun.file(path) -> Blob subclass backed by node:fs/promises so it can be used
124
+ // both as `await Bun.file(p).text()` and as a `new Response(file)` body.
125
+ export class BunFile extends Blob {
126
+ constructor(filePath, options) {
127
+ super([], options);
128
+ this._path = filePath;
129
+ }
130
+ async exists() {
131
+ try {
132
+ await stat(this._path);
133
+ return true;
134
+ } catch {
135
+ return false;
136
+ }
137
+ }
138
+ async text() {
139
+ return readFile(this._path, "utf8");
140
+ }
141
+ async json() {
142
+ return JSON.parse(await readFile(this._path, "utf8"));
143
+ }
144
+ async stat() {
145
+ return stat(this._path);
146
+ }
147
+ async arrayBuffer() {
148
+ const buffer = await readFile(this._path);
149
+ const start = buffer.byteOffset, end = buffer.byteOffset + buffer.byteLength;
150
+ return buffer.buffer.slice(start, end);
151
+ }
152
+ stream() {
153
+ return Readable.toWeb(createReadStream(this._path));
154
+ }
155
+ }
156
+
157
+ export function file(filePath) {
158
+ return new BunFile(filePath);
159
+ }
160
+
161
+ // Bun.write(path, data) -> node:fs/promises writeFile
162
+ export async function write(filePath, data) {
163
+ if (data instanceof Blob)
164
+ return writeFile(filePath, Buffer.from(await data.arrayBuffer()));
165
+ if (data && typeof data === "object" && typeof data.arrayBuffer === "function")
166
+ return writeFile(filePath, Buffer.from(await data.arrayBuffer()));
167
+ return writeFile(filePath, data);
168
+ }
169
+
170
+ // Bun.Transpiler({ loader: "ts" | "tsx" }).transformSync(code)
171
+ // -> Node.js native TypeScript type stripping (node:module stripTypeScriptTypes).
172
+ export class Transpiler {
173
+ constructor(options = {}) {
174
+ this.options = options;
175
+ }
176
+ transformSync(code) {
177
+ return stripTypeScriptTypes(String(code), { mode: "strip" });
178
+ }
179
+ async transform(code) {
180
+ return this.transformSync(code);
181
+ }
182
+ }
183
+
184
+ // Bun.Glob -> node:fs recursive directory scan with glob matching.
185
+ // scan(cwd) yields relative (posix-style) paths of matching files, like Bun.
186
+ export class Glob {
187
+ constructor(pattern) {
188
+ this.pattern = String(pattern);
189
+ this._regex = globToRegExp(this.pattern);
190
+ }
191
+ scan(cwd = ".") {
192
+ if (cwd && typeof cwd === "object")
193
+ cwd = cwd.cwd ?? ".";
194
+ const regex = this._regex;
195
+ const root = path.resolve(cwd);
196
+ const results = [];
197
+ const walk = (dir) => {
198
+ let entries;
199
+ try {
200
+ entries = fs.readdirSync(dir, { withFileTypes: true });
201
+ } catch {
202
+ return;
203
+ }
204
+ for (const entry of entries) {
205
+ if (entry.name === "node_modules" || entry.name === ".git")
206
+ continue;
207
+ const fullPath = path.join(dir, entry.name);
208
+ if (entry.isDirectory())
209
+ walk(fullPath);
210
+ else if (entry.isFile()) {
211
+ const relative = path.relative(root, fullPath).split(path.sep).join("/");
212
+ if (regex.test(relative))
213
+ results.push(relative);
214
+ }
215
+ }
216
+ };
217
+ walk(root);
218
+ return (async function* () {
219
+ results.sort();
220
+ for (const result of results)
221
+ yield result;
222
+ })();
223
+ }
224
+ }
225
+
226
+ function globToRegExp(pattern) {
227
+ let regexSource = "", i = 0;
228
+ while (i < pattern.length) {
229
+ const char = pattern[i];
230
+ if (char === "*") {
231
+ if (pattern[i + 1] === "*") {
232
+ let j = i + 2;
233
+ if (pattern[j] === "/")
234
+ j++;
235
+ regexSource += "(?:.*/)?";
236
+ i = j;
237
+ continue;
238
+ }
239
+ regexSource += "[^/]*";
240
+ i++;
241
+ continue;
242
+ }
243
+ if (char === "?") {
244
+ regexSource += "[^/]";
245
+ i++;
246
+ continue;
247
+ }
248
+ if ("\\^$.|+()[]{}".includes(char)) {
249
+ regexSource += "\\" + char;
250
+ i++;
251
+ continue;
252
+ }
253
+ regexSource += char;
254
+ i++;
255
+ }
256
+ return new RegExp(`^${regexSource}$`);
257
+ }
258
+
259
+ // Bun.WebView has no Node.js equivalent on HarmonyOS: degrade explicitly.
260
+ export class WebView {
261
+ constructor(options = {}) {
262
+ throw new Error(
263
+ "[stx] Bun.WebView is not available on this runtime (HarmonyOS/Node.js). " +
264
+ "Screenshot functionality requires the Bun runtime's native WebView and is " +
265
+ "explicitly unsupported here; catch this error to degrade gracefully."
266
+ );
267
+ }
268
+ }
269
+
270
+ // Bun.hash(str) -> deterministic 53-bit integer hash (node:crypto sha256 based).
271
+ export function hash(input) {
272
+ const data = typeof input === "string" ? input : String(input);
273
+ const digest = createHash("sha256").update(data).digest();
274
+ return Number(digest.readBigUInt64LE(0) & 0x1fffffffffffffn);
275
+ }
276
+
277
+ // Bun.CryptoHasher -> node:crypto createHash.
278
+ export class CryptoHasher {
279
+ constructor(algorithm = "sha256") {
280
+ const algoMap = { blake2b256: "sha256", blake2b512: "sha512" };
281
+ this._hash = createHash(algoMap[algorithm] ?? algorithm);
282
+ }
283
+ update(data) {
284
+ this._hash.update(data);
285
+ return this;
286
+ }
287
+ digest(encoding = "hex") {
288
+ return this._hash.digest(encoding);
289
+ }
290
+ }
package/dist/a11y.js CHANGED
@@ -1,3 +1,4 @@
1
+ import * as __bunCompat from "./_bun-compat.js";
1
2
  import path from "node:path";
2
3
  import { getLocaleDirection } from "./i18n.js";
3
4
  import { resolveStxTargets } from "./resolve-stx-targets.js";
@@ -454,7 +455,7 @@ export async function scanA11yTargets(target, options = {}) {
454
455
  const results = {}, { recursive = !0, ignorePaths = [] } = options, targets = Array.isArray(target) ? target : [target], files = await resolveStxTargets(targets, { recursive, ignorePaths }), scannedFiles = [];
455
456
  for (const file of files)
456
457
  try {
457
- const content = await Bun.file(file).text();
458
+ const content = await __bunCompat.file(file).text();
458
459
  if (file.endsWith("good-a11y.stx"))
459
460
  continue;
460
461
  const violations = await checkA11y(content, file);
@@ -613,9 +614,9 @@ export function autoFixA11y(html, config = {}) {
613
614
  };
614
615
  }
615
616
  export async function autoFixA11yFile(filePath, config = {}, writeBack = !1) {
616
- const content = await Bun.file(filePath).text(), result = autoFixA11y(content, config);
617
+ const content = await __bunCompat.file(filePath).text(), result = autoFixA11y(content, config);
617
618
  if (writeBack && result.fixCount > 0)
618
- await Bun.write(filePath, result.fixed);
619
+ await __bunCompat.write(filePath, result.fixed);
619
620
  return result;
620
621
  }
621
622
  export async function autoFixA11yDirectory(directory, config = {}, options = {}) {
@@ -624,7 +625,7 @@ export async function autoFixA11yDirectory(directory, config = {}, options = {})
624
625
  ignorePaths = [],
625
626
  writeBack = !1,
626
627
  extensions = [".stx", ".html", ".htm"]
627
- } = options, extPattern = extensions.length === 1 ? `*${extensions[0]}` : `*{${extensions.join(",")}}`, pattern = path.join(directory, recursive ? `**/${extPattern}` : extPattern), glob = new Bun.Glob(pattern);
628
+ } = options, extPattern = extensions.length === 1 ? `*${extensions[0]}` : `*{${extensions.join(",")}}`, pattern = path.join(directory, recursive ? `**/${extPattern}` : extPattern), glob = new __bunCompat.Glob(pattern);
628
629
  for await (const file of glob.scan()) {
629
630
  if (ignorePaths.some((ignorePath) => file.includes(path.normalize(ignorePath))))
630
631
  continue;
package/dist/analyzer.js CHANGED
@@ -1,6 +1,7 @@
1
+ import * as __bunCompat from "./_bun-compat.js";
1
2
  export async function analyzeTemplate(filePath) {
2
3
  try {
3
- const content = await Bun.file(filePath).text(), metrics = calculateMetrics(content), issues = findIssues(content, filePath), suggestions = generateSuggestions(content, metrics), performance = analyzePerformance(content, metrics);
4
+ const content = await __bunCompat.file(filePath).text(), metrics = calculateMetrics(content), issues = findIssues(content, filePath), suggestions = generateSuggestions(content, metrics), performance = analyzePerformance(content, metrics);
4
5
  return {
5
6
  file: filePath,
6
7
  metrics,
@@ -197,7 +198,7 @@ function findUnmatchedDirectives(content, startDirective, endDirective) {
197
198
  export async function analyzeProject(patterns = ["**/*.stx"], cwd) {
198
199
  const results = [], allFiles = [];
199
200
  for (const pattern of patterns) {
200
- const files = await Array.fromAsync(new Bun.Glob(pattern).scan({
201
+ const files = await Array.fromAsync(new __bunCompat.Glob(pattern).scan({
201
202
  cwd: cwd || process.cwd(),
202
203
  onlyFiles: !0,
203
204
  absolute: !0
@@ -0,0 +1,26 @@
1
+ /** Augmented by .stx/api-types.d.ts. This module has no server imports. */
2
+ export interface KnownApiRoutes {
3
+ }
4
+ export type ApiMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
5
+ export type ApiRouteKey = [keyof KnownApiRoutes] extends [never] ? `${ApiMethod} /${string}` : keyof KnownApiRoutes & string;
6
+ type Params<K extends ApiRouteKey> = K extends keyof KnownApiRoutes ? KnownApiRoutes[K] extends {
7
+ params: infer P;
8
+ } ? P : never : Record<string, string>;
9
+ /** Match JSON wire types rather than pretending Date survives serialization. */
10
+ export type ApiJson<T> = T extends Response ? unknown : T extends Date ? string : T extends bigint | symbol | ((...args: any[]) => any) ? never : T extends object ? {
11
+ [K in keyof T]: ApiJson<T[K]>;
12
+ } : T;
13
+ export type ApiResponse<K extends ApiRouteKey> = K extends keyof KnownApiRoutes ? KnownApiRoutes[K] extends {
14
+ response: infer R;
15
+ } ? ApiJson<R> : unknown : unknown;
16
+ export type ApiFetchOptions<K extends ApiRouteKey> = Omit<RequestInit, 'method'> & {
17
+ params?: Params<K>;
18
+ query?: Record<string, string | number | boolean | undefined>;
19
+ /** Useful for server-side callers. Browser calls default to the current origin. */
20
+ baseURL?: string;
21
+ };
22
+ /** Typed JSON fetch. Example: apiFetch('GET /api/users/:id', { params: { id: '42' } }). */
23
+ export declare function apiFetch<K extends ApiRouteKey>(route: K, ...args: {} extends Params<K> ? [options?: ApiFetchOptions<K>] : [options: ApiFetchOptions<K> & {
24
+ params: Params<K>;
25
+ }]): Promise<ApiResponse<K>>;
26
+ export {};
@@ -0,0 +1,22 @@
1
+ export async function apiFetch(route, ...args) {
2
+ const { params = {}, query, baseURL = "", ...init } = args[0] ?? {}, separator = route.indexOf(" "), method = route.slice(0, separator);
3
+ let pathname = route.slice(separator + 1);
4
+ if (!["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"].includes(method) || !pathname.startsWith("/"))
5
+ throw Error(`Invalid API route: ${route}`);
6
+ pathname = pathname.replace(/:([\w]+)(\*)?/g, (_match, name, catchAll) => {
7
+ const value = params[name];
8
+ if (!Object.hasOwn(params, name) || value === void 0 || value === "")
9
+ throw Error(`Missing API route parameter: ${name}`);
10
+ return catchAll ? String(value).split("/").map(encodeURIComponent).join("/") : encodeURIComponent(String(value));
11
+ });
12
+ const search = new URLSearchParams;
13
+ for (const [key, value] of Object.entries(query ?? {}))
14
+ if (value !== void 0)
15
+ search.set(key, String(value));
16
+ const response = await fetch(`${baseURL.replace(/\/$/, "")}${pathname}${search.size ? `?${search}` : ""}`, { ...init, method });
17
+ if (!response.ok)
18
+ throw Object.assign(Error(`API request failed: ${response.status} ${method} ${pathname}`), { status: response.status, response });
19
+ if (response.status === 204 || method === "HEAD")
20
+ return;
21
+ return response.json();
22
+ }
@@ -0,0 +1,6 @@
1
+ /** Context passed to opt-in file-based endpoints. */
2
+ export interface ApiHandlerContext {
3
+ params: Record<string, string>;
4
+ }
5
+ /** Preserve a handler's inferred return type for the generated client contract. */
6
+ export declare function defineApiHandler<T>(handler: (request: Request, context: ApiHandlerContext) => T): (request: Request, context: ApiHandlerContext) => T;
@@ -0,0 +1,3 @@
1
+ export function defineApiHandler(handler) {
2
+ return handler;
3
+ }
package/dist/app-shell.js CHANGED
@@ -1,3 +1,4 @@
1
+ import * as __bunCompat from "./_bun-compat.js";
1
2
  var {require}=import.meta;import path from "node:path";
2
3
  import { classifyAllScripts } from "./script-classifier.js";
3
4
  import { startsDocument } from "./document-shell.js";
@@ -22,18 +23,18 @@ export async function detectShell(appDir, shellConfig) {
22
23
  return null;
23
24
  if (shellConfig && typeof shellConfig === "string") {
24
25
  const shellPath = path.resolve(appDir, shellConfig);
25
- if (await Bun.file(shellPath).exists())
26
+ if (await __bunCompat.file(shellPath).exists())
26
27
  return shellPath;
27
28
  return null;
28
29
  }
29
30
  const defaultShellPath = path.join(appDir, "app.stx");
30
- if (await Bun.file(defaultShellPath).exists())
31
+ if (await __bunCompat.file(defaultShellPath).exists())
31
32
  return defaultShellPath;
32
33
  return null;
33
34
  }
34
35
  export async function processShell(shellPath, options) {
35
36
  try {
36
- const content = await Bun.file(shellPath).text();
37
+ const content = await __bunCompat.file(shellPath).text();
37
38
  let shellTemplate = content;
38
39
  const templateMatch = content.match(/<template\b[^>]*>([\s\S]*?)<\/template>/i);
39
40
  if (templateMatch)
@@ -127,6 +128,12 @@ export function stripDocumentWrapper(html, options = {}) {
127
128
  let m;
128
129
  while ((m = styleRegex.exec(headContent)) !== null)
129
130
  headStyles.push(m[0]);
131
+ const dataTag = headContent.match(/<script\b[^>]*data-stx-server-data[^>]*>[\s\S]*?<\/script>/i);
132
+ if (dataTag)
133
+ headStyles.push(dataTag[0]);
134
+ const runtimeTag = headContent.match(/<script\b[^>]*data-stx-runtime-config[^>]*>[\s\S]*?<\/script>/i);
135
+ if (runtimeTag)
136
+ headStyles.push(runtimeTag[0]);
130
137
  }
131
138
  if (options.preserveHead && headMatch) {
132
139
  const headTags = [], tagRegex = /<title\b[^>]*>[\s\S]*?<\/title>|<meta\b[^>]*>|<link\b[^>]*>/gi;
@@ -160,6 +167,7 @@ export function stripDocumentWrapper(html, options = {}) {
160
167
  result = result.replace(/<\/body\s*>/i, "");
161
168
  return result.trim();
162
169
  }
170
+ const COMPONENT_INSTANCE_SCRIPT = /^<script\b[^>]*\sdata-stx-(?:owner|instance)(?=[\s=/>])/i;
163
171
  export function isSpaNavigation(request) {
164
172
  return isSpaNavRequest(request);
165
173
  }
@@ -170,9 +178,12 @@ export function extractContainerContent(html, containerSelector = "main") {
170
178
  let m;
171
179
  while ((m = styleRegex.exec(headContent)) !== null)
172
180
  headStyles.push(m[0]);
173
- const routeParamsRegex = /<script\b[^>]*data-stx-route-params[^>]*>[\s\S]*?<\/script>/gi;
174
- while ((m = routeParamsRegex.exec(headContent)) !== null)
181
+ const routeParamsRegex = /<script\b[^>]*data-stx-(?:route-params|server-data|scoped|component-factories)[^>]*>[\s\S]*?<\/script>/gi;
182
+ while ((m = routeParamsRegex.exec(headContent)) !== null) {
183
+ if (COMPONENT_INSTANCE_SCRIPT.test(m[0]) || m[0].includes("__stx_early_mounts") || /^<script\b[^>]*\bdata-stx-runtime(?=[\s=>])/i.test(m[0]))
184
+ continue;
175
185
  headScripts.push(m[0]);
186
+ }
176
187
  }
177
188
  const containerRegion = findContainerRegion(trimmed, containerSelector);
178
189
  if (!containerRegion)
@@ -189,8 +200,11 @@ export function extractContainerContent(html, containerSelector = "main") {
189
200
  const region = trimmed.slice(start, end);
190
201
  let sm;
191
202
  scriptRe.lastIndex = 0;
192
- while ((sm = scriptRe.exec(region)) !== null)
203
+ while ((sm = scriptRe.exec(region)) !== null) {
204
+ if (COMPONENT_INSTANCE_SCRIPT.test(sm[0]))
205
+ continue;
193
206
  bodyScripts.push(sm[0]);
207
+ }
194
208
  }
195
209
  }
196
210
  const parts = [];
@@ -0,0 +1,30 @@
1
+ import type { StxOptions } from './types';
2
+ export interface ApplicationLayer {
3
+ root: string;
4
+ configFile: string;
5
+ resources: Record<'pages' | 'components' | 'layouts' | 'partials' | 'composables', string>;
6
+ }
7
+ export interface ApplicationLayerGraph {
8
+ /** Highest precedence first: app, first layer and its ancestors, next layer. */
9
+ layers: ApplicationLayer[];
10
+ configDependencies: string[];
11
+ /** Intentional resource overrides, suitable for diagnostics. */
12
+ overrides?: Array<{
13
+ resource: string;
14
+ winner: string;
15
+ shadowed: string;
16
+ }>;
17
+ }
18
+ export declare function isLayerConfigSource(file: string): boolean;
19
+ /** Objects merge recursively; arrays replace except ordered middleware/plugins. */
20
+ export declare function mergeLayerConfig(base: any, override: any, key?: string): any;
21
+ export declare function resolveApplicationLayers(appRoot: string, defaults: StxOptions): Promise<{
22
+ config: StxOptions;
23
+ graph: ApplicationLayerGraph;
24
+ }>;
25
+ export declare function refreshLayerDiagnostics(graph: ApplicationLayerGraph, appRoot: string): Promise<void>;
26
+ export declare function layerDependencies(graph: ApplicationLayerGraph): string[];
27
+ export declare function layerSignature(graph: ApplicationLayerGraph): string;
28
+ export declare function layerConfigSignature(graph: ApplicationLayerGraph): string;
29
+ /** Portable build provenance; no absolute paths or config values. */
30
+ export declare function layerManifest(graph: ApplicationLayerGraph): unknown;