@adia-ai/web-components 0.5.7 → 0.5.9

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 (134) hide show
  1. package/USAGE.md +218 -0
  2. package/components/accordion/accordion.d.ts +22 -1
  3. package/components/action-list/action-list.d.ts +14 -1
  4. package/components/agent-artifact/agent-artifact.d.ts +1 -1
  5. package/components/agent-feedback-bar/agent-feedback-bar.d.ts +1 -1
  6. package/components/agent-questions/agent-questions.d.ts +1 -1
  7. package/components/agent-reasoning/agent-reasoning.d.ts +1 -1
  8. package/components/agent-suggestions/agent-suggestions.d.ts +1 -1
  9. package/components/agent-trace/agent-trace.d.ts +1 -1
  10. package/components/alert/alert.d.ts +1 -1
  11. package/components/avatar/avatar.d.ts +8 -1
  12. package/components/badge/badge.d.ts +1 -1
  13. package/components/block/block.d.ts +1 -1
  14. package/components/breadcrumb/breadcrumb.d.ts +1 -1
  15. package/components/button/button.d.ts +1 -1
  16. package/components/canvas/canvas.d.ts +1 -1
  17. package/components/card/card.d.ts +1 -1
  18. package/components/chart/chart.d.ts +1 -1
  19. package/components/chart-legend/chart-legend.d.ts +1 -1
  20. package/components/chat-thread/chat-thread.d.ts +40 -1
  21. package/components/code/code.css +1 -1
  22. package/components/col/col.a2ui.json +4 -4
  23. package/components/col/col.d.ts +2 -2
  24. package/components/col/col.yaml +2 -2
  25. package/components/command/command.d.ts +1 -1
  26. package/components/demo-toggle/demo-toggle.a2ui.json +3 -1
  27. package/components/demo-toggle/demo-toggle.d.ts +1 -1
  28. package/components/demo-toggle/demo-toggle.yaml +2 -0
  29. package/components/description-list/description-list.d.ts +1 -1
  30. package/components/divider/divider.d.ts +1 -1
  31. package/components/drawer/drawer.d.ts +1 -1
  32. package/components/embed/embed.d.ts +1 -1
  33. package/components/empty-state/class.js +10 -4
  34. package/components/empty-state/empty-state.a2ui.json +5 -0
  35. package/components/empty-state/empty-state.css +36 -0
  36. package/components/empty-state/empty-state.d.ts +6 -1
  37. package/components/empty-state/empty-state.test.js +77 -0
  38. package/components/empty-state/empty-state.yaml +9 -0
  39. package/components/feed/feed.css +2 -2
  40. package/components/feed/feed.d.ts +29 -5
  41. package/components/field/field.d.ts +1 -1
  42. package/components/fields/fields.a2ui.json +3 -1
  43. package/components/fields/fields.d.ts +1 -1
  44. package/components/fields/fields.yaml +2 -0
  45. package/components/grid/grid.d.ts +1 -1
  46. package/components/heatmap/heatmap.d.ts +1 -1
  47. package/components/icon/icon.d.ts +1 -1
  48. package/components/image/image.d.ts +1 -1
  49. package/components/input/class.js +2 -1
  50. package/components/input/input.a2ui.json +5 -0
  51. package/components/input/input.test.js +99 -0
  52. package/components/input/input.yaml +14 -0
  53. package/components/inspector/inspector.d.ts +1 -1
  54. package/components/kbd/kbd.d.ts +1 -1
  55. package/components/link/link.d.ts +1 -1
  56. package/components/list/list.d.ts +10 -1
  57. package/components/menu/menu-divider.a2ui.json +41 -0
  58. package/components/menu/menu-divider.yaml +15 -0
  59. package/components/menu/menu-item.a2ui.json +77 -0
  60. package/components/menu/menu-item.yaml +45 -0
  61. package/components/menu/menu.d.ts +17 -1
  62. package/components/modal/modal.d.ts +1 -1
  63. package/components/nav/nav.a2ui.json +6 -1
  64. package/components/nav/nav.css +1 -1
  65. package/components/nav/nav.d.ts +1 -1
  66. package/components/nav/nav.yaml +6 -0
  67. package/components/nav-group/nav-group.a2ui.json +5 -1
  68. package/components/nav-group/nav-group.css +1 -1
  69. package/components/nav-group/nav-group.d.ts +1 -1
  70. package/components/nav-group/nav-group.yaml +5 -0
  71. package/components/nav-item/nav-item.a2ui.json +4 -1
  72. package/components/nav-item/nav-item.css +1 -1
  73. package/components/nav-item/nav-item.d.ts +1 -1
  74. package/components/nav-item/nav-item.yaml +4 -0
  75. package/components/noodles/noodles.d.ts +1 -1
  76. package/components/page/page.d.ts +1 -1
  77. package/components/pagination/pagination.d.ts +1 -1
  78. package/components/pane/pane.d.ts +1 -1
  79. package/components/pipeline-status/pipeline-status.d.ts +1 -1
  80. package/components/popover/popover.d.ts +1 -1
  81. package/components/progress/progress.d.ts +1 -1
  82. package/components/progress-row/progress-row.d.ts +1 -1
  83. package/components/range/range.css +1 -1
  84. package/components/richtext/richtext.a2ui.json +4 -4
  85. package/components/richtext/richtext.d.ts +2 -2
  86. package/components/richtext/richtext.yaml +2 -2
  87. package/components/row/row.d.ts +1 -1
  88. package/components/segment/segment.d.ts +1 -1
  89. package/components/select/class.js +28 -0
  90. package/components/select/select.css +1 -1
  91. package/components/select/select.yaml +28 -0
  92. package/components/skeleton/skeleton.d.ts +1 -1
  93. package/components/slider/class.js +20 -50
  94. package/components/slider/slider.css +1 -1
  95. package/components/stack/stack.d.ts +1 -1
  96. package/components/step-progress/step-progress.d.ts +1 -1
  97. package/components/stepper/stepper-item.a2ui.json +74 -0
  98. package/components/stepper/stepper-item.yaml +45 -0
  99. package/components/stepper/stepper.d.ts +13 -1
  100. package/components/stream/stream.d.ts +1 -1
  101. package/components/swatch/swatch.css +1 -1
  102. package/components/swatch/swatch.d.ts +1 -1
  103. package/components/swiper/swiper.d.ts +1 -1
  104. package/components/switch/switch.css +1 -1
  105. package/components/table/table.d.ts +1 -1
  106. package/components/table-toolbar/table-toolbar.d.ts +1 -1
  107. package/components/tabs/tabs.d.ts +12 -1
  108. package/components/tag/tag.d.ts +1 -1
  109. package/components/text/text.d.ts +1 -1
  110. package/components/textarea/class.js +7 -1
  111. package/components/textarea/textarea.a2ui.json +5 -0
  112. package/components/textarea/textarea.yaml +14 -0
  113. package/components/timeline/timeline.d.ts +20 -1
  114. package/components/toast/class.js +9 -0
  115. package/components/toast/toast.d.ts +9 -5
  116. package/components/toast/toast.yaml +16 -0
  117. package/components/toggle-group/toggle-group.d.ts +12 -1
  118. package/components/toggle-group/toggle-option.a2ui.json +61 -0
  119. package/components/toggle-group/toggle-option.yaml +33 -0
  120. package/components/toggle-scheme/toggle-scheme.d.ts +1 -1
  121. package/components/toolbar/toolbar-group.a2ui.json +41 -0
  122. package/components/toolbar/toolbar-group.yaml +16 -0
  123. package/components/toolbar/toolbar.d.ts +4 -1
  124. package/components/tooltip/tooltip.css +2 -2
  125. package/components/tooltip/tooltip.d.ts +1 -1
  126. package/components/tree/tree.css +1 -1
  127. package/components/tree/tree.d.ts +18 -1
  128. package/core/form.js +93 -0
  129. package/core/signals.d.ts +28 -0
  130. package/index.d.ts +2 -2
  131. package/package.json +1 -1
  132. package/styles/colors/semantics.css +6 -0
  133. package/styles/tokens.css +3 -0
  134. package/styles/typography.css +5 -1
@@ -0,0 +1,61 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/ToggleOption.json",
4
+ "title": "ToggleOption",
5
+ "description": "Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "component": {
17
+ "const": "ToggleOption"
18
+ },
19
+ "disabled": {
20
+ "description": "Disabled state — blocks pointer + keyboard activation.",
21
+ "type": "boolean",
22
+ "default": false
23
+ },
24
+ "icon": {
25
+ "description": "Optional Phosphor icon name; renders as a leading icon.",
26
+ "type": "string",
27
+ "default": ""
28
+ },
29
+ "text": {
30
+ "description": "Visible label text.",
31
+ "type": "string",
32
+ "default": ""
33
+ },
34
+ "value": {
35
+ "description": "Stable identifier matched against the parent group's `value`.",
36
+ "type": "string",
37
+ "default": ""
38
+ }
39
+ },
40
+ "required": [
41
+ "component"
42
+ ],
43
+ "unevaluatedProperties": false,
44
+ "x-adiaui": {
45
+ "anti_patterns": [],
46
+ "category": "forms",
47
+ "composes": [],
48
+ "events": {},
49
+ "examples": [],
50
+ "keywords": [],
51
+ "name": "UIToggleOption",
52
+ "related": [],
53
+ "slots": {},
54
+ "states": [],
55
+ "synonyms": {},
56
+ "tag": "toggle-option-ui",
57
+ "tokens": {},
58
+ "traits": [],
59
+ "version": 1
60
+ }
61
+ }
@@ -0,0 +1,33 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ #
3
+ # §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
4
+ # drift for UIToggleOption. Ships as a sibling class in toggle-group/class.js
5
+ # + is registered alongside UIToggleGroup.
6
+
7
+ # Child component of <toggle-group-ui>. Surface only inside that parent.
8
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
9
+ name: UIToggleOption
10
+ tag: toggle-option-ui
11
+ component: ToggleOption
12
+ category: forms
13
+ version: 1
14
+ description: |-
15
+ Child of `<toggle-group-ui>`. One toggleable option inside a single-select or multi-select group. Pressed state mirrors `value` against the parent's selection.
16
+
17
+ props:
18
+ value:
19
+ description: Stable identifier matched against the parent group's `value`.
20
+ type: string
21
+ default: ""
22
+ text:
23
+ description: Visible label text.
24
+ type: string
25
+ default: ""
26
+ icon:
27
+ description: Optional Phosphor icon name; renders as a leading icon.
28
+ type: string
29
+ default: ""
30
+ disabled:
31
+ description: Disabled state — blocks pointer + keyboard activation.
32
+ type: boolean
33
+ default: false
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/toggle-scheme
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://adiaui.dev/a2ui/v0_9/components/ToolbarGroup.json",
4
+ "title": "ToolbarGroup",
5
+ "description": "Visual cluster of related actions inside a `<toolbar-ui>`. Provides role=\"group\" for assistive-tech grouping; no own visual chrome beyond a margin-collapsing gap with sibling groups.",
6
+ "type": "object",
7
+ "allOf": [
8
+ {
9
+ "$ref": "common_types.json#/$defs/ComponentCommon"
10
+ },
11
+ {
12
+ "$ref": "common_types.json#/$defs/CatalogComponentCommon"
13
+ }
14
+ ],
15
+ "properties": {
16
+ "component": {
17
+ "const": "ToolbarGroup"
18
+ }
19
+ },
20
+ "required": [
21
+ "component"
22
+ ],
23
+ "unevaluatedProperties": false,
24
+ "x-adiaui": {
25
+ "anti_patterns": [],
26
+ "category": "navigation",
27
+ "composes": [],
28
+ "events": {},
29
+ "examples": [],
30
+ "keywords": [],
31
+ "name": "UIToolbarGroup",
32
+ "related": [],
33
+ "slots": {},
34
+ "states": [],
35
+ "synonyms": {},
36
+ "tag": "toolbar-group-ui",
37
+ "tokens": {},
38
+ "traits": [],
39
+ "version": 1
40
+ }
41
+ }
@@ -0,0 +1,16 @@
1
+ # Edit this file; run `npm run build:components` to regenerate a2ui.json.
2
+ #
3
+ # §228 (v0.5.9): authored to close the §229 baseline class-export-undeclared
4
+ # drift for UIToolbarGroup. Ships as a sibling class in toolbar/class.js
5
+ # + is registered alongside UIToolbar.
6
+
7
+ # Child component of <toolbar-ui>. Groups a set of action buttons inside
8
+ # the parent's `[slot="action"]` cluster with a shared role="group".
9
+ $schema: ../../../../scripts/schemas/component.yaml.schema.json
10
+ name: UIToolbarGroup
11
+ tag: toolbar-group-ui
12
+ component: ToolbarGroup
13
+ category: navigation
14
+ version: 1
15
+ description: |-
16
+ Visual cluster of related actions inside a `<toolbar-ui>`. Provides role="group" for assistive-tech grouping; no own visual chrome beyond a margin-collapsing gap with sibling groups.
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/toolbar
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -22,3 +22,6 @@ export class UIToolbar extends UIElement {
22
22
  /** Overflow behavior */
23
23
  overflow: 'menu' | 'none';
24
24
  }
25
+
26
+ export class UIToolbarGroup extends UIElement {
27
+ }
@@ -121,7 +121,7 @@
121
121
 
122
122
  .tooltip-popup[data-follows="pointer"] [data-tip-role="name"] {
123
123
  color: var(--a-fg-subtle);
124
- font-weight: var(--a-weight-regular);
124
+ font-weight: var(--a-weight-normal);
125
125
  }
126
126
 
127
127
  .tooltip-popup[data-follows="pointer"] [data-tip-role="value"] {
@@ -131,7 +131,7 @@
131
131
 
132
132
  .tooltip-popup[data-follows="pointer"] [data-tip-role="pct"] {
133
133
  color: var(--a-fg-subtle);
134
- font-weight: var(--a-weight-regular);
134
+ font-weight: var(--a-weight-normal);
135
135
  }
136
136
 
137
137
  /* Indicator variants — dot / line / dashed */
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/tooltip
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -133,7 +133,7 @@
133
133
  no chrome). Sits before the [slot="actions"] hover-revealed slot. */
134
134
  [slot="badge"] {
135
135
  flex-shrink: 0;
136
- font-size: var(--tree-badge-size, var(--a-fine-size));
136
+ font-size: var(--tree-badge-size, var(--a-ui-xs));
137
137
  color: var(--tree-badge-fg, var(--tree-fg-muted));
138
138
  background: var(--tree-badge-bg, transparent);
139
139
  padding: 0 var(--tree-badge-px, var(--a-space-1));
@@ -4,7 +4,7 @@
4
4
  * @see https://ui-kit.exe.xyz/site/components/tree
5
5
  *
6
6
  * Type declarations generated by scripts/build/dts-codegen.mjs from
7
- * the component's `.a2ui.json` sidecar. Edit the source `.yaml`,
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
8
8
  * run `npm run build:components`, then `npm run codegen:dts` to
9
9
  * regenerate; or hand-author this file fully if rich event types are
10
10
  * needed beyond what the yaml `events:` block can express.
@@ -32,3 +32,20 @@ export class UITree extends UIElement {
32
32
  ): void;
33
33
  addEventListener(type: 'tree-select', listener: (ev: TreeSelectEvent) => unknown, options?: boolean | AddEventListenerOptions): void;
34
34
  }
35
+
36
+ export class UITreeItem extends UIElement {
37
+ /** Optional trailing badge text (count, label, etc.). Renders muted + small + right-aligned alongside the row, mirroring the nav-item-ui badge API. When empty, the badge slot stays empty.
38
+
39
+ Added in §184 (v0.5.5, FEEDBACK-08 §1). */
40
+ badge: string;
41
+ /** Optional leading icon name (Phosphor). */
42
+ icon: string;
43
+ /** When true, the item's children render expanded. Single-instance state; the parent `<tree-ui>` toggles this on click + Enter/Space + ArrowRight/ArrowLeft per tree-view APG. */
44
+ open: boolean;
45
+ /** Reflects the currently-selected item. Exactly one tree-item is selected per `<tree-ui>` parent (managed by the parent). */
46
+ selected: boolean;
47
+ /** Primary text rendered in the row. */
48
+ text: string;
49
+ /** Stable value emitted in `tree-select` event detail. */
50
+ value: string;
51
+ }
package/core/form.js CHANGED
@@ -51,10 +51,25 @@ export class UIFormElement extends UIElement {
51
51
  pattern: { type: String, default: '', reflect: true },
52
52
  minlength: { type: Number, default: null, reflect: true },
53
53
  maxlength: { type: Number, default: null, reflect: true },
54
+ // §220 (v0.5.9, FEEDBACK-14 §3): declarative trailing-debounce on the
55
+ // `input` event. When `throttle > 0`, `scheduleThrottledInput()`
56
+ // collapses bursts of value changes to one trailing emission at
57
+ // `quiet+throttle` ms. `change` continues to fire unthrottled. Use
58
+ // `flushPendingInput()` from `change` / blur paths to guarantee the
59
+ // trailing `input` fires before `change`. Default `0` keeps the
60
+ // synchronous behavior for non-opted-in consumers. Pattern landed
61
+ // for `<slider-ui>` in v0.5.5 §184; this graduates it to the shared
62
+ // base so `<input-ui>`, `<textarea-ui>`, `<slider-ui>` all share
63
+ // the same semantics + parity for consumer code.
64
+ throttle: { type: Number, default: 0, reflect: true },
54
65
  };
55
66
  }
56
67
 
57
68
  #dirty = false;
69
+ // §220 (v0.5.9): shared trailing-debounce timer + pending value for the
70
+ // `throttle` property. See `scheduleThrottledInput()` + `flushPendingInput()`.
71
+ #inputTimer = null;
72
+ #pendingValue = undefined;
58
73
 
59
74
  // ── ElementInternals accessors ──
60
75
 
@@ -105,6 +120,81 @@ export class UIFormElement extends UIElement {
105
120
  return valid;
106
121
  }
107
122
 
123
+ // ── §220 (v0.5.9): shared throttle helpers ──
124
+ //
125
+ // Subclasses with `throttle > 0` get trailing-debounced `input`
126
+ // dispatch + a synchronous flush API. Pattern source: v0.5.5 §184
127
+ // slider; graduated to the base in v0.5.9 §220 for parity across
128
+ // `<input-ui>`, `<textarea-ui>`, `<slider-ui>`.
129
+ //
130
+ // Usage in a subclass:
131
+ // #onInput = () => {
132
+ // this.value = this.#textEl.textContent;
133
+ // this.scheduleThrottledInput();
134
+ // };
135
+ // #onCommit = () => {
136
+ // this.flushPendingInput();
137
+ // this.dispatchEvent(new CustomEvent('change', {...}));
138
+ // };
139
+
140
+ /**
141
+ * Schedule (or immediately dispatch) a trailing-debounced `input`
142
+ * CustomEvent. When `this.throttle > 0`, the dispatch is deferred and
143
+ * collapsed across calls within a `throttle`-ms window. When 0, fires
144
+ * synchronously (legacy behavior).
145
+ *
146
+ * @param {Object} [detail] — optional detail override. Defaults to
147
+ * `{ value: this.value }`.
148
+ */
149
+ scheduleThrottledInput(detail = null) {
150
+ const t = Number(this.throttle) || 0;
151
+ const event = () => new CustomEvent('input', {
152
+ bubbles: true,
153
+ detail: detail || { value: this.value },
154
+ });
155
+ if (t > 0) {
156
+ if (this.#inputTimer != null) clearTimeout(this.#inputTimer);
157
+ this.#pendingValue = this.value;
158
+ this.#inputTimer = setTimeout(() => {
159
+ this.#inputTimer = null;
160
+ this.#pendingValue = undefined;
161
+ this.dispatchEvent(event());
162
+ }, t);
163
+ return;
164
+ }
165
+ this.dispatchEvent(event());
166
+ }
167
+
168
+ /**
169
+ * Synchronously flush a pending throttled `input` dispatch. No-op when
170
+ * no timer is pending. Call this from `change` / blur / explicit-commit
171
+ * paths so consumers see the trailing `input` BEFORE the commit.
172
+ *
173
+ * @param {Object} [detail] — optional detail override.
174
+ */
175
+ flushPendingInput(detail = null) {
176
+ if (this.#inputTimer == null) return;
177
+ clearTimeout(this.#inputTimer);
178
+ this.#inputTimer = null;
179
+ this.#pendingValue = undefined;
180
+ this.dispatchEvent(new CustomEvent('input', {
181
+ bubbles: true,
182
+ detail: detail || { value: this.value },
183
+ }));
184
+ }
185
+
186
+ /**
187
+ * Drop any pending throttled `input` dispatch without firing. Called
188
+ * automatically on `disconnected()` to avoid late dispatches after
189
+ * teardown. Subclasses overriding `disconnected()` should `super.disconnected()`.
190
+ */
191
+ dropPendingInput() {
192
+ if (this.#inputTimer == null) return;
193
+ clearTimeout(this.#inputTimer);
194
+ this.#inputTimer = null;
195
+ this.#pendingValue = undefined;
196
+ }
197
+
108
198
  // ── Constraint engine ──
109
199
 
110
200
  #runConstraints(val) {
@@ -216,6 +306,9 @@ export class UIFormElement extends UIElement {
216
306
  this.removeEventListener('invalid', this.#onInvalid);
217
307
  this.removeEventListener('input', this.#onInput);
218
308
  this.removeEventListener('blur', this.#onBlur, true);
309
+ // §220 (v0.5.9): drop any pending throttled `input` dispatch — the
310
+ // element is gone; no late emissions.
311
+ this.dropPendingInput();
219
312
  }
220
313
 
221
314
  // ── Form lifecycle callbacks ──
package/core/signals.d.ts CHANGED
@@ -57,6 +57,34 @@ export function computed<T>(fn: () => T): ComputedSignal<T>;
57
57
  * Run `fn` inside a reactive context. Re-runs when any signal read during the
58
58
  * last run changes. Returns a disposer.
59
59
  *
60
+ * §221h (v0.5.9) — re-run scheduling notes. Re-runs are scheduled via
61
+ * `queueMicrotask` so multiple signal mutations in the same synchronous tick
62
+ * batch into ONE re-run. This is the same semantic the render scheduler in
63
+ * `core/element.js` uses. Two consequences worth knowing:
64
+ *
65
+ * 1. **Reads of mutated signals between write and re-run see the new value
66
+ * immediately** — only effect re-execution is deferred:
67
+ * ```
68
+ * count.value = 1;
69
+ * count.value; // 1 (read returns new value)
70
+ * // effect hasn't run yet
71
+ * ```
72
+ *
73
+ * 2. **Test isolation requires awaiting two microtasks** — one for the
74
+ * effect's own re-run + one for any downstream effects it schedules:
75
+ * ```
76
+ * const tick = () => new Promise(r => queueMicrotask(r));
77
+ * count.value = 5;
78
+ * await tick(); // primary effect runs
79
+ * await tick(); // downstream effects flush
80
+ * ```
81
+ *
82
+ * See [`USAGE.md` §221h](../USAGE.md#221h--effect-dispatch-timing-signals) for
83
+ * a worked example. The double-`queueMicrotask` test-flush idiom is the
84
+ * canonical fix; don't reach for `await Promise.resolve()` (single microtask
85
+ * window) or `setTimeout(_, 0)` (different task queue) — neither matches the
86
+ * scheduler's batching shape reliably.
87
+ *
60
88
  * @example
61
89
  * const dispose = effect(() => console.log(count.value));
62
90
  * // later
package/index.d.ts CHANGED
@@ -265,7 +265,7 @@ declare global {
265
265
  'chart-ui': import('./components/chart/chart.js').UIChart;
266
266
  'chart-legend-ui': import('./components/chart-legend/chart-legend.js').UIChartLegend;
267
267
  'chat-thread-ui': import('./components/chat-thread/chat-thread.js').UIChatThread;
268
- 'col-ui': import('./components/col/col.js').UIColumn;
268
+ 'col-ui': import('./components/col/col.js').UICol;
269
269
  'command-ui': import('./components/command/command.js').UICommand;
270
270
  'demo-toggle-ui': import('./components/demo-toggle/demo-toggle.js').UIDemoToggle;
271
271
  'description-list-ui': import('./components/description-list/description-list.js').UIDescriptionList;
@@ -297,7 +297,7 @@ declare global {
297
297
  'popover-ui': import('./components/popover/popover.js').UIPopover;
298
298
  'progress-ui': import('./components/progress/progress.js').UIProgress;
299
299
  'progress-row-ui': import('./components/progress-row/progress-row.js').UIProgressRow;
300
- 'richtext-ui': import('./components/richtext/richtext.js').UIRichtext;
300
+ 'richtext-ui': import('./components/richtext/richtext.js').UIRichText;
301
301
  'row-ui': import('./components/row/row.js').UIRow;
302
302
  'segment-ui': import('./components/segment/segment.js').UISegment;
303
303
  'skeleton-ui': import('./components/skeleton/skeleton.js').UISkeleton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-components",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "AdiaUI web components — vanilla custom elements. A2UI runtime (renderer, registry, streams, wiring) lives in @adia-ai/a2ui-runtime.",
5
5
  "type": "module",
6
6
  "types": "./index.d.ts",
@@ -593,6 +593,12 @@
593
593
  --a-chrome-ring-subtle: oklch(0 0 0 / 0.3);
594
594
  --a-chrome-shadow-soft: oklch(0 0 0 / 0.2);
595
595
  --a-chrome-backdrop: oklch(0 0 0 / 0.5);
596
+ /* §230-bundle (v0.5.9): canonical badge-on-chrome pair — light text +
597
+ dark semi-transparent surface. Used by primitives that overlay text
598
+ on unpredictable backgrounds (swatch badges, video controls, color
599
+ readouts). Must read against red / blue / dark / light underlays. */
600
+ --a-chrome-fg: var(--a-chrome-light);
601
+ --a-chrome-bg: oklch(0 0 0 / 0.4);
596
602
 
597
603
  /* ══════════════════════════════════════════════════════════════
598
604
  DATA PALETTE — 10 categorical series colors for charts
package/styles/tokens.css CHANGED
@@ -83,9 +83,12 @@
83
83
  k=0 → sharp (clamped to min). k=2 → extra round (clamped to max). */
84
84
  --a-radius-min: 0.25rem;
85
85
  --a-radius-max: 1.25rem;
86
+ /* §230-bundle (v0.5.9): xs scale notch added for badge / sub-tile / inline-pill use cases needing smaller radius than `sm`. */
87
+ --a-radius-xs-k: 0.166;
86
88
  --a-radius-sm-k: 0.333;
87
89
  --a-radius-md-k: 0.666;
88
90
  --a-radius-lg-k: 1.000;
91
+ --a-radius-xs: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-xs-k)), var(--a-radius-max));
89
92
  --a-radius-sm: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-sm-k)), var(--a-radius-max));
90
93
  --a-radius-md: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-md-k)), var(--a-radius-max));
91
94
  --a-radius-lg: clamp(var(--a-radius-min), calc(var(--a-radius-k) * var(--a-radius-max) * var(--a-radius-lg-k)), var(--a-radius-max));
@@ -88,7 +88,9 @@
88
88
  /* ── Font weight — single canonical scale ──
89
89
  Conventional weights: thin=100, light=300, normal=400, medium=500,
90
90
  semibold=600, bold=700. Fonts must provide these axes or fall back
91
- gracefully. --a-font-weight-* are backcompat aliases (to be removed). */
91
+ gracefully. Earlier --a-font-weight-* aliases were REMOVED in v0.5.0;
92
+ use --a-weight-* directly. (v0.5.8 §230 closed 3 consumer references
93
+ that still pointed at the removed family per FEEDBACK-20 §1.) */
92
94
  --a-weight-thin: 100;
93
95
  --a-weight-light: 300;
94
96
  --a-weight-normal: 400;
@@ -311,11 +313,13 @@
311
313
  --a-ui-family: var(--a-font-family-ui);
312
314
  --a-ui-weight: var(--a-weight-medium);
313
315
  --a-ui-tiny: 10px;
316
+ --a-ui-xs: 12px;
314
317
  --a-ui-sm: 13px;
315
318
  --a-ui-md: 14px;
316
319
  --a-ui-lg: 15px;
317
320
  --a-ui-size: var(--a-ui-md);
318
321
  --a-ui-leading: 1;
322
+ --a-ui-line-height: var(--a-body-leading); /* §230-bundle (v0.5.9): alias for prose-style line-height inside UI body copy (e.g. alert message text). 1.5 by default. Closes the alert.css orphaned reference. */
319
323
  --a-ui-tracking: var(--a-font-tracking-normal);
320
324
  --a-ui-case: normal;
321
325
  --a-ui-color: inherit;