courthive-components 1.2.0 → 1.3.0

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.
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Maps sport identifiers to court SVG factories and resolves a sport from
3
+ * factory event / matchUpFormat shapes. Shared by TMX, courthive-public, and
4
+ * any other consumer that wants to render a court SVG image.
5
+ */
6
+ export type CourtSport = 'tennis' | 'basketball' | 'baseball' | 'hockey' | 'pickleball' | 'badminton' | 'padel';
7
+ export declare const COURT_SVG_RESOURCE_SUB_TYPE = "COURT_SVG";
8
+ export declare function sportFromMatchUpFormat(matchUpFormat?: string): CourtSport | undefined;
9
+ export declare function resolveCourtSport(event?: any): CourtSport | undefined;
10
+ export declare function createCourtSvg(sport: string | undefined, className?: string): SVGSVGElement | undefined;
@@ -1 +1,3 @@
1
1
  export { tennisCourt, basketballCourt, baseballDiamond, hockeyRink, pickleballCourt, badmintonCourt, padelCourt } from './courts';
2
+ export { createCourtSvg, resolveCourtSport, sportFromMatchUpFormat, COURT_SVG_RESOURCE_SUB_TYPE } from './courtSvgUtil';
3
+ export type { CourtSport } from './courtSvgUtil';
@@ -0,0 +1,2 @@
1
+ export { buildRatingDistributionChart } from './ratingDistributionChart';
2
+ export type { RatingDistributionChartOptions, RatingDistributionChartMode, } from './ratingDistributionChart';
@@ -0,0 +1,19 @@
1
+ import { DistributionBin, RatingDistributionStats } from 'tods-competition-factory';
2
+ export type RatingDistributionChartMode = 'HISTOGRAM' | 'DONUT';
3
+ export interface RatingDistributionChartOptions {
4
+ mode?: RatingDistributionChartMode;
5
+ width?: number;
6
+ height?: number;
7
+ showAxis?: boolean;
8
+ showCounts?: boolean;
9
+ showMean?: boolean;
10
+ margin?: {
11
+ top: number;
12
+ right: number;
13
+ bottom: number;
14
+ left: number;
15
+ };
16
+ binColor?: (bin: DistributionBin, index: number) => string;
17
+ ariaLabel?: string;
18
+ }
19
+ export declare function buildRatingDistributionChart(stats: RatingDistributionStats, options?: RatingDistributionChartOptions): SVGSVGElement;