@moderneinc/react-charts 1.5.2-next.984313 → 1.5.2-next.a42ff6

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.
@@ -7,7 +7,7 @@ export declare const DEFAULT_CHART_CONFIG: {
7
7
  readonly seatSize: 5;
8
8
  readonly minSeatSize: 4;
9
9
  readonly maxSeatSize: 18;
10
- readonly spacing: 1.1;
10
+ readonly spacing: 1.5;
11
11
  readonly innerRadiusRatio: 0.4;
12
12
  readonly arcAngleFlexibility: 5;
13
13
  };
@@ -16,6 +16,7 @@ export declare const DEFAULT_CHART_CONFIG: {
16
16
  readonly emptySeatsBorder: "#d8d8d8";
17
17
  readonly seatBorder: "#fff";
18
18
  };
19
+ readonly seatBorderDarken: 0.28;
19
20
  readonly animation: {
20
21
  readonly transitionDuration: "0.2s";
21
22
  readonly hoverOpacity: {
@@ -35,6 +36,21 @@ export declare const MODERNE_VULNERABILITY_COLORS: {
35
36
  NO_LST: string;
36
37
  DATA_MISSING: string;
37
38
  };
39
+ /**
40
+ * Resolve a seat's fill + border from its category color.
41
+ * - Hollow categories (No LST) → faint ghost fill + dashed ghost border.
42
+ * - Known palette colors → the prototype's mapped border shade.
43
+ * - Anything else (e.g. `url(#pattern)`) → same-color border (legacy).
44
+ *
45
+ * Pass `radius` to also get the proportional `strokeWidth` / `dashArray`.
46
+ */
47
+ export declare function resolveSeatStyle(color: string, radius?: number): {
48
+ fill: string;
49
+ stroke: string;
50
+ dashed: boolean;
51
+ strokeWidth?: number;
52
+ dashArray?: string;
53
+ };
38
54
  export declare const CAMPAIGN_NOT_APPLICABLE = "N/A";
39
55
  export declare const CAMPAIGN_NO_LST = "No LST";
40
56
  export declare const CAMPAIGN_DATA_MISSING = "Data Missing";
@@ -4,7 +4,12 @@ type Party = {
4
4
  id: string | number;
5
5
  name: string;
6
6
  seats: number;
7
+ /** Seat fill color. */
7
8
  colour: string;
9
+ /** Border color; defaults to a darker shade of `colour` when omitted. */
10
+ borderColour?: string;
11
+ /** When true the seat is drawn hollow (transparent fill, dashed border). */
12
+ dashed?: boolean;
8
13
  };
9
14
  type EnhancedParliamentOptions = {
10
15
  seatCount?: boolean;
@@ -15,21 +15,3 @@ export declare const createDataMissingHatchPattern: (hFunction?: typeof hastH) =
15
15
  * Uses -45-degree diagonal lines.
16
16
  */
17
17
  export declare const createNoLstHatchPattern: (hFunction?: typeof hastH) => Element;
18
- /**
19
- * Color values for hatch patterns to use in CSS and hover states.
20
- * Exported for consistency across components.
21
- */
22
- export declare const HATCH_PATTERN_COLORS: {
23
- readonly greyHatch: {
24
- readonly background: "#EDEFEF";
25
- readonly lines: "#ADB5BD";
26
- };
27
- readonly dataMissingHatch: {
28
- readonly background: "#FFF3CC";
29
- readonly lines: "#FFB800";
30
- };
31
- readonly noLstHatch: {
32
- readonly background: "#FFE5E5";
33
- readonly lines: "#ED4134";
34
- };
35
- };