@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.
- package/dist/a11y.d.ts +51 -111
- package/dist/animation.d.ts +131 -74
- package/dist/api-client.d.ts +11 -21
- package/dist/api-handler.d.ts +4 -4
- package/dist/appearance-bootstrap.d.ts +16 -77
- package/dist/application-layers.d.ts +11 -20
- package/dist/asset-roots.d.ts +7 -27
- package/dist/assets.d.ts +7 -9
- package/dist/async-components.d.ts +56 -78
- package/dist/auth.d.ts +0 -3
- package/dist/browser-core-imports.d.ts +2 -2
- package/dist/build-externalize-repeated.d.ts +0 -25
- package/dist/build-externalize.d.ts +18 -53
- package/dist/build-id.d.ts +40 -28
- package/dist/build-message.d.ts +20 -44
- package/dist/builtins/attrs.d.ts +0 -14
- package/dist/builtins/drawer.d.ts +3 -22
- package/dist/builtins/icon.d.ts +17 -19
- package/dist/builtins/image-alpha.d.ts +8 -8
- package/dist/builtins/image-delivery.d.ts +38 -40
- package/dist/builtins/image-placeholder.d.ts +12 -50
- package/dist/builtins/image-warmup-worker.d.ts +1 -1
- package/dist/builtins/image-worker.d.ts +6 -32
- package/dist/builtins/index.d.ts +16 -6
- package/dist/builtins/modal.d.ts +13 -23
- package/dist/builtins/safe-image.d.ts +2 -42
- package/dist/builtins/stx-image.d.ts +44 -24
- package/dist/builtins/stx-link.d.ts +5 -8
- package/dist/builtins/stx-loading-indicator.d.ts +11 -10
- package/dist/builtins/suspense.d.ts +6 -27
- package/dist/builtins/toast.d.ts +15 -16
- package/dist/builtins/transition-group.d.ts +1 -25
- package/dist/caching.d.ts +24 -21
- package/dist/{chunk-f4jh9vrj.js → chunk-0s647d0b.js} +53 -53
- package/dist/{chunk-09gtbb1w.js → chunk-1bsafdnt.js} +1 -1
- package/dist/{chunk-m6mxqepz.js → chunk-1btr5tme.js} +1 -1
- package/dist/{chunk-01mxer9s.js → chunk-2g6wcnna.js} +1 -1
- package/dist/{chunk-rrj5m9xv.js → chunk-2hg2bqtj.js} +1 -1
- package/dist/{chunk-xckzvbvn.js → chunk-4f0fh2a9.js} +1 -1
- package/dist/chunk-557wtdps.js +2 -0
- package/dist/{chunk-vr36s2en.js → chunk-58vrf6kh.js} +1 -1
- package/dist/{chunk-qzbzn1yf.js → chunk-6tsnz28m.js} +1 -1
- package/dist/{chunk-cvswrbzw.js → chunk-6x8cwscv.js} +1 -1
- package/dist/{chunk-1n64749x.js → chunk-74ew8ajw.js} +1 -1
- package/dist/{chunk-jqefcghh.js → chunk-78d6yyxz.js} +2 -2
- package/dist/{chunk-83fdt4yj.js → chunk-824cnbac.js} +1 -1
- package/dist/{chunk-ntgy4e1q.js → chunk-864xm0jy.js} +1 -1
- package/dist/{chunk-nn174xjh.js → chunk-9fbkdrm8.js} +1 -1
- package/dist/{chunk-kzjrgh0b.js → chunk-a3gvw1q2.js} +1 -1
- package/dist/{chunk-pqcvh9pp.js → chunk-amtrg7pn.js} +1 -1
- package/dist/{chunk-pw9verqx.js → chunk-b5fpsp5n.js} +1 -1
- package/dist/{chunk-5afw7z6v.js → chunk-bcjr3fw7.js} +1 -1
- package/dist/{chunk-n6qp05t9.js → chunk-bkj0j5se.js} +1 -1
- package/dist/{chunk-mzqyv7s5.js → chunk-cf97xdqa.js} +1 -1
- package/dist/{chunk-cgwyd9aq.js → chunk-cr67dpx4.js} +1 -1
- package/dist/{chunk-f1apaqfk.js → chunk-dpqvacd1.js} +1 -1
- package/dist/{chunk-ghy82tsc.js → chunk-et8726at.js} +1 -1
- package/dist/{chunk-4bgfpkwx.js → chunk-ev8t5cxk.js} +1 -1
- package/dist/{chunk-4ssg5xpq.js → chunk-fynh3bkq.js} +12 -2
- package/dist/{chunk-gzgc8zk5.js → chunk-g8757f97.js} +2 -2
- package/dist/{chunk-3gft8zng.js → chunk-hm4j4d8q.js} +1 -1
- package/dist/{chunk-0bt0fbs1.js → chunk-j9qy9t3t.js} +5 -5
- package/dist/{chunk-2a1q5y6r.js → chunk-jhc47xzj.js} +1 -1
- package/dist/{chunk-79vdkvhf.js → chunk-kns5m52j.js} +1 -1
- package/dist/{chunk-2cqbyb8w.js → chunk-mjpewk4r.js} +1 -1
- package/dist/{chunk-2jjff8kv.js → chunk-nj488tj2.js} +2 -2
- package/dist/{chunk-dcpf6kas.js → chunk-q9chv68c.js} +1 -1
- package/dist/{chunk-xq2ck69k.js → chunk-qm280dp3.js} +1 -1
- package/dist/{chunk-ymawe0y5.js → chunk-sjcstv33.js} +1 -1
- package/dist/{chunk-tc5r2vmw.js → chunk-t0zdz8kd.js} +1 -1
- package/dist/{chunk-jwvzvapp.js → chunk-t3dnak1j.js} +1 -1
- package/dist/{chunk-2jsnrfc8.js → chunk-t64nnmmj.js} +1 -1
- package/dist/{chunk-m2a1fxpb.js → chunk-tvb8p7c0.js} +1 -1
- package/dist/{chunk-6f4qrd0s.js → chunk-tyhgq6rw.js} +1 -1
- package/dist/{chunk-4wfr074d.js → chunk-vn7tc8hm.js} +1 -1
- package/dist/{chunk-y4ajd836.js → chunk-xy6g8zb9.js} +1 -1
- package/dist/{chunk-zddzjd60.js → chunk-ya7xks9t.js} +1 -1
- package/dist/chunk-zpz6q2fh.js +2 -0
- package/dist/chunk-zxt94g45.js +2 -0
- package/dist/{chunk-cyg9w31a.js → chunk-zz7tw07b.js} +1 -1
- package/dist/{chunk-ta8bhz27.js → chunk-zzcxacjf.js} +1 -1
- package/dist/cli.js +7 -7
- package/dist/client/directive.d.ts +0 -7
- package/dist/client/index.d.ts +1 -0
- package/dist/client/signals-appearance-runtime.d.ts +1 -1
- package/dist/client/signals-binding-utils-runtime.d.ts +1 -1
- package/dist/client/signals-bootstrap-runtime.d.ts +2 -2
- package/dist/client/signals-class-runtime.d.ts +1 -1
- package/dist/client/signals-component-api-runtime.d.ts +1 -1
- package/dist/client/signals-component-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-component-props-runtime.d.ts +1 -1
- package/dist/client/signals-conditional-chain-runtime.d.ts +1 -1
- package/dist/client/signals-conditional-component-runtime.d.ts +1 -1
- package/dist/client/signals-container-cleanup-runtime.d.ts +1 -1
- package/dist/client/signals-context-runtime.d.ts +1 -1
- package/dist/client/signals-cookie-runtime.d.ts +1 -1
- package/dist/client/signals-devtools-runtime.d.ts +1 -1
- package/dist/client/signals-dialog-runtime.d.ts +1 -1
- package/dist/client/signals-dom-ready-runtime.d.ts +1 -1
- package/dist/client/signals-drawer-runtime.d.ts +1 -1
- package/dist/client/signals-effect-runtime.d.ts +1 -1
- package/dist/client/signals-event-shorthand-runtime.d.ts +1 -1
- package/dist/client/signals-expression-compiler-runtime.d.ts +1 -1
- package/dist/client/signals-expression-runtime.d.ts +1 -1
- package/dist/client/signals-fetch-transport-runtime.d.ts +1 -1
- package/dist/client/signals-for-runtime.d.ts +1 -1
- package/dist/client/signals-globals-runtime.d.ts +1 -1
- package/dist/client/signals-handler-runtime.d.ts +1 -1
- package/dist/client/signals-head-runtime.d.ts +1 -1
- package/dist/client/signals-helpers-runtime.d.ts +1 -1
- package/dist/client/signals-host-runtime.d.ts +1 -1
- package/dist/client/signals-hydration-audit-runtime.d.ts +1 -1
- package/dist/client/signals-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-if-chain-runtime.d.ts +1 -1
- package/dist/client/signals-if-runtime.d.ts +1 -1
- package/dist/client/signals-lazy-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-lifecycle-runtime.d.ts +1 -1
- package/dist/client/signals-loop-component-remap-runtime.d.ts +1 -1
- package/dist/client/signals-loop-conditional-runtime.d.ts +1 -1
- package/dist/client/signals-loop-row-runtime.d.ts +1 -1
- package/dist/client/signals-manifest-hydration-runtime.d.ts +1 -1
- package/dist/client/signals-model-runtime.d.ts +1 -1
- package/dist/client/signals-mount-runtime.d.ts +1 -1
- package/dist/client/signals-navigation-runtime.d.ts +1 -1
- package/dist/client/signals-notify-runtime.d.ts +1 -1
- package/dist/client/signals-optimistic-runtime.d.ts +1 -1
- package/dist/client/signals-overlay-runtime.d.ts +1 -1
- package/dist/client/signals-pipe-runtime.d.ts +1 -1
- package/dist/client/signals-proxy-runtime.d.ts +1 -1
- package/dist/client/signals-query-runtime.d.ts +1 -1
- package/dist/client/signals-reactive-runtime.d.ts +1 -1
- package/dist/client/signals-ref-runtime.d.ts +1 -1
- package/dist/client/signals-scope-disposal-runtime.d.ts +1 -1
- package/dist/client/signals-scope-traversal-runtime.d.ts +1 -1
- package/dist/client/signals-show-runtime.d.ts +1 -1
- package/dist/client/signals-spa-load-control-runtime.d.ts +1 -1
- package/dist/client/signals-spa-load-runtime.d.ts +1 -1
- package/dist/client/signals-state-runtime.d.ts +1 -1
- package/dist/client/signals-storage-runtime.d.ts +1 -1
- package/dist/client/signals-store-registry-runtime.d.ts +1 -1
- package/dist/client/signals-style-runtime.d.ts +1 -1
- package/dist/client/signals-suspense-runtime.d.ts +1 -1
- package/dist/client/signals-timer-runtime.d.ts +1 -1
- package/dist/client/signals-toast-runtime.d.ts +1 -1
- package/dist/client/signals-tooltip-runtime.d.ts +1 -1
- package/dist/client/signals-transition-group-runtime.d.ts +1 -1
- package/dist/client/signals-websocket-runtime.d.ts +1 -1
- package/dist/client-helpers.d.ts +1 -312
- package/dist/client-module-registry.d.ts +4 -27
- package/dist/client-parameter-bindings.d.ts +1 -4
- package/dist/client-script-bundler.d.ts +55 -103
- package/dist/client-script.d.ts +69 -127
- package/dist/color-mode-boot.d.ts +21 -58
- package/dist/component-client-factories.d.ts +8 -9
- package/dist/component-contract-checks.d.ts +15 -18
- package/dist/component-contract.d.ts +6 -6
- package/dist/component-hmr.d.ts +8 -7
- package/dist/component-model.d.ts +14 -20
- package/dist/component-processing.d.ts +51 -59
- package/dist/component-registry.d.ts +28 -99
- package/dist/component-renderer.d.ts +19 -16
- package/dist/component-resolution.d.ts +8 -8
- package/dist/component-tags.d.ts +1 -1
- package/dist/composable-loader.d.ts +6 -41
- package/dist/composables/use-fetch.d.ts +45 -114
- package/dist/composables/use-form.d.ts +2 -56
- package/dist/composables/use-intersection-observer.d.ts +1 -1
- package/dist/composables.d.ts +75 -74
- package/dist/composition-api.d.ts +19 -43
- package/dist/computed.d.ts +93 -86
- package/dist/conditionals.d.ts +0 -24
- package/dist/config.d.ts +30 -24
- package/dist/config.js +3 -0
- package/dist/craft-bridge.d.ts +1 -467
- package/dist/craft-components.d.ts +234 -680
- package/dist/craft-entry.js +1 -1
- package/dist/craft.js +1 -1
- package/dist/csp.d.ts +41 -107
- package/dist/database.d.ts +1 -1
- package/dist/defer.d.ts +0 -24
- package/dist/dev-server/terminal-colors.d.ts +32 -32
- package/dist/dev-server/ts-css.d.ts +26 -35
- package/dist/dev-server/types.d.ts +33 -29
- package/dist/directive-api.d.ts +42 -85
- package/dist/directive-arguments.d.ts +14 -39
- package/dist/document-shell.d.ts +49 -81
- package/dist/dynamic-components.d.ts +0 -9
- package/dist/engine-bindings.d.ts +1 -1
- package/dist/env.d.ts +26 -0
- package/dist/error-boundaries.d.ts +36 -43
- package/dist/error-handling.d.ts +1 -1
- package/dist/errors/codes.d.ts +43 -51
- package/dist/errors/formatter.d.ts +38 -58
- package/dist/errors/index.d.ts +61 -5
- package/dist/errors/logger.d.ts +40 -114
- package/dist/errors/sanitizer.d.ts +28 -53
- package/dist/errors/types.d.ts +31 -44
- package/dist/events.d.ts +32 -94
- package/dist/expressions.d.ts +57 -62
- package/dist/find-body-tag.d.ts +5 -34
- package/dist/first-script-tag.d.ts +0 -23
- package/dist/forms-validation.d.ts +117 -149
- package/dist/forms.d.ts +161 -120
- package/dist/framework-composables.d.ts +0 -32
- package/dist/head-injection.d.ts +30 -32
- package/dist/head-keys.d.ts +12 -15
- package/dist/head.d.ts +110 -139
- package/dist/heatmap.d.ts +76 -152
- package/dist/html-masking.d.ts +38 -62
- package/dist/hydration-runtime.d.ts +24 -20
- package/dist/hydration.d.ts +11 -10
- package/dist/i18n.d.ts +34 -95
- package/dist/image-optimization/auto-sibling.d.ts +4 -32
- package/dist/imported-signals.d.ts +0 -36
- package/dist/includes.d.ts +6 -69
- package/dist/index.d.ts +2 -1
- package/dist/init.d.ts +12 -20
- package/dist/internal-markdown.d.ts +8 -12
- package/dist/interpolation-context.d.ts +15 -15
- package/dist/island-chunking.d.ts +13 -30
- package/dist/keep-alive.d.ts +52 -72
- package/dist/layout-types.d.ts +2 -27
- package/dist/lazy-module.d.ts +0 -10
- package/dist/loading-indicator.d.ts +8 -5
- package/dist/loop-binding.d.ts +4 -7
- package/dist/loops.d.ts +25 -67
- package/dist/markdown.d.ts +1 -0
- package/dist/media/image/component.d.ts +9 -25
- package/dist/media/image/directive.d.ts +1 -15
- package/dist/media/image/placeholder.d.ts +9 -20
- package/dist/media/image/processor/cache.d.ts +18 -40
- package/dist/media/image/processor/index.d.ts +10 -1
- package/dist/media/image/processor/optimizer.d.ts +1 -12
- package/dist/media/image/processor/responsive.d.ts +6 -16
- package/dist/media/image/srcset.d.ts +49 -47
- package/dist/media/shared/cache.d.ts +31 -51
- package/dist/media/shared/hash.d.ts +0 -7
- package/dist/media/types.d.ts +754 -1235
- package/dist/media/video/directive.d.ts +1 -15
- package/dist/media/video/index.d.ts +17 -39
- package/dist/media/video/processor/cache.d.ts +19 -42
- package/dist/media/video/processor/index.d.ts +18 -1
- package/dist/media/video/processor/streaming.d.ts +10 -17
- package/dist/media/video/processor/thumbnail.d.ts +15 -21
- package/dist/media/video/processor/transcoder.d.ts +1 -11
- package/dist/meta-arguments.d.ts +14 -39
- package/dist/method-spoofing.d.ts +0 -7
- package/dist/middleware.d.ts +0 -60
- package/dist/native/bridge/protocol.d.ts +2 -1
- package/dist/native/compiler/bundle.js +11 -1
- package/dist/native/compiler/headwind-to-style.d.ts +383 -359
- package/dist/native/compiler/icons.d.ts +249 -243
- package/dist/native/compiler/svg.d.ts +35 -24
- package/dist/native/runtime/jsc-globals.d.ts +1 -1
- package/dist/native/runtime/native-host.d.ts +1 -1
- package/dist/native/runtime/native-host.js +3 -0
- package/dist/offline/app-service-worker.d.ts +50 -114
- package/dist/offline/kept-store.d.ts +23 -37
- package/dist/offline/query-cache.d.ts +55 -126
- package/dist/owned-routes.d.ts +0 -31
- package/dist/page-response.d.ts +8 -39
- package/dist/parser/directive-parser.d.ts +45 -57
- package/dist/parser/expression-parser.d.ts +35 -33
- package/dist/parser/index.d.ts +39 -4
- package/dist/parser/tokenizer.d.ts +49 -61
- package/dist/partial-hydration.d.ts +51 -82
- package/dist/performance-utils.d.ts +115 -255
- package/dist/placeholder.d.ts +9 -18
- package/dist/plugin-system.d.ts +115 -264
- package/dist/process.d.ts +4 -9
- package/dist/process.js +6 -4
- package/dist/prop-sentinels.d.ts +11 -11
- package/dist/public-env.d.ts +0 -14
- package/dist/pwa/directives.d.ts +20 -12
- package/dist/pwa/inject.d.ts +0 -10
- package/dist/pwa/precache.d.ts +16 -22
- package/dist/pwa/service-worker.d.ts +0 -12
- package/dist/pwa.js +1 -1
- package/dist/reactive-bindings.d.ts +11 -34
- package/dist/reactive-tracking.d.ts +0 -36
- package/dist/reactive.d.ts +41 -58
- package/dist/render-memo.d.ts +5 -23
- package/dist/resolve-stx-targets.d.ts +6 -44
- package/dist/route-middleware.d.ts +35 -2
- package/dist/route-rules.d.ts +10 -13
- package/dist/router.d.ts +9 -8
- package/dist/routes.d.ts +3 -1
- package/dist/runtime-config-server.d.ts +14 -17
- package/dist/runtime-config.d.ts +2 -3
- package/dist/runtime-globals.d.ts +90 -122
- package/dist/runtime-injection.d.ts +0 -8
- package/dist/scaffolding.d.ts +30 -26
- package/dist/script-emit.d.ts +0 -30
- package/dist/script-validation.d.ts +6 -12
- package/dist/seo.d.ts +75 -153
- package/dist/server-api.d.ts +9 -12
- package/dist/server-bindings.d.ts +1 -26
- package/dist/server-data.d.ts +4 -5
- package/dist/sfc-template.d.ts +8 -8
- package/dist/signal-processing.d.ts +37 -53
- package/dist/signals-api.d.ts +58 -135
- package/dist/signals.d.ts +18 -24
- package/dist/site-url.d.ts +31 -28
- package/dist/slots.d.ts +20 -86
- package/dist/source-signature.d.ts +5 -28
- package/dist/ssg.d.ts +158 -337
- package/dist/ssg.js +2 -2
- package/dist/state-dir.d.ts +4 -4
- package/dist/store-loader.d.ts +0 -10
- package/dist/story/analytics.d.ts +60 -138
- package/dist/story/bookmarks.d.ts +34 -87
- package/dist/story/cli.d.ts +69 -123
- package/dist/story/collect/scanner.d.ts +0 -4
- package/dist/story/collect/tree.d.ts +1 -8
- package/dist/story/commands/build.d.ts +6 -11
- package/dist/story/commands/dev.d.ts +8 -15
- package/dist/story/commands/preview.d.ts +7 -13
- package/dist/story/config-watcher.d.ts +13 -20
- package/dist/story/config.d.ts +8 -11
- package/dist/story/context.d.ts +8 -14
- package/dist/story/hmr.d.ts +26 -24
- package/dist/story/hot-swap.d.ts +23 -34
- package/dist/story/keyboard-shortcuts.d.ts +18 -23
- package/dist/story/output.d.ts +44 -46
- package/dist/story/performance.d.ts +45 -107
- package/dist/story/presets.d.ts +41 -107
- package/dist/story/renderer.d.ts +27 -41
- package/dist/story/search.d.ts +12 -23
- package/dist/story/server.d.ts +11 -21
- package/dist/story/setup.d.ts +15 -23
- package/dist/story/testing.d.ts +40 -65
- package/dist/story/types.d.ts +160 -262
- package/dist/streaming.d.ts +57 -119
- package/dist/strip-literals.d.ts +1 -25
- package/dist/stx-module-imports.d.ts +7 -0
- package/dist/stx-virtual-ts.d.ts +102 -253
- package/dist/style-scoping.d.ts +8 -21
- package/dist/suspense.d.ts +52 -67
- package/dist/teleport.d.ts +0 -22
- package/dist/template-syntax-escape.d.ts +8 -8
- package/dist/template-tag-balance.d.ts +6 -22
- package/dist/testing.d.ts +26 -11
- package/dist/theme-tokens.d.ts +388 -134
- package/dist/transitions.d.ts +55 -66
- package/dist/ts-css-config.d.ts +12 -70
- package/dist/types/component-types.d.ts +122 -187
- package/dist/types/config-types.d.ts +341 -956
- package/dist/types/context-types.d.ts +24 -46
- package/dist/types/csp-types.d.ts +66 -70
- package/dist/types/directive-types.d.ts +156 -223
- package/dist/types/index.d.ts +110 -6
- package/dist/types/pwa-types.d.ts +148 -273
- package/dist/types.d.ts +1 -0
- package/dist/unresolved-identifiers.d.ts +22 -24
- package/dist/url-safety.d.ts +32 -32
- package/dist/utils.d.ts +21 -36
- package/dist/validator.d.ts +26 -28
- package/dist/variable-extractor.d.ts +19 -49
- package/dist/view-composers.d.ts +81 -80
- package/dist/virtual-scrolling.d.ts +82 -101
- package/dist/visual-testing.d.ts +10 -9
- package/dist/vue-template.d.ts +0 -23
- package/dist/web-components/css-scoping.d.ts +11 -21
- package/dist/web-components.d.ts +58 -81
- package/dist/x-element.d.ts +1 -0
- package/package.json +6 -6
- package/stx.d.ts +2 -2
- package/dist/app-service-worker.d.ts +0 -165
- package/dist/chunk-49gwmcrn.js +0 -2
- package/dist/chunk-6va5pe2m.js +0 -2
- package/dist/chunk-bm2q1srp.js +0 -2
- package/dist/signals-context-runtime.d.ts +0 -2
- package/dist/signals-drawer-runtime.d.ts +0 -2
- package/dist/signals-host-runtime.d.ts +0 -9
- package/dist/signals-loop-conditional-runtime.d.ts +0 -2
- package/dist/signals-manifest-hydration-runtime.d.ts +0 -2
- package/dist/signals-notify-runtime.d.ts +0 -2
- package/dist/signals-optimistic-runtime.d.ts +0 -2
- package/dist/signals-overlay-runtime.d.ts +0 -2
- package/dist/signals-scope-disposal-runtime.d.ts +0 -2
- package/dist/signals-spa-load-control-runtime.d.ts +0 -2
- 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
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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
|
-
|
|
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
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
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
|
-
|
|
333
|
-
|
|
334
|
-
|
|
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
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
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
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
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
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
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
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
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>;
|