courthive-components 1.10.1 → 3.0.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.
Files changed (46) hide show
  1. package/dist/components/{temporal-grid/controller/temporalGridControl.d.ts → availability-grid/controller/availabilityGridControl.d.ts} +40 -13
  2. package/dist/components/{temporal-grid → availability-grid}/controller/viewProjections.d.ts +5 -5
  3. package/dist/components/{temporal-grid → availability-grid}/engine/viewState.d.ts +4 -4
  4. package/dist/components/{temporal-grid → availability-grid}/index.d.ts +6 -6
  5. package/dist/components/{temporal-grid → availability-grid}/timeline/types.d.ts +2 -2
  6. package/dist/components/{temporal-grid/ui/temporalGrid.d.ts → availability-grid/ui/availabilityGrid.d.ts} +14 -14
  7. package/dist/components/{temporal-grid → availability-grid}/ui/blockPopover.d.ts +17 -2
  8. package/dist/components/editor/notesEditor.d.ts +13 -0
  9. package/dist/components/hive-id-login/buildHiveIDLogin.d.ts +4 -0
  10. package/dist/components/hive-id-login/hiveIDClient.d.ts +14 -0
  11. package/dist/components/hive-id-login/index.d.ts +3 -0
  12. package/dist/components/hive-id-login/styles.d.ts +16 -0
  13. package/dist/components/hive-id-login/types.d.ts +115 -0
  14. package/dist/components/interactive-scoring/types.d.ts +8 -0
  15. package/dist/components/modal/mockParticipants.d.ts +1 -1
  16. package/dist/components/renderStructure/renderStructureMinimap.d.ts +7 -0
  17. package/dist/components/schedule-page/domain/activeStrip.d.ts +1 -1
  18. package/dist/components/schedule-page/domain/matchUpCatalogProjections.d.ts +11 -0
  19. package/dist/components/schedule-page/index.d.ts +2 -2
  20. package/dist/components/schedule-page/types.d.ts +19 -0
  21. package/dist/components/schedule-page/ui/activeStrip.d.ts +23 -0
  22. package/dist/components/schedule-page/ui/matchUpCard.d.ts +8 -0
  23. package/dist/components/scheduling-profile/domain/validateProfile.d.ts +4 -3
  24. package/dist/components/scheduling-profile/index.d.ts +1 -1
  25. package/dist/components/scheduling-profile/types.d.ts +3 -3
  26. package/dist/components/scoring/logic/dynamicSetsLogic.d.ts +2 -0
  27. package/dist/components/team-card/buildTeamCard.d.ts +2 -0
  28. package/dist/components/team-card/index.d.ts +2 -0
  29. package/dist/components/team-card/styles.d.ts +13 -0
  30. package/dist/components/team-card/types.d.ts +27 -0
  31. package/dist/courthive-components.css +1 -1
  32. package/dist/courthive-components.es.js +6102 -5565
  33. package/dist/courthive-components.umd.js +52 -52
  34. package/dist/index.d.ts +13 -5
  35. package/dist/types.d.ts +3 -3
  36. package/package.json +17 -10
  37. /package/dist/components/{temporal-grid → availability-grid}/timeline/CourtTimeline.d.ts +0 -0
  38. /package/dist/components/{temporal-grid → availability-grid}/timeline/InteractionManager.d.ts +0 -0
  39. /package/dist/components/{temporal-grid → availability-grid}/timeline/ItemRenderer.d.ts +0 -0
  40. /package/dist/components/{temporal-grid → availability-grid}/timeline/RowLayout.d.ts +0 -0
  41. /package/dist/components/{temporal-grid → availability-grid}/timeline/TimeAxis.d.ts +0 -0
  42. /package/dist/components/{temporal-grid → availability-grid}/timeline/TimeScale.d.ts +0 -0
  43. /package/dist/components/{temporal-grid → availability-grid}/ui/courtAvailabilityModal.d.ts +0 -0
  44. /package/dist/components/{temporal-grid → availability-grid}/ui/modernTimePicker.d.ts +0 -0
  45. /package/dist/components/{temporal-grid → availability-grid}/ui/statsBar.d.ts +0 -0
  46. /package/dist/components/{temporal-grid → availability-grid}/ui/viewToolbar.d.ts +0 -0
@@ -1,12 +1,12 @@
1
- import { temporal, TemporalEngine } from 'tods-competition-factory';
2
- import { TemporalViewState } from '../engine/viewState';
1
+ import { availability, AvailabilityEngine } from 'tods-competition-factory';
2
+ import { AvailabilityViewState } from '../engine/viewState';
3
3
  import { DEFAULT_COLOR_SCHEME, ResourceGroupingMode } from './viewProjections';
4
4
  import { BlockPopoverManager } from '../ui/blockPopover';
5
5
  import { CourtTimeline } from '../timeline/CourtTimeline';
6
- type BlockType = temporal.BlockType;
7
- type CourtRef = temporal.CourtRef;
8
- type DayId = temporal.DayId;
9
- export interface TemporalGridControlConfig {
6
+ type BlockType = availability.BlockType;
7
+ type CourtRef = availability.CourtRef;
8
+ type DayId = availability.DayId;
9
+ export interface AvailabilityGridControlConfig {
10
10
  /** Container element for the timeline */
11
11
  container: HTMLElement;
12
12
  /** Initial selected day */
@@ -35,8 +35,30 @@ export interface TemporalGridControlConfig {
35
35
  onBlocksChanged?: () => void;
36
36
  /** Callback when a day label is double-clicked (for navigating to 1-Day view) */
37
37
  onDayNavigate?: (day: string) => void;
38
+ /**
39
+ * Callback invoked when an action can't complete because of scheduling
40
+ * conflicts. The controller never opens a dialog itself — the consumer
41
+ * wires this hook to its own themed-toast / modal system. When omitted,
42
+ * conflicts are written to console.warn only (NEVER falls back to a
43
+ * native browser alert).
44
+ */
45
+ onConflict?: (conflicts: any[]) => void;
46
+ /**
47
+ * Optional callback rendered as a "Manage Registrations" menu item on
48
+ * the block popover for PRACTICE blocks. The argument carries the
49
+ * resolved block descriptor — consumers use it to open their practice-
50
+ * registration management surface (e.g. a cModal in TMX).
51
+ */
52
+ onManageRegistrations?: (args: {
53
+ blockId: string;
54
+ courtId: string;
55
+ venueId: string;
56
+ date: string;
57
+ startTime: string;
58
+ endTime: string;
59
+ }) => void;
38
60
  }
39
- export declare class TemporalGridControl {
61
+ export declare class AvailabilityGridControl {
40
62
  private readonly engine;
41
63
  private timeline;
42
64
  private readonly config;
@@ -49,7 +71,7 @@ export declare class TemporalGridControl {
49
71
  private currentView;
50
72
  private selectedCourts;
51
73
  private visibleCourts;
52
- constructor(engine: TemporalEngine, config: TemporalGridControlConfig);
74
+ constructor(engine: AvailabilityEngine, config: AvailabilityGridControlConfig);
53
75
  private initialize;
54
76
  /**
55
77
  * Ensure timeline exists. Defers creation to the next macro-task so the
@@ -123,15 +145,20 @@ export declare class TemporalGridControl {
123
145
  * toISOString() converts to UTC which shifts the time by the local offset.
124
146
  */
125
147
  private toLocalISO;
126
- /** Show conflict dialog */
148
+ /**
149
+ * Surface scheduling conflicts to the consumer. We never open a dialog
150
+ * here — the consumer's `onConflict` hook routes them to whatever themed
151
+ * notification system the host app uses (TMX toast, AMS console modal,
152
+ * etc.). When no hook is wired, conflicts go to console.warn only.
153
+ */
127
154
  private showConflictDialog;
128
155
  /** Get timeline instance (for advanced usage) */
129
156
  getTimeline(): CourtTimeline | null;
130
157
  /** Get engine instance */
131
- getEngine(): TemporalEngine;
158
+ getEngine(): AvailabilityEngine;
132
159
  /** Get view state (for external consumers to subscribe to view changes) */
133
- getViewState(): TemporalViewState;
160
+ getViewState(): AvailabilityViewState;
134
161
  }
135
- /** Create a temporal grid controller */
136
- export declare function createTemporalGridControl(engine: TemporalEngine, config: TemporalGridControlConfig): TemporalGridControl;
162
+ /** Create a availability grid controller */
163
+ export declare function createAvailabilityGridControl(engine: AvailabilityEngine, config: AvailabilityGridControlConfig): AvailabilityGridControl;
137
164
  export {};
@@ -1,8 +1,8 @@
1
- import { temporal } from 'tods-competition-factory';
2
- type BlockType = temporal.BlockType;
3
- type CourtMeta = temporal.CourtMeta;
4
- type CourtRef = temporal.CourtRef;
5
- type VenueDayTimeline = temporal.VenueDayTimeline;
1
+ import { availability } from 'tods-competition-factory';
2
+ type BlockType = availability.BlockType;
3
+ type CourtMeta = availability.CourtMeta;
4
+ type CourtRef = availability.CourtRef;
5
+ type VenueDayTimeline = availability.VenueDayTimeline;
6
6
  /**
7
7
  * Timeline Group (represents a court or facility group header)
8
8
  */
@@ -1,6 +1,6 @@
1
- import { temporal } from 'tods-competition-factory';
2
- type BlockType = temporal.BlockType;
3
- type DayId = temporal.DayId;
1
+ import { availability } from 'tods-competition-factory';
2
+ type BlockType = availability.BlockType;
3
+ type DayId = availability.DayId;
4
4
  export interface ViewStateSnapshot {
5
5
  selectedDay: DayId | null;
6
6
  selectedVenue: string | null;
@@ -12,7 +12,7 @@ export interface ViewChangeEvent {
12
12
  payload: Partial<ViewStateSnapshot>;
13
13
  }
14
14
  export type ViewChangeListener = (event: ViewChangeEvent) => void;
15
- export declare class TemporalViewState {
15
+ export declare class AvailabilityViewState {
16
16
  private selectedDay;
17
17
  private selectedVenue;
18
18
  private selectedCourt;
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Temporal Grid - Main Entry Point
2
+ * Availability Grid - Main Entry Point
3
3
  *
4
- * Engine modules re-exported from tods-competition-factory via `temporal` namespace.
4
+ * Engine modules re-exported from tods-competition-factory via `availability` namespace.
5
5
  * Controller, UI, and view state are local to courthive-components.
6
6
  */
7
- export { TemporalEngine, TemporalEngine as TemporalGridEngine, temporal } from 'tods-competition-factory';
8
- export { TemporalViewState, type ViewChangeEvent, type ViewChangeListener, type ViewStateSnapshot } from './engine/viewState';
9
- export { createTemporalGridControl, TemporalGridControl, type TemporalGridControlConfig } from './controller/temporalGridControl';
7
+ export { AvailabilityEngine, AvailabilityEngine as AvailabilityGridEngine, availability } from 'tods-competition-factory';
8
+ export { AvailabilityViewState, type ViewChangeEvent, type ViewChangeListener, type ViewStateSnapshot } from './engine/viewState';
9
+ export { createAvailabilityGridControl, AvailabilityGridControl, type AvailabilityGridControlConfig } from './controller/availabilityGridControl';
10
10
  export { buildBlockEvents, buildCapacityVisualization, buildConflictEvents, buildEventsFromTimelines, buildVenueGroups, buildHiddenDates, buildResourcesFromTimelines, buildTimeSlotConfig, buildTimelineWindowConfig, DEFAULT_COLOR_SCHEME, filterEventsByTimeRange, filterResourcesByVenue, generateBlockPatternCSS, isBlockEvent, isConflictEvent, isSegmentEvent, parseBlockEventId, parseResourceId, sortResources, type BlockColorScheme, type CalendarEvent, type CalendarResource, type TimelineGroup, type TimelineItem, type ProjectionConfig, type ResourceGroupingMode } from './controller/viewProjections';
11
- export { createTemporalGrid, TemporalGrid, type TemporalGridCallbacks, type TemporalGridConfig, type TemporalGridLabels } from './ui/temporalGrid';
11
+ export { createAvailabilityGrid, AvailabilityGrid, type AvailabilityGridCallbacks, type AvailabilityGridConfig, type AvailabilityGridLabels } from './ui/availabilityGrid';
12
12
  export { ModernTimePicker, showModernTimePicker, type TimePickerConfig } from './ui/modernTimePicker';
13
13
  export { createBlockPopoverManager, type BlockPopoverManager, type BlockPopoverOptions, type EngineBlockPopoverOptions } from './ui/blockPopover';
14
14
  export { buildStatsBar, type StatsBarUpdate } from './ui/statsBar';
@@ -1,5 +1,5 @@
1
- import { temporal } from 'tods-competition-factory';
2
- type CourtRef = temporal.CourtRef;
1
+ import { availability } from 'tods-competition-factory';
2
+ type CourtRef = availability.CourtRef;
3
3
  export interface TimelineGroupData {
4
4
  id: string;
5
5
  content: string;
@@ -1,11 +1,11 @@
1
- import { TemporalEngine, temporal } from 'tods-competition-factory';
2
- import { TemporalGridControl, TemporalGridControlConfig } from '../controller/temporalGridControl';
3
- type DayId = temporal.DayId;
1
+ import { AvailabilityEngine, availability } from 'tods-competition-factory';
2
+ import { AvailabilityGridControl, AvailabilityGridControlConfig } from '../controller/availabilityGridControl';
3
+ type DayId = availability.DayId;
4
4
  /**
5
- * i18n labels for the temporal grid component.
5
+ * i18n labels for the availability grid component.
6
6
  * All fields are optional — English defaults are used when omitted.
7
7
  */
8
- export interface TemporalGridLabels {
8
+ export interface AvailabilityGridLabels {
9
9
  view?: string;
10
10
  day1?: string;
11
11
  days3?: string;
@@ -19,13 +19,13 @@ export interface TemporalGridLabels {
19
19
  setDefaultAvailability?: string;
20
20
  saveToTournament?: string;
21
21
  }
22
- export interface TemporalGridCallbacks {
22
+ export interface AvailabilityGridCallbacks {
23
23
  /**
24
24
  * Called when dirty state changes (blocks/availability modified vs initial)
25
25
  */
26
26
  onDirtyChange?: (isDirty: boolean) => void;
27
27
  }
28
- export interface TemporalGridConfig extends Partial<TemporalGridControlConfig>, TemporalGridCallbacks {
28
+ export interface AvailabilityGridConfig extends Partial<AvailabilityGridControlConfig>, AvailabilityGridCallbacks {
29
29
  /**
30
30
  * Tournament record (TODS format)
31
31
  */
@@ -57,7 +57,7 @@ export interface TemporalGridConfig extends Partial<TemporalGridControlConfig>,
57
57
  /**
58
58
  * i18n labels
59
59
  */
60
- labels?: TemporalGridLabels;
60
+ labels?: AvailabilityGridLabels;
61
61
  /**
62
62
  * Language code for datepicker localization (e.g. 'en', 'fr', 'de')
63
63
  */
@@ -75,7 +75,7 @@ export interface TemporalGridConfig extends Partial<TemporalGridControlConfig>,
75
75
  */
76
76
  onMutationsApplied?: (mutations: any[]) => void;
77
77
  }
78
- export declare class TemporalGrid {
78
+ export declare class AvailabilityGrid {
79
79
  private engine;
80
80
  private control;
81
81
  private config;
@@ -89,7 +89,7 @@ export declare class TemporalGrid {
89
89
  private visibleCourts;
90
90
  private initialSnapshot;
91
91
  private isDirty;
92
- constructor(config: TemporalGridConfig);
92
+ constructor(config: AvailabilityGridConfig);
93
93
  /**
94
94
  * Render the component into a container
95
95
  */
@@ -128,11 +128,11 @@ export declare class TemporalGrid {
128
128
  /**
129
129
  * Get the engine instance
130
130
  */
131
- getEngine(): TemporalEngine;
131
+ getEngine(): AvailabilityEngine;
132
132
  /**
133
133
  * Get the controller instance
134
134
  */
135
- getControl(): TemporalGridControl | null;
135
+ getControl(): AvailabilityGridControl | null;
136
136
  /**
137
137
  * Set the selected day
138
138
  */
@@ -143,7 +143,7 @@ export declare class TemporalGrid {
143
143
  refresh(): void;
144
144
  }
145
145
  /**
146
- * Create and render a temporal grid
146
+ * Create and render a availability grid
147
147
  */
148
- export declare function createTemporalGrid(config: TemporalGridConfig, container: HTMLElement): TemporalGrid;
148
+ export declare function createAvailabilityGrid(config: AvailabilityGridConfig, container: HTMLElement): AvailabilityGrid;
149
149
  export {};
@@ -1,4 +1,4 @@
1
- import { TemporalEngine } from 'tods-competition-factory';
1
+ import { AvailabilityEngine } from 'tods-competition-factory';
2
2
  export interface BlockPopoverOptions {
3
3
  itemId: string;
4
4
  blockTypes: Array<{
@@ -16,9 +16,24 @@ export interface BlockPopoverOptions {
16
16
  export interface EngineBlockPopoverOptions {
17
17
  itemId: string;
18
18
  blockId: string;
19
- engine: TemporalEngine;
19
+ engine: AvailabilityEngine;
20
20
  day: string;
21
21
  onBlockChanged: () => void;
22
+ /**
23
+ * Optional callback rendered as a "Manage Registrations" menu item for
24
+ * PRACTICE blocks. Provides the resolved block descriptor (courtId, date,
25
+ * sub-window times) so the consumer can resolve to its bookingId without
26
+ * a round trip — the factory derives bookingId from `${courtId}-${date}-${startTime}`
27
+ * when the booking lacks an explicit one.
28
+ */
29
+ onManageRegistrations?: (args: {
30
+ blockId: string;
31
+ courtId: string;
32
+ venueId: string;
33
+ date: string;
34
+ startTime: string;
35
+ endTime: string;
36
+ }) => void;
22
37
  }
23
38
  export interface BlockPopoverManager {
24
39
  show(target: HTMLElement, options: BlockPopoverOptions): void;
@@ -0,0 +1,13 @@
1
+ import { Editor } from '@tiptap/core';
2
+ export interface NotesEditorOptions {
3
+ initialHtml?: string;
4
+ }
5
+ export interface NotesEditorHandle {
6
+ toolbar: HTMLElement;
7
+ editorElement: HTMLElement;
8
+ editor: Editor | undefined;
9
+ getHtml(): string;
10
+ isEmpty(): boolean;
11
+ destroy(): void;
12
+ }
13
+ export declare function createNotesEditor(options?: NotesEditorOptions): NotesEditorHandle;
@@ -0,0 +1,4 @@
1
+ import { HiveIDAuthenticatedDetail, HiveIDLoginConfig, HiveIDLoginShell } from './types';
2
+ export declare function buildHiveIDLogin(config: HiveIDLoginConfig): HiveIDLoginShell;
3
+ /** Magic-link consume helper for the courthive-public landing route. */
4
+ export declare function completeMagicLink(cfsBaseUrl: string, code: string, fetchImpl?: typeof fetch): Promise<HiveIDAuthenticatedDetail>;
@@ -0,0 +1,14 @@
1
+ import { HiveIDClientError, MagicLinkConsumeRequest, MagicLinkConsumeResponse, MagicLinkRequest, MagicLinkResponse, SignupRequest, SignupResponse, VerifyExistingRequest, VerifyExistingResponse } from './types';
2
+ type FetchLike = typeof fetch;
3
+ export declare function signup(baseUrl: string, body: SignupRequest, fetchImpl?: FetchLike): Promise<SignupResponse>;
4
+ export declare function verifyExisting(baseUrl: string, body: VerifyExistingRequest, fetchImpl?: FetchLike): Promise<VerifyExistingResponse>;
5
+ export declare function requestMagicLink(baseUrl: string, body: MagicLinkRequest, fetchImpl?: FetchLike): Promise<MagicLinkResponse>;
6
+ export declare function consumeMagicLink(baseUrl: string, body: MagicLinkConsumeRequest, fetchImpl?: FetchLike): Promise<MagicLinkConsumeResponse>;
7
+ /**
8
+ * Helper: returns true when the error is a 409 with the existing-user
9
+ * redirect shape from CFS (`{ code: 'EXISTING_USER', ... }`). The
10
+ * component uses this to swap signup mode → verify-existing without
11
+ * re-typing the email.
12
+ */
13
+ export declare function isExistingUserConflict(err: unknown): err is HiveIDClientError;
14
+ export {};
@@ -0,0 +1,3 @@
1
+ export { buildHiveIDLogin, completeMagicLink } from './buildHiveIDLogin';
2
+ export { consumeMagicLink, isExistingUserConflict, requestMagicLink, signup, verifyExisting } from './hiveIDClient';
3
+ export type { CachedPersonFields, HiveIDAuthenticatedDetail, HiveIDClientError, HiveIDFederationId, HiveIDLoginConfig, HiveIDLoginShell, HiveIDMode, MagicLinkConsumeRequest, MagicLinkConsumeResponse, MagicLinkRequest, MagicLinkResponse, SignupCandidate, SignupRequest, SignupResolved, SignupResponse, VerifyExistingRequest, VerifyExistingResponse } from './types';
@@ -0,0 +1,16 @@
1
+ export declare const hilContainerStyle: () => string;
2
+ export declare const hilFormStyle: () => string;
3
+ export declare const hilHeaderStyle: () => string;
4
+ export declare const hilTitleStyle: () => string;
5
+ export declare const hilTabsStyle: () => string;
6
+ export declare const hilTabStyle: () => string;
7
+ export declare const hilTabActiveStyle: () => string;
8
+ export declare const hilFieldStyle: () => string;
9
+ export declare const hilLabelStyle: () => string;
10
+ export declare const hilInputStyle: () => string;
11
+ export declare const hilRowStyle: () => string;
12
+ export declare const hilSubmitStyle: () => string;
13
+ export declare const hilMessageStyle: () => string;
14
+ export declare const hilMessageErrorStyle: () => string;
15
+ export declare const hilMessageSuccessStyle: () => string;
16
+ export declare const hilSwitchModeStyle: () => string;
@@ -0,0 +1,115 @@
1
+ /**
2
+ * HiveID Login — types.
3
+ *
4
+ * Mirrors the response shapes from CFS `/auth/hiveid/*` (PR-G):
5
+ * - POST /auth/hiveid/signup
6
+ * - POST /auth/hiveid/verify-existing
7
+ * - POST /auth/hiveid/magic-link
8
+ * - POST /auth/hiveid/magic-link/consume
9
+ */
10
+ export type HiveIDMode = 'signup' | 'login' | 'magic-link';
11
+ export interface CachedPersonFields {
12
+ standardFamilyName: string | null;
13
+ standardGivenName: string | null;
14
+ birthDate: string | null;
15
+ sex: string | null;
16
+ nationalityCode: string | null;
17
+ }
18
+ export interface HiveIDFederationId {
19
+ provider: string;
20
+ externalId: string;
21
+ }
22
+ export interface HiveIDAuthenticatedDetail {
23
+ token: string;
24
+ refreshToken: string;
25
+ personId: string | null;
26
+ cached: CachedPersonFields;
27
+ }
28
+ export interface SignupRequest {
29
+ email: string;
30
+ firstName: string;
31
+ lastName: string;
32
+ federationIds?: HiveIDFederationId[];
33
+ }
34
+ export interface VerifyExistingRequest {
35
+ email: string;
36
+ password: string;
37
+ }
38
+ export interface MagicLinkRequest {
39
+ email: string;
40
+ }
41
+ export interface MagicLinkConsumeRequest {
42
+ code: string;
43
+ }
44
+ export interface SignupResolved {
45
+ status: 'created';
46
+ token: string;
47
+ refreshToken: string;
48
+ personId: string;
49
+ personRevision: number;
50
+ cached: CachedPersonFields;
51
+ }
52
+ export interface SignupCandidate {
53
+ status: 'candidate';
54
+ candidates: {
55
+ personId: string;
56
+ confidence: number;
57
+ }[];
58
+ }
59
+ export type SignupResponse = SignupResolved | SignupCandidate;
60
+ export interface VerifyExistingResponse {
61
+ status: 'verified';
62
+ token: string;
63
+ refreshToken: string;
64
+ personId: string | null;
65
+ personRevision: number | null;
66
+ cached: CachedPersonFields | null;
67
+ }
68
+ export interface MagicLinkResponse {
69
+ ok: true;
70
+ }
71
+ export interface MagicLinkConsumeResponse {
72
+ status: 'authenticated';
73
+ token: string;
74
+ refreshToken: string;
75
+ personId: string | null;
76
+ personRevision: number | null;
77
+ cached: CachedPersonFields;
78
+ }
79
+ export interface HiveIDLoginConfig {
80
+ /** Which CFS instance to talk to (no trailing slash). */
81
+ cfsBaseUrl: string;
82
+ /** Starting mode. Defaults to 'signup'. The user can toggle inside the component. */
83
+ mode?: HiveIDMode;
84
+ /** Pre-fill email — useful when the consumer already knows the user. */
85
+ defaultEmail?: string;
86
+ /**
87
+ * Optional pre-existing federation IDs (e.g. a USTA id known to the
88
+ * consumer) appended to the signup resolve fragment to bump
89
+ * strong-match likelihood. Most callers leave this empty.
90
+ */
91
+ federationIds?: HiveIDFederationId[];
92
+ /** Optional fetch implementation (tests stub this). */
93
+ fetchImpl?: typeof fetch;
94
+ }
95
+ export interface HiveIDLoginShell {
96
+ /** Root DOM node — append to your container. */
97
+ root: HTMLElement;
98
+ /** Programmatically swap modes (signup ⇄ login ⇄ magic-link). */
99
+ setMode(mode: HiveIDMode): void;
100
+ /** Current mode. */
101
+ getMode(): HiveIDMode;
102
+ /** Convenience: subscribe to the success event without addEventListener. */
103
+ onAuthenticated(handler: (detail: HiveIDAuthenticatedDetail) => void): () => void;
104
+ }
105
+ export type HiveIDClientError = {
106
+ kind: 'http';
107
+ status: number;
108
+ body: any;
109
+ } | {
110
+ kind: 'network';
111
+ cause: Error;
112
+ } | {
113
+ kind: 'parse';
114
+ cause: Error;
115
+ };
@@ -30,6 +30,14 @@ export interface InteractiveScoringShellConfig {
30
30
  * IndexedDB. If omitted, the shell starts at 0-0.
31
31
  */
32
32
  initialMatchUp?: MatchUp;
33
+ /**
34
+ * Hook to confirm a reset before the engine clears the matchUp. Return
35
+ * `true` to proceed, `false` to abort. Consumers wire this to whatever
36
+ * themed-modal primitive their app uses (e.g. cModal in
37
+ * courthive-public). When omitted, Reset fires immediately without any
38
+ * prompt — the shell NEVER falls back to a native browser dialog.
39
+ */
40
+ confirmReset?: () => boolean | Promise<boolean>;
33
41
  }
34
42
  /**
35
43
  * Detail payload for the `stateChanged` CustomEvent.
@@ -54,7 +54,7 @@ export interface MockParticipantsConfig {
54
54
  *
55
55
  * Features:
56
56
  * - Gender selection (Any/Male/Female)
57
- * - Participant count (8-256)
57
+ * - Participant count (8-128)
58
58
  * - Age range with automatic validation (ageMax >= ageMin)
59
59
  * - Number of countries to limit nationality diversity
60
60
  * - Optional WTN/UTR ratings
@@ -0,0 +1,7 @@
1
+ import { MatchUp } from '../../types';
2
+ export interface StructureMinimapOptions {
3
+ matchUps: MatchUp[];
4
+ width?: number;
5
+ quarterCount?: number;
6
+ }
7
+ export declare function buildStructureMinimap({ matchUps, width, quarterCount }: StructureMinimapOptions): HTMLDivElement | null;
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * - computeActiveStripDropTarget(grid, courtId, dragged)
15
15
  * Picks a row when a matchUp is dropped onto a court's strip cell.
16
- * It infers a "temporal floor" from the existing grid:
16
+ * It infers a "scheduled floor" from the existing grid:
17
17
  * (a) any row across all courts where the dragged matchUp's
18
18
  * participants already appear — the dragged matchUp must land
19
19
  * below those rows;
@@ -1,4 +1,15 @@
1
1
  import { CatalogMatchUpItem, CatalogFilters, MatchUpCatalogGroupBy, ScheduledBehavior } from '../types';
2
2
  export declare function isCompletedStatus(status?: string): boolean;
3
3
  export declare function filterMatchUpCatalog(catalog: CatalogMatchUpItem[], query: string, behavior?: ScheduledBehavior, filters?: CatalogFilters, showCompleted?: boolean): CatalogMatchUpItem[];
4
+ /**
5
+ * For each event, returns the lowest `roundNumber` among items that are
6
+ * unscheduled and not completed. Drives the round-emphasis tier on each
7
+ * catalog card — offset 0 means "this round is what should be scheduled
8
+ * next within its event," offset >= 1 deemphasizes future rounds.
9
+ *
10
+ * Computed against the FULL catalog (not the filtered set) by the catalog
11
+ * widget's `update()` so a search / filter that narrows the visible items
12
+ * doesn't shift the priority assignment underneath the operator.
13
+ */
14
+ export declare function computeBaseRoundByEvent(catalog: CatalogMatchUpItem[]): Map<string, number>;
4
15
  export declare function groupMatchUpCatalog(items: CatalogMatchUpItem[], mode: MatchUpCatalogGroupBy): Map<string, CatalogMatchUpItem[]>;
@@ -7,7 +7,7 @@ import { SchedulePageControl } from './controller/schedulePageControl';
7
7
  */
8
8
  export { SchedulePageControl } from './controller/schedulePageControl';
9
9
  export { SchedulePageStore } from './engine/schedulePageStore';
10
- export { filterMatchUpCatalog, groupMatchUpCatalog, isCompletedStatus } from './domain/matchUpCatalogProjections';
10
+ export { filterMatchUpCatalog, groupMatchUpCatalog, computeBaseRoundByEvent, isCompletedStatus } from './domain/matchUpCatalogProjections';
11
11
  export { buildScheduleIssueIndex } from './domain/scheduleIssues';
12
12
  export { matchUpLabel, participantLabel, matchUpSearchKey, deepClone } from './domain/utils';
13
13
  export { computeActiveStrip, computeActiveStripCell, computeActiveStripDropTarget } from './domain/activeStrip';
@@ -20,7 +20,7 @@ export { buildScheduleInspectorPanel } from './ui/inspectorPanel';
20
20
  export { buildCourtGridSlot } from './ui/courtGridSlot';
21
21
  export { buildSchedulePageLayout } from './ui/schedulePageLayout';
22
22
  export { buildActiveStripPanel } from './ui/activeStrip';
23
- export type { ActiveStripPanel, ActiveStripPanelCallbacks, ActiveStripPanelData, ActiveStripPanelOptions, ActiveStripCourtMeta } from './ui/activeStrip';
23
+ export type { ActiveStripPanel, ActiveStripPanelCallbacks, ActiveStripPanelData, ActiveStripPanelOptions, ActiveStripCourtMeta, ActiveStripCourtBlock } from './ui/activeStrip';
24
24
  export { buildScheduleGridCell, mapMatchUpToCellData, DEFAULT_SCHEDULE_CELL_CONFIG } from './ui/scheduleGridCell';
25
25
  export { activateScheduleCellTypeAhead } from './ui/scheduleCellTypeAhead';
26
26
  export type { ScheduleCellTypeAheadOptions } from './ui/scheduleCellTypeAhead';
@@ -17,6 +17,11 @@ export interface CatalogMatchUpItem {
17
17
  drawId: string;
18
18
  drawName?: string;
19
19
  structureId: string;
20
+ /** Draw stage — MAIN / CONSOLATION / PLAYOFF / QUALIFYING / ROUND_ROBIN /
21
+ * etc. Rendered as a chip when present and not MAIN so a Quarterfinal in
22
+ * the consolation bracket reads distinctly from a Quarterfinal in the
23
+ * main draw of the same event. */
24
+ stage?: string;
20
25
  roundNumber: number;
21
26
  roundName?: string;
22
27
  matchUpFormat?: string;
@@ -244,5 +249,19 @@ export interface ScheduleCellData {
244
249
  bookingType?: string;
245
250
  rowCount?: number;
246
251
  notes?: string;
252
+ /**
253
+ * Participant labels to render below the booking type. Pre-formatted
254
+ * by the consumer so the cell stays display-only — e.g.
255
+ * `["Smith / Jones (14:00–14:30)", "Ortiz (14:30–15:00)"]`.
256
+ *
257
+ * NOTE: as of 2026-06-01 there is no expected consumer. The Now/Live
258
+ * strip uses a separate banner path (`ActiveStripCourtBlock.detail`),
259
+ * and PRACTICE bookings are time-windowed — they don't currently
260
+ * surface as grid cells, which have fixed row positions, not fixed
261
+ * times. The field is kept available for future use (e.g. if a
262
+ * tournament chooses to materialize PRACTICE bookings as cells) but
263
+ * no production callsite populates it today.
264
+ */
265
+ registrations?: string[];
247
266
  };
248
267
  }
@@ -4,11 +4,34 @@ export interface ActiveStripCourtMeta {
4
4
  courtId: string;
5
5
  label: string;
6
6
  }
7
+ /**
8
+ * Active availability block surfaced on a court for the current clock time.
9
+ * When present, the strip renders a labeled banner inside the court's cell
10
+ * (e.g. "PRACTICE 14:00–16:00") so the TD sees at a glance that the court
11
+ * has a non-matchUp time reservation in effect.
12
+ *
13
+ * The strip itself is data-driven and does NOT poll the clock; consumers
14
+ * are expected to refresh `ActiveStripPanelData` periodically (e.g. every
15
+ * 30s) with the blocks active at "now".
16
+ */
17
+ export interface ActiveStripCourtBlock {
18
+ /** Block type label, used as the banner intent class (e.g. "PRACTICE", "MAINTENANCE"). */
19
+ type: string;
20
+ /** Banner text. Caller controls formatting — e.g. "PRACTICE 14:00–16:00". */
21
+ label: string;
22
+ /** Optional short note (block.reason, registrant name from a future practice-registration system, etc.). */
23
+ detail?: string;
24
+ }
7
25
  export interface ActiveStripPanelData {
8
26
  /** Court columns, in display order. The strip computes one cell per column. */
9
27
  grid: ActiveStripGrid;
10
28
  /** Optional display labels per courtId. Falls back to courtId. */
11
29
  courts?: ActiveStripCourtMeta[];
30
+ /**
31
+ * Optional map of courtId → active availability block. When provided, the
32
+ * strip renders a colored banner inside the court's active cell.
33
+ */
34
+ courtBlocks?: Record<string, ActiveStripCourtBlock>;
12
35
  /**
13
36
  * CSS grid-template-columns applied to the strip root. When provided, the
14
37
  * strip lays out as `display: grid` with a leading spacer occupying the
@@ -7,5 +7,13 @@ export interface MatchUpCardOptions {
7
7
  * (top-right) and suppress the standard time chip. Used by the schedule
8
8
  * grid's Scheduled tab where the time is the card's primary signal. */
9
9
  prominentTime?: boolean;
10
+ /** Distance from the earliest unscheduled round within this card's event.
11
+ * 0 = this round is the next-to-schedule (highest emphasis on the title),
12
+ * 1 = one round behind, ≥ 2 = further out (lowest emphasis). Mapped to
13
+ * `spl-card-title--round-current / next / later` classes so consumers can
14
+ * re-theme via CSS without touching the JS. Omit to leave the title at
15
+ * its default styling (used for non-catalog renders + scheduled / completed
16
+ * cards where round priority is meaningless). */
17
+ roundOffset?: number;
10
18
  }
11
19
  export declare function buildMatchUpCard(item: CatalogMatchUpItem, callbacks: MatchUpCardCallbacks, options?: MatchUpCardOptions): HTMLElement;
@@ -1,11 +1,12 @@
1
- import { SchedulingProfile, ValidationResult, TemporalAdapter, DependencyAdapter, FlattenedRound } from '../types';
1
+ import { SchedulingProfile, ValidationResult, AvailabilityAdapter, DemandAdapter, DependencyAdapter, FlattenedRound } from '../types';
2
2
  export interface ValidateProfileParams {
3
3
  profile: SchedulingProfile;
4
- temporal?: TemporalAdapter;
4
+ availability?: AvailabilityAdapter;
5
+ demand?: DemandAdapter;
5
6
  dependencies?: DependencyAdapter;
6
7
  venueOrder?: string[];
7
8
  }
8
- export declare function validateProfile({ profile, temporal, dependencies, venueOrder }: ValidateProfileParams): ValidationResult[];
9
+ export declare function validateProfile({ profile, availability, demand, dependencies, venueOrder }: ValidateProfileParams): ValidationResult[];
9
10
  export declare function validateRoundPrecedenceLocal({ profile }: {
10
11
  profile: SchedulingProfile;
11
12
  venueOrder?: string[];
@@ -20,5 +20,5 @@ export { buildIssuesPanel } from './ui/issuesPanel';
20
20
  export { buildRoundCard } from './ui/roundCard';
21
21
  export { createCardPopoverManager } from './ui/cardPopover';
22
22
  export { buildSchedulingProfileLayout } from './ui/schedulingProfileLayout';
23
- export type { SchedulingProfile, ScheduleDay, VenueSchedule, RoundProfile, RoundSegment, VenueInfo, CatalogRoundItem, CatalogGroupBy, RoundKey, RoundLocator, DragPayload, CatalogDragPayload, PlannedDragPayload, DropTarget, DropResult, Severity, ValidationCode, FixActionKind, FixAction, ValidationResult, SeverityCounts, IssueIndex, ProfileStoreState, ProfileChangeListener, TemporalAdapter, DemandAdapter, DependencyAdapter, SchedulingProfileConfig, UIPanel, FlattenedRound, PlannedRoundBehavior } from './types';
23
+ export type { SchedulingProfile, ScheduleDay, VenueSchedule, RoundProfile, RoundSegment, VenueInfo, CatalogRoundItem, CatalogGroupBy, RoundKey, RoundLocator, DragPayload, CatalogDragPayload, PlannedDragPayload, DropTarget, DropResult, Severity, ValidationCode, FixActionKind, FixAction, ValidationResult, SeverityCounts, IssueIndex, ProfileStoreState, ProfileChangeListener, AvailabilityAdapter, DemandAdapter, DependencyAdapter, SchedulingProfileConfig, UIPanel, FlattenedRound, PlannedRoundBehavior } from './types';
24
24
  export declare function createSchedulingProfile(config: SchedulingProfileConfig, container: HTMLElement): SchedulingProfileControl;