@semcore/mini-chart 16.2.0-prerelease.1 → 16.2.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/lib/cjs/component/score/Donut.js +11 -11
- package/lib/cjs/component/score/Donut.js.map +1 -1
- package/lib/cjs/component/score/Line.js +25 -25
- package/lib/cjs/component/score/Line.js.map +1 -1
- package/lib/cjs/component/score/Line.types.js.map +1 -1
- package/lib/cjs/component/trend/Bar.js +10 -10
- package/lib/cjs/component/trend/Bar.js.map +1 -1
- package/lib/cjs/component/trend/Line.js +9 -9
- package/lib/cjs/component/trend/Line.js.map +1 -1
- package/lib/cjs/component/trend/Trend.js.map +1 -1
- package/lib/es6/component/score/Donut.js +11 -12
- package/lib/es6/component/score/Donut.js.map +1 -1
- package/lib/es6/component/score/Line.js +19 -19
- package/lib/es6/component/score/Line.js.map +1 -1
- package/lib/es6/component/score/Line.types.js.map +1 -1
- package/lib/es6/component/trend/Bar.js +9 -9
- package/lib/es6/component/trend/Bar.js.map +1 -1
- package/lib/es6/component/trend/Line.js +8 -8
- package/lib/es6/component/trend/Line.js.map +1 -1
- package/lib/es6/component/trend/Trend.js.map +1 -1
- package/lib/esm/component/score/Donut.mjs +12 -12
- package/lib/esm/component/score/Line.mjs +21 -21
- package/lib/esm/component/score/index.mjs +7 -0
- package/lib/esm/component/trend/Bar.mjs +11 -11
- package/lib/esm/component/trend/Line.mjs +10 -10
- package/lib/esm/component/trend/index.mjs +8 -0
- package/lib/esm/index.mjs +3 -1
- package/lib/types/component/score/Donut.d.ts +7 -12
- package/lib/types/component/score/Line.types.d.ts +8 -6
- package/lib/types/component/trend/Bar.d.ts +2 -8
- package/lib/types/component/trend/Line.d.ts +6 -10
- package/lib/types/component/trend/Trend.d.ts +3 -3
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BoxProps, Box } from '@semcore/base-components';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
2
3
|
import type resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
3
|
-
import type { BoxProps, Box } from '@semcore/flex-box';
|
|
4
4
|
import type React from 'react';
|
|
5
5
|
import type { CommonScoreProps } from './Score';
|
|
6
6
|
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
@@ -39,10 +39,12 @@ type CustomRenderScoreProps = {
|
|
|
39
39
|
children: SegmentComponent[];
|
|
40
40
|
};
|
|
41
41
|
export type ScoreLineGaugeProps = BoxProps & Intergalactic.InternalTypings.EfficientOmit<CommonScoreProps, 'value' | 'color'> & (ValuedScoreProps | CustomRenderScoreProps);
|
|
42
|
-
export type Enhances =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
export type Enhances = [
|
|
43
|
+
() => {
|
|
44
|
+
resolveColor: ReturnType<typeof resolveColorEnhance>;
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
export type ScoreLineComponent = Intergalactic.Component<'svg', ScoreLineGaugeProps, {}, Enhances> & {
|
|
46
48
|
Segment: Intergalactic.Component<typeof Box, SegmentProps>;
|
|
47
49
|
};
|
|
48
50
|
export {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { type ComponentType } from '@semcore/core';
|
|
2
|
-
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
3
1
|
import { type CommonTrendProps } from './Trend';
|
|
4
2
|
type BarItem = {
|
|
5
3
|
/**
|
|
@@ -17,10 +15,6 @@ export type TrendBarProps = CommonTrendProps & {
|
|
|
17
15
|
*/
|
|
18
16
|
data: BarItem[];
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
isHistogram?: true;
|
|
23
|
-
};
|
|
24
|
-
export declare const TrendBar: ComponentType<TrendBarProps, {}, {}, Enhances>;
|
|
25
|
-
export declare const TrendHistogram: ComponentType<TrendBarProps, {}, {}, Enhances>;
|
|
18
|
+
export declare const TrendBar: import("@semcore/core").Intergalactic.Component<"svg", TrendBarProps, {}, readonly [(props: any) => any]>;
|
|
19
|
+
export declare const TrendHistogram: import("@semcore/core").Intergalactic.Component<"svg", TrendBarProps, {}, readonly [(props: any) => any]>;
|
|
26
20
|
export {};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { type ComponentType } from '@semcore/core';
|
|
2
|
-
import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
|
|
3
1
|
import { type CommonTrendProps } from './Trend';
|
|
4
2
|
export type TrendLineProps = CommonTrendProps & {
|
|
5
3
|
/**
|
|
@@ -19,11 +17,9 @@ export type TrendLineProps = CommonTrendProps & {
|
|
|
19
17
|
*/
|
|
20
18
|
lastPointRadius?: number;
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
uid:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const TrendArea: ComponentType<TrendLineProps, {}, {}, Enhances>;
|
|
29
|
-
export {};
|
|
20
|
+
export declare const TrendLine: import("@semcore/core").Intergalactic.Component<"svg", TrendLineProps, {}, readonly [(props: any) => any, (props: any) => {
|
|
21
|
+
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
22
|
+
}]>;
|
|
23
|
+
export declare const TrendArea: import("@semcore/core").Intergalactic.Component<"svg", TrendLineProps, {}, readonly [(props: any) => any, (props: any) => {
|
|
24
|
+
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
25
|
+
}]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { BoxProps } from '@semcore/base-components';
|
|
1
2
|
import { Component } from '@semcore/core';
|
|
2
|
-
import type { BoxProps } from '@semcore/flex-box';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
export type CommonTrendProps = BoxProps & {
|
|
5
5
|
/**
|
|
@@ -17,10 +17,10 @@ export type CommonTrendProps = BoxProps & {
|
|
|
17
17
|
*/
|
|
18
18
|
data: any[];
|
|
19
19
|
};
|
|
20
|
-
export declare abstract class Trend<P extends CommonTrendProps, E extends readonly ((...args: any[]) => any)[]> extends Component<P, {}
|
|
20
|
+
export declare abstract class Trend<P extends CommonTrendProps, E extends readonly ((...args: any[]) => any)[]> extends Component<P, E, Readonly<{}>, {
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
23
|
-
}
|
|
23
|
+
}> {
|
|
24
24
|
state: {
|
|
25
25
|
width: number;
|
|
26
26
|
height: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/mini-chart",
|
|
3
3
|
"description": "Semrush MiniChart Component",
|
|
4
|
-
"version": "16.2.0
|
|
4
|
+
"version": "16.2.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@semcore/base-components": "^16.6.0
|
|
18
|
-
"@semcore/flex-box": "^16.1.0
|
|
17
|
+
"@semcore/base-components": "^16.6.0",
|
|
18
|
+
"@semcore/flex-box": "^16.1.0"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"directory": "semcore/mini-chart"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@semcore/core": "16.6.0
|
|
26
|
+
"@semcore/core": "16.6.0",
|
|
27
27
|
"@semcore/testing-utils": "1.0.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|