@stacksjs/stx 0.2.572 → 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 (381) 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-s34g3awk.js → chunk-fynh3bkq.js} +1 -1
  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/headwind-to-style.d.ts +383 -359
  251. package/dist/native/compiler/icons.d.ts +249 -243
  252. package/dist/native/compiler/svg.d.ts +35 -24
  253. package/dist/native/runtime/jsc-globals.d.ts +1 -1
  254. package/dist/native/runtime/native-host.d.ts +1 -1
  255. package/dist/native/runtime/native-host.js +3 -0
  256. package/dist/offline/app-service-worker.d.ts +50 -114
  257. package/dist/offline/kept-store.d.ts +23 -37
  258. package/dist/offline/query-cache.d.ts +55 -126
  259. package/dist/owned-routes.d.ts +0 -31
  260. package/dist/page-response.d.ts +8 -39
  261. package/dist/parser/directive-parser.d.ts +45 -57
  262. package/dist/parser/expression-parser.d.ts +35 -33
  263. package/dist/parser/index.d.ts +39 -4
  264. package/dist/parser/tokenizer.d.ts +49 -61
  265. package/dist/partial-hydration.d.ts +51 -82
  266. package/dist/performance-utils.d.ts +115 -255
  267. package/dist/placeholder.d.ts +9 -18
  268. package/dist/plugin-system.d.ts +115 -264
  269. package/dist/process.d.ts +4 -9
  270. package/dist/process.js +6 -4
  271. package/dist/prop-sentinels.d.ts +11 -11
  272. package/dist/public-env.d.ts +0 -14
  273. package/dist/pwa/directives.d.ts +20 -12
  274. package/dist/pwa/inject.d.ts +0 -10
  275. package/dist/pwa/precache.d.ts +16 -22
  276. package/dist/pwa/service-worker.d.ts +0 -12
  277. package/dist/pwa.js +1 -1
  278. package/dist/reactive-bindings.d.ts +11 -34
  279. package/dist/reactive-tracking.d.ts +0 -36
  280. package/dist/reactive.d.ts +41 -58
  281. package/dist/render-memo.d.ts +5 -23
  282. package/dist/resolve-stx-targets.d.ts +6 -44
  283. package/dist/route-middleware.d.ts +35 -2
  284. package/dist/route-rules.d.ts +10 -13
  285. package/dist/router.d.ts +9 -8
  286. package/dist/routes.d.ts +3 -1
  287. package/dist/runtime-config-server.d.ts +14 -17
  288. package/dist/runtime-config.d.ts +2 -3
  289. package/dist/runtime-globals.d.ts +90 -122
  290. package/dist/runtime-injection.d.ts +0 -8
  291. package/dist/scaffolding.d.ts +30 -26
  292. package/dist/script-emit.d.ts +0 -30
  293. package/dist/script-validation.d.ts +6 -12
  294. package/dist/seo.d.ts +75 -153
  295. package/dist/server-api.d.ts +9 -12
  296. package/dist/server-bindings.d.ts +1 -26
  297. package/dist/server-data.d.ts +4 -5
  298. package/dist/sfc-template.d.ts +8 -8
  299. package/dist/signal-processing.d.ts +37 -53
  300. package/dist/signals-api.d.ts +58 -135
  301. package/dist/signals.d.ts +18 -24
  302. package/dist/site-url.d.ts +31 -28
  303. package/dist/slots.d.ts +20 -86
  304. package/dist/source-signature.d.ts +5 -28
  305. package/dist/ssg.d.ts +158 -337
  306. package/dist/ssg.js +2 -2
  307. package/dist/state-dir.d.ts +4 -4
  308. package/dist/store-loader.d.ts +0 -10
  309. package/dist/story/analytics.d.ts +60 -138
  310. package/dist/story/bookmarks.d.ts +34 -87
  311. package/dist/story/cli.d.ts +69 -123
  312. package/dist/story/collect/scanner.d.ts +0 -4
  313. package/dist/story/collect/tree.d.ts +1 -8
  314. package/dist/story/commands/build.d.ts +6 -11
  315. package/dist/story/commands/dev.d.ts +8 -15
  316. package/dist/story/commands/preview.d.ts +7 -13
  317. package/dist/story/config-watcher.d.ts +13 -20
  318. package/dist/story/config.d.ts +8 -11
  319. package/dist/story/context.d.ts +8 -14
  320. package/dist/story/hmr.d.ts +26 -24
  321. package/dist/story/hot-swap.d.ts +23 -34
  322. package/dist/story/keyboard-shortcuts.d.ts +18 -23
  323. package/dist/story/output.d.ts +44 -46
  324. package/dist/story/performance.d.ts +45 -107
  325. package/dist/story/presets.d.ts +41 -107
  326. package/dist/story/renderer.d.ts +27 -41
  327. package/dist/story/search.d.ts +12 -23
  328. package/dist/story/server.d.ts +11 -21
  329. package/dist/story/setup.d.ts +15 -23
  330. package/dist/story/testing.d.ts +40 -65
  331. package/dist/story/types.d.ts +160 -262
  332. package/dist/streaming.d.ts +57 -119
  333. package/dist/strip-literals.d.ts +1 -25
  334. package/dist/stx-module-imports.d.ts +7 -0
  335. package/dist/stx-virtual-ts.d.ts +102 -253
  336. package/dist/style-scoping.d.ts +8 -21
  337. package/dist/suspense.d.ts +52 -67
  338. package/dist/teleport.d.ts +0 -22
  339. package/dist/template-syntax-escape.d.ts +8 -8
  340. package/dist/template-tag-balance.d.ts +6 -22
  341. package/dist/testing.d.ts +26 -11
  342. package/dist/theme-tokens.d.ts +388 -134
  343. package/dist/transitions.d.ts +55 -66
  344. package/dist/ts-css-config.d.ts +12 -70
  345. package/dist/types/component-types.d.ts +122 -187
  346. package/dist/types/config-types.d.ts +341 -956
  347. package/dist/types/context-types.d.ts +24 -46
  348. package/dist/types/csp-types.d.ts +66 -70
  349. package/dist/types/directive-types.d.ts +156 -223
  350. package/dist/types/index.d.ts +110 -6
  351. package/dist/types/pwa-types.d.ts +148 -273
  352. package/dist/types.d.ts +1 -0
  353. package/dist/unresolved-identifiers.d.ts +22 -24
  354. package/dist/url-safety.d.ts +32 -32
  355. package/dist/utils.d.ts +21 -36
  356. package/dist/validator.d.ts +26 -28
  357. package/dist/variable-extractor.d.ts +19 -49
  358. package/dist/view-composers.d.ts +81 -80
  359. package/dist/virtual-scrolling.d.ts +82 -101
  360. package/dist/visual-testing.d.ts +10 -9
  361. package/dist/vue-template.d.ts +0 -23
  362. package/dist/web-components/css-scoping.d.ts +11 -21
  363. package/dist/web-components.d.ts +58 -81
  364. package/dist/x-element.d.ts +1 -0
  365. package/package.json +6 -6
  366. package/stx.d.ts +2 -2
  367. package/dist/app-service-worker.d.ts +0 -165
  368. package/dist/chunk-49gwmcrn.js +0 -2
  369. package/dist/chunk-6va5pe2m.js +0 -2
  370. package/dist/chunk-bm2q1srp.js +0 -2
  371. package/dist/signals-context-runtime.d.ts +0 -2
  372. package/dist/signals-drawer-runtime.d.ts +0 -2
  373. package/dist/signals-host-runtime.d.ts +0 -9
  374. package/dist/signals-loop-conditional-runtime.d.ts +0 -2
  375. package/dist/signals-manifest-hydration-runtime.d.ts +0 -2
  376. package/dist/signals-notify-runtime.d.ts +0 -2
  377. package/dist/signals-optimistic-runtime.d.ts +0 -2
  378. package/dist/signals-overlay-runtime.d.ts +0 -2
  379. package/dist/signals-scope-disposal-runtime.d.ts +0 -2
  380. package/dist/signals-spa-load-control-runtime.d.ts +0 -2
  381. package/dist/signals-storage-runtime.d.ts +0 -2
@@ -1,396 +1,235 @@
1
- /**
2
- * Configuration Types for stx
3
- */
4
1
  import type { ColorModeBootConfig } from '../color-mode-boot';
5
- import type { CustomDirective, Middleware } from './directive-types';
6
2
  import type { ComponentConfig, DocGeneratorConfig, WebComponentConfig } from './component-types';
7
- import type { PwaConfig } from './pwa-types';
8
3
  import type { CspConfig } from './csp-types';
4
+ import type { CustomDirective, Middleware } from './directive-types';
9
5
  import type { HeatmapConfig } from '../heatmap';
10
6
  import type { MediaConfig } from '../media/types';
7
+ import type { PwaConfig } from './pwa-types';
11
8
  import type { RouteRules } from '../route-rules';
12
9
  import type { ServerApiOptions } from '../server-api';
13
10
  /**
14
11
  * Internationalization (i18n) configuration
15
12
  */
16
- export interface I18nConfig {
17
- /** Default locale to use when translation is not found */
18
- defaultLocale: string;
19
- /** Current locale */
20
- locale: string;
21
- /** Path to directory containing translation files */
22
- translationsDir: string;
23
- /** Format of translation files (json, yaml, yml, or js) */
24
- format: 'json' | 'yaml' | 'yml' | 'js';
25
- /** Whether to fallback to the key when translation is not found */
26
- fallbackToKey: boolean;
27
- /** Cache translations in memory */
28
- cache: boolean;
13
+ export declare interface I18nConfig {
14
+ defaultLocale: string
15
+ locale: string
16
+ translationsDir: string
17
+ format: 'json' | 'yaml' | 'yml' | 'js'
18
+ fallbackToKey: boolean
19
+ cache: boolean
29
20
  }
30
21
  /**
31
22
  * Streaming configuration
32
23
  */
33
- export interface StreamingConfig {
34
- /** Enable streaming support */
35
- enabled: boolean;
36
- /** Buffer size for stream chunks in bytes */
37
- bufferSize: number;
38
- /** Strategy for chunking the output */
39
- strategy: 'auto' | 'manual' | 'sections';
40
- /** Default timeout for stream rendering in milliseconds */
41
- timeout: number;
24
+ export declare interface StreamingConfig {
25
+ enabled: boolean
26
+ bufferSize: number
27
+ strategy: 'auto' | 'manual' | 'sections'
28
+ timeout: number
42
29
  }
43
30
  /**
44
31
  * Stream renderer for progressive loading
45
32
  */
46
- export interface StreamRenderer {
47
- /** Render the shell of the page (initial HTML) */
48
- renderShell: (data?: Record<string, unknown>) => Promise<string>;
49
- /** Render a specific section of the template */
50
- renderSection: (section: string, data?: Record<string, unknown>) => Promise<string>;
51
- /** Get the list of sections defined in the template */
52
- getSections: () => string[];
53
- /** Get the full template content */
54
- getTemplate: () => string;
33
+ export declare interface StreamRenderer {
34
+ renderShell: (data?: Record<string, unknown>) => Promise<string>
35
+ renderSection: (section: string, data?: Record<string, unknown>) => Promise<string>
36
+ getSections: () => string[]
37
+ getTemplate: () => string
55
38
  }
56
39
  /**
57
40
  * Hydration configuration
58
41
  */
59
- export interface HydrationConfig {
60
- /** Enable partial hydration */
61
- enabled: boolean;
62
- /** Hydration mode */
63
- mode: 'progressive' | 'islands';
64
- /** Path to client-side hydration entry point */
65
- clientEntry: string;
66
- /** Auto-generate hydration markers */
67
- autoMarkers: boolean;
68
- /** Preload strategy for hydration code */
69
- preload: 'none' | 'eager' | 'lazy';
42
+ export declare interface HydrationConfig {
43
+ enabled: boolean
44
+ mode: 'progressive' | 'islands'
45
+ clientEntry: string
46
+ autoMarkers: boolean
47
+ preload: 'none' | 'eager' | 'lazy'
70
48
  }
71
49
  /**
72
50
  * Island definition for partial hydration
73
51
  */
74
- export interface Island {
75
- /** Island unique identifier */
76
- id: string;
77
- /** Client component to hydrate with (path or name) */
78
- component: string;
79
- /** Initial props for the island */
80
- props?: Record<string, unknown>;
81
- /** Load priority (eager or lazy) */
82
- priority?: 'eager' | 'lazy';
83
- /** Whether to use shadow DOM */
84
- shadowDOM?: boolean;
52
+ export declare interface Island {
53
+ id: string
54
+ component: string
55
+ props?: Record<string, unknown>
56
+ priority?: 'eager' | 'lazy'
57
+ shadowDOM?: boolean
85
58
  }
86
59
  /**
87
60
  * Accessibility configuration
88
61
  */
89
- export interface A11yConfig {
90
- /** Enable accessibility checks */
91
- enabled: boolean;
92
- /** Automatically add screen reader styles */
93
- addSrOnlyStyles: boolean;
94
- /** Level of accessibility checking to enforce */
95
- level: 'AA' | 'AAA';
96
- /** Ignore certain types of a11y checks */
97
- ignoreChecks?: string[];
98
- /** Auto-fix simple a11y issues during template processing */
99
- autoFix: boolean;
62
+ export declare interface A11yConfig {
63
+ enabled: boolean
64
+ addSrOnlyStyles: boolean
65
+ level: 'AA' | 'AAA'
66
+ ignoreChecks?: string[]
67
+ autoFix: boolean
100
68
  }
101
69
  /**
102
70
  * SEO OpenGraph configuration
103
71
  */
104
- export interface OpenGraphConfig {
105
- /** Open Graph type (website, article, etc.) */
106
- type?: string;
107
- /** Title for Open Graph */
108
- title?: string;
109
- /** Description for Open Graph */
110
- description?: string;
111
- /** URL for Open Graph */
112
- url?: string;
113
- /** Image URL for Open Graph */
114
- image?: string;
115
- /** Alt text for the OG image */
116
- imageAlt?: string;
117
- /** Width of the OG image */
118
- imageWidth?: number;
119
- /** Height of the OG image */
120
- imageHeight?: number;
121
- /** MIME type of the OG image (`image/jpeg`), so a scraper need not sniff it */
122
- imageType?: string;
123
- /** Site name for Open Graph */
124
- siteName?: string;
125
- /** Locale of the page, `language_TERRITORY` (`en_US`) */
126
- locale?: string;
127
- /**
128
- * The `profile:*` properties. Open Graph defines them for `type: 'profile'`,
129
- * and a profile without them says whose profile it is nowhere.
130
- */
131
- profile?: OpenGraphProfile;
72
+ export declare interface OpenGraphConfig {
73
+ type?: string
74
+ title?: string
75
+ description?: string
76
+ url?: string
77
+ image?: string
78
+ imageAlt?: string
79
+ imageWidth?: number
80
+ imageHeight?: number
81
+ imageType?: string
82
+ siteName?: string
83
+ locale?: string
84
+ profile?: OpenGraphProfile
132
85
  }
133
86
  /**
134
87
  * Open Graph `profile` object properties.
135
88
  */
136
- export interface OpenGraphProfile {
137
- firstName?: string;
138
- lastName?: string;
139
- username?: string;
140
- gender?: string;
89
+ export declare interface OpenGraphProfile {
90
+ firstName?: string
91
+ lastName?: string
92
+ username?: string
93
+ gender?: string
141
94
  }
142
95
  /**
143
96
  * SEO Twitter card configuration
144
97
  */
145
- export interface TwitterConfig {
146
- /** Twitter card type */
147
- card?: 'summary' | 'summary_large_image' | 'app' | 'player';
148
- /** Title for Twitter card */
149
- title?: string;
150
- /** Description for Twitter card */
151
- description?: string;
152
- /** Image URL for Twitter card */
153
- image?: string;
154
- /** Alt text for the card image. Defaults to the Open Graph `imageAlt`. */
155
- imageAlt?: string;
156
- /** Twitter site handle */
157
- site?: string;
158
- /** Twitter creator handle */
159
- creator?: string;
98
+ export declare interface TwitterConfig {
99
+ card?: 'summary' | 'summary_large_image' | 'app' | 'player'
100
+ title?: string
101
+ description?: string
102
+ image?: string
103
+ imageAlt?: string
104
+ site?: string
105
+ creator?: string
160
106
  }
161
107
  /**
162
108
  * SEO configuration
163
109
  */
164
- export interface SeoConfig {
165
- /** Page title */
166
- title?: string;
167
- /** Page description */
168
- description?: string;
169
- /** Page keywords */
170
- keywords?: string[] | string;
171
- /** Robots directives */
172
- robots?: string;
173
- /** Canonical URL */
174
- canonical?: string;
175
- /** Open Graph configuration */
176
- openGraph?: OpenGraphConfig;
177
- /** Twitter card configuration */
178
- twitter?: TwitterConfig;
179
- /** Structured data (JSON-LD) */
180
- structuredData?: Record<string, unknown>;
110
+ export declare interface SeoConfig {
111
+ title?: string
112
+ description?: string
113
+ keywords?: string[] | string
114
+ robots?: string
115
+ canonical?: string
116
+ openGraph?: OpenGraphConfig
117
+ twitter?: TwitterConfig
118
+ structuredData?: Record<string, unknown>
181
119
  }
182
120
  /**
183
121
  * SEO features configuration
184
122
  */
185
- export interface SeoFeatureConfig {
186
- /** Enable automatic SEO features */
187
- enabled: boolean;
188
- /** Default SEO configuration to apply to all pages */
189
- defaultConfig?: SeoConfig;
190
- /** Enable social preview meta tags */
191
- socialPreview?: boolean;
192
- /** Default image URL for social previews */
193
- defaultImage?: string;
123
+ export declare interface SeoFeatureConfig {
124
+ enabled: boolean
125
+ defaultConfig?: SeoConfig
126
+ socialPreview?: boolean
127
+ defaultImage?: string
194
128
  }
195
- /**
196
- * Analytics driver type
197
- */
198
- export type AnalyticsDriver = 'fathom' | 'google-analytics' | 'plausible' | 'self-hosted' | 'custom';
199
129
  /**
200
130
  * Analytics configuration for automatic script injection
201
131
  */
202
- export interface AnalyticsConfig {
203
- /** Enable analytics tracking */
204
- enabled: boolean;
205
- /** Analytics driver/provider */
206
- driver: AnalyticsDriver;
207
- /** Fathom Analytics configuration */
208
- fathom?: {
209
- /** Fathom site ID */
210
- siteId: string;
211
- /** Custom script URL (default: https://cdn.usefathom.com/script.js) */
212
- scriptUrl?: string;
213
- /** Honor Do Not Track browser setting */
214
- honorDnt?: boolean;
215
- /** Defer script loading (default: true) */
216
- defer?: boolean;
217
- /** Enable SPA mode for client-side routing */
218
- spa?: boolean;
219
- /** Canonical URL override */
220
- canonical?: string;
221
- /** Auto-track page views (default: true) */
222
- auto?: boolean;
223
- };
224
- /** Google Analytics configuration */
225
- googleAnalytics?: {
226
- /** GA4 Measurement ID (e.g., G-XXXXXXXXXX) */
227
- measurementId: string;
228
- /** Enable debug mode */
229
- debug?: boolean;
230
- };
231
- /** Plausible Analytics configuration */
232
- plausible?: {
233
- /** Your domain (e.g., example.com) */
234
- domain: string;
235
- /** Custom script URL (default: https://plausible.io/js/script.js) */
236
- scriptUrl?: string;
237
- /** Track localhost */
238
- trackLocalhost?: boolean;
239
- /** Enable hash-based routing */
240
- hashMode?: boolean;
241
- };
242
- /** Self-hosted analytics configuration (using dynamodb-tooling analytics) */
243
- selfHosted?: {
244
- /** Site ID for tracking */
245
- siteId: string;
246
- /** API endpoint URL for collecting analytics */
247
- apiEndpoint: string;
248
- /** Honor Do Not Track browser setting */
249
- honorDnt?: boolean;
250
- /** Track hash changes as page views */
251
- trackHashChanges?: boolean;
252
- /** Track outbound link clicks */
253
- trackOutboundLinks?: boolean;
254
- };
255
- /** Custom analytics configuration */
256
- custom?: {
257
- /** Custom script URL */
258
- scriptUrl: string;
259
- /** Script ID attribute */
260
- scriptId?: string;
261
- /** Additional script attributes */
262
- attributes?: Record<string, string>;
263
- /** Inline script content (instead of external URL) */
264
- inlineScript?: string;
265
- };
132
+ export declare interface AnalyticsConfig {
133
+ enabled: boolean
134
+ driver: AnalyticsDriver
135
+ fathom?: {
136
+ siteId: string
137
+ scriptUrl?: string
138
+ honorDnt?: boolean
139
+ defer?: boolean
140
+ spa?: boolean
141
+ canonical?: string
142
+ auto?: boolean
143
+ }
144
+ googleAnalytics?: {
145
+ measurementId: string
146
+ debug?: boolean
147
+ }
148
+ plausible?: {
149
+ domain: string
150
+ scriptUrl?: string
151
+ trackLocalhost?: boolean
152
+ hashMode?: boolean
153
+ }
154
+ selfHosted?: {
155
+ siteId: string
156
+ apiEndpoint: string
157
+ honorDnt?: boolean
158
+ trackHashChanges?: boolean
159
+ trackOutboundLinks?: boolean
160
+ }
161
+ custom?: {
162
+ scriptUrl: string
163
+ scriptId?: string
164
+ attributes?: Record<string, string>
165
+ inlineScript?: string
166
+ }
266
167
  }
267
168
  /**
268
169
  * Animation configuration
269
170
  */
270
- export interface AnimationConfig {
271
- /** Enable animation system */
272
- enabled: boolean;
273
- /** Default duration for transitions in milliseconds */
274
- defaultDuration: number;
275
- /** Default easing function for transitions */
276
- defaultEase: string;
277
- /** Respect user's motion preferences by default */
278
- respectMotionPreferences: boolean;
279
- /** Default stagger delay for grouped animations */
280
- staggerDelay: number;
171
+ export declare interface AnimationConfig {
172
+ enabled: boolean
173
+ defaultDuration: number
174
+ defaultEase: string
175
+ respectMotionPreferences: boolean
176
+ staggerDelay: number
281
177
  }
282
178
  /**
283
179
  * Route middleware configuration
284
180
  */
285
- export interface RouteMiddlewareConfig {
286
- /** Enable route middleware system */
287
- enabled: boolean;
288
- /** Directory containing middleware files (default: 'middleware') */
289
- dir: string;
290
- /** Global middleware to run on every route */
291
- global?: string[];
181
+ export declare interface RouteMiddlewareConfig {
182
+ enabled: boolean
183
+ dir: string
184
+ global?: string[]
292
185
  }
293
186
  /**
294
187
  * Loop directive configuration
295
188
  */
296
- export interface LoopConfig {
297
- /**
298
- * Maximum iterations for @while loops (safety limit to prevent infinite loops)
299
- * @default 1000
300
- */
301
- maxWhileIterations: number;
302
- /**
303
- * Use $loop instead of loop for loop context variable
304
- * Set to true to avoid conflicts if you have a variable named 'loop'
305
- * @default false
306
- */
307
- useAltLoopVariable: boolean;
189
+ export declare interface LoopConfig {
190
+ maxWhileIterations: number
191
+ useAltLoopVariable: boolean
308
192
  }
309
- /**
310
- * Available syntax highlighting themes
311
- */
312
- export type SyntaxHighlightTheme = 'css-variables' | 'dark-plus' | 'dracula' | 'dracula-soft' | 'github-dark' | 'github-dark-dimmed' | 'github-light' | 'hc_light' | 'light-plus' | 'material-theme' | 'material-theme-darker' | 'material-theme-lighter' | 'material-theme-ocean' | 'material-theme-palenight' | 'min-dark' | 'min-light' | 'monokai' | 'nord' | 'one-dark-pro' | 'poimandres' | 'rose-pine' | 'rose-pine-dawn' | 'rose-pine-moon' | 'slack-dark' | 'slack-ochin' | 'solarized-dark' | 'solarized-light' | 'vitesse-dark' | 'vitesse-light';
313
193
  /**
314
194
  * Syntax highlighting configuration
315
195
  */
316
- export interface SyntaxHighlightingConfig {
317
- /** Enable syntax highlighting */
318
- enabled: boolean;
319
- /** Use server-side highlighting (true) instead of client-side (false) */
320
- serverSide: boolean;
321
- /** Default theme for syntax highlighting */
322
- defaultTheme: SyntaxHighlightTheme;
323
- /** Attempt to highlight code blocks with unknown language */
324
- highlightUnknownLanguages: boolean;
325
- /** List of additional themes to make available in the UI */
326
- additionalThemes?: SyntaxHighlightTheme[];
196
+ export declare interface SyntaxHighlightingConfig {
197
+ enabled: boolean
198
+ serverSide: boolean
199
+ defaultTheme: SyntaxHighlightTheme
200
+ highlightUnknownLanguages: boolean
201
+ additionalThemes?: SyntaxHighlightTheme[]
327
202
  }
328
203
  /**
329
204
  * Markdown configuration
330
205
  */
331
- export interface MarkdownConfig {
332
- /** Enable markdown processing */
333
- enabled: boolean;
334
- /** Path to markdown directory */
335
- dir?: string;
336
- /** Syntax highlighting configuration */
337
- syntaxHighlighting?: Partial<SyntaxHighlightingConfig>;
206
+ export declare interface MarkdownConfig {
207
+ enabled: boolean
208
+ dir?: string
209
+ syntaxHighlighting?: Partial<SyntaxHighlightingConfig>
338
210
  }
339
211
  /**
340
212
  * Configuration for form directives
341
213
  */
342
- export interface FormConfig {
343
- /** CSS class names for form elements */
344
- classes?: {
345
- /** Class for text inputs, textareas, and selects */
346
- input?: string;
347
- /** Class added to inputs with validation errors */
348
- inputError?: string;
349
- /** Class for checkboxes and radios */
350
- checkInput?: string;
351
- /** Class for labels */
352
- label?: string;
353
- /** Class for error message containers */
354
- errorFeedback?: string;
355
- };
214
+ export declare interface FormConfig {
215
+ classes?: {
216
+ input?: string
217
+ inputError?: string
218
+ checkInput?: string
219
+ label?: string
220
+ errorFeedback?: string
221
+ }
356
222
  }
357
223
  /**
358
224
  * Strict mode configuration for DOM API validation.
359
225
  * When enabled, stx warns (or errors) when client scripts use raw browser APIs
360
226
  * instead of framework composables.
361
227
  */
362
- export interface StrictModeConfig {
363
- /** Enable strict mode validation */
364
- enabled: boolean;
365
- /** Throw errors instead of warnings (default: false) */
366
- failOnViolation?: boolean;
367
- /**
368
- * Rule names to allow through validation, matched against the rule's message.
369
- *
370
- * RULE-GLOBAL: an entry here turns that rule off for every file. For one
371
- * justified call site, write the exemption at the site instead, which keeps
372
- * the rule enforced everywhere else and records WHY where a reviewer will
373
- * see it (stacksjs/stx#2049):
374
- *
375
- * // stx-strict-ignore-next-line getElementById -- pre-hydration guard
376
- * var form = document.getElementById('signin')
377
- *
378
- * A bare `stx-strict-ignore-next-line` exempts every rule on the next line;
379
- * a trailing `// stx-strict-ignore` exempts the line it sits on. Suppression
380
- * is per line, so a file can exempt one call and stay in breach three lines
381
- * down -- which is what lets an app reach `failOnViolation: true` at all.
382
- */
383
- allowPatterns?: string[];
384
- /**
385
- * What to do when a `<script client>` block does not bundle.
386
- *
387
- * `'warn'` (default) ships the ORIGINAL, unbundled source so the page still
388
- * renders — right for a dev server, and why the error overlay exists.
389
- * `'error'` refuses instead, for anyone who would rather nothing rendered
390
- * than a page whose bindings quietly do nothing. `stx build` fails on a
391
- * bundle error either way. See #1884.
392
- */
393
- bundlerFallback?: 'warn' | 'error';
228
+ export declare interface StrictModeConfig {
229
+ enabled: boolean
230
+ failOnViolation?: boolean
231
+ allowPatterns?: string[]
232
+ bundlerFallback?: 'warn' | 'error'
394
233
  }
395
234
  /**
396
235
  * Real-time broadcasting configuration.
@@ -398,665 +237,211 @@ export interface StrictModeConfig {
398
237
  * When enabled, stx starts a ts-broadcasting WebSocket server
399
238
  * alongside the dev server so pages can receive push events.
400
239
  */
401
- export interface BroadcastingConfig {
402
- /** Enable the broadcasting server @default false */
403
- enabled?: boolean;
404
- /** Broadcasting driver @default 'bun' */
405
- driver?: 'bun' | 'reverb' | 'pusher' | 'ably' | 'log' | 'null';
406
- /** WebSocket server host @default '0.0.0.0' */
407
- host?: string;
408
- /** WebSocket server port @default 6001 */
409
- port?: number;
410
- /** URL scheme @default 'ws' */
411
- scheme?: 'ws' | 'wss';
412
- /** Enable verbose logging @default false */
413
- verbose?: boolean;
240
+ export declare interface BroadcastingConfig {
241
+ enabled?: boolean
242
+ driver?: 'bun' | 'reverb' | 'pusher' | 'ably' | 'log' | 'null'
243
+ host?: string
244
+ port?: number
245
+ scheme?: 'ws' | 'wss'
246
+ verbose?: boolean
414
247
  }
415
248
  /**
416
249
  * App head configuration — auto-generates the document shell.
417
250
  * No .stx file needs to write <!DOCTYPE>, <html>, <head>, or <body>.
418
251
  */
419
- export interface AppHeadConfig {
420
- /** Page title (can be overridden per-page with @section('title')) */
421
- title?: string;
422
- /** HTML lang attribute @default 'en' */
423
- lang?: string;
424
- /** Meta tags */
425
- meta?: Array<Record<string, string>>;
426
- /** Link tags (stylesheets, icons, etc.) */
427
- link?: Array<Record<string, string>>;
428
- /** Script tags to include in <head> */
429
- script?: Array<{
430
- src?: string;
431
- content?: string;
432
- [key: string]: any;
433
- }>;
434
- /** Additional raw HTML to inject in <head> */
435
- headRaw?: string;
436
- /**
437
- * Attributes for the `<html>` element.
438
- *
439
- * `class` is the reason this exists: design tokens scoped to the root
440
- * element (`html.marketing { --bg: … }`) need a class the page cannot
441
- * otherwise set once it stops hand-writing its own document shell.
442
- * `htmlAttrs.lang` takes precedence over the `lang` option.
443
- *
444
- * Also settable per-page via `useHead({ htmlAttrs })`, which merges over
445
- * this. Reconciled by the router on SPA layout changes (stacksjs/stx#1798).
446
- */
447
- htmlAttrs?: Record<string, string>;
448
- /** Body class */
449
- bodyClass?: string;
450
- /** Body attributes */
451
- bodyAttrs?: Record<string, string>;
252
+ export declare interface AppHeadConfig {
253
+ title?: string
254
+ lang?: string
255
+ meta?: Array<Record<string, string>>
256
+ link?: Array<Record<string, string>>
257
+ script?: Array<{ src?: string, content?: string, [key: string]: any }>
258
+ headRaw?: string
259
+ htmlAttrs?: Record<string, string>
260
+ bodyClass?: string
261
+ bodyAttrs?: Record<string, string>
452
262
  }
453
263
  /**
454
264
  * stx configuration options
455
265
  */
456
- export interface StxConfig {
457
- /**
458
- * App head configuration.
459
- * Defines the document shell that stx auto-generates around page content.
460
- * No .stx file needs to write <!DOCTYPE>, <html>, <head>, or <body>.
461
- *
462
- * @example
463
- * ```ts
464
- * // stx.config.ts
465
- * export default {
466
- * app: {
467
- * head: {
468
- * title: 'My App',
469
- * meta: [
470
- * { name: 'description', content: 'My stx app' },
471
- * ],
472
- * link: [
473
- * { rel: 'icon', href: '/favicon.ico' },
474
- * ],
475
- * },
476
- * },
477
- * }
478
- * ```
479
- */
480
- /**
481
- * Canonical site identity (stacksjs/stx#1866).
482
- *
483
- * `url` is what sitemap.xml and robots.txt are built from. Without it the
484
- * static build falls back to `http://localhost` and warns — a sitemap of
485
- * localhost URLs is valid XML and useless to a crawler, so it has to be said
486
- * out loud rather than discovered after deploy.
487
- *
488
- * The site-builder path reads the same field from `site.config.ts`; either
489
- * file works.
490
- *
491
- * @example
492
- * ```ts
493
- * // stx.config.ts
494
- * export default {
495
- * site: { url: 'https://example.com' },
496
- * }
497
- * ```
498
- */
499
- site?: {
500
- /** Absolute origin, e.g. `https://example.com`. */
501
- url?: string;
502
- };
503
- app?: {
504
- head?: AppHeadConfig;
505
- /**
506
- * Pre-paint color mode (stacksjs/stx#1794).
507
- *
508
- * Declaring this makes stx inline a small render-blocking script as the
509
- * first thing in `<head>`, which reads the persisted preference and stamps
510
- * the root element before the browser paints. Without it, `useColorMode`
511
- * can only apply the theme after hydration, which flashes the wrong theme
512
- * on every cold load for users whose stored preference differs from the
513
- * default.
514
- *
515
- * The options are the same ones `useColorMode` takes, and the boot script
516
- * publishes them to the client — so `useColorMode()` with no arguments
517
- * picks up the configured key and attribute instead of repeating them.
518
- *
519
- * @example
520
- * ```ts
521
- * // stx.config.ts
522
- * export default {
523
- * app: {
524
- * colorMode: { storageKey: 'theme', attribute: 'data-theme' },
525
- * },
526
- * }
527
- * ```
528
- */
529
- colorMode?: ColorModeBootConfig;
530
- /**
531
- * Defaults for the native dev window (`stx dev --native`).
532
- * Only used when the user passes `--native`. Sensible per-app sizes
533
- * keep the window from opening at a one-size-fits-all 1400×900.
534
- */
535
- window?: {
536
- /** Window width in points/pixels. Default: 1400. */
537
- width?: number;
538
- /** Window height in points/pixels. Default: 900. */
539
- height?: number;
540
- /** Open with the system dark theme. Default: true. */
541
- darkMode?: boolean;
542
- /** Enable hot-reload bridge inside the webview. Default: true. */
543
- hotReload?: boolean;
544
- };
545
- };
546
- /**
547
- * Source root for .stx files.
548
- * pages/, layouts/, components/, partials/ resolve relative to this.
549
- *
550
- * - Standalone app: defaults to '.' (project root)
551
- * - Stacks app: auto-detected as 'resources/views' if that directory has pages/
552
- * - Override: set explicitly to any path
553
- *
554
- * Note: the state directory (see `stateDir`), .output/ (build), and
555
- * stx.config.ts stay at project root.
556
- *
557
- * @default '.' (auto-detects 'resources/views' if it exists with pages/)
558
- */
559
- root?: string;
560
- /**
561
- * Where stx keeps its generated state: the compiled-template cache, the
562
- * Css CSS cache, the client-script bundle cache and temp dir, the
563
- * generated route manifest and route types, dev-server output, SSG and media
564
- * caches, story snapshots.
565
- *
566
- * Point it at an existing home for generated state to keep the project root
567
- * clean - a Stacks application sets `storage/framework/stx`. The path-shaped
568
- * options that default to somewhere under `.stx/` (`cachePath`,
569
- * `build.cacheDir`, `media.cache.directory`, `story.outDir`) follow this
570
- * setting; a path you point somewhere else entirely is left alone.
571
- *
572
- * Relative paths resolve against the project root; absolute paths are used
573
- * as-is. `STX_DIR` overrides this.
574
- *
575
- * @default '.stx'
576
- */
577
- stateDir?: string;
578
- /**
579
- * Pages directory name (relative to root).
580
- * Standalone apps: 'pages' (default)
581
- * Stacks apps: 'views'
582
- *
583
- * @default 'pages'
584
- */
585
- pagesDir?: string;
586
- /**
587
- * Root directory for templates
588
- */
589
- templatesDir?: string;
590
- /**
591
- * Default title to use for SEO if none is provided
592
- */
593
- defaultTitle?: string;
594
- /**
595
- * Default description to use for SEO if none is provided
596
- */
597
- defaultDescription?: string;
598
- /**
599
- * Default image URL to use for SEO/OpenGraph if none is provided
600
- */
601
- defaultImage?: string;
602
- /**
603
- * Enable server-side rendering at request time.
604
- *
605
- * - `false` (default) → SSG. `<script server>` runs at build time, output
606
- * goes to `dist/` as flat HTML files. Deploy to S3 + CloudFront.
607
- * - `true` → SSR. `<script server>` runs per-request on a Bun server,
608
- * output goes to `.output/`. Deploy to EC2 behind CloudFront.
609
- *
610
- * `<script server>` works in both modes — this flag controls *when* it
611
- * runs, not whether it's allowed.
612
- *
613
- * @default false
614
- */
615
- ssr?: boolean;
616
- /**
617
- * Enable or disable caching
618
- */
619
- cache?: boolean;
620
- /**
621
- * Cache directory path
622
- */
623
- cacheDir?: string;
624
- /**
625
- * Cache version, used to invalidate cache
626
- */
627
- cacheVersion?: string;
628
- /**
629
- * Enable stx features
630
- */
631
- enabled: boolean;
632
- /** Path to partials directory, defaults to 'partials' in the same directory as the template */
633
- partialsDir: string;
634
- /**
635
- * Called when an `@include` fails, instead of the failure being silent.
636
- *
637
- * A failed include renders the error where the markup should have been. In dev
638
- * that is the right call — you see it as soon as you look. In a build it
639
- * produces a file nobody would knowingly deploy, and nothing else can see it:
640
- * one app shipped pre-rendered pages whose header, footer, hero and CTA were
641
- * all replaced by an ENOENT banner while the build printed `Failed: 0` and
642
- * exited 0 (stacksjs/stx#1921).
643
- *
644
- * The rendered output is unchanged — this only carries the fact out, so a
645
- * caller that builds files can decide to fail. `partialsDir` is included
646
- * because "it looked in the wrong place" is the usual cause and the resolved
647
- * path is what makes it a ten-second fix.
648
- */
649
- onIncludeError?: (failure: {
650
- /** The path as written in the directive, e.g. `Bench/ConfirmHost`. */
651
- includePath: string;
652
- /** The template the directive appeared in. */
653
- templatePath: string;
654
- message: string;
655
- /** The directory the include was resolved against. */
656
- partialsDir: string;
657
- }) => void;
658
- /**
659
- * Called when a `<script server>` fails, instead of the failure being silent.
660
- *
661
- * The same argument as `onIncludeError`, for the other half of the page. A
662
- * failed server script leaves every variable it declared undefined, so the
663
- * markup around it renders empty and `{{ name }}` ships as literal text --
664
- * and in a build that is a file nobody would knowingly deploy, written while
665
- * the build prints `Failed: 0`. One app shipped 13 of 46 pages as nothing but
666
- * an error banner that way (stacksjs/stx#2035), found only because the banner
667
- * happened to overflow a mobile viewport in an unrelated responsive check.
668
- *
669
- * Only the kinds that are certainly bugs are reported: a module that does not
670
- * resolve, a script that does not parse, a binding that does not exist. A
671
- * script reaching for `window` or building something that only exists in a
672
- * browser is classified `unknown` by the extractor and is NOT reported here,
673
- * because that one is legitimate on pages that work.
674
- *
675
- * The rendered output is unchanged -- this only carries the fact out, so a
676
- * caller that writes files can decide to fail.
677
- */
678
- onServerScriptError?: (failure: {
679
- /** The file the script was written in, which is not always the file being rendered. */
680
- sourcePath: string;
681
- /** `module-resolution`, `syntax` or `missing-binding`. */
682
- kind: string;
683
- message: string;
684
- }) => void;
685
- /** Path to components directory, defaults to 'components' in the same directory as the template */
686
- componentsDir: string;
687
- /** @internal Configured component root retained while nested components resolve locally. */
688
- _rootComponentsDir?: string;
689
- /**
690
- * @internal Components that belong to the render target, such as the native
691
- * primitives (`View`, `Button`, ...). Searched after the directories a
692
- * caller names (`componentsDir`, a template's own `components/`) and before
693
- * the convention directories (`resources/components`, ...) and plugins, so a
694
- * web app's component of the same name never stands in for one.
695
- */
696
- _targetComponentDirs?: string[];
697
- /** Path to layouts directory, defaults to 'layouts' in the project root */
698
- layoutsDir?: string;
699
- /**
700
- * Where to look for a layout `layoutsDir` does not have.
701
- *
702
- * For a framework that ships default layouts and lets an app override them
703
- * by name: the app's own directory is `layoutsDir` and wins, and anything it
704
- * does not define falls back here. Without it, an app that overrides one
705
- * layout has to vendor every other layout it uses, and a page extending a
706
- * framework layout renders with NO layout at all - a 200 with an empty body,
707
- * which is far harder to diagnose than a 404.
708
- */
709
- fallbackLayoutsDir?: string;
710
- /**
711
- * Where to look for a component `componentsDir` does not have.
712
- *
713
- * The component-side counterpart of `fallbackLayoutsDir`, and it exists for
714
- * the same reason. A framework ships default components and lets an app
715
- * override them by name: the app's directory is `componentsDir` and wins,
716
- * anything it does not define falls back here.
717
- *
718
- * Without it, a host had one bad choice to make. Point `componentsDir` at
719
- * the framework defaults and an app could never override a component - its
720
- * own file was never even looked for. Point it at the app and every
721
- * framework component stops resolving. Stacks' production server took the
722
- * first option, so an app that had written its own `NativeAppShell.stx`
723
- * still rendered the framework's, and the only symptom was that file's
724
- * relative includes failing with ENOENT paths the author had never written.
725
- */
726
- fallbackComponentsDir?: string;
727
- /**
728
- * Path to the stores directory, resolved against `root`.
729
- *
730
- * Every `.ts` file in it (except `index.ts`, `types.ts` and `.d.ts`) is
731
- * discovered, bundled, and injected ahead of any page script, so a
732
- * `defineStore(...)` call has already run by the time `useStore('id')` looks
733
- * it up. Files are ordered so stores that call `useStore()` load after the
734
- * ones they depend on.
735
- *
736
- * @default 'stores'
737
- */
738
- storesDir?: string;
739
- /**
740
- * Path to the composables directory, resolved against `root`.
741
- *
742
- * Every `.ts` file in it (except `index.ts`, `types.ts` and `.d.ts`) is
743
- * discovered, bundled, and injected ahead of any page script. Exported
744
- * bindings are registered on `window.__composables`, which is what
745
- * `import { useThing } from '@composables'` compiles to — a plain destructure
746
- * in the page's own scope, so template directives can see the names.
747
- *
748
- * All composables share one scope, so they can call each other directly
749
- * without importing.
750
- *
751
- * When unset, stx probes `composables/` and then `functions/`, so an app
752
- * already using either layout works with no configuration.
753
- *
754
- * @default 'composables' (falls back to 'functions')
755
- */
756
- composablesDir?: string;
757
- /** Default layout to use for pages without DOCTYPE, relative to layoutsDir */
758
- defaultLayout?: string;
759
- /** Plugins to load — npm packages, local paths, or [path, options] tuples */
760
- plugins?: Array<string | [string, Record<string, any>]>;
761
- /**
762
- * Installed packages whose components resolve by bare tag, with no plugin
763
- * entry and no import.
764
- *
765
- * Each is loaded through its own `<pkg>/stx-plugin` export if the project has
766
- * it installed, and is searched AFTER every project directory - so a
767
- * component the app wrote still wins. Defaults to `['@stacksjs/components']`;
768
- * set it to `[]` to opt out entirely (stacksjs/stx#2011).
769
- */
770
- componentPackages?: string[];
771
- /** Path to public/static assets directory, defaults to 'public' */
772
- publicDir?: string;
773
- /** Path to .env file, defaults to '.env' in project root (Bun loads this automatically) */
774
- envFile?: string | boolean;
775
- /** Environment variable prefix for client-side exposure (e.g. 'STX_PUBLIC_') */
776
- envPrefix?: string;
777
- /**
778
- * Path to a `css.config.*` file, or an inline Css config. The
779
- * inline object accepts any Css field (`theme`, `fonts`, `safelist`,
780
- * `shortcuts`, …) — e.g. load web fonts with
781
- * `css: { fonts: { google: ['Inter:wght@400;700'] } }`.
782
- */
783
- css?: string | {
784
- config?: string;
785
- content?: string[];
786
- preflight?: boolean;
787
- minify?: boolean;
788
- [key: string]: unknown;
789
- };
790
- /** Enable debug mode for detailed error messages */
791
- debug: boolean;
792
- /**
793
- * Turn degraded-but-working behaviour into a hard failure.
794
- *
795
- * `bundlerFallback` decides what happens when a `<script client>` block will
796
- * not bundle. The default `'warn'` ships the ORIGINAL, unbundled source so the
797
- * page still renders, which is right for a dev server and is why the overlay
798
- * exists; `'error'` refuses instead, for anyone who would rather nothing
799
- * rendered than a page whose bindings quietly do nothing. `stx build` fails on
800
- * a bundle error either way. See #1884.
801
- */
802
- /** Directory to store cached templates, defaults to `cache` inside `stateDir` */
803
- cachePath: string;
804
- /**
805
- * Bytes the rendered-fragment cache may retain, across all entries.
806
- *
807
- * A component declaring `<script server cache>` has its rendered output kept
808
- * and reused for the same props, which is what makes an unchanged page cheap
809
- * to re-render (stacksjs/stx#1945). That memory is real, and how much of it
810
- * is worth spending is a property of the HOST, not of stx: a build box has
811
- * room a container under an OOM limit does not.
812
- *
813
- * Entry count is bounded separately and always; this is the byte ceiling,
814
- * whichever binds first. Set it to 0 to keep no rendered fragments at all --
815
- * every render then does the full work, which is the behaviour before the
816
- * cache existed and the right answer when memory is scarcer than time.
817
- *
818
- * @default 33554432 (32MB)
819
- */
820
- componentRenderCacheBytes: number;
821
- /** Custom directives registered by the user */
822
- customDirectives?: CustomDirective[];
823
- /** Middleware for pre/post-processing templates */
824
- middleware?: Middleware[];
825
- /** Internationalization (i18n) configuration */
826
- i18n?: Partial<I18nConfig>;
827
- /** Web Components integration configuration */
828
- webComponents?: Partial<WebComponentConfig>;
829
- /** Documentation generator configuration */
830
- docs?: Partial<DocGeneratorConfig>;
831
- /** Streaming rendering configuration */
832
- streaming?: Partial<StreamingConfig>;
833
- /** Partial hydration configuration */
834
- hydration?: Partial<HydrationConfig>;
835
- /** Accessibility configuration */
836
- a11y?: Partial<A11yConfig>;
837
- /** SEO configuration */
838
- seo?: Partial<SeoFeatureConfig>;
839
- /** Analytics configuration */
840
- analytics?: Partial<AnalyticsConfig>;
841
- /** Animation system configuration */
842
- animation?: Partial<AnimationConfig>;
843
- /** Skip adding default SEO tags */
844
- skipDefaultSeoTags?: boolean;
845
- /** Skip injecting signals runtime (for nested component processing) */
846
- skipSignalsRuntime?: boolean;
847
- /** Skip event directive processing (for signal components where runtime handles @click etc.) */
848
- skipEventDirectives?: boolean;
849
- /** Markdown configuration */
850
- markdown?: Partial<MarkdownConfig>;
851
- /** Loop directive configuration */
852
- loops?: Partial<LoopConfig>;
853
- /** Form directives configuration */
854
- forms?: Partial<FormConfig>;
855
- /** Content Security Policy configuration */
856
- csp?: Partial<CspConfig>;
857
- /** Story (component showcase) configuration */
858
- story?: Partial<import('../story/types').StoryConfig>;
859
- /** Progressive Web App (PWA) configuration */
860
- pwa?: Partial<PwaConfig>;
861
- /**
862
- * Keep a server-rendered app working without a network: an offline worker
863
- * served at /_stx/sw.js and registered on every page (see
864
- * src/offline/app-service-worker.ts). Pair with `useOutbox` for writes.
865
- */
866
- offline?: import('../offline/app-service-worker').OfflineAppConfig;
867
- /** Component configuration */
868
- components?: Partial<ComponentConfig>;
869
- /** Route middleware configuration */
870
- routeMiddleware?: Partial<RouteMiddlewareConfig>;
871
- /** Heatmap tracking configuration */
872
- heatmap?: Partial<HeatmapConfig>;
873
- /** Static Site Generation (SSG) build configuration */
874
- build?: Partial<BuildConfig>;
875
- /** Media (images, video, uploads) configuration */
876
- media?: Partial<MediaConfig>;
877
- /**
878
- * Strict mode for DOM API validation.
879
- * When `true`, warns about raw `document.*` / `window.*` usage in client scripts.
880
- * Pass a StrictModeConfig object for fine-grained control.
881
- */
882
- strict?: boolean | StrictModeConfig;
883
- /**
884
- * Build mode for the processing pipeline.
885
- * - `undefined` (default): dev mode, inline everything per request
886
- * - `'compile'`: build mode, emit asset reference placeholders instead of inline code
887
- * - `'serve'`: serve mode, reference shared runtime and router assets
888
- */
889
- buildMode?: 'compile' | 'serve' | 'spa';
890
- /**
891
- * Auto-generate document shell (<!DOCTYPE>, <html>, <head>, <body>) around output.
892
- * Set by serve paths to wrap page output. Not set for tests or programmatic usage.
893
- * @default false
894
- */
895
- autoShell?: boolean;
896
- /**
897
- * Output directory for production builds.
898
- * @default '.output'
899
- */
900
- outputDir?: string;
901
- /**
902
- * App shell file for single-shell mode.
903
- * When set (or auto-detected as 'app.stx'), the shell wraps all pages.
904
- * The shell's `<slot />` is replaced with page content.
905
- * Direct requests get full shell + page; SPA navigation gets page fragments.
906
- * @default undefined (auto-detects 'app.stx' in project root)
907
- */
908
- shell?: string | false;
909
- /**
910
- * Real-time broadcasting configuration (powered by ts-broadcasting).
911
- *
912
- * When enabled, stx starts a WebSocket broadcasting server alongside
913
- * the dev server and injects client helpers automatically.
914
- *
915
- * @example
916
- * ```ts
917
- * // stx.config.ts
918
- * export default {
919
- * broadcasting: {
920
- * enabled: true,
921
- * port: 6001,
922
- * }
923
- * }
924
- * ```
925
- */
926
- broadcasting?: Partial<BroadcastingConfig>;
927
- /**
928
- * Custom API routes for the dev server.
929
- * Keys are path patterns (e.g. '/api/delete'), values are request handlers.
930
- * Handlers receive the standard Request and return a Response.
931
- */
932
- apiRoutes?: Record<string, (request: Request) => Response | Promise<Response>>;
933
- /** Per-route production rendering and anonymous origin-cache policies. */
934
- routeRules?: RouteRules;
935
- /** Opt-in file-based API endpoints, relative to the config/project directory. */
936
- serverApi?: boolean | ServerApiOptions;
937
- /** Deployment-time values. Only public is serialized for browsers. */
938
- runtimeConfig?: import('../runtime-config-server').RuntimeConfigDefaults;
939
- /** Local paths or installed application-layer packages, highest priority first. */
940
- extends?: string[];
941
- /** @internal Resolved application-layer provenance and resource search roots. */
942
- _layerGraph?: import('../application-layers').ApplicationLayerGraph;
943
- _layerPageDirs?: string[];
944
- _layerComponentDirs?: string[];
945
- _layerLayoutDirs?: string[];
946
- _layerPartialDirs?: string[];
947
- _layerComposableDirs?: string[];
948
- /**
949
- * Client-side router configuration
950
- */
951
- router?: {
952
- enabled?: boolean;
953
- container?: string;
954
- linkSelector?: string;
955
- /**
956
- * Intercept every in-app `<a>` for client-side navigation rather than
957
- * only those matching `linkSelector`. Default: false.
958
- */
959
- interceptAllLinks?: boolean;
960
- viewTransitions?: boolean;
961
- /**
962
- * Duration of the default View Transitions fade, in milliseconds.
963
- * Only applied when viewTransitions is enabled and the browser supports
964
- * document.startViewTransition. Default: 220.
965
- */
966
- viewTransitionDuration?: number;
967
- /**
968
- * Easing curve for the default View Transitions fade. Any valid CSS
969
- * animation-timing-function. Default: cubic-bezier(0.16, 1, 0.3, 1).
970
- */
971
- viewTransitionEasing?: string;
972
- scrollToTop?: boolean;
973
- /**
974
- * Return to the position an entry was left at on back/forward, instead of
975
- * the top of the page. Switches history.scrollRestoration to manual and
976
- * keeps the positions in sessionStorage, keyed per history entry, which
977
- * also covers the reload the browser would otherwise have handled itself.
978
- * Default: true.
979
- */
980
- scrollRestoration?: boolean;
981
- prefetch?: boolean;
982
- cache?: boolean;
983
- cacheTTL?: number;
984
- skipSelectors?: string;
985
- viewTransitionCSS?: Record<string, string>;
986
- /**
987
- * Show the top loading/progress bar during client-side navigation.
988
- * Default: true.
989
- */
990
- progress?: boolean;
991
- /**
992
- * Progress-bar color (hex, rgb, css var, etc.). Default: '#78dce8'.
993
- */
994
- progressColor?: string;
995
- /**
996
- * Progress-bar height including units (e.g. '2px', '3px'). Default: '2px'.
997
- */
998
- progressHeight?: string;
999
- /**
1000
- * Fetch the pages of links as they scroll into view, so the first tap on
1001
- * one is a swap. Their module bundles wait for an intent (a hover, a
1002
- * touch) or the tap. Default: true.
1003
- */
1004
- prefetchVisible?: boolean;
1005
- /** At most this many links prefetched on sight per page. Default: 12. */
1006
- prefetchVisibleMax?: number;
1007
- /**
1008
- * Fetch the fragment of the page the app was opened on once it is idle,
1009
- * so Back to it is a swap rather than a round trip. Default: true.
1010
- */
1011
- keepOpening?: boolean;
1012
- };
1013
- /**
1014
- * Custom router instance (e.g. @stacksjs/bun-router) for API handling.
1015
- * When set, incoming requests are passed to router.handleRequest() before
1016
- * falling through to page routes. Takes precedence over apiRoutes for
1017
- * matching paths.
1018
- */
1019
- apiRouter?: {
1020
- handleRequest: (request: Request) => Response | Promise<Response>;
1021
- };
266
+ export declare interface StxConfig {
267
+ site?: {
268
+ url?: string
269
+ }
270
+ app?: {
271
+ head?: AppHeadConfig
272
+ colorMode?: ColorModeBootConfig
273
+ window?: {
274
+ width?: number
275
+ height?: number
276
+ darkMode?: boolean
277
+ hotReload?: boolean
278
+ }
279
+ }
280
+ root?: string
281
+ stateDir?: string
282
+ pagesDir?: string
283
+ templatesDir?: string
284
+ defaultTitle?: string
285
+ defaultDescription?: string
286
+ defaultImage?: string
287
+ ssr?: boolean
288
+ cache?: boolean
289
+ cacheDir?: string
290
+ cacheVersion?: string
291
+ enabled: boolean
292
+ partialsDir: string
293
+ onIncludeError?: (failure: {
294
+ includePath: string
295
+ templatePath: string
296
+ message: string
297
+ partialsDir: string
298
+ }) => void
299
+ onServerScriptError?: (failure: {
300
+ sourcePath: string
301
+ kind: string
302
+ message: string
303
+ }) => void
304
+ componentsDir: string
305
+ _rootComponentsDir?: string
306
+ _targetComponentDirs?: string[]
307
+ layoutsDir?: string
308
+ fallbackLayoutsDir?: string
309
+ fallbackComponentsDir?: string
310
+ storesDir?: string
311
+ composablesDir?: string
312
+ defaultLayout?: string
313
+ plugins?: Array<string | [string, Record<string, any>]>
314
+ componentPackages?: string[]
315
+ publicDir?: string
316
+ envFile?: string | boolean
317
+ envPrefix?: string
318
+ css?: string | { config?: string, content?: string[], preflight?: boolean, minify?: boolean, [key: string]: unknown }
319
+ debug: boolean
320
+ cachePath: string
321
+ componentRenderCacheBytes: number
322
+ customDirectives?: CustomDirective[]
323
+ middleware?: Middleware[]
324
+ i18n?: Partial<I18nConfig>
325
+ webComponents?: Partial<WebComponentConfig>
326
+ docs?: Partial<DocGeneratorConfig>
327
+ streaming?: Partial<StreamingConfig>
328
+ hydration?: Partial<HydrationConfig>
329
+ a11y?: Partial<A11yConfig>
330
+ seo?: Partial<SeoFeatureConfig>
331
+ analytics?: Partial<AnalyticsConfig>
332
+ animation?: Partial<AnimationConfig>
333
+ skipDefaultSeoTags?: boolean
334
+ skipSignalsRuntime?: boolean
335
+ skipEventDirectives?: boolean
336
+ markdown?: Partial<MarkdownConfig>
337
+ loops?: Partial<LoopConfig>
338
+ forms?: Partial<FormConfig>
339
+ csp?: Partial<CspConfig>
340
+ story?: Partial<import('../story/types').StoryConfig>
341
+ pwa?: Partial<PwaConfig>
342
+ offline?: import('../offline/app-service-worker').OfflineAppConfig
343
+ components?: Partial<ComponentConfig>
344
+ routeMiddleware?: Partial<RouteMiddlewareConfig>
345
+ heatmap?: Partial<HeatmapConfig>
346
+ build?: Partial<BuildConfig>
347
+ media?: Partial<MediaConfig>
348
+ strict?: boolean | StrictModeConfig
349
+ buildMode?: 'compile' | 'serve' | 'spa'
350
+ autoShell?: boolean
351
+ outputDir?: string
352
+ shell?: string | false
353
+ broadcasting?: Partial<BroadcastingConfig>
354
+ apiRoutes?: Record<string, (request: Request) => Response | Promise<Response>>
355
+ routeRules?: RouteRules
356
+ serverApi?: boolean | ServerApiOptions
357
+ runtimeConfig?: import('../runtime-config-server').RuntimeConfigDefaults
358
+ extends?: string[]
359
+ _layerGraph?: import('../application-layers').ApplicationLayerGraph
360
+ _layerPageDirs?: string[]
361
+ _layerComponentDirs?: string[]
362
+ _layerLayoutDirs?: string[]
363
+ _layerPartialDirs?: string[]
364
+ _layerComposableDirs?: string[]
365
+ router?: {
366
+ enabled?: boolean
367
+ container?: string
368
+ linkSelector?: string
369
+ interceptAllLinks?: boolean
370
+ viewTransitions?: boolean
371
+ viewTransitionDuration?: number
372
+ viewTransitionEasing?: string
373
+ scrollToTop?: boolean
374
+ scrollRestoration?: boolean
375
+ prefetch?: boolean
376
+ cache?: boolean
377
+ cacheTTL?: number
378
+ skipSelectors?: string
379
+ viewTransitionCSS?: Record<string, string>
380
+ progress?: boolean
381
+ progressColor?: string
382
+ progressHeight?: string
383
+ prefetchVisible?: boolean
384
+ prefetchVisibleMax?: number
385
+ keepOpening?: boolean
386
+ }
387
+ apiRouter?: { handleRequest: (request: Request) => Response | Promise<Response> }
1022
388
  }
1023
389
  /**
1024
390
  * SSG Build configuration for static site generation
1025
391
  */
1026
- export interface BuildConfig {
1027
- /** Directory containing page templates (default: 'pages') */
1028
- pagesDir: string;
1029
- /** Output directory for generated files (default: 'dist') */
1030
- outputDir: string;
1031
- /** Base URL path for the site (default: '/') */
1032
- baseUrl: string;
1033
- /** Site domain for absolute URLs in sitemap */
1034
- domain?: string;
1035
- /** Generate sitemap.xml (default: true) */
1036
- sitemap: boolean;
1037
- /** Routes to omit from sitemap.xml and disallow in robots.txt. */
1038
- sitemapExclude?: (string | RegExp)[];
1039
- /** Generate robots.txt and optionally configure its rules. */
1040
- robots?: boolean | import('../ssg').RobotsConfig;
1041
- /** Generate RSS feed */
1042
- rss?: boolean | import('../ssg').RSSConfig;
1043
- /** Minify HTML output (default: true) */
1044
- minify: boolean;
1045
- /** Enable build caching (default: true) */
1046
- cache: boolean;
1047
- /** Cache directory (default: `ssg-cache` inside `stateDir`) */
1048
- cacheDir: string;
1049
- /** Parallel page generation limit (default: 10) */
1050
- concurrency: number;
1051
- /** Generate 404 page (default: true) */
1052
- generate404: boolean;
1053
- /** Directory with static assets to copy (default: 'public') */
1054
- publicDir: string;
1055
- /** Add trailing slashes to URLs (default: false) */
1056
- trailingSlash: boolean;
1057
- /** Clean output directory before build (default: true) */
1058
- cleanOutput: boolean;
1059
- /** ISR revalidation time in seconds */
1060
- revalidate?: number | false;
392
+ export declare interface BuildConfig {
393
+ pagesDir: string
394
+ outputDir: string
395
+ baseUrl: string
396
+ domain?: string
397
+ sitemap: boolean
398
+ sitemapExclude?: (string | RegExp)[]
399
+ robots?: boolean | import('../ssg').RobotsConfig
400
+ rss?: boolean | import('../ssg').RSSConfig
401
+ minify: boolean
402
+ cache: boolean
403
+ cacheDir: string
404
+ concurrency: number
405
+ generate404: boolean
406
+ publicDir: string
407
+ trailingSlash: boolean
408
+ cleanOutput: boolean
409
+ revalidate?: number | false
1061
410
  }
411
+ /**
412
+ * Analytics driver type
413
+ */
414
+ export type AnalyticsDriver = 'fathom' | 'google-analytics' | 'plausible' | 'self-hosted' | 'custom';
415
+ /**
416
+ * Available syntax highlighting themes
417
+ */
418
+ export type SyntaxHighlightTheme = | 'css-variables'
419
+ | 'dark-plus'
420
+ | 'dracula'
421
+ | 'dracula-soft'
422
+ | 'github-dark'
423
+ | 'github-dark-dimmed'
424
+ | 'github-light'
425
+ | 'hc_light'
426
+ | 'light-plus'
427
+ | 'material-theme'
428
+ | 'material-theme-darker'
429
+ | 'material-theme-lighter'
430
+ | 'material-theme-ocean'
431
+ | 'material-theme-palenight'
432
+ | 'min-dark'
433
+ | 'min-light'
434
+ | 'monokai'
435
+ | 'nord'
436
+ | 'one-dark-pro'
437
+ | 'poimandres'
438
+ | 'rose-pine'
439
+ | 'rose-pine-dawn'
440
+ | 'rose-pine-moon'
441
+ | 'slack-dark'
442
+ | 'slack-ochin'
443
+ | 'solarized-dark'
444
+ | 'solarized-light'
445
+ | 'vitesse-dark'
446
+ | 'vitesse-light';
1062
447
  export type StxOptions = Partial<StxConfig>;