@johnmorrisdotca/kyogijo-stadiums 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +204 -0
- package/LICENSE +21 -0
- package/NOTICE.md +297 -0
- package/README.md +655 -2
- package/dist/annotate.d.ts +47 -0
- package/dist/annotate.js +349 -0
- package/dist/athletics/describe.d.ts +8 -0
- package/dist/athletics/describe.js +41 -0
- package/dist/athletics/events.d.ts +17 -0
- package/dist/athletics/events.js +48 -0
- package/dist/athletics/facilities.d.ts +80 -0
- package/dist/athletics/facilities.js +176 -0
- package/dist/athletics/infield.d.ts +79 -0
- package/dist/athletics/infield.js +166 -0
- package/dist/athletics/layout.d.ts +13 -0
- package/dist/athletics/layout.js +98 -0
- package/dist/athletics/oval.d.ts +57 -0
- package/dist/athletics/oval.js +116 -0
- package/dist/athletics/plan.d.ts +97 -0
- package/dist/athletics/plan.js +355 -0
- package/dist/athletics/races.d.ts +102 -0
- package/dist/athletics/races.js +355 -0
- package/dist/athletics/steeplechase.d.ts +72 -0
- package/dist/athletics/steeplechase.js +196 -0
- package/dist/athletics/stencil.d.ts +13 -0
- package/dist/athletics/stencil.js +85 -0
- package/dist/athletics/track.d.ts +54 -0
- package/dist/athletics/track.js +105 -0
- package/dist/athletics/types.d.ts +77 -0
- package/dist/athletics/types.js +1 -0
- package/dist/athletics-entry.d.ts +17 -0
- package/dist/athletics-entry.js +11 -0
- package/dist/athletics.style.d.ts +16 -0
- package/dist/athletics.style.js +51 -0
- package/dist/atlas-entry.d.ts +6 -0
- package/dist/atlas-entry.js +4 -0
- package/dist/atlas.d.ts +207 -0
- package/dist/atlas.js +249 -0
- package/dist/background.d.ts +56 -0
- package/dist/background.js +127 -0
- package/dist/ballpark.d.ts +48 -0
- package/dist/ballpark.js +129 -0
- package/dist/canvas-entry.d.ts +2 -0
- package/dist/canvas-entry.js +2 -0
- package/dist/canvas.d.ts +85 -0
- package/dist/canvas.js +279 -0
- package/dist/charts-entry.d.ts +15 -0
- package/dist/charts-entry.js +11 -0
- package/dist/charts.athletics.d.ts +183 -0
- package/dist/charts.athletics.js +455 -0
- package/dist/charts.baseball.d.ts +30 -0
- package/dist/charts.baseball.js +152 -0
- package/dist/charts.curling.d.ts +52 -0
- package/dist/charts.curling.heat.d.ts +24 -0
- package/dist/charts.curling.heat.js +116 -0
- package/dist/charts.curling.js +207 -0
- package/dist/charts.d.ts +172 -0
- package/dist/charts.js +508 -0
- package/dist/charts.network.d.ts +66 -0
- package/dist/charts.network.js +64 -0
- package/dist/charts.pool.d.ts +67 -0
- package/dist/charts.pool.js +76 -0
- package/dist/charts.skating.d.ts +204 -0
- package/dist/charts.skating.js +426 -0
- package/dist/charts.soccer.d.ts +43 -0
- package/dist/charts.soccer.js +191 -0
- package/dist/charts.types.d.ts +448 -0
- package/dist/charts.types.js +1 -0
- package/dist/colour.d.ts +29 -0
- package/dist/colour.js +97 -0
- package/dist/common.d.ts +14 -0
- package/dist/common.js +32 -0
- package/dist/court.d.ts +172 -0
- package/dist/court.js +343 -0
- package/dist/court.more.d.ts +46 -0
- package/dist/court.more.js +219 -0
- package/dist/courts.style.d.ts +32 -0
- package/dist/courts.style.js +101 -0
- package/dist/cricket.board.d.ts +18 -0
- package/dist/cricket.board.js +67 -0
- package/dist/crowd.d.ts +154 -0
- package/dist/crowd.draw.d.ts +17 -0
- package/dist/crowd.draw.js +198 -0
- package/dist/crowd.js +465 -0
- package/dist/crowd.park.d.ts +19 -0
- package/dist/crowd.park.js +153 -0
- package/dist/curling.board.d.ts +24 -0
- package/dist/curling.board.js +147 -0
- package/dist/curling.stats.d.ts +271 -0
- package/dist/curling.stats.js +301 -0
- package/dist/d3-entry.d.ts +3 -0
- package/dist/d3-entry.js +2 -0
- package/dist/d3.d.ts +45 -0
- package/dist/d3.js +56 -0
- package/dist/draw.d.ts +68 -0
- package/dist/draw.js +988 -0
- package/dist/element-define.d.ts +2 -0
- package/dist/element-define.js +4 -0
- package/dist/element-entry.d.ts +1 -0
- package/dist/element-entry.js +2 -0
- package/dist/element.d.ts +50 -0
- package/dist/element.js +395 -0
- package/dist/eras-entry.d.ts +2 -0
- package/dist/eras-entry.js +2 -0
- package/dist/eras.d.ts +204 -0
- package/dist/eras.js +396 -0
- package/dist/events-entry.d.ts +3 -0
- package/dist/events-entry.js +3 -0
- package/dist/events.d.ts +54 -0
- package/dist/events.data.d.ts +59 -0
- package/dist/events.data.js +297 -0
- package/dist/events.js +127 -0
- package/dist/features.d.ts +31 -0
- package/dist/features.js +415 -0
- package/dist/field.score.d.ts +5 -0
- package/dist/field.score.js +33 -0
- package/dist/fields/afl.d.ts +11 -0
- package/dist/fields/afl.js +103 -0
- package/dist/fields/cricket.d.ts +9 -0
- package/dist/fields/cricket.js +81 -0
- package/dist/fields/fieldhockey.d.ts +6 -0
- package/dist/fields/fieldhockey.js +81 -0
- package/dist/fields/gaelic.d.ts +10 -0
- package/dist/fields/gaelic.js +86 -0
- package/dist/fields/handball.d.ts +6 -0
- package/dist/fields/handball.js +85 -0
- package/dist/fields/lacrosse.d.ts +17 -0
- package/dist/fields/lacrosse.js +169 -0
- package/dist/fields/rugby.d.ts +10 -0
- package/dist/fields/rugby.js +130 -0
- package/dist/fields.d.ts +12 -0
- package/dist/fields.js +44 -0
- package/dist/fields.kit.d.ts +63 -0
- package/dist/fields.kit.js +108 -0
- package/dist/fields.style.d.ts +4 -0
- package/dist/fields.style.js +19 -0
- package/dist/fields.types.d.ts +169 -0
- package/dist/fields.types.js +1 -0
- package/dist/format.d.ts +10 -0
- package/dist/format.js +28 -0
- package/dist/formations.d.ts +18 -0
- package/dist/formations.js +211 -0
- package/dist/frames-entry.d.ts +8 -0
- package/dist/frames-entry.js +7 -0
- package/dist/frames.d.ts +199 -0
- package/dist/frames.js +271 -0
- package/dist/frames.providers.d.ts +16 -0
- package/dist/frames.providers.js +357 -0
- package/dist/geojson-entry.d.ts +2 -0
- package/dist/geojson-entry.js +2 -0
- package/dist/geojson.d.ts +79 -0
- package/dist/geojson.js +150 -0
- package/dist/geometry-entry.d.ts +8 -0
- package/dist/geometry-entry.js +6 -0
- package/dist/geometry.d.ts +315 -0
- package/dist/geometry.js +438 -0
- package/dist/grounds-entry.d.ts +4 -0
- package/dist/grounds-entry.js +3 -0
- package/dist/grounds.d.ts +138 -0
- package/dist/grounds.data.d.ts +2 -0
- package/dist/grounds.data.js +1861 -0
- package/dist/grounds.js +74 -0
- package/dist/hardwood.d.ts +31 -0
- package/dist/hardwood.js +157 -0
- package/dist/heat.colour.d.ts +37 -0
- package/dist/heat.colour.js +54 -0
- package/dist/heat.d.ts +43 -0
- package/dist/heat.js +615 -0
- package/dist/heat.stats.d.ts +123 -0
- package/dist/heat.stats.js +413 -0
- package/dist/heat.types.d.ts +150 -0
- package/dist/heat.types.js +1 -0
- package/dist/heat.zones.d.ts +54 -0
- package/dist/heat.zones.js +572 -0
- package/dist/homeside.d.ts +16 -0
- package/dist/homeside.js +60 -0
- package/dist/index.d.ts +61 -0
- package/dist/index.js +38 -0
- package/dist/layers-entry.d.ts +19 -0
- package/dist/layers-entry.js +11 -0
- package/dist/layers.d.ts +41 -0
- package/dist/layers.env.d.ts +74 -0
- package/dist/layers.env.js +81 -0
- package/dist/layers.js +533 -0
- package/dist/layers.marks.d.ts +45 -0
- package/dist/layers.marks.js +168 -0
- package/dist/layers.types.d.ts +226 -0
- package/dist/layers.types.js +1 -0
- package/dist/layout.d.ts +97 -0
- package/dist/layout.js +381 -0
- package/dist/layout.style.d.ts +6 -0
- package/dist/layout.style.js +17 -0
- package/dist/layouts-entry.d.ts +5 -0
- package/dist/layouts-entry.js +4 -0
- package/dist/leagues/athletics.d.ts +63 -0
- package/dist/leagues/athletics.js +87 -0
- package/dist/leagues/aussie.d.ts +57 -0
- package/dist/leagues/aussie.js +36 -0
- package/dist/leagues/baseball.d.ts +58 -0
- package/dist/leagues/baseball.js +171 -0
- package/dist/leagues/basketball.d.ts +67 -0
- package/dist/leagues/basketball.js +128 -0
- package/dist/leagues/courts.d.ts +477 -0
- package/dist/leagues/courts.js +268 -0
- package/dist/leagues/cricket.d.ts +45 -0
- package/dist/leagues/cricket.js +34 -0
- package/dist/leagues/curling.d.ts +64 -0
- package/dist/leagues/curling.js +53 -0
- package/dist/leagues/fieldhockey.d.ts +48 -0
- package/dist/leagues/fieldhockey.js +29 -0
- package/dist/leagues/fields.d.ts +10 -0
- package/dist/leagues/fields.js +6 -0
- package/dist/leagues/football.d.ts +8 -0
- package/dist/leagues/football.js +82 -0
- package/dist/leagues/gaelic.d.ts +50 -0
- package/dist/leagues/gaelic.js +29 -0
- package/dist/leagues/handball.d.ts +45 -0
- package/dist/leagues/handball.js +32 -0
- package/dist/leagues/hockey.d.ts +63 -0
- package/dist/leagues/hockey.js +166 -0
- package/dist/leagues/lacrosse.d.ts +103 -0
- package/dist/leagues/lacrosse.js +175 -0
- package/dist/leagues/rugby.d.ts +59 -0
- package/dist/leagues/rugby.js +72 -0
- package/dist/leagues/skating.d.ts +145 -0
- package/dist/leagues/skating.js +73 -0
- package/dist/leagues/sources.d.ts +18 -0
- package/dist/leagues/sources.js +115 -0
- package/dist/leagues/types.d.ts +43 -0
- package/dist/leagues/types.js +5 -0
- package/dist/leagues-entry.d.ts +25 -0
- package/dist/leagues-entry.js +16 -0
- package/dist/leagues.d.ts +182 -0
- package/dist/leagues.js +603 -0
- package/dist/look.d.ts +50 -0
- package/dist/look.js +219 -0
- package/dist/mark.d.ts +35 -0
- package/dist/mark.js +59 -0
- package/dist/mount-entry.d.ts +2 -0
- package/dist/mount-entry.js +2 -0
- package/dist/mount.d.ts +63 -0
- package/dist/mount.js +167 -0
- package/dist/mow.d.ts +36 -0
- package/dist/mow.js +111 -0
- package/dist/names.d.ts +77 -0
- package/dist/names.js +97 -0
- package/dist/outline.d.ts +25 -0
- package/dist/outline.js +140 -0
- package/dist/pageant.d.ts +120 -0
- package/dist/pageant.draw.d.ts +21 -0
- package/dist/pageant.draw.js +171 -0
- package/dist/pageant.js +207 -0
- package/dist/pageant.style.d.ts +8 -0
- package/dist/pageant.style.js +42 -0
- package/dist/parks-entry.d.ts +4 -0
- package/dist/parks-entry.js +3 -0
- package/dist/parks.d.ts +200 -0
- package/dist/parks.data.d.ts +2 -0
- package/dist/parks.data.js +4489 -0
- package/dist/parks.js +92 -0
- package/dist/plot-entry.d.ts +2 -0
- package/dist/plot-entry.js +2 -0
- package/dist/plot.d.ts +74 -0
- package/dist/plot.js +68 -0
- package/dist/png-entry.d.ts +2 -0
- package/dist/png-entry.js +2 -0
- package/dist/png.d.ts +33 -0
- package/dist/png.js +66 -0
- package/dist/pool.d.ts +176 -0
- package/dist/pool.figures.d.ts +304 -0
- package/dist/pool.figures.js +144 -0
- package/dist/pool.js +304 -0
- package/dist/pool.kit.d.ts +48 -0
- package/dist/pool.kit.js +141 -0
- package/dist/pool.labels.d.ts +20 -0
- package/dist/pool.labels.js +257 -0
- package/dist/pool.race.d.ts +65 -0
- package/dist/pool.race.js +140 -0
- package/dist/pool.replay.d.ts +46 -0
- package/dist/pool.replay.js +127 -0
- package/dist/pool.section.d.ts +13 -0
- package/dist/pool.section.js +83 -0
- package/dist/pool.style.d.ts +20 -0
- package/dist/pool.style.js +169 -0
- package/dist/pool.types.d.ts +145 -0
- package/dist/pool.types.js +3 -0
- package/dist/pool.words.d.ts +13 -0
- package/dist/pool.words.js +101 -0
- package/dist/ranges.d.ts +33 -0
- package/dist/ranges.js +178 -0
- package/dist/ranges.names.d.ts +31 -0
- package/dist/ranges.names.js +109 -0
- package/dist/react-entry.d.ts +2 -0
- package/dist/react-entry.js +2 -0
- package/dist/react.d.ts +53 -0
- package/dist/react.js +58 -0
- package/dist/replay-entry.d.ts +8 -0
- package/dist/replay-entry.js +6 -0
- package/dist/replay.control.d.ts +47 -0
- package/dist/replay.control.js +184 -0
- package/dist/replay.d.ts +170 -0
- package/dist/replay.dom.d.ts +21 -0
- package/dist/replay.dom.js +388 -0
- package/dist/replay.js +579 -0
- package/dist/replay.types.d.ts +152 -0
- package/dist/replay.types.js +1 -0
- package/dist/restyle.d.ts +21 -0
- package/dist/restyle.js +70 -0
- package/dist/road.d.ts +26 -0
- package/dist/road.draw.d.ts +6 -0
- package/dist/road.draw.js +269 -0
- package/dist/road.js +59 -0
- package/dist/road.model.d.ts +63 -0
- package/dist/road.model.js +215 -0
- package/dist/road.style.d.ts +7 -0
- package/dist/road.style.js +26 -0
- package/dist/road.types.d.ts +122 -0
- package/dist/road.types.js +1 -0
- package/dist/scene-entry.d.ts +7 -0
- package/dist/scene-entry.js +5 -0
- package/dist/scene.css.d.ts +44 -0
- package/dist/scene.css.js +296 -0
- package/dist/scene.d.ts +27 -0
- package/dist/scene.fit.d.ts +12 -0
- package/dist/scene.fit.js +18 -0
- package/dist/scene.flat.d.ts +38 -0
- package/dist/scene.flat.js +167 -0
- package/dist/scene.js +420 -0
- package/dist/scene.path.d.ts +40 -0
- package/dist/scene.path.js +357 -0
- package/dist/scene.types.d.ts +172 -0
- package/dist/scene.types.js +1 -0
- package/dist/scene.xml.d.ts +31 -0
- package/dist/scene.xml.js +81 -0
- package/dist/score.d.ts +70 -0
- package/dist/score.js +277 -0
- package/dist/sets.board.d.ts +22 -0
- package/dist/sets.board.js +89 -0
- package/dist/sheet.d.ts +21 -0
- package/dist/sheet.js +42 -0
- package/dist/skating/describe.d.ts +7 -0
- package/dist/skating/describe.js +44 -0
- package/dist/skating/events.d.ts +24 -0
- package/dist/skating/events.js +47 -0
- package/dist/skating/figure.d.ts +24 -0
- package/dist/skating/figure.js +37 -0
- package/dist/skating/long.d.ts +54 -0
- package/dist/skating/long.js +111 -0
- package/dist/skating/parts.d.ts +43 -0
- package/dist/skating/parts.js +40 -0
- package/dist/skating/plan.d.ts +55 -0
- package/dist/skating/plan.js +197 -0
- package/dist/skating/short.d.ts +47 -0
- package/dist/skating/short.js +89 -0
- package/dist/skating/track.d.ts +66 -0
- package/dist/skating/track.js +94 -0
- package/dist/skating/types.d.ts +57 -0
- package/dist/skating/types.js +3 -0
- package/dist/skating-entry.d.ts +17 -0
- package/dist/skating-entry.js +11 -0
- package/dist/skating.style.d.ts +4 -0
- package/dist/skating.style.js +24 -0
- package/dist/special.d.ts +44 -0
- package/dist/special.js +204 -0
- package/dist/special.style.d.ts +8 -0
- package/dist/special.style.js +36 -0
- package/dist/strings.d.ts +877 -0
- package/dist/strings.js +728 -0
- package/dist/style.d.ts +37 -0
- package/dist/style.js +187 -0
- package/dist/surfaces/artistic.d.ts +9 -0
- package/dist/surfaces/artistic.js +94 -0
- package/dist/surfaces/athletics.d.ts +16 -0
- package/dist/surfaces/athletics.js +132 -0
- package/dist/surfaces/baseball.d.ts +33 -0
- package/dist/surfaces/baseball.js +223 -0
- package/dist/surfaces/baseball.walls.d.ts +16 -0
- package/dist/surfaces/baseball.walls.js +150 -0
- package/dist/surfaces/basketball.d.ts +8 -0
- package/dist/surfaces/basketball.floor.d.ts +27 -0
- package/dist/surfaces/basketball.floor.js +83 -0
- package/dist/surfaces/basketball.gear.d.ts +27 -0
- package/dist/surfaces/basketball.gear.js +90 -0
- package/dist/surfaces/basketball.js +221 -0
- package/dist/surfaces/curling.d.ts +39 -0
- package/dist/surfaces/curling.fold.d.ts +67 -0
- package/dist/surfaces/curling.fold.js +107 -0
- package/dist/surfaces/curling.js +162 -0
- package/dist/surfaces/dive.d.ts +9 -0
- package/dist/surfaces/dive.js +128 -0
- package/dist/surfaces/field.d.ts +17 -0
- package/dist/surfaces/field.js +169 -0
- package/dist/surfaces/football.d.ts +12 -0
- package/dist/surfaces/football.js +208 -0
- package/dist/surfaces/hockey.d.ts +10 -0
- package/dist/surfaces/hockey.js +167 -0
- package/dist/surfaces/net.d.ts +8 -0
- package/dist/surfaces/net.js +296 -0
- package/dist/surfaces/polo.d.ts +12 -0
- package/dist/surfaces/polo.js +159 -0
- package/dist/surfaces/pool.d.ts +27 -0
- package/dist/surfaces/pool.js +198 -0
- package/dist/surfaces/skating.d.ts +6 -0
- package/dist/surfaces/skating.js +62 -0
- package/dist/surfaces/soccer-providers.d.ts +124 -0
- package/dist/surfaces/soccer-providers.js +334 -0
- package/dist/surfaces/soccer-spec.d.ts +138 -0
- package/dist/surfaces/soccer-spec.js +175 -0
- package/dist/surfaces/soccer.d.ts +25 -0
- package/dist/surfaces/soccer.js +271 -0
- package/dist/surfaces/surface.d.ts +224 -0
- package/dist/surfaces/surface.js +49 -0
- package/dist/surfaces/venue.d.ts +15 -0
- package/dist/surfaces/venue.js +95 -0
- package/dist/team.common.d.ts +75 -0
- package/dist/team.common.js +97 -0
- package/dist/team.formation.d.ts +24 -0
- package/dist/team.formation.js +121 -0
- package/dist/team.geometry.d.ts +66 -0
- package/dist/team.geometry.js +304 -0
- package/dist/team.layers.d.ts +16 -0
- package/dist/team.layers.js +32 -0
- package/dist/team.motion.d.ts +9 -0
- package/dist/team.motion.js +325 -0
- package/dist/team.network.d.ts +43 -0
- package/dist/team.network.js +215 -0
- package/dist/team.shape.d.ts +12 -0
- package/dist/team.shape.js +217 -0
- package/dist/team.types.d.ts +189 -0
- package/dist/team.types.js +1 -0
- package/dist/tenants.d.ts +77 -0
- package/dist/tenants.data.d.ts +8 -0
- package/dist/tenants.data.js +945 -0
- package/dist/tenants.js +46 -0
- package/dist/text.d.ts +31 -0
- package/dist/text.js +88 -0
- package/dist/themes.d.ts +14 -0
- package/dist/themes.js +24 -0
- package/dist/turn-entry.d.ts +12 -0
- package/dist/turn-entry.js +7 -0
- package/dist/turn.camera.d.ts +105 -0
- package/dist/turn.camera.js +168 -0
- package/dist/turn.dom.d.ts +40 -0
- package/dist/turn.dom.js +351 -0
- package/dist/turn.kit.d.ts +86 -0
- package/dist/turn.kit.js +110 -0
- package/dist/turn.markup.d.ts +48 -0
- package/dist/turn.markup.js +108 -0
- package/dist/turn.model.d.ts +78 -0
- package/dist/turn.model.js +91 -0
- package/dist/turn.style.d.ts +5 -0
- package/dist/turn.style.js +55 -0
- package/dist/types.d.ts +730 -0
- package/dist/types.js +1 -0
- package/dist/units.d.ts +45 -0
- package/dist/units.js +104 -0
- package/dist/uprights.board.d.ts +17 -0
- package/dist/uprights.board.js +59 -0
- package/dist/uprights.d.ts +37 -0
- package/dist/uprights.fields.d.ts +32 -0
- package/dist/uprights.fields.js +172 -0
- package/dist/uprights.goal.d.ts +49 -0
- package/dist/uprights.goal.js +69 -0
- package/dist/uprights.js +160 -0
- package/dist/uprights.more.d.ts +7 -0
- package/dist/uprights.more.js +183 -0
- package/dist/uprights.net.d.ts +12 -0
- package/dist/uprights.net.js +109 -0
- package/dist/uprights.netkit.d.ts +28 -0
- package/dist/uprights.netkit.js +67 -0
- package/dist/uprights.pools.d.ts +8 -0
- package/dist/uprights.pools.js +190 -0
- package/dist/uprights.rinks.d.ts +27 -0
- package/dist/uprights.rinks.js +106 -0
- package/dist/uprights.track.d.ts +50 -0
- package/dist/uprights.track.js +246 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +2 -0
- package/package.json +251 -4
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import type { HeatRamp } from "./heat.colour.ts";
|
|
2
|
+
import type { HexOrientation, Reducer, StatisticName } from "./heat.stats.ts";
|
|
3
|
+
import type { ZoneSetId } from "./heat.zones.ts";
|
|
4
|
+
import type { LayerBase, MarkDatum } from "./layers.types.ts";
|
|
5
|
+
import type { Box } from "./types.ts";
|
|
6
|
+
export type { HeatRamp, HeatRampName } from "./heat.colour.ts";
|
|
7
|
+
export type { HexOrientation, Reducer, StatisticName } from "./heat.stats.ts";
|
|
8
|
+
export type { ZoneSetId } from "./heat.zones.ts";
|
|
9
|
+
/** A statistic: a name, or a function of a bin's values (the median is the median of them; a function gets them all). */
|
|
10
|
+
export type HeatStatistic = StatisticName | Reducer;
|
|
11
|
+
/** A point to count: where it is, and optionally a number it carries (`value`: a distance, an expected-goals figure, a speed) and an outcome (`made`, `goal`) for the `rate` statistic. */
|
|
12
|
+
export interface HeatDatum extends MarkDatum {
|
|
13
|
+
x: number | null;
|
|
14
|
+
y: number | null;
|
|
15
|
+
}
|
|
16
|
+
/** Where to write the number of a cell or zone, and which. */
|
|
17
|
+
export interface HeatLabels {
|
|
18
|
+
/** What to write, a line each: the `value`, the `name` of a zone, the `count` of marks in it, its `share` of all of them (a percent) or the `ratio` of hits to marks (`13/31`). The value by default. */
|
|
19
|
+
show?: readonly ("value" | "name" | "count" | "share" | "ratio")[];
|
|
20
|
+
/** Decimal places of the value. A whole number for a count, and one place for a percent below 10, by default. */
|
|
21
|
+
decimals?: number;
|
|
22
|
+
/** The height of the letters in the layer's units. Follows the cell or the zone by default. */
|
|
23
|
+
size?: number;
|
|
24
|
+
/** Write nothing for a cell or zone with fewer marks than this. */
|
|
25
|
+
minCount?: number;
|
|
26
|
+
}
|
|
27
|
+
/** A colour bar with ticks, drawn on the surface. */
|
|
28
|
+
export interface HeatLegend {
|
|
29
|
+
/** Where it sits on the surface: `bottom` (the middle of the lower edge) by default, or a corner. A ballpark's default is its lower right, outside the foul lines. */
|
|
30
|
+
position?: "bottom" | "top" | "bottom-left" | "bottom-right" | "top-left" | "top-right";
|
|
31
|
+
/** The legend's heading. The name of the statistic by default. */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** About how many ticks. 5 by default. */
|
|
34
|
+
ticks?: number;
|
|
35
|
+
/** The opacity of the legend, 0 to 1. */
|
|
36
|
+
opacity?: number;
|
|
37
|
+
/** Size and place the legend against this part of the surface, in feet in the drawing's frame (x along the surface, y across it), instead of the whole of what is shown: the half of a curling sheet that is drawn, say. */
|
|
38
|
+
region?: Box;
|
|
39
|
+
}
|
|
40
|
+
/** What the heat layers take beyond a layer's places. */
|
|
41
|
+
export interface HeatBase extends LayerBase {
|
|
42
|
+
data: readonly HeatDatum[];
|
|
43
|
+
/** What each cell or zone shows: `count` (the default), `sum`, `mean`, `median`, `max` or `min` of the marks' `value`, `percent` (a share of all the marks, 0 to 100), `rate` (the percent of the marks whose `outcome` is a success; see `success`) or a function `(values, { count, hits, total }) => number | null`. */
|
|
44
|
+
statistic?: HeatStatistic;
|
|
45
|
+
/** The statistic's name in the legend and the summary, when it is a function of your own. */
|
|
46
|
+
statisticName?: string;
|
|
47
|
+
/** Rescale the values after the statistic: `max` (each divided by the greatest, 0 to 1), `sum` (each as a share of the total, 0 to 1) or `percent` (as `sum`, 0 to 100). `none` by default. */
|
|
48
|
+
normalize?: "none" | "max" | "sum" | "percent";
|
|
49
|
+
/** The colour ramp: a built-in name (`ember`, `ocean`, `mono`, `balance`, `tide`), a list of stops, or `{ light, dark }` lists. `ember`, or `balance` when `center` is given, by default. */
|
|
50
|
+
ramp?: HeatRamp;
|
|
51
|
+
/** The values the ramp spans, from its first colour to its last. The data's own range (from zero for a count, a sum or a percent) by default. */
|
|
52
|
+
domain?: readonly [number, number];
|
|
53
|
+
/** Make the ramp diverge from this value: the domain becomes symmetric about it and the middle of the ramp is the value. */
|
|
54
|
+
center?: number;
|
|
55
|
+
/** How many shades the ramp is cut into. 9 by default. */
|
|
56
|
+
steps?: number;
|
|
57
|
+
/** Write the numbers on the cells or zones. */
|
|
58
|
+
labels?: boolean | HeatLabels;
|
|
59
|
+
/** Draw a legend on the surface. */
|
|
60
|
+
legend?: boolean | HeatLegend;
|
|
61
|
+
/** Paint a pale (light page) or dark (dark page) ground under the cells so that the ramp is read against one colour whatever the surface. `plate` by default, `none` to see the surface as it is. */
|
|
62
|
+
ground?: "plate" | "none";
|
|
63
|
+
/** The opacity of the whole layer, 0 to 1. 0.92 by default. */
|
|
64
|
+
opacity?: number;
|
|
65
|
+
/** Outcomes that count as a success for the `rate` statistic. `made`, `goal`, `scored`, `hit`, `complete`, `success` and `won` by default. */
|
|
66
|
+
success?: readonly string[];
|
|
67
|
+
/** Leave out a cell or zone that holds fewer marks than this (a rate from two shots is not worth a colour). 1 by default. */
|
|
68
|
+
minCount?: number;
|
|
69
|
+
}
|
|
70
|
+
/** Bins on a grid: a number of bins, or the edges between them. */
|
|
71
|
+
export interface HeatBins {
|
|
72
|
+
/** A number of bins across, or a list of edges in the layer's coordinates. */
|
|
73
|
+
x?: number | readonly number[];
|
|
74
|
+
y?: number | readonly number[];
|
|
75
|
+
}
|
|
76
|
+
/** A binned statistic on a grid laid over the surface (hockey_rink's `heatmap`, mplsoccer's `bin_statistic` with `heatmap`). */
|
|
77
|
+
export interface HeatmapLayer extends HeatBase {
|
|
78
|
+
kind: "heatmap";
|
|
79
|
+
/** The bins. A number is how many across the surface's longer side, with square cells; `[across, down]` for both; or `{ x, y }` each a count or edges. About 24 across by default. */
|
|
80
|
+
bins?: number | readonly [number, number] | HeatBins;
|
|
81
|
+
/** Grid only part of the surface, in the layer's coordinates: the attacking half, say. The whole surface by default. */
|
|
82
|
+
extent?: {
|
|
83
|
+
x?: readonly [number, number];
|
|
84
|
+
y?: readonly [number, number];
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** A binned statistic on hexagons (hockey_rink's and mplsoccer's `hexbin`). */
|
|
88
|
+
export interface HexbinLayer extends HeatBase {
|
|
89
|
+
kind: "hexbin";
|
|
90
|
+
/** The distance from a hexagon's centre to its corner, in the layer's units. A twenty-eighth of the surface's length by default. */
|
|
91
|
+
size?: number;
|
|
92
|
+
/** A corner up (`pointy`, the default) or an edge up (`flat`). */
|
|
93
|
+
orientation?: HexOrientation;
|
|
94
|
+
}
|
|
95
|
+
/** A statistic by named zone of the surface. */
|
|
96
|
+
export interface ZonesLayer extends HeatBase {
|
|
97
|
+
kind: "zones";
|
|
98
|
+
/** The set of zones: `soccer-positional`, `soccer-thirds`, `soccer-channels`, `soccer-18`, `nba-shot`, `nhl-slot`, `nhl-home-plate`, `baseball-spray`, `baseball-retrosheet` or `football-pass`. */
|
|
99
|
+
zones: ZoneSetId;
|
|
100
|
+
/** The way the team attacks as the surface is drawn wide: names the sides and counts the soccer bands from the team's own end. `right` by default. */
|
|
101
|
+
direction?: "left" | "right";
|
|
102
|
+
/** For a surface with a zone chart at each end (the court, the rink): `left`, `right` or `both` (the default). */
|
|
103
|
+
end?: "left" | "right" | "both";
|
|
104
|
+
/** For `football-pass`: the line of scrimmage, in the layer's coordinates along the field. Midfield by default. */
|
|
105
|
+
los?: number;
|
|
106
|
+
/** For `baseball-spray`: the side the batter bats from, `R` (the default) or `L`; `pull` is then left or right field. `"none"` names the thirds left, centre and right field instead. */
|
|
107
|
+
bats?: "L" | "R" | "none";
|
|
108
|
+
}
|
|
109
|
+
/** The shape of a density's bandwidth. */
|
|
110
|
+
export type Bandwidth = number | readonly [number, number] | "scott";
|
|
111
|
+
/** A kernel density estimate of the marks, drawn as filled bands or lines (hockey_rink's `contour` and `contourf`, mplsoccer's `kdeplot`). */
|
|
112
|
+
export interface ContourLayer extends HeatBase {
|
|
113
|
+
kind: "contour";
|
|
114
|
+
/** The kernel's width, in the layer's units (one number, or one for each axis), or `scott` (the default: Scott's rule, each axis's spread times n^(-1/6)). */
|
|
115
|
+
bandwidth?: Bandwidth;
|
|
116
|
+
/** A multiple of the bandwidth: under 1 follows the data more closely, over 1 smooths it. 1 by default. */
|
|
117
|
+
smooth?: number;
|
|
118
|
+
/** The grid the density is computed on, nodes across and down. About 100 across by default. */
|
|
119
|
+
grid?: readonly [number, number];
|
|
120
|
+
/** How many contour levels (6 by default), or the levels themselves. */
|
|
121
|
+
levels?: number | readonly number[];
|
|
122
|
+
/** What the levels are: shares of the peak density (`peak`, the default; the lowest is `threshold`) or the shares of the data they enclose (`mass`, so that 0.5 is the smallest region holding half of it). */
|
|
123
|
+
by?: "peak" | "mass";
|
|
124
|
+
/** The lowest level as a share of the peak. 0.1 by default. */
|
|
125
|
+
threshold?: number;
|
|
126
|
+
/** Fill the bands (the default) or draw lines only. */
|
|
127
|
+
filled?: boolean;
|
|
128
|
+
/** Weight each mark by its `value`. */
|
|
129
|
+
weighted?: boolean;
|
|
130
|
+
/** Estimate only over part of the surface, in the layer's coordinates. The whole surface by default. */
|
|
131
|
+
extent?: {
|
|
132
|
+
x?: readonly [number, number];
|
|
133
|
+
y?: readonly [number, number];
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/** A colour bar on its own: for another layer (`for`, the `id` of an earlier or later heat layer) or with a ramp and a domain of its own. */
|
|
137
|
+
export interface LegendLayer extends Omit<LayerBase, "from" | "attacking" | "surfaceSize" | "anchors" | "limits"> {
|
|
138
|
+
kind: "legend";
|
|
139
|
+
for?: string;
|
|
140
|
+
ramp?: HeatRamp;
|
|
141
|
+
domain?: readonly [number, number];
|
|
142
|
+
center?: number;
|
|
143
|
+
steps?: number;
|
|
144
|
+
position?: HeatLegend["position"];
|
|
145
|
+
ticks?: number;
|
|
146
|
+
/** The opacity of the legend, 0 to 1. */
|
|
147
|
+
opacity?: number;
|
|
148
|
+
/** Size and place the legend against this part of the surface, as `HeatLegend.region` does. */
|
|
149
|
+
region?: Box;
|
|
150
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Outline } from "./outline.ts";
|
|
2
|
+
import type { KyogijoWords } from "./strings.ts";
|
|
3
|
+
import type { Sport, SurfaceOptions } from "./types.ts";
|
|
4
|
+
/** The zone sets. */
|
|
5
|
+
export type ZoneSetId = "field-thirds" | "cricket-ground" | "soccer-positional" | "soccer-thirds" | "soccer-channels" | "soccer-18" | "nba-shot" | "nhl-slot" | "nhl-home-plate" | "baseball-spray" | "baseball-retrosheet" | "football-pass" | "athletics-track" | "skating-track" | "curling-house" | "net-court" | "wall-court" | "roundnet-rings" | "pool-lanes" | "water-polo-areas" | "pool-thirds";
|
|
6
|
+
type Pt = readonly [number, number];
|
|
7
|
+
/** One zone: its shape on the surface and whether a point lies in it. */
|
|
8
|
+
export interface ZoneShape {
|
|
9
|
+
/** A name for the zone in the data (`restricted-area`, `wing-left-3`), the same in every language. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** The name to show, in the drawing's language. */
|
|
12
|
+
name: string;
|
|
13
|
+
/** The zone's outline as a path, in the drawing's frame (feet). */
|
|
14
|
+
d: string;
|
|
15
|
+
/** Where its label goes. */
|
|
16
|
+
label: Pt;
|
|
17
|
+
/** About how wide and how high a label can be without leaving the zone, in feet. */
|
|
18
|
+
room?: Pt;
|
|
19
|
+
/** Which end of the surface it is at, for a set that has a zone at each end. */
|
|
20
|
+
end?: "left" | "right";
|
|
21
|
+
/** True if the point lies in the zone. */
|
|
22
|
+
has(x: number, y: number): boolean;
|
|
23
|
+
}
|
|
24
|
+
/** A set of zones. Where zones overlap, the later one is on top, and a point belongs to the last zone that has it. */
|
|
25
|
+
export interface ZoneSet {
|
|
26
|
+
id: ZoneSetId;
|
|
27
|
+
zones: ZoneShape[];
|
|
28
|
+
/** The index of the zone a point belongs to, or -1 when it is in none. */
|
|
29
|
+
which(x: number, y: number): number;
|
|
30
|
+
}
|
|
31
|
+
/** What a zone set needs to know about the drawing and the layer. */
|
|
32
|
+
export interface ZoneContext {
|
|
33
|
+
o: Pick<SurfaceOptions, "sport" | "pitch" | "units"> & Partial<Pick<SurfaceOptions, "league" | "net" | "field" | "pool" | "athletics" | "skating">>;
|
|
34
|
+
outline: Outline;
|
|
35
|
+
/** The way the team attacks as the surface is drawn wide: names the sides and counts the bands from the team's own end. `right` by default. */
|
|
36
|
+
direction: "left" | "right";
|
|
37
|
+
/** `left` or `right` for one end of a basket-and-goal surface, or both. */
|
|
38
|
+
end: "left" | "right" | "both";
|
|
39
|
+
/** The line of scrimmage on a football field, as a distance from the left end line in feet. */
|
|
40
|
+
los: number | undefined;
|
|
41
|
+
/** Which side the batter bats from, for the baseball spray zones: `R` (the default) or `L`. `undefined` names the thirds left, centre and right field. */
|
|
42
|
+
bats: "L" | "R" | undefined;
|
|
43
|
+
words: KyogijoWords["layers"]["zones"];
|
|
44
|
+
}
|
|
45
|
+
/** Every zone set, with the sports it is for, the source of its definition and its title. */
|
|
46
|
+
export declare const ZONE_SETS: Readonly<Record<ZoneSetId, {
|
|
47
|
+
sports: readonly Sport[];
|
|
48
|
+
title: string;
|
|
49
|
+
source: string;
|
|
50
|
+
}>>;
|
|
51
|
+
export declare const ZONE_SET_IDS: readonly ZoneSetId[];
|
|
52
|
+
/** The zones of a set on the surface the context describes. Throws for a set that is not for the surface's sport. */
|
|
53
|
+
export declare function buildZoneSet(id: ZoneSetId, ctx: ZoneContext): ZoneSet;
|
|
54
|
+
export {};
|