@stacksjs/stx 0.2.852 → 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-6tns3zet.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-kp2g6sj6.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-fkrf2099.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-42hj9jnj.js → chunk-7rtvravz.js} +7 -7
- package/dist/{chunk-hh9hnx1a.js → chunk-7wwq1btb.js} +1 -1
- package/dist/{chunk-pbq1gn94.js → chunk-83d468me.js} +4 -4
- package/dist/{chunk-r53tqxmq.js → chunk-8cg88x7m.js} +39 -39
- package/dist/chunk-8fprfzcn.js +2 -0
- package/dist/{chunk-tn9h4prj.js → chunk-8g0243g1.js} +3 -3
- package/dist/chunk-9h1w4py6.js +2 -0
- package/dist/{chunk-tt3jxdy5.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-818kkhb8.js → chunk-a0ahcd1g.js} +2 -2
- package/dist/chunk-aajezypd.js +2 -0
- package/dist/{chunk-714p8awg.js → chunk-agvm20mz.js} +3 -3
- package/dist/{chunk-3bp76dx5.js → chunk-baxrx1rz.js} +9 -9
- package/dist/{chunk-xndr2dx9.js → chunk-bkefg64w.js} +5 -5
- package/dist/{chunk-n2z4kyba.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-c1dkvqr5.js → chunk-c54bhqrg.js} +39 -39
- package/dist/{chunk-keeetray.js → chunk-c9k0yhyq.js} +2 -2
- package/dist/{chunk-g34tj6ny.js → chunk-cabdpgxg.js} +3 -3
- package/dist/{chunk-e0dgx3ev.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-1pavg6q5.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-d5m6xy9p.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-7x6aqvfe.js → chunk-m9n3ahsy.js} +2 -2
- package/dist/{chunk-1sedjgmj.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-2stgv8kd.js → chunk-n8qd1n8w.js} +3 -3
- package/dist/{chunk-agbkv9ab.js → chunk-ngnvyqk3.js} +2 -2
- package/dist/{chunk-9gzgfj19.js → chunk-nyqvtca1.js} +4 -4
- package/dist/{chunk-te090fxv.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-tgk6bst6.js → chunk-rmeey2xa.js} +4 -4
- package/dist/{chunk-0kaph5qq.js → chunk-rrppkyv0.js} +42 -42
- package/dist/{chunk-whdy7r35.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-w7dks1ev.js → chunk-trxha300.js} +5 -5
- package/dist/{chunk-tbms7m44.js → chunk-txdxfjbj.js} +3 -3
- package/dist/{chunk-m150nmez.js → chunk-vpqgg04q.js} +1 -1
- package/dist/{chunk-02w7kaas.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-sb8vn22f.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-gn6yqcz2.js → chunk-xzdjhjz4.js} +4 -4
- package/dist/{chunk-kd06c90f.js → chunk-ya6f7mt5.js} +4 -4
- package/dist/{chunk-0b7knfwk.js → chunk-zjfp64v7.js} +1 -1
- package/dist/{chunk-cm5kpn54.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 +1 -1
- 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/compact-document.d.ts +3 -5
- package/dist/native/runtime/craft-bridge.d.ts +4 -3
- package/dist/native/runtime/craft.d.ts +1 -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-0dve54ne.js +0 -3
- package/dist/chunk-0g05v7m1.js +0 -2
- package/dist/chunk-14vv64pw.js +0 -2
- package/dist/chunk-1mqyt33c.js +0 -2
- package/dist/chunk-1qdhwjs4.js +0 -2
- package/dist/chunk-332qk8tm.js +0 -3
- package/dist/chunk-3gyq9rjx.js +0 -2
- package/dist/chunk-3w9xhs7k.js +0 -2
- package/dist/chunk-47z5w330.js +0 -2
- package/dist/chunk-4e5wynb4.js +0 -2
- package/dist/chunk-4e6wkjtx.js +0 -2
- package/dist/chunk-4hfh5ety.js +0 -2
- package/dist/chunk-67bn31a3.js +0 -2
- package/dist/chunk-6amqskpv.js +0 -2
- package/dist/chunk-6ra9dqs2.js +0 -2
- package/dist/chunk-7hnt9a2e.js +0 -2
- package/dist/chunk-80bb89fh.js +0 -2
- package/dist/chunk-8f5dy08a.js +0 -2
- package/dist/chunk-8k6cd1e0.js +0 -2
- package/dist/chunk-a69v31q8.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-dqrkteav.js +0 -2
- package/dist/chunk-dx31vsyf.js +0 -2
- package/dist/chunk-epqp6mmn.js +0 -2
- package/dist/chunk-et9fyzf6.js +0 -2
- package/dist/chunk-f4x21pqx.js +0 -2
- package/dist/chunk-fhd8e4mq.js +0 -2
- package/dist/chunk-frhh6jd3.js +0 -2
- package/dist/chunk-ft43rx62.js +0 -2
- package/dist/chunk-g1gqysb4.js +0 -2
- package/dist/chunk-h7rcb74n.js +0 -2
- package/dist/chunk-j3x3e353.js +0 -2
- package/dist/chunk-j415w6dm.js +0 -2
- package/dist/chunk-ja5ghh0f.js +0 -2
- package/dist/chunk-jmjz23rf.js +0 -2
- package/dist/chunk-k1pyzf9e.js +0 -2
- package/dist/chunk-m276y4f3.js +0 -2
- package/dist/chunk-p9sbpbhg.js +0 -2
- package/dist/chunk-pd0wdjqd.js +0 -2
- package/dist/chunk-ptppavv8.js +0 -2
- package/dist/chunk-q2d8x7p1.js +0 -2
- package/dist/chunk-s922rk4n.js +0 -2
- package/dist/chunk-tdtwqydq.js +0 -2
- package/dist/chunk-v4kqxe8a.js +0 -2
- package/dist/chunk-vffwkmt4.js +0 -2
- package/dist/chunk-vqr3hn16.js +0 -2
- package/dist/chunk-x1c1aggq.js +0 -2
- package/dist/chunk-xkvzg640.js +0 -2
- package/dist/chunk-xt7qsgk4.js +0 -2
- package/dist/chunk-ydjy26ch.js +0 -2
- package/dist/chunk-yq12dhnt.js +0 -2
- package/dist/chunk-yx37mvy7.js +0 -2
- package/dist/chunk-z278w3cb.js +0 -2
- package/dist/chunk-z5z6442j.js +0 -2
- package/dist/chunk-znfzh6fm.js +0 -2
|
@@ -68,3 +68,4 @@ export type WebSocketStatus = 'connecting' | 'open' | 'closing' | 'closed';
|
|
|
68
68
|
declare type WebSocketEventType = 'open' | 'message' | 'close' | 'error';
|
|
69
69
|
// eslint-disable-next-line pickier/no-unused-vars
|
|
70
70
|
declare type WebSocketEventCallback = (event: Event | MessageEvent | CloseEvent) => void;
|
|
71
|
+
export {};
|
package/dist/composables.d.ts
CHANGED
|
@@ -212,15 +212,15 @@ export declare function clearInjections(): void;
|
|
|
212
212
|
/**
|
|
213
213
|
* Alias for onMount - matches common naming conventions.
|
|
214
214
|
*/
|
|
215
|
-
export declare const onMounted:
|
|
215
|
+
export declare const onMounted: typeof onMount;
|
|
216
216
|
/**
|
|
217
217
|
* Alias for onDestroy - matches Vue naming.
|
|
218
218
|
*/
|
|
219
|
-
export declare const onUnmounted:
|
|
219
|
+
export declare const onUnmounted: typeof onDestroy;
|
|
220
220
|
/**
|
|
221
221
|
* Alias for onUpdate - matches Vue naming.
|
|
222
222
|
*/
|
|
223
|
-
export declare const onUpdated:
|
|
223
|
+
export declare const onUpdated: typeof onUpdate;
|
|
224
224
|
/** Built-in injection key for theme */
|
|
225
225
|
export declare const ThemeKey: ReturnType<typeof createInjectionKey<{
|
|
226
226
|
mode: 'light' | 'dark'
|
package/dist/config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { loadConfigWithResult } from 'bunfig';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
-
import type { StxConfig, StxOptions } from './types';
|
|
3
|
+
import type { StxConfig, StxOptions } from './types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Resolve `root`, `pagesDir` and the template directories, in place.
|
|
6
6
|
*
|
|
@@ -40,6 +40,22 @@ export declare function resolveStxDirectories(loaded: StxConfig, cwd: string): S
|
|
|
40
40
|
* bundled copy of bunfig has its own error classes.
|
|
41
41
|
*/
|
|
42
42
|
export declare function discoverConfig<T>(options: Parameters<typeof loadConfigWithResult<T>>[0], load?: (options: Parameters<typeof loadConfigWithResult<T>>[0]) => Promise<{ config: T }>): Promise<{ config: T }>;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a package the PROJECT has installed, or throw.
|
|
45
|
+
*
|
|
46
|
+
* `require.resolve` with `paths` is not that question under Bun. When no
|
|
47
|
+
* `node_modules` is found from the project upwards, Bun's auto-install answers
|
|
48
|
+
* from its global install cache instead: whatever copy of the package some
|
|
49
|
+
* earlier install on this machine left there. A project with no install of
|
|
50
|
+
* `@stacksjs/components` therefore got one anyway, at a version nobody chose
|
|
51
|
+
* (0.2.849 on a machine whose apps were all on 0.2.851), and got none at all
|
|
52
|
+
* on a machine with an empty cache -- the same source rendering differently
|
|
53
|
+
* by machine. The native test kit compiles inline screens in a temp folder,
|
|
54
|
+
* so every such test ran against that stale copy.
|
|
55
|
+
*
|
|
56
|
+
* A package in the cache is not installed in the project.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveInstalledPackage(specifier: string, projectDir: string): string;
|
|
43
59
|
/**
|
|
44
60
|
* Load the stx config for a project.
|
|
45
61
|
*
|
|
@@ -97,3 +113,4 @@ export declare interface ConfigValidationResult {
|
|
|
97
113
|
warnings: ConfigValidationError[]
|
|
98
114
|
}
|
|
99
115
|
declare type DirKey = (typeof DIR_KEYS)[number];
|
|
116
|
+
export {};
|
package/dist/config.js
CHANGED
|
@@ -467,6 +467,13 @@ export async function discoverConfig(options, load = loadConfigWithResult) {
|
|
|
467
467
|
throw error;
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
+
const BUN_INSTALL_CACHE_RE = /[\\/]install[\\/]cache[\\/](?:@[^\\/]+[\\/])?[^\\/]+@[^\\/]*@@@\d+[\\/]/;
|
|
471
|
+
export function resolveInstalledPackage(specifier, projectDir) {
|
|
472
|
+
const resolved = require.resolve(specifier, { paths: [projectDir] });
|
|
473
|
+
if (BUN_INSTALL_CACHE_RE.test(resolved))
|
|
474
|
+
throw Error(`${specifier} is not installed in ${projectDir} (found only in Bun's install cache)`);
|
|
475
|
+
return resolved;
|
|
476
|
+
}
|
|
470
477
|
export async function loadStxConfig(cwd) {
|
|
471
478
|
const effectiveCwd = cwd ? path.resolve(cwd) : process.cwd(), snapshot = _layerSnapshots.get(effectiveCwd);
|
|
472
479
|
if (snapshot && snapshot.signature !== layerSignature(snapshot.graph)) {
|
|
@@ -552,7 +559,7 @@ export async function loadStxConfig(cwd) {
|
|
|
552
559
|
if (listed.has(entry) || listed.has(pkg))
|
|
553
560
|
continue;
|
|
554
561
|
try {
|
|
555
|
-
|
|
562
|
+
resolveInstalledPackage(entry, effectiveCwd);
|
|
556
563
|
autoPlugins.push(entry);
|
|
557
564
|
} catch {}
|
|
558
565
|
}
|
|
@@ -564,7 +571,7 @@ export async function loadStxConfig(cwd) {
|
|
|
564
571
|
try {
|
|
565
572
|
let pluginModule, pluginDir;
|
|
566
573
|
try {
|
|
567
|
-
const entry =
|
|
574
|
+
const entry = resolveInstalledPackage(pluginPath, effectiveCwd);
|
|
568
575
|
pluginModule = await import(entry);
|
|
569
576
|
pluginDir = path.dirname(entry);
|
|
570
577
|
} catch {
|
package/dist/craft-compiler.d.ts
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import type { CompiledTemplate } from './craft-ssr';
|
|
1
|
+
import type { CompiledTemplate } from './craft-ssr.js';
|
|
2
2
|
/**
|
|
3
3
|
* Compile stx template to native Craft code
|
|
4
4
|
*/
|
|
5
5
|
export declare function compileToNative(template: string | CompiledTemplate, config?: Partial<CompilerConfig>): Promise<CompiledNativeCode>;
|
|
6
|
-
/**
|
|
7
|
-
* Tree shake unused components
|
|
8
|
-
*/
|
|
9
|
-
declare function treeShake(ir: NativeIRNode, _deps: CompilerDependencyNode[]): NativeIRNode;
|
|
10
6
|
/**
|
|
11
7
|
* Create hot reload server
|
|
12
8
|
*/
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
* Parse @craft-* component directives from stx template
|
|
3
3
|
*/
|
|
4
4
|
export declare function processCraftComponents(content: string, config?: CraftComponentConfig): string;
|
|
5
|
-
declare function renderCraftSidebar(props: Record<string, unknown>, children: string): string;
|
|
6
|
-
declare function renderCraftSidebarSpace(props: Record<string, unknown>, children: string): string;
|
|
7
|
-
declare function renderCraftSidebarSection(props: Record<string, unknown>, children: string): string;
|
|
8
|
-
declare function renderCraftSidebarItem(props: Record<string, unknown>, children: string): string;
|
|
9
5
|
/**
|
|
10
6
|
* Register a custom Craft component
|
|
11
7
|
*/
|
|
@@ -107,7 +103,7 @@ export declare function getCraftComponents(): Record<string, CraftComponentDefin
|
|
|
107
103
|
* fallbackTag: 'dialog',
|
|
108
104
|
* fallbackClasses: 'craft-modal',
|
|
109
105
|
* nativeProps: ['open', 'title', 'closable', 'size'],
|
|
110
|
-
* render: (props, children) =>
|
|
106
|
+
* render: (props, children) => string
|
|
111
107
|
* },
|
|
112
108
|
* tabs: {
|
|
113
109
|
* nativeType: 'craft-tabs',
|
|
@@ -151,7 +147,7 @@ export declare function getCraftComponents(): Record<string, CraftComponentDefin
|
|
|
151
147
|
* fallbackTag: 'div',
|
|
152
148
|
* fallbackClasses: 'craft-alert',
|
|
153
149
|
* nativeProps: ['variant', 'title', 'dismissible'],
|
|
154
|
-
* render: (props, children) =>
|
|
150
|
+
* render: (props, children) => string
|
|
155
151
|
* },
|
|
156
152
|
* toast: {
|
|
157
153
|
* nativeType: 'craft-toast',
|
package/dist/craft-entry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="./stx.d.ts" />
|
|
2
|
-
export * from './craft-bridge';
|
|
3
|
-
export * from './craft-compiler';
|
|
4
|
-
export * from './craft-components';
|
|
5
|
-
export * from './craft-ssr';
|
|
6
|
-
export * from './native-build';
|
|
2
|
+
export * from './craft-bridge.js';
|
|
3
|
+
export * from './craft-compiler.js';
|
|
4
|
+
export * from './craft-components.js';
|
|
5
|
+
export * from './craft-ssr.js';
|
|
6
|
+
export * from './native-build.js';
|
package/dist/craft-entry.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-8cg88x7m.js";import{Eo,Ea,Ta}from"./chunk-csksn1kg.js";import"./chunk-te82sjhy.js";import"./chunk-5g1jwxny.js";import"./chunk-ngnvyqk3.js";import"./chunk-xppm4cs4.js";import"./chunk-v4bqmzj9.js";import"./chunk-bqxrfagh.js";import"./chunk-kvafq9gy.js";import"./chunk-9r999ees.js";import"./chunk-c54bhqrg.js";import"./chunk-j1yjbykm.js";import"./chunk-tm8a2b69.js";import"./chunk-m9n3ahsy.js";import"./chunk-zqpjqcm8.js";import"./chunk-fxt9vwdw.js";import"./chunk-cf7dk9ev.js";import"./chunk-jtpqqxzb.js";import"./chunk-trxha300.js";import"./chunk-8g0243g1.js";import"./chunk-t5q31st4.js";import"./chunk-t74qb5ej.js";import{xu,$a,Th,$h,Ra,To,ns,Aa,Pa,Rh,Ah,Ia,Oa,Na,Ma}from"./chunk-vtzkqsq1.js";import"./chunk-n8qd1n8w.js";import"./chunk-48z6w533.js";import"./chunk-qnyh0m22.js";import"./chunk-nz202f97.js";import"./chunk-rbxbgvkf.js";import"./chunk-9mzskb69.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
|
|
3
3
|
`),scripts:t.scripts.join(`
|
|
4
4
|
`),metadata:{renderTime:0,cacheHit:!0,totalSize:c.html.length,componentCount:t.metadata.componentCount}}}let a;if(n.streaming)a=await H(t.tree,e);else a=h(t.tree,e);let i;if(n.hydrate){let o=j(a,t,e);a=o.html,i=o.data}if(n.minify)a=D(a);if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`;d.set(o,{html:a,timestamp:Date.now()})}let s=performance.now()-r;return{html:a,styles:t.styles.join(`
|
|
5
5
|
`),scripts:t.scripts.join(`
|
|
6
6
|
`),hydrationData:i,metadata:{renderTime:s,cacheHit:!1,totalSize:a.length,componentCount:t.metadata.componentCount}}}function V(t,e){let n=[],r=[],a=[],i=new Map,s=[];return y(t.tree,(o,c)=>{if(o.type==="component"&&o.componentName){if(T(o.componentName))n.push(o.componentName)}if(o.type==="element"&&o.tag){let p=J(o);if(p)s.push(p);if(o.props){for(let[l,f]of Object.entries(o.props))if(l.startsWith("on")&&typeof f==="string"){let g=`handler_${i.size}`;i.set(g,f)}}}if(o.isStatic&&o.type==="element")r.push(b(o));else if(!o.isStatic&&o.type!=="text")a.push(o.tag||o.componentName||"unknown")}),{nativeComponents:n,staticHTML:r,dynamicParts:a,eventHandlers:i,nativeWidgets:s}}function Y(t,e={}){let n=R(t),r=P(n,e),a=new Map,i=[];return y(n.tree,(s)=>{if(s.type==="component"&&s.componentName){if(T(s.componentName)){i.push(s.componentName);let o=`<!--craft:${s.componentName}:${s.hydrationKey||"default"}-->`;a.set(s.hydrationKey||s.componentName,o)}}}),{staticHTML:r,dynamicPlaceholders:a,craftComponents:i}}function M(t){let e={type:"fragment",children:[]},n=e,r=[e],a=t,i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(a.length>0){let s=a.match(/^<(@?[\w-]+)([^>]*)>/);if(s){let[p,l,f]=s,g=z(f),u=l.startsWith("@craft-"),C=u?l:l.toLowerCase(),S={type:u?"component":"element",tag:C,props:g,children:[],componentName:u?C.slice(1):void 0,isStatic:!v(f),hydrationKey:F()};if(n.children=n.children||[],n.children.push(S),!i.has(C)&&!f.endsWith("/"))r.push(S),n=S;a=a.slice(p.length);continue}let o=a.match(/^<\/(@?[\w-]+)>/);if(o){let[p,l]=o,g=l.startsWith("@craft-")?l:l.toLowerCase();while(r.length>1){let u=r.pop();if(n=r[r.length-1],u.tag===g)break}a=a.slice(p.length);continue}let c=a.match(/^[^<]+/);if(c){let p=c[0];if(p.trim()){let l={type:"text",text:p,isStatic:!v(p)};n.children=n.children||[],n.children.push(l)}a=a.slice(p.length);continue}a=a.slice(1)}return e}function z(t){let e={},n=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,r;while((r=n.exec(t))!==null){let[,a,i,s,o]=r,c=i??s??o??!0;e[a]=c}return e}function y(t,e,n=[]){if(e(t,n),t.children)t.children.forEach((r,a)=>{y(r,e,[...n,`${a}`])})}function h(t,e){switch(t.type){case"text":return x(t.text||"",e);case"element":case"component":{let n=t.tag||"div",r=N(t.props||{},e),a=(t.children||[]).map((i)=>h(i,e)).join("");if(!t.children||t.children.length===0){if(["input","br","hr","img","meta","link"].includes(n))return`<${n}${r} />`}return`<${n}${r}>${a}</${n}>`}case"fragment":return(t.children||[]).map((n)=>h(n,e)).join("");case"slot":return`<!--slot:${t.slotName||"default"}-->`;default:return""}}function b(t){if(t.type==="text")return t.text||"";let e=t.tag||"div",n=N(t.props||{},{});return`<${e}${n}></${e}>`}function N(t,e){let n=[];for(let[r,a]of Object.entries(t))if(a===!0)n.push(` ${r}`);else if(a!==!1&&a!==null&&a!==void 0){let i=x(String(a),e);n.push(` ${r}="${k(i)}"`)}return n.join("")}async function H(t,e){return h(t,e)}function P(t,e){let n=[];return y(t.tree,(r)=>{if(r.isStatic)n.push(h(r,e))}),n.join("")}function j(t,e,n){let r={templateId:e.id,context:n,dynamicParts:Array.from(e.dynamicParts.entries())},a=`
|
|
7
7
|
<script data-craft-hydration>
|
|
8
8
|
window.__CRAFT_HYDRATION__ = ${JSON.stringify(r)};
|
|
9
|
-
</script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{
|
|
9
|
+
</script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{xu as CRAFT_BRIDGE_SCRIPT,To as CRAFT_COMPONENTS,Aa as CRAFT_COMPONENT_RUNTIME,ns as CRAFT_COMPONENT_STYLES,Eo as NATIVE_COMPONENTS,Ia as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ea as compileToNative,Ta as createHotReloadServer,Oa as findCraftBinary,$a as generateCraftBridgeScript,V as generateCraftOptimizations,Ma as getAvailableFormats,Na as getAvailableTargets,Ah as getCraftComponents,G as getSSRCacheStats,Ra as injectCraftBridge,Th as isCraftEnvironment,Y as prerenderForCraft,Pa as processCraftComponents,$h as processCraftDirective,Rh as registerCraftComponent,Q as renderSSR};
|
package/dist/craft-ssr.d.ts
CHANGED
package/dist/craft.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"./chunk-
|
|
2
|
+
import"./chunk-8cg88x7m.js";import{Eo,Ea,Ta}from"./chunk-csksn1kg.js";import"./chunk-te82sjhy.js";import"./chunk-5g1jwxny.js";import"./chunk-ngnvyqk3.js";import"./chunk-xppm4cs4.js";import"./chunk-v4bqmzj9.js";import"./chunk-bqxrfagh.js";import"./chunk-kvafq9gy.js";import"./chunk-9r999ees.js";import"./chunk-c54bhqrg.js";import"./chunk-j1yjbykm.js";import"./chunk-tm8a2b69.js";import"./chunk-m9n3ahsy.js";import"./chunk-zqpjqcm8.js";import"./chunk-fxt9vwdw.js";import"./chunk-cf7dk9ev.js";import"./chunk-jtpqqxzb.js";import"./chunk-trxha300.js";import"./chunk-8g0243g1.js";import"./chunk-t5q31st4.js";import"./chunk-t74qb5ej.js";import{xu,$a,Th,$h,Ra,To,ns,Aa,Pa,Rh,Ah,Ia,Oa,Na,Ma}from"./chunk-vtzkqsq1.js";import"./chunk-n8qd1n8w.js";import"./chunk-48z6w533.js";import"./chunk-qnyh0m22.js";import"./chunk-nz202f97.js";import"./chunk-rbxbgvkf.js";import"./chunk-9mzskb69.js";var m=new Map,d=new Map;function R(t,e){let n=e?.id||E(t),r=I(t),a=m.get(n);if(a&&a.hash===r)return a;let i=M(t),s=L(t),o=W(t),c=O(i),{staticParts:p,dynamicParts:l}=A(i),f=_(t),g={id:n,hash:r,tree:i,scripts:s,styles:o,staticParts:p,dynamicParts:l,dependencies:f,metadata:c};return m.set(n,g),g}async function Q(t,e={},n={}){let r=performance.now();if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`,c=d.get(o);if(c&&Date.now()-c.timestamp<(n.cacheTTL||60000))return{html:c.html,styles:t.styles.join(`
|
|
3
3
|
`),scripts:t.scripts.join(`
|
|
4
4
|
`),metadata:{renderTime:0,cacheHit:!0,totalSize:c.html.length,componentCount:t.metadata.componentCount}}}let a;if(n.streaming)a=await H(t.tree,e);else a=h(t.tree,e);let i;if(n.hydrate){let o=j(a,t,e);a=o.html,i=o.data}if(n.minify)a=D(a);if(n.cache){let o=`${t.id}:${JSON.stringify(e)}`;d.set(o,{html:a,timestamp:Date.now()})}let s=performance.now()-r;return{html:a,styles:t.styles.join(`
|
|
5
5
|
`),scripts:t.scripts.join(`
|
|
6
6
|
`),hydrationData:i,metadata:{renderTime:s,cacheHit:!1,totalSize:a.length,componentCount:t.metadata.componentCount}}}function V(t,e){let n=[],r=[],a=[],i=new Map,s=[];return y(t.tree,(o,c)=>{if(o.type==="component"&&o.componentName){if(T(o.componentName))n.push(o.componentName)}if(o.type==="element"&&o.tag){let p=J(o);if(p)s.push(p);if(o.props){for(let[l,f]of Object.entries(o.props))if(l.startsWith("on")&&typeof f==="string"){let g=`handler_${i.size}`;i.set(g,f)}}}if(o.isStatic&&o.type==="element")r.push(b(o));else if(!o.isStatic&&o.type!=="text")a.push(o.tag||o.componentName||"unknown")}),{nativeComponents:n,staticHTML:r,dynamicParts:a,eventHandlers:i,nativeWidgets:s}}function Y(t,e={}){let n=R(t),r=P(n,e),a=new Map,i=[];return y(n.tree,(s)=>{if(s.type==="component"&&s.componentName){if(T(s.componentName)){i.push(s.componentName);let o=`<!--craft:${s.componentName}:${s.hydrationKey||"default"}-->`;a.set(s.hydrationKey||s.componentName,o)}}}),{staticHTML:r,dynamicPlaceholders:a,craftComponents:i}}function M(t){let e={type:"fragment",children:[]},n=e,r=[e],a=t,i=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);while(a.length>0){let s=a.match(/^<(@?[\w-]+)([^>]*)>/);if(s){let[p,l,f]=s,g=z(f),u=l.startsWith("@craft-"),C=u?l:l.toLowerCase(),S={type:u?"component":"element",tag:C,props:g,children:[],componentName:u?C.slice(1):void 0,isStatic:!v(f),hydrationKey:F()};if(n.children=n.children||[],n.children.push(S),!i.has(C)&&!f.endsWith("/"))r.push(S),n=S;a=a.slice(p.length);continue}let o=a.match(/^<\/(@?[\w-]+)>/);if(o){let[p,l]=o,g=l.startsWith("@craft-")?l:l.toLowerCase();while(r.length>1){let u=r.pop();if(n=r[r.length-1],u.tag===g)break}a=a.slice(p.length);continue}let c=a.match(/^[^<]+/);if(c){let p=c[0];if(p.trim()){let l={type:"text",text:p,isStatic:!v(p)};n.children=n.children||[],n.children.push(l)}a=a.slice(p.length);continue}a=a.slice(1)}return e}function z(t){let e={},n=/([\w-:@]+)(?:=(?:"([^"]*)"|'([^']*)'|(\S+)))?/g,r;while((r=n.exec(t))!==null){let[,a,i,s,o]=r,c=i??s??o??!0;e[a]=c}return e}function y(t,e,n=[]){if(e(t,n),t.children)t.children.forEach((r,a)=>{y(r,e,[...n,`${a}`])})}function h(t,e){switch(t.type){case"text":return x(t.text||"",e);case"element":case"component":{let n=t.tag||"div",r=N(t.props||{},e),a=(t.children||[]).map((i)=>h(i,e)).join("");if(!t.children||t.children.length===0){if(["input","br","hr","img","meta","link"].includes(n))return`<${n}${r} />`}return`<${n}${r}>${a}</${n}>`}case"fragment":return(t.children||[]).map((n)=>h(n,e)).join("");case"slot":return`<!--slot:${t.slotName||"default"}-->`;default:return""}}function b(t){if(t.type==="text")return t.text||"";let e=t.tag||"div",n=N(t.props||{},{});return`<${e}${n}></${e}>`}function N(t,e){let n=[];for(let[r,a]of Object.entries(t))if(a===!0)n.push(` ${r}`);else if(a!==!1&&a!==null&&a!==void 0){let i=x(String(a),e);n.push(` ${r}="${k(i)}"`)}return n.join("")}async function H(t,e){return h(t,e)}function P(t,e){let n=[];return y(t.tree,(r)=>{if(r.isStatic)n.push(h(r,e))}),n.join("")}function j(t,e,n){let r={templateId:e.id,context:n,dynamicParts:Array.from(e.dynamicParts.entries())},a=`
|
|
7
7
|
<script data-craft-hydration>
|
|
8
8
|
window.__CRAFT_HYDRATION__ = ${JSON.stringify(r)};
|
|
9
|
-
</script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{
|
|
9
|
+
</script>`;return{html:t+a,data:r}}function O(t){let e=!1,n=!1,r=!1,a=!1,i=0,s=0;function o(c,p){if(s=Math.max(s,p),c.type==="slot")e=!0;if(c.type==="component")i++;if(!c.isStatic)n=!0;if(c.props)for(let l of Object.keys(c.props)){if(l.startsWith("on"))r=!0;if(l==="@async"||l==="data-async")a=!0}if(c.children)c.children.forEach((l)=>o(l,p+1))}return o(t,0),{hasSlots:e,hasDynamicContent:n,hasEventHandlers:r,hasAsyncContent:a,componentCount:i,maxDepth:s,estimatedSize:JSON.stringify(t).length}}function A(t){let e=new Map,n=new Map;return y(t,(r,a)=>{let i=a.join(".");if(r.isStatic)e.set(i,b(r));else n.set(i,r.tag||r.componentName||"dynamic")}),{staticParts:e,dynamicParts:n}}function L(t){let e=[],n=/<script[^>]*>([\s\S]*?)<\/script>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function W(t){let e=[],n=/<style[^>]*>([\s\S]*?)<\/style>/gi,r;while((r=n.exec(t))!==null)e.push(r[1]);return e}function _(t){let e=[],n=/@include\s*\(\s*['"]([^'"]+)['"]/g,r;while((r=n.exec(t))!==null)e.push(r[1]);let a=/@component\s*\(\s*['"]([^'"]+)['"]/g;while((r=a.exec(t))!==null)e.push(r[1]);let i=/<@craft-[\w-]+/g;while((r=i.exec(t))!==null)e.push(r[0].slice(2));return[...new Set(e)]}function v(t){return/\{\{.*?\}\}|\{\!\!.*?\!\!\}/.test(t)}function x(t,e){let n=t.replace(/\{\{\s*(.+?)\s*\}\}/g,(r,a)=>{try{let i=w(a.trim(),e);return k(String(i??""))}catch{return""}});return n=n.replace(/\{!!\s*(.+?)\s*!!\}/g,(r,a)=>{try{let i=w(a.trim(),e);return String(i??"")}catch{return""}}),n}function w(t,e){if(/^[\w.]+$/.test(t)){let n=t.split("."),r=e;for(let a of n)if(r&&typeof r==="object"&&a in r)r=r[a];else return;return r}try{return Function(...Object.keys(e),`return ${t}`)(...Object.values(e))}catch{return}}function k(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function D(t){return t.replace(/\s+/g," ").replace(/>\s+</g,"><").replace(/\s+>/g,">").replace(/<\s+/g,"<").trim()}function E(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return`tpl_${Math.abs(e).toString(36)}`}function I(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);e=(e<<5)-e+r,e=e&e}return Math.abs(e).toString(36)}var K=0;function F(){return`h_${++K}`}function T(t){return["craft-button","craft-text-input","craft-textarea","craft-checkbox","craft-radio","craft-select","craft-slider","craft-toggle","craft-date-picker","craft-time-picker","craft-color-picker","craft-file-input","craft-modal","craft-alert","craft-toast","craft-progress","craft-spinner","craft-avatar","craft-badge","craft-card","craft-accordion","craft-tabs","craft-tooltip","craft-popover","craft-dropdown","craft-context-menu","craft-data-table","craft-virtual-list","craft-tree-view","craft-map","craft-chart","craft-video","craft-audio","craft-webview","craft-canvas","craft-image-viewer","craft-pdf-viewer","craft-code-editor","craft-rich-editor"].includes(t)}function J(t){let e=t.tag?.toLowerCase(),n=t.props?.type,r={button:{component:"craft-button",confidence:0.95,reason:"Native button provides better touch feedback"},"input:text":{component:"craft-text-input",confidence:0.9,reason:"Native text input has better keyboard handling"},"input:checkbox":{component:"craft-checkbox",confidence:0.95,reason:"Native checkbox follows platform conventions"},"input:range":{component:"craft-slider",confidence:0.9,reason:"Native slider provides smooth interaction"},"input:date":{component:"craft-date-picker",confidence:0.95,reason:"Native date picker provides platform-specific UI"},"input:time":{component:"craft-time-picker",confidence:0.95,reason:"Native time picker provides platform-specific UI"},"input:color":{component:"craft-color-picker",confidence:0.9,reason:"Native color picker provides platform-specific UI"},textarea:{component:"craft-textarea",confidence:0.85,reason:"Native textarea handles multiline input better"},select:{component:"craft-select",confidence:0.9,reason:"Native select provides platform dropdown UI"},progress:{component:"craft-progress",confidence:0.95,reason:"Native progress bar matches platform style"},video:{component:"craft-video",confidence:0.95,reason:"Native video provides hardware acceleration"},audio:{component:"craft-audio",confidence:0.95,reason:"Native audio provides system integration"},dialog:{component:"craft-modal",confidence:0.9,reason:"Native modal provides proper layering and focus"}},a=n?`${e}:${n}`:e,i=r[a||""]||r[e||""];if(i)return{htmlSelector:a||e||"",nativeComponent:i.component,confidence:i.confidence,reason:i.reason};return null}function U(){m.clear()}function q(){d.clear()}function B(){U(),q()}function G(){return{templateCacheSize:m.size,renderCacheSize:d.size,totalEntries:m.size+d.size}}export{xu as CRAFT_BRIDGE_SCRIPT,To as CRAFT_COMPONENTS,Aa as CRAFT_COMPONENT_RUNTIME,ns as CRAFT_COMPONENT_STYLES,Eo as NATIVE_COMPONENTS,Ia as buildNative,B as clearAllCaches,q as clearRenderCache,U as clearTemplateCache,R as compileTemplate,Ea as compileToNative,Ta as createHotReloadServer,Oa as findCraftBinary,$a as generateCraftBridgeScript,V as generateCraftOptimizations,Ma as getAvailableFormats,Na as getAvailableTargets,Ah as getCraftComponents,G as getSSRCacheStats,Ra as injectCraftBridge,Th as isCraftEnvironment,Y as prerenderForCraft,Pa as processCraftComponents,$h as processCraftDirective,Rh as registerCraftComponent,Q as renderSSR};
|
package/dist/csp.d.ts
CHANGED
package/dist/database.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference path="./stx.d.ts" />
|
|
2
|
-
import type { StxOptions } from './types';
|
|
2
|
+
import type { StxOptions } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Configure database connections
|
|
5
5
|
*
|
|
@@ -301,6 +301,19 @@ export type Row = Record<string, unknown>;
|
|
|
301
301
|
* Fluent query builder class
|
|
302
302
|
*/
|
|
303
303
|
export declare class QueryBuilder {
|
|
304
|
+
private _table;
|
|
305
|
+
private _columns;
|
|
306
|
+
private _wheres;
|
|
307
|
+
private _orders;
|
|
308
|
+
private _joins;
|
|
309
|
+
private _groupBy;
|
|
310
|
+
private _having;
|
|
311
|
+
private _limit;
|
|
312
|
+
private _offset;
|
|
313
|
+
private _distinct;
|
|
314
|
+
private _connection;
|
|
315
|
+
private _bindings;
|
|
316
|
+
private _modelDefinition;
|
|
304
317
|
constructor(table?: string);
|
|
305
318
|
table(name: string): this;
|
|
306
319
|
from(name: string): this;
|
|
@@ -349,6 +362,8 @@ export declare class QueryBuilder {
|
|
|
349
362
|
delete(): Promise<number>;
|
|
350
363
|
truncate(): Promise<void>;
|
|
351
364
|
toSql(): { sql: string, bindings: unknown[] };
|
|
365
|
+
private buildWhereClause;
|
|
366
|
+
private getCacheKey;
|
|
352
367
|
clone(): QueryBuilder;
|
|
353
368
|
}
|
|
354
369
|
/**
|
|
@@ -363,6 +378,7 @@ export declare class DatabaseError extends Error {
|
|
|
363
378
|
* Schema builder for database migrations
|
|
364
379
|
*/
|
|
365
380
|
export declare class SchemaBuilder {
|
|
381
|
+
private _connection;
|
|
366
382
|
connection(name: string): this;
|
|
367
383
|
create(table: string, callback: (blueprint: Blueprint) => void): Promise<void>;
|
|
368
384
|
drop(table: string): Promise<void>;
|
|
@@ -373,6 +389,9 @@ export declare class SchemaBuilder {
|
|
|
373
389
|
* Table blueprint for schema definitions
|
|
374
390
|
*/
|
|
375
391
|
export declare class Blueprint {
|
|
392
|
+
private columns;
|
|
393
|
+
private indices;
|
|
394
|
+
private table;
|
|
376
395
|
constructor(table: string);
|
|
377
396
|
id(name?: string): this;
|
|
378
397
|
string(name: string, length?: number): this;
|
|
@@ -389,3 +408,4 @@ export declare class Blueprint {
|
|
|
389
408
|
toCreateSQL(): string;
|
|
390
409
|
getIndexSQL(): string[];
|
|
391
410
|
}
|
|
411
|
+
export {};
|
package/dist/deploy/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createNetlifyClient, collectDeployFiles, createFileManifest, filterRequiredFiles, formatSize, getTotalSize, type NetlifyClient, type NetlifyDeploy, type DeployFile } from './netlify';
|
|
2
|
-
import { detectProjectConfig, createDefaultNetlifyConfig, generateNetlifyToml, writeNetlifyConfig, hasNetlifyConfig } from './config-generators';
|
|
1
|
+
import { createNetlifyClient, collectDeployFiles, createFileManifest, filterRequiredFiles, formatSize, getTotalSize, type NetlifyClient, type NetlifyDeploy, type DeployFile } from './netlify.js';
|
|
2
|
+
import { detectProjectConfig, createDefaultNetlifyConfig, generateNetlifyToml, writeNetlifyConfig, hasNetlifyConfig } from './config-generators.js';
|
|
3
3
|
export type {
|
|
4
4
|
NetlifyClient,
|
|
5
5
|
NetlifySite,
|
|
6
6
|
NetlifyDeploy,
|
|
7
7
|
DeployFile,
|
|
8
|
-
} from './netlify';
|
|
8
|
+
} from './netlify.js';
|
|
9
9
|
export type {
|
|
10
10
|
NetlifyConfig,
|
|
11
11
|
ProjectConfig,
|
|
12
|
-
} from './config-generators';
|
|
12
|
+
} from './config-generators.js';
|
|
13
13
|
/**
|
|
14
14
|
* Deploy to Netlify
|
|
15
15
|
*/
|
|
@@ -78,11 +78,11 @@ export {
|
|
|
78
78
|
formatSize,
|
|
79
79
|
getTotalSize,
|
|
80
80
|
calculateSha1,
|
|
81
|
-
} from './netlify';
|
|
81
|
+
} from './netlify.js';
|
|
82
82
|
export {
|
|
83
83
|
generateNetlifyToml,
|
|
84
84
|
detectProjectConfig,
|
|
85
85
|
createDefaultNetlifyConfig,
|
|
86
86
|
writeNetlifyConfig,
|
|
87
87
|
hasNetlifyConfig,
|
|
88
|
-
} from './config-generators';
|
|
88
|
+
} from './config-generators.js';
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* - types.ts - Type definitions
|
|
14
14
|
*/
|
|
15
15
|
// Re-export all sub-modules
|
|
16
|
-
export * from './terminal-colors';
|
|
17
|
-
export * from './ts-css';
|
|
18
|
-
export * from './theme-selector';
|
|
19
|
-
export * from './port-utils';
|
|
20
|
-
export * from './native-window';
|
|
21
|
-
export * from './keyboard-shortcuts';
|
|
22
|
-
export * from './types';
|
|
16
|
+
export * from './terminal-colors.js';
|
|
17
|
+
export * from './ts-css.js';
|
|
18
|
+
export * from './theme-selector.js';
|
|
19
|
+
export * from './port-utils.js';
|
|
20
|
+
export * from './native-window.js';
|
|
21
|
+
export * from './keyboard-shortcuts.js';
|
|
22
|
+
export * from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DevServerOptions } from './types';
|
|
1
|
+
import type { DevServerOptions } from './types.js';
|
|
2
2
|
// Helper function to find the common directory for multiple paths
|
|
3
3
|
export declare function findCommonDir(paths: string[]): string;
|
|
4
4
|
// Build and serve multiple files (stx and Markdown)
|
|
@@ -27,30 +27,30 @@ export declare function dim(text: string): string;
|
|
|
27
27
|
* Provides consistent coloring for CLI messages
|
|
28
28
|
*/
|
|
29
29
|
export declare const colors: {
|
|
30
|
-
reset: '\x1B[0m';
|
|
31
|
-
bright: '\x1B[1m';
|
|
32
|
-
dim: '\x1B[2m';
|
|
33
|
-
underscore: '\x1B[4m';
|
|
34
|
-
blink: '\x1B[5m';
|
|
35
|
-
reverse: '\x1B[7m';
|
|
36
|
-
hidden: '\x1B[8m';
|
|
37
|
-
black: '\x1B[30m';
|
|
38
|
-
red: '\x1B[31m';
|
|
39
|
-
green: '\x1B[32m';
|
|
40
|
-
yellow: '\x1B[33m';
|
|
41
|
-
blue: '\x1B[34m';
|
|
42
|
-
magenta: '\x1B[35m';
|
|
43
|
-
cyan: '\x1B[36m';
|
|
44
|
-
white: '\x1B[37m';
|
|
45
|
-
gray: '\x1B[90m';
|
|
46
|
-
bgBlack: '\x1B[40m';
|
|
47
|
-
bgRed: '\x1B[41m';
|
|
48
|
-
bgGreen: '\x1B[42m';
|
|
49
|
-
bgYellow: '\x1B[43m';
|
|
50
|
-
bgBlue: '\x1B[44m';
|
|
51
|
-
bgMagenta: '\x1B[45m';
|
|
52
|
-
bgCyan: '\x1B[46m';
|
|
53
|
-
bgWhite: '\x1B[47m';
|
|
54
|
-
bgGray: '\x1B[100m'
|
|
30
|
+
readonly reset: '\x1B[0m';
|
|
31
|
+
readonly bright: '\x1B[1m';
|
|
32
|
+
readonly dim: '\x1B[2m';
|
|
33
|
+
readonly underscore: '\x1B[4m';
|
|
34
|
+
readonly blink: '\x1B[5m';
|
|
35
|
+
readonly reverse: '\x1B[7m';
|
|
36
|
+
readonly hidden: '\x1B[8m';
|
|
37
|
+
readonly black: '\x1B[30m';
|
|
38
|
+
readonly red: '\x1B[31m';
|
|
39
|
+
readonly green: '\x1B[32m';
|
|
40
|
+
readonly yellow: '\x1B[33m';
|
|
41
|
+
readonly blue: '\x1B[34m';
|
|
42
|
+
readonly magenta: '\x1B[35m';
|
|
43
|
+
readonly cyan: '\x1B[36m';
|
|
44
|
+
readonly white: '\x1B[37m';
|
|
45
|
+
readonly gray: '\x1B[90m';
|
|
46
|
+
readonly bgBlack: '\x1B[40m';
|
|
47
|
+
readonly bgRed: '\x1B[41m';
|
|
48
|
+
readonly bgGreen: '\x1B[42m';
|
|
49
|
+
readonly bgYellow: '\x1B[43m';
|
|
50
|
+
readonly bgBlue: '\x1B[44m';
|
|
51
|
+
readonly bgMagenta: '\x1B[45m';
|
|
52
|
+
readonly bgCyan: '\x1B[46m';
|
|
53
|
+
readonly bgWhite: '\x1B[47m';
|
|
54
|
+
readonly bgGray: '\x1B[100m'
|
|
55
55
|
};
|
|
56
56
|
export type ColorName = keyof typeof colors;
|
package/dist/dev-server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Re-export all serve functions from focused modules
|
|
2
|
-
export type { DevServerOptions } from './dev-server/types';
|
|
3
|
-
export { serveMarkdownFile } from './dev-server/serve-markdown';
|
|
4
|
-
export { serveStxFile } from './dev-server/serve-file';
|
|
5
|
-
export { serveMultipleStxFiles, findCommonDir } from './dev-server/serve-multi';
|
|
6
|
-
export { serveApp } from './dev-server/serve-app';
|
|
2
|
+
export type { DevServerOptions } from './dev-server/types.js';
|
|
3
|
+
export { serveMarkdownFile } from './dev-server/serve-markdown.js';
|
|
4
|
+
export { serveStxFile } from './dev-server/serve-file.js';
|
|
5
|
+
export { serveMultipleStxFiles, findCommonDir } from './dev-server/serve-multi.js';
|
|
6
|
+
export { serveApp } from './dev-server/serve-app.js';
|
package/dist/directive-api.d.ts
CHANGED
package/dist/docs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { config } from './config';
|
|
2
|
-
import type { ComponentDoc, ComponentPropDoc, DirectiveDoc, DocGeneratorConfig, TemplateDoc } from './types';
|
|
1
|
+
import { config } from './config.js';
|
|
2
|
+
import type { ComponentDoc, ComponentPropDoc, DirectiveDoc, DocGeneratorConfig, TemplateDoc } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Extract component properties from a component file
|
|
5
5
|
*/
|
package/dist/document-shell.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AppHeadConfig } from './types/config-types';
|
|
2
|
-
import type { ColorModeBootConfig } from './color-mode-boot';
|
|
1
|
+
import type { AppHeadConfig } from './types/config-types.js';
|
|
2
|
+
import type { ColorModeBootConfig } from './color-mode-boot.js';
|
|
3
3
|
/** Emit `k="v"` pairs with every value attribute-escaped. */
|
|
4
4
|
/**
|
|
5
5
|
* The identity of a `<meta>` tag, for deduplication.
|
package/dist/edge-runtime.d.ts
CHANGED
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
* generated `await import('stx')` rejected and the shadowing binding was never
|
|
33
33
|
* created. The failure needed a real install to appear.
|
|
34
34
|
*/
|
|
35
|
-
export declare const STX_ENGINE_BINDING_NAMES: readonly ['module', 'exports', 'require', 'props', '$props', '$bool', '$num', 'defineProps', 'withDefaults', 'defineClientPayload', 'useServerData', 'useRuntimeConfig', 'useServerRuntimeConfig', 'state', 'derived', 'effect', 'batch', 'onMount', 'onDestroy', 'definePageMeta', 'useRoute', 'useRouter', 'useHead', 'useSeoMeta',
|
|
35
|
+
export declare const STX_ENGINE_BINDING_NAMES: readonly ['module', 'exports', 'require', 'props', '$props', '$bool', '$num', 'defineProps', 'withDefaults', 'defineClientPayload', 'useServerData', 'useRuntimeConfig', 'useServerRuntimeConfig', 'state', 'derived', 'effect', 'batch', 'onMount', 'onDestroy', 'definePageMeta', 'useRoute', 'useRouter', 'useHead', 'useSeoMeta', 'setResponseStatus', 'setResponseHeader', 'notFound', 'ref', 'reactive', 'computed', 'watch', 'onMounted', 'onUnmounted', 'nextTick', 'defineEmits', 'defineExpose', 'defineSlots', 'provide', 'inject', 'useColorMode', 'useDark', 'useMediaQuery', 'useScrollLock', 'usePreferredDark', 'usePreferredLight', 'usePreferredReducedMotion', 'usePreferredContrast', 'window', 'document', 'console', 'confirm', 'alert', 'fetch', 'params'];
|
package/dist/error-handling.d.ts
CHANGED