@stacksjs/stx 0.2.571 → 0.2.573

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 (382) 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-f4jh9vrj.js → chunk-0s647d0b.js} +53 -53
  35. package/dist/{chunk-09gtbb1w.js → chunk-1bsafdnt.js} +1 -1
  36. package/dist/{chunk-m6mxqepz.js → chunk-1btr5tme.js} +1 -1
  37. package/dist/{chunk-01mxer9s.js → chunk-2g6wcnna.js} +1 -1
  38. package/dist/{chunk-rrj5m9xv.js → chunk-2hg2bqtj.js} +1 -1
  39. package/dist/{chunk-xckzvbvn.js → chunk-4f0fh2a9.js} +1 -1
  40. package/dist/chunk-557wtdps.js +2 -0
  41. package/dist/{chunk-vr36s2en.js → chunk-58vrf6kh.js} +1 -1
  42. package/dist/{chunk-qzbzn1yf.js → chunk-6tsnz28m.js} +1 -1
  43. package/dist/{chunk-cvswrbzw.js → chunk-6x8cwscv.js} +1 -1
  44. package/dist/{chunk-1n64749x.js → chunk-74ew8ajw.js} +1 -1
  45. package/dist/{chunk-jqefcghh.js → chunk-78d6yyxz.js} +2 -2
  46. package/dist/{chunk-83fdt4yj.js → chunk-824cnbac.js} +1 -1
  47. package/dist/{chunk-ntgy4e1q.js → chunk-864xm0jy.js} +1 -1
  48. package/dist/{chunk-nn174xjh.js → chunk-9fbkdrm8.js} +1 -1
  49. package/dist/{chunk-kzjrgh0b.js → chunk-a3gvw1q2.js} +1 -1
  50. package/dist/{chunk-pqcvh9pp.js → chunk-amtrg7pn.js} +1 -1
  51. package/dist/{chunk-pw9verqx.js → chunk-b5fpsp5n.js} +1 -1
  52. package/dist/{chunk-5afw7z6v.js → chunk-bcjr3fw7.js} +1 -1
  53. package/dist/{chunk-n6qp05t9.js → chunk-bkj0j5se.js} +1 -1
  54. package/dist/{chunk-mzqyv7s5.js → chunk-cf97xdqa.js} +1 -1
  55. package/dist/{chunk-cgwyd9aq.js → chunk-cr67dpx4.js} +1 -1
  56. package/dist/{chunk-f1apaqfk.js → chunk-dpqvacd1.js} +1 -1
  57. package/dist/{chunk-ghy82tsc.js → chunk-et8726at.js} +1 -1
  58. package/dist/{chunk-4bgfpkwx.js → chunk-ev8t5cxk.js} +1 -1
  59. package/dist/{chunk-4ssg5xpq.js → chunk-fynh3bkq.js} +12 -2
  60. package/dist/{chunk-gzgc8zk5.js → chunk-g8757f97.js} +2 -2
  61. package/dist/{chunk-3gft8zng.js → chunk-hm4j4d8q.js} +1 -1
  62. package/dist/{chunk-0bt0fbs1.js → chunk-j9qy9t3t.js} +5 -5
  63. package/dist/{chunk-2a1q5y6r.js → chunk-jhc47xzj.js} +1 -1
  64. package/dist/{chunk-79vdkvhf.js → chunk-kns5m52j.js} +1 -1
  65. package/dist/{chunk-2cqbyb8w.js → chunk-mjpewk4r.js} +1 -1
  66. package/dist/{chunk-2jjff8kv.js → chunk-nj488tj2.js} +2 -2
  67. package/dist/{chunk-dcpf6kas.js → chunk-q9chv68c.js} +1 -1
  68. package/dist/{chunk-xq2ck69k.js → chunk-qm280dp3.js} +1 -1
  69. package/dist/{chunk-ymawe0y5.js → chunk-sjcstv33.js} +1 -1
  70. package/dist/{chunk-tc5r2vmw.js → chunk-t0zdz8kd.js} +1 -1
  71. package/dist/{chunk-jwvzvapp.js → chunk-t3dnak1j.js} +1 -1
  72. package/dist/{chunk-2jsnrfc8.js → chunk-t64nnmmj.js} +1 -1
  73. package/dist/{chunk-m2a1fxpb.js → chunk-tvb8p7c0.js} +1 -1
  74. package/dist/{chunk-6f4qrd0s.js → chunk-tyhgq6rw.js} +1 -1
  75. package/dist/{chunk-4wfr074d.js → chunk-vn7tc8hm.js} +1 -1
  76. package/dist/{chunk-y4ajd836.js → chunk-xy6g8zb9.js} +1 -1
  77. package/dist/{chunk-zddzjd60.js → chunk-ya7xks9t.js} +1 -1
  78. package/dist/chunk-zpz6q2fh.js +2 -0
  79. package/dist/chunk-zxt94g45.js +2 -0
  80. package/dist/{chunk-cyg9w31a.js → chunk-zz7tw07b.js} +1 -1
  81. package/dist/{chunk-ta8bhz27.js → chunk-zzcxacjf.js} +1 -1
  82. package/dist/cli.js +7 -7
  83. package/dist/client/directive.d.ts +0 -7
  84. package/dist/client/index.d.ts +1 -0
  85. package/dist/client/signals-appearance-runtime.d.ts +1 -1
  86. package/dist/client/signals-binding-utils-runtime.d.ts +1 -1
  87. package/dist/client/signals-bootstrap-runtime.d.ts +2 -2
  88. package/dist/client/signals-class-runtime.d.ts +1 -1
  89. package/dist/client/signals-component-api-runtime.d.ts +1 -1
  90. package/dist/client/signals-component-hydration-runtime.d.ts +1 -1
  91. package/dist/client/signals-component-props-runtime.d.ts +1 -1
  92. package/dist/client/signals-conditional-chain-runtime.d.ts +1 -1
  93. package/dist/client/signals-conditional-component-runtime.d.ts +1 -1
  94. package/dist/client/signals-container-cleanup-runtime.d.ts +1 -1
  95. package/dist/client/signals-context-runtime.d.ts +1 -1
  96. package/dist/client/signals-cookie-runtime.d.ts +1 -1
  97. package/dist/client/signals-devtools-runtime.d.ts +1 -1
  98. package/dist/client/signals-dialog-runtime.d.ts +1 -1
  99. package/dist/client/signals-dom-ready-runtime.d.ts +1 -1
  100. package/dist/client/signals-drawer-runtime.d.ts +1 -1
  101. package/dist/client/signals-effect-runtime.d.ts +1 -1
  102. package/dist/client/signals-event-shorthand-runtime.d.ts +1 -1
  103. package/dist/client/signals-expression-compiler-runtime.d.ts +1 -1
  104. package/dist/client/signals-expression-runtime.d.ts +1 -1
  105. package/dist/client/signals-fetch-transport-runtime.d.ts +1 -1
  106. package/dist/client/signals-for-runtime.d.ts +1 -1
  107. package/dist/client/signals-globals-runtime.d.ts +1 -1
  108. package/dist/client/signals-handler-runtime.d.ts +1 -1
  109. package/dist/client/signals-head-runtime.d.ts +1 -1
  110. package/dist/client/signals-helpers-runtime.d.ts +1 -1
  111. package/dist/client/signals-host-runtime.d.ts +1 -1
  112. package/dist/client/signals-hydration-audit-runtime.d.ts +1 -1
  113. package/dist/client/signals-hydration-runtime.d.ts +1 -1
  114. package/dist/client/signals-if-chain-runtime.d.ts +1 -1
  115. package/dist/client/signals-if-runtime.d.ts +1 -1
  116. package/dist/client/signals-lazy-hydration-runtime.d.ts +1 -1
  117. package/dist/client/signals-lifecycle-runtime.d.ts +1 -1
  118. package/dist/client/signals-loop-component-remap-runtime.d.ts +1 -1
  119. package/dist/client/signals-loop-conditional-runtime.d.ts +1 -1
  120. package/dist/client/signals-loop-row-runtime.d.ts +1 -1
  121. package/dist/client/signals-manifest-hydration-runtime.d.ts +1 -1
  122. package/dist/client/signals-model-runtime.d.ts +1 -1
  123. package/dist/client/signals-mount-runtime.d.ts +1 -1
  124. package/dist/client/signals-navigation-runtime.d.ts +1 -1
  125. package/dist/client/signals-notify-runtime.d.ts +1 -1
  126. package/dist/client/signals-optimistic-runtime.d.ts +1 -1
  127. package/dist/client/signals-overlay-runtime.d.ts +1 -1
  128. package/dist/client/signals-pipe-runtime.d.ts +1 -1
  129. package/dist/client/signals-proxy-runtime.d.ts +1 -1
  130. package/dist/client/signals-query-runtime.d.ts +1 -1
  131. package/dist/client/signals-reactive-runtime.d.ts +1 -1
  132. package/dist/client/signals-ref-runtime.d.ts +1 -1
  133. package/dist/client/signals-scope-disposal-runtime.d.ts +1 -1
  134. package/dist/client/signals-scope-traversal-runtime.d.ts +1 -1
  135. package/dist/client/signals-show-runtime.d.ts +1 -1
  136. package/dist/client/signals-spa-load-control-runtime.d.ts +1 -1
  137. package/dist/client/signals-spa-load-runtime.d.ts +1 -1
  138. package/dist/client/signals-state-runtime.d.ts +1 -1
  139. package/dist/client/signals-storage-runtime.d.ts +1 -1
  140. package/dist/client/signals-store-registry-runtime.d.ts +1 -1
  141. package/dist/client/signals-style-runtime.d.ts +1 -1
  142. package/dist/client/signals-suspense-runtime.d.ts +1 -1
  143. package/dist/client/signals-timer-runtime.d.ts +1 -1
  144. package/dist/client/signals-toast-runtime.d.ts +1 -1
  145. package/dist/client/signals-tooltip-runtime.d.ts +1 -1
  146. package/dist/client/signals-transition-group-runtime.d.ts +1 -1
  147. package/dist/client/signals-websocket-runtime.d.ts +1 -1
  148. package/dist/client-helpers.d.ts +1 -312
  149. package/dist/client-module-registry.d.ts +4 -27
  150. package/dist/client-parameter-bindings.d.ts +1 -4
  151. package/dist/client-script-bundler.d.ts +55 -103
  152. package/dist/client-script.d.ts +69 -127
  153. package/dist/color-mode-boot.d.ts +21 -58
  154. package/dist/component-client-factories.d.ts +8 -9
  155. package/dist/component-contract-checks.d.ts +15 -18
  156. package/dist/component-contract.d.ts +6 -6
  157. package/dist/component-hmr.d.ts +8 -7
  158. package/dist/component-model.d.ts +14 -20
  159. package/dist/component-processing.d.ts +51 -59
  160. package/dist/component-registry.d.ts +28 -99
  161. package/dist/component-renderer.d.ts +19 -16
  162. package/dist/component-resolution.d.ts +8 -8
  163. package/dist/component-tags.d.ts +1 -1
  164. package/dist/composable-loader.d.ts +6 -41
  165. package/dist/composables/use-fetch.d.ts +45 -114
  166. package/dist/composables/use-form.d.ts +2 -56
  167. package/dist/composables/use-intersection-observer.d.ts +1 -1
  168. package/dist/composables.d.ts +75 -74
  169. package/dist/composition-api.d.ts +19 -43
  170. package/dist/computed.d.ts +93 -86
  171. package/dist/conditionals.d.ts +0 -24
  172. package/dist/config.d.ts +30 -24
  173. package/dist/config.js +3 -0
  174. package/dist/craft-bridge.d.ts +1 -467
  175. package/dist/craft-components.d.ts +234 -680
  176. package/dist/craft-entry.js +1 -1
  177. package/dist/craft.js +1 -1
  178. package/dist/csp.d.ts +41 -107
  179. package/dist/database.d.ts +1 -1
  180. package/dist/defer.d.ts +0 -24
  181. package/dist/dev-server/terminal-colors.d.ts +32 -32
  182. package/dist/dev-server/ts-css.d.ts +26 -35
  183. package/dist/dev-server/types.d.ts +33 -29
  184. package/dist/directive-api.d.ts +42 -85
  185. package/dist/directive-arguments.d.ts +14 -39
  186. package/dist/document-shell.d.ts +49 -81
  187. package/dist/dynamic-components.d.ts +0 -9
  188. package/dist/engine-bindings.d.ts +1 -1
  189. package/dist/env.d.ts +26 -0
  190. package/dist/error-boundaries.d.ts +36 -43
  191. package/dist/error-handling.d.ts +1 -1
  192. package/dist/errors/codes.d.ts +43 -51
  193. package/dist/errors/formatter.d.ts +38 -58
  194. package/dist/errors/index.d.ts +61 -5
  195. package/dist/errors/logger.d.ts +40 -114
  196. package/dist/errors/sanitizer.d.ts +28 -53
  197. package/dist/errors/types.d.ts +31 -44
  198. package/dist/events.d.ts +32 -94
  199. package/dist/expressions.d.ts +57 -62
  200. package/dist/find-body-tag.d.ts +5 -34
  201. package/dist/first-script-tag.d.ts +0 -23
  202. package/dist/forms-validation.d.ts +117 -149
  203. package/dist/forms.d.ts +161 -120
  204. package/dist/framework-composables.d.ts +0 -32
  205. package/dist/head-injection.d.ts +30 -32
  206. package/dist/head-keys.d.ts +12 -15
  207. package/dist/head.d.ts +110 -139
  208. package/dist/heatmap.d.ts +76 -152
  209. package/dist/html-masking.d.ts +38 -62
  210. package/dist/hydration-runtime.d.ts +24 -20
  211. package/dist/hydration.d.ts +11 -10
  212. package/dist/i18n.d.ts +34 -95
  213. package/dist/image-optimization/auto-sibling.d.ts +4 -32
  214. package/dist/imported-signals.d.ts +0 -36
  215. package/dist/includes.d.ts +6 -69
  216. package/dist/index.d.ts +2 -1
  217. package/dist/init.d.ts +12 -20
  218. package/dist/internal-markdown.d.ts +8 -12
  219. package/dist/interpolation-context.d.ts +15 -15
  220. package/dist/island-chunking.d.ts +13 -30
  221. package/dist/keep-alive.d.ts +52 -72
  222. package/dist/layout-types.d.ts +2 -27
  223. package/dist/lazy-module.d.ts +0 -10
  224. package/dist/loading-indicator.d.ts +8 -5
  225. package/dist/loop-binding.d.ts +4 -7
  226. package/dist/loops.d.ts +25 -67
  227. package/dist/markdown.d.ts +1 -0
  228. package/dist/media/image/component.d.ts +9 -25
  229. package/dist/media/image/directive.d.ts +1 -15
  230. package/dist/media/image/placeholder.d.ts +9 -20
  231. package/dist/media/image/processor/cache.d.ts +18 -40
  232. package/dist/media/image/processor/index.d.ts +10 -1
  233. package/dist/media/image/processor/optimizer.d.ts +1 -12
  234. package/dist/media/image/processor/responsive.d.ts +6 -16
  235. package/dist/media/image/srcset.d.ts +49 -47
  236. package/dist/media/shared/cache.d.ts +31 -51
  237. package/dist/media/shared/hash.d.ts +0 -7
  238. package/dist/media/types.d.ts +754 -1235
  239. package/dist/media/video/directive.d.ts +1 -15
  240. package/dist/media/video/index.d.ts +17 -39
  241. package/dist/media/video/processor/cache.d.ts +19 -42
  242. package/dist/media/video/processor/index.d.ts +18 -1
  243. package/dist/media/video/processor/streaming.d.ts +10 -17
  244. package/dist/media/video/processor/thumbnail.d.ts +15 -21
  245. package/dist/media/video/processor/transcoder.d.ts +1 -11
  246. package/dist/meta-arguments.d.ts +14 -39
  247. package/dist/method-spoofing.d.ts +0 -7
  248. package/dist/middleware.d.ts +0 -60
  249. package/dist/native/bridge/protocol.d.ts +2 -1
  250. package/dist/native/compiler/bundle.js +11 -1
  251. package/dist/native/compiler/headwind-to-style.d.ts +383 -359
  252. package/dist/native/compiler/icons.d.ts +249 -243
  253. package/dist/native/compiler/svg.d.ts +35 -24
  254. package/dist/native/runtime/jsc-globals.d.ts +1 -1
  255. package/dist/native/runtime/native-host.d.ts +1 -1
  256. package/dist/native/runtime/native-host.js +3 -0
  257. package/dist/offline/app-service-worker.d.ts +50 -114
  258. package/dist/offline/kept-store.d.ts +23 -37
  259. package/dist/offline/query-cache.d.ts +55 -126
  260. package/dist/owned-routes.d.ts +0 -31
  261. package/dist/page-response.d.ts +8 -39
  262. package/dist/parser/directive-parser.d.ts +45 -57
  263. package/dist/parser/expression-parser.d.ts +35 -33
  264. package/dist/parser/index.d.ts +39 -4
  265. package/dist/parser/tokenizer.d.ts +49 -61
  266. package/dist/partial-hydration.d.ts +51 -82
  267. package/dist/performance-utils.d.ts +115 -255
  268. package/dist/placeholder.d.ts +9 -18
  269. package/dist/plugin-system.d.ts +115 -264
  270. package/dist/process.d.ts +4 -9
  271. package/dist/process.js +6 -4
  272. package/dist/prop-sentinels.d.ts +11 -11
  273. package/dist/public-env.d.ts +0 -14
  274. package/dist/pwa/directives.d.ts +20 -12
  275. package/dist/pwa/inject.d.ts +0 -10
  276. package/dist/pwa/precache.d.ts +16 -22
  277. package/dist/pwa/service-worker.d.ts +0 -12
  278. package/dist/pwa.js +1 -1
  279. package/dist/reactive-bindings.d.ts +11 -34
  280. package/dist/reactive-tracking.d.ts +0 -36
  281. package/dist/reactive.d.ts +41 -58
  282. package/dist/render-memo.d.ts +5 -23
  283. package/dist/resolve-stx-targets.d.ts +6 -44
  284. package/dist/route-middleware.d.ts +35 -2
  285. package/dist/route-rules.d.ts +10 -13
  286. package/dist/router.d.ts +9 -8
  287. package/dist/routes.d.ts +3 -1
  288. package/dist/runtime-config-server.d.ts +14 -17
  289. package/dist/runtime-config.d.ts +2 -3
  290. package/dist/runtime-globals.d.ts +90 -122
  291. package/dist/runtime-injection.d.ts +0 -8
  292. package/dist/scaffolding.d.ts +30 -26
  293. package/dist/script-emit.d.ts +0 -30
  294. package/dist/script-validation.d.ts +6 -12
  295. package/dist/seo.d.ts +75 -153
  296. package/dist/server-api.d.ts +9 -12
  297. package/dist/server-bindings.d.ts +1 -26
  298. package/dist/server-data.d.ts +4 -5
  299. package/dist/sfc-template.d.ts +8 -8
  300. package/dist/signal-processing.d.ts +37 -53
  301. package/dist/signals-api.d.ts +58 -135
  302. package/dist/signals.d.ts +18 -24
  303. package/dist/site-url.d.ts +31 -28
  304. package/dist/slots.d.ts +20 -86
  305. package/dist/source-signature.d.ts +5 -28
  306. package/dist/ssg.d.ts +158 -337
  307. package/dist/ssg.js +2 -2
  308. package/dist/state-dir.d.ts +4 -4
  309. package/dist/store-loader.d.ts +0 -10
  310. package/dist/story/analytics.d.ts +60 -138
  311. package/dist/story/bookmarks.d.ts +34 -87
  312. package/dist/story/cli.d.ts +69 -123
  313. package/dist/story/collect/scanner.d.ts +0 -4
  314. package/dist/story/collect/tree.d.ts +1 -8
  315. package/dist/story/commands/build.d.ts +6 -11
  316. package/dist/story/commands/dev.d.ts +8 -15
  317. package/dist/story/commands/preview.d.ts +7 -13
  318. package/dist/story/config-watcher.d.ts +13 -20
  319. package/dist/story/config.d.ts +8 -11
  320. package/dist/story/context.d.ts +8 -14
  321. package/dist/story/hmr.d.ts +26 -24
  322. package/dist/story/hot-swap.d.ts +23 -34
  323. package/dist/story/keyboard-shortcuts.d.ts +18 -23
  324. package/dist/story/output.d.ts +44 -46
  325. package/dist/story/performance.d.ts +45 -107
  326. package/dist/story/presets.d.ts +41 -107
  327. package/dist/story/renderer.d.ts +27 -41
  328. package/dist/story/search.d.ts +12 -23
  329. package/dist/story/server.d.ts +11 -21
  330. package/dist/story/setup.d.ts +15 -23
  331. package/dist/story/testing.d.ts +40 -65
  332. package/dist/story/types.d.ts +160 -262
  333. package/dist/streaming.d.ts +57 -119
  334. package/dist/strip-literals.d.ts +1 -25
  335. package/dist/stx-module-imports.d.ts +7 -0
  336. package/dist/stx-virtual-ts.d.ts +102 -253
  337. package/dist/style-scoping.d.ts +8 -21
  338. package/dist/suspense.d.ts +52 -67
  339. package/dist/teleport.d.ts +0 -22
  340. package/dist/template-syntax-escape.d.ts +8 -8
  341. package/dist/template-tag-balance.d.ts +6 -22
  342. package/dist/testing.d.ts +26 -11
  343. package/dist/theme-tokens.d.ts +388 -134
  344. package/dist/transitions.d.ts +55 -66
  345. package/dist/ts-css-config.d.ts +12 -70
  346. package/dist/types/component-types.d.ts +122 -187
  347. package/dist/types/config-types.d.ts +341 -956
  348. package/dist/types/context-types.d.ts +24 -46
  349. package/dist/types/csp-types.d.ts +66 -70
  350. package/dist/types/directive-types.d.ts +156 -223
  351. package/dist/types/index.d.ts +110 -6
  352. package/dist/types/pwa-types.d.ts +148 -273
  353. package/dist/types.d.ts +1 -0
  354. package/dist/unresolved-identifiers.d.ts +22 -24
  355. package/dist/url-safety.d.ts +32 -32
  356. package/dist/utils.d.ts +21 -36
  357. package/dist/validator.d.ts +26 -28
  358. package/dist/variable-extractor.d.ts +19 -49
  359. package/dist/view-composers.d.ts +81 -80
  360. package/dist/virtual-scrolling.d.ts +82 -101
  361. package/dist/visual-testing.d.ts +10 -9
  362. package/dist/vue-template.d.ts +0 -23
  363. package/dist/web-components/css-scoping.d.ts +11 -21
  364. package/dist/web-components.d.ts +58 -81
  365. package/dist/x-element.d.ts +1 -0
  366. package/package.json +6 -6
  367. package/stx.d.ts +2 -2
  368. package/dist/app-service-worker.d.ts +0 -165
  369. package/dist/chunk-49gwmcrn.js +0 -2
  370. package/dist/chunk-6va5pe2m.js +0 -2
  371. package/dist/chunk-bm2q1srp.js +0 -2
  372. package/dist/signals-context-runtime.d.ts +0 -2
  373. package/dist/signals-drawer-runtime.d.ts +0 -2
  374. package/dist/signals-host-runtime.d.ts +0 -9
  375. package/dist/signals-loop-conditional-runtime.d.ts +0 -2
  376. package/dist/signals-manifest-hydration-runtime.d.ts +0 -2
  377. package/dist/signals-notify-runtime.d.ts +0 -2
  378. package/dist/signals-optimistic-runtime.d.ts +0 -2
  379. package/dist/signals-overlay-runtime.d.ts +0 -2
  380. package/dist/signals-scope-disposal-runtime.d.ts +0 -2
  381. package/dist/signals-spa-load-control-runtime.d.ts +0 -2
  382. package/dist/signals-storage-runtime.d.ts +0 -2
package/dist/a11y.d.ts CHANGED
@@ -1,39 +1,4 @@
1
- /**
2
- * Accessibility (A11y) Module
3
- *
4
- * Provides directives and utilities for accessibility compliance:
5
- * - `@a11y('type', 'message')` - Add accessibility hints as HTML comments
6
- * - `@screenReader(...)@endScreenReader` - Screen reader only content
7
- * - `@ariaDescribe('id', 'description')` - Connect elements with descriptions
8
- *
9
- * Also provides automated accessibility checking via `checkA11y()` and
10
- * directory scanning via `scanA11yIssues()`.
11
- *
12
- * ## Accessibility Checks
13
- *
14
- * The automated checker validates:
15
- * - Images have alt attributes
16
- * - Interactive elements have accessible names
17
- * - Form inputs have associated labels
18
- * - Heading hierarchy is maintained
19
- * - Document has lang attribute
20
- * - A right-to-left lang is paired with dir="rtl"
21
- */
22
1
  import type { CustomDirective, StxOptions } from './types';
23
- export interface A11yViolation {
24
- /** Type/category of violation */
25
- type: string;
26
- /** The problematic HTML element */
27
- element: string;
28
- /** Description of the issue */
29
- message: string;
30
- /** Impact level of the violation */
31
- impact: 'critical' | 'serious' | 'moderate' | 'minor';
32
- /** Suggested fix */
33
- help: string;
34
- /** URL to more information */
35
- helpUrl?: string;
36
- }
37
2
  /**
38
3
  * Has this element declared itself decorative rather than semantic?
39
4
  *
@@ -119,33 +84,11 @@ export declare function checkA11yWithRegex(html: string, _filePath: string): A11
119
84
  * ```
120
85
  */
121
86
  export declare function checkA11y(html: string, filePath: string): Promise<A11yViolation[]>;
122
- /** What a scan actually read, alongside what it found. */
123
- export interface A11yScanResult {
124
- /** Files that had at least one violation, mapped to their violations. */
125
- results: Record<string, A11yViolation[]>;
126
- /**
127
- * Every file the scan READ.
128
- *
129
- * Reported separately because "no violations" and "no files" are different
130
- * answers that used to be the same one: `results` only ever contains files
131
- * WITH violations, so an empty map means both "everything is clean" and
132
- * "nothing was scanned", and the success banner was printed for both
133
- * (stacksjs/stx#1918).
134
- */
135
- scannedFiles: string[];
136
- }
137
- /**
138
- * Scan a directory, a file, or a glob for accessibility issues.
139
- *
140
- * The argument used to be joined into a scan pattern, so only a directory
141
- * worked: a file path became `<file>/**` + `/*.stx` and a glob became a doubled
87
+ /*.stx` and a glob became a doubled
142
88
  * pattern, both matching nothing and both reported as a clean pass. See
143
89
  * `resolve-stx-targets.ts` for what that cost.
144
90
  */
145
- export declare function scanA11yTargets(target: string | readonly string[], options?: {
146
- recursive?: boolean;
147
- ignorePaths?: string[];
148
- }): Promise<A11yScanResult>;
91
+ export declare function scanA11yTargets(target: string | readonly string[], options?: { recursive?: boolean, ignorePaths?: string[] }): Promise<A11yScanResult>;
149
92
  /**
150
93
  * Back-compatible wrapper: violations only.
151
94
  *
@@ -153,51 +96,7 @@ export declare function scanA11yTargets(target: string | readonly string[], opti
153
96
  * anything — which is the distinction #1918 turned on. Prefer
154
97
  * {@link scanA11yTargets}.
155
98
  */
156
- export declare function scanA11yIssues(directory: string, options?: {
157
- recursive?: boolean;
158
- ignorePaths?: string[];
159
- }): Promise<Record<string, A11yViolation[]>>;
160
- /**
161
- * Auto-fix result
162
- */
163
- export interface A11yFixResult {
164
- /** Original HTML */
165
- original: string;
166
- /** Fixed HTML */
167
- fixed: string;
168
- /** Number of fixes applied */
169
- fixCount: number;
170
- /** Details of each fix */
171
- fixes: Array<{
172
- type: string;
173
- description: string;
174
- before: string;
175
- after: string;
176
- }>;
177
- }
178
- /**
179
- * Auto-fix configuration
180
- */
181
- export interface A11yAutoFixConfig {
182
- /** Fix images without alt text by adding empty alt="" */
183
- fixMissingAlt?: boolean;
184
- /** Fix buttons/links without accessible names by adding aria-label */
185
- fixMissingLabels?: boolean;
186
- /** Fix form inputs without labels by adding aria-label */
187
- fixMissingFormLabels?: boolean;
188
- /** Fix tables without headers by adding scope attribute */
189
- fixTableHeaders?: boolean;
190
- /** Add lang attribute to html element */
191
- fixMissingLang?: boolean;
192
- /** Add dir="rtl" when the html element's lang is a right-to-left language */
193
- fixMissingDir?: boolean;
194
- /** Fix positive tabindex values */
195
- fixPositiveTabindex?: boolean;
196
- /** Fix custom buttons without tabindex */
197
- fixButtonFocusable?: boolean;
198
- /** Default language for lang attribute */
199
- defaultLang?: string;
200
- }
99
+ export declare function scanA11yIssues(directory: string, options?: { recursive?: boolean, ignorePaths?: string[] }): Promise<Record<string, A11yViolation[]>>;
201
100
  /**
202
101
  * Auto-fix accessibility issues in HTML content.
203
102
  *
@@ -237,11 +136,15 @@ export declare function autoFixA11yFile(filePath: string, config?: A11yAutoFixCo
237
136
  * @returns Map of file paths to fix results
238
137
  */
239
138
  export declare function autoFixA11yDirectory(directory: string, config?: A11yAutoFixConfig, options?: {
240
- recursive?: boolean;
241
- ignorePaths?: string[];
242
- writeBack?: boolean;
243
- extensions?: string[];
244
- }): Promise<Record<string, A11yFixResult>>;
139
+ recursive?: boolean
140
+ ignorePaths?: string[]
141
+ writeBack?: boolean
142
+ extensions?: string[]
143
+ }): Promise<Record<string, A11yFixResult>>;
144
+ /**
145
+ * Register all a11y directives
146
+ */
147
+ export declare function registerA11yDirectives(): CustomDirective[];
245
148
  /**
246
149
  * A11y directive for adding accessibility hints
247
150
  */
@@ -250,7 +153,44 @@ export declare const a11yDirective: CustomDirective;
250
153
  * Screen reader directive for screen reader only content
251
154
  */
252
155
  export declare const screenReaderDirective: CustomDirective;
156
+ export declare interface A11yViolation {
157
+ type: string
158
+ element: string
159
+ message: string
160
+ impact: 'critical' | 'serious' | 'moderate' | 'minor'
161
+ help: string
162
+ helpUrl?: string
163
+ }
164
+ /** What a scan actually read, alongside what it found. */
165
+ export declare interface A11yScanResult {
166
+ results: Record<string, A11yViolation[]>
167
+ scannedFiles: string[]
168
+ }
253
169
  /**
254
- * Register all a11y directives
170
+ * Auto-fix result
255
171
  */
256
- export declare function registerA11yDirectives(): CustomDirective[];
172
+ export declare interface A11yFixResult {
173
+ original: string
174
+ fixed: string
175
+ fixCount: number
176
+ fixes: Array<{
177
+ type: string
178
+ description: string
179
+ before: string
180
+ after: string
181
+ }>
182
+ }
183
+ /**
184
+ * Auto-fix configuration
185
+ */
186
+ export declare interface A11yAutoFixConfig {
187
+ fixMissingAlt?: boolean
188
+ fixMissingLabels?: boolean
189
+ fixMissingFormLabels?: boolean
190
+ fixTableHeaders?: boolean
191
+ fixMissingLang?: boolean
192
+ fixMissingDir?: boolean
193
+ fixPositiveTabindex?: boolean
194
+ fixButtonFocusable?: boolean
195
+ defaultLang?: string
196
+ }
@@ -1,42 +1,81 @@
1
1
  import type { CustomDirective, StxOptions } from './types';
2
2
  /**
3
- * Available transition types that can be used with @transition directive
3
+ * Generates CSS for transitions based on provided parameters
4
+ */
5
+ declare function generateTransitionCSS(type: TransitionType, options?: {
6
+ duration?: number
7
+ delay?: number
8
+ ease?: TransitionEase
9
+ direction?: TransitionDirection
10
+ custom?: string
11
+ }): string;
12
+ /**
13
+ * Generates necessary script to handle motion preferences
14
+ *
15
+ * Every script in this module now states its re-run behaviour with
16
+ * `data-stx-run`, rather than letting the router infer it from the first
17
+ * character of the body (#1828).
18
+ *
19
+ * The split is whether the script resolves its targets at RUN time.
20
+ *
21
+ * `always` for the scroll observer, the animation group, and the per-container
22
+ * stagger and timeline scripts. Each queries the document when it runs —
23
+ * `.stx-observe`, a selector list, a container id — so a page swapped in later
24
+ * only gets animated if the script runs again. The scroll observer and the
25
+ * group script also REMOVE the `stx-out` class that hides their elements, so
26
+ * skipping them does not merely drop an animation: the content stays hidden.
27
+ * These two were already being deduped under the old sniff, because their
28
+ * bodies open with a comment, so that is a real bug this fixes rather than
29
+ * preserves. The cost is one extra IntersectionObserver per navigation, which
30
+ * is the cheaper side of the trade.
31
+ *
32
+ * `once` for motion preferences and the runtime registry, which write to
33
+ * `document.documentElement` and to `window.__stxAnimation` — both survive an
34
+ * SPA navigation, so re-running only re-installs a matchMedia listener.
35
+ */
36
+ declare function generateMotionPreferencesScript(): string;
37
+ /**
38
+ * Animation Group handling for coordinated animations
39
+ */
40
+ declare function generateAnimationGroup(groupName: string, elements: string[], options?: { staggerDelay?: number, sequence?: boolean }): string;
41
+ /**
42
+ * Process animation directives in the template
4
43
  */
5
- export declare enum TransitionType {
6
- Fade = "fade",
7
- Slide = "slide",
8
- Scale = "scale",
9
- Flip = "flip",
10
- Rotate = "rotate",
11
- Custom = "custom"
12
- }
44
+ // eslint-disable-next-line pickier/no-unused-vars
45
+ export declare function processAnimationDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions): string;
13
46
  /**
14
- * Available transition directions that can be used with @transition directive
47
+ * Calculate spring animation CSS
15
48
  */
16
- export declare enum TransitionDirection {
17
- In = "in",
18
- Out = "out",
19
- Both = "both"
20
- }
49
+ declare function calculateSpringCurve(config: SpringConfig): string;
21
50
  /**
22
- * Available ease functions for transitions
51
+ * Create an animation timeline for coordinated animations
23
52
  */
24
- export declare enum TransitionEase {
25
- Linear = "linear",
26
- Ease = "ease",
27
- EaseIn = "ease-in",
28
- EaseOut = "ease-out",
29
- EaseInOut = "ease-in-out",
30
- Spring = "spring"
31
- }
53
+ export declare function createAnimationTimeline(entries: TimelineEntry[]): string;
54
+ /**
55
+ * Generate CSS for a custom animation
56
+ */
57
+ export declare function generateAnimationCSS(name: string, keyframes: Keyframe[], options: KeyframeAnimationOptions): string;
58
+ /**
59
+ * Parse animation shorthand string
60
+ * Format: "duration [delay] [easing] [iterations] [direction] [fill]"
61
+ */
62
+ export declare function parseAnimationShorthand(shorthand: string): KeyframeAnimationOptions;
63
+ /**
64
+ * Generate client-side animation runtime
65
+ */
66
+ export declare function generateAnimationRuntime(): string;
67
+ /**
68
+ * Register animation directives
69
+ */
70
+ export declare function registerAnimationDirectives(options: StxOptions): StxOptions;
32
71
  /**
33
72
  * Default transition options
34
73
  */
35
74
  export declare const DEFAULT_TRANSITION_OPTIONS: {
36
- duration: number;
37
- delay: number;
38
- ease: string;
39
- direction: string;
75
+ duration: number
76
+ delay: number
77
+ ease: string
78
+ direction: string
40
79
  };
41
80
  /**
42
81
  * Transition directive for applying transitions to elements
@@ -55,38 +94,19 @@ export declare const animationGroupDirective: CustomDirective;
55
94
  */
56
95
  export declare const motionDirective: CustomDirective;
57
96
  /**
58
- * Process animation directives in the template
97
+ * Preset spring configurations
98
+ * @defaultValue
99
+ * ```ts
100
+ * {
101
+ * default: { stiffness: 100, damping: 10, mass: 1 },
102
+ * gentle: { stiffness: 120, damping: 14, mass: 1 },
103
+ * wobbly: { stiffness: 180, damping: 12, mass: 1 },
104
+ * stiff: { stiffness: 210, damping: 20, mass: 1 },
105
+ * slow: { stiffness: 280, damping: 60, mass: 1 },
106
+ * molasses: { stiffness: 280, damping: 120, mass: 1 }
107
+ * }
108
+ * ```
59
109
  */
60
- export declare function processAnimationDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions): string;
61
- /** Keyframe definition */
62
- export interface Keyframe {
63
- offset?: number;
64
- properties: Record<string, string | number>;
65
- easing?: string;
66
- }
67
- /** Animation timeline entry */
68
- export interface TimelineEntry {
69
- selector: string;
70
- keyframes: Keyframe[];
71
- options: KeyframeAnimationOptions;
72
- }
73
- /** Keyframe animation options */
74
- export interface KeyframeAnimationOptions {
75
- duration: number;
76
- delay?: number;
77
- easing?: string;
78
- iterations?: number | 'infinite';
79
- direction?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
80
- fill?: 'none' | 'forwards' | 'backwards' | 'both';
81
- }
82
- /** Spring animation config */
83
- export interface SpringConfig {
84
- stiffness: number;
85
- damping: number;
86
- mass: number;
87
- velocity?: number;
88
- }
89
- /** Preset spring configurations */
90
110
  export declare const SPRING_PRESETS: Record<string, SpringConfig>;
91
111
  /**
92
112
  * @keyframe directive for custom keyframe animations
@@ -100,24 +120,61 @@ export declare const staggerDirective: CustomDirective;
100
120
  * @spring directive for spring physics animations
101
121
  */
102
122
  export declare const springDirective: CustomDirective;
123
+ /** Keyframe definition */
124
+ export declare interface Keyframe {
125
+ offset?: number
126
+ properties: Record<string, string | number>
127
+ easing?: string
128
+ }
129
+ /** Animation timeline entry */
130
+ export declare interface TimelineEntry {
131
+ selector: string
132
+ keyframes: Keyframe[]
133
+ options: KeyframeAnimationOptions
134
+ }
135
+ /** Keyframe animation options */
136
+ export declare interface KeyframeAnimationOptions {
137
+ duration: number
138
+ delay?: number
139
+ easing?: string
140
+ iterations?: number | 'infinite'
141
+ direction?: 'normal' | 'reverse' | 'alternate' | 'alternate-reverse'
142
+ fill?: 'none' | 'forwards' | 'backwards' | 'both'
143
+ }
144
+ /** Spring animation config */
145
+ export declare interface SpringConfig {
146
+ stiffness: number
147
+ damping: number
148
+ mass: number
149
+ velocity?: number
150
+ }
103
151
  /**
104
- * Create an animation timeline for coordinated animations
105
- */
106
- export declare function createAnimationTimeline(entries: TimelineEntry[]): string;
107
- /**
108
- * Generate CSS for a custom animation
109
- */
110
- export declare function generateAnimationCSS(name: string, keyframes: Keyframe[], options: KeyframeAnimationOptions): string;
111
- /**
112
- * Parse animation shorthand string
113
- * Format: "duration [delay] [easing] [iterations] [direction] [fill]"
152
+ * Available transition types that can be used with @transition directive
114
153
  */
115
- export declare function parseAnimationShorthand(shorthand: string): KeyframeAnimationOptions;
154
+ export declare enum TransitionType {
155
+ Fade = 'fade',
156
+ Slide = 'slide',
157
+ Scale = 'scale',
158
+ Flip = 'flip',
159
+ Rotate = 'rotate',
160
+ Custom = 'custom',
161
+ }
116
162
  /**
117
- * Generate client-side animation runtime
163
+ * Available transition directions that can be used with @transition directive
118
164
  */
119
- export declare function generateAnimationRuntime(): string;
165
+ export declare enum TransitionDirection {
166
+ In = 'in',
167
+ Out = 'out',
168
+ Both = 'both',
169
+ }
120
170
  /**
121
- * Register animation directives
171
+ * Available ease functions for transitions
122
172
  */
123
- export declare function registerAnimationDirectives(options: StxOptions): StxOptions;
173
+ export declare enum TransitionEase {
174
+ Linear = 'linear',
175
+ Ease = 'ease',
176
+ EaseIn = 'ease-in',
177
+ EaseOut = 'ease-out',
178
+ EaseInOut = 'ease-in-out',
179
+ Spring = 'spring',
180
+ }
@@ -1,26 +1,16 @@
1
+ /** Typed JSON fetch. Example: apiFetch('GET /api/users/:id', { params: { id: '42' } }). */
2
+ export declare function apiFetch<K extends ApiRouteKey>(route: K, ...args: {} extends Params<K> ? [options?: ApiFetchOptions<K>] : [options: ApiFetchOptions<K> & { params: Params<K> }]): Promise<ApiResponse<K>>;
1
3
  /** Augmented by .stx/api-types.d.ts. This module has no server imports. */
2
- export interface KnownApiRoutes {
3
- }
4
+ export declare interface KnownApiRoutes {}
4
5
  export type ApiMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
5
6
  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>;
7
+ declare type Params<K extends ApiRouteKey> = K extends keyof KnownApiRoutes ? KnownApiRoutes[K] extends { params: infer P } ? P : never : Record<string, string>;
9
8
  /** 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;
9
+ export type ApiJson<T> = T extends Response ? unknown : T extends Date ? string : T extends bigint | symbol | ((...args: any[]) => any) ? never : T extends object ? { [K in keyof T]: ApiJson<T[K]> } : T;
10
+ export type ApiResponse<K extends ApiRouteKey> = K extends keyof KnownApiRoutes ? KnownApiRoutes[K] extends { response: infer R } ? ApiJson<R> : unknown : unknown;
16
11
  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 {};
12
+ params?: Params<K>
13
+ query?: Record<string, string | number | boolean | undefined>
14
+ /** Useful for server-side callers. Browser calls default to the current origin. */
15
+ baseURL?: string
16
+ }
@@ -1,6 +1,6 @@
1
- /** Context passed to opt-in file-based endpoints. */
2
- export interface ApiHandlerContext {
3
- params: Record<string, string>;
4
- }
5
1
  /** Preserve a handler's inferred return type for the generated client contract. */
6
2
  export declare function defineApiHandler<T>(handler: (request: Request, context: ApiHandlerContext) => T): (request: Request, context: ApiHandlerContext) => T;
3
+ /** Context passed to opt-in file-based endpoints. */
4
+ export declare interface ApiHandlerContext {
5
+ params: Record<string, string>
6
+ }
@@ -1,82 +1,21 @@
1
1
  /**
2
- * Declarative pre-paint appearance bootstrapping.
3
- *
4
- * Client composables apply appearance reactively after mount, but that is too
5
- * late for the first paint. This directive emits a compiler-owned synchronous
6
- * script at the directive location so persisted root attributes and the dark
7
- * class are present before the browser parses the application shell.
8
- *
9
- * @example
10
- * ```stx
11
- * @appearanceBootstrap({
12
- * storageKey: 'app-appearance',
13
- * appearance: {
14
- * key: 'sidebarStyle',
15
- * attribute: 'appearance',
16
- * allowed: ['macos', 'arc'],
17
- * default: 'macos',
18
- * },
19
- * colorMode: {
20
- * key: 'colorMode',
21
- * attribute: 'color-mode',
22
- * default: 'system',
23
- * },
24
- * })
25
- * ```
2
+ * Transform every `@appearanceBootstrap({...})` directive in a template.
26
3
  */
27
- export interface AppearanceBootstrapValue {
28
- /** Property read from the persisted JSON object. */
29
- key: string;
30
- /** Root data attribute name without the `data-` prefix. */
31
- attribute: string;
32
- /** Persisted values accepted by the bootstrap. */
33
- allowed: string[];
34
- /** Value used when storage is absent, malformed, or outside the allowlist. */
35
- default: string;
4
+ export declare function processAppearanceBootstrapDirective(template: string, context: Record<string, unknown>): string;
5
+ export declare interface AppearanceBootstrapValue {
6
+ key: string
7
+ attribute: string
8
+ allowed: string[]
9
+ default: string
36
10
  }
37
- export interface ColorModeBootstrapValue {
38
- /** Property read from the persisted JSON object. */
39
- key: string;
40
- /** Root data attribute name without the `data-` prefix. */
41
- attribute: string;
42
- /** Mode used when storage is absent or malformed. */
43
- default: 'light' | 'dark' | 'system';
11
+ export declare interface ColorModeBootstrapValue {
12
+ key: string
13
+ attribute: string
14
+ default: 'light' | 'dark' | 'system'
44
15
  }
45
- export interface AppearanceBootstrapOptions {
46
- /**
47
- * localStorage key holding the persisted preference.
48
- *
49
- * Read as a JSON object, and also as a bare `'light'` / `'dark'` /
50
- * `'system'` string, which is what `useColorMode` writes under its own
51
- * `storageKey` and the overwhelmingly common shape in existing apps.
52
- */
53
- storageKey: string;
54
- /**
55
- * A second axis beside colour mode, such as a sidebar style.
56
- *
57
- * Optional: colour mode is the common case and this is the specialised one,
58
- * so an app that themes only light/dark leaves it out rather than inventing
59
- * a single-valued axis to satisfy the normalizer and then carrying a
60
- * meaningless `data-*` attribute on every page (stacksjs/stx#2050).
61
- */
62
- appearance?: AppearanceBootstrapValue;
63
- colorMode: ColorModeBootstrapValue;
64
- /**
65
- * Leave an attribute alone when it already carries a concrete value, and
66
- * resolve to that instead of to what is stored. @default false
67
- *
68
- * For a page whose theme is not the visitor's to choose: stamped
69
- * server-side during render, it has to outrank whatever they stored from
70
- * their own browsing. Without this the bootstrap resolved purely from
71
- * storage and stamped unconditionally (stacksjs/stx#2050).
72
- *
73
- * `system` is not concrete: it is an instruction to resolve rather than an
74
- * answer, so the stored preference still wins for it. For the appearance
75
- * axis, concrete means a value in `allowed`.
76
- */
77
- respectExisting?: boolean;
16
+ export declare interface AppearanceBootstrapOptions {
17
+ storageKey: string
18
+ appearance?: AppearanceBootstrapValue
19
+ colorMode: ColorModeBootstrapValue
20
+ respectExisting?: boolean
78
21
  }
79
- /**
80
- * Transform every `@appearanceBootstrap({...})` directive in a template.
81
- */
82
- export declare function processAppearanceBootstrapDirective(template: string, context: Record<string, unknown>): string;
@@ -1,30 +1,21 @@
1
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
2
  export declare function isLayerConfigSource(file: string): boolean;
19
3
  /** Objects merge recursively; arrays replace except ordered middleware/plugins. */
20
4
  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
- }>;
5
+ export declare function resolveApplicationLayers(appRoot: string, defaults: StxOptions): Promise<{ config: StxOptions, graph: ApplicationLayerGraph }>;
25
6
  export declare function refreshLayerDiagnostics(graph: ApplicationLayerGraph, appRoot: string): Promise<void>;
26
7
  export declare function layerDependencies(graph: ApplicationLayerGraph): string[];
27
8
  export declare function layerSignature(graph: ApplicationLayerGraph): string;
28
9
  export declare function layerConfigSignature(graph: ApplicationLayerGraph): string;
29
10
  /** Portable build provenance; no absolute paths or config values. */
30
11
  export declare function layerManifest(graph: ApplicationLayerGraph): unknown;
12
+ export declare interface ApplicationLayer {
13
+ root: string
14
+ configFile: string
15
+ resources: Record<'pages' | 'components' | 'layouts' | 'partials' | 'composables', string>
16
+ }
17
+ export declare interface ApplicationLayerGraph {
18
+ layers: ApplicationLayer[]
19
+ configDependencies: string[]
20
+ overrides?: Array<{ resource: string, winner: string, shadowed: string }>
21
+ }
@@ -1,32 +1,12 @@
1
- /**
2
- * The conventional asset root, shared by the serve path and every build path.
3
- *
4
- * `serve()` resolves `/assets/*` from `resources/assets/*` as well as from
5
- * `publicDir` — the Stacks/Laravel-style layout that `buddy make:*` produces.
6
- * No build path had ever heard of it: they copy `publicDir` and nothing else.
7
- *
8
- * So `<script src="/assets/scripts/site-mode.js">` resolved under `stx dev` and
9
- * 404'd in `dist/`, with nothing in the build reporting it. The only way to
10
- * notice was to diff the build output against the served tree
11
- * (stacksjs/stx#1876).
12
- *
13
- * It lives here rather than in one of the three builders because there are
14
- * three of them — ssg.ts, site-builder/build.ts and production-builder.ts —
15
- * each with its own copy mechanism, and a convention restated three times is
16
- * one that will be fixed in one place and left behind in the others.
17
- *
18
- * @module asset-roots
19
- */
20
- /**
21
- * Directory whose contents are served at `/assets/*`, in addition to
22
- * `publicDir`. Relative to the project root, and deliberately not a config
23
- * option — it mirrors what `serve()` hardcodes.
24
- */
25
- export declare const CONVENTIONAL_ASSET_ROOT = "resources/assets";
26
- /** Where its contents must land so `/assets/*` resolves in built output. */
27
- export declare const CONVENTIONAL_ASSET_OUTPUT = "assets";
28
1
  /**
29
2
  * Absolute path to the conventional asset root, or `null` when the project
30
3
  * does not use that layout.
31
4
  */
32
5
  export declare function resolveConventionalAssetRoot(root?: string): string | null;
6
+ /*`, in addition to
7
+ * `publicDir`. Relative to the project root, and deliberately not a config
8
+ * option — it mirrors what `serve()` hardcodes.
9
+ */
10
+ export declare const CONVENTIONAL_ASSET_ROOT: 'resources/assets';
11
+ /*` resolves in built output. */
12
+ export declare const CONVENTIONAL_ASSET_OUTPUT: 'assets';