@mcp-b/viz-components 0.3.12 → 0.4.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/dist/{chart-BSbFRQju.js → chart-DtyJvCtm.js} +3 -2
- package/dist/components/chart/chart.d.ts +4 -6
- package/dist/components/chart/chart.js +1 -1
- package/dist/components/chart-card/chart-card.d.ts +2 -4
- package/dist/components/chart-card/chart-card.js +1 -1
- package/dist/components/distribution/distribution.d.ts +3 -4
- package/dist/components/distribution/distribution.js +2 -2
- package/dist/components/legend/legend.d.ts +3 -5
- package/dist/components/legend/legend.js +1 -1
- package/dist/components/metric-card/metric-card.d.ts +2 -4
- package/dist/components/metric-card/metric-card.js +1 -1
- package/dist/{decorate-DcF3lt7P.js → decorate-BkO8ArQg.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "./decorate-
|
|
1
|
+
import { t as __decorate } from "./decorate-BkO8ArQg.js";
|
|
2
2
|
import { bin, extent } from "d3-array";
|
|
3
3
|
import { scaleBand, scaleLinear } from "d3-scale";
|
|
4
4
|
import { arc, area, line, pie } from "d3-shape";
|
|
@@ -191,9 +191,10 @@ var SigveloChart = class extends SigveloElement {
|
|
|
191
191
|
`;
|
|
192
192
|
const categoryTicks = svg`${labels.map((label, index) => {
|
|
193
193
|
if (index % labelStride !== 0 && index !== labels.length - 1) return nothing;
|
|
194
|
+
const x = PADDING.left + (xBand(index) ?? 0) + xBand.bandwidth() / 2;
|
|
194
195
|
return svg`<text
|
|
195
196
|
class="tick-label"
|
|
196
|
-
x=${
|
|
197
|
+
x=${x}
|
|
197
198
|
y=${PADDING.top + innerHeight + 22}
|
|
198
199
|
text-anchor="middle"
|
|
199
200
|
>${label}</text
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
-
|
|
4
3
|
//#region src/components/chart/chart.d.ts
|
|
5
|
-
type ChartType = "bar" | "line" | "area" | "scatter" | "donut" | "histogram";
|
|
6
|
-
type ChartDatum = Readonly<Record<string, string | number | boolean | null>>;
|
|
4
|
+
export type ChartType = "bar" | "line" | "area" | "scatter" | "donut" | "histogram";
|
|
5
|
+
export type ChartDatum = Readonly<Record<string, string | number | boolean | null>>;
|
|
7
6
|
/**
|
|
8
7
|
* <sigvelo-chart>
|
|
9
8
|
*
|
|
@@ -12,7 +11,7 @@ type ChartDatum = Readonly<Record<string, string | number | boolean | null>>;
|
|
|
12
11
|
* @status stable
|
|
13
12
|
* @since 1.0
|
|
14
13
|
*/
|
|
15
|
-
declare class SigveloChart extends SigveloElement {
|
|
14
|
+
export declare class SigveloChart extends SigveloElement {
|
|
16
15
|
#private;
|
|
17
16
|
static styles: CSSResultGroup;
|
|
18
17
|
type: ChartType;
|
|
@@ -28,5 +27,4 @@ declare global {
|
|
|
28
27
|
"sigvelo-chart": SigveloChart;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { ChartDatum, ChartType, SigveloChart };
|
|
30
|
+
//#endregion
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SigveloChart } from "../../chart-
|
|
1
|
+
import { t as SigveloChart } from "../../chart-DtyJvCtm.js";
|
|
2
2
|
export { SigveloChart };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
-
|
|
4
3
|
//#region src/components/chart-card/chart-card.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* @tag sigvelo-chart-card
|
|
7
6
|
* @summary A titled card composition for a chart or thematic map.
|
|
8
7
|
* @slot - A chart or distribution component.
|
|
9
8
|
*/
|
|
10
|
-
declare class SigveloChartCard extends SigveloElement {
|
|
9
|
+
export declare class SigveloChartCard extends SigveloElement {
|
|
11
10
|
static styles: CSSResultGroup;
|
|
12
11
|
heading: string;
|
|
13
12
|
description: string;
|
|
@@ -18,5 +17,4 @@ declare global {
|
|
|
18
17
|
"sigvelo-chart-card": SigveloChartCard;
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { SigveloChartCard };
|
|
20
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
2
2
|
import { css, html } from "lit";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
|
4
4
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import "../chart/chart.js";
|
|
1
2
|
import { CSSResultGroup } from "lit";
|
|
2
3
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
-
|
|
4
4
|
//#region src/components/distribution/distribution.d.ts
|
|
5
5
|
/** @tag sigvelo-distribution @summary Renders a numeric distribution as a bounded histogram. */
|
|
6
|
-
declare class SigveloDistribution extends SigveloElement {
|
|
6
|
+
export declare class SigveloDistribution extends SigveloElement {
|
|
7
7
|
static styles: CSSResultGroup;
|
|
8
8
|
values: readonly (number | null)[];
|
|
9
9
|
label: string;
|
|
@@ -14,5 +14,4 @@ declare global {
|
|
|
14
14
|
"sigvelo-distribution": SigveloDistribution;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { SigveloDistribution };
|
|
17
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../chart-
|
|
2
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import "../../chart-DtyJvCtm.js";
|
|
2
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
3
3
|
import { html } from "lit";
|
|
4
4
|
import { property } from "lit/decorators.js";
|
|
5
5
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
-
|
|
4
3
|
//#region src/components/legend/legend.d.ts
|
|
5
|
-
interface LegendItem {
|
|
4
|
+
export interface LegendItem {
|
|
6
5
|
label: string;
|
|
7
6
|
color: string;
|
|
8
7
|
}
|
|
9
8
|
/** @tag sigvelo-viz-legend @summary Displays a compact color legend for charts and thematic maps. */
|
|
10
|
-
declare class SigveloVizLegend extends SigveloElement {
|
|
9
|
+
export declare class SigveloVizLegend extends SigveloElement {
|
|
11
10
|
static styles: CSSResultGroup;
|
|
12
11
|
/**
|
|
13
12
|
* The visible text above the swatches, which also names the region.
|
|
@@ -25,5 +24,4 @@ declare global {
|
|
|
25
24
|
"sigvelo-viz-legend": SigveloVizLegend;
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
|
-
//#endregion
|
|
29
|
-
export { LegendItem, SigveloVizLegend };
|
|
27
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
2
2
|
import { css, html } from "lit";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
|
4
4
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CSSResultGroup } from "lit";
|
|
2
2
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
-
|
|
4
3
|
//#region src/components/metric-card/metric-card.d.ts
|
|
5
4
|
/** @tag sigvelo-metric-card @summary A labeled key-metric card composition. */
|
|
6
|
-
declare class SigveloMetricCard extends SigveloElement {
|
|
5
|
+
export declare class SigveloMetricCard extends SigveloElement {
|
|
7
6
|
static styles: CSSResultGroup;
|
|
8
7
|
label: string;
|
|
9
8
|
value: string;
|
|
@@ -15,5 +14,4 @@ declare global {
|
|
|
15
14
|
"sigvelo-metric-card": SigveloMetricCard;
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { SigveloMetricCard };
|
|
17
|
+
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __decorate } from "../../decorate-
|
|
1
|
+
import { t as __decorate } from "../../decorate-BkO8ArQg.js";
|
|
2
2
|
import { css, html } from "lit";
|
|
3
3
|
import { property } from "lit/decorators.js";
|
|
4
4
|
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as SigveloChart } from "./chart-
|
|
1
|
+
import { t as SigveloChart } from "./chart-DtyJvCtm.js";
|
|
2
2
|
import { SigveloChartCard } from "./components/chart-card/chart-card.js";
|
|
3
3
|
import { SigveloDistribution } from "./components/distribution/distribution.js";
|
|
4
4
|
import { SigveloVizLegend } from "./components/legend/legend.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/viz-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "D3-backed, framework-agnostic Sigvelo visualization web components.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"charts",
|
|
@@ -27,31 +27,31 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@mcp-b/wc-support": "0.3.
|
|
30
|
+
"@mcp-b/wc-support": "0.3.13"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
34
|
-
"@storybook/addon-a11y": "
|
|
35
|
-
"@storybook/addon-docs": "
|
|
36
|
-
"@storybook/addon-vitest": "
|
|
33
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
34
|
+
"@storybook/addon-a11y": "10.5.7",
|
|
35
|
+
"@storybook/addon-docs": "10.5.7",
|
|
36
|
+
"@storybook/addon-vitest": "10.5.7",
|
|
37
37
|
"@storybook/web-components-vite": "10.5.7",
|
|
38
38
|
"@types/d3-array": "^3.2.2",
|
|
39
39
|
"@types/d3-format": "^3.0.4",
|
|
40
40
|
"@types/d3-geo": "^3.1.1",
|
|
41
41
|
"@types/d3-scale": "^4.0.9",
|
|
42
|
-
"@types/d3-shape": "^3.
|
|
42
|
+
"@types/d3-shape": "^3.2.0",
|
|
43
43
|
"d3-array": "^3.2.4",
|
|
44
44
|
"d3-format": "^3.1.2",
|
|
45
45
|
"d3-geo": "^3.1.1",
|
|
46
46
|
"d3-scale": "^4.0.2",
|
|
47
47
|
"d3-shape": "^3.2.0",
|
|
48
48
|
"lit": "^3.3.3",
|
|
49
|
-
"playwright": "
|
|
50
|
-
"storybook": "
|
|
49
|
+
"playwright": "1.61.1",
|
|
50
|
+
"storybook": "10.5.7",
|
|
51
51
|
"tinyglobby": "^0.2.17",
|
|
52
52
|
"typescript": "^6.0.3",
|
|
53
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.
|
|
54
|
-
"vitest": "^4.1.
|
|
53
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
54
|
+
"vitest": "^4.1.11"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"d3-array": "^3.2.4",
|