@adia-ai/web-components 0.0.1 → 0.0.3

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.
Files changed (211) hide show
  1. package/a2ui/index.js +23 -17
  2. package/components/accordion/accordion.js +1 -1
  3. package/components/action-list/action-list.js +1 -1
  4. package/components/agent-artifact/agent-artifact.js +1 -1
  5. package/components/agent-feedback-bar/agent-feedback-bar.js +1 -1
  6. package/components/agent-questions/agent-questions.js +1 -1
  7. package/components/agent-reasoning/agent-reasoning.a2ui.json +14 -8
  8. package/components/agent-reasoning/agent-reasoning.css +1 -1
  9. package/components/agent-reasoning/agent-reasoning.js +9 -9
  10. package/components/agent-reasoning/agent-reasoning.yaml +9 -6
  11. package/components/agent-suggestions/agent-suggestions.js +1 -1
  12. package/components/agent-trace/agent-trace.js +1 -1
  13. package/components/alert/alert.js +1 -1
  14. package/components/avatar/avatar.a2ui.json +0 -10
  15. package/components/avatar/avatar.css +1 -1
  16. package/components/avatar/avatar.js +1 -1
  17. package/components/avatar/avatar.yaml +0 -8
  18. package/components/badge/badge.a2ui.json +6 -6
  19. package/components/badge/badge.js +22 -1
  20. package/components/badge/badge.yaml +8 -5
  21. package/components/block/block.js +1 -1
  22. package/components/breadcrumb/breadcrumb.js +1 -1
  23. package/components/button/button.a2ui.json +0 -11
  24. package/components/button/button.css +1 -1
  25. package/components/button/button.js +3 -3
  26. package/components/button/button.yaml +0 -11
  27. package/components/calendar-picker/calendar-picker.js +25 -19
  28. package/components/canvas/canvas.js +3 -3
  29. package/components/card/card.a2ui.json +0 -21
  30. package/components/card/card.js +2 -2
  31. package/components/card/card.yaml +0 -14
  32. package/components/chart/chart.a2ui.json +9 -8
  33. package/components/chart/chart.js +1 -1
  34. package/components/chart/chart.yaml +7 -5
  35. package/components/chat/chat-input.js +1 -1
  36. package/components/chat/chat.js +2 -2
  37. package/components/check/check.css +1 -1
  38. package/components/check/check.js +2 -2
  39. package/components/code/code.a2ui.json +0 -5
  40. package/components/code/code.js +1 -1
  41. package/components/code/code.yaml +0 -4
  42. package/components/col/col.a2ui.json +0 -20
  43. package/components/col/col.js +1 -1
  44. package/components/col/col.yaml +0 -20
  45. package/components/color-picker/color-picker.a2ui.json +1 -1
  46. package/components/color-picker/color-picker.js +5 -2
  47. package/components/color-picker/color-picker.yaml +1 -1
  48. package/components/command/command.js +22 -11
  49. package/components/description-list/description-list.js +1 -1
  50. package/components/divider/divider.a2ui.json +0 -19
  51. package/components/divider/divider.js +1 -1
  52. package/components/divider/divider.yaml +0 -12
  53. package/components/drawer/drawer.a2ui.json +2 -2
  54. package/components/drawer/drawer.css +1 -1
  55. package/components/drawer/drawer.js +2 -2
  56. package/components/drawer/drawer.yaml +3 -3
  57. package/components/embed/embed.js +1 -1
  58. package/components/empty-state/empty-state.a2ui.json +0 -13
  59. package/components/empty-state/empty-state.js +1 -1
  60. package/components/empty-state/empty-state.yaml +0 -5
  61. package/components/footer/footer.a2ui.json +1 -1
  62. package/components/footer/footer.yaml +1 -1
  63. package/components/grid/grid.a2ui.json +0 -5
  64. package/components/grid/grid.js +1 -1
  65. package/components/grid/grid.yaml +0 -4
  66. package/components/header/header.a2ui.json +1 -1
  67. package/components/header/header.yaml +1 -1
  68. package/components/heatmap/heatmap.a2ui.json +4 -4
  69. package/components/heatmap/heatmap.js +4 -4
  70. package/components/heatmap/heatmap.yaml +4 -4
  71. package/components/icon/icon.a2ui.json +13 -0
  72. package/components/icon/icon.js +2 -2
  73. package/components/icon/icon.yaml +6 -0
  74. package/components/image/image.a2ui.json +10 -21
  75. package/components/image/image.js +1 -1
  76. package/components/image/image.yaml +8 -16
  77. package/components/input/input.a2ui.json +0 -15
  78. package/components/input/input.js +2 -2
  79. package/components/input/input.yaml +0 -12
  80. package/components/inspector/inspector.a2ui.json +0 -5
  81. package/components/inspector/inspector.js +2 -2
  82. package/components/inspector/inspector.yaml +0 -4
  83. package/components/kbd/kbd.js +1 -1
  84. package/components/list/list.a2ui.json +0 -33
  85. package/components/list/list.js +1 -1
  86. package/components/list/list.yaml +0 -27
  87. package/components/menu/menu.a2ui.json +0 -10
  88. package/components/menu/menu.js +9 -3
  89. package/components/menu/menu.yaml +0 -8
  90. package/components/modal/modal.a2ui.json +1 -25
  91. package/components/modal/modal.js +1 -1
  92. package/components/modal/modal.yaml +1 -22
  93. package/components/noodles/noodles.a2ui.json +0 -5
  94. package/components/noodles/noodles.js +1 -1
  95. package/components/noodles/noodles.yaml +0 -5
  96. package/components/otp-input/otp-input.a2ui.json +0 -5
  97. package/components/otp-input/otp-input.js +1 -1
  98. package/components/otp-input/otp-input.yaml +0 -4
  99. package/components/pagination/pagination.a2ui.json +3 -13
  100. package/components/pagination/pagination.css +1 -1
  101. package/components/pagination/pagination.js +1 -1
  102. package/components/pagination/pagination.yaml +5 -14
  103. package/components/pane/pane.a2ui.json +0 -10
  104. package/components/pane/pane.js +1 -1
  105. package/components/pane/pane.yaml +0 -9
  106. package/components/pipeline-status/pipeline-status.js +1 -1
  107. package/components/popover/popover.a2ui.json +0 -14
  108. package/components/popover/popover.js +9 -3
  109. package/components/popover/popover.yaml +0 -11
  110. package/components/progress/progress.a2ui.json +2 -12
  111. package/components/progress/progress.js +1 -1
  112. package/components/progress/progress.yaml +2 -11
  113. package/components/progress-row/progress-row.a2ui.json +3 -13
  114. package/components/progress-row/progress-row.js +1 -1
  115. package/components/progress-row/progress-row.yaml +3 -11
  116. package/components/radio/radio.css +1 -1
  117. package/components/radio/radio.js +2 -2
  118. package/components/range/range.js +1 -1
  119. package/components/rating/rating.js +1 -1
  120. package/components/richtext/richtext.js +2 -2
  121. package/components/row/row.a2ui.json +0 -5
  122. package/components/row/row.js +2 -2
  123. package/components/row/row.yaml +0 -4
  124. package/components/search/search.a2ui.json +0 -5
  125. package/components/search/search.js +1 -1
  126. package/components/search/search.yaml +0 -4
  127. package/components/section/section.a2ui.json +1 -1
  128. package/components/section/section.yaml +1 -1
  129. package/components/segment/segment.js +1 -1
  130. package/components/segmented/segmented.css +1 -1
  131. package/components/segmented/segmented.js +1 -1
  132. package/components/select/select.a2ui.json +5 -0
  133. package/components/select/select.js +13 -3
  134. package/components/select/select.yaml +5 -0
  135. package/components/skeleton/skeleton.a2ui.json +0 -11
  136. package/components/skeleton/skeleton.js +1 -1
  137. package/components/skeleton/skeleton.yaml +0 -5
  138. package/components/slider/slider.a2ui.json +0 -5
  139. package/components/slider/slider.js +1 -1
  140. package/components/slider/slider.yaml +0 -5
  141. package/components/stack/stack.js +1 -1
  142. package/components/stat/stat.js +1 -1
  143. package/components/stepper/stepper.js +1 -1
  144. package/components/stream/stream.js +1 -1
  145. package/components/swiper/swiper.a2ui.json +7 -7
  146. package/components/swiper/swiper.js +2 -2
  147. package/components/swiper/swiper.yaml +8 -6
  148. package/components/switch/switch.css +1 -1
  149. package/components/switch/switch.js +2 -2
  150. package/components/table/table.js +1 -1
  151. package/components/tabs/tab.js +1 -1
  152. package/components/tabs/tabs.js +1 -1
  153. package/components/tag/tag.a2ui.json +0 -5
  154. package/components/tag/tag.js +1 -1
  155. package/components/tag/tag.yaml +0 -4
  156. package/components/text/text.a2ui.json +5 -0
  157. package/components/text/text.css +2 -2
  158. package/components/text/text.js +1 -1
  159. package/components/text/text.yaml +5 -0
  160. package/components/textarea/textarea.js +1 -1
  161. package/components/timeline/timeline.a2ui.json +8 -13
  162. package/components/timeline/timeline.js +1 -1
  163. package/components/timeline/timeline.yaml +6 -11
  164. package/components/toast/toast.a2ui.json +0 -15
  165. package/components/toast/toast.js +1 -1
  166. package/components/toast/toast.yaml +0 -13
  167. package/components/toggle-group/toggle-group.js +1 -1
  168. package/components/toolbar/toolbar.a2ui.json +0 -23
  169. package/components/toolbar/toolbar.js +13 -3
  170. package/components/toolbar/toolbar.yaml +0 -19
  171. package/components/tooltip/tooltip.a2ui.json +0 -10
  172. package/components/tooltip/tooltip.js +2 -2
  173. package/components/tooltip/tooltip.yaml +0 -8
  174. package/components/tree/tree.js +1 -1
  175. package/components/upload/upload.js +1 -1
  176. package/core/markdown.js +1 -1
  177. package/core/provider.js +2 -2
  178. package/package.json +7 -3
  179. package/patterns/a2ui-root/a2ui-root.a2ui.json +118 -0
  180. package/{a2ui/root.js → patterns/a2ui-root/a2ui-root.js} +9 -4
  181. package/patterns/a2ui-root/a2ui-root.yaml +76 -0
  182. package/patterns/adia-chat/adia-chat.js +3 -3
  183. package/patterns/adia-chat/css/adia-chat.streaming.css +2 -2
  184. package/patterns/adia-editor/adia-editor.js +1 -1
  185. package/patterns/app-nav/app-nav.js +1 -1
  186. package/patterns/app-nav-group/app-nav-group.js +2 -2
  187. package/patterns/app-nav-item/app-nav-item.js +1 -1
  188. package/patterns/app-shell/app-shell.js +1 -1
  189. package/patterns/gen-ui/gen-ui.css +3 -3
  190. package/patterns/gen-ui/gen-ui.js +1 -1
  191. package/patterns/index.js +1 -0
  192. package/patterns/section-nav/section-nav.js +1 -1
  193. package/patterns/section-nav-group/section-nav-group.js +1 -1
  194. package/patterns/section-nav-item/section-nav-item.js +1 -1
  195. package/traits/define.js +1 -1
  196. package/a2ui/dockables/action.js +0 -152
  197. package/a2ui/dockables/base.js +0 -30
  198. package/a2ui/dockables/controller.js +0 -97
  199. package/a2ui/dockables/data-source.js +0 -103
  200. package/a2ui/dockables/index.js +0 -6
  201. package/a2ui/dockables/lifecycle.js +0 -84
  202. package/a2ui/dockables/provider.js +0 -59
  203. package/a2ui/manifest-runtime.js +0 -226
  204. package/a2ui/registry.js +0 -200
  205. package/a2ui/renderer.js +0 -361
  206. package/a2ui/stream.js +0 -243
  207. package/a2ui/surface-manifest.js +0 -294
  208. package/a2ui/surface.js +0 -222
  209. package/a2ui/wire-factory.js +0 -134
  210. package/a2ui/wiring-engine.js +0 -209
  211. package/a2ui/wiring-registry.js +0 -342
@@ -16,17 +16,6 @@
16
16
  "component": {
17
17
  "const": "Card"
18
18
  },
19
- "density": {
20
- "description": "Interior density — compact/comfortable/spacious. Tightens or loosens padding + gap.",
21
- "type": "string",
22
- "enum": [
23
- "",
24
- "compact",
25
- "comfortable",
26
- "spacious"
27
- ],
28
- "default": ""
29
- },
30
19
  "draggable": {
31
20
  "description": "Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end.",
32
21
  "type": "boolean",
@@ -43,21 +32,11 @@
43
32
  ],
44
33
  "default": 1
45
34
  },
46
- "interactive": {
47
- "description": "Marks the card as clickable — enables hover elevation, pointer cursor, and focus ring.",
48
- "type": "boolean",
49
- "default": false
50
- },
51
35
  "padding": {
52
36
  "description": "Interior padding scale (overrides --card-padding). Accepts the named scale (none/xs/sm/md/lg/xl) or a numeric rung (\"1\"…\"16\").",
53
37
  "type": "string",
54
38
  "default": "md"
55
39
  },
56
- "radius": {
57
- "description": "Border radius preset (overrides --card-radius). Named (none/sm/md/lg/round) or numeric.",
58
- "type": "string",
59
- "default": ""
60
- },
61
40
  "raw": {
62
41
  "description": "Strips background, border, and shadow. Parent owns the surface. Content structure still applies.",
63
42
  "type": "boolean",
@@ -23,8 +23,8 @@
23
23
  * draggable — enables drag handle + cursor:grab; wires the draggable trait
24
24
  */
25
25
 
26
- import { AdiaElement } from '@core/element.js';
27
- import { draggable } from '@traits/draggable.js';
26
+ import { AdiaElement } from '../../core/element.js';
27
+ import { draggable } from '../../traits/draggable.js';
28
28
 
29
29
  class AdiaCard extends AdiaElement {
30
30
  static properties = {
@@ -22,20 +22,6 @@ props:
22
22
  scale (none/xs/sm/md/lg/xl) or a numeric rung ("1"…"16").
23
23
  type: string
24
24
  default: md
25
- interactive:
26
- description: Marks the card as clickable — enables hover elevation, pointer cursor, and focus ring.
27
- type: boolean
28
- default: false
29
- reflect: true
30
- radius:
31
- description: Border radius preset (overrides --card-radius). Named (none/sm/md/lg/round) or numeric.
32
- type: string
33
- default: ""
34
- density:
35
- description: Interior density — compact/comfortable/spacious. Tightens or loosens padding + gap.
36
- type: string
37
- default: ""
38
- enum: ["", compact, comfortable, spacious]
39
25
  draggable:
40
26
  description: Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end.
41
27
  type: boolean
@@ -13,11 +13,6 @@
13
13
  }
14
14
  ],
15
15
  "properties": {
16
- "title": {
17
- "description": "Chart title above the canvas",
18
- "type": "string",
19
- "default": ""
20
- },
21
16
  "type": {
22
17
  "description": "Chart type. Only 'bar' is built-in.",
23
18
  "type": "string",
@@ -38,11 +33,12 @@
38
33
  "description": "Aspect ratio",
39
34
  "type": "string",
40
35
  "enum": [
36
+ "std",
41
37
  "wide",
42
38
  "square",
43
39
  "tall"
44
40
  ],
45
- "default": "wide"
41
+ "default": "std"
46
42
  },
47
43
  "color": {
48
44
  "description": "Color scheme",
@@ -59,6 +55,11 @@
59
55
  "component": {
60
56
  "const": "Chart"
61
57
  },
58
+ "heading": {
59
+ "description": "Chart heading text rendered above the canvas.",
60
+ "type": "string",
61
+ "default": ""
62
+ },
62
63
  "hideAverage": {
63
64
  "description": "When true, suppress the overlaid average line",
64
65
  "type": "boolean",
@@ -75,9 +76,9 @@
75
76
  "default": false
76
77
  },
77
78
  "radius": {
78
- "description": "Bar corner radius",
79
+ "description": "Bar corner radius (null = let CSS tokens decide)",
79
80
  "type": "number",
80
- "default": 4
81
+ "default": null
81
82
  },
82
83
  "size": {
83
84
  "description": "Chart size",
@@ -19,7 +19,7 @@
19
19
  * .data = [{...}, ...] — array of data objects
20
20
  */
21
21
 
22
- import { AdiaElement } from '@core/element.js';
22
+ import { AdiaElement } from '../../core/element.js';
23
23
 
24
24
  /* ── Helpers ────────────────────────────────────────────────────── */
25
25
 
@@ -26,8 +26,9 @@ props:
26
26
  aspect:
27
27
  description: Aspect ratio
28
28
  type: string
29
- default: wide
29
+ default: std
30
30
  enum:
31
+ - std
31
32
  - wide
32
33
  - square
33
34
  - tall
@@ -57,9 +58,9 @@ props:
57
58
  default: false
58
59
  attribute: hide-values
59
60
  radius:
60
- description: Bar corner radius
61
+ description: Bar corner radius (null = let CSS tokens decide)
61
62
  type: number
62
- default: 4
63
+ default: null
63
64
  size:
64
65
  description: Chart size
65
66
  type: string
@@ -72,10 +73,11 @@ props:
72
73
  description: Line smoothing factor
73
74
  type: number
74
75
  default: 0.4
75
- title:
76
- description: Chart title above the canvas
76
+ heading:
77
+ description: Chart heading text rendered above the canvas.
77
78
  type: string
78
79
  default: ""
80
+ reflect: true
79
81
  x:
80
82
  description: Data key for x-axis (category) values
81
83
  type: string
@@ -1,4 +1,4 @@
1
- import { AdiaElement } from '@core/element.js';
1
+ import { AdiaElement } from '../../core/element.js';
2
2
 
3
3
  /**
4
4
  * <chat-input-ui> — Composable chat input bar.
@@ -1,5 +1,5 @@
1
- import { AdiaElement } from '@core/element.js';
2
- import { renderMarkdown } from '@core/markdown.js';
1
+ import { AdiaElement } from '../../core/element.js';
2
+ import { renderMarkdown } from '../../core/markdown.js';
3
3
 
4
4
  function escapeHTML(s) {
5
5
  return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
@@ -24,7 +24,7 @@
24
24
  /* ── State: checked ── */
25
25
  --check-bg-checked: var(--a-primary);
26
26
  --check-border-checked: var(--a-primary);
27
- --check-fg-checked: white;
27
+ --check-fg-checked: var(--a-chrome-light);
28
28
  --check-bg-checked-hover: var(--a-primary-hover);
29
29
 
30
30
  /* ── State: disabled ── */
@@ -3,8 +3,8 @@
3
3
  * Pure CSS checkmark via border trick on [slot="box"]::after. No SVG.
4
4
  */
5
5
 
6
- import { AdiaFormElement } from '@core/form.js';
7
- import { html } from '@core/element.js';
6
+ import { AdiaFormElement } from '../../core/form.js';
7
+ import { html } from '../../core/element.js';
8
8
 
9
9
  class AdiaCheck extends AdiaFormElement {
10
10
  static properties = {
@@ -35,11 +35,6 @@
35
35
  "description": "Code text content",
36
36
  "type": "string",
37
37
  "default": ""
38
- },
39
- "wrap": {
40
- "description": "Enable word wrapping",
41
- "type": "boolean",
42
- "default": false
43
38
  }
44
39
  },
45
40
  "required": [
@@ -9,7 +9,7 @@
9
9
  * updates the rendered code in place.
10
10
  */
11
11
 
12
- import { AdiaElement } from '@core/element.js';
12
+ import { AdiaElement } from '../../core/element.js';
13
13
 
14
14
  class AdiaCode extends AdiaElement {
15
15
  static properties = {
@@ -25,10 +25,6 @@ props:
25
25
  description: Code text content
26
26
  type: string
27
27
  default: ""
28
- wrap:
29
- description: Enable word wrapping
30
- type: boolean
31
- default: false
32
28
  events:
33
29
  copy:
34
30
  description: Fired when text is copied to clipboard
@@ -13,21 +13,11 @@
13
13
  }
14
14
  ],
15
15
  "properties": {
16
- "active": {
17
- "description": "Marks this column as the active one in a tab-panel layout.",
18
- "type": "boolean",
19
- "default": false
20
- },
21
16
  "align": {
22
17
  "description": "Align items",
23
18
  "type": "string",
24
19
  "default": "stretch"
25
20
  },
26
- "basis": {
27
- "description": "Flex basis override (CSS length or keyword like \"auto\"/\"content\").",
28
- "type": "string",
29
- "default": ""
30
- },
31
21
  "component": {
32
22
  "const": "Column"
33
23
  },
@@ -40,16 +30,6 @@
40
30
  "description": "Justify content",
41
31
  "type": "string",
42
32
  "default": "start"
43
- },
44
- "span": {
45
- "description": "Column span — consumed by a parent Grid to make this column wrap multiple grid tracks. Accepts a numeric rung (\"1\"..\"6\") or \"full\".",
46
- "type": "string",
47
- "default": ""
48
- },
49
- "wrap": {
50
- "description": "Allow children to wrap onto multiple lines (default is flex nowrap).",
51
- "type": "boolean",
52
- "default": false
53
33
  }
54
34
  },
55
35
  "required": [
@@ -4,7 +4,7 @@
4
4
  * <col-ui gap="md" align="center">...</col-ui>
5
5
  */
6
6
 
7
- import { AdiaElement } from '@core/element.js';
7
+ import { AdiaElement } from '../../core/element.js';
8
8
 
9
9
  class AdiaCol extends AdiaElement {
10
10
  static properties = {
@@ -22,26 +22,6 @@ props:
22
22
  description: Justify content
23
23
  type: string
24
24
  default: start
25
- span:
26
- description: >-
27
- Column span — consumed by a parent Grid to make this column wrap multiple
28
- grid tracks. Accepts a numeric rung ("1".."6") or "full".
29
- type: string
30
- default: ""
31
- wrap:
32
- description: Allow children to wrap onto multiple lines (default is flex nowrap).
33
- type: boolean
34
- default: false
35
- reflect: true
36
- basis:
37
- description: Flex basis override (CSS length or keyword like "auto"/"content").
38
- type: string
39
- default: ""
40
- active:
41
- description: Marks this column as the active one in a tab-panel layout.
42
- type: boolean
43
- default: false
44
- reflect: true
45
25
  events: {}
46
26
  slots:
47
27
  default:
@@ -38,7 +38,7 @@
38
38
  "value": {
39
39
  "description": "Current color as hex string",
40
40
  "type": "string",
41
- "default": ""
41
+ "default": "#3b82f6"
42
42
  }
43
43
  },
44
44
  "required": [
@@ -16,7 +16,7 @@
16
16
  * Form-associated via AdiaFormElement + ElementInternals.
17
17
  */
18
18
 
19
- import { AdiaFormElement } from '@core/form.js';
19
+ import { AdiaFormElement } from '../../core/form.js';
20
20
 
21
21
  // ── OKLCH ↔ sRGB conversion ──────────────────────────────
22
22
 
@@ -426,7 +426,10 @@ class AdiaColorPicker extends AdiaFormElement {
426
426
  };
427
427
 
428
428
  if (navigator.clipboard?.writeText) {
429
- navigator.clipboard.writeText(text).then(() => onDone(true), () => onDone(false));
429
+ navigator.clipboard.writeText(text).then(
430
+ () => { if (!this.isConnected) return; onDone(true); },
431
+ () => { if (!this.isConnected) return; onDone(false); },
432
+ );
430
433
  } else {
431
434
  const ta = Object.assign(document.createElement('textarea'), { value: text });
432
435
  ta.style.cssText = 'position:fixed;opacity:0';
@@ -27,7 +27,7 @@ props:
27
27
  value:
28
28
  description: Current color as hex string
29
29
  type: string
30
- default: ""
30
+ default: "#3b82f6"
31
31
  events:
32
32
  change:
33
33
  description: Fired on every color change
@@ -1,4 +1,4 @@
1
- import { AdiaElement } from '@core/element.js';
1
+ import { AdiaElement } from '../../core/element.js';
2
2
 
3
3
  /**
4
4
  * <command-ui> — Searchable command palette.
@@ -34,6 +34,21 @@ class AdiaCommand extends AdiaElement {
34
34
  #listEl = null;
35
35
  #footerEl = null;
36
36
  #bound = false;
37
+ #itemByEl = new WeakMap();
38
+
39
+ #onListClick = (e) => {
40
+ const el = e.target instanceof Element ? e.target.closest('[role="option"]:not([aria-disabled])') : null;
41
+ if (!el) return;
42
+ const item = this.#itemByEl.get(el);
43
+ if (item) this.#select(item);
44
+ };
45
+
46
+ #onListPointerOver = (e) => {
47
+ const el = e.target instanceof Element ? e.target.closest('[role="option"]:not([aria-disabled])') : null;
48
+ if (!el) return;
49
+ const idx = parseInt(el.dataset.idx);
50
+ if (Number.isFinite(idx) && idx !== this.#activeIdx) this.#activate(idx);
51
+ };
37
52
 
38
53
  connected() {
39
54
  if (!this.#bound) {
@@ -66,6 +81,9 @@ class AdiaCommand extends AdiaElement {
66
81
  this.#footerEl = this.querySelector('footer');
67
82
 
68
83
  this.#inputEl.addEventListener('input', this.#onInput);
84
+ // Delegated item handlers — handler identity is stable so teardown is symmetric.
85
+ this.#listEl.addEventListener('click', this.#onListClick);
86
+ this.#listEl.addEventListener('pointerover', this.#onListPointerOver);
69
87
  this.#renderItems();
70
88
  }
71
89
 
@@ -173,16 +191,7 @@ class AdiaCommand extends AdiaElement {
173
191
  ${item.shortcut ? `<span data-shortcut>${item.shortcut}</span>` : ''}
174
192
  `;
175
193
 
176
- el.addEventListener('click', () => {
177
- if (item.disabled) return;
178
- this.#select(item);
179
- });
180
-
181
- el.addEventListener('pointerenter', () => {
182
- if (item.disabled) return;
183
- this.#activate(idx);
184
- });
185
-
194
+ this.#itemByEl.set(el, item);
186
195
  return el;
187
196
  }
188
197
 
@@ -273,6 +282,8 @@ class AdiaCommand extends AdiaElement {
273
282
  disconnected() {
274
283
  this.removeEventListener('keydown', this.#onKeydown);
275
284
  this.#inputEl?.removeEventListener('input', this.#onInput);
285
+ this.#listEl?.removeEventListener('click', this.#onListClick);
286
+ this.#listEl?.removeEventListener('pointerover', this.#onListPointerOver);
276
287
  this.#inputEl = null;
277
288
  this.#listEl = null;
278
289
  this.#footerEl = null;
@@ -19,7 +19,7 @@
19
19
  * items — optional JSON array of {term, description} pairs
20
20
  */
21
21
 
22
- import { AdiaElement } from '@core/element.js';
22
+ import { AdiaElement } from '../../core/element.js';
23
23
 
24
24
  class AdiaDescriptionList extends AdiaElement {
25
25
  static properties = {
@@ -13,15 +13,6 @@
13
13
  }
14
14
  ],
15
15
  "properties": {
16
- "axis": {
17
- "description": "Divider orientation.",
18
- "type": "string",
19
- "enum": [
20
- "horizontal",
21
- "vertical"
22
- ],
23
- "default": "horizontal"
24
- },
25
16
  "component": {
26
17
  "const": "Divider"
27
18
  },
@@ -30,16 +21,6 @@
30
21
  "type": "string",
31
22
  "default": ""
32
23
  },
33
- "orientation": {
34
- "description": "Alias for `axis` — accepted for back-compat.",
35
- "type": "string",
36
- "enum": [
37
- "",
38
- "horizontal",
39
- "vertical"
40
- ],
41
- "default": ""
42
- },
43
24
  "vertical": {
44
25
  "description": "Vertical orientation",
45
26
  "type": "boolean",
@@ -7,7 +7,7 @@
7
7
  * Renders as a simple line, or a line broken by centered text.
8
8
  */
9
9
 
10
- import { AdiaElement } from '@core/element.js';
10
+ import { AdiaElement } from '../../core/element.js';
11
11
 
12
12
  class AdiaDivider extends AdiaElement {
13
13
  static properties = {
@@ -8,18 +8,6 @@ category: display
8
8
  version: 1
9
9
  description: Horizontal or vertical divider with optional label.
10
10
  props:
11
- axis:
12
- description: Divider orientation.
13
- type: string
14
- default: horizontal
15
- enum:
16
- - horizontal
17
- - vertical
18
- orientation:
19
- description: Alias for `axis` — accepted for back-compat.
20
- type: string
21
- default: ""
22
- enum: ["", horizontal, vertical]
23
11
  label:
24
12
  description: Center label text
25
13
  type: string
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://adiaui.dev/a2ui/v0_9/components/Drawer.json",
4
4
  "title": "Drawer",
5
- "description": "Slide-out panel anchored to a viewport edge. Uses native <dialog> for focus trap, Escape dismiss, and ::backdrop. Panel is a flex column that scrolls as a whole — the header and footer stick to the top/bottom of the panel when the body overflows. Authors can compose content with either card-n-style bare tags (<header>, <section>, <footer>) or explicit [slot=\"header|body|footer\"] attributes; multiple <section> siblings are allowed and stack in author order between the sticky header and footer. The header activates a card-n-aligned 3-column grid (icon | heading+description | action+close) when any direct [slot=\"icon|heading|description|action\"] child is present.",
5
+ "description": "Slide-out panel anchored to a viewport edge. Uses native <dialog> for focus trap, Escape dismiss, and ::backdrop. Panel is a flex column that scrolls as a whole — the header and footer stick to the top/bottom of the panel when the body overflows. Authors can compose content with either card-ui-style bare tags (<header>, <section>, <footer>) or explicit [slot=\"header|body|footer\"] attributes; multiple <section> siblings are allowed and stack in author order between the sticky header and footer. The header activates a card-ui-aligned 3-column grid (icon | heading+description | action+close) when any direct [slot=\"icon|heading|description|action\"] child is present.",
6
6
  "type": "object",
7
7
  "allOf": [
8
8
  {
@@ -112,7 +112,7 @@
112
112
  "description": "Optional sticky action row pinned to the bottom of the panel. Only mounted if the author supplies a bare <footer> tag or [slot=\"footer\"]. Inner [slot=\"description\"] + [slot=\"action\"] triggers space-between layout, matching card-ui footer semantics."
113
113
  },
114
114
  "header": {
115
- "description": "Title bar — pinned to the top of the panel via position:sticky. Accepts either a bare <header> tag or [slot=\"header\"]. When any direct child has [slot=\"icon|heading|description|action\"], the header activates a card-n-aligned 3-column grid; otherwise renders as a block with the close button appended."
115
+ "description": "Title bar — pinned to the top of the panel via position:sticky. Accepts either a bare <header> tag or [slot=\"header\"]. When any direct child has [slot=\"icon|heading|description|action\"], the header activates a card-ui-aligned 3-column grid; otherwise renders as a block with the close button appended."
116
116
  },
117
117
  "heading": {
118
118
  "description": "Direct child of <header> — grid row 1. Also accepts bare <h1>-<h6> tags. Renders as a flex container, so inline badges/metadata sit alongside the title. If the drawer has a [text] attribute and no author-supplied heading, a <span slot=\"heading\" data-stamped> is stamped with the text value."
@@ -167,7 +167,7 @@
167
167
  transform: translateY(-100%); opacity: 0;
168
168
  }
169
169
 
170
- /* ═══════ Header — card-n-aligned grid ═══════
170
+ /* ═══════ Header — card-ui-aligned grid ═══════
171
171
  Block by default (fallback for empty/free-form content).
172
172
  Grid activates when any slotted child is present. Column template
173
173
  adapts to the presence of [slot="icon"] and [slot="action"|"close"]. */
@@ -5,7 +5,7 @@
5
5
  * Content panel slides in/out with CSS transitions.
6
6
  * Exit animation plays before dialog.close() via [data-closing].
7
7
  *
8
- * Authoring — card-n-style tags (recommended):
8
+ * Authoring — card-ui-style tags (recommended):
9
9
  * <drawer-ui side="right" size="md">
10
10
  * <header>Title block</header>
11
11
  * <section>Body content</section>
@@ -29,7 +29,7 @@
29
29
  * close — fired after the drawer finishes closing
30
30
  */
31
31
 
32
- import { AdiaElement } from '@core/element.js';
32
+ import { AdiaElement } from '../../core/element.js';
33
33
 
34
34
  class AdiaDrawer extends AdiaElement {
35
35
  #bound = false;
@@ -10,10 +10,10 @@ description: >-
10
10
  Slide-out panel anchored to a viewport edge. Uses native <dialog> for focus trap,
11
11
  Escape dismiss, and ::backdrop. Panel is a flex column that scrolls as a whole — the
12
12
  header and footer stick to the top/bottom of the panel when the body overflows.
13
- Authors can compose content with either card-n-style bare tags (<header>, <section>,
13
+ Authors can compose content with either card-ui-style bare tags (<header>, <section>,
14
14
  <footer>) or explicit [slot="header|body|footer"] attributes; multiple <section>
15
15
  siblings are allowed and stack in author order between the sticky header and footer.
16
- The header activates a card-n-aligned 3-column grid (icon | heading+description |
16
+ The header activates a card-ui-aligned 3-column grid (icon | heading+description |
17
17
  action+close) when any direct [slot="icon|heading|description|action"] child is
18
18
  present.
19
19
  props:
@@ -59,7 +59,7 @@ slots:
59
59
  description: >-
60
60
  Title bar — pinned to the top of the panel via position:sticky. Accepts either
61
61
  a bare <header> tag or [slot="header"]. When any direct child has
62
- [slot="icon|heading|description|action"], the header activates a card-n-aligned
62
+ [slot="icon|heading|description|action"], the header activates a card-ui-aligned
63
63
  3-column grid; otherwise renders as a block with the close button appended.
64
64
  body:
65
65
  description: >-
@@ -10,7 +10,7 @@
10
10
  * aspect — optional CSS aspect-ratio (e.g. '16/9')
11
11
  */
12
12
 
13
- import { AdiaElement } from '@core/element.js';
13
+ import { AdiaElement } from '../../core/element.js';
14
14
 
15
15
  class AdiaEmbed extends AdiaElement {
16
16
  static properties = {
@@ -30,19 +30,6 @@
30
30
  "description": "Icon name displayed above the heading",
31
31
  "type": "string",
32
32
  "default": ""
33
- },
34
- "variant": {
35
- "description": "Semantic variant — colors the icon and sets the border tone (default, info, success, warning, danger).",
36
- "type": "string",
37
- "enum": [
38
- "default",
39
- "info",
40
- "success",
41
- "warning",
42
- "danger",
43
- "muted"
44
- ],
45
- "default": "default"
46
33
  }
47
34
  },
48
35
  "required": [
@@ -9,7 +9,7 @@
9
9
  * Note: Uses 'heading' attribute instead of 'title' to avoid native tooltip.
10
10
  */
11
11
 
12
- import { AdiaElement } from '@core/element.js';
12
+ import { AdiaElement } from '../../core/element.js';
13
13
 
14
14
  class AdiaEmptyState extends AdiaElement {
15
15
  static properties = {
@@ -20,11 +20,6 @@ props:
20
20
  description: Icon name displayed above the heading
21
21
  type: string
22
22
  default: ""
23
- variant:
24
- description: Semantic variant — colors the icon and sets the border tone (default, info, success, warning, danger).
25
- type: string
26
- default: default
27
- enum: [default, info, success, warning, danger, muted]
28
23
  events: {}
29
24
  slots:
30
25
  action:
@@ -71,7 +71,7 @@
71
71
  }
72
72
  ],
73
73
  "synonyms": {},
74
- "tag": "footer-n",
74
+ "tag": "footer-ui",
75
75
  "tokens": {},
76
76
  "traits": [],
77
77
  "version": 1
@@ -2,7 +2,7 @@
2
2
  # Edit this file; run `npm run build:components` to regenerate a2ui.json.
3
3
  $schema: ../../../../scripts/schemas/component.yaml.schema.json
4
4
  name: AdiaFooter
5
- tag: footer-n
5
+ tag: footer-ui
6
6
  component: Footer
7
7
  category: container
8
8
  version: 1