@moderneinc/react-charts 1.5.2 → 1.6.0-next.ebd481
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/campaign-timeline/campaign-timeline.component.d.ts +3 -0
- package/dist/components/campaign-timeline/campaign-timeline.constants.d.ts +13 -0
- package/dist/components/campaign-timeline/campaign-timeline.types.d.ts +174 -0
- package/dist/components/campaign-timeline/components/axis-band.component.d.ts +11 -0
- package/dist/components/campaign-timeline/components/burndown-band.component.d.ts +18 -0
- package/dist/components/campaign-timeline/components/event-lane-band.component.d.ts +16 -0
- package/dist/components/campaign-timeline/components/playhead.component.d.ts +14 -0
- package/dist/components/campaign-timeline/hooks/use-campaign-timeline.hook.d.ts +32 -0
- package/dist/components/campaign-timeline/utils/burndown-paths.d.ts +29 -0
- package/dist/components/campaign-timeline/utils/layout-event-flags.d.ts +43 -0
- package/dist/components/campaign-timeline/utils/measure-text.d.ts +9 -0
- package/dist/components/campaign-timeline/utils/pack-event-rows.d.ts +21 -0
- package/dist/components/morph-chart/hooks/use-morph-chart.hook.d.ts +3 -1
- package/dist/components/morph-chart/morph-chart.types.d.ts +3 -0
- package/dist/components/morph-chart/utils/parliament-renderer.d.ts +2 -0
- package/dist/components/parliament-chart/hooks/use-parliament-chart.hook.d.ts +3 -1
- package/dist/components/parliament-chart/parliament-chart.constants.d.ts +26 -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.d.ts +2 -0
- package/dist/index.js +14447 -16760
- 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/dist/theme/readable-color.d.ts +9 -0
- package/dist/utils/is-development.d.ts +5 -0
- package/package.json +18 -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contrast correction for caller-supplied colors, so one palette works in both
|
|
3
|
+
* light and dark themes: the chart knows its surface, the caller does not.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Nudges `color` until it clears WCAG AA against `background`, returning it
|
|
7
|
+
* untouched when it already passes or when MUI cannot parse it.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readableOn: (color: string, background: string, isDarkSurface: boolean) => string;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moderneinc/react-charts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-next.ebd481",
|
|
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,18 @@
|
|
|
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",
|
|
74
|
+
"@moderneinc/design-system-tokens": "7.0.0-next.e7c42e",
|
|
72
75
|
"@mui/icons-material": "^7.3.2",
|
|
73
76
|
"@mui/material": "^7.3.2",
|
|
74
77
|
"@semantic-release/changelog": "^6.0.3",
|
|
75
78
|
"@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",
|
|
79
|
+
"@storybook/addon-a11y": "^10.5.3",
|
|
80
|
+
"@storybook/addon-links": "^10.5.3",
|
|
81
|
+
"@storybook/addon-themes": "^10.5.3",
|
|
82
|
+
"@storybook/react": "^10.5.3",
|
|
83
|
+
"@storybook/react-vite": "^10.5.3",
|
|
84
84
|
"@types/d3-axis": "^3.0.6",
|
|
85
85
|
"@types/d3-brush": "^3.0.6",
|
|
86
86
|
"@types/d3-scale": "^4.0.9",
|
|
@@ -90,20 +90,20 @@
|
|
|
90
90
|
"@types/hast": "^3.0.4",
|
|
91
91
|
"@types/react": "^18.3.0",
|
|
92
92
|
"@types/react-dom": "^18.3.0",
|
|
93
|
-
"@vitejs/plugin-react": "^
|
|
94
|
-
"@vitest/coverage-v8": "^
|
|
95
|
-
"@vitest/ui": "^
|
|
96
|
-
"eslint": "^
|
|
93
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
94
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
95
|
+
"@vitest/ui": "^4.1.9",
|
|
96
|
+
"eslint": "^10.7.0",
|
|
97
97
|
"jsdom": "^27.0.0",
|
|
98
98
|
"knip": "^5.66.4",
|
|
99
99
|
"react": "^19.1.1",
|
|
100
100
|
"react-dom": "^19.1.1",
|
|
101
101
|
"semantic-release": "^25.0.2",
|
|
102
|
-
"storybook": "^
|
|
102
|
+
"storybook": "^10.5.3",
|
|
103
103
|
"typescript": "^5.9.2",
|
|
104
|
-
"vite": "^
|
|
105
|
-
"vite-plugin-dts": "^
|
|
106
|
-
"vitest": "^
|
|
104
|
+
"vite": "^8.1.0",
|
|
105
|
+
"vite-plugin-dts": "^5.0.3",
|
|
106
|
+
"vitest": "^4.1.9"
|
|
107
107
|
},
|
|
108
108
|
"publishConfig": {
|
|
109
109
|
"access": "public",
|