@moderneinc/react-charts 1.1.0-next.dcefa6 → 1.2.0-next.27c469
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/components/chrono-chart/chrono-chart.component.d.ts +10 -0
- package/dist/components/chrono-chart/chrono-chart.types.d.ts +112 -0
- package/dist/components/chrono-chart/components/category-table.component.d.ts +13 -0
- package/dist/components/chrono-chart/components/category-table.types.d.ts +42 -0
- package/dist/components/chrono-chart/utils/data-transformer.d.ts +41 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.component.d.ts +7 -0
- package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.types.d.ts +89 -0
- package/dist/components/d3-stacked-area-chart/hooks/use-d3-stacked-area.hook.d.ts +34 -0
- package/dist/components/morph-chart/hooks/shared/computations.d.ts +29 -0
- package/dist/components/morph-chart/hooks/shared/types.d.ts +24 -0
- package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +87 -0
- package/dist/components/morph-chart/index.d.ts +2 -0
- package/dist/components/morph-chart/morph-chart.component.d.ts +14 -0
- package/dist/components/morph-chart/morph-chart.types.d.ts +158 -0
- package/dist/components/morph-chart/utils/accordion-generator.d.ts +102 -0
- package/dist/components/morph-chart/utils/animation-constants.d.ts +23 -0
- package/dist/components/morph-chart/utils/animation-utils.d.ts +44 -0
- package/dist/components/morph-chart/utils/arc-path-calculator.d.ts +53 -0
- package/dist/components/morph-chart/utils/area-renderer.d.ts +24 -0
- package/dist/components/morph-chart/utils/bar-renderer.d.ts +19 -0
- package/dist/components/morph-chart/utils/gsap-orchestrator.d.ts +291 -0
- package/dist/components/morph-chart/utils/morph-interpolator.d.ts +96 -0
- package/dist/components/morph-chart/utils/parliament-renderer.d.ts +23 -0
- package/dist/components/morph-chart/utils/parliament-seat-extractor.d.ts +33 -0
- package/dist/components/morph-chart/utils/position-mapper.d.ts +48 -0
- package/dist/components/morph-chart/utils/segment-transformer.d.ts +70 -0
- package/dist/components/morph-chart/utils/slinky-3d-generator.d.ts +35 -0
- package/dist/components/morph-chart/utils/svg-patterns.d.ts +19 -0
- package/dist/components/morph-chart/utils/svg-slinky-generator.d.ts +25 -0
- package/dist/components/parliament-chart/hooks/{use-parliament-chart.d.ts → use-parliament-chart.hook.d.ts} +5 -1
- package/dist/components/parliament-chart/parliament-chart.types.d.ts +5 -0
- package/dist/components/parliament-chart/utils/parliament-animation.d.ts +13 -0
- package/dist/components/stacked-area-chart/hooks/use-stacked-area-chart.hook.d.ts +6 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.component.d.ts +10 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.constants.d.ts +115 -0
- package/dist/components/stacked-area-chart/stacked-area-chart.types.d.ts +186 -0
- package/dist/components/stacked-area-chart/utils/color.utils.d.ts +4 -0
- package/dist/components/timeline-chart/hooks/use-timeline-chart.hook.d.ts +2 -0
- package/dist/components/timeline-chart/timeline-chart.component.d.ts +9 -0
- package/dist/components/timeline-chart/timeline-chart.types.d.ts +156 -0
- package/dist/components/timeline-chart/timeline-selected-events.component.d.ts +9 -0
- package/dist/index.cjs +144 -11
- package/dist/index.d.ts +19 -6
- package/dist/index.js +31142 -4853
- package/dist/theme/default-colors.d.ts +8 -4
- package/dist/theme/timeline-defaults.d.ts +82 -0
- package/package.json +34 -11
- /package/dist/components/parliament-chart/{parliament-chart.d.ts → parliament-chart.component.d.ts} +0 -0
|
@@ -13,6 +13,14 @@ export declare const DEFAULT_CHART_COLORS: {
|
|
|
13
13
|
readonly 600: "#40c048";
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Measure gradient colors used for progress/distance categories
|
|
18
|
+
* Shared between ParliamentChart and StackedAreaChart for visual consistency
|
|
19
|
+
*
|
|
20
|
+
* Color progression: Green (best/complete) → Red (worst/farthest)
|
|
21
|
+
* Used for categories like: Complete, Closest, Close, Far, Farthest
|
|
22
|
+
*/
|
|
23
|
+
export declare const MEASURE_GRADIENT_COLORS: readonly ["#4CA75A", "#FDDA04", "#FFC008", "#FF9800", "#F9A91B", "#FF5C24", "#ED4134", "#CB3446"];
|
|
16
24
|
/**
|
|
17
25
|
* Color configuration type for parliament chart theming
|
|
18
26
|
*/
|
|
@@ -24,7 +32,3 @@ export type ParliamentChartColors = typeof DEFAULT_CHART_COLORS;
|
|
|
24
32
|
export interface ParliamentChartTheme {
|
|
25
33
|
colors?: Partial<ParliamentChartColors>;
|
|
26
34
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Merges custom theme colors with default colors
|
|
29
|
-
*/
|
|
30
|
-
export declare function mergeThemeColors(customColors?: Partial<ParliamentChartColors>): ParliamentChartColors;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material';
|
|
2
|
+
export declare const TIMELINE_DEFAULTS: {
|
|
3
|
+
readonly colors: {
|
|
4
|
+
readonly primary: "#992FB9";
|
|
5
|
+
readonly background: "#FFFFFF";
|
|
6
|
+
readonly border: "#9CA3AF";
|
|
7
|
+
readonly highlightBackground: "rgba(31, 41, 55, 0.14)";
|
|
8
|
+
readonly monthLabel: "#9ca3af";
|
|
9
|
+
readonly tooltipText: "#6b7280";
|
|
10
|
+
};
|
|
11
|
+
readonly dimensions: {
|
|
12
|
+
readonly height: 32;
|
|
13
|
+
readonly eventWidth: 2;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Get default slot props with arrow handle styling
|
|
18
|
+
*/
|
|
19
|
+
export declare const getArrowHandleSlotProps: (color?: string) => {
|
|
20
|
+
startHandle: {
|
|
21
|
+
sx: SxProps<Theme>;
|
|
22
|
+
};
|
|
23
|
+
endHandle: {
|
|
24
|
+
sx: SxProps<Theme>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const defaultSlotProps: {
|
|
28
|
+
header: {
|
|
29
|
+
sx: SxProps<Theme>;
|
|
30
|
+
};
|
|
31
|
+
title: {
|
|
32
|
+
sx: SxProps<Theme>;
|
|
33
|
+
};
|
|
34
|
+
instructions: {
|
|
35
|
+
sx: SxProps<Theme>;
|
|
36
|
+
};
|
|
37
|
+
monthLabelsContainer: {
|
|
38
|
+
sx: SxProps<Theme>;
|
|
39
|
+
};
|
|
40
|
+
monthLabel: {
|
|
41
|
+
sx: SxProps<Theme>;
|
|
42
|
+
};
|
|
43
|
+
timeline: {
|
|
44
|
+
sx: SxProps<Theme>;
|
|
45
|
+
};
|
|
46
|
+
event: {
|
|
47
|
+
sx: SxProps<Theme>;
|
|
48
|
+
};
|
|
49
|
+
selection: {
|
|
50
|
+
sx: SxProps<Theme>;
|
|
51
|
+
};
|
|
52
|
+
startHandle: {};
|
|
53
|
+
endHandle: {};
|
|
54
|
+
tooltip: {
|
|
55
|
+
sx: SxProps<Theme>;
|
|
56
|
+
};
|
|
57
|
+
tooltipEventName: {
|
|
58
|
+
sx: SxProps<Theme>;
|
|
59
|
+
};
|
|
60
|
+
tooltipDate: {
|
|
61
|
+
sx: SxProps<Theme>;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Get grip handle slot props with custom color
|
|
66
|
+
*/
|
|
67
|
+
export declare const getGripHandleSlotProps: (color?: string) => {
|
|
68
|
+
startHandle: {
|
|
69
|
+
sx: SxProps<Theme>;
|
|
70
|
+
};
|
|
71
|
+
endHandle: {
|
|
72
|
+
sx: SxProps<Theme>;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
export declare const gripHandleSlotProps: {
|
|
76
|
+
startHandle: {
|
|
77
|
+
sx: SxProps<Theme>;
|
|
78
|
+
};
|
|
79
|
+
endHandle: {
|
|
80
|
+
sx: SxProps<Theme>;
|
|
81
|
+
};
|
|
82
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moderneinc/react-charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-next.27c469",
|
|
4
4
|
"description": "Parliament chart visualization library for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devEngines": {
|
|
@@ -24,23 +24,26 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"dev": "vite",
|
|
28
|
-
"build": "tsc --noEmit && vite build",
|
|
29
|
-
"test": "vitest",
|
|
30
|
-
"test:ui": "vitest --ui",
|
|
31
|
-
"storybook": "storybook dev -p 6006",
|
|
32
27
|
"build-storybook": "storybook build",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"check:
|
|
28
|
+
"build": "tsc --noEmit && vite build",
|
|
29
|
+
"build:watch": "vite build --watch",
|
|
30
|
+
"check:all": "npm run format && npm run check:lint:fix && npm run check:lint && npm run check:types && npm run test && npm run check:unused",
|
|
36
31
|
"check:biome:fix": "biome check --write",
|
|
37
32
|
"check:biome": "biome check",
|
|
33
|
+
"check:lint:fix": "npm run check:biome:fix",
|
|
34
|
+
"check:lint": "npm run check:biome",
|
|
38
35
|
"check:types": "tsc --noEmit",
|
|
36
|
+
"check:unused": "knip",
|
|
37
|
+
"dev": "vite",
|
|
39
38
|
"format:check": "biome format .",
|
|
40
39
|
"format": "biome format --write .",
|
|
41
40
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
42
41
|
"preview": "vite preview",
|
|
43
|
-
"release": "semantic-release"
|
|
42
|
+
"release": "semantic-release",
|
|
43
|
+
"storybook": "storybook dev -p 6006",
|
|
44
|
+
"test:ui": "vitest --ui",
|
|
45
|
+
"test": "vitest",
|
|
46
|
+
"update:nvmrc": "jq -r '.devEngines.runtime.version' package.json > .nvmrc"
|
|
44
47
|
},
|
|
45
48
|
"peerDependencies": {
|
|
46
49
|
"@emotion/react": ">=11.0.0",
|
|
@@ -48,9 +51,19 @@
|
|
|
48
51
|
"@mui/icons-material": ">=7.0.0",
|
|
49
52
|
"@mui/material": ">=7.0.0",
|
|
50
53
|
"react": "^18.0.0 || ^19.0.0",
|
|
51
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
54
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
55
|
+
"recharts": ">=2.0.0"
|
|
52
56
|
},
|
|
53
57
|
"dependencies": {
|
|
58
|
+
"@dnd-kit/core": "^6.3.1",
|
|
59
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
60
|
+
"d3-array": "^3.2.4",
|
|
61
|
+
"d3-axis": "^3.0.0",
|
|
62
|
+
"d3-brush": "^3.0.0",
|
|
63
|
+
"d3-force": "^3.0.0",
|
|
64
|
+
"d3-selection": "^3.0.0",
|
|
65
|
+
"d3-transition": "^3.0.1",
|
|
66
|
+
"gsap": "^3.13.0",
|
|
54
67
|
"hast-util-to-html": "^9.0.5",
|
|
55
68
|
"hastscript": "^9.0.1",
|
|
56
69
|
"sainte-lague": "^3.0.0"
|
|
@@ -72,6 +85,13 @@
|
|
|
72
85
|
"@storybook/react": "^8.4.7",
|
|
73
86
|
"@storybook/react-vite": "^8.4.7",
|
|
74
87
|
"@storybook/test": "^8.4.7",
|
|
88
|
+
"@types/d3-array": "^3.2.2",
|
|
89
|
+
"@types/d3-axis": "^3.0.6",
|
|
90
|
+
"@types/d3-brush": "^3.0.6",
|
|
91
|
+
"@types/d3-scale": "^4.0.9",
|
|
92
|
+
"@types/d3-selection": "^3.0.11",
|
|
93
|
+
"@types/d3-shape": "^3.1.7",
|
|
94
|
+
"@types/d3-transition": "^3.0.9",
|
|
75
95
|
"@types/react": "^18.3.0",
|
|
76
96
|
"@types/react-dom": "^18.3.0",
|
|
77
97
|
"@typescript-eslint/eslint-plugin": "^8.44.0",
|
|
@@ -83,8 +103,11 @@
|
|
|
83
103
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
84
104
|
"eslint-plugin-storybook": "^0.11.1",
|
|
85
105
|
"jsdom": "^27.0.0",
|
|
106
|
+
"knip": "^5.66.4",
|
|
107
|
+
"playwright": "^1.56.1",
|
|
86
108
|
"react": "^19.1.1",
|
|
87
109
|
"react-dom": "^19.1.1",
|
|
110
|
+
"recharts": "^2.15.0",
|
|
88
111
|
"semantic-release": "^24.2.0",
|
|
89
112
|
"storybook": "^8.4.7",
|
|
90
113
|
"typescript": "^5.9.2",
|
/package/dist/components/parliament-chart/{parliament-chart.d.ts → parliament-chart.component.d.ts}
RENAMED
|
File without changes
|