@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
package/CHANGELOG.md CHANGED
@@ -6,6 +6,42 @@ All notable changes to this project are written here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.30.0] - 2026-11-03
10
+
11
+ The practice baseball like the real one, and the playground's view controls with kazoku-ui 0.11.
12
+
13
+ ### Changed
14
+
15
+ - **The three practice baseballs have fewer, larger, rounder slots** (`ball:plastic-baseball-practice`, `-white`, `-orange`; MODULES-244). Each half had two rings of six thin slits (twenty-four in all); it now has one ring of six large oval slots running toward its pole, the two rings turned half a step apart, so about four or five show on a face, as on the ball in John's photographs. A slot is about 22 by 14 mm, an oval and not a slit. The descriptions say "large oval slots". The ids, the colours and the registry count are unchanged.
16
+ - **The playground takes kazoku-ui 0.11** (MODULES-236). A **Centre** button comes into the bar once the emblem is zoomed or moved and puts it back in the middle at Fit and the resting angle (the Home key does too); `object-size` is set from the emblem's drawn size so a pan always keeps a quarter of it in view; and a round ball sets `grab-radius`, so a drag keeps the touched point under the pointer (a drag of 30 pixels moves a soccer ball's ground by about 30). Pucks, discs, shuttlecocks, the oval footballs and everything that is not a ball keep the fixed turn. The playground follows the drag rule: a drag right moves the surface right, a drag up moves it up, and the arrow keys agree.
17
+
18
+ ### Added
19
+
20
+ - **`e2e/centre.demo.ts`**: Centre hidden at Fit, then shown after a zoom and a drag, and putting the emblem back in the middle; a drag far off (thousands of pixels, every direction) never loses the emblem; the Home key; the shared drag-rule check (`e2e/ground.mjs`, kazoku-ui's `templates/e2e-ground.mjs`, copied unchanged) on a soccer ball; and exact grab on two balls.
21
+ - **`practice-light.webp` and `practice-dark.webp`**, the three practice balls from four sides, in the README and `docs/slotted-ball.md`.
22
+
23
+ ## [0.29.0] - 2026-11-03
24
+
25
+ Put it anywhere: a tag, an embed page and the code for both. A practice baseball with slots all over. The playground's turning is the family's view controls. And the family's must-have list: a documentation site in English and Japanese, usage that is tested, and a check that holds it.
26
+
27
+ ### Added
28
+
29
+ - **`@johnmorrisdotca/dougu-sports/element`: `<dougu-emblem>`**, any emblem as a web component, still or turning. Attributes `emblem`, `variant`, `size`, `tint`, `accent`, `initials`, `theme`, `locale`, `title`, `yaw`, `pitch`, `roll`, `turnable`, `autoplay` and `speed`; change one and it is drawn again. It draws SVG in a shadow root (styles adopted as a constructable stylesheet, so `style-src 'self'` is enough), waits while it is out of sight, and does not start by itself for a reader who prefers reduced motion. One script line from a CDN: `https://cdn.jsdelivr.net/npm/@johnmorrisdotca/dougu-sports/element/+esm`. Importing it on a server is safe and draws nothing.
30
+ - **`embed.html`**, the page for an `<iframe>`: `embed.html?emblem=trophy:cup&variant=line&size=160&turnable=1`, with a small Pause button when it turns by itself, and nothing else on it.
31
+ - **`emblemEmbedCode(ref, options)`** (in `/emblems` and the main entry): the tag, an iframe, an ES module, an `<img>` with a data address and the raw SVG for an emblem, as text.
32
+ - **Three practice baseballs with slots on both halves**: `ball:plastic-baseball-practice` (high-visibility yellow and black, two-tone), `ball:plastic-baseball-practice-white` and `ball:plastic-baseball-practice-orange`. Two rings of six slots on each half, real see-through holes as the one-sided ball has, drawn from photographs looked at and never copied; no maker's name. The registry goes from 346 to 349 emblems.
33
+ - **`hands: false`** for `bindTurn`: nothing is bound to the element, so a control with its own hands turns the emblem through `setAngles`.
34
+ - **A documentation site** at `/docs/` (a page for each export with a TSDoc summary, parameters, what it returns and an example that was run when the site was built), nine guides in English and in Japanese, and `llms.txt`.
35
+ - **Usage that is tested**: `examples/` holds a script tag from jsDelivr and from unpkg, Vite, webpack, React (and a server render of it), Vue, Svelte, Angular, an iframe, TypeScript and Node, and `pnpm test:usage` builds, type-checks or runs each against the package as npm packs it, opens the ones with a page in a browser, and checks that the README and the guides hold the same text.
36
+ - **The family's must-have check** (`scripts/check-standard.mjs`, held to its recorded hash by `test/standard.test.ts`) and CI runs `test:usage`.
37
+
38
+ ### Changed
39
+
40
+ - **The playground's turning is `<kazoku-view-controls>`** (kazoku-ui 0.10): the angle slider, Auto-turn with Slow, Medium and Fast, tilt, zoom and Fit, and the pan, with the drag, the wheel, a pinch and the arrow keys on the stage. The view is in the address (`yaw`, `tilt`, `zoom`); the old `pitch`, `speed` and `dir` are no longer read, and the Reverse button is gone (the bar has no reverse). A ball keeps its Roll slider. The pointer over the stage still turns it, a tap still turns it on a phone, and `?turn=1` still starts it.
41
+ - `sideEffects` in `package.json` names `./dist/element.js` instead of being `false`, so a bundler keeps the tag's registration. Nothing else has a side effect.
42
+ - Every export has a TSDoc summary, `@param`, `@returns` and an `@example` (the documentation site is made from them).
43
+ - - The demo (not the package): no long pages of folds (MODULES-112). The playground's three "The call that draws it" folds, open by default, are closed, and the playground's own sits right under the playground instead of at the foot of the page. The composing and brands pages had a fold in every card (five, and twenty-three); each card now has a "Show the call" button that puts its call in one panel at the foot of the window (it follows a change of look and closes with Close or Escape) and the "Copy the call" button it already had. Tests in `e2e/demo.demo.ts`, `e2e/compose.demo.ts` and `e2e/brands.demo.ts`.
44
+
9
45
  ## [0.28.1] - 2026-11-02
10
46
 
11
47
  ### Changed
package/NOTICE.md CHANGED
@@ -53,6 +53,7 @@ Each ball's `size.rule` names the rule; the table gives the document and where i
53
53
  | `ball:netball` | World Netball Rules of Netball, Rule 1 (Equipment: Ball), item 15 a-d | https://netballhamilton.org.nz/media/1997/world-netball-rules-book-2024.pdf |
54
54
  | `ball:pickleball-outdoor`, `ball:pickleball-indoor` | USA Pickleball Equipment Standards Manual (Jan 2025, Revision 3.0), 2.D.1 Design, 2.D.3 Size, 2.D.4 Weight, 2.D.8 Design (holes); USA Pickleball 2026 Official Rulebook rule 3.C Ball Specifications | https://equipment.usapickleball.org/docs/Equipment-Standards-Manual.pdf |
55
55
  | `ball:plastic-baseball-slotted` | English Wikipedia, the article on the hollow plastic practice ball with eight oblong holes (accessed 2026-10-21): hollow plastic, wall at most 1/8 in (3.2 mm), eight oblong holes of 0.75 in (19 mm) on one half only, about the size of a regulation baseball; the size is a baseball's, from Official Baseball Rules, Rule 3.01 The Ball | no link: the article is titled with the maker's registered trademark, which this package does not use |
56
+ | `ball:plastic-baseball-practice`, `-white`, `-orange` | The same English Wikipedia article on the hollow plastic practice ball (accessed 2026-10-21) for the material and the wall; Official Baseball Rules, Rule 3.01, for the size. The number, size and layout of the slots (about 22 by 14 mm, oval), and the two tones, are drawn from product photographs looked at and never copied or traced; no maker's name or mark is used | https://en.wikipedia.org/wiki/Wiffle_ball |
56
57
  | `ball:squash` and its coloured dots | World Squash 'Specifications for Squash Balls' (Recommended standards approved by the WSF; updated WSF AGM 2021, rebranded 2025), sections 1-3 and Notes 2-4 | https://www.worldsquash.sport/wp-content/uploads/2025/07/211127_Ball-Specifications.pdf |
57
58
  | `ball:racquetball` | USA Racquetball Rules, Rule 2.2 Ball Specifications (a)-(b); Rule 2.3 Ball Selection | https://www.usaracquetball.com/play/rules/2-courts-and-equipment |
58
59
  | `ball:lacrosse` | World Lacrosse Rules of Men's Field Lacrosse 2025-2027 (Ver 1.0), Section 2 Equipment, Rule 14 The Ball, 14.1 | https://www.bclacrosse.com/Referees%20and%20Officials/World%20Lacrosse%20Men's%20Field%20Rule%20Book.pdf |
package/README.md CHANGED
@@ -11,7 +11,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
11
11
  <img alt="TypeScript" src="https://img.shields.io/badge/types-TypeScript-3178c6">
12
12
  </p>
13
13
 
14
- <p align="center"><a href="https://johnmorrisdotca.github.io/dougu-sports/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/gallery.html">Gallery</a> · <a href="./docs/gallery.md">Every id</a> · <a href="./docs/turning.md">Turning</a> · <a href="./docs/engraving.md">Engraving</a> · <a href="./docs/layout.md">Layout</a> · <a href="./docs/japanese-sports.md">Japanese sports</a></p>
14
+ <p align="center"><a href="https://johnmorrisdotca.github.io/dougu-sports/"><strong>Open the demo →</strong></a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/embed.html?emblem=trophy:stanley-cup&size=120&turnable=1">Embed page</a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/docs/">Documentation</a> · <a href="https://johnmorrisdotca.github.io/dougu-sports/gallery.html">Gallery</a> · <a href="./docs/gallery.md">Every id</a> · <a href="./docs/turning.md">Turning</a> · <a href="./docs/engraving.md">Engraving</a> · <a href="./docs/layout.md">Layout</a> · <a href="./docs/japanese-sports.md">Japanese sports</a></p>
15
15
 
16
16
  <p align="center">
17
17
  <picture>
@@ -88,7 +88,7 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
88
88
  </picture>
89
89
  </p>
90
90
 
91
- - **A slotted plastic practice baseball**, a hollow white ball with eight oblong slots on one half, drawn with the same see-through holes ([slotted ball](./docs/slotted-ball.md)).
91
+ - **Two plastic practice baseballs**: a hollow white one with eight oblong slots on one half, and the common one with a ring of six large oval slots on each half, in two-tone yellow and black, white and orange (`ball:plastic-baseball-practice`, `-white`, `-orange`), drawn with the same see-through holes ([slotted ball](./docs/slotted-ball.md)).
92
92
 
93
93
  <p align="center">
94
94
  <picture>
@@ -97,6 +97,13 @@ The ball and the gear of every sport, trophies, medals, crests and the icon of e
97
97
  </picture>
98
98
  </p>
99
99
 
100
+ <p align="center">
101
+ <picture>
102
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/practice-dark.webp">
103
+ <img alt="The three practice baseballs with slots on both halves, in rows: yellow and black two-tone, white and orange, each at rest and from three other sides, with six large oval slots to a half." src="https://raw.githubusercontent.com/johnmorrisdotca/dougu-sports/main/docs/images/practice-light.webp" width="760">
104
+ </picture>
105
+ </p>
106
+
100
107
  - **Trophies, medals, crests and the icon of every sport**, in metal, one line or flat colour, light and dark.
101
108
 
102
109
  <p align="center">
@@ -199,6 +206,7 @@ The alias is a name in your `package.json` only: the same package, the same code
199
206
  | `@johnmorrisdotca/dougu-sports` | The full registry: every emblem by id, the functions, and each emblem as a constant |
200
207
  | `@johnmorrisdotca/dougu-sports/emblems` | `renderEmblem`, the ids and the types, with no single drawing imported by name |
201
208
  | `@johnmorrisdotca/dougu-sports/brands` | Experimental, designs will change: twelve made-up maker marks and ten made-up team logos as SVG (`makerLogo`, `teamLogo`, `makerBall`, `renderMakerBall`, the groups to place in a drawing and the data); see [docs/brands.md](./docs/brands.md) |
209
+ | `@johnmorrisdotca/dougu-sports/element` | `<dougu-emblem>`, the tag that draws an emblem in any page, still or turning (the only entry with a side effect: it registers the tag) |
202
210
  | `@johnmorrisdotca/dougu-sports/turn` | `emblemFrame`, `ballFrame` and `bindTurn`; `bindTurn` with an emblem object takes nothing else with it |
203
211
  | `@johnmorrisdotca/dougu-sports/<group>/<name>` | One emblem, alone: `trophy/hockey-cup`, `medal/gold`, `crest/shield`, `sport/nhl`, `award/crown`, `ball/soccer`, `pennant/championship`, `gear/<name>` |
204
212
 
@@ -211,9 +219,67 @@ console.log(TROPHY_HOCKEY_CUP.id); // trophy:hockey-cup
211
219
  console.log(TROPHY_HOCKEY_CUP.svg({ size: 24 }).includes('width="24"')); // true
212
220
  ```
213
221
 
214
- A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package says `"sideEffects": false` and each constant is marked pure. `test/size.test.ts` bundles one item with esbuild and holds it to a limit for its kind (a ball 7.6 kB, a medal or a crest 4.6 kB, a cup 7.1 kB gzipped, most of that the renderer); `pnpm test:package` does the same from the packed tarball.
222
+ A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package's `sideEffects` names only `./dist/element.js`, and each constant is marked pure. `test/size.test.ts` bundles one item with esbuild and holds it to a limit for its kind (a ball 7.6 kB, a medal or a crest 4.6 kB, a cup 7.1 kB gzipped, most of that the renderer); `pnpm test:package` does the same from the packed tarball.
223
+
224
+ ### Put it in your page
225
+
226
+ One script tag and the tag `<dougu-emblem>` (from jsDelivr, as in [plain HTML](./docs/guides/html-and-cdn.md)):
227
+
228
+ ```html
229
+ <!doctype html>
230
+ <html lang="en">
231
+ <head>
232
+ <meta charset="utf-8" />
233
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
234
+ <title>Dougu Sports from jsDelivr</title>
235
+ <script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/dougu-sports/element/+esm"></script>
236
+ </head>
237
+ <body>
238
+ <dougu-emblem emblem="trophy:stanley-cup" size="200" turnable></dougu-emblem>
239
+ </body>
240
+ </html>
241
+ ```
242
+
243
+ Or one iframe of the embed page, with no script on your page ([iframe guide](./docs/guides/embed-in-an-iframe.md)):
244
+
245
+ ```html
246
+ <!doctype html>
247
+ <html lang="en">
248
+ <head>
249
+ <meta charset="utf-8" />
250
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
251
+ <title>Dougu Sports in an iframe</title>
252
+ </head>
253
+ <body>
254
+ <iframe
255
+ src="https://johnmorrisdotca.github.io/dougu-sports/embed.html?emblem=trophy:stanley-cup&size=200&turnable=1"
256
+ title="The Stanley Cup"
257
+ width="216"
258
+ height="216"
259
+ loading="lazy"
260
+ style="border: 0"
261
+ ></iframe>
262
+ </body>
263
+ </html>
264
+ ```
265
+
266
+ In React (Vue, Svelte, Angular and Vite or webpack are in the [guides](./docs/guides/frameworks.md)); the element is imported where a browser is, so a server render still works:
267
+
268
+ ```tsx
269
+ import { useEffect } from "react";
270
+
271
+ export function DouguEmblem({ emblem = "trophy:stanley-cup", size = 200 }: { emblem?: string; size?: number }) {
272
+ useEffect(() => {
273
+ // The element needs a browser, so it is imported here, never at the top of the file: a server render never reaches an effect.
274
+ void import("@johnmorrisdotca/dougu-sports/element");
275
+ }, []);
276
+ return <dougu-emblem emblem={emblem} size={size} turnable />;
277
+ }
278
+ ```
279
+
280
+ `emblemEmbedCode(ref, options)` writes all of these (the tag, an iframe, an ES module, an `<img>` with a data address, and the raw SVG) for the emblem you have set up; the demo's "Put it in your page" panel is that function with buttons. Every example in the guides is a file in `examples/` that `pnpm test:usage` builds, type-checks or runs against the package as npm packs it. The [documentation site](https://johnmorrisdotca.github.io/dougu-sports/docs/) has a page for every export, guides in English and in Japanese, and a Vite, webpack, TypeScript and Node example each.
215
281
 
216
- ### In a page
282
+ ### In a page, as a string
217
283
 
218
284
  ```html
219
285
  <span id="trophy"></span>
@@ -676,7 +742,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
676
742
 
677
743
  ## Changes
678
744
 
679
- See [CHANGELOG.md](./CHANGELOG.md). 0.28.0 adds the Jackie Robinson Rookie of the Year plaque (`trophy:jackie-robinson-award`), the Halas, Messier, O'Ree and NBA postseason trophies and redraws the WNBA, Lamar Hunt, Larry O'Brien and Bill Russell trophies (346 emblems); 0.27.0 adds the NHL Foundation Player Award (`trophy:foundation-player-award`, 335 emblems) and redraws the Kelly Cup and the Calder Cup closer to their photographs; 0.26.0 adds four league championship trophies, drawn from photographs of the real ones: the Calder Cup of the AHL, the Kelly Cup of the ECHL, the MLS Cup and the College Football Playoff trophy (`trophy:calder-cup`, `trophy:kelly-cup`, `trophy:mls-cup`, `trophy:cfp-trophy`, 334 emblems); 0.25.0 adds two of baseball's awards, drawn from photographs of the real ones: the Hank Aaron Award and the Relief Man Award (`trophy:hank-aaron-award`, `trophy:relief-man-award`, 330 emblems); 0.24.0 adds a baseball cap (`gear:baseball-cap`, 328 emblems); 0.23.0 adds the Bill Russell Finals MVP Trophy, drawn from a photograph of the real one (`trophy:bill-russell-trophy`, 327 emblems); 0.22.0 takes out the award cups and the cap of the unpublished 0.17.0 to 0.21.0, which did not match the real objects; 0.16.0 adds a slotted plastic practice baseball (`ball:plastic-baseball-slotted`, 326 emblems: [docs/slotted-ball.md](./docs/slotted-ball.md)); 0.15.0 gives the pickleballs real holes, cut through the shell and drawn with the inside of the ball behind them, so the page shows through where two holes line up ([docs/pickleball.md](./docs/pickleball.md)); 0.14.0 lets the auto-turn go either way (`direction: "clockwise"` or `"counterclockwise"`, `setDirection()`); 0.13.0 adds a pictogram for each of four combat sports, MMA (a cage), boxing (a glove), wrestling (two wrestlers on the mat) and professional wrestling (a ring with ropes), in the three styles (326 emblems); 0.12.0 adds forty-seven named trophies, each a close likeness measured on a photograph (321 emblems); 0.11.0 gives the era soccer balls neutral ids (the old ones stay as aliases), new looks and a second 1980s ball (274 emblems); 0.10.0 adds a standalone ribbon and the nets and posts of sepak takraw, netball and teqball from their rulebooks' sizes (273 emblems); 0.9.0 lets the baseball, the softball and the classic soccer balls be painted and printed: solid and two-tone colours, a logo of your own wrapped onto the ball, stamped text, an original cursive word and a small mark, all turning with the ball ([docs/custom-balls.md](./docs/custom-balls.md)); 0.8.0 makes `bindTurn` light: it takes an emblem object and then needs no registry, so a turnable cup is about 9.4 kB gzipped instead of about 81 kB, and an id loads the registry on demand; 0.7.3 turns the build, docs and picture scripts, the browser tests and the demo's source from JavaScript into TypeScript, with no change to the package; 0.7.2 makes every docs page single-language (a page in Japanese beside each page that had Japanese words in it, and a test that holds them apart), with no change to the pictures; 0.7.1 puts real countries (Canada, Japan) in the crest and puck examples in place of made-up teams, with no change to the code; 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.md)); 0.6.0 gives the judo suit and the karate suit their sleeves (a judogi has no short ones: they reach the wrist) and adds the judogi seen from behind with the IJF-style back number, a family name and a country code on a patch, with a `backnumber` option (269 emblems: [docs/judogi-back.md](./docs/judogi-back.md)); 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 0.2.0 is 167 emblems, every one drawn here, with the Japanese sports, engraving, a turn for every emblem and the compose helpers; 0.1.0 brought the first full set of 148; 0.0.1 was the first preview.
745
+ See [CHANGELOG.md](./CHANGELOG.md). 0.30.0 makes the three practice baseballs' slots fewer, larger and rounder, like the real ball, and takes kazoku-ui 0.11 in the playground (a Centre button, a pan that cannot lose the emblem, exact grab on round balls). 0.29.0 adds `<dougu-emblem>` and the embed page, three practice baseballs with slots on both halves, and the documentation site, and puts the playground on the family's view controls. 0.28.0 adds the Jackie Robinson Rookie of the Year plaque (`trophy:jackie-robinson-award`), the Halas, Messier, O'Ree and NBA postseason trophies and redraws the WNBA, Lamar Hunt, Larry O'Brien and Bill Russell trophies (346 emblems); 0.27.0 adds the NHL Foundation Player Award (`trophy:foundation-player-award`, 335 emblems) and redraws the Kelly Cup and the Calder Cup closer to their photographs; 0.26.0 adds four league championship trophies, drawn from photographs of the real ones: the Calder Cup of the AHL, the Kelly Cup of the ECHL, the MLS Cup and the College Football Playoff trophy (`trophy:calder-cup`, `trophy:kelly-cup`, `trophy:mls-cup`, `trophy:cfp-trophy`, 334 emblems); 0.25.0 adds two of baseball's awards, drawn from photographs of the real ones: the Hank Aaron Award and the Relief Man Award (`trophy:hank-aaron-award`, `trophy:relief-man-award`, 330 emblems); 0.24.0 adds a baseball cap (`gear:baseball-cap`, 328 emblems); 0.23.0 adds the Bill Russell Finals MVP Trophy, drawn from a photograph of the real one (`trophy:bill-russell-trophy`, 327 emblems); 0.22.0 takes out the award cups and the cap of the unpublished 0.17.0 to 0.21.0, which did not match the real objects; 0.16.0 adds a slotted plastic practice baseball (`ball:plastic-baseball-slotted`, 326 emblems: [docs/slotted-ball.md](./docs/slotted-ball.md)); 0.15.0 gives the pickleballs real holes, cut through the shell and drawn with the inside of the ball behind them, so the page shows through where two holes line up ([docs/pickleball.md](./docs/pickleball.md)); 0.14.0 lets the auto-turn go either way (`direction: "clockwise"` or `"counterclockwise"`, `setDirection()`); 0.13.0 adds a pictogram for each of four combat sports, MMA (a cage), boxing (a glove), wrestling (two wrestlers on the mat) and professional wrestling (a ring with ropes), in the three styles (326 emblems); 0.12.0 adds forty-seven named trophies, each a close likeness measured on a photograph (321 emblems); 0.11.0 gives the era soccer balls neutral ids (the old ones stay as aliases), new looks and a second 1980s ball (274 emblems); 0.10.0 adds a standalone ribbon and the nets and posts of sepak takraw, netball and teqball from their rulebooks' sizes (273 emblems); 0.9.0 lets the baseball, the softball and the classic soccer balls be painted and printed: solid and two-tone colours, a logo of your own wrapped onto the ball, stamped text, an original cursive word and a small mark, all turning with the ball ([docs/custom-balls.md](./docs/custom-balls.md)); 0.8.0 makes `bindTurn` light: it takes an emblem object and then needs no registry, so a turnable cup is about 9.4 kB gzipped instead of about 81 kB, and an id loads the registry on demand; 0.7.3 turns the build, docs and picture scripts, the browser tests and the demo's source from JavaScript into TypeScript, with no change to the package; 0.7.2 makes every docs page single-language (a page in Japanese beside each page that had Japanese words in it, and a test that holds them apart), with no change to the pictures; 0.7.1 puts real countries (Canada, Japan) in the crest and puck examples in place of made-up teams, with no change to the code; 0.7.0 gives the national volleyballs layouts that tell them apart (Japan a crimson band, Poland white above and red below, the USA a navy field), strengthens the 2010-style grooved soccer ball, and adds six pictures of how the judo belt is tied, `gear:obi-step-1` to `gear:obi-step-6` (269 emblems: [docs/obi-steps.md](./docs/obi-steps.md)); 0.6.0 gives the judo suit and the karate suit their sleeves (a judogi has no short ones: they reach the wrist) and adds the judogi seen from behind with the IJF-style back number, a family name and a country code on a patch, with a `backnumber` option (269 emblems: [docs/judogi-back.md](./docs/judogi-back.md)); 0.5.1 redraws the judo suit, the belt and the football pictograms and adds the blue and folded suits and the belts of every grade (261 emblems: [docs/japanese-sports.md](./docs/japanese-sports.md)); 0.5.0 adds fifty balls: vintage leather soccer balls, era-style and shop-wall soccer balls, baseballs of other threads and volleyballs in national colours, with a `colors` option (244 emblems: [docs/vintage-balls.md](./docs/vintage-balls.md)); 0.4.0 adds eight printed pucks and a `face` option (194 emblems: [docs/pucks.md](./docs/pucks.md)); 0.3.0 adds nineteen soccer balls (26, 18, 14, 12 and 6 panels, winter orange and high-visibility yellow, futsal and beach soccer: 186 emblems); 0.2.1 draws every ball and implement to the rulebook's proportions; 0.2.0 is 167 emblems, every one drawn here, with the Japanese sports, engraving, a turn for every emblem and the compose helpers; 0.1.0 brought the first full set of 148; 0.0.1 was the first preview.
680
746
 
681
747
  ## Credits
682
748
 
@@ -2,7 +2,15 @@ import { type EmblemRef } from "../emblems/emblem.api.ts";
2
2
  import type { EmblemOptions } from "../emblems/emblem.core.ts";
3
3
  import type { MakerId } from "./brand.data.ts";
4
4
  import { type MakerLogoOptions } from "./brand.render.ts";
5
- /** How a maker's logo sits on a ball. */
5
+ /**
6
+ * How a maker's logo sits on a ball.
7
+ * @example
8
+ * ```ts
9
+ * import type { MakerBallOptions } from "@johnmorrisdotca/dougu-sports/brands";
10
+ * const options: MakerBallOptions = { layout: "stacked", width: 60, turn: 10 };
11
+ * console.log(options.width);
12
+ * ```
13
+ */
6
14
  export interface MakerBallOptions extends Omit<MakerLogoOptions, "size" | "title"> {
7
15
  /** How wide the logo is, in degrees of the ball (the mark alone 50 by default, a layout with a wordmark 74). */
8
16
  width?: number;
@@ -11,6 +19,9 @@ export interface MakerBallOptions extends Omit<MakerLogoOptions, "size" | "title
11
19
  }
12
20
  /**
13
21
  * The ball options that print a maker's logo on it: `{ decal: { svg, size, turn } }`, to spread into the options of `renderEmblem`, `emblemFrame` or `bindTurn`. The logo is wrapped onto the sphere, so it curves with the ball and turns with it.
22
+ * @param id - A maker id from `MAKER_IDS`.
23
+ * @param o - The layout, colours, width and turn of the logo on the ball.
24
+ * @returns The ball options `{ decal }` that print the logo.
14
25
  * @example
15
26
  * ```ts
16
27
  * import { makerBall } from "@johnmorrisdotca/dougu-sports/brands";
@@ -25,5 +36,17 @@ export declare function makerBall(id: MakerId, o?: MakerBallOptions): {
25
36
  turn: number;
26
37
  };
27
38
  };
28
- /** A ball with a maker's logo printed on it: `renderMakerBall("ball:baseball", "arvane", { size: 320 })`. Any other options of the ball (`paint`, `stamp`, `spots`...) go in `ball`. */
39
+ /**
40
+ * A ball with a maker's logo printed on it: `renderMakerBall("ball:baseball", "arvane", { size: 320 })`. Any other options of the ball (`paint`, `stamp`, `spots`...) go in `ball`.
41
+ * @param ball - The ball to print on: an id or an emblem.
42
+ * @param id - A maker id from `MAKER_IDS`.
43
+ * @param o - How the logo sits on the ball.
44
+ * @param ballOptions - The other options of the ball.
45
+ * @returns The printed ball as a document of SVG.
46
+ * @example
47
+ * ```ts
48
+ * import { renderMakerBall } from "@johnmorrisdotca/dougu-sports/brands";
49
+ * console.log(renderMakerBall("ball:baseball", "arvane", { width: 40 }, { size: 160 }).startsWith("<svg"));
50
+ * ```
51
+ */
29
52
  export declare function renderMakerBall(ball: EmblemRef, id: MakerId, o?: MakerBallOptions, ballOptions?: EmblemOptions): string;
@@ -4,6 +4,9 @@ import { renderEmblem } from "../emblems/emblem.api.js";
4
4
  import { makerLogo } from "./brand.render.js";
5
5
  /**
6
6
  * The ball options that print a maker's logo on it: `{ decal: { svg, size, turn } }`, to spread into the options of `renderEmblem`, `emblemFrame` or `bindTurn`. The logo is wrapped onto the sphere, so it curves with the ball and turns with it.
7
+ * @param id - A maker id from `MAKER_IDS`.
8
+ * @param o - The layout, colours, width and turn of the logo on the ball.
9
+ * @returns The ball options `{ decal }` that print the logo.
7
10
  * @example
8
11
  * ```ts
9
12
  * import { makerBall } from "@johnmorrisdotca/dougu-sports/brands";
@@ -17,7 +20,19 @@ export function makerBall(id, o) {
17
20
  const turn = typeof o?.turn === "number" && Number.isFinite(o.turn) ? o.turn : 0;
18
21
  return { decal: { svg: makerLogo(id, { ...o, title: false, size: 200 }), size, turn } };
19
22
  }
20
- /** A ball with a maker's logo printed on it: `renderMakerBall("ball:baseball", "arvane", { size: 320 })`. Any other options of the ball (`paint`, `stamp`, `spots`...) go in `ball`. */
23
+ /**
24
+ * A ball with a maker's logo printed on it: `renderMakerBall("ball:baseball", "arvane", { size: 320 })`. Any other options of the ball (`paint`, `stamp`, `spots`...) go in `ball`.
25
+ * @param ball - The ball to print on: an id or an emblem.
26
+ * @param id - A maker id from `MAKER_IDS`.
27
+ * @param o - How the logo sits on the ball.
28
+ * @param ballOptions - The other options of the ball.
29
+ * @returns The printed ball as a document of SVG.
30
+ * @example
31
+ * ```ts
32
+ * import { renderMakerBall } from "@johnmorrisdotca/dougu-sports/brands";
33
+ * console.log(renderMakerBall("ball:baseball", "arvane", { width: 40 }, { size: 160 }).startsWith("<svg"));
34
+ * ```
35
+ */
21
36
  export function renderMakerBall(ball, id, o, ballOptions) {
22
37
  return renderEmblem(ball, { ...ballOptions, ...makerBall(id, o) });
23
38
  }
@@ -1,23 +1,67 @@
1
1
  import type { LetterStyle } from "./brand.letters.ts";
2
+ /**
3
+ * Which colour of a palette a part of a mark takes: `a`, `b` or `c`.
4
+ * @example
5
+ * ```ts
6
+ * import type { PartRole } from "@johnmorrisdotca/dougu-sports/brands";
7
+ * const role: PartRole = "b";
8
+ * console.log(role);
9
+ * ```
10
+ */
2
11
  export type PartRole = "a" | "b" | "c";
3
- /** One flat shape of a mark: an SVG path (drawn with the even-odd rule, so a hole is a hole) and the colour it takes. */
12
+ /**
13
+ * One flat shape of a mark: an SVG path (drawn with the even-odd rule, so a hole is a hole) and the colour it takes.
14
+ * @example
15
+ * ```ts
16
+ * import type { LogoPart } from "@johnmorrisdotca/dougu-sports/brands";
17
+ * const part: LogoPart = { d: "M0 0h10v10z", role: "a" };
18
+ * console.log(part.role);
19
+ * ```
20
+ */
4
21
  export interface LogoPart {
5
22
  d: string;
6
23
  role: PartRole;
7
24
  }
8
- /** The colours of a maker on a light page or a dark one: the two of its mark and the ink of its wordmark. */
25
+ /**
26
+ * The colours of a maker on a light page or a dark one: the two of its mark and the ink of its wordmark.
27
+ * @example
28
+ * ```ts
29
+ * import { MAKERS } from "@johnmorrisdotca/dougu-sports/brands";
30
+ * import type { MakerPalette } from "@johnmorrisdotca/dougu-sports/brands";
31
+ * const palette: MakerPalette = MAKERS.arvane.light;
32
+ * console.log(palette.a, palette.b, palette.ink);
33
+ * ```
34
+ */
9
35
  export interface MakerPalette {
10
36
  a: string;
11
37
  b: string;
12
38
  ink: string;
13
39
  }
14
- /** The three colours of a team logo on a light page or a dark one. */
40
+ /**
41
+ * The three colours of a team logo on a light page or a dark one.
42
+ * @example
43
+ * ```ts
44
+ * import { TEAMS } from "@johnmorrisdotca/dougu-sports/brands";
45
+ * import type { TeamPalette } from "@johnmorrisdotca/dougu-sports/brands";
46
+ * const palette: TeamPalette = TEAMS.saltmere.dark;
47
+ * console.log(palette.a, palette.b, palette.c);
48
+ * ```
49
+ */
15
50
  export interface TeamPalette {
16
51
  a: string;
17
52
  b: string;
18
53
  c: string;
19
54
  }
20
- /** A fictional maker of balls and sports gear: a mark, a name to set as a wordmark, two palettes and the note of how it differs from the nearest real brand. */
55
+ /**
56
+ * A fictional maker of balls and sports gear: a mark, a name to set as a wordmark, two palettes and the note of how it differs from the nearest real brand.
57
+ * @example
58
+ * ```ts
59
+ * import { MAKERS } from "@johnmorrisdotca/dougu-sports/brands";
60
+ * import type { MakerData } from "@johnmorrisdotca/dougu-sports/brands";
61
+ * const maker: MakerData = MAKERS.arvane;
62
+ * console.log(maker.name, maker.parts.length);
63
+ * ```
64
+ */
21
65
  export interface MakerData {
22
66
  id: MakerId;
23
67
  name: string;
@@ -28,7 +72,16 @@ export interface MakerData {
28
72
  dark: MakerPalette;
29
73
  lettering: LetterStyle;
30
74
  }
31
- /** A fictional team: a city and a nickname, a logo, two palettes and a note. */
75
+ /**
76
+ * A fictional team: a city and a nickname, a logo, two palettes and a note.
77
+ * @example
78
+ * ```ts
79
+ * import { TEAMS } from "@johnmorrisdotca/dougu-sports/brands";
80
+ * import type { TeamData } from "@johnmorrisdotca/dougu-sports/brands";
81
+ * const team: TeamData = TEAMS.saltmere;
82
+ * console.log(team.city, team.nickname);
83
+ * ```
84
+ */
32
85
  export interface TeamData {
33
86
  id: TeamId;
34
87
  city: string;
@@ -39,9 +92,59 @@ export interface TeamData {
39
92
  light: TeamPalette;
40
93
  dark: TeamPalette;
41
94
  }
95
+ /**
96
+ * The ids of the fictional makers.
97
+ * @example
98
+ * ```ts
99
+ * import { MAKER_IDS } from "@johnmorrisdotca/dougu-sports/brands";
100
+ * console.log(MAKER_IDS.length, MAKER_IDS[0]);
101
+ * ```
102
+ */
42
103
  export declare const MAKER_IDS: readonly ["arvane", "tarsin", "ravelle", "kovreth", "dunmar", "ostrel", "vexlin", "quillan", "tenzar", "marenko", "halvane", "solvik"];
104
+ /**
105
+ * The id of a fictional maker.
106
+ * @example
107
+ * ```ts
108
+ * import type { MakerId } from "@johnmorrisdotca/dougu-sports/brands";
109
+ * const id: MakerId = "arvane";
110
+ * console.log(id);
111
+ * ```
112
+ */
43
113
  export type MakerId = (typeof MAKER_IDS)[number];
114
+ /**
115
+ * The ids of the fictional teams.
116
+ * @example
117
+ * ```ts
118
+ * import { TEAM_IDS } from "@johnmorrisdotca/dougu-sports/brands";
119
+ * console.log(TEAM_IDS.length, TEAM_IDS[0]);
120
+ * ```
121
+ */
44
122
  export declare const TEAM_IDS: readonly ["saltmere", "greywick", "brightwater", "cinderfell", "valmere", "larkmoor", "ironport", "pinecrest", "redfern", "tarn"];
123
+ /**
124
+ * The id of a fictional team.
125
+ * @example
126
+ * ```ts
127
+ * import type { TeamId } from "@johnmorrisdotca/dougu-sports/brands";
128
+ * const id: TeamId = "saltmere";
129
+ * console.log(id);
130
+ * ```
131
+ */
45
132
  export type TeamId = (typeof TEAM_IDS)[number];
133
+ /**
134
+ * The fictional makers of balls and sports gear, by id: each a mark, a name, two palettes and a note on how it differs from the nearest real brand.
135
+ * @example
136
+ * ```ts
137
+ * import { MAKERS } from "@johnmorrisdotca/dougu-sports/brands";
138
+ * console.log(Object.keys(MAKERS).length);
139
+ * ```
140
+ */
46
141
  export declare const MAKERS: Readonly<Record<MakerId, MakerData>>;
142
+ /**
143
+ * The fictional teams, by id: each a city, a nickname, a logo, two palettes and a note.
144
+ * @example
145
+ * ```ts
146
+ * import { TEAMS } from "@johnmorrisdotca/dougu-sports/brands";
147
+ * console.log(Object.keys(TEAMS).length);
148
+ * ```
149
+ */
47
150
  export declare const TEAMS: Readonly<Record<TeamId, TeamData>>;
@@ -1,8 +1,32 @@
1
1
  // The set: twelve fictional maker marks and ten fictional team logos, as data. Every mark is drawn for this package on a 100 by 100 box in a few flat parts, each part one path and one role (`a` the main colour, `b` the second, `c` a third
2
2
  // for a team); the parts never overlap, so the mark is the same drawn in one colour. Nothing here is a real company's or club's mark, name or lettering: each note says what the nearest real one is and how this differs.
3
+ /**
4
+ * The ids of the fictional makers.
5
+ * @example
6
+ * ```ts
7
+ * import { MAKER_IDS } from "@johnmorrisdotca/dougu-sports/brands";
8
+ * console.log(MAKER_IDS.length, MAKER_IDS[0]);
9
+ * ```
10
+ */
3
11
  export const MAKER_IDS = ["arvane", "tarsin", "ravelle", "kovreth", "dunmar", "ostrel", "vexlin", "quillan", "tenzar", "marenko", "halvane", "solvik"];
12
+ /**
13
+ * The ids of the fictional teams.
14
+ * @example
15
+ * ```ts
16
+ * import { TEAM_IDS } from "@johnmorrisdotca/dougu-sports/brands";
17
+ * console.log(TEAM_IDS.length, TEAM_IDS[0]);
18
+ * ```
19
+ */
4
20
  export const TEAM_IDS = ["saltmere", "greywick", "brightwater", "cinderfell", "valmere", "larkmoor", "ironport", "pinecrest", "redfern", "tarn"];
5
21
  const part = (role, d) => ({ role, d });
22
+ /**
23
+ * The fictional makers of balls and sports gear, by id: each a mark, a name, two palettes and a note on how it differs from the nearest real brand.
24
+ * @example
25
+ * ```ts
26
+ * import { MAKERS } from "@johnmorrisdotca/dougu-sports/brands";
27
+ * console.log(Object.keys(MAKERS).length);
28
+ * ```
29
+ */
6
30
  export const MAKERS = Object.freeze({
7
31
  arvane: {
8
32
  id: "arvane",
@@ -168,6 +192,14 @@ export const MAKERS = Object.freeze({
168
192
  lettering: { weight: 13, corner: "round", radius: 16, width: 0.85, gap: 12, slant: 0, cap: "round" },
169
193
  },
170
194
  });
195
+ /**
196
+ * The fictional teams, by id: each a city, a nickname, a logo, two palettes and a note.
197
+ * @example
198
+ * ```ts
199
+ * import { TEAMS } from "@johnmorrisdotca/dougu-sports/brands";
200
+ * console.log(Object.keys(TEAMS).length);
201
+ * ```
202
+ */
171
203
  export const TEAMS = Object.freeze({
172
204
  saltmere: {
173
205
  id: "saltmere",
@@ -1,4 +1,12 @@
1
- /** How a wordmark is lettered. */
1
+ /**
2
+ * How a wordmark is lettered.
3
+ * @example
4
+ * ```ts
5
+ * import type { LetterStyle } from "@johnmorrisdotca/dougu-sports/brands";
6
+ * const style: LetterStyle = { weight: 12, corner: "round", radius: 6, width: 1, gap: 8, slant: 6, cap: "round" };
7
+ * console.log(style.weight);
8
+ * ```
9
+ */
2
10
  export interface LetterStyle {
3
11
  /** Stroke weight, in units of a letter 100 high. */
4
12
  weight: number;
@@ -15,9 +23,25 @@ export interface LetterStyle {
15
23
  /** The ends of a stroke. */
16
24
  cap: "butt" | "round" | "square";
17
25
  }
18
- /** The letters the alphabet draws. */
26
+ /**
27
+ * The letters the alphabet draws.
28
+ * @example
29
+ * ```ts
30
+ * import { LETTERS } from "@johnmorrisdotca/dougu-sports/brands";
31
+ * console.log(LETTERS.length, LETTERS[0]);
32
+ * ```
33
+ */
19
34
  export declare const LETTERS: readonly string[];
20
- /** A word laid out: the path of all its letters (stroked, not filled) and the box it fills. */
35
+ /**
36
+ * A word laid out: the path of all its letters (stroked, not filled) and the box it fills.
37
+ * @example
38
+ * ```ts
39
+ * import { MAKERS, lettering } from "@johnmorrisdotca/dougu-sports/brands";
40
+ * import type { Lettering } from "@johnmorrisdotca/dougu-sports/brands";
41
+ * const word: Lettering = lettering("ARVANE", MAKERS.arvane.lettering);
42
+ * console.log(word.d.startsWith("M"), word.weight);
43
+ * ```
44
+ */
21
45
  export interface Lettering {
22
46
  d: string;
23
47
  width: number;
@@ -27,5 +51,16 @@ export interface Lettering {
27
51
  }
28
52
  /** The unit height the lettering is drawn at. */
29
53
  export declare const LETTER_HEIGHT = 100;
30
- /** A word in capitals, in a style. A letter the alphabet does not have is left out. The box includes the stroke's half weight and the room a lean needs. */
54
+ /**
55
+ * A word in capitals, in a style. A letter the alphabet does not have is left out. The box includes the stroke's half weight and the room a lean needs.
56
+ * @param word - The word, in capitals.
57
+ * @param style - The weight, corners, width, gap, slant and line ends.
58
+ * @returns The path of the letters and the box it fills.
59
+ * @example
60
+ * ```ts
61
+ * import { MAKERS, lettering } from "@johnmorrisdotca/dougu-sports/brands";
62
+ * const word = lettering("ARVANE", MAKERS.arvane.lettering);
63
+ * console.log(word.width > 0, word.height > 0);
64
+ * ```
65
+ */
31
66
  export declare function lettering(word: string, style: LetterStyle): Lettering;
@@ -32,7 +32,14 @@ const SKELETONS = {
32
32
  /** Letters whose right side is open at the top or the bottom, and letters whose sides lean in: a pair of the two is set closer. */
33
33
  const OPEN = "LTFPYRVAW";
34
34
  const LEAN = "AVWYT";
35
- /** The letters the alphabet draws. */
35
+ /**
36
+ * The letters the alphabet draws.
37
+ * @example
38
+ * ```ts
39
+ * import { LETTERS } from "@johnmorrisdotca/dougu-sports/brands";
40
+ * console.log(LETTERS.length, LETTERS[0]);
41
+ * ```
42
+ */
36
43
  export const LETTERS = Object.freeze(Object.keys(SKELETONS));
37
44
  const round1 = (value) => String(Math.round(value * 10) / 10 + 0);
38
45
  /** One stroke as a path: corners rounded or cut by `radius`, never by more than half a side. */
@@ -61,7 +68,18 @@ function strokePath(points, closed, style) {
61
68
  }
62
69
  /** The unit height the lettering is drawn at. */
63
70
  export const LETTER_HEIGHT = 100;
64
- /** A word in capitals, in a style. A letter the alphabet does not have is left out. The box includes the stroke's half weight and the room a lean needs. */
71
+ /**
72
+ * A word in capitals, in a style. A letter the alphabet does not have is left out. The box includes the stroke's half weight and the room a lean needs.
73
+ * @param word - The word, in capitals.
74
+ * @param style - The weight, corners, width, gap, slant and line ends.
75
+ * @returns The path of the letters and the box it fills.
76
+ * @example
77
+ * ```ts
78
+ * import { MAKERS, lettering } from "@johnmorrisdotca/dougu-sports/brands";
79
+ * const word = lettering("ARVANE", MAKERS.arvane.lettering);
80
+ * console.log(word.width > 0, word.height > 0);
81
+ * ```
82
+ */
65
83
  export function lettering(word, style) {
66
84
  const lean = Math.tan((style.slant * Math.PI) / 180);
67
85
  const half = style.weight / 2;