courthive-components 6.14.0 → 7.1.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/README.md +27 -39
- package/dist/components/composition-editor/sections/colorsSection.d.ts +1 -1
- package/dist/components/composition-editor/sections/layoutSection.d.ts +1 -1
- package/dist/components/renderSchematicStructure/index.d.ts +1 -1
- package/dist/components/renderSchematicStructure/renderSchematicMatchUp.d.ts +29 -3
- package/dist/components/renderSchematicStructure/renderSchematicRound.d.ts +3 -2
- package/dist/components/renderSchematicStructure/renderSchematicStructure.d.ts +4 -2
- package/dist/components/renderStructure/connectors.d.ts +25 -0
- package/dist/components/renderStructure/matchUpState.d.ts +32 -0
- package/dist/components/renderStructure/renderMatchUp.d.ts +6 -3
- package/dist/components/renderStructure/renderMatchUpActions.d.ts +14 -0
- package/dist/components/renderStructure/renderMatchUpInPlace.d.ts +19 -0
- package/dist/components/renderStructure/renderOnlineResources.d.ts +20 -0
- package/dist/components/renderStructure/renderParticipantDetail.d.ts +1 -1
- package/dist/components/renderStructure/renderRound.d.ts +5 -1
- package/dist/components/renderStructure/renderRoundHeader.d.ts +3 -2
- package/dist/components/renderStructure/renderRoundPager.d.ts +14 -0
- package/dist/components/renderStructure/renderSchedule.d.ts +10 -3
- package/dist/components/renderStructure/renderSlot.d.ts +7 -0
- package/dist/components/renderStructure/renderStructure.d.ts +20 -1
- package/dist/components/renderStructure/renderStructureMinimap.d.ts +5 -1
- package/dist/components/renderStructure/scoreboardState.d.ts +17 -0
- package/dist/components/renderStructure/structurePaths.d.ts +21 -0
- package/dist/components/scoring/logic/irregularEnding.d.ts +1 -1
- package/dist/components/scoring/logic/scoreEntrySelectors.d.ts +2 -0
- package/dist/components/scoring/logic/scoreEntryText.d.ts +93 -0
- package/dist/components/scoring/regions/dialPadRegion.d.ts +2 -0
- package/dist/components/scoring/regions/dynamicSetsRegion.d.ts +3 -0
- package/dist/components/scoring/regions/freeScoreRegion.d.ts +3 -1
- package/dist/components/scoring/regions/scoreReadout.d.ts +1 -1
- package/dist/components/scoring/scoreEntryCard.d.ts +4 -1
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +10497 -12368
- package/dist/courthive-components.umd.js +77 -113
- package/dist/courts.mjs +2 -4
- package/dist/{dist-DPnSc4eG.mjs → dist-BuZ2aY07.mjs} +13 -46
- package/dist/features.css +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/{range-C-KhEV-d.mjs → range-5-_fCM2L.mjs} +1 -2
- package/dist/segmented-bar.mjs +1 -2
- package/dist/styles/themes/createTheme.d.ts +6 -0
- package/dist/types.d.ts +297 -4
- package/package.json +9 -9
- package/dist/components/scoring/approaches/dialPadApproach.d.ts +0 -2
- package/dist/components/scoring/approaches/dialPadLogic.d.ts +0 -17
- package/dist/components/scoring/approaches/dynamicSetsApproach.d.ts +0 -2
- package/dist/components/scoring/approaches/freeScoreApproach.d.ts +0 -2
- package/dist/components/scoring/approaches/inlineScoringApproach.d.ts +0 -2
- package/dist/components/scoring/config.d.ts +0 -28
- package/dist/components/scoring/index.d.ts +0 -6
- package/dist/components/scoring/logic/outcomeProjection.d.ts +0 -25
- package/dist/components/scoring/scoringModal.d.ts +0 -2
- package/dist/components/scoring/statusCodePicker.d.ts +0 -15
- package/dist/components/scoring/utils/scoreFormatters.d.ts +0 -12
- package/dist/components/scoring/utils/scoreValidator.d.ts +0 -16
- package/dist/styles/getLinkStyle.d.ts +0 -25
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared dial pad logic - formats raw digits into score string
|
|
3
|
-
* Parses matchUpFormat to determine boundaries
|
|
4
|
-
*/
|
|
5
|
-
export type FormatOptions = {
|
|
6
|
-
matchUpFormat: string;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Convert raw digits to formatted score string
|
|
10
|
-
* Example: "6464" with matchUpFormat 'SET3-S:6/TB7' becomes "6-4 6-4"
|
|
11
|
-
*/
|
|
12
|
-
export declare function formatScoreString(digits: string, options: FormatOptions): string;
|
|
13
|
-
/**
|
|
14
|
-
* The number of sets a format names. `matchUpFormatCode.parse` puts `bestOf` and `exactly` at the top level
|
|
15
|
-
* of the parsed format, never inside `setFormat`.
|
|
16
|
-
*/
|
|
17
|
-
export declare function setCountOf(parsedFormat: any): number;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Scoring configuration for courthive-components
|
|
3
|
-
* This provides a simple configuration object that can be modified by consumers
|
|
4
|
-
*/
|
|
5
|
-
export interface ScoringConfig {
|
|
6
|
-
scoringApproach?: 'freeScore' | 'dynamicSets' | 'dialPad' | 'inlineScoring';
|
|
7
|
-
smartComplements?: boolean;
|
|
8
|
-
composition?: string;
|
|
9
|
-
idiom?: string;
|
|
10
|
-
dateFormat?: string;
|
|
11
|
-
timeFormat?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Get current scoring configuration
|
|
15
|
-
*/
|
|
16
|
-
export declare function getScoringConfig(): ScoringConfig;
|
|
17
|
-
/**
|
|
18
|
-
* Set scoring configuration (can be partial)
|
|
19
|
-
*/
|
|
20
|
-
export declare function setScoringConfig(config: Partial<ScoringConfig>): void;
|
|
21
|
-
/**
|
|
22
|
-
* Reset configuration to defaults
|
|
23
|
-
*/
|
|
24
|
-
export declare function resetScoringConfig(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Stub for loadSettings (for compatibility with TMX code)
|
|
27
|
-
*/
|
|
28
|
-
export declare function loadSettings(): any;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ScoreOutcome } from '../types';
|
|
2
|
-
/** The fields a projection may replace. Everything else on the matchUp is carried through as-is. */
|
|
3
|
-
type ProjectableMatchUp = {
|
|
4
|
-
score?: any;
|
|
5
|
-
matchUpStatus?: string;
|
|
6
|
-
winningSide?: number;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* The matchUp the next approach should hydrate from.
|
|
11
|
-
*
|
|
12
|
-
* Returns the original when there is nothing in progress to carry — the ordinary case on first open,
|
|
13
|
-
* where the saved matchUp IS the truth.
|
|
14
|
-
*
|
|
15
|
-
* ── `winningSide` takes no fallback, and that is the whole care of this function ──
|
|
16
|
-
*
|
|
17
|
-
* It is read from the outcome and never from the saved matchUp. If the operator has cleared the
|
|
18
|
-
* score, the outcome carries no winner, and falling back to the stored one would put back a winner
|
|
19
|
-
* they had just removed — an unanswered question read as a particular answer, which is the fail-open
|
|
20
|
-
* shape (Mentat architectural standard A3) that `irregularEnding.ts` exists to prevent, one field
|
|
21
|
-
* over. `score` and `matchUpStatus` DO fall back, because an outcome that asserts neither is not
|
|
22
|
-
* claiming the match has no score or no status; it is simply not speaking about them.
|
|
23
|
-
*/
|
|
24
|
-
export declare function projectOutcomeOntoMatchUp<T extends ProjectableMatchUp>(matchUp: T, outcome?: ScoreOutcome | null): T;
|
|
25
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StatusCodeGroups } from './logic/statusCodes';
|
|
2
|
-
import { ScoringModalLabels } from './types';
|
|
3
|
-
export type StatusCodePickerHandle = {
|
|
4
|
-
element: HTMLElement;
|
|
5
|
-
/** Re-render for a new status. Returns the code still selected, if any. */
|
|
6
|
-
update: (matchUpStatus: string | undefined) => string | undefined;
|
|
7
|
-
/** The chosen code, or undefined when none is chosen or none is offered. */
|
|
8
|
-
getSelectedCode: () => string | undefined;
|
|
9
|
-
};
|
|
10
|
-
export declare function buildStatusCodePicker(params: {
|
|
11
|
-
groups?: StatusCodeGroups;
|
|
12
|
-
labels?: ScoringModalLabels;
|
|
13
|
-
/** The code already recorded on the matchUp, so re-opening the dialog shows what was saved. */
|
|
14
|
-
initialCode?: string;
|
|
15
|
-
}): StatusCodePickerHandle;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared utilities for formatting scores for display in scoring modals
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Format existing score object into string for input field
|
|
6
|
-
*/
|
|
7
|
-
export declare function formatExistingScore(scoreObject: any, matchUpStatus?: string): string;
|
|
8
|
-
/**
|
|
9
|
-
* Get short abbreviation for matchUpStatus
|
|
10
|
-
* Returns empty string for unknown or unhandled statuses
|
|
11
|
-
*/
|
|
12
|
-
export declare function getStatusAbbreviation(status: string): string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ScoreOutcome } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Validate a score string using generateOutcomeFromScoreString with preserveSideOrder
|
|
4
|
-
*/
|
|
5
|
-
export declare function validateScore(scoreString: string, matchUpFormat?: string, matchUpStatus?: string): ScoreOutcome;
|
|
6
|
-
/**
|
|
7
|
-
* Validate individual set scores (for Dynamic Sets approach)
|
|
8
|
-
* Builds a scoreString from the sets and uses validateScore for consistent validation
|
|
9
|
-
*/
|
|
10
|
-
export declare function validateSetScores(sets: Array<{
|
|
11
|
-
side1?: number;
|
|
12
|
-
side2?: number;
|
|
13
|
-
side1TiebreakScore?: number;
|
|
14
|
-
side2TiebreakScore?: number;
|
|
15
|
-
winningSide?: number;
|
|
16
|
-
}>, matchUpFormat?: string, allowIncomplete?: boolean): ScoreOutcome;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Composition } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Computes connector line configuration and returns a two-call API
|
|
4
|
-
* that matches the previous Stitches pattern.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* const linkResult = getLinkStyle({ composition, isDoubles, roundFactor })({ isFirstRound, link });
|
|
8
|
-
* element.className = linkResult.className;
|
|
9
|
-
* linkResult.applyStyles(element); // sets CSS custom properties for dynamic dimensions
|
|
10
|
-
*/
|
|
11
|
-
export declare function getLinkStyle({ composition, isDoubles, roundFactor }: {
|
|
12
|
-
composition?: Composition;
|
|
13
|
-
isDoubles?: boolean;
|
|
14
|
-
roundFactor?: number;
|
|
15
|
-
}): (opts: {
|
|
16
|
-
isFirstRound?: boolean;
|
|
17
|
-
link?: string;
|
|
18
|
-
noProgression?: boolean;
|
|
19
|
-
}) => {
|
|
20
|
-
className: string;
|
|
21
|
-
/** Apply dynamic connector dimensions as CSS custom properties on the element */
|
|
22
|
-
applyStyles(element: HTMLElement): void;
|
|
23
|
-
/** Legacy: return className as string for backward-compat (styles won't include dynamic dimensions) */
|
|
24
|
-
toString(): string;
|
|
25
|
-
};
|