fuzor 0.4.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 +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 +113 -2
- package/dist/vite.d.ts.map +1 -1
- package/dist/vite.js +1289 -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,75 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { type ViewManifest, type Json, type Values, type ViewLimits } from "./protocol.js";
|
|
3
|
+
export type { ViewManifest, ViewSnapshot, ViewNode } from "./protocol.js";
|
|
4
|
+
/** Framework adapters own their context tree; the renderer owns server DOM and lifetimes. */
|
|
5
|
+
export type ClientConnection = {
|
|
6
|
+
readonly family: object;
|
|
7
|
+
element(props: Values, children: unknown): unknown;
|
|
8
|
+
portal(host: HTMLElement, element: unknown, key: string): unknown;
|
|
9
|
+
slot(host: HTMLElement, children: readonly unknown[]): unknown;
|
|
10
|
+
group(key: string, children: readonly unknown[]): unknown;
|
|
11
|
+
};
|
|
12
|
+
export type ClientOperation = {
|
|
13
|
+
readonly signal: AbortSignal;
|
|
14
|
+
readonly children?: unknown;
|
|
15
|
+
readonly scope?: string;
|
|
16
|
+
};
|
|
17
|
+
export type ClientResult<A> = A | Promise<A> | Effect.Effect<A, unknown>;
|
|
18
|
+
export type PersistentClient = {
|
|
19
|
+
update(props: Values, operation?: ClientOperation): ClientResult<void>;
|
|
20
|
+
dispose(): ClientResult<void>;
|
|
21
|
+
};
|
|
22
|
+
export type PersistentClientModule = {
|
|
23
|
+
readonly connected?: ClientConnection;
|
|
24
|
+
mountPersistent(host: HTMLElement, props: Values, operation?: ClientOperation): ClientResult<PersistentClient>;
|
|
25
|
+
};
|
|
26
|
+
export type ClientRegistry = Readonly<Record<string, () => Promise<PersistentClientModule>>>;
|
|
27
|
+
export type ResumableEvent = {
|
|
28
|
+
readonly type: string;
|
|
29
|
+
readonly value?: string;
|
|
30
|
+
readonly checked?: boolean;
|
|
31
|
+
readonly key?: string;
|
|
32
|
+
};
|
|
33
|
+
export type HandlerContext = {
|
|
34
|
+
readonly event: ResumableEvent;
|
|
35
|
+
readonly element: HTMLElement;
|
|
36
|
+
readonly capture: Values;
|
|
37
|
+
readonly props: Values;
|
|
38
|
+
readonly signal: AbortSignal;
|
|
39
|
+
readonly get: (name: string) => Json;
|
|
40
|
+
readonly set: (name: string, value: Json) => void;
|
|
41
|
+
};
|
|
42
|
+
export type ResumableHandler = (context: HandlerContext) => ClientResult<void>;
|
|
43
|
+
export type HandlerRegistry = Readonly<Record<string, () => Promise<ResumableHandler>>>;
|
|
44
|
+
/** Opt-in renderer. Template DOM and instance lifetimes outlive individual server requests. */
|
|
45
|
+
export declare function createViewRenderer(outlet: HTMLElement, options: {
|
|
46
|
+
readonly manifest: ViewManifest;
|
|
47
|
+
readonly clients?: ClientRegistry;
|
|
48
|
+
readonly handlers?: HandlerRegistry;
|
|
49
|
+
readonly limits?: ViewLimits;
|
|
50
|
+
readonly onError?: (error: unknown) => void;
|
|
51
|
+
/** Bound imports, mounts, updates and cleanup; default 10 seconds. */
|
|
52
|
+
readonly clientTimeoutMs?: number;
|
|
53
|
+
}): {
|
|
54
|
+
render: (payload: unknown) => Promise<boolean>;
|
|
55
|
+
prepare: (payload: unknown, signal?: AbortSignal) => Promise<(() => Promise<boolean>) | (() => Promise<boolean>)>;
|
|
56
|
+
sequence: (payload: unknown, signal?: AbortSignal) => Promise<{
|
|
57
|
+
commit: () => Promise<boolean>;
|
|
58
|
+
push: (payload: unknown) => Promise<boolean>;
|
|
59
|
+
} | {
|
|
60
|
+
commit: () => Promise<boolean>;
|
|
61
|
+
push: () => Promise<boolean>;
|
|
62
|
+
}>;
|
|
63
|
+
followDocument: (push: (payload: unknown) => Promise<boolean>, signal?: AbortSignal) => () => void;
|
|
64
|
+
clear: () => Promise<void>;
|
|
65
|
+
/** Adopt the matching SSR tree; native state restores without calling component setup. */
|
|
66
|
+
resume: () => Promise<boolean>;
|
|
67
|
+
refresh: (href: string, options?: {
|
|
68
|
+
readonly base?: string;
|
|
69
|
+
readonly fetch?: typeof fetch;
|
|
70
|
+
readonly signal?: AbortSignal;
|
|
71
|
+
}) => Promise<boolean>;
|
|
72
|
+
whenIdle: () => Promise<void>;
|
|
73
|
+
dispose: () => Promise<void>;
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/server-components/browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,OAAO,EAA4B,KAAK,YAAY,EAAwE,KAAK,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3L,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1E,6FAA6F;AAC7F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;IACnD,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IAClE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC;IAC/D,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC;CAC3D,CAAC;AACF,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACrH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;AACzE,MAAM,MAAM,gBAAgB,GAAG;IAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAAC,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AACzI,MAAM,MAAM,sBAAsB,GAAG;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAAC,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,eAAe,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAA;CAAE,CAAC;AAU/L,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC7F,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACnI,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,KAAK,IAAI,CAAC;CACnD,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;AAC/E,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAmBxF,+FAA+F;AAC/F,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE;IAC/D,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IACpC,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,sEAAsE;IACtE,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;sBA4P0B,OAAO,KAAG,OAAO,CAAC,OAAO,CAAC;uBADnB,OAAO,WAAW,WAAW;wBAtBlC,OAAO,WAAW,WAAW;;wBAO3B,OAAO;;;;;2BAiBN,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,WAAW,WAAW;;IA4ExF,0FAA0F;;oBAS1E,MAAM,YAAW;QAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;QAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE;;;EAiD5H"}
|
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Semaphore from "effect/Semaphore";
|
|
3
|
+
import { readViewStream, validateFrame } from "./stream.js";
|
|
4
|
+
import * as Atom from "effect/reactivity/Atom";
|
|
5
|
+
import * as AtomRegistry from "effect/reactivity/AtomRegistry";
|
|
6
|
+
import { scalar, validateSnapshot } from "./protocol.js";
|
|
7
|
+
import { normalizeBase } from "../route-path.js";
|
|
8
|
+
/** Adapt only an external call; all renderer coordination stays in Effect. */
|
|
9
|
+
const external = (call) => Effect.suspend(() => {
|
|
10
|
+
const controller = new AbortController();
|
|
11
|
+
return Effect.try({ try: () => call(controller.signal), catch: error => error }).pipe(Effect.flatMap(result => Effect.isEffect(result) ? result : Effect.tryPromise({ try: () => Promise.resolve(result), catch: error => error })), Effect.ensuring(Effect.sync(() => controller.abort())));
|
|
12
|
+
});
|
|
13
|
+
/** Opt-in renderer. Template DOM and instance lifetimes outlive individual server requests. */
|
|
14
|
+
export function createViewRenderer(outlet, options) {
|
|
15
|
+
const document = outlet.ownerDocument;
|
|
16
|
+
const clients = options.clients ?? {};
|
|
17
|
+
const handlers = options.handlers ?? {};
|
|
18
|
+
const clientIds = new Set(Object.keys(clients));
|
|
19
|
+
const handlerIds = new Set(Object.keys(handlers));
|
|
20
|
+
const parsed = new Map();
|
|
21
|
+
const modules = new Map();
|
|
22
|
+
const preparationErrors = new Map();
|
|
23
|
+
const loadedHandlers = new Map();
|
|
24
|
+
const owned = new WeakMap();
|
|
25
|
+
let roots = [];
|
|
26
|
+
let scope;
|
|
27
|
+
let operationScope;
|
|
28
|
+
let disposed = false;
|
|
29
|
+
let generation = 0;
|
|
30
|
+
const commitLock = Semaphore.makeUnsafe(1);
|
|
31
|
+
const timeout = options.clientTimeoutMs ?? 10000;
|
|
32
|
+
if (!Number.isSafeInteger(timeout) || timeout < 1 || timeout > 120000)
|
|
33
|
+
throw new Error("Client timeout must be between 1 and 120000 milliseconds");
|
|
34
|
+
let activeOperation;
|
|
35
|
+
const bounded = (call) => external(call).pipe(Effect.timeout(timeout));
|
|
36
|
+
const run = (effect, signal) => Effect.runPromise(effect, signal ? { signal } : undefined);
|
|
37
|
+
let stopDocument;
|
|
38
|
+
let activeFetch;
|
|
39
|
+
let disposal;
|
|
40
|
+
const errors = options.onError ?? console.error;
|
|
41
|
+
const isInput = (element) => element.tagName === "INPUT" || element.tagName === "TEXTAREA";
|
|
42
|
+
const write = (element, value) => {
|
|
43
|
+
const text = scalar(value);
|
|
44
|
+
if (isInput(element)) {
|
|
45
|
+
const input = element;
|
|
46
|
+
if (input.value !== text)
|
|
47
|
+
input.value = text;
|
|
48
|
+
}
|
|
49
|
+
else if (element.textContent !== text)
|
|
50
|
+
element.textContent = text;
|
|
51
|
+
};
|
|
52
|
+
const apply = (instance) => {
|
|
53
|
+
const node = instance.node;
|
|
54
|
+
if (node.kind !== "fragment")
|
|
55
|
+
return;
|
|
56
|
+
for (const binding of options.manifest.templates[node.template].bindings) {
|
|
57
|
+
if (binding.kind === "slot")
|
|
58
|
+
continue;
|
|
59
|
+
const value = (binding.kind === "state" || binding.kind === "checked") ? instance.registry.get(instance.cells.get(binding.name)) : node.values[binding.name];
|
|
60
|
+
for (const element of instance.bindings.get(`${binding.kind}:${binding.name}`) ?? []) {
|
|
61
|
+
if (binding.kind === "checked")
|
|
62
|
+
element.checked = value === true;
|
|
63
|
+
else
|
|
64
|
+
write(element, value);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
const cells = (instance, node) => {
|
|
69
|
+
for (const binding of options.manifest.templates[node.template].bindings)
|
|
70
|
+
if ((binding.kind === "state" || binding.kind === "checked") && !instance.cells.has(binding.name)) {
|
|
71
|
+
const atom = Atom.make(node.state[binding.name] ?? null).pipe(Atom.keepAlive);
|
|
72
|
+
instance.cells.set(binding.name, atom);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const nodeSignature = (node) => node.kind === "fragment" ? `fragment:${node.template}` : node.kind === "client" ? `client:${node.component}` : "boundary";
|
|
76
|
+
const directHosts = (parent) => Array.from(parent.children).filter(element => element.hasAttribute("data-fuzor-key"));
|
|
77
|
+
const marker = (instance, name) => {
|
|
78
|
+
const slot = instance.bindings.get(`slot:${name}`)?.[0];
|
|
79
|
+
if (!slot)
|
|
80
|
+
throw new Error(`Compiled slot is missing: ${name}`);
|
|
81
|
+
return slot;
|
|
82
|
+
};
|
|
83
|
+
const sameHost = (host, node) => host.getAttribute("data-fuzor-key") === node.key &&
|
|
84
|
+
(node.kind === "fragment" ? host.localName === "fuzor-fragment" && host.getAttribute("data-fuzor-template") === node.template : node.kind === "boundary" ? host.localName === "fuzor-boundary" : host.localName === "fuzor-client" && host.getAttribute("data-fuzor-component") === node.component);
|
|
85
|
+
const create = Effect.fnUntraced(function* (node, host) {
|
|
86
|
+
const adopt = !!host;
|
|
87
|
+
host ??= document.createElement(node.kind === "fragment" ? "fuzor-fragment" : node.kind === "boundary" ? "fuzor-boundary" : "fuzor-client");
|
|
88
|
+
host.setAttribute("data-fuzor-key", node.key);
|
|
89
|
+
if (node.kind !== "boundary")
|
|
90
|
+
host.setAttribute(node.kind === "fragment" ? "data-fuzor-template" : "data-fuzor-component", node.kind === "fragment" ? node.template : node.component);
|
|
91
|
+
const instance = { node, host, lifetime: new AbortController(), children: new Map(), registry: AtomRegistry.make(), cells: new Map(), bindings: new Map(), eventLock: Semaphore.makeUnsafe(1), dispose: () => Promise.resolve() };
|
|
92
|
+
let released = false;
|
|
93
|
+
let disposal;
|
|
94
|
+
instance.dispose = () => disposal ??= run(Effect.gen(function* () {
|
|
95
|
+
if (released)
|
|
96
|
+
return;
|
|
97
|
+
released = true;
|
|
98
|
+
instance.failed = true;
|
|
99
|
+
instance.lifetime.abort();
|
|
100
|
+
owned.delete(instance.host);
|
|
101
|
+
const cleanup = Effect.forEach([...instance.children.values()].flat(), child => external(() => child.dispose()), { concurrency: 8, discard: true });
|
|
102
|
+
yield* cleanup.pipe(Effect.ensuring(bounded(() => instance.client?.dispose()).pipe(Effect.catchCause(cause => Effect.sync(() => errors(cause))), Effect.ensuring(Effect.sync(() => { instance.registry.dispose(); instance.host.remove(); })))));
|
|
103
|
+
}));
|
|
104
|
+
owned.set(host, instance);
|
|
105
|
+
let complete = false;
|
|
106
|
+
yield* Effect.addFinalizer(() => complete ? Effect.void : external(() => instance.dispose()).pipe(Effect.catchCause(cause => Effect.sync(() => errors(cause)))));
|
|
107
|
+
try {
|
|
108
|
+
if (node.kind === "fragment") {
|
|
109
|
+
if (!adopt) {
|
|
110
|
+
let template = parsed.get(node.template);
|
|
111
|
+
if (!template) {
|
|
112
|
+
template = document.createElement("template");
|
|
113
|
+
template.innerHTML = options.manifest.templates[node.template].html;
|
|
114
|
+
parsed.set(node.template, template);
|
|
115
|
+
}
|
|
116
|
+
host.append(document.importNode(template.content, true));
|
|
117
|
+
}
|
|
118
|
+
// Exclude descendants owned by server-produced child fragments/client roots.
|
|
119
|
+
for (const element of host.querySelectorAll("[data-fuzor-text],[data-fuzor-state],[data-fuzor-checked],[data-fuzor-slot]")) {
|
|
120
|
+
if (element.closest("fuzor-fragment,fuzor-client,fuzor-boundary") !== host)
|
|
121
|
+
continue;
|
|
122
|
+
for (const kind of ["text", "state", "checked", "slot"]) {
|
|
123
|
+
const name = element.getAttribute(`data-fuzor-${kind}`);
|
|
124
|
+
if (name !== null) {
|
|
125
|
+
const key = `${kind}:${name}`;
|
|
126
|
+
const values = instance.bindings.get(key) ?? [];
|
|
127
|
+
values.push(element);
|
|
128
|
+
instance.bindings.set(key, values);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
cells(instance, node);
|
|
133
|
+
// An input edited before resume is already user state; adopt it without setup replay.
|
|
134
|
+
if (adopt)
|
|
135
|
+
for (const binding of options.manifest.templates[node.template].bindings)
|
|
136
|
+
if (binding.kind === "state" || binding.kind === "checked") {
|
|
137
|
+
const input = instance.bindings.get(`${binding.kind}:${binding.name}`)?.find(isInput);
|
|
138
|
+
if (input && binding.kind === "checked" && input.checked !== input.defaultChecked)
|
|
139
|
+
instance.registry.set(instance.cells.get(binding.name), input.checked);
|
|
140
|
+
else if (input && binding.kind === "state" && input.value !== input.defaultValue)
|
|
141
|
+
instance.registry.set(instance.cells.get(binding.name), input.value);
|
|
142
|
+
}
|
|
143
|
+
apply(instance);
|
|
144
|
+
}
|
|
145
|
+
complete = true;
|
|
146
|
+
return instance;
|
|
147
|
+
}
|
|
148
|
+
catch (error) {
|
|
149
|
+
yield* external(() => instance.dispose());
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
}, Effect.scoped);
|
|
153
|
+
const reconcile = Effect.fnUntraced(function* (parent, previous, nodes, version, adopt, connection) {
|
|
154
|
+
const byKey = new Map(previous.map(instance => [instance.node.key, instance]));
|
|
155
|
+
const adoptable = adopt ? directHosts(parent) : [];
|
|
156
|
+
const next = [];
|
|
157
|
+
const created = [];
|
|
158
|
+
let complete = false;
|
|
159
|
+
yield* Effect.addFinalizer(() => complete ? Effect.void : Effect.forEach(created, instance => external(() => instance.dispose()).pipe(Effect.catchCause(cause => Effect.sync(() => errors(cause)))), { concurrency: 8, discard: true }));
|
|
160
|
+
try {
|
|
161
|
+
for (const node of nodes) {
|
|
162
|
+
if (disposed || version !== generation)
|
|
163
|
+
return yield* Effect.fail(new Error("View commit superseded"));
|
|
164
|
+
let instance = byKey.get(node.key);
|
|
165
|
+
const retainBoundary = node.kind === "boundary" && node.status !== "resolved" && instance?.boundaryResolved === true;
|
|
166
|
+
if (instance && (instance.failed || nodeSignature(instance.node) !== nodeSignature(node))) {
|
|
167
|
+
yield* external(() => instance.dispose());
|
|
168
|
+
byKey.delete(node.key);
|
|
169
|
+
instance = undefined;
|
|
170
|
+
}
|
|
171
|
+
if (!instance) {
|
|
172
|
+
instance = yield* create(node, adoptable.find(host => sameHost(host, node)));
|
|
173
|
+
created.push(instance);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
byKey.delete(node.key);
|
|
177
|
+
instance.node = node;
|
|
178
|
+
if (node.kind === "fragment") {
|
|
179
|
+
cells(instance, node);
|
|
180
|
+
apply(instance);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
next.push(instance);
|
|
184
|
+
// New instances are tracked for cleanup if nested reconciliation fails.
|
|
185
|
+
if (node.kind === "client") {
|
|
186
|
+
const target = instance;
|
|
187
|
+
const preparationError = preparationErrors.get(`${version}:${node.component}`);
|
|
188
|
+
if (preparationError)
|
|
189
|
+
return yield* Effect.fail(preparationError);
|
|
190
|
+
const module = yield* bounded(() => modules.get(node.component));
|
|
191
|
+
const bridge = module.connected;
|
|
192
|
+
if (connection && (!bridge || connection.family !== bridge.family))
|
|
193
|
+
return yield* Effect.fail(new Error("Connected client children must use the same framework runtime"));
|
|
194
|
+
let children;
|
|
195
|
+
if (node.children?.length || instance.childrenHost) {
|
|
196
|
+
if (!bridge)
|
|
197
|
+
return yield* Effect.fail(new Error("Client children require a connected framework adapter"));
|
|
198
|
+
instance.childrenHost ??= Array.from(instance.host.children).find(child => child.localName === "fuzor-client-children") ?? document.createElement("fuzor-client-children");
|
|
199
|
+
const descendants = yield* reconcile(instance.childrenHost, instance.children.get("client") ?? [], node.children ?? [], version, adopt, bridge);
|
|
200
|
+
instance.children.set("client", descendants);
|
|
201
|
+
children = bridge.slot(instance.childrenHost, descendants.map(child => child.presentation));
|
|
202
|
+
}
|
|
203
|
+
if (connection)
|
|
204
|
+
instance.presentation = connection.portal(instance.host, bridge.element(node.props, children), node.key);
|
|
205
|
+
else if (instance.client) {
|
|
206
|
+
yield* bounded(signal => target.client.update(node.props, { signal, children, ...(operationScope ? { scope: operationScope } : {}) })).pipe(Effect.onExit(exit => Effect.sync(() => { if (exit._tag === "Failure")
|
|
207
|
+
target.failed = true; })));
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
instance.client = yield* bounded(signal => {
|
|
211
|
+
const result = module.mountPersistent(target.host, node.props, { signal, children, ...(operationScope ? { scope: operationScope } : {}) });
|
|
212
|
+
if (Effect.isEffect(result))
|
|
213
|
+
return result;
|
|
214
|
+
if (result && typeof result.then === "function")
|
|
215
|
+
return result.then(client => {
|
|
216
|
+
if (signal.aborted)
|
|
217
|
+
void run(bounded(() => client.dispose())).catch(errors);
|
|
218
|
+
return client;
|
|
219
|
+
});
|
|
220
|
+
return result;
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
else if (node.kind === "boundary") {
|
|
225
|
+
instance.host.setAttribute("data-fuzor-status", node.status);
|
|
226
|
+
if (node.status === "resolved")
|
|
227
|
+
instance.boundaryResolved = true;
|
|
228
|
+
if (!retainBoundary) {
|
|
229
|
+
const boundary = instance;
|
|
230
|
+
const descendants = yield* reconcile(instance.host, instance.children.get("content") ?? [], node.children, version, adopt, connection).pipe(Effect.catchCause(cause => Effect.gen(function* () {
|
|
231
|
+
if (disposed || version !== generation)
|
|
232
|
+
return yield* Effect.failCause(cause);
|
|
233
|
+
errors(cause);
|
|
234
|
+
// External adapter side effects cannot be rolled back. Release this
|
|
235
|
+
// boundary's children and show a local fallback; keep siblings alive.
|
|
236
|
+
yield* Effect.forEach(boundary.children.get("content") ?? [], child => external(() => child.dispose()).pipe(Effect.catchCause(error => Effect.sync(() => errors(error)))), { discard: true });
|
|
237
|
+
boundary.boundaryResolved = false;
|
|
238
|
+
boundary.host.setAttribute("data-fuzor-status", "error");
|
|
239
|
+
const fallback = document.createElement("p");
|
|
240
|
+
fallback.setAttribute("role", "status");
|
|
241
|
+
fallback.textContent = "This section could not be loaded.";
|
|
242
|
+
boundary.host.replaceChildren(fallback);
|
|
243
|
+
return [];
|
|
244
|
+
})));
|
|
245
|
+
instance.children.set("content", descendants);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
else if (node.kind === "fragment") {
|
|
249
|
+
for (const binding of options.manifest.templates[node.template].bindings)
|
|
250
|
+
if (binding.kind === "slot") {
|
|
251
|
+
const slot = marker(instance, binding.name);
|
|
252
|
+
const children = yield* reconcile(slot, instance.children.get(binding.name) ?? [], node.slots[binding.name] ?? [], version, adopt, connection);
|
|
253
|
+
instance.children.set(binding.name, children);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (connection)
|
|
258
|
+
for (const instance of next)
|
|
259
|
+
if (instance.node.kind !== "client")
|
|
260
|
+
instance.presentation = connection.group(instance.node.key, [...instance.children.values()].flat().map(child => child.presentation));
|
|
261
|
+
for (const instance of byKey.values())
|
|
262
|
+
yield* external(() => instance.dispose());
|
|
263
|
+
let cursor = parent.firstChild;
|
|
264
|
+
for (const instance of next) {
|
|
265
|
+
if (instance.host !== cursor)
|
|
266
|
+
parent.insertBefore(instance.host, cursor);
|
|
267
|
+
cursor = instance.host.nextSibling;
|
|
268
|
+
}
|
|
269
|
+
// Initial adoption removes fallback/unmatched nodes, without replacing retained hosts.
|
|
270
|
+
const kept = new Set(next.map(instance => instance.host));
|
|
271
|
+
for (const child of Array.from(parent.childNodes))
|
|
272
|
+
if (!kept.has(child))
|
|
273
|
+
child.remove();
|
|
274
|
+
complete = true;
|
|
275
|
+
return next;
|
|
276
|
+
}
|
|
277
|
+
catch (error) {
|
|
278
|
+
for (const instance of created)
|
|
279
|
+
yield* external(() => instance.dispose());
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
282
|
+
}, Effect.scoped);
|
|
283
|
+
const prepare = Effect.fnUntraced(function* (snapshot, version) {
|
|
284
|
+
const required = new Map();
|
|
285
|
+
const visit = (nodes, recoverable = false) => {
|
|
286
|
+
for (const node of nodes)
|
|
287
|
+
if (node.kind === "client") {
|
|
288
|
+
required.set(node.component, (required.get(node.component) ?? true) && recoverable);
|
|
289
|
+
visit(node.children ?? [], recoverable);
|
|
290
|
+
}
|
|
291
|
+
else if (node.kind === "boundary")
|
|
292
|
+
visit(node.children, true);
|
|
293
|
+
else
|
|
294
|
+
Object.values(node.slots).forEach(children => visit(children, recoverable));
|
|
295
|
+
};
|
|
296
|
+
visit(snapshot.tree);
|
|
297
|
+
yield* Effect.forEach(required, ([id, recoverable]) => {
|
|
298
|
+
const failed = preparationErrors.get(`${version}:${id}`);
|
|
299
|
+
if (failed)
|
|
300
|
+
return recoverable ? Effect.void : Effect.fail(failed);
|
|
301
|
+
return bounded(() => {
|
|
302
|
+
if (!modules.has(id)) {
|
|
303
|
+
const load = clients[id]();
|
|
304
|
+
modules.set(id, load);
|
|
305
|
+
void load.catch(() => { if (modules.get(id) === load)
|
|
306
|
+
modules.delete(id); });
|
|
307
|
+
}
|
|
308
|
+
return modules.get(id);
|
|
309
|
+
}).pipe(Effect.flatMap(module => typeof module.mountPersistent === "function" ? Effect.void : Effect.fail(new Error("Client component needs a persistent mount contract"))), Effect.catch(error => Effect.sync(() => { modules.delete(id); if (version === generation)
|
|
310
|
+
preparationErrors.set(`${version}:${id}`, error); }).pipe(Effect.andThen(recoverable ? Effect.void : Effect.fail(error)))));
|
|
311
|
+
}, { concurrency: 8, discard: true });
|
|
312
|
+
});
|
|
313
|
+
const commit = Effect.fnUntraced(function* (snapshot, version) {
|
|
314
|
+
if (disposed || version !== generation)
|
|
315
|
+
return false;
|
|
316
|
+
const active = document.activeElement;
|
|
317
|
+
const selection = active && isInput(active) ? [active.selectionStart, active.selectionEnd, active.selectionDirection] : undefined;
|
|
318
|
+
if (scope !== undefined && scope !== snapshot.scope) {
|
|
319
|
+
for (const root of roots)
|
|
320
|
+
yield* external(() => root.dispose());
|
|
321
|
+
roots = [];
|
|
322
|
+
}
|
|
323
|
+
const adopt = scope === undefined;
|
|
324
|
+
operationScope = snapshot.scope;
|
|
325
|
+
const next = yield* reconcile(outlet, roots, snapshot.tree, version, adopt);
|
|
326
|
+
roots = next;
|
|
327
|
+
scope = snapshot.scope;
|
|
328
|
+
if (active?.isConnected && document.activeElement !== active) {
|
|
329
|
+
active.focus({ preventScroll: true });
|
|
330
|
+
if (selection && selection[0] !== null && selection[1] !== null)
|
|
331
|
+
try {
|
|
332
|
+
active.setSelectionRange(selection[0], selection[1], selection[2] ?? undefined);
|
|
333
|
+
}
|
|
334
|
+
catch (error) {
|
|
335
|
+
errors(error);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
outlet.dispatchEvent(new document.defaultView.CustomEvent("fuzor:view-commit"));
|
|
339
|
+
return true;
|
|
340
|
+
});
|
|
341
|
+
/** One Effect-owned generation owns every frame, including an in-flight commit. */
|
|
342
|
+
const sequence = (payload, signal) => {
|
|
343
|
+
if (disposed)
|
|
344
|
+
return Promise.reject(new Error("View renderer disposed"));
|
|
345
|
+
activeOperation?.abort();
|
|
346
|
+
const controller = new AbortController();
|
|
347
|
+
activeOperation = controller;
|
|
348
|
+
const version = ++generation;
|
|
349
|
+
preparationErrors.clear();
|
|
350
|
+
const operationSignal = signal ? AbortSignal.any([signal, controller.signal]) : controller.signal;
|
|
351
|
+
const schedule = (payload) => run(Effect.gen(function* () {
|
|
352
|
+
if (version !== generation || disposed || operationSignal.aborted)
|
|
353
|
+
return false;
|
|
354
|
+
const snapshot = yield* Effect.try({ try: () => validateSnapshot(payload, options.manifest, clientIds, handlerIds, options.limits), catch: error => error });
|
|
355
|
+
yield* prepare(snapshot, version);
|
|
356
|
+
return yield* commitLock.withPermit(commit(snapshot, version));
|
|
357
|
+
}), operationSignal).catch(error => { if (operationSignal.aborted)
|
|
358
|
+
return false; throw error; });
|
|
359
|
+
return run(Effect.gen(function* () {
|
|
360
|
+
const snapshot = yield* Effect.try({ try: () => validateSnapshot(payload, options.manifest, clientIds, handlerIds, options.limits), catch: error => error });
|
|
361
|
+
yield* prepare(snapshot, version);
|
|
362
|
+
return { commit: () => schedule(snapshot), push: schedule };
|
|
363
|
+
}), operationSignal).catch(error => {
|
|
364
|
+
if (operationSignal.aborted)
|
|
365
|
+
return { commit: () => Promise.resolve(false), push: () => Promise.resolve(false) };
|
|
366
|
+
throw error;
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
const prepareRender = (payload, signal) => sequence(payload, signal).then(pending => pending.commit);
|
|
370
|
+
const render = (payload) => prepareRender(payload).then(commit => commit());
|
|
371
|
+
const followDocument = (push, signal) => {
|
|
372
|
+
stopDocument?.();
|
|
373
|
+
let next = 1, bytes = 0, stopped = false;
|
|
374
|
+
const frameLock = Semaphore.makeUnsafe(1);
|
|
375
|
+
const stop = () => { stopped = true; observer.disconnect(); signal?.removeEventListener("abort", stop); };
|
|
376
|
+
const scan = () => {
|
|
377
|
+
for (const script of document.querySelectorAll("script[data-fuzor-stream]")) {
|
|
378
|
+
const end = script.nextElementSibling;
|
|
379
|
+
// The parser may have inserted the start tag before the full JSON arrives.
|
|
380
|
+
if (!end?.hasAttribute("data-fuzor-frame-end"))
|
|
381
|
+
continue;
|
|
382
|
+
const text = script.textContent ?? "";
|
|
383
|
+
script.remove();
|
|
384
|
+
end.remove();
|
|
385
|
+
void run(frameLock.withPermit(Effect.gen(function* () {
|
|
386
|
+
if (stopped || signal?.aborted)
|
|
387
|
+
return;
|
|
388
|
+
bytes += new TextEncoder().encode(text).byteLength;
|
|
389
|
+
if (bytes > 16 * 1024 * 1024 || next > 65)
|
|
390
|
+
throw new Error("Document view stream limit exceeded");
|
|
391
|
+
const frame = validateFrame(JSON.parse(text), next++);
|
|
392
|
+
if (frame.type === "done") {
|
|
393
|
+
stop();
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
if (!(yield* external(() => push(frame.snapshot))))
|
|
397
|
+
stop();
|
|
398
|
+
}))).catch(error => { stop(); errors(error); });
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
const observer = new document.defaultView.MutationObserver(scan);
|
|
402
|
+
observer.observe(document.documentElement, { childList: true, subtree: true });
|
|
403
|
+
signal?.addEventListener("abort", stop, { once: true });
|
|
404
|
+
stopDocument = stop;
|
|
405
|
+
scan();
|
|
406
|
+
return stop;
|
|
407
|
+
};
|
|
408
|
+
const clear = () => {
|
|
409
|
+
generation++;
|
|
410
|
+
activeOperation?.abort();
|
|
411
|
+
activeFetch?.abort();
|
|
412
|
+
stopDocument?.();
|
|
413
|
+
return run(commitLock.withPermit(Effect.gen(function* () {
|
|
414
|
+
const previous = roots;
|
|
415
|
+
roots = [];
|
|
416
|
+
scope = undefined;
|
|
417
|
+
yield* Effect.forEach(previous, root => external(() => root.dispose()), { concurrency: 8, discard: true });
|
|
418
|
+
})));
|
|
419
|
+
};
|
|
420
|
+
const eventListener = (event) => {
|
|
421
|
+
let target = event.target;
|
|
422
|
+
if (target?.nodeType !== 1)
|
|
423
|
+
target = target?.parentElement ?? null;
|
|
424
|
+
const element = target?.closest(`[data-fuzor-on-${event.type}]`);
|
|
425
|
+
if (!element || !outlet.contains(element))
|
|
426
|
+
return;
|
|
427
|
+
const host = element.closest("fuzor-fragment,fuzor-client,fuzor-boundary");
|
|
428
|
+
const instance = host && owned.get(host);
|
|
429
|
+
if (!instance || instance.node.kind !== "fragment")
|
|
430
|
+
return;
|
|
431
|
+
const name = element.getAttribute(`data-fuzor-on-${event.type}`);
|
|
432
|
+
const reference = instance.node.handlers[name];
|
|
433
|
+
if (!reference)
|
|
434
|
+
return;
|
|
435
|
+
if (reference.preventDefault)
|
|
436
|
+
event.preventDefault();
|
|
437
|
+
const current = target;
|
|
438
|
+
const snapshot = { type: event.type, ...(current && "value" in current ? { value: current.value, checked: current.checked } : {}), ...("key" in event ? { key: String(event.key) } : {}) };
|
|
439
|
+
const props = instance.node.values;
|
|
440
|
+
// Queue by instance, so several clicks during a lazy import keep their order.
|
|
441
|
+
void run(instance.eventLock.withPermit(Effect.gen(function* () {
|
|
442
|
+
if (instance.lifetime.signal.aborted)
|
|
443
|
+
return;
|
|
444
|
+
if (!loadedHandlers.has(reference.id)) {
|
|
445
|
+
const load = handlers[reference.id]();
|
|
446
|
+
loadedHandlers.set(reference.id, load);
|
|
447
|
+
void load.catch(() => { loadedHandlers.delete(reference.id); });
|
|
448
|
+
}
|
|
449
|
+
const handler = yield* bounded(() => loadedHandlers.get(reference.id)).pipe(Effect.catch(error => Effect.sync(() => loadedHandlers.delete(reference.id)).pipe(Effect.andThen(Effect.fail(error)))));
|
|
450
|
+
if (instance.lifetime.signal.aborted)
|
|
451
|
+
return;
|
|
452
|
+
yield* bounded(() => handler({ event: snapshot, element, props, capture: reference.capture ?? {}, signal: instance.lifetime.signal,
|
|
453
|
+
get: name => { const cell = instance.cells.get(name); if (!cell)
|
|
454
|
+
throw new Error(`Unknown state cell: ${name}`); return instance.registry.get(cell); },
|
|
455
|
+
set: (name, value) => {
|
|
456
|
+
if (instance.lifetime.signal.aborted)
|
|
457
|
+
return;
|
|
458
|
+
const cell = instance.cells.get(name);
|
|
459
|
+
if (!cell)
|
|
460
|
+
throw new Error(`Unknown state cell: ${name}`);
|
|
461
|
+
const binding = instance.node.kind === "fragment" ? options.manifest.templates[instance.node.template].bindings.find(binding => binding.name === name && binding.kind === "checked") : undefined;
|
|
462
|
+
if (binding && typeof value !== "boolean")
|
|
463
|
+
throw new Error("Checkbox state requires a boolean");
|
|
464
|
+
scalar(value);
|
|
465
|
+
instance.registry.set(cell, value);
|
|
466
|
+
apply(instance);
|
|
467
|
+
} }));
|
|
468
|
+
})), instance.lifetime.signal).catch(error => { if (!instance.lifetime.signal.aborted)
|
|
469
|
+
errors(error); });
|
|
470
|
+
};
|
|
471
|
+
const eventTypes = ["click", "input", "change", "submit", "keydown"];
|
|
472
|
+
eventTypes.forEach(type => outlet.addEventListener(type, eventListener));
|
|
473
|
+
return {
|
|
474
|
+
render,
|
|
475
|
+
prepare: prepareRender,
|
|
476
|
+
sequence,
|
|
477
|
+
followDocument,
|
|
478
|
+
clear,
|
|
479
|
+
/** Adopt the matching SSR tree; native state restores without calling component setup. */
|
|
480
|
+
resume: () => run(Effect.gen(function* () {
|
|
481
|
+
const script = document.querySelector("script[data-fuzor-snapshot]");
|
|
482
|
+
if (!script)
|
|
483
|
+
return yield* Effect.fail(new Error("Missing server component snapshot"));
|
|
484
|
+
const pending = yield* external(() => sequence(JSON.parse(script.textContent ?? "")));
|
|
485
|
+
const result = yield* external(() => pending.commit());
|
|
486
|
+
if (result && script.hasAttribute("data-fuzor-streaming"))
|
|
487
|
+
followDocument(pending.push);
|
|
488
|
+
return result;
|
|
489
|
+
})),
|
|
490
|
+
refresh: (href, options = {}) => {
|
|
491
|
+
activeFetch?.abort();
|
|
492
|
+
const controller = new AbortController();
|
|
493
|
+
activeFetch = controller;
|
|
494
|
+
const abort = () => controller.abort();
|
|
495
|
+
options.signal?.addEventListener("abort", abort, { once: true });
|
|
496
|
+
if (options.signal?.aborted)
|
|
497
|
+
controller.abort();
|
|
498
|
+
// Supersede pending preparation immediately, not only after the new response arrives.
|
|
499
|
+
activeOperation?.abort();
|
|
500
|
+
const version = ++generation;
|
|
501
|
+
return run(Effect.gen(function* () {
|
|
502
|
+
const target = new URL(href, document.baseURI);
|
|
503
|
+
if (target.origin !== new URL(document.baseURI).origin)
|
|
504
|
+
throw new Error("Server view URL must be same-origin");
|
|
505
|
+
const url = `${normalizeBase(options.base)}_fuzor/render?url=${encodeURIComponent(target.pathname + target.search)}`;
|
|
506
|
+
const response = yield* external(() => (options.fetch ?? globalThis.fetch)(url, { signal: controller.signal, credentials: "same-origin", headers: { accept: "application/vnd.fuzor.view-stream+json" } }));
|
|
507
|
+
if (!response.ok)
|
|
508
|
+
throw new Error(`Server view request failed: ${response.status}`);
|
|
509
|
+
if (response.headers.get("content-type")?.includes("application/vnd.fuzor.view-stream+json")) {
|
|
510
|
+
let pending;
|
|
511
|
+
let committed = true;
|
|
512
|
+
const stream = readViewStream(response, controller.signal);
|
|
513
|
+
yield* Effect.gen(function* () {
|
|
514
|
+
while (committed) {
|
|
515
|
+
const part = yield* external(() => stream.next());
|
|
516
|
+
if (part.done)
|
|
517
|
+
break;
|
|
518
|
+
const snapshot = part.value;
|
|
519
|
+
if (!pending) {
|
|
520
|
+
if (disposed || version !== generation) {
|
|
521
|
+
committed = false;
|
|
522
|
+
break;
|
|
523
|
+
}
|
|
524
|
+
pending = yield* external(() => sequence(snapshot, controller.signal));
|
|
525
|
+
committed = yield* external(() => pending.commit());
|
|
526
|
+
}
|
|
527
|
+
else
|
|
528
|
+
committed = yield* external(() => pending.push(snapshot));
|
|
529
|
+
}
|
|
530
|
+
}).pipe(Effect.ensuring(external(() => stream.return()).pipe(Effect.catch(error => Effect.sync(() => errors(error))))));
|
|
531
|
+
return !!pending && committed;
|
|
532
|
+
}
|
|
533
|
+
const payload = yield* external(() => response.json());
|
|
534
|
+
if (disposed || controller.signal.aborted || version !== generation)
|
|
535
|
+
return false;
|
|
536
|
+
return yield* external(() => render(payload));
|
|
537
|
+
}).pipe(Effect.ensuring(Effect.sync(() => { options.signal?.removeEventListener("abort", abort); if (activeFetch === controller)
|
|
538
|
+
activeFetch = undefined; }))), controller.signal);
|
|
539
|
+
},
|
|
540
|
+
whenIdle: () => run(Effect.gen(function* () {
|
|
541
|
+
yield* commitLock.withPermit(Effect.void);
|
|
542
|
+
const wait = (list) => Effect.forEach(list, instance => instance.eventLock.withPermit(Effect.void).pipe(Effect.flatMap(() => wait([...instance.children.values()].flat()))), { concurrency: 8, discard: true });
|
|
543
|
+
yield* wait(roots);
|
|
544
|
+
})),
|
|
545
|
+
dispose: () => {
|
|
546
|
+
if (disposal)
|
|
547
|
+
return disposal;
|
|
548
|
+
disposed = true;
|
|
549
|
+
generation++;
|
|
550
|
+
activeOperation?.abort();
|
|
551
|
+
activeFetch?.abort();
|
|
552
|
+
stopDocument?.();
|
|
553
|
+
eventTypes.forEach(type => outlet.removeEventListener(type, eventListener));
|
|
554
|
+
return disposal = clear();
|
|
555
|
+
},
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
//# sourceMappingURL=browser.js.map
|