vccs 0.3.0 → 0.4.1
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/README.md +4 -0
- package/dist/cartesian/axis/XAxis.d.ts +3 -3
- package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +5 -5
- package/dist/chart/RechartsWrapper.d.ts +3 -3
- package/dist/chart/Sankey.d.ts +327 -0
- package/dist/chart/SunburstChart.d.ts +249 -0
- package/dist/chart/generateCategoricalChart.d.ts +2 -2
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/sankeyUtils.d.ts +36 -0
- package/dist/chart/sunburstUtils.d.ts +34 -0
- package/dist/components/Text.d.ts +16 -1
- package/dist/components/Tooltip.d.ts +46 -2
- package/dist/es/cartesian/axis/XAxis.mjs +2 -2
- package/dist/es/cartesian/axis/YAxis.mjs +1 -1
- package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +2 -3
- package/dist/es/cartesian/cartesian-grid/const.mjs +6 -0
- package/dist/es/cartesian/utils/get-ticks.mjs +3 -2
- package/dist/es/chart/RechartsWrapper.mjs +8 -5
- package/dist/es/chart/Sankey.mjs +332 -0
- package/dist/es/chart/SunburstChart.mjs +229 -0
- package/dist/es/chart/generateCategoricalChart.mjs +5 -1
- package/dist/es/chart/sankeyUtils.mjs +28 -0
- package/dist/es/chart/sunburstUtils.mjs +67 -0
- package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +3 -3
- package/dist/es/components/Tooltip.mjs +29 -13
- package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +15 -2
- package/dist/es/index.mjs +5 -2
- package/dist/es/polar/pie/Pie.mjs +1 -1
- package/dist/es/polar/pie/type.mjs +7 -0
- package/dist/es/polar/radar/Radar.mjs +9 -1
- package/dist/es/polar/radial-bar/RadialBar.mjs +1 -0
- package/dist/es/polar/radial-bar/type.mjs +7 -0
- package/dist/es/utils/Global.mjs +18 -0
- package/dist/es/utils/attrs.mjs +2 -2
- package/dist/es/utils/validate.mjs +1 -2
- package/dist/hooks/publicHooks.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/polar/pie/type.d.ts +8 -0
- package/dist/polar/radar/Radar.d.ts +16 -0
- package/dist/polar/radial-bar/type.d.ts +8 -0
- package/dist/state/selectors/combiners/combineActiveLabel.d.ts +1 -1
- package/dist/state/selectors/selectors.d.ts +1 -1
- package/dist/state/selectors/tooltipSelectors.d.ts +1 -1
- package/dist/types/common.d.ts +1 -1
- package/dist/utils/Global.d.ts +9 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/validate.d.ts +0 -1
- package/package.json +3 -1
|
@@ -28,7 +28,6 @@ function isVisible(sign, tickPosition, getSize, start, end) {
|
|
|
28
28
|
const size = getSize();
|
|
29
29
|
return sign * (tickPosition - sign * size / 2 - start) >= 0 && sign * (tickPosition + sign * size / 2 - end) <= 0;
|
|
30
30
|
}
|
|
31
|
-
var isSsr = typeof window === "undefined";
|
|
32
31
|
/**
|
|
33
32
|
* Checks if the value is null or undefined
|
|
34
33
|
* @param {any} value The value to check
|
|
@@ -39,4 +38,4 @@ function isNullish(value) {
|
|
|
39
38
|
}
|
|
40
39
|
var isNumOrStr = (value) => isNumber(value) || typeof value === "string";
|
|
41
40
|
//#endregion
|
|
42
|
-
export { isCategoricalAxis, isNan, isNullish, isNumOrStr, isNumber, isPercent,
|
|
41
|
+
export { isCategoricalAxis, isNan, isNullish, isNumOrStr, isNumber, isPercent, isVisible, isWellBehavedNumber, validateWidthHeight };
|
|
@@ -33,7 +33,7 @@ export declare function useActiveTooltipCoordinate(): Readonly<import('vue').Sha
|
|
|
33
33
|
*
|
|
34
34
|
* @returns A reactive string label or undefined when no tooltip is active
|
|
35
35
|
*/
|
|
36
|
-
export declare function useActiveTooltipLabel(): Readonly<import('vue').ShallowRef<string>>;
|
|
36
|
+
export declare function useActiveTooltipLabel(): Readonly<import('vue').ShallowRef<string | number>>;
|
|
37
37
|
/**
|
|
38
38
|
* Returns the plot area rectangle { x, y, width, height }.
|
|
39
39
|
* This is the area inside all axes, legend, and brush — where graphical items render.
|
package/dist/index.d.ts
CHANGED
package/dist/polar/pie/type.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnimationOptions } from 'motion-v';
|
|
2
3
|
import { DataKey, VuePropsToType, WithSVGProps } from '../../types';
|
|
3
4
|
import { LegendType } from '../../types/legend';
|
|
4
5
|
import { TooltipType } from '../../types/tooltip';
|
|
@@ -75,6 +76,13 @@ export declare const PieVueProps: {
|
|
|
75
76
|
type: BooleanConstructor;
|
|
76
77
|
default: boolean;
|
|
77
78
|
};
|
|
79
|
+
transition: {
|
|
80
|
+
type: PropType<AnimationOptions>;
|
|
81
|
+
default: () => {
|
|
82
|
+
duration: number;
|
|
83
|
+
ease: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
78
86
|
label: {
|
|
79
87
|
type: BooleanConstructor;
|
|
80
88
|
default: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnimationOptions } from 'motion-v';
|
|
2
3
|
import { DataKey } from '../../types';
|
|
3
4
|
import { LegendType } from '../../types/legend';
|
|
4
5
|
import { TooltipType } from '../../types/tooltip';
|
|
@@ -67,6 +68,13 @@ export declare const Radar: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
67
68
|
type: BooleanConstructor;
|
|
68
69
|
default: boolean;
|
|
69
70
|
};
|
|
71
|
+
transition: {
|
|
72
|
+
type: PropType<AnimationOptions>;
|
|
73
|
+
default: () => {
|
|
74
|
+
duration: number;
|
|
75
|
+
ease: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
70
78
|
activeDot: {
|
|
71
79
|
type: PropType<object | boolean>;
|
|
72
80
|
default: boolean;
|
|
@@ -136,6 +144,13 @@ export declare const Radar: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
136
144
|
type: BooleanConstructor;
|
|
137
145
|
default: boolean;
|
|
138
146
|
};
|
|
147
|
+
transition: {
|
|
148
|
+
type: PropType<AnimationOptions>;
|
|
149
|
+
default: () => {
|
|
150
|
+
duration: number;
|
|
151
|
+
ease: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
139
154
|
activeDot: {
|
|
140
155
|
type: PropType<object | boolean>;
|
|
141
156
|
default: boolean;
|
|
@@ -146,6 +161,7 @@ export declare const Radar: import('vue').DefineComponent<import('vue').ExtractP
|
|
|
146
161
|
stroke: string;
|
|
147
162
|
strokeDasharray: string;
|
|
148
163
|
strokeWidth: number;
|
|
164
|
+
transition: AnimationOptions;
|
|
149
165
|
name: string;
|
|
150
166
|
label: boolean | Record<string, any>;
|
|
151
167
|
connectNulls: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { AnimationOptions } from 'motion-v';
|
|
2
3
|
import { DataKey, VuePropsToType, WithSVGProps } from '../../types';
|
|
3
4
|
import { LegendType } from '../../types/legend';
|
|
4
5
|
import { TooltipType } from '../../types/tooltip';
|
|
@@ -64,6 +65,13 @@ export declare const RadialBarVueProps: {
|
|
|
64
65
|
type: BooleanConstructor;
|
|
65
66
|
default: boolean;
|
|
66
67
|
};
|
|
68
|
+
transition: {
|
|
69
|
+
type: PropType<AnimationOptions>;
|
|
70
|
+
default: () => {
|
|
71
|
+
duration: number;
|
|
72
|
+
ease: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
67
75
|
minPointSize: {
|
|
68
76
|
type: NumberConstructor;
|
|
69
77
|
default: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { TooltipIndex } from '../../tooltipSlice';
|
|
2
2
|
import { TickItem } from '../../../types';
|
|
3
|
-
export declare function combineActiveLabel(tooltipTicks: ReadonlyArray<TickItem>, activeIndex: TooltipIndex): string | undefined;
|
|
3
|
+
export declare function combineActiveLabel(tooltipTicks: ReadonlyArray<TickItem>, activeIndex: TooltipIndex): string | number | undefined;
|
|
@@ -175,7 +175,7 @@ export declare function selectTooltipDataKey(state: RechartsRootState, tooltipEv
|
|
|
175
175
|
export declare const selectTooltipPayloadConfigurations: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => ReadonlyArray<TooltipPayloadConfiguration>;
|
|
176
176
|
export declare const selectCoordinateForDefaultIndex: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => Coordinate | undefined;
|
|
177
177
|
export declare const selectActiveCoordinate: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => Coordinate | undefined;
|
|
178
|
-
export declare const selectActiveLabel: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => string | undefined;
|
|
178
|
+
export declare const selectActiveLabel: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => string | number | undefined;
|
|
179
179
|
export declare const selectTooltipPayload: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => TooltipPayload | undefined;
|
|
180
180
|
export declare const selectIsTooltipActive: (state: RechartsRootState, tooltipEventType: TooltipEventType, trigger: TooltipTrigger, defaultIndex: TooltipIndex | undefined) => {
|
|
181
181
|
isActive: boolean;
|
|
@@ -518,7 +518,7 @@ export declare const selectTooltipAxisTicks: ((state: {
|
|
|
518
518
|
memoize: typeof import('@reduxjs/toolkit').weakMapMemoize;
|
|
519
519
|
};
|
|
520
520
|
export declare const selectActiveTooltipIndex: (state: RechartsRootState) => TooltipIndex | null;
|
|
521
|
-
export declare const selectActiveLabel: (state: RechartsRootState) => string | undefined;
|
|
521
|
+
export declare const selectActiveLabel: (state: RechartsRootState) => string | number | undefined;
|
|
522
522
|
export declare const selectActiveTooltipDataKey: (state: RechartsRootState) => DataKey<any> | undefined;
|
|
523
523
|
export declare const selectActiveTooltipCoordinate: (state: RechartsRootState) => Coordinate | undefined;
|
|
524
524
|
export declare const selectIsTooltipActive: (state: RechartsRootState) => boolean;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export type MouseHandlerDataParam = {
|
|
|
49
49
|
* Exactly the same as activeTooltipIndex - this was also duplicated in recharts@2 so let's keep both properties for better backwards compatibility.
|
|
50
50
|
*/
|
|
51
51
|
activeIndex: number | TooltipIndex | undefined;
|
|
52
|
-
activeLabel: string | undefined;
|
|
52
|
+
activeLabel: string | number | undefined;
|
|
53
53
|
activeDataKey: DataKey<any> | undefined;
|
|
54
54
|
activeCoordinate: Coordinate | undefined;
|
|
55
55
|
};
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/validate.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ export declare function isWellBehavedNumber(n: unknown): n is number;
|
|
|
15
15
|
export declare function isPercent(value: string | number): value is `${number}%`;
|
|
16
16
|
export declare function isCategoricalAxis(layout: LayoutType, axisType: AxisType): boolean;
|
|
17
17
|
export declare function isVisible(sign: number, tickPosition: number, getSize: () => number, start: number, end: number): boolean;
|
|
18
|
-
export declare const isSsr: boolean;
|
|
19
18
|
/**
|
|
20
19
|
* Checks if the value is null or undefined
|
|
21
20
|
* @param {any} value The value to check
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vccs",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"description": "Composable charting components for Vue 3 — an unofficial port of Recharts",
|
|
6
6
|
"author": "rick-hup",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"@reduxjs/vue-redux": "^1.0.1",
|
|
49
49
|
"@vueuse/core": "^13.1.0",
|
|
50
50
|
"d3-hierarchy": "^3.1.2",
|
|
51
|
+
"d3-sankey": "^0.12.3",
|
|
51
52
|
"decimal.js-light": "^2.5.1",
|
|
52
53
|
"es-toolkit": "^1.39.3",
|
|
53
54
|
"eventemitter3": "^5.0.1",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"victory-vendor": "^37.3.6"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
60
|
+
"@types/d3-sankey": "^0.12.5",
|
|
59
61
|
"@types/lodash-es": "^4.17.12",
|
|
60
62
|
"@vitejs/plugin-vue-jsx": "^5.0.0",
|
|
61
63
|
"@vue/babel-plugin-jsx": "^1.1.1",
|