@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,243 @@
|
|
|
1
|
+
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: AdiaCalendarPicker
|
|
5
|
+
tag: calendar-picker-ui
|
|
6
|
+
component: CalendarPicker
|
|
7
|
+
category: input
|
|
8
|
+
version: 1
|
|
9
|
+
description: Date picker with trigger button and popover calendar grid. Form-associated.
|
|
10
|
+
props:
|
|
11
|
+
name:
|
|
12
|
+
description: Form field name
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
required:
|
|
16
|
+
description: Required for validation
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
reflect: true
|
|
20
|
+
disabled:
|
|
21
|
+
description: Disables interaction
|
|
22
|
+
type: boolean
|
|
23
|
+
default: false
|
|
24
|
+
reflect: true
|
|
25
|
+
format:
|
|
26
|
+
description: Display format for the selected date
|
|
27
|
+
type: string
|
|
28
|
+
default: short
|
|
29
|
+
enum:
|
|
30
|
+
- short
|
|
31
|
+
- long
|
|
32
|
+
- iso
|
|
33
|
+
label:
|
|
34
|
+
description: Label text displayed above the trigger
|
|
35
|
+
type: string
|
|
36
|
+
default: ""
|
|
37
|
+
max:
|
|
38
|
+
description: Maximum selectable date in ISO format (YYYY-MM-DD)
|
|
39
|
+
type: string
|
|
40
|
+
default: ""
|
|
41
|
+
min:
|
|
42
|
+
description: Minimum selectable date in ISO format (YYYY-MM-DD)
|
|
43
|
+
type: string
|
|
44
|
+
default: ""
|
|
45
|
+
open:
|
|
46
|
+
description: Whether the calendar popover is open
|
|
47
|
+
type: boolean
|
|
48
|
+
default: false
|
|
49
|
+
reflect: true
|
|
50
|
+
placeholder:
|
|
51
|
+
description: Placeholder text when no date is selected
|
|
52
|
+
type: string
|
|
53
|
+
default: Select date...
|
|
54
|
+
value:
|
|
55
|
+
description: Selected date (ISO string)
|
|
56
|
+
type: string
|
|
57
|
+
default: ""
|
|
58
|
+
events:
|
|
59
|
+
change:
|
|
60
|
+
description: Fired when a date is selected
|
|
61
|
+
slots:
|
|
62
|
+
calendar:
|
|
63
|
+
description: Popover container for the month grid
|
|
64
|
+
label:
|
|
65
|
+
description: Label element above the trigger
|
|
66
|
+
trigger:
|
|
67
|
+
description: Combobox button that opens the calendar popover
|
|
68
|
+
states:
|
|
69
|
+
- name: idle
|
|
70
|
+
description: Default, ready for interaction.
|
|
71
|
+
- name: disabled
|
|
72
|
+
description: Non-interactive; dimmed.
|
|
73
|
+
attribute: disabled
|
|
74
|
+
traits: []
|
|
75
|
+
tokens: {}
|
|
76
|
+
a2ui:
|
|
77
|
+
rules: []
|
|
78
|
+
anti_patterns: []
|
|
79
|
+
examples:
|
|
80
|
+
- name: date-picker
|
|
81
|
+
description: Date and time picker form with calendar picker and time selects.
|
|
82
|
+
a2ui: >-
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"id": "root",
|
|
86
|
+
"component": "Card",
|
|
87
|
+
"children": [
|
|
88
|
+
"sec"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "sec",
|
|
93
|
+
"component": "Section",
|
|
94
|
+
"children": [
|
|
95
|
+
"col"
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "col",
|
|
100
|
+
"component": "Column",
|
|
101
|
+
"children": [
|
|
102
|
+
"name",
|
|
103
|
+
"cal",
|
|
104
|
+
"btn"
|
|
105
|
+
],
|
|
106
|
+
"gap": "4"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"id": "name",
|
|
110
|
+
"component": "Input",
|
|
111
|
+
"label": "Event Name"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "cal",
|
|
115
|
+
"component": "CalendarPicker",
|
|
116
|
+
"label": "Date"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"id": "btn",
|
|
120
|
+
"component": "Button",
|
|
121
|
+
"text": "Schedule",
|
|
122
|
+
"variant": "primary"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
- name: date-range-picker
|
|
126
|
+
description: Date range selection form with start/end calendar pickers, quick-pick badges, and apply button.
|
|
127
|
+
a2ui: >-
|
|
128
|
+
[
|
|
129
|
+
{
|
|
130
|
+
"id": "root",
|
|
131
|
+
"component": "Card",
|
|
132
|
+
"children": [
|
|
133
|
+
"hdr",
|
|
134
|
+
"sec",
|
|
135
|
+
"ftr"
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "hdr",
|
|
140
|
+
"component": "Header",
|
|
141
|
+
"children": [
|
|
142
|
+
"title"
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"id": "title",
|
|
147
|
+
"component": "Text",
|
|
148
|
+
"slot": "heading",
|
|
149
|
+
"textContent": "Select Dates",
|
|
150
|
+
"variant": "section"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"id": "sec",
|
|
154
|
+
"component": "Section",
|
|
155
|
+
"children": [
|
|
156
|
+
"fields"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "fields",
|
|
161
|
+
"component": "Column",
|
|
162
|
+
"children": [
|
|
163
|
+
"calendars-row",
|
|
164
|
+
"quick-picks"
|
|
165
|
+
],
|
|
166
|
+
"gap": "4"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "calendars-row",
|
|
170
|
+
"component": "Row",
|
|
171
|
+
"children": [
|
|
172
|
+
"start-cal",
|
|
173
|
+
"end-cal"
|
|
174
|
+
],
|
|
175
|
+
"gap": "3"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "start-cal",
|
|
179
|
+
"component": "CalendarPicker",
|
|
180
|
+
"label": "Start Date",
|
|
181
|
+
"name": "startDate"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "end-cal",
|
|
185
|
+
"component": "CalendarPicker",
|
|
186
|
+
"label": "End Date",
|
|
187
|
+
"name": "endDate"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "quick-picks",
|
|
191
|
+
"component": "Row",
|
|
192
|
+
"children": [
|
|
193
|
+
"pick-today",
|
|
194
|
+
"pick-week",
|
|
195
|
+
"pick-month",
|
|
196
|
+
"pick-quarter"
|
|
197
|
+
],
|
|
198
|
+
"gap": "2"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"id": "pick-today",
|
|
202
|
+
"component": "Badge",
|
|
203
|
+
"textContent": "Today"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "pick-week",
|
|
207
|
+
"component": "Badge",
|
|
208
|
+
"textContent": "This Week"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"id": "pick-month",
|
|
212
|
+
"component": "Badge",
|
|
213
|
+
"textContent": "This Month"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"id": "pick-quarter",
|
|
217
|
+
"component": "Badge",
|
|
218
|
+
"textContent": "This Quarter"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"id": "ftr",
|
|
222
|
+
"component": "Footer",
|
|
223
|
+
"children": [
|
|
224
|
+
"apply-btn"
|
|
225
|
+
]
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "apply-btn",
|
|
229
|
+
"component": "Button",
|
|
230
|
+
"text": "Apply",
|
|
231
|
+
"variant": "primary"
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
keywords:
|
|
235
|
+
- calendarpicker
|
|
236
|
+
- calendar-picker
|
|
237
|
+
- calendar
|
|
238
|
+
- picker
|
|
239
|
+
synonyms: {}
|
|
240
|
+
related:
|
|
241
|
+
- input
|
|
242
|
+
- button
|
|
243
|
+
- badge
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://adiaui.dev/a2ui/v0_9/components/Canvas.json",
|
|
4
|
+
"title": "Canvas",
|
|
5
|
+
"description": "A2UI rendering surface.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [
|
|
8
|
+
{
|
|
9
|
+
"$ref": "common_types.json#/$defs/ComponentCommon"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"$ref": "common_types.json#/$defs/CatalogComponentCommon"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"properties": {
|
|
16
|
+
"theme": {
|
|
17
|
+
"description": "Component property: theme.",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"default": ""
|
|
20
|
+
},
|
|
21
|
+
"component": {
|
|
22
|
+
"const": "Canvas"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": [
|
|
26
|
+
"component"
|
|
27
|
+
],
|
|
28
|
+
"unevaluatedProperties": false,
|
|
29
|
+
"x-adiaui": {
|
|
30
|
+
"anti_patterns": [],
|
|
31
|
+
"category": "agent",
|
|
32
|
+
"events": {
|
|
33
|
+
"canvas-interaction": {
|
|
34
|
+
"description": "Fired on canvas-interaction."
|
|
35
|
+
},
|
|
36
|
+
"change": {
|
|
37
|
+
"description": "Fired when the value changes (on blur for inputs, on selection for pickers)."
|
|
38
|
+
},
|
|
39
|
+
"click": {
|
|
40
|
+
"description": "Fired on pointer click."
|
|
41
|
+
},
|
|
42
|
+
"input": {
|
|
43
|
+
"description": "Fired on each input change during typing."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"examples": [
|
|
47
|
+
{
|
|
48
|
+
"description": "Basic Canvas usage",
|
|
49
|
+
"a2ui": "[\n {\n \"id\": \"root\",\n \"component\": \"Card\",\n \"children\": [\n \"sec\"\n ]\n },\n {\n \"id\": \"sec\",\n \"component\": \"Section\",\n \"children\": [\n \"comp\"\n ]\n },\n {\n \"id\": \"comp\",\n \"component\": \"Canvas\"\n }\n]",
|
|
50
|
+
"name": "basic-canvas"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"keywords": [
|
|
54
|
+
"canvas"
|
|
55
|
+
],
|
|
56
|
+
"name": "AdiaCanvas",
|
|
57
|
+
"related": [],
|
|
58
|
+
"slots": {
|
|
59
|
+
"default": {
|
|
60
|
+
"description": "Default slot — primary child content."
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"states": [
|
|
64
|
+
{
|
|
65
|
+
"description": "Default, ready for interaction.",
|
|
66
|
+
"name": "idle"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"synonyms": {},
|
|
70
|
+
"tag": "canvas-ui",
|
|
71
|
+
"tokens": {},
|
|
72
|
+
"traits": [],
|
|
73
|
+
"version": 1
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@scope (canvas-ui) {
|
|
2
|
+
|
|
3
|
+
/* ═══════════════════════════════════════════════════════
|
|
4
|
+
TOKENS
|
|
5
|
+
═══════════════════════════════════════════════════════ */
|
|
6
|
+
|
|
7
|
+
:where(:scope) {
|
|
8
|
+
--canvas-bg: var(--a-canvas-0);
|
|
9
|
+
--canvas-fg: var(--a-fg);
|
|
10
|
+
--canvas-font-family: var(--a-font-family);
|
|
11
|
+
--canvas-inset: var(--a-space-2);
|
|
12
|
+
--canvas-surface-bg: var(--a-bg);
|
|
13
|
+
--canvas-surface-max: 56rem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ═══════════════════════════════════════════════════════
|
|
17
|
+
CANVAS HOST
|
|
18
|
+
═══════════════════════════════════════════════════════ */
|
|
19
|
+
|
|
20
|
+
:scope {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
height: 100%;
|
|
26
|
+
background: var(--canvas-bg);
|
|
27
|
+
color: var(--canvas-fg);
|
|
28
|
+
font-family: var(--canvas-font-family);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* ═══════════════════════════════════════════════════════
|
|
32
|
+
SURFACE (a2ui-root area)
|
|
33
|
+
═══════════════════════════════════════════════════════ */
|
|
34
|
+
|
|
35
|
+
[data-canvas-surface] {
|
|
36
|
+
flex: 1;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
padding: var(--canvas-inset);
|
|
42
|
+
min-height: 0;
|
|
43
|
+
background: var(--canvas-surface-bg);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-canvas-surface] > a2ui-root,
|
|
47
|
+
[data-canvas-surface] > theme-ui {
|
|
48
|
+
display: block;
|
|
49
|
+
width: 100%;
|
|
50
|
+
max-width: var(--canvas-surface-max);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { AdiaElement } from '@core/element.js';
|
|
2
|
+
import '../../a2ui/root.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* <canvas-ui> — A2UI rendering surface.
|
|
6
|
+
*
|
|
7
|
+
* Wrapper mode. Wraps an a2ui-root for rendering generated components.
|
|
8
|
+
* Consumer-owns-LLM: fires interaction events, never calls fetch.
|
|
9
|
+
*
|
|
10
|
+
* Events:
|
|
11
|
+
* canvas-interaction — user interacts with rendered components.
|
|
12
|
+
* Detail: { type, targetTag, targetId, value }
|
|
13
|
+
*/
|
|
14
|
+
export class AdiaCanvas extends AdiaElement {
|
|
15
|
+
static properties = {
|
|
16
|
+
theme: { type: String, default: '', reflect: true },
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
static template = () => null;
|
|
20
|
+
|
|
21
|
+
#bound = false;
|
|
22
|
+
#rootEl = null;
|
|
23
|
+
#rootContainer = null;
|
|
24
|
+
#history = []; // P7: version stack (A2UI message arrays)
|
|
25
|
+
#historyIndex = -1;
|
|
26
|
+
static MAX_HISTORY = 10;
|
|
27
|
+
|
|
28
|
+
#onKeydown = (e) => {
|
|
29
|
+
if (e.target.closest('input, textarea, [contenteditable]')) return;
|
|
30
|
+
if (!this.contains(document.activeElement) && document.activeElement !== document.body) return;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
#onClick = (e) => {
|
|
34
|
+
if (!this.#rootEl?.contains(e.target)) return;
|
|
35
|
+
this.#emitInteraction('click', e.target);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
#onChange = (e) => {
|
|
39
|
+
if (!this.#rootEl?.contains(e.target)) return;
|
|
40
|
+
this.#emitInteraction('change', e.target);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
#onInput = (e) => {
|
|
44
|
+
if (!this.#rootEl?.contains(e.target)) return;
|
|
45
|
+
this.#emitInteraction('input', e.target);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
#onRetry = (e) => {
|
|
49
|
+
// Re-dispatch as canvas-interaction with type='retry' for uniform handling
|
|
50
|
+
this.dispatchEvent(new CustomEvent('canvas-interaction', {
|
|
51
|
+
bubbles: true,
|
|
52
|
+
detail: {
|
|
53
|
+
type: 'retry',
|
|
54
|
+
targetTag: 'button-ui',
|
|
55
|
+
targetId: 'retry',
|
|
56
|
+
value: '',
|
|
57
|
+
...e.detail,
|
|
58
|
+
},
|
|
59
|
+
}));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
connected() {
|
|
63
|
+
document.addEventListener('keydown', this.#onKeydown);
|
|
64
|
+
this.addEventListener('click', this.#onClick);
|
|
65
|
+
this.addEventListener('change', this.#onChange);
|
|
66
|
+
this.addEventListener('input', this.#onInput);
|
|
67
|
+
// Forward a2ui-retry from wired error cards so consumers can retry generation
|
|
68
|
+
this.addEventListener('a2ui-retry', this.#onRetry);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
disconnected() {
|
|
72
|
+
document.removeEventListener('keydown', this.#onKeydown);
|
|
73
|
+
this.removeEventListener('click', this.#onClick);
|
|
74
|
+
this.removeEventListener('change', this.#onChange);
|
|
75
|
+
this.removeEventListener('input', this.#onInput);
|
|
76
|
+
this.removeEventListener('a2ui-retry', this.#onRetry);
|
|
77
|
+
this.#rootEl = null;
|
|
78
|
+
this.#rootContainer = null;
|
|
79
|
+
this.#bound = false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
render() {
|
|
83
|
+
if (this.#bound) return;
|
|
84
|
+
this.#bound = true;
|
|
85
|
+
|
|
86
|
+
this.#rootContainer = document.createElement('div');
|
|
87
|
+
this.#rootContainer.setAttribute('data-canvas-surface', '');
|
|
88
|
+
|
|
89
|
+
this.#rootEl = document.createElement('a2ui-root');
|
|
90
|
+
|
|
91
|
+
if (this.theme) {
|
|
92
|
+
const themeEl = document.createElement('theme-n');
|
|
93
|
+
themeEl.setAttribute('preset', this.theme);
|
|
94
|
+
themeEl.appendChild(this.#rootEl);
|
|
95
|
+
this.#rootContainer.appendChild(themeEl);
|
|
96
|
+
} else {
|
|
97
|
+
this.#rootContainer.appendChild(this.#rootEl);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
this.appendChild(this.#rootContainer);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// ── Public API ──
|
|
104
|
+
|
|
105
|
+
/** Process a single A2UI message. */
|
|
106
|
+
process(message) {
|
|
107
|
+
this.#rootEl?.process(message);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** Process an array of A2UI messages. */
|
|
111
|
+
processAll(messages) {
|
|
112
|
+
if (!this.#rootEl) return;
|
|
113
|
+
for (const msg of messages) this.#rootEl.process(msg);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Reset the canvas. */
|
|
117
|
+
reset() {
|
|
118
|
+
this.#rootEl?.reset();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Return formatted innerHTML of the a2ui-root. */
|
|
122
|
+
getHTML() {
|
|
123
|
+
return this.#rootEl?.innerHTML ?? '';
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** Snapshot current state to history stack. */
|
|
127
|
+
pushVersion(messages) {
|
|
128
|
+
// Truncate forward history if we're not at the end
|
|
129
|
+
if (this.#historyIndex < this.#history.length - 1) {
|
|
130
|
+
this.#history = this.#history.slice(0, this.#historyIndex + 1);
|
|
131
|
+
}
|
|
132
|
+
this.#history.push(messages ? [...messages] : []);
|
|
133
|
+
if (this.#history.length > AdiaCanvas.MAX_HISTORY) this.#history.shift();
|
|
134
|
+
this.#historyIndex = this.#history.length - 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Go back one version. Returns false if already at oldest. */
|
|
138
|
+
back() {
|
|
139
|
+
if (this.#historyIndex <= 0) return false;
|
|
140
|
+
this.#historyIndex--;
|
|
141
|
+
this.#restoreVersion();
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Go forward one version. Returns false if already at newest. */
|
|
146
|
+
forward() {
|
|
147
|
+
if (this.#historyIndex >= this.#history.length - 1) return false;
|
|
148
|
+
this.#historyIndex++;
|
|
149
|
+
this.#restoreVersion();
|
|
150
|
+
return true;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
get historyLength() { return this.#history.length; }
|
|
154
|
+
get historyIndex() { return this.#historyIndex; }
|
|
155
|
+
|
|
156
|
+
#restoreVersion() {
|
|
157
|
+
const messages = this.#history[this.#historyIndex];
|
|
158
|
+
this.#rootEl?.reset();
|
|
159
|
+
if (messages) {
|
|
160
|
+
for (const msg of messages) this.#rootEl?.process(msg);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// ── Private ──
|
|
165
|
+
|
|
166
|
+
#emitInteraction(type, target) {
|
|
167
|
+
this.dispatchEvent(new CustomEvent('canvas-interaction', {
|
|
168
|
+
bubbles: true,
|
|
169
|
+
detail: {
|
|
170
|
+
type,
|
|
171
|
+
targetTag: target.localName,
|
|
172
|
+
targetId: target.id || '',
|
|
173
|
+
value: target.value ?? target.getAttribute('text') ?? '',
|
|
174
|
+
},
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
customElements.define('canvas-ui', AdiaCanvas);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Generated by scripts/migrate-yamls-to-v1.mjs — migrated to v1 contract.
|
|
2
|
+
# Edit this file; run `npm run build:components` to regenerate a2ui.json.
|
|
3
|
+
$schema: ../../../../scripts/schemas/component.yaml.schema.json
|
|
4
|
+
name: AdiaCanvas
|
|
5
|
+
tag: canvas-ui
|
|
6
|
+
component: Canvas
|
|
7
|
+
category: agent
|
|
8
|
+
version: 1
|
|
9
|
+
description: A2UI rendering surface.
|
|
10
|
+
props:
|
|
11
|
+
theme:
|
|
12
|
+
description: "Component property: theme."
|
|
13
|
+
type: string
|
|
14
|
+
default: ""
|
|
15
|
+
events:
|
|
16
|
+
canvas-interaction:
|
|
17
|
+
description: "Fired on canvas-interaction."
|
|
18
|
+
change:
|
|
19
|
+
description: "Fired when the value changes (on blur for inputs, on selection for pickers)."
|
|
20
|
+
click:
|
|
21
|
+
description: "Fired on pointer click."
|
|
22
|
+
input:
|
|
23
|
+
description: "Fired on each input change during typing."
|
|
24
|
+
slots:
|
|
25
|
+
default:
|
|
26
|
+
description: "Default slot — primary child content."
|
|
27
|
+
states:
|
|
28
|
+
- name: idle
|
|
29
|
+
description: Default, ready for interaction.
|
|
30
|
+
traits: []
|
|
31
|
+
tokens: {}
|
|
32
|
+
a2ui:
|
|
33
|
+
rules: []
|
|
34
|
+
anti_patterns: []
|
|
35
|
+
examples:
|
|
36
|
+
- name: basic-canvas
|
|
37
|
+
description: Basic Canvas usage
|
|
38
|
+
a2ui: >-
|
|
39
|
+
[
|
|
40
|
+
{
|
|
41
|
+
"id": "root",
|
|
42
|
+
"component": "Card",
|
|
43
|
+
"children": [
|
|
44
|
+
"sec"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "sec",
|
|
49
|
+
"component": "Section",
|
|
50
|
+
"children": [
|
|
51
|
+
"comp"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "comp",
|
|
56
|
+
"component": "Canvas"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
keywords:
|
|
60
|
+
- canvas
|
|
61
|
+
synonyms: {}
|
|
62
|
+
related: []
|