import type { DojoFigures } from "../leagues/budo.ts"; import { type MBox, type MMark, type Parts } from "./parts.ts"; import { type MatSize, type Piece } from "./tatami.ts"; import type { Compass, DojoEra, DojoPattern, DojoSpec, Side4 } from "./types.ts"; /** The usual sizes of a room counted in jō, in the mats' widths across and along: 8 jō is 4 by 4 widths (3.64 m square of Chūkyōma mats), 20 jō 5 by 8. */ export declare const DOJO_SIZES: Readonly>; /** The mats' widths across and along of a floor of `jo` mats: the usual shape where there is one, else the whole-number shape nearest to 1 to 1.6. @throws RangeError for a count that is not a whole number of 2 or more. */ export declare function shapeOfJo(jo: number): [number, number]; /** The floor's size in metres from the options: its width (across, x) and its length (along, y). */ export declare function floorOf(spec: DojoSpec, mat: MatSize): { width: number; length: number; }; /** The compass side a name means: north is the top of the drawing. @throws Error for a name that is not a side. */ export declare function compassOf(side: Side4 | undefined, fallback: Compass): Compass; /** What a dojo is: its floor, its mats, its walls and what is in them. */ export interface DojoLayout { parts: Parts; floor: MBox; /** The floor and the walls round it. */ extent: MBox; width: number; length: number; mat: MatSize; pattern: DojoPattern; pieces: Piece[]; /** The mats counted as whole ones (a half mat is a half): the area in jō. */ jo: number; counts: { full: number; half: number; cut: number; }; kamiza: Compass; wall: number; /** The floor and the wood surround round it: the room inside the walls. */ room: MBox; /** The width of the wood surround, 0 for none. */ surround: number; entrances: { wall: Compass; box: MBox; }[]; windows: { wall: Compass; box: MBox; }[]; shrine: MBox | undefined; /** The contest areas laid on the floor. */ contests: MBox[]; /** The raised platform of the seat of honour, and the banner on its wall. */ dais: MBox | undefined; banner: MBox | undefined; /** The era of the floor, where it has them. */ era: DojoEra | undefined; marks: MMark[]; } /** The league of mats a spec asks for. */ export declare function dojoLeague(standard: string | undefined): DojoFigures; /** * The era a spec asks for, and the spec as it was then: the era's look, colours, pattern, contest areas and outline laid over the spec's own. `era` picks an era by name, `year` the first whose * years hold it (an era with an unknown year, `null`, never holds one), and with neither the last era, the floor as it is now. A spec without eras is its own era. * @throws Error for an `era` that no era is named, RangeError for a `year` no era holds. */ export declare function resolveEra(spec: DojoSpec | undefined): { spec: DojoSpec; era: DojoEra | undefined; }; /** The dojo's spec as drawn: the era's changes laid over it. */ export declare const dojoSpecOf: (spec: DojoSpec | undefined) => DojoSpec; /** The plan of the dojo a spec asks for. */ export declare function dojoLayout(asked: DojoSpec, league: DojoFigures): DojoLayout;