@stacksjs/stx 0.2.851 → 0.2.853
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 +1 -1
- package/dist/analytics.d.ts +1 -1
- package/dist/animation.d.ts +1 -44
- package/dist/api-client.d.ts +1 -0
- package/dist/app-shell.d.ts +2 -2
- package/dist/app.d.ts +1 -1
- package/dist/application-layers.d.ts +1 -1
- package/dist/assets.d.ts +1 -1
- package/dist/ast.d.ts +23 -1
- package/dist/broadcasting.d.ts +1 -1
- package/dist/browser-composables.d.ts +1 -0
- package/dist/build-externalize-repeated.d.ts +1 -1
- package/dist/build-id.d.ts +1 -0
- package/dist/build-views.d.ts +1 -1
- package/dist/build.d.ts +3 -3
- package/dist/builtins/attrs.d.ts +1 -1
- package/dist/builtins/drawer.d.ts +2 -2
- package/dist/builtins/icon.d.ts +2 -13
- package/dist/builtins/image-delivery.d.ts +1 -1
- package/dist/builtins/image-worker.d.ts +2 -2
- package/dist/builtins/index.d.ts +22 -22
- package/dist/builtins/modal.d.ts +2 -2
- package/dist/builtins/safe-image.d.ts +2 -2
- package/dist/builtins/stx-image.d.ts +2 -43
- package/dist/builtins/stx-link.d.ts +1 -10
- package/dist/builtins/stx-loading-indicator.d.ts +1 -13
- package/dist/builtins/suspense.d.ts +1 -8
- package/dist/builtins/toast.d.ts +2 -3
- package/dist/builtins/transition-group.d.ts +1 -2
- package/dist/bundle-analyzer/index.d.ts +6 -6
- package/dist/bundle-analyzer/report.d.ts +1 -1
- package/dist/bundle-analyzer/treemap.d.ts +1 -1
- package/dist/caching.d.ts +4 -4
- package/dist/chunk-05f4tjsq.js +2 -0
- package/dist/{chunk-422r7zkx.js → chunk-0hegjagg.js} +2 -2
- package/dist/{chunk-yvfzvygh.js → chunk-0wxmmvj0.js} +3 -3
- package/dist/chunk-0xwmweqm.js +2 -0
- package/dist/chunk-0yc4p3y2.js +2 -0
- package/dist/chunk-161p0zcy.js +2 -0
- package/dist/chunk-28r4jyvj.js +2 -0
- package/dist/{chunk-gwdffrz6.js → chunk-2rxr5cj6.js} +3 -3
- package/dist/{chunk-s0pnyd2f.js → chunk-33ph9zb2.js} +4 -4
- package/dist/chunk-3b9950gz.js +2 -0
- package/dist/chunk-46mw2r3k.js +2 -0
- package/dist/chunk-48z6w533.js +3 -0
- package/dist/{chunk-88392kaj.js → chunk-4nhbbcr9.js} +5 -5
- package/dist/{chunk-f5n871gp.js → chunk-4wx7refk.js} +4 -4
- package/dist/chunk-4zkk63v3.js +2 -0
- package/dist/{chunk-422eg7vs.js → chunk-52szcd15.js} +1 -1
- package/dist/chunk-5758n8sm.js +2 -0
- package/dist/{chunk-fffjjgnt.js → chunk-5erremft.js} +2 -2
- package/dist/{chunk-r0k5jbvk.js → chunk-5fdpg861.js} +1 -1
- package/dist/{chunk-k47addf7.js → chunk-5g1jwxny.js} +9 -9
- package/dist/{chunk-m9kkd9f2.js → chunk-5pft38qa.js} +2 -2
- package/dist/chunk-5t8xpkwc.js +2 -0
- package/dist/{chunk-aas25pac.js → chunk-63rvsnt2.js} +3 -3
- package/dist/chunk-6bm19d4k.js +2 -0
- package/dist/chunk-6c45vx1e.js +2 -0
- package/dist/chunk-6vc1dwqt.js +2 -0
- package/dist/chunk-76b6m6n0.js +2 -0
- package/dist/{chunk-qev14f76.js → chunk-7kc9xwht.js} +3 -3
- package/dist/{chunk-45yytzyd.js → chunk-7rtvravz.js} +7 -7
- package/dist/{chunk-x9a2agqk.js → chunk-7wwq1btb.js} +1 -1
- package/dist/{chunk-xj5jdy7n.js → chunk-83d468me.js} +4 -4
- package/dist/{chunk-p4ytnee6.js → chunk-8cg88x7m.js} +39 -39
- package/dist/chunk-8fprfzcn.js +2 -0
- package/dist/{chunk-j5pgwqwp.js → chunk-8g0243g1.js} +3 -3
- package/dist/chunk-9h1w4py6.js +2 -0
- package/dist/{chunk-q5rw0d2m.js → chunk-9mzskb69.js} +3 -3
- package/dist/{chunk-8cvgm13s.js → chunk-9r999ees.js} +2 -2
- package/dist/{chunk-2d7e5g92.js → chunk-9z7fnv33.js} +1 -1
- package/dist/{chunk-ark6w80h.js → chunk-a0ahcd1g.js} +2 -2
- package/dist/chunk-aajezypd.js +2 -0
- package/dist/{chunk-nqv66ehx.js → chunk-agvm20mz.js} +3 -3
- package/dist/{chunk-hdep0xcy.js → chunk-baxrx1rz.js} +9 -9
- package/dist/{chunk-xndr2dx9.js → chunk-bkefg64w.js} +5 -5
- package/dist/{chunk-ezzskm4a.js → chunk-bqxrfagh.js} +1 -1
- package/dist/chunk-bz4bskx3.js +2 -0
- package/dist/chunk-bze3ksvb.js +2 -0
- package/dist/chunk-c2et7w0g.js +2 -0
- package/dist/{chunk-eyp7rr70.js → chunk-c54bhqrg.js} +39 -39
- package/dist/{chunk-e9qgyvz5.js → chunk-c9k0yhyq.js} +2 -2
- package/dist/{chunk-ngdye54z.js → chunk-cabdpgxg.js} +3 -3
- package/dist/{chunk-cct2fzth.js → chunk-cf7dk9ev.js} +10 -10
- package/dist/chunk-cfmjtyzm.js +2 -0
- package/dist/{chunk-h9gjt73q.js → chunk-csgfws3j.js} +2 -2
- package/dist/{chunk-scaawv2r.js → chunk-csksn1kg.js} +2 -2
- package/dist/{chunk-t23jn83r.js → chunk-ctb1bj28.js} +2 -2
- package/dist/chunk-cxf0rzv6.js +2 -0
- package/dist/{chunk-axga9ebe.js → chunk-d4gy4yz0.js} +2 -2
- package/dist/chunk-dee5mtdv.js +2 -0
- package/dist/chunk-dm10y06z.js +2 -0
- package/dist/chunk-dw9vnhc4.js +2 -0
- package/dist/chunk-e5vbwsty.js +2 -0
- package/dist/chunk-e64m5ayt.js +2 -0
- package/dist/{chunk-z33esms3.js → chunk-ehp792dy.js} +2 -2
- package/dist/{chunk-tm1ec751.js → chunk-f9thwm8c.js} +4 -4
- package/dist/chunk-faf3gh3j.js +2 -0
- package/dist/chunk-fbakngjt.js +2 -0
- package/dist/{chunk-amerebya.js → chunk-fhrvxfq9.js} +2 -2
- package/dist/{chunk-pkq96sqk.js → chunk-fj5jw2jd.js} +6 -6
- package/dist/chunk-fn2cjkp0.js +2 -0
- package/dist/{chunk-m05pqmcj.js → chunk-fphnst8a.js} +5 -5
- package/dist/chunk-fsg958xx.js +2 -0
- package/dist/{chunk-4jf18yed.js → chunk-fxt9vwdw.js} +38 -38
- package/dist/chunk-g976n4r1.js +2 -0
- package/dist/chunk-gn1dmfdv.js +2 -0
- package/dist/chunk-gsn5vvw4.js +2 -0
- package/dist/chunk-hmys6w75.js +2 -0
- package/dist/chunk-hqtj4ngq.js +2 -0
- package/dist/chunk-hwq24mwt.js +2 -0
- package/dist/{chunk-0rszcb0m.js → chunk-j1yjbykm.js} +6 -6
- package/dist/{chunk-frhdk0p9.js → chunk-j2wcawmf.js} +2 -2
- package/dist/{chunk-k7dvn2r8.js → chunk-jr346anv.js} +2 -2
- package/dist/{chunk-tr5r70yr.js → chunk-jtpqqxzb.js} +6 -6
- package/dist/chunk-jy5fezyr.js +2 -0
- package/dist/chunk-kfq4mwem.js +2 -0
- package/dist/chunk-kgrvvtcy.js +3 -0
- package/dist/chunk-kkk1dtq6.js +2 -0
- package/dist/chunk-knd3m4t4.js +2 -0
- package/dist/{chunk-jtccqpwa.js → chunk-kvafq9gy.js} +2 -2
- package/dist/chunk-m3kc2a3v.js +2 -0
- package/dist/{chunk-kf5fsz9b.js → chunk-m9n3ahsy.js} +2 -2
- package/dist/{chunk-taf784yy.js → chunk-mdsc3rz1.js} +2 -2
- package/dist/chunk-mjp2sp74.js +2 -0
- package/dist/{chunk-g046t3hb.js → chunk-mmdqdkbd.js} +1 -1
- package/dist/{chunk-caehra7e.js → chunk-mpmnbvy4.js} +5 -5
- package/dist/chunk-mx79sfyr.js +2 -0
- package/dist/chunk-n6w82yf2.js +2 -0
- package/dist/{chunk-qjc3qjyf.js → chunk-n77xrpv9.js} +2 -2
- package/dist/{chunk-7hv190bd.js → chunk-n8qd1n8w.js} +3 -3
- package/dist/{chunk-agbkv9ab.js → chunk-ngnvyqk3.js} +2 -2
- package/dist/{chunk-zjm67zx2.js → chunk-nyqvtca1.js} +4 -4
- package/dist/{chunk-dy31f39m.js → chunk-nz202f97.js} +4 -4
- package/dist/chunk-pd3wzh2x.js +2 -0
- package/dist/chunk-pj3xwwtg.js +2 -0
- package/dist/{chunk-gsrdjmw9.js → chunk-pm241ehv.js} +2 -2
- package/dist/{chunk-8vjr3atq.js → chunk-prfrqfae.js} +2 -2
- package/dist/chunk-q1z8edtn.js +2 -0
- package/dist/{chunk-3wkgd883.js → chunk-qkcn0exq.js} +6 -6
- package/dist/{chunk-m710wkr4.js → chunk-qnyh0m22.js} +1 -1
- package/dist/{chunk-e85wsz8y.js → chunk-r69en2jg.js} +1 -1
- package/dist/{chunk-833y1ndd.js → chunk-rbxbgvkf.js} +1 -1
- package/dist/{chunk-wn8qkcaw.js → chunk-rmeey2xa.js} +4 -4
- package/dist/{chunk-xz4yq7gh.js → chunk-rrppkyv0.js} +42 -42
- package/dist/{chunk-yza0mj53.js → chunk-rw7q2a3c.js} +9 -9
- package/dist/chunk-s4c1mq0r.js +2 -0
- package/dist/chunk-sx1prttb.js +2 -0
- package/dist/chunk-syww37qd.js +2 -0
- package/dist/{chunk-6p62jjzm.js → chunk-t3a3wbjk.js} +2 -2
- package/dist/{chunk-0dnetjh8.js → chunk-te82sjhy.js} +48 -48
- package/dist/{chunk-2rg9pqmh.js → chunk-tm8a2b69.js} +4 -4
- package/dist/{chunk-6dqafrq5.js → chunk-trxha300.js} +5 -5
- package/dist/{chunk-5gfg2tqg.js → chunk-txdxfjbj.js} +3 -3
- package/dist/{chunk-j8f4tb4p.js → chunk-vpqgg04q.js} +1 -1
- package/dist/{chunk-qk2herh9.js → chunk-vtzkqsq1.js} +17 -17
- package/dist/chunk-vw9h1x2m.js +2 -0
- package/dist/{chunk-e105xsee.js → chunk-w7p34cr3.js} +1 -1
- package/dist/{chunk-69nhstnz.js → chunk-x1w19y3w.js} +4 -4
- package/dist/chunk-x2vybq9n.js +2 -0
- package/dist/chunk-x8jsmwhg.js +2 -0
- package/dist/chunk-xa9mkdn7.js +2 -0
- package/dist/{chunk-wtahqbxe.js → chunk-xzdjhjz4.js} +4 -4
- package/dist/{chunk-kd06c90f.js → chunk-ya6f7mt5.js} +4 -4
- package/dist/{chunk-69kbw21c.js → chunk-zjfp64v7.js} +1 -1
- package/dist/{chunk-e6qam3x3.js → chunk-zqpjqcm8.js} +5 -5
- package/dist/chunk-zzzqnf9k.js +2 -0
- package/dist/cli.js +41 -41
- package/dist/client/directive.d.ts +1 -1
- package/dist/client/index.d.ts +1 -1
- package/dist/client-script-bundler.d.ts +1 -1
- package/dist/client-script.d.ts +5 -5
- package/dist/client.d.ts +1 -0
- package/dist/component-client-factories.d.ts +1 -0
- package/dist/component-contract-checks.d.ts +1 -1
- package/dist/component-hmr.d.ts +17 -0
- package/dist/component-library.d.ts +1 -1
- package/dist/component-model.d.ts +1 -1
- package/dist/component-processing.d.ts +4 -4
- package/dist/component-registry.d.ts +2 -2
- package/dist/component-renderer.d.ts +3 -3
- package/dist/components.d.ts +1 -1
- package/dist/composables/index.d.ts +47 -47
- package/dist/composables/use-ambient-sound.d.ts +38 -1
- package/dist/composables/use-broadcast-channel.d.ts +1 -0
- package/dist/composables/use-cached-query.d.ts +3 -3
- package/dist/composables/use-completion.d.ts +1 -1
- package/dist/composables/use-cookie.d.ts +1 -1
- package/dist/composables/use-eye-dropper.d.ts +1 -0
- package/dist/composables/use-fetch.d.ts +2 -2
- package/dist/composables/use-form.d.ts +2 -2
- package/dist/composables/use-intersection-observer.d.ts +1 -0
- package/dist/composables/use-keyboard.d.ts +21 -20
- package/dist/composables/use-media-query.d.ts +5 -5
- package/dist/composables/use-notification.d.ts +0 -9
- package/dist/composables/use-permissions.d.ts +0 -10
- package/dist/composables/use-scroll-lock.d.ts +2 -1
- package/dist/composables/use-share.d.ts +0 -4
- package/dist/composables/use-speech.d.ts +1 -0
- package/dist/composables/use-storage.d.ts +1 -1
- package/dist/composables/use-timer.d.ts +4 -4
- package/dist/composables/use-virtual-list.d.ts +1 -1
- package/dist/composables/use-websocket.d.ts +1 -0
- package/dist/composables.d.ts +3 -3
- package/dist/config.d.ts +18 -1
- package/dist/config.js +9 -2
- package/dist/craft-compiler.d.ts +1 -5
- package/dist/craft-components.d.ts +2 -6
- package/dist/craft-entry.d.ts +5 -5
- package/dist/craft-entry.js +2 -2
- package/dist/craft-ssr.d.ts +1 -1
- package/dist/craft.js +2 -2
- package/dist/csp.d.ts +1 -1
- package/dist/custom-directives.d.ts +1 -1
- package/dist/database.d.ts +21 -1
- package/dist/deploy/index.d.ts +6 -6
- package/dist/dev-server/index.d.ts +7 -7
- package/dist/dev-server/serve-app.d.ts +1 -1
- package/dist/dev-server/serve-file.d.ts +1 -1
- package/dist/dev-server/serve-markdown.d.ts +1 -1
- package/dist/dev-server/serve-multi.d.ts +1 -1
- package/dist/dev-server/terminal-colors.d.ts +25 -25
- package/dist/dev-server/ts-css.d.ts +1 -1
- package/dist/dev-server/types.d.ts +1 -1
- package/dist/dev-server.d.ts +5 -5
- package/dist/directive-api.d.ts +1 -1
- package/dist/directive-arguments.d.ts +1 -1
- package/dist/docs.d.ts +2 -2
- package/dist/document-shell.d.ts +2 -2
- package/dist/dynamic-components.d.ts +1 -1
- package/dist/edge-runtime.d.ts +1 -1
- package/dist/engine-bindings.d.ts +1 -1
- package/dist/error-handling.d.ts +1 -1
- package/dist/errors/codes.d.ts +28 -28
- package/dist/errors/formatter.d.ts +2 -2
- package/dist/errors/index.d.ts +5 -5
- package/dist/errors/logger.d.ts +14 -1
- package/dist/errors/sanitizer.d.ts +13 -2
- package/dist/errors/types.d.ts +1 -1
- package/dist/expressions.d.ts +3 -36
- package/dist/forms-validation.d.ts +5 -1
- package/dist/forms.d.ts +21 -21
- package/dist/fragment-container.d.ts +1 -0
- package/dist/heatmap.d.ts +2 -5
- package/dist/hot-reload.d.ts +3 -0
- package/dist/hydration.d.ts +28 -0
- package/dist/i18n.d.ts +2 -1
- package/dist/image-optimization/build-plugin.d.ts +2 -2
- package/dist/image-optimization/component.d.ts +1 -1
- package/dist/image-optimization/directive.d.ts +3 -3
- package/dist/image-optimization/index.d.ts +6 -6
- package/dist/image-optimization/processor.d.ts +1 -0
- package/dist/image-optimization/serve.d.ts +2 -1
- package/dist/includes.d.ts +2 -2
- package/dist/index.d.ts +171 -171
- package/dist/init.d.ts +1 -0
- package/dist/installed-entry.d.ts +1 -1
- package/dist/jsx-runtime.d.ts +2 -2
- package/dist/lazy-loader.d.ts +5 -0
- package/dist/loading-indicator.d.ts +0 -2
- package/dist/loops.d.ts +3 -3
- package/dist/manifest.d.ts +2 -2
- package/dist/media/client/index.d.ts +6 -6
- package/dist/media/image/component.d.ts +1 -1
- package/dist/media/image/directive.d.ts +2 -2
- package/dist/media/image/editing.d.ts +35 -35
- package/dist/media/image/index.d.ts +6 -6
- package/dist/media/image/placeholder.d.ts +1 -1
- package/dist/media/image/processor/cache.d.ts +3 -2
- package/dist/media/image/processor/index.d.ts +4 -4
- package/dist/media/image/processor/optimizer.d.ts +1 -1
- package/dist/media/image/processor/responsive.d.ts +1 -1
- package/dist/media/image/srcset.d.ts +6 -6
- package/dist/media/index.d.ts +13 -13
- package/dist/media/manager/embed.d.ts +1 -1
- package/dist/media/protected/component.d.ts +1 -1
- package/dist/media/protected/index.d.ts +2 -2
- package/dist/media/protected/signature.d.ts +1 -1
- package/dist/media/shared/index.d.ts +2 -2
- package/dist/media/upload/component.d.ts +1 -1
- package/dist/media/upload/index.d.ts +1 -1
- package/dist/media/video/directive.d.ts +2 -2
- package/dist/media/video/index.d.ts +2 -2
- package/dist/media/video/processor/cache.d.ts +3 -2
- package/dist/media/video/processor/index.d.ts +5 -5
- package/dist/media/video/processor/streaming.d.ts +1 -1
- package/dist/media/video/processor/thumbnail.d.ts +1 -1
- package/dist/media/video/processor/transcoder.d.ts +1 -1
- package/dist/meta-arguments.d.ts +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/native/bridge/protocol.d.ts +15 -14
- package/dist/native/cli.d.ts +1 -1
- package/dist/native/compiler/browser.d.ts +1 -1
- package/dist/native/compiler/bundle.d.ts +3 -3
- package/dist/native/compiler/class-table.d.ts +4 -4
- package/dist/native/compiler/client-script.d.ts +1 -1
- package/dist/native/compiler/component-mapping.d.ts +1 -1
- package/dist/native/compiler/design-tokens.d.ts +1 -1
- package/dist/native/compiler/headwind-to-style.d.ts +3 -3
- package/dist/native/compiler/html-to-ir.d.ts +1 -1
- package/dist/native/compiler/inline-style.d.ts +2 -2
- package/dist/native/compiler/ir.d.ts +3 -3
- package/dist/native/compiler/layout-chrome.d.ts +1 -1
- package/dist/native/compiler/render-screen.d.ts +5 -5
- package/dist/native/compiler/shared-scripts.d.ts +1 -1
- package/dist/native/compiler/svg.d.ts +1 -1
- package/dist/native/components/primitives.d.ts +32 -32
- package/dist/native/floating-actions.d.ts +2 -1
- package/dist/native/floating-actions.js +2 -0
- package/dist/native/hot-reload/client.d.ts +26 -1
- package/dist/native/index.d.ts +19 -19
- package/dist/native/runtime/binding-tree.d.ts +8 -3
- package/dist/native/runtime/browser-renderer.d.ts +33 -3
- package/dist/native/runtime/browser-screen.d.ts +2 -2
- package/dist/native/runtime/browser-screen.js +12 -1
- package/dist/native/runtime/compact-document.d.ts +3 -5
- package/dist/native/runtime/craft-bridge.d.ts +4 -3
- package/dist/native/runtime/craft.d.ts +2 -1
- package/dist/native/runtime/event-stream.d.ts +1 -0
- package/dist/native/runtime/initial-media-mutations.d.ts +1 -1
- package/dist/native/runtime/jsc-globals.d.ts +18 -32
- package/dist/native/runtime/native-host.d.ts +8 -8
- package/dist/native/runtime/navigation-chrome.d.ts +1 -1
- package/dist/native/runtime/overlay-presenter.d.ts +3 -2
- package/dist/native/runtime/shared-screen.d.ts +7 -6
- package/dist/native/runtime/view-operations.d.ts +1 -1
- package/dist/native/runtime/web-navigation.d.ts +1 -0
- package/dist/native/runtime/web-storage.d.ts +4 -2
- package/dist/native/testing-mutations.d.ts +1 -1
- package/dist/native/testing.d.ts +4 -3
- package/dist/native/testing.js +21 -2
- package/dist/native/ui.d.ts +37 -36
- package/dist/native-build.d.ts +3 -3
- package/dist/offline/app-service-worker.d.ts +1 -0
- package/dist/offline/query-cache.d.ts +2 -2
- package/dist/page-action.d.ts +1 -1
- package/dist/parser/expression-parser.d.ts +1 -1
- package/dist/parser/index.d.ts +4 -4
- package/dist/parser/tokenizer.d.ts +16 -0
- package/dist/performance-utils.d.ts +136 -256
- package/dist/plugin-system.d.ts +7 -1
- package/dist/precompiler.d.ts +32 -1
- package/dist/process.d.ts +6 -6
- package/dist/production-build.d.ts +36 -0
- package/dist/production-builder.d.ts +3 -3
- package/dist/production-server.d.ts +1 -1
- package/dist/pwa/audit.d.ts +1 -1
- package/dist/pwa/directives.d.ts +1 -18
- package/dist/pwa/icons.d.ts +1 -1
- package/dist/pwa/index.d.ts +10 -10
- package/dist/pwa/inject.d.ts +1 -1
- package/dist/pwa/manifest.d.ts +1 -1
- package/dist/pwa/offline.d.ts +1 -1
- package/dist/pwa/precache.d.ts +1 -1
- package/dist/pwa/service-worker.d.ts +1 -1
- package/dist/pwa/workbox-strategies.d.ts +1 -1
- package/dist/pwa/workbox.d.ts +1 -1
- package/dist/pwa.d.ts +9 -9
- package/dist/pwa.js +3 -3
- package/dist/reactive-bindings.d.ts +1 -0
- package/dist/render-memo.d.ts +1 -1
- package/dist/render.d.ts +1 -1
- package/dist/route-response-cache.d.ts +5 -1
- package/dist/route-types.d.ts +1 -0
- package/dist/runtime-config-loader.d.ts +1 -1
- package/dist/runtime-config-server.d.ts +1 -4
- package/dist/runtime-config-types.d.ts +2 -2
- package/dist/runtime-injection.d.ts +1 -1
- package/dist/safe-evaluator.d.ts +38 -55
- package/dist/script-validation.d.ts +1 -1
- package/dist/seo.d.ts +1 -9
- package/dist/serve.d.ts +1 -1
- package/dist/server-api.d.ts +3 -2
- package/dist/server-components.d.ts +2 -1
- package/dist/server-data.d.ts +1 -0
- package/dist/signal-processing.d.ts +3 -3
- package/dist/signals.d.ts +2 -2
- package/dist/site-builder/build.d.ts +1 -1
- package/dist/site-builder/i18n.d.ts +1 -1
- package/dist/site-builder/index.d.ts +9 -9
- package/dist/site-builder/robots.d.ts +1 -1
- package/dist/site-builder/router.d.ts +1 -1
- package/dist/site-builder/seo.d.ts +1 -1
- package/dist/site-builder/sitemap.d.ts +1 -1
- package/dist/site-builder/theme.d.ts +1 -1
- package/dist/source-maps.d.ts +14 -0
- package/dist/ssg-static-paths.d.ts +1 -1
- package/dist/ssg.d.ts +3 -22
- package/dist/ssg.js +3 -3
- package/dist/ssr.d.ts +2 -1
- package/dist/state-management.d.ts +1 -0
- package/dist/story/addons.d.ts +1 -1
- package/dist/story/analytics.d.ts +7 -0
- package/dist/story/auto-stories.d.ts +1 -1
- package/dist/story/bookmarks.d.ts +4 -0
- package/dist/story/collect/analyzer.d.ts +1 -1
- package/dist/story/collect/index.d.ts +4 -4
- package/dist/story/collect/parser.d.ts +1 -1
- package/dist/story/collect/scanner.d.ts +1 -1
- package/dist/story/collect/tree.d.ts +1 -1
- package/dist/story/commands/index.d.ts +6 -6
- package/dist/story/compiled-output.d.ts +1 -1
- package/dist/story/composition.d.ts +1 -1
- package/dist/story/config-watcher.d.ts +1 -1
- package/dist/story/config.d.ts +1 -1
- package/dist/story/context.d.ts +1 -1
- package/dist/story/controls/index.d.ts +2 -1
- package/dist/story/desktop-preview.d.ts +1 -1
- package/dist/story/docs-generator.d.ts +1 -1
- package/dist/story/figma-export.d.ts +1 -1
- package/dist/story/generator.d.ts +1 -1
- package/dist/story/index.d.ts +41 -41
- package/dist/story/interactions.d.ts +1 -1
- package/dist/story/output.d.ts +1 -0
- package/dist/story/performance.d.ts +9 -0
- package/dist/story/presets.d.ts +5 -0
- package/dist/story/props-validation.d.ts +1 -1
- package/dist/story/renderer.d.ts +1 -1
- package/dist/story/search-index.d.ts +1 -1
- package/dist/story/search.d.ts +1 -1
- package/dist/story/server.d.ts +1 -1
- package/dist/story/setup.d.ts +1 -1
- package/dist/story/snapshots.d.ts +1 -1
- package/dist/story/testing.d.ts +1 -1
- package/dist/story/theme.d.ts +1 -1
- package/dist/story/ts-css.d.ts +1 -1
- package/dist/story/ui/code-panel.d.ts +1 -1
- package/dist/story/ui/controls-panel.d.ts +1 -1
- package/dist/story/ui/index.d.ts +4 -4
- package/dist/story/ui/preview.d.ts +1 -1
- package/dist/story/visual-testing.d.ts +1 -1
- package/dist/streaming.d.ts +1 -1
- package/dist/stx-module-imports.d.ts +2 -1
- package/dist/stx-virtual-ts.d.ts +3 -2
- package/dist/temp-dir.d.ts +1 -0
- package/dist/template-compiler.d.ts +1 -1
- package/dist/template-hydrator.d.ts +1 -1
- package/dist/testing.d.ts +35 -66
- package/dist/theme-tokens.d.ts +5 -1
- package/dist/ts-css-config.d.ts +1 -0
- package/dist/type-checker.d.ts +24 -0
- package/dist/typecheck.d.ts +4 -4
- package/dist/types/config-types.d.ts +17 -17
- package/dist/types/context-types.d.ts +1 -1
- package/dist/types/directive-types.d.ts +2 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types.d.ts +1 -1
- package/dist/utils.d.ts +5 -5
- package/dist/variable-extractor.d.ts +1 -1
- package/dist/visual-editor.d.ts +0 -4
- package/dist/web-components/index.d.ts +4 -4
- package/dist/web-components/reactive-generator.d.ts +1 -1
- package/dist/web-components.d.ts +1 -1
- package/package.json +11 -7
- package/stx.d.ts +6 -5
- package/dist/chunk-036pnz1y.js +0 -2
- package/dist/chunk-0dve54ne.js +0 -3
- package/dist/chunk-0g05v7m1.js +0 -2
- package/dist/chunk-1qdhwjs4.js +0 -2
- package/dist/chunk-2vfhzn8m.js +0 -2
- package/dist/chunk-30y1dbcf.js +0 -2
- package/dist/chunk-3gyq9rjx.js +0 -2
- package/dist/chunk-3m3jny87.js +0 -2
- package/dist/chunk-3w9xhs7k.js +0 -2
- package/dist/chunk-4e6wkjtx.js +0 -2
- package/dist/chunk-5bbwdv4y.js +0 -3
- package/dist/chunk-5yy40vxk.js +0 -2
- package/dist/chunk-67bn31a3.js +0 -2
- package/dist/chunk-6ekgf3b3.js +0 -2
- package/dist/chunk-6rk18x14.js +0 -2
- package/dist/chunk-7hnt9a2e.js +0 -2
- package/dist/chunk-80bb89fh.js +0 -2
- package/dist/chunk-8k6cd1e0.js +0 -2
- package/dist/chunk-8qqrrbap.js +0 -2
- package/dist/chunk-8spe7avc.js +0 -2
- package/dist/chunk-8wnkh2ss.js +0 -2
- package/dist/chunk-93kdj0t4.js +0 -2
- package/dist/chunk-9frv1kpd.js +0 -2
- package/dist/chunk-9pzbesp6.js +0 -2
- package/dist/chunk-a7v1j7td.js +0 -2
- package/dist/chunk-acbx3jn5.js +0 -2
- package/dist/chunk-apq33h4w.js +0 -2
- package/dist/chunk-c90qz5w0.js +0 -2
- package/dist/chunk-dx31vsyf.js +0 -2
- package/dist/chunk-evyspfm5.js +0 -2
- package/dist/chunk-f4x21pqx.js +0 -2
- package/dist/chunk-fj18grh2.js +0 -2
- package/dist/chunk-frhh6jd3.js +0 -2
- package/dist/chunk-g1gqysb4.js +0 -2
- package/dist/chunk-h7rcb74n.js +0 -2
- package/dist/chunk-htsqfx9m.js +0 -2
- package/dist/chunk-j3x3e353.js +0 -2
- package/dist/chunk-j882bpqq.js +0 -2
- package/dist/chunk-jxzcwjx4.js +0 -2
- package/dist/chunk-k1pyzf9e.js +0 -2
- package/dist/chunk-knapnbwv.js +0 -2
- package/dist/chunk-m276y4f3.js +0 -2
- package/dist/chunk-p2gsezmj.js +0 -2
- package/dist/chunk-p9sbpbhg.js +0 -2
- package/dist/chunk-pg2dxnry.js +0 -2
- package/dist/chunk-q2d8x7p1.js +0 -2
- package/dist/chunk-tdtwqydq.js +0 -2
- package/dist/chunk-ty915d4h.js +0 -2
- package/dist/chunk-vk9zpckc.js +0 -2
- package/dist/chunk-vvr19nq7.js +0 -2
- package/dist/chunk-wjf69hmc.js +0 -2
- package/dist/chunk-xsavnbkv.js +0 -2
- package/dist/chunk-ydjy26ch.js +0 -2
- package/dist/chunk-yx37mvy7.js +0 -2
- package/dist/chunk-z278w3cb.js +0 -2
- package/dist/chunk-znfzh6fm.js +0 -2
- package/dist/chunk-zwy89pzx.js +0 -2
- package/dist/chunk-zz1n2ake.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StaticPath, StaticPathsResult } from './ssg';
|
|
1
|
+
import type { StaticPath, StaticPathsResult } from './ssg.js';
|
|
2
2
|
/** Define static paths for dynamic routes (used in templates). */
|
|
3
3
|
export declare function defineStaticPaths(pathsFn: () => Promise<StaticPath[]> | StaticPath[]): () => Promise<StaticPathsResult>;
|
|
4
4
|
/**
|
package/dist/ssg.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./stx.d.ts" />
|
|
2
|
-
import { defineStaticPaths } from './ssg-static-paths';
|
|
3
|
-
import type { StxOptions } from './types';
|
|
2
|
+
import { defineStaticPaths } from './ssg-static-paths.js';
|
|
3
|
+
import type { StxOptions } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Whether a page declares an `action` — the export that receives its own POST.
|
|
6
6
|
*
|
|
@@ -171,26 +171,7 @@ export declare interface CachedPage {
|
|
|
171
171
|
etag: string
|
|
172
172
|
headers?: Record<string, string>
|
|
173
173
|
}
|
|
174
|
-
|
|
175
|
-
constructor(cacheDir: string, salt?: string);
|
|
176
|
-
load(): Promise<void>;
|
|
177
|
-
save(): Promise<void>;
|
|
178
|
-
getHash(filePath: string, dependencies: string[]): string;
|
|
179
|
-
get(route: string, filePath: string): string | null;
|
|
180
|
-
set(route: string, filePath: string, dependencies: string[], html: string): void;
|
|
181
|
-
}
|
|
182
|
-
// =============================================================================
|
|
183
|
-
// ISR Cache Implementation
|
|
184
|
-
// =============================================================================
|
|
185
|
-
declare class FileISRCache implements ISRCache {
|
|
186
|
-
constructor(cacheDir: string);
|
|
187
|
-
get(route: string): Promise<CachedPage | null>;
|
|
188
|
-
set(route: string, page: CachedPage): Promise<void>;
|
|
189
|
-
invalidate(route: string): Promise<void>;
|
|
190
|
-
invalidatePattern(pattern: RegExp): Promise<void>;
|
|
191
|
-
needsRevalidation(route: string): Promise<boolean>;
|
|
192
|
-
}
|
|
193
|
-
export { defineStaticPaths } from './ssg-static-paths';
|
|
174
|
+
export { defineStaticPaths } from './ssg-static-paths.js';
|
|
194
175
|
// =============================================================================
|
|
195
176
|
// Exports
|
|
196
177
|
// =============================================================================
|
package/dist/ssg.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-hpwtjb4a.js";import{x,
|
|
3
|
-
`)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Lt;function Ut(t){let n=r(t),{depths:s}=me(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=o.exec(n))!==null){if(s[l.index]!==0)continue;let u=x(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=x(n,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(l.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(n))!==null){if(s[l.index]!==0)continue;let u=
|
|
2
|
+
import"./chunk-hpwtjb4a.js";import{x,dl}from"./chunk-5g1jwxny.js";import"./chunk-ngnvyqk3.js";import"./chunk-xppm4cs4.js";import{Pt,y}from"./chunk-8cg88x7m.js";import"./chunk-v4bqmzj9.js";import"./chunk-bqxrfagh.js";import"./chunk-kvafq9gy.js";import{Ct,Et,Tt,$t,Rt,At}from"./chunk-9r999ees.js";import{a}from"./chunk-c54bhqrg.js";import{As}from"./chunk-j1yjbykm.js";import"./chunk-tm8a2b69.js";import"./chunk-x1w19y3w.js";import{ye,rn,sn}from"./chunk-txdxfjbj.js";import"./chunk-m9n3ahsy.js";import{b}from"./chunk-zqpjqcm8.js";import{wt,i}from"./chunk-fxt9vwdw.js";import"./chunk-cf7dk9ev.js";import"./chunk-jtpqqxzb.js";import{ys}from"./chunk-trxha300.js";import"./chunk-8g0243g1.js";import"./chunk-t5q31st4.js";import{sc,oc,ic}from"./chunk-qa4vs1qg.js";import{tn,tr,nr}from"./chunk-cwt26rvt.js";import{nn}from"./chunk-vpqgg04q.js";import"./chunk-48z6w533.js";import"./chunk-qnyh0m22.js";import{X,ve}from"./chunk-nz202f97.js";import"./chunk-rbxbgvkf.js";import"./chunk-9mzskb69.js";import{c}from"./chunk-ehp792dy.js";import{r,me}from"./chunk-7kc9xwht.js";import D from"fs";import f from"path";import{createHash as vt}from"crypto";function kt(t){try{return new Bun.Transpiler({loader:"js",minifyWhitespace:!0}).transformSync(t).replace(/\}(var |let |const |function )/g,"};$1").trim()}catch{return t}}var Dt=/<script\s+type="stx\/island"\s+data-stx-island="([^"]+)"([^>]*)>([\s\S]*?)<\/script>/g;function It(t){return Bun.hash(t).toString(16)}function ot(t,n={}){if(!t.includes('type="stx/island"'))return{html:t,chunks:[]};let s=new Map,o=t.replace(Dt,(e,u,g,v)=>{let w=v.trim();if(!w)return e;if(/\bdata-stx-src=/.test(g))return e;if(n.minify)w=kt(w);let p=It(w);if(!s.has(p))s.set(p,w);let P=n.integrity?` data-stx-integrity="sha384-${vt("sha384").update(w).digest("base64")}"`:"";return`<script type="stx/island" data-stx-island="${u}" data-stx-src="/_stx/islands/${p}.js"${P}${g}></script>`}),l=Array.from(s,([e,u])=>({hash:e,code:u}));return{html:o,chunks:l}}var Bt=new Set(["visible","idle"]);function ct(t){if(!t.includes("data-stx-src="))return t;let n=new Map,s=/data-stx-scope="([^"]+)"[^>]*?stx-hydrate="([^"]+)"/g,o;while((o=s.exec(t))!==null)n.set(o[1],o[2]);let l=new Set,e=/data-stx-island="([^"]+)"[^>]*?data-stx-src="([^"]+)"/g,u;while((u=e.exec(t))!==null)if(Bt.has(n.get(u[1])||""))l.add(u[2]);let g=/<\/head\s*>/iy,v=y(t,(p,P)=>(g.lastIndex=P,g.exec(p)?g.lastIndex:-1))[0]?.start??-1;if(l.size===0||v===-1)return t;let w=Array.from(l).filter((p)=>!t.includes(`rel="prefetch" href="${p}"`)).map((p)=>`<link rel="prefetch" href="${p}" as="script">`).join("");if(!w)return t;return t.slice(0,v)+w+t.slice(v)}var jt=["STX_SITE_URL","SITE_URL","URL","VERCEL_URL","CF_PAGES_URL"];function K(t){let n=t.trim();if(!n)return null;let s=/^https?:\/\//i.test(n)?n:`https://${n}`;try{return new URL(s).origin+new URL(s).pathname.replace(/\/$/,"")}catch{return null}}function Ft(t){for(let n of jt){let s=t[n];if(!s)continue;let o=K(s);if(o)return{url:o,source:"env",via:n}}return null}function lt(t){if(!t||typeof t!=="object")return null;let n=t,s=n.site?.url??n.url??n.app?.url;return typeof s==="string"?K(s):null}async function Ot(t){let{existsSync:n}=await import("fs"),s=await import("path");for(let o of["site.config.ts","site.config.js",".config/site.config.ts"]){let l=s.resolve(t,o);if(!n(l))continue;try{let e=await import(l),u=lt(e.default??e);if(u)return u}catch{}}return null}async function ut(t={}){let n=t.cwd??process.cwd(),s=t.env??process.env;if(t.explicit){let u=K(t.explicit);if(u)return{url:u,source:"option"}}let o=lt(t.stxConfig);if(o)return{url:o,source:"stx.config",via:"site.url"};let l=await Ot(n);if(l)return{url:l,source:"site.config",via:"url"};let e=Ft(s);if(e)return e;return{url:"http://localhost",source:"fallback"}}function dt(){return["No site URL configured \u2014 sitemap.xml and robots.txt will point at http://localhost."," Set one in stx.config.ts (site: { url: 'https://example.com' }), in site.config.ts,"," via --domain, or with SITE_URL in the build environment."].join(`
|
|
3
|
+
`)}function q(t){return async()=>({paths:await t(),fallback:!1})}var Lt;function Ut(t){let n=r(t),{depths:s}=me(n),o=/\b(?:async\s+)?function\s+getStaticPaths\s*\(/g,l;while((l=o.exec(n))!==null){if(s[l.index]!==0)continue;let u=x(n,"(",")",o.lastIndex-1),g=n.indexOf("{",u+1),v=x(n,"{","}",g);if(u<0||g<0||v<0)break;return t.slice(l.index,v+1)}let e=/\b(?:const|let|var)\s+getStaticPaths\s*=/g;while((l=e.exec(n))!==null){if(s[l.index]!==0)continue;let u=dl(n,e.lastIndex).endPos;return t.slice(e.lastIndex,u).trim()}throw SyntaxError("Could not extract getStaticPaths; use a top-level function or const declaration")}async function gt(t){let n="read";try{let s=await Bun.file(t).text();n="parse";let o=nn(s),l=[...o.server,...o.client,...o.signals].filter((e)=>/(?:^|\s)server(?:\s|=|$)/i.test(r(e.attrs))).sort((e,u)=>s.indexOf(e.fullTag)-s.indexOf(u.fullTag));for(let e of l){if(!/\bgetStaticPaths\b/.test(r(e.content)))continue;let u=(Lt??=new Bun.Transpiler({loader:"ts",target:"bun"})).transformSync(e.content);if(!/\bgetStaticPaths\b/.test(r(u)))continue;let g=Ut(u);if(/\bdefineStaticPaths\b/.test(r(g))&&Pt(u,"defineStaticPaths"))throw SyntaxError("Cannot evaluate a module-local defineStaticPaths binding during isolated hook extraction");n="execute";let v=Function("defineStaticPaths",`return (${g})`)(q);if(typeof v!=="function")throw TypeError("getStaticPaths must be a function");let w=await v();n="result";let p=Array.isArray(w)?{paths:w}:w;if(!p||typeof p!=="object"||!("paths"in p)||!Array.isArray(p.paths))throw TypeError("getStaticPaths must return { paths: [...] } or an array of paths");for(let P of p.paths)if(!P||typeof P!=="object"||!P.params||typeof P.params!=="object"||Array.isArray(P.params))throw TypeError("Each getStaticPaths path must contain a params object");return{kind:"ok",value:p}}return{kind:"absent"}}catch(s){return{kind:"error",phase:n,error:s instanceof Error?s:Error(String(s))}}}class pt{cacheDir;cache=new Map;loaded=!1;salt;constructor(t,n=""){this.cacheDir=t,this.salt=n}async load(){if(this.loaded)return;let t=f.join(this.cacheDir,"build-cache.json");if(await Bun.file(t).exists())try{let n=JSON.parse(await Bun.file(t).text());for(let[s,o]of Object.entries(n))this.cache.set(s,o)}catch{}this.loaded=!0}async save(){await D.promises.mkdir(this.cacheDir,{recursive:!0});let t=f.join(this.cacheDir,"build-cache.json"),n={};for(let[s,o]of this.cache)n[s]=o;await Bun.write(t,JSON.stringify(n))}getHash(t,n){let s=D.statSync(t),o=`${this.salt}|${t}:${s.mtimeMs}`;for(let e of n)if(D.existsSync(e)){let u=D.statSync(e);o+=`:${e}:${u.mtimeMs}`}let l=0;for(let e=0;e<o.length;e++){let u=o.charCodeAt(e);l=(l<<5)-l+u,l=l&l}return Math.abs(l).toString(36)}get(t,n){let s=this.cache.get(t);if(!s)return null;let o=ft(n).some((u)=>D.existsSync(u)),l=[n,...s.dependencies??[]].some((u)=>u.endsWith(".stx")&&D.existsSync(u)&&ys(D.readFileSync(u,"utf8")).some((g)=>/\bserver\b/.test(g.attrs)));if(o||l)return this.cache.delete(t),null;let e=this.getHash(n,s.dependencies??[]);if(s.hash!==e)return this.cache.delete(t),null;return s.html}set(t,n,s,o){let l=this.getHash(n,s);this.cache.set(t,{hash:l,html:o,generatedAt:Date.now(),dependencies:s})}}class ht{cacheDir;constructor(t){this.cacheDir=t}getFilePath(t){let n=t.replace(/[^a-zA-Z0-9]/g,"_")+".json";return f.join(this.cacheDir,"isr",n)}async get(t){let n=this.getFilePath(t);if(!await Bun.file(n).exists())return null;try{return JSON.parse(await Bun.file(n).text())}catch{return null}}async set(t,n){let s=this.getFilePath(t);await D.promises.mkdir(f.dirname(s),{recursive:!0}),await Bun.write(s,JSON.stringify(n))}async invalidate(t){let n=this.getFilePath(t);if(await Bun.file(n).exists())await D.promises.unlink(n)}async invalidatePattern(t){let n=f.join(this.cacheDir,"isr");if(!D.existsSync(n))return;let s=await D.promises.readdir(n);for(let o of s){let l=o.replace(/_/g,"/").replace(".json","");if(t.test(l))await D.promises.unlink(f.join(n,o))}}async needsRevalidation(t){let n=await this.get(t);if(!n)return!0;return Date.now()>n.revalidateAfter}}async function _t(t){let n=[];if(!t.isDynamic)n.push({url:t.pattern,params:{}});else{let s=await gt(t.filePath);if(s.kind==="error")throw Error(`getStaticPaths ${s.phase} failed for ${t.pattern} (${t.filePath}): ${s.error.message}`,{cause:s.error});if(s.kind==="absent")return console.warn(`Warning: Dynamic route ${t.pattern} (${t.filePath}) has no getStaticPaths`),n;let o=s.value;if(o.paths.length===0)return console.info(`getStaticPaths returned no paths for dynamic route ${t.pattern} (${t.filePath})`),n;for(let l of o.paths){let e=t.pattern;for(let[u,g]of Object.entries(l.params))e=e.replace(`:${u}`,g).replace(`:${u}*`,g);n.push({url:e,params:l.params,props:l.props,revalidate:l.revalidate})}}return n}function ft(t){return[t.replace(/\.stx$/,".data.ts"),t.replace(/\.stx$/,".data.js"),t+".data.ts",t+".data.js"]}async function Mt(t){for(let n of ft(t))if(await Bun.file(n).exists())try{let s=await import(n);if(typeof s.default==="function")return await s.default();else if(typeof s.default==="object")return s.default;else if(typeof s.getData==="function")return await s.getData();else{let{default:o,...l}=s;return l}}catch(s){console.error(`Error loading data file ${n}:`,s)}return null}async function Gt(t,n,s){let o=t.match(/<script\s+server\b[^>]*>([\s\S]*?)<\/script>/i);if(!o)return null;let l=o[1];if(!l.includes("getStaticProps"))return null;try{let e=l.match(/(?:export\s+)?(?:async\s+)?function\s+getStaticProps\s*\([^)]*\)\s*\{([\s\S]*?)\n\}/);if(!e)return null;return await Function("params",`
|
|
4
4
|
return (async function getStaticProps() {
|
|
5
5
|
${e[1]}
|
|
6
6
|
})()
|
|
@@ -37,7 +37,7 @@ ${t.map((o)=>{let l=new URL(o.loc,n).href,e=` <url>
|
|
|
37
37
|
${s.join(`
|
|
38
38
|
`)}
|
|
39
39
|
</channel>
|
|
40
|
-
</rss>`}async function Vt(t={}){let n=Date.now();sn();let s=await a(process.cwd()),o=s.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:s});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,w={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-
|
|
40
|
+
</rss>`}async function Vt(t={}){let n=Date.now();sn();let s=await a(process.cwd()),o=s.build||{},l=await ut({explicit:t.domain||o.domain,stxConfig:s});if(l.source==="fallback"&&(t.sitemap??o.sitemap??!0))console.warn(dt());let e={router:t.router??s?.router??{},pagesDir:t.pagesDir||o.pagesDir||"pages",outputDir:t.outputDir||o.outputDir||"dist",baseUrl:t.baseUrl||o.baseUrl||"/",domain:l.url,revalidate:t.revalidate??o.revalidate??!1,sitemap:t.sitemap??o.sitemap??!0,sitemapExclude:t.sitemapExclude||o.sitemapExclude||[],robots:t.robots??o.robots??!0,rss:t.rss??o.rss??!1,concurrency:t.concurrency||o.concurrency||10,cache:t.cache??o.cache??!0,cacheDir:t.cacheDir||o.cacheDir||c(process.cwd(),"ssg-cache"),contentLoaders:t.contentLoaders||[],hooks:t.hooks||{},minify:t.minify??o.minify??!0,generate404:t.generate404??o.generate404??!0,publicDir:t.publicDir||o.publicDir||"public",trailingSlash:t.trailingSlash??o.trailingSlash??!1,cleanOutput:t.cleanOutput??o.cleanOutput??!0,cacheSalt:t.cacheSalt??"",partialsDir:t.partialsDir||s?.partialsDir||"",componentsDir:t.componentsDir||s?.componentsDir||"",failOnIncludeError:t.failOnIncludeError??!0,failOnServerScriptError:t.failOnServerScriptError??!0,chunkIslands:t.chunkIslands===!0,prefetchIslands:t.prefetchIslands===!0,integrityIslands:t.integrityIslands===!0},u={totalPages:0,successCount:0,failedCount:0,cachedCount:0,buildTime:0,pages:[],errors:[]},g=new Set,v=0,w={},p={};await e.hooks.onBuildStart?.();try{if(e.cleanOutput&&D.existsSync(e.outputDir))await D.promises.rm(e.outputDir,{recursive:!0});await D.promises.mkdir(e.outputDir,{recursive:!0});let E=e.cacheSalt;if(!E){let{resolveUserCssConfig:d,fingerprintConfig:m}=await import("./chunk-x8jsmwhg.js");try{E=m(await d(process.cwd()))}catch{}}let{prepareImageDelivery:S}=await import("./chunk-3b9950gz.js"),R=await S(e.publicDir,e.outputDir);if(R.count>0)console.log(`Optimized ${R.count} image(s) for responsive delivery`),E=[E,R.fingerprint].filter(Boolean).join(":");let A=new pt(e.cacheDir,E);if(e.cache)await A.load();try{let{generateCss:d}=await import("./chunk-x8jsmwhg.js");await d('<div class="bg-black"></div>')}catch{}Ct();let yt=s?.routeMiddleware?.dir||"middleware";await Tt(process.cwd(),yt);let J=Et();if(J.length>0)console.log(`Loaded ${J.length} middleware: ${J.join(", ")}`);let St=s?.routeMiddleware?.global||[];ic(s?.layoutsDir,c(process.cwd()));let Z=X(".",{pagesDir:e.pagesDir,pagesDirs:s?._layerPageDirs});console.log(`Found ${Z.length} routes`);let L=[];for(let d of Z)try{let m=await _t(d);for(let k of m)L.push({route:d,url:k.url,params:k.params,props:k.props,revalidate:k.revalidate??e.revalidate})}catch(m){let k=m instanceof Error?m:Error(String(m));u.failedCount++,u.errors.push({route:d.pattern,error:k}),await e.hooks.onError?.(k,d.pattern),console.error(`Error discovering paths for ${d.pattern}:`,k)}u.totalPages=L.length+u.failedCount,console.log(`Generating ${L.length} pages...`);let U=[],Q=[];for(let d=0;d<L.length;d+=e.concurrency)Q.push(L.slice(d,d+e.concurrency));for(let d of Q)await Promise.all(d.map(async(m)=>{let{route:k,url:h,params:_,props:xt,revalidate:rt}=m;try{await e.hooks.onPageStart?.(h);let M=await Bun.file(k.filePath).text(),T=Yt(M),bt=T?.middleware?Array.isArray(T.middleware)?T.middleware:[T.middleware]:[],nt=[...St,...bt];if(nt.length>0){let B=$t(h,_,T||{}),N=Rt(B,null,void 0,{isServer:!0}),j=await At(nt,N);if(j.redirect){let C=typeof j.redirect==="string"?j.redirect:j.redirect.path||j.redirect,H=Zt(String(C),h),O=Qt(h,e);await D.promises.mkdir(f.dirname(O),{recursive:!0}),await Bun.write(O,H),u.successCount++,u.pages.push({route:h,outputPath:O,size:Buffer.byteLength(H),cached:!1}),U.push({loc:h,lastmod:new Date().toISOString()}),console.log(` \u21B3 ${h} \u2192 redirect to ${C}`);return}if(j.abort){let C=typeof j.abort==="string"?j.abort:j.abort?.error?.message||"aborted";console.warn(` \u21B3 ${h} \u2014 middleware aborted: ${C}`);return}}let it=T?.validate;if(typeof it==="function")try{if(!await it({params:_})){console.warn(`Validation failed for ${h}, skipping...`);return}}catch{}let I=null,st=!1;if(e.cache){if(I=A.get(h,k.filePath),I)st=!0,u.cachedCount++}if(!I){let B=await mt(k,_,xt,e,s);if(I=B.html,e.failOnIncludeError&&B.includeFailures.length>0)throw Error(`${B.includeFailures.length} include(s) failed to resolve, so this page would have shipped with an error banner where the markup should be:
|
|
41
41
|
${B.includeFailures.join(`
|
|
42
42
|
`)}
|
|
43
43
|
Set ssg.failOnIncludeError to false to build anyway.`);if(e.failOnServerScriptError&&B.serverScriptFailures.length>0)throw Error(`${B.serverScriptFailures.length} <script server> block(s) failed, so this page would have shipped with the content they produce missing:
|
package/dist/ssr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import type { StxOptions } from './types';
|
|
2
|
+
import type { StxOptions } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Render a STX template with server-side data
|
|
5
5
|
*
|
|
@@ -110,6 +110,7 @@ export type RouteHandler = (ctx: RequestContext) => Response | Promise<Response>
|
|
|
110
110
|
export type Middleware = (ctx: RequestContext, next: () => Promise<Response>) => Response | Promise<Response>;
|
|
111
111
|
/** Default in-memory session store. Use a custom SessionStore (Redis, DB) for production. */
|
|
112
112
|
export declare class MemorySessionStore implements SessionStore {
|
|
113
|
+
private store;
|
|
113
114
|
get(sessionId: string): Promise<SessionData | null>;
|
|
114
115
|
set(sessionId: string, data: SessionData, ttlSeconds: number): Promise<void>;
|
|
115
116
|
delete(sessionId: string): Promise<void>;
|
|
@@ -319,3 +319,4 @@ declare type StoreActions<A extends Record<string, (...args: any[]) => any>> = {
|
|
|
319
319
|
}
|
|
320
320
|
// Full store type combining state, getters, and actions
|
|
321
321
|
export type DefinedStoreWithGettersAndActions<S, G extends Record<string, (state: S) => any>, A extends Record<string, (...args: any[]) => any>,> = DefinedStore<S, G, A> & StoreGetters<S, G> & StoreActions<A>;
|
|
322
|
+
export {};
|
package/dist/story/addons.d.ts
CHANGED
|
@@ -63,12 +63,19 @@ export type AnalyticsEventType = | 'view'
|
|
|
63
63
|
* Analytics tracker
|
|
64
64
|
*/
|
|
65
65
|
export declare class AnalyticsTracker {
|
|
66
|
+
private storage;
|
|
67
|
+
private storagePath;
|
|
68
|
+
private currentSession;
|
|
69
|
+
private dirty;
|
|
70
|
+
private viewStartTimes;
|
|
66
71
|
constructor(rootDir: string);
|
|
72
|
+
private loadStorage;
|
|
67
73
|
save(): Promise<void>;
|
|
68
74
|
startSession(): void;
|
|
69
75
|
endSession(): void;
|
|
70
76
|
track(event: Omit<AnalyticsEvent, 'timestamp'>): void;
|
|
71
77
|
trackView(componentId: string, variantId?: string): void;
|
|
78
|
+
private endViewTiming;
|
|
72
79
|
trackPropChange(componentId: string, propName: string, value: any): void;
|
|
73
80
|
trackVariantSwitch(componentId: string, variantId: string): void;
|
|
74
81
|
trackSearch(query: string, resultCount: number): void;
|
|
@@ -34,7 +34,11 @@ export declare interface BookmarksStorage {
|
|
|
34
34
|
* Bookmarks manager
|
|
35
35
|
*/
|
|
36
36
|
export declare class BookmarksManager {
|
|
37
|
+
private storage;
|
|
38
|
+
private storagePath;
|
|
39
|
+
private dirty;
|
|
37
40
|
constructor(rootDir: string);
|
|
41
|
+
private loadStorage;
|
|
38
42
|
save(): Promise<void>;
|
|
39
43
|
addBookmark(storyId: string, variantId: string, props: Record<string, any>, options?: { name?: string, notes?: string, color?: string }): Bookmark;
|
|
40
44
|
getAllBookmarks(): Bookmark[];
|
|
@@ -11,21 +11,21 @@ export {
|
|
|
11
11
|
extractDirectives,
|
|
12
12
|
extractProps,
|
|
13
13
|
extractSlots,
|
|
14
|
-
} from './analyzer';
|
|
14
|
+
} from './analyzer.js';
|
|
15
15
|
export {
|
|
16
16
|
extractScriptContent,
|
|
17
17
|
extractTemplateContent,
|
|
18
18
|
parseStoryContent,
|
|
19
19
|
parseStoryFile,
|
|
20
|
-
} from './parser';
|
|
20
|
+
} from './parser.js';
|
|
21
21
|
export {
|
|
22
22
|
isNonComponentFile,
|
|
23
23
|
scanStoryFiles,
|
|
24
24
|
watchStoryFiles,
|
|
25
|
-
} from './scanner';
|
|
25
|
+
} from './scanner.js';
|
|
26
26
|
export {
|
|
27
27
|
buildTree,
|
|
28
28
|
createTreePath,
|
|
29
29
|
findStoryInTree,
|
|
30
30
|
flattenTree,
|
|
31
|
-
} from './tree';
|
|
31
|
+
} from './tree.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type { BuildOptions } from './build';
|
|
2
|
-
export type { DevOptions } from './dev';
|
|
3
|
-
export type { PreviewOptions } from './preview';
|
|
1
|
+
export type { BuildOptions } from './build.js';
|
|
2
|
+
export type { DevOptions } from './dev.js';
|
|
3
|
+
export type { PreviewOptions } from './preview.js';
|
|
4
4
|
/**
|
|
5
5
|
* STX Story - CLI commands
|
|
6
6
|
*/
|
|
7
|
-
export { build, buildCommand } from './build';
|
|
8
|
-
export { dev, devCommand } from './dev';
|
|
9
|
-
export { preview, previewCommand } from './preview';
|
|
7
|
+
export { build, buildCommand } from './build.js';
|
|
8
|
+
export { dev, devCommand } from './dev.js';
|
|
9
|
+
export { preview, previewCommand } from './preview.js';
|
package/dist/story/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BackgroundPreset, ResolvedStoryConfig, ResponsivePreset, StoryConfig, StoryTreeConfig } from './types';
|
|
1
|
+
import type { BackgroundPreset, ResolvedStoryConfig, ResponsivePreset, StoryConfig, StoryTreeConfig } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Resolve story configuration with defaults
|
|
4
4
|
*/
|
package/dist/story/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ControlConfig } from '../types';
|
|
1
|
+
import type { ControlConfig } from '../types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Render a control component as HTML
|
|
4
4
|
*/
|
|
@@ -52,3 +52,4 @@ export declare function getControlStyles(): string;
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function renderButtonGroupControl(title: string, value: any, onChange: string, config: ControlConfig): string;
|
|
54
54
|
declare type ControlOption = string | { value: any, label: string }
|
|
55
|
+
export {};
|
package/dist/story/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type { CreateContextOptions } from './context';
|
|
2
|
-
export type { ServerOptions, StoryServer } from './server';
|
|
1
|
+
export type { CreateContextOptions } from './context.js';
|
|
2
|
+
export type { ServerOptions, StoryServer } from './server.js';
|
|
3
3
|
/**
|
|
4
4
|
* STX Story - Component showcase and testing
|
|
5
5
|
*
|
|
@@ -10,25 +10,25 @@ export type { ServerOptions, StoryServer } from './server';
|
|
|
10
10
|
* - Documentation generation
|
|
11
11
|
*/
|
|
12
12
|
// Addons
|
|
13
|
-
export * from './addons';
|
|
13
|
+
export * from './addons.js';
|
|
14
14
|
// Analytics
|
|
15
|
-
export * from './analytics';
|
|
15
|
+
export * from './analytics.js';
|
|
16
16
|
// Auto-generate Stories
|
|
17
|
-
export * from './auto-stories';
|
|
17
|
+
export * from './auto-stories.js';
|
|
18
18
|
// Bookmarks
|
|
19
|
-
export * from './bookmarks';
|
|
19
|
+
export * from './bookmarks.js';
|
|
20
20
|
// Bun Test Integration
|
|
21
|
-
export * from './bun-test';
|
|
21
|
+
export * from './bun-test.js';
|
|
22
22
|
// CLI
|
|
23
|
-
export * from './cli';
|
|
23
|
+
export * from './cli.js';
|
|
24
24
|
// Collection (scanner, analyzer, tree)
|
|
25
|
-
export * from './collect/index';
|
|
25
|
+
export * from './collect/index.js';
|
|
26
26
|
// Commands
|
|
27
|
-
export * from './commands/index';
|
|
27
|
+
export * from './commands/index.js';
|
|
28
28
|
// Compiled Output
|
|
29
|
-
export * from './compiled-output';
|
|
29
|
+
export * from './compiled-output.js';
|
|
30
30
|
// Composition (dependency graph)
|
|
31
|
-
export * from './composition';
|
|
31
|
+
export * from './composition.js';
|
|
32
32
|
// Configuration
|
|
33
33
|
export {
|
|
34
34
|
defaultBackgroundPresets,
|
|
@@ -36,64 +36,64 @@ export {
|
|
|
36
36
|
defaultStoryConfig,
|
|
37
37
|
getDefaultStoryConfig,
|
|
38
38
|
resolveStoryConfig,
|
|
39
|
-
} from './config';
|
|
39
|
+
} from './config.js';
|
|
40
40
|
// Config Watcher
|
|
41
|
-
export * from './config-watcher';
|
|
41
|
+
export * from './config-watcher.js';
|
|
42
42
|
// Context
|
|
43
43
|
export {
|
|
44
44
|
createContext,
|
|
45
45
|
updateContextStoryFiles,
|
|
46
46
|
updateContextTree,
|
|
47
|
-
} from './context';
|
|
47
|
+
} from './context.js';
|
|
48
48
|
// Controls
|
|
49
|
-
export * from './controls/index';
|
|
49
|
+
export * from './controls/index.js';
|
|
50
50
|
// Desktop Preview
|
|
51
|
-
export * from './desktop-preview';
|
|
51
|
+
export * from './desktop-preview.js';
|
|
52
52
|
// Docs Generator
|
|
53
|
-
export * from './docs-generator';
|
|
53
|
+
export * from './docs-generator.js';
|
|
54
54
|
// Errors
|
|
55
|
-
export * from './errors';
|
|
55
|
+
export * from './errors.js';
|
|
56
56
|
// Figma Export
|
|
57
|
-
export * from './figma-export';
|
|
57
|
+
export * from './figma-export.js';
|
|
58
58
|
// Generator
|
|
59
|
-
export * from './generator';
|
|
59
|
+
export * from './generator.js';
|
|
60
60
|
// Css CSS
|
|
61
|
-
export * from './ts-css';
|
|
61
|
+
export * from './ts-css.js';
|
|
62
62
|
// HMR
|
|
63
|
-
export * from './hmr';
|
|
63
|
+
export * from './hmr.js';
|
|
64
64
|
// Hot Swap
|
|
65
|
-
export * from './hot-swap';
|
|
65
|
+
export * from './hot-swap.js';
|
|
66
66
|
// Interactions
|
|
67
|
-
export * from './interactions';
|
|
67
|
+
export * from './interactions.js';
|
|
68
68
|
// Keyboard Shortcuts
|
|
69
|
-
export * from './keyboard-shortcuts';
|
|
69
|
+
export * from './keyboard-shortcuts.js';
|
|
70
70
|
// Output (terminal styling)
|
|
71
|
-
export * from './output';
|
|
71
|
+
export * from './output.js';
|
|
72
72
|
// Performance Profiling
|
|
73
|
-
export * from './performance';
|
|
73
|
+
export * from './performance.js';
|
|
74
74
|
// Presets
|
|
75
|
-
export * from './presets';
|
|
75
|
+
export * from './presets.js';
|
|
76
76
|
// Props Validation
|
|
77
|
-
export * from './props-validation';
|
|
77
|
+
export * from './props-validation.js';
|
|
78
78
|
// Renderer
|
|
79
|
-
export * from './renderer';
|
|
79
|
+
export * from './renderer.js';
|
|
80
80
|
// Search
|
|
81
|
-
export * from './search';
|
|
81
|
+
export * from './search.js';
|
|
82
82
|
// Search Index
|
|
83
|
-
export * from './search-index';
|
|
83
|
+
export * from './search-index.js';
|
|
84
84
|
// Server
|
|
85
|
-
export { createStoryServer } from './server';
|
|
85
|
+
export { createStoryServer } from './server.js';
|
|
86
86
|
// Setup
|
|
87
|
-
export * from './setup';
|
|
87
|
+
export * from './setup.js';
|
|
88
88
|
// Snapshots
|
|
89
|
-
export * from './snapshots';
|
|
89
|
+
export * from './snapshots.js';
|
|
90
90
|
// Testing
|
|
91
|
-
export * from './testing';
|
|
91
|
+
export * from './testing.js';
|
|
92
92
|
// Theme
|
|
93
|
-
export * from './theme';
|
|
93
|
+
export * from './theme.js';
|
|
94
94
|
// Types
|
|
95
|
-
export * from './types';
|
|
95
|
+
export * from './types.js';
|
|
96
96
|
// UI Components
|
|
97
|
-
export * from './ui/index';
|
|
97
|
+
export * from './ui/index.js';
|
|
98
98
|
// Visual Testing
|
|
99
|
-
export * from './visual-testing';
|
|
99
|
+
export * from './visual-testing.js';
|
package/dist/story/output.d.ts
CHANGED
|
@@ -46,6 +46,9 @@ export declare interface RenderRecord {
|
|
|
46
46
|
* Performance profiler
|
|
47
47
|
*/
|
|
48
48
|
export declare class PerformanceProfiler {
|
|
49
|
+
private metrics;
|
|
50
|
+
private maxHistorySize;
|
|
51
|
+
private enabled;
|
|
49
52
|
setEnabled(enabled: boolean): void;
|
|
50
53
|
recordRender(componentId: string, componentName: string, duration: number, props?: Record<string, any>): void;
|
|
51
54
|
getMetrics(componentId: string): ComponentMetrics | undefined;
|
|
@@ -54,6 +57,7 @@ export declare class PerformanceProfiler {
|
|
|
54
57
|
getMostRenderedComponents(limit?: number): ComponentMetrics[];
|
|
55
58
|
clear(): void;
|
|
56
59
|
clearComponent(componentId: string): void;
|
|
60
|
+
private getMemoryUsage;
|
|
57
61
|
exportMetrics(): string;
|
|
58
62
|
createTimer(componentId: string, componentName: string): RenderTimer;
|
|
59
63
|
}
|
|
@@ -61,6 +65,11 @@ export declare class PerformanceProfiler {
|
|
|
61
65
|
* Render timer helper
|
|
62
66
|
*/
|
|
63
67
|
export declare class RenderTimer {
|
|
68
|
+
private startTime;
|
|
69
|
+
private props;
|
|
70
|
+
private profiler;
|
|
71
|
+
private componentId;
|
|
72
|
+
private componentName;
|
|
64
73
|
constructor(profiler: PerformanceProfiler, componentId: string, componentName: string);
|
|
65
74
|
setProps(props: Record<string, any>): this;
|
|
66
75
|
end(): number;
|
package/dist/story/presets.d.ts
CHANGED
|
@@ -36,7 +36,12 @@ export declare interface PresetsStorage {
|
|
|
36
36
|
* Presets manager
|
|
37
37
|
*/
|
|
38
38
|
export declare class PresetsManager {
|
|
39
|
+
private storage;
|
|
40
|
+
private storagePath;
|
|
41
|
+
private dirty;
|
|
39
42
|
constructor(rootDir: string);
|
|
43
|
+
private loadStorage;
|
|
44
|
+
private migrateStorage;
|
|
40
45
|
save(): Promise<void>;
|
|
41
46
|
createPreset(name: string, props: Record<string, any>, options?: {
|
|
42
47
|
description?: string
|
package/dist/story/renderer.d.ts
CHANGED
package/dist/story/search.d.ts
CHANGED
package/dist/story/server.d.ts
CHANGED
package/dist/story/setup.d.ts
CHANGED
package/dist/story/testing.d.ts
CHANGED
package/dist/story/theme.d.ts
CHANGED
package/dist/story/ts-css.d.ts
CHANGED