import type { GoalMouth, GoalMouthOptions, SoccerChart, SoccerShot, SoccerShotOptions } from "./charts.types.ts"; import { keyItems } from "./charts.ts"; /** * A shot map for soccer: each shot on the pitch (all of it, or the half the shots attack) in a data provider's own numbers, sized by its expected * goals, a goal a filled star and the rest open marks (a save a circle, a miss an x, a block a triangle, the post a diamond), with the expected-goals * total, a key and a table. `goalMouth()` of the result is the goal-mouth view of the same shots. * @example * ```ts * import { soccerShotMap } from "@johnmorrisdotca/kyogijo-stadiums/charts"; * const chart = soccerShotMap( * [ * { x: 104, y: 36, outcome: "goal", xg: 0.31, goalY: -1.2, goalZ: 0.6 }, * { x: 98, y: 50, outcome: "saved", xg: 0.08, goalY: 2.4, goalZ: 1.1 }, * { x: 90, y: 30, outcome: "missed", xg: 0.04, goalY: 5, goalZ: 0.5 }, * ], * { provider: "statsbomb", half: true, goalUnit: "yd" }, * ); * console.log(chart.totals.shots, chart.totals.goals, chart.totals.xg, chart.options.half); * console.log(chart.goalMouth().svg.startsWith("; }; /** * The goal-mouth view of soccer shots: a small drawing of the goal frame seen from the front (the shooter's left on the left), with where each shot * crossed the goal line, across from the centre of the goal (`goalY`, positive to the shooter's right) and up from the ground (`goalZ`). A shot wide * or high of the frame is drawn beside or above it; a block has no place across the goal and is left out, and the count says how many were. * @example * ```ts * import { soccerGoalMouth } from "@johnmorrisdotca/kyogijo-stadiums/charts"; * const view = soccerGoalMouth([ * { x: 100, y: 40, outcome: "goal", goalY: 0.8, goalZ: 1.9, xg: 0.2 }, * { x: 90, y: 40, outcome: "missed", goalY: -4.6, goalZ: 1.2 }, * { x: 85, y: 30, outcome: "blocked" }, * ]); * console.log(view.placed, view.skipped, view.svg.includes("Goal mouth")); * // 2 1 true * ``` */ export declare function soccerGoalMouth(shots: readonly SoccerShot[], options?: GoalMouthOptions): GoalMouth;