@johnmorrisdotca/dougu-sports 0.28.1 → 0.30.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.
Files changed (474) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/NOTICE.md +1 -0
  3. package/README.md +71 -5
  4. package/dist/brands/brand.ball.d.ts +25 -2
  5. package/dist/brands/brand.ball.js +16 -1
  6. package/dist/brands/brand.data.d.ts +108 -5
  7. package/dist/brands/brand.data.js +32 -0
  8. package/dist/brands/brand.letters.d.ts +39 -4
  9. package/dist/brands/brand.letters.js +20 -2
  10. package/dist/brands/brand.render.d.ts +73 -6
  11. package/dist/brands/brand.render.js +35 -2
  12. package/dist/element.d.ts +32 -0
  13. package/dist/element.js +177 -0
  14. package/dist/emblems/award/badge.d.ts +8 -1
  15. package/dist/emblems/award/badge.js +8 -1
  16. package/dist/emblems/award/crown.d.ts +8 -1
  17. package/dist/emblems/award/crown.js +8 -1
  18. package/dist/emblems/award/medal.d.ts +8 -1
  19. package/dist/emblems/award/medal.js +8 -1
  20. package/dist/emblems/award/ribbon.d.ts +8 -1
  21. package/dist/emblems/award/ribbon.js +8 -1
  22. package/dist/emblems/award/shield.d.ts +8 -1
  23. package/dist/emblems/award/shield.js +8 -1
  24. package/dist/emblems/award/star.d.ts +8 -1
  25. package/dist/emblems/award/star.js +8 -1
  26. package/dist/emblems/ball/ball.afl.d.ts +8 -0
  27. package/dist/emblems/ball/ball.afl.js +8 -0
  28. package/dist/emblems/ball/ball.baseball.vintage.d.ts +40 -5
  29. package/dist/emblems/ball/ball.baseball.vintage.js +40 -5
  30. package/dist/emblems/ball/ball.basketball.d.ts +8 -0
  31. package/dist/emblems/ball/ball.basketball.js +8 -0
  32. package/dist/emblems/ball/ball.basketball3x3.d.ts +8 -0
  33. package/dist/emblems/ball/ball.basketball3x3.js +8 -0
  34. package/dist/emblems/ball/ball.basketball6.d.ts +8 -0
  35. package/dist/emblems/ball/ball.basketball6.js +8 -0
  36. package/dist/emblems/ball/ball.core.d.ts +16 -1
  37. package/dist/emblems/ball/ball.cricket.d.ts +24 -0
  38. package/dist/emblems/ball/ball.cricket.js +24 -0
  39. package/dist/emblems/ball/ball.curlingstone.d.ts +8 -0
  40. package/dist/emblems/ball/ball.curlingstone.js +8 -0
  41. package/dist/emblems/ball/ball.discus.d.ts +8 -0
  42. package/dist/emblems/ball/ball.discus.js +8 -0
  43. package/dist/emblems/ball/ball.face.d.ts +48 -4
  44. package/dist/emblems/ball/ball.fieldhockey.d.ts +8 -0
  45. package/dist/emblems/ball/ball.fieldhockey.js +8 -0
  46. package/dist/emblems/ball/ball.football.d.ts +24 -0
  47. package/dist/emblems/ball/ball.football.js +24 -0
  48. package/dist/emblems/ball/ball.gaelic.d.ts +16 -0
  49. package/dist/emblems/ball/ball.gaelic.js +16 -0
  50. package/dist/emblems/ball/ball.golf.d.ts +8 -0
  51. package/dist/emblems/ball/ball.golf.js +8 -0
  52. package/dist/emblems/ball/ball.hammer.d.ts +8 -0
  53. package/dist/emblems/ball/ball.hammer.js +8 -0
  54. package/dist/emblems/ball/ball.handball.d.ts +8 -0
  55. package/dist/emblems/ball/ball.handball.js +8 -0
  56. package/dist/emblems/ball/ball.index.d.ts +15 -4
  57. package/dist/emblems/ball/ball.index.js +8 -6
  58. package/dist/emblems/ball/ball.padel.d.ts +8 -0
  59. package/dist/emblems/ball/ball.padel.js +8 -0
  60. package/dist/emblems/ball/ball.pickleball.d.ts +16 -0
  61. package/dist/emblems/ball/ball.pickleball.js +16 -0
  62. package/dist/emblems/ball/ball.plastic.d.ts +38 -1
  63. package/dist/emblems/ball/ball.plastic.js +73 -0
  64. package/dist/emblems/ball/ball.print.d.ts +71 -7
  65. package/dist/emblems/ball/ball.print.js +8 -0
  66. package/dist/emblems/ball/ball.printable.d.ts +48 -0
  67. package/dist/emblems/ball/ball.printable.js +48 -0
  68. package/dist/emblems/ball/ball.puck.d.ts +8 -0
  69. package/dist/emblems/ball/ball.puck.js +8 -0
  70. package/dist/emblems/ball/ball.puck.print.d.ts +64 -0
  71. package/dist/emblems/ball/ball.puck.print.js +64 -0
  72. package/dist/emblems/ball/ball.roundnet.d.ts +8 -0
  73. package/dist/emblems/ball/ball.roundnet.js +8 -0
  74. package/dist/emblems/ball/ball.rugby.d.ts +8 -0
  75. package/dist/emblems/ball/ball.rugby.js +8 -0
  76. package/dist/emblems/ball/ball.sepaktakraw.d.ts +8 -0
  77. package/dist/emblems/ball/ball.sepaktakraw.js +8 -0
  78. package/dist/emblems/ball/ball.shuttlecock.d.ts +16 -0
  79. package/dist/emblems/ball/ball.shuttlecock.js +16 -0
  80. package/dist/emblems/ball/ball.sliotar.d.ts +8 -0
  81. package/dist/emblems/ball/ball.sliotar.js +8 -0
  82. package/dist/emblems/ball/ball.smooth.d.ts +32 -0
  83. package/dist/emblems/ball/ball.smooth.js +32 -0
  84. package/dist/emblems/ball/ball.soccer.era.d.ts +96 -12
  85. package/dist/emblems/ball/ball.soccer.era.js +96 -12
  86. package/dist/emblems/ball/ball.soccer.indoor.d.ts +16 -0
  87. package/dist/emblems/ball/ball.soccer.indoor.js +16 -0
  88. package/dist/emblems/ball/ball.soccer.panels.d.ts +120 -0
  89. package/dist/emblems/ball/ball.soccer.panels.js +120 -0
  90. package/dist/emblems/ball/ball.soccer.store.d.ts +144 -0
  91. package/dist/emblems/ball/ball.soccer.store.js +144 -0
  92. package/dist/emblems/ball/ball.soccer.vintage.d.ts +40 -5
  93. package/dist/emblems/ball/ball.soccer.vintage.js +40 -5
  94. package/dist/emblems/ball/ball.squash.d.ts +40 -0
  95. package/dist/emblems/ball/ball.squash.js +40 -0
  96. package/dist/emblems/ball/ball.tennis.d.ts +8 -0
  97. package/dist/emblems/ball/ball.tennis.js +8 -0
  98. package/dist/emblems/ball/ball.teqball.d.ts +8 -0
  99. package/dist/emblems/ball/ball.teqball.js +8 -0
  100. package/dist/emblems/ball/ball.volleyball.d.ts +24 -0
  101. package/dist/emblems/ball/ball.volleyball.flag.d.ts +88 -0
  102. package/dist/emblems/ball/ball.volleyball.flag.js +88 -0
  103. package/dist/emblems/ball/ball.volleyball.js +24 -0
  104. package/dist/emblems/ball/ball.waterpolo.d.ts +8 -0
  105. package/dist/emblems/ball/ball.waterpolo.js +8 -0
  106. package/dist/emblems/crest/diamond.d.ts +8 -1
  107. package/dist/emblems/crest/diamond.js +8 -1
  108. package/dist/emblems/crest/pennant.d.ts +8 -1
  109. package/dist/emblems/crest/pennant.js +8 -1
  110. package/dist/emblems/crest/roundel.d.ts +8 -1
  111. package/dist/emblems/crest/roundel.js +8 -1
  112. package/dist/emblems/crest/shield.d.ts +8 -1
  113. package/dist/emblems/crest/shield.js +8 -1
  114. package/dist/emblems/emblem.api.d.ts +178 -17
  115. package/dist/emblems/emblem.api.js +138 -13
  116. package/dist/emblems/emblem.core.d.ts +104 -8
  117. package/dist/emblems/emblem.core.js +32 -2
  118. package/dist/emblems/emblem.descriptions.d.ts +17 -1
  119. package/dist/emblems/emblem.descriptions.js +11 -0
  120. package/dist/emblems/emblem.display.d.ts +53 -5
  121. package/dist/emblems/emblem.display.js +6 -0
  122. package/dist/emblems/emblem.embed.d.ts +68 -0
  123. package/dist/emblems/emblem.embed.js +65 -0
  124. package/dist/emblems/emblem.equipment.d.ts +12 -1
  125. package/dist/emblems/emblem.equipment.js +2 -0
  126. package/dist/emblems/emblem.ids.d.ts +273 -18
  127. package/dist/emblems/emblem.ids.js +137 -15
  128. package/dist/emblems/emblem.lathe.d.ts +70 -6
  129. package/dist/emblems/emblem.named.d.ts +37 -4
  130. package/dist/emblems/emblem.named.js +18 -2
  131. package/dist/emblems/emblem.registry.d.ts +8 -1
  132. package/dist/emblems/emblem.registry.js +8 -1
  133. package/dist/emblems/emblem.shapes.d.ts +25 -2
  134. package/dist/emblems/emblem.sprite.d.ts +33 -3
  135. package/dist/emblems/emblem.sprite.js +3 -0
  136. package/dist/emblems/emblem.uri.d.ts +13 -1
  137. package/dist/emblems/emblem.uri.js +3 -0
  138. package/dist/emblems/gear/gear.badmintonracket.d.ts +8 -0
  139. package/dist/emblems/gear/gear.badmintonracket.js +8 -0
  140. package/dist/emblems/gear/gear.baseballcap.d.ts +8 -0
  141. package/dist/emblems/gear/gear.baseballcap.js +8 -0
  142. package/dist/emblems/gear/gear.baseballglove.d.ts +8 -0
  143. package/dist/emblems/gear/gear.baseballglove.js +8 -0
  144. package/dist/emblems/gear/gear.budo.d.ts +224 -4
  145. package/dist/emblems/gear/gear.budo.js +205 -3
  146. package/dist/emblems/gear/gear.budo.steps.d.ts +68 -1
  147. package/dist/emblems/gear/gear.budo.steps.js +59 -1
  148. package/dist/emblems/gear/gear.cricketbat.d.ts +8 -0
  149. package/dist/emblems/gear/gear.cricketbat.js +8 -0
  150. package/dist/emblems/gear/gear.field.d.ts +48 -0
  151. package/dist/emblems/gear/gear.field.js +48 -0
  152. package/dist/emblems/gear/gear.fieldhockeystick.d.ts +8 -0
  153. package/dist/emblems/gear/gear.fieldhockeystick.js +8 -0
  154. package/dist/emblems/gear/gear.footballhelmet.d.ts +8 -0
  155. package/dist/emblems/gear/gear.footballhelmet.js +8 -0
  156. package/dist/emblems/gear/gear.goaliemask.d.ts +8 -0
  157. package/dist/emblems/gear/gear.goaliemask.js +8 -0
  158. package/dist/emblems/gear/gear.goalnet.d.ts +8 -0
  159. package/dist/emblems/gear/gear.goalnet.js +8 -0
  160. package/dist/emblems/gear/gear.hockeystick.d.ts +8 -0
  161. package/dist/emblems/gear/gear.hockeystick.js +8 -0
  162. package/dist/emblems/gear/gear.kendo.d.ts +16 -0
  163. package/dist/emblems/gear/gear.kendo.js +16 -0
  164. package/dist/emblems/gear/gear.kyudo.d.ts +16 -0
  165. package/dist/emblems/gear/gear.kyudo.js +16 -0
  166. package/dist/emblems/gear/gear.lacrossestick.d.ts +8 -0
  167. package/dist/emblems/gear/gear.lacrossestick.js +8 -0
  168. package/dist/emblems/gear/gear.nets.d.ts +24 -0
  169. package/dist/emblems/gear/gear.nets.js +24 -0
  170. package/dist/emblems/gear/gear.rackets.d.ts +32 -0
  171. package/dist/emblems/gear/gear.rackets.js +32 -0
  172. package/dist/emblems/gear/gear.skates.d.ts +24 -0
  173. package/dist/emblems/gear/gear.skates.js +24 -0
  174. package/dist/emblems/gear/gear.sticks.d.ts +24 -0
  175. package/dist/emblems/gear/gear.sticks.js +24 -0
  176. package/dist/emblems/gear/gear.sumo.d.ts +16 -0
  177. package/dist/emblems/gear/gear.sumo.js +16 -0
  178. package/dist/emblems/gear/gear.tabletennispaddle.d.ts +8 -0
  179. package/dist/emblems/gear/gear.tabletennispaddle.js +8 -0
  180. package/dist/emblems/gear/gear.tennisracket.d.ts +8 -0
  181. package/dist/emblems/gear/gear.tennisracket.js +8 -0
  182. package/dist/emblems/gear/gear.track.d.ts +32 -0
  183. package/dist/emblems/gear/gear.track.js +32 -0
  184. package/dist/emblems/gear/gear.water.d.ts +16 -0
  185. package/dist/emblems/gear/gear.water.js +16 -0
  186. package/dist/emblems/medal/bronze.d.ts +8 -1
  187. package/dist/emblems/medal/bronze.js +8 -1
  188. package/dist/emblems/medal/gold.d.ts +8 -1
  189. package/dist/emblems/medal/gold.js +8 -1
  190. package/dist/emblems/medal/place-1.d.ts +8 -1
  191. package/dist/emblems/medal/place-1.js +8 -1
  192. package/dist/emblems/medal/place-2.d.ts +8 -1
  193. package/dist/emblems/medal/place-2.js +8 -1
  194. package/dist/emblems/medal/place-3.d.ts +8 -1
  195. package/dist/emblems/medal/place-3.js +8 -1
  196. package/dist/emblems/medal/silver.d.ts +8 -1
  197. package/dist/emblems/medal/silver.js +8 -1
  198. package/dist/emblems/pennant/championship.d.ts +8 -1
  199. package/dist/emblems/pennant/championship.js +8 -1
  200. package/dist/emblems/sport/afl.d.ts +8 -1
  201. package/dist/emblems/sport/afl.js +8 -1
  202. package/dist/emblems/sport/artisticswimming.d.ts +8 -1
  203. package/dist/emblems/sport/artisticswimming.js +8 -1
  204. package/dist/emblems/sport/athletics.d.ts +8 -1
  205. package/dist/emblems/sport/athletics.js +8 -1
  206. package/dist/emblems/sport/badminton.d.ts +8 -1
  207. package/dist/emblems/sport/badminton.js +8 -1
  208. package/dist/emblems/sport/boxing.d.ts +8 -1
  209. package/dist/emblems/sport/boxing.js +8 -1
  210. package/dist/emblems/sport/cfl.d.ts +8 -1
  211. package/dist/emblems/sport/cfl.js +8 -1
  212. package/dist/emblems/sport/cricket.d.ts +8 -1
  213. package/dist/emblems/sport/cricket.js +8 -1
  214. package/dist/emblems/sport/curling.d.ts +8 -1
  215. package/dist/emblems/sport/curling.js +8 -1
  216. package/dist/emblems/sport/diving.d.ts +8 -1
  217. package/dist/emblems/sport/diving.js +8 -1
  218. package/dist/emblems/sport/fieldhockey.d.ts +8 -1
  219. package/dist/emblems/sport/fieldhockey.js +8 -1
  220. package/dist/emblems/sport/gaelic.d.ts +8 -1
  221. package/dist/emblems/sport/gaelic.js +8 -1
  222. package/dist/emblems/sport/handball.d.ts +8 -1
  223. package/dist/emblems/sport/handball.js +8 -1
  224. package/dist/emblems/sport/ifaf.d.ts +8 -1
  225. package/dist/emblems/sport/ifaf.js +8 -1
  226. package/dist/emblems/sport/judo.d.ts +8 -1
  227. package/dist/emblems/sport/judo.js +8 -1
  228. package/dist/emblems/sport/karate.d.ts +8 -1
  229. package/dist/emblems/sport/karate.js +8 -1
  230. package/dist/emblems/sport/kendo.d.ts +8 -1
  231. package/dist/emblems/sport/kendo.js +8 -1
  232. package/dist/emblems/sport/kyudo.d.ts +8 -1
  233. package/dist/emblems/sport/kyudo.js +8 -1
  234. package/dist/emblems/sport/lacrosse.d.ts +8 -1
  235. package/dist/emblems/sport/lacrosse.js +8 -1
  236. package/dist/emblems/sport/mlb.d.ts +8 -1
  237. package/dist/emblems/sport/mlb.js +8 -1
  238. package/dist/emblems/sport/mma.d.ts +8 -1
  239. package/dist/emblems/sport/mma.js +8 -1
  240. package/dist/emblems/sport/nba.d.ts +8 -1
  241. package/dist/emblems/sport/nba.js +8 -1
  242. package/dist/emblems/sport/netball.d.ts +8 -1
  243. package/dist/emblems/sport/netball.js +8 -1
  244. package/dist/emblems/sport/nfl.d.ts +8 -1
  245. package/dist/emblems/sport/nfl.js +8 -1
  246. package/dist/emblems/sport/nhl.d.ts +8 -1
  247. package/dist/emblems/sport/nhl.js +8 -1
  248. package/dist/emblems/sport/padel.d.ts +8 -1
  249. package/dist/emblems/sport/padel.js +8 -1
  250. package/dist/emblems/sport/pickleball.d.ts +8 -1
  251. package/dist/emblems/sport/pickleball.js +8 -1
  252. package/dist/emblems/sport/prowrestling.d.ts +8 -1
  253. package/dist/emblems/sport/prowrestling.js +8 -1
  254. package/dist/emblems/sport/racquetball.d.ts +8 -1
  255. package/dist/emblems/sport/racquetball.js +8 -1
  256. package/dist/emblems/sport/roundnet.d.ts +8 -1
  257. package/dist/emblems/sport/roundnet.js +8 -1
  258. package/dist/emblems/sport/rugby.d.ts +8 -1
  259. package/dist/emblems/sport/rugby.js +8 -1
  260. package/dist/emblems/sport/sepaktakraw.d.ts +8 -1
  261. package/dist/emblems/sport/sepaktakraw.js +8 -1
  262. package/dist/emblems/sport/skating.d.ts +8 -1
  263. package/dist/emblems/sport/skating.js +8 -1
  264. package/dist/emblems/sport/soccer.d.ts +8 -1
  265. package/dist/emblems/sport/soccer.js +8 -1
  266. package/dist/emblems/sport/squash.d.ts +8 -1
  267. package/dist/emblems/sport/squash.js +8 -1
  268. package/dist/emblems/sport/sumo.d.ts +8 -1
  269. package/dist/emblems/sport/sumo.js +8 -1
  270. package/dist/emblems/sport/swimming.d.ts +8 -1
  271. package/dist/emblems/sport/swimming.js +8 -1
  272. package/dist/emblems/sport/tabletennis.d.ts +8 -1
  273. package/dist/emblems/sport/tabletennis.js +8 -1
  274. package/dist/emblems/sport/tennis.d.ts +8 -1
  275. package/dist/emblems/sport/tennis.js +8 -1
  276. package/dist/emblems/sport/teqball.d.ts +8 -1
  277. package/dist/emblems/sport/teqball.js +8 -1
  278. package/dist/emblems/sport/volleyball.d.ts +8 -1
  279. package/dist/emblems/sport/volleyball.js +8 -1
  280. package/dist/emblems/sport/waterpolo.d.ts +8 -1
  281. package/dist/emblems/sport/waterpolo.js +8 -1
  282. package/dist/emblems/sport/wrestling.d.ts +8 -1
  283. package/dist/emblems/sport/wrestling.js +8 -1
  284. package/dist/emblems/trophy/americas-cup.d.ts +8 -1
  285. package/dist/emblems/trophy/americas-cup.js +8 -1
  286. package/dist/emblems/trophy/art-ross-trophy.d.ts +8 -1
  287. package/dist/emblems/trophy/art-ross-trophy.js +8 -1
  288. package/dist/emblems/trophy/ashes-urn.d.ts +8 -1
  289. package/dist/emblems/trophy/ashes-urn.js +8 -1
  290. package/dist/emblems/trophy/avco-world-trophy.d.ts +8 -1
  291. package/dist/emblems/trophy/avco-world-trophy.js +8 -1
  292. package/dist/emblems/trophy/ballon-dor.d.ts +8 -1
  293. package/dist/emblems/trophy/ballon-dor.js +8 -1
  294. package/dist/emblems/trophy/banner.d.ts +8 -1
  295. package/dist/emblems/trophy/banner.js +8 -1
  296. package/dist/emblems/trophy/baseball.d.ts +8 -1
  297. package/dist/emblems/trophy/baseball.js +8 -1
  298. package/dist/emblems/trophy/basketball.d.ts +8 -1
  299. package/dist/emblems/trophy/basketball.js +8 -1
  300. package/dist/emblems/trophy/belt.d.ts +8 -1
  301. package/dist/emblems/trophy/belt.js +8 -1
  302. package/dist/emblems/trophy/bill-russell-trophy.d.ts +8 -1
  303. package/dist/emblems/trophy/bill-russell-trophy.js +8 -1
  304. package/dist/emblems/trophy/bob-cousy-trophy.d.ts +8 -1
  305. package/dist/emblems/trophy/bob-cousy-trophy.js +8 -1
  306. package/dist/emblems/trophy/borg-warner-trophy.d.ts +8 -1
  307. package/dist/emblems/trophy/borg-warner-trophy.js +8 -1
  308. package/dist/emblems/trophy/bowl.d.ts +8 -1
  309. package/dist/emblems/trophy/bowl.js +8 -1
  310. package/dist/emblems/trophy/calder-cup.d.ts +8 -1
  311. package/dist/emblems/trophy/calder-cup.js +8 -1
  312. package/dist/emblems/trophy/calder-trophy.d.ts +8 -1
  313. package/dist/emblems/trophy/calder-trophy.js +8 -1
  314. package/dist/emblems/trophy/campbell-bowl.d.ts +8 -1
  315. package/dist/emblems/trophy/campbell-bowl.js +8 -1
  316. package/dist/emblems/trophy/canadian-bowl.d.ts +8 -1
  317. package/dist/emblems/trophy/canadian-bowl.js +8 -1
  318. package/dist/emblems/trophy/cfp-trophy.d.ts +8 -1
  319. package/dist/emblems/trophy/cfp-trophy.js +8 -1
  320. package/dist/emblems/trophy/champions-league-trophy.d.ts +8 -1
  321. package/dist/emblems/trophy/champions-league-trophy.js +8 -1
  322. package/dist/emblems/trophy/championship-banner.d.ts +8 -1
  323. package/dist/emblems/trophy/championship-banner.js +8 -1
  324. package/dist/emblems/trophy/commissioners-trophy.d.ts +8 -1
  325. package/dist/emblems/trophy/commissioners-trophy.js +8 -1
  326. package/dist/emblems/trophy/conn-smythe-trophy.d.ts +8 -1
  327. package/dist/emblems/trophy/conn-smythe-trophy.js +8 -1
  328. package/dist/emblems/trophy/cricket-urn.d.ts +8 -1
  329. package/dist/emblems/trophy/cricket-urn.js +8 -1
  330. package/dist/emblems/trophy/cricket-world-cup.d.ts +8 -1
  331. package/dist/emblems/trophy/cricket-world-cup.js +8 -1
  332. package/dist/emblems/trophy/cup.d.ts +8 -1
  333. package/dist/emblems/trophy/cup.js +8 -1
  334. package/dist/emblems/trophy/cy-young-award.d.ts +8 -1
  335. package/dist/emblems/trophy/cy-young-award.js +8 -1
  336. package/dist/emblems/trophy/dfb-pokal.d.ts +8 -1
  337. package/dist/emblems/trophy/dfb-pokal.js +8 -1
  338. package/dist/emblems/trophy/fa-cup.d.ts +8 -1
  339. package/dist/emblems/trophy/fa-cup.js +8 -1
  340. package/dist/emblems/trophy/fifa-world-cup.d.ts +8 -1
  341. package/dist/emblems/trophy/fifa-world-cup.js +8 -1
  342. package/dist/emblems/trophy/football.d.ts +8 -1
  343. package/dist/emblems/trophy/football.js +8 -1
  344. package/dist/emblems/trophy/foundation-player-award.d.ts +8 -1
  345. package/dist/emblems/trophy/foundation-player-award.js +8 -1
  346. package/dist/emblems/trophy/george-halas-trophy.d.ts +8 -1
  347. package/dist/emblems/trophy/george-halas-trophy.js +8 -1
  348. package/dist/emblems/trophy/globe.d.ts +8 -1
  349. package/dist/emblems/trophy/globe.js +8 -1
  350. package/dist/emblems/trophy/gold-glove-award.d.ts +8 -1
  351. package/dist/emblems/trophy/gold-glove-award.js +8 -1
  352. package/dist/emblems/trophy/grey-cup.d.ts +8 -1
  353. package/dist/emblems/trophy/grey-cup.js +8 -1
  354. package/dist/emblems/trophy/hank-aaron-award.d.ts +8 -1
  355. package/dist/emblems/trophy/hank-aaron-award.js +8 -1
  356. package/dist/emblems/trophy/hart-trophy.d.ts +8 -1
  357. package/dist/emblems/trophy/hart-trophy.js +8 -1
  358. package/dist/emblems/trophy/hockey-cup.d.ts +8 -1
  359. package/dist/emblems/trophy/hockey-cup.js +8 -1
  360. package/dist/emblems/trophy/jack-adams-trophy.d.ts +8 -1
  361. package/dist/emblems/trophy/jack-adams-trophy.js +8 -1
  362. package/dist/emblems/trophy/jackie-robinson-award.d.ts +8 -1
  363. package/dist/emblems/trophy/jackie-robinson-award.js +8 -1
  364. package/dist/emblems/trophy/jennings-trophy.d.ts +8 -1
  365. package/dist/emblems/trophy/jennings-trophy.js +8 -1
  366. package/dist/emblems/trophy/kelly-cup.d.ts +8 -1
  367. package/dist/emblems/trophy/kelly-cup.js +8 -1
  368. package/dist/emblems/trophy/king-clancy-trophy.d.ts +8 -1
  369. package/dist/emblems/trophy/king-clancy-trophy.js +8 -1
  370. package/dist/emblems/trophy/lady-byng-trophy.d.ts +8 -1
  371. package/dist/emblems/trophy/lady-byng-trophy.js +8 -1
  372. package/dist/emblems/trophy/lamar-hunt-trophy.d.ts +8 -1
  373. package/dist/emblems/trophy/lamar-hunt-trophy.js +8 -1
  374. package/dist/emblems/trophy/larry-bird-trophy.d.ts +8 -1
  375. package/dist/emblems/trophy/larry-bird-trophy.js +8 -1
  376. package/dist/emblems/trophy/larry-obrien-trophy-1977.d.ts +8 -1
  377. package/dist/emblems/trophy/larry-obrien-trophy-1977.js +8 -1
  378. package/dist/emblems/trophy/larry-obrien-trophy.d.ts +8 -1
  379. package/dist/emblems/trophy/larry-obrien-trophy.js +8 -1
  380. package/dist/emblems/trophy/laurel.d.ts +8 -1
  381. package/dist/emblems/trophy/laurel.js +8 -1
  382. package/dist/emblems/trophy/lester-patrick-trophy.d.ts +8 -1
  383. package/dist/emblems/trophy/lester-patrick-trophy.js +8 -1
  384. package/dist/emblems/trophy/lidded-cup.d.ts +8 -1
  385. package/dist/emblems/trophy/lidded-cup.js +8 -1
  386. package/dist/emblems/trophy/lombardi-trophy.d.ts +8 -1
  387. package/dist/emblems/trophy/lombardi-trophy.js +8 -1
  388. package/dist/emblems/trophy/magic-johnson-trophy.d.ts +8 -1
  389. package/dist/emblems/trophy/magic-johnson-trophy.js +8 -1
  390. package/dist/emblems/trophy/masterton-trophy.d.ts +8 -1
  391. package/dist/emblems/trophy/masterton-trophy.js +8 -1
  392. package/dist/emblems/trophy/messier-leadership-award.d.ts +8 -1
  393. package/dist/emblems/trophy/messier-leadership-award.js +8 -1
  394. package/dist/emblems/trophy/mlb-mvp-award.d.ts +8 -1
  395. package/dist/emblems/trophy/mlb-mvp-award.js +8 -1
  396. package/dist/emblems/trophy/mls-cup.d.ts +8 -1
  397. package/dist/emblems/trophy/mls-cup.js +8 -1
  398. package/dist/emblems/trophy/nba-eastern-conference-2001.d.ts +8 -1
  399. package/dist/emblems/trophy/nba-eastern-conference-2001.js +8 -1
  400. package/dist/emblems/trophy/nba-western-conference-2001.d.ts +8 -1
  401. package/dist/emblems/trophy/nba-western-conference-2001.js +8 -1
  402. package/dist/emblems/trophy/norris-trophy.d.ts +8 -1
  403. package/dist/emblems/trophy/norris-trophy.js +8 -1
  404. package/dist/emblems/trophy/obrien-cup.d.ts +8 -1
  405. package/dist/emblems/trophy/obrien-cup.js +8 -1
  406. package/dist/emblems/trophy/oscar-robertson-trophy.d.ts +8 -1
  407. package/dist/emblems/trophy/oscar-robertson-trophy.js +8 -1
  408. package/dist/emblems/trophy/paterson-cup.d.ts +8 -1
  409. package/dist/emblems/trophy/paterson-cup.js +8 -1
  410. package/dist/emblems/trophy/plaque.d.ts +8 -1
  411. package/dist/emblems/trophy/plaque.js +8 -1
  412. package/dist/emblems/trophy/presidents-trophy.d.ts +8 -1
  413. package/dist/emblems/trophy/presidents-trophy.js +8 -1
  414. package/dist/emblems/trophy/prince-of-wales-trophy.d.ts +8 -1
  415. package/dist/emblems/trophy/prince-of-wales-trophy.js +8 -1
  416. package/dist/emblems/trophy/relief-man-award.d.ts +8 -1
  417. package/dist/emblems/trophy/relief-man-award.js +8 -1
  418. package/dist/emblems/trophy/ring.d.ts +8 -1
  419. package/dist/emblems/trophy/ring.js +8 -1
  420. package/dist/emblems/trophy/rocket-richard-trophy.d.ts +8 -1
  421. package/dist/emblems/trophy/rocket-richard-trophy.js +8 -1
  422. package/dist/emblems/trophy/rosette.d.ts +8 -1
  423. package/dist/emblems/trophy/rosette.js +8 -1
  424. package/dist/emblems/trophy/rugby-cup.d.ts +8 -1
  425. package/dist/emblems/trophy/rugby-cup.js +8 -1
  426. package/dist/emblems/trophy/salver.d.ts +8 -1
  427. package/dist/emblems/trophy/salver.js +8 -1
  428. package/dist/emblems/trophy/selke-trophy.d.ts +8 -1
  429. package/dist/emblems/trophy/selke-trophy.js +8 -1
  430. package/dist/emblems/trophy/silver-slugger-award.d.ts +8 -1
  431. package/dist/emblems/trophy/silver-slugger-award.js +8 -1
  432. package/dist/emblems/trophy/soccer-ball.d.ts +8 -1
  433. package/dist/emblems/trophy/soccer-ball.js +8 -1
  434. package/dist/emblems/trophy/soccer-globe.d.ts +8 -1
  435. package/dist/emblems/trophy/soccer-globe.js +8 -1
  436. package/dist/emblems/trophy/stanley-cup.d.ts +8 -1
  437. package/dist/emblems/trophy/stanley-cup.js +8 -1
  438. package/dist/emblems/trophy/sumo-cup.d.ts +8 -1
  439. package/dist/emblems/trophy/sumo-cup.js +8 -1
  440. package/dist/emblems/trophy/ted-lindsay-award.d.ts +8 -1
  441. package/dist/emblems/trophy/ted-lindsay-award.js +8 -1
  442. package/dist/emblems/trophy/tennis-cup.d.ts +8 -1
  443. package/dist/emblems/trophy/tennis-cup.js +8 -1
  444. package/dist/emblems/trophy/tennis-plate.d.ts +8 -1
  445. package/dist/emblems/trophy/tennis-plate.js +8 -1
  446. package/dist/emblems/trophy/venus-rosewater-dish.d.ts +8 -1
  447. package/dist/emblems/trophy/venus-rosewater-dish.js +8 -1
  448. package/dist/emblems/trophy/vezina-trophy.d.ts +8 -1
  449. package/dist/emblems/trophy/vezina-trophy.js +8 -1
  450. package/dist/emblems/trophy/walter-cup.d.ts +8 -1
  451. package/dist/emblems/trophy/walter-cup.js +8 -1
  452. package/dist/emblems/trophy/webb-ellis-cup.d.ts +8 -1
  453. package/dist/emblems/trophy/webb-ellis-cup.js +8 -1
  454. package/dist/emblems/trophy/willie-oree-award.d.ts +8 -1
  455. package/dist/emblems/trophy/willie-oree-award.js +8 -1
  456. package/dist/emblems/trophy/wimbledon-gentlemens-trophy.d.ts +8 -1
  457. package/dist/emblems/trophy/wimbledon-gentlemens-trophy.js +8 -1
  458. package/dist/emblems/trophy/wnba-championship-trophy.d.ts +8 -1
  459. package/dist/emblems/trophy/wnba-championship-trophy.js +8 -1
  460. package/dist/emblems/trophy/woodlawn-vase.d.ts +8 -1
  461. package/dist/emblems/trophy/woodlawn-vase.js +8 -1
  462. package/dist/emblems/trophy/world-series-mvp-trophy.d.ts +8 -1
  463. package/dist/emblems/trophy/world-series-mvp-trophy.js +8 -1
  464. package/dist/emblems-entry.d.ts +2 -0
  465. package/dist/emblems-entry.js +1 -0
  466. package/dist/index.d.ts +1 -1
  467. package/dist/index.js +1 -1
  468. package/dist/turn-control.d.ts +72 -7
  469. package/dist/turn-control.js +22 -3
  470. package/dist/turn-full.d.ts +5 -1
  471. package/dist/turn-full.js +5 -1
  472. package/dist/version.d.ts +9 -1
  473. package/dist/version.js +9 -1
  474. package/package.json +37 -7
@@ -1,2 +1,9 @@
1
- /** A round badge with a ring inside its edge. */
1
+ /**
2
+ * A round badge with a ring inside its edge.
3
+ * @example
4
+ * ```ts
5
+ * import { CREST_ROUNDEL } from "@johnmorrisdotca/dougu-sports";
6
+ * console.log(CREST_ROUNDEL.id, CREST_ROUNDEL.svg({ size: 48 }).startsWith("<svg"));
7
+ * ```
8
+ */
2
9
  export declare const CREST_ROUNDEL: import("../emblem.core.ts").Emblem<import("../emblem.shapes.ts").FlatModel>;
@@ -1,6 +1,13 @@
1
1
  // A round badge with a ring inside its edge, tinted by a team's colours, with the team's letters on it or a star. Drawn for this package.
2
2
  import { circlePath, defineFlat, starPath } from "../emblem.shapes.js";
3
- /** A round badge with a ring inside its edge. */
3
+ /**
4
+ * A round badge with a ring inside its edge.
5
+ * @example
6
+ * ```ts
7
+ * import { CREST_ROUNDEL } from "@johnmorrisdotca/dougu-sports";
8
+ * console.log(CREST_ROUNDEL.id, CREST_ROUNDEL.svg({ size: 48 }).startsWith("<svg"));
9
+ * ```
10
+ */
4
11
  export const CREST_ROUNDEL = /* @__PURE__ */ defineFlat("crest:roundel", "Round crest", "丸形のエンブレム", "ours", {
5
12
  metal: "flat",
6
13
  color: "#2d5a8c",
@@ -1,2 +1,9 @@
1
- /** A heraldic shield with a band across the top. */
1
+ /**
2
+ * A heraldic shield with a band across the top.
3
+ * @example
4
+ * ```ts
5
+ * import { CREST_SHIELD } from "@johnmorrisdotca/dougu-sports";
6
+ * console.log(CREST_SHIELD.id, CREST_SHIELD.svg({ size: 48 }).startsWith("<svg"));
7
+ * ```
8
+ */
2
9
  export declare const CREST_SHIELD: import("../emblem.core.ts").Emblem<import("../emblem.shapes.ts").FlatModel>;
@@ -1,6 +1,13 @@
1
1
  // A heraldic shield with a band across the top, tinted by a team's colours, with the team's letters on it or a star. Drawn for this package.
2
2
  import { defineFlat, starPath } from "../emblem.shapes.js";
3
- /** A heraldic shield with a band across the top. */
3
+ /**
4
+ * A heraldic shield with a band across the top.
5
+ * @example
6
+ * ```ts
7
+ * import { CREST_SHIELD } from "@johnmorrisdotca/dougu-sports";
8
+ * console.log(CREST_SHIELD.id, CREST_SHIELD.svg({ size: 48 }).startsWith("<svg"));
9
+ * ```
10
+ */
4
11
  export const CREST_SHIELD = /* @__PURE__ */ defineFlat("crest:shield", "Shield crest", "盾形のエンブレム", "ours", {
5
12
  metal: "flat",
6
13
  color: "#2d5a8c",
@@ -2,16 +2,53 @@ import type { Emblem, EmblemLocale, EmblemOptions, EmblemStyle, EmblemTheme, Fra
2
2
  import { type BallId, type PuckId, type CrestShape, type EmblemId, type MedalKind, type SportName } from "./emblem.ids.ts";
3
3
  import type { PieceSize } from "./ball/ball.core.ts";
4
4
  import { type EmblemDescription } from "./emblem.descriptions.ts";
5
- /** What can name an emblem: an id, a short name (`"cup"` for `"trophy:cup"`), either with a style (`"trophy:cup/line"`), or the emblem itself. */
5
+ /**
6
+ * What can name an emblem: an id, a short name (`"cup"` for `"trophy:cup"`), either with a style (`"trophy:cup/line"`), or the emblem itself.
7
+ * @example
8
+ * ```ts
9
+ * import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
10
+ * import type { EmblemRef } from "@johnmorrisdotca/dougu-sports/emblems";
11
+ * const refs: EmblemRef[] = ["trophy:cup", "cup/line", "medal:gold"];
12
+ * console.log(refs.map((ref) => renderEmblem(ref).length > 0));
13
+ * ```
14
+ */
6
15
  export type EmblemRef = EmblemId | `${EmblemId}/${EmblemStyle}` | (string & {}) | Emblem;
7
- /** The id and style a string names, or `undefined` when it is not an emblem. An id may end in `/metal`, `/line` or `/color`, and a trophy or an award may be written without its group (`cup`, `crown`). */
16
+ /**
17
+ * The id and style a string names, or `undefined` when it is not an emblem. An id may end in `/metal`, `/line` or `/color`, and a trophy or an award may be written without its group (`cup`, `crown`).
18
+ * @param value - Anything; a string may be an id, a short name, or either with a `/metal`, `/line` or `/color` style.
19
+ * @returns The id and style the string names, or `undefined` when it names no emblem.
20
+ * @example
21
+ * ```ts
22
+ * import { parseEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
23
+ * console.log(parseEmblem("cup/line"), parseEmblem("nothing"));
24
+ * ```
25
+ */
8
26
  export declare function parseEmblem(value: unknown): {
9
27
  id: EmblemId;
10
28
  style: EmblemStyle | undefined;
11
29
  } | undefined;
12
- /** True when the value is the id of an emblem (not a short name, and with no style). */
30
+ /**
31
+ * True when the value is the id of an emblem (not a short name, and with no style).
32
+ * @param value - Anything.
33
+ * @returns True when the value is the id of an emblem, false for anything else.
34
+ * @example
35
+ * ```ts
36
+ * import { isEmblemId } from "@johnmorrisdotca/dougu-sports/emblems";
37
+ * console.log(isEmblemId("trophy:cup"), isEmblemId("cup"));
38
+ * ```
39
+ */
13
40
  export declare function isEmblemId(value: unknown): value is EmblemId;
14
- /** The emblem a reference names. An unknown name is an error that says what an id looks like. */
41
+ /**
42
+ * The emblem a reference names. An unknown name is an error that says what an id looks like.
43
+ * @param ref - An id, a short name, an id with a style, or an emblem.
44
+ * @returns The emblem the reference names and the style it asks for (`undefined` when it names none). An unknown name throws.
45
+ * @example
46
+ * ```ts
47
+ * import { emblemOf } from "@johnmorrisdotca/dougu-sports/emblems";
48
+ * const { emblem, style } = emblemOf("trophy:cup/line");
49
+ * console.log(emblem.id, style);
50
+ * ```
51
+ */
15
52
  export declare function emblemOf(ref: EmblemRef): {
16
53
  emblem: Emblem;
17
54
  style: EmblemStyle | undefined;
@@ -19,6 +56,9 @@ export declare function emblemOf(ref: EmblemRef): {
19
56
  /**
20
57
  * An emblem as a document of SVG: `renderEmblem("award:medal")`, `renderEmblem("ball:soccer/line", { size: 20 })`. `style` is `metal` (full colour with gradients, the default), `line` (one outline in the
21
58
  * page's text colour) or `color` (flat fills); `tint` replaces the main colour; `theme` is `inherit` (the default), `auto`, `light` or `dark`. A pure function: the same arguments give the same string.
59
+ * @param ref - An id, a short name, an id with a style, or an emblem.
60
+ * @param options - The style, size, tint, theme, labels and other emblem options.
61
+ * @returns The emblem as a document of SVG.
22
62
  * @example
23
63
  * ```ts
24
64
  * import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
@@ -28,25 +68,74 @@ export declare function emblemOf(ref: EmblemRef): {
28
68
  * ```
29
69
  */
30
70
  export declare function renderEmblem(ref: EmblemRef, options?: EmblemOptions): string;
31
- /** The same as `renderEmblem`. */
71
+ /**
72
+ * The same as `renderEmblem`.
73
+ * @param ref - An id, a short name, an id with a style, or an emblem.
74
+ * @param options - The size, style, tint and the other emblem options.
75
+ * @returns A document of SVG.
76
+ * @example
77
+ * ```ts
78
+ * import { emblemSvg } from "@johnmorrisdotca/dougu-sports/emblems";
79
+ * console.log(emblemSvg("medal:gold", { size: 32 }).startsWith("<svg"));
80
+ * ```
81
+ */
32
82
  export declare const emblemSvg: typeof renderEmblem;
33
83
  /**
34
84
  * An emblem turned: `yaw` degrees about its vertical axis and `pitch` degrees of tilt, from its resting view, in plain SVG. A cup, bowl or urn keeps its outline and moves its light, handles and seams; a medal flips like a coin and shows its back; a ball rolls; an icon is not turned.
85
+ * @param ref - An id, a short name, an id with a style, or an emblem.
86
+ * @param options - The turn (`yaw`, `pitch`, `roll`) and the emblem options.
87
+ * @returns The turned emblem as a document of SVG.
35
88
  * @example
36
89
  * ```ts
37
- * import { emblemFrame, renderEmblem } from "@johnmorrisdotca/dougu-sports/turn";
90
+ * import { emblemFrame } from "@johnmorrisdotca/dougu-sports/turn";
91
+ * import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
38
92
  * console.log(emblemFrame("medal:gold", { yaw: 0 }) === renderEmblem("medal:gold"));
39
93
  * // true
40
94
  * ```
41
95
  */
42
96
  export declare function emblemFrame(ref: EmblemRef, options?: FrameOptions): string;
43
- /** Whether a value is the id of a ball (a printed puck, `puck:canada`, is a ball too). */
97
+ /**
98
+ * Whether a value is the id of a ball (a printed puck, `puck:canada`, is a ball too).
99
+ * @param value - Anything.
100
+ * @returns True when the value is the id of a ball (a printed puck included), false for anything else.
101
+ * @example
102
+ * ```ts
103
+ * import { isBallId } from "@johnmorrisdotca/dougu-sports/emblems";
104
+ * console.log(isBallId("ball:soccer"), isBallId("trophy:cup"));
105
+ * ```
106
+ */
44
107
  export declare const isBallId: (value: unknown) => value is BallId | PuckId;
45
- /** A ball rolled: the same as `emblemFrame`, for a ball's id only (a printed puck's too). A value that is not a ball is an error. */
108
+ /**
109
+ * A ball rolled: the same as `emblemFrame`, for a ball's id only (a printed puck's too). A value that is not a ball is an error.
110
+ * @param id - A ball id or a printed puck's id.
111
+ * @param options - The turn (`yaw`, `pitch`, `roll`) and the emblem options.
112
+ * @returns The turned ball as a document of SVG.
113
+ * @example
114
+ * ```ts
115
+ * import { ballFrame } from "@johnmorrisdotca/dougu-sports/turn";
116
+ * console.log(ballFrame("ball:soccer", { yaw: 30, roll: 10 }).startsWith("<svg"));
117
+ * ```
118
+ */
46
119
  export declare function ballFrame(id: BallId | PuckId, options?: FrameOptions): string;
47
- /** Every emblem as markup in the metal style at 64 pixels, by id. Use `renderEmblem` for another style or size. */
120
+ /**
121
+ * Every emblem as markup in the metal style at 64 pixels, by id. Use `renderEmblem` for another style or size.
122
+ * @example
123
+ * ```ts
124
+ * import { EMBLEMS } from "@johnmorrisdotca/dougu-sports/emblems";
125
+ * console.log(Object.keys(EMBLEMS).length);
126
+ * ```
127
+ */
48
128
  export declare const EMBLEMS: Readonly<Record<EmblemId, string>>;
49
- /** What an emblem is, without its drawing. */
129
+ /**
130
+ * What an emblem is, without its drawing.
131
+ * @example
132
+ * ```ts
133
+ * import { emblemInfo } from "@johnmorrisdotca/dougu-sports/emblems";
134
+ * import type { EmblemInfo } from "@johnmorrisdotca/dougu-sports/emblems";
135
+ * const info: EmblemInfo = emblemInfo("medal:gold");
136
+ * console.log(info.id, info.kind);
137
+ * ```
138
+ */
50
139
  export interface EmblemInfo {
51
140
  id: EmblemId;
52
141
  en: string;
@@ -58,13 +147,52 @@ export interface EmblemInfo {
58
147
  /** What is drawn, in more words than the short name (which is the accessible name), for the docs and a gallery; not every emblem has one. */
59
148
  description?: EmblemDescription;
60
149
  }
61
- /** The names, source and kind of an emblem. */
150
+ /**
151
+ * The names, source and kind of an emblem.
152
+ * @param id - An emblem id, such as `ball:soccer`.
153
+ * @returns The emblem's id, names, source and kind, with its official size and description where it has them.
154
+ * @example
155
+ * ```ts
156
+ * import { emblemInfo } from "@johnmorrisdotca/dougu-sports/emblems";
157
+ * const info = emblemInfo("ball:soccer");
158
+ * console.log(info.en, info.kind, info.size?.diameterMm);
159
+ * ```
160
+ */
62
161
  export declare function emblemInfo(id: EmblemId): EmblemInfo;
63
- /** An emblem's name in a language. */
162
+ /**
163
+ * An emblem's name in a language.
164
+ * @param id - An emblem id.
165
+ * @param language - `en` (the default) or `ja`.
166
+ * @returns The emblem's name in that language.
167
+ * @example
168
+ * ```ts
169
+ * import { emblemName } from "@johnmorrisdotca/dougu-sports/emblems";
170
+ * console.log(emblemName("trophy:cup"), emblemName("trophy:cup", "ja"));
171
+ * ```
172
+ */
64
173
  export declare function emblemName(id: EmblemId, language?: "en" | "ja"): string;
65
- /** The data an emblem is drawn from: a flat emblem's shapes or a ball's marks, for a view that turns it itself. */
174
+ /**
175
+ * The data an emblem is drawn from: a flat emblem's shapes or a ball's marks, for a view that turns it itself.
176
+ * @param id - An emblem id.
177
+ * @returns The emblem's model: a flat emblem's shapes or a body of revolution's profile, whichever the emblem is made of.
178
+ * @example
179
+ * ```ts
180
+ * import { emblemModel } from "@johnmorrisdotca/dougu-sports/emblems";
181
+ * const model = emblemModel("medal:gold") as { front: unknown[] };
182
+ * console.log(model.front.length > 0);
183
+ * ```
184
+ */
66
185
  export declare function emblemModel(id: EmblemId): unknown;
67
- /** What `crest` takes. */
186
+ /**
187
+ * What `crest` takes.
188
+ * @example
189
+ * ```ts
190
+ * import { crest } from "@johnmorrisdotca/dougu-sports/emblems";
191
+ * import type { CrestOptions } from "@johnmorrisdotca/dougu-sports/emblems";
192
+ * const options: CrestOptions = { shape: "roundel", colors: ["#1f4e8c", "#f2c230"], initials: "AB" };
193
+ * console.log(crest(options).startsWith("<svg"));
194
+ * ```
195
+ */
68
196
  export interface CrestOptions {
69
197
  /** `shield` (the default), `roundel`, `diamond` or `pennant`. */
70
198
  shape?: CrestShape;
@@ -82,6 +210,8 @@ export interface CrestOptions {
82
210
  }
83
211
  /**
84
212
  * A generic crest tinted by a team's colours, with its letters if it has any: what a team with no logo gets. The letters are in the ink that reads on the colour.
213
+ * @param options - The shape, colours and initials; every field is optional.
214
+ * @returns The crest as a document of SVG.
85
215
  * @example
86
216
  * ```ts
87
217
  * import { crest } from "@johnmorrisdotca/dougu-sports/emblems";
@@ -91,11 +221,40 @@ export interface CrestOptions {
91
221
  * ```
92
222
  */
93
223
  export declare function crest(options?: CrestOptions): string;
94
- /** A medal on a ribbon: `medal("gold")`, `"silver"` or `"bronze"`; any other kind is the gold one. */
224
+ /**
225
+ * A medal on a ribbon: `medal("gold")`, `"silver"` or `"bronze"`; any other kind is the gold one.
226
+ * @param kind - `gold`, `silver` or `bronze`.
227
+ * @param options - The emblem options.
228
+ * @returns The medal as a document of SVG.
229
+ * @example
230
+ * ```ts
231
+ * import { medal } from "@johnmorrisdotca/dougu-sports/emblems";
232
+ * console.log(medal("silver", { size: 48 }).startsWith("<svg"));
233
+ * ```
234
+ */
95
235
  export declare function medal(kind: MedalKind, options?: EmblemOptions): string;
96
- /** The icon of a sport, by the names of `SPORT_NAMES`: `sportIcon("nhl")`. An unknown sport is an error. */
236
+ /**
237
+ * The icon of a sport, by the names of `SPORT_NAMES`: `sportIcon("nhl")`. An unknown sport is an error.
238
+ * @param sport - A name from `SPORT_NAMES`, such as `nhl`.
239
+ * @param options - The emblem options.
240
+ * @returns The sport's icon as a document of SVG.
241
+ * @example
242
+ * ```ts
243
+ * import { sportIcon } from "@johnmorrisdotca/dougu-sports/emblems";
244
+ * console.log(sportIcon("nhl", { size: 32 }).startsWith("<svg"));
245
+ * ```
246
+ */
97
247
  export declare function sportIcon(sport: SportName, options?: EmblemOptions): string;
98
- /** What `pennant` takes. */
248
+ /**
249
+ * What `pennant` takes.
250
+ * @example
251
+ * ```ts
252
+ * import { pennant } from "@johnmorrisdotca/dougu-sports/emblems";
253
+ * import type { PennantOptions } from "@johnmorrisdotca/dougu-sports/emblems";
254
+ * const options: PennantOptions = { text: "Winners", year: 2026, view: "back" };
255
+ * console.log(pennant(options).startsWith("<svg"));
256
+ * ```
257
+ */
99
258
  export interface PennantOptions {
100
259
  /** The felt, the stitching, and the lettering (the stitching's colour unless a third is given), as hex colours or `rgb()`. */
101
260
  colors?: string | readonly [felt?: string, stitching?: string, lettering?: string];
@@ -117,6 +276,8 @@ export interface PennantOptions {
117
276
  }
118
277
  /**
119
278
  * A felt championship pennant with a stitched edge, lettered with its words and its year.
279
+ * @param options - The colours, words, year and view; every field is optional.
280
+ * @returns The pennant as a document of SVG.
120
281
  * @example
121
282
  * ```ts
122
283
  * import { pennant } from "@johnmorrisdotca/dougu-sports/emblems";
@@ -2,7 +2,16 @@ import { EMBLEM_STYLES } from "./emblem.core.js";
2
2
  import { BALL_IDS, CREST_SHAPES, EMBLEM_ALIASES, EMBLEM_IDS, PUCK_IDS } from "./emblem.ids.js";
3
3
  import { EMBLEM_DESCRIPTIONS } from "./emblem.descriptions.js";
4
4
  import { EMBLEM_TABLE } from "./emblem.registry.js";
5
- /** The id and style a string names, or `undefined` when it is not an emblem. An id may end in `/metal`, `/line` or `/color`, and a trophy or an award may be written without its group (`cup`, `crown`). */
5
+ /**
6
+ * The id and style a string names, or `undefined` when it is not an emblem. An id may end in `/metal`, `/line` or `/color`, and a trophy or an award may be written without its group (`cup`, `crown`).
7
+ * @param value - Anything; a string may be an id, a short name, or either with a `/metal`, `/line` or `/color` style.
8
+ * @returns The id and style the string names, or `undefined` when it names no emblem.
9
+ * @example
10
+ * ```ts
11
+ * import { parseEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
12
+ * console.log(parseEmblem("cup/line"), parseEmblem("nothing"));
13
+ * ```
14
+ */
6
15
  export function parseEmblem(value) {
7
16
  if (typeof value !== "string")
8
17
  return undefined;
@@ -21,11 +30,30 @@ export function parseEmblem(value) {
21
30
  const id = Object.hasOwn(EMBLEM_ALIASES, text) ? EMBLEM_ALIASES[text] : text;
22
31
  return Object.hasOwn(EMBLEM_TABLE, id) ? { id: id, style } : undefined;
23
32
  }
24
- /** True when the value is the id of an emblem (not a short name, and with no style). */
33
+ /**
34
+ * True when the value is the id of an emblem (not a short name, and with no style).
35
+ * @param value - Anything.
36
+ * @returns True when the value is the id of an emblem, false for anything else.
37
+ * @example
38
+ * ```ts
39
+ * import { isEmblemId } from "@johnmorrisdotca/dougu-sports/emblems";
40
+ * console.log(isEmblemId("trophy:cup"), isEmblemId("cup"));
41
+ * ```
42
+ */
25
43
  export function isEmblemId(value) {
26
44
  return typeof value === "string" && Object.hasOwn(EMBLEM_TABLE, value);
27
45
  }
28
- /** The emblem a reference names. An unknown name is an error that says what an id looks like. */
46
+ /**
47
+ * The emblem a reference names. An unknown name is an error that says what an id looks like.
48
+ * @param ref - An id, a short name, an id with a style, or an emblem.
49
+ * @returns The emblem the reference names and the style it asks for (`undefined` when it names none). An unknown name throws.
50
+ * @example
51
+ * ```ts
52
+ * import { emblemOf } from "@johnmorrisdotca/dougu-sports/emblems";
53
+ * const { emblem, style } = emblemOf("trophy:cup/line");
54
+ * console.log(emblem.id, style);
55
+ * ```
56
+ */
29
57
  export function emblemOf(ref) {
30
58
  if (typeof ref !== "string")
31
59
  return { emblem: ref, style: undefined };
@@ -54,6 +82,9 @@ function printed(emblem, options) {
54
82
  /**
55
83
  * An emblem as a document of SVG: `renderEmblem("award:medal")`, `renderEmblem("ball:soccer/line", { size: 20 })`. `style` is `metal` (full colour with gradients, the default), `line` (one outline in the
56
84
  * page's text colour) or `color` (flat fills); `tint` replaces the main colour; `theme` is `inherit` (the default), `auto`, `light` or `dark`. A pure function: the same arguments give the same string.
85
+ * @param ref - An id, a short name, an id with a style, or an emblem.
86
+ * @param options - The style, size, tint, theme, labels and other emblem options.
87
+ * @returns The emblem as a document of SVG.
57
88
  * @example
58
89
  * ```ts
59
90
  * import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
@@ -67,13 +98,27 @@ export function renderEmblem(ref, options) {
67
98
  const p = printed(emblem, withStyle(style, options));
68
99
  return p.emblem.svg(p.options);
69
100
  }
70
- /** The same as `renderEmblem`. */
101
+ /**
102
+ * The same as `renderEmblem`.
103
+ * @param ref - An id, a short name, an id with a style, or an emblem.
104
+ * @param options - The size, style, tint and the other emblem options.
105
+ * @returns A document of SVG.
106
+ * @example
107
+ * ```ts
108
+ * import { emblemSvg } from "@johnmorrisdotca/dougu-sports/emblems";
109
+ * console.log(emblemSvg("medal:gold", { size: 32 }).startsWith("<svg"));
110
+ * ```
111
+ */
71
112
  export const emblemSvg = renderEmblem;
72
113
  /**
73
114
  * An emblem turned: `yaw` degrees about its vertical axis and `pitch` degrees of tilt, from its resting view, in plain SVG. A cup, bowl or urn keeps its outline and moves its light, handles and seams; a medal flips like a coin and shows its back; a ball rolls; an icon is not turned.
115
+ * @param ref - An id, a short name, an id with a style, or an emblem.
116
+ * @param options - The turn (`yaw`, `pitch`, `roll`) and the emblem options.
117
+ * @returns The turned emblem as a document of SVG.
74
118
  * @example
75
119
  * ```ts
76
- * import { emblemFrame, renderEmblem } from "@johnmorrisdotca/dougu-sports/turn";
120
+ * import { emblemFrame } from "@johnmorrisdotca/dougu-sports/turn";
121
+ * import { renderEmblem } from "@johnmorrisdotca/dougu-sports/emblems";
77
122
  * console.log(emblemFrame("medal:gold", { yaw: 0 }) === renderEmblem("medal:gold"));
78
123
  * // true
79
124
  * ```
@@ -83,34 +128,92 @@ export function emblemFrame(ref, options) {
83
128
  const p = printed(emblem, withStyle(style, options));
84
129
  return p.emblem.frame(p.options);
85
130
  }
86
- /** Whether a value is the id of a ball (a printed puck, `puck:canada`, is a ball too). */
131
+ /**
132
+ * Whether a value is the id of a ball (a printed puck, `puck:canada`, is a ball too).
133
+ * @param value - Anything.
134
+ * @returns True when the value is the id of a ball (a printed puck included), false for anything else.
135
+ * @example
136
+ * ```ts
137
+ * import { isBallId } from "@johnmorrisdotca/dougu-sports/emblems";
138
+ * console.log(isBallId("ball:soccer"), isBallId("trophy:cup"));
139
+ * ```
140
+ */
87
141
  export const isBallId = (value) => typeof value === "string" && (BALL_IDS.includes(value) || PUCK_IDS.includes(value));
88
- /** A ball rolled: the same as `emblemFrame`, for a ball's id only (a printed puck's too). A value that is not a ball is an error. */
142
+ /**
143
+ * A ball rolled: the same as `emblemFrame`, for a ball's id only (a printed puck's too). A value that is not a ball is an error.
144
+ * @param id - A ball id or a printed puck's id.
145
+ * @param options - The turn (`yaw`, `pitch`, `roll`) and the emblem options.
146
+ * @returns The turned ball as a document of SVG.
147
+ * @example
148
+ * ```ts
149
+ * import { ballFrame } from "@johnmorrisdotca/dougu-sports/turn";
150
+ * console.log(ballFrame("ball:soccer", { yaw: 30, roll: 10 }).startsWith("<svg"));
151
+ * ```
152
+ */
89
153
  export function ballFrame(id, options) {
90
154
  if (!isBallId(id))
91
155
  throw new Error(`"${String(id).slice(0, 60)}" is not a ball: ids look like "ball:soccer" or "puck:canada"; see BALL_IDS and PUCK_IDS.`);
92
156
  const p = printed(EMBLEM_TABLE[id], options);
93
157
  return p.emblem.frame(p.options);
94
158
  }
95
- /** Every emblem as markup in the metal style at 64 pixels, by id. Use `renderEmblem` for another style or size. */
159
+ /**
160
+ * Every emblem as markup in the metal style at 64 pixels, by id. Use `renderEmblem` for another style or size.
161
+ * @example
162
+ * ```ts
163
+ * import { EMBLEMS } from "@johnmorrisdotca/dougu-sports/emblems";
164
+ * console.log(Object.keys(EMBLEMS).length);
165
+ * ```
166
+ */
96
167
  export const EMBLEMS = Object.freeze(Object.fromEntries(EMBLEM_IDS.map((id) => [id, EMBLEM_TABLE[id].svg()])));
97
- /** The names, source and kind of an emblem. */
168
+ /**
169
+ * The names, source and kind of an emblem.
170
+ * @param id - An emblem id, such as `ball:soccer`.
171
+ * @returns The emblem's id, names, source and kind, with its official size and description where it has them.
172
+ * @example
173
+ * ```ts
174
+ * import { emblemInfo } from "@johnmorrisdotca/dougu-sports/emblems";
175
+ * const info = emblemInfo("ball:soccer");
176
+ * console.log(info.en, info.kind, info.size?.diameterMm);
177
+ * ```
178
+ */
98
179
  export function emblemInfo(id) {
99
180
  const e = EMBLEM_TABLE[id];
100
181
  const size = e.size;
101
182
  const description = EMBLEM_DESCRIPTIONS[id];
102
183
  return { id, en: e.en, ja: e.ja, source: e.source, kind: e.kind, ...(size === undefined ? {} : { size }), ...(description === undefined ? {} : { description }) };
103
184
  }
104
- /** An emblem's name in a language. */
185
+ /**
186
+ * An emblem's name in a language.
187
+ * @param id - An emblem id.
188
+ * @param language - `en` (the default) or `ja`.
189
+ * @returns The emblem's name in that language.
190
+ * @example
191
+ * ```ts
192
+ * import { emblemName } from "@johnmorrisdotca/dougu-sports/emblems";
193
+ * console.log(emblemName("trophy:cup"), emblemName("trophy:cup", "ja"));
194
+ * ```
195
+ */
105
196
  export function emblemName(id, language = "en") {
106
197
  return language === "ja" ? EMBLEM_TABLE[id].ja : EMBLEM_TABLE[id].en;
107
198
  }
108
- /** The data an emblem is drawn from: a flat emblem's shapes or a ball's marks, for a view that turns it itself. */
199
+ /**
200
+ * The data an emblem is drawn from: a flat emblem's shapes or a ball's marks, for a view that turns it itself.
201
+ * @param id - An emblem id.
202
+ * @returns The emblem's model: a flat emblem's shapes or a body of revolution's profile, whichever the emblem is made of.
203
+ * @example
204
+ * ```ts
205
+ * import { emblemModel } from "@johnmorrisdotca/dougu-sports/emblems";
206
+ * const model = emblemModel("medal:gold") as { front: unknown[] };
207
+ * console.log(model.front.length > 0);
208
+ * ```
209
+ */
109
210
  export function emblemModel(id) {
110
211
  return EMBLEM_TABLE[id].model;
111
212
  }
112
213
  /**
113
214
  * A generic crest tinted by a team's colours, with its letters if it has any: what a team with no logo gets. The letters are in the ink that reads on the colour.
215
+ * @param options - The shape, colours and initials; every field is optional.
216
+ * @returns The crest as a document of SVG.
114
217
  * @example
115
218
  * ```ts
116
219
  * import { crest } from "@johnmorrisdotca/dougu-sports/emblems";
@@ -124,11 +227,31 @@ export function crest(options = {}) {
124
227
  const shape = CREST_SHAPES.includes(options.shape) ? options.shape : "shield";
125
228
  return EMBLEM_TABLE[`crest:${shape}`].svg({ tint: colors[0], accent: colors[1], initials: options.initials, size: options.size, style: options.style, theme: options.theme, locale: options.locale, title: options.title });
126
229
  }
127
- /** A medal on a ribbon: `medal("gold")`, `"silver"` or `"bronze"`; any other kind is the gold one. */
230
+ /**
231
+ * A medal on a ribbon: `medal("gold")`, `"silver"` or `"bronze"`; any other kind is the gold one.
232
+ * @param kind - `gold`, `silver` or `bronze`.
233
+ * @param options - The emblem options.
234
+ * @returns The medal as a document of SVG.
235
+ * @example
236
+ * ```ts
237
+ * import { medal } from "@johnmorrisdotca/dougu-sports/emblems";
238
+ * console.log(medal("silver", { size: 48 }).startsWith("<svg"));
239
+ * ```
240
+ */
128
241
  export function medal(kind, options) {
129
242
  return (EMBLEM_TABLE[`medal:${kind}`] ?? EMBLEM_TABLE["medal:gold"]).svg(options);
130
243
  }
131
- /** The icon of a sport, by the names of `SPORT_NAMES`: `sportIcon("nhl")`. An unknown sport is an error. */
244
+ /**
245
+ * The icon of a sport, by the names of `SPORT_NAMES`: `sportIcon("nhl")`. An unknown sport is an error.
246
+ * @param sport - A name from `SPORT_NAMES`, such as `nhl`.
247
+ * @param options - The emblem options.
248
+ * @returns The sport's icon as a document of SVG.
249
+ * @example
250
+ * ```ts
251
+ * import { sportIcon } from "@johnmorrisdotca/dougu-sports/emblems";
252
+ * console.log(sportIcon("nhl", { size: 32 }).startsWith("<svg"));
253
+ * ```
254
+ */
132
255
  export function sportIcon(sport, options) {
133
256
  const e = Object.hasOwn(EMBLEM_TABLE, `sport:${sport}`) ? EMBLEM_TABLE[`sport:${sport}`] : undefined;
134
257
  if (e === undefined)
@@ -137,6 +260,8 @@ export function sportIcon(sport, options) {
137
260
  }
138
261
  /**
139
262
  * A felt championship pennant with a stitched edge, lettered with its words and its year.
263
+ * @param options - The colours, words, year and view; every field is optional.
264
+ * @returns The pennant as a document of SVG.
140
265
  * @example
141
266
  * ```ts
142
267
  * import { pennant } from "@johnmorrisdotca/dougu-sports/emblems";