fuzor 0.4.0 → 0.5.1
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 +388 -34
- 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 +120 -2
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +1292 -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 -23
- 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/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 -23
- 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 -11
- 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 @@
|
|
|
1
|
+
{"version":3,"file":"memory-navigation.d.ts","sourceRoot":"","sources":["../../src/runtime/memory-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAc,eAAe,EAAE,KAAK,iBAAiB,EAAkG,MAAM,iBAAiB,CAAC;AAEtL,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC7F,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAEF,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,uBAA4B,GAAG,MAAM,CAAC,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,CAmF7H;AAED,eAAO,MAAM,oBAAoB,GAAI,UAAS,uBAA4B,2DACjB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Layer from "effect/Layer";
|
|
3
|
+
import { Navigation, NavigationError } from "./navigation.js";
|
|
4
|
+
/** No DOM globals, route matching, or rendering; this adapter models committed navigation. */
|
|
5
|
+
export function makeMemoryNavigation(options = {}) {
|
|
6
|
+
return Effect.gen(function* () {
|
|
7
|
+
const parseUrl = (href, base) => Effect.try({
|
|
8
|
+
try: () => {
|
|
9
|
+
const url = new URL(href, base);
|
|
10
|
+
const origin = new URL(base).origin;
|
|
11
|
+
if (!['http:', 'https:'].includes(url.protocol) || url.origin !== origin)
|
|
12
|
+
throw new Error("Use a same-origin HTTP(S) URL");
|
|
13
|
+
return url;
|
|
14
|
+
},
|
|
15
|
+
catch: (error) => new NavigationError("InvalidUrl", `Invalid navigation URL ${href}: ${String(error)}`)
|
|
16
|
+
});
|
|
17
|
+
const cloneState = (state) => Effect.try({
|
|
18
|
+
try: () => structuredClone(state ?? null),
|
|
19
|
+
catch: (error) => new NavigationError("InvalidState", `Navigation state cannot be cloned: ${String(error)}`)
|
|
20
|
+
});
|
|
21
|
+
const base = yield* Effect.try({
|
|
22
|
+
try: () => {
|
|
23
|
+
const url = new URL(options.baseUrl ?? "http://fuzor.local/");
|
|
24
|
+
if (!['http:', 'https:'].includes(url.protocol))
|
|
25
|
+
throw new Error("Use an HTTP(S) base URL");
|
|
26
|
+
return url;
|
|
27
|
+
},
|
|
28
|
+
catch: (error) => new NavigationError("InvalidUrl", `Invalid base URL: ${String(error)}`)
|
|
29
|
+
});
|
|
30
|
+
const initial = options.initialEntries ?? [{ href: "/" }];
|
|
31
|
+
const initialIndex = options.initialIndex ?? initial.length - 1;
|
|
32
|
+
if (!initial.length || !Number.isInteger(initialIndex) || initialIndex < 0 || initialIndex >= initial.length) {
|
|
33
|
+
return yield* Effect.fail(new NavigationError("InvalidEntries", "Memory navigation needs entries and a valid initial index"));
|
|
34
|
+
}
|
|
35
|
+
let nextKey = 0;
|
|
36
|
+
const snapshot = (url, state, index) => Object.freeze({
|
|
37
|
+
url: url.href, pathname: url.pathname, search: url.search, hash: url.hash,
|
|
38
|
+
key: `memory-${nextKey++}`, index, state
|
|
39
|
+
});
|
|
40
|
+
const entries = yield* Effect.forEach(initial, (entry, index) => Effect.gen(function* () {
|
|
41
|
+
return snapshot(yield* parseUrl(entry.href, base.href), yield* cloneState(entry.state), index);
|
|
42
|
+
}));
|
|
43
|
+
let index = initialIndex;
|
|
44
|
+
const listeners = new Set();
|
|
45
|
+
const copy = (entry) => Object.freeze({ ...entry, state: structuredClone(entry.state) });
|
|
46
|
+
const complete = (kind, from, delta) => {
|
|
47
|
+
const change = Object.freeze({ kind, from: copy(from), destination: copy(entries[index]), delta });
|
|
48
|
+
for (const listener of listeners) {
|
|
49
|
+
try {
|
|
50
|
+
listener({ ...change, from: copy(change.from), destination: copy(change.destination) });
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
try {
|
|
54
|
+
(options.onError ?? console.error)(error);
|
|
55
|
+
}
|
|
56
|
+
catch { }
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
change,
|
|
61
|
+
committed: Effect.sync(() => copy(change.destination)),
|
|
62
|
+
finished: Effect.sync(() => copy(change.destination))
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
return {
|
|
66
|
+
capabilities: { interception: false, precommit: false, entries: true, documentNavigation: false, nativeScroll: false },
|
|
67
|
+
current: Effect.sync(() => copy(entries[index])),
|
|
68
|
+
entries: Effect.sync(() => entries.map(copy)),
|
|
69
|
+
navigate: (intent) => Effect.gen(function* () {
|
|
70
|
+
const url = yield* parseUrl(intent.href, entries[index].url);
|
|
71
|
+
const state = yield* cloneState(intent.state);
|
|
72
|
+
const from = entries[index];
|
|
73
|
+
const kind = intent.history === "auto" ? (url.href === from.url ? "replace" : "push") : intent.history ?? "push";
|
|
74
|
+
if (kind === "push") {
|
|
75
|
+
index++;
|
|
76
|
+
entries.splice(index, entries.length, snapshot(url, state, index));
|
|
77
|
+
}
|
|
78
|
+
else
|
|
79
|
+
entries[index] = snapshot(url, state, index);
|
|
80
|
+
return complete(kind, from, kind === "push" ? 1 : 0);
|
|
81
|
+
}),
|
|
82
|
+
traverse: (delta) => Effect.gen(function* () {
|
|
83
|
+
const destination = index + delta;
|
|
84
|
+
if (!Number.isInteger(delta) || delta === 0 || destination < 0 || destination >= entries.length) {
|
|
85
|
+
return yield* Effect.fail(new NavigationError("TraversalUnavailable", `Cannot traverse ${delta} entries`));
|
|
86
|
+
}
|
|
87
|
+
const from = entries[index];
|
|
88
|
+
index = destination;
|
|
89
|
+
return complete("traverse", from, delta);
|
|
90
|
+
}),
|
|
91
|
+
canTraverse: (delta) => Effect.sync(() => Number.isInteger(delta) && delta !== 0 && index + delta >= 0 && index + delta < entries.length),
|
|
92
|
+
reload: () => Effect.sync(() => complete("reload", entries[index], 0)),
|
|
93
|
+
subscribe: (listener) => Effect.acquireRelease(Effect.sync(() => { listeners.add(listener); }), () => Effect.sync(() => { listeners.delete(listener); }))
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export const MemoryNavigationLive = (options = {}) => Layer.effect(Navigation, makeMemoryNavigation(options));
|
|
98
|
+
//# sourceMappingURL=memory-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-navigation.js","sourceRoot":"","sources":["../../src/runtime/memory-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,eAAe,EAA0H,MAAM,iBAAiB,CAAC;AAStL,8FAA8F;AAC9F,MAAM,UAAU,oBAAoB,CAAC,UAAmC,EAAE;IACxE,OAAO,MAAM,CAAC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CAAC;YACzI,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAE,EAAE,CAAC,CAAC,CAAC;YACvE,SAAS,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAC5C,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAC/C,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CACzD;SAC0B,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,UAAmC,EAAE,EAAE,EAAE,CAC5E,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { type Json, type Values } from "../server-components/protocol.js";
|
|
2
|
+
import type { PageScriptContext } from "./page-scripts.js";
|
|
3
|
+
export type NativeEventSnapshot = {
|
|
4
|
+
readonly type: string;
|
|
5
|
+
readonly value?: string;
|
|
6
|
+
readonly checked?: boolean;
|
|
7
|
+
readonly key?: string;
|
|
8
|
+
readonly code?: string;
|
|
9
|
+
readonly repeat?: boolean;
|
|
10
|
+
readonly button?: number;
|
|
11
|
+
readonly buttons?: number;
|
|
12
|
+
readonly clientX?: number;
|
|
13
|
+
readonly clientY?: number;
|
|
14
|
+
readonly pointerId?: number;
|
|
15
|
+
readonly pointerType?: string;
|
|
16
|
+
readonly altKey?: boolean;
|
|
17
|
+
readonly ctrlKey?: boolean;
|
|
18
|
+
readonly metaKey?: boolean;
|
|
19
|
+
readonly shiftKey?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type NativeHandlerContext = {
|
|
22
|
+
readonly element: HTMLElement;
|
|
23
|
+
readonly event: NativeEventSnapshot;
|
|
24
|
+
readonly signal: AbortSignal;
|
|
25
|
+
readonly props: Values;
|
|
26
|
+
get(name: string): Json;
|
|
27
|
+
set(name: string, value: Json): void;
|
|
28
|
+
};
|
|
29
|
+
export type NativeHandler = (context: NativeHandlerContext) => void | Promise<void>;
|
|
30
|
+
export type NativeBinding = {
|
|
31
|
+
readonly selector: string;
|
|
32
|
+
readonly state: string;
|
|
33
|
+
readonly kind: "text" | "value" | "checked" | "attribute";
|
|
34
|
+
readonly attribute?: string;
|
|
35
|
+
readonly prefix?: string;
|
|
36
|
+
readonly suffix?: string;
|
|
37
|
+
};
|
|
38
|
+
export type NativeEvent = {
|
|
39
|
+
readonly selector: string;
|
|
40
|
+
readonly type: string;
|
|
41
|
+
readonly preventDefault?: boolean;
|
|
42
|
+
readonly handler?: NativeHandler;
|
|
43
|
+
readonly load?: () => Promise<{
|
|
44
|
+
default: NativeHandler;
|
|
45
|
+
}>;
|
|
46
|
+
};
|
|
47
|
+
export type NativeDefinition = {
|
|
48
|
+
readonly id: string;
|
|
49
|
+
readonly version: number;
|
|
50
|
+
readonly state: Values;
|
|
51
|
+
readonly bindings: readonly NativeBinding[];
|
|
52
|
+
readonly events: readonly NativeEvent[];
|
|
53
|
+
readonly activation?: "interaction" | "load" | "idle" | "visible";
|
|
54
|
+
};
|
|
55
|
+
export type NativeCheckpointEntry = {
|
|
56
|
+
readonly key: string;
|
|
57
|
+
readonly definition: string;
|
|
58
|
+
readonly version: number;
|
|
59
|
+
readonly state: Values;
|
|
60
|
+
};
|
|
61
|
+
export type NativeCheckpoint = {
|
|
62
|
+
readonly version: 1;
|
|
63
|
+
readonly entries: readonly NativeCheckpointEntry[];
|
|
64
|
+
};
|
|
65
|
+
export type NativeInstance = {
|
|
66
|
+
readonly host: HTMLElement;
|
|
67
|
+
readonly key: string;
|
|
68
|
+
update(props: Values): void;
|
|
69
|
+
snapshot(): NativeCheckpointEntry;
|
|
70
|
+
validateRestore(entry: NativeCheckpointEntry): void;
|
|
71
|
+
restore(entry: NativeCheckpointEntry): void;
|
|
72
|
+
dispose(): void;
|
|
73
|
+
};
|
|
74
|
+
export type NativeCheckpointStore = ReturnType<typeof createNativeCheckpointStore>;
|
|
75
|
+
/** Explicit persistence: no automatic storage of application state in the browser. */
|
|
76
|
+
export declare function createNativeCheckpointStore(checkpoint?: NativeCheckpoint): {
|
|
77
|
+
read(key: string): NativeCheckpointEntry | undefined;
|
|
78
|
+
claim(instance: NativeInstance): void;
|
|
79
|
+
release(instance: NativeInstance): void;
|
|
80
|
+
dehydrate(): NativeCheckpoint;
|
|
81
|
+
};
|
|
82
|
+
/** Recognized by the HTML compiler; ordinary scripts stay imperative. */
|
|
83
|
+
export declare function defineNative<T extends NativeDefinition>(definition: T): T;
|
|
84
|
+
export declare function snapshotNative(scope: ParentNode): NativeCheckpoint;
|
|
85
|
+
/** Explicit restoration into live native instances; it never mounts or replays setup. */
|
|
86
|
+
export declare function restoreNative(scope: ParentNode, checkpoint: NativeCheckpoint): void;
|
|
87
|
+
export declare function mountNative(host: HTMLElement, definition: NativeDefinition, context: PageScriptContext, options?: {
|
|
88
|
+
readonly key?: string;
|
|
89
|
+
readonly store?: NativeCheckpointStore;
|
|
90
|
+
readonly props?: Values;
|
|
91
|
+
readonly initialState?: Values;
|
|
92
|
+
readonly onError?: (error: unknown) => void;
|
|
93
|
+
readonly timeoutMs?: number;
|
|
94
|
+
}): NativeInstance;
|
|
95
|
+
/** Explicit native adapter for persistent server-component client boundaries. */
|
|
96
|
+
export declare function nativeClient(definition: NativeDefinition, options?: {
|
|
97
|
+
readonly store?: NativeCheckpointStore;
|
|
98
|
+
readonly initialState?: (props: Values) => Values;
|
|
99
|
+
}): {
|
|
100
|
+
mountPersistent(host: HTMLElement, props: Values, operation?: {
|
|
101
|
+
signal: AbortSignal;
|
|
102
|
+
scope?: string;
|
|
103
|
+
}): {
|
|
104
|
+
update: (next: Values) => void;
|
|
105
|
+
dispose(): void;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/runtime/native.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3E,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IACzE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1G,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAChH,CAAC;AACF,MAAM,MAAM,oBAAoB,GAAG;IACj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AAS,gBAAgB,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAAuB;AAEjG,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,gBAAgB,CAIlE;AACD,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAYnF;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,cAAc,CAyL3U;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,GAAE;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAAO;0BACrI,WAAW,SAAS,MAAM,cAAc;QAAE,MAAM,EAAE,WAAW,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;uBASpF,MAAM;;;EAEjC"}
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import * as Atom from "effect/reactivity/Atom";
|
|
2
|
+
import * as AtomRegistry from "effect/reactivity/AtomRegistry";
|
|
3
|
+
import { assertJson, assertName, scalar } from "../server-components/protocol.js";
|
|
4
|
+
const bindingOwners = new WeakMap();
|
|
5
|
+
const instances = new WeakMap();
|
|
6
|
+
const eventTypes = new Set(["click", "input", "change", "keydown", "keyup", "submit", "focusin", "focusout", "pointerdown", "pointerup"]);
|
|
7
|
+
const foreignRoot = (element) => element.hasAttribute("data-fuzor-ui") || element.localName.startsWith("fuzor-") && !["fuzor-client", "fuzor-router"].includes(element.localName);
|
|
8
|
+
function assertNativeKey(value) { if (typeof value !== "string" || !value || value.length > 4096)
|
|
9
|
+
throw new Error("Invalid native instance key"); }
|
|
10
|
+
const jsonCopy = (value) => { assertJson(value); const json = JSON.stringify(value); if (new TextEncoder().encode(json).byteLength > 2 * 1024 * 1024)
|
|
11
|
+
throw new Error("Native state payload limit exceeded"); return JSON.parse(json); };
|
|
12
|
+
/** Explicit persistence: no automatic storage of application state in the browser. */
|
|
13
|
+
export function createNativeCheckpointStore(checkpoint) {
|
|
14
|
+
const saved = new Map();
|
|
15
|
+
const live = new Map();
|
|
16
|
+
if (checkpoint) {
|
|
17
|
+
assertJson(checkpoint);
|
|
18
|
+
if (checkpoint.version !== 1 || !Array.isArray(checkpoint.entries) || checkpoint.entries.length > 2048 || JSON.stringify(checkpoint).length > 2 * 1024 * 1024)
|
|
19
|
+
throw new Error("Invalid native checkpoint");
|
|
20
|
+
for (const entry of checkpoint.entries) {
|
|
21
|
+
assertNativeKey(entry.key);
|
|
22
|
+
assertName(entry.definition);
|
|
23
|
+
if (!Number.isSafeInteger(entry.version) || entry.version < 1 || !entry.state || Array.isArray(entry.state) || typeof entry.state !== "object" || saved.has(entry.key))
|
|
24
|
+
throw new Error("Invalid native checkpoint entry");
|
|
25
|
+
saved.set(entry.key, jsonCopy(entry));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
read(key) { return saved.get(key); },
|
|
30
|
+
claim(instance) { if (live.has(instance.key))
|
|
31
|
+
throw new Error("Duplicate native instance key"); if (new Set([...saved.keys(), ...live.keys(), instance.key]).size > 2048)
|
|
32
|
+
throw new Error("Native checkpoint instance limit exceeded"); live.set(instance.key, instance); },
|
|
33
|
+
release(instance) { if (live.get(instance.key) === instance) {
|
|
34
|
+
saved.set(instance.key, instance.snapshot());
|
|
35
|
+
live.delete(instance.key);
|
|
36
|
+
} },
|
|
37
|
+
dehydrate() {
|
|
38
|
+
const result = new Map(saved);
|
|
39
|
+
for (const [key, instance] of live)
|
|
40
|
+
result.set(key, instance.snapshot());
|
|
41
|
+
return jsonCopy({ version: 1, entries: [...result.values()] });
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** Recognized by the HTML compiler; ordinary scripts stay imperative. */
|
|
46
|
+
export function defineNative(definition) { return definition; }
|
|
47
|
+
export function snapshotNative(scope) {
|
|
48
|
+
const roots = [...scope.querySelectorAll("*")];
|
|
49
|
+
if ("tagName" in scope)
|
|
50
|
+
roots.unshift(scope);
|
|
51
|
+
return jsonCopy({ version: 1, entries: roots.flatMap(root => { const instance = instances.get(root); return instance ? [instance.snapshot()] : []; }) });
|
|
52
|
+
}
|
|
53
|
+
/** Explicit restoration into live native instances; it never mounts or replays setup. */
|
|
54
|
+
export function restoreNative(scope, checkpoint) {
|
|
55
|
+
const validated = createNativeCheckpointStore(checkpoint).dehydrate();
|
|
56
|
+
const roots = [...scope.querySelectorAll("*")];
|
|
57
|
+
if ("tagName" in scope)
|
|
58
|
+
roots.unshift(scope);
|
|
59
|
+
const live = new Map(roots.flatMap(root => { const instance = instances.get(root); return instance ? [[instance.key, instance]] : []; }));
|
|
60
|
+
const updates = validated.entries.map(entry => {
|
|
61
|
+
const instance = live.get(entry.key);
|
|
62
|
+
if (!instance)
|
|
63
|
+
throw new Error(`Native checkpoint instance is missing: ${entry.key}`);
|
|
64
|
+
instance.validateRestore(entry);
|
|
65
|
+
return { instance, entry };
|
|
66
|
+
});
|
|
67
|
+
for (const { instance, entry } of updates)
|
|
68
|
+
instance.restore(entry);
|
|
69
|
+
}
|
|
70
|
+
export function mountNative(host, definition, context, options = {}) {
|
|
71
|
+
assertName(definition.id);
|
|
72
|
+
if (!Number.isSafeInteger(definition.version) || definition.version < 1)
|
|
73
|
+
throw new Error("Native state requires a positive schema version");
|
|
74
|
+
const key = options.key ?? host.getAttribute("data-fuzor-key") ?? host.id;
|
|
75
|
+
assertNativeKey(key);
|
|
76
|
+
if (instances.has(host))
|
|
77
|
+
throw new Error("Native host already has an owner");
|
|
78
|
+
if (foreignRoot(host))
|
|
79
|
+
throw new Error("Native behavior cannot own a UI component, server fragment or Framework Island");
|
|
80
|
+
const defaults = jsonCopy(definition.state);
|
|
81
|
+
if (!defaults || typeof defaults !== "object" || Array.isArray(defaults))
|
|
82
|
+
throw new Error("Native state must be a JSON object");
|
|
83
|
+
const schema = Object.keys(defaults).sort();
|
|
84
|
+
schema.forEach(assertName);
|
|
85
|
+
const saved = options.store?.read(key);
|
|
86
|
+
if (saved && (saved.definition !== definition.id || saved.version !== definition.version || JSON.stringify(Object.keys(saved.state).sort()) !== JSON.stringify(schema)))
|
|
87
|
+
throw new Error("Incompatible native checkpoint; explicitly migrate or reset it");
|
|
88
|
+
const overrides = options.initialState ? jsonCopy(options.initialState) : {};
|
|
89
|
+
if (Object.keys(overrides).some(name => !schema.includes(name)))
|
|
90
|
+
throw new Error("Native initial state cannot introduce undeclared cells");
|
|
91
|
+
const initial = saved ? jsonCopy(saved.state) : { ...defaults, ...overrides };
|
|
92
|
+
const registry = AtomRegistry.make();
|
|
93
|
+
const cells = new Map(schema.map(name => [name, Atom.make(initial[name]).pipe(Atom.keepAlive)]));
|
|
94
|
+
const token = {};
|
|
95
|
+
const claims = [];
|
|
96
|
+
const abort = new AbortController();
|
|
97
|
+
const signal = AbortSignal.any([context.signal, abort.signal]);
|
|
98
|
+
const timeout = options.timeoutMs ?? 10_000;
|
|
99
|
+
if (!Number.isFinite(timeout) || timeout <= 0) {
|
|
100
|
+
registry.dispose();
|
|
101
|
+
throw new Error("Native timeout must be positive");
|
|
102
|
+
}
|
|
103
|
+
let props = jsonCopy(options.props ?? {});
|
|
104
|
+
let disposed = false;
|
|
105
|
+
if (definition.activation && !["interaction", "load", "idle", "visible"].includes(definition.activation)) {
|
|
106
|
+
registry.dispose();
|
|
107
|
+
throw new Error("Unknown native activation policy");
|
|
108
|
+
}
|
|
109
|
+
const cleanups = [];
|
|
110
|
+
const report = (error) => { try {
|
|
111
|
+
(options.onError ?? console.error)(error);
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
console.error(error);
|
|
115
|
+
} };
|
|
116
|
+
const elements = (selector) => {
|
|
117
|
+
const found = [...(host.matches(selector) ? [host] : []), ...host.querySelectorAll(selector)];
|
|
118
|
+
if (!found.length)
|
|
119
|
+
throw new Error(`Native binding selector has no match: ${selector}`);
|
|
120
|
+
for (const element of found) {
|
|
121
|
+
const boundary = element.closest('[data-fuzor-ui],fuzor-island,fuzor-client,fuzor-fragment,fuzor-boundary');
|
|
122
|
+
if (boundary && boundary !== host && host.contains(boundary))
|
|
123
|
+
throw new Error("Native binding crosses another UI owner");
|
|
124
|
+
for (let parent = element; parent && parent !== host; parent = parent.parentElement)
|
|
125
|
+
if (instances.has(parent) || context.childHosts?.includes(parent) || foreignRoot(parent))
|
|
126
|
+
throw new Error("Native binding crosses a child instance or UI owner");
|
|
127
|
+
}
|
|
128
|
+
return found;
|
|
129
|
+
};
|
|
130
|
+
const get = (name) => { const cell = cells.get(name); if (!cell)
|
|
131
|
+
throw new Error(`Unknown native state: ${name}`); return jsonCopy(registry.get(cell)); };
|
|
132
|
+
const set = (name, value) => {
|
|
133
|
+
if (signal.aborted)
|
|
134
|
+
return;
|
|
135
|
+
const cell = cells.get(name);
|
|
136
|
+
if (!cell)
|
|
137
|
+
throw new Error(`Unknown native state: ${name}`);
|
|
138
|
+
const next = jsonCopy(value);
|
|
139
|
+
for (const binding of definition.bindings)
|
|
140
|
+
if (binding.state === name) {
|
|
141
|
+
if (binding.kind === "checked" && typeof next !== "boolean")
|
|
142
|
+
throw new Error("Checked state must be boolean");
|
|
143
|
+
if (binding.kind !== "checked")
|
|
144
|
+
scalar(next);
|
|
145
|
+
}
|
|
146
|
+
registry.set(cell, next);
|
|
147
|
+
apply();
|
|
148
|
+
};
|
|
149
|
+
let bound = [];
|
|
150
|
+
const apply = () => {
|
|
151
|
+
for (const { binding, elements } of bound) {
|
|
152
|
+
const value = get(binding.state);
|
|
153
|
+
for (const element of elements) {
|
|
154
|
+
if (binding.kind === "checked")
|
|
155
|
+
element.checked = value === true;
|
|
156
|
+
else if (binding.kind === "value") {
|
|
157
|
+
const field = element;
|
|
158
|
+
const text = scalar(value);
|
|
159
|
+
if (field.value !== text)
|
|
160
|
+
field.value = text;
|
|
161
|
+
}
|
|
162
|
+
else if (binding.kind === "attribute") {
|
|
163
|
+
if (value === null || value === false && ["hidden", "disabled"].includes(binding.attribute))
|
|
164
|
+
element.removeAttribute(binding.attribute);
|
|
165
|
+
else
|
|
166
|
+
element.setAttribute(binding.attribute, scalar(value));
|
|
167
|
+
}
|
|
168
|
+
else
|
|
169
|
+
element.textContent = (binding.prefix ?? "") + scalar(value) + (binding.suffix ?? "");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
const snapshot = () => ({ key, definition: definition.id, version: definition.version, state: jsonCopy(Object.fromEntries([...cells].map(([name, cell]) => [name, registry.get(cell)]))) });
|
|
174
|
+
const validateRestore = (entry) => {
|
|
175
|
+
if (disposed || entry.key !== key || entry.definition !== definition.id || entry.version !== definition.version || JSON.stringify(Object.keys(entry.state).sort()) !== JSON.stringify(schema))
|
|
176
|
+
throw new Error("Incompatible native checkpoint");
|
|
177
|
+
const state = jsonCopy(entry.state);
|
|
178
|
+
for (const binding of definition.bindings) {
|
|
179
|
+
if (binding.kind === "checked" && typeof state[binding.state] !== "boolean")
|
|
180
|
+
throw new Error("Checked state must be boolean");
|
|
181
|
+
if (binding.kind !== "checked")
|
|
182
|
+
scalar(state[binding.state]);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const instance = { host, key, snapshot, validateRestore, update(next) { if (disposed)
|
|
186
|
+
throw new Error("Native instance disposed"); props = jsonCopy(next); apply(); }, restore(entry) {
|
|
187
|
+
validateRestore(entry);
|
|
188
|
+
const state = jsonCopy(entry.state);
|
|
189
|
+
for (const [name, cell] of cells)
|
|
190
|
+
registry.set(cell, state[name]);
|
|
191
|
+
apply();
|
|
192
|
+
}, dispose() {
|
|
193
|
+
if (disposed)
|
|
194
|
+
return;
|
|
195
|
+
disposed = true;
|
|
196
|
+
options.store?.release(instance);
|
|
197
|
+
abort.abort();
|
|
198
|
+
for (const cleanup of cleanups)
|
|
199
|
+
cleanup();
|
|
200
|
+
for (const [element, binding] of claims) {
|
|
201
|
+
const owners = bindingOwners.get(element);
|
|
202
|
+
if (owners?.get(binding) === token)
|
|
203
|
+
owners.delete(binding);
|
|
204
|
+
}
|
|
205
|
+
if (instances.get(host) === instance)
|
|
206
|
+
instances.delete(host);
|
|
207
|
+
registry.dispose();
|
|
208
|
+
} };
|
|
209
|
+
try {
|
|
210
|
+
if (signal.aborted)
|
|
211
|
+
throw new Error("Native instance canceled");
|
|
212
|
+
bound = definition.bindings.map(binding => {
|
|
213
|
+
if (!cells.has(binding.state))
|
|
214
|
+
throw new Error(`Unknown native binding state: ${binding.state}`);
|
|
215
|
+
if (!["text", "value", "checked", "attribute"].includes(binding.kind))
|
|
216
|
+
throw new Error("Unknown native binding kind");
|
|
217
|
+
if (binding.prefix !== undefined && typeof binding.prefix !== "string" || binding.suffix !== undefined && typeof binding.suffix !== "string")
|
|
218
|
+
throw new Error("Native binding prefixes and suffixes must be strings");
|
|
219
|
+
if (binding.kind === "checked" && typeof initial[binding.state] !== "boolean")
|
|
220
|
+
throw new Error("Checked state must be boolean");
|
|
221
|
+
if (binding.kind !== "checked")
|
|
222
|
+
scalar(initial[binding.state]);
|
|
223
|
+
if (binding.kind === "attribute" && (!binding.attribute || !/^(?:aria-[a-z-]+|data-[a-z-]+|title|hidden|disabled)$/.test(binding.attribute)))
|
|
224
|
+
throw new Error("Unsupported native attribute binding");
|
|
225
|
+
const found = elements(binding.selector);
|
|
226
|
+
for (const element of found) {
|
|
227
|
+
if (binding.kind === "value" && element.hasAttribute("data-fuzor-state") || binding.kind === "checked" && element.hasAttribute("data-fuzor-checked") || binding.kind === "text" && (element.hasAttribute("data-fuzor-state") || element.hasAttribute("data-fuzor-text") || element.hasAttribute("data-fuzor-slot")))
|
|
228
|
+
throw new Error("Native binding conflicts with a server fragment binding");
|
|
229
|
+
if (binding.kind === "value" && !element.matches('input,textarea,select'))
|
|
230
|
+
throw new Error("Value bindings require form fields");
|
|
231
|
+
if (binding.kind === "checked" && !element.matches('input[type=checkbox]'))
|
|
232
|
+
throw new Error("Checked bindings require checkboxes");
|
|
233
|
+
if (binding.kind === "text" && element.children.length)
|
|
234
|
+
throw new Error("Native text bindings must not replace child elements");
|
|
235
|
+
const name = binding.kind === "attribute" ? `attribute:${binding.attribute}` : binding.kind;
|
|
236
|
+
const owners = bindingOwners.get(element) ?? new Map();
|
|
237
|
+
if (owners.has(name))
|
|
238
|
+
throw new Error("Native binding already has an owner");
|
|
239
|
+
owners.set(name, token);
|
|
240
|
+
bindingOwners.set(element, owners);
|
|
241
|
+
claims.push([element, name]);
|
|
242
|
+
if (binding.kind === "value") {
|
|
243
|
+
const field = element;
|
|
244
|
+
if ("defaultValue" in field && field.value !== field.defaultValue)
|
|
245
|
+
registry.set(cells.get(binding.state), field.value);
|
|
246
|
+
if (element.localName === "select") {
|
|
247
|
+
const select = element;
|
|
248
|
+
if (select.multiple)
|
|
249
|
+
throw new Error("Native value bindings require single-value fields");
|
|
250
|
+
const original = [...select.options].find(option => option.defaultSelected)?.value ?? select.options[0]?.value ?? "";
|
|
251
|
+
if (select.value !== original)
|
|
252
|
+
registry.set(cells.get(binding.state), select.value);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (binding.kind === "checked") {
|
|
256
|
+
const field = element;
|
|
257
|
+
if (field.checked !== field.defaultChecked)
|
|
258
|
+
registry.set(cells.get(binding.state), field.checked);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return { binding, elements: found };
|
|
262
|
+
});
|
|
263
|
+
let queue = Promise.resolve();
|
|
264
|
+
for (const event of definition.events) {
|
|
265
|
+
if (!eventTypes.has(event.type) || (event.load ? typeof event.load !== "function" : typeof event.handler !== "function") || event.preventDefault !== undefined && typeof event.preventDefault !== "boolean")
|
|
266
|
+
throw new Error("Unsupported native event or missing handler");
|
|
267
|
+
const targets = new Set(elements(event.selector));
|
|
268
|
+
let pending;
|
|
269
|
+
const listener = (original) => {
|
|
270
|
+
let element = original.target;
|
|
271
|
+
while (element && element !== host && !targets.has(element))
|
|
272
|
+
element = element.parentElement;
|
|
273
|
+
if (!element || !targets.has(element) || signal.aborted)
|
|
274
|
+
return;
|
|
275
|
+
const eventElement = element;
|
|
276
|
+
if (event.preventDefault)
|
|
277
|
+
original.preventDefault();
|
|
278
|
+
const field = original.target;
|
|
279
|
+
const details = {};
|
|
280
|
+
for (const name of ["key", "code", "repeat", "button", "buttons", "clientX", "clientY", "pointerId", "pointerType", "altKey", "ctrlKey", "metaKey", "shiftKey"]) {
|
|
281
|
+
const value = original[name];
|
|
282
|
+
if (typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value))
|
|
283
|
+
details[name] = value;
|
|
284
|
+
}
|
|
285
|
+
const snapshot = { type: original.type, ...("value" in field ? { value: field.value } : {}), ...("checked" in field ? { checked: field.checked } : {}), ...details };
|
|
286
|
+
queue = queue.then(async () => {
|
|
287
|
+
if (signal.aborted)
|
|
288
|
+
return;
|
|
289
|
+
const operation = new AbortController();
|
|
290
|
+
const operationSignal = AbortSignal.any([signal, operation.signal]);
|
|
291
|
+
let timer;
|
|
292
|
+
let canceled = () => { };
|
|
293
|
+
try {
|
|
294
|
+
const work = async () => {
|
|
295
|
+
pending ??= event.load ? event.load().then(module => module.default) : Promise.resolve(event.handler);
|
|
296
|
+
const handler = await pending;
|
|
297
|
+
if (!operationSignal.aborted)
|
|
298
|
+
await handler({ element: eventElement, event: snapshot, signal: operationSignal, props, get, set: (name, value) => { if (!operationSignal.aborted)
|
|
299
|
+
set(name, value); } });
|
|
300
|
+
};
|
|
301
|
+
await Promise.race([work(), new Promise((_, reject) => {
|
|
302
|
+
canceled = () => reject(new Error("Native handler canceled"));
|
|
303
|
+
operationSignal.addEventListener("abort", canceled, { once: true });
|
|
304
|
+
timer = setTimeout(() => reject(new Error("Native handler deadline exceeded")), timeout);
|
|
305
|
+
})]);
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
pending = undefined;
|
|
309
|
+
if (!signal.aborted)
|
|
310
|
+
report(error);
|
|
311
|
+
}
|
|
312
|
+
finally {
|
|
313
|
+
clearTimeout(timer);
|
|
314
|
+
operationSignal.removeEventListener("abort", canceled);
|
|
315
|
+
operation.abort();
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
};
|
|
319
|
+
host.addEventListener(event.type, listener);
|
|
320
|
+
cleanups.push(() => host.removeEventListener(event.type, listener));
|
|
321
|
+
const preload = () => { pending ??= event.load ? Promise.resolve().then(event.load).then(module => module.default) : Promise.resolve(event.handler); void pending.catch(error => { pending = undefined; report(error); }); };
|
|
322
|
+
if (definition.activation === "load")
|
|
323
|
+
preload();
|
|
324
|
+
if (definition.activation === "idle") {
|
|
325
|
+
const window = host.ownerDocument.defaultView;
|
|
326
|
+
if (window?.requestIdleCallback) {
|
|
327
|
+
const id = window.requestIdleCallback(() => { if (!signal.aborted)
|
|
328
|
+
preload(); });
|
|
329
|
+
cleanups.push(() => window.cancelIdleCallback(id));
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
const timer = setTimeout(() => { if (!signal.aborted)
|
|
333
|
+
preload(); }, 50);
|
|
334
|
+
cleanups.push(() => clearTimeout(timer));
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (definition.activation === "visible") {
|
|
338
|
+
const Observer = host.ownerDocument.defaultView?.IntersectionObserver;
|
|
339
|
+
if (Observer) {
|
|
340
|
+
const observer = new Observer(entries => { if (entries.some(entry => entry.isIntersecting)) {
|
|
341
|
+
observer.disconnect();
|
|
342
|
+
if (!signal.aborted)
|
|
343
|
+
preload();
|
|
344
|
+
} });
|
|
345
|
+
observer.observe(host);
|
|
346
|
+
cleanups.push(() => observer.disconnect());
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
options.store?.claim(instance);
|
|
351
|
+
instances.set(host, instance);
|
|
352
|
+
apply();
|
|
353
|
+
signal.addEventListener("abort", instance.dispose, { once: true });
|
|
354
|
+
cleanups.push(() => signal.removeEventListener("abort", instance.dispose));
|
|
355
|
+
context.onCleanup(instance.dispose);
|
|
356
|
+
return instance;
|
|
357
|
+
}
|
|
358
|
+
catch (error) {
|
|
359
|
+
instance.dispose();
|
|
360
|
+
throw error;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
/** Explicit native adapter for persistent server-component client boundaries. */
|
|
364
|
+
export function nativeClient(definition, options = {}) {
|
|
365
|
+
return { mountPersistent(host, props, operation) {
|
|
366
|
+
const controller = new AbortController();
|
|
367
|
+
// Operation signals bound mounting; the client's lifetime ends on dispose,
|
|
368
|
+
// not when the initial renderer commit is superseded by a later update.
|
|
369
|
+
if (operation?.signal.aborted)
|
|
370
|
+
throw new Error("Native client mount canceled");
|
|
371
|
+
const key = host.getAttribute("data-fuzor-key") ?? host.id;
|
|
372
|
+
const scopedKey = operation?.scope ? operation.scope + ":" + key : key;
|
|
373
|
+
const initialState = options.store?.read(scopedKey) ? undefined : options.initialState?.(jsonCopy(props));
|
|
374
|
+
const instance = mountNative(host, definition, { signal: controller.signal, onCleanup: () => { } }, { ...(options.store ? { store: options.store } : {}), ...(initialState ? { initialState } : {}), props, key: scopedKey });
|
|
375
|
+
return { update: (next) => instance.update(next), dispose() { controller.abort(); instance.dispose(); } };
|
|
376
|
+
} };
|
|
377
|
+
}
|
|
378
|
+
//# sourceMappingURL=native.js.map
|