@aiaiai-pt/design-system 0.40.0 → 0.41.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.
@@ -22,9 +22,7 @@ import {
22
22
  } from "./dispatch";
23
23
  import type { Block, OntologySchema, WidgetKind, WidgetProps } from "./types";
24
24
 
25
- import DonutChartWidget from "./DonutChartWidget.svelte";
26
25
  import EChartWidget from "./EChartWidget.svelte";
27
- import LineChartWidget from "./LineChartWidget.svelte";
28
26
  import ResultsChartWidget from "./ResultsChartWidget.svelte";
29
27
  import StatGridWidget from "./StatGridWidget.svelte";
30
28
 
@@ -67,15 +65,16 @@ export function byKind(
67
65
  * appended in call order. Exported (readonly view) for introspection / testing.
68
66
  */
69
67
  const _entries: RegistryEntry<WidgetComponent>[] = [
70
- // DS base: the two clean widgets shipped by this package.
68
+ // DS base: the clean widgets shipped by this package.
71
69
  byKind("stat-grid", "kpi", StatGridWidget),
72
70
  byTypeOnKind("results-chart", "aggregate", ResultsChartWidget),
71
+ // #176 follow-on — ONE ECharts widget renders any chart spec (supersedes ADR
72
+ // 0003 #4). The per-kind `line-chart` / `donut-chart` keys were a stopgap;
73
+ // in the declarative model the kind is PER-SERIES (a series carries its own
74
+ // bar/line/area/scatter/pie type), so EChartWidget renders every shape and
75
+ // the kind-specific registry keys + wrapper components are retired.
76
+ // `results-chart` stays as the SSR / no-JS a11y fallback key.
73
77
  byTypeOnKind("chart", "aggregate", EChartWidget),
74
- // #176 Tier 1 — chart KINDS as registry entries, so the authoring `type`
75
- // picker is a real chart picker. All three ECharts kinds share the same
76
- // aggregate data path + a11y data table; only the rendered geometry differs.
77
- byTypeOnKind("line-chart", "aggregate", LineChartWidget),
78
- byTypeOnKind("donut-chart", "aggregate", DonutChartWidget),
79
78
  ];
80
79
 
81
80
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiaiai-pt/design-system",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Design system tokens and Svelte components for aiaiai products",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -75,6 +75,7 @@
75
75
  "@sveltejs/package": "^2.5.7",
76
76
  "date-fns": "^4.1.0",
77
77
  "echarts": "^5.6.0",
78
+ "jsdom": "^29.1.1",
78
79
  "ol": "^10.8.0",
79
80
  "svelte": "^5.55.3",
80
81
  "svelte-check": "^4.4.6",
@@ -1,11 +0,0 @@
1
- <script lang="ts">
2
- import EChartWidget from "./EChartWidget.svelte";
3
- import type { WidgetProps } from "./types";
4
-
5
- // `donut-chart` registry key (#176 Tier 1). Thin wrapper binding the ECharts
6
- // `kind` to a ring pie — the registry maps this key here. Same aggregate data
7
- // path + a11y data table as the bar/line.
8
- let p: WidgetProps = $props();
9
- </script>
10
-
11
- <EChartWidget {...p} kind="donut" />
@@ -1,4 +0,0 @@
1
- import type { WidgetProps } from "./types";
2
- declare const DonutChartWidget: import("svelte").Component<WidgetProps, {}, "">;
3
- type DonutChartWidget = ReturnType<typeof DonutChartWidget>;
4
- export default DonutChartWidget;
@@ -1,12 +0,0 @@
1
- <script lang="ts">
2
- import EChartWidget from "./EChartWidget.svelte";
3
- import type { WidgetProps } from "./types";
4
-
5
- // `line-chart` registry key (#176 Tier 1). Thin wrapper that binds the ECharts
6
- // `kind` the dispatcher can't pass — the registry maps this key to this
7
- // component, which renders the shared EChart widget as a line. Same aggregate
8
- // data path + a11y data table as the bar.
9
- let p: WidgetProps = $props();
10
- </script>
11
-
12
- <EChartWidget {...p} kind="line" />
@@ -1,4 +0,0 @@
1
- import type { WidgetProps } from "./types";
2
- declare const LineChartWidget: import("svelte").Component<WidgetProps, {}, "">;
3
- type LineChartWidget = ReturnType<typeof LineChartWidget>;
4
- export default LineChartWidget;