@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,82 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Performance optimization utilities for stx
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Generic LRU (Least Recently Used) cache implementation
|
|
6
|
-
* Automatically evicts least recently used items when capacity is reached
|
|
7
|
-
*/
|
|
8
|
-
/**
|
|
9
|
-
* How a cache measures what it is holding, when entry count is not enough.
|
|
10
|
-
*
|
|
11
|
-
* A count-bounded cache assumes entries are roughly one size. That holds for
|
|
12
|
-
* the caches here that store paths or small fragments, and stops holding as
|
|
13
|
-
* soon as the values are rendered output: one entry can be tens of kilobytes
|
|
14
|
-
* and another a few bytes, so `maxSize` stops describing the footprint at all
|
|
15
|
-
* (stacksjs/stx#1945). Passing `sizeOf` and `maxBytes` bounds the bytes as
|
|
16
|
-
* well, which is the number a memory-constrained host actually has to budget.
|
|
17
|
-
*/
|
|
18
|
-
export interface LRUCacheOptions<V> {
|
|
19
|
-
/** Bytes this cache may retain across all entries. */
|
|
20
|
-
maxBytes: number;
|
|
21
|
-
/** What one value costs. Called once per `set`, so keep it cheap. */
|
|
22
|
-
sizeOf: (value: V) => number;
|
|
23
|
-
}
|
|
24
|
-
export declare class LRUCache<K, V> {
|
|
25
|
-
private cache;
|
|
26
|
-
private readonly maxSize;
|
|
27
|
-
private options;
|
|
28
|
-
private sizes;
|
|
29
|
-
private bytes;
|
|
30
|
-
constructor(maxSize?: number, options?: LRUCacheOptions<V>);
|
|
31
|
-
/** Bytes currently retained. Zero unless the cache is byte-bounded. */
|
|
32
|
-
get byteSize(): number;
|
|
33
|
-
/**
|
|
34
|
-
* Change the byte budget, evicting immediately down to the new one.
|
|
35
|
-
*
|
|
36
|
-
* The caches here are module state, built when the module loads and so before
|
|
37
|
-
* any config has been read. A host that wants a different ceiling -- or none
|
|
38
|
-
* at all -- can only say so afterwards, and it should take effect on what is
|
|
39
|
-
* already held rather than only on what arrives next: a container that has
|
|
40
|
-
* just told stx to keep 4MB is not helped by a cache that keeps its current
|
|
41
|
-
* 32MB until the entries happen to age out.
|
|
42
|
-
*
|
|
43
|
-
* A no-op on a cache built without a budget: giving one bytes it never
|
|
44
|
-
* measured would evict against a total that is always zero.
|
|
45
|
-
*/
|
|
46
|
-
setMaxBytes(maxBytes: number): void;
|
|
47
|
-
/**
|
|
48
|
-
* Get a value from the cache, moving it to most recently used
|
|
49
|
-
*/
|
|
50
|
-
get(key: K): V | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Set a value in the cache
|
|
53
|
-
*/
|
|
54
|
-
set(key: K, value: V): void;
|
|
55
|
-
/**
|
|
56
|
-
* Check if key exists in cache
|
|
57
|
-
*/
|
|
58
|
-
has(key: K): boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Delete a key from the cache
|
|
61
|
-
*/
|
|
62
|
-
delete(key: K): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* Clear all entries from the cache
|
|
65
|
-
*/
|
|
66
|
-
clear(): void;
|
|
67
|
-
/**
|
|
68
|
-
* Get the current size of the cache
|
|
69
|
-
*/
|
|
70
|
-
get size(): number;
|
|
71
|
-
/**
|
|
72
|
-
* Get all keys in the cache (oldest to newest)
|
|
73
|
-
*/
|
|
74
|
-
keys(): IterableIterator<K>;
|
|
75
|
-
/**
|
|
76
|
-
* Get all values in the cache (oldest to newest)
|
|
77
|
-
*/
|
|
78
|
-
values(): IterableIterator<V>;
|
|
79
|
-
}
|
|
80
1
|
/**
|
|
81
2
|
* Get a cached regex pattern or compile and cache it.
|
|
82
3
|
*
|
|
@@ -102,39 +23,6 @@ export declare function getCachedRegex(pattern: string, flags?: string): RegExp;
|
|
|
102
23
|
* Clear the regex cache (useful for testing)
|
|
103
24
|
*/
|
|
104
25
|
export declare function clearRegexCache(): void;
|
|
105
|
-
/**
|
|
106
|
-
* Cache for template processing results
|
|
107
|
-
*/
|
|
108
|
-
export declare class TemplateCache {
|
|
109
|
-
private cache;
|
|
110
|
-
private maxSize;
|
|
111
|
-
private ttl;
|
|
112
|
-
constructor(maxSize?: number, ttl?: number);
|
|
113
|
-
/**
|
|
114
|
-
* Get cached result if available and not expired
|
|
115
|
-
*/
|
|
116
|
-
get(key: string): string | null;
|
|
117
|
-
/**
|
|
118
|
-
* Store result in cache
|
|
119
|
-
*/
|
|
120
|
-
set(key: string, result: string, dependencies?: Set<string>): void;
|
|
121
|
-
/**
|
|
122
|
-
* Invalidate cache entries that depend on a specific file
|
|
123
|
-
*/
|
|
124
|
-
invalidateDependency(filePath: string): number;
|
|
125
|
-
/**
|
|
126
|
-
* Clear all cached entries
|
|
127
|
-
*/
|
|
128
|
-
clear(): void;
|
|
129
|
-
/**
|
|
130
|
-
* Get cache statistics
|
|
131
|
-
*/
|
|
132
|
-
getStats(): {
|
|
133
|
-
size: number;
|
|
134
|
-
maxSize: number;
|
|
135
|
-
hitRate?: number;
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
26
|
/**
|
|
139
27
|
* Debounce function calls to avoid excessive processing
|
|
140
28
|
*/
|
|
@@ -152,169 +40,161 @@ export declare function memoize<T extends (...args: any[]) => any>(func: T, maxC
|
|
|
152
40
|
*/
|
|
153
41
|
export declare function optimizedReplace(text: string, pattern: string | RegExp, replacement: string | ((match: string, ...args: any[]) => string), flags?: string): string;
|
|
154
42
|
/**
|
|
155
|
-
*
|
|
43
|
+
* Get the global performance monitor instance (lazy-loaded)
|
|
44
|
+
* This avoids instantiating the monitor until it's actually needed
|
|
156
45
|
*/
|
|
157
|
-
declare
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
46
|
+
export declare function getPerformanceMonitor(): PerformanceMonitor;
|
|
47
|
+
/**
|
|
48
|
+
* Apply default performance budgets to the monitor
|
|
49
|
+
*/
|
|
50
|
+
export declare function applyDefaultBudgets(monitor?: PerformanceMonitor): void;
|
|
51
|
+
/**
|
|
52
|
+
* Reset the performance monitor instance (useful for testing)
|
|
53
|
+
*/
|
|
54
|
+
export declare function resetPerformanceMonitor(): void;
|
|
55
|
+
/** Bound consecutive render work across components, stages and collection rows. */
|
|
56
|
+
export declare function yieldDuringRendering(): Promise<void>;
|
|
57
|
+
// Global expression evaluator pool
|
|
165
58
|
export declare const expressionEvaluatorPool: ExpressionEvaluatorPool;
|
|
166
59
|
/**
|
|
167
|
-
*
|
|
60
|
+
* Default performance budgets for common operations
|
|
61
|
+
* @defaultValue
|
|
62
|
+
* ```ts
|
|
63
|
+
* {
|
|
64
|
+
* processDirectives: { maxTime: 500, warnThreshold: 0.8, action: 'warn' },
|
|
65
|
+
* processTemplate: { maxTime: 200, warnThreshold: 0.8, action: 'warn' },
|
|
66
|
+
* processIncludes: { maxTime: 100, warnThreshold: 0.8, action: 'warn' },
|
|
67
|
+
* processLoops: { maxTime: 50, warnThreshold: 0.8, action: 'warn' },
|
|
68
|
+
* processConditionals: { maxTime: 50, warnThreshold: 0.8, action: 'warn' },
|
|
69
|
+
* processExpressions: { maxTime: 100, warnThreshold: 0.8, action: 'warn' },
|
|
70
|
+
* renderComponent: { maxTime: 150, warnThreshold: 0.8, action: 'warn' },
|
|
71
|
+
* buildWebComponents: { maxTime: 1000, warnThreshold: 0.8, action: 'warn' }
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
168
74
|
*/
|
|
169
|
-
export
|
|
170
|
-
/** Maximum allowed time in milliseconds */
|
|
171
|
-
maxTime: number;
|
|
172
|
-
/** Warning threshold (percentage of maxTime, e.g., 0.8 = 80%) */
|
|
173
|
-
warnThreshold?: number;
|
|
174
|
-
/** Action to take on budget violation: 'log', 'warn', 'error', 'throw' */
|
|
175
|
-
action?: 'log' | 'warn' | 'error' | 'throw';
|
|
176
|
-
}
|
|
75
|
+
export declare const defaultPerformanceBudgets: Record<string, PerformanceBudget>;
|
|
177
76
|
/**
|
|
178
|
-
*
|
|
77
|
+
* Global performance monitor instance
|
|
78
|
+
* @deprecated Use getPerformanceMonitor() for lazy loading
|
|
179
79
|
*/
|
|
180
|
-
export
|
|
181
|
-
|
|
182
|
-
actualTime: number;
|
|
183
|
-
budgetTime: number;
|
|
184
|
-
exceedancePercent: number;
|
|
185
|
-
timestamp: Date;
|
|
186
|
-
isWarning: boolean;
|
|
187
|
-
}
|
|
80
|
+
export declare const performanceMonitor: PerformanceMonitor;
|
|
81
|
+
/* eslint-disable prefer-const, style/max-statements-per-line, no-super-linear-backtracking, regexp/no-unused-capturing-group, pickier/no-unused-vars */
|
|
188
82
|
/**
|
|
189
|
-
* Performance
|
|
83
|
+
* Performance optimization utilities for stx
|
|
190
84
|
*/
|
|
191
|
-
export type BudgetViolationHandler = (violation: BudgetViolation) => void;
|
|
192
85
|
/**
|
|
193
|
-
*
|
|
86
|
+
* Generic LRU (Least Recently Used) cache implementation
|
|
87
|
+
* Automatically evicts least recently used items when capacity is reached
|
|
194
88
|
*/
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
*/
|
|
209
|
-
isEnabled(): boolean;
|
|
210
|
-
/**
|
|
211
|
-
* Set a performance budget for a specific operation
|
|
212
|
-
*
|
|
213
|
-
* @param label - Operation label
|
|
214
|
-
* @param budget - Budget configuration
|
|
215
|
-
*
|
|
216
|
-
* @example
|
|
217
|
-
* ```typescript
|
|
218
|
-
* performanceMonitor.setBudget('processDirectives', {
|
|
219
|
-
* maxTime: 100, // 100ms max
|
|
220
|
-
* warnThreshold: 0.8, // warn at 80ms
|
|
221
|
-
* action: 'warn'
|
|
222
|
-
* })
|
|
223
|
-
* ```
|
|
224
|
-
*/
|
|
225
|
-
setBudget(label: string, budget: PerformanceBudget): void;
|
|
226
|
-
/**
|
|
227
|
-
* Set multiple performance budgets at once
|
|
228
|
-
*/
|
|
229
|
-
setBudgets(budgets: Record<string, PerformanceBudget>): void;
|
|
230
|
-
/**
|
|
231
|
-
* Remove a performance budget
|
|
232
|
-
*/
|
|
233
|
-
removeBudget(label: string): void;
|
|
234
|
-
/**
|
|
235
|
-
* Get all configured budgets
|
|
236
|
-
*/
|
|
237
|
-
getBudgets(): Record<string, PerformanceBudget>;
|
|
238
|
-
/**
|
|
239
|
-
* Add a handler for budget violations
|
|
240
|
-
*/
|
|
241
|
-
onViolation(handler: BudgetViolationHandler): void;
|
|
242
|
-
/**
|
|
243
|
-
* Remove a violation handler
|
|
244
|
-
*/
|
|
245
|
-
offViolation(handler: BudgetViolationHandler): void;
|
|
246
|
-
/**
|
|
247
|
-
* Time a function execution
|
|
248
|
-
*/
|
|
249
|
-
time<T>(label: string, fn: () => T): T;
|
|
250
|
-
/**
|
|
251
|
-
* Time an async function execution
|
|
252
|
-
*/
|
|
253
|
-
timeAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
254
|
-
/**
|
|
255
|
-
* Check if a duration violates the budget
|
|
256
|
-
*/
|
|
257
|
-
private checkBudget;
|
|
258
|
-
/**
|
|
259
|
-
* Record a timing measurement
|
|
260
|
-
*/
|
|
261
|
-
recordTime(label: string, duration: number): void;
|
|
262
|
-
/**
|
|
263
|
-
* Get performance statistics
|
|
264
|
-
*/
|
|
265
|
-
getStats(label?: string): Record<string, any>;
|
|
266
|
-
/**
|
|
267
|
-
* Get all budget violations
|
|
268
|
-
*/
|
|
269
|
-
getViolations(label?: string): BudgetViolation[];
|
|
270
|
-
/**
|
|
271
|
-
* Get violation statistics
|
|
272
|
-
*/
|
|
273
|
-
getViolationStats(): {
|
|
274
|
-
total: number;
|
|
275
|
-
byLabel: Record<string, number>;
|
|
276
|
-
warnings: number;
|
|
277
|
-
errors: number;
|
|
278
|
-
};
|
|
279
|
-
/**
|
|
280
|
-
* Clear all metrics
|
|
281
|
-
*/
|
|
282
|
-
clear(): void;
|
|
283
|
-
/**
|
|
284
|
-
* Clear all violations
|
|
285
|
-
*/
|
|
286
|
-
clearViolations(): void;
|
|
287
|
-
/**
|
|
288
|
-
* Clear budgets
|
|
289
|
-
*/
|
|
290
|
-
clearBudgets(): void;
|
|
291
|
-
/**
|
|
292
|
-
* Reset everything (metrics, violations, budgets)
|
|
293
|
-
*/
|
|
294
|
-
reset(): void;
|
|
89
|
+
/**
|
|
90
|
+
* How a cache measures what it is holding, when entry count is not enough.
|
|
91
|
+
*
|
|
92
|
+
* A count-bounded cache assumes entries are roughly one size. That holds for
|
|
93
|
+
* the caches here that store paths or small fragments, and stops holding as
|
|
94
|
+
* soon as the values are rendered output: one entry can be tens of kilobytes
|
|
95
|
+
* and another a few bytes, so `maxSize` stops describing the footprint at all
|
|
96
|
+
* (stacksjs/stx#1945). Passing `sizeOf` and `maxBytes` bounds the bytes as
|
|
97
|
+
* well, which is the number a memory-constrained host actually has to budget.
|
|
98
|
+
*/
|
|
99
|
+
export declare interface LRUCacheOptions<V> {
|
|
100
|
+
maxBytes: number
|
|
101
|
+
sizeOf: (value: V) => number
|
|
295
102
|
}
|
|
296
103
|
/**
|
|
297
|
-
*
|
|
104
|
+
* Performance budget configuration
|
|
298
105
|
*/
|
|
299
|
-
export declare
|
|
106
|
+
export declare interface PerformanceBudget {
|
|
107
|
+
maxTime: number
|
|
108
|
+
warnThreshold?: number
|
|
109
|
+
action?: 'log' | 'warn' | 'error' | 'throw'
|
|
110
|
+
}
|
|
300
111
|
/**
|
|
301
|
-
*
|
|
302
|
-
* This avoids instantiating the monitor until it's actually needed
|
|
112
|
+
* Performance budget violation event
|
|
303
113
|
*/
|
|
304
|
-
export declare
|
|
114
|
+
export declare interface BudgetViolation {
|
|
115
|
+
label: string
|
|
116
|
+
actualTime: number
|
|
117
|
+
budgetTime: number
|
|
118
|
+
exceedancePercent: number
|
|
119
|
+
timestamp: Date
|
|
120
|
+
isWarning: boolean
|
|
121
|
+
}
|
|
305
122
|
/**
|
|
306
|
-
*
|
|
307
|
-
* @deprecated Use getPerformanceMonitor() for lazy loading
|
|
123
|
+
* Performance budget violation handler type
|
|
308
124
|
*/
|
|
309
|
-
|
|
125
|
+
// eslint-disable-next-line pickier/no-unused-vars
|
|
126
|
+
export type BudgetViolationHandler = (violation: BudgetViolation) => void;
|
|
127
|
+
export declare class LRUCache<K, V> {
|
|
128
|
+
private cache;
|
|
129
|
+
private maxSize;
|
|
130
|
+
private options;
|
|
131
|
+
private sizes;
|
|
132
|
+
private bytes;
|
|
133
|
+
constructor(maxSize?: number, options?: LRUCacheOptions<V>);
|
|
134
|
+
get byteSize(): number;
|
|
135
|
+
setMaxBytes(maxBytes: number): void;
|
|
136
|
+
get(key: K): V | undefined;
|
|
137
|
+
set(key: K, value: V): void;
|
|
138
|
+
has(key: K): boolean;
|
|
139
|
+
delete(key: K): boolean;
|
|
140
|
+
clear(): void;
|
|
141
|
+
get size(): number;
|
|
142
|
+
keys(): IterableIterator<K>;
|
|
143
|
+
values(): IterableIterator<V>;
|
|
144
|
+
}
|
|
310
145
|
/**
|
|
311
|
-
*
|
|
146
|
+
* Cache for template processing results
|
|
312
147
|
*/
|
|
313
|
-
export declare
|
|
148
|
+
export declare class TemplateCache {
|
|
149
|
+
private cache;
|
|
150
|
+
private maxSize;
|
|
151
|
+
private ttl;
|
|
152
|
+
constructor(maxSize?: number, ttl?: number);
|
|
153
|
+
get(key: string): string | null;
|
|
154
|
+
set(key: string, result: string, dependencies?: Set<string>): void;
|
|
155
|
+
invalidateDependency(filePath: string): number;
|
|
156
|
+
clear(): void;
|
|
157
|
+
getStats(): { size: number, maxSize: number, hitRate?: number };
|
|
158
|
+
}
|
|
314
159
|
/**
|
|
315
|
-
*
|
|
160
|
+
* Pool of worker contexts to avoid creating new Function instances
|
|
316
161
|
*/
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
162
|
+
declare class ExpressionEvaluatorPool {
|
|
163
|
+
private pool;
|
|
164
|
+
private maxPoolSize;
|
|
165
|
+
private fnCache;
|
|
166
|
+
private fnCacheMaxSize;
|
|
167
|
+
getEvaluator(contextKeys: string[]): (...args: any[]) => any;
|
|
168
|
+
clear(): void;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Performance monitor for tracking processing times with budget support
|
|
172
|
+
*/
|
|
173
|
+
export declare class PerformanceMonitor {
|
|
174
|
+
private metrics;
|
|
175
|
+
private budgets;
|
|
176
|
+
private violations;
|
|
177
|
+
private maxViolations;
|
|
178
|
+
private violationHandlers;
|
|
179
|
+
private enabled;
|
|
180
|
+
setEnabled(enabled: boolean): void;
|
|
181
|
+
isEnabled(): boolean;
|
|
182
|
+
setBudget(label: string, budget: PerformanceBudget): void;
|
|
183
|
+
setBudgets(budgets: Record<string, PerformanceBudget>): void;
|
|
184
|
+
removeBudget(label: string): void;
|
|
185
|
+
getBudgets(): Record<string, PerformanceBudget>;
|
|
186
|
+
onViolation(handler: BudgetViolationHandler): void;
|
|
187
|
+
offViolation(handler: BudgetViolationHandler): void;
|
|
188
|
+
time<T>(label: string, fn: () => T): T;
|
|
189
|
+
timeAsync<T>(label: string, fn: () => Promise<T>): Promise<T>;
|
|
190
|
+
private checkBudget;
|
|
191
|
+
recordTime(label: string, duration: number): void;
|
|
192
|
+
getStats(label?: string): Record<string, any>;
|
|
193
|
+
getViolations(label?: string): BudgetViolation[];
|
|
194
|
+
getViolationStats(): { total: number, byLabel: Record<string, number>, warnings: number, errors: number };
|
|
195
|
+
clear(): void;
|
|
196
|
+
clearViolations(): void;
|
|
197
|
+
clearBudgets(): void;
|
|
198
|
+
reset(): void;
|
|
199
|
+
}
|
|
320
200
|
export {};
|
package/dist/plugin-system.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CustomDirective, StxOptions } from './types';
|
|
1
|
+
import type { CustomDirective, StxOptions } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Define an stx plugin with type safety.
|
|
4
4
|
*
|
|
@@ -135,6 +135,9 @@ export type DirectivePhase = | 'comments'
|
|
|
135
135
|
* Plugin manager that handles registration, lifecycle, and execution
|
|
136
136
|
*/
|
|
137
137
|
export declare class PluginManager {
|
|
138
|
+
private plugins;
|
|
139
|
+
private sortedPlugins;
|
|
140
|
+
private initialized;
|
|
138
141
|
register(plugin: StxPlugin, options: StxOptions): Promise<void>;
|
|
139
142
|
unregister(name: string): Promise<boolean>;
|
|
140
143
|
get(name: string): StxPlugin | undefined;
|
|
@@ -149,4 +152,7 @@ export declare class PluginManager {
|
|
|
149
152
|
runBeforeRender(ctx: PluginContext): Promise<PluginContext>;
|
|
150
153
|
runAfterRender(ctx: PluginContext): Promise<PluginContext>;
|
|
151
154
|
runOnError(ctx: PluginErrorContext): Promise<PluginContext | null>;
|
|
155
|
+
private sortPlugins;
|
|
156
|
+
private runHooks;
|
|
157
|
+
private runDirectiveHooks;
|
|
152
158
|
}
|
package/dist/precompiler.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SourceMapV3 } from './source-maps';
|
|
1
|
+
import type { SourceMapV3 } from './source-maps.js';
|
|
2
2
|
// Export singleton instance
|
|
3
3
|
export declare const compiler: TemplateCompiler;
|
|
4
4
|
/**
|
|
@@ -37,7 +37,38 @@ export type CompileMode = 'ssr' | 'client' | 'universal';
|
|
|
37
37
|
* Template pre-compiler
|
|
38
38
|
*/
|
|
39
39
|
export declare class TemplateCompiler {
|
|
40
|
+
private parser;
|
|
40
41
|
constructor();
|
|
41
42
|
compile(template: string, options?: CompileOptions): CompileResult;
|
|
42
43
|
compileFile(filePath: string, options?: CompileOptions): Promise<CompileResult>;
|
|
44
|
+
private createContext;
|
|
45
|
+
private generateRenderFunction;
|
|
46
|
+
private analyzeAST;
|
|
47
|
+
private generateNode;
|
|
48
|
+
private generateText;
|
|
49
|
+
private generateExpression;
|
|
50
|
+
private generateDirective;
|
|
51
|
+
private generateIf;
|
|
52
|
+
private generateUnless;
|
|
53
|
+
private generateForeach;
|
|
54
|
+
private generateFor;
|
|
55
|
+
private generateWhile;
|
|
56
|
+
private generateIsset;
|
|
57
|
+
private generateEmpty;
|
|
58
|
+
private generateAuth;
|
|
59
|
+
private generateGuest;
|
|
60
|
+
private generateEnv;
|
|
61
|
+
private generateSwitch;
|
|
62
|
+
private generateSlot;
|
|
63
|
+
private generateSection;
|
|
64
|
+
private generatePush;
|
|
65
|
+
private generateOnce;
|
|
66
|
+
private generateScript;
|
|
67
|
+
private generateStyle;
|
|
68
|
+
private generateElement;
|
|
69
|
+
private generateAttribute;
|
|
70
|
+
private parseAttributeValue;
|
|
71
|
+
private generateComponent;
|
|
72
|
+
private splitConditionalBody;
|
|
73
|
+
private wrapModule;
|
|
43
74
|
}
|
package/dist/process.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { processJsonDirective, processOnceDirective } from './misc-directives';
|
|
2
|
-
import { validateClientScript } from './script-validation';
|
|
3
|
-
import type { StxOptions } from './types';
|
|
1
|
+
import { processJsonDirective, processOnceDirective } from './misc-directives.js';
|
|
2
|
+
import { validateClientScript } from './script-validation.js';
|
|
3
|
+
import type { StxOptions } from './types.js';
|
|
4
4
|
export declare function buildModulesTag(sources: Array<string | null>, options: StxOptions, dependencies?: Set<string>, built?: { code?: string, inputs?: string[] }): Promise<string | null>;
|
|
5
5
|
export declare function processDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions, dependencies: Set<string>): Promise<string>;
|
|
6
6
|
// Re-export public API from extracted modules (preserves backwards compatibility)
|
|
7
|
-
export { injectRouterScript } from './runtime-injection';
|
|
8
|
-
export { processJsonDirective, processOnceDirective } from './misc-directives';
|
|
9
|
-
export { validateClientScript } from './script-validation';
|
|
7
|
+
export { injectRouterScript } from './runtime-injection.js';
|
|
8
|
+
export { processJsonDirective, processOnceDirective } from './misc-directives.js';
|
|
9
|
+
export { validateClientScript } from './script-validation.js';
|
|
@@ -158,6 +158,42 @@ export declare interface AssetInfo {
|
|
|
158
158
|
* Production Build orchestrator
|
|
159
159
|
*/
|
|
160
160
|
export declare class ProductionBuild {
|
|
161
|
+
private config;
|
|
162
|
+
private startTime;
|
|
163
|
+
private outputs;
|
|
164
|
+
private chunks;
|
|
165
|
+
private assets;
|
|
166
|
+
private warnings;
|
|
167
|
+
private errors;
|
|
168
|
+
private moduleGraph;
|
|
169
|
+
private assetHashes;
|
|
161
170
|
constructor(config: ProductionBuildConfig);
|
|
162
171
|
build(): Promise<BuildResult>;
|
|
172
|
+
private collectEntries;
|
|
173
|
+
private buildEntry;
|
|
174
|
+
private resolveRelativePath;
|
|
175
|
+
private processTemplate;
|
|
176
|
+
private processCss;
|
|
177
|
+
private processScript;
|
|
178
|
+
private extractCss;
|
|
179
|
+
private processAssets;
|
|
180
|
+
private performCodeSplitting;
|
|
181
|
+
private minifyOutputs;
|
|
182
|
+
private minifyJs;
|
|
183
|
+
private minifyCss;
|
|
184
|
+
private minifyHtml;
|
|
185
|
+
private generateSourceMaps;
|
|
186
|
+
private fingerprintAssets;
|
|
187
|
+
private compressOutputs;
|
|
188
|
+
private analyzeBundle;
|
|
189
|
+
private generateAnalysisHtml;
|
|
190
|
+
private generateAnalysisText;
|
|
191
|
+
private runPluginHook;
|
|
192
|
+
private runPluginTransform;
|
|
193
|
+
private generateHash;
|
|
194
|
+
private getOutputName;
|
|
195
|
+
private formatSize;
|
|
196
|
+
private ensureDir;
|
|
197
|
+
private walkDir;
|
|
198
|
+
private getResult;
|
|
163
199
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ManifestAssets } from './manifest';
|
|
2
|
-
import { type RouteRules } from './route-rules';
|
|
3
|
-
import { type ServerApiOptions } from './server-api';
|
|
1
|
+
import { type ManifestAssets } from './manifest.js';
|
|
2
|
+
import { type RouteRules } from './route-rules.js';
|
|
3
|
+
import { type ServerApiOptions } from './server-api.js';
|
|
4
4
|
/**
|
|
5
5
|
* Build the stx application for production.
|
|
6
6
|
*
|
package/dist/pwa/audit.d.ts
CHANGED
package/dist/pwa/directives.d.ts
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import type { CustomDirective } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Generate install button HTML and JavaScript
|
|
4
|
-
*/
|
|
5
|
-
declare function generateInstallButton(content: string, options: StxOptions): string;
|
|
6
|
-
/**
|
|
7
|
-
* Generate update prompt HTML and JavaScript
|
|
8
|
-
*/
|
|
9
|
-
declare function generateUpdatePrompt(content: string, options: StxOptions): string;
|
|
10
|
-
/**
|
|
11
|
-
* Generate offline indicator HTML and JavaScript
|
|
12
|
-
*/
|
|
13
|
-
// eslint-disable-next-line pickier/no-unused-vars
|
|
14
|
-
declare function generateOfflineIndicator(content: string, options: StxOptions): string;
|
|
15
|
-
/**
|
|
16
|
-
* Generate push subscribe button HTML and JavaScript
|
|
17
|
-
*/
|
|
18
|
-
declare function generatePushSubscribe(content: string, options: StxOptions): string;
|
|
1
|
+
import type { CustomDirective } from '../types.js';
|
|
19
2
|
/**
|
|
20
3
|
* Register all PWA directives with the config
|
|
21
4
|
*/
|
package/dist/pwa/icons.d.ts
CHANGED