import { type BudoPlan, type MBox } from "./budo/plan.ts"; import type { JudgingMat, JudgingOptions, JudgingResolved, JudgingSeat, JudgingStyle } from "./judging.types.ts"; import type { Language } from "./types.ts"; /** The longest name, ID and mat label that are taken, in characters. */ export declare const JUDGING_LIMITS: Readonly<{ name: 120; id: 64; label: 40; line: 60; }>; /** The seats of a style: every one, or without the optional ones (the side judges of a contest). @throws TypeError for a style that is not one. */ export declare function seatsOf(style: unknown, only?: "all" | "listed"): readonly JudgingSeat[]; /** * The seat a name stands for: its number (`3`, `"3"`), its key (`"judge-3"`, `"Judge 3"`, `"referee"`, `"timekeeper"`) or a word (`"central"`, `"scorer"`, `"jury"`). * @throws RangeError for a seat the style does not have, naming the seats it has. */ export declare function seatOf(style: JudgingStyle, seat: unknown): JudgingSeat; /** The label of a mat: the caller's, held to its length, else the language's `Mat {n}`. */ export declare function matLabel(mat: JudgingMat, n: number, language: Language): string; /** The line of a mat's broadcast board: the caller's, held to its length, or nothing. */ export declare function matLine(mat: JudgingMat): string; /** What `drawJudging` and the 3D view work from: the options held to what they may be, and every mat with all of its seats. */ export interface JudgingSetting { style: JudgingStyle; language: Language; /** The mats to draw (all of them, or the one `mat` names), each with every seat of the style. */ mats: JudgingResolved[]; /** How many mats the assignment has altogether. */ total: number; chart: "auto" | "always" | "never"; /** `plan`: the plan with its chart; `broadcast`: the mat large with the board at its side. */ view: "plan" | "broadcast"; orientation: "landscape" | "portrait"; focus: "mat" | "bench"; width: number; /** Whether the names are on the seats (`seatNames`). */ seatNames: boolean; } /** * Hold the options to what they may be and put each official in a seat. * @throws TypeError for an option of the wrong kind, RangeError for a number of mats outside 1 to 6, a mat that does not exist, a seat the style does not have, a seat named twice on one mat or a text that is too long. */ export declare function judgingSetting(options: JudgingOptions): JudgingSetting; /** Where one seat is on a mat's plan, in metres from the top left of the tatami: its chair (or the place where the official stands) and the card that carries the name, which may lie over the table in front of it. */ export interface SeatPlace { chair: MBox; card: MBox; } /** One mat's seats, in the order the style lists them (`JUDGING_SEATS`, optional seats included), its table and its bench. */ export interface MatPlaces { places: SeatPlace[]; /** The judges' table or the technical table behind the seats at it. */ table: MBox; /** The seats at the table close up: the picture of `focus: "bench"`. */ bench: MBox; } /** Where the seats are on the plan of a style, and the plan they are on. */ export interface JudgingPlan { plan: BudoPlan; /** Each mat's seats, for the mats side by side the plan has (`count`). */ mats: MatPlaces[]; /** The first mat's seats, its table and its bench, as `mats[0]` has them (the chairs of the seats, in order). */ places: SeatPlace[]; chairs: MBox[]; table: MBox; bench: MBox; /** The distance between two seats at the table. */ pitch: number; /** The whole picture of a mat (the free zone, the table, the seats, their cards): what `focus: "mat"` shows, for the first mat. */ extent: MBox; } /** * The judges' bench close up: the seats and their table with a little round them and a few rows of mats in front, from the seats of one mat or of several side by side. `matTop` is where the mats start (the top of the first * contest area), so that the picture shows how the bench sits at the mat's edge; `front` instead says how far in front of the table the picture reaches, in metres (the 3D view, which turns, wants as little of the floor as * will do). */ export declare function benchOf(chairs: readonly MBox[], table: MBox, pitch: number, matTop: number, front?: number): MBox; /** The plan of `count` mats side by side of a style, with its seats: the package's own judo area, so that the seats named are the seats drawn. */ export declare function judgingPlan(style: JudgingStyle, count?: number): JudgingPlan; /** Whether a seat is in a box: its card's middle is inside it. A seat that is not is not drawn in a close-up of the bench, and its name is in the chart only. */ export declare function seatIn(place: SeatPlace, box: MBox): boolean;