@adia-ai/web-components 0.4.7 → 0.4.8

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/README.md +39 -0
  2. package/components/accordion/accordion.a2ui.json +3 -0
  3. package/components/accordion/accordion.d.ts +12 -2
  4. package/components/accordion/accordion.yaml +4 -0
  5. package/components/action-list/action-list.a2ui.json +3 -0
  6. package/components/action-list/action-list.d.ts +12 -2
  7. package/components/action-list/action-list.yaml +4 -0
  8. package/components/agent-artifact/agent-artifact.a2ui.json +4 -0
  9. package/components/agent-artifact/agent-artifact.d.ts +12 -2
  10. package/components/agent-artifact/agent-artifact.yaml +5 -0
  11. package/components/agent-feedback-bar/agent-feedback-bar.a2ui.json +3 -0
  12. package/components/agent-feedback-bar/agent-feedback-bar.d.ts +14 -2
  13. package/components/agent-feedback-bar/agent-feedback-bar.yaml +4 -0
  14. package/components/agent-questions/agent-questions.a2ui.json +3 -0
  15. package/components/agent-questions/agent-questions.d.ts +12 -2
  16. package/components/agent-questions/agent-questions.yaml +4 -0
  17. package/components/agent-reasoning/agent-reasoning.a2ui.json +4 -0
  18. package/components/agent-reasoning/agent-reasoning.d.ts +16 -2
  19. package/components/agent-reasoning/agent-reasoning.yaml +5 -0
  20. package/components/agent-suggestions/agent-suggestions.a2ui.json +3 -0
  21. package/components/agent-suggestions/agent-suggestions.d.ts +12 -2
  22. package/components/agent-suggestions/agent-suggestions.yaml +4 -0
  23. package/components/agent-trace/agent-trace.a2ui.json +1 -0
  24. package/components/agent-trace/agent-trace.d.ts +12 -2
  25. package/components/alert/alert.a2ui.json +1 -0
  26. package/components/alert/alert.d.ts +12 -2
  27. package/components/aside/aside.a2ui.json +1 -0
  28. package/components/avatar/avatar.a2ui.json +3 -0
  29. package/components/avatar/avatar.d.ts +3 -2
  30. package/components/avatar/avatar.yaml +4 -0
  31. package/components/badge/badge.a2ui.json +3 -0
  32. package/components/badge/badge.d.ts +3 -2
  33. package/components/badge/badge.yaml +4 -0
  34. package/components/block/block.a2ui.json +1 -0
  35. package/components/block/block.d.ts +3 -2
  36. package/components/breadcrumb/breadcrumb.a2ui.json +5 -0
  37. package/components/breadcrumb/breadcrumb.d.ts +3 -2
  38. package/components/breadcrumb/breadcrumb.yaml +6 -0
  39. package/components/button/button.a2ui.json +3 -0
  40. package/components/button/button.d.ts +12 -2
  41. package/components/button/button.yaml +5 -0
  42. package/components/calendar-picker/calendar-picker.a2ui.json +1 -0
  43. package/components/canvas/canvas.a2ui.json +1 -0
  44. package/components/canvas/canvas.d.ts +18 -2
  45. package/components/canvas/canvas.yaml +10 -0
  46. package/components/card/card.a2ui.json +1 -0
  47. package/components/card/card.d.ts +12 -2
  48. package/components/chart/chart.a2ui.json +1 -0
  49. package/components/chart/chart.d.ts +16 -2
  50. package/components/chart-legend/chart-legend.a2ui.json +4 -0
  51. package/components/chart-legend/chart-legend.d.ts +12 -2
  52. package/components/chart-legend/chart-legend.yaml +5 -0
  53. package/components/chat-thread/chat-thread.a2ui.json +1 -0
  54. package/components/chat-thread/chat-thread.d.ts +12 -2
  55. package/components/check/check.a2ui.json +1 -0
  56. package/components/code/code.a2ui.json +1 -0
  57. package/components/col/col.a2ui.json +1 -0
  58. package/components/col/col.d.ts +3 -2
  59. package/components/color-picker/color-picker.a2ui.json +3 -0
  60. package/components/color-picker/color-picker.yaml +4 -0
  61. package/components/command/command.a2ui.json +1 -0
  62. package/components/command/command.d.ts +14 -2
  63. package/components/demo-toggle/demo-toggle.a2ui.json +1 -0
  64. package/components/demo-toggle/demo-toggle.d.ts +12 -2
  65. package/components/description-list/description-list.a2ui.json +1 -0
  66. package/components/description-list/description-list.d.ts +3 -2
  67. package/components/divider/divider.a2ui.json +1 -0
  68. package/components/divider/divider.d.ts +3 -2
  69. package/components/drawer/drawer.a2ui.json +1 -0
  70. package/components/drawer/drawer.d.ts +12 -2
  71. package/components/embed/embed.a2ui.json +1 -0
  72. package/components/embed/embed.d.ts +3 -2
  73. package/components/empty-state/empty-state.a2ui.json +3 -0
  74. package/components/empty-state/empty-state.d.ts +3 -2
  75. package/components/empty-state/empty-state.yaml +4 -0
  76. package/components/feed/feed.a2ui.json +9 -1
  77. package/components/feed/feed.d.ts +12 -2
  78. package/components/feed/feed.yaml +8 -1
  79. package/components/field/field.a2ui.json +1 -0
  80. package/components/field/field.d.ts +3 -2
  81. package/components/fields/fields.a2ui.json +1 -0
  82. package/components/fields/fields.d.ts +3 -2
  83. package/components/footer/footer.a2ui.json +1 -0
  84. package/components/grid/grid.a2ui.json +1 -0
  85. package/components/grid/grid.d.ts +3 -2
  86. package/components/header/header.a2ui.json +1 -0
  87. package/components/heatmap/heatmap.a2ui.json +1 -0
  88. package/components/heatmap/heatmap.d.ts +14 -2
  89. package/components/icon/icon.a2ui.json +1 -0
  90. package/components/icon/icon.d.ts +3 -2
  91. package/components/image/image.a2ui.json +3 -0
  92. package/components/image/image.d.ts +3 -2
  93. package/components/image/image.yaml +4 -0
  94. package/components/index.js +8 -0
  95. package/components/input/input.a2ui.json +4 -0
  96. package/components/input/input.yaml +6 -0
  97. package/components/inspector/inspector.a2ui.json +5 -0
  98. package/components/inspector/inspector.d.ts +3 -2
  99. package/components/inspector/inspector.yaml +6 -0
  100. package/components/kbd/kbd.a2ui.json +1 -0
  101. package/components/kbd/kbd.d.ts +3 -2
  102. package/components/link/link.a2ui.json +1 -0
  103. package/components/link/link.d.ts +12 -2
  104. package/components/list/list.a2ui.json +3 -0
  105. package/components/list/list.d.ts +12 -2
  106. package/components/list/list.yaml +4 -0
  107. package/components/menu/menu.a2ui.json +3 -0
  108. package/components/menu/menu.d.ts +12 -2
  109. package/components/menu/menu.yaml +4 -0
  110. package/components/modal/modal.a2ui.json +1 -0
  111. package/components/modal/modal.d.ts +12 -2
  112. package/components/nav/nav.a2ui.json +1 -0
  113. package/components/nav/nav.d.ts +12 -2
  114. package/components/nav-group/nav-group.a2ui.json +1 -0
  115. package/components/nav-group/nav-group.d.ts +12 -2
  116. package/components/nav-item/nav-item.a2ui.json +1 -0
  117. package/components/nav-item/nav-item.d.ts +12 -2
  118. package/components/noodles/noodles.a2ui.json +1 -0
  119. package/components/noodles/noodles.d.ts +16 -2
  120. package/components/option-card/option-card.a2ui.json +3 -0
  121. package/components/option-card/option-card.yaml +4 -0
  122. package/components/otp-input/otp-input.a2ui.json +1 -0
  123. package/components/page/page.a2ui.json +1 -0
  124. package/components/page/page.d.ts +3 -2
  125. package/components/pagination/pagination.a2ui.json +1 -0
  126. package/components/pagination/pagination.d.ts +12 -2
  127. package/components/pane/pane.a2ui.json +8 -1
  128. package/components/pane/pane.d.ts +12 -2
  129. package/components/pane/pane.yaml +7 -1
  130. package/components/pipeline-status/pipeline-status.a2ui.json +1 -0
  131. package/components/pipeline-status/pipeline-status.d.ts +3 -2
  132. package/components/popover/popover.a2ui.json +1 -0
  133. package/components/popover/popover.d.ts +3 -2
  134. package/components/progress/progress.a2ui.json +1 -0
  135. package/components/progress/progress.d.ts +3 -2
  136. package/components/progress-row/progress-row.a2ui.json +3 -0
  137. package/components/progress-row/progress-row.d.ts +3 -2
  138. package/components/progress-row/progress-row.yaml +4 -0
  139. package/components/radio/radio.a2ui.json +1 -0
  140. package/components/range/range.a2ui.json +1 -0
  141. package/components/rating/rating.a2ui.json +1 -0
  142. package/components/richtext/richtext.a2ui.json +1 -0
  143. package/components/richtext/richtext.d.ts +3 -2
  144. package/components/row/row.a2ui.json +1 -0
  145. package/components/row/row.d.ts +12 -2
  146. package/components/search/search.a2ui.json +1 -0
  147. package/components/section/section.a2ui.json +1 -0
  148. package/components/segment/segment.a2ui.json +3 -0
  149. package/components/segment/segment.d.ts +3 -2
  150. package/components/segment/segment.yaml +4 -0
  151. package/components/segmented/segmented.a2ui.json +1 -0
  152. package/components/select/select.a2ui.json +3 -0
  153. package/components/select/select.yaml +4 -0
  154. package/components/skeleton/skeleton.a2ui.json +1 -0
  155. package/components/skeleton/skeleton.d.ts +3 -2
  156. package/components/slider/slider.a2ui.json +1 -0
  157. package/components/stack/stack.a2ui.json +1 -0
  158. package/components/stack/stack.d.ts +3 -2
  159. package/components/stat/stat.a2ui.json +1 -0
  160. package/components/step-progress/step-progress.a2ui.json +1 -0
  161. package/components/step-progress/step-progress.d.ts +3 -2
  162. package/components/stepper/stepper.a2ui.json +3 -0
  163. package/components/stepper/stepper.d.ts +3 -2
  164. package/components/stepper/stepper.yaml +4 -0
  165. package/components/stream/stream.a2ui.json +1 -0
  166. package/components/stream/stream.d.ts +16 -2
  167. package/components/swatch/swatch.a2ui.json +1 -0
  168. package/components/swatch/swatch.d.ts +3 -2
  169. package/components/swiper/swiper.a2ui.json +3 -0
  170. package/components/swiper/swiper.d.ts +16 -2
  171. package/components/swiper/swiper.yaml +4 -0
  172. package/components/switch/switch.a2ui.json +1 -0
  173. package/components/table/table.a2ui.json +7 -0
  174. package/components/table/table.d.ts +20 -2
  175. package/components/table/table.yaml +8 -0
  176. package/components/table-toolbar/table-toolbar.a2ui.json +12 -0
  177. package/components/table-toolbar/table-toolbar.d.ts +18 -2
  178. package/components/table-toolbar/table-toolbar.yaml +13 -0
  179. package/components/tabs/tabs.a2ui.json +3 -0
  180. package/components/tabs/tabs.d.ts +12 -2
  181. package/components/tabs/tabs.yaml +4 -0
  182. package/components/tag/tag.a2ui.json +1 -0
  183. package/components/tag/tag.d.ts +12 -2
  184. package/components/text/text.a2ui.json +1 -0
  185. package/components/text/text.d.ts +3 -2
  186. package/components/textarea/textarea.a2ui.json +1 -0
  187. package/components/timeline/timeline.a2ui.json +18 -1
  188. package/components/timeline/timeline.d.ts +19 -2
  189. package/components/timeline/timeline.yaml +14 -1
  190. package/components/toast/toast.a2ui.json +1 -0
  191. package/components/toast/toast.d.ts +12 -2
  192. package/components/toggle-group/toggle-group.a2ui.json +1 -0
  193. package/components/toggle-group/toggle-group.d.ts +12 -2
  194. package/components/toggle-scheme/toggle-scheme.a2ui.json +3 -0
  195. package/components/toggle-scheme/toggle-scheme.d.ts +12 -2
  196. package/components/toggle-scheme/toggle-scheme.yaml +4 -0
  197. package/components/toolbar/toolbar.a2ui.json +3 -0
  198. package/components/toolbar/toolbar.d.ts +3 -2
  199. package/components/toolbar/toolbar.yaml +4 -0
  200. package/components/tooltip/tooltip.a2ui.json +1 -0
  201. package/components/tooltip/tooltip.d.ts +3 -2
  202. package/components/tree/tree.a2ui.json +3 -0
  203. package/components/tree/tree.d.ts +12 -2
  204. package/components/tree/tree.yaml +4 -0
  205. package/components/upload/upload.a2ui.json +1 -0
  206. package/core/icons-phosphor.js +93 -0
  207. package/core/icons.js +92 -90
  208. package/core/index.js +5 -0
  209. package/index.d.ts +78 -77
  210. package/index.js +7 -0
  211. package/package.json +3 -2
@@ -98,6 +98,9 @@
98
98
  "x-adiaui": {
99
99
  "anti_patterns": [],
100
100
  "category": "action",
101
+ "composes": [
102
+ "icon-ui"
103
+ ],
101
104
  "events": {
102
105
  "press": {
103
106
  "description": "Fired on complete press (pointer up or Enter/Space)"
@@ -5,12 +5,15 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type ButtonPressEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIButton extends UIElement {
15
18
  /** HTML button type (button, submit, reset) */
16
19
  type: string;
@@ -31,4 +34,11 @@ export class UIButton extends UIElement {
31
34
  /** Visual style — `solid` (default fill), `outline`, `ghost`. `default` / `primary` are aliases of `solid`. Style is independent of semantic intent — to express destructive / success / info / warning intent, set [color="…"] alongside.
32
35
  For **inline navigation** (Terms of Service, Privacy Policy, footer links, "Sign in" / "Sign up" cross-page affordances) use `<link-ui>` instead — it carries proper `<a href>` semantics, keyboard handling (Enter only, no Space), middle-click open-new-tab, and screen-reader announces "link" instead of "button". Mixing navigation and action affordances under the same primitive is a category error fixed at this junction. */
33
36
  variant: 'default' | 'solid' | 'outline' | 'ghost' | 'primary' | 'secondary' | 'soft' | 'current';
37
+
38
+ addEventListener<K extends keyof HTMLElementEventMap>(
39
+ type: K,
40
+ listener: (this: UIButton, ev: HTMLElementEventMap[K]) => unknown,
41
+ options?: boolean | AddEventListenerOptions,
42
+ ): void;
43
+ addEventListener(type: 'press', listener: (ev: ButtonPressEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
34
44
  }
@@ -7,6 +7,11 @@ component: Button
7
7
  category: action
8
8
  version: 1
9
9
  description: Clickable button with text, icon, and variant support. Supports submit type for forms.
10
+ # Per ADR-0027 — primitives that programmatically create other primitives
11
+ # in their render() do NOT auto-import them. Consumer (or demo shell) must
12
+ # explicitly import each composed primitive.
13
+ composes:
14
+ - icon-ui # created via document.createElement('icon-ui') when [icon] is set
10
15
  props:
11
16
  aria-label:
12
17
  description: Accessible label for screen readers. Auto-set from `text` when text is non-empty; meaningful override for icon-only buttons.
@@ -79,6 +79,7 @@
79
79
  "x-adiaui": {
80
80
  "anti_patterns": [],
81
81
  "category": "input",
82
+ "composes": [],
82
83
  "events": {
83
84
  "change": {
84
85
  "description": "Fired when a date is selected"
@@ -29,6 +29,7 @@
29
29
  "x-adiaui": {
30
30
  "anti_patterns": [],
31
31
  "category": "agent",
32
+ "composes": [],
32
33
  "events": {
33
34
  "canvas-interaction": {
34
35
  "description": "Fired on canvas-interaction."
@@ -5,13 +5,29 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type CanvasInteractionEvent = CustomEvent<unknown>;
16
+ export type CanvasChangeEvent = CustomEvent<unknown>;
17
+ export type CanvasClickEvent = CustomEvent<unknown>;
18
+ export type CanvasInputEvent = CustomEvent<unknown>;
19
+
14
20
  export class UICanvas extends UIElement {
15
21
  /** Component property: theme. */
16
22
  theme: string;
23
+
24
+ addEventListener<K extends keyof HTMLElementEventMap>(
25
+ type: K,
26
+ listener: (this: UICanvas, ev: HTMLElementEventMap[K]) => unknown,
27
+ options?: boolean | AddEventListenerOptions,
28
+ ): void;
29
+ addEventListener(type: 'canvas-interaction', listener: (ev: CanvasInteractionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
30
+ addEventListener(type: 'change', listener: (ev: CanvasChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
31
+ addEventListener(type: 'click', listener: (ev: CanvasClickEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
32
+ addEventListener(type: 'input', listener: (ev: CanvasInputEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
17
33
  }
@@ -5,6 +5,16 @@ component: Canvas
5
5
  category: agent
6
6
  version: 1
7
7
  description: A2UI rendering surface.
8
+ # Per ADR-0027 — primitives that programmatically create other primitives
9
+ # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
10
+ # NOTE: <canvas-ui> mounts <a2ui-root> (web-modules/runtime) and optionally
11
+ # <theme-ui> (web-modules/theme). These are CROSS-PACKAGE compositions that
12
+ # the current composes: field can't express as same-package siblings. Cross-
13
+ # package composition tracking is queued for v0.4.9; for now consumers
14
+ # loading <canvas-ui> with a2ui-root rendering must import:
15
+ # @adia-ai/web-modules/runtime/a2ui-root
16
+ # @adia-ai/web-modules/theme/theme (only if [theme-wrapper] is used)
17
+ composes: []
8
18
  props:
9
19
  theme:
10
20
  description: 'Component property: theme.'
@@ -75,6 +75,7 @@
75
75
  "x-adiaui": {
76
76
  "anti_patterns": [],
77
77
  "category": "container",
78
+ "composes": [],
78
79
  "events": {
79
80
  "drag-end": {
80
81
  "description": "Fired when a drag completes."
@@ -5,12 +5,15 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type CardDragEndEvent = CustomEvent<unknown>;
16
+
14
17
  export class UICard extends UIElement {
15
18
  /** Enables drag handle + cursor:grab. Wires the draggable trait; dispatches drag-end. */
16
19
  draggable: boolean;
@@ -24,4 +27,11 @@ export class UICard extends UIElement {
24
27
  size: 'sm' | 'md' | 'lg';
25
28
  /** Visual style. `outline` is an alias for `outlined`; `flat` removes shadow; `soft`/`primary` apply tinted surfaces. */
26
29
  variant: 'default' | 'outlined' | 'outline' | 'filled' | 'ghost' | 'flat' | 'soft' | 'primary';
30
+
31
+ addEventListener<K extends keyof HTMLElementEventMap>(
32
+ type: K,
33
+ listener: (this: UICard, ev: HTMLElementEventMap[K]) => unknown,
34
+ options?: boolean | AddEventListenerOptions,
35
+ ): void;
36
+ addEventListener(type: 'drag-end', listener: (ev: CardDragEndEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
27
37
  }
@@ -133,6 +133,7 @@
133
133
  "x-adiaui": {
134
134
  "anti_patterns": [],
135
135
  "category": "agent",
136
+ "composes": [],
136
137
  "events": {
137
138
  "chart-hover": {
138
139
  "description": "Fires when the pointer enters a datum (bar / dot / slice). Detail includes {label, value, pct, series, slot, pointerX, pointerY}. Only re-fires when the hovered datum changes — moving inside the same datum is quiet."
@@ -5,12 +5,17 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type ChartHoverEvent = CustomEvent<unknown>;
16
+ export type ChartLeaveEvent = CustomEvent<unknown>;
17
+ export type ChartSelectEvent = CustomEvent<unknown>;
18
+
14
19
  export class UIChart extends UIElement {
15
20
  /** Chart type. All 18 enum values have dedicated render paths in chart.js. */
16
21
  type: 'bar' | 'line' | 'pie' | 'donut' | 'radar' | 'sparkline' | 'segments' | 'area' | 'scatter' | 'radial-bar' | 'gauge' | 'stacked-bar' | 'grouped-bar' | 'multi-line' | 'funnel' | 'treemap' | 'sankey' | 'composed';
@@ -38,4 +43,13 @@ export class UIChart extends UIElement {
38
43
  x: string;
39
44
  /** Y-axis key(s), comma-separated for multi-series */
40
45
  y: string;
46
+
47
+ addEventListener<K extends keyof HTMLElementEventMap>(
48
+ type: K,
49
+ listener: (this: UIChart, ev: HTMLElementEventMap[K]) => unknown,
50
+ options?: boolean | AddEventListenerOptions,
51
+ ): void;
52
+ addEventListener(type: 'chart-hover', listener: (ev: ChartHoverEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
53
+ addEventListener(type: 'chart-leave', listener: (ev: ChartLeaveEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
54
+ addEventListener(type: 'chart-select', listener: (ev: ChartSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
41
55
  }
@@ -70,6 +70,10 @@
70
70
  "x-adiaui": {
71
71
  "anti_patterns": [],
72
72
  "category": "agent",
73
+ "composes": [
74
+ "badge-ui",
75
+ "swatch-ui"
76
+ ],
73
77
  "events": {
74
78
  "toggle": {
75
79
  "description": "Fires on row click (non-static). Detail: {key, active, mode}. `active` is the new state (true=visible). Consumers (or chart-ui via [for]) wire this to series visibility."
@@ -5,12 +5,15 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type ChartLegendToggleEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIChartLegend extends UIElement {
15
18
  /** JSON array of {key, label, slot?, pct?} legend items. Takes precedence over [for] when both are provided. */
16
19
  items: string;
@@ -24,4 +27,11 @@ export class UIChartLegend extends UIElement {
24
27
  shape: 'dot' | 'square' | 'line' | 'dashed';
25
28
  /** When set, rows are non-interactive <span>s (no click, no toggle). */
26
29
  static: boolean;
30
+
31
+ addEventListener<K extends keyof HTMLElementEventMap>(
32
+ type: K,
33
+ listener: (this: UIChartLegend, ev: HTMLElementEventMap[K]) => unknown,
34
+ options?: boolean | AddEventListenerOptions,
35
+ ): void;
36
+ addEventListener(type: 'toggle', listener: (ev: ChartLegendToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
27
37
  }
@@ -9,6 +9,11 @@ description: >-
9
9
  badge-ui chips (swatch + label) that are keyboard-focusable and
10
10
  click-toggleable. Composes with chart-ui via [for] id-ref (auto-mirror) or
11
11
  via explicit [items] JSON.
12
+ # Per ADR-0027 — primitives that programmatically create other primitives
13
+ # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
14
+ composes:
15
+ - badge-ui
16
+ - swatch-ui
12
17
  props:
13
18
  for:
14
19
  description: id-ref of a chart-ui / heatmap-ui to mirror series from.
@@ -29,6 +29,7 @@
29
29
  "x-adiaui": {
30
30
  "anti_patterns": [],
31
31
  "category": "agent",
32
+ "composes": [],
32
33
  "events": {
33
34
  "submit": {
34
35
  "description": "Fired when the user submits a chat message via Enter or send button. Detail: { text, model }."
@@ -5,13 +5,23 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type ChatThreadSubmitEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIChatThread extends UIElement {
15
18
  /** Component property: streaming. */
16
19
  streaming: boolean;
20
+
21
+ addEventListener<K extends keyof HTMLElementEventMap>(
22
+ type: K,
23
+ listener: (this: UIChatThread, ev: HTMLElementEventMap[K]) => unknown,
24
+ options?: boolean | AddEventListenerOptions,
25
+ ): void;
26
+ addEventListener(type: 'submit', listener: (ev: ChatThreadSubmitEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
17
27
  }
@@ -71,6 +71,7 @@
71
71
  }
72
72
  ],
73
73
  "category": "layout",
74
+ "composes": [],
74
75
  "events": {
75
76
  "change": {
76
77
  "description": "Fired when checked state changes"
@@ -83,6 +83,7 @@
83
83
  "x-adiaui": {
84
84
  "anti_patterns": [],
85
85
  "category": "display",
86
+ "composes": [],
86
87
  "events": {
87
88
  "change": {
88
89
  "description": "Fired on blur if the buffer changed since focus (editable mode); detail.value is the final buffer"
@@ -44,6 +44,7 @@
44
44
  "x-adiaui": {
45
45
  "anti_patterns": [],
46
46
  "category": "layout",
47
+ "composes": [],
47
48
  "events": {},
48
49
  "examples": [
49
50
  {
@@ -5,8 +5,9 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
@@ -48,6 +48,9 @@
48
48
  "x-adiaui": {
49
49
  "anti_patterns": [],
50
50
  "category": "input",
51
+ "composes": [
52
+ "slider-ui"
53
+ ],
51
54
  "events": {
52
55
  "change": {
53
56
  "description": "Fired on every color change"
@@ -7,6 +7,10 @@ component: ColorPicker
7
7
  category: input
8
8
  version: 1
9
9
  description: OKLCH-native color picker with 2D area and H/C/L sliders. Form-associated.
10
+ # Per ADR-0027 — primitives that programmatically create other primitives
11
+ # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
12
+ composes:
13
+ - slider-ui
10
14
  props:
11
15
  name:
12
16
  description: Form field name
@@ -34,6 +34,7 @@
34
34
  "x-adiaui": {
35
35
  "anti_patterns": [],
36
36
  "category": "container",
37
+ "composes": [],
37
38
  "events": {
38
39
  "dismiss": {
39
40
  "description": "Fired when Escape is pressed"
@@ -5,15 +5,27 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type CommandDismissEvent = CustomEvent<unknown>;
16
+ export type CommandSelectEvent = CustomEvent<unknown>;
17
+
14
18
  export class UICommand extends UIElement {
15
19
  /** Whether the command palette is visible */
16
20
  open: boolean;
17
21
  /** Placeholder text for the search input */
18
22
  placeholder: string;
23
+
24
+ addEventListener<K extends keyof HTMLElementEventMap>(
25
+ type: K,
26
+ listener: (this: UICommand, ev: HTMLElementEventMap[K]) => unknown,
27
+ options?: boolean | AddEventListenerOptions,
28
+ ): void;
29
+ addEventListener(type: 'dismiss', listener: (ev: CommandDismissEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
30
+ addEventListener(type: 'select', listener: (ev: CommandSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
19
31
  }
@@ -53,6 +53,7 @@
53
53
  "x-adiaui": {
54
54
  "anti_patterns": [],
55
55
  "category": "container",
56
+ "composes": [],
56
57
  "events": {
57
58
  "change": {
58
59
  "description": "Fired when the toggle flips. detail contains { state }."
@@ -5,12 +5,15 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type DemoToggleChangeEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIDemoToggle extends UIElement {
15
18
  /** Initial state when [state] is not set on connect ("on" | "off"). */
16
19
  initial: 'on' | 'off';
@@ -20,4 +23,11 @@ export class UIDemoToggle extends UIElement {
20
23
  labelOn: string;
21
24
  /** Current toggle state ("on" | "off"). Reflected as data-state on the host. */
22
25
  state: '' | 'on' | 'off';
26
+
27
+ addEventListener<K extends keyof HTMLElementEventMap>(
28
+ type: K,
29
+ listener: (this: UIDemoToggle, ev: HTMLElementEventMap[K]) => unknown,
30
+ options?: boolean | AddEventListenerOptions,
31
+ ): void;
32
+ addEventListener(type: 'change', listener: (ev: DemoToggleChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
23
33
  }
@@ -47,6 +47,7 @@
47
47
  "x-adiaui": {
48
48
  "anti_patterns": [],
49
49
  "category": "display",
50
+ "composes": [],
50
51
  "events": {},
51
52
  "examples": [],
52
53
  "keywords": [
@@ -5,8 +5,9 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
@@ -34,6 +34,7 @@
34
34
  "x-adiaui": {
35
35
  "anti_patterns": [],
36
36
  "category": "display",
37
+ "composes": [],
37
38
  "events": {},
38
39
  "examples": [
39
40
  {
@@ -5,8 +5,9 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
@@ -60,6 +60,7 @@
60
60
  "x-adiaui": {
61
61
  "anti_patterns": [],
62
62
  "category": "container",
63
+ "composes": [],
63
64
  "events": {
64
65
  "close": {
65
66
  "description": "Fired when the drawer is dismissed via close button or backdrop click"
@@ -5,12 +5,15 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type DrawerCloseEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIDrawer extends UIElement {
15
18
  /** Controls visibility. When false, backdrop and panel are removed from DOM. */
16
19
  open: boolean;
@@ -22,4 +25,11 @@ export class UIDrawer extends UIElement {
22
25
  size: 'sm' | 'md' | 'lg';
23
26
  /** Title text displayed in the drawer header */
24
27
  text: string;
28
+
29
+ addEventListener<K extends keyof HTMLElementEventMap>(
30
+ type: K,
31
+ listener: (this: UIDrawer, ev: HTMLElementEventMap[K]) => unknown,
32
+ options?: boolean | AddEventListenerOptions,
33
+ ): void;
34
+ addEventListener(type: 'close', listener: (ev: DrawerCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
25
35
  }
@@ -44,6 +44,7 @@
44
44
  "x-adiaui": {
45
45
  "anti_patterns": [],
46
46
  "category": "agent",
47
+ "composes": [],
47
48
  "events": {},
48
49
  "examples": [
49
50
  {
@@ -5,8 +5,9 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
@@ -39,6 +39,9 @@
39
39
  "x-adiaui": {
40
40
  "anti_patterns": [],
41
41
  "category": "display",
42
+ "composes": [
43
+ "icon-ui"
44
+ ],
42
45
  "events": {},
43
46
  "examples": [
44
47
  {
@@ -5,8 +5,9 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
@@ -7,6 +7,10 @@ component: EmptyState
7
7
  category: display
8
8
  version: 1
9
9
  description: Placeholder for empty views with icon, heading, description, and action slot.
10
+ # Per ADR-0027 — primitives that programmatically create other primitives
11
+ # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
12
+ composes:
13
+ - icon-ui
10
14
  props:
11
15
  description:
12
16
  description: Secondary descriptive text below the heading
@@ -43,7 +43,15 @@
43
43
  "x-adiaui": {
44
44
  "anti_patterns": [],
45
45
  "category": "container",
46
- "events": {},
46
+ "composes": [
47
+ "button-ui",
48
+ "feed-item-ui"
49
+ ],
50
+ "events": {
51
+ "close": {
52
+ "description": "Fired on per-item dismissal (manual close, swipe, or auto-timeout). Bubbles."
53
+ }
54
+ },
47
55
  "examples": [],
48
56
  "keywords": [],
49
57
  "name": "UIFeedContainer",
@@ -5,15 +5,25 @@
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
7
  * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
8
- * run `npm run components`, then `npm run codegen:dts` to regenerate;
9
- * or hand-author this file fully if rich event types are needed.
8
+ * run `npm run build:components`, then `npm run codegen:dts` to
9
+ * regenerate; or hand-author this file fully if rich event types are
10
+ * needed beyond what the yaml `events:` block can express.
10
11
  */
11
12
 
12
13
  import { UIElement } from '../../core/element.js';
13
14
 
15
+ export type FeedCloseEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIFeed extends UIElement {
15
18
  /** Cap on simultaneously visible items per lane */
16
19
  max: number;
17
20
  /** Lane the feed renders into */
18
21
  position: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'inline';
22
+
23
+ addEventListener<K extends keyof HTMLElementEventMap>(
24
+ type: K,
25
+ listener: (this: UIFeed, ev: HTMLElementEventMap[K]) => unknown,
26
+ options?: boolean | AddEventListenerOptions,
27
+ ): void;
28
+ addEventListener(type: 'close', listener: (ev: FeedCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
19
29
  }