@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
package/dist/a11y.d.ts
CHANGED
package/dist/analytics.d.ts
CHANGED
package/dist/animation.d.ts
CHANGED
|
@@ -1,52 +1,9 @@
|
|
|
1
|
-
import type { CustomDirective, StxOptions } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Generates CSS for transitions based on provided parameters
|
|
4
|
-
*/
|
|
5
|
-
declare function generateTransitionCSS(type: TransitionType, options?: {
|
|
6
|
-
duration?: number
|
|
7
|
-
delay?: number
|
|
8
|
-
ease?: TransitionEase
|
|
9
|
-
direction?: TransitionDirection
|
|
10
|
-
custom?: string
|
|
11
|
-
}): string;
|
|
12
|
-
/**
|
|
13
|
-
* Generates necessary script to handle motion preferences
|
|
14
|
-
*
|
|
15
|
-
* Every script in this module now states its re-run behaviour with
|
|
16
|
-
* `data-stx-run`, rather than letting the router infer it from the first
|
|
17
|
-
* character of the body (#1828).
|
|
18
|
-
*
|
|
19
|
-
* The split is whether the script resolves its targets at RUN time.
|
|
20
|
-
*
|
|
21
|
-
* `always` for the scroll observer, the animation group, and the per-container
|
|
22
|
-
* stagger and timeline scripts. Each queries the document when it runs —
|
|
23
|
-
* `.stx-observe`, a selector list, a container id — so a page swapped in later
|
|
24
|
-
* only gets animated if the script runs again. The scroll observer and the
|
|
25
|
-
* group script also REMOVE the `stx-out` class that hides their elements, so
|
|
26
|
-
* skipping them does not merely drop an animation: the content stays hidden.
|
|
27
|
-
* These two were already being deduped under the old sniff, because their
|
|
28
|
-
* bodies open with a comment, so that is a real bug this fixes rather than
|
|
29
|
-
* preserves. The cost is one extra IntersectionObserver per navigation, which
|
|
30
|
-
* is the cheaper side of the trade.
|
|
31
|
-
*
|
|
32
|
-
* `once` for motion preferences and the runtime registry, which write to
|
|
33
|
-
* `document.documentElement` and to `window.__stxAnimation` — both survive an
|
|
34
|
-
* SPA navigation, so re-running only re-installs a matchMedia listener.
|
|
35
|
-
*/
|
|
36
|
-
declare function generateMotionPreferencesScript(): string;
|
|
37
|
-
/**
|
|
38
|
-
* Animation Group handling for coordinated animations
|
|
39
|
-
*/
|
|
40
|
-
declare function generateAnimationGroup(groupName: string, elements: string[], options?: { staggerDelay?: number, sequence?: boolean }): string;
|
|
1
|
+
import type { CustomDirective, StxOptions } from './types.js';
|
|
41
2
|
/**
|
|
42
3
|
* Process animation directives in the template
|
|
43
4
|
*/
|
|
44
5
|
// eslint-disable-next-line pickier/no-unused-vars
|
|
45
6
|
export declare function processAnimationDirectives(template: string, context: Record<string, any>, filePath: string, options: StxOptions): string;
|
|
46
|
-
/**
|
|
47
|
-
* Calculate spring animation CSS
|
|
48
|
-
*/
|
|
49
|
-
declare function calculateSpringCurve(config: SpringConfig): string;
|
|
50
7
|
/**
|
|
51
8
|
* Create an animation timeline for coordinated animations
|
|
52
9
|
*/
|
package/dist/api-client.d.ts
CHANGED
package/dist/app-shell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ContainerRegion } from './fragment-container';
|
|
2
|
-
import type { StxOptions } from './types';
|
|
1
|
+
import type { ContainerRegion } from './fragment-container.js';
|
|
2
|
+
import type { StxOptions } from './types.js';
|
|
3
3
|
export type { LayoutMetadata } from 'stx-router/layout-metadata';
|
|
4
4
|
/**
|
|
5
5
|
* Detect an app shell file in the given directory.
|
package/dist/app.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StxOptions } from './types';
|
|
1
|
+
import type { StxOptions } from './types.js';
|
|
2
2
|
export declare function isLayerConfigSource(file: string): boolean;
|
|
3
3
|
/** Objects merge recursively; arrays replace except ordered middleware/plugins. */
|
|
4
4
|
export declare function mergeLayerConfig(base: any, override: any, key?: string): any;
|
package/dist/assets.d.ts
CHANGED
package/dist/ast.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Position } from './source-maps';
|
|
1
|
+
import type { Position } from './source-maps.js';
|
|
2
2
|
// =============================================================================
|
|
3
3
|
// Node Guards
|
|
4
4
|
// =============================================================================
|
|
@@ -261,5 +261,27 @@ declare type _TokenType = | 'TEXT'
|
|
|
261
261
|
* Simple template parser
|
|
262
262
|
*/
|
|
263
263
|
export declare class TemplateParser {
|
|
264
|
+
private source;
|
|
265
|
+
private pos;
|
|
266
|
+
private line;
|
|
267
|
+
private column;
|
|
268
|
+
private filePath;
|
|
264
269
|
parse(template: string, filePath?: string): DocumentNode;
|
|
270
|
+
private parseChildren;
|
|
271
|
+
private parseNext;
|
|
272
|
+
private parseText;
|
|
273
|
+
private parseExpression;
|
|
274
|
+
private parseDirective;
|
|
275
|
+
private parseParenthesized;
|
|
276
|
+
private parseStxComment;
|
|
277
|
+
private parseHtmlComment;
|
|
278
|
+
private parseTag;
|
|
279
|
+
private parseAttributes;
|
|
280
|
+
private parseAttribute;
|
|
281
|
+
private parseScript;
|
|
282
|
+
private parseStyle;
|
|
283
|
+
private advance;
|
|
284
|
+
private skipWhitespace;
|
|
285
|
+
private getPosition;
|
|
265
286
|
}
|
|
287
|
+
export {};
|
package/dist/broadcasting.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Broadcast, BroadcastServer, type ServerConfig } from 'ts-broadcasting';
|
|
2
|
-
import type { BroadcastingConfig } from './types/config-types';
|
|
2
|
+
import type { BroadcastingConfig } from './types/config-types.js';
|
|
3
3
|
export type {
|
|
4
4
|
ServerConfig,
|
|
5
5
|
} from 'ts-broadcasting';
|
package/dist/build-id.d.ts
CHANGED
package/dist/build-views.d.ts
CHANGED
package/dist/build.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuildMode } from './build-mode-detector';
|
|
2
|
-
import type { ProductionBuildOptions, ProductionBuildResult } from './production-builder';
|
|
3
|
-
import type { SSGConfig, SSGResult } from './ssg';
|
|
1
|
+
import type { BuildMode } from './build-mode-detector.js';
|
|
2
|
+
import type { ProductionBuildOptions, ProductionBuildResult } from './production-builder.js';
|
|
3
|
+
import type { SSGConfig, SSGResult } from './ssg.js';
|
|
4
4
|
/**
|
|
5
5
|
* Unified build entry point for stx applications.
|
|
6
6
|
*
|
package/dist/builtins/attrs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResolvedProps } from '../component-registry';
|
|
1
|
+
import type { ResolvedProps } from '../component-registry.js';
|
|
2
2
|
/** Whether an attribute should be visible on a component's DOM root. */
|
|
3
3
|
export declare function isFallthroughAttribute(name: string): boolean;
|
|
4
4
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
3
2
|
/** @defaultValue `{ sm: '16rem', md: '24rem', lg: '32rem', xl: '40rem' }` */
|
|
4
3
|
declare const SIZE_WIDTHS: Record<string, string>;
|
|
5
4
|
export declare const StxDrawerBuiltin: BuiltinComponentDef;
|
|
5
|
+
export {};
|
package/dist/builtins/icon.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
2
2
|
/**
|
|
3
3
|
* Resolve the on-disk path of an icon collection JSON.
|
|
4
4
|
*
|
|
@@ -14,14 +14,6 @@ import type { BuiltinComponentDef } from '../component-registry';
|
|
|
14
14
|
* node_modules in apps that vendor there).
|
|
15
15
|
*/
|
|
16
16
|
export declare function resolveCollectionPath(prefix: string): string | null;
|
|
17
|
-
/**
|
|
18
|
-
* Load an icon collection synchronously. Used inside `render()` so the
|
|
19
|
-
* first hit for a collection doesn't return a placeholder comment that
|
|
20
|
-
* the user then sees as a missing icon — the JSON is small enough
|
|
21
|
-
* (~550KB for lucide, parses in <10ms) that a blocking read on cache
|
|
22
|
-
* miss is the right trade-off for correct SSR output.
|
|
23
|
-
*/
|
|
24
|
-
declare function loadCollectionSync(prefix: string): IconCollection | null;
|
|
25
17
|
/**
|
|
26
18
|
* Find an icon by the name a template wrote, following aliases.
|
|
27
19
|
*
|
|
@@ -29,10 +21,6 @@ declare function loadCollectionSync(prefix: string): IconCollection | null;
|
|
|
29
21
|
* default otherwise, which is the order Iconify itself resolves in.
|
|
30
22
|
*/
|
|
31
23
|
export declare function lookupIcon(collection: IconCollection, name: string): ResolvedIcon | null;
|
|
32
|
-
/**
|
|
33
|
-
* Resolve a prop value from any binding category.
|
|
34
|
-
*/
|
|
35
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
36
24
|
/**
|
|
37
25
|
* Pre-load icon collections so they're available synchronously during render.
|
|
38
26
|
* Call this before template processing starts.
|
|
@@ -75,3 +63,4 @@ declare interface IconCollection {
|
|
|
75
63
|
}
|
|
76
64
|
/** An icon ready to draw: body, and the viewBox it is drawn in. */
|
|
77
65
|
declare interface ResolvedIcon { body: string, width: number, height: number }
|
|
66
|
+
export {};
|
|
@@ -20,7 +20,7 @@ export declare function imageWorkerSlots(cores?: unknown): number;
|
|
|
20
20
|
* install the bundle was built from is still on disk, though, so the entry is
|
|
21
21
|
* resolved from the app's root.
|
|
22
22
|
*/
|
|
23
|
-
export declare function imageWorkerEntry(root?:
|
|
23
|
+
export declare function imageWorkerEntry(root?: ReturnType<typeof process.cwd>): string | undefined;
|
|
24
24
|
/** Forget that the fallback warning was printed. For tests. */
|
|
25
25
|
export declare function resetImageWorkerWarning(): void;
|
|
26
26
|
/**
|
|
@@ -36,4 +36,4 @@ export declare function runImageTask<T>(task: ImageTask, args: unknown): Promise
|
|
|
36
36
|
export declare const WORKER_UNAVAILABLE: unique symbol;
|
|
37
37
|
/** Tasks the worker entry knows how to run. */
|
|
38
38
|
export type ImageTask = 'delivery' | 'placeholders';
|
|
39
|
-
export { isInstalledEntry } from '../installed-entry';
|
|
39
|
+
export { isInstalledEntry } from '../installed-entry.js';
|
package/dist/builtins/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IconBuiltin } from './icon';
|
|
2
|
-
import { SafeImageBuiltin } from './safe-image';
|
|
3
|
-
import { StxDrawerBuiltin } from './drawer';
|
|
4
|
-
import { StxImageBuiltin } from './stx-image';
|
|
5
|
-
import { StxLinkBuiltin } from './stx-link';
|
|
6
|
-
import { StxLoadingIndicatorBuiltin } from './stx-loading-indicator';
|
|
7
|
-
import { StxModalBuiltin } from './modal';
|
|
8
|
-
import { StxToastBuiltin } from './toast';
|
|
9
|
-
import { SuspenseBuiltin } from './suspense';
|
|
10
|
-
import { TransitionGroupBuiltin } from './transition-group';
|
|
11
|
-
import type { ComponentRegistry } from '../component-registry';
|
|
1
|
+
import { IconBuiltin } from './icon.js';
|
|
2
|
+
import { SafeImageBuiltin } from './safe-image.js';
|
|
3
|
+
import { StxDrawerBuiltin } from './drawer.js';
|
|
4
|
+
import { StxImageBuiltin } from './stx-image.js';
|
|
5
|
+
import { StxLinkBuiltin } from './stx-link.js';
|
|
6
|
+
import { StxLoadingIndicatorBuiltin } from './stx-loading-indicator.js';
|
|
7
|
+
import { StxModalBuiltin } from './modal.js';
|
|
8
|
+
import { StxToastBuiltin } from './toast.js';
|
|
9
|
+
import { SuspenseBuiltin } from './suspense.js';
|
|
10
|
+
import { TransitionGroupBuiltin } from './transition-group.js';
|
|
11
|
+
import type { ComponentRegistry } from '../component-registry.js';
|
|
12
12
|
/**
|
|
13
13
|
* Register all builtin components with the supplied registry, or with the
|
|
14
14
|
* package singleton when no target is supplied.
|
|
@@ -23,14 +23,14 @@ export declare function registerBuiltins(target?: ComponentRegistry): void;
|
|
|
23
23
|
*
|
|
24
24
|
* @module builtins
|
|
25
25
|
*/
|
|
26
|
-
export { StxLinkBuiltin } from './stx-link';
|
|
27
|
-
export { StxImageBuiltin } from './stx-image';
|
|
28
|
-
export { SafeImageBuiltin } from './safe-image';
|
|
29
|
-
export { StxLoadingIndicatorBuiltin } from './stx-loading-indicator';
|
|
30
|
-
export { StxToastBuiltin } from './toast';
|
|
31
|
-
export { StxModalBuiltin } from './modal';
|
|
32
|
-
export { StxDrawerBuiltin } from './drawer';
|
|
33
|
-
export { IconBuiltin, preloadIconCollection } from './icon';
|
|
34
|
-
export { getTooltipRuntime } from './tooltip';
|
|
35
|
-
export { SuspenseBuiltin } from './suspense';
|
|
36
|
-
export { TransitionGroupBuiltin } from './transition-group';
|
|
26
|
+
export { StxLinkBuiltin } from './stx-link.js';
|
|
27
|
+
export { StxImageBuiltin } from './stx-image.js';
|
|
28
|
+
export { SafeImageBuiltin } from './safe-image.js';
|
|
29
|
+
export { StxLoadingIndicatorBuiltin } from './stx-loading-indicator.js';
|
|
30
|
+
export { StxToastBuiltin } from './toast.js';
|
|
31
|
+
export { StxModalBuiltin } from './modal.js';
|
|
32
|
+
export { StxDrawerBuiltin } from './drawer.js';
|
|
33
|
+
export { IconBuiltin, preloadIconCollection } from './icon.js';
|
|
34
|
+
export { getTooltipRuntime } from './tooltip.js';
|
|
35
|
+
export { SuspenseBuiltin } from './suspense.js';
|
|
36
|
+
export { TransitionGroupBuiltin } from './transition-group.js';
|
package/dist/builtins/modal.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
3
2
|
/**
|
|
4
3
|
* @defaultValue
|
|
5
4
|
* ```ts
|
|
@@ -14,3 +13,4 @@ declare function resolveProp(props: ResolvedProps, key: string): string | undefi
|
|
|
14
13
|
*/
|
|
15
14
|
declare const SIZE_WIDTHS: Record<string, string>;
|
|
16
15
|
export declare const StxModalBuiltin: BuiltinComponentDef;
|
|
16
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
3
2
|
declare const DEFAULT_FALLBACK: '/images/safe-image-default.svg';
|
|
4
3
|
export declare const SafeImageBuiltin: BuiltinComponentDef;
|
|
4
|
+
export {};
|
|
@@ -1,49 +1,8 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
3
|
-
declare function resolveBoolProp(props: ResolvedProps, key: string, defaultVal?: boolean): boolean;
|
|
4
|
-
/**
|
|
5
|
-
* Parse sizes prop: "sm:100vw md:50vw lg:33vw" → proper sizes attribute
|
|
6
|
-
* Also accepts raw sizes string: "(max-width: 768px) 100vw, 50vw"
|
|
7
|
-
*/
|
|
8
|
-
declare function parseSizes(sizesStr: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Generate srcset from widths: "/img.jpg 320w, /img.jpg 640w, ..."
|
|
11
|
-
* For local images, just generates width descriptors.
|
|
12
|
-
* For CDN providers, generates resized URLs.
|
|
13
|
-
*/
|
|
14
|
-
declare function generateSrcset(src: string, widths: number[], provider?: string, format?: string): string;
|
|
15
|
-
/**
|
|
16
|
-
* Generate density srcset: "/img.jpg 1x, /img@2x.jpg 2x"
|
|
17
|
-
*/
|
|
18
|
-
declare function generateDensitySrcset(src: string, densities: number[], width: number | undefined, provider?: string, format?: string): string;
|
|
19
|
-
/**
|
|
20
|
-
* Transform src URL based on provider.
|
|
21
|
-
* For local images, returns as-is (optimization happens at build time via stx's image pipeline).
|
|
22
|
-
* For CDN providers, generates the appropriate URL.
|
|
23
|
-
*/
|
|
24
|
-
declare function transformSrc(src: string, width?: number, height?: number, provider?: string, format?: string): string;
|
|
25
|
-
/**
|
|
26
|
-
* The `onload` handler that takes a placeholder away once the image is there.
|
|
27
|
-
*
|
|
28
|
-
* Only the longhands the placeholder set are cleared, so a background the
|
|
29
|
-
* author wrote into `style` for their own reasons survives. An inline handler
|
|
30
|
-
* rather than a listener for the same reason `<SafeImage>` uses one: the
|
|
31
|
-
* parser attaches it with the element, before the request goes out, so an
|
|
32
|
-
* image that is already cached (or decoded before any script runs) still
|
|
33
|
-
* fires it. A listener added at hydration misses exactly those.
|
|
34
|
-
*
|
|
35
|
-
* Opaque images covered their placeholder anyway, but not every image fills
|
|
36
|
-
* its box (`object-fit: contain`, a filter, a rounded frame), and a
|
|
37
|
-
* placeholder that outlives its image is simply wrong.
|
|
38
|
-
*/
|
|
39
|
-
declare function placeholderCleanup(properties: string[]): string;
|
|
40
|
-
/**
|
|
41
|
-
* Generate a tiny SVG placeholder for blur-up effect
|
|
42
|
-
*/
|
|
43
|
-
declare function generateBlurPlaceholder(width: number, height: number, color?: string): string;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
44
2
|
/**
|
|
45
3
|
* Default widths for srcset generation
|
|
46
4
|
* @defaultValue `[320, 640, 768, 1024, 1280, 1536, 1920]`
|
|
47
5
|
*/
|
|
48
6
|
declare const DEFAULT_SRCSET_WIDTHS: number[];
|
|
49
7
|
export declare const StxImageBuiltin: BuiltinComponentDef;
|
|
8
|
+
export {};
|
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
/**
|
|
3
|
-
* Escape a string for safe use inside an HTML attribute value.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Resolve the `to` prop from any binding category.
|
|
7
|
-
* Returns an object indicating whether the value is a static string
|
|
8
|
-
* or a client-reactive expression.
|
|
9
|
-
*/
|
|
10
|
-
declare function resolveTo(props: ResolvedProps): { value: string, reactive: boolean };
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
11
2
|
export declare const StxLinkBuiltin: BuiltinComponentDef;
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
/**
|
|
3
|
-
* Sanitize a CSS value to prevent injection (strips semicolons, braces, url()).
|
|
4
|
-
*/
|
|
5
|
-
declare function sanitizeCss(value: string): string;
|
|
6
|
-
/**
|
|
7
|
-
* Resolve a string prop from static or server-dynamic bindings.
|
|
8
|
-
*/
|
|
9
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
10
|
-
/**
|
|
11
|
-
* Resolve a numeric prop, returning the default if not provided or not a valid number.
|
|
12
|
-
*/
|
|
13
|
-
declare function resolveNumericProp(props: ResolvedProps, key: string, defaultValue: number): number;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
14
2
|
export declare const StxLoadingIndicatorBuiltin: BuiltinComponentDef;
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
/** Resolve a string prop from static or server-dynamic bindings. */
|
|
3
|
-
declare function resolveProp(props: ResolvedProps, ...keys: string[]): string | undefined;
|
|
4
|
-
/**
|
|
5
|
-
* Extract a `slot="name"` / `<template slot="name">` region from slot content,
|
|
6
|
-
* returning the region's inner HTML and the content with that region removed.
|
|
7
|
-
*/
|
|
8
|
-
declare function extractSlot(content: string, name: string): { region: string | null, rest: string };
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
9
2
|
export declare const SuspenseBuiltin: BuiltinComponentDef;
|
package/dist/builtins/toast.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, key: string): string | undefined;
|
|
3
|
-
declare function resolveNumericProp(props: ResolvedProps, key: string, defaultValue: number): number;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
4
2
|
/**
|
|
5
3
|
* @defaultValue
|
|
6
4
|
* ```ts
|
|
@@ -16,3 +14,4 @@ declare function resolveNumericProp(props: ResolvedProps, key: string, defaultVa
|
|
|
16
14
|
*/
|
|
17
15
|
declare const POSITION_STYLES: Record<string, string>;
|
|
18
16
|
export declare const StxToastBuiltin: BuiltinComponentDef;
|
|
17
|
+
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { BuiltinComponentDef } from '../component-registry';
|
|
2
|
-
declare function resolveProp(props: ResolvedProps, ...keys: string[]): string | undefined;
|
|
1
|
+
import type { BuiltinComponentDef } from '../component-registry.js';
|
|
3
2
|
export declare const TransitionGroupBuiltin: BuiltinComponentDef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { collectBundleStats, formatBytes, parseSize, type CollectorOptions } from './collector';
|
|
2
|
-
import { generateReport, analyzeBundle, type ReportOptions } from './report';
|
|
3
|
-
import { generateTreemap, openInBrowser, type TreemapOptions } from './treemap';
|
|
1
|
+
import { collectBundleStats, formatBytes, parseSize, type CollectorOptions } from './collector.js';
|
|
2
|
+
import { generateReport, analyzeBundle, type ReportOptions } from './report.js';
|
|
3
|
+
import { generateTreemap, openInBrowser, type TreemapOptions } from './treemap.js';
|
|
4
4
|
/**
|
|
5
5
|
* Analyze a bundle directory and generate a report
|
|
6
6
|
*/
|
|
@@ -75,7 +75,7 @@ export {
|
|
|
75
75
|
type DuplicateModule,
|
|
76
76
|
type BundleStats,
|
|
77
77
|
type CollectorOptions,
|
|
78
|
-
} from './collector';
|
|
78
|
+
} from './collector.js';
|
|
79
79
|
// ============================================================================
|
|
80
80
|
// Report Exports
|
|
81
81
|
// ============================================================================
|
|
@@ -87,7 +87,7 @@ export {
|
|
|
87
87
|
type AnalysisResult,
|
|
88
88
|
type AnalysisIssue,
|
|
89
89
|
type Recommendation,
|
|
90
|
-
} from './report';
|
|
90
|
+
} from './report.js';
|
|
91
91
|
// ============================================================================
|
|
92
92
|
// Treemap Exports
|
|
93
93
|
// ============================================================================
|
|
@@ -95,4 +95,4 @@ export {
|
|
|
95
95
|
generateTreemap,
|
|
96
96
|
openInBrowser,
|
|
97
97
|
type TreemapOptions,
|
|
98
|
-
} from './treemap';
|
|
98
|
+
} from './treemap.js';
|
package/dist/caching.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cacheEngineFingerprint } from './engine-fingerprint';
|
|
2
|
-
import type { StxOptions } from './types';
|
|
1
|
+
import { cacheEngineFingerprint } from './engine-fingerprint.js';
|
|
2
|
+
import type { StxOptions } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Read a file with mtime-based caching.
|
|
5
5
|
* Returns cached content if file hasn't been modified since last read.
|
|
@@ -94,8 +94,8 @@ export declare interface ServeClientAsset {
|
|
|
94
94
|
}
|
|
95
95
|
/** The two runtime generators caching depends on (subset of `./signals`). */
|
|
96
96
|
declare type SignalsGenerators = Pick<
|
|
97
|
-
typeof import('./signals'),
|
|
97
|
+
typeof import('./signals.js'),
|
|
98
98
|
'generateSignalsRuntime' | 'generateSignalsRuntimeDev'
|
|
99
99
|
>;
|
|
100
100
|
export type ServeClientAssetKind = 'runtime' | 'router';
|
|
101
|
-
export { cacheEngineFingerprint } from './engine-fingerprint';
|
|
101
|
+
export { cacheEngineFingerprint } from './engine-fingerprint.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{Ge,se,rc}from"./chunk-t74qb5ej.js";import v from"fs";import g from"path";import V from"crypto";var ee=[320,640,768,1024,1280,1536,1920],te=["webp","jpeg"],ne=80,T=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],U={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},I=null,M=!1;async function d(){if(M)return I;M=!0;try{let t=await import("sharp");return I=t.default||t,I}catch{return null}}async function jn(){return await d()!==null}async function he(){return!0}async function $e(t,e={}){let{widths:a=ee,formats:n=te,quality:r=ne,fit:m="cover",placeholder:l="none",outputDir:o=".stx/images",baseUrl:c="/images"}=e,i,h;if(typeof t==="string"){if(h=t,!await Bun.file(t).exists())throw new Zr(`Image not found: ${t}`,"NOT_FOUND");i=await Bun.file(t).arrayBuffer().then((s)=>Buffer.from(s))}else h="buffer-input",i=t;let b=V.createHash("sha256").update(i).digest("hex").slice(0,12),j=await Yr(i),{width:u,height:x}=j,F=u/x;await v.promises.mkdir(o,{recursive:!0});let B=[],A=g.basename(h,g.extname(h)),f=a.filter((s)=>s<=u);if(!f.includes(u)&&u<=Math.max(...a))f.push(u);f.sort((s,p)=>s-p);for(let s of f){let p=Math.round(s/F);for(let w of n){let S=`${A}-${s}w-${b}.${w}`,P=g.join(o,S),q=`${c}/${S}`,E=await
|
|
3
|
-
export{ee,te,ne,jn,he,$e,Yr,
|
|
2
|
+
import{Ge,se,rc}from"./chunk-t74qb5ej.js";import v from"fs";import g from"path";import V from"crypto";var ee=[320,640,768,1024,1280,1536,1920],te=["webp","jpeg"],ne=80,T=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],U={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},I=null,M=!1;async function d(){if(M)return I;M=!0;try{let t=await import("sharp");return I=t.default||t,I}catch{return null}}async function jn(){return await d()!==null}async function he(){return!0}async function $e(t,e={}){let{widths:a=ee,formats:n=te,quality:r=ne,fit:m="cover",placeholder:l="none",outputDir:o=".stx/images",baseUrl:c="/images"}=e,i,h;if(typeof t==="string"){if(h=t,!await Bun.file(t).exists())throw new Zr(`Image not found: ${t}`,"NOT_FOUND");i=await Bun.file(t).arrayBuffer().then((s)=>Buffer.from(s))}else h="buffer-input",i=t;let b=V.createHash("sha256").update(i).digest("hex").slice(0,12),j=await Yr(i),{width:u,height:x}=j,F=u/x;await v.promises.mkdir(o,{recursive:!0});let B=[],A=g.basename(h,g.extname(h)),f=a.filter((s)=>s<=u);if(!f.includes(u)&&u<=Math.max(...a))f.push(u);f.sort((s,p)=>s-p);for(let s of f){let p=Math.round(s/F);for(let w of n){let S=`${A}-${s}w-${b}.${w}`,P=g.join(o,S),q=`${c}/${S}`,E=await Zl(i,{width:s,height:p,format:w,quality:r,fit:m});await Bun.write(P,E),B.push({path:P,url:q,width:s,height:p,format:w,size:E.length})}}let y;if(l!=="none")y=await D(i,l);return{src:h,variants:B,placeholder:y,width:u,height:x,aspectRatio:F,hash:b}}async function Yr(t){let e=typeof t==="string"?Buffer.from(await Bun.file(t).arrayBuffer()):t,a=await d();if(a){let r=await a(e).metadata();return{width:r.width||0,height:r.height||0,format:r.format||"unknown",hasAlpha:r.hasAlpha}}return L(e)}function L(t){if(t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71){let e=t.readUInt32BE(16),a=t.readUInt32BE(20);return{width:e,height:a,format:"png",hasAlpha:!0}}if(t[0]===255&&t[1]===216){let e=2;while(e<t.length){if(t[e]!==255)break;let a=t[e+1];if(a>=192&&a<=207&&a!==196&&a!==200&&a!==204){let r=t.readUInt16BE(e+5);return{width:t.readUInt16BE(e+7),height:r,format:"jpeg",hasAlpha:!1}}let n=t.readUInt16BE(e+2);e+=2+n}}if(t.toString("utf8",0,4)==="RIFF"&&t.toString("utf8",8,12)==="WEBP"){let e=t.toString("utf8",12,16);if(e==="VP8 "){let a=t.readUInt16LE(26)&16383,n=t.readUInt16LE(28)&16383;return{width:a,height:n,format:"webp",hasAlpha:!1}}if(e==="VP8L"){let a=t.readUInt32LE(21),n=(a&16383)+1,r=(a>>14&16383)+1;return{width:n,height:r,format:"webp",hasAlpha:!0}}}if(t.toString("utf8",0,3)==="GIF"){let e=t.readUInt16LE(6),a=t.readUInt16LE(8);return{width:e,height:a,format:"gif",hasAlpha:!0}}throw new Zr("Unable to parse image dimensions","PARSE_ERROR")}async function Zl(t,e){let a=await d();if(a){let r=a(t).resize(e.width,e.height,{fit:e.fit});switch(e.format){case"webp":r=r.webp({quality:e.quality});break;case"avif":r=r.avif({quality:e.quality});break;case"jpeg":r=r.jpeg({quality:e.quality});break;case"png":r=r.png({quality:e.quality});break}return r.toBuffer()}let{processImage:n}=await import("ts-images");return await rc("img",async(r)=>{let m=g.join(r,`out.${e.format}`);return await n({input:t,output:m,format:e.format,quality:e.quality,resize:{width:e.width,height:e.height,fit:e.fit}}),Buffer.from(await Bun.file(m).arrayBuffer())})}async function D(t,e){let a=await d();if(e==="blur"&&a){let c=(await a(t).resize(20).blur(10).toBuffer()).toString("base64"),i=await Yr(t);return`data:${U[i.format]||"image/jpeg"};base64,${c}`}if(e==="dominant-color"&&a){let{dominant:o}=await a(t).resize(1,1).toBuffer().then(async(c)=>{let i=await a(c).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${o.r}, ${o.g}, ${o.b})`}let{generatePlaceholder:n}=await import("ts-images"),r=await Yr(t),m=Ge("ph"),l=g.join(m,`in.${r.format==="unknown"?"bin":r.format}`);try{await Bun.write(l,t);let o=e==="blur"?"blur":e==="thumbhash"?"thumbhash":"dominant-color",i=await n(l,{strategy:o,width:o==="thumbhash"?void 0:32});if(e==="dominant-color"&&i.dominantColor)return i.dominantColor;if(i.dataURL)return i.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{se(m)}}function ht(t,e){return(e?t.filter((n)=>n.format===e):t).sort((n,r)=>n.width-r.width).map((n)=>`${n.url} ${n.width}w`).join(", ")}function Yt(t){if(!t||Object.keys(t).length===0)return"100vw";return Object.entries(t).sort((a,n)=>{let r=Number.parseInt(a[0].replace(/\D/g,""))||0;return(Number.parseInt(n[0].replace(/\D/g,""))||0)-r}).map(([a,n])=>`(max-width: ${a}) ${n}`).join(", ")+", 100vw"}function Bn(t){let e=t.filter((n)=>n.format==="jpeg");if(e.length===0)return t[Math.floor(t.length/2)];let a=e.sort((n,r)=>n.width-r.width);return a[Math.floor(a.length/2)]}function Fn(t){let e=new Map;for(let a of t){let n=e.get(a.format)||[];n.push(a),e.set(a.format,n)}return e}function zn(t){let e=g.extname(t).toLowerCase();return T.includes(e)}function re(t){return U[t]||"application/octet-stream"}function Hn(t){return t.reduce((e,a)=>e+a.size,0)}function Vn(t){if(t<1024)return`${t} B`;if(t<1048576)return`${(t/1024).toFixed(1)} KB`;return`${(t/1048576).toFixed(2)} MB`}class Zr extends Error{code;constructor(t,e){super(t);this.name="ImageProcessingError",this.code=e}}
|
|
3
|
+
export{ee,te,ne,jn,he,$e,Yr,Zl,ht,Yt,Bn,Fn,zn,re,Hn,Vn,Zr};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{E}from"./chunk-
|
|
3
|
-
`)}catch{return""}})}function
|
|
4
|
-
`)}catch{return""}})}function
|
|
2
|
+
import{E}from"./chunk-8cg88x7m.js";import{ue}from"./chunk-csgfws3j.js";function g(e,t){let r={};for(let n of e)r[n]=ue(t(n));return new Proxy({},{get:(n,a)=>r[a]?.(),set:(n,a,o)=>{if(r[a])r[a].set(o);else r[a]=ue(o);return!0},has:(n,a)=>(a in r),deleteProperty:(n,a)=>(delete r[a],!0),ownKeys:()=>Reflect.ownKeys(r),getOwnPropertyDescriptor:(n,a)=>(a in r)?{enumerable:!0,configurable:!0,writable:!0,value:r[a]()}:void 0})}function v(e,t){let r={};for(let n of t)r[n]=e[n];return r}function _a(e,t){let r=Object.keys(e),n=g(r,(i)=>t?.[i]??e[i].getDefaultValue()),a=g(r,()=>[]),o=g(r,()=>!1),c=g(r,()=>!1),f=g(r,()=>!1),s=ue(!1);async function u(i){f[i]=!0;let d=await e[i].validate(n[i],n);return a[i]=d,f[i]=!1,d.length===0}async function l(){s.set(!0);let i=await Promise.all(r.map(u));return s.set(!1),i.every(Boolean)}function m(){for(let i of r)n[i]=t?.[i]??e[i].getDefaultValue(),a[i]=[],o[i]=!1,c[i]=!1}function h(i){for(let d of r)if(d in i)n[d]=i[d],c[d]=!0}function b(i,d){n[i]=d,c[i]=!0}function y(i,d=!0){if(o[i]=d,d)u(i)}function p(i){return{value:n[i],errors:a[i],touched:o[i],dirty:c[i],valid:a[i].length===0,validating:f[i]}}function V(i){return async(d)=>{d?.preventDefault?.();for(let w of r)o[w]=!0;if(await l())await i(v(n,r))}}return{values:n,errors:a,touched:o,dirty:c,get isValid(){return r.every((i)=>a[i].length===0)},get isValidating(){return s()||r.some((i)=>f[i])},get isDirty(){return r.some((i)=>c[i])},validate:l,validateField:u,reset:m,setValues:h,setFieldValue:b,setFieldTouched:y,getFieldState:p,handleSubmit:V}}var gu=_a;class Un{rules=[];defaultValue="";addRule(e){let t=new Un;return t.rules=[...this.rules,e],t.defaultValue=this.defaultValue,t}required(e="This field is required"){return this.addRule({name:"required",message:e,validate:(t)=>{if(t===null||t===void 0)return e;if(typeof t==="string"&&t.trim()==="")return e;if(Array.isArray(t)&&t.length===0)return e;return!0}})}email(e="Please enter a valid email"){return this.addRule({name:"email",message:e,validate:(t)=>{if(!t)return!0;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t))||e}})}url(e="Please enter a valid URL"){return this.addRule({name:"url",message:e,validate:(t)=>{if(!t)return!0;try{return new URL(String(t)),!0}catch{return e}}})}min(e,t){let r=t||`Must be at least ${e} characters`;return this.addRule({name:"min",message:r,validate:(n)=>{if(!n)return!0;return String(n).length>=e||r}})}max(e,t){let r=t||`Must be no more than ${e} characters`;return this.addRule({name:"max",message:r,validate:(n)=>{if(!n)return!0;return String(n).length<=e||r}})}length(e,t,r){let n=r||`Must be between ${e} and ${t} characters`;return this.addRule({name:"length",message:n,validate:(a)=>{if(!a)return!0;let o=String(a).length;return o>=e&&o<=t||n}})}pattern(e,t="Invalid format"){return this.addRule({name:"pattern",message:t,validate:(r)=>{if(!r)return!0;return e.test(String(r))||t}})}hasUppercase(e="Must contain an uppercase letter"){return this.pattern(/[A-Z]/,e)}hasLowercase(e="Must contain a lowercase letter"){return this.pattern(/[a-z]/,e)}hasNumber(e="Must contain a number"){return this.pattern(/\d/,e)}hasSpecial(e="Must contain a special character"){return this.pattern(/[!@#$%^&*(),.?":{}|<>]/,e)}alphanumeric(e="Only letters and numbers allowed"){return this.pattern(/^[a-zA-Z0-9]+$/,e)}startsWithLetter(e="Must start with a letter"){return this.pattern(/^[a-zA-Z]/,e)}noSpaces(e="Spaces are not allowed"){return this.addRule({name:"noSpaces",message:e,validate:(t)=>{if(!t)return!0;return!String(t).includes(" ")||e}})}number(e="Must be a number"){let t=this.addRule({name:"number",message:e,validate:(r)=>{if(!r&&r!==0)return!0;return!Number.isNaN(Number(r))||e}});return t.defaultValue=0,t}integer(e="Must be a whole number"){return this.addRule({name:"integer",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number.isInteger(Number(t))||e}})}positive(e="Must be a positive number"){return this.addRule({name:"positive",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)>0||e}})}negative(e="Must be a negative number"){return this.addRule({name:"negative",message:e,validate:(t)=>{if(!t&&t!==0)return!0;return Number(t)<0||e}})}minValue(e,t){let r=t||`Must be at least ${e}`;return this.addRule({name:"minValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)>=e||r}})}maxValue(e,t){let r=t||`Must be no more than ${e}`;return this.addRule({name:"maxValue",message:r,validate:(n)=>{if(!n&&n!==0)return!0;return Number(n)<=e||r}})}between(e,t,r){let n=r||`Must be between ${e} and ${t}`;return this.addRule({name:"between",message:n,validate:(a)=>{if(!a&&a!==0)return!0;let o=Number(a);return o>=e&&o<=t||n}})}matches(e,t){let r=t||`Must match ${e}`;return this.addRule({name:"matches",message:r,validate:(n,a)=>{if(!a)return!0;return n===a[e]||r}})}oneOf(e,t){let r=t||`Must be one of: ${e.join(", ")}`;return this.addRule({name:"oneOf",message:r,validate:(n)=>{if(!n)return!0;return e.includes(n)||r}})}notOneOf(e,t){let r=t||`Cannot be one of: ${e.join(", ")}`;return this.addRule({name:"notOneOf",message:r,validate:(n)=>{if(!n)return!0;return!e.includes(n)||r}})}date(e="Must be a valid date"){return this.addRule({name:"date",message:e,validate:(t)=>{if(!t)return!0;let r=new Date(String(t));return!Number.isNaN(r.getTime())||e}})}before(e,t){let r=new Date(e),n=t||`Must be before ${r.toLocaleDateString()}`;return this.addRule({name:"before",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))<r||n}})}after(e,t){let r=new Date(e),n=t||`Must be after ${r.toLocaleDateString()}`;return this.addRule({name:"after",message:n,validate:(a)=>{if(!a)return!0;return new Date(String(a))>r||n}})}custom(e,t="Invalid value"){return this.addRule({name:"custom",message:t,validate:e})}async(e,t="Invalid value"){return this.addRule({name:"async",message:t,async:!0,validate:e})}when(e,t){let r=new Un;r.rules=[...this.rules],r.defaultValue=this.defaultValue;for(let n of t.getRules())r.rules.push({...n,validate:(a,o)=>{if(!e(a,o||{}))return!0;return n.validate(a,o)}});return r}getRules(){return this.rules}getDefaultValue(){return this.defaultValue}default(e){let t=new Un;return t.rules=[...this.rules],t.defaultValue=e,t}async validate(e,t){let r=[];for(let n of this.rules){let a=await n.validate(e,t);if(a!==!0)r.push(a)}return r}validateSync(e,t){let r=[];for(let n of this.rules){if(n.async)continue;let a=n.validate(e,t);if(a!==!0)r.push(a)}return r}}var zm=new Un;function mu(e,t,r){let n=/@error\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderror/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>E(c,{...t,message:l},r)).join(`
|
|
3
|
+
`)}catch{return""}})}function hu(e,t,r){let n=/@errors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@enderrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return u.map((l)=>E(c,{...t,message:l},r)).join(`
|
|
4
|
+
`)}catch{return""}})}function yu(e,t,r){let n=/@hasErrors\s*\(\s*([^)]+)\s*\)([\s\S]*?)@endhasErrors/g;return e.replace(n,(a,o,c)=>{try{let f=o.trim().split("."),s=t;for(let l of f)if(s&&typeof s==="object"&&l in s)s=s[l];else return"";let u=s;if(!u||!Array.isArray(u)||u.length===0)return"";return c}catch{return""}})}function Hm(e,t,r){let n=e;return n=mu(n,t,r),n=hu(n,t,r),n=yu(n,t,r),n}export{_a,gu,Un,zm,mu,hu,yu,Hm};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{fh,So,gh,mh,hh,yh}from"./chunk-nyqvtca1.js";import"./chunk-txdxfjbj.js";import"./chunk-x1w19y3w.js";import"./chunk-hpwtjb4a.js";import"./chunk-trxha300.js";import"./chunk-nz202f97.js";import"./chunk-rbxbgvkf.js";import"./chunk-c54bhqrg.js";import"./chunk-9mzskb69.js";import"./chunk-kvafq9gy.js";import"./chunk-tm8a2b69.js";import"./chunk-j1yjbykm.js";import"./chunk-9r999ees.js";import"./chunk-8cg88x7m.js";import"./chunk-bqxrfagh.js";import"./chunk-v4bqmzj9.js";import"./chunk-5g1jwxny.js";import"./chunk-xppm4cs4.js";import"./chunk-ngnvyqk3.js";export{yh as clearStoreCache,fh as getStoreScript,hh as getStoreScriptFor,mh as pageStoresAll,So as storesRead,gh as storesReadInFiles};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{or,i}from"./chunk-fxt9vwdw.js";import"./chunk-zqpjqcm8.js";import"./chunk-jtpqqxzb.js";import"./chunk-t5q31st4.js";import"./chunk-cf7dk9ev.js";import"./chunk-48z6w533.js";import"./chunk-8g0243g1.js";import"./chunk-qnyh0m22.js";import"./chunk-trxha300.js";import{ve}from"./chunk-nz202f97.js";import"./chunk-rbxbgvkf.js";import"./chunk-m9n3ahsy.js";import"./chunk-c54bhqrg.js";import"./chunk-9mzskb69.js";import"./chunk-kvafq9gy.js";import"./chunk-tm8a2b69.js";import"./chunk-j1yjbykm.js";import"./chunk-9r999ees.js";import{Ne,Ws,qs}from"./chunk-8cg88x7m.js";import"./chunk-bqxrfagh.js";import"./chunk-v4bqmzj9.js";import"./chunk-5g1jwxny.js";import"./chunk-xppm4cs4.js";import"./chunk-ngnvyqk3.js";export{or as buildModulesTag,ve as injectRouterScript,i as processDirectives,Ws as processJsonDirective,qs as processOnceDirective,Ne as validateClientScript};
|