@moderneinc/react-charts 1.5.2-next.35374b → 1.5.2-next.3ea731
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/parliament-chart/parliament-chart.constants.d.ts +17 -1
- package/dist/components/parliament-chart/utils/parliament-svg-enhanced.d.ts +5 -0
- package/dist/components/parliament-chart/utils/parliament-svg-patterns.d.ts +0 -18
- package/dist/index.cjs +12 -62
- package/dist/index.js +13559 -16757
- package/dist/theme/color-utils.d.ts +9 -0
- package/dist/theme/default-colors.d.ts +13 -5
- package/dist/theme/mono-font.d.ts +10 -0
- package/package.json +17 -18
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color helpers for deriving seat styling from a base fill color.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Border color for a seat fill: the prototype's hand-picked shade when the fill
|
|
6
|
+
* is a known palette color, otherwise a mathematical darken as a safe fallback
|
|
7
|
+
* (also returns the input unchanged for non-hex colors like `url(#pattern)`).
|
|
8
|
+
*/
|
|
9
|
+
export declare const getSeatBorder: (fill: string) => string;
|
|
@@ -14,13 +14,21 @@ export declare const DEFAULT_CHART_COLORS: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Measure gradient colors used for progress/distance categories
|
|
18
|
-
* Shared between ParliamentChart and StackedAreaChart for visual consistency
|
|
17
|
+
* Measure gradient colors used for progress/distance categories.
|
|
18
|
+
* Shared between ParliamentChart and StackedAreaChart for visual consistency.
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* Values measured from the Morpheus prototype (light theme):
|
|
21
|
+
* https://moderneinc.github.io/prototypes/morpheus.html
|
|
22
|
+
* Progression: green (best/complete) → red (worst/farthest).
|
|
22
23
|
*/
|
|
23
|
-
export declare const MEASURE_GRADIENT_COLORS: readonly ["#
|
|
24
|
+
export declare const MEASURE_GRADIENT_COLORS: readonly ["#30F284", "#FFD34D", "#FFA83D", "#FF8F52", "#FF6F61"];
|
|
25
|
+
/**
|
|
26
|
+
* Explicit border color for each seat fill, measured from the Morpheus
|
|
27
|
+
* prototype. Borders are hand-picked darker, more-saturated shades — not a
|
|
28
|
+
* uniform mathematical darken — so they are mapped rather than computed.
|
|
29
|
+
* Keys are upper-case hex; look up via `getSeatBorder` in `color-utils`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const SEAT_BORDER_COLORS: Record<string, string>;
|
|
24
32
|
/**
|
|
25
33
|
* Color configuration type for parliament chart theming
|
|
26
34
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Theme } from '@mui/material';
|
|
2
|
+
/**
|
|
3
|
+
* Mono family for tabular text, read from the host theme.
|
|
4
|
+
*
|
|
5
|
+
* No module augmentation for `fontFamilyMonospace`: declaring it optional here
|
|
6
|
+
* collides with moderne-ui, which declares it required (TS2687/TS2717).
|
|
7
|
+
* Narrowed rather than asserted because a non-string (a `next/font` handle
|
|
8
|
+
* passed whole) reaches `fontFamily` and MUI emits it as stray CSS props.
|
|
9
|
+
*/
|
|
10
|
+
export declare const monoFontFamily: (theme: Theme) => string;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moderneinc/react-charts",
|
|
3
|
-
"version": "1.5.2-next.
|
|
3
|
+
"version": "1.5.2-next.3ea731",
|
|
4
4
|
"description": "Parliament chart visualization library for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"devEngines": {
|
|
7
7
|
"runtime": {
|
|
8
8
|
"name": "node",
|
|
9
|
-
"version": "22.
|
|
9
|
+
"version": "22.23.1",
|
|
10
10
|
"onFail": "warn"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
@@ -69,18 +69,17 @@
|
|
|
69
69
|
"@biomejs/biome": "^2.2.0",
|
|
70
70
|
"@emotion/react": "^11.14.0",
|
|
71
71
|
"@emotion/styled": "^11.14.0",
|
|
72
|
+
"@fontsource-variable/geist": "^5.3.0",
|
|
73
|
+
"@fontsource-variable/geist-mono": "^5.3.0",
|
|
72
74
|
"@mui/icons-material": "^7.3.2",
|
|
73
75
|
"@mui/material": "^7.3.2",
|
|
74
76
|
"@semantic-release/changelog": "^6.0.3",
|
|
75
77
|
"@semantic-release/git": "^10.0.1",
|
|
76
|
-
"@storybook/addon-a11y": "^
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/addon-
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/
|
|
81
|
-
"@storybook/react": "^8.4.7",
|
|
82
|
-
"@storybook/react-vite": "^8.4.7",
|
|
83
|
-
"@storybook/test": "^8.4.7",
|
|
78
|
+
"@storybook/addon-a11y": "^10.5.3",
|
|
79
|
+
"@storybook/addon-links": "^10.5.3",
|
|
80
|
+
"@storybook/addon-themes": "^10.5.3",
|
|
81
|
+
"@storybook/react": "^10.5.3",
|
|
82
|
+
"@storybook/react-vite": "^10.5.3",
|
|
84
83
|
"@types/d3-axis": "^3.0.6",
|
|
85
84
|
"@types/d3-brush": "^3.0.6",
|
|
86
85
|
"@types/d3-scale": "^4.0.9",
|
|
@@ -90,20 +89,20 @@
|
|
|
90
89
|
"@types/hast": "^3.0.4",
|
|
91
90
|
"@types/react": "^18.3.0",
|
|
92
91
|
"@types/react-dom": "^18.3.0",
|
|
93
|
-
"@vitejs/plugin-react": "^
|
|
94
|
-
"@vitest/coverage-v8": "^
|
|
95
|
-
"@vitest/ui": "^
|
|
96
|
-
"eslint": "^
|
|
92
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
93
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
94
|
+
"@vitest/ui": "^4.1.9",
|
|
95
|
+
"eslint": "^10.7.0",
|
|
97
96
|
"jsdom": "^27.0.0",
|
|
98
97
|
"knip": "^5.66.4",
|
|
99
98
|
"react": "^19.1.1",
|
|
100
99
|
"react-dom": "^19.1.1",
|
|
101
100
|
"semantic-release": "^25.0.2",
|
|
102
|
-
"storybook": "^
|
|
101
|
+
"storybook": "^10.5.3",
|
|
103
102
|
"typescript": "^5.9.2",
|
|
104
|
-
"vite": "^
|
|
105
|
-
"vite-plugin-dts": "^
|
|
106
|
-
"vitest": "^
|
|
103
|
+
"vite": "^8.1.0",
|
|
104
|
+
"vite-plugin-dts": "^5.0.3",
|
|
105
|
+
"vitest": "^4.1.9"
|
|
107
106
|
},
|
|
108
107
|
"publishConfig": {
|
|
109
108
|
"access": "public",
|