@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
package/README.md CHANGED
@@ -175,6 +175,45 @@ Authoring rules (enforced by `ui-audit-coherence`):
175
175
  5. **Light DOM only.** No `::part()`, `::slotted()`, shadow roots. Use
176
176
  attribute selectors on children: `:scope > [slot="icon"]`.
177
177
 
178
+ ### `static template` is a closure — import what it references
179
+
180
+ The `static template` property is a regular JavaScript closure (typically a tagged template literal — `() => html` followed by the template body). Any signal, variable, or function it references must be **lexically in scope** at the file where the class is defined. This is JavaScript scoping, not anything AdiaUI-specific — but it surprises authors coming from frameworks where templates magically receive props.
181
+
182
+ ```js
183
+ // ❌ WRONG — ReferenceError at runtime: minL is not defined
184
+ // (no import; the template function can't see minL just because
185
+ // it's exported elsewhere in the monorepo)
186
+ class MyPanel extends UIElement {
187
+ static template = () => html`<div>L: ${minL.value}</div>`;
188
+ }
189
+
190
+ // ✅ RIGHT — import the signal locally
191
+ import { minL } from './state.js';
192
+
193
+ class MyPanel extends UIElement {
194
+ static template = () => html`<div>L: ${minL.value}</div>`;
195
+ }
196
+ ```
197
+
198
+ The error surfaces in the browser console as `ReferenceError: minL is not defined` at first render — not at module load, not at `tsc --noEmit`. **The trace points at the template function body**, not at the missing import, which is the disorienting part.
199
+
200
+ If your primitive needs external reactive state that varies per-instance, **expose it as a property** rather than reaching for module-scoped signals:
201
+
202
+ ```js
203
+ // ✅ Best — per-instance reactive prop
204
+ class MyPanel extends UIElement {
205
+ static properties = {
206
+ minL: { type: Number, default: 0 },
207
+ };
208
+ static template = el => html`<div>L: ${el.minL}</div>`;
209
+ }
210
+
211
+ // Consumer:
212
+ <my-panel .minL=${minL}></my-panel> // signal binds reactively per ADR-template-binding
213
+ ```
214
+
215
+ The `el` parameter is the element instance — every signal-backed property is reactively read.
216
+
178
217
  Full authoring contract: [`docs/specs/component-token-contract.md`](../../docs/specs/component-token-contract.md).
179
218
  The `adia-ui-author` skill encodes the 20 non-negotiable rules.
180
219
 
@@ -29,6 +29,9 @@
29
29
  "x-adiaui": {
30
30
  "anti_patterns": [],
31
31
  "category": "container",
32
+ "composes": [
33
+ "icon-ui"
34
+ ],
32
35
  "events": {
33
36
  "change": {
34
37
  "description": "Fired when the set of open panels changes"
@@ -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 AccordionChangeEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAccordion extends UIElement {
15
18
  /** Allow multiple panels to be open simultaneously */
16
19
  multiple: boolean;
20
+
21
+ addEventListener<K extends keyof HTMLElementEventMap>(
22
+ type: K,
23
+ listener: (this: UIAccordion, ev: HTMLElementEventMap[K]) => unknown,
24
+ options?: boolean | AddEventListenerOptions,
25
+ ): void;
26
+ addEventListener(type: 'change', listener: (ev: AccordionChangeEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
17
27
  }
@@ -7,6 +7,10 @@ component: Accordion
7
7
  category: container
8
8
  version: 1
9
9
  description: Accordion container managing single/multiple open states.
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
  multiple:
12
16
  description: Allow multiple panels to be open simultaneously
@@ -24,6 +24,9 @@
24
24
  "x-adiaui": {
25
25
  "anti_patterns": [],
26
26
  "category": "navigation",
27
+ "composes": [
28
+ "icon-ui"
29
+ ],
27
30
  "events": {
28
31
  "action": {
29
32
  "description": "Fired on action."
@@ -5,11 +5,21 @@
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 ActionListActionEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIActionList extends UIElement {
18
+
19
+ addEventListener<K extends keyof HTMLElementEventMap>(
20
+ type: K,
21
+ listener: (this: UIActionList, ev: HTMLElementEventMap[K]) => unknown,
22
+ options?: boolean | AddEventListenerOptions,
23
+ ): void;
24
+ addEventListener(type: 'action', listener: (ev: ActionListActionEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
15
25
  }
@@ -8,6 +8,10 @@ category: navigation
8
8
  version: 1
9
9
  description: Inline list of command actions with keyboard navigation. Fires action event when an
10
10
  item is clicked or activated via keyboard.
11
+ # Per ADR-0027 — primitives that programmatically create other primitives
12
+ # do NOT auto-import them. Consumer (or demo shell) must explicitly import.
13
+ composes:
14
+ - icon-ui
11
15
  props: {}
12
16
  events:
13
17
  action:
@@ -49,6 +49,10 @@
49
49
  "x-adiaui": {
50
50
  "anti_patterns": [],
51
51
  "category": "agent",
52
+ "composes": [
53
+ "icon-ui",
54
+ "badge-ui"
55
+ ],
52
56
  "events": {
53
57
  "artifact-toggle": {
54
58
  "description": "Fired on artifact-toggle."
@@ -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 AgentArtifactArtifactToggleEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAgentArtifact extends UIElement {
15
18
  /** Header title. */
16
19
  title: string;
@@ -22,4 +25,11 @@ export class UIAgentArtifact extends UIElement {
22
25
  kind: string;
23
26
  /** neutral | accent | warning | danger */
24
27
  tone: string;
28
+
29
+ addEventListener<K extends keyof HTMLElementEventMap>(
30
+ type: K,
31
+ listener: (this: UIAgentArtifact, ev: HTMLElementEventMap[K]) => unknown,
32
+ options?: boolean | AddEventListenerOptions,
33
+ ): void;
34
+ addEventListener(type: 'artifact-toggle', listener: (ev: AgentArtifactArtifactToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
25
35
  }
@@ -7,6 +7,11 @@ component: AgentArtifact
7
7
  category: agent
8
8
  version: 1
9
9
  description: Inline container for structured agent artifacts (A2UI, JSON, tickets).
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
14
+ - badge-ui
10
15
  props:
11
16
  kind:
12
17
  description: Badge label; value is normalized to uppercase before rendering.
@@ -39,6 +39,9 @@
39
39
  "x-adiaui": {
40
40
  "anti_patterns": [],
41
41
  "category": "agent",
42
+ "composes": [
43
+ "button-ui"
44
+ ],
42
45
  "events": {
43
46
  "feedback-rate": {
44
47
  "description": "Fired on feedback-rate."
@@ -5,12 +5,16 @@
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 AgentFeedbackBarFeedbackRateEvent = CustomEvent<unknown>;
16
+ export type AgentFeedbackBarFeedbackSaveEvent = CustomEvent<unknown>;
17
+
14
18
  export class UIAgentFeedbackBar extends UIElement {
15
19
  /** Disable all actions. */
16
20
  disabled: boolean;
@@ -18,4 +22,12 @@ export class UIAgentFeedbackBar extends UIElement {
18
22
  saveIcon: string;
19
23
  /** Save button text; empty hides it. */
20
24
  saveLabel: string;
25
+
26
+ addEventListener<K extends keyof HTMLElementEventMap>(
27
+ type: K,
28
+ listener: (this: UIAgentFeedbackBar, ev: HTMLElementEventMap[K]) => unknown,
29
+ options?: boolean | AddEventListenerOptions,
30
+ ): void;
31
+ addEventListener(type: 'feedback-rate', listener: (ev: AgentFeedbackBarFeedbackRateEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
32
+ addEventListener(type: 'feedback-save', listener: (ev: AgentFeedbackBarFeedbackSaveEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
21
33
  }
@@ -7,6 +7,10 @@ component: AgentFeedbackBar
7
7
  category: agent
8
8
  version: 1
9
9
  description: Thumbs + save row under an agent response.
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
+ - button-ui
10
14
  props:
11
15
  disabled:
12
16
  description: Disable all actions.
@@ -44,6 +44,9 @@
44
44
  "x-adiaui": {
45
45
  "anti_patterns": [],
46
46
  "category": "agent",
47
+ "composes": [
48
+ "button-ui"
49
+ ],
47
50
  "events": {
48
51
  "questions-answer": {
49
52
  "description": "Fired on questions-answer."
@@ -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 AgentQuestionsQuestionsAnswerEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAgentQuestions extends UIElement {
15
18
  /** Helper text. */
16
19
  helper: string;
@@ -20,4 +23,11 @@ export class UIAgentQuestions extends UIElement {
20
23
  question: string;
21
24
  /** Submit button label (multi mode). */
22
25
  submitLabel: string;
26
+
27
+ addEventListener<K extends keyof HTMLElementEventMap>(
28
+ type: K,
29
+ listener: (this: UIAgentQuestions, ev: HTMLElementEventMap[K]) => unknown,
30
+ options?: boolean | AddEventListenerOptions,
31
+ ): void;
32
+ addEventListener(type: 'questions-answer', listener: (ev: AgentQuestionsQuestionsAnswerEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
23
33
  }
@@ -7,6 +7,10 @@ component: AgentQuestions
7
7
  category: agent
8
8
  version: 1
9
9
  description: Multi-choice clarifying-question cards.
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
+ - button-ui
10
14
  props:
11
15
  helper:
12
16
  description: Helper text.
@@ -50,6 +50,10 @@
50
50
  "x-adiaui": {
51
51
  "anti_patterns": [],
52
52
  "category": "agent",
53
+ "composes": [
54
+ "timeline-ui",
55
+ "timeline-item-ui"
56
+ ],
53
57
  "events": {
54
58
  "reasoning-finish": {
55
59
  "description": "Fired on reasoning-finish."
@@ -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 AgentReasoningReasoningFinishEvent = CustomEvent<unknown>;
16
+ export type AgentReasoningReasoningStepToggleEvent = CustomEvent<unknown>;
17
+ export type AgentReasoningReasoningToggleEvent = CustomEvent<unknown>;
18
+
14
19
  export class UIAgentReasoning extends UIElement {
15
20
  /** Start collapsed. */
16
21
  collapsed: boolean;
@@ -20,4 +25,13 @@ export class UIAgentReasoning extends UIElement {
20
25
  noAutocollapse: boolean;
21
26
  /** Drives the status icon — idle, active (spinner), done (check), error (warning). */
22
27
  status: 'idle' | 'active' | 'done' | 'error';
28
+
29
+ addEventListener<K extends keyof HTMLElementEventMap>(
30
+ type: K,
31
+ listener: (this: UIAgentReasoning, ev: HTMLElementEventMap[K]) => unknown,
32
+ options?: boolean | AddEventListenerOptions,
33
+ ): void;
34
+ addEventListener(type: 'reasoning-finish', listener: (ev: AgentReasoningReasoningFinishEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
35
+ addEventListener(type: 'reasoning-step-toggle', listener: (ev: AgentReasoningReasoningStepToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
36
+ addEventListener(type: 'reasoning-toggle', listener: (ev: AgentReasoningReasoningToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
23
37
  }
@@ -7,6 +7,11 @@ component: AgentReasoning
7
7
  category: agent
8
8
  version: 1
9
9
  description: Agent inner monologue + pipeline viewer with steps, thoughts, plans, and iterations.
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
+ - timeline-ui
14
+ - timeline-item-ui
10
15
  props:
11
16
  noAutocollapse:
12
17
  description: Disable auto-collapse after finish().
@@ -39,6 +39,9 @@
39
39
  "x-adiaui": {
40
40
  "anti_patterns": [],
41
41
  "category": "agent",
42
+ "composes": [
43
+ "button-ui"
44
+ ],
42
45
  "events": {
43
46
  "suggestion-select": {
44
47
  "description": "Fired on suggestion-select."
@@ -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 AgentSuggestionsSuggestionSelectEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAgentSuggestions extends UIElement {
15
18
  /** Disable all chips. */
16
19
  disabled: boolean;
@@ -18,4 +21,11 @@ export class UIAgentSuggestions extends UIElement {
18
21
  size: string;
19
22
  /** outline | ghost | subtle */
20
23
  variant: string;
24
+
25
+ addEventListener<K extends keyof HTMLElementEventMap>(
26
+ type: K,
27
+ listener: (this: UIAgentSuggestions, ev: HTMLElementEventMap[K]) => unknown,
28
+ options?: boolean | AddEventListenerOptions,
29
+ ): void;
30
+ addEventListener(type: 'suggestion-select', listener: (ev: AgentSuggestionsSuggestionSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
21
31
  }
@@ -7,6 +7,10 @@ component: AgentSuggestions
7
7
  category: agent
8
8
  version: 1
9
9
  description: Row of follow-up suggestion chips.
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
+ - button-ui
10
14
  props:
11
15
  disabled:
12
16
  description: Disable all chips.
@@ -34,6 +34,7 @@
34
34
  "x-adiaui": {
35
35
  "anti_patterns": [],
36
36
  "category": "agent",
37
+ "composes": [],
37
38
  "events": {
38
39
  "trace-toggle": {
39
40
  "description": "Fired on trace-toggle."
@@ -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 AgentTraceTraceToggleEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAgentTrace extends UIElement {
15
18
  /** Hide the trace body. Default-visible disclosure (matches the agent-* family — agent-reasoning, agent-artifact). Set to opt out. */
16
19
  collapsed: boolean;
17
20
  /** Fallback summary label. */
18
21
  label: string;
22
+
23
+ addEventListener<K extends keyof HTMLElementEventMap>(
24
+ type: K,
25
+ listener: (this: UIAgentTrace, ev: HTMLElementEventMap[K]) => unknown,
26
+ options?: boolean | AddEventListenerOptions,
27
+ ): void;
28
+ addEventListener(type: 'trace-toggle', listener: (ev: AgentTraceTraceToggleEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
19
29
  }
@@ -68,6 +68,7 @@
68
68
  "x-adiaui": {
69
69
  "anti_patterns": [],
70
70
  "category": "container",
71
+ "composes": [],
71
72
  "events": {
72
73
  "close": {
73
74
  "description": "Fired when the close button is clicked"
@@ -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 AlertCloseEvent = CustomEvent<unknown>;
16
+
14
17
  export class UIAlert extends UIElement {
15
18
  /** Bold headline rendered as the first line of the alert content. Pair with [description] for the canonical "banner" pattern (headline + body). When [title] or [description] is set, the [text] prop is ignored. */
16
19
  title: string;
@@ -26,4 +29,11 @@ export class UIAlert extends UIElement {
26
29
  text: string;
27
30
  /** Semantic color variant. */
28
31
  variant: 'default' | 'info' | 'success' | 'warning' | 'danger' | 'muted' | 'neutral';
32
+
33
+ addEventListener<K extends keyof HTMLElementEventMap>(
34
+ type: K,
35
+ listener: (this: UIAlert, ev: HTMLElementEventMap[K]) => unknown,
36
+ options?: boolean | AddEventListenerOptions,
37
+ ): void;
38
+ addEventListener(type: 'close', listener: (ev: AlertCloseEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
29
39
  }
@@ -40,6 +40,7 @@
40
40
  "x-adiaui": {
41
41
  "anti_patterns": [],
42
42
  "category": "container",
43
+ "composes": [],
43
44
  "events": {},
44
45
  "examples": [
45
46
  {
@@ -69,6 +69,9 @@
69
69
  "x-adiaui": {
70
70
  "anti_patterns": [],
71
71
  "category": "display",
72
+ "composes": [
73
+ "icon-ui"
74
+ ],
72
75
  "events": {},
73
76
  "examples": [
74
77
  {
@@ -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: Avatar
7
7
  category: display
8
8
  version: 1
9
9
  description: Avatar with image → initials → empty fallback chain.
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
  text:
12
16
  description: Display string (full name or initials). Initials derive from spaces — first letter of each word, max 2.
@@ -78,6 +78,9 @@
78
78
  "x-adiaui": {
79
79
  "anti_patterns": [],
80
80
  "category": "display",
81
+ "composes": [
82
+ "icon-ui"
83
+ ],
81
84
  "events": {},
82
85
  "examples": [
83
86
  {
@@ -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: Badge
7
7
  category: display
8
8
  version: 1
9
9
  description: Inline pill-shaped badge/tag. Text rendered via CSS attr().
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
  icon:
12
16
  description: Optional leading icon (any registered name). Use icon="dot" for chart-legend /
@@ -50,6 +50,7 @@
50
50
  "x-adiaui": {
51
51
  "anti_patterns": [],
52
52
  "category": "layout",
53
+ "composes": [],
53
54
  "events": {},
54
55
  "examples": [
55
56
  {
@@ -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';
@@ -44,6 +44,11 @@
44
44
  "x-adiaui": {
45
45
  "anti_patterns": [],
46
46
  "category": "navigation",
47
+ "composes": [
48
+ "menu-ui",
49
+ "button-ui",
50
+ "menu-item-ui"
51
+ ],
47
52
  "events": {},
48
53
  "examples": [
49
54
  {
@@ -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,12 @@ component: Breadcrumb
7
7
  category: navigation
8
8
  version: 1
9
9
  description: Breadcrumb trail with auto-inserted separators. Supports a leading icon (first child) and an overflow popover that collapses middle crumbs into a `…` menu.
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
+ - menu-ui
14
+ - button-ui
15
+ - menu-item-ui
10
16
  props:
11
17
  separator:
12
18
  description: Character or string rendered between breadcrumb items via CSS ::before.