import type { CircuitDrawing } from "./circuits.draw.ts"; import { type RaceMoment, type RaceStanding } from "./circuits.race.moment.ts"; import { type CircuitRace, type RaceOptions } from "./circuits.race.ts"; import type { CircuitOptions } from "./circuits.types.ts"; import type { Language } from "./types.ts"; /** A race clock: `23:45` or `1:23:45`. */ export declare function raceClock(seconds: number): string; /** A lap's time: `1:36.512`. */ export declare function lapTime(seconds: number): string; /** A gap: `+1.234`, `+1:02.345` past a minute, or the laps down in the words of the language. */ export declare function gapText(seconds: number | undefined, laps: number, language: Language): string; /** The race clock's line at a moment: the lap, the final lap, the flag or the grid. */ export declare function raceStage(moment: RaceMoment, language: Language): string; /** What a line of the board shows in its gap column: the leader, a gap, laps down, the pit lane or out. */ export declare function standingGap(line: RaceStanding, language: Language, of?: "gap" | "interval"): string; /** The size of a car's dot on a drawing whose type and marks are sized by `k` (a thousandth of its longer side). */ export declare const carRadius: (k: number) => number; /** The markup of one car's dot: a circle in the team's colour, edged in the ground's, with its position on it, laid at the origin (the page moves it with `transform`). */ export declare function carMarkup(line: RaceStanding, r: number, language: Language): string; /** The cars of a moment as one group, the last car drawn first so that the leader lies on top. */ export declare function carsMarkup(moment: RaceMoment, r: number, language: Language): string; /** What a race's drawing is made from: the circuit's options, the race's, and the moment. */ export interface RaceDrawOptions extends CircuitOptions, Omit { /** Seconds from the start: 0 (the grid) by default. */ t?: number; } /** A race's drawing at a moment, and what it was made from. */ export interface RaceDrawing extends CircuitDrawing { race: CircuitRace; moment: RaceMoment; } /** The race, the drawing of its circuit and the moment, with the cars on it: the race the options make, or one given (from a feed). */ export declare function raceDrawing(options: RaceDrawOptions, given?: CircuitRace): RaceDrawing; /** * A simulated race on a circuit at a moment, as one SVG string: the circuit's drawing with a dot for each made-up car where the race has it then, in its team's colour, with the position it holds written on it. * @example * ```ts * import { drawRace } from "@johnmorrisdotca/kyogijo-stadiums/circuits"; * const svg = drawRace({ circuit: "las-vegas", laps: 3, cars: 6, t: 120 }); * console.log(svg.match(/class="ky-ci-car"/g)!.length, svg.includes("simulation")); * // 6 true * ``` */ export declare function drawRace(options: RaceDrawOptions): string; /** * The timing board at a moment, as a table: position, driver and team, the gap to the leader and to the car in front, the last and best laps and the pit stops, the fastest lap marked. The colours of the teams are * swatches beside their names, never the only way a car is told. * @example * ```ts * import { raceAt, raceBoard, simulateRace } from "@johnmorrisdotca/kyogijo-stadiums/circuits"; * const race = simulateRace({ circuit: "las-vegas", laps: 3, cars: 4 }); * const table = raceBoard(raceAt(race, 200)); * console.log(table.startsWith("