courthive-components 6.6.2 → 6.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.
@@ -0,0 +1,7 @@
1
+ import { ScoringModalLabels } from '../types';
2
+ /** Adapt the legacy modal's named labels to the card's status-keyed labels. */
3
+ export declare function scoringStatusScopeLabels(labels?: ScoringModalLabels): Record<string, string>;
4
+ /** Scope decisions come from the host's factory SCORE action, never from UI draw heuristics. */
5
+ export declare function statusScopeError(status: string | undefined, disabledMatchUpStatuses?: readonly string[], labels?: Record<string, string>): string | undefined;
6
+ /** Keep the refusal visible even where the restricted status has been removed from the choices. */
7
+ export declare function statusScopeNotice(disabledMatchUpStatuses?: readonly string[], labels?: Record<string, string>): HTMLElement;
@@ -7,6 +7,8 @@ export type FreeScoreRegionParams = {
7
7
  matchUpFormat?: string;
8
8
  /** The score to open with, already formatted (e.g. `'6-4 6-3'`). With a `store`, the model's own line is used. */
9
9
  initialText?: string;
10
+ disabledMatchUpStatuses?: string[];
11
+ statusScopeLabels?: Record<string, string>;
10
12
  /** Label above the field. */
11
13
  label?: string;
12
14
  /** Called after any change. Wire to the card's `refresh`. */
@@ -164,6 +164,8 @@ export type ScoreEntryCardParams = {
164
164
  * submission the engine will refuse. Omitted, `[Clear]` behaves as it always has.
165
165
  */
166
166
  clearable?: boolean;
167
+ /** Scoped statuses refused by the factory SCORE action. */
168
+ disabledMatchUpStatuses?: string[];
167
169
  };
168
170
  export type ScoreEntryCard = {
169
171
  element: HTMLElement;
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ title: string;
3
+ };
4
+ export default _default;
5
+ export declare const RestrictedStatus: {
6
+ render: () => HTMLButtonElement;
7
+ play: ({ canvasElement }: {
8
+ canvasElement: HTMLElement;
9
+ }) => Promise<void>;
10
+ };
11
+ export declare const UnrestrictedStatus: {
12
+ render: () => HTMLButtonElement;
13
+ play: ({ canvasElement }: {
14
+ canvasElement: HTMLElement;
15
+ }) => Promise<void>;
16
+ };
@@ -39,6 +39,9 @@ export type ScoringModalLabels = {
39
39
  defaulted?: string;
40
40
  suspended?: string;
41
41
  deadRubber?: string;
42
+ challenged?: string;
43
+ /** Localized refusal template; {{status}} is replaced with the host's status label. */
44
+ statusUnavailable?: string;
42
45
  inProgress?: string;
43
46
  awaitingResult?: string;
44
47
  validScore?: string;
@@ -74,11 +77,14 @@ export type ScoringModalParams = {
74
77
  * submission the engine will refuse. Omitted, `[Clear]` behaves as it always has.
75
78
  */
76
79
  clearable?: boolean;
80
+ /** Scoped statuses refused by the factory SCORE action. Omitted preserves the unrestricted vocabulary. */
81
+ disabledMatchUpStatuses?: string[];
77
82
  };
78
83
  export type ScoreChangeHandler = (outcome: ScoreOutcome) => void;
79
84
  export type RenderScoreEntryParams = {
80
85
  matchUp: any;
81
86
  container: HTMLElement;
82
87
  onScoreChange: ScoreChangeHandler;
88
+ disabledMatchUpStatuses?: string[];
83
89
  labels?: ScoringModalLabels;
84
90
  };