@moderneinc/react-charts 1.2.0-next.c015c0 → 1.2.0-next.c03472

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.
Files changed (46) hide show
  1. package/dist/components/chrono-chart/chrono-chart.component.d.ts +10 -0
  2. package/dist/components/chrono-chart/chrono-chart.types.d.ts +129 -0
  3. package/dist/components/chrono-chart/components/category-table.component.d.ts +13 -0
  4. package/dist/components/chrono-chart/components/category-table.types.d.ts +42 -0
  5. package/dist/components/chrono-chart/utils/data-transformer.d.ts +41 -0
  6. package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.component.d.ts +7 -0
  7. package/dist/components/d3-stacked-area-chart/d3-stacked-area-chart.types.d.ts +95 -0
  8. package/dist/components/d3-stacked-area-chart/hooks/use-d3-stacked-area.hook.d.ts +35 -0
  9. package/dist/components/morph-chart/hooks/shared/computations.d.ts +29 -0
  10. package/dist/components/morph-chart/hooks/shared/types.d.ts +24 -0
  11. package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +90 -0
  12. package/dist/components/morph-chart/index.d.ts +2 -0
  13. package/dist/components/morph-chart/morph-chart.component.d.ts +14 -0
  14. package/dist/components/morph-chart/morph-chart.types.d.ts +175 -0
  15. package/dist/components/morph-chart/utils/accordion-generator.d.ts +102 -0
  16. package/dist/components/morph-chart/utils/animation-constants.d.ts +23 -0
  17. package/dist/components/morph-chart/utils/animation-utils.d.ts +44 -0
  18. package/dist/components/morph-chart/utils/arc-path-calculator.d.ts +53 -0
  19. package/dist/components/morph-chart/utils/area-renderer.d.ts +24 -0
  20. package/dist/components/morph-chart/utils/bar-renderer.d.ts +19 -0
  21. package/dist/components/morph-chart/utils/gsap-orchestrator.d.ts +291 -0
  22. package/dist/components/morph-chart/utils/morph-interpolator.d.ts +96 -0
  23. package/dist/components/morph-chart/utils/parliament-renderer.d.ts +23 -0
  24. package/dist/components/morph-chart/utils/parliament-seat-extractor.d.ts +33 -0
  25. package/dist/components/morph-chart/utils/position-mapper.d.ts +48 -0
  26. package/dist/components/morph-chart/utils/segment-transformer.d.ts +70 -0
  27. package/dist/components/morph-chart/utils/slinky-3d-generator.d.ts +35 -0
  28. package/dist/components/morph-chart/utils/svg-patterns.d.ts +19 -0
  29. package/dist/components/morph-chart/utils/svg-slinky-generator.d.ts +25 -0
  30. package/dist/components/parliament-chart/hooks/use-parliament-chart.hook.d.ts +5 -1
  31. package/dist/components/parliament-chart/parliament-chart.types.d.ts +5 -0
  32. package/dist/components/parliament-chart/utils/parliament-animation.d.ts +13 -0
  33. package/dist/components/stacked-area-chart/stacked-area-chart.types.d.ts +23 -0
  34. package/dist/components/stacked-area-chart/utils/color.utils.d.ts +0 -5
  35. package/dist/components/stacked-area-with-timeline/hooks/use-stacked-area-with-timeline.hook.d.ts +52 -0
  36. package/dist/components/stacked-area-with-timeline/index.d.ts +4 -0
  37. package/dist/components/stacked-area-with-timeline/stacked-area-with-timeline.component.d.ts +3 -0
  38. package/dist/components/stacked-area-with-timeline/stacked-area-with-timeline.types.d.ts +97 -0
  39. package/dist/components/stacked-area-with-timeline/utils/render-timeline-track.d.ts +54 -0
  40. package/dist/components/timeline-chart/timeline-chart.types.d.ts +44 -0
  41. package/dist/index.cjs +109 -71
  42. package/dist/index.d.ts +9 -0
  43. package/dist/index.js +24923 -16477
  44. package/dist/theme/default-colors.d.ts +0 -4
  45. package/dist/theme/timeline-defaults.d.ts +33 -1
  46. package/package.json +30 -10
@@ -32,7 +32,3 @@ export type ParliamentChartColors = typeof DEFAULT_CHART_COLORS;
32
32
  export interface ParliamentChartTheme {
33
33
  colors?: Partial<ParliamentChartColors>;
34
34
  }
35
- /**
36
- * Merges custom theme colors with default colors
37
- */
38
- export declare function mergeThemeColors(customColors?: Partial<ParliamentChartColors>): ParliamentChartColors;
@@ -4,7 +4,7 @@ export declare const TIMELINE_DEFAULTS: {
4
4
  readonly primary: "#992FB9";
5
5
  readonly background: "#FFFFFF";
6
6
  readonly border: "#9CA3AF";
7
- readonly highlightBackground: "rgba(229, 231, 235, 0.5)";
7
+ readonly highlightBackground: "rgba(31, 41, 55, 0.14)";
8
8
  readonly monthLabel: "#9ca3af";
9
9
  readonly tooltipText: "#6b7280";
10
10
  };
@@ -13,6 +13,17 @@ export declare const TIMELINE_DEFAULTS: {
13
13
  readonly eventWidth: 2;
14
14
  };
15
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
+ };
16
27
  export declare const defaultSlotProps: {
17
28
  header: {
18
29
  sx: SxProps<Theme>;
@@ -38,6 +49,8 @@ export declare const defaultSlotProps: {
38
49
  selection: {
39
50
  sx: SxProps<Theme>;
40
51
  };
52
+ startHandle: {};
53
+ endHandle: {};
41
54
  tooltip: {
42
55
  sx: SxProps<Theme>;
43
56
  };
@@ -48,3 +61,22 @@ export declare const defaultSlotProps: {
48
61
  sx: SxProps<Theme>;
49
62
  };
50
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.2.0-next.c015c0",
3
+ "version": "1.2.0-next.c03472",
4
4
  "description": "Parliament chart visualization library for React",
5
5
  "type": "module",
6
6
  "devEngines": {
@@ -24,23 +24,25 @@
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
- "check:all": "npm run format && npm run check:lint:fix && npm run check:lint && npm run check:types && npm run test",
34
- "check:lint:fix": "npm run check:biome:fix",
35
- "check:lint": "npm run check:biome",
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
42
  "release": "semantic-release",
43
+ "storybook": "storybook dev -p 6006",
44
+ "test:ui": "vitest --ui",
45
+ "test": "vitest",
44
46
  "update:nvmrc": "jq -r '.devEngines.runtime.version' package.json > .nvmrc"
45
47
  },
46
48
  "peerDependencies": {
@@ -53,6 +55,15 @@
53
55
  "recharts": ">=2.0.0"
54
56
  },
55
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",
56
67
  "hast-util-to-html": "^9.0.5",
57
68
  "hastscript": "^9.0.1",
58
69
  "sainte-lague": "^3.0.0"
@@ -74,6 +85,13 @@
74
85
  "@storybook/react": "^8.4.7",
75
86
  "@storybook/react-vite": "^8.4.7",
76
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",
77
95
  "@types/react": "^18.3.0",
78
96
  "@types/react-dom": "^18.3.0",
79
97
  "@typescript-eslint/eslint-plugin": "^8.44.0",
@@ -85,10 +103,12 @@
85
103
  "eslint-plugin-react-refresh": "^0.4.16",
86
104
  "eslint-plugin-storybook": "^0.11.1",
87
105
  "jsdom": "^27.0.0",
106
+ "knip": "^5.66.4",
107
+ "playwright": "^1.56.1",
88
108
  "react": "^19.1.1",
89
109
  "react-dom": "^19.1.1",
90
110
  "recharts": "^2.15.0",
91
- "semantic-release": "^24.2.0",
111
+ "semantic-release": "^25.0.2",
92
112
  "storybook": "^8.4.7",
93
113
  "typescript": "^5.9.2",
94
114
  "vite": "^6.0.11",