@sportsdataverse/sdvplot 0.0.0-stage → 0.1.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 (166) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE.md +94 -0
  3. package/README.md +908 -2
  4. package/dist/_web-D7Aa5Rd8.d.ts +69 -0
  5. package/dist/aaf-GJ3SH34T.js +13 -0
  6. package/dist/aaf-HCYN5T6Y.js +37 -0
  7. package/dist/aaf-ZAE5KS2Y.js +13 -0
  8. package/dist/ahl-E66MDVCU.js +66 -0
  9. package/dist/ahl-NPQQWZEV.js +249 -0
  10. package/dist/ahl-QRDU73XX.js +309 -0
  11. package/dist/axis-CraWQRUJ.d.ts +49 -0
  12. package/dist/bins.d.ts +174 -0
  13. package/dist/bins.js +4 -0
  14. package/dist/bins.js.map +1 -0
  15. package/dist/cfb-F42SVS4X.js +5000 -0
  16. package/dist/cfb-P3SHEYRZ.js +692 -0
  17. package/dist/cfb-WXRZANLP.js +10226 -0
  18. package/dist/chartjs-surface.d.ts +42 -0
  19. package/dist/chartjs-surface.js +65 -0
  20. package/dist/chartjs-surface.js.map +1 -0
  21. package/dist/chartjs.d.ts +132 -0
  22. package/dist/chartjs.js +339 -0
  23. package/dist/chartjs.js.map +1 -0
  24. package/dist/chunk-4C3GX6QO.js +92 -0
  25. package/dist/chunk-4C3GX6QO.js.map +1 -0
  26. package/dist/chunk-C2CDY5OG.js +137 -0
  27. package/dist/chunk-C2CDY5OG.js.map +1 -0
  28. package/dist/chunk-E7G7VSLV.js +43 -0
  29. package/dist/chunk-E7G7VSLV.js.map +1 -0
  30. package/dist/chunk-J6R2LEJ7.js +58 -0
  31. package/dist/chunk-J6R2LEJ7.js.map +1 -0
  32. package/dist/chunk-JJFTD4VB.js +175 -0
  33. package/dist/chunk-JJFTD4VB.js.map +1 -0
  34. package/dist/chunk-KKH6ABMA.js +223 -0
  35. package/dist/chunk-KKH6ABMA.js.map +1 -0
  36. package/dist/chunk-NLPH2VZT.js +127 -0
  37. package/dist/chunk-NLPH2VZT.js.map +1 -0
  38. package/dist/chunk-OKEE4AH6.js +30 -0
  39. package/dist/chunk-OKEE4AH6.js.map +1 -0
  40. package/dist/chunk-QY65DUEF.js +306 -0
  41. package/dist/chunk-QY65DUEF.js.map +1 -0
  42. package/dist/chunk-RMT2GMFH.js +97 -0
  43. package/dist/chunk-RMT2GMFH.js.map +1 -0
  44. package/dist/chunk-SEBO35DV.js +76 -0
  45. package/dist/chunk-SEBO35DV.js.map +1 -0
  46. package/dist/chunk-TAXO3VXH.js +556 -0
  47. package/dist/chunk-TAXO3VXH.js.map +1 -0
  48. package/dist/chunk-TDNBAEQB.js +105 -0
  49. package/dist/chunk-TDNBAEQB.js.map +1 -0
  50. package/dist/cricket-KPCYG2HL.js +493 -0
  51. package/dist/cricket-NDXLE25B.js +116 -0
  52. package/dist/cricket-YUUF7P6M.js +160 -0
  53. package/dist/d3.d.ts +234 -0
  54. package/dist/d3.js +198 -0
  55. package/dist/d3.js.map +1 -0
  56. package/dist/echarts.d.ts +121 -0
  57. package/dist/echarts.js +228 -0
  58. package/dist/echarts.js.map +1 -0
  59. package/dist/echl-3CR4RGFC.js +241 -0
  60. package/dist/echl-NPC32C23.js +107 -0
  61. package/dist/echl-PI33DGJC.js +64 -0
  62. package/dist/export.d.ts +130 -0
  63. package/dist/export.js +258 -0
  64. package/dist/export.js.map +1 -0
  65. package/dist/headshots-B2J_LOO8.d.ts +40 -0
  66. package/dist/index.d.ts +182 -0
  67. package/dist/index.js +10 -0
  68. package/dist/index.js.map +1 -0
  69. package/dist/interact.d.ts +567 -0
  70. package/dist/interact.js +809 -0
  71. package/dist/interact.js.map +1 -0
  72. package/dist/marks-DH-tQIP-.d.ts +75 -0
  73. package/dist/mbb-3TRLVW3H.js +3619 -0
  74. package/dist/mbb-DQUHCHZP.js +5111 -0
  75. package/dist/mbb-PRAIO2P5.js +371 -0
  76. package/dist/milb-6IQ6NCEW.js +291 -0
  77. package/dist/milb-EYY5MD4T.js +1752 -0
  78. package/dist/milb-EYZ4SZLI.js +797 -0
  79. package/dist/mlb-4PBUJSVQ.js +35 -0
  80. package/dist/mlb-FHPY3GQJ.js +701 -0
  81. package/dist/mlb-REVGL3N2.js +665 -0
  82. package/dist/nba-ATT775GS.js +485 -0
  83. package/dist/nba-LKM4UHVU.js +482 -0
  84. package/dist/nba-YX7PXM3R.js +35 -0
  85. package/dist/nbagl-3WGZCZ4S.js +37 -0
  86. package/dist/nbagl-LP4XJRAL.js +229 -0
  87. package/dist/nbagl-VTTOU7LN.js +499 -0
  88. package/dist/ncaa_baseball-UV75LNVR.js +2670 -0
  89. package/dist/ncaa_baseball-VD5J5C72.js +419 -0
  90. package/dist/ncaa_baseball-YRBS32D6.js +4592 -0
  91. package/dist/ncaa_mhockey-IMYHS7QS.js +1033 -0
  92. package/dist/ncaa_mhockey-TXTKWHE3.js +115 -0
  93. package/dist/ncaa_mhockey-U3MFW5VT.js +663 -0
  94. package/dist/ncaa_softball-6WR6KS64.js +420 -0
  95. package/dist/ncaa_softball-RZCTIE56.js +2654 -0
  96. package/dist/ncaa_softball-VOD4PVGY.js +4599 -0
  97. package/dist/ncaa_whockey-6XXGUTBK.js +607 -0
  98. package/dist/ncaa_whockey-AKKYKY67.js +53 -0
  99. package/dist/ncaa_whockey-KBEKXFBB.js +293 -0
  100. package/dist/nfl-BDB2HYAR.js +625 -0
  101. package/dist/nfl-EHYHDLJD.js +37 -0
  102. package/dist/nfl-VF4NJCHY.js +514 -0
  103. package/dist/nfl_gsis-UY64JO37.js +4 -0
  104. package/dist/nhl-6WPHME7H.js +511 -0
  105. package/dist/nhl-EMIJFZHY.js +884 -0
  106. package/dist/nhl-ISFUKRFU.js +37 -0
  107. package/dist/ohl-2FEM554G.js +113 -0
  108. package/dist/ohl-C5Q4W6JB.js +32 -0
  109. package/dist/ohl-TQ4J46VC.js +66 -0
  110. package/dist/phf-H7POU2KW.js +32 -0
  111. package/dist/phf-K5IFMZUM.js +13 -0
  112. package/dist/phf-TWJI3BOW.js +20 -0
  113. package/dist/plot.d.ts +449 -0
  114. package/dist/plot.js +711 -0
  115. package/dist/plot.js.map +1 -0
  116. package/dist/plotly.d.ts +129 -0
  117. package/dist/plotly.js +360 -0
  118. package/dist/plotly.js.map +1 -0
  119. package/dist/pwhl-OX3BO4JI.js +53 -0
  120. package/dist/pwhl-W44OC3C6.js +17 -0
  121. package/dist/pwhl-ZJGG3H7W.js +23 -0
  122. package/dist/qmjhl-5HISEHLL.js +35 -0
  123. package/dist/qmjhl-DA3UHKE5.js +125 -0
  124. package/dist/qmjhl-YG4BOQPF.js +614 -0
  125. package/dist/react.d.ts +101 -0
  126. package/dist/react.js +164 -0
  127. package/dist/react.js.map +1 -0
  128. package/dist/resolve-CQW-jzvr.d.ts +28 -0
  129. package/dist/selection-D4T3PkRt.d.ts +140 -0
  130. package/dist/shots.d.ts +364 -0
  131. package/dist/shots.js +85 -0
  132. package/dist/shots.js.map +1 -0
  133. package/dist/soccer-7BH3ZLVL.js +7898 -0
  134. package/dist/soccer-MRU25OGE.js +2636 -0
  135. package/dist/soccer-PF4IPPVA.js +12342 -0
  136. package/dist/surfaces-ChaD9nei.d.ts +38 -0
  137. package/dist/testing.d.ts +75 -0
  138. package/dist/testing.js +240 -0
  139. package/dist/testing.js.map +1 -0
  140. package/dist/tiers-B6pUBPcE.d.ts +93 -0
  141. package/dist/types-C7n6gJF3.d.ts +62 -0
  142. package/dist/ufl-7VLZTLTT.js +143 -0
  143. package/dist/ufl-CCMBLPSW.js +100 -0
  144. package/dist/ufl-F2BJRXME.js +16 -0
  145. package/dist/usfl-4CR5RMZJ.js +32 -0
  146. package/dist/usfl-LD7HP2YK.js +14 -0
  147. package/dist/usfl-VU4YSJQD.js +19 -0
  148. package/dist/ushl-CPG2LB4L.js +73 -0
  149. package/dist/ushl-PQL6HJAD.js +88 -0
  150. package/dist/ushl-ZT2ATPHK.js +22 -0
  151. package/dist/vega.d.ts +85 -0
  152. package/dist/vega.js +362 -0
  153. package/dist/vega.js.map +1 -0
  154. package/dist/wbb-3KHCDYTK.js +5087 -0
  155. package/dist/wbb-BMX53Q3Q.js +369 -0
  156. package/dist/wbb-QNRN2CJJ.js +3620 -0
  157. package/dist/whl-4ATYZWUB.js +97 -0
  158. package/dist/whl-RVFPL6MH.js +79 -0
  159. package/dist/whl-Y7ASKYMM.js +28 -0
  160. package/dist/wnba-FWX5SFVI.js +232 -0
  161. package/dist/wnba-GX6HZR4B.js +220 -0
  162. package/dist/wnba-NTMWIPP6.js +20 -0
  163. package/dist/xfl-43R2JMJK.js +30 -0
  164. package/dist/xfl-H3BXQPZZ.js +16 -0
  165. package/dist/xfl-XON7A7FI.js +69 -0
  166. package/package.json +154 -3
@@ -0,0 +1,88 @@
1
+ // src/data/marks/ushl.ts
2
+ var marks = [
3
+ { "team_id": "17", "mark_type": "logo", "variant": "default", "valid_from": 2015, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "1f5f5fa49b9ab68373f5fe3bbe89e58d3f4631812a6e23eb0173c6531983f017", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
4
+ { "team_id": "18", "mark_type": "logo", "variant": "default", "valid_from": 2011, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "51487e0a56b3308052a33e058e809998a8f977c18f2a4b093e02c81735ffd610", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
5
+ { "team_id": "13", "mark_type": "logo", "variant": "default", "valid_from": 2011, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "92b7a414c0ad8af428823ccd513d68e9c0697a09dec6e54d4cc4743e78067f7e", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
6
+ { "team_id": "21", "mark_type": "logo", "variant": "default", "valid_from": 2010, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "561a958d7dd1ba2b34b2b8e4ad5c855e835eb60ce8c1f33d2897666e36f19375", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
7
+ { "team_id": "24", "mark_type": "logo", "variant": "default", "valid_from": 2010, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "ee81bd5c0ff6601ce8654bdf62eac81ddaba0b9ee613fd8870678efe0d816094", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
8
+ { "team_id": "14", "mark_type": "logo", "variant": "default", "valid_from": 2009, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "aff8fff45175abee866f1d74d8537c85d25c42681cb8e9692af7931abbf7bb35", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
9
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "08fd3adcf2470970a91da8a68dde9cd1964b22d6469b957881d2491df92ac496", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
10
+ { "team_id": "10", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "0b06cd63be581d9ea16c8b34e352a11202bddfe6459ec2a5df528f0f3267758c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
11
+ { "team_id": "19", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "1617cf272a849cbea61c17167dfc1e41b2c684bcbc9c265e28ab913a0916356e", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
12
+ { "team_id": "16", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "16b4758012ab071648ed4015b082059c8b4fc13b96bf6dece426d252906a2a2c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
13
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "21f607bada6e75ba28929057621ed2002eb4a5a5ac75f2996fd897925dddd6d8", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
14
+ { "team_id": "11", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "5ec6919d93311e2e965792b154b8da986fdc58b62e7bb413ceae4f428ff208f4", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
15
+ { "team_id": "15", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "71a4e818edea0cc89399cf6bfe3a85affce95c302e30ce7472f29bca052622e5", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
16
+ { "team_id": "22", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "764383a60d6f31a904e04ffa50a669bbe6c0b2cb1c5acfffc98345451e26407a", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
17
+ { "team_id": "23", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "b2bfbbfa2bb7df5656ee95a10a29ed48ed7b38c5927715a2b8cda6f018d3fdde", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
18
+ { "team_id": "8", "mark_type": "logo", "variant": "default", "valid_from": 2003, "valid_to": 2027, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dbeb8427d7017bdf8096709f65af709790c61a3dd9f91f64bed3c78fcfb03218", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
19
+ { "team_id": "10", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "0b06cd63be581d9ea16c8b34e352a11202bddfe6459ec2a5df528f0f3267758c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
20
+ { "team_id": "16", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "150e410937c36b7d36343ed7b89b55c056520c4a861d31b7c25c2c1951d8a2d3", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
21
+ { "team_id": "19", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "1617cf272a849cbea61c17167dfc1e41b2c684bcbc9c265e28ab913a0916356e", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
22
+ { "team_id": "21", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "29671cebba90490920740263168955953b3ac3a93dfc854e9bf3bb112a4fcce5", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
23
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3785c658f6a3e3cd12433dbe6408aacf45b6e0c5d0270a087086fb9c73eed6c8", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
24
+ { "team_id": "18", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "51487e0a56b3308052a33e058e809998a8f977c18f2a4b093e02c81735ffd610", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
25
+ { "team_id": "15", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "71a4e818edea0cc89399cf6bfe3a85affce95c302e30ce7472f29bca052622e5", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
26
+ { "team_id": "22", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "764383a60d6f31a904e04ffa50a669bbe6c0b2cb1c5acfffc98345451e26407a", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
27
+ { "team_id": "13", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "92b7a414c0ad8af428823ccd513d68e9c0697a09dec6e54d4cc4743e78067f7e", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
28
+ { "team_id": "14", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "aff8fff45175abee866f1d74d8537c85d25c42681cb8e9692af7931abbf7bb35", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
29
+ { "team_id": "23", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "b2bfbbfa2bb7df5656ee95a10a29ed48ed7b38c5927715a2b8cda6f018d3fdde", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
30
+ { "team_id": "11", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "b8f4caca39c50cc9982add29993c74969c41439db18efeed54869a894838b909", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
31
+ { "team_id": "8", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dbeb8427d7017bdf8096709f65af709790c61a3dd9f91f64bed3c78fcfb03218", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
32
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dff94f9702577cdde5b093e048d38849d11f41762da58537fb4e12c41d531a2d", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
33
+ { "team_id": "24", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "ee81bd5c0ff6601ce8654bdf62eac81ddaba0b9ee613fd8870678efe0d816094", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
34
+ { "team_id": "17", "mark_type": "logo", "variant": "default", "valid_from": 2026, "valid_to": 2026, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "fdb9a3c19dd3b9e7b25f8b1c649ff3abaed366f8d36c97b34e3a30f750495c03", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
35
+ { "team_id": "16", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "16b4758012ab071648ed4015b082059c8b4fc13b96bf6dece426d252906a2a2c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
36
+ { "team_id": "13", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "197cfacef15847046c4ac0544bbbfb8c1bb372996c60073b432032246084a952", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
37
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "1d4e1255172ccfff9e8787978c1118fa41392e73bcd7ded07426b3ebc05367c9", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
38
+ { "team_id": "14", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "24b3262977ececd3b2d4312f68d06ff9bdca72b14c3d2edea1a6afee932f12ee", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
39
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "2e56783956d64fa960160e69253c510345b1121684f1a324a46aa8f43f0ff0fd", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
40
+ { "team_id": "23", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3678aa58969e389a933fd31d4bc82d8263cc863a19030929582a728ba3536116", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
41
+ { "team_id": "21", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "40bd6c0170f312ca12333523e1c23a2393e4bf0da7562ffd14c0dbf502a2c398", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
42
+ { "team_id": "18", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "48d5f1bccaeb0d860cf23b20fee1908cfd90da5e8368d136754672f9cf2fdce2", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
43
+ { "team_id": "24", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "5f13a1c8317e7ecde890422639554b912284130ba8077fc6124d5371371a2501", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
44
+ { "team_id": "10", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "823d6bf9e80085ca99ca256ebd59010ced6e12e3c5d2123eaa00426d6c50b255", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
45
+ { "team_id": "8", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "86f55dfa8deb6f656f2a83f4254e3735bf57333e36efdb97178503451097faf4", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
46
+ { "team_id": "17", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "9e29da4a782b1e8cbfb694f20bdbf3e678852a0654b6c8305f685fedf42fb076", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
47
+ { "team_id": "11", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "a1ecaf89eb894226c88cc67af22fd9c2cd11f9b64a92cd152501c35f360882aa", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
48
+ { "team_id": "22", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c010309adf582840ac872dc2f53aa266270ef743d067cacbc0e921bf31261b41", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
49
+ { "team_id": "15", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c6438ff751f886a5209a46e11f2ace8280ed378fe56a65e6eab565f6383427de", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
50
+ { "team_id": "19", "mark_type": "logo", "variant": "default", "valid_from": 2025, "valid_to": 2025, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dbdd95474862d6b83c87c20ce008bff736ef8f7238943b71cb574da3ab4b4350", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
51
+ { "team_id": "13", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "04aa77cdbef3c7ea8d928aea1bdc2bf00c8ad3faa6d8993c757386619fb18cc2", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
52
+ { "team_id": "16", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "16b4758012ab071648ed4015b082059c8b4fc13b96bf6dece426d252906a2a2c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
53
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "2e56783956d64fa960160e69253c510345b1121684f1a324a46aa8f43f0ff0fd", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
54
+ { "team_id": "23", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3678aa58969e389a933fd31d4bc82d8263cc863a19030929582a728ba3536116", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
55
+ { "team_id": "24", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3b5f2e19b267b9167290179b8cf7a7ab2ec4a839006945848d4c372b6ed29419", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
56
+ { "team_id": "18", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "48d5f1bccaeb0d860cf23b20fee1908cfd90da5e8368d136754672f9cf2fdce2", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
57
+ { "team_id": "14", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "4ae0e4ed1d0fc91532628cf1c87fd7b32607354ed42d97febbde20bce84e96ef", "ext": "jpg", "width": 50, "height": 50, "source_rank": 2 },
58
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "6a864e6330b063d9d58a24889842dee9799b3280cebed63b1247aebfd210cb55", "ext": "jpg", "width": 500, "height": 500, "source_rank": 2 },
59
+ { "team_id": "10", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "823d6bf9e80085ca99ca256ebd59010ced6e12e3c5d2123eaa00426d6c50b255", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
60
+ { "team_id": "8", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "86f55dfa8deb6f656f2a83f4254e3735bf57333e36efdb97178503451097faf4", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
61
+ { "team_id": "17", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "9e29da4a782b1e8cbfb694f20bdbf3e678852a0654b6c8305f685fedf42fb076", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
62
+ { "team_id": "11", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "a1ecaf89eb894226c88cc67af22fd9c2cd11f9b64a92cd152501c35f360882aa", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
63
+ { "team_id": "21", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "b170aa6f2cc2ac59802b24ddb28439d4e6e8588eec835761346389b4cb483bf9", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
64
+ { "team_id": "22", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c010309adf582840ac872dc2f53aa266270ef743d067cacbc0e921bf31261b41", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
65
+ { "team_id": "15", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c6438ff751f886a5209a46e11f2ace8280ed378fe56a65e6eab565f6383427de", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
66
+ { "team_id": "19", "mark_type": "logo", "variant": "default", "valid_from": 2024, "valid_to": 2024, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dbdd95474862d6b83c87c20ce008bff736ef8f7238943b71cb574da3ab4b4350", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
67
+ { "team_id": "16", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "16b4758012ab071648ed4015b082059c8b4fc13b96bf6dece426d252906a2a2c", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
68
+ { "team_id": "13", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "197cfacef15847046c4ac0544bbbfb8c1bb372996c60073b432032246084a952", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
69
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "1d4e1255172ccfff9e8787978c1118fa41392e73bcd7ded07426b3ebc05367c9", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
70
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "2e56783956d64fa960160e69253c510345b1121684f1a324a46aa8f43f0ff0fd", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
71
+ { "team_id": "23", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3678aa58969e389a933fd31d4bc82d8263cc863a19030929582a728ba3536116", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
72
+ { "team_id": "24", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "3b5f2e19b267b9167290179b8cf7a7ab2ec4a839006945848d4c372b6ed29419", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
73
+ { "team_id": "18", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "48d5f1bccaeb0d860cf23b20fee1908cfd90da5e8368d136754672f9cf2fdce2", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
74
+ { "team_id": "14", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "685404489ae7329e8b1c67f89dec0b8a227dbae27436c25059c0fea1a558bcd3", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
75
+ { "team_id": "10", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "823d6bf9e80085ca99ca256ebd59010ced6e12e3c5d2123eaa00426d6c50b255", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
76
+ { "team_id": "8", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "86f55dfa8deb6f656f2a83f4254e3735bf57333e36efdb97178503451097faf4", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
77
+ { "team_id": "17", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "9e29da4a782b1e8cbfb694f20bdbf3e678852a0654b6c8305f685fedf42fb076", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
78
+ { "team_id": "11", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "a1ecaf89eb894226c88cc67af22fd9c2cd11f9b64a92cd152501c35f360882aa", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
79
+ { "team_id": "21", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "b170aa6f2cc2ac59802b24ddb28439d4e6e8588eec835761346389b4cb483bf9", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
80
+ { "team_id": "22", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c010309adf582840ac872dc2f53aa266270ef743d067cacbc0e921bf31261b41", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
81
+ { "team_id": "15", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "c6438ff751f886a5209a46e11f2ace8280ed378fe56a65e6eab565f6383427de", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
82
+ { "team_id": "19", "mark_type": "logo", "variant": "default", "valid_from": 2023, "valid_to": 2023, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "dbdd95474862d6b83c87c20ce008bff736ef8f7238943b71cb574da3ab4b4350", "ext": "png", "width": 500, "height": 500, "source_rank": 2 },
83
+ { "team_id": "12", "mark_type": "logo", "variant": "default", "valid_from": 2019, "valid_to": 2019, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "94cf5c4fbdd703022bb20f8759e1afd734c3a446743810d3a0cb55935e0c83bc", "ext": "jpg", "width": 500, "height": 500, "source_rank": 2 },
84
+ { "team_id": "20", "mark_type": "logo", "variant": "default", "valid_from": 2019, "valid_to": 2019, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "f44bfa3b76d00dff690b922ad04af8a76c758f1b65ed2410bc4e1bf3bbf69b6b", "ext": "jpg", "width": 500, "height": 500, "source_rank": 2 },
85
+ { "team_id": "9", "mark_type": "logo", "variant": "default", "valid_from": 2015, "valid_to": 2019, "source": "hockeytech", "first_seen": "2026-09-30", "sha256": "8246c6e5ce679d065586091a9956aad9e5203cfaee4f0f479a7d1810ab29855e", "ext": "jpg", "width": 500, "height": 500, "source_rank": 2 }
86
+ ];
87
+
88
+ export { marks };
@@ -0,0 +1,22 @@
1
+ // src/data/teams/ushl.ts
2
+ var teams = [
3
+ { "league": "ushl", "team_id": "10", "abbr": null, "name": "Cedar Rapids RoughRiders", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#0c5230", "color_secondary": "#0f0d16", "color_source": "logo" },
4
+ { "league": "ushl", "team_id": "11", "abbr": null, "name": "Chicago Steel", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#941b1e", "color_secondary": null, "color_source": "logo" },
5
+ { "league": "ushl", "team_id": "12", "abbr": null, "name": "Des Moines Buccaneers", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#1d439b", "color_secondary": "#dc1c34", "color_source": "logo" },
6
+ { "league": "ushl", "team_id": "13", "abbr": null, "name": "Dubuque Fighting Saints", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#c41230", "color_secondary": "#ffffff", "color_source": "logo" },
7
+ { "league": "ushl", "team_id": "14", "abbr": null, "name": "Fargo Force", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#000000", "color_secondary": "#bbbcbe", "color_source": "logo" },
8
+ { "league": "ushl", "team_id": "15", "abbr": null, "name": "Green Bay Gamblers", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#f0b310", "color_secondary": "#231f20", "color_source": "logo" },
9
+ { "league": "ushl", "team_id": "16", "abbr": null, "name": "Lincoln Stars", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#001c71", "color_secondary": "#454d68", "color_source": "logo" },
10
+ { "league": "ushl", "team_id": "17", "abbr": null, "name": "Madison Capitols", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#a3afb7", "color_secondary": "#040707", "color_source": "logo" },
11
+ { "league": "ushl", "team_id": "18", "abbr": null, "name": "Muskegon Lumberjacks", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#cfc293", "color_secondary": "#674222", "color_source": "logo" },
12
+ { "league": "ushl", "team_id": "19", "abbr": null, "name": "Omaha Lancers", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#d19655", "color_secondary": "#d2b794", "color_source": "logo" },
13
+ { "league": "ushl", "team_id": "20", "abbr": null, "name": "Sioux Falls Stampede", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#d0932d", "color_secondary": "#02274a", "color_source": "logo" },
14
+ { "league": "ushl", "team_id": "21", "abbr": null, "name": "USA Hockey NTDP", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#9b8449", "color_secondary": "#aa1f2e", "color_source": "logo" },
15
+ { "league": "ushl", "team_id": "22", "abbr": null, "name": "Tri-City Storm", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#49318d", "color_secondary": "#251a06", "color_source": "logo" },
16
+ { "league": "ushl", "team_id": "23", "abbr": null, "name": "Waterloo Black Hawks", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#cb132d", "color_secondary": "#8d7075", "color_source": "logo" },
17
+ { "league": "ushl", "team_id": "24", "abbr": null, "name": "Youngstown Phantoms", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#4d3079", "color_secondary": "#ec754c", "color_source": "logo" },
18
+ { "league": "ushl", "team_id": "8", "abbr": null, "name": "Sioux City Musketeers", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#008544", "color_secondary": "#ffc52e", "color_source": "logo" },
19
+ { "league": "ushl", "team_id": "9", "abbr": null, "name": "Central Illinois Flying Aces", "short_name": null, "location": null, "program": "junior", "conference_id": null, "conference": null, "color_primary": "#162742", "color_secondary": "#7eadd5", "color_source": "logo" }
20
+ ];
21
+
22
+ export { teams };
package/dist/vega.d.ts ADDED
@@ -0,0 +1,85 @@
1
+ import { D as DrawnAxisMark, a as DrawnMark, R as Row, M as MarkOptions, A as AxisOptions, H as HeadshotOptions } from './_web-D7Aa5Rd8.js';
2
+ export { e as embedSources } from './_web-D7Aa5Rd8.js';
3
+ import { L as League, S as SeasonInput, I as IdSystem } from './types-C7n6gJF3.js';
4
+
5
+ /** The Vega-Lite adapter: logos, wordmarks and headshots as a native `image` mark layer on a plain spec object.
6
+ * Pure: vega-lite is never imported at runtime; a NEW layered spec is returned. */
7
+
8
+ /** Structural types for a Vega-Lite spec: the subset `sdvplot/vega` reads and writes. No runtime import of vega-lite. */
9
+ type VegaLiteSpec = Record<string, unknown> & {
10
+ layer?: unknown[];
11
+ encoding?: Record<string, unknown>;
12
+ mark?: unknown;
13
+ width?: unknown;
14
+ height?: unknown;
15
+ config?: Record<string, unknown>;
16
+ data?: unknown;
17
+ datasets?: Record<string, unknown>;
18
+ };
19
+ /** One sdvplot image layer. It never shows a tooltip: `mark.tooltip: null` outranks `config.mark.tooltip` and
20
+ * `config.image.tooltip`, and `encoding.tooltip: null` outranks a parent layer's `encoding.tooltip`. */
21
+ interface ImageLayer {
22
+ name: string;
23
+ data: {
24
+ values: Record<string, unknown>[];
25
+ };
26
+ mark: {
27
+ type: "image";
28
+ aria: true;
29
+ width: number;
30
+ height: number;
31
+ aspect: true;
32
+ tooltip: null;
33
+ opacity?: number;
34
+ align?: "left" | "center" | "right";
35
+ baseline?: "top" | "middle" | "bottom";
36
+ };
37
+ encoding: Record<string, unknown>;
38
+ }
39
+ type VlType = "quantitative" | "nominal" | "ordinal" | "temporal";
40
+ /** One image layer of team logos to drop into a layer list of your own; its fields are "x" and "y". It never shows a
41
+ * tooltip, even under `config.mark.tooltip` or a parent layer's `encoding.tooltip`. */
42
+ declare function logoLayer(rows: readonly Row[], o: MarkOptions & {
43
+ /** The chart height in px that `height` is a fraction of. Default 300 (Vega-Lite's continuous height). */
44
+ chartHeight?: number;
45
+ /** The layer's x encoding type (its field is "x"). Default "quantitative". */
46
+ xType?: VlType;
47
+ /** The layer's y encoding type (its field is "y"). Default "quantitative". */
48
+ yType?: VlType;
49
+ }): ImageLayer;
50
+ /** Team logos as an image layer at each row's (x, y). The layer never shows a tooltip, even when the spec turns tooltips
51
+ * on for every mark (`config.mark.tooltip`). */
52
+ declare function withLogos(spec: VegaLiteSpec, rows: readonly Row[], o: MarkOptions): VegaLiteSpec;
53
+ declare function withLogos<F extends object>(spec: F, rows: readonly Row[], o: MarkOptions): F;
54
+ /** Team wordmarks as an image layer at each row's (x, y). The layer never shows a tooltip, even when the spec turns
55
+ * tooltips on for every mark (`config.mark.tooltip`). */
56
+ declare function withWordmarks(spec: VegaLiteSpec, rows: readonly Row[], o: MarkOptions): VegaLiteSpec;
57
+ declare function withWordmarks<F extends object>(spec: F, rows: readonly Row[], o: MarkOptions): F;
58
+ /** Player headshots as an image layer at each row's (x, y). The layer never shows a tooltip, even when the spec turns
59
+ * tooltips on for every mark (`config.mark.tooltip`). */
60
+ declare function withHeadshots(spec: VegaLiteSpec, rows: readonly Row[], o: HeadshotOptions): VegaLiteSpec;
61
+ declare function withHeadshots<F extends object>(spec: F, rows: readonly Row[], o: HeadshotOptions): F;
62
+ /** Test hook: [teamId, x, y, height, url] per image of the sdvplot layers; height = image px / chart px. */
63
+ declare function drawnMarks(spec: VegaLiteSpec): DrawnMark[];
64
+ /** Team logos (or wordmarks, `markType`) in place of the labels of a nominal or ordinal axis: a `labelExpr` blanks the
65
+ * resolved labels and an image layer draws them. Assumes the default axis orient (x at the bottom, y on the left) and
66
+ * that `height` is the plot height: an axis with `orient: "top"` or `"right"` gets its logos on the opposite side.
67
+ * The image layer never shows a tooltip, even when the spec turns tooltips on for every mark (`config.mark.tooltip`). */
68
+ declare function withAxisLogos(spec: VegaLiteSpec, axis: "x" | "y", o: AxisOptions): VegaLiteSpec;
69
+ declare function withAxisLogos<F extends object>(spec: F, axis: "x" | "y", o: AxisOptions): F;
70
+ /** `{ domain, range }` for `encoding.color.scale`: the values as given, their team colours. */
71
+ declare function teamColorScale(league: League, teams: readonly unknown[], o?: {
72
+ which?: "primary" | "secondary";
73
+ season?: SeasonInput;
74
+ idSystem?: IdSystem;
75
+ fallback?: string;
76
+ }): {
77
+ domain: string[];
78
+ range: string[];
79
+ };
80
+ /** Test hook: [teamId, category position, height] per image on `axis`, in tick order. */
81
+ declare function drawnAxisMarks(spec: VegaLiteSpec, axis: "x" | "y"): DrawnAxisMark[];
82
+ /** Test hook: the labels on `axis` its labelExpr still shows as text. */
83
+ declare function visibleAxisLabels(spec: VegaLiteSpec, axis: "x" | "y"): string[];
84
+
85
+ export { AxisOptions, DrawnAxisMark, DrawnMark, HeadshotOptions, type ImageLayer, MarkOptions, Row, type VegaLiteSpec, type VlType, drawnAxisMarks, drawnMarks, logoLayer, teamColorScale, visibleAxisLabels, withAxisLogos, withHeadshots, withLogos, withWordmarks };
package/dist/vega.js ADDED
@@ -0,0 +1,362 @@
1
+ import { markPlacements, axisLetter, axisPlacements, aspect, imageSources, colorList } from './chunk-SEBO35DV.js';
2
+ export { embedSources } from './chunk-SEBO35DV.js';
3
+ import { checkHeight, checkAlpha, placedName } from './chunk-RMT2GMFH.js';
4
+ import './chunk-KKH6ABMA.js';
5
+ import './chunk-TAXO3VXH.js';
6
+ import { InputError, UnsupportedTargetError } from './chunk-E7G7VSLV.js';
7
+
8
+ // src/vega.ts
9
+ var DEFAULT_HEIGHT = 300;
10
+ var AXIS_GAP = 6;
11
+ var LABEL_PADDING = 2;
12
+ var URL = "sdvplot_url";
13
+ var TEAM = "sdvplot_team";
14
+ var LABEL = "sdvplot_label";
15
+ var DISCRETE = /* @__PURE__ */ new Set(["nominal", "ordinal"]);
16
+ var UNIT_KEYS = ["mark", "encoding", "transform", "params", "projection", "view", "name"];
17
+ var COMPOSITE = {
18
+ facet: "spec.spec",
19
+ repeat: "spec.spec",
20
+ hconcat: "hconcat[i]",
21
+ vconcat: "vconcat[i]",
22
+ concat: "concat[i]"
23
+ };
24
+ function specOf(target) {
25
+ if (typeof target !== "object" || target === null || Array.isArray(target))
26
+ throw new UnsupportedTargetError(
27
+ `sdvplot/vega draws on a Vega-Lite spec object, got ${target === null ? "null" : typeof target}`
28
+ );
29
+ for (const key of Object.keys(COMPOSITE))
30
+ if (key in target)
31
+ throw new InputError(
32
+ `sdvplot cannot draw on a ${key} spec; draw on one of its charts (${COMPOSITE[key]}), then combine`
33
+ );
34
+ return target;
35
+ }
36
+ var jsonable = (v) => v instanceof Date ? v.toISOString() : typeof v === "bigint" ? Number(v) : v;
37
+ var unescapeField = (f) => f.replace(/\\(.)/g, "$1");
38
+ function units(spec) {
39
+ return [spec, ...(spec.layer ?? []).flatMap((s) => units(s))];
40
+ }
41
+ function unit(spec, channel) {
42
+ for (const u of units(spec)) {
43
+ const e = u.encoding?.[channel];
44
+ if (typeof e === "object" && e !== null && "field" in e) return [u, e];
45
+ }
46
+ return [{}, {}];
47
+ }
48
+ function pixels(h, name) {
49
+ if (typeof h !== "number" || !Number.isFinite(h) || h <= 0)
50
+ throw new InputError(
51
+ `sdvplot sizes marks from the chart height; ${name} must be a positive number of pixels, not ${JSON.stringify(h)}`
52
+ );
53
+ return h;
54
+ }
55
+ function chartHeight(spec) {
56
+ for (const u of units(spec)) if (u.height !== void 0) return pixels(u.height, "height");
57
+ if (DISCRETE.has(String(unit(spec, "y")[1].type)))
58
+ throw new InputError(
59
+ "a discrete y axis is sized by its step; set the chart height in pixels (spec.height)"
60
+ );
61
+ const h = spec.config?.view?.continuousHeight ?? DEFAULT_HEIGHT;
62
+ return pixels(h, "config.view.continuousHeight");
63
+ }
64
+ var STACKED_BY_DEFAULT = /* @__PURE__ */ new Set(["bar", "area", "arc"]);
65
+ function byChannel(sort, u) {
66
+ const desc = sort.startsWith("-");
67
+ const def = u.encoding?.[desc ? sort.slice(1) : sort];
68
+ if (def?.field === void 0 && def?.aggregate === void 0)
69
+ throw new InputError(
70
+ `the sort ${JSON.stringify(sort)} names a channel without a field; sort with an explicit list (sort: [...])`
71
+ );
72
+ const marks = units(u).map(
73
+ (v) => String(typeof v.mark === "object" && v.mark !== null ? v.mark.type : v.mark)
74
+ );
75
+ const stacked = def.type === "quantitative" && !def.bin && ("stack" in def ? Boolean(def.stack) : marks.some((m) => STACKED_BY_DEFAULT.has(m)));
76
+ return {
77
+ ...def.field !== void 0 ? { field: def.field } : {},
78
+ op: def.aggregate ?? (stacked ? "sum" : "min"),
79
+ ...desc ? { order: "descending" } : {}
80
+ };
81
+ }
82
+ function inlineRows(spec, u) {
83
+ const data = u.data ?? spec.data ?? {};
84
+ return data.name !== void 0 ? spec.datasets?.[data.name] : data.values;
85
+ }
86
+ function countOrder(spec, u, enc, order, channel) {
87
+ const rows = inlineRows(spec, u);
88
+ const all = units(spec);
89
+ if (rows === void 0 || new Set(all.map((v) => v.data).filter((d) => d !== void 0)).size > 1 || all.some((v) => v.transform !== void 0))
90
+ throw new InputError(
91
+ `the ${channel} count sort is kept once a layer is added only on inline data with no transform (one data source); sort with an explicit list (sort: [...]), then add the marks`
92
+ );
93
+ const key = unescapeField(String(enc.field));
94
+ const counts = /* @__PURE__ */ new Map();
95
+ for (const r of rows)
96
+ if (r[key] !== null && r[key] !== void 0) counts.set(r[key], (counts.get(r[key]) ?? 0) + 1);
97
+ const sign = order === "descending" ? -1 : 1;
98
+ return [...counts].sort((a, b) => (a[1] - b[1]) * sign).map(([c]) => c);
99
+ }
100
+ function sortOf(spec, enc, channel, u) {
101
+ const given = "sort" in enc ? enc.sort : "ascending";
102
+ const sort = typeof given === "string" && given !== "ascending" && given !== "descending" ? byChannel(given, u) : given;
103
+ const op = String(sort?.op);
104
+ const kept = sort === null || sort === "ascending" || sort === "descending" || Array.isArray(sort) || typeof sort === "object" && ("field" in sort || op === "count") && ["count", "min", "max"].includes(op);
105
+ if (!kept)
106
+ throw new InputError(
107
+ `Vega-Lite drops the ${channel} sort ${JSON.stringify(given)}${given === sort ? "" : ` (${JSON.stringify(sort)})`} once a layer is added; sort with an explicit list (sort: [...]) or by a field with op "count", "min" or "max", then add the marks`
108
+ );
109
+ return op === "count" ? countOrder(spec, u, enc, sort.order, channel) : sort;
110
+ }
111
+ function encodings(spec) {
112
+ const out = {};
113
+ for (const ch of ["x", "y"]) {
114
+ const [u, enc] = unit(spec, ch);
115
+ for (const key of ["aggregate", "bin"]) {
116
+ const v = enc[key];
117
+ if (v !== void 0 && v !== null && v !== false && v !== "binned")
118
+ throw new InputError(
119
+ `the chart's ${ch} encoding has ${key}=${JSON.stringify(v)}, which the logo layer cannot copy; compute it in the data first, encode the result, then add the marks`
120
+ );
121
+ }
122
+ const e = { field: enc.field ?? ch, type: enc.type ?? "quantitative" };
123
+ if (enc.timeUnit !== void 0) e.timeUnit = enc.timeUnit;
124
+ if (DISCRETE.has(String(e.type)) && "sort" in enc) e.sort = sortOf(spec, enc, ch, u);
125
+ out[ch] = e;
126
+ }
127
+ return out;
128
+ }
129
+ function labelsOf(rows, ps, o) {
130
+ const key = "player" in o ? o.player : o.team;
131
+ return ps.map((p) => placedName(p, o.league, rows[p.index]?.[key]));
132
+ }
133
+ function layerOf(ps, kind, h, chartH, alpha, x, y, labels, embed) {
134
+ const hPx = h * chartH;
135
+ const sources = imageSources(ps, embed);
136
+ const values = ps.map((p, i) => ({
137
+ [unescapeField(String(x.field))]: jsonable(p.x),
138
+ [unescapeField(String(y.field))]: jsonable(p.y),
139
+ [URL]: sources[i],
140
+ [TEAM]: p.id,
141
+ [LABEL]: `${labels[i]} ${kind}`
142
+ }));
143
+ const widest = ps.length ? Math.max(...ps.map(aspect)) : 1;
144
+ return {
145
+ name: `sdvplot_${kind}`,
146
+ data: { values },
147
+ mark: {
148
+ type: "image",
149
+ aria: true,
150
+ width: hPx * widest,
151
+ height: hPx,
152
+ aspect: true,
153
+ tooltip: null,
154
+ opacity: alpha
155
+ },
156
+ encoding: {
157
+ x,
158
+ y,
159
+ url: { field: URL, type: "nominal" },
160
+ description: { field: LABEL, type: "nominal" },
161
+ tooltip: null
162
+ }
163
+ };
164
+ }
165
+ function layered(spec, layer) {
166
+ if (Array.isArray(spec.layer)) {
167
+ const { encoding, transform, ...top2 } = spec;
168
+ if (encoding === void 0 && transform === void 0) return { ...spec, layer: [...spec.layer, layer] };
169
+ const group = {
170
+ ...transform !== void 0 ? { transform } : {},
171
+ ...encoding !== void 0 ? { encoding } : {}
172
+ };
173
+ return { ...top2, layer: [{ ...group, layer: spec.layer }, layer] };
174
+ }
175
+ const top = {};
176
+ const first = {};
177
+ for (const [k, v] of Object.entries(spec))
178
+ (UNIT_KEYS.includes(k) ? first : top)[k] = v;
179
+ return { ...top, layer: [first, layer] };
180
+ }
181
+ function logoLayer(rows, o) {
182
+ const h = checkHeight(o.height ?? 0.1);
183
+ const a = checkAlpha(o.alpha ?? 1);
184
+ const ps = markPlacements(rows, "logo", o);
185
+ return layerOf(
186
+ ps,
187
+ "logo",
188
+ h,
189
+ o.chartHeight === void 0 ? DEFAULT_HEIGHT : pixels(o.chartHeight, "chartHeight"),
190
+ a,
191
+ { field: "x", type: o.xType ?? "quantitative" },
192
+ { field: "y", type: o.yType ?? "quantitative" },
193
+ labelsOf(rows, ps, o),
194
+ o.embed
195
+ );
196
+ }
197
+ function add(target, rows, kind, o) {
198
+ const h = checkHeight(o.height ?? 0.1);
199
+ const a = checkAlpha(o.alpha ?? 1);
200
+ const spec = specOf(target);
201
+ const enc = encodings(spec);
202
+ const ps = markPlacements(rows, kind, o);
203
+ const base = structuredClone(spec);
204
+ for (const ch of ["x", "y"])
205
+ if (Array.isArray(enc[ch].sort)) targetChannel(base, ch).sort = enc[ch].sort;
206
+ return layered(
207
+ base,
208
+ layerOf(ps, kind, h, chartHeight(spec), a, enc.x, enc.y, labelsOf(rows, ps, o), o.embed)
209
+ );
210
+ }
211
+ function withLogos(spec, rows, o) {
212
+ return add(spec, rows, "logo", o);
213
+ }
214
+ function withWordmarks(spec, rows, o) {
215
+ return add(spec, rows, "wordmark", o);
216
+ }
217
+ function withHeadshots(spec, rows, o) {
218
+ return add(spec, rows, "headshot", o);
219
+ }
220
+ function named(spec, prefix) {
221
+ return units(spec).filter(
222
+ (u) => typeof u.name === "string" && u.name.startsWith(prefix)
223
+ );
224
+ }
225
+ function drawnMarks(spec) {
226
+ const s = specOf(spec);
227
+ const ref = chartHeight(s);
228
+ return named(s, "sdvplot_").filter((l) => !l.name.startsWith("sdvplot_axis_")).flatMap((l) => {
229
+ const xk = unescapeField(String(l.encoding.x.field));
230
+ const yk = unescapeField(String(l.encoding.y.field));
231
+ return l.data.values.map(
232
+ (r) => [String(r[TEAM]), r[xk], r[yk], l.mark.height / ref, String(r[URL])]
233
+ );
234
+ });
235
+ }
236
+ var BLANKED = /^indexof\((\[.*?\]), datum\.label\) >= 0/;
237
+ function categoriesOf(spec, u, enc) {
238
+ if (Array.isArray(enc.scale?.domain)) return enc.scale.domain;
239
+ const sort = "sort" in enc ? enc.sort : "ascending";
240
+ const rows = inlineRows(spec, u);
241
+ if (rows === void 0) {
242
+ if (Array.isArray(sort)) return sort;
243
+ throw new InputError(
244
+ "withAxisLogos reads the categories from inline data; give the axis an explicit sort=[...] list"
245
+ );
246
+ }
247
+ const key = unescapeField(String(enc.field));
248
+ const seen = [...new Set(rows.map((r) => r[key]).filter((v) => v !== null && v !== void 0))];
249
+ if (Array.isArray(sort)) return [...sort, ...seen.filter((c) => !sort.includes(c))];
250
+ if (sort === "ascending" || sort === "descending")
251
+ return seen.sort((a, b) => String(a).localeCompare(String(b)) * (sort === "descending" ? -1 : 1));
252
+ return seen;
253
+ }
254
+ function targetChannel(spec, channel) {
255
+ for (const u of units(spec)) {
256
+ const e = u.encoding?.[channel];
257
+ if (typeof e === "object" && e !== null && "field" in e) return e;
258
+ }
259
+ throw new InputError(`the spec has no ${channel} encoding with a field`);
260
+ }
261
+ function withAxisLogos(spec, axis, o) {
262
+ const letter = axisLetter(axis);
263
+ const h = checkHeight(o.height ?? 0.1);
264
+ const s = specOf(spec);
265
+ const [u, enc] = unit(s, letter);
266
+ if (!DISCRETE.has(String(enc.type)))
267
+ throw new InputError(`withAxisLogos needs a nominal or ordinal ${letter} axis (team names on the axis)`);
268
+ if (enc.axis === null) throw new InputError(`the chart's ${letter} axis is hidden (axis: null)`);
269
+ const sort = sortOf(s, enc, letter, u);
270
+ const cats = categoriesOf(s, u, enc);
271
+ const ps = axisPlacements(cats.map(String), letter, o);
272
+ const chartH = chartHeight(s);
273
+ const hPx = h * chartH;
274
+ const widest = ps.length ? Math.max(...ps.map(aspect)) : 1;
275
+ const pos = ps.map((p) => Number(letter === "x" ? p.x : p.y));
276
+ const blank = JSON.stringify(pos.map((i) => String(cats[i])));
277
+ const old = typeof enc.axis === "object" && enc.axis !== null ? enc.axis : {};
278
+ const room = (letter === "x" ? hPx : hPx * widest) + AXIS_GAP;
279
+ const expr = `indexof(${blank}, datum.label) >= 0 ? '' : ${old.labelExpr !== void 0 ? `(${old.labelExpr})` : "datum.label"}`;
280
+ const base = structuredClone(s);
281
+ const target = targetChannel(base, letter);
282
+ target.axis = {
283
+ ...old,
284
+ labelExpr: expr,
285
+ labelPadding: (old.labelPadding ?? LABEL_PADDING) + room
286
+ };
287
+ if (Array.isArray(sort)) target.sort = sort;
288
+ const key = unescapeField(String(enc.field));
289
+ const sources = imageSources(ps, o.embed);
290
+ const values = ps.map((p, i) => ({
291
+ [key]: cats[pos[i]],
292
+ [URL]: sources[i],
293
+ [TEAM]: p.id,
294
+ [LABEL]: `${placedName(p, o.league, cats[pos[i]])} ${o.markType ?? "logo"}`
295
+ }));
296
+ const channel = {
297
+ field: enc.field ?? letter,
298
+ type: String(enc.type),
299
+ ..."sort" in enc ? { sort } : {}
300
+ };
301
+ const url = { field: URL, type: "nominal" };
302
+ const description = { field: LABEL, type: "nominal" };
303
+ const layer = letter === "x" ? {
304
+ name: "sdvplot_axis_x",
305
+ data: { values },
306
+ mark: {
307
+ type: "image",
308
+ aria: true,
309
+ width: hPx * widest,
310
+ height: hPx,
311
+ aspect: true,
312
+ tooltip: null,
313
+ baseline: "top"
314
+ },
315
+ encoding: { x: channel, y: { value: chartH + AXIS_GAP }, url, description, tooltip: null }
316
+ } : {
317
+ name: "sdvplot_axis_y",
318
+ data: { values },
319
+ mark: {
320
+ type: "image",
321
+ aria: true,
322
+ width: hPx * widest,
323
+ height: hPx,
324
+ aspect: true,
325
+ tooltip: null,
326
+ align: "right"
327
+ },
328
+ encoding: { y: channel, x: { value: -AXIS_GAP }, url, description, tooltip: null }
329
+ };
330
+ return layered(base, layer);
331
+ }
332
+ function teamColorScale(league, teams, o = {}) {
333
+ return {
334
+ domain: teams.map(String),
335
+ range: colorList(league, teams, o).map((c) => c ?? o.fallback ?? "#808080")
336
+ };
337
+ }
338
+ function drawnAxisMarks(spec, axis) {
339
+ const letter = axisLetter(axis);
340
+ const s = specOf(spec);
341
+ const [u, enc] = unit(s, letter);
342
+ const cats = categoriesOf(s, u, enc);
343
+ const ref = chartHeight(s);
344
+ return named(s, `sdvplot_axis_${letter}`).flatMap((l) => {
345
+ const key = unescapeField(String(l.encoding[letter].field));
346
+ return l.data.values.map(
347
+ (r) => [String(r[TEAM]), cats.indexOf(r[key]), l.mark.height / ref]
348
+ );
349
+ }).sort((a, b) => a[1] - b[1]);
350
+ }
351
+ function visibleAxisLabels(spec, axis) {
352
+ const letter = axisLetter(axis);
353
+ const s = specOf(spec);
354
+ const [u, enc] = unit(s, letter);
355
+ const m = BLANKED.exec(String(enc.axis?.labelExpr ?? ""));
356
+ const blanked = new Set(m ? JSON.parse(m[1]) : []);
357
+ return categoriesOf(s, u, enc).map(String).filter((c) => !blanked.has(c));
358
+ }
359
+
360
+ export { drawnAxisMarks, drawnMarks, logoLayer, teamColorScale, visibleAxisLabels, withAxisLogos, withHeadshots, withLogos, withWordmarks };
361
+ //# sourceMappingURL=vega.js.map
362
+ //# sourceMappingURL=vega.js.map