fuzor 0.3.0 → 0.5.0
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/README.md +36 -88
- package/dist/boundaries.d.ts +5 -0
- package/dist/boundaries.d.ts.map +1 -0
- package/dist/boundaries.js +5 -0
- package/dist/boundaries.js.map +1 -0
- package/dist/browser.d.ts +4 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +4 -0
- package/dist/browser.js.map +1 -0
- package/dist/build-output.d.ts +18 -0
- package/dist/build-output.d.ts.map +1 -0
- package/dist/build-output.js +91 -0
- package/dist/build-output.js.map +1 -0
- package/dist/cli.js +390 -36
- package/dist/cli.js.map +1 -1
- package/dist/compiler/api-routes.d.ts +14 -0
- package/dist/compiler/api-routes.d.ts.map +1 -0
- package/dist/compiler/api-routes.js +66 -0
- package/dist/compiler/api-routes.js.map +1 -0
- package/dist/compiler/base-links.d.ts +7 -0
- package/dist/compiler/base-links.d.ts.map +1 -0
- package/dist/compiler/base-links.js +40 -0
- package/dist/compiler/base-links.js.map +1 -0
- package/dist/compiler/data-document.d.ts +9 -0
- package/dist/compiler/data-document.d.ts.map +1 -0
- package/dist/compiler/data-document.js +21 -0
- package/dist/compiler/data-document.js.map +1 -0
- package/dist/compiler/docs.d.ts +6 -0
- package/dist/compiler/docs.d.ts.map +1 -0
- package/dist/compiler/docs.js +1131 -0
- package/dist/compiler/docs.js.map +1 -0
- package/dist/compiler/highlight.d.ts +13 -0
- package/dist/compiler/highlight.d.ts.map +1 -0
- package/dist/compiler/highlight.js +44 -0
- package/dist/compiler/highlight.js.map +1 -0
- package/dist/compiler/index.d.ts +132 -4
- package/dist/compiler/index.d.ts.map +1 -1
- package/dist/compiler/index.js +845 -48
- package/dist/compiler/index.js.map +1 -1
- package/dist/compiler/inline-assets.d.ts +6 -0
- package/dist/compiler/inline-assets.d.ts.map +1 -0
- package/dist/compiler/inline-assets.js +61 -0
- package/dist/compiler/inline-assets.js.map +1 -0
- package/dist/compiler/inline-modules.d.ts +7 -0
- package/dist/compiler/inline-modules.d.ts.map +1 -0
- package/dist/compiler/inline-modules.js +77 -0
- package/dist/compiler/inline-modules.js.map +1 -0
- package/dist/compiler/island-modules.d.ts +8 -0
- package/dist/compiler/island-modules.d.ts.map +1 -0
- package/dist/compiler/island-modules.js +42 -0
- package/dist/compiler/island-modules.js.map +1 -0
- package/dist/compiler/islands.d.ts +24 -3
- package/dist/compiler/islands.d.ts.map +1 -1
- package/dist/compiler/islands.js +50 -12
- package/dist/compiler/islands.js.map +1 -1
- package/dist/compiler/links.d.ts +37 -0
- package/dist/compiler/links.d.ts.map +1 -0
- package/dist/compiler/links.js +112 -0
- package/dist/compiler/links.js.map +1 -0
- package/dist/compiler/markdown.d.ts +17 -0
- package/dist/compiler/markdown.d.ts.map +1 -0
- package/dist/compiler/markdown.js +92 -0
- package/dist/compiler/markdown.js.map +1 -0
- package/dist/compiler/metadata.d.ts +37 -0
- package/dist/compiler/metadata.d.ts.map +1 -0
- package/dist/compiler/metadata.js +81 -0
- package/dist/compiler/metadata.js.map +1 -0
- package/dist/compiler/native-scripts.d.ts +13 -0
- package/dist/compiler/native-scripts.d.ts.map +1 -0
- package/dist/compiler/native-scripts.js +137 -0
- package/dist/compiler/native-scripts.js.map +1 -0
- package/dist/compiler/page-scripts.d.ts +36 -0
- package/dist/compiler/page-scripts.d.ts.map +1 -0
- package/dist/compiler/page-scripts.js +158 -0
- package/dist/compiler/page-scripts.js.map +1 -0
- package/dist/compiler/route-policy.d.ts +17 -0
- package/dist/compiler/route-policy.d.ts.map +1 -0
- package/dist/compiler/route-policy.js +68 -0
- package/dist/compiler/route-policy.js.map +1 -0
- package/dist/compiler/search.d.ts +13 -0
- package/dist/compiler/search.d.ts.map +1 -0
- package/dist/compiler/search.js +24 -0
- package/dist/compiler/search.js.map +1 -0
- package/dist/compiler/server-modules.d.ts +3 -0
- package/dist/compiler/server-modules.d.ts.map +1 -0
- package/dist/compiler/server-modules.js +31 -0
- package/dist/compiler/server-modules.js.map +1 -0
- package/dist/compiler/static-analysis.d.ts +20 -0
- package/dist/compiler/static-analysis.d.ts.map +1 -0
- package/dist/compiler/static-analysis.js +130 -0
- package/dist/compiler/static-analysis.js.map +1 -0
- package/dist/create-delegate.d.ts +17 -0
- package/dist/create-delegate.d.ts.map +1 -0
- package/dist/create-delegate.js +48 -0
- package/dist/create-delegate.js.map +1 -0
- package/dist/electron.d.ts +5 -0
- package/dist/electron.d.ts.map +1 -0
- package/dist/electron.js +32 -0
- package/dist/electron.js.map +1 -0
- package/dist/html-escape.d.ts +16 -0
- package/dist/html-escape.d.ts.map +1 -0
- package/dist/html-escape.js +26 -0
- package/dist/html-escape.js.map +1 -0
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/islands/hydration.d.ts +7 -0
- package/dist/islands/hydration.d.ts.map +1 -0
- package/dist/islands/hydration.js +12 -0
- package/dist/islands/hydration.js.map +1 -0
- package/dist/islands/react.d.ts +9 -2
- package/dist/islands/react.d.ts.map +1 -1
- package/dist/islands/react.js +73 -14
- package/dist/islands/react.js.map +1 -1
- package/dist/islands/solid.d.ts.map +1 -1
- package/dist/islands/solid.js +10 -1
- package/dist/islands/solid.js.map +1 -1
- package/dist/islands/vue.d.ts.map +1 -1
- package/dist/islands/vue.js +15 -3
- package/dist/islands/vue.js.map +1 -1
- package/dist/module-specifiers.d.ts +5 -0
- package/dist/module-specifiers.d.ts.map +1 -0
- package/dist/module-specifiers.js +80 -0
- package/dist/module-specifiers.js.map +1 -0
- package/dist/route-path.d.ts +33 -0
- package/dist/route-path.d.ts.map +1 -0
- package/dist/route-path.js +81 -0
- package/dist/route-path.js.map +1 -0
- package/dist/route-patterns.d.ts +8 -0
- package/dist/route-patterns.d.ts.map +1 -0
- package/dist/route-patterns.js +84 -0
- package/dist/route-patterns.js.map +1 -0
- package/dist/runtime/activation.d.ts +29 -0
- package/dist/runtime/activation.d.ts.map +1 -0
- package/dist/runtime/activation.js +236 -0
- package/dist/runtime/activation.js.map +1 -0
- package/dist/runtime/browser-navigation.d.ts +20 -0
- package/dist/runtime/browser-navigation.d.ts.map +1 -0
- package/dist/runtime/browser-navigation.js +138 -0
- package/dist/runtime/browser-navigation.js.map +1 -0
- package/dist/runtime/browser-support.d.ts +20 -0
- package/dist/runtime/browser-support.d.ts.map +1 -0
- package/dist/runtime/browser-support.js +39 -0
- package/dist/runtime/browser-support.js.map +1 -0
- package/dist/runtime/capacitor.d.ts +43 -0
- package/dist/runtime/capacitor.d.ts.map +1 -0
- package/dist/runtime/capacitor.js +84 -0
- package/dist/runtime/capacitor.js.map +1 -0
- package/dist/runtime/client-routes.d.ts +4 -0
- package/dist/runtime/client-routes.d.ts.map +1 -0
- package/dist/runtime/client-routes.js +3 -0
- package/dist/runtime/client-routes.js.map +1 -0
- package/dist/runtime/coordinated-navigation.d.ts +7 -0
- package/dist/runtime/coordinated-navigation.d.ts.map +1 -0
- package/dist/runtime/coordinated-navigation.js +50 -0
- package/dist/runtime/coordinated-navigation.js.map +1 -0
- package/dist/runtime/coordinator.d.ts +32 -0
- package/dist/runtime/coordinator.d.ts.map +1 -0
- package/dist/runtime/coordinator.js +115 -0
- package/dist/runtime/coordinator.js.map +1 -0
- package/dist/runtime/data.d.ts +25 -0
- package/dist/runtime/data.d.ts.map +1 -0
- package/dist/runtime/data.js +115 -0
- package/dist/runtime/data.js.map +1 -0
- package/dist/runtime/docs-search.d.ts +13 -0
- package/dist/runtime/docs-search.d.ts.map +1 -0
- package/dist/runtime/docs-search.js +205 -0
- package/dist/runtime/docs-search.js.map +1 -0
- package/dist/runtime/docs-ui.d.ts +7 -0
- package/dist/runtime/docs-ui.d.ts.map +1 -0
- package/dist/runtime/docs-ui.js +85 -0
- package/dist/runtime/docs-ui.js.map +1 -0
- package/dist/runtime/document-navigation.d.ts +9 -0
- package/dist/runtime/document-navigation.d.ts.map +1 -0
- package/dist/runtime/document-navigation.js +27 -0
- package/dist/runtime/document-navigation.js.map +1 -0
- package/dist/runtime/dom-renderer.d.ts +36 -0
- package/dist/runtime/dom-renderer.d.ts.map +1 -0
- package/dist/runtime/dom-renderer.js +173 -0
- package/dist/runtime/dom-renderer.js.map +1 -0
- package/dist/runtime/hash-navigation.d.ts +12 -0
- package/dist/runtime/hash-navigation.d.ts.map +1 -0
- package/dist/runtime/hash-navigation.js +26 -0
- package/dist/runtime/hash-navigation.js.map +1 -0
- package/dist/runtime/history-navigation.d.ts +17 -0
- package/dist/runtime/history-navigation.d.ts.map +1 -0
- package/dist/runtime/history-navigation.js +172 -0
- package/dist/runtime/history-navigation.js.map +1 -0
- package/dist/runtime/href.d.ts +16 -0
- package/dist/runtime/href.d.ts.map +1 -0
- package/dist/runtime/href.js +38 -0
- package/dist/runtime/href.js.map +1 -0
- package/dist/runtime/index.d.ts +73 -26
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +33 -118
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/initial-route.d.ts +8 -0
- package/dist/runtime/initial-route.d.ts.map +1 -0
- package/dist/runtime/initial-route.js +72 -0
- package/dist/runtime/initial-route.js.map +1 -0
- package/dist/runtime/islands.d.ts +19 -5
- package/dist/runtime/islands.d.ts.map +1 -1
- package/dist/runtime/islands.js +15 -41
- package/dist/runtime/islands.js.map +1 -1
- package/dist/runtime/loading.d.ts +12 -0
- package/dist/runtime/loading.d.ts.map +1 -0
- package/dist/runtime/loading.js +43 -0
- package/dist/runtime/loading.js.map +1 -0
- package/dist/runtime/memory-navigation.d.ts +16 -0
- package/dist/runtime/memory-navigation.d.ts.map +1 -0
- package/dist/runtime/memory-navigation.js +98 -0
- package/dist/runtime/memory-navigation.js.map +1 -0
- package/dist/runtime/native.d.ts +108 -0
- package/dist/runtime/native.d.ts.map +1 -0
- package/dist/runtime/native.js +378 -0
- package/dist/runtime/native.js.map +1 -0
- package/dist/runtime/navigation-atom.d.ts +21 -0
- package/dist/runtime/navigation-atom.d.ts.map +1 -0
- package/dist/runtime/navigation-atom.js +76 -0
- package/dist/runtime/navigation-atom.js.map +1 -0
- package/dist/runtime/navigation.d.ts +61 -0
- package/dist/runtime/navigation.d.ts.map +1 -0
- package/dist/runtime/navigation.js +11 -0
- package/dist/runtime/navigation.js.map +1 -0
- package/dist/runtime/page-scripts.d.ts +54 -0
- package/dist/runtime/page-scripts.d.ts.map +1 -0
- package/dist/runtime/page-scripts.js +207 -0
- package/dist/runtime/page-scripts.js.map +1 -0
- package/dist/runtime/route-matches.d.ts +17 -0
- package/dist/runtime/route-matches.d.ts.map +1 -0
- package/dist/runtime/route-matches.js +50 -0
- package/dist/runtime/route-matches.js.map +1 -0
- package/dist/runtime/router-embedded.d.ts +28 -0
- package/dist/runtime/router-embedded.d.ts.map +1 -0
- package/dist/runtime/router-embedded.js +12 -0
- package/dist/runtime/router-embedded.js.map +1 -0
- package/dist/runtime/router-navigation-api.d.ts +28 -0
- package/dist/runtime/router-navigation-api.d.ts.map +1 -0
- package/dist/runtime/router-navigation-api.js +13 -0
- package/dist/runtime/router-navigation-api.js.map +1 -0
- package/dist/runtime/router.d.ts +137 -0
- package/dist/runtime/router.d.ts.map +1 -0
- package/dist/runtime/router.js +678 -0
- package/dist/runtime/router.js.map +1 -0
- package/dist/runtime/stale-deployment.d.ts +7 -0
- package/dist/runtime/stale-deployment.d.ts.map +1 -0
- package/dist/runtime/stale-deployment.js +30 -0
- package/dist/runtime/stale-deployment.js.map +1 -0
- package/dist/runtime/user-input.d.ts +25 -0
- package/dist/runtime/user-input.d.ts.map +1 -0
- package/dist/runtime/user-input.js +81 -0
- package/dist/runtime/user-input.js.map +1 -0
- package/dist/runtimes.d.ts +43 -0
- package/dist/runtimes.d.ts.map +1 -0
- package/dist/runtimes.js +152 -0
- package/dist/runtimes.js.map +1 -0
- package/dist/server/node.d.ts +47 -2
- package/dist/server/node.d.ts.map +1 -1
- package/dist/server/node.js +185 -23
- package/dist/server/node.js.map +1 -1
- package/dist/server/static.d.ts +11 -0
- package/dist/server/static.d.ts.map +1 -0
- package/dist/server/static.js +61 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server-api.d.ts +73 -0
- package/dist/server-api.d.ts.map +1 -0
- package/dist/server-api.js +171 -0
- package/dist/server-api.js.map +1 -0
- package/dist/server-components/browser.d.ts +75 -0
- package/dist/server-components/browser.d.ts.map +1 -0
- package/dist/server-components/browser.js +558 -0
- package/dist/server-components/browser.js.map +1 -0
- package/dist/server-components/closures.d.ts +21 -0
- package/dist/server-components/closures.d.ts.map +1 -0
- package/dist/server-components/closures.js +192 -0
- package/dist/server-components/closures.js.map +1 -0
- package/dist/server-components/compiler.d.ts +6 -0
- package/dist/server-components/compiler.d.ts.map +1 -0
- package/dist/server-components/compiler.js +118 -0
- package/dist/server-components/compiler.js.map +1 -0
- package/dist/server-components/environment.d.ts +3 -0
- package/dist/server-components/environment.d.ts.map +1 -0
- package/dist/server-components/environment.js +11 -0
- package/dist/server-components/environment.js.map +1 -0
- package/dist/server-components/navigation.d.ts +10 -0
- package/dist/server-components/navigation.d.ts.map +1 -0
- package/dist/server-components/navigation.js +105 -0
- package/dist/server-components/navigation.js.map +1 -0
- package/dist/server-components/protocol.d.ts +77 -0
- package/dist/server-components/protocol.d.ts.map +1 -0
- package/dist/server-components/protocol.js +110 -0
- package/dist/server-components/protocol.js.map +1 -0
- package/dist/server-components/references.d.ts +22 -0
- package/dist/server-components/references.d.ts.map +1 -0
- package/dist/server-components/references.js +94 -0
- package/dist/server-components/references.js.map +1 -0
- package/dist/server-components/server.d.ts +78 -0
- package/dist/server-components/server.d.ts.map +1 -0
- package/dist/server-components/server.js +278 -0
- package/dist/server-components/server.js.map +1 -0
- package/dist/server-components/stream.d.ts +15 -0
- package/dist/server-components/stream.d.ts.map +1 -0
- package/dist/server-components/stream.js +72 -0
- package/dist/server-components/stream.js.map +1 -0
- package/dist/server-cookies.d.ts +41 -0
- package/dist/server-cookies.d.ts.map +1 -0
- package/dist/server-cookies.js +120 -0
- package/dist/server-cookies.js.map +1 -0
- package/dist/server-data.d.ts +51 -0
- package/dist/server-data.d.ts.map +1 -0
- package/dist/server-data.js +37 -0
- package/dist/server-data.js.map +1 -0
- package/dist/server.d.ts +57 -4
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +244 -13
- package/dist/server.js.map +1 -1
- package/dist/ui/behaviors/accordion.d.ts +14 -0
- package/dist/ui/behaviors/accordion.d.ts.map +1 -0
- package/dist/ui/behaviors/accordion.js +149 -0
- package/dist/ui/behaviors/accordion.js.map +1 -0
- package/dist/ui/behaviors/catalogue.d.ts +63 -0
- package/dist/ui/behaviors/catalogue.d.ts.map +1 -0
- package/dist/ui/behaviors/catalogue.js +284 -0
- package/dist/ui/behaviors/catalogue.js.map +1 -0
- package/dist/ui/behaviors/collapsible.d.ts +26 -0
- package/dist/ui/behaviors/collapsible.d.ts.map +1 -0
- package/dist/ui/behaviors/collapsible.js +145 -0
- package/dist/ui/behaviors/collapsible.js.map +1 -0
- package/dist/ui/behaviors/dialog.d.ts +16 -0
- package/dist/ui/behaviors/dialog.d.ts.map +1 -0
- package/dist/ui/behaviors/dialog.js +225 -0
- package/dist/ui/behaviors/dialog.js.map +1 -0
- package/dist/ui/behaviors/lifecycle.d.ts +15 -0
- package/dist/ui/behaviors/lifecycle.d.ts.map +1 -0
- package/dist/ui/behaviors/lifecycle.js +51 -0
- package/dist/ui/behaviors/lifecycle.js.map +1 -0
- package/dist/ui/behaviors/menu.d.ts +15 -0
- package/dist/ui/behaviors/menu.d.ts.map +1 -0
- package/dist/ui/behaviors/menu.js +162 -0
- package/dist/ui/behaviors/menu.js.map +1 -0
- package/dist/ui/behaviors/ownership.d.ts +7 -0
- package/dist/ui/behaviors/ownership.d.ts.map +1 -0
- package/dist/ui/behaviors/ownership.js +16 -0
- package/dist/ui/behaviors/ownership.js.map +1 -0
- package/dist/ui/behaviors/popover.d.ts +16 -0
- package/dist/ui/behaviors/popover.d.ts.map +1 -0
- package/dist/ui/behaviors/popover.js +90 -0
- package/dist/ui/behaviors/popover.js.map +1 -0
- package/dist/ui/behaviors/select.d.ts +37 -0
- package/dist/ui/behaviors/select.d.ts.map +1 -0
- package/dist/ui/behaviors/select.js +261 -0
- package/dist/ui/behaviors/select.js.map +1 -0
- package/dist/ui/behaviors/switch.d.ts +43 -0
- package/dist/ui/behaviors/switch.d.ts.map +1 -0
- package/dist/ui/behaviors/switch.js +269 -0
- package/dist/ui/behaviors/switch.js.map +1 -0
- package/dist/ui/behaviors/tabs.d.ts +4 -0
- package/dist/ui/behaviors/tabs.d.ts.map +1 -0
- package/dist/ui/behaviors/tabs.js +121 -0
- package/dist/ui/behaviors/tabs.js.map +1 -0
- package/dist/ui/behaviors/toolbar.d.ts +4 -0
- package/dist/ui/behaviors/toolbar.d.ts.map +1 -0
- package/dist/ui/behaviors/toolbar.js +81 -0
- package/dist/ui/behaviors/toolbar.js.map +1 -0
- package/dist/ui/behaviors/tooltip.d.ts +16 -0
- package/dist/ui/behaviors/tooltip.d.ts.map +1 -0
- package/dist/ui/behaviors/tooltip.js +91 -0
- package/dist/ui/behaviors/tooltip.js.map +1 -0
- package/dist/ui/behaviors/types.d.ts +51 -0
- package/dist/ui/behaviors/types.d.ts.map +1 -0
- package/dist/ui/behaviors/types.js +2 -0
- package/dist/ui/behaviors/types.js.map +1 -0
- package/dist/ui/catalogue-loaders.d.ts +4 -0
- package/dist/ui/catalogue-loaders.d.ts.map +1 -0
- package/dist/ui/catalogue-loaders.js +45 -0
- package/dist/ui/catalogue-loaders.js.map +1 -0
- package/dist/ui/catalogue.d.ts +465 -0
- package/dist/ui/catalogue.d.ts.map +1 -0
- package/dist/ui/catalogue.js +1570 -0
- package/dist/ui/catalogue.js.map +1 -0
- package/dist/ui/checkpoints.d.ts +20 -0
- package/dist/ui/checkpoints.d.ts.map +1 -0
- package/dist/ui/checkpoints.js +118 -0
- package/dist/ui/checkpoints.js.map +1 -0
- package/dist/ui/components/accordion/accordion.d.ts +22 -0
- package/dist/ui/components/accordion/accordion.d.ts.map +1 -0
- package/dist/ui/components/accordion/accordion.js +47 -0
- package/dist/ui/components/accordion/accordion.js.map +1 -0
- package/dist/ui/components/accordion/index.d.ts +2 -0
- package/dist/ui/components/accordion/index.d.ts.map +1 -0
- package/dist/ui/components/accordion/index.js +2 -0
- package/dist/ui/components/accordion/index.js.map +1 -0
- package/dist/ui/components/angle-slider/index.d.ts +5 -0
- package/dist/ui/components/angle-slider/index.d.ts.map +1 -0
- package/dist/ui/components/angle-slider/index.js +7 -0
- package/dist/ui/components/angle-slider/index.js.map +1 -0
- package/dist/ui/components/async-list/index.d.ts +5 -0
- package/dist/ui/components/async-list/index.d.ts.map +1 -0
- package/dist/ui/components/async-list/index.js +7 -0
- package/dist/ui/components/async-list/index.js.map +1 -0
- package/dist/ui/components/avatar/index.d.ts +5 -0
- package/dist/ui/components/avatar/index.d.ts.map +1 -0
- package/dist/ui/components/avatar/index.js +7 -0
- package/dist/ui/components/avatar/index.js.map +1 -0
- package/dist/ui/components/badge/badge.d.ts +6 -0
- package/dist/ui/components/badge/badge.d.ts.map +1 -0
- package/dist/ui/components/badge/badge.js +11 -0
- package/dist/ui/components/badge/badge.js.map +1 -0
- package/dist/ui/components/badge/index.d.ts +2 -0
- package/dist/ui/components/badge/index.d.ts.map +1 -0
- package/dist/ui/components/badge/index.js +2 -0
- package/dist/ui/components/badge/index.js.map +1 -0
- package/dist/ui/components/button/button.d.ts +26 -0
- package/dist/ui/components/button/button.d.ts.map +1 -0
- package/dist/ui/components/button/button.js +116 -0
- package/dist/ui/components/button/button.js.map +1 -0
- package/dist/ui/components/button/index.d.ts +2 -0
- package/dist/ui/components/button/index.d.ts.map +1 -0
- package/dist/ui/components/button/index.js +2 -0
- package/dist/ui/components/button/index.js.map +1 -0
- package/dist/ui/components/card/card.d.ts +21 -0
- package/dist/ui/components/card/card.d.ts.map +1 -0
- package/dist/ui/components/card/card.js +41 -0
- package/dist/ui/components/card/card.js.map +1 -0
- package/dist/ui/components/card/index.d.ts +2 -0
- package/dist/ui/components/card/index.d.ts.map +1 -0
- package/dist/ui/components/card/index.js +2 -0
- package/dist/ui/components/card/index.js.map +1 -0
- package/dist/ui/components/carousel/index.d.ts +5 -0
- package/dist/ui/components/carousel/index.d.ts.map +1 -0
- package/dist/ui/components/carousel/index.js +7 -0
- package/dist/ui/components/carousel/index.js.map +1 -0
- package/dist/ui/components/cascade-select/index.d.ts +7 -0
- package/dist/ui/components/cascade-select/index.d.ts.map +1 -0
- package/dist/ui/components/cascade-select/index.js +8 -0
- package/dist/ui/components/cascade-select/index.js.map +1 -0
- package/dist/ui/components/checkbox/index.d.ts +5 -0
- package/dist/ui/components/checkbox/index.d.ts.map +1 -0
- package/dist/ui/components/checkbox/index.js +7 -0
- package/dist/ui/components/checkbox/index.js.map +1 -0
- package/dist/ui/components/clipboard/index.d.ts +5 -0
- package/dist/ui/components/clipboard/index.d.ts.map +1 -0
- package/dist/ui/components/clipboard/index.js +7 -0
- package/dist/ui/components/clipboard/index.js.map +1 -0
- package/dist/ui/components/collapsible/collapsible.d.ts +21 -0
- package/dist/ui/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/ui/components/collapsible/collapsible.js +39 -0
- package/dist/ui/components/collapsible/collapsible.js.map +1 -0
- package/dist/ui/components/collapsible/index.d.ts +2 -0
- package/dist/ui/components/collapsible/index.d.ts.map +1 -0
- package/dist/ui/components/collapsible/index.js +2 -0
- package/dist/ui/components/collapsible/index.js.map +1 -0
- package/dist/ui/components/color-picker/index.d.ts +7 -0
- package/dist/ui/components/color-picker/index.d.ts.map +1 -0
- package/dist/ui/components/color-picker/index.js +8 -0
- package/dist/ui/components/color-picker/index.js.map +1 -0
- package/dist/ui/components/combobox/index.d.ts +7 -0
- package/dist/ui/components/combobox/index.d.ts.map +1 -0
- package/dist/ui/components/combobox/index.js +8 -0
- package/dist/ui/components/combobox/index.js.map +1 -0
- package/dist/ui/components/date-input/index.d.ts +7 -0
- package/dist/ui/components/date-input/index.d.ts.map +1 -0
- package/dist/ui/components/date-input/index.js +8 -0
- package/dist/ui/components/date-input/index.js.map +1 -0
- package/dist/ui/components/date-picker/index.d.ts +7 -0
- package/dist/ui/components/date-picker/index.d.ts.map +1 -0
- package/dist/ui/components/date-picker/index.js +8 -0
- package/dist/ui/components/date-picker/index.js.map +1 -0
- package/dist/ui/components/dialog/dialog.d.ts +44 -0
- package/dist/ui/components/dialog/dialog.d.ts.map +1 -0
- package/dist/ui/components/dialog/dialog.js +105 -0
- package/dist/ui/components/dialog/dialog.js.map +1 -0
- package/dist/ui/components/dialog/index.d.ts +2 -0
- package/dist/ui/components/dialog/index.d.ts.map +1 -0
- package/dist/ui/components/dialog/index.js +2 -0
- package/dist/ui/components/dialog/index.js.map +1 -0
- package/dist/ui/components/drawer/index.d.ts +5 -0
- package/dist/ui/components/drawer/index.d.ts.map +1 -0
- package/dist/ui/components/drawer/index.js +7 -0
- package/dist/ui/components/drawer/index.js.map +1 -0
- package/dist/ui/components/editable/index.d.ts +5 -0
- package/dist/ui/components/editable/index.d.ts.map +1 -0
- package/dist/ui/components/editable/index.js +7 -0
- package/dist/ui/components/editable/index.js.map +1 -0
- package/dist/ui/components/file-upload/index.d.ts +5 -0
- package/dist/ui/components/file-upload/index.d.ts.map +1 -0
- package/dist/ui/components/file-upload/index.js +7 -0
- package/dist/ui/components/file-upload/index.js.map +1 -0
- package/dist/ui/components/floating-panel/index.d.ts +5 -0
- package/dist/ui/components/floating-panel/index.d.ts.map +1 -0
- package/dist/ui/components/floating-panel/index.js +7 -0
- package/dist/ui/components/floating-panel/index.js.map +1 -0
- package/dist/ui/components/hover-card/index.d.ts +5 -0
- package/dist/ui/components/hover-card/index.d.ts.map +1 -0
- package/dist/ui/components/hover-card/index.js +7 -0
- package/dist/ui/components/hover-card/index.js.map +1 -0
- package/dist/ui/components/image-cropper/index.d.ts +5 -0
- package/dist/ui/components/image-cropper/index.d.ts.map +1 -0
- package/dist/ui/components/image-cropper/index.js +7 -0
- package/dist/ui/components/image-cropper/index.js.map +1 -0
- package/dist/ui/components/index.d.ts +61 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +186 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/components/layout/box.d.ts +11 -0
- package/dist/ui/components/layout/box.d.ts.map +1 -0
- package/dist/ui/components/layout/box.js +44 -0
- package/dist/ui/components/layout/box.js.map +1 -0
- package/dist/ui/components/layout/container.d.ts +9 -0
- package/dist/ui/components/layout/container.d.ts.map +1 -0
- package/dist/ui/components/layout/container.js +38 -0
- package/dist/ui/components/layout/container.js.map +1 -0
- package/dist/ui/components/layout/flex.d.ts +10 -0
- package/dist/ui/components/layout/flex.d.ts.map +1 -0
- package/dist/ui/components/layout/flex.js +53 -0
- package/dist/ui/components/layout/flex.js.map +1 -0
- package/dist/ui/components/layout/grid.d.ts +10 -0
- package/dist/ui/components/layout/grid.d.ts.map +1 -0
- package/dist/ui/components/layout/grid.js +47 -0
- package/dist/ui/components/layout/grid.js.map +1 -0
- package/dist/ui/components/layout/index.d.ts +6 -0
- package/dist/ui/components/layout/index.d.ts.map +1 -0
- package/dist/ui/components/layout/index.js +6 -0
- package/dist/ui/components/layout/index.js.map +1 -0
- package/dist/ui/components/layout/stack.d.ts +9 -0
- package/dist/ui/components/layout/stack.d.ts.map +1 -0
- package/dist/ui/components/layout/stack.js +37 -0
- package/dist/ui/components/layout/stack.js.map +1 -0
- package/dist/ui/components/listbox/index.d.ts +8 -0
- package/dist/ui/components/listbox/index.d.ts.map +1 -0
- package/dist/ui/components/listbox/index.js +9 -0
- package/dist/ui/components/listbox/index.js.map +1 -0
- package/dist/ui/components/marquee/index.d.ts +5 -0
- package/dist/ui/components/marquee/index.d.ts.map +1 -0
- package/dist/ui/components/marquee/index.js +7 -0
- package/dist/ui/components/marquee/index.js.map +1 -0
- package/dist/ui/components/menu/index.d.ts +2 -0
- package/dist/ui/components/menu/index.d.ts.map +1 -0
- package/dist/ui/components/menu/index.js +2 -0
- package/dist/ui/components/menu/index.js.map +1 -0
- package/dist/ui/components/menu/menu.d.ts +23 -0
- package/dist/ui/components/menu/menu.d.ts.map +1 -0
- package/dist/ui/components/menu/menu.js +45 -0
- package/dist/ui/components/menu/menu.js.map +1 -0
- package/dist/ui/components/navigation/breadcrumbs.d.ts +19 -0
- package/dist/ui/components/navigation/breadcrumbs.d.ts.map +1 -0
- package/dist/ui/components/navigation/breadcrumbs.js +90 -0
- package/dist/ui/components/navigation/breadcrumbs.js.map +1 -0
- package/dist/ui/components/navigation/index.d.ts +6 -0
- package/dist/ui/components/navigation/index.d.ts.map +1 -0
- package/dist/ui/components/navigation/index.js +6 -0
- package/dist/ui/components/navigation/index.js.map +1 -0
- package/dist/ui/components/navigation/prose.d.ts +6 -0
- package/dist/ui/components/navigation/prose.d.ts.map +1 -0
- package/dist/ui/components/navigation/prose.js +11 -0
- package/dist/ui/components/navigation/prose.js.map +1 -0
- package/dist/ui/components/navigation/sidebar.d.ts +10 -0
- package/dist/ui/components/navigation/sidebar.d.ts.map +1 -0
- package/dist/ui/components/navigation/sidebar.js +35 -0
- package/dist/ui/components/navigation/sidebar.js.map +1 -0
- package/dist/ui/components/navigation/toc.d.ts +11 -0
- package/dist/ui/components/navigation/toc.d.ts.map +1 -0
- package/dist/ui/components/navigation/toc.js +82 -0
- package/dist/ui/components/navigation/toc.js.map +1 -0
- package/dist/ui/components/navigation-menu/index.d.ts +5 -0
- package/dist/ui/components/navigation-menu/index.d.ts.map +1 -0
- package/dist/ui/components/navigation-menu/index.js +7 -0
- package/dist/ui/components/navigation-menu/index.js.map +1 -0
- package/dist/ui/components/number-input/index.d.ts +5 -0
- package/dist/ui/components/number-input/index.d.ts.map +1 -0
- package/dist/ui/components/number-input/index.js +7 -0
- package/dist/ui/components/number-input/index.js.map +1 -0
- package/dist/ui/components/pagination/index.d.ts +5 -0
- package/dist/ui/components/pagination/index.d.ts.map +1 -0
- package/dist/ui/components/pagination/index.js +7 -0
- package/dist/ui/components/pagination/index.js.map +1 -0
- package/dist/ui/components/password-input/index.d.ts +5 -0
- package/dist/ui/components/password-input/index.d.ts.map +1 -0
- package/dist/ui/components/password-input/index.js +7 -0
- package/dist/ui/components/password-input/index.js.map +1 -0
- package/dist/ui/components/pin-input/index.d.ts +5 -0
- package/dist/ui/components/pin-input/index.d.ts.map +1 -0
- package/dist/ui/components/pin-input/index.js +7 -0
- package/dist/ui/components/pin-input/index.js.map +1 -0
- package/dist/ui/components/popover/index.d.ts +2 -0
- package/dist/ui/components/popover/index.d.ts.map +1 -0
- package/dist/ui/components/popover/index.js +2 -0
- package/dist/ui/components/popover/index.js.map +1 -0
- package/dist/ui/components/popover/popover.d.ts +14 -0
- package/dist/ui/components/popover/popover.d.ts.map +1 -0
- package/dist/ui/components/popover/popover.js +22 -0
- package/dist/ui/components/popover/popover.js.map +1 -0
- package/dist/ui/components/presence/index.d.ts +5 -0
- package/dist/ui/components/presence/index.d.ts.map +1 -0
- package/dist/ui/components/presence/index.js +7 -0
- package/dist/ui/components/presence/index.js.map +1 -0
- package/dist/ui/components/progress/index.d.ts +5 -0
- package/dist/ui/components/progress/index.d.ts.map +1 -0
- package/dist/ui/components/progress/index.js +7 -0
- package/dist/ui/components/progress/index.js.map +1 -0
- package/dist/ui/components/qr-code/index.d.ts +5 -0
- package/dist/ui/components/qr-code/index.d.ts.map +1 -0
- package/dist/ui/components/qr-code/index.js +7 -0
- package/dist/ui/components/qr-code/index.js.map +1 -0
- package/dist/ui/components/radio-group/index.d.ts +5 -0
- package/dist/ui/components/radio-group/index.d.ts.map +1 -0
- package/dist/ui/components/radio-group/index.js +7 -0
- package/dist/ui/components/radio-group/index.js.map +1 -0
- package/dist/ui/components/rating-group/index.d.ts +5 -0
- package/dist/ui/components/rating-group/index.d.ts.map +1 -0
- package/dist/ui/components/rating-group/index.js +7 -0
- package/dist/ui/components/rating-group/index.js.map +1 -0
- package/dist/ui/components/resize-handle/index.d.ts +2 -0
- package/dist/ui/components/resize-handle/index.d.ts.map +1 -0
- package/dist/ui/components/resize-handle/index.js +2 -0
- package/dist/ui/components/resize-handle/index.js.map +1 -0
- package/dist/ui/components/resize-handle/resize-handle.d.ts +39 -0
- package/dist/ui/components/resize-handle/resize-handle.d.ts.map +1 -0
- package/dist/ui/components/resize-handle/resize-handle.js +170 -0
- package/dist/ui/components/resize-handle/resize-handle.js.map +1 -0
- package/dist/ui/components/scroll-area/index.d.ts +5 -0
- package/dist/ui/components/scroll-area/index.d.ts.map +1 -0
- package/dist/ui/components/scroll-area/index.js +7 -0
- package/dist/ui/components/scroll-area/index.js.map +1 -0
- package/dist/ui/components/select/index.d.ts +2 -0
- package/dist/ui/components/select/index.d.ts.map +1 -0
- package/dist/ui/components/select/index.js +2 -0
- package/dist/ui/components/select/index.js.map +1 -0
- package/dist/ui/components/select/select.d.ts +40 -0
- package/dist/ui/components/select/select.d.ts.map +1 -0
- package/dist/ui/components/select/select.js +57 -0
- package/dist/ui/components/select/select.js.map +1 -0
- package/dist/ui/components/separator/index.d.ts +2 -0
- package/dist/ui/components/separator/index.d.ts.map +1 -0
- package/dist/ui/components/separator/index.js +2 -0
- package/dist/ui/components/separator/index.js.map +1 -0
- package/dist/ui/components/separator/separator.d.ts +9 -0
- package/dist/ui/components/separator/separator.d.ts.map +1 -0
- package/dist/ui/components/separator/separator.js +27 -0
- package/dist/ui/components/separator/separator.js.map +1 -0
- package/dist/ui/components/signature-pad/index.d.ts +5 -0
- package/dist/ui/components/signature-pad/index.d.ts.map +1 -0
- package/dist/ui/components/signature-pad/index.js +7 -0
- package/dist/ui/components/signature-pad/index.js.map +1 -0
- package/dist/ui/components/slider/index.d.ts +5 -0
- package/dist/ui/components/slider/index.d.ts.map +1 -0
- package/dist/ui/components/slider/index.js +7 -0
- package/dist/ui/components/slider/index.js.map +1 -0
- package/dist/ui/components/splitter/index.d.ts +5 -0
- package/dist/ui/components/splitter/index.d.ts.map +1 -0
- package/dist/ui/components/splitter/index.js +7 -0
- package/dist/ui/components/splitter/index.js.map +1 -0
- package/dist/ui/components/steps/index.d.ts +5 -0
- package/dist/ui/components/steps/index.d.ts.map +1 -0
- package/dist/ui/components/steps/index.js +7 -0
- package/dist/ui/components/steps/index.js.map +1 -0
- package/dist/ui/components/switch/index.d.ts +2 -0
- package/dist/ui/components/switch/index.d.ts.map +1 -0
- package/dist/ui/components/switch/index.js +2 -0
- package/dist/ui/components/switch/index.js.map +1 -0
- package/dist/ui/components/switch/switch.d.ts +48 -0
- package/dist/ui/components/switch/switch.d.ts.map +1 -0
- package/dist/ui/components/switch/switch.js +64 -0
- package/dist/ui/components/switch/switch.js.map +1 -0
- package/dist/ui/components/tabs/index.d.ts +2 -0
- package/dist/ui/components/tabs/index.d.ts.map +1 -0
- package/dist/ui/components/tabs/index.js +2 -0
- package/dist/ui/components/tabs/index.js.map +1 -0
- package/dist/ui/components/tabs/tabs.d.ts +22 -0
- package/dist/ui/components/tabs/tabs.d.ts.map +1 -0
- package/dist/ui/components/tabs/tabs.js +89 -0
- package/dist/ui/components/tabs/tabs.js.map +1 -0
- package/dist/ui/components/tags-input/index.d.ts +5 -0
- package/dist/ui/components/tags-input/index.d.ts.map +1 -0
- package/dist/ui/components/tags-input/index.js +7 -0
- package/dist/ui/components/tags-input/index.js.map +1 -0
- package/dist/ui/components/timer/index.d.ts +7 -0
- package/dist/ui/components/timer/index.d.ts.map +1 -0
- package/dist/ui/components/timer/index.js +8 -0
- package/dist/ui/components/timer/index.js.map +1 -0
- package/dist/ui/components/toast/index.d.ts +7 -0
- package/dist/ui/components/toast/index.d.ts.map +1 -0
- package/dist/ui/components/toast/index.js +8 -0
- package/dist/ui/components/toast/index.js.map +1 -0
- package/dist/ui/components/toc/index.d.ts +5 -0
- package/dist/ui/components/toc/index.d.ts.map +1 -0
- package/dist/ui/components/toc/index.js +7 -0
- package/dist/ui/components/toc/index.js.map +1 -0
- package/dist/ui/components/toggle/index.d.ts +5 -0
- package/dist/ui/components/toggle/index.d.ts.map +1 -0
- package/dist/ui/components/toggle/index.js +7 -0
- package/dist/ui/components/toggle/index.js.map +1 -0
- package/dist/ui/components/toggle-group/index.d.ts +5 -0
- package/dist/ui/components/toggle-group/index.d.ts.map +1 -0
- package/dist/ui/components/toggle-group/index.js +7 -0
- package/dist/ui/components/toggle-group/index.js.map +1 -0
- package/dist/ui/components/toolbar/index.d.ts +11 -0
- package/dist/ui/components/toolbar/index.d.ts.map +1 -0
- package/dist/ui/components/toolbar/index.js +18 -0
- package/dist/ui/components/toolbar/index.js.map +1 -0
- package/dist/ui/components/tooltip/index.d.ts +2 -0
- package/dist/ui/components/tooltip/index.d.ts.map +1 -0
- package/dist/ui/components/tooltip/index.js +2 -0
- package/dist/ui/components/tooltip/index.js.map +1 -0
- package/dist/ui/components/tooltip/tooltip.d.ts +14 -0
- package/dist/ui/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/ui/components/tooltip/tooltip.js +22 -0
- package/dist/ui/components/tooltip/tooltip.js.map +1 -0
- package/dist/ui/components/tour/index.d.ts +5 -0
- package/dist/ui/components/tour/index.d.ts.map +1 -0
- package/dist/ui/components/tour/index.js +7 -0
- package/dist/ui/components/tour/index.js.map +1 -0
- package/dist/ui/components/tree-view/index.d.ts +7 -0
- package/dist/ui/components/tree-view/index.d.ts.map +1 -0
- package/dist/ui/components/tree-view/index.js +8 -0
- package/dist/ui/components/tree-view/index.js.map +1 -0
- package/dist/ui/core/button-behavior.d.ts +3 -0
- package/dist/ui/core/button-behavior.d.ts.map +1 -0
- package/dist/ui/core/button-behavior.js +50 -0
- package/dist/ui/core/button-behavior.js.map +1 -0
- package/dist/ui/core/catalogue-element.d.ts +6 -0
- package/dist/ui/core/catalogue-element.d.ts.map +1 -0
- package/dist/ui/core/catalogue-element.js +28 -0
- package/dist/ui/core/catalogue-element.js.map +1 -0
- package/dist/ui/core/component-styles.d.ts +2 -0
- package/dist/ui/core/component-styles.d.ts.map +1 -0
- package/dist/ui/core/component-styles.js +77 -0
- package/dist/ui/core/component-styles.js.map +1 -0
- package/dist/ui/core/element.d.ts +12 -0
- package/dist/ui/core/element.d.ts.map +1 -0
- package/dist/ui/core/element.js +57 -0
- package/dist/ui/core/element.js.map +1 -0
- package/dist/ui/core/events.d.ts +6 -0
- package/dist/ui/core/events.d.ts.map +1 -0
- package/dist/ui/core/events.js +13 -0
- package/dist/ui/core/events.js.map +1 -0
- package/dist/ui/core/form-control.d.ts +4 -0
- package/dist/ui/core/form-control.d.ts.map +1 -0
- package/dist/ui/core/form-control.js +25 -0
- package/dist/ui/core/form-control.js.map +1 -0
- package/dist/ui/core/index.d.ts +5 -0
- package/dist/ui/core/index.d.ts.map +1 -0
- package/dist/ui/core/index.js +5 -0
- package/dist/ui/core/index.js.map +1 -0
- package/dist/ui/core/layout-styles.d.ts +2 -0
- package/dist/ui/core/layout-styles.d.ts.map +1 -0
- package/dist/ui/core/layout-styles.js +58 -0
- package/dist/ui/core/layout-styles.js.map +1 -0
- package/dist/ui/core/machine-checkpoints.d.ts +6 -0
- package/dist/ui/core/machine-checkpoints.d.ts.map +1 -0
- package/dist/ui/core/machine-checkpoints.js +47 -0
- package/dist/ui/core/machine-checkpoints.js.map +1 -0
- package/dist/ui/core/machine-clock.d.ts +16 -0
- package/dist/ui/core/machine-clock.d.ts.map +1 -0
- package/dist/ui/core/machine-clock.js +89 -0
- package/dist/ui/core/machine-clock.js.map +1 -0
- package/dist/ui/core/machine-codec.d.ts +29 -0
- package/dist/ui/core/machine-codec.d.ts.map +1 -0
- package/dist/ui/core/machine-codec.js +217 -0
- package/dist/ui/core/machine-codec.js.map +1 -0
- package/dist/ui/core/machine-profiles.d.ts +437 -0
- package/dist/ui/core/machine-profiles.d.ts.map +1 -0
- package/dist/ui/core/machine-profiles.js +1175 -0
- package/dist/ui/core/machine-profiles.js.map +1 -0
- package/dist/ui/core/machine-resources.d.ts +6 -0
- package/dist/ui/core/machine-resources.d.ts.map +1 -0
- package/dist/ui/core/machine-resources.js +46 -0
- package/dist/ui/core/machine-resources.js.map +1 -0
- package/dist/ui/core/machine.d.ts +29 -0
- package/dist/ui/core/machine.d.ts.map +1 -0
- package/dist/ui/core/machine.js +111 -0
- package/dist/ui/core/machine.js.map +1 -0
- package/dist/ui/core/parts.d.ts +4 -0
- package/dist/ui/core/parts.d.ts.map +1 -0
- package/dist/ui/core/parts.js +33 -0
- package/dist/ui/core/parts.js.map +1 -0
- package/dist/ui/core/portal.d.ts +11 -0
- package/dist/ui/core/portal.d.ts.map +1 -0
- package/dist/ui/core/portal.js +71 -0
- package/dist/ui/core/portal.js.map +1 -0
- package/dist/ui/core/public-machine.d.ts +4 -0
- package/dist/ui/core/public-machine.d.ts.map +1 -0
- package/dist/ui/core/public-machine.js +26 -0
- package/dist/ui/core/public-machine.js.map +1 -0
- package/dist/ui/core/resumable-machine.d.ts +13 -0
- package/dist/ui/core/resumable-machine.d.ts.map +1 -0
- package/dist/ui/core/resumable-machine.js +336 -0
- package/dist/ui/core/resumable-machine.js.map +1 -0
- package/dist/ui/drivers/bulma.d.ts +3 -0
- package/dist/ui/drivers/bulma.d.ts.map +1 -0
- package/dist/ui/drivers/bulma.js +249 -0
- package/dist/ui/drivers/bulma.js.map +1 -0
- package/dist/ui/drivers/daisyui.d.ts +9 -0
- package/dist/ui/drivers/daisyui.d.ts.map +1 -0
- package/dist/ui/drivers/daisyui.js +107 -0
- package/dist/ui/drivers/daisyui.js.map +1 -0
- package/dist/ui/drivers/index.d.ts +7 -0
- package/dist/ui/drivers/index.d.ts.map +1 -0
- package/dist/ui/drivers/index.js +7 -0
- package/dist/ui/drivers/index.js.map +1 -0
- package/dist/ui/drivers/registry.d.ts +11 -0
- package/dist/ui/drivers/registry.d.ts.map +1 -0
- package/dist/ui/drivers/registry.js +109 -0
- package/dist/ui/drivers/registry.js.map +1 -0
- package/dist/ui/drivers/shadcn.d.ts +3 -0
- package/dist/ui/drivers/shadcn.d.ts.map +1 -0
- package/dist/ui/drivers/shadcn.js +288 -0
- package/dist/ui/drivers/shadcn.js.map +1 -0
- package/dist/ui/drivers/types.d.ts +43 -0
- package/dist/ui/drivers/types.d.ts.map +1 -0
- package/dist/ui/drivers/types.js +2 -0
- package/dist/ui/drivers/types.js.map +1 -0
- package/dist/ui/drivers/unstyled.d.ts +3 -0
- package/dist/ui/drivers/unstyled.d.ts.map +1 -0
- package/dist/ui/drivers/unstyled.js +226 -0
- package/dist/ui/drivers/unstyled.js.map +1 -0
- package/dist/ui/engine.d.ts +24 -0
- package/dist/ui/engine.d.ts.map +1 -0
- package/dist/ui/engine.js +22 -0
- package/dist/ui/engine.js.map +1 -0
- package/dist/ui/index.d.ts +7 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/machine-state.d.ts +349 -0
- package/dist/ui/machine-state.d.ts.map +1 -0
- package/dist/ui/machine-state.js +105 -0
- package/dist/ui/machine-state.js.map +1 -0
- package/dist/ui/presentation.d.ts +7 -0
- package/dist/ui/presentation.d.ts.map +1 -0
- package/dist/ui/presentation.js +21 -0
- package/dist/ui/presentation.js.map +1 -0
- package/dist/ui/render.d.ts +18 -0
- package/dist/ui/render.d.ts.map +1 -0
- package/dist/ui/render.js +31 -0
- package/dist/ui/render.js.map +1 -0
- package/dist/ui/resume.d.ts +28 -0
- package/dist/ui/resume.d.ts.map +1 -0
- package/dist/ui/resume.js +417 -0
- package/dist/ui/resume.js.map +1 -0
- package/dist/ui/server.d.ts +9 -0
- package/dist/ui/server.d.ts.map +1 -0
- package/dist/ui/server.js +6 -0
- package/dist/ui/server.js.map +1 -0
- package/dist/ui/state.d.ts +24 -0
- package/dist/ui/state.d.ts.map +1 -0
- package/dist/ui/state.js +64 -0
- package/dist/ui/state.js.map +1 -0
- package/dist/ui-server.d.ts +2 -0
- package/dist/ui-server.d.ts.map +1 -0
- package/dist/ui-server.js +2 -0
- package/dist/ui-server.js.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +2 -0
- package/dist/ui.js.map +1 -0
- package/dist/vite-environments.d.ts +27 -0
- package/dist/vite-environments.d.ts.map +1 -0
- package/dist/vite-environments.js +63 -0
- package/dist/vite-environments.js.map +1 -0
- package/dist/vite.d.ts +113 -3
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +1290 -196
- package/dist/vite.js.map +1 -1
- package/dist/workflow/browser.d.ts +7 -0
- package/dist/workflow/browser.d.ts.map +1 -0
- package/dist/workflow/browser.js +60 -0
- package/dist/workflow/browser.js.map +1 -0
- package/dist/workflow/compiler.d.ts +8 -0
- package/dist/workflow/compiler.d.ts.map +1 -0
- package/dist/workflow/compiler.js +122 -0
- package/dist/workflow/compiler.js.map +1 -0
- package/dist/workflow/http.d.ts +20 -0
- package/dist/workflow/http.d.ts.map +1 -0
- package/dist/workflow/http.js +68 -0
- package/dist/workflow/http.js.map +1 -0
- package/dist/workflow/index.d.ts +46 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +91 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/journal.d.ts +9 -0
- package/dist/workflow/journal.d.ts.map +1 -0
- package/dist/workflow/journal.js +18 -0
- package/dist/workflow/journal.js.map +1 -0
- package/dist/workflow/node.d.ts +6 -0
- package/dist/workflow/node.d.ts.map +1 -0
- package/dist/workflow/node.js +24 -0
- package/dist/workflow/node.js.map +1 -0
- package/dist/workflow/operation.d.ts +23 -0
- package/dist/workflow/operation.d.ts.map +1 -0
- package/dist/workflow/operation.js +65 -0
- package/dist/workflow/operation.js.map +1 -0
- package/dist/workflow/protocol.d.ts +36 -0
- package/dist/workflow/protocol.d.ts.map +1 -0
- package/dist/workflow/protocol.js +45 -0
- package/dist/workflow/protocol.js.map +1 -0
- package/package.json +158 -27
- package/dist/create.d.ts +0 -21
- package/dist/create.d.ts.map +0 -1
- package/dist/create.js +0 -111
- package/dist/create.js.map +0 -1
- package/dist/runtime/atom.d.ts +0 -10
- package/dist/runtime/atom.d.ts.map +0 -1
- package/dist/runtime/atom.js +0 -38
- package/dist/runtime/atom.js.map +0 -1
- package/dist/ssr/node.d.ts +0 -3
- package/dist/ssr/node.d.ts.map +0 -1
- package/dist/ssr/node.js +0 -3
- package/dist/ssr/node.js.map +0 -1
- package/dist/ssr.d.ts +0 -4
- package/dist/ssr.d.ts.map +0 -1
- package/dist/ssr.js +0 -3
- package/dist/ssr.js.map +0 -1
- package/templates/basic/README.md +0 -18
- package/templates/basic/_gitignore +0 -3
- package/templates/basic/components/app-badge.html +0 -1
- package/templates/basic/index.html +0 -12
- package/templates/basic/islands/counter.ts +0 -13
- package/templates/basic/package.json +0 -26
- package/templates/basic/pages/about/index.html +0 -5
- package/templates/basic/pages/docs/index.md +0 -9
- package/templates/basic/pages/index.html +0 -9
- package/templates/basic/pages/layout.html +0 -8
- package/templates/basic/pnpm-workspace.yaml +0 -5
- package/templates/basic/server.mjs +0 -13
- package/templates/basic/style.css +0 -1
- package/templates/basic/tsconfig.json +0 -13
- package/templates/basic/vite.config.ts +0 -4
|
@@ -0,0 +1,678 @@
|
|
|
1
|
+
import { mountPageScriptsEffect } from "./page-scripts.js";
|
|
2
|
+
import { makeRouteMatches } from "./route-matches.js";
|
|
3
|
+
import { makeClientRouteMatcher } from "./client-routes.js";
|
|
4
|
+
import { errorHtml, notFoundHtml } from "../boundaries.js";
|
|
5
|
+
import { nearestScope, normalizeBase, routeKey, stripBase, withBase } from "../route-path.js";
|
|
6
|
+
import { coordinateNavigation } from "./coordinated-navigation.js";
|
|
7
|
+
import { abortRouteData, loadRouteData } from "./data.js";
|
|
8
|
+
import { commitTemplate, makeRouteAnnouncer, makeScrollManager, makeHeadManager, templateIdentity, renderIslandError } from "./dom-renderer.js";
|
|
9
|
+
import { navigateDocument, navigationBrowser, supportsBrowserNavigation } from "./browser-support.js";
|
|
10
|
+
import { makeNavigationCoordinator, NavigationLifecycleError } from "./coordinator.js";
|
|
11
|
+
import { NavigationError } from "./navigation.js";
|
|
12
|
+
import { mountIslandsEffect } from "./islands.js";
|
|
13
|
+
import * as Cause from "effect/Cause";
|
|
14
|
+
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Exit from "effect/Exit";
|
|
16
|
+
import * as Scope from "effect/Scope";
|
|
17
|
+
import * as Atom from "effect/reactivity/Atom";
|
|
18
|
+
import * as AtomRegistry from "effect/reactivity/AtomRegistry";
|
|
19
|
+
/** Canonical route key (see `routeKey`); undecodable paths are returned unchanged and match no route. */
|
|
20
|
+
export function normalizePath(path) {
|
|
21
|
+
const pathname = new URL(path, "http://fuzor.local").pathname;
|
|
22
|
+
return routeKey(pathname) ?? pathname;
|
|
23
|
+
}
|
|
24
|
+
const outsideBase = "\0outside-base";
|
|
25
|
+
const documentRouters = new WeakMap();
|
|
26
|
+
const activeRouters = new WeakMap();
|
|
27
|
+
/** The started SPA router that owns `document`, for code that did not create it (islands, app scripts). */
|
|
28
|
+
export function getRouter(document = globalThis.document) {
|
|
29
|
+
return document ? activeRouters.get(document) : undefined;
|
|
30
|
+
}
|
|
31
|
+
export function createRouterWith(outlet, options, transports) {
|
|
32
|
+
const document = outlet.ownerDocument;
|
|
33
|
+
const window = document.defaultView;
|
|
34
|
+
let registry = AtomRegistry.make();
|
|
35
|
+
const pathAtom = Atom.make("/").pipe(Atom.keepAlive);
|
|
36
|
+
const paramsAtom = Atom.make({}).pipe(Atom.keepAlive);
|
|
37
|
+
const stateAtom = Atom.make(undefined).pipe(Atom.keepAlive);
|
|
38
|
+
const routeAtom = Atom.make(undefined).pipe(Atom.keepAlive);
|
|
39
|
+
const urlAtom = Atom.make(document.baseURI).pipe(Atom.keepAlive);
|
|
40
|
+
const templates = new Map();
|
|
41
|
+
for (const template of document.querySelectorAll("template[data-fuzor-route]")) {
|
|
42
|
+
templates.set(normalizePath(template.dataset.fuzorRoute), template);
|
|
43
|
+
}
|
|
44
|
+
const clientMatch = makeClientRouteMatcher(options.clientRoutes);
|
|
45
|
+
const resolveMatches = makeRouteMatches(options.routeTree);
|
|
46
|
+
const matches = () => { const route = registry.get(routeAtom); return route?.kind === "page" ? resolveMatches(route.path) : []; };
|
|
47
|
+
for (const target of Object.values(options.clientRoutes ?? {})) {
|
|
48
|
+
const template = templates.get(normalizePath(target));
|
|
49
|
+
if (!template)
|
|
50
|
+
throw new Error(`Client route template ${target} is not compiled.`);
|
|
51
|
+
if (template.hasAttribute("data-fuzor-data"))
|
|
52
|
+
throw new Error("Client route templates cannot have server data; load data through client APIs.");
|
|
53
|
+
}
|
|
54
|
+
let renderer;
|
|
55
|
+
const acceptsRoute = (route) => Boolean(renderer?.match(route) || templateFor(route));
|
|
56
|
+
const templateFor = (route) => templates.get(route) ?? templates.get(clientMatch(route)?.template ?? "");
|
|
57
|
+
/** Boundary templates keyed by scope; the compiler emits `data-fuzor-not-found="/docs/"` and `data-fuzor-error="/"`. */
|
|
58
|
+
const boundaries = (kind, fallback) => {
|
|
59
|
+
const found = new Map();
|
|
60
|
+
for (const template of document.querySelectorAll(`template[data-fuzor-${kind}]`)) {
|
|
61
|
+
found.set(normalizePath(template.getAttribute(`data-fuzor-${kind}`) || "/"), template);
|
|
62
|
+
}
|
|
63
|
+
if (!found.has("/")) {
|
|
64
|
+
const template = document.createElement("template");
|
|
65
|
+
template.innerHTML = fallback;
|
|
66
|
+
found.set("/", template);
|
|
67
|
+
}
|
|
68
|
+
return found;
|
|
69
|
+
};
|
|
70
|
+
const notFoundTemplates = boundaries("not-found", notFoundHtml);
|
|
71
|
+
const errorTemplates = boundaries("error", errorHtml);
|
|
72
|
+
const boundaryFor = (templates, route) => templates.get(nearestScope(route === outsideBase ? "/" : route, templates.keys()) ?? "/");
|
|
73
|
+
const boundaryTemplates = new Set([...notFoundTemplates.values(), ...errorTemplates.values()]);
|
|
74
|
+
const redirects = JSON.parse(document.querySelector("script[data-fuzor-redirects]")?.textContent ?? "{}");
|
|
75
|
+
const metadata = JSON.parse(document.querySelector("script[data-fuzor-metadata]")?.textContent ?? "{}");
|
|
76
|
+
const headFor = (template, route) => {
|
|
77
|
+
for (const [kind, templates, title] of [["not-found", notFoundTemplates, "Page not found"], ["error", errorTemplates, "Something went wrong"]]) {
|
|
78
|
+
for (const [scope, candidate] of templates)
|
|
79
|
+
if (candidate === template)
|
|
80
|
+
return { title, ...metadata[`${kind}:${scope}`] };
|
|
81
|
+
}
|
|
82
|
+
return metadata[route] ?? metadata[clientMatch(route)?.template ?? ""] ?? {};
|
|
83
|
+
};
|
|
84
|
+
const loadData = (change) => {
|
|
85
|
+
void loadRouteData(outlet, { search: new URL(change.destination.url).search })
|
|
86
|
+
.catch(error => { if (error?.name !== "AbortError")
|
|
87
|
+
report(error); });
|
|
88
|
+
};
|
|
89
|
+
const paramsOf = (template) => boundaryTemplates.has(template) ? {} : JSON.parse(template.getAttribute("data-fuzor-params") ?? "{}");
|
|
90
|
+
const matchOf = (template, route) => {
|
|
91
|
+
const dynamic = templates.has(route) ? undefined : clientMatch(route);
|
|
92
|
+
const pattern = dynamic?.pattern ?? template.getAttribute("data-fuzor-pattern");
|
|
93
|
+
return Object.freeze({ kind: boundaryTemplates.has(template) ? "not-found" : "page", path: route === outsideBase ? "/" : route,
|
|
94
|
+
...(pattern ? { pattern } : {}), params: dynamic?.params ?? paramsOf(template) });
|
|
95
|
+
};
|
|
96
|
+
const updateHead = makeHeadManager(document, metadata[""]);
|
|
97
|
+
const base = normalizeBase(options.base);
|
|
98
|
+
/** Route key for an adapter pathname, with the deployment base removed for document transports. */
|
|
99
|
+
const routeOf = (pathname) => {
|
|
100
|
+
if (logicalTransport)
|
|
101
|
+
return normalizePath(pathname);
|
|
102
|
+
const inner = stripBase(pathname, base);
|
|
103
|
+
return inner === undefined ? outsideBase : normalizePath(inner);
|
|
104
|
+
};
|
|
105
|
+
let owner;
|
|
106
|
+
let adapter;
|
|
107
|
+
let logicalTransport = Boolean(options.navigation);
|
|
108
|
+
/** Set when the build has no in-place transport this browser supports; navigation then loads documents. */
|
|
109
|
+
let documentOnly = false;
|
|
110
|
+
let transition;
|
|
111
|
+
let startVersion = 0;
|
|
112
|
+
let starting;
|
|
113
|
+
let closing = Promise.resolve();
|
|
114
|
+
let registryClosed = false;
|
|
115
|
+
const token = Symbol("Fuzor router");
|
|
116
|
+
const closures = new WeakMap();
|
|
117
|
+
const stopScope = (scope) => {
|
|
118
|
+
const existing = closures.get(scope);
|
|
119
|
+
if (existing)
|
|
120
|
+
return existing;
|
|
121
|
+
if (owner === scope) {
|
|
122
|
+
startVersion++;
|
|
123
|
+
owner = undefined;
|
|
124
|
+
transition = undefined;
|
|
125
|
+
starting = undefined;
|
|
126
|
+
}
|
|
127
|
+
const activeRegistry = registry;
|
|
128
|
+
const cleanup = Effect.runPromise(Scope.close(scope, Exit.void)).catch(report).finally(() => {
|
|
129
|
+
activeRegistry.dispose();
|
|
130
|
+
registryClosed = true;
|
|
131
|
+
if (documentRouters.get(document) === token) {
|
|
132
|
+
documentRouters.delete(document);
|
|
133
|
+
activeRouters.delete(document);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
closures.set(scope, cleanup);
|
|
137
|
+
closing = cleanup;
|
|
138
|
+
return cleanup;
|
|
139
|
+
};
|
|
140
|
+
const report = options.onError ?? (error => console.error(error));
|
|
141
|
+
const blockers = new Set();
|
|
142
|
+
const isBlocked = (attempt) => {
|
|
143
|
+
for (const blocker of blockers) {
|
|
144
|
+
try {
|
|
145
|
+
if (blocker(attempt))
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
report(error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
};
|
|
154
|
+
/** Set while a command the blockers already allowed dispatches its own browser event. */
|
|
155
|
+
let approvedCommand = false;
|
|
156
|
+
let approvedTraversal;
|
|
157
|
+
let restoringTraversal = false;
|
|
158
|
+
const onBeforeUnload = (event) => {
|
|
159
|
+
if (isBlocked({ url: document.location?.href ?? document.baseURI, kind: "document" })) {
|
|
160
|
+
event.preventDefault();
|
|
161
|
+
event.returnValue = "";
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
// beforeunload listeners can disable the back/forward cache, so one exists only while blockers do.
|
|
165
|
+
const block = (blocker) => {
|
|
166
|
+
if (blockers.size === 0)
|
|
167
|
+
window?.addEventListener("beforeunload", onBeforeUnload);
|
|
168
|
+
blockers.add(blocker);
|
|
169
|
+
return () => {
|
|
170
|
+
if (blockers.delete(blocker) && blockers.size === 0)
|
|
171
|
+
window?.removeEventListener("beforeunload", onBeforeUnload);
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
/** Scroll and focus choices of pending `navigate()` calls, keyed by destination URL. */
|
|
175
|
+
const policies = new Map();
|
|
176
|
+
/** Route-fatal errors of the latest transition to each URL, read back by `navigate()`. */
|
|
177
|
+
const failures = new Map();
|
|
178
|
+
/** Replacement navigations started by compiled redirects, keyed by the redirected URL. */
|
|
179
|
+
const redirecting = new Map();
|
|
180
|
+
const navigate = (href, request = {}) => {
|
|
181
|
+
let settleCommitted;
|
|
182
|
+
let failCommitted;
|
|
183
|
+
const committed = new Promise((resolve, reject) => { settleCommitted = resolve; failCommitted = reject; });
|
|
184
|
+
const finished = (async () => {
|
|
185
|
+
if (!owner || !transition)
|
|
186
|
+
throw new NavigationError("Unsupported", "Start the Fuzor router before navigating");
|
|
187
|
+
const base = logicalTransport ? (await Effect.runPromise(adapter.current)).url : document.baseURI;
|
|
188
|
+
let url;
|
|
189
|
+
try {
|
|
190
|
+
url = new URL(href, base);
|
|
191
|
+
}
|
|
192
|
+
catch (error) {
|
|
193
|
+
throw new NavigationError("InvalidUrl", String(error));
|
|
194
|
+
}
|
|
195
|
+
const accepted = options.acceptsUrl?.(url) ?? (url.origin === new URL(document.baseURI).origin && ["http:", "https:"].includes(url.protocol));
|
|
196
|
+
// Like browser link navigation, a push to the current URL replaces the entry instead of duplicating it.
|
|
197
|
+
const history = (request.history ?? "auto") === "auto" ? (url.href === registry.get(urlAtom) ? "replace" : "push") : request.history;
|
|
198
|
+
if (request.document || documentOnly) {
|
|
199
|
+
if (logicalTransport)
|
|
200
|
+
throw new NavigationError("Unsupported", "Embedded documents cannot load another document; navigate without document: true");
|
|
201
|
+
if (isBlocked({ url: url.href, kind: "document" }))
|
|
202
|
+
return { status: "blocked", url: url.href };
|
|
203
|
+
await Effect.runPromise(navigateDocument(navigationBrowser(window, document), url.href, history === "replace"));
|
|
204
|
+
return { status: "document", url: url.href };
|
|
205
|
+
}
|
|
206
|
+
if (!logicalTransport && !accepted)
|
|
207
|
+
throw new NavigationError("InvalidUrl", `${url.href} is outside this app; use document: true to leave it`);
|
|
208
|
+
if (isBlocked({ url: url.href, kind: history }))
|
|
209
|
+
return { status: "blocked", url: url.href };
|
|
210
|
+
if (request.scroll || request.focus)
|
|
211
|
+
policies.set(url.href, { ...(request.scroll ? { scroll: request.scroll } : {}), ...(request.focus ? { focus: request.focus } : {}) });
|
|
212
|
+
approvedCommand = true;
|
|
213
|
+
let pending;
|
|
214
|
+
try {
|
|
215
|
+
pending = Effect.runPromise(adapter.navigate({ href: url.href, history, ...(request.state === undefined ? {} : { state: request.state }) }));
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
approvedCommand = false;
|
|
219
|
+
}
|
|
220
|
+
let result;
|
|
221
|
+
try {
|
|
222
|
+
result = await pending;
|
|
223
|
+
}
|
|
224
|
+
catch (error) {
|
|
225
|
+
policies.delete(url.href);
|
|
226
|
+
throw error;
|
|
227
|
+
}
|
|
228
|
+
let destination = result.change.destination.url;
|
|
229
|
+
settleCommitted({ status: "committed", url: destination });
|
|
230
|
+
const exit = await Effect.runPromiseExit(result.finished);
|
|
231
|
+
// A compiled redirect continues as a replacement navigation, which aborts this one in browsers with the
|
|
232
|
+
// Navigation API; report where it ended.
|
|
233
|
+
const redirect = redirecting.get(destination);
|
|
234
|
+
if (redirect) {
|
|
235
|
+
redirecting.delete(destination);
|
|
236
|
+
const followed = await redirect;
|
|
237
|
+
if (followed.status !== "completed")
|
|
238
|
+
return followed;
|
|
239
|
+
destination = followed.url;
|
|
240
|
+
const route = registry.get(routeAtom);
|
|
241
|
+
return { status: "completed", url: destination, ...(route ? { route } : {}) };
|
|
242
|
+
}
|
|
243
|
+
if (Exit.isFailure(exit)) {
|
|
244
|
+
if (Cause.hasInterruptsOnly(exit.cause))
|
|
245
|
+
return { status: "cancelled", url: destination };
|
|
246
|
+
return { status: "failed", url: destination, error: Cause.squash(exit.cause) };
|
|
247
|
+
}
|
|
248
|
+
const route = registry.get(routeAtom);
|
|
249
|
+
if (failures.has(destination)) {
|
|
250
|
+
const error = failures.get(destination);
|
|
251
|
+
failures.delete(destination);
|
|
252
|
+
return { status: "failed", url: destination, ...(route ? { route } : {}), error };
|
|
253
|
+
}
|
|
254
|
+
return { status: "completed", url: destination, ...(route ? { route } : {}) };
|
|
255
|
+
})();
|
|
256
|
+
finished.then(settleCommitted, failCommitted);
|
|
257
|
+
// Callers often await only one of the two; the other must not report an unhandled rejection.
|
|
258
|
+
committed.catch(() => { });
|
|
259
|
+
return Object.assign(finished, { committed, finished });
|
|
260
|
+
};
|
|
261
|
+
const prefetched = new Set();
|
|
262
|
+
const onIntent = (event) => {
|
|
263
|
+
if (window?.navigator?.connection?.saveData)
|
|
264
|
+
return;
|
|
265
|
+
const link = linkFor(event);
|
|
266
|
+
const raw = link?.getAttribute("href") ?? link?.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
|
267
|
+
if (!link || raw == null || link.hasAttribute("data-fuzor-reload") || link.hasAttribute("download"))
|
|
268
|
+
return;
|
|
269
|
+
let url;
|
|
270
|
+
try {
|
|
271
|
+
url = new URL(raw, logicalTransport ? registry.get(urlAtom) : link.baseURI || document.baseURI);
|
|
272
|
+
}
|
|
273
|
+
catch {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
if (!logicalTransport && url.origin !== new URL(document.baseURI).origin)
|
|
277
|
+
return;
|
|
278
|
+
const template = templateFor(routeOf(url.pathname));
|
|
279
|
+
if (!template)
|
|
280
|
+
return;
|
|
281
|
+
for (const host of template.content.querySelectorAll("fuzor-island[src]")) {
|
|
282
|
+
const name = host.getAttribute("src");
|
|
283
|
+
const key = `island:${name}`;
|
|
284
|
+
const load = options.islands?.[name];
|
|
285
|
+
if (!load || prefetched.has(key))
|
|
286
|
+
continue;
|
|
287
|
+
prefetched.add(key);
|
|
288
|
+
// Failures are ignored here; activation reports them if the page is actually opened.
|
|
289
|
+
void load().catch(() => { prefetched.delete(key); });
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const linkFor = (event) => {
|
|
293
|
+
// composedPath() sees through open shadow roots; SVG anchors are not HTMLAnchorElements.
|
|
294
|
+
for (const node of event.composedPath()) {
|
|
295
|
+
const element = node;
|
|
296
|
+
if (typeof element.getAttribute !== "function" || typeof element.localName !== "string")
|
|
297
|
+
continue;
|
|
298
|
+
const name = element.localName;
|
|
299
|
+
if ((name === "a" || name === "area") && (element.hasAttribute("href") || element.hasAttributeNS("http://www.w3.org/1999/xlink", "href")))
|
|
300
|
+
return element;
|
|
301
|
+
}
|
|
302
|
+
return undefined;
|
|
303
|
+
};
|
|
304
|
+
const onClick = (event) => {
|
|
305
|
+
if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)
|
|
306
|
+
return;
|
|
307
|
+
const link = linkFor(event);
|
|
308
|
+
if (!link)
|
|
309
|
+
return;
|
|
310
|
+
const target = link.getAttribute("target");
|
|
311
|
+
if ((target && target !== "_self") || link.hasAttribute("download") || link.hasAttribute("data-fuzor-reload"))
|
|
312
|
+
return;
|
|
313
|
+
const raw = (link.getAttribute("href") ?? link.getAttributeNS("http://www.w3.org/1999/xlink", "href") ?? "").trim();
|
|
314
|
+
if (logicalTransport && (raw.startsWith("#") || raw.startsWith("?"))) {
|
|
315
|
+
let logical;
|
|
316
|
+
try {
|
|
317
|
+
logical = new URL(raw, registry.get(urlAtom));
|
|
318
|
+
}
|
|
319
|
+
catch {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (!acceptsRoute(routeOf(logical.pathname)) && !Object.hasOwn(redirects, routeOf(logical.pathname)))
|
|
323
|
+
return;
|
|
324
|
+
event.preventDefault();
|
|
325
|
+
void navigate(logical.href).catch(report);
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
let url;
|
|
329
|
+
try {
|
|
330
|
+
url = new URL(raw, link.baseURI || document.baseURI);
|
|
331
|
+
}
|
|
332
|
+
catch {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
const transport = new URL(document.baseURI);
|
|
336
|
+
const allowed = options.acceptsUrl?.(url) ?? (url.origin === transport.origin && url.host === transport.host &&
|
|
337
|
+
(logicalTransport ? url.protocol === transport.protocol : ["http:", "https:"].includes(url.protocol)));
|
|
338
|
+
if (!allowed || !(acceptsRoute(routeOf(url.pathname)) || Object.hasOwn(redirects, routeOf(url.pathname))))
|
|
339
|
+
return;
|
|
340
|
+
event.preventDefault();
|
|
341
|
+
void navigate(logicalTransport ? url.pathname + url.search + url.hash : url.href).catch(report);
|
|
342
|
+
};
|
|
343
|
+
const start = () => {
|
|
344
|
+
if (starting)
|
|
345
|
+
return starting;
|
|
346
|
+
const version = ++startVersion;
|
|
347
|
+
starting = (async () => {
|
|
348
|
+
await closing;
|
|
349
|
+
if (version !== startVersion)
|
|
350
|
+
return async () => { };
|
|
351
|
+
if (documentRouters.has(document)) {
|
|
352
|
+
starting = undefined;
|
|
353
|
+
throw new Error("Only one active Fuzor SPA router can own document navigation");
|
|
354
|
+
}
|
|
355
|
+
if (registryClosed) {
|
|
356
|
+
registry = AtomRegistry.make();
|
|
357
|
+
registryClosed = false;
|
|
358
|
+
}
|
|
359
|
+
const scope = await Effect.runPromise(Scope.make());
|
|
360
|
+
if (version !== startVersion) {
|
|
361
|
+
await Effect.runPromise(Scope.close(scope, Exit.void));
|
|
362
|
+
return async () => { };
|
|
363
|
+
}
|
|
364
|
+
if (documentRouters.has(document)) {
|
|
365
|
+
await Effect.runPromise(Scope.close(scope, Exit.void));
|
|
366
|
+
starting = undefined;
|
|
367
|
+
throw new Error("Only one active Fuzor SPA router can own document navigation");
|
|
368
|
+
}
|
|
369
|
+
documentRouters.set(document, token);
|
|
370
|
+
activeRouters.set(document, api);
|
|
371
|
+
owner = scope;
|
|
372
|
+
const scoped = (effect) => Effect.runPromise(effect.pipe(Effect.provideService(Scope.Scope, scope)));
|
|
373
|
+
try {
|
|
374
|
+
const scrolling = window ? makeScrollManager(outlet, window) : undefined;
|
|
375
|
+
if (window)
|
|
376
|
+
await scoped(Effect.acquireRelease(Effect.sync(() => {
|
|
377
|
+
const hide = (event) => {
|
|
378
|
+
// Keep this entry's scroll position for a reload or a later return from another document.
|
|
379
|
+
if (adapter && !adapter.capabilities.nativeScroll)
|
|
380
|
+
scrolling?.remember(Effect.runSync(adapter.current).key);
|
|
381
|
+
if (!event.persisted)
|
|
382
|
+
void stopScope(scope);
|
|
383
|
+
};
|
|
384
|
+
window.addEventListener("pagehide", hide);
|
|
385
|
+
return hide;
|
|
386
|
+
}), hide => Effect.sync(() => window.removeEventListener("pagehide", hide))));
|
|
387
|
+
await scoped(Effect.addFinalizer(() => Effect.sync(() => { abortRouteData(outlet); restoringTraversal = false; approvedTraversal = undefined; })));
|
|
388
|
+
const announcer = await scoped(Effect.acquireRelease(Effect.sync(() => makeRouteAnnouncer(document, outlet)), announcer => Effect.sync(announcer.dispose)));
|
|
389
|
+
if (options.renderer) {
|
|
390
|
+
renderer = options.renderer(outlet);
|
|
391
|
+
const currentRenderer = renderer;
|
|
392
|
+
await scoped(Effect.addFinalizer(() => Effect.tryPromise({
|
|
393
|
+
try: () => currentRenderer.dispose(), catch: error => error
|
|
394
|
+
}).pipe(Effect.catch(error => Effect.sync(() => report(error))), Effect.tap(() => Effect.sync(() => { if (renderer === currentRenderer)
|
|
395
|
+
renderer = undefined; })))));
|
|
396
|
+
}
|
|
397
|
+
let renderedPath;
|
|
398
|
+
const coordinator = await scoped(makeNavigationCoordinator({
|
|
399
|
+
resolve: change => Effect.tryPromise({
|
|
400
|
+
try: async (signal) => {
|
|
401
|
+
const route = routeOf(change.destination.pathname);
|
|
402
|
+
const found = renderer?.match(route);
|
|
403
|
+
if (found && renderer) {
|
|
404
|
+
const payload = await renderer.resolve(change.destination.url, signal, renderedPath === undefined);
|
|
405
|
+
return { template: boundaryFor(notFoundTemplates, route), match: Object.freeze({ kind: "page", path: route, ...found }), tree: { payload } };
|
|
406
|
+
}
|
|
407
|
+
const template = templateFor(route) ?? boundaryFor(notFoundTemplates, route);
|
|
408
|
+
return { template, match: matchOf(template, route) };
|
|
409
|
+
}, catch: error => new NavigationLifecycleError("resolve", error)
|
|
410
|
+
}),
|
|
411
|
+
commit: (resolved, change) => {
|
|
412
|
+
const { template, match, tree } = resolved;
|
|
413
|
+
if (tree)
|
|
414
|
+
return Effect.tryPromise({
|
|
415
|
+
try: async (signal) => {
|
|
416
|
+
await renderer.commit(tree.payload, signal);
|
|
417
|
+
if (signal.aborted)
|
|
418
|
+
return;
|
|
419
|
+
abortRouteData(outlet);
|
|
420
|
+
outlet.removeAttribute("data-fuzor-data");
|
|
421
|
+
outlet.removeAttribute("data-fuzor-params");
|
|
422
|
+
registry.set(paramsAtom, match.params);
|
|
423
|
+
registry.set(routeAtom, match);
|
|
424
|
+
registry.set(pathAtom, match.path);
|
|
425
|
+
renderedPath = match.path;
|
|
426
|
+
}, catch: error => new NavigationLifecycleError("commit", error)
|
|
427
|
+
});
|
|
428
|
+
const apply = () => {
|
|
429
|
+
const route = routeOf(change.destination.pathname);
|
|
430
|
+
const params = match.params;
|
|
431
|
+
// Adopt compiler-rendered HTML only on the first matching route commit.
|
|
432
|
+
const adopt = renderedPath === undefined && outlet.getAttribute("data-fuzor-initial-route") === route &&
|
|
433
|
+
(outlet.getAttribute("data-fuzor-initial-template") ?? route) === templateIdentity(template);
|
|
434
|
+
outlet.removeAttribute("data-fuzor-initial-route");
|
|
435
|
+
outlet.removeAttribute("data-fuzor-initial-template");
|
|
436
|
+
if (!adopt) {
|
|
437
|
+
outlet.removeAttribute("data-fuzor-data-ready");
|
|
438
|
+
commitTemplate(outlet, template);
|
|
439
|
+
}
|
|
440
|
+
if (Object.keys(params).length)
|
|
441
|
+
outlet.setAttribute("data-fuzor-params", JSON.stringify(params));
|
|
442
|
+
else
|
|
443
|
+
outlet.removeAttribute("data-fuzor-params");
|
|
444
|
+
const data = boundaryTemplates.has(template) ? null : template.getAttribute("data-fuzor-data");
|
|
445
|
+
abortRouteData(outlet);
|
|
446
|
+
if (data) {
|
|
447
|
+
outlet.setAttribute("data-fuzor-data", data);
|
|
448
|
+
// Start before island activation so islands share this request through routeData().
|
|
449
|
+
loadData(change);
|
|
450
|
+
}
|
|
451
|
+
else
|
|
452
|
+
outlet.removeAttribute("data-fuzor-data");
|
|
453
|
+
updateHead(headFor(template, route));
|
|
454
|
+
registry.set(paramsAtom, params);
|
|
455
|
+
registry.set(routeAtom, match);
|
|
456
|
+
registry.set(pathAtom, route);
|
|
457
|
+
// The DOM already belongs to this route, even while its islands are still activating.
|
|
458
|
+
renderedPath = route;
|
|
459
|
+
};
|
|
460
|
+
const startViewTransition = document.startViewTransition;
|
|
461
|
+
const animate = options.viewTransitions && change.kind !== "reload" && typeof startViewTransition === "function" &&
|
|
462
|
+
!window?.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
463
|
+
const clear = renderer ? Effect.tryPromise({ try: () => renderer.clear(), catch: error => new NavigationLifecycleError("commit", error) }) : Effect.void;
|
|
464
|
+
if (!animate)
|
|
465
|
+
return clear.pipe(Effect.andThen(Effect.try({ try: apply, catch: error => new NavigationLifecycleError("commit", error) })));
|
|
466
|
+
// The DOM update runs inside the transition; the navigation continues once it has been applied.
|
|
467
|
+
return clear.pipe(Effect.andThen(Effect.tryPromise({
|
|
468
|
+
try: signal => {
|
|
469
|
+
const animation = startViewTransition.call(document, () => { if (!signal.aborted)
|
|
470
|
+
apply(); });
|
|
471
|
+
// Skipping an animation rejects ready. DOM failures are handled through updateCallbackDone.
|
|
472
|
+
void Promise.all([animation.ready, animation.finished]).catch(() => { });
|
|
473
|
+
return animation.updateCallbackDone;
|
|
474
|
+
},
|
|
475
|
+
catch: error => new NavigationLifecycleError("commit", error)
|
|
476
|
+
})));
|
|
477
|
+
},
|
|
478
|
+
activate: (resolved) => Effect.gen(function* () {
|
|
479
|
+
if (!resolved.tree)
|
|
480
|
+
yield* mountIslandsEffect(outlet, options.islands ?? {}, (error, host, retry) => {
|
|
481
|
+
report(error);
|
|
482
|
+
renderIslandError(host, retry);
|
|
483
|
+
}, options.islandTimeouts);
|
|
484
|
+
if (!resolved.tree) {
|
|
485
|
+
const template = resolved.template;
|
|
486
|
+
const route = template.getAttribute("data-fuzor-route") ?? (template.hasAttribute("data-fuzor-not-found") ? `not-found:${template.getAttribute("data-fuzor-not-found")}` : `error:${template.getAttribute("data-fuzor-error")}`);
|
|
487
|
+
yield* mountPageScriptsEffect(outlet, options.scripts ?? {}, route, { onError: report });
|
|
488
|
+
}
|
|
489
|
+
}).pipe(Effect.mapError(error => new NavigationLifecycleError("activate", error)))
|
|
490
|
+
}));
|
|
491
|
+
await scoped(coordinator.subscribe(() => {
|
|
492
|
+
const state = coordinator.state();
|
|
493
|
+
if (!state)
|
|
494
|
+
return;
|
|
495
|
+
// The public state carries the route match, not the template element.
|
|
496
|
+
const { route, ...rest } = state;
|
|
497
|
+
registry.set(stateAtom, Object.freeze({ ...rest, ...(route ? { route: route.match } : {}) }));
|
|
498
|
+
}));
|
|
499
|
+
transition = change => {
|
|
500
|
+
if (change.kind === "traverse") {
|
|
501
|
+
if (restoringTraversal) {
|
|
502
|
+
restoringTraversal = false;
|
|
503
|
+
return Effect.void;
|
|
504
|
+
}
|
|
505
|
+
const approved = approvedTraversal !== undefined && approvedTraversal === change.destination.key;
|
|
506
|
+
approvedTraversal = undefined;
|
|
507
|
+
if (!approved && blockers.size && isBlocked({ url: change.destination.url, kind: "traverse" })) {
|
|
508
|
+
// Back/Forward already changed the URL and could not be cancelled: return to the previous entry.
|
|
509
|
+
if (change.delta !== null && change.delta !== 0) {
|
|
510
|
+
restoringTraversal = true;
|
|
511
|
+
return adapter.traverse(-change.delta).pipe(Effect.asVoid, Effect.catch(error => Effect.sync(() => { restoringTraversal = false; report(error); })));
|
|
512
|
+
}
|
|
513
|
+
report(new Error("A navigation blocker could not undo a traversal with an unknown distance; the navigation continued."));
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
const redirect = redirects[routeOf(change.destination.pathname)];
|
|
517
|
+
if (redirect !== undefined) {
|
|
518
|
+
// A successor navigation: it does not wait for the transition that discovered it.
|
|
519
|
+
return Effect.sync(() => {
|
|
520
|
+
if (/^https?:\/\//i.test(redirect)) {
|
|
521
|
+
window?.location.replace(redirect);
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
const target = new URL(logicalTransport ? redirect : withBase(redirect, base), change.destination.url);
|
|
525
|
+
if (!target.search)
|
|
526
|
+
target.search = new URL(change.destination.url).search;
|
|
527
|
+
const followed = Effect.runPromise(adapter.navigate({ href: target.href, history: "replace" })).then(async (result) => {
|
|
528
|
+
const exit = await Effect.runPromiseExit(result.finished);
|
|
529
|
+
const url = result.change.destination.url;
|
|
530
|
+
return Exit.isSuccess(exit) ? { status: "completed", url }
|
|
531
|
+
: Cause.hasInterruptsOnly(exit.cause) ? { status: "cancelled", url } : { status: "failed", url, error: Cause.squash(exit.cause) };
|
|
532
|
+
});
|
|
533
|
+
followed.catch(report);
|
|
534
|
+
redirecting.set(change.destination.url, followed.catch(error => ({ status: "failed", url: target.href, error })));
|
|
535
|
+
if (redirecting.size > 32)
|
|
536
|
+
redirecting.delete(redirecting.keys().next().value);
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
registry.set(urlAtom, change.destination.url);
|
|
540
|
+
failures.delete(change.destination.url);
|
|
541
|
+
const policy = change.kind === "traverse" ? undefined : policies.get(change.destination.url);
|
|
542
|
+
policies.delete(change.destination.url);
|
|
543
|
+
const pathname = routeOf(change.destination.pathname);
|
|
544
|
+
const firstRender = renderedPath === undefined;
|
|
545
|
+
// A pending or canceled commit cannot be treated as a settled same-page query change.
|
|
546
|
+
const replaced = Boolean(renderer?.match(pathname)) || pathname !== renderedPath || change.kind === "reload" || coordinator.state()?.phase !== "completed";
|
|
547
|
+
// The first render must not overwrite the position this entry had before a reload.
|
|
548
|
+
if (!adapter?.capabilities.nativeScroll && renderedPath !== undefined)
|
|
549
|
+
scrolling?.save(change);
|
|
550
|
+
// Route-fatal failures (resolve/commit) show the nearest error boundary; the URL has already
|
|
551
|
+
// committed, so there is no rollback. Island failures stay inside their own boundaries.
|
|
552
|
+
const work = replaced ? coordinator.transition(change).pipe(Effect.catch(error => (renderer ? Effect.tryPromise({ try: () => renderer.clear(), catch: cleanup => cleanup }).pipe(Effect.catch(cleanup => Effect.sync(() => report(cleanup)))) : Effect.void).pipe(Effect.andThen(Effect.sync(() => {
|
|
553
|
+
report(error);
|
|
554
|
+
failures.set(change.destination.url, error);
|
|
555
|
+
if (failures.size > 32)
|
|
556
|
+
failures.delete(failures.keys().next().value);
|
|
557
|
+
const route = routeOf(change.destination.pathname);
|
|
558
|
+
try {
|
|
559
|
+
const template = boundaryFor(errorTemplates, route);
|
|
560
|
+
commitTemplate(outlet, template);
|
|
561
|
+
updateHead(headFor(template, route));
|
|
562
|
+
}
|
|
563
|
+
catch (boundaryError) {
|
|
564
|
+
report(boundaryError);
|
|
565
|
+
const fallback = document.createElement("p");
|
|
566
|
+
fallback.setAttribute("role", "alert");
|
|
567
|
+
fallback.textContent = "Something went wrong.";
|
|
568
|
+
outlet.replaceChildren(fallback);
|
|
569
|
+
}
|
|
570
|
+
outlet.removeAttribute("data-fuzor-params");
|
|
571
|
+
abortRouteData(outlet);
|
|
572
|
+
outlet.removeAttribute("data-fuzor-data");
|
|
573
|
+
registry.set(paramsAtom, {});
|
|
574
|
+
registry.set(routeAtom, undefined);
|
|
575
|
+
registry.set(pathAtom, route);
|
|
576
|
+
renderedPath = route;
|
|
577
|
+
}))))) : Effect.void;
|
|
578
|
+
return work.pipe(Effect.tap(() => Effect.sync(() => {
|
|
579
|
+
// Query-only changes keep the DOM but still follow the URL with fresh data.
|
|
580
|
+
if (!replaced && outlet.hasAttribute("data-fuzor-data"))
|
|
581
|
+
loadData(change);
|
|
582
|
+
if (replaced && change.kind !== "reload") {
|
|
583
|
+
if (policy?.focus !== "preserve")
|
|
584
|
+
scrolling?.focus();
|
|
585
|
+
announcer.announce();
|
|
586
|
+
}
|
|
587
|
+
if (!adapter?.capabilities.nativeScroll) {
|
|
588
|
+
if (policy?.scroll !== "preserve")
|
|
589
|
+
scrolling?.finish(change, replaced, firstRender);
|
|
590
|
+
}
|
|
591
|
+
// The browser's own anchor scroll ran before the router inserted the page, so the target did
|
|
592
|
+
// not exist yet. Scroll once for the initial URL unless the page has already been scrolled.
|
|
593
|
+
else if (firstRender && change.destination.hash && window && window.scrollY === 0)
|
|
594
|
+
scrolling?.finish(change, replaced, firstRender);
|
|
595
|
+
})));
|
|
596
|
+
};
|
|
597
|
+
if (options.navigation) {
|
|
598
|
+
if (options.navigation.capabilities.nativeScroll && options.navigation.capabilities.documentNavigation)
|
|
599
|
+
throw new Error("Use the default browser adapter selection for native Navigation API interception");
|
|
600
|
+
if (options.navigation.capabilities.interception)
|
|
601
|
+
throw new Error("Inject an adapter without a preinstalled interception handler");
|
|
602
|
+
adapter = await scoped(coordinateNavigation(options.navigation, transition, report));
|
|
603
|
+
}
|
|
604
|
+
else {
|
|
605
|
+
if (!window)
|
|
606
|
+
throw new Error("A browser window or an injected navigation adapter is required");
|
|
607
|
+
const browser = navigationBrowser(window, document);
|
|
608
|
+
const httpDocument = ["http:", "https:"].includes(window.location.protocol);
|
|
609
|
+
if (!httpDocument && !transports.hash)
|
|
610
|
+
throw new Error(`This router build has no fragment routing for ${window.location.protocol} documents; use createRouter from fuzor/runtime or the embedded router.`);
|
|
611
|
+
if (transports.hash && (transports.alwaysHash || !httpDocument)) {
|
|
612
|
+
logicalTransport = true;
|
|
613
|
+
adapter = await scoped(coordinateNavigation(await scoped(transports.hash(window)), transition, report));
|
|
614
|
+
}
|
|
615
|
+
else if (!(transports.browser && supportsBrowserNavigation(browser) && !options.acceptsUrl) && !transports.history) {
|
|
616
|
+
// No in-place transport for this browser: pages still work, as document loads.
|
|
617
|
+
documentOnly = true;
|
|
618
|
+
adapter = await scoped(coordinateNavigation(await Effect.runPromise(transports.document(window)), transition, report));
|
|
619
|
+
}
|
|
620
|
+
else
|
|
621
|
+
adapter = transports.browser && supportsBrowserNavigation(browser) && !options.acceptsUrl
|
|
622
|
+
? await scoped(transports.browser(browser, {
|
|
623
|
+
// Interception policy, identical to the History fallback: links and programmatic navigation to
|
|
624
|
+
// compiled routes or redirects render in place; traversals are checked against blockers; reloads,
|
|
625
|
+
// form submissions (GET and POST) and data-fuzor-reload links stay document navigations.
|
|
626
|
+
accepts: (url, event) => {
|
|
627
|
+
const source = event.sourceElement;
|
|
628
|
+
const form = !!event.formData || source?.localName === "form" || source?.localName === "button" || source?.localName === "input";
|
|
629
|
+
const accepted = event.navigationType !== "reload" && !form && (acceptsRoute(routeOf(url.pathname)) || Object.hasOwn(redirects, routeOf(url.pathname))) &&
|
|
630
|
+
!source?.closest?.("[data-fuzor-reload]");
|
|
631
|
+
if (!accepted || approvedCommand || !blockers.size || !event.cancelable)
|
|
632
|
+
return accepted;
|
|
633
|
+
const kind = event.navigationType === "traverse" ? "traverse" : event.navigationType === "replace" ? "replace" : "push";
|
|
634
|
+
if (isBlocked({ url: url.href, kind })) {
|
|
635
|
+
event.preventDefault();
|
|
636
|
+
return false;
|
|
637
|
+
}
|
|
638
|
+
if (kind === "traverse")
|
|
639
|
+
approvedTraversal = event.destination.key;
|
|
640
|
+
return true;
|
|
641
|
+
},
|
|
642
|
+
options: change => {
|
|
643
|
+
const policy = policies.get(change.destination.url);
|
|
644
|
+
return policy && { scroll: policy.scroll === "preserve" ? "manual" : "after-transition", focusReset: policy.focus === "preserve" ? "manual" : "after-transition" };
|
|
645
|
+
},
|
|
646
|
+
transition
|
|
647
|
+
}))
|
|
648
|
+
: await scoped(transports.history(window, { transition, onError: report, ...(options.acceptsUrl ? { acceptsUrl: options.acceptsUrl } : {}) }));
|
|
649
|
+
if (!adapter.capabilities.nativeScroll)
|
|
650
|
+
await scoped(Effect.acquireRelease(Effect.sync(() => { const previous = window.history.scrollRestoration; window.history.scrollRestoration = "manual"; return previous; }), previous => Effect.sync(() => { window.history.scrollRestoration = previous; })));
|
|
651
|
+
}
|
|
652
|
+
const initial = await Effect.runPromise(adapter.current);
|
|
653
|
+
// A navigation that starts while the first page renders (a deep link, a quick tap) supersedes that
|
|
654
|
+
// render. That interruption is normal; only real failures stop the router.
|
|
655
|
+
const first = await Effect.runPromiseExit(transition({ kind: "reload", from: initial, destination: initial, delta: 0 }));
|
|
656
|
+
if (Exit.isFailure(first) && !Cause.hasInterruptsOnly(first.cause))
|
|
657
|
+
throw Cause.squash(first.cause);
|
|
658
|
+
if (!adapter?.capabilities.interception && !documentOnly)
|
|
659
|
+
await scoped(Effect.acquireRelease(Effect.sync(() => document.addEventListener("click", onClick)), () => Effect.sync(() => document.removeEventListener("click", onClick))));
|
|
660
|
+
if (options.prefetch === "intent")
|
|
661
|
+
await scoped(Effect.acquireRelease(Effect.sync(() => { document.addEventListener("pointerover", onIntent, { passive: true }); document.addEventListener("focusin", onIntent); }), () => Effect.sync(() => { document.removeEventListener("pointerover", onIntent); document.removeEventListener("focusin", onIntent); })));
|
|
662
|
+
return () => stopScope(scope);
|
|
663
|
+
}
|
|
664
|
+
catch (error) {
|
|
665
|
+
const cancelled = owner !== scope;
|
|
666
|
+
await stopScope(scope);
|
|
667
|
+
if (cancelled)
|
|
668
|
+
return () => stopScope(scope);
|
|
669
|
+
throw error;
|
|
670
|
+
}
|
|
671
|
+
})();
|
|
672
|
+
return starting;
|
|
673
|
+
};
|
|
674
|
+
const api = { matches, subscribeMatches: (listener) => registry.subscribe(routeAtom, () => listener(matches())), start, block, navigation: () => adapter, dispose: () => { startVersion++; if (!owner)
|
|
675
|
+
starting = undefined; return owner ? stopScope(owner) : closing; }, navigate, state: () => registry.get(stateAtom), subscribeState: (listener) => registry.subscribe(stateAtom, listener), route: () => registry.get(routeAtom), subscribeRoute: (listener) => registry.subscribe(routeAtom, listener), url: () => registry.get(urlAtom), subscribeUrl: (listener) => registry.subscribe(urlAtom, listener), path: () => registry.get(pathAtom), params: () => registry.get(paramsAtom), subscribeParams: (listener) => registry.subscribe(paramsAtom, listener), subscribe: (listener) => registry.subscribe(pathAtom, listener) };
|
|
676
|
+
return api;
|
|
677
|
+
}
|
|
678
|
+
//# sourceMappingURL=router.js.map
|