@calimero-network/mero-charts 0.0.1 → 0.0.2

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.
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+
3
+ // Card primitives
4
+ declare function Card(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
5
+ declare function CardHeader(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
6
+ declare function CardTitle(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
7
+ declare function CardContent(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
8
+
9
+ // Gauge chart
10
+ declare type Thresholds = { good: number; warn: number; bad: number };
11
+ declare type GaugeProps = {
12
+ value: number;
13
+ min?: number;
14
+ max?: number;
15
+ label?: string;
16
+ decimals?: number;
17
+ thresholds?: Thresholds;
18
+ };
19
+ declare function Gauge(props: GaugeProps): JSX.Element;
20
+ declare function GaugeCard(props: {
21
+ title: string;
22
+ value: number;
23
+ min?: number;
24
+ max?: number;
25
+ thresholds?: Thresholds;
26
+ suffix?: string;
27
+ }): JSX.Element;
28
+
29
+ // Time series chart
30
+ declare type Point = { t: number | string; y: number };
31
+ declare type Series = { name: string; data: Point[] };
32
+ declare function SeriesCard(props: {
33
+ title: string;
34
+ series: Series[];
35
+ yLabel?: string;
36
+ }): JSX.Element;
37
+
38
+ // Vector table
39
+ declare type PromVectorResult = {
40
+ status: string;
41
+ data: {
42
+ resultType: "vector";
43
+ result: Array<{ metric: Record<string, string>; value: [number, string] }>;
44
+ }
45
+ };
46
+ declare function VectorTable(props: {
47
+ vector: PromVectorResult;
48
+ title?: string;
49
+ }): JSX.Element;
50
+
51
+ // Demo
52
+ declare function ChartsDemo(): JSX.Element;
53
+
54
+ export { Card, CardContent, CardHeader, CardTitle, ChartsDemo, Gauge, GaugeCard, type GaugeProps, type Point, type PromVectorResult, type Series, SeriesCard, type Thresholds, VectorTable };
@@ -0,0 +1,54 @@
1
+ import React from 'react';
2
+
3
+ // Card primitives
4
+ declare function Card(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
5
+ declare function CardHeader(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
6
+ declare function CardTitle(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
7
+ declare function CardContent(props: React.PropsWithChildren<{ className?: string }>): JSX.Element;
8
+
9
+ // Gauge chart
10
+ declare type Thresholds = { good: number; warn: number; bad: number };
11
+ declare type GaugeProps = {
12
+ value: number;
13
+ min?: number;
14
+ max?: number;
15
+ label?: string;
16
+ decimals?: number;
17
+ thresholds?: Thresholds;
18
+ };
19
+ declare function Gauge(props: GaugeProps): JSX.Element;
20
+ declare function GaugeCard(props: {
21
+ title: string;
22
+ value: number;
23
+ min?: number;
24
+ max?: number;
25
+ thresholds?: Thresholds;
26
+ suffix?: string;
27
+ }): JSX.Element;
28
+
29
+ // Time series chart
30
+ declare type Point = { t: number | string; y: number };
31
+ declare type Series = { name: string; data: Point[] };
32
+ declare function SeriesCard(props: {
33
+ title: string;
34
+ series: Series[];
35
+ yLabel?: string;
36
+ }): JSX.Element;
37
+
38
+ // Vector table
39
+ declare type PromVectorResult = {
40
+ status: string;
41
+ data: {
42
+ resultType: "vector";
43
+ result: Array<{ metric: Record<string, string>; value: [number, string] }>;
44
+ }
45
+ };
46
+ declare function VectorTable(props: {
47
+ vector: PromVectorResult;
48
+ title?: string;
49
+ }): JSX.Element;
50
+
51
+ // Demo
52
+ declare function ChartsDemo(): JSX.Element;
53
+
54
+ export { Card, CardContent, CardHeader, CardTitle, ChartsDemo, Gauge, GaugeCard, type GaugeProps, type Point, type PromVectorResult, type Series, SeriesCard, type Thresholds, VectorTable };
package/package.json CHANGED
@@ -3,13 +3,14 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.0.1",
6
+ "version": "0.0.2",
7
7
  "description": "Chart components for Calimero design system",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
11
11
  "exports": {
12
12
  ".": {
13
+ "types": "./dist/index.d.ts",
13
14
  "import": "./dist/index.js",
14
15
  "require": "./dist/index.cjs"
15
16
  }
@@ -20,7 +21,7 @@
20
21
  "dependencies": {
21
22
  "react": "^19.0.0",
22
23
  "recharts": "^2.8.0",
23
- "@calimero-network/mero-ui": "0.0.1"
24
+ "@calimero-network/mero-ui": "0.0.2"
24
25
  },
25
26
  "devDependencies": {
26
27
  "@types/react": "^19.0.0",