import { type Env, type Made } from "./layers.env.ts"; import { type Spot } from "./team.formation.ts"; import { type TeamTable } from "./team.common.ts"; import type { Formation, FormationLayer, LineupLayer, LineupPlayer } from "./team.types.ts"; /** How wide a text is, in ems of a bold sans-serif face, by a rough count: wide for Japanese and capitals, narrow for the letters that are. */ export declare function textWidth(text: string): number; /** A name cut to fit `ems` of width, with an ellipsis; nothing when not even three letters fit. */ export declare function fit(name: string, ems: number): string; /** The jersey as a path through its corners, `size` wide, centred on `(x, y)`: sleeves, shoulders, a neckline and the body. */ export declare function jerseyPath(x: number, y: number, size: number): string; /** The formation a lineup is drawn in, and how the players stand in it. */ export interface Lineup { formation: Formation; /** The layer as a formation layer: the players put on the places they were given. */ layer: FormationLayer; spots: Spot[]; /** The players with no place in the formation. */ unplaced: LineupPlayer[]; /** The player standing on each place, with everything the lineup knows of him. */ stands: Map; } /** The formation a lineup uses: the one named, one of your own, or the best fit among those of the surface's sport (the softball one for a softball field). */ export declare function lineupFormation(layer: LineupLayer, env: Env): Formation; /** A lineup's places on the surface and the players on them. */ export declare function computeLineup(layer: LineupLayer, env: Env): Lineup; export declare function drawLineup(layer: LineupLayer, env: Env): Made; export declare function lineupTables(layer: LineupLayer, env: Env): TeamTable[];