boardplot 0.52.5 → 0.53.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 (377) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +2 -2
  3. package/dist/{ReaderBox-VUNSFKZY.js → ReaderBox-VOJSJ66R.js} +5 -5
  4. package/dist/{annotateEngine-H7OW4H3W.js → annotateEngine-DLMFJZ67.js} +1 -1
  5. package/dist/build-identity.json +3 -3
  6. package/dist/{chunk-HAAUJDGB.js → chunk-24BHMKDD.js} +2 -2
  7. package/dist/{chunk-HJXXFPOL.js → chunk-27QADBDV.js} +2 -2
  8. package/dist/{chunk-V4VC25UL.js → chunk-2CVH5E57.js} +4 -4
  9. package/dist/{chunk-CCQNL33L.js → chunk-2DOR5SS6.js} +9 -9
  10. package/dist/{chunk-WRHFBCVY.js → chunk-2FNNAPCI.js} +3 -3
  11. package/dist/{chunk-OH7FA4TF.js → chunk-2L2Q53EP.js} +1 -1
  12. package/dist/{chunk-JRPI64AQ.js → chunk-2ND7ZITT.js} +17 -14
  13. package/dist/{chunk-QG6MOQLI.js → chunk-2QT5ZUHO.js} +17 -14
  14. package/dist/{chunk-YKO3VCTF.js → chunk-2RSG7JYI.js} +3 -3
  15. package/dist/{chunk-ERAIVAK5.js → chunk-2V6CLH33.js} +36 -3
  16. package/dist/{chunk-FGAGGPFF.js → chunk-2VWJ5BGO.js} +8 -8
  17. package/dist/{chunk-KPMGGE4W.js → chunk-2WNYRWHG.js} +1 -1
  18. package/dist/{chunk-R3WI7ZLE.js → chunk-323YZWYJ.js} +12 -9
  19. package/dist/{chunk-JA755JHN.js → chunk-33PB4V6K.js} +10 -7
  20. package/dist/{chunk-JLCAWQ3H.js → chunk-3A2IEBCN.js} +3 -3
  21. package/dist/{chunk-EKQMYG2B.js → chunk-3H2W76TB.js} +17 -17
  22. package/dist/{chunk-KFFNCDX6.js → chunk-3JEQGGVD.js} +3 -3
  23. package/dist/{chunk-SXGTRZFN.js → chunk-3QWZAEW5.js} +1 -1
  24. package/dist/{chunk-CYDZP5W6.js → chunk-3SQCCESO.js} +26 -23
  25. package/dist/{chunk-XW5J5JAX.js → chunk-3XHJHQWU.js} +2 -2
  26. package/dist/{chunk-JY4R3GML.js → chunk-4G2O2ZPJ.js} +1 -1
  27. package/dist/{chunk-COKHNEJP.js → chunk-4JLBVIGW.js} +3 -3
  28. package/dist/{chunk-M6KTNAND.js → chunk-4RRNJLCM.js} +8 -8
  29. package/dist/{chunk-A3ULWR5N.js → chunk-4UVW5WU6.js} +1 -1
  30. package/dist/{chunk-JSX3C6LL.js → chunk-4X66BTP5.js} +5 -5
  31. package/dist/{chunk-YQ2B3YVF.js → chunk-53OYF4ZT.js} +1 -1
  32. package/dist/{chunk-JL5BRMDT.js → chunk-57ZGVAU3.js} +1 -1
  33. package/dist/{chunk-S7VDRUED.js → chunk-5HECRVXJ.js} +1 -1
  34. package/dist/{chunk-7QDAHY5M.js → chunk-5LGSRWFC.js} +2 -2
  35. package/dist/{chunk-W7UZXD5D.js → chunk-5LYXD6ME.js} +18 -15
  36. package/dist/{chunk-QXILAMAU.js → chunk-66RFKRGO.js} +1 -1
  37. package/dist/{chunk-H57TJD3B.js → chunk-6OCR6ITN.js} +1 -1
  38. package/dist/{chunk-3GZECHOK.js → chunk-6RBTTCQD.js} +12 -12
  39. package/dist/{chunk-GH3ZMBFX.js → chunk-6Y7EXYLR.js} +11 -11
  40. package/dist/{chunk-RNOD2UWF.js → chunk-7CTKTIPF.js} +12 -12
  41. package/dist/{chunk-3W23F7EY.js → chunk-7EVIIADO.js} +1 -1
  42. package/dist/{chunk-ZSLGN6CO.js → chunk-7X2ZYVAX.js} +1 -1
  43. package/dist/{chunk-PEN2DK7T.js → chunk-A6CQPJWR.js} +2 -2
  44. package/dist/{chunk-ELYU6TRQ.js → chunk-ADKCLH3Z.js} +1 -1
  45. package/dist/{chunk-62FR4FYJ.js → chunk-ADWSGPH5.js} +2 -2
  46. package/dist/{chunk-TXINIAFL.js → chunk-AG2CJ4JY.js} +10 -5
  47. package/dist/{chunk-R5SWC3EW.js → chunk-AHQ4L3BE.js} +1 -1
  48. package/dist/{chunk-NLOMCLKI.js → chunk-AQROQDLR.js} +8 -8
  49. package/dist/{chunk-LC6DYCTG.js → chunk-AWTG3RFF.js} +1 -1
  50. package/dist/{chunk-E2HEVF23.js → chunk-B54RN2FD.js} +10 -10
  51. package/dist/{chunk-JFG4DHKQ.js → chunk-B67K6OWJ.js} +1 -1
  52. package/dist/{chunk-SGSPYHFE.js → chunk-B6GFKYBZ.js} +2 -2
  53. package/dist/{chunk-IZCOG3FS.js → chunk-BBRBCMNR.js} +4 -4
  54. package/dist/{chunk-KSYVTEKR.js → chunk-BMRD6MAH.js} +3 -3
  55. package/dist/{chunk-YTSSXSZR.js → chunk-BPKXEMRE.js} +3 -3
  56. package/dist/{chunk-CAE2HK2G.js → chunk-BWGRWGVA.js} +1 -1
  57. package/dist/{chunk-W2RGSGRR.js → chunk-BWLOXQDV.js} +6 -6
  58. package/dist/{chunk-EQT3EPTB.js → chunk-BWTX7LUG.js} +1 -1
  59. package/dist/{chunk-BKYMLFUG.js → chunk-C54QLNE4.js} +1 -1
  60. package/dist/{chunk-HFG76JTS.js → chunk-CAQ5P4VN.js} +3 -3
  61. package/dist/{chunk-HZQEQ34U.js → chunk-CCCEBIUZ.js} +3 -3
  62. package/dist/{chunk-DGDOGOTQ.js → chunk-CJGSJKPO.js} +3 -3
  63. package/dist/{chunk-AFK47A6O.js → chunk-CN7JRHST.js} +3 -3
  64. package/dist/{chunk-XDLQRSSH.js → chunk-CNX7EGSU.js} +2 -2
  65. package/dist/{chunk-DFKTS6XJ.js → chunk-COYOTQC2.js} +1 -1
  66. package/dist/{chunk-YFG4E3N2.js → chunk-CRNMNZJD.js} +14 -14
  67. package/dist/{chunk-3HHNQPAH.js → chunk-CUVUDK4O.js} +1 -1
  68. package/dist/{chunk-II7652VA.js → chunk-CWDHCSL2.js} +5 -4
  69. package/dist/{chunk-24WB3HMB.js → chunk-CYOJZ3GQ.js} +16 -6
  70. package/dist/{chunk-CRZKGHZ6.js → chunk-D7SHZDA3.js} +17 -19
  71. package/dist/chunk-DAVHGK27.js +657 -0
  72. package/dist/{chunk-NT3HAZYT.js → chunk-DCTCUZ5L.js} +1 -1
  73. package/dist/{chunk-S5ADHIZK.js → chunk-DDCB7ZA5.js} +28 -25
  74. package/dist/{chunk-7VXZDB45.js → chunk-DDI2W4TR.js} +1 -1
  75. package/dist/{chunk-KU4YS6HN.js → chunk-DIHUGBZO.js} +1 -1
  76. package/dist/{chunk-6UBEGKIQ.js → chunk-DJHIQWSG.js} +3 -3
  77. package/dist/{chunk-LO2DANS6.js → chunk-DO5OZJAO.js} +5 -5
  78. package/dist/{chunk-4SM2ONUC.js → chunk-DOFYKPTC.js} +1 -1
  79. package/dist/{chunk-3I6RANBJ.js → chunk-DRW6KGBK.js} +36 -32
  80. package/dist/{chunk-2UVTHU7A.js → chunk-DU4A5AOY.js} +37 -27
  81. package/dist/{chunk-5KWXRYAT.js → chunk-DYS7EIXY.js} +6 -6
  82. package/dist/{chunk-YP3I6W7T.js → chunk-E4IQ6M4S.js} +3 -3
  83. package/dist/{chunk-2AKWCMS4.js → chunk-EFUWFB64.js} +3 -3
  84. package/dist/{chunk-C64FBRJO.js → chunk-EHBB2Z4D.js} +5 -5
  85. package/dist/{chunk-FT3F72C3.js → chunk-EHVESNLV.js} +1 -1
  86. package/dist/{chunk-6JUJ2DU3.js → chunk-EJPVVGD7.js} +37 -37
  87. package/dist/{chunk-XEGRWWNO.js → chunk-EUADDXAV.js} +2 -2
  88. package/dist/{chunk-WVSNSWBJ.js → chunk-F6CNPC4L.js} +1 -1
  89. package/dist/{chunk-33CBPK5Q.js → chunk-FBAYZSFC.js} +51 -45
  90. package/dist/{chunk-QETGGFH2.js → chunk-FBB4BWKN.js} +3 -3
  91. package/dist/{chunk-TSR5YDPS.js → chunk-FF23FYQD.js} +23 -20
  92. package/dist/{chunk-DLC23CKC.js → chunk-FG6EDGMI.js} +1 -1
  93. package/dist/{chunk-PTVOXB5T.js → chunk-FHA3KMFC.js} +6 -2
  94. package/dist/{chunk-WDUNR2VI.js → chunk-FV3VF36K.js} +21 -18
  95. package/dist/{chunk-S4F27M7N.js → chunk-G5FMTRG5.js} +2 -2
  96. package/dist/{chunk-WHSTEAVP.js → chunk-GCBOHVDZ.js} +1 -1
  97. package/dist/{chunk-YHTO46W2.js → chunk-GTG3IGLF.js} +35 -31
  98. package/dist/{chunk-COYPDRJK.js → chunk-GZTNTHSW.js} +2 -2
  99. package/dist/{chunk-3XQ635KD.js → chunk-H5G7T35P.js} +3 -3
  100. package/dist/{chunk-UZF3G2FN.js → chunk-H63XQ3OO.js} +5 -5
  101. package/dist/{chunk-F77BNDAT.js → chunk-H67RTX46.js} +2 -2
  102. package/dist/{chunk-2MTWKMEG.js → chunk-HA4IPWMM.js} +1 -1
  103. package/dist/{chunk-XY5O74BH.js → chunk-HKYTOJLV.js} +3 -3
  104. package/dist/{chunk-ZVTFZF4V.js → chunk-HOAH5XBR.js} +8 -8
  105. package/dist/{chunk-S62M63LU.js → chunk-HYY5V2KL.js} +3 -3
  106. package/dist/{chunk-5C7TWNYZ.js → chunk-HZI56ASJ.js} +1 -1
  107. package/dist/{chunk-2DHJJ2EN.js → chunk-I6VAWNNU.js} +3 -3
  108. package/dist/{chunk-QVABTUDS.js → chunk-IBXXZVG7.js} +7 -7
  109. package/dist/{chunk-JETXFF3M.js → chunk-IK4BHOPZ.js} +1 -1
  110. package/dist/{chunk-Z256ACGC.js → chunk-IL5T7I2A.js} +2 -2
  111. package/dist/{chunk-A7A4PDG5.js → chunk-ILSXT6KT.js} +3 -3
  112. package/dist/{chunk-Y4PXIJMD.js → chunk-IYMI7YI4.js} +14 -14
  113. package/dist/{chunk-5DJXJXDE.js → chunk-J6I2YFJH.js} +1 -1
  114. package/dist/{chunk-KS7DXCXH.js → chunk-JR7Y5ONB.js} +3 -3
  115. package/dist/{chunk-GZ4RHGIW.js → chunk-JSEYUJUQ.js} +19 -19
  116. package/dist/{chunk-3ZCKEANJ.js → chunk-K3HSQPSM.js} +3 -3
  117. package/dist/{chunk-VB2MJLET.js → chunk-KPKXJYQH.js} +1 -1
  118. package/dist/{chunk-XDS4UZGR.js → chunk-KSJVENRU.js} +3 -3
  119. package/dist/{chunk-2SGIHKKU.js → chunk-KZJOV4QW.js} +1 -1
  120. package/dist/{chunk-GQS46LC3.js → chunk-KZS46KDY.js} +11 -3
  121. package/dist/{chunk-XTNV2YMB.js → chunk-L3JWM7FR.js} +1 -1
  122. package/dist/{chunk-HX3MQ3H4.js → chunk-L4S6UFTL.js} +3 -3
  123. package/dist/{chunk-K2HNV4LE.js → chunk-L6DJ4ZY5.js} +12 -12
  124. package/dist/{chunk-Z5VSLLNY.js → chunk-L7RHB734.js} +1 -1
  125. package/dist/{chunk-YI2ZVTCB.js → chunk-LCWJS34U.js} +1 -1
  126. package/dist/{chunk-MEISCROL.js → chunk-LFTAMH7I.js} +3 -3
  127. package/dist/{chunk-B2EBEXIS.js → chunk-LFX7W4B7.js} +1 -1
  128. package/dist/chunk-LINZPU5D.js +8 -0
  129. package/dist/{chunk-ORUJI3VB.js → chunk-LIWLBLCT.js} +1 -1
  130. package/dist/{chunk-HUF6TQ2J.js → chunk-LS7HVBI7.js} +3 -3
  131. package/dist/{chunk-TTR7EWNH.js → chunk-M4EUXOLU.js} +4 -4
  132. package/dist/{chunk-A2FHZH7E.js → chunk-MBKZYJRC.js} +35 -21
  133. package/dist/{chunk-76ANFJOI.js → chunk-MCYM3RNF.js} +1 -1
  134. package/dist/{chunk-MDYLOIS2.js → chunk-MF6IVSBJ.js} +1 -1
  135. package/dist/{chunk-FOKEGVPB.js → chunk-MIAPBQCA.js} +3 -3
  136. package/dist/{chunk-D4BIV6WG.js → chunk-MJZHFH5R.js} +19 -16
  137. package/dist/{chunk-A5JWFZVU.js → chunk-MQFCG4KS.js} +79 -79
  138. package/dist/{chunk-CS4DHFNG.js → chunk-MVV6RQMG.js} +2 -2
  139. package/dist/{chunk-NG5IGZXC.js → chunk-MYMT5KJL.js} +23 -20
  140. package/dist/{chunk-GULJ6KVT.js → chunk-MZL6LGKO.js} +14 -14
  141. package/dist/{chunk-5T5YW52S.js → chunk-N23YFPPI.js} +1 -1
  142. package/dist/{chunk-UEU46Q3D.js → chunk-N3G2FYDL.js} +6 -6
  143. package/dist/{chunk-7IFLQMJL.js → chunk-N3TPMXS3.js} +5 -4
  144. package/dist/{chunk-B67K5X4M.js → chunk-N73IBH55.js} +1 -1
  145. package/dist/{chunk-QHFQHQDC.js → chunk-N7J7CZS6.js} +2 -2
  146. package/dist/{chunk-7JVAQX6C.js → chunk-NCB3YLHF.js} +4 -4
  147. package/dist/{chunk-NEVSQGOI.js → chunk-NHQGRKEA.js} +2 -2
  148. package/dist/{chunk-GWQIXU37.js → chunk-NKIYLFXZ.js} +12 -12
  149. package/dist/{chunk-4DNOEV3Q.js → chunk-NOSDEJ3K.js} +79 -2
  150. package/dist/{chunk-V4DYVLOO.js → chunk-NQDVMUHX.js} +5 -5
  151. package/dist/{chunk-TXZBBZOG.js → chunk-NSSNYY6Y.js} +2 -2
  152. package/dist/{chunk-6XE3GVGU.js → chunk-NY5NUFDZ.js} +3 -2
  153. package/dist/{chunk-TPZB2YWR.js → chunk-O3S2KNIW.js} +2 -2
  154. package/dist/{chunk-OAPCJO6W.js → chunk-O3VN6BTL.js} +1 -0
  155. package/dist/chunk-ONZLC47B.js +88 -0
  156. package/dist/{chunk-RSWVH7DB.js → chunk-OUEGGWH7.js} +3 -3
  157. package/dist/{chunk-AZOUSKZD.js → chunk-OURX73UJ.js} +1 -1
  158. package/dist/{chunk-XPWRD424.js → chunk-P25VEGGX.js} +3 -3
  159. package/dist/{chunk-NMCOUVN5.js → chunk-P26Z62UV.js} +3 -3
  160. package/dist/{chunk-WMJPFLF3.js → chunk-P5RNWMZC.js} +29 -25
  161. package/dist/{chunk-XYONCO5Q.js → chunk-P6KZIZDV.js} +19 -16
  162. package/dist/{chunk-S53OGZL6.js → chunk-PEUSKIFV.js} +1 -1
  163. package/dist/{chunk-GZ2VNM4L.js → chunk-PFVTYFSL.js} +3 -3
  164. package/dist/{chunk-ALKTNXMR.js → chunk-Q3CV2JJ2.js} +31 -31
  165. package/dist/{chunk-X7TXGKRX.js → chunk-QO6HEXIZ.js} +6 -6
  166. package/dist/{chunk-EC2NAYPQ.js → chunk-QOIVXZUF.js} +3 -3
  167. package/dist/{chunk-JMH5MD5A.js → chunk-QSXK6PJL.js} +1 -1
  168. package/dist/{chunk-MCOIEWW6.js → chunk-QTZVVZ2A.js} +1 -1
  169. package/dist/{chunk-27QQEWNV.js → chunk-QWXWVPNE.js} +2 -2
  170. package/dist/{chunk-LC3PSQJJ.js → chunk-QY5ZKUWY.js} +1 -1
  171. package/dist/{chunk-PUVGWJQ5.js → chunk-RA66JA3D.js} +4 -4
  172. package/dist/{chunk-SLTMRTXV.js → chunk-REOPXBUR.js} +15 -12
  173. package/dist/{chunk-ASAON7G4.js → chunk-RGZGLKFB.js} +4 -4
  174. package/dist/{chunk-GQPESFAF.js → chunk-RL3NUWMY.js} +7 -7
  175. package/dist/{chunk-ETHWK2RZ.js → chunk-RNOJSEES.js} +1 -1
  176. package/dist/{chunk-KYELSLDJ.js → chunk-RPIW5T55.js} +1 -1
  177. package/dist/{chunk-XO5ONLVM.js → chunk-S32YYDIB.js} +1 -1
  178. package/dist/{chunk-QN6JHMGU.js → chunk-S4QSJAGY.js} +1 -1
  179. package/dist/{chunk-UQSVWO7Z.js → chunk-S6UX7KB6.js} +8 -7
  180. package/dist/{chunk-IZ35GMGB.js → chunk-SDSONLMZ.js} +13 -10
  181. package/dist/{chunk-S4ONWRJE.js → chunk-SKRSCTT5.js} +2 -2
  182. package/dist/{chunk-TVHLKVUO.js → chunk-SMCDXUIO.js} +3 -3
  183. package/dist/{chunk-JLZM7XMZ.js → chunk-SPTPFY4S.js} +14 -11
  184. package/dist/{chunk-A6XCAQ52.js → chunk-SREWFAAJ.js} +7 -6
  185. package/dist/{chunk-2JAWQ7VV.js → chunk-SS42FJVN.js} +11 -10
  186. package/dist/{chunk-I322G5UG.js → chunk-SVZDXFPX.js} +17 -14
  187. package/dist/{chunk-627P6T25.js → chunk-TBGUEF3M.js} +21 -18
  188. package/dist/{chunk-OLNORNCT.js → chunk-TGK6KUGN.js} +4 -4
  189. package/dist/{chunk-PGIQMQRU.js → chunk-TJSND556.js} +227 -94
  190. package/dist/{chunk-V422EKLW.js → chunk-TKOJZQAJ.js} +3 -3
  191. package/dist/{chunk-DVKBU23L.js → chunk-TM4OC53S.js} +1 -1
  192. package/dist/{chunk-ZJKOLOVF.js → chunk-TWOREVKJ.js} +26 -20
  193. package/dist/{chunk-IDTLHPTK.js → chunk-TXS3U77A.js} +2 -2
  194. package/dist/{chunk-VYMGZ27S.js → chunk-UB6ODJHO.js} +3 -2
  195. package/dist/{chunk-RNXITK5M.js → chunk-UBZXQIDR.js} +3 -3
  196. package/dist/{chunk-IN4QT33I.js → chunk-ULTSSIOU.js} +1 -1
  197. package/dist/{chunk-QNHZXFRA.js → chunk-V6O6KVOA.js} +3 -3
  198. package/dist/{chunk-TPYV2FTV.js → chunk-VERLFNWR.js} +3 -3
  199. package/dist/{chunk-ATTE3FYC.js → chunk-VH2UUU7K.js} +3 -3
  200. package/dist/{chunk-V667FCIJ.js → chunk-VJ3FCGQF.js} +1 -1
  201. package/dist/{chunk-FT47HQ5U.js → chunk-VK5ZDV67.js} +4 -4
  202. package/dist/{chunk-RJQ5YS3Q.js → chunk-VKQNDOAI.js} +4 -4
  203. package/dist/{chunk-5ENRZX6I.js → chunk-VTEV3WVF.js} +19 -16
  204. package/dist/{chunk-35DZP2R2.js → chunk-WI5ITCOH.js} +2 -2
  205. package/dist/{chunk-A372DLQX.js → chunk-X4YNDLVA.js} +3 -3
  206. package/dist/{chunk-GDQ3NGDZ.js → chunk-X6SUFTD7.js} +2 -2
  207. package/dist/{chunk-NYEY6W5R.js → chunk-XJI6SWFS.js} +8 -8
  208. package/dist/{chunk-Q6XJOJTY.js → chunk-XJP5DKIL.js} +2 -2
  209. package/dist/{chunk-BVWU6GOB.js → chunk-XN4ARQ2W.js} +2 -2
  210. package/dist/{chunk-MJMJEURO.js → chunk-XN7MQO45.js} +10 -10
  211. package/dist/{chunk-HUFCSX2Y.js → chunk-XQCQZBGX.js} +17 -6
  212. package/dist/{chunk-MFLH5ZDQ.js → chunk-XXOHXA3A.js} +2 -2
  213. package/dist/{chunk-WJMUMN3I.js → chunk-XZOHR765.js} +2 -2
  214. package/dist/{chunk-IXSZ7OKR.js → chunk-YCNLQYTC.js} +1 -1
  215. package/dist/{chunk-MNJ2DHU6.js → chunk-YCRGWQBS.js} +8 -8
  216. package/dist/{chunk-YEDYBMCW.js → chunk-YF2PYLC4.js} +1 -1
  217. package/dist/{chunk-MIXKQJ64.js → chunk-YG5GUELW.js} +17 -17
  218. package/dist/{chunk-RTJXOIIQ.js → chunk-YWP7XFKD.js} +1 -1
  219. package/dist/{chunk-WYJMV62X.js → chunk-Z6CL7AR6.js} +3 -3
  220. package/dist/{chunk-A5LZUYK4.js → chunk-ZMF7WEGG.js} +3 -2
  221. package/dist/{chunk-NXNQQ3DS.js → chunk-ZNHFLJSY.js} +7 -14
  222. package/dist/{chunk-EWVKBRLV.js → chunk-ZQF34VPS.js} +2 -2
  223. package/dist/{chunk-H7UZZ7KP.js → chunk-ZU425HNM.js} +3 -3
  224. package/dist/{chunk-YAYRRKC7.js → chunk-ZZU5R5UU.js} +3 -3
  225. package/dist/cli/index.js +2 -2
  226. package/dist/{core-KBH3EJZV.js → core-3VCCUFVX.js} +1 -1
  227. package/dist/{core-E6YD7VU4.js → core-4BZQQSHS.js} +2 -1
  228. package/dist/{core-6LLJNZ4O.js → core-4VT4MHNB.js} +2 -1
  229. package/dist/{core-ZH7XTJTD.js → core-5535KXRD.js} +2 -1
  230. package/dist/{core-JQV7STNF.js → core-5HQBPCHL.js} +2 -1
  231. package/dist/{core-QUYSNTC7.js → core-6RYHWUJO.js} +2 -1
  232. package/dist/{core-SCWEVNUY.js → core-7BZJCIXN.js} +2 -1
  233. package/dist/{core-KFBW5PRT.js → core-AJTVU6X7.js} +2 -1
  234. package/dist/{core-EE55P6XK.js → core-C6YUSTZI.js} +2 -1
  235. package/dist/{core-IV26EL5C.js → core-EEB7HTCL.js} +2 -1
  236. package/dist/{core-DBRILYNB.js → core-EFMVDWNH.js} +1 -1
  237. package/dist/{core-IZVZ2B7Y.js → core-ETAGQBZO.js} +1 -1
  238. package/dist/{core-RY6IFRKM.js → core-FVR3WZEC.js} +2 -1
  239. package/dist/{core-RE3L6YCM.js → core-GCTFVYMH.js} +1 -1
  240. package/dist/{core-CPN2HF75.js → core-GES44OTS.js} +1 -1
  241. package/dist/{core-WLVU2HWX.js → core-GGQREDSI.js} +2 -1
  242. package/dist/{core-ZJYLJWZQ.js → core-HRYOV6QD.js} +1 -1
  243. package/dist/{core-KWGXHBJE.js → core-IKD3EE3S.js} +2 -1
  244. package/dist/{core-MZMR2DF4.js → core-JM4R426L.js} +1 -1
  245. package/dist/{core-RUA3EWW3.js → core-KKQS3WI2.js} +2 -1
  246. package/dist/{core-6ANZ2OWO.js → core-LA6XDYG7.js} +1 -1
  247. package/dist/{core-CS7AKNME.js → core-MJ7JWQT5.js} +1 -1
  248. package/dist/{core-XXIOJY2X.js → core-MLROKJ2M.js} +2 -1
  249. package/dist/{core-5Z6UW5DS.js → core-MR52YBRX.js} +1 -1
  250. package/dist/{core-OK2ZY5OJ.js → core-NP4VHWXL.js} +1 -1
  251. package/dist/{core-OW5V74Q4.js → core-NQLNZDX5.js} +2 -1
  252. package/dist/{core-OV5MPTZP.js → core-NSIJEKLI.js} +2 -1
  253. package/dist/{core-DU77ZYPR.js → core-OJUQLIQ5.js} +2 -1
  254. package/dist/{core-T5Q4DSH2.js → core-PB3VUQSS.js} +1 -1
  255. package/dist/{core-SE67HHFG.js → core-Q6VLFFYC.js} +2 -1
  256. package/dist/{core-ZHE7N4NS.js → core-QY7AVIKZ.js} +2 -1
  257. package/dist/{core-WQPHNVNY.js → core-SBQMHWTA.js} +2 -1
  258. package/dist/{core-TJX3I7KH.js → core-UHECQHJ2.js} +2 -1
  259. package/dist/{core-ULUA5ZB2.js → core-V5FV4NWL.js} +2 -1
  260. package/dist/{core-PL64QPOH.js → core-WGM4XUN3.js} +2 -1
  261. package/dist/{core-PVINU5JJ.js → core-WUQVFARS.js} +2 -1
  262. package/dist/{core-FFLPH5XK.js → core-Z2F3IGSR.js} +2 -1
  263. package/dist/{dataTable-IL7HVDHL.js → dataTable-3CPPIHB3.js} +2 -2
  264. package/dist/{engine-MYLZI5VH.js → engine-FXFBCWHB.js} +11 -11
  265. package/dist/fixtures.js +2 -1
  266. package/dist/{fontTables-ZYBUCJ5N.js → fontTables-WYCZNRE7.js} +1 -1
  267. package/dist/fonts.js +1 -1
  268. package/dist/index.js +19 -18
  269. package/dist/{main-ISJ53IS5.js → main-YLKBTHJP.js} +11 -10
  270. package/dist/mcp/server.js +16 -14
  271. package/dist/react/bar.js +2 -1
  272. package/dist/react/bartable.js +1 -1
  273. package/dist/react/box.js +2 -1
  274. package/dist/react/bullet.js +2 -1
  275. package/dist/react/butterfly.js +2 -1
  276. package/dist/react/choropleth.js +1 -1
  277. package/dist/react/cohort.js +2 -1
  278. package/dist/react/column.js +2 -1
  279. package/dist/react/combo.js +2 -1
  280. package/dist/react/creative.js +1 -1
  281. package/dist/react/diagram.js +1 -1
  282. package/dist/react/dimswitch.js +2 -1
  283. package/dist/react/dot.js +2 -1
  284. package/dist/react/export.js +18 -17
  285. package/dist/react/funnel.js +2 -1
  286. package/dist/react/gantt.js +1 -1
  287. package/dist/react/grid.js +2 -1
  288. package/dist/react/heatmap.js +2 -1
  289. package/dist/react/histogram.js +2 -1
  290. package/dist/react/index.js +85 -84
  291. package/dist/react/kpi.js +1 -1
  292. package/dist/react/likert.js +2 -1
  293. package/dist/react/line.js +2 -1
  294. package/dist/react/mekko.js +2 -1
  295. package/dist/react/pareto.js +2 -1
  296. package/dist/react/pie.js +2 -1
  297. package/dist/react/prepare.js +19 -18
  298. package/dist/react/pvm.js +2 -1
  299. package/dist/react/pyramid.js +2 -1
  300. package/dist/react/sankey.js +1 -1
  301. package/dist/react/scatter.js +2 -1
  302. package/dist/react/slope.js +2 -1
  303. package/dist/react/sparkline.js +1 -1
  304. package/dist/react/spec.js +35 -26
  305. package/dist/react/status.js +1 -1
  306. package/dist/react/story.js +3 -3
  307. package/dist/react/table.js +2 -1
  308. package/dist/react/theme.js +3 -3
  309. package/dist/react/tilemap.js +1 -1
  310. package/dist/react/treemap.js +1 -1
  311. package/dist/react/variance.js +2 -1
  312. package/dist/react/waffle.js +1 -1
  313. package/dist/react/waterfall.js +2 -1
  314. package/dist/rows.js +2 -2
  315. package/dist/{rowsModule-3Y4I3M3E.js → rowsModule-YVLAROIP.js} +1 -1
  316. package/dist/{schema-QJJPRRE7.js → schema-2K6C3U24.js} +2 -1
  317. package/dist/{schema-STGL44TL.js → schema-2KIHLTYI.js} +2 -1
  318. package/dist/{schema-4735XAZX.js → schema-4HY2MWZC.js} +2 -1
  319. package/dist/{schema-PDZ6256H.js → schema-4S5CXHAO.js} +2 -1
  320. package/dist/{schema-XYYDUUHS.js → schema-5BKQV56C.js} +2 -1
  321. package/dist/{schema-JJYJOQTT.js → schema-5HA5DSYN.js} +2 -1
  322. package/dist/{schema-W376PAJG.js → schema-5NKJPSBD.js} +2 -1
  323. package/dist/{schema-IF5N3J56.js → schema-65FOKNHK.js} +2 -1
  324. package/dist/{schema-TQYTESG3.js → schema-6OHZWHUI.js} +2 -1
  325. package/dist/{schema-IG7JIR4H.js → schema-6RYJS2GM.js} +2 -1
  326. package/dist/{schema-P7LJFJAJ.js → schema-6W4M3WJ4.js} +2 -1
  327. package/dist/{schema-GH7IKSOU.js → schema-7TLSFG6M.js} +2 -1
  328. package/dist/{schema-2GUBWOBC.js → schema-AMFRKUFS.js} +2 -1
  329. package/dist/{schema-7J3NAIN2.js → schema-B7CZPPB4.js} +2 -1
  330. package/dist/{schema-34ZELWRQ.js → schema-BNRNHGHQ.js} +2 -1
  331. package/dist/{schema-PA2MXYY4.js → schema-E4MRCGPZ.js} +2 -1
  332. package/dist/{schema-L7263JMT.js → schema-F3WYTR65.js} +2 -1
  333. package/dist/{schema-3BHL2B76.js → schema-FA6XIHTW.js} +2 -1
  334. package/dist/{schema-5YTNQ6JY.js → schema-GZNOW4LX.js} +2 -1
  335. package/dist/{schema-QEVSIMGO.js → schema-HEIDGCSL.js} +2 -1
  336. package/dist/{schema-EQQB43AY.js → schema-JB2H6KPA.js} +2 -1
  337. package/dist/{schema-2BMZOHXI.js → schema-MPXZNWV3.js} +2 -1
  338. package/dist/{schema-G4KFMQBL.js → schema-NHNQK6XO.js} +2 -1
  339. package/dist/{schema-CVMV4LRA.js → schema-NN6UPDPW.js} +2 -1
  340. package/dist/{schema-AOJJ7JZB.js → schema-O4YNAGIY.js} +2 -1
  341. package/dist/{schema-E6YOSOWB.js → schema-O7AKK232.js} +2 -1
  342. package/dist/{schema-E2ISJ65D.js → schema-OJCML6LV.js} +2 -1
  343. package/dist/{schema-P63S63GE.js → schema-ORTRMYI6.js} +2 -1
  344. package/dist/{schema-EYZVD73N.js → schema-PJ6P52BC.js} +2 -1
  345. package/dist/{schema-S3EQKVOT.js → schema-RTWES6NR.js} +2 -1
  346. package/dist/{schema-EYQ5IBLF.js → schema-S36SRYGO.js} +2 -1
  347. package/dist/{schema-D3RCMN3T.js → schema-S3TCLTYD.js} +2 -1
  348. package/dist/{schema-MEAFRXVH.js → schema-SWWMOLOR.js} +3 -2
  349. package/dist/{schema-PNC3Z7AH.js → schema-WOSEZNKG.js} +2 -1
  350. package/dist/{schema-T4NE2EAO.js → schema-Y6KBWUUR.js} +2 -1
  351. package/dist/{schema-EVLLL5UF.js → schema-YQYTLKSW.js} +2 -1
  352. package/dist/{schema-KFC4WYH4.js → schema-ZUUUY3QS.js} +2 -1
  353. package/dist/{specValidation-NVBIZMEE.js → specValidation-VNWIKLHH.js} +2 -1
  354. package/dist/theme.js +2 -2
  355. package/dist/{themeShapeRules-5C2463YH.js → themeShapeRules-2D3KWSPQ.js} +1 -1
  356. package/dist/types/core/charts/gantt/layout.d.ts +7 -0
  357. package/dist/types/core/charts/grid/schema.d.ts +1 -1
  358. package/dist/types/core/formatSpec.d.ts +2 -0
  359. package/dist/types/core/label/solver.d.ts +5 -1
  360. package/dist/types/core/rows.d.ts +2 -0
  361. package/dist/types/core/types/annotations.d.ts +6 -2
  362. package/dist/types/core/types/data.d.ts +8 -3
  363. package/dist/types/react/spec.d.ts +17 -0
  364. package/dist/types/rows.d.ts +6 -1
  365. package/dist/validate.js +7 -6
  366. package/docs/manual.md +14 -2
  367. package/docs/reference/box.md +1 -1
  368. package/docs/reference/fixtures.md +1 -0
  369. package/docs/reference/gantt.md +11 -5
  370. package/docs/reference/histogram.md +1 -1
  371. package/docs/reference/line.md +1 -1
  372. package/docs/reference/react.md +3 -0
  373. package/docs/reference/table.md +1 -1
  374. package/llms.txt +3 -3
  375. package/package.json +1 -1
  376. package/dist/chunk-2GELJH37.js +0 -88
  377. 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
- };