@johnmorrisdotca/dougu-sports 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/NOTICE.md +1 -0
- package/README.md +64 -5
- package/dist/brands/brand.ball.d.ts +25 -2
- package/dist/brands/brand.ball.js +16 -1
- package/dist/brands/brand.data.d.ts +108 -5
- package/dist/brands/brand.data.js +32 -0
- package/dist/brands/brand.letters.d.ts +39 -4
- package/dist/brands/brand.letters.js +20 -2
- package/dist/brands/brand.render.d.ts +73 -6
- package/dist/brands/brand.render.js +35 -2
- package/dist/element.d.ts +32 -0
- package/dist/element.js +177 -0
- package/dist/emblems/award/badge.d.ts +8 -1
- package/dist/emblems/award/badge.js +8 -1
- package/dist/emblems/award/crown.d.ts +8 -1
- package/dist/emblems/award/crown.js +8 -1
- package/dist/emblems/award/medal.d.ts +8 -1
- package/dist/emblems/award/medal.js +8 -1
- package/dist/emblems/award/ribbon.d.ts +8 -1
- package/dist/emblems/award/ribbon.js +8 -1
- package/dist/emblems/award/shield.d.ts +8 -1
- package/dist/emblems/award/shield.js +8 -1
- package/dist/emblems/award/star.d.ts +8 -1
- package/dist/emblems/award/star.js +8 -1
- package/dist/emblems/ball/ball.afl.d.ts +8 -0
- package/dist/emblems/ball/ball.afl.js +8 -0
- package/dist/emblems/ball/ball.baseball.vintage.d.ts +40 -5
- package/dist/emblems/ball/ball.baseball.vintage.js +40 -5
- package/dist/emblems/ball/ball.basketball.d.ts +8 -0
- package/dist/emblems/ball/ball.basketball.js +8 -0
- package/dist/emblems/ball/ball.basketball3x3.d.ts +8 -0
- package/dist/emblems/ball/ball.basketball3x3.js +8 -0
- package/dist/emblems/ball/ball.basketball6.d.ts +8 -0
- package/dist/emblems/ball/ball.basketball6.js +8 -0
- package/dist/emblems/ball/ball.core.d.ts +16 -1
- package/dist/emblems/ball/ball.cricket.d.ts +24 -0
- package/dist/emblems/ball/ball.cricket.js +24 -0
- package/dist/emblems/ball/ball.curlingstone.d.ts +8 -0
- package/dist/emblems/ball/ball.curlingstone.js +8 -0
- package/dist/emblems/ball/ball.discus.d.ts +8 -0
- package/dist/emblems/ball/ball.discus.js +8 -0
- package/dist/emblems/ball/ball.face.d.ts +48 -4
- package/dist/emblems/ball/ball.fieldhockey.d.ts +8 -0
- package/dist/emblems/ball/ball.fieldhockey.js +8 -0
- package/dist/emblems/ball/ball.football.d.ts +24 -0
- package/dist/emblems/ball/ball.football.js +24 -0
- package/dist/emblems/ball/ball.gaelic.d.ts +16 -0
- package/dist/emblems/ball/ball.gaelic.js +16 -0
- package/dist/emblems/ball/ball.golf.d.ts +8 -0
- package/dist/emblems/ball/ball.golf.js +8 -0
- package/dist/emblems/ball/ball.hammer.d.ts +8 -0
- package/dist/emblems/ball/ball.hammer.js +8 -0
- package/dist/emblems/ball/ball.handball.d.ts +8 -0
- package/dist/emblems/ball/ball.handball.js +8 -0
- package/dist/emblems/ball/ball.index.d.ts +15 -4
- package/dist/emblems/ball/ball.index.js +8 -6
- package/dist/emblems/ball/ball.padel.d.ts +8 -0
- package/dist/emblems/ball/ball.padel.js +8 -0
- package/dist/emblems/ball/ball.pickleball.d.ts +16 -0
- package/dist/emblems/ball/ball.pickleball.js +16 -0
- package/dist/emblems/ball/ball.plastic.d.ts +38 -1
- package/dist/emblems/ball/ball.plastic.js +73 -0
- package/dist/emblems/ball/ball.print.d.ts +71 -7
- package/dist/emblems/ball/ball.print.js +8 -0
- package/dist/emblems/ball/ball.printable.d.ts +48 -0
- package/dist/emblems/ball/ball.printable.js +48 -0
- package/dist/emblems/ball/ball.puck.d.ts +8 -0
- package/dist/emblems/ball/ball.puck.js +8 -0
- package/dist/emblems/ball/ball.puck.print.d.ts +64 -0
- package/dist/emblems/ball/ball.puck.print.js +64 -0
- package/dist/emblems/ball/ball.roundnet.d.ts +8 -0
- package/dist/emblems/ball/ball.roundnet.js +8 -0
- package/dist/emblems/ball/ball.rugby.d.ts +8 -0
- package/dist/emblems/ball/ball.rugby.js +8 -0
- package/dist/emblems/ball/ball.sepaktakraw.d.ts +8 -0
- package/dist/emblems/ball/ball.sepaktakraw.js +8 -0
- package/dist/emblems/ball/ball.shuttlecock.d.ts +16 -0
- package/dist/emblems/ball/ball.shuttlecock.js +16 -0
- package/dist/emblems/ball/ball.sliotar.d.ts +8 -0
- package/dist/emblems/ball/ball.sliotar.js +8 -0
- package/dist/emblems/ball/ball.smooth.d.ts +32 -0
- package/dist/emblems/ball/ball.smooth.js +32 -0
- package/dist/emblems/ball/ball.soccer.era.d.ts +96 -12
- package/dist/emblems/ball/ball.soccer.era.js +96 -12
- package/dist/emblems/ball/ball.soccer.indoor.d.ts +16 -0
- package/dist/emblems/ball/ball.soccer.indoor.js +16 -0
- package/dist/emblems/ball/ball.soccer.panels.d.ts +120 -0
- package/dist/emblems/ball/ball.soccer.panels.js +120 -0
- package/dist/emblems/ball/ball.soccer.store.d.ts +144 -0
- package/dist/emblems/ball/ball.soccer.store.js +144 -0
- package/dist/emblems/ball/ball.soccer.vintage.d.ts +40 -5
- package/dist/emblems/ball/ball.soccer.vintage.js +40 -5
- package/dist/emblems/ball/ball.squash.d.ts +40 -0
- package/dist/emblems/ball/ball.squash.js +40 -0
- package/dist/emblems/ball/ball.tennis.d.ts +8 -0
- package/dist/emblems/ball/ball.tennis.js +8 -0
- package/dist/emblems/ball/ball.teqball.d.ts +8 -0
- package/dist/emblems/ball/ball.teqball.js +8 -0
- package/dist/emblems/ball/ball.volleyball.d.ts +24 -0
- package/dist/emblems/ball/ball.volleyball.flag.d.ts +88 -0
- package/dist/emblems/ball/ball.volleyball.flag.js +88 -0
- package/dist/emblems/ball/ball.volleyball.js +24 -0
- package/dist/emblems/ball/ball.waterpolo.d.ts +8 -0
- package/dist/emblems/ball/ball.waterpolo.js +8 -0
- package/dist/emblems/crest/diamond.d.ts +8 -1
- package/dist/emblems/crest/diamond.js +8 -1
- package/dist/emblems/crest/pennant.d.ts +8 -1
- package/dist/emblems/crest/pennant.js +8 -1
- package/dist/emblems/crest/roundel.d.ts +8 -1
- package/dist/emblems/crest/roundel.js +8 -1
- package/dist/emblems/crest/shield.d.ts +8 -1
- package/dist/emblems/crest/shield.js +8 -1
- package/dist/emblems/emblem.api.d.ts +178 -17
- package/dist/emblems/emblem.api.js +138 -13
- package/dist/emblems/emblem.core.d.ts +104 -8
- package/dist/emblems/emblem.core.js +32 -2
- package/dist/emblems/emblem.descriptions.d.ts +17 -1
- package/dist/emblems/emblem.descriptions.js +11 -0
- package/dist/emblems/emblem.display.d.ts +53 -5
- package/dist/emblems/emblem.display.js +6 -0
- package/dist/emblems/emblem.embed.d.ts +68 -0
- package/dist/emblems/emblem.embed.js +65 -0
- package/dist/emblems/emblem.equipment.d.ts +12 -1
- package/dist/emblems/emblem.equipment.js +2 -0
- package/dist/emblems/emblem.ids.d.ts +273 -18
- package/dist/emblems/emblem.ids.js +137 -15
- package/dist/emblems/emblem.lathe.d.ts +70 -6
- package/dist/emblems/emblem.named.d.ts +37 -4
- package/dist/emblems/emblem.named.js +18 -2
- package/dist/emblems/emblem.registry.d.ts +8 -1
- package/dist/emblems/emblem.registry.js +8 -1
- package/dist/emblems/emblem.shapes.d.ts +25 -2
- package/dist/emblems/emblem.sprite.d.ts +33 -3
- package/dist/emblems/emblem.sprite.js +3 -0
- package/dist/emblems/emblem.uri.d.ts +13 -1
- package/dist/emblems/emblem.uri.js +3 -0
- package/dist/emblems/gear/gear.badmintonracket.d.ts +8 -0
- package/dist/emblems/gear/gear.badmintonracket.js +8 -0
- package/dist/emblems/gear/gear.baseballcap.d.ts +8 -0
- package/dist/emblems/gear/gear.baseballcap.js +8 -0
- package/dist/emblems/gear/gear.baseballglove.d.ts +8 -0
- package/dist/emblems/gear/gear.baseballglove.js +8 -0
- package/dist/emblems/gear/gear.budo.d.ts +224 -4
- package/dist/emblems/gear/gear.budo.js +205 -3
- package/dist/emblems/gear/gear.budo.steps.d.ts +68 -1
- package/dist/emblems/gear/gear.budo.steps.js +59 -1
- package/dist/emblems/gear/gear.cricketbat.d.ts +8 -0
- package/dist/emblems/gear/gear.cricketbat.js +8 -0
- package/dist/emblems/gear/gear.field.d.ts +48 -0
- package/dist/emblems/gear/gear.field.js +48 -0
- package/dist/emblems/gear/gear.fieldhockeystick.d.ts +8 -0
- package/dist/emblems/gear/gear.fieldhockeystick.js +8 -0
- package/dist/emblems/gear/gear.footballhelmet.d.ts +8 -0
- package/dist/emblems/gear/gear.footballhelmet.js +8 -0
- package/dist/emblems/gear/gear.goaliemask.d.ts +8 -0
- package/dist/emblems/gear/gear.goaliemask.js +8 -0
- package/dist/emblems/gear/gear.goalnet.d.ts +8 -0
- package/dist/emblems/gear/gear.goalnet.js +8 -0
- package/dist/emblems/gear/gear.hockeystick.d.ts +8 -0
- package/dist/emblems/gear/gear.hockeystick.js +8 -0
- package/dist/emblems/gear/gear.kendo.d.ts +16 -0
- package/dist/emblems/gear/gear.kendo.js +16 -0
- package/dist/emblems/gear/gear.kyudo.d.ts +16 -0
- package/dist/emblems/gear/gear.kyudo.js +16 -0
- package/dist/emblems/gear/gear.lacrossestick.d.ts +8 -0
- package/dist/emblems/gear/gear.lacrossestick.js +8 -0
- package/dist/emblems/gear/gear.nets.d.ts +24 -0
- package/dist/emblems/gear/gear.nets.js +24 -0
- package/dist/emblems/gear/gear.rackets.d.ts +32 -0
- package/dist/emblems/gear/gear.rackets.js +32 -0
- package/dist/emblems/gear/gear.skates.d.ts +24 -0
- package/dist/emblems/gear/gear.skates.js +24 -0
- package/dist/emblems/gear/gear.sticks.d.ts +24 -0
- package/dist/emblems/gear/gear.sticks.js +24 -0
- package/dist/emblems/gear/gear.sumo.d.ts +16 -0
- package/dist/emblems/gear/gear.sumo.js +16 -0
- package/dist/emblems/gear/gear.tabletennispaddle.d.ts +8 -0
- package/dist/emblems/gear/gear.tabletennispaddle.js +8 -0
- package/dist/emblems/gear/gear.tennisracket.d.ts +8 -0
- package/dist/emblems/gear/gear.tennisracket.js +8 -0
- package/dist/emblems/gear/gear.track.d.ts +32 -0
- package/dist/emblems/gear/gear.track.js +32 -0
- package/dist/emblems/gear/gear.water.d.ts +16 -0
- package/dist/emblems/gear/gear.water.js +16 -0
- package/dist/emblems/medal/bronze.d.ts +8 -1
- package/dist/emblems/medal/bronze.js +8 -1
- package/dist/emblems/medal/gold.d.ts +8 -1
- package/dist/emblems/medal/gold.js +8 -1
- package/dist/emblems/medal/place-1.d.ts +8 -1
- package/dist/emblems/medal/place-1.js +8 -1
- package/dist/emblems/medal/place-2.d.ts +8 -1
- package/dist/emblems/medal/place-2.js +8 -1
- package/dist/emblems/medal/place-3.d.ts +8 -1
- package/dist/emblems/medal/place-3.js +8 -1
- package/dist/emblems/medal/silver.d.ts +8 -1
- package/dist/emblems/medal/silver.js +8 -1
- package/dist/emblems/pennant/championship.d.ts +8 -1
- package/dist/emblems/pennant/championship.js +8 -1
- package/dist/emblems/sport/afl.d.ts +8 -1
- package/dist/emblems/sport/afl.js +8 -1
- package/dist/emblems/sport/artisticswimming.d.ts +8 -1
- package/dist/emblems/sport/artisticswimming.js +8 -1
- package/dist/emblems/sport/athletics.d.ts +8 -1
- package/dist/emblems/sport/athletics.js +8 -1
- package/dist/emblems/sport/badminton.d.ts +8 -1
- package/dist/emblems/sport/badminton.js +8 -1
- package/dist/emblems/sport/boxing.d.ts +8 -1
- package/dist/emblems/sport/boxing.js +8 -1
- package/dist/emblems/sport/cfl.d.ts +8 -1
- package/dist/emblems/sport/cfl.js +8 -1
- package/dist/emblems/sport/cricket.d.ts +8 -1
- package/dist/emblems/sport/cricket.js +8 -1
- package/dist/emblems/sport/curling.d.ts +8 -1
- package/dist/emblems/sport/curling.js +8 -1
- package/dist/emblems/sport/diving.d.ts +8 -1
- package/dist/emblems/sport/diving.js +8 -1
- package/dist/emblems/sport/fieldhockey.d.ts +8 -1
- package/dist/emblems/sport/fieldhockey.js +8 -1
- package/dist/emblems/sport/gaelic.d.ts +8 -1
- package/dist/emblems/sport/gaelic.js +8 -1
- package/dist/emblems/sport/handball.d.ts +8 -1
- package/dist/emblems/sport/handball.js +8 -1
- package/dist/emblems/sport/ifaf.d.ts +8 -1
- package/dist/emblems/sport/ifaf.js +8 -1
- package/dist/emblems/sport/judo.d.ts +8 -1
- package/dist/emblems/sport/judo.js +8 -1
- package/dist/emblems/sport/karate.d.ts +8 -1
- package/dist/emblems/sport/karate.js +8 -1
- package/dist/emblems/sport/kendo.d.ts +8 -1
- package/dist/emblems/sport/kendo.js +8 -1
- package/dist/emblems/sport/kyudo.d.ts +8 -1
- package/dist/emblems/sport/kyudo.js +8 -1
- package/dist/emblems/sport/lacrosse.d.ts +8 -1
- package/dist/emblems/sport/lacrosse.js +8 -1
- package/dist/emblems/sport/mlb.d.ts +8 -1
- package/dist/emblems/sport/mlb.js +8 -1
- package/dist/emblems/sport/mma.d.ts +8 -1
- package/dist/emblems/sport/mma.js +8 -1
- package/dist/emblems/sport/nba.d.ts +8 -1
- package/dist/emblems/sport/nba.js +8 -1
- package/dist/emblems/sport/netball.d.ts +8 -1
- package/dist/emblems/sport/netball.js +8 -1
- package/dist/emblems/sport/nfl.d.ts +8 -1
- package/dist/emblems/sport/nfl.js +8 -1
- package/dist/emblems/sport/nhl.d.ts +8 -1
- package/dist/emblems/sport/nhl.js +8 -1
- package/dist/emblems/sport/padel.d.ts +8 -1
- package/dist/emblems/sport/padel.js +8 -1
- package/dist/emblems/sport/pickleball.d.ts +8 -1
- package/dist/emblems/sport/pickleball.js +8 -1
- package/dist/emblems/sport/prowrestling.d.ts +8 -1
- package/dist/emblems/sport/prowrestling.js +8 -1
- package/dist/emblems/sport/racquetball.d.ts +8 -1
- package/dist/emblems/sport/racquetball.js +8 -1
- package/dist/emblems/sport/roundnet.d.ts +8 -1
- package/dist/emblems/sport/roundnet.js +8 -1
- package/dist/emblems/sport/rugby.d.ts +8 -1
- package/dist/emblems/sport/rugby.js +8 -1
- package/dist/emblems/sport/sepaktakraw.d.ts +8 -1
- package/dist/emblems/sport/sepaktakraw.js +8 -1
- package/dist/emblems/sport/skating.d.ts +8 -1
- package/dist/emblems/sport/skating.js +8 -1
- package/dist/emblems/sport/soccer.d.ts +8 -1
- package/dist/emblems/sport/soccer.js +8 -1
- package/dist/emblems/sport/squash.d.ts +8 -1
- package/dist/emblems/sport/squash.js +8 -1
- package/dist/emblems/sport/sumo.d.ts +8 -1
- package/dist/emblems/sport/sumo.js +8 -1
- package/dist/emblems/sport/swimming.d.ts +8 -1
- package/dist/emblems/sport/swimming.js +8 -1
- package/dist/emblems/sport/tabletennis.d.ts +8 -1
- package/dist/emblems/sport/tabletennis.js +8 -1
- package/dist/emblems/sport/tennis.d.ts +8 -1
- package/dist/emblems/sport/tennis.js +8 -1
- package/dist/emblems/sport/teqball.d.ts +8 -1
- package/dist/emblems/sport/teqball.js +8 -1
- package/dist/emblems/sport/volleyball.d.ts +8 -1
- package/dist/emblems/sport/volleyball.js +8 -1
- package/dist/emblems/sport/waterpolo.d.ts +8 -1
- package/dist/emblems/sport/waterpolo.js +8 -1
- package/dist/emblems/sport/wrestling.d.ts +8 -1
- package/dist/emblems/sport/wrestling.js +8 -1
- package/dist/emblems/trophy/americas-cup.d.ts +8 -1
- package/dist/emblems/trophy/americas-cup.js +8 -1
- package/dist/emblems/trophy/art-ross-trophy.d.ts +8 -1
- package/dist/emblems/trophy/art-ross-trophy.js +8 -1
- package/dist/emblems/trophy/ashes-urn.d.ts +8 -1
- package/dist/emblems/trophy/ashes-urn.js +8 -1
- package/dist/emblems/trophy/avco-world-trophy.d.ts +8 -1
- package/dist/emblems/trophy/avco-world-trophy.js +8 -1
- package/dist/emblems/trophy/ballon-dor.d.ts +8 -1
- package/dist/emblems/trophy/ballon-dor.js +8 -1
- package/dist/emblems/trophy/banner.d.ts +8 -1
- package/dist/emblems/trophy/banner.js +8 -1
- package/dist/emblems/trophy/baseball.d.ts +8 -1
- package/dist/emblems/trophy/baseball.js +8 -1
- package/dist/emblems/trophy/basketball.d.ts +8 -1
- package/dist/emblems/trophy/basketball.js +8 -1
- package/dist/emblems/trophy/belt.d.ts +8 -1
- package/dist/emblems/trophy/belt.js +8 -1
- package/dist/emblems/trophy/bill-russell-trophy.d.ts +8 -1
- package/dist/emblems/trophy/bill-russell-trophy.js +8 -1
- package/dist/emblems/trophy/bob-cousy-trophy.d.ts +8 -1
- package/dist/emblems/trophy/bob-cousy-trophy.js +8 -1
- package/dist/emblems/trophy/borg-warner-trophy.d.ts +8 -1
- package/dist/emblems/trophy/borg-warner-trophy.js +8 -1
- package/dist/emblems/trophy/bowl.d.ts +8 -1
- package/dist/emblems/trophy/bowl.js +8 -1
- package/dist/emblems/trophy/calder-cup.d.ts +8 -1
- package/dist/emblems/trophy/calder-cup.js +8 -1
- package/dist/emblems/trophy/calder-trophy.d.ts +8 -1
- package/dist/emblems/trophy/calder-trophy.js +8 -1
- package/dist/emblems/trophy/campbell-bowl.d.ts +8 -1
- package/dist/emblems/trophy/campbell-bowl.js +8 -1
- package/dist/emblems/trophy/canadian-bowl.d.ts +8 -1
- package/dist/emblems/trophy/canadian-bowl.js +8 -1
- package/dist/emblems/trophy/cfp-trophy.d.ts +8 -1
- package/dist/emblems/trophy/cfp-trophy.js +8 -1
- package/dist/emblems/trophy/champions-league-trophy.d.ts +8 -1
- package/dist/emblems/trophy/champions-league-trophy.js +8 -1
- package/dist/emblems/trophy/championship-banner.d.ts +8 -1
- package/dist/emblems/trophy/championship-banner.js +8 -1
- package/dist/emblems/trophy/commissioners-trophy.d.ts +8 -1
- package/dist/emblems/trophy/commissioners-trophy.js +8 -1
- package/dist/emblems/trophy/conn-smythe-trophy.d.ts +8 -1
- package/dist/emblems/trophy/conn-smythe-trophy.js +8 -1
- package/dist/emblems/trophy/cricket-urn.d.ts +8 -1
- package/dist/emblems/trophy/cricket-urn.js +8 -1
- package/dist/emblems/trophy/cricket-world-cup.d.ts +8 -1
- package/dist/emblems/trophy/cricket-world-cup.js +8 -1
- package/dist/emblems/trophy/cup.d.ts +8 -1
- package/dist/emblems/trophy/cup.js +8 -1
- package/dist/emblems/trophy/cy-young-award.d.ts +8 -1
- package/dist/emblems/trophy/cy-young-award.js +8 -1
- package/dist/emblems/trophy/dfb-pokal.d.ts +8 -1
- package/dist/emblems/trophy/dfb-pokal.js +8 -1
- package/dist/emblems/trophy/fa-cup.d.ts +8 -1
- package/dist/emblems/trophy/fa-cup.js +8 -1
- package/dist/emblems/trophy/fifa-world-cup.d.ts +8 -1
- package/dist/emblems/trophy/fifa-world-cup.js +8 -1
- package/dist/emblems/trophy/football.d.ts +8 -1
- package/dist/emblems/trophy/football.js +8 -1
- package/dist/emblems/trophy/foundation-player-award.d.ts +8 -1
- package/dist/emblems/trophy/foundation-player-award.js +8 -1
- package/dist/emblems/trophy/george-halas-trophy.d.ts +8 -1
- package/dist/emblems/trophy/george-halas-trophy.js +8 -1
- package/dist/emblems/trophy/globe.d.ts +8 -1
- package/dist/emblems/trophy/globe.js +8 -1
- package/dist/emblems/trophy/gold-glove-award.d.ts +8 -1
- package/dist/emblems/trophy/gold-glove-award.js +8 -1
- package/dist/emblems/trophy/grey-cup.d.ts +8 -1
- package/dist/emblems/trophy/grey-cup.js +8 -1
- package/dist/emblems/trophy/hank-aaron-award.d.ts +8 -1
- package/dist/emblems/trophy/hank-aaron-award.js +8 -1
- package/dist/emblems/trophy/hart-trophy.d.ts +8 -1
- package/dist/emblems/trophy/hart-trophy.js +8 -1
- package/dist/emblems/trophy/hockey-cup.d.ts +8 -1
- package/dist/emblems/trophy/hockey-cup.js +8 -1
- package/dist/emblems/trophy/jack-adams-trophy.d.ts +8 -1
- package/dist/emblems/trophy/jack-adams-trophy.js +8 -1
- package/dist/emblems/trophy/jackie-robinson-award.d.ts +8 -1
- package/dist/emblems/trophy/jackie-robinson-award.js +8 -1
- package/dist/emblems/trophy/jennings-trophy.d.ts +8 -1
- package/dist/emblems/trophy/jennings-trophy.js +8 -1
- package/dist/emblems/trophy/kelly-cup.d.ts +8 -1
- package/dist/emblems/trophy/kelly-cup.js +8 -1
- package/dist/emblems/trophy/king-clancy-trophy.d.ts +8 -1
- package/dist/emblems/trophy/king-clancy-trophy.js +8 -1
- package/dist/emblems/trophy/lady-byng-trophy.d.ts +8 -1
- package/dist/emblems/trophy/lady-byng-trophy.js +8 -1
- package/dist/emblems/trophy/lamar-hunt-trophy.d.ts +8 -1
- package/dist/emblems/trophy/lamar-hunt-trophy.js +8 -1
- package/dist/emblems/trophy/larry-bird-trophy.d.ts +8 -1
- package/dist/emblems/trophy/larry-bird-trophy.js +8 -1
- package/dist/emblems/trophy/larry-obrien-trophy-1977.d.ts +8 -1
- package/dist/emblems/trophy/larry-obrien-trophy-1977.js +8 -1
- package/dist/emblems/trophy/larry-obrien-trophy.d.ts +8 -1
- package/dist/emblems/trophy/larry-obrien-trophy.js +8 -1
- package/dist/emblems/trophy/laurel.d.ts +8 -1
- package/dist/emblems/trophy/laurel.js +8 -1
- package/dist/emblems/trophy/lester-patrick-trophy.d.ts +8 -1
- package/dist/emblems/trophy/lester-patrick-trophy.js +8 -1
- package/dist/emblems/trophy/lidded-cup.d.ts +8 -1
- package/dist/emblems/trophy/lidded-cup.js +8 -1
- package/dist/emblems/trophy/lombardi-trophy.d.ts +8 -1
- package/dist/emblems/trophy/lombardi-trophy.js +8 -1
- package/dist/emblems/trophy/magic-johnson-trophy.d.ts +8 -1
- package/dist/emblems/trophy/magic-johnson-trophy.js +8 -1
- package/dist/emblems/trophy/masterton-trophy.d.ts +8 -1
- package/dist/emblems/trophy/masterton-trophy.js +8 -1
- package/dist/emblems/trophy/messier-leadership-award.d.ts +8 -1
- package/dist/emblems/trophy/messier-leadership-award.js +8 -1
- package/dist/emblems/trophy/mlb-mvp-award.d.ts +8 -1
- package/dist/emblems/trophy/mlb-mvp-award.js +8 -1
- package/dist/emblems/trophy/mls-cup.d.ts +8 -1
- package/dist/emblems/trophy/mls-cup.js +8 -1
- package/dist/emblems/trophy/nba-eastern-conference-2001.d.ts +8 -1
- package/dist/emblems/trophy/nba-eastern-conference-2001.js +8 -1
- package/dist/emblems/trophy/nba-western-conference-2001.d.ts +8 -1
- package/dist/emblems/trophy/nba-western-conference-2001.js +8 -1
- package/dist/emblems/trophy/norris-trophy.d.ts +8 -1
- package/dist/emblems/trophy/norris-trophy.js +8 -1
- package/dist/emblems/trophy/obrien-cup.d.ts +8 -1
- package/dist/emblems/trophy/obrien-cup.js +8 -1
- package/dist/emblems/trophy/oscar-robertson-trophy.d.ts +8 -1
- package/dist/emblems/trophy/oscar-robertson-trophy.js +8 -1
- package/dist/emblems/trophy/paterson-cup.d.ts +8 -1
- package/dist/emblems/trophy/paterson-cup.js +8 -1
- package/dist/emblems/trophy/plaque.d.ts +8 -1
- package/dist/emblems/trophy/plaque.js +8 -1
- package/dist/emblems/trophy/presidents-trophy.d.ts +8 -1
- package/dist/emblems/trophy/presidents-trophy.js +8 -1
- package/dist/emblems/trophy/prince-of-wales-trophy.d.ts +8 -1
- package/dist/emblems/trophy/prince-of-wales-trophy.js +8 -1
- package/dist/emblems/trophy/relief-man-award.d.ts +8 -1
- package/dist/emblems/trophy/relief-man-award.js +8 -1
- package/dist/emblems/trophy/ring.d.ts +8 -1
- package/dist/emblems/trophy/ring.js +8 -1
- package/dist/emblems/trophy/rocket-richard-trophy.d.ts +8 -1
- package/dist/emblems/trophy/rocket-richard-trophy.js +8 -1
- package/dist/emblems/trophy/rosette.d.ts +8 -1
- package/dist/emblems/trophy/rosette.js +8 -1
- package/dist/emblems/trophy/rugby-cup.d.ts +8 -1
- package/dist/emblems/trophy/rugby-cup.js +8 -1
- package/dist/emblems/trophy/salver.d.ts +8 -1
- package/dist/emblems/trophy/salver.js +8 -1
- package/dist/emblems/trophy/selke-trophy.d.ts +8 -1
- package/dist/emblems/trophy/selke-trophy.js +8 -1
- package/dist/emblems/trophy/silver-slugger-award.d.ts +8 -1
- package/dist/emblems/trophy/silver-slugger-award.js +8 -1
- package/dist/emblems/trophy/soccer-ball.d.ts +8 -1
- package/dist/emblems/trophy/soccer-ball.js +8 -1
- package/dist/emblems/trophy/soccer-globe.d.ts +8 -1
- package/dist/emblems/trophy/soccer-globe.js +8 -1
- package/dist/emblems/trophy/stanley-cup.d.ts +8 -1
- package/dist/emblems/trophy/stanley-cup.js +8 -1
- package/dist/emblems/trophy/sumo-cup.d.ts +8 -1
- package/dist/emblems/trophy/sumo-cup.js +8 -1
- package/dist/emblems/trophy/ted-lindsay-award.d.ts +8 -1
- package/dist/emblems/trophy/ted-lindsay-award.js +8 -1
- package/dist/emblems/trophy/tennis-cup.d.ts +8 -1
- package/dist/emblems/trophy/tennis-cup.js +8 -1
- package/dist/emblems/trophy/tennis-plate.d.ts +8 -1
- package/dist/emblems/trophy/tennis-plate.js +8 -1
- package/dist/emblems/trophy/venus-rosewater-dish.d.ts +8 -1
- package/dist/emblems/trophy/venus-rosewater-dish.js +8 -1
- package/dist/emblems/trophy/vezina-trophy.d.ts +8 -1
- package/dist/emblems/trophy/vezina-trophy.js +8 -1
- package/dist/emblems/trophy/walter-cup.d.ts +8 -1
- package/dist/emblems/trophy/walter-cup.js +8 -1
- package/dist/emblems/trophy/webb-ellis-cup.d.ts +8 -1
- package/dist/emblems/trophy/webb-ellis-cup.js +8 -1
- package/dist/emblems/trophy/willie-oree-award.d.ts +8 -1
- package/dist/emblems/trophy/willie-oree-award.js +8 -1
- package/dist/emblems/trophy/wimbledon-gentlemens-trophy.d.ts +8 -1
- package/dist/emblems/trophy/wimbledon-gentlemens-trophy.js +8 -1
- package/dist/emblems/trophy/wnba-championship-trophy.d.ts +8 -1
- package/dist/emblems/trophy/wnba-championship-trophy.js +8 -1
- package/dist/emblems/trophy/woodlawn-vase.d.ts +8 -1
- package/dist/emblems/trophy/woodlawn-vase.js +8 -1
- package/dist/emblems/trophy/world-series-mvp-trophy.d.ts +8 -1
- package/dist/emblems/trophy/world-series-mvp-trophy.js +8 -1
- package/dist/emblems-entry.d.ts +2 -0
- package/dist/emblems-entry.js +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/turn-control.d.ts +72 -7
- package/dist/turn-control.js +22 -3
- package/dist/turn-full.d.ts +5 -1
- package/dist/turn-full.js +5 -1
- package/dist/version.d.ts +9 -1
- package/dist/version.js +9 -1
- package/package.json +37 -6
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,39 @@ All notable changes to this project are written here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.29.0] - 2026-11-03
|
|
10
|
+
|
|
11
|
+
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.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`@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.
|
|
16
|
+
- **`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.
|
|
17
|
+
- **`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.
|
|
18
|
+
- **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.
|
|
19
|
+
- **`hands: false`** for `bindTurn`: nothing is bound to the element, so a control with its own hands turns the emblem through `setAngles`.
|
|
20
|
+
- **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`.
|
|
21
|
+
- **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.
|
|
22
|
+
- **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`.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **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.
|
|
27
|
+
- `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.
|
|
28
|
+
- Every export has a TSDoc summary, `@param`, `@returns` and an `@example` (the documentation site is made from them).
|
|
29
|
+
- - 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`.
|
|
30
|
+
|
|
31
|
+
## [0.28.1] - 2026-11-02
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **The demo takes the family's shared parts from `@johnmorrisdotca/kazoku-ui` 0.7** (a dev dependency used only by the demo; the library stays dependency-free). The three pages that wrote their choices into the address by hand (`demo/demo.ts`, `demo/brands.ts`, `demo/compose.ts`) use the shared address state: the same keys, written a quarter of a second after the last change, so the page's own timer and its `replaceState` code are gone. The family header has the shared language picker (English and Japanese; it keeps the choice in the address, `?lang=`, and in the same `localStorage` key as before) and a new theme switch (Light, Dark, Auto; `?theme=`), from family template 2026-11-02, the same file in every repo that carries it. The demo's own Light and Dark buttons for the emblems are unchanged. The tests hold the new template's hash and the picker and switch, and reach the address with a wait, as it is written after a short delay.
|
|
36
|
+
|
|
37
|
+
### Changed (repository)
|
|
38
|
+
|
|
39
|
+
- `release.yml` is a few lines that call kazoku-ui's shared `reusable-release.yml` (pinned to v0.7.3): the same checks, tag, GitHub release with the tarball, and npm publish by trusted publishing. The trusted publisher on npmjs.com stays `release.yml`. The GitHub release's notes are generated by GitHub until the shared workflow reads `scripts/release-notes.ts`.
|
|
40
|
+
- `AGENTS.md` is written from kazoku-ui's template: the family rules above a marker, this repo's board, ports, checks and rules below it.
|
|
41
|
+
|
|
9
42
|
## [0.28.0] - 2026-10-30
|
|
10
43
|
|
|
11
44
|
More league awards: the Jackie Robinson Rookie of the Year plaque, the NFC's Halas Trophy and the Mark Messier and Willie O'Ree awards, the NBA's postseason trophies, and redrawn WNBA, Lamar Hunt, Larry O'Brien and Bill Russell trophies.
|
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, the wall and the 19 mm slot; Official Baseball Rules, Rule 3.01, for the size. The number and the layout of the slots, 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
|
-
- **
|
|
91
|
+
- **Two plastic practice baseballs**: a hollow white one with eight oblong slots on one half, and the common one with slots all over both halves, 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>
|
|
@@ -199,6 +199,7 @@ The alias is a name in your `package.json` only: the same package, the same code
|
|
|
199
199
|
| `@johnmorrisdotca/dougu-sports` | The full registry: every emblem by id, the functions, and each emblem as a constant |
|
|
200
200
|
| `@johnmorrisdotca/dougu-sports/emblems` | `renderEmblem`, the ids and the types, with no single drawing imported by name |
|
|
201
201
|
| `@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) |
|
|
202
|
+
| `@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
203
|
| `@johnmorrisdotca/dougu-sports/turn` | `emblemFrame`, `ballFrame` and `bindTurn`; `bindTurn` with an emblem object takes nothing else with it |
|
|
203
204
|
| `@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
205
|
|
|
@@ -211,9 +212,67 @@ console.log(TROPHY_HOCKEY_CUP.id); // trophy:hockey-cup
|
|
|
211
212
|
console.log(TROPHY_HOCKEY_CUP.svg({ size: 24 }).includes('width="24"')); // true
|
|
212
213
|
```
|
|
213
214
|
|
|
214
|
-
A bundler that imports this module takes the cup and the renderer for a body of revolution, and no other emblem: the package
|
|
215
|
+
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.
|
|
215
216
|
|
|
216
|
-
###
|
|
217
|
+
### Put it in your page
|
|
218
|
+
|
|
219
|
+
One script tag and the tag `<dougu-emblem>` (from jsDelivr, as in [plain HTML](./docs/guides/html-and-cdn.md)):
|
|
220
|
+
|
|
221
|
+
```html
|
|
222
|
+
<!doctype html>
|
|
223
|
+
<html lang="en">
|
|
224
|
+
<head>
|
|
225
|
+
<meta charset="utf-8" />
|
|
226
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
227
|
+
<title>Dougu Sports from jsDelivr</title>
|
|
228
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/dougu-sports/element/+esm"></script>
|
|
229
|
+
</head>
|
|
230
|
+
<body>
|
|
231
|
+
<dougu-emblem emblem="trophy:stanley-cup" size="200" turnable></dougu-emblem>
|
|
232
|
+
</body>
|
|
233
|
+
</html>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Or one iframe of the embed page, with no script on your page ([iframe guide](./docs/guides/embed-in-an-iframe.md)):
|
|
237
|
+
|
|
238
|
+
```html
|
|
239
|
+
<!doctype html>
|
|
240
|
+
<html lang="en">
|
|
241
|
+
<head>
|
|
242
|
+
<meta charset="utf-8" />
|
|
243
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
244
|
+
<title>Dougu Sports in an iframe</title>
|
|
245
|
+
</head>
|
|
246
|
+
<body>
|
|
247
|
+
<iframe
|
|
248
|
+
src="https://johnmorrisdotca.github.io/dougu-sports/embed.html?emblem=trophy:stanley-cup&size=200&turnable=1"
|
|
249
|
+
title="The Stanley Cup"
|
|
250
|
+
width="216"
|
|
251
|
+
height="216"
|
|
252
|
+
loading="lazy"
|
|
253
|
+
style="border: 0"
|
|
254
|
+
></iframe>
|
|
255
|
+
</body>
|
|
256
|
+
</html>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
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:
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
import { useEffect } from "react";
|
|
263
|
+
|
|
264
|
+
export function DouguEmblem({ emblem = "trophy:stanley-cup", size = 200 }: { emblem?: string; size?: number }) {
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
// The element needs a browser, so it is imported here, never at the top of the file: a server render never reaches an effect.
|
|
267
|
+
void import("@johnmorrisdotca/dougu-sports/element");
|
|
268
|
+
}, []);
|
|
269
|
+
return <dougu-emblem emblem={emblem} size={size} turnable />;
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`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.
|
|
274
|
+
|
|
275
|
+
### In a page, as a string
|
|
217
276
|
|
|
218
277
|
```html
|
|
219
278
|
<span id="trophy"></span>
|
|
@@ -676,7 +735,7 @@ Bug reports and ideas go in the [issues](https://github.com/johnmorrisdotca/doug
|
|
|
676
735
|
|
|
677
736
|
## Changes
|
|
678
737
|
|
|
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.
|
|
738
|
+
See [CHANGELOG.md](./CHANGELOG.md). 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
739
|
|
|
681
740
|
## Credits
|
|
682
741
|
|
|
@@ -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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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;
|