courthive-components 1.6.0 → 1.7.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.
package/dist/index.d.ts CHANGED
@@ -46,6 +46,10 @@ export { buildVenueCard, buildVenueSkeletonCard, mapVenueToCardData, DEFAULT_VEN
46
46
  export type { MapVenueOptions, VenueCardCallbacks, VenueCardConfig, VenueCardCornerField, VenueCardData, VenueCardField } from './components/venue-card';
47
47
  export { buildCourtCard, buildCourtSkeletonCard, mapCourtToCardData, DEFAULT_COURT_CARD_CONFIG, mergeCourtCardConfig } from './components/court-card';
48
48
  export type { CourtCardCallbacks, CourtCardConfig, CourtCardCornerField, CourtCardData, CourtCardField, MapCourtOptions } from './components/court-card';
49
+ export { buildCompetitivenessBar, buildCompetitivenessDonut, aggregateCompetitiveness, totalBuckets, COMPETITIVENESS_BUCKETS } from './components/competitivenessBar';
50
+ export type { BuildCompetitivenessBarResult, BuildCompetitivenessDonutResult, CompetitivenessBucket, CompetitivenessBuckets } from './components/competitivenessBar';
51
+ export { buildDrawCard, buildDrawSkeletonCard, mapDrawDefinitionToCardData, DEFAULT_DRAW_CARD_CONFIG, mergeDrawCardConfig } from './components/draw-card';
52
+ export type { DrawCardCallbacks, DrawCardConfig, DrawCardCornerField, DrawCardData, DrawCardField, DrawMatchUpCounts, DrawStatusKind, DrawStatusPill, MapDrawOptions } from './components/draw-card';
49
53
  export { buildEventCard, buildEventSkeletonCard, mapEventToCardData, resolveEventStatus, DEFAULT_EVENT_CARD_CONFIG, EVENT_CARD_LIGHT_MODE_THRESHOLD, mergeEventCardConfig } from './components/event-card';
50
54
  export type { EventCardCallbacks, EventCardConfig, EventCardCornerField, EventCardData, EventCardField, EventGenderKind, EventMatchUpCounts, EventStatusKind, EventStatusPill, EventStatusResolverInput, EventTypeKind, MapEventOptions } from './components/event-card';
51
55
  export { courthiveComponentsVersion } from './version';
@@ -0,0 +1,9 @@
1
+ import { CompositionColors } from '../types';
2
+ /**
3
+ * Apply per-composition color overrides as inline CSS custom properties on a container.
4
+ * Values cascade to `.chc-matchup` borders and `.chc-link` connector pseudo-elements without
5
+ * touching their style rules. Unspecified fields are left to the theme class default.
6
+ */
7
+ export declare function applyCompositionColors(element: HTMLElement, colors?: CompositionColors): void;
8
+ /** Remove every CSS custom property managed by `applyCompositionColors` from a container. */
9
+ export declare function clearCompositionColors(element: HTMLElement): void;
@@ -4,4 +4,5 @@ export { wimbledonTheme } from './wimbledonTheme';
4
4
  export { frenchTheme } from './frenchTheme';
5
5
  export { usOpenTheme } from './usOpenTheme';
6
6
  export { basicTheme } from './basicTheme';
7
+ export { typtiTheme } from './typtiTheme';
7
8
  export { itfTheme } from './itfTheme';
@@ -0,0 +1 @@
1
+ export declare const typtiTheme: string;
package/dist/types.d.ts CHANGED
@@ -220,9 +220,34 @@ export interface Configuration {
220
220
  close?: string;
221
221
  };
222
222
  }
223
+ export interface CompositionColors {
224
+ /** matchUp border color — sets `--chc-color-border` on the draw container */
225
+ border?: string;
226
+ /** matchUp border color on hover — sets `--chc-color-border-hover` */
227
+ borderHover?: string;
228
+ /** inline-start (left) border color — sets `--chc-color-border-inline-start`. Falls back to `border` when unset. */
229
+ borderInlineStart?: string;
230
+ /** inline-start (left) border width, e.g. '10px' — sets `--chc-border-width-inline-start` */
231
+ borderInlineStartWidth?: string;
232
+ /** connector line color between matchUps — sets `--chc-color-connector` */
233
+ connector?: string;
234
+ /** matchUp background color — sets `--chc-color-matchup` */
235
+ matchUpBackground?: string;
236
+ /** divider color between participants within a matchUp — sets `--chc-color-internal-dividers` */
237
+ internalDividers?: string;
238
+ /** placeholder "[Score]" text color — sets `--chc-color-score`. Falls back to `--chc-status-info`. */
239
+ score?: string;
240
+ /** round header text + underline color — sets `--chc-color-round-header`.
241
+ * Underline falls back to `--chc-text-primary`; text falls back to inherit. */
242
+ roundHeader?: string;
243
+ }
223
244
  export interface Composition {
224
245
  theme: string;
225
246
  configuration?: Configuration;
247
+ /** Per-composition color overrides. Applied as inline CSS custom properties on the draw root,
248
+ * cascading to `.chc-matchup` borders and `.chc-link` connector pseudo-elements. Unspecified
249
+ * fields fall back to the theme's defaults. */
250
+ colors?: CompositionColors;
226
251
  }
227
252
  export interface EventHandlers {
228
253
  matchUpClick?: (params: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "courthive-components",
3
- "packageManager": "pnpm@11.1.2",
4
- "version": "1.6.0",
3
+ "packageManager": "pnpm@11.1.3",
4
+ "version": "1.7.0",
5
5
  "engines": {
6
6
  "node": ">=22"
7
7
  },
@@ -110,7 +110,7 @@
110
110
  "focus-trap": "^8.0.0",
111
111
  "timepicker-ui": "^4.1.2",
112
112
  "tippy.js": "6.3.7",
113
- "tods-competition-factory": "3.7.0",
113
+ "tods-competition-factory": "3.9.0",
114
114
  "vanillajs-datepicker": "1.3.4"
115
115
  }
116
116
  }