@adia-ai/web-components 0.0.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 +195 -0
- package/a2ui/dockables/action.js +152 -0
- package/a2ui/dockables/base.js +30 -0
- package/a2ui/dockables/controller.js +97 -0
- package/a2ui/dockables/data-source.js +103 -0
- package/a2ui/dockables/index.js +6 -0
- package/a2ui/dockables/lifecycle.js +84 -0
- package/a2ui/dockables/provider.js +59 -0
- package/a2ui/index.js +19 -0
- package/a2ui/manifest-runtime.js +226 -0
- package/a2ui/registry.js +200 -0
- package/a2ui/renderer.js +361 -0
- package/a2ui/root.js +152 -0
- package/a2ui/stream.js +243 -0
- package/a2ui/surface-manifest.js +294 -0
- package/a2ui/surface.js +222 -0
- package/a2ui/wire-factory.js +134 -0
- package/a2ui/wiring-engine.js +209 -0
- package/a2ui/wiring-registry.js +342 -0
- package/components/accordion/accordion.a2ui.json +129 -0
- package/components/accordion/accordion.css +133 -0
- package/components/accordion/accordion.js +125 -0
- package/components/accordion/accordion.yaml +527 -0
- package/components/action-list/action-list.a2ui.json +64 -0
- package/components/action-list/action-list.css +115 -0
- package/components/action-list/action-list.js +149 -0
- package/components/action-list/action-list.yaml +56 -0
- package/components/agent-artifact/agent-artifact.a2ui.json +99 -0
- package/components/agent-artifact/agent-artifact.css +94 -0
- package/components/agent-artifact/agent-artifact.js +169 -0
- package/components/agent-artifact/agent-artifact.yaml +71 -0
- package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +91 -0
- package/components/agent-feedback-bar/agent-feedback-bar.css +33 -0
- package/components/agent-feedback-bar/agent-feedback-bar.js +152 -0
- package/components/agent-feedback-bar/agent-feedback-bar.yaml +65 -0
- package/components/agent-questions/agent-questions.a2ui.json +89 -0
- package/components/agent-questions/agent-questions.css +146 -0
- package/components/agent-questions/agent-questions.js +189 -0
- package/components/agent-questions/agent-questions.yaml +63 -0
- package/components/agent-reasoning/agent-reasoning.a2ui.json +100 -0
- package/components/agent-reasoning/agent-reasoning.css +273 -0
- package/components/agent-reasoning/agent-reasoning.js +469 -0
- package/components/agent-reasoning/agent-reasoning.yaml +70 -0
- package/components/agent-suggestions/agent-suggestions.a2ui.json +87 -0
- package/components/agent-suggestions/agent-suggestions.css +18 -0
- package/components/agent-suggestions/agent-suggestions.js +87 -0
- package/components/agent-suggestions/agent-suggestions.yaml +59 -0
- package/components/agent-trace/agent-trace.a2ui.json +78 -0
- package/components/agent-trace/agent-trace.css +275 -0
- package/components/agent-trace/agent-trace.js +216 -0
- package/components/agent-trace/agent-trace.yaml +53 -0
- package/components/alert/alert.a2ui.json +211 -0
- package/components/alert/alert.css +88 -0
- package/components/alert/alert.js +96 -0
- package/components/alert/alert.yaml +205 -0
- package/components/avatar/avatar.a2ui.json +215 -0
- package/components/avatar/avatar.css +159 -0
- package/components/avatar/avatar.js +157 -0
- package/components/avatar/avatar.yaml +559 -0
- package/components/badge/badge.a2ui.json +169 -0
- package/components/badge/badge.css +78 -0
- package/components/badge/badge.js +53 -0
- package/components/badge/badge.yaml +612 -0
- package/components/block/block.a2ui.json +135 -0
- package/components/block/block.css +29 -0
- package/components/block/block.js +23 -0
- package/components/block/block.yaml +115 -0
- package/components/breadcrumb/breadcrumb.a2ui.json +86 -0
- package/components/breadcrumb/breadcrumb.css +78 -0
- package/components/breadcrumb/breadcrumb.js +44 -0
- package/components/breadcrumb/breadcrumb.yaml +84 -0
- package/components/button/button.a2ui.json +172 -0
- package/components/button/button.css +168 -0
- package/components/button/button.js +60 -0
- package/components/button/button.yaml +120 -0
- package/components/calendar-picker/calendar-picker.a2ui.json +139 -0
- package/components/calendar-picker/calendar-picker.css +321 -0
- package/components/calendar-picker/calendar-picker.js +324 -0
- package/components/calendar-picker/calendar-picker.yaml +243 -0
- package/components/canvas/canvas.a2ui.json +75 -0
- package/components/canvas/canvas.css +52 -0
- package/components/canvas/canvas.js +179 -0
- package/components/canvas/canvas.yaml +62 -0
- package/components/card/card.a2ui.json +276 -0
- package/components/card/card.css +362 -0
- package/components/card/card.js +58 -0
- package/components/card/card.yaml +527 -0
- package/components/chart/chart.a2ui.json +298 -0
- package/components/chart/chart.css +512 -0
- package/components/chart/chart.js +1075 -0
- package/components/chart/chart.yaml +540 -0
- package/components/chat/chat-input.css +141 -0
- package/components/chat/chat-input.js +242 -0
- package/components/chat/chat.a2ui.json +181 -0
- package/components/chat/chat.css +193 -0
- package/components/chat/chat.js +155 -0
- package/components/chat/chat.yaml +230 -0
- package/components/check/check.a2ui.json +134 -0
- package/components/check/check.css +126 -0
- package/components/check/check.js +58 -0
- package/components/check/check.yaml +109 -0
- package/components/code/code.a2ui.json +153 -0
- package/components/code/code.css +133 -0
- package/components/code/code.js +114 -0
- package/components/code/code.yaml +163 -0
- package/components/col/col.a2ui.json +104 -0
- package/components/col/col.css +36 -0
- package/components/col/col.js +19 -0
- package/components/col/col.yaml +364 -0
- package/components/color-picker/color-picker.a2ui.json +100 -0
- package/components/color-picker/color-picker.css +182 -0
- package/components/color-picker/color-picker.js +537 -0
- package/components/color-picker/color-picker.yaml +105 -0
- package/components/command/command.a2ui.json +221 -0
- package/components/command/command.css +251 -0
- package/components/command/command.js +284 -0
- package/components/command/command.yaml +186 -0
- package/components/description-list/description-list.a2ui.json +89 -0
- package/components/description-list/description-list.css +70 -0
- package/components/description-list/description-list.js +75 -0
- package/components/description-list/description-list.yaml +59 -0
- package/components/divider/divider.a2ui.json +126 -0
- package/components/divider/divider.css +102 -0
- package/components/divider/divider.js +47 -0
- package/components/divider/divider.yaml +366 -0
- package/components/drawer/drawer.a2ui.json +199 -0
- package/components/drawer/drawer.css +342 -0
- package/components/drawer/drawer.js +263 -0
- package/components/drawer/drawer.yaml +366 -0
- package/components/embed/embed.a2ui.json +150 -0
- package/components/embed/embed.css +28 -0
- package/components/embed/embed.js +63 -0
- package/components/embed/embed.yaml +224 -0
- package/components/empty-state/empty-state.a2ui.json +133 -0
- package/components/empty-state/empty-state.css +58 -0
- package/components/empty-state/empty-state.js +87 -0
- package/components/empty-state/empty-state.yaml +314 -0
- package/components/footer/footer.a2ui.json +79 -0
- package/components/footer/footer.yaml +239 -0
- package/components/grid/grid.a2ui.json +171 -0
- package/components/grid/grid.css +37 -0
- package/components/grid/grid.js +21 -0
- package/components/grid/grid.yaml +577 -0
- package/components/header/header.a2ui.json +76 -0
- package/components/header/header.yaml +336 -0
- package/components/heatmap/heatmap.a2ui.json +150 -0
- package/components/heatmap/heatmap.css +146 -0
- package/components/heatmap/heatmap.js +246 -0
- package/components/heatmap/heatmap.yaml +131 -0
- package/components/icon/icon.a2ui.json +79 -0
- package/components/icon/icon.css +20 -0
- package/components/icon/icon.js +26 -0
- package/components/icon/icon.yaml +233 -0
- package/components/image/image.a2ui.json +261 -0
- package/components/image/image.css +76 -0
- package/components/image/image.js +102 -0
- package/components/image/image.yaml +477 -0
- package/components/index.js +85 -0
- package/components/input/input.a2ui.json +284 -0
- package/components/input/input.css +162 -0
- package/components/input/input.js +148 -0
- package/components/input/input.yaml +496 -0
- package/components/inspector/inspector.a2ui.json +67 -0
- package/components/inspector/inspector.css +31 -0
- package/components/inspector/inspector.js +133 -0
- package/components/inspector/inspector.yaml +58 -0
- package/components/kbd/kbd.a2ui.json +96 -0
- package/components/kbd/kbd.css +62 -0
- package/components/kbd/kbd.js +24 -0
- package/components/kbd/kbd.yaml +213 -0
- package/components/list/list.a2ui.json +145 -0
- package/components/list/list.css +103 -0
- package/components/list/list.js +236 -0
- package/components/list/list.yaml +122 -0
- package/components/menu/menu.a2ui.json +146 -0
- package/components/menu/menu.css +146 -0
- package/components/menu/menu.js +296 -0
- package/components/menu/menu.yaml +123 -0
- package/components/modal/modal.a2ui.json +136 -0
- package/components/modal/modal.css +153 -0
- package/components/modal/modal.js +181 -0
- package/components/modal/modal.yaml +114 -0
- package/components/noodles/noodles.a2ui.json +145 -0
- package/components/noodles/noodles.css +118 -0
- package/components/noodles/noodles.js +470 -0
- package/components/noodles/noodles.yaml +123 -0
- package/components/otp-input/otp-input.a2ui.json +104 -0
- package/components/otp-input/otp-input.css +78 -0
- package/components/otp-input/otp-input.js +170 -0
- package/components/otp-input/otp-input.yaml +218 -0
- package/components/pagination/pagination.a2ui.json +122 -0
- package/components/pagination/pagination.css +162 -0
- package/components/pagination/pagination.js +185 -0
- package/components/pagination/pagination.yaml +165 -0
- package/components/pane/pane.a2ui.json +94 -0
- package/components/pane/pane.css +166 -0
- package/components/pane/pane.js +140 -0
- package/components/pane/pane.yaml +197 -0
- package/components/pipeline-status/pipeline-status.a2ui.json +90 -0
- package/components/pipeline-status/pipeline-status.css +162 -0
- package/components/pipeline-status/pipeline-status.js +176 -0
- package/components/pipeline-status/pipeline-status.yaml +99 -0
- package/components/popover/popover.a2ui.json +181 -0
- package/components/popover/popover.css +57 -0
- package/components/popover/popover.js +170 -0
- package/components/popover/popover.yaml +257 -0
- package/components/progress/progress.a2ui.json +199 -0
- package/components/progress/progress.css +88 -0
- package/components/progress/progress.js +64 -0
- package/components/progress/progress.yaml +342 -0
- package/components/progress-row/progress-row.a2ui.json +100 -0
- package/components/progress-row/progress-row.css +57 -0
- package/components/progress-row/progress-row.js +92 -0
- package/components/progress-row/progress-row.yaml +87 -0
- package/components/radio/radio.a2ui.json +232 -0
- package/components/radio/radio.css +102 -0
- package/components/radio/radio.js +73 -0
- package/components/radio/radio.yaml +248 -0
- package/components/range/range.a2ui.json +151 -0
- package/components/range/range.css +148 -0
- package/components/range/range.js +177 -0
- package/components/range/range.yaml +188 -0
- package/components/rating/rating.a2ui.json +105 -0
- package/components/rating/rating.css +92 -0
- package/components/rating/rating.js +138 -0
- package/components/rating/rating.yaml +74 -0
- package/components/richtext/richtext.a2ui.json +82 -0
- package/components/richtext/richtext.css +225 -0
- package/components/richtext/richtext.js +74 -0
- package/components/richtext/richtext.yaml +89 -0
- package/components/row/row.a2ui.json +102 -0
- package/components/row/row.css +51 -0
- package/components/row/row.js +39 -0
- package/components/row/row.yaml +358 -0
- package/components/search/search.a2ui.json +186 -0
- package/components/search/search.css +28 -0
- package/components/search/search.js +124 -0
- package/components/search/search.yaml +154 -0
- package/components/section/section.a2ui.json +78 -0
- package/components/section/section.yaml +338 -0
- package/components/segment/segment.a2ui.json +100 -0
- package/components/segment/segment.css +81 -0
- package/components/segment/segment.js +32 -0
- package/components/segment/segment.yaml +216 -0
- package/components/segmented/segmented.a2ui.json +106 -0
- package/components/segmented/segmented.css +67 -0
- package/components/segmented/segmented.js +149 -0
- package/components/segmented/segmented.yaml +91 -0
- package/components/select/select.a2ui.json +203 -0
- package/components/select/select.css +277 -0
- package/components/select/select.js +388 -0
- package/components/select/select.yaml +375 -0
- package/components/skeleton/skeleton.a2ui.json +120 -0
- package/components/skeleton/skeleton.css +47 -0
- package/components/skeleton/skeleton.js +43 -0
- package/components/skeleton/skeleton.yaml +153 -0
- package/components/slider/slider.a2ui.json +162 -0
- package/components/slider/slider.css +137 -0
- package/components/slider/slider.js +162 -0
- package/components/slider/slider.yaml +299 -0
- package/components/stack/stack.a2ui.json +62 -0
- package/components/stack/stack.css +28 -0
- package/components/stack/stack.js +18 -0
- package/components/stack/stack.yaml +54 -0
- package/components/stat/stat.a2ui.json +246 -0
- package/components/stat/stat.css +101 -0
- package/components/stat/stat.js +91 -0
- package/components/stat/stat.yaml +206 -0
- package/components/stepper/stepper.a2ui.json +77 -0
- package/components/stepper/stepper.css +243 -0
- package/components/stepper/stepper.js +118 -0
- package/components/stepper/stepper.yaml +73 -0
- package/components/stream/stream.a2ui.json +98 -0
- package/components/stream/stream.css +37 -0
- package/components/stream/stream.js +99 -0
- package/components/stream/stream.yaml +87 -0
- package/components/swiper/swiper.a2ui.json +140 -0
- package/components/swiper/swiper.css +267 -0
- package/components/swiper/swiper.js +285 -0
- package/components/swiper/swiper.yaml +268 -0
- package/components/switch/switch.a2ui.json +134 -0
- package/components/switch/switch.css +104 -0
- package/components/switch/switch.js +53 -0
- package/components/switch/switch.yaml +322 -0
- package/components/table/cell-types.js +296 -0
- package/components/table/table.a2ui.json +458 -0
- package/components/table/table.css +531 -0
- package/components/table/table.js +1392 -0
- package/components/table/table.yaml +528 -0
- package/components/tabs/tab.js +34 -0
- package/components/tabs/tabs.a2ui.json +174 -0
- package/components/tabs/tabs.css +162 -0
- package/components/tabs/tabs.js +226 -0
- package/components/tabs/tabs.yaml +255 -0
- package/components/tag/tag.a2ui.json +148 -0
- package/components/tag/tag.css +118 -0
- package/components/tag/tag.js +88 -0
- package/components/tag/tag.yaml +125 -0
- package/components/text/text.a2ui.json +99 -0
- package/components/text/text.css +65 -0
- package/components/text/text.js +35 -0
- package/components/text/text.yaml +360 -0
- package/components/textarea/textarea.a2ui.json +91 -0
- package/components/textarea/textarea.css +93 -0
- package/components/textarea/textarea.js +114 -0
- package/components/textarea/textarea.yaml +79 -0
- package/components/timeline/timeline.a2ui.json +82 -0
- package/components/timeline/timeline.css +389 -0
- package/components/timeline/timeline.js +171 -0
- package/components/timeline/timeline.yaml +185 -0
- package/components/toast/toast.a2ui.json +199 -0
- package/components/toast/toast.css +211 -0
- package/components/toast/toast.js +146 -0
- package/components/toast/toast.yaml +184 -0
- package/components/toggle-group/toggle-group.a2ui.json +126 -0
- package/components/toggle-group/toggle-group.css +102 -0
- package/components/toggle-group/toggle-group.js +147 -0
- package/components/toggle-group/toggle-group.yaml +98 -0
- package/components/toolbar/toolbar.a2ui.json +131 -0
- package/components/toolbar/toolbar.css +132 -0
- package/components/toolbar/toolbar.js +366 -0
- package/components/toolbar/toolbar.yaml +238 -0
- package/components/tooltip/tooltip.a2ui.json +148 -0
- package/components/tooltip/tooltip.css +39 -0
- package/components/tooltip/tooltip.js +96 -0
- package/components/tooltip/tooltip.yaml +201 -0
- package/components/tree/tree.a2ui.json +119 -0
- package/components/tree/tree.css +133 -0
- package/components/tree/tree.js +253 -0
- package/components/tree/tree.yaml +92 -0
- package/components/upload/upload.a2ui.json +185 -0
- package/components/upload/upload.css +115 -0
- package/components/upload/upload.js +189 -0
- package/components/upload/upload.yaml +302 -0
- package/core/anchor.js +187 -0
- package/core/controller.js +182 -0
- package/core/element.js +257 -0
- package/core/form.js +217 -0
- package/core/icons.js +180 -0
- package/core/markdown.js +95 -0
- package/core/polyfills.js +23 -0
- package/core/provider.js +262 -0
- package/core/signals.js +113 -0
- package/core/template.js +226 -0
- package/core/transport.js +77 -0
- package/package.json +38 -0
- package/patterns/adia-chat/adia-chat.a2ui.json +149 -0
- package/patterns/adia-chat/adia-chat.css +10 -0
- package/patterns/adia-chat/adia-chat.js +297 -0
- package/patterns/adia-chat/adia-chat.yaml +118 -0
- package/patterns/adia-chat/css/adia-chat.empty.css +12 -0
- package/patterns/adia-chat/css/adia-chat.layout.css +60 -0
- package/patterns/adia-chat/css/adia-chat.markdown.css +74 -0
- package/patterns/adia-chat/css/adia-chat.messages.css +87 -0
- package/patterns/adia-chat/css/adia-chat.streaming.css +30 -0
- package/patterns/adia-chat/css/adia-chat.tokens.css +95 -0
- package/patterns/adia-chat/index.html +93 -0
- package/patterns/adia-editor/adia-editor.a2ui.json +58 -0
- package/patterns/adia-editor/adia-editor.css +6 -0
- package/patterns/adia-editor/adia-editor.js +56 -0
- package/patterns/adia-editor/adia-editor.yaml +36 -0
- package/patterns/adia-editor/css/adia-editor.layout.css +86 -0
- package/patterns/adia-editor/css/adia-editor.tokens.css +28 -0
- package/patterns/adia-editor/index.html +179 -0
- package/patterns/app-nav/app-nav.a2ui.json +89 -0
- package/patterns/app-nav/app-nav.css +92 -0
- package/patterns/app-nav/app-nav.js +99 -0
- package/patterns/app-nav/app-nav.yaml +54 -0
- package/patterns/app-nav-group/app-nav-group.a2ui.json +82 -0
- package/patterns/app-nav-group/app-nav-group.css +261 -0
- package/patterns/app-nav-group/app-nav-group.js +116 -0
- package/patterns/app-nav-group/app-nav-group.yaml +59 -0
- package/patterns/app-nav-item/app-nav-item.a2ui.json +83 -0
- package/patterns/app-nav-item/app-nav-item.css +156 -0
- package/patterns/app-nav-item/app-nav-item.js +42 -0
- package/patterns/app-nav-item/app-nav-item.yaml +62 -0
- package/patterns/app-shell/app-shell.a2ui.json +114 -0
- package/patterns/app-shell/app-shell.css +14 -0
- package/patterns/app-shell/app-shell.js +251 -0
- package/patterns/app-shell/app-shell.yaml +66 -0
- package/patterns/app-shell/css/app-shell.collapsed.css +86 -0
- package/patterns/app-shell/css/app-shell.helpers.css +42 -0
- package/patterns/app-shell/css/app-shell.main.css +58 -0
- package/patterns/app-shell/css/app-shell.shell.css +44 -0
- package/patterns/app-shell/css/app-shell.sidebar.css +116 -0
- package/patterns/app-shell/css/app-shell.templates.css +214 -0
- package/patterns/app-shell/css/app-shell.tokens.css +116 -0
- package/patterns/app-shell/index.html +112 -0
- package/patterns/gen-ui/gen-ui.a2ui.json +72 -0
- package/patterns/gen-ui/gen-ui.css +83 -0
- package/patterns/gen-ui/gen-ui.js +136 -0
- package/patterns/gen-ui/gen-ui.yaml +43 -0
- package/patterns/index.js +10 -0
- package/patterns/section-nav/section-nav.a2ui.json +91 -0
- package/patterns/section-nav/section-nav.css +59 -0
- package/patterns/section-nav/section-nav.js +42 -0
- package/patterns/section-nav/section-nav.yaml +58 -0
- package/patterns/section-nav-group/section-nav-group.a2ui.json +95 -0
- package/patterns/section-nav-group/section-nav-group.css +74 -0
- package/patterns/section-nav-group/section-nav-group.js +84 -0
- package/patterns/section-nav-group/section-nav-group.yaml +66 -0
- package/patterns/section-nav-item/section-nav-item.a2ui.json +97 -0
- package/patterns/section-nav-item/section-nav-item.css +96 -0
- package/patterns/section-nav-item/section-nav-item.js +66 -0
- package/patterns/section-nav-item/section-nav-item.yaml +70 -0
- package/styles/colors/index.css +6 -0
- package/styles/colors/parameters.css +52 -0
- package/styles/colors/primitives-accent.css +89 -0
- package/styles/colors/primitives-brand.css +89 -0
- package/styles/colors/primitives-danger.css +89 -0
- package/styles/colors/primitives-info.css +89 -0
- package/styles/colors/primitives-neutral.css +91 -0
- package/styles/colors/primitives-shared.css +57 -0
- package/styles/colors/primitives-success.css +89 -0
- package/styles/colors/primitives-warning.css +89 -0
- package/styles/colors/primitives.css +17 -0
- package/styles/colors/scrims.css +182 -0
- package/styles/colors/semantics.css +595 -0
- package/styles/colors/surfaces.css +43 -0
- package/styles/fonts.css +99 -0
- package/styles/layouts/admin.css +7 -0
- package/styles/prose.css +186 -0
- package/styles/styles.css +193 -0
- package/styles/themes.css +155 -0
- package/styles/tokens.css +304 -0
- package/styles/typography.css +853 -0
- package/traits/active-state.js +24 -0
- package/traits/anchor-positioning.js +66 -0
- package/traits/attention-pulse.js +30 -0
- package/traits/confetti-burst.js +65 -0
- package/traits/confetti.js +57 -0
- package/traits/count-up.js +42 -0
- package/traits/define.js +76 -0
- package/traits/dirty-state.js +38 -0
- package/traits/drag-ghost.js +38 -0
- package/traits/draggable.js +73 -0
- package/traits/fade-presence.js +52 -0
- package/traits/focus-trap.js +63 -0
- package/traits/focusable.js +38 -0
- package/traits/glow-focus.js +33 -0
- package/traits/gradient-shift.js +32 -0
- package/traits/haptic-feedback.js +28 -0
- package/traits/hotkey.js +62 -0
- package/traits/hoverable.js +26 -0
- package/traits/index.js +55 -0
- package/traits/inertia-drag.js +133 -0
- package/traits/intersection-observer.js +33 -0
- package/traits/keyboard-nav.js +36 -0
- package/traits/magnetic-hover.js +37 -0
- package/traits/noise-texture.js +30 -0
- package/traits/parallax.js +42 -0
- package/traits/portal.js +27 -0
- package/traits/pressable.js +75 -0
- package/traits/resizable.js +100 -0
- package/traits/resize-observer.js +31 -0
- package/traits/ripple.js +53 -0
- package/traits/roving-tabindex.js +67 -0
- package/traits/scale-press.js +43 -0
- package/traits/scroll-lock.js +27 -0
- package/traits/shimmer-loading.js +44 -0
- package/traits/snap-to-grid.js +28 -0
- package/traits/sound-feedback.js +30 -0
- package/traits/spring-animate.js +56 -0
- package/traits/tilt-hover.js +37 -0
- package/traits/tossable.js +178 -0
- package/traits/typeahead.js +63 -0
- package/traits/typewriter.js +35 -0
- package/traits/validation.js +118 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProviderDock — Injects shared context into a component subtree.
|
|
3
|
+
*
|
|
4
|
+
* Creates an <a2ui-provider> wrapper around the host element.
|
|
5
|
+
* Children can consume the context by name.
|
|
6
|
+
*/
|
|
7
|
+
import { Dockable } from './base.js';
|
|
8
|
+
|
|
9
|
+
export class ProviderDock extends Dockable {
|
|
10
|
+
kind = 'provider';
|
|
11
|
+
|
|
12
|
+
/** @type {string} context name, e.g., "auth" */
|
|
13
|
+
id;
|
|
14
|
+
|
|
15
|
+
/** @type {string|null} component id to wrap (null = root) */
|
|
16
|
+
hostId;
|
|
17
|
+
|
|
18
|
+
/** @type {*} initial context value */
|
|
19
|
+
value;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {object} decl — { name, host?, value? }
|
|
23
|
+
*/
|
|
24
|
+
constructor(decl) {
|
|
25
|
+
super();
|
|
26
|
+
this.id = `provider:${decl.name}`;
|
|
27
|
+
this.hostId = decl.host || null;
|
|
28
|
+
this.value = decl.value ?? null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
dock(ctx) {
|
|
32
|
+
const host = this.hostId
|
|
33
|
+
? ctx.getElement(this.hostId)
|
|
34
|
+
: ctx.getRootElement();
|
|
35
|
+
|
|
36
|
+
if (!host) {
|
|
37
|
+
console.warn(`ProviderDock: host "${this.hostId}" not found`);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const provider = document.createElement('a2ui-provider');
|
|
42
|
+
provider.setAttribute('name', this.id.replace('provider:', ''));
|
|
43
|
+
provider.value = this.value;
|
|
44
|
+
|
|
45
|
+
// Wrap: insert provider before host, move host inside
|
|
46
|
+
host.parentNode?.insertBefore(provider, host);
|
|
47
|
+
provider.appendChild(host);
|
|
48
|
+
|
|
49
|
+
return () => {
|
|
50
|
+
// Unwrap: move host back out, remove provider
|
|
51
|
+
if (provider.parentNode) {
|
|
52
|
+
provider.parentNode.insertBefore(host, provider);
|
|
53
|
+
provider.remove();
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
undock() {}
|
|
59
|
+
}
|
package/a2ui/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Tier 1: Render
|
|
2
|
+
export { registry, resolveTag, registerType } from './registry.js';
|
|
3
|
+
export { A2UIRenderer } from './renderer.js';
|
|
4
|
+
export { sseStream, wsStream, mockStream, mcpStream, jsonlStream } from './stream.js';
|
|
5
|
+
export { AdiaA2UIRoot } from './root.js';
|
|
6
|
+
|
|
7
|
+
// Tier 2: Wire
|
|
8
|
+
export { SurfaceManifest } from './surface-manifest.js';
|
|
9
|
+
export { ManifestRuntime } from './manifest-runtime.js';
|
|
10
|
+
export { ContextStore } from './context-store.js';
|
|
11
|
+
|
|
12
|
+
// Tier 3: Gen-UI
|
|
13
|
+
export { A2UIValidator } from './validator.js';
|
|
14
|
+
export { A2UIGenerator } from './generator.js';
|
|
15
|
+
export { savePattern, importPattern, buildPatternJSON } from './pattern-export.js';
|
|
16
|
+
export * from './retrieval/index.js';
|
|
17
|
+
|
|
18
|
+
// Learning
|
|
19
|
+
export { feedbackStore } from './retrieval/feedback-store.js';
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Manifest Runtime — Loads a surface manifest and manages cross-surface
|
|
3
|
+
* navigation, data flow, context sharing, and lifecycle dependencies.
|
|
4
|
+
*
|
|
5
|
+
* Bridges A008 (design-time manifest) to A007 (per-surface wiring engine).
|
|
6
|
+
* Consumes a SurfaceManifest and orchestrates the live application.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { sharedContextStore } from './context-store.js';
|
|
10
|
+
import { resolveData } from './wiring-registry.js';
|
|
11
|
+
|
|
12
|
+
export class ManifestRuntime {
|
|
13
|
+
/** @type {import('./surface-manifest.js').SurfaceManifest} */
|
|
14
|
+
#manifest;
|
|
15
|
+
|
|
16
|
+
/** @type {Map<string, { mounted: boolean, completed: boolean }>} */
|
|
17
|
+
#surfaceState = new Map();
|
|
18
|
+
|
|
19
|
+
/** @type {Map<string, Function[]>} */
|
|
20
|
+
#triggerListeners = new Map();
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {import('./surface-manifest.js').SurfaceManifest} manifest
|
|
24
|
+
*/
|
|
25
|
+
constructor(manifest) {
|
|
26
|
+
this.#manifest = manifest;
|
|
27
|
+
this.#initSharedContexts();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Initialize shared contexts from the manifest.
|
|
32
|
+
*/
|
|
33
|
+
#initSharedContexts() {
|
|
34
|
+
const json = this.#manifest.toJSON();
|
|
35
|
+
if (json.sharedContexts) {
|
|
36
|
+
for (const [name, config] of Object.entries(json.sharedContexts)) {
|
|
37
|
+
sharedContextStore.define(name, config);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Signal that a surface has mounted (rendered and wired).
|
|
44
|
+
* Joins shared contexts and checks lifecycle dependencies.
|
|
45
|
+
*
|
|
46
|
+
* @param {string} surfaceId
|
|
47
|
+
* @param {Record<string, string>} [params] — Resolved route params
|
|
48
|
+
*/
|
|
49
|
+
async onSurfaceMount(surfaceId, params = {}) {
|
|
50
|
+
this.#surfaceState.set(surfaceId, { mounted: true, completed: false });
|
|
51
|
+
|
|
52
|
+
// Join shared contexts
|
|
53
|
+
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
54
|
+
if (descriptor?.consumes) {
|
|
55
|
+
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
56
|
+
await sharedContextStore.join(contextName, surfaceId, resolveData, params);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Check depends-on: if this surface depends on another, verify it's ready
|
|
61
|
+
const deps = this.#manifest.getAssociationsTo(surfaceId, 'depends-on');
|
|
62
|
+
for (const dep of deps) {
|
|
63
|
+
const depState = this.#surfaceState.get(dep.from);
|
|
64
|
+
const condition = dep.condition || 'mounted';
|
|
65
|
+
|
|
66
|
+
let satisfied = false;
|
|
67
|
+
if (condition === 'mounted') satisfied = depState?.mounted === true;
|
|
68
|
+
if (condition === 'completed') satisfied = depState?.completed === true;
|
|
69
|
+
if (condition === 'has-data') satisfied = this.#hasContextData(surfaceId);
|
|
70
|
+
|
|
71
|
+
if (!satisfied && dep.fallback) {
|
|
72
|
+
this.#executeFallback(dep.fallback, params);
|
|
73
|
+
return false; // Surface should not proceed
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Signal that a surface has unmounted.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} surfaceId
|
|
84
|
+
*/
|
|
85
|
+
onSurfaceUnmount(surfaceId) {
|
|
86
|
+
this.#surfaceState.set(surfaceId, { mounted: false, completed: false });
|
|
87
|
+
|
|
88
|
+
// Leave shared contexts
|
|
89
|
+
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
90
|
+
if (descriptor?.consumes) {
|
|
91
|
+
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
92
|
+
sharedContextStore.leave(contextName, surfaceId);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Signal that a surface's primary action completed (e.g., form submitted).
|
|
99
|
+
* Fires cross-surface triggers.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} surfaceId
|
|
102
|
+
* @param {string} actionName — The action that completed (e.g., "submit-checkin")
|
|
103
|
+
* @param {unknown} [result] — The action's return value
|
|
104
|
+
*/
|
|
105
|
+
async onActionComplete(surfaceId, actionName, result) {
|
|
106
|
+
const state = this.#surfaceState.get(surfaceId);
|
|
107
|
+
if (state) state.completed = true;
|
|
108
|
+
|
|
109
|
+
const trigger = `action:${actionName}`;
|
|
110
|
+
|
|
111
|
+
// Process routes-to associations
|
|
112
|
+
const routes = this.#manifest.getAssociationsFrom(surfaceId, 'routes-to')
|
|
113
|
+
.filter(a => a.trigger === trigger);
|
|
114
|
+
for (const route of routes) {
|
|
115
|
+
const target = this.#manifest.getSurface(route.to);
|
|
116
|
+
if (target?.route) {
|
|
117
|
+
let path = target.route;
|
|
118
|
+
const params = this.#resolveAssocParams(route.params, result);
|
|
119
|
+
for (const [key, value] of Object.entries(params)) {
|
|
120
|
+
path = path.replace(`:${key}`, encodeURIComponent(value));
|
|
121
|
+
}
|
|
122
|
+
location.hash = path;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Process feeds associations
|
|
127
|
+
const feeds = this.#manifest.getAssociationsFrom(surfaceId, 'feeds')
|
|
128
|
+
.filter(a => a.trigger === trigger);
|
|
129
|
+
for (const feed of feeds) {
|
|
130
|
+
if (feed.mapping) {
|
|
131
|
+
for (const [targetPath, source] of Object.entries(feed.mapping)) {
|
|
132
|
+
let value;
|
|
133
|
+
if (source.from === 'action-result') value = result;
|
|
134
|
+
else if (source.from === 'context') value = sharedContextStore.read(source.context, source.key);
|
|
135
|
+
else if (source.from === 'literal') value = source.value;
|
|
136
|
+
|
|
137
|
+
// Store for the target surface to consume when it mounts
|
|
138
|
+
sharedContextStore.update(`__feed_${feed.to}`, { [targetPath]: value });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Process triggers associations
|
|
144
|
+
const triggers = this.#manifest.getAssociationsFrom(surfaceId, 'triggers')
|
|
145
|
+
.filter(a => a.trigger === trigger);
|
|
146
|
+
for (const trig of triggers) {
|
|
147
|
+
this.#executeTriggerEffect(trig.to, trig.effect, result);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get navigation targets from a surface.
|
|
153
|
+
* @param {string} surfaceId
|
|
154
|
+
* @returns {{ surfaceId: string, route: string, trigger: string }[]}
|
|
155
|
+
*/
|
|
156
|
+
getNavigationTargets(surfaceId) {
|
|
157
|
+
return this.#manifest.getAssociationsFrom(surfaceId, 'routes-to')
|
|
158
|
+
.map(a => ({
|
|
159
|
+
surfaceId: a.to,
|
|
160
|
+
route: this.#manifest.getSurface(a.to)?.route || '',
|
|
161
|
+
trigger: a.trigger || '',
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Get the manifest.
|
|
167
|
+
*/
|
|
168
|
+
get manifest() { return this.#manifest; }
|
|
169
|
+
|
|
170
|
+
// ── Internal ──
|
|
171
|
+
|
|
172
|
+
#hasContextData(surfaceId) {
|
|
173
|
+
const descriptor = this.#manifest.getSurface(surfaceId);
|
|
174
|
+
if (!descriptor?.consumes) return true;
|
|
175
|
+
for (const contextName of Object.keys(descriptor.consumes)) {
|
|
176
|
+
if (!sharedContextStore.isPopulated(contextName)) return false;
|
|
177
|
+
}
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
#executeFallback(fallback, params) {
|
|
182
|
+
if (fallback.startsWith('redirect:')) {
|
|
183
|
+
const targetId = fallback.slice('redirect:'.length);
|
|
184
|
+
const target = this.#manifest.getSurface(targetId);
|
|
185
|
+
if (target?.route) {
|
|
186
|
+
let path = target.route;
|
|
187
|
+
for (const [key, value] of Object.entries(params)) {
|
|
188
|
+
path = path.replace(`:${key}`, encodeURIComponent(value));
|
|
189
|
+
}
|
|
190
|
+
location.hash = path;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// Other fallbacks: show-error, wait (future)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
#resolveAssocParams(paramSpec, actionResult) {
|
|
197
|
+
const params = {};
|
|
198
|
+
if (!paramSpec) return params;
|
|
199
|
+
for (const [name, spec] of Object.entries(paramSpec)) {
|
|
200
|
+
if (spec.from === 'event-detail' || spec.from === 'action-result') {
|
|
201
|
+
params[name] = spec.key ? actionResult?.[spec.key] : actionResult;
|
|
202
|
+
} else if (spec.from === 'param') {
|
|
203
|
+
// Read from current route
|
|
204
|
+
const hash = location.hash.slice(1);
|
|
205
|
+
const match = hash.match(new RegExp(`${spec.key}/([^/]+)`));
|
|
206
|
+
if (match) params[name] = match[1];
|
|
207
|
+
} else if (spec.from === 'literal') {
|
|
208
|
+
params[name] = spec.value;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
return params;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
#executeTriggerEffect(targetSurfaceId, effect, data) {
|
|
215
|
+
if (!effect) return;
|
|
216
|
+
|
|
217
|
+
// Dispatch as a custom event that the target surface can listen for
|
|
218
|
+
document.dispatchEvent(new CustomEvent('a2ui-trigger', {
|
|
219
|
+
detail: {
|
|
220
|
+
targetSurface: targetSurfaceId,
|
|
221
|
+
effect,
|
|
222
|
+
data,
|
|
223
|
+
},
|
|
224
|
+
}));
|
|
225
|
+
}
|
|
226
|
+
}
|
package/a2ui/registry.js
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A2UI Registry — maps A2UI type names to AdiaUI custom element tag names.
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { registry, resolveTag } from './registry.js';
|
|
6
|
+
* resolveTag('Button') // → 'button-ui'
|
|
7
|
+
* resolveTag('ChoicePicker') // → 'select-ui'
|
|
8
|
+
* resolveTag('Toggle') // → 'switch-ui'
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export const registry = new Map([
|
|
12
|
+
|
|
13
|
+
// ══════════════════════════════════════════════════════
|
|
14
|
+
// A2UI Protocol Types (standard catalog)
|
|
15
|
+
// ══════════════════════════════════════════════════════
|
|
16
|
+
|
|
17
|
+
// Layout
|
|
18
|
+
['Row', 'row-ui'],
|
|
19
|
+
['Column', 'col-ui'],
|
|
20
|
+
['List', 'list-ui'],
|
|
21
|
+
['Grid', 'grid-ui'],
|
|
22
|
+
['Stack', 'stack-ui'],
|
|
23
|
+
['Block', 'block-ui'],
|
|
24
|
+
|
|
25
|
+
// Display
|
|
26
|
+
['Text', 'text-ui'],
|
|
27
|
+
['Image', 'image-ui'],
|
|
28
|
+
['Icon', 'icon-ui'],
|
|
29
|
+
['Divider', 'divider-ui'],
|
|
30
|
+
['Badge', 'badge-ui'],
|
|
31
|
+
['Avatar', 'avatar-ui'],
|
|
32
|
+
['AvatarGroup', 'avatar-group-ui'],
|
|
33
|
+
['Progress', 'progress-ui'],
|
|
34
|
+
['Skeleton', 'skeleton-ui'],
|
|
35
|
+
['Code', 'code-ui'],
|
|
36
|
+
['Stat', 'stat-ui'],
|
|
37
|
+
['EmptyState', 'empty-state-ui'],
|
|
38
|
+
|
|
39
|
+
// Input
|
|
40
|
+
['Input', 'input-ui'],
|
|
41
|
+
['TextField', 'input-ui'],
|
|
42
|
+
['TextArea', 'textarea-ui'],
|
|
43
|
+
['CheckBox', 'check-ui'],
|
|
44
|
+
['Toggle', 'switch-ui'],
|
|
45
|
+
['Switch', 'switch-ui'],
|
|
46
|
+
['Slider', 'slider-ui'],
|
|
47
|
+
['Range', 'range-ui'],
|
|
48
|
+
['ChoicePicker', 'select-ui'],
|
|
49
|
+
['Select', 'select-ui'],
|
|
50
|
+
['Radio', 'radio-ui'],
|
|
51
|
+
['DateTimeInput', 'calendar-picker-ui'],
|
|
52
|
+
['CalendarPicker', 'calendar-picker-ui'],
|
|
53
|
+
['ColorPicker', 'color-picker-ui'],
|
|
54
|
+
// Search deprecated — use Input type="search" prefix="magnifying-glass"
|
|
55
|
+
['Upload', 'upload-ui'],
|
|
56
|
+
['OtpInput', 'otp-input-ui'],
|
|
57
|
+
|
|
58
|
+
// Action
|
|
59
|
+
['Button', 'button-ui'],
|
|
60
|
+
|
|
61
|
+
// System State
|
|
62
|
+
['LoadingIndicator', 'progress-ui'],
|
|
63
|
+
['ErrorContainer', 'card-ui'],
|
|
64
|
+
|
|
65
|
+
// Container
|
|
66
|
+
['Card', 'card-ui'],
|
|
67
|
+
['Tabs', 'tabs-ui'],
|
|
68
|
+
['Tab', 'tab-ui'],
|
|
69
|
+
['Panel', 'pane-ui'],
|
|
70
|
+
['Pane', 'pane-ui'],
|
|
71
|
+
['Modal', 'modal-ui'],
|
|
72
|
+
['Dialog', 'modal-ui'],
|
|
73
|
+
['Drawer', 'drawer-ui'],
|
|
74
|
+
['Toast', 'toast-ui'],
|
|
75
|
+
['Popover', 'popover-ui'],
|
|
76
|
+
['Accordion', 'accordion-ui'],
|
|
77
|
+
['AccordionItem', 'accordion-item-ui'],
|
|
78
|
+
['Alert', 'alert-ui'],
|
|
79
|
+
['Tooltip', 'tooltip-ui'],
|
|
80
|
+
['Menu', 'menu-ui'],
|
|
81
|
+
|
|
82
|
+
// Card children (native HTML elements styled by card.css)
|
|
83
|
+
['Section', 'section'],
|
|
84
|
+
['Header', 'header'],
|
|
85
|
+
['Footer', 'footer'],
|
|
86
|
+
|
|
87
|
+
// Agent / Specialized
|
|
88
|
+
['Stream', 'stream-ui'],
|
|
89
|
+
['Table', 'table-ui'],
|
|
90
|
+
['Chart', 'chart-ui'],
|
|
91
|
+
['Embed', 'embed-ui'],
|
|
92
|
+
['Swiper', 'swiper-ui'],
|
|
93
|
+
['Slideshow', 'swiper-ui'],
|
|
94
|
+
['Carousel', 'swiper-ui'],
|
|
95
|
+
|
|
96
|
+
// Navigation
|
|
97
|
+
['Breadcrumb', 'breadcrumb-ui'],
|
|
98
|
+
['Nav', 'nav-n'],
|
|
99
|
+
['Noodles', 'noodles-ui'],
|
|
100
|
+
['Pagination', 'pagination-ui'],
|
|
101
|
+
['SegmentedControl', 'segmented-ui'],
|
|
102
|
+
['Segment', 'segment-ui'],
|
|
103
|
+
['ToggleGroup', 'toggle-group-ui'],
|
|
104
|
+
|
|
105
|
+
// Utility
|
|
106
|
+
['Command', 'command-ui'],
|
|
107
|
+
['Kbd', 'kbd-ui'],
|
|
108
|
+
['Toolbar', 'toolbar-ui'],
|
|
109
|
+
['Tag', 'tag-ui'],
|
|
110
|
+
['Timeline', 'timeline-ui'],
|
|
111
|
+
['TimelineItem', 'timeline-item-ui'],
|
|
112
|
+
|
|
113
|
+
// ══════════════════════════════════════════════════════
|
|
114
|
+
// AgentUI Aliases (backwards compat with -ui tags)
|
|
115
|
+
// ══════════════════════════════════════════════════════
|
|
116
|
+
['button-ui', 'button-ui'],
|
|
117
|
+
['card-ui', 'card-ui'],
|
|
118
|
+
['text-ui', 'text-ui'],
|
|
119
|
+
['input-ui', 'input-ui'],
|
|
120
|
+
['text-field-ui', 'input-ui'],
|
|
121
|
+
['select-ui', 'select-ui'],
|
|
122
|
+
['toggle-ui', 'switch-ui'],
|
|
123
|
+
['check-ui', 'check-ui'],
|
|
124
|
+
['slider-ui', 'slider-ui'],
|
|
125
|
+
['badge-ui', 'badge-ui'],
|
|
126
|
+
['avatar-ui', 'avatar-ui'],
|
|
127
|
+
['icon-ui', 'icon-ui'],
|
|
128
|
+
['image-ui', 'image-ui'],
|
|
129
|
+
['divider-ui', 'divider-ui'],
|
|
130
|
+
['progress-ui', 'progress-ui'],
|
|
131
|
+
['skeleton-ui', 'skeleton-ui'],
|
|
132
|
+
['tabs-ui', 'tabs-ui'],
|
|
133
|
+
['tab-ui', 'tab-ui'],
|
|
134
|
+
['modal-ui', 'modal-ui'],
|
|
135
|
+
['dialog-ui', 'modal-ui'],
|
|
136
|
+
['drawer-ui', 'drawer-ui'],
|
|
137
|
+
['toast-ui', 'toast-ui'],
|
|
138
|
+
['popover-ui', 'popover-ui'],
|
|
139
|
+
['panel-ui', 'pane-ui'],
|
|
140
|
+
['accordion-ui', 'accordion-ui'],
|
|
141
|
+
['alert-ui', 'alert-ui'],
|
|
142
|
+
['tooltip-ui', 'tooltip-ui'],
|
|
143
|
+
['menu-ui', 'menu-ui'],
|
|
144
|
+
['table-ui', 'table-ui'],
|
|
145
|
+
['chart-ui', 'chart-ui'],
|
|
146
|
+
['code-ui', 'code-ui'],
|
|
147
|
+
['textarea-ui', 'textarea-ui'],
|
|
148
|
+
['radio-ui', 'radio-ui'],
|
|
149
|
+
['tag-ui', 'tag-ui'],
|
|
150
|
+
['search-ui', 'search-ui'],
|
|
151
|
+
['upload-ui', 'upload-ui'],
|
|
152
|
+
['breadcrumb-ui', 'breadcrumb-ui'],
|
|
153
|
+
['nav-ui', 'nav-n'],
|
|
154
|
+
['noodles-ui', 'noodles-ui'],
|
|
155
|
+
['pagination-ui', 'pagination-ui'],
|
|
156
|
+
['segmented-control-ui', 'segmented-ui'],
|
|
157
|
+
['segment-ui', 'segment-ui'],
|
|
158
|
+
['command-ui', 'command-ui'],
|
|
159
|
+
['calendar-picker-ui', 'calendar-picker-ui'],
|
|
160
|
+
['color-picker-ui', 'color-picker-ui'],
|
|
161
|
+
['kbd-ui', 'kbd-ui'],
|
|
162
|
+
['toolbar-ui', 'toolbar-ui'],
|
|
163
|
+
['otp-input-ui', 'otp-input-ui'],
|
|
164
|
+
['embed-ui', 'embed-ui'],
|
|
165
|
+
['stream-ui', 'stream-ui'],
|
|
166
|
+
['row-ui', 'row-ui'],
|
|
167
|
+
['col-ui', 'col-ui'],
|
|
168
|
+
['grid-ui', 'grid-ui'],
|
|
169
|
+
['stack-ui', 'stack-ui'],
|
|
170
|
+
['block-ui', 'block-ui'],
|
|
171
|
+
['list-ui', 'list-ui'],
|
|
172
|
+
['range-ui', 'range-ui'],
|
|
173
|
+
['datetime-ui', 'calendar-picker-ui'],
|
|
174
|
+
['timeline-ui', 'timeline-ui'],
|
|
175
|
+
['timeline-item-ui', 'timeline-item-ui'],
|
|
176
|
+
['avatar-group-ui', 'avatar-group-ui'],
|
|
177
|
+
|
|
178
|
+
// Aliases (alternate names)
|
|
179
|
+
['Keyboard', 'kbd-ui'],
|
|
180
|
+
['DatePicker', 'calendar-picker-ui'],
|
|
181
|
+
['CommandPalette', 'command-ui'],
|
|
182
|
+
['Segmented', 'segmented-ui'],
|
|
183
|
+
['OTP', 'otp-input-ui'],
|
|
184
|
+
]);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Resolve an A2UI component type to a AdiaUI tag name.
|
|
188
|
+
* @param {string} type — A2UI type name or AgentUI tag
|
|
189
|
+
* @returns {string|null} — AdiaUI tag name or null
|
|
190
|
+
*/
|
|
191
|
+
export function resolveTag(type) {
|
|
192
|
+
return registry.get(type) || null;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Register a custom component type.
|
|
197
|
+
*/
|
|
198
|
+
export function registerType(type, tagName) {
|
|
199
|
+
registry.set(type, tagName);
|
|
200
|
+
}
|