@adia-ai/web-components 0.6.26 → 0.6.27

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
@@ -1,5 +1,11 @@
1
1
  # Changelog — @adia-ai/web-components
2
2
 
3
+ ## [0.6.27] — 2026-05-22
4
+
5
+ ### Added — `chart-ui[loading]` skeleton placeholder (§FB-12)
6
+
7
+ - **`<chart-ui loading>` shows a `<skeleton-ui>` placeholder** instead of the chart body while data is being fetched. Preserves the element's aspect-ratio dimensions so the skeleton occupies the same space the chart will fill once data arrives. Parity with `stat-ui[loading]` and `table-ui[loading]` (both shipped v0.6.18). Closes the remaining open item from FEEDBACK-12. File: `components/chart/class.js` + `components/chart/chart.yaml`.
8
+
3
9
  ## [0.6.26] — 2026-05-22
4
10
 
5
11
  ### Added — regression tests for FB-46 (select-ui) and FB-47 (table-ui)
@@ -102,6 +102,11 @@
102
102
  "type": "boolean",
103
103
  "default": false
104
104
  },
105
+ "loading": {
106
+ "description": "Show a skeleton placeholder instead of the chart body. Set to true while data is being fetched; clear once data arrives. Preserves the element's aspect-ratio dimensions so the skeleton occupies the same space the chart will fill. Parity with stat-ui[loading] and table-ui[loading] (§FB-12, v0.6.27).",
107
+ "type": "boolean",
108
+ "default": false
109
+ },
105
110
  "radius": {
106
111
  "description": "Bar corner radius (null = let CSS tokens decide)",
107
112
  "type": "number",
@@ -36,6 +36,8 @@ export class UIChart extends UIElement {
36
36
  hideGrid: boolean;
37
37
  /** Hide value labels */
38
38
  hideValues: boolean;
39
+ /** Show a skeleton placeholder instead of the chart body. Set to true while data is being fetched; clear once data arrives. Preserves the element's aspect-ratio dimensions so the skeleton occupies the same space the chart will fill. Parity with stat-ui[loading] and table-ui[loading] (§FB-12, v0.6.27). */
40
+ loading: boolean;
39
41
  /** Bar corner radius (null = let CSS tokens decide) */
40
42
  radius: number;
41
43
  /** Chart size */
@@ -103,6 +103,16 @@ props:
103
103
  description: Line smoothing factor
104
104
  type: number
105
105
  default: 0.4
106
+ loading:
107
+ description: >-
108
+ Show a skeleton placeholder instead of the chart body. Set to true
109
+ while data is being fetched; clear once data arrives. Preserves the
110
+ element's aspect-ratio dimensions so the skeleton occupies the same
111
+ space the chart will fill. Parity with stat-ui[loading] and
112
+ table-ui[loading] (§FB-12, v0.6.27).
113
+ type: boolean
114
+ default: false
115
+ reflect: true
106
116
  heading:
107
117
  description: >-
108
118
  DEPRECATED (OD-CHART-02). Place chart titles in an enclosing
@@ -226,6 +226,7 @@ export class UIChart extends UIElement {
226
226
  aspect: { type: String, default: 'std', reflect: true },
227
227
  size: { type: String, default: '', reflect: true },
228
228
  format: { type: String, default: 'abbr', reflect: true },
229
+ loading: { type: Boolean, default: false, reflect: true },
229
230
  };
230
231
 
231
232
  static template = () => null;
@@ -366,6 +367,23 @@ export class UIChart extends UIElement {
366
367
  }
367
368
 
368
369
  render() {
370
+ // §FB-12: loading state — replace chart body with a skeleton placeholder.
371
+ // Preserves the element's dimensions (aspect ratio CSS stays in effect)
372
+ // so the skeleton occupies the same space the chart will fill.
373
+ if (this.loading) {
374
+ let sk = this.querySelector('skeleton-ui[data-chart-skel]');
375
+ if (!sk) {
376
+ sk = document.createElement('skeleton-ui');
377
+ sk.setAttribute('data-chart-skel', '');
378
+ sk.style.cssText = 'display:block;width:100%;height:100%;min-height:4rem;border-radius:var(--a-radius-md)';
379
+ }
380
+ this.innerHTML = '';
381
+ this.appendChild(sk);
382
+ return;
383
+ }
384
+ // Remove skeleton if loading was cleared
385
+ const sk = this.querySelector('skeleton-ui[data-chart-skel]');
386
+ if (sk) sk.remove();
369
387
  this.#renderChart();
370
388
  }
371
389
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adia-ai/web-components",
3
- "version": "0.6.26",
3
+ "version": "0.6.27",
4
4
  "description": "AdiaUI web components \u2014 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",