@adia-ai/web-components 0.5.20 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -11,6 +11,16 @@ runtime ships in the sibling `@adia-ai/a2ui-runtime` package
11
11
 
12
12
  _No pending changes._
13
13
 
14
+ ## [0.6.0] - 2026-05-18
15
+
16
+ _Lockstep ride-along (no source change in this package; companion to web-components v0.6.0 — see root CHANGELOG)._
17
+
18
+ **MINOR-line internal-dep range update:** internal `@adia-ai/*` dependency ranges move from `^0.5.0` to `^0.6.0` per AdiaUI lockstep policy.
19
+
20
+ ## [0.5.21] - 2026-05-18
21
+
22
+ _Lockstep ride-along (no source change in this package; companion to web-components v0.5.21 — see root CHANGELOG)._
23
+
14
24
  ## [0.5.20] - 2026-05-18
15
25
 
16
26
  ### Added — §353 (v0.5.20) — `<pane-ui>` + `<tabs-ui>` bar-rule alignment
@@ -0,0 +1,4 @@
1
+ // v0.5.21 hotfix stub — TS-migration Phase 1 (568bb998d) declared this
2
+ // types: export but Phase 2 hasn't generated real declarations yet.
3
+ // Replace with real type declarations when Phase 2 lands.
4
+ export {};
@@ -86,8 +86,7 @@ export { UINavItem } from './nav-item/nav-item.js';
86
86
  export { UIOtpInput } from './otp-input/otp-input.js';
87
87
  export { UIImage } from './image/image.js';
88
88
  export { UISearch } from './search/search.js';
89
- // Suffixed `-ui` to dodge ad-blocker rules that match `/stat.js$script`.
90
- export { UIStat } from './stat/stat-ui.js';
89
+ export { UIStat } from './stat/stat.js';
91
90
  export { UIProgressRow } from './progress-row/progress-row.js';
92
91
  export { UIActionList, UIActionItem } from './action-list/action-list.js';
93
92
  export { UIEmptyState } from './empty-state/empty-state.js';
@@ -13,6 +13,7 @@
13
13
 
14
14
  import { UIFormElement } from '../../core/form.js';
15
15
  import { anchorPopover } from '../../core/anchor.js';
16
+ import { untracked } from '../../core/signals.js';
16
17
 
17
18
  function escapeHTML(s) {
18
19
  return s.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
@@ -244,21 +245,30 @@ export class UISelect extends UIFormElement {
244
245
  }
245
246
 
246
247
  set options(list) {
247
- this.#options = list;
248
- // Ensure listbox exists before rendering (may be called before first render)
249
- if (!this.#listbox) {
250
- this.#listbox = this.querySelector('[slot="listbox"]');
248
+ // Wrap the internal rebuild in `untracked` so reads of `this.value` inside
249
+ // `#renderOptions()` (for aria-selected) and `#displayText()` (for the
250
+ // trigger label) don't subscribe a calling effect to this element's value
251
+ // signal. Without this, setting `.options` followed by `.value` from
252
+ // inside an effect creates a self-trigger cycle — the effect subscribes
253
+ // to value via #renderOptions, then notifies itself via the value write,
254
+ // and re-runs until the drain-loop guard fires.
255
+ untracked(() => {
256
+ this.#options = list;
257
+ // Ensure listbox exists before rendering (may be called before first render)
251
258
  if (!this.#listbox) {
252
- this.#listbox = document.createElement('div');
253
- this.#listbox.setAttribute('slot', 'listbox');
254
- this.#listbox.setAttribute('role', 'listbox');
255
- this.#listbox.setAttribute('popover', 'manual');
256
- this.appendChild(this.#listbox);
259
+ this.#listbox = this.querySelector('[slot="listbox"]');
260
+ if (!this.#listbox) {
261
+ this.#listbox = document.createElement('div');
262
+ this.#listbox.setAttribute('slot', 'listbox');
263
+ this.#listbox.setAttribute('role', 'listbox');
264
+ this.#listbox.setAttribute('popover', 'manual');
265
+ this.appendChild(this.#listbox);
266
+ }
257
267
  }
258
- }
259
- this.#renderOptions();
260
- const display = this.querySelector('[slot="display"]');
261
- if (display) display.textContent = this.#displayText();
268
+ this.#renderOptions();
269
+ const display = this.querySelector('[slot="display"]');
270
+ if (display) display.textContent = this.#displayText();
271
+ });
262
272
  }
263
273
 
264
274
  get options() { return this.#options; }
@@ -49,7 +49,9 @@
49
49
  "x-adiaui": {
50
50
  "anti_patterns": [],
51
51
  "category": "display",
52
- "composes": [],
52
+ "composes": [
53
+ "icon-ui"
54
+ ],
53
55
  "events": {},
54
56
  "examples": [
55
57
  {
@@ -0,0 +1,26 @@
1
+ /**
2
+ * `<stat-ui>` — Metric/KPI display — value + label + optional change indicator and trend.
3
+ *
4
+ * @see https://ui-kit.exe.xyz/site/components/stat
5
+ *
6
+ * Type declarations generated by scripts/build/dts-codegen.mjs from
7
+ * the component's `.a2ui.json` sidecar(s). Edit the source `.yaml`,
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.
11
+ */
12
+
13
+ import { UIElement } from '../../core/element.js';
14
+
15
+ export class UIStat extends UIElement {
16
+ /** Change indicator text (e.g. '+12%', '-3%') */
17
+ change: string;
18
+ /** Icon name displayed in the icon slot */
19
+ icon: string;
20
+ /** Eyebrow label describing the metric */
21
+ label: string;
22
+ /** Trend direction or narrative subtitle. Canonical values color the change badge (up=success, down=danger, neutral/flat=muted); any other string renders as caption-style text under the primary value. */
23
+ trend: string;
24
+ /** The primary metric value to display */
25
+ value: string;
26
+ }
@@ -3,6 +3,8 @@
3
3
  $schema: ../../../../scripts/schemas/component.yaml.schema.json
4
4
  name: UIStat
5
5
  tag: stat-ui
6
+ composes:
7
+ - icon-ui
6
8
  component: Stat
7
9
  category: display
8
10
  version: 1
package/package.json CHANGED
@@ -1,48 +1,58 @@
1
1
  {
2
2
  "name": "@adia-ai/web-components",
3
- "version": "0.5.20",
3
+ "version": "0.6.0",
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",
7
7
  "exports": {
8
8
  ".": {
9
9
  "types": "./index.d.ts",
10
+ "import": "./index.js",
10
11
  "default": "./index.js"
11
12
  },
12
13
  "./css": "./index.css",
13
14
  "./core": {
14
15
  "types": "./core/index.d.ts",
16
+ "import": "./core/index.js",
15
17
  "default": "./core/index.js"
16
18
  },
17
19
  "./core/*": {
18
20
  "types": "./core/*.d.ts",
21
+ "import": "./core/*.js",
19
22
  "default": "./core/*.js"
20
23
  },
21
- "./components": "./components/index.js",
24
+ "./components": {
25
+ "types": "./components/index.d.ts",
26
+ "import": "./components/index.js",
27
+ "default": "./components/index.js"
28
+ },
22
29
  "./components/*": {
23
30
  "types": "./components/*/*.d.ts",
31
+ "import": "./components/*/*.js",
24
32
  "default": "./components/*/*.js"
25
33
  },
26
- "./components/stat": {
27
- "types": "./components/stat/stat-ui.d.ts",
28
- "default": "./components/stat/stat-ui.js"
29
- },
30
- "./components/stat/stat-ui.js": {
31
- "types": "./components/stat/stat-ui.d.ts",
32
- "default": "./components/stat/stat-ui.js"
33
- },
34
34
  "./components/*/class": {
35
35
  "types": "./components/*/*.d.ts",
36
+ "import": "./components/*/class.js",
36
37
  "default": "./components/*/class.js"
37
38
  },
38
39
  "./components/*.css": "./components/*/*.css",
39
40
  "./components/*/*.css": "./components/*/*.css",
40
41
  "./components/*/css/*.css": "./components/*/css/*.css",
41
42
  "./styles/*": "./styles/*",
42
- "./traits": "./traits/index.js",
43
- "./traits/*": "./traits/*.js",
43
+ "./traits": {
44
+ "types": "./traits.d.ts",
45
+ "import": "./traits/index.js",
46
+ "default": "./traits/index.js"
47
+ },
48
+ "./traits/*": {
49
+ "types": "./traits.d.ts",
50
+ "import": "./traits/*.js",
51
+ "default": "./traits/*.js"
52
+ },
44
53
  "./color": {
45
54
  "types": "./color/index.d.ts",
55
+ "import": "./color/index.js",
46
56
  "default": "./color/index.js"
47
57
  },
48
58
  "./package.json": "./package.json"
@@ -75,7 +85,7 @@
75
85
  "./core/icons-phosphor.js"
76
86
  ],
77
87
  "dependencies": {
78
- "@adia-ai/a2ui-runtime": "^0.5.0",
88
+ "@adia-ai/a2ui-runtime": "^0.6.0",
79
89
  "@codemirror/commands": "^6.10.3",
80
90
  "@codemirror/language": "^6.12.3",
81
91
  "@codemirror/lint": "^6.9.5",
@@ -77,7 +77,7 @@
77
77
  @import "../components/otp-input/otp-input.css";
78
78
  @import "../components/image/image.css";
79
79
  @import "../components/search/search.css";
80
- @import "../components/stat/stat-ui.css";
80
+ @import "../components/stat/stat.css";
81
81
  @import "../components/progress-row/progress-row.css";
82
82
  @import "../components/action-list/action-list.css";
83
83
  @import "../components/empty-state/empty-state.css";
@@ -1,38 +0,0 @@
1
- /**
2
- * `<stat-ui>` — Metric/KPI display. Value + label + optional change indicator and trend.
3
- *
4
- * @see https://ui-kit.exe.xyz/site/components/stat
5
- *
6
- * HAND-AUTHORED (v0.5.12 §253 FB-30 close-out). The codegen pipeline's
7
- * `isCssOnly()` check at `scripts/build/dts-codegen.mjs:186-194` looks for
8
- * `${dirname}.js` — but stat ships `stat-ui.js` (irregular filename; the
9
- * v0.6.0 §303 rename will normalize to `stat.js`). Pre-§303 the codegen
10
- * false-positives `isCssOnly` and skips this directory entirely. Hand-author
11
- * this file matching `stat.yaml` props until §303 lands.
12
- *
13
- * Filename mirrors the JS file (`stat-ui.js` → `stat-ui.d.ts`) so TypeScript
14
- * resolves the side-effect import `import '@adia-ai/web-components/components/stat/stat-ui.js'`
15
- * to a typed module. Post-§303, both files rename to `stat.{js,d.ts}` and
16
- * codegen takes over.
17
- */
18
-
19
- import { UIElement } from '../../core/element.js';
20
-
21
- export class UIStat extends UIElement {
22
- /** Eyebrow label describing the metric. */
23
- label: string;
24
- /** Primary metric value (large display number / string). */
25
- value: string;
26
- /** Change indicator text (e.g. "+12%", "-3%"). Slotted as a badge next to value. */
27
- change: string;
28
- /**
29
- * Trend direction or narrative subtitle. Canonical values color the change
30
- * badge: `up` = success (green), `down` = danger (red), `flat`/`neutral` =
31
- * muted. Any other string renders as caption-style text under the primary
32
- * value (not enum-validated; yaml documents the canonical set but the type
33
- * stays `string` for narrative subtitles).
34
- */
35
- trend: string;
36
- /** Icon name displayed in the icon slot (Phosphor icon registry). */
37
- icon: string;
38
- }
File without changes
File without changes