boardplot 0.52.5 → 0.54.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 (388) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +13 -12
  3. package/dist/{ReaderBox-VUNSFKZY.js → ReaderBox-YXC5XK7D.js} +6 -5
  4. package/dist/{annotateEngine-H7OW4H3W.js → annotateEngine-5O3IRSQL.js} +3 -1
  5. package/dist/build-identity.json +3 -3
  6. package/dist/{chunk-ZSLGN6CO.js → chunk-23RWLBZF.js} +1 -1
  7. package/dist/{chunk-HAAUJDGB.js → chunk-24BHMKDD.js} +2 -2
  8. package/dist/{chunk-MDYLOIS2.js → chunk-26P4WRQC.js} +1 -1
  9. package/dist/{chunk-EWVKBRLV.js → chunk-2DR5MMDY.js} +2 -2
  10. package/dist/{chunk-3ZCKEANJ.js → chunk-2HXKW6U6.js} +3 -3
  11. package/dist/{chunk-GWQIXU37.js → chunk-2IXDYW6O.js} +30 -28
  12. package/dist/{chunk-OLNORNCT.js → chunk-2THWIKRB.js} +4 -4
  13. package/dist/{chunk-JRPI64AQ.js → chunk-32X7JGH3.js} +18 -15
  14. package/dist/{chunk-PUVGWJQ5.js → chunk-35ZTANEK.js} +4 -4
  15. package/dist/{chunk-FOKEGVPB.js → chunk-3CLLHMFF.js} +3 -3
  16. package/dist/{chunk-XYONCO5Q.js → chunk-3FNY7ZCG.js} +19 -16
  17. package/dist/{chunk-X7TXGKRX.js → chunk-3P4PJJND.js} +6 -6
  18. package/dist/{chunk-4DNOEV3Q.js → chunk-3RMTPAEJ.js} +79 -2
  19. package/dist/{chunk-NYEY6W5R.js → chunk-3UBTO342.js} +8 -8
  20. package/dist/{chunk-MCOIEWW6.js → chunk-3V7AA3IZ.js} +1 -1
  21. package/dist/{chunk-RJQ5YS3Q.js → chunk-43OQ26TL.js} +10 -6
  22. package/dist/{chunk-V422EKLW.js → chunk-46ZPFJAM.js} +3 -3
  23. package/dist/{chunk-W7UZXD5D.js → chunk-47BO6MYI.js} +18 -15
  24. package/dist/{chunk-5T5YW52S.js → chunk-4FFCIQDG.js} +1 -1
  25. package/dist/{chunk-KU4YS6HN.js → chunk-4MREJWRM.js} +1 -1
  26. package/dist/{chunk-IDTLHPTK.js → chunk-4TPHMIE5.js} +2 -2
  27. package/dist/{chunk-2MTWKMEG.js → chunk-4WK3CNW5.js} +13 -6
  28. package/dist/{chunk-ORUJI3VB.js → chunk-4WQ2MBE7.js} +1 -1
  29. package/dist/chunk-4ZGN4ZUN.js +164 -0
  30. package/dist/{chunk-YQ2B3YVF.js → chunk-53OYF4ZT.js} +1 -1
  31. package/dist/{chunk-JL5BRMDT.js → chunk-57ZGVAU3.js} +1 -1
  32. package/dist/{chunk-VYMGZ27S.js → chunk-5A6MO4AR.js} +3 -2
  33. package/dist/{chunk-WHSTEAVP.js → chunk-5PCCSSII.js} +1 -1
  34. package/dist/{chunk-Z256ACGC.js → chunk-5SJQOPL7.js} +2 -2
  35. package/dist/{chunk-RNOD2UWF.js → chunk-6BJQULXR.js} +12 -12
  36. package/dist/{chunk-2DHJJ2EN.js → chunk-6BWSF5PS.js} +3 -3
  37. package/dist/{chunk-CAE2HK2G.js → chunk-6I7YZTY7.js} +3 -11
  38. package/dist/{chunk-XW5J5JAX.js → chunk-6K2TMVPF.js} +2 -2
  39. package/dist/{chunk-IZ35GMGB.js → chunk-6NLH6TEP.js} +13 -10
  40. package/dist/{chunk-TTR7EWNH.js → chunk-6TJDWMZV.js} +4 -4
  41. package/dist/{chunk-KSYVTEKR.js → chunk-6ZXMA4TY.js} +3 -3
  42. package/dist/{chunk-OH7FA4TF.js → chunk-7EOLHBI6.js} +1 -1
  43. package/dist/{chunk-3W23F7EY.js → chunk-7EVIIADO.js} +1 -1
  44. package/dist/{chunk-EC2NAYPQ.js → chunk-7HFUG25L.js} +3 -3
  45. package/dist/{chunk-DLC23CKC.js → chunk-7JQAUJOL.js} +1 -1
  46. package/dist/{chunk-3I6RANBJ.js → chunk-7NWFKHSG.js} +36 -32
  47. package/dist/{chunk-RNXITK5M.js → chunk-7R5EV5MS.js} +3 -3
  48. package/dist/{chunk-ELYU6TRQ.js → chunk-7X3UZM7F.js} +1 -1
  49. package/dist/{chunk-UZF3G2FN.js → chunk-A5TY7H5T.js} +5 -5
  50. package/dist/{chunk-XEGRWWNO.js → chunk-AA4U62G6.js} +2 -2
  51. package/dist/{chunk-TXINIAFL.js → chunk-AG2CJ4JY.js} +10 -5
  52. package/dist/{chunk-R5SWC3EW.js → chunk-AHQ4L3BE.js} +1 -1
  53. package/dist/{chunk-35DZP2R2.js → chunk-AJHYXD5U.js} +2 -2
  54. package/dist/{chunk-TPYV2FTV.js → chunk-ATUZTGZI.js} +3 -3
  55. package/dist/{chunk-S53OGZL6.js → chunk-AVMKRVNP.js} +1 -1
  56. package/dist/{chunk-R3WI7ZLE.js → chunk-AZIRTSVP.js} +14 -11
  57. package/dist/{chunk-II7652VA.js → chunk-B3F4TS3V.js} +47 -20
  58. package/dist/{chunk-DCCJRLAJ.js → chunk-B6LHZLLK.js} +5 -0
  59. package/dist/{chunk-M6KTNAND.js → chunk-BRPOSOK5.js} +17 -11
  60. package/dist/{chunk-EQT3EPTB.js → chunk-BWTX7LUG.js} +1 -1
  61. package/dist/{chunk-BVWU6GOB.js → chunk-BXEM2CVW.js} +2 -2
  62. package/dist/{chunk-A7A4PDG5.js → chunk-BYD7VLAI.js} +3 -3
  63. package/dist/{chunk-JFG4DHKQ.js → chunk-C3O45JWU.js} +1 -1
  64. package/dist/{chunk-BKYMLFUG.js → chunk-C54QLNE4.js} +1 -1
  65. package/dist/{chunk-7JVAQX6C.js → chunk-CEY646NZ.js} +4 -4
  66. package/dist/{chunk-GZ4RHGIW.js → chunk-CICWSCLC.js} +19 -19
  67. package/dist/{chunk-QHFQHQDC.js → chunk-CPKHL7FK.js} +2 -2
  68. package/dist/{chunk-NXNQQ3DS.js → chunk-D3D7XHBI.js} +7 -14
  69. package/dist/{chunk-RSWVH7DB.js → chunk-D7GZPMHW.js} +3 -3
  70. package/dist/chunk-DAVHGK27.js +657 -0
  71. package/dist/{chunk-7VXZDB45.js → chunk-DDI2W4TR.js} +1 -1
  72. package/dist/{chunk-JLCAWQ3H.js → chunk-DHWCFQNO.js} +3 -3
  73. package/dist/{chunk-GQS46LC3.js → chunk-DSZUV3TM.js} +11 -3
  74. package/dist/{chunk-H57TJD3B.js → chunk-E42JZ2DA.js} +1 -1
  75. package/dist/{chunk-YTSSXSZR.js → chunk-E64MTTBC.js} +3 -3
  76. package/dist/{chunk-NT3HAZYT.js → chunk-EHDWWFNV.js} +1 -1
  77. package/dist/{chunk-FT3F72C3.js → chunk-EHVESNLV.js} +1 -1
  78. package/dist/{chunk-W2RGSGRR.js → chunk-ELPQZIGR.js} +13 -10
  79. package/dist/{chunk-7IFLQMJL.js → chunk-ENOCOA3F.js} +5 -4
  80. package/dist/{chunk-KPMGGE4W.js → chunk-EP54VZI5.js} +1 -1
  81. package/dist/{chunk-QG6MOQLI.js → chunk-EYLWVI26.js} +17 -14
  82. package/dist/{chunk-NEVSQGOI.js → chunk-EYZ6SLF3.js} +2 -2
  83. package/dist/{chunk-HFG76JTS.js → chunk-F35DA442.js} +3 -3
  84. package/dist/{chunk-A372DLQX.js → chunk-F7X53SZM.js} +3 -3
  85. package/dist/{chunk-PTVOXB5T.js → chunk-FHA3KMFC.js} +6 -2
  86. package/dist/{chunk-S4F27M7N.js → chunk-FILDYFT4.js} +2 -2
  87. package/dist/{chunk-WMJPFLF3.js → chunk-FMFCGYCE.js} +29 -25
  88. package/dist/{chunk-TPZB2YWR.js → chunk-FPPN5NAR.js} +2 -2
  89. package/dist/{chunk-5DJXJXDE.js → chunk-FV32N6AF.js} +1 -1
  90. package/dist/{chunk-MJMJEURO.js → chunk-G57ZO7DB.js} +10 -10
  91. package/dist/{chunk-WDUNR2VI.js → chunk-G63ROSY5.js} +22 -19
  92. package/dist/{chunk-V4VC25UL.js → chunk-G6XCUX3I.js} +4 -4
  93. package/dist/{chunk-JLZM7XMZ.js → chunk-GEBGBJBD.js} +14 -11
  94. package/dist/{chunk-FT47HQ5U.js → chunk-GGO43PHB.js} +4 -4
  95. package/dist/{chunk-XDLQRSSH.js → chunk-GSMWHKOW.js} +2 -2
  96. package/dist/{chunk-2JAWQ7VV.js → chunk-GVKFFJ23.js} +11 -10
  97. package/dist/{chunk-Q6XJOJTY.js → chunk-GYNZ72GO.js} +2 -2
  98. package/dist/{chunk-WRHFBCVY.js → chunk-H4SYN3QA.js} +3 -3
  99. package/dist/{chunk-MEISCROL.js → chunk-HC4NDND6.js} +3 -3
  100. package/dist/{chunk-I322G5UG.js → chunk-HDZGZJKR.js} +17 -14
  101. package/dist/{chunk-3GZECHOK.js → chunk-HGGLJYPZ.js} +12 -12
  102. package/dist/{chunk-B67K5X4M.js → chunk-HHS6333D.js} +1 -1
  103. package/dist/{chunk-6UBEGKIQ.js → chunk-HNVW3YDS.js} +3 -3
  104. package/dist/{chunk-GZ2VNM4L.js → chunk-HW7BPJNQ.js} +3 -3
  105. package/dist/{chunk-NG5IGZXC.js → chunk-HZG5NB7Q.js} +23 -20
  106. package/dist/{chunk-S7VDRUED.js → chunk-HZZH3MQI.js} +1 -1
  107. package/dist/{chunk-CS4DHFNG.js → chunk-I2E3YDNZ.js} +3 -3
  108. package/dist/{chunk-YAYRRKC7.js → chunk-I5L3QTKQ.js} +3 -3
  109. package/dist/{chunk-KYELSLDJ.js → chunk-IDT7DJ7F.js} +1 -1
  110. package/dist/{chunk-JETXFF3M.js → chunk-IK4BHOPZ.js} +1 -1
  111. package/dist/{chunk-GDQ3NGDZ.js → chunk-IM4WUIR7.js} +2 -2
  112. package/dist/chunk-IMJXJHFW.js +88 -0
  113. package/dist/{chunk-5C7TWNYZ.js → chunk-ISWU5YB3.js} +1 -1
  114. package/dist/{chunk-5KWXRYAT.js → chunk-J2ROMB7J.js} +17 -11
  115. package/dist/{chunk-WJMUMN3I.js → chunk-J33RA3YO.js} +2 -2
  116. package/dist/{chunk-627P6T25.js → chunk-JAKRPSWP.js} +21 -18
  117. package/dist/{chunk-PEN2DK7T.js → chunk-JB4YPOMT.js} +2 -2
  118. package/dist/{chunk-YP3I6W7T.js → chunk-JDEVGTSX.js} +3 -3
  119. package/dist/{chunk-JSX3C6LL.js → chunk-JEL6665C.js} +5 -5
  120. package/dist/{chunk-DFKTS6XJ.js → chunk-JEYJRJ7M.js} +1 -1
  121. package/dist/{chunk-JA755JHN.js → chunk-JJJ2KAHR.js} +10 -7
  122. package/dist/{chunk-SGSPYHFE.js → chunk-JTJNQKPM.js} +8 -5
  123. package/dist/{chunk-DGDOGOTQ.js → chunk-K2KU4HHT.js} +3 -3
  124. package/dist/{chunk-CRZKGHZ6.js → chunk-K4K6KGEF.js} +17 -19
  125. package/dist/{chunk-QVABTUDS.js → chunk-K4RCWNLC.js} +7 -7
  126. package/dist/{chunk-GULJ6KVT.js → chunk-KAQH75T6.js} +14 -14
  127. package/dist/{chunk-2UVTHU7A.js → chunk-KBFPMESI.js} +37 -27
  128. package/dist/{chunk-S5ADHIZK.js → chunk-KFWEO4UA.js} +28 -25
  129. package/dist/{chunk-MIXKQJ64.js → chunk-KJEZFOO6.js} +18 -18
  130. package/dist/{chunk-NLOMCLKI.js → chunk-KL2XJQAA.js} +8 -8
  131. package/dist/{chunk-2AKWCMS4.js → chunk-KNZD53L4.js} +3 -3
  132. package/dist/{chunk-DVKBU23L.js → chunk-KORHKDJW.js} +1 -1
  133. package/dist/{chunk-NMCOUVN5.js → chunk-KSQEG6DX.js} +3 -3
  134. package/dist/{chunk-TVHLKVUO.js → chunk-KVSJ2O4Q.js} +3 -3
  135. package/dist/{chunk-XTNV2YMB.js → chunk-L3JWM7FR.js} +1 -1
  136. package/dist/{chunk-IZCOG3FS.js → chunk-L7FSCT4M.js} +4 -4
  137. package/dist/{chunk-Z5VSLLNY.js → chunk-L7RHB734.js} +1 -1
  138. package/dist/{chunk-B2EBEXIS.js → chunk-LFX7W4B7.js} +1 -1
  139. package/dist/chunk-LINZPU5D.js +8 -0
  140. package/dist/{chunk-COKHNEJP.js → chunk-LMPZKCDM.js} +3 -3
  141. package/dist/{chunk-ZVTFZF4V.js → chunk-LTMF75MR.js} +8 -8
  142. package/dist/{chunk-A6XCAQ52.js → chunk-LVXOY5WL.js} +7 -6
  143. package/dist/{chunk-3HHNQPAH.js → chunk-LYVOL4TQ.js} +1 -1
  144. package/dist/{chunk-HJXXFPOL.js → chunk-MBVXROCI.js} +2 -2
  145. package/dist/{chunk-76ANFJOI.js → chunk-MCYM3RNF.js} +1 -1
  146. package/dist/{chunk-F77BNDAT.js → chunk-MEG4NMSI.js} +2 -2
  147. package/dist/{chunk-C64FBRJO.js → chunk-MKVV7GVJ.js} +5 -5
  148. package/dist/{chunk-XPWRD424.js → chunk-MONVTUHR.js} +3 -3
  149. package/dist/{chunk-YI2ZVTCB.js → chunk-MT4MP3UZ.js} +1 -1
  150. package/dist/{chunk-V4DYVLOO.js → chunk-MYCLO35J.js} +5 -5
  151. package/dist/{chunk-4SM2ONUC.js → chunk-MZJBPDIL.js} +1 -1
  152. package/dist/{chunk-CYDZP5W6.js → chunk-NGRIT3CY.js} +26 -23
  153. package/dist/{chunk-2SGIHKKU.js → chunk-NQSDIDRO.js} +1 -1
  154. package/dist/{chunk-WVSNSWBJ.js → chunk-NRF223FR.js} +1 -1
  155. package/dist/{chunk-QXILAMAU.js → chunk-NRHTC2SQ.js} +1 -1
  156. package/dist/{chunk-H7UZZ7KP.js → chunk-NWQTSZYC.js} +3 -3
  157. package/dist/{chunk-OAPCJO6W.js → chunk-O3VN6BTL.js} +1 -0
  158. package/dist/{chunk-LO2DANS6.js → chunk-OD3IH6FG.js} +5 -5
  159. package/dist/{chunk-S62M63LU.js → chunk-OM67S6S4.js} +3 -3
  160. package/dist/{chunk-UEU46Q3D.js → chunk-OMNQXHFF.js} +7 -7
  161. package/dist/{chunk-HZQEQ34U.js → chunk-OMVYFSOM.js} +3 -3
  162. package/dist/{chunk-COYPDRJK.js → chunk-OTW5SEFS.js} +2 -2
  163. package/dist/{chunk-GH3ZMBFX.js → chunk-OU5K2JPF.js} +11 -11
  164. package/dist/{chunk-AZOUSKZD.js → chunk-OURX73UJ.js} +1 -1
  165. package/dist/{chunk-27QQEWNV.js → chunk-OZUTYDV4.js} +2 -2
  166. package/dist/{chunk-TSR5YDPS.js → chunk-P52JHUUM.js} +23 -20
  167. package/dist/{chunk-YFG4E3N2.js → chunk-PBYUJSEY.js} +14 -14
  168. package/dist/{chunk-A3ULWR5N.js → chunk-PDG4IM3L.js} +1 -1
  169. package/dist/{chunk-AFK47A6O.js → chunk-PGV25HTX.js} +3 -3
  170. package/dist/{chunk-A5JWFZVU.js → chunk-PJWLKCFX.js} +80 -81
  171. package/dist/{chunk-MNJ2DHU6.js → chunk-QJ4WGAC6.js} +8 -8
  172. package/dist/{chunk-VB2MJLET.js → chunk-QQNPU27R.js} +1 -1
  173. package/dist/{chunk-6JUJ2DU3.js → chunk-QR35TD2B.js} +37 -37
  174. package/dist/{chunk-LC3PSQJJ.js → chunk-QY5ZKUWY.js} +1 -1
  175. package/dist/{chunk-ASAON7G4.js → chunk-RGZGLKFB.js} +4 -4
  176. package/dist/{chunk-S4ONWRJE.js → chunk-RK4S3VPS.js} +2 -2
  177. package/dist/{chunk-TXZBBZOG.js → chunk-RKITD2UJ.js} +2 -2
  178. package/dist/{chunk-ETHWK2RZ.js → chunk-RNOJSEES.js} +1 -1
  179. package/dist/{chunk-PGIQMQRU.js → chunk-RZB4RPPD.js} +228 -95
  180. package/dist/{chunk-XO5ONLVM.js → chunk-S32YYDIB.js} +1 -1
  181. package/dist/{chunk-QN6JHMGU.js → chunk-S4QSJAGY.js} +1 -1
  182. package/dist/{chunk-IXSZ7OKR.js → chunk-S6CRZKPO.js} +1 -1
  183. package/dist/{chunk-YHTO46W2.js → chunk-SFQ5ADIG.js} +35 -31
  184. package/dist/{chunk-Y4PXIJMD.js → chunk-SHH2AHIU.js} +14 -14
  185. package/dist/{chunk-HUF6TQ2J.js → chunk-SZCPKGYG.js} +3 -3
  186. package/dist/{chunk-K2HNV4LE.js → chunk-T3PNYRDM.js} +12 -12
  187. package/dist/{chunk-QNHZXFRA.js → chunk-T7ZCYYQZ.js} +3 -3
  188. package/dist/{chunk-JY4R3GML.js → chunk-TKQKXBGC.js} +1 -1
  189. package/dist/{chunk-XDS4UZGR.js → chunk-TNHD4UTC.js} +3 -3
  190. package/dist/{chunk-FGAGGPFF.js → chunk-TNNK4IIY.js} +8 -8
  191. package/dist/{chunk-LC6DYCTG.js → chunk-TSPWXAAI.js} +1 -1
  192. package/dist/{chunk-HX3MQ3H4.js → chunk-U2ES66IN.js} +3 -3
  193. package/dist/{chunk-MFLH5ZDQ.js → chunk-U2HQELXL.js} +2 -2
  194. package/dist/{chunk-SXGTRZFN.js → chunk-U4P6TQRW.js} +3 -2
  195. package/dist/{chunk-KFFNCDX6.js → chunk-U6CJPTOB.js} +3 -3
  196. package/dist/{chunk-GQPESFAF.js → chunk-U7LLQ7XM.js} +11 -11
  197. package/dist/{chunk-IN4QT33I.js → chunk-ULTSSIOU.js} +1 -1
  198. package/dist/{chunk-HUFCSX2Y.js → chunk-UTQGZF37.js} +17 -6
  199. package/dist/{chunk-CCQNL33L.js → chunk-UYNAL3Y3.js} +9 -9
  200. package/dist/{chunk-7QDAHY5M.js → chunk-V7RAPZHX.js} +2 -2
  201. package/dist/{chunk-6XE3GVGU.js → chunk-VAEC53B3.js} +3 -2
  202. package/dist/{chunk-YKO3VCTF.js → chunk-VDVXGAIP.js} +3 -3
  203. package/dist/{chunk-WYJMV62X.js → chunk-VGWWUCAB.js} +3 -3
  204. package/dist/{chunk-5ENRZX6I.js → chunk-VNLSTZES.js} +19 -16
  205. package/dist/{chunk-D4BIV6WG.js → chunk-VWYUUBBP.js} +19 -16
  206. package/dist/{chunk-JMH5MD5A.js → chunk-WDONXBQE.js} +1 -1
  207. package/dist/{chunk-62FR4FYJ.js → chunk-WEPAE4KG.js} +2 -2
  208. package/dist/{chunk-A5LZUYK4.js → chunk-WGIO6AHP.js} +3 -2
  209. package/dist/{chunk-UQSVWO7Z.js → chunk-WJKVNRCR.js} +8 -7
  210. package/dist/{chunk-24WB3HMB.js → chunk-WKWMOZNE.js} +22 -7
  211. package/dist/{chunk-V667FCIJ.js → chunk-WMZCOGD6.js} +1 -1
  212. package/dist/{chunk-33CBPK5Q.js → chunk-WQ55QPEB.js} +51 -45
  213. package/dist/{chunk-SLTMRTXV.js → chunk-WUKSZNHL.js} +15 -12
  214. package/dist/{chunk-QETGGFH2.js → chunk-WZBMTZBM.js} +3 -3
  215. package/dist/{chunk-XY5O74BH.js → chunk-X4U6PT3Z.js} +3 -3
  216. package/dist/{chunk-E2HEVF23.js → chunk-XNA6DATU.js} +10 -10
  217. package/dist/{chunk-ALKTNXMR.js → chunk-XTGWCYAR.js} +37 -37
  218. package/dist/{chunk-3XQ635KD.js → chunk-XXNLNZ7E.js} +3 -3
  219. package/dist/{chunk-YEDYBMCW.js → chunk-YF2PYLC4.js} +1 -1
  220. package/dist/{chunk-ZJKOLOVF.js → chunk-YS56RSTZ.js} +26 -20
  221. package/dist/{chunk-RTJXOIIQ.js → chunk-YWP7XFKD.js} +1 -1
  222. package/dist/{chunk-ATTE3FYC.js → chunk-ZBJNEJSL.js} +3 -3
  223. package/dist/{chunk-A2FHZH7E.js → chunk-ZNHF2XCP.js} +35 -21
  224. package/dist/{chunk-ERAIVAK5.js → chunk-ZTH6YSVA.js} +37 -4
  225. package/dist/{chunk-KS7DXCXH.js → chunk-ZWJTHFWB.js} +3 -3
  226. package/dist/{chunk-EKQMYG2B.js → chunk-ZXOD37BE.js} +18 -18
  227. package/dist/cli/index.js +2 -2
  228. package/dist/{core-5Z6UW5DS.js → core-34KIMTK6.js} +2 -1
  229. package/dist/{core-XXIOJY2X.js → core-3CWPIFAL.js} +3 -1
  230. package/dist/{core-WLVU2HWX.js → core-7R3ARYNI.js} +3 -1
  231. package/dist/{core-DU77ZYPR.js → core-7YKLT7KY.js} +3 -1
  232. package/dist/{core-QUYSNTC7.js → core-AEYGGH7X.js} +3 -1
  233. package/dist/{core-CPN2HF75.js → core-ASBJZZTP.js} +2 -1
  234. package/dist/{core-JQV7STNF.js → core-CJ7FFPDU.js} +3 -1
  235. package/dist/{core-PL64QPOH.js → core-CJZXX2V3.js} +3 -1
  236. package/dist/{core-T5Q4DSH2.js → core-DAFZ7YJW.js} +2 -1
  237. package/dist/{core-RUA3EWW3.js → core-DJPGSTXB.js} +3 -1
  238. package/dist/{core-KBH3EJZV.js → core-DKJUX7Q4.js} +2 -1
  239. package/dist/{core-FFLPH5XK.js → core-EAIFSTDE.js} +3 -1
  240. package/dist/{core-E6YD7VU4.js → core-GEUPUZUY.js} +3 -1
  241. package/dist/{core-OK2ZY5OJ.js → core-JLJTP7P6.js} +2 -1
  242. package/dist/{core-RY6IFRKM.js → core-JLXFDYHX.js} +3 -1
  243. package/dist/{core-ZH7XTJTD.js → core-KCORN7F7.js} +3 -1
  244. package/dist/{core-IZVZ2B7Y.js → core-KF6GJOGW.js} +2 -1
  245. package/dist/{core-DBRILYNB.js → core-KII4CH3W.js} +2 -1
  246. package/dist/{core-TJX3I7KH.js → core-KZK3WCUG.js} +3 -1
  247. package/dist/{core-RE3L6YCM.js → core-L5KTPXHC.js} +2 -1
  248. package/dist/{core-CS7AKNME.js → core-L7Y7YXWR.js} +2 -1
  249. package/dist/{core-IV26EL5C.js → core-MN45UFF4.js} +3 -1
  250. package/dist/{core-PVINU5JJ.js → core-MNUVP5IJ.js} +3 -1
  251. package/dist/{core-OW5V74Q4.js → core-O2K4BDYH.js} +3 -1
  252. package/dist/{core-ZHE7N4NS.js → core-ONNGSKWQ.js} +3 -1
  253. package/dist/{core-KFBW5PRT.js → core-PFXIBWLD.js} +3 -1
  254. package/dist/{core-ZJYLJWZQ.js → core-QXIAQFHM.js} +2 -1
  255. package/dist/{core-KWGXHBJE.js → core-R27R6J5M.js} +3 -1
  256. package/dist/{core-OV5MPTZP.js → core-RCFFJANI.js} +3 -1
  257. package/dist/{core-WQPHNVNY.js → core-RGLOYY73.js} +3 -1
  258. package/dist/{core-SE67HHFG.js → core-V7I4F6JW.js} +3 -1
  259. package/dist/{core-6LLJNZ4O.js → core-W7AZNHOX.js} +3 -1
  260. package/dist/{core-MZMR2DF4.js → core-WHI4ABF2.js} +2 -1
  261. package/dist/{core-6ANZ2OWO.js → core-WJSKT5XM.js} +2 -1
  262. package/dist/{core-EE55P6XK.js → core-XKV7GMPG.js} +3 -1
  263. package/dist/{core-ULUA5ZB2.js → core-YPH723Z7.js} +3 -1
  264. package/dist/{core-SCWEVNUY.js → core-YVNOHIQ4.js} +3 -1
  265. package/dist/{dataTable-IL7HVDHL.js → dataTable-VKEHFLJM.js} +3 -2
  266. package/dist/{engine-MYLZI5VH.js → engine-PPXKJJFI.js} +12 -11
  267. package/dist/fixtures.js +3 -1
  268. package/dist/{fontTables-ZYBUCJ5N.js → fontTables-WYCZNRE7.js} +1 -1
  269. package/dist/fonts.js +1 -1
  270. package/dist/index.js +21 -19
  271. package/dist/{main-ISJ53IS5.js → main-53MXACOU.js} +12 -10
  272. package/dist/mcp/server.js +18 -15
  273. package/dist/react/bar.js +3 -1
  274. package/dist/react/bartable.js +2 -1
  275. package/dist/react/box.js +3 -1
  276. package/dist/react/bullet.js +3 -1
  277. package/dist/react/butterfly.js +3 -1
  278. package/dist/react/choropleth.js +2 -1
  279. package/dist/react/cohort.js +3 -1
  280. package/dist/react/column.js +3 -1
  281. package/dist/react/combo.js +3 -1
  282. package/dist/react/creative.js +2 -1
  283. package/dist/react/diagram.js +2 -1
  284. package/dist/react/dimswitch.js +3 -1
  285. package/dist/react/dot.js +3 -1
  286. package/dist/react/export.js +20 -18
  287. package/dist/react/funnel.js +3 -1
  288. package/dist/react/gantt.js +2 -1
  289. package/dist/react/grid.js +3 -1
  290. package/dist/react/heatmap.js +3 -1
  291. package/dist/react/histogram.js +3 -1
  292. package/dist/react/index.js +86 -84
  293. package/dist/react/kpi.js +2 -1
  294. package/dist/react/likert.js +3 -1
  295. package/dist/react/line.js +3 -1
  296. package/dist/react/mekko.js +3 -1
  297. package/dist/react/pareto.js +3 -1
  298. package/dist/react/pie.js +3 -1
  299. package/dist/react/prepare.js +20 -18
  300. package/dist/react/pvm.js +3 -1
  301. package/dist/react/pyramid.js +3 -1
  302. package/dist/react/sankey.js +2 -1
  303. package/dist/react/scatter.js +3 -1
  304. package/dist/react/slope.js +3 -1
  305. package/dist/react/sparkline.js +2 -1
  306. package/dist/react/spec.js +36 -26
  307. package/dist/react/status.js +2 -1
  308. package/dist/react/story.js +4 -3
  309. package/dist/react/table.js +3 -1
  310. package/dist/react/theme.js +4 -3
  311. package/dist/react/tilemap.js +2 -1
  312. package/dist/react/treemap.js +2 -1
  313. package/dist/react/variance.js +3 -1
  314. package/dist/react/waffle.js +2 -1
  315. package/dist/react/waterfall.js +3 -1
  316. package/dist/rows.js +2 -2
  317. package/dist/{rowsModule-3Y4I3M3E.js → rowsModule-L3MBGPBH.js} +2 -1
  318. package/dist/{schema-STGL44TL.js → schema-26YUL3MG.js} +4 -1
  319. package/dist/{schema-5YTNQ6JY.js → schema-33ZF6WKL.js} +4 -1
  320. package/dist/{schema-E6YOSOWB.js → schema-3W7IFXVN.js} +3 -1
  321. package/dist/{schema-G4KFMQBL.js → schema-4ZXJCRZR.js} +4 -1
  322. package/dist/{schema-QJJPRRE7.js → schema-5E5J43CF.js} +4 -1
  323. package/dist/{schema-34ZELWRQ.js → schema-6ZV532RM.js} +4 -1
  324. package/dist/{schema-P63S63GE.js → schema-733PO52K.js} +4 -1
  325. package/dist/{schema-QEVSIMGO.js → schema-AQD3H5VV.js} +4 -1
  326. package/dist/{schema-EVLLL5UF.js → schema-B4GFRYIP.js} +4 -1
  327. package/dist/{schema-EQQB43AY.js → schema-CMXL5F5L.js} +4 -1
  328. package/dist/{schema-IF5N3J56.js → schema-FT37ZEYY.js} +4 -1
  329. package/dist/{schema-2GUBWOBC.js → schema-GK6MD4EG.js} +4 -1
  330. package/dist/{schema-MEAFRXVH.js → schema-GSE3QXUK.js} +4 -2
  331. package/dist/{schema-4735XAZX.js → schema-GVHM2HEF.js} +4 -1
  332. package/dist/{schema-E2ISJ65D.js → schema-H7RKVTVO.js} +4 -1
  333. package/dist/{schema-XYYDUUHS.js → schema-HGUBNXUY.js} +4 -1
  334. package/dist/{schema-KFC4WYH4.js → schema-HRHNGOFC.js} +3 -1
  335. package/dist/{schema-PNC3Z7AH.js → schema-HWU55RJL.js} +4 -1
  336. package/dist/{schema-3BHL2B76.js → schema-IOKAZVL7.js} +4 -1
  337. package/dist/{schema-7J3NAIN2.js → schema-IOWE3RQO.js} +4 -1
  338. package/dist/{schema-2BMZOHXI.js → schema-KFXLS67Q.js} +4 -1
  339. package/dist/{schema-EYQ5IBLF.js → schema-KH62LDYK.js} +4 -1
  340. package/dist/{schema-S3EQKVOT.js → schema-KHCLVE2V.js} +4 -1
  341. package/dist/{schema-PA2MXYY4.js → schema-KORNUIC6.js} +4 -1
  342. package/dist/{schema-AOJJ7JZB.js → schema-LYBOPAGQ.js} +4 -1
  343. package/dist/{schema-GH7IKSOU.js → schema-MNG24WU2.js} +4 -1
  344. package/dist/{schema-PDZ6256H.js → schema-NOPOI5G2.js} +4 -1
  345. package/dist/{schema-T4NE2EAO.js → schema-PNUC54GC.js} +4 -1
  346. package/dist/{schema-P7LJFJAJ.js → schema-Q4IPIR6W.js} +4 -1
  347. package/dist/{schema-TQYTESG3.js → schema-QLH2DZFI.js} +4 -1
  348. package/dist/{schema-D3RCMN3T.js → schema-QNI6MNQ2.js} +4 -1
  349. package/dist/{schema-W376PAJG.js → schema-SLQPM32G.js} +4 -1
  350. package/dist/{schema-EYZVD73N.js → schema-SY3MKF5S.js} +4 -1
  351. package/dist/{schema-JJYJOQTT.js → schema-WAKLKLBB.js} +4 -1
  352. package/dist/{schema-IG7JIR4H.js → schema-WCDYWS4K.js} +4 -1
  353. package/dist/{schema-CVMV4LRA.js → schema-ZCZCY34J.js} +4 -1
  354. package/dist/{schema-L7263JMT.js → schema-ZSYX76MO.js} +4 -1
  355. package/dist/{specValidation-NVBIZMEE.js → specValidation-H5B4MQST.js} +3 -1
  356. package/dist/theme.js +3 -2
  357. package/dist/{themeShapeRules-5C2463YH.js → themeShapeRules-54U5EIZR.js} +1 -1
  358. package/dist/types/core/annotateEngine.d.ts +14 -0
  359. package/dist/types/core/charts/gantt/layout.d.ts +7 -0
  360. package/dist/types/core/charts/grid/schema.d.ts +1 -1
  361. package/dist/types/core/deferred.d.ts +6 -1
  362. package/dist/types/core/formatSpec.d.ts +2 -0
  363. package/dist/types/core/label/solver.d.ts +5 -1
  364. package/dist/types/core/rows.d.ts +2 -0
  365. package/dist/types/core/theme.d.ts +3 -1
  366. package/dist/types/core/themeShape.d.ts +3 -3
  367. package/dist/types/core/themeValidate.d.ts +3 -3
  368. package/dist/types/core/types/annotations.d.ts +6 -2
  369. package/dist/types/core/types/data.d.ts +8 -3
  370. package/dist/types/core/types/theme.d.ts +2 -1
  371. package/dist/types/react/rowsStore.d.ts +5 -0
  372. package/dist/types/react/spec.d.ts +17 -0
  373. package/dist/types/rows.d.ts +6 -1
  374. package/dist/validate.js +8 -6
  375. package/docs/manual.md +19 -5
  376. package/docs/reference/box.md +1 -1
  377. package/docs/reference/fixtures.md +1 -0
  378. package/docs/reference/gantt.md +11 -5
  379. package/docs/reference/histogram.md +1 -1
  380. package/docs/reference/line.md +1 -1
  381. package/docs/reference/react.md +3 -0
  382. package/docs/reference/table.md +1 -1
  383. package/docs/reference/theme.md +2 -3
  384. package/docs/use-cases.md +198 -0
  385. package/llms.txt +4 -3
  386. package/package.json +2 -1
  387. package/dist/chunk-2GELJH37.js +0 -88
  388. package/dist/chunk-4GB7TBY7.js +0 -373
@@ -1,88 +0,0 @@
1
- import {
2
- chartTypeAliases,
3
- schemaLoaders
4
- } from "./chunk-6JUJ2DU3.js";
5
- import {
6
- registeredType
7
- } from "./chunk-4SM2ONUC.js";
8
- import {
9
- getChart,
10
- getChartSchemas,
11
- registerChartSchemas
12
- } from "./chunk-GQPESFAF.js";
13
- import {
14
- registerChartCoreLoader
15
- } from "./chunk-2MTWKMEG.js";
16
-
17
- // src/react/coreLoaders.ts
18
- var coreLoaders = {
19
- bar: () => import("./core-ZHE7N4NS.js").then((module) => module.barCore),
20
- bartable: () => import("./core-6ANZ2OWO.js").then((module) => module.bartableCore),
21
- box: () => import("./core-JQV7STNF.js").then((module) => module.boxCore),
22
- bullet: () => import("./core-FFLPH5XK.js").then((module) => module.bulletCore),
23
- butterfly: () => import("./core-RY6IFRKM.js").then((module) => module.butterflyCore),
24
- choropleth: () => import("./core-ZJYLJWZQ.js").then((module) => module.choroplethCore),
25
- cohort: () => import("./core-ZH7XTJTD.js").then((module) => module.cohortCore),
26
- column: () => import("./core-ULUA5ZB2.js").then((module) => module.columnCore),
27
- combo: () => import("./core-PL64QPOH.js").then((module) => module.comboCore),
28
- creative: () => import("./core-MZMR2DF4.js").then((module) => module.creativeCore),
29
- diagram: () => import("./core-CPN2HF75.js").then((module) => module.diagramCore),
30
- dimswitch: () => import("./core-WLVU2HWX.js").then((module) => module.dimswitchCore),
31
- dot: () => import("./core-RUA3EWW3.js").then((module) => module.dotCore),
32
- funnel: () => import("./core-IV26EL5C.js").then((module) => module.funnelCore),
33
- gantt: () => import("./core-KBH3EJZV.js").then((module) => module.ganttCore),
34
- grid: () => import("./core-SCWEVNUY.js").then((module) => module.gridCore),
35
- heatmap: () => import("./core-6LLJNZ4O.js").then((module) => module.heatmapCore),
36
- histogram: () => import("./core-SE67HHFG.js").then((module) => module.histogramCore),
37
- kpi: () => import("./core-CS7AKNME.js").then((module) => module.kpiCore),
38
- likert: () => import("./core-WQPHNVNY.js").then((module) => module.likertCore),
39
- line: () => import("./core-XXIOJY2X.js").then((module) => module.lineCore),
40
- mekko: () => import("./core-OW5V74Q4.js").then((module) => module.mekkoCore),
41
- pareto: () => import("./core-EE55P6XK.js").then((module) => module.paretoCore),
42
- pie: () => import("./core-QUYSNTC7.js").then((module) => module.pieCore),
43
- pvm: () => import("./core-TJX3I7KH.js").then((module) => module.pvmCore),
44
- pyramid: () => import("./core-KFBW5PRT.js").then((module) => module.pyramidCore),
45
- sankey: () => import("./core-RE3L6YCM.js").then((module) => module.sankeyCore),
46
- scatter: () => import("./core-E6YD7VU4.js").then((module) => module.scatterCore),
47
- slope: () => import("./core-PVINU5JJ.js").then((module) => module.slopeCore),
48
- sparkline: () => import("./core-OK2ZY5OJ.js").then((module) => module.sparklineCore),
49
- status: () => import("./core-IZVZ2B7Y.js").then((module) => module.statusCore),
50
- table: () => import("./core-OV5MPTZP.js").then((module) => module.tableCore),
51
- tilemap: () => import("./core-DBRILYNB.js").then((module) => module.tilemapCore),
52
- treemap: () => import("./core-5Z6UW5DS.js").then((module) => module.treemapCore),
53
- variance: () => import("./core-DU77ZYPR.js").then((module) => module.varianceCore),
54
- waffle: () => import("./core-T5Q4DSH2.js").then((module) => module.waffleCore),
55
- waterfall: () => import("./core-KWGXHBJE.js").then((module) => module.waterfallCore)
56
- };
57
-
58
- // src/react/loadChartTypes.ts
59
- var aliasOwners = /* @__PURE__ */ new Map();
60
- for (let [type, aliases] of Object.entries(chartTypeAliases))
61
- for (let alias of aliases) aliasOwners.set(alias, type);
62
- function knownChartType(name) {
63
- return Object.hasOwn(coreLoaders, name) ? name : aliasOwners.get(name);
64
- }
65
- async function loadChartTypes(names, parts) {
66
- let types = [...new Set(names.map(knownChartType).filter((type) => type !== void 0))];
67
- await Promise.all(types.flatMap((type) => [
68
- parts.schemas && getChartSchemas(type) === void 0 ? schemaLoaders[type]().then((schemas) => {
69
- registerChartSchemas(schemas, chartTypeAliases[type]);
70
- }) : void 0,
71
- parts.cores && getChart(type) === void 0 ? coreLoaders[type]().then((core) => {
72
- registeredType(core);
73
- }) : void 0
74
- ]));
75
- }
76
- registerChartCoreLoader({
77
- knows: (type) => knownChartType(type) !== void 0,
78
- load: (type) => loadChartTypes([type], { schemas: !1, cores: !0 })
79
- });
80
- function registeredTypeWithPanelCores(core) {
81
- return registeredType(core);
82
- }
83
-
84
- export {
85
- knownChartType,
86
- loadChartTypes,
87
- registeredTypeWithPanelCores
88
- };
@@ -1,373 +0,0 @@
1
- import {
2
- isBareChart
3
- } from "./chunk-RTJXOIIQ.js";
4
- import {
5
- closestKey
6
- } from "./chunk-XB4KZ6WO.js";
7
- import {
8
- claimedRegionIds,
9
- geoRegionIdIndex,
10
- resolveGeoRegionId
11
- } from "./chunk-IYEFEBRN.js";
12
- import {
13
- WRITTEN_NUMBER,
14
- adaptNamedColumns
15
- } from "./chunk-33PLBIMA.js";
16
- import {
17
- getGeoPack
18
- } from "./chunk-IDDA5INB.js";
19
- import {
20
- receivedDescription
21
- } from "./chunk-RZNYW7UP.js";
22
- import {
23
- cellValue
24
- } from "./chunk-OAPCJO6W.js";
25
- import {
26
- NormalizeError
27
- } from "./chunk-SGD3ZHID.js";
28
-
29
- // src/core/inputError.ts
30
- var InputError = class extends Error {
31
- constructor(code, message, details = {}) {
32
- super(message);
33
- this.code = code;
34
- this.details = details;
35
- this.name = "InputError";
36
- }
37
- code;
38
- details;
39
- };
40
- function assertSpecObject(spec) {
41
- if (typeof spec == "string")
42
- throw new InputError("spec-must-be-object", "pass the spec as a JSON object, not a string", {
43
- path: "/spec",
44
- expected: { types: ["object"] },
45
- suggest: "Send the parsed spec object in spec, without JSON.stringify."
46
- });
47
- if (spec === null || typeof spec != "object" || Array.isArray(spec))
48
- throw new InputError("spec-must-be-object", "pass the spec as a JSON object", {
49
- path: "/spec",
50
- expected: { types: ["object"] },
51
- suggest: "Send an object with type and data, or an envelope with version and charts."
52
- });
53
- }
54
-
55
- // src/core/rowsTypes.ts
56
- var CHART_TYPE_OF = /* @__PURE__ */ new Map([
57
- ["age-pyramid", "pyramid"],
58
- ["bar", "bar"],
59
- ["bar-mekko", "mekko"],
60
- ["bar-table", "bartable"],
61
- ["bartable", "bartable"],
62
- ["box", "box"],
63
- ["box-and-whisker", "box"],
64
- ["boxplot", "box"],
65
- ["bridge", "waterfall"],
66
- ["bubble", "scatter"],
67
- ["bullet", "bullet"],
68
- ["butterfly", "butterfly"],
69
- ["choropleth", "choropleth"],
70
- ["cleveland", "dot"],
71
- ["cohort", "cohort"],
72
- ["column", "column"],
73
- ["combo", "combo"],
74
- ["creative", "creative"],
75
- ["deviation", "variance"],
76
- ["diagram", "diagram"],
77
- ["dim-switch", "dimswitch"],
78
- ["dim-switch-table", "dimswitch"],
79
- ["dimswitch", "dimswitch"],
80
- ["distribution", "histogram"],
81
- ["diverging-stacked", "likert"],
82
- ["donut", "pie"],
83
- ["dot", "dot"],
84
- ["doughnut", "pie"],
85
- ["dumbbell", "dot"],
86
- ["facets", "grid"],
87
- ["frequency", "histogram"],
88
- ["funnel", "funnel"],
89
- ["gantt", "gantt"],
90
- ["grid", "grid"],
91
- ["heatmap", "heatmap"],
92
- ["histogram", "histogram"],
93
- ["kpi", "kpi"],
94
- ["likert", "likert"],
95
- ["line", "line"],
96
- ["lollipop", "dot"],
97
- ["marimekko", "mekko"],
98
- ["matrix", "heatmap"],
99
- ["mekko", "mekko"],
100
- ["pareto", "pareto"],
101
- ["pareto-chart", "pareto"],
102
- ["pie", "pie"],
103
- ["population-pyramid", "pyramid"],
104
- ["price-volume-mix", "pvm"],
105
- ["profile", "line"],
106
- ["pvm", "pvm"],
107
- ["pyramid", "pyramid"],
108
- ["retention", "cohort"],
109
- ["sankey", "sankey"],
110
- ["scatter", "scatter"],
111
- ["slope", "slope"],
112
- ["sparkline", "sparkline"],
113
- ["status", "status"],
114
- ["table", "table"],
115
- ["table-bars", "bartable"],
116
- ["tbl", "table"],
117
- ["tilemap", "tilemap"],
118
- ["timeline", "gantt"],
119
- ["treemap", "treemap"],
120
- ["variance", "variance"],
121
- ["voronoi-treemap", "treemap"],
122
- ["waffle", "waffle"],
123
- ["waterfall", "waterfall"]
124
- ]), ROWS_SHAPES = /* @__PURE__ */ new Map([
125
- ["bar", "category"],
126
- ["bartable", "category"],
127
- ["butterfly", "category"],
128
- ["choropleth", "map"],
129
- ["column", "category"],
130
- ["combo", "category"],
131
- ["dot", "category"],
132
- ["funnel", "category"],
133
- ["heatmap", "category"],
134
- ["line", "category"],
135
- ["mekko", "category"],
136
- ["pie", "category"],
137
- ["sankey", "flow"],
138
- ["scatter", "scatter"],
139
- ["slope", "category"],
140
- ["tilemap", "map"],
141
- ["variance", "category"],
142
- ["waffle", "category"],
143
- ["waterfall", "waterfall"]
144
- ]);
145
-
146
- // src/core/rows.ts
147
- var VALUE_KINDS = ["number", "percent", "fraction"], CATEGORY_ROLES = ["category", "series", "value", "categoryLabel", "seriesLabel", "unit", "date", "state"], COLUMN_ROLES = [...CATEGORY_ROLES, "label", "type", "x", "y", "size", "group", "source", "target", "sourceStage", "targetStage"];
148
- function isRecord(value) {
149
- return value !== null && typeof value == "object" && !Array.isArray(value);
150
- }
151
- function readColumns(columns, shape) {
152
- let required = shape === "waterfall" ? ["label", "value"] : shape === "scatter" ? ["x", "y"] : shape === "flow" ? ["source", "target", "value"] : shape === "map" ? ["category", "value"] : ["category", "series", "value"], roles = shape === "waterfall" ? ["label", "value", "type"] : shape === "scatter" ? ["x", "y", "size", "label", "group"] : shape === "flow" ? ["source", "target", "value", "sourceStage", "targetStage"] : shape === "map" ? ["category", "value", "state"] : CATEGORY_ROLES;
153
- if (!isRecord(columns))
154
- throw new InputError("invalid-argument", `rows need columns: { ${required.join(", ")} } naming the source columns`, {
155
- path: "/columns",
156
- expected: { types: ["object"] },
157
- suggest: `Pass columns with ${required.join(", ")} naming the source columns.`
158
- });
159
- let { valueKind = "number", ...contract } = columns;
160
- if (!VALUE_KINDS.includes(valueKind))
161
- throw new InputError("invalid-argument", `valueKind must be one of ${VALUE_KINDS.join(", ")}`, {
162
- path: "/columns/valueKind",
163
- expected: { values: [...VALUE_KINDS] },
164
- suggest: "fraction when a share of one half arrives as 0.5, percent when it arrives as 50, number otherwise."
165
- });
166
- if (shape === "flow" && valueKind !== "number")
167
- throw new InputError("invalid-argument", "sankey flows are plain numbers; valueKind must be number", {
168
- path: "/columns/valueKind",
169
- expected: { values: ["number"] },
170
- fix: [{ op: "remove", path: "/columns/valueKind" }],
171
- suggest: "Remove valueKind. To show shares, keep the counts as values and set options.nodeValue to share."
172
- });
173
- let unknown = Object.keys(contract).find((key) => !roles.includes(key));
174
- if (unknown !== void 0)
175
- throw new InputError("invalid-argument", `columns has no role '${unknown}'`, {
176
- path: `/columns/${unknown}`,
177
- expected: { values: [...roles, "valueKind"] },
178
- fix: [{ op: "remove", path: `/columns/${unknown}` }]
179
- });
180
- let missing = [...required, ...Object.keys(contract)].find((role) => typeof contract[role] != "string" || !contract[role].trim());
181
- if (missing !== void 0)
182
- throw new InputError("invalid-argument", `columns.${missing} must name the source column that holds the ${missing}`, {
183
- path: `/columns/${missing}`,
184
- expected: { types: ["string"] }
185
- });
186
- return { contract, valueKind };
187
- }
188
- function valueCell(value, kind, decimalComma, path) {
189
- if (decimalComma && typeof value == "string" && /^\s*-?[1-9]\d{0,2}\.\d{3}\s*$/.test(value))
190
- throw new InputError("invalid-value", `${path}: '${value.trim()}' in a semicolon CSV is either ${value.trim().replace(/\./g, "")} with a thousands dot or ${value.trim()} with a decimal point`, {
191
- path: "/rowsFile",
192
- received: receivedDescription(value),
193
- suggest: "Write the number without the thousands dot, or with a decimal comma."
194
- });
195
- return decimalComma && typeof value == "string" && /^\s*-?\d+,\d+\s*$/.test(value) && (value = value.replace(",", ".")), typeof value == "string" && /^\s*-?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?\s*$/.test(value) ? value = Number(value) : value === "" && (value = null), typeof value != "number" || kind === "number" ? value : { pct: kind === "fraction" ? Number((value * 100).toPrecision(15)) : value };
196
- }
197
- function plainNumberAdvice(cell, kind, decimalComma) {
198
- let advice = `Write the number alone, without grouping marks or a currency sign, with ${decimalComma ? "a decimal comma, as in 1234,5" : "a dot as the decimal mark, as in 1234.5"}.`;
199
- return cell.includes("%") ? kind === "fraction" ? `${advice} valueKind is fraction, so 12% is written ${decimalComma ? "0,12" : "0.12"}; or set valueKind to percent and write 12.` : `${advice} Drop the percent sign${kind === "number" ? " and set valueKind to percent" : ""}; valueKind percent reads 12 as 12%.` : advice;
200
- }
201
- function argumentPath(path, rowsArgument, contract) {
202
- let row = /^rows\[(\d+)\](?:\.(.*))?$/.exec(path);
203
- if (row) return rowsArgument === "/rows" ? `/rows/${row[1]}${row[2] ? `/${row[2].replace(/~/g, "~0").replace(/\//g, "~1")}` : ""}` : "/rowsFile";
204
- let named = /^contract\.(.+)$/.exec(path)?.[1];
205
- if (named === void 0) return path === "contract" ? "/columns" : rowsArgument;
206
- let role = Object.hasOwn(contract, named) ? named : Object.keys(contract).find((key) => contract[key] === named);
207
- return role === void 0 ? "/columns" : `/columns/${role}`;
208
- }
209
- function byId(list) {
210
- let entries = Array.isArray(list) ? list : [];
211
- return new Map(entries.flatMap((entry) => typeof entry == "string" ? [[entry, { id: entry }]] : isRecord(entry) && typeof entry.id == "string" ? [[entry.id, entry]] : []));
212
- }
213
- function adaptItemRows(shape, rows, contract, data, valueKind, decimalComma, rowsArgument) {
214
- if (!rows.length) throw new InputError("rows-empty", "rows contain no data row", { path: rowsArgument });
215
- let columns = Object.values(contract), duplicate = columns.find((column, index) => columns.indexOf(column) !== index);
216
- if (duplicate) throw new InputError("invalid-contract", `column '${duplicate}' is named for more than one role`, { path: "/columns" });
217
- let present = new Set(rows.flatMap((row) => Object.keys(row)));
218
- for (let [role, column] of Object.entries(contract))
219
- if (!present.has(column)) throw new InputError("missing-column", `'${column}' is named in columns but no row provides it`, {
220
- path: `/columns/${role}`,
221
- suggest: `Columns present: ${[...present].sort().join(", ")}.`
222
- });
223
- let pathMap = /* @__PURE__ */ new Map(), field = shape === "waterfall" ? "items" : shape === "flow" ? "links" : "points", groups = /* @__PURE__ */ new Map(), templates = byId(data.groups), entries = rows.map((row, index) => {
224
- let entry = shape === "flow" ? {} : { id: `row-${index + 1}` };
225
- for (let [role, column] of Object.entries(contract)) {
226
- let source = { path: argumentPath(`rows[${index}].${column}`, rowsArgument, contract), displayPath: `${rowsArgument.slice(1)} row ${index + 1}.${column}` };
227
- pathMap.set(`/data/${field}/${index}/${role}`, source);
228
- let raw = row[column];
229
- if (!((role === "type" || role === "group" || role === "size") && (raw == null || raw === "")) && !(role === "label" && shape === "scatter" && raw == null)) {
230
- if (["value", "x", "y", "size"].includes(role)) {
231
- let kind = role === "size" ? "number" : valueKind, value = valueCell(raw, kind, decimalComma, `rows[${index}].${column}`);
232
- if (typeof value == "string") throw new InputError("invalid-value", `${source.displayPath}: '${value}' is not a numeric cell`, {
233
- ...source,
234
- received: receivedDescription(raw),
235
- ...WRITTEN_NUMBER.test(value) ? { suggest: plainNumberAdvice(value, kind, decimalComma) } : {}
236
- });
237
- entry[role] = value;
238
- } else if (shape === "flow" && typeof raw == "number")
239
- entry[role] = String(raw);
240
- else {
241
- if (role === "label" && shape === "waterfall" && (typeof raw != "string" || !raw))
242
- throw new InputError("invalid-identity", `${source.displayPath}: item label must be a non-empty string`, source);
243
- entry[role] = raw;
244
- }
245
- role === "group" && typeof raw == "string" && raw && !groups.has(raw) && (pathMap.set(`/data/groups/${groups.size}/id`, source), groups.set(raw, { ...templates.get(raw), id: raw }));
246
- }
247
- }
248
- return entry;
249
- });
250
- return {
251
- data: { ...data, [field]: entries, ...shape === "scatter" && contract.group ? { groups: [...groups.values()] } : {} },
252
- pathMap,
253
- ignoredColumns: [...present].filter((column) => !columns.includes(column)).sort()
254
- };
255
- }
256
- function adaptRows(spec, columns, source) {
257
- if (assertSpecObject(spec), !isRecord(spec) || !isBareChart(spec))
258
- throw new InputError("rows-need-one-chart", "rows fill the data of one chart; send a bare chart spec, not an envelope", {
259
- path: "/spec",
260
- suggest: "Render each chart of the envelope in its own call with its rows."
261
- });
262
- let type = typeof spec.type == "string" ? CHART_TYPE_OF.get(spec.type) : void 0, map = type === "choropleth" || type === "tilemap";
263
- if (type !== void 0 && !ROWS_SHAPES.has(type))
264
- throw new InputError("rows-unsupported-type", `'${spec.type}' has no rows mapping`, {
265
- path: "/spec/type",
266
- expected: { values: [...ROWS_SHAPES.keys()].sort() },
267
- suggest: `Write the ${spec.type} data in the spec, or draw the rows with one of the listed types.`
268
- });
269
- let shape = type === "waterfall" || type === "scatter" ? type : type === "sankey" ? "flow" : map ? "map" : "category", { contract: rowContract, valueKind } = readColumns(columns, shape), rowsArgument = source.argument, loaded = source.load();
270
- if (!Array.isArray(loaded.rows) || !loaded.rows.every(isRecord))
271
- throw new InputError("invalid-rows", "rows must be an array of objects", { path: rowsArgument });
272
- let decimalComma = loaded.decimalComma === !0;
273
- if (shape === "waterfall" || shape === "scatter" || shape === "flow") {
274
- let adapted2 = adaptItemRows(shape, loaded.rows, rowContract, isRecord(spec.data) ? spec.data : {}, valueKind, decimalComma, rowsArgument);
275
- return { spec: { ...spec, data: adapted2.data }, pathMap: adapted2.pathMap, rows: loaded.rows.length, ignoredColumns: adapted2.ignoredColumns, states: [] };
276
- }
277
- let contract = rowContract, rows = loaded.rows.map((row, index) => Object.hasOwn(row, contract.value) ? { ...row, [contract.value]: valueCell(row[contract.value], valueKind, decimalComma, `rows[${index}].${contract.value}`) } : row), mapSeriesColumn = "__map_measure";
278
- for (; rows.some((row) => Object.hasOwn(row, mapSeriesColumn)) || Object.values(contract).includes(mapSeriesColumn); ) mapSeriesColumn += "_";
279
- let adaptedContract = map ? { ...contract, series: mapSeriesColumn } : contract, adaptedRows = map ? rows.map((row) => ({ ...row, [mapSeriesColumn]: "value" })) : rows, adapted;
280
- try {
281
- adapted = adaptNamedColumns({ contract: adaptedContract, rows: adaptedRows });
282
- } catch (error) {
283
- if (!(error instanceof NormalizeError)) throw error;
284
- let [, row, column] = /^rows\[(\d+)\]\.(.+)$/.exec(error.path) ?? [], source2 = row === void 0 ? void 0 : loaded.rows[Number(row)], cell = source2 && Object.hasOwn(source2, column) ? source2[column] : void 0, suggest = column === contract.value && typeof cell == "string" && WRITTEN_NUMBER.test(cell) ? plainNumberAdvice(cell, valueKind, decimalComma) : error.suggest;
285
- throw new InputError(error.code, `${error.path ? `${error.path}: ` : ""}${error.message}`, {
286
- path: argumentPath(map ? error.path.replace(`.${mapSeriesColumn}`, `.${contract.category}`) : error.path, rowsArgument, contract),
287
- ...suggest ? { suggest } : {},
288
- ...source2 && Object.hasOwn(source2, column) ? { received: receivedDescription(cell) } : {}
289
- });
290
- }
291
- let data = isRecord(spec.data) ? spec.data : {};
292
- map && adapted.data.series[0]?.values.forEach((cell, index) => {
293
- if (cell !== null && typeof cell == "object" && "date" in cell)
294
- throw new InputError("invalid-value", `rows[${index}].${contract.value}: a map needs a number or null, not a date`, {
295
- path: argumentPath(`rows[${index}].${contract.value}`, rowsArgument, contract)
296
- });
297
- });
298
- let pathMap = /* @__PURE__ */ new Map(), sourceField = (generated, row, column) => {
299
- !column || pathMap.has(generated) || pathMap.set(generated, {
300
- path: argumentPath(`rows[${row}].${column}`, rowsArgument, contract),
301
- displayPath: `${rowsArgument.slice(1)} row ${row + 1}.${column}`
302
- });
303
- };
304
- if (!map) {
305
- let categoryIndices = new Map(adapted.data.categories.map((entry, i) => [entry.id, i])), seriesIndices = new Map(adapted.data.series.map((entry, i) => [entry.id, i]));
306
- rows.forEach((row, i) => {
307
- let category = categoryIndices.get(String(row[contract.category])), series2 = seriesIndices.get(String(row[contract.series])), cell = `/data/series/${series2}/values/${category}`;
308
- sourceField(cell, i, contract.value), sourceField(`${cell}/state`, i, contract.state ?? contract.value), sourceField(`/data/categories/${category}/id`, i, contract.category), sourceField(`/data/categories/${category}/label`, i, contract.categoryLabel), sourceField(`/data/categories/${category}/date`, i, contract.date), sourceField(`/data/series/${series2}/id`, i, contract.series), sourceField(`/data/series/${series2}/label`, i, contract.seriesLabel), sourceField(`/data/series/${series2}/unit`, i, contract.unit);
309
- });
310
- }
311
- if (map) {
312
- let pack;
313
- try {
314
- pack = spec.type === "tilemap" ? source.tilePack?.(data.pack) : getGeoPack(data.pack);
315
- } catch {
316
- }
317
- if (pack) {
318
- let index = geoRegionIdIndex(pack.regions), claimed = /* @__PURE__ */ new Set();
319
- adapted.data.categories.forEach((category, generated) => {
320
- let source2 = rows.findIndex((row) => String(row[contract.category]) === category.id), sourcePath = argumentPath(`rows[${source2}].${contract.category}`, rowsArgument, contract), displayPath = `${rowsArgument.slice(1)} row ${source2 + 1}.${contract.category}`;
321
- pathMap.set(`/data/regions/${generated}/id`, { path: sourcePath, displayPath }), pathMap.set(`/data/regions/${generated}/value`, { path: argumentPath(`rows[${source2}].${contract.value}`, rowsArgument, contract), displayPath: `${rowsArgument.slice(1)} row ${source2 + 1}.${contract.value}` });
322
- let resolution = resolveGeoRegionId(index, category.id), ids = claimedRegionIds(resolution);
323
- if (ids.some((id) => claimed.has(id))) throw new InputError("duplicate-id", `${displayPath}: region '${category.id}' repeats a pack member`, { path: sourcePath, displayPath, suggest: "Keep one source row per pack member, using its canonical id." });
324
- if (ids.forEach((id) => claimed.add(id)), resolution.kind === "unknown") {
325
- let nearest = closestKey(category.id, [...index.canonical.keys()]), hint = nearest?.near ? `; did you mean '${index.canonical.get(nearest.key)}'?` : "";
326
- throw new InputError(`${spec.type}-unknown-region`, `${displayPath}: region '${category.id}' is not in pack '${data.pack}'${hint}`, { path: sourcePath, displayPath, suggest: "Use a canonical region id or an unambiguous pack alias." });
327
- }
328
- });
329
- }
330
- }
331
- let categories = byId(data.categories), series = byId(data.series), named = (key) => contract[key] !== void 0, labelled = new Set(contract.categoryLabel === void 0 ? [] : rows.filter((row) => ![void 0, null, ""].includes(row[contract.categoryLabel])).map((row) => String(row[contract.category])));
332
- return {
333
- spec: {
334
- ...spec,
335
- data: {
336
- ...data,
337
- ...map ? { regions: adapted.data.categories.map((category, index) => {
338
- let state = adapted.states.find((entry) => entry.categoryId === category.id)?.state;
339
- return { id: category.id, value: cellValue(adapted.data.series[0].values[index]), ...state ? { state } : {} };
340
- }) } : {
341
- categories: adapted.data.categories.map(({ label, ...category }) => {
342
- let authored = labelled.has(category.id) ? { label } : {}, template = categories.get(category.id);
343
- return template ? { ...template, id: category.id, ...authored, ...named("date") && category.date !== void 0 ? { date: category.date } : {} } : { ...category, ...authored };
344
- }),
345
- series: adapted.data.series.map((entry) => ({ ...series.get(entry.id), ...entry }))
346
- }
347
- }
348
- },
349
- pathMap,
350
- rows: rows.length,
351
- ignoredColumns: adapted.ignoredColumns,
352
- states: adapted.states
353
- };
354
- }
355
- function rewriteRowsDiagnostics(findings, pathMap) {
356
- let sourceFor = (path) => {
357
- for (let prefix = path; prefix; prefix = prefix.slice(0, prefix.lastIndexOf("/"))) {
358
- let source = pathMap?.get(prefix);
359
- if (source) return source;
360
- }
361
- };
362
- return findings.map((finding) => {
363
- let source = sourceFor(finding.path), fix = finding.fix?.map((operation) => ({ ...operation, path: sourceFor(operation.path)?.path ?? operation.path }));
364
- return { ...finding, ...source || {}, ...fix ? { fix } : {} };
365
- });
366
- }
367
-
368
- export {
369
- InputError,
370
- assertSpecObject,
371
- adaptRows,
372
- rewriteRowsDiagnostics
373
- };