boardplot 0.0.0-stage → 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 (818) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE.md +180 -0
  4. package/README.md +208 -2
  5. package/THIRD_PARTY_NOTICES.md +1110 -0
  6. package/dist/DiagnosticDetails-UNYNYCAH.js +69 -0
  7. package/dist/ReaderBox-VOJSJ66R.js +137 -0
  8. package/dist/annotateEngine-DLMFJZ67.js +30 -0
  9. package/dist/build-identity.json +6 -0
  10. package/dist/chunk-24BHMKDD.js +83 -0
  11. package/dist/chunk-263SZKIL.js +8 -0
  12. package/dist/chunk-27QADBDV.js +211 -0
  13. package/dist/chunk-2CVH5E57.js +128 -0
  14. package/dist/chunk-2DOR5SS6.js +446 -0
  15. package/dist/chunk-2EQE4E3I.js +22 -0
  16. package/dist/chunk-2FNNAPCI.js +24 -0
  17. package/dist/chunk-2L2Q53EP.js +251 -0
  18. package/dist/chunk-2LMCD3ZR.js +6 -0
  19. package/dist/chunk-2ND7ZITT.js +3069 -0
  20. package/dist/chunk-2QT5ZUHO.js +2937 -0
  21. package/dist/chunk-2RSG7JYI.js +24 -0
  22. package/dist/chunk-2V6CLH33.js +1392 -0
  23. package/dist/chunk-2VWJ5BGO.js +566 -0
  24. package/dist/chunk-2WNYRWHG.js +51 -0
  25. package/dist/chunk-323YZWYJ.js +548 -0
  26. package/dist/chunk-33PB4V6K.js +382 -0
  27. package/dist/chunk-33PLBIMA.js +176 -0
  28. package/dist/chunk-3A2IEBCN.js +195 -0
  29. package/dist/chunk-3D3D3D23.js +25 -0
  30. package/dist/chunk-3EZRM4YM.js +92 -0
  31. package/dist/chunk-3H2W76TB.js +2353 -0
  32. package/dist/chunk-3JEQGGVD.js +19 -0
  33. package/dist/chunk-3QWZAEW5.js +26 -0
  34. package/dist/chunk-3SIRPKMP.js +12 -0
  35. package/dist/chunk-3SQCCESO.js +1592 -0
  36. package/dist/chunk-3XHJHQWU.js +42 -0
  37. package/dist/chunk-4G2O2ZPJ.js +83 -0
  38. package/dist/chunk-4JLBVIGW.js +24 -0
  39. package/dist/chunk-4RRNJLCM.js +746 -0
  40. package/dist/chunk-4UVW5WU6.js +76 -0
  41. package/dist/chunk-4X66BTP5.js +344 -0
  42. package/dist/chunk-53OYF4ZT.js +687 -0
  43. package/dist/chunk-57ZGVAU3.js +179 -0
  44. package/dist/chunk-5HECRVXJ.js +62 -0
  45. package/dist/chunk-5LGSRWFC.js +63 -0
  46. package/dist/chunk-5LYXD6ME.js +1112 -0
  47. package/dist/chunk-66RFKRGO.js +28 -0
  48. package/dist/chunk-6KWIQ5KF.js +18 -0
  49. package/dist/chunk-6OCR6ITN.js +72 -0
  50. package/dist/chunk-6RBTTCQD.js +802 -0
  51. package/dist/chunk-6Y7EXYLR.js +563 -0
  52. package/dist/chunk-7CTKTIPF.js +613 -0
  53. package/dist/chunk-7EVIIADO.js +185 -0
  54. package/dist/chunk-7X2ZYVAX.js +89 -0
  55. package/dist/chunk-7X65ZQN4.js +38 -0
  56. package/dist/chunk-A4QZXLXF.js +7 -0
  57. package/dist/chunk-A6CQPJWR.js +49 -0
  58. package/dist/chunk-A7IEVBYI.js +35 -0
  59. package/dist/chunk-ACXX2JNL.js +6 -0
  60. package/dist/chunk-ADKCLH3Z.js +98 -0
  61. package/dist/chunk-ADWSGPH5.js +23 -0
  62. package/dist/chunk-AG2CJ4JY.js +203 -0
  63. package/dist/chunk-AHQ4L3BE.js +30 -0
  64. package/dist/chunk-AOQ6VF5H.js +6 -0
  65. package/dist/chunk-AQROQDLR.js +3303 -0
  66. package/dist/chunk-AWTG3RFF.js +85 -0
  67. package/dist/chunk-B54RN2FD.js +692 -0
  68. package/dist/chunk-B67K6OWJ.js +48 -0
  69. package/dist/chunk-B6GFKYBZ.js +40 -0
  70. package/dist/chunk-BBL3R5YZ.js +186 -0
  71. package/dist/chunk-BBRBCMNR.js +28 -0
  72. package/dist/chunk-BIDIGDGH.js +6 -0
  73. package/dist/chunk-BLFWUMTD.js +12 -0
  74. package/dist/chunk-BM6SFFWF.js +6 -0
  75. package/dist/chunk-BMRD6MAH.js +24 -0
  76. package/dist/chunk-BPKXEMRE.js +197 -0
  77. package/dist/chunk-BUPLB3EX.js +129 -0
  78. package/dist/chunk-BW5VLBSZ.js +15 -0
  79. package/dist/chunk-BWGRWGVA.js +295 -0
  80. package/dist/chunk-BWLOXQDV.js +131 -0
  81. package/dist/chunk-BWTX7LUG.js +203 -0
  82. package/dist/chunk-C54QLNE4.js +69 -0
  83. package/dist/chunk-CAQ5P4VN.js +296 -0
  84. package/dist/chunk-CCCEBIUZ.js +296 -0
  85. package/dist/chunk-CDZHNLO6.js +42 -0
  86. package/dist/chunk-CJGSJKPO.js +25 -0
  87. package/dist/chunk-CN7JRHST.js +25 -0
  88. package/dist/chunk-CNX7EGSU.js +266 -0
  89. package/dist/chunk-COYOTQC2.js +75 -0
  90. package/dist/chunk-CRNMNZJD.js +1161 -0
  91. package/dist/chunk-CUVUDK4O.js +68 -0
  92. package/dist/chunk-CWDHCSL2.js +2919 -0
  93. package/dist/chunk-CYOJZ3GQ.js +631 -0
  94. package/dist/chunk-D4SOADBD.js +19 -0
  95. package/dist/chunk-D7SHZDA3.js +1808 -0
  96. package/dist/chunk-DAVHGK27.js +657 -0
  97. package/dist/chunk-DCCJRLAJ.js +422 -0
  98. package/dist/chunk-DCTCUZ5L.js +51 -0
  99. package/dist/chunk-DDCB7ZA5.js +2511 -0
  100. package/dist/chunk-DDI2W4TR.js +149 -0
  101. package/dist/chunk-DIHUGBZO.js +61 -0
  102. package/dist/chunk-DJHIQWSG.js +25 -0
  103. package/dist/chunk-DO5OZJAO.js +302 -0
  104. package/dist/chunk-DOFYKPTC.js +18 -0
  105. package/dist/chunk-DRTA6JG5.js +160 -0
  106. package/dist/chunk-DRW6KGBK.js +1062 -0
  107. package/dist/chunk-DU4A5AOY.js +1156 -0
  108. package/dist/chunk-DYS7EIXY.js +294 -0
  109. package/dist/chunk-E4IQ6M4S.js +24 -0
  110. package/dist/chunk-EFUWFB64.js +24 -0
  111. package/dist/chunk-EHBB2Z4D.js +290 -0
  112. package/dist/chunk-EHVESNLV.js +30 -0
  113. package/dist/chunk-EJPVVGD7.js +67 -0
  114. package/dist/chunk-EKQK5D6G.js +14 -0
  115. package/dist/chunk-EUADDXAV.js +30 -0
  116. package/dist/chunk-F6CNPC4L.js +47 -0
  117. package/dist/chunk-FBAYZSFC.js +2806 -0
  118. package/dist/chunk-FBB4BWKN.js +30 -0
  119. package/dist/chunk-FF23FYQD.js +1269 -0
  120. package/dist/chunk-FG6EDGMI.js +53 -0
  121. package/dist/chunk-FHA3KMFC.js +43 -0
  122. package/dist/chunk-FIANWJXX.js +19 -0
  123. package/dist/chunk-FIWNDOMO.js +6 -0
  124. package/dist/chunk-FV3VF36K.js +2721 -0
  125. package/dist/chunk-G5FMTRG5.js +37 -0
  126. package/dist/chunk-GCBOHVDZ.js +229 -0
  127. package/dist/chunk-GDOW2KNP.js +19 -0
  128. package/dist/chunk-GTG3IGLF.js +2674 -0
  129. package/dist/chunk-GZTNTHSW.js +21 -0
  130. package/dist/chunk-H4H4O62O.js +46 -0
  131. package/dist/chunk-H5G7T35P.js +24 -0
  132. package/dist/chunk-H63XQ3OO.js +942 -0
  133. package/dist/chunk-H67RTX46.js +43 -0
  134. package/dist/chunk-HA4IPWMM.js +841 -0
  135. package/dist/chunk-HKYTOJLV.js +33 -0
  136. package/dist/chunk-HOAH5XBR.js +542 -0
  137. package/dist/chunk-HTYFQHRC.js +24 -0
  138. package/dist/chunk-HYY5V2KL.js +19 -0
  139. package/dist/chunk-HZI56ASJ.js +79 -0
  140. package/dist/chunk-I6VAWNNU.js +24 -0
  141. package/dist/chunk-IBXXZVG7.js +80 -0
  142. package/dist/chunk-IDDA5INB.js +60 -0
  143. package/dist/chunk-IK4BHOPZ.js +33 -0
  144. package/dist/chunk-IL5T7I2A.js +27 -0
  145. package/dist/chunk-ILSXT6KT.js +24 -0
  146. package/dist/chunk-IV2UXZXX.js +16 -0
  147. package/dist/chunk-IYEFEBRN.js +41 -0
  148. package/dist/chunk-IYMI7YI4.js +829 -0
  149. package/dist/chunk-J6I2YFJH.js +58 -0
  150. package/dist/chunk-JFBEAUJ6.js +24 -0
  151. package/dist/chunk-JR7Y5ONB.js +27 -0
  152. package/dist/chunk-JSEYUJUQ.js +836 -0
  153. package/dist/chunk-JYBT2JNY.js +61 -0
  154. package/dist/chunk-K3HSQPSM.js +24 -0
  155. package/dist/chunk-KAXJFL7N.js +43 -0
  156. package/dist/chunk-KDMKHR5A.js +32 -0
  157. package/dist/chunk-KKWZWP67.js +24 -0
  158. package/dist/chunk-KOJ5QETJ.js +8 -0
  159. package/dist/chunk-KPKXJYQH.js +19 -0
  160. package/dist/chunk-KSJVENRU.js +113 -0
  161. package/dist/chunk-KZJOV4QW.js +33 -0
  162. package/dist/chunk-KZS46KDY.js +58 -0
  163. package/dist/chunk-L3JWM7FR.js +50 -0
  164. package/dist/chunk-L4S6UFTL.js +26 -0
  165. package/dist/chunk-L6DJ4ZY5.js +2008 -0
  166. package/dist/chunk-L7RHB734.js +23 -0
  167. package/dist/chunk-LCWJS34U.js +38 -0
  168. package/dist/chunk-LFTAMH7I.js +24 -0
  169. package/dist/chunk-LFX7W4B7.js +113 -0
  170. package/dist/chunk-LINZPU5D.js +8 -0
  171. package/dist/chunk-LIWLBLCT.js +83 -0
  172. package/dist/chunk-LNKY5Z2X.js +23 -0
  173. package/dist/chunk-LS7HVBI7.js +24 -0
  174. package/dist/chunk-M4EUXOLU.js +170 -0
  175. package/dist/chunk-M4SPKUZE.js +7 -0
  176. package/dist/chunk-M4YLED7M.js +17 -0
  177. package/dist/chunk-MBKZYJRC.js +1424 -0
  178. package/dist/chunk-MCYM3RNF.js +227 -0
  179. package/dist/chunk-MF6IVSBJ.js +48 -0
  180. package/dist/chunk-MIAPBQCA.js +24 -0
  181. package/dist/chunk-MJZHFH5R.js +1075 -0
  182. package/dist/chunk-MQFCG4KS.js +1467 -0
  183. package/dist/chunk-MVV6RQMG.js +128 -0
  184. package/dist/chunk-MYMT5KJL.js +1182 -0
  185. package/dist/chunk-MZL6LGKO.js +587 -0
  186. package/dist/chunk-N23YFPPI.js +47 -0
  187. package/dist/chunk-N3G2FYDL.js +300 -0
  188. package/dist/chunk-N3TPMXS3.js +161 -0
  189. package/dist/chunk-N73IBH55.js +58 -0
  190. package/dist/chunk-N7J7CZS6.js +43 -0
  191. package/dist/chunk-NCB3YLHF.js +28 -0
  192. package/dist/chunk-NHQGRKEA.js +63 -0
  193. package/dist/chunk-NKIYLFXZ.js +2774 -0
  194. package/dist/chunk-NOSDEJ3K.js +25934 -0
  195. package/dist/chunk-NQDVMUHX.js +433 -0
  196. package/dist/chunk-NSSNYY6Y.js +58 -0
  197. package/dist/chunk-NY5NUFDZ.js +117 -0
  198. package/dist/chunk-O3S2KNIW.js +25 -0
  199. package/dist/chunk-O3VN6BTL.js +24 -0
  200. package/dist/chunk-ONZLC47B.js +88 -0
  201. package/dist/chunk-OQEBOVUO.js +30 -0
  202. package/dist/chunk-OUEGGWH7.js +24 -0
  203. package/dist/chunk-OURX73UJ.js +728 -0
  204. package/dist/chunk-P25VEGGX.js +24 -0
  205. package/dist/chunk-P26Z62UV.js +24 -0
  206. package/dist/chunk-P5RNWMZC.js +2984 -0
  207. package/dist/chunk-P6KZIZDV.js +987 -0
  208. package/dist/chunk-PEUSKIFV.js +168 -0
  209. package/dist/chunk-PFVTYFSL.js +24 -0
  210. package/dist/chunk-PWROWDZS.js +137 -0
  211. package/dist/chunk-Q3CV2JJ2.js +3650 -0
  212. package/dist/chunk-QBR6IKIX.js +50 -0
  213. package/dist/chunk-QGCEHR6S.js +13 -0
  214. package/dist/chunk-QHRE2M6V.js +26 -0
  215. package/dist/chunk-QKL7IY42.js +38 -0
  216. package/dist/chunk-QO6HEXIZ.js +272 -0
  217. package/dist/chunk-QOIVXZUF.js +24 -0
  218. package/dist/chunk-QPWRHDLZ.js +17 -0
  219. package/dist/chunk-QSXK6PJL.js +19 -0
  220. package/dist/chunk-QTZVVZ2A.js +54 -0
  221. package/dist/chunk-QWXWVPNE.js +18 -0
  222. package/dist/chunk-QY5ZKUWY.js +383 -0
  223. package/dist/chunk-QZAT46PP.js +95 -0
  224. package/dist/chunk-RA66JA3D.js +24 -0
  225. package/dist/chunk-REOPXBUR.js +600 -0
  226. package/dist/chunk-RGZGLKFB.js +648 -0
  227. package/dist/chunk-RL3NUWMY.js +3378 -0
  228. package/dist/chunk-RNOJSEES.js +16 -0
  229. package/dist/chunk-ROXO4R3J.js +16 -0
  230. package/dist/chunk-RPIW5T55.js +40 -0
  231. package/dist/chunk-RQ5DNYLG.js +10 -0
  232. package/dist/chunk-RZNYW7UP.js +133 -0
  233. package/dist/chunk-S32YYDIB.js +420 -0
  234. package/dist/chunk-S4QSJAGY.js +44 -0
  235. package/dist/chunk-S6UX7KB6.js +335 -0
  236. package/dist/chunk-SDSONLMZ.js +2546 -0
  237. package/dist/chunk-SGD3ZHID.js +250 -0
  238. package/dist/chunk-SKRSCTT5.js +28 -0
  239. package/dist/chunk-SMCDXUIO.js +24 -0
  240. package/dist/chunk-SPTPFY4S.js +528 -0
  241. package/dist/chunk-SREWFAAJ.js +90 -0
  242. package/dist/chunk-SS42FJVN.js +3875 -0
  243. package/dist/chunk-SVZDXFPX.js +891 -0
  244. package/dist/chunk-SZPTTNW7.js +16 -0
  245. package/dist/chunk-T3IGJARD.js +22 -0
  246. package/dist/chunk-TA3TFKYZ.js +86 -0
  247. package/dist/chunk-TBGUEF3M.js +939 -0
  248. package/dist/chunk-TGK6KUGN.js +331 -0
  249. package/dist/chunk-TJSND556.js +1783 -0
  250. package/dist/chunk-TKOJZQAJ.js +24 -0
  251. package/dist/chunk-TM4OC53S.js +97 -0
  252. package/dist/chunk-TNEHPP3H.js +18 -0
  253. package/dist/chunk-TWOREVKJ.js +1760 -0
  254. package/dist/chunk-TXS3U77A.js +60 -0
  255. package/dist/chunk-UB6ODJHO.js +134 -0
  256. package/dist/chunk-UBZXQIDR.js +24 -0
  257. package/dist/chunk-ULTSSIOU.js +38 -0
  258. package/dist/chunk-UMDEWWXT.js +33 -0
  259. package/dist/chunk-V6O6KVOA.js +347 -0
  260. package/dist/chunk-VABRPZVC.js +43 -0
  261. package/dist/chunk-VDAKTZQP.js +18 -0
  262. package/dist/chunk-VDAZPGR2.js +79 -0
  263. package/dist/chunk-VERLFNWR.js +25 -0
  264. package/dist/chunk-VH2UUU7K.js +24 -0
  265. package/dist/chunk-VJ3FCGQF.js +12 -0
  266. package/dist/chunk-VK5ZDV67.js +47 -0
  267. package/dist/chunk-VKQNDOAI.js +40 -0
  268. package/dist/chunk-VTEV3WVF.js +690 -0
  269. package/dist/chunk-VXZFQKBJ.js +21 -0
  270. package/dist/chunk-WI5ITCOH.js +22 -0
  271. package/dist/chunk-WLZ54FWG.js +120 -0
  272. package/dist/chunk-WYJEOMNY.js +31 -0
  273. package/dist/chunk-WZGJSQKN.js +29 -0
  274. package/dist/chunk-WZL4EEBS.js +11 -0
  275. package/dist/chunk-X4YNDLVA.js +54 -0
  276. package/dist/chunk-X6SUFTD7.js +17 -0
  277. package/dist/chunk-XB4KZ6WO.js +81 -0
  278. package/dist/chunk-XJI6SWFS.js +569 -0
  279. package/dist/chunk-XJP5DKIL.js +29 -0
  280. package/dist/chunk-XN4ARQ2W.js +47 -0
  281. package/dist/chunk-XN7MQO45.js +359 -0
  282. package/dist/chunk-XQCQZBGX.js +100 -0
  283. package/dist/chunk-XXOHXA3A.js +69 -0
  284. package/dist/chunk-XZOHR765.js +127 -0
  285. package/dist/chunk-YCNLQYTC.js +133 -0
  286. package/dist/chunk-YCRGWQBS.js +526 -0
  287. package/dist/chunk-YF2PYLC4.js +210 -0
  288. package/dist/chunk-YG5GUELW.js +935 -0
  289. package/dist/chunk-YS6KMYM4.js +91 -0
  290. package/dist/chunk-YWP7XFKD.js +12 -0
  291. package/dist/chunk-Z2MGTKDR.js +20 -0
  292. package/dist/chunk-Z6CL7AR6.js +24 -0
  293. package/dist/chunk-Z7X3RGGA.js +22 -0
  294. package/dist/chunk-ZF43WRG3.js +29 -0
  295. package/dist/chunk-ZMF7WEGG.js +60 -0
  296. package/dist/chunk-ZNHFLJSY.js +375 -0
  297. package/dist/chunk-ZQ4VFQID.js +76 -0
  298. package/dist/chunk-ZQF34VPS.js +72 -0
  299. package/dist/chunk-ZU425HNM.js +24 -0
  300. package/dist/chunk-ZZU5R5UU.js +24 -0
  301. package/dist/cli/index.js +9 -0
  302. package/dist/core-3VCCUFVX.js +32 -0
  303. package/dist/core-4BZQQSHS.js +33 -0
  304. package/dist/core-4VT4MHNB.js +38 -0
  305. package/dist/core-5535KXRD.js +40 -0
  306. package/dist/core-5HQBPCHL.js +35 -0
  307. package/dist/core-6RYHWUJO.js +35 -0
  308. package/dist/core-7BZJCIXN.js +35 -0
  309. package/dist/core-AJTVU6X7.js +37 -0
  310. package/dist/core-C6YUSTZI.js +57 -0
  311. package/dist/core-EEB7HTCL.js +33 -0
  312. package/dist/core-EFMVDWNH.js +38 -0
  313. package/dist/core-ETAGQBZO.js +34 -0
  314. package/dist/core-FVR3WZEC.js +36 -0
  315. package/dist/core-GCTFVYMH.js +29 -0
  316. package/dist/core-GES44OTS.js +33 -0
  317. package/dist/core-GGQREDSI.js +47 -0
  318. package/dist/core-HRYOV6QD.js +38 -0
  319. package/dist/core-IKD3EE3S.js +38 -0
  320. package/dist/core-JM4R426L.js +32 -0
  321. package/dist/core-KKQS3WI2.js +40 -0
  322. package/dist/core-LA6XDYG7.js +40 -0
  323. package/dist/core-MJ7JWQT5.js +37 -0
  324. package/dist/core-MLROKJ2M.js +53 -0
  325. package/dist/core-MR52YBRX.js +31 -0
  326. package/dist/core-NP4VHWXL.js +29 -0
  327. package/dist/core-NQLNZDX5.js +41 -0
  328. package/dist/core-NSIJEKLI.js +44 -0
  329. package/dist/core-OJUQLIQ5.js +35 -0
  330. package/dist/core-PB3VUQSS.js +32 -0
  331. package/dist/core-Q6VLFFYC.js +56 -0
  332. package/dist/core-QY7AVIKZ.js +51 -0
  333. package/dist/core-SBQMHWTA.js +52 -0
  334. package/dist/core-UHECQHJ2.js +38 -0
  335. package/dist/core-V5FV4NWL.js +56 -0
  336. package/dist/core-WGM4XUN3.js +58 -0
  337. package/dist/core-WUQVFARS.js +34 -0
  338. package/dist/core-Z2F3IGSR.js +42 -0
  339. package/dist/dataTable-3CPPIHB3.js +58 -0
  340. package/dist/engine-FXFBCWHB.js +961 -0
  341. package/dist/fixtures.d.ts +1 -0
  342. package/dist/fixtures.js +41 -0
  343. package/dist/fontTables-WYCZNRE7.js +18 -0
  344. package/dist/fonts.d.ts +1 -0
  345. package/dist/fonts.js +19 -0
  346. package/dist/geo/dach.d.ts +1 -0
  347. package/dist/geo/dach.js +14 -0
  348. package/dist/geo/de-states.d.ts +1 -0
  349. package/dist/geo/de-states.js +14 -0
  350. package/dist/geo/eu27.d.ts +1 -0
  351. package/dist/geo/eu27.js +14 -0
  352. package/dist/geo/europe.d.ts +1 -0
  353. package/dist/geo/europe.js +14 -0
  354. package/dist/geo/index.d.ts +1 -0
  355. package/dist/geo/index.js +41 -0
  356. package/dist/geo/us-states.d.ts +1 -0
  357. package/dist/geo/us-states.js +14 -0
  358. package/dist/geo/world.d.ts +1 -0
  359. package/dist/geo/world.js +14 -0
  360. package/dist/index.d.ts +1 -0
  361. package/dist/index.js +364 -0
  362. package/dist/main-YLKBTHJP.js +569 -0
  363. package/dist/mcp/server.js +1025 -0
  364. package/dist/module-SVEW5ZUE.js +137233 -0
  365. package/dist/react/bar.d.ts +1 -0
  366. package/dist/react/bar.js +81 -0
  367. package/dist/react/bartable.d.ts +1 -0
  368. package/dist/react/bartable.js +70 -0
  369. package/dist/react/box.d.ts +1 -0
  370. package/dist/react/box.js +65 -0
  371. package/dist/react/bullet.d.ts +1 -0
  372. package/dist/react/bullet.js +72 -0
  373. package/dist/react/butterfly.d.ts +1 -0
  374. package/dist/react/butterfly.js +66 -0
  375. package/dist/react/choropleth.d.ts +1 -0
  376. package/dist/react/choropleth.js +67 -0
  377. package/dist/react/cohort.d.ts +1 -0
  378. package/dist/react/cohort.js +70 -0
  379. package/dist/react/column.d.ts +1 -0
  380. package/dist/react/column.js +86 -0
  381. package/dist/react/combo.d.ts +1 -0
  382. package/dist/react/combo.js +86 -0
  383. package/dist/react/creative.d.ts +1 -0
  384. package/dist/react/creative.js +61 -0
  385. package/dist/react/diagram.d.ts +1 -0
  386. package/dist/react/diagram.js +60 -0
  387. package/dist/react/dimswitch.d.ts +1 -0
  388. package/dist/react/dimswitch.js +72 -0
  389. package/dist/react/dot.d.ts +1 -0
  390. package/dist/react/dot.js +70 -0
  391. package/dist/react/export.d.ts +1 -0
  392. package/dist/react/export.js +658 -0
  393. package/dist/react/funnel.d.ts +1 -0
  394. package/dist/react/funnel.js +63 -0
  395. package/dist/react/gantt.d.ts +1 -0
  396. package/dist/react/gantt.js +62 -0
  397. package/dist/react/grid.d.ts +1 -0
  398. package/dist/react/grid.js +67 -0
  399. package/dist/react/heatmap.d.ts +1 -0
  400. package/dist/react/heatmap.js +68 -0
  401. package/dist/react/histogram.d.ts +1 -0
  402. package/dist/react/histogram.js +86 -0
  403. package/dist/react/index.d.ts +1 -0
  404. package/dist/react/index.js +504 -0
  405. package/dist/react/kpi.d.ts +1 -0
  406. package/dist/react/kpi.js +67 -0
  407. package/dist/react/likert.d.ts +1 -0
  408. package/dist/react/likert.js +83 -0
  409. package/dist/react/line.d.ts +1 -0
  410. package/dist/react/line.js +81 -0
  411. package/dist/react/mekko.d.ts +1 -0
  412. package/dist/react/mekko.js +71 -0
  413. package/dist/react/pareto.d.ts +1 -0
  414. package/dist/react/pareto.js +90 -0
  415. package/dist/react/pie.d.ts +1 -0
  416. package/dist/react/pie.js +64 -0
  417. package/dist/react/prepare.d.ts +1 -0
  418. package/dist/react/prepare.js +278 -0
  419. package/dist/react/pvm.d.ts +1 -0
  420. package/dist/react/pvm.js +68 -0
  421. package/dist/react/pyramid.d.ts +1 -0
  422. package/dist/react/pyramid.js +67 -0
  423. package/dist/react/sankey.d.ts +1 -0
  424. package/dist/react/sankey.js +59 -0
  425. package/dist/react/scatter.d.ts +1 -0
  426. package/dist/react/scatter.js +63 -0
  427. package/dist/react/slope.d.ts +1 -0
  428. package/dist/react/slope.js +64 -0
  429. package/dist/react/sparkline.d.ts +1 -0
  430. package/dist/react/sparkline.js +59 -0
  431. package/dist/react/spec.d.ts +1 -0
  432. package/dist/react/spec.js +379 -0
  433. package/dist/react/status.d.ts +1 -0
  434. package/dist/react/status.js +64 -0
  435. package/dist/react/story.d.ts +1 -0
  436. package/dist/react/story.js +140 -0
  437. package/dist/react/table.d.ts +1 -0
  438. package/dist/react/table.js +69 -0
  439. package/dist/react/theme.d.ts +1 -0
  440. package/dist/react/theme.js +53 -0
  441. package/dist/react/tilemap.d.ts +1 -0
  442. package/dist/react/tilemap.js +66 -0
  443. package/dist/react/treemap.d.ts +1 -0
  444. package/dist/react/treemap.js +61 -0
  445. package/dist/react/variance.d.ts +1 -0
  446. package/dist/react/variance.js +65 -0
  447. package/dist/react/waffle.d.ts +1 -0
  448. package/dist/react/waffle.js +62 -0
  449. package/dist/react/waterfall.d.ts +1 -0
  450. package/dist/react/waterfall.js +68 -0
  451. package/dist/resvg-ZOVDIZTV.js +23 -0
  452. package/dist/rows.d.ts +1 -0
  453. package/dist/rows.js +23 -0
  454. package/dist/rowsModule-YVLAROIP.js +27 -0
  455. package/dist/schema-2K6C3U24.js +23 -0
  456. package/dist/schema-2KIHLTYI.js +23 -0
  457. package/dist/schema-4HY2MWZC.js +30 -0
  458. package/dist/schema-4S5CXHAO.js +24 -0
  459. package/dist/schema-5BKQV56C.js +27 -0
  460. package/dist/schema-5HA5DSYN.js +24 -0
  461. package/dist/schema-5NKJPSBD.js +23 -0
  462. package/dist/schema-65FOKNHK.js +43 -0
  463. package/dist/schema-6OHZWHUI.js +23 -0
  464. package/dist/schema-6RYJS2GM.js +24 -0
  465. package/dist/schema-6W4M3WJ4.js +23 -0
  466. package/dist/schema-7TLSFG6M.js +24 -0
  467. package/dist/schema-AMFRKUFS.js +27 -0
  468. package/dist/schema-B7CZPPB4.js +28 -0
  469. package/dist/schema-BNRNHGHQ.js +26 -0
  470. package/dist/schema-E4MRCGPZ.js +24 -0
  471. package/dist/schema-F3WYTR65.js +26 -0
  472. package/dist/schema-FA6XIHTW.js +23 -0
  473. package/dist/schema-GZNOW4LX.js +23 -0
  474. package/dist/schema-HEIDGCSL.js +23 -0
  475. package/dist/schema-JB2H6KPA.js +23 -0
  476. package/dist/schema-MPXZNWV3.js +23 -0
  477. package/dist/schema-NHNQK6XO.js +23 -0
  478. package/dist/schema-NN6UPDPW.js +23 -0
  479. package/dist/schema-O4YNAGIY.js +23 -0
  480. package/dist/schema-O7AKK232.js +29 -0
  481. package/dist/schema-OJCML6LV.js +24 -0
  482. package/dist/schema-ORTRMYI6.js +24 -0
  483. package/dist/schema-PJ6P52BC.js +23 -0
  484. package/dist/schema-RTWES6NR.js +24 -0
  485. package/dist/schema-S36SRYGO.js +24 -0
  486. package/dist/schema-S3TCLTYD.js +23 -0
  487. package/dist/schema-SWWMOLOR.js +54 -0
  488. package/dist/schema-WOSEZNKG.js +26 -0
  489. package/dist/schema-Y6KBWUUR.js +23 -0
  490. package/dist/schema-YQYTLKSW.js +23 -0
  491. package/dist/schema-ZUUUY3QS.js +33 -0
  492. package/dist/specValidation-VNWIKLHH.js +49 -0
  493. package/dist/theme.d.ts +1 -0
  494. package/dist/theme.js +24 -0
  495. package/dist/themeShapeRules-2D3KWSPQ.js +11 -0
  496. package/dist/types/core/a11y/accessibility.d.ts +43 -0
  497. package/dist/types/core/a11y/recordsShared.d.ts +44 -0
  498. package/dist/types/core/a11y/structuralRecords.d.ts +6 -0
  499. package/dist/types/core/a11y/types.d.ts +116 -0
  500. package/dist/types/core/annotate.d.ts +300 -0
  501. package/dist/types/core/annotateArms.d.ts +37 -0
  502. package/dist/types/core/annotateFields.d.ts +30 -0
  503. package/dist/types/core/annotateGapBracket.d.ts +66 -0
  504. package/dist/types/core/annotateLinks.d.ts +47 -0
  505. package/dist/types/core/annotateTargets.d.ts +90 -0
  506. package/dist/types/core/axis.d.ts +179 -0
  507. package/dist/types/core/bandSelect.d.ts +10 -0
  508. package/dist/types/core/bands.d.ts +14 -0
  509. package/dist/types/core/calendarLabels.d.ts +101 -0
  510. package/dist/types/core/charts/band/stacks.d.ts +155 -0
  511. package/dist/types/core/charts/bar/fixtures.d.ts +9 -0
  512. package/dist/types/core/charts/bar/layout.d.ts +95 -0
  513. package/dist/types/core/charts/bartable/fixtures.d.ts +4 -0
  514. package/dist/types/core/charts/bartable/types.d.ts +192 -0
  515. package/dist/types/core/charts/box/fixtures.d.ts +12 -0
  516. package/dist/types/core/charts/box/types.d.ts +110 -0
  517. package/dist/types/core/charts/bullet/fixtures.d.ts +11 -0
  518. package/dist/types/core/charts/butterfly/fixtures.d.ts +9 -0
  519. package/dist/types/core/charts/choropleth/fixtures.d.ts +3 -0
  520. package/dist/types/core/charts/choropleth/overlayTypes.d.ts +68 -0
  521. package/dist/types/core/charts/choropleth/types.d.ts +117 -0
  522. package/dist/types/core/charts/cohort/fixtures.d.ts +12 -0
  523. package/dist/types/core/charts/cohort/types.d.ts +165 -0
  524. package/dist/types/core/charts/column/anomaly.d.ts +204 -0
  525. package/dist/types/core/charts/column/fixtures.d.ts +12 -0
  526. package/dist/types/core/charts/column/layout.d.ts +116 -0
  527. package/dist/types/core/charts/column/model.d.ts +295 -0
  528. package/dist/types/core/charts/column/types.d.ts +56 -0
  529. package/dist/types/core/charts/combo/endpoints.d.ts +165 -0
  530. package/dist/types/core/charts/combo/fixtures.d.ts +12 -0
  531. package/dist/types/core/charts/combo/layout.d.ts +48 -0
  532. package/dist/types/core/charts/creative/fixtures.d.ts +4 -0
  533. package/dist/types/core/charts/creative/types.d.ts +73 -0
  534. package/dist/types/core/charts/diagram/fixtures.d.ts +3 -0
  535. package/dist/types/core/charts/dimswitch/compile.d.ts +20 -0
  536. package/dist/types/core/charts/dimswitch/fixtures.d.ts +3 -0
  537. package/dist/types/core/charts/dimswitch/types.d.ts +152 -0
  538. package/dist/types/core/charts/dot/fixtures.d.ts +11 -0
  539. package/dist/types/core/charts/funnel/fixtures.d.ts +11 -0
  540. package/dist/types/core/charts/gantt/fixtures.d.ts +9 -0
  541. package/dist/types/core/charts/gantt/layout.d.ts +63 -0
  542. package/dist/types/core/charts/grid/fixtures.d.ts +3 -0
  543. package/dist/types/core/charts/grid/metricStack.d.ts +108 -0
  544. package/dist/types/core/charts/grid/metricStackSchema.d.ts +74 -0
  545. package/dist/types/core/charts/grid/normalize.d.ts +99 -0
  546. package/dist/types/core/charts/grid/schema.d.ts +168 -0
  547. package/dist/types/core/charts/heatmap/fixtures.d.ts +11 -0
  548. package/dist/types/core/charts/histogram/fixtures.d.ts +15 -0
  549. package/dist/types/core/charts/histogram/types.d.ts +98 -0
  550. package/dist/types/core/charts/kpi/fixtures.d.ts +9 -0
  551. package/dist/types/core/charts/likert/fixtures.d.ts +11 -0
  552. package/dist/types/core/charts/likert/layout.d.ts +111 -0
  553. package/dist/types/core/charts/line/fixtures.d.ts +16 -0
  554. package/dist/types/core/charts/line/types.d.ts +6 -0
  555. package/dist/types/core/charts/mekko/fixtures.d.ts +13 -0
  556. package/dist/types/core/charts/pareto/fixtures.d.ts +5 -0
  557. package/dist/types/core/charts/pareto/layout.d.ts +68 -0
  558. package/dist/types/core/charts/pie/fixtures.d.ts +14 -0
  559. package/dist/types/core/charts/pvm/fixtures.d.ts +13 -0
  560. package/dist/types/core/charts/pvm/types.d.ts +118 -0
  561. package/dist/types/core/charts/pyramid/fixtures.d.ts +4 -0
  562. package/dist/types/core/charts/pyramid/types.d.ts +92 -0
  563. package/dist/types/core/charts/sankey/fixtures.d.ts +4 -0
  564. package/dist/types/core/charts/sankey/types.d.ts +116 -0
  565. package/dist/types/core/charts/scatter/fixtures.d.ts +12 -0
  566. package/dist/types/core/charts/scatter/types.d.ts +58 -0
  567. package/dist/types/core/charts/slope/fixtures.d.ts +13 -0
  568. package/dist/types/core/charts/sparkline/fixtures.d.ts +9 -0
  569. package/dist/types/core/charts/status/fixtures.d.ts +8 -0
  570. package/dist/types/core/charts/status/layout.d.ts +71 -0
  571. package/dist/types/core/charts/table/fitFormats.d.ts +67 -0
  572. package/dist/types/core/charts/table/fixtures.d.ts +7 -0
  573. package/dist/types/core/charts/table/resolve.d.ts +72 -0
  574. package/dist/types/core/charts/table/view.d.ts +156 -0
  575. package/dist/types/core/charts/tilemap/fixtures.d.ts +3 -0
  576. package/dist/types/core/charts/tilemap/types.d.ts +94 -0
  577. package/dist/types/core/charts/treemap/fixtures.d.ts +4 -0
  578. package/dist/types/core/charts/treemap/types.d.ts +78 -0
  579. package/dist/types/core/charts/variance/fixtures.d.ts +12 -0
  580. package/dist/types/core/charts/waffle/fixtures.d.ts +5 -0
  581. package/dist/types/core/charts/waffle/types.d.ts +117 -0
  582. package/dist/types/core/charts/waterfall/fixtures.d.ts +9 -0
  583. package/dist/types/core/claims/browser.d.ts +49 -0
  584. package/dist/types/core/claims/manifest.d.ts +22 -0
  585. package/dist/types/core/dateFormat.d.ts +39 -0
  586. package/dist/types/core/deferred.d.ts +121 -0
  587. package/dist/types/core/diagnostics/describe.d.ts +149 -0
  588. package/dist/types/core/diagnostics/jsonPatch.d.ts +36 -0
  589. package/dist/types/core/doc/bareChart.d.ts +2 -0
  590. package/dist/types/core/doc/diagnostics.d.ts +124 -0
  591. package/dist/types/core/doc/docExpand.d.ts +39 -0
  592. package/dist/types/core/doc/document.d.ts +43 -0
  593. package/dist/types/core/doc/ownedDocumentCopy.d.ts +5 -0
  594. package/dist/types/core/doc/specError.d.ts +6 -0
  595. package/dist/types/core/emptyData.d.ts +27 -0
  596. package/dist/types/core/eventLane.d.ts +208 -0
  597. package/dist/types/core/fontMetrics/index.d.ts +47 -0
  598. package/dist/types/core/fontMetrics/injected.d.ts +40 -0
  599. package/dist/types/core/fontMetrics/tableDocument.d.ts +73 -0
  600. package/dist/types/core/fontMetrics/tables.generated.d.ts +17 -0
  601. package/dist/types/core/footer.d.ts +59 -0
  602. package/dist/types/core/format.d.ts +149 -0
  603. package/dist/types/core/formatPrecision.d.ts +136 -0
  604. package/dist/types/core/formatSpec.d.ts +304 -0
  605. package/dist/types/core/frame.d.ts +583 -0
  606. package/dist/types/core/geo/packs/all.d.ts +7 -0
  607. package/dist/types/core/geo/packs/dach.d.ts +16 -0
  608. package/dist/types/core/geo/packs/de-states.d.ts +16 -0
  609. package/dist/types/core/geo/packs/eu27.d.ts +16 -0
  610. package/dist/types/core/geo/packs/europe.d.ts +16 -0
  611. package/dist/types/core/geo/packs/index.d.ts +22 -0
  612. package/dist/types/core/geo/packs/registry.d.ts +37 -0
  613. package/dist/types/core/geo/packs/us-states.d.ts +16 -0
  614. package/dist/types/core/geo/packs/world.d.ts +16 -0
  615. package/dist/types/core/geo/tiles/eu27.generated.d.ts +412 -0
  616. package/dist/types/core/geo/tiles/europe.generated.d.ts +842 -0
  617. package/dist/types/core/geo/tiles/index.d.ts +8 -0
  618. package/dist/types/core/geo/tiles/types.d.ts +36 -0
  619. package/dist/types/core/geo/tiles/us-states.generated.d.ts +952 -0
  620. package/dist/types/core/geo/tiles/world.generated.d.ts +968 -0
  621. package/dist/types/core/geo/types.d.ts +146 -0
  622. package/dist/types/core/geometry.d.ts +102 -0
  623. package/dist/types/core/grid/sharedScale.d.ts +82 -0
  624. package/dist/types/core/icons.d.ts +227 -0
  625. package/dist/types/core/inputError.d.ts +14 -0
  626. package/dist/types/core/isoDate.d.ts +2 -0
  627. package/dist/types/core/isoTime.d.ts +7 -0
  628. package/dist/types/core/label/categoryRow.d.ts +332 -0
  629. package/dist/types/core/label/occupied.d.ts +41 -0
  630. package/dist/types/core/label/ownership.d.ts +83 -0
  631. package/dist/types/core/label/solver.d.ts +384 -0
  632. package/dist/types/core/label/tickRow.d.ts +78 -0
  633. package/dist/types/core/live/types.d.ts +50 -0
  634. package/dist/types/core/normalize/shared.d.ts +56 -0
  635. package/dist/types/core/notes.d.ts +174 -0
  636. package/dist/types/core/othersShade.d.ts +9 -0
  637. package/dist/types/core/periodYears.d.ts +9 -0
  638. package/dist/types/core/polyline.d.ts +11 -0
  639. package/dist/types/core/rangeRules.d.ts +19 -0
  640. package/dist/types/core/ratioTier.d.ts +120 -0
  641. package/dist/types/core/readerStrings.d.ts +13 -0
  642. package/dist/types/core/reading.d.ts +120 -0
  643. package/dist/types/core/registry.d.ts +178 -0
  644. package/dist/types/core/repaintGeometry.d.ts +19 -0
  645. package/dist/types/core/request.d.ts +124 -0
  646. package/dist/types/core/rows.d.ts +47 -0
  647. package/dist/types/core/scale.d.ts +106 -0
  648. package/dist/types/core/schema/capability.d.ts +229 -0
  649. package/dist/types/core/schema/namedColumns.d.ts +45 -0
  650. package/dist/types/core/schema/reference.d.ts +31 -0
  651. package/dist/types/core/schema/refusals.d.ts +45 -0
  652. package/dist/types/core/schema/unknownKeys.d.ts +45 -0
  653. package/dist/types/core/seriesIdentity.d.ts +120 -0
  654. package/dist/types/core/shareRounding.d.ts +49 -0
  655. package/dist/types/core/sizing.d.ts +330 -0
  656. package/dist/types/core/staticFooter.d.ts +6 -0
  657. package/dist/types/core/story.d.ts +41 -0
  658. package/dist/types/core/structureCounts.d.ts +10 -0
  659. package/dist/types/core/svg/renderSvg.d.ts +51 -0
  660. package/dist/types/core/target.d.ts +89 -0
  661. package/dist/types/core/text.d.ts +113 -0
  662. package/dist/types/core/theme.d.ts +478 -0
  663. package/dist/types/core/themeFields.d.ts +11 -0
  664. package/dist/types/core/themeRules.d.ts +111 -0
  665. package/dist/types/core/themeShape.d.ts +87 -0
  666. package/dist/types/core/themeValidate.d.ts +15 -0
  667. package/dist/types/core/timeAxis.d.ts +106 -0
  668. package/dist/types/core/types/annotations.d.ts +227 -0
  669. package/dist/types/core/types/cell.d.ts +82 -0
  670. package/dist/types/core/types/data.d.ts +314 -0
  671. package/dist/types/core/types/diagram.d.ts +234 -0
  672. package/dist/types/core/types/index.d.ts +8 -0
  673. package/dist/types/core/types/options.d.ts +1583 -0
  674. package/dist/types/core/types/scene.d.ts +990 -0
  675. package/dist/types/core/types/sizing.d.ts +51 -0
  676. package/dist/types/core/types/table.d.ts +873 -0
  677. package/dist/types/core/types/theme.d.ts +806 -0
  678. package/dist/types/core/zoom.d.ts +106 -0
  679. package/dist/types/fixtures/index.d.ts +40 -0
  680. package/dist/types/fixtures/registry.d.ts +15 -0
  681. package/dist/types/fonts.d.ts +10 -0
  682. package/dist/types/index.d.ts +70 -0
  683. package/dist/types/react/BoardplotTheme.d.ts +9 -0
  684. package/dist/types/react/DimSwitchChart.d.ts +36 -0
  685. package/dist/types/react/ScaleGroup.d.ts +31 -0
  686. package/dist/types/react/SceneRenderer.d.ts +23 -0
  687. package/dist/types/react/SizePlaceholder.d.ts +51 -0
  688. package/dist/types/react/StoryFrame.d.ts +42 -0
  689. package/dist/types/react/TableChart.d.ts +220 -0
  690. package/dist/types/react/a11ySurface.d.ts +20 -0
  691. package/dist/types/react/barrelCharts.d.ts +1023 -0
  692. package/dist/types/react/charts/bar.d.ts +28 -0
  693. package/dist/types/react/charts/bartable.d.ts +27 -0
  694. package/dist/types/react/charts/box.d.ts +27 -0
  695. package/dist/types/react/charts/bullet.d.ts +28 -0
  696. package/dist/types/react/charts/butterfly.d.ts +28 -0
  697. package/dist/types/react/charts/choropleth.d.ts +27 -0
  698. package/dist/types/react/charts/cohort.d.ts +52 -0
  699. package/dist/types/react/charts/column.d.ts +27 -0
  700. package/dist/types/react/charts/combo.d.ts +7 -0
  701. package/dist/types/react/charts/creative.d.ts +27 -0
  702. package/dist/types/react/charts/diagram.d.ts +162 -0
  703. package/dist/types/react/charts/dimswitch.d.ts +6 -0
  704. package/dist/types/react/charts/dot.d.ts +28 -0
  705. package/dist/types/react/charts/funnel.d.ts +28 -0
  706. package/dist/types/react/charts/gantt.d.ts +28 -0
  707. package/dist/types/react/charts/grid.d.ts +29 -0
  708. package/dist/types/react/charts/heatmap.d.ts +28 -0
  709. package/dist/types/react/charts/histogram.d.ts +27 -0
  710. package/dist/types/react/charts/kpi.d.ts +28 -0
  711. package/dist/types/react/charts/likert.d.ts +27 -0
  712. package/dist/types/react/charts/line.d.ts +28 -0
  713. package/dist/types/react/charts/mekko.d.ts +28 -0
  714. package/dist/types/react/charts/pareto.d.ts +28 -0
  715. package/dist/types/react/charts/pie.d.ts +28 -0
  716. package/dist/types/react/charts/pvm.d.ts +27 -0
  717. package/dist/types/react/charts/pyramid.d.ts +27 -0
  718. package/dist/types/react/charts/sankey.d.ts +27 -0
  719. package/dist/types/react/charts/scatter.d.ts +28 -0
  720. package/dist/types/react/charts/slope.d.ts +28 -0
  721. package/dist/types/react/charts/sparkline.d.ts +28 -0
  722. package/dist/types/react/charts/status.d.ts +27 -0
  723. package/dist/types/react/charts/table.d.ts +6 -0
  724. package/dist/types/react/charts/tilemap.d.ts +27 -0
  725. package/dist/types/react/charts/treemap.d.ts +27 -0
  726. package/dist/types/react/charts/variance.d.ts +28 -0
  727. package/dist/types/react/charts/waffle.d.ts +28 -0
  728. package/dist/types/react/charts/waterfall.d.ts +28 -0
  729. package/dist/types/react/createChartComponent.d.ts +135 -0
  730. package/dist/types/react/export/clipboard.d.ts +8 -0
  731. package/dist/types/react/export/csv.d.ts +2 -0
  732. package/dist/types/react/export/frame.d.ts +35 -0
  733. package/dist/types/react/export/index.d.ts +7 -0
  734. package/dist/types/react/export/png.d.ts +14 -0
  735. package/dist/types/react/export/svg.d.ts +5 -0
  736. package/dist/types/react/export/types.d.ts +69 -0
  737. package/dist/types/react/export/useExport.d.ts +17 -0
  738. package/dist/types/react/exportLink.d.ts +49 -0
  739. package/dist/types/react/footerFrame.d.ts +25 -0
  740. package/dist/types/react/hover/dataTable.d.ts +13 -0
  741. package/dist/types/react/hover/engine.d.ts +210 -0
  742. package/dist/types/react/hover/keyboard.d.ts +44 -0
  743. package/dist/types/react/hover/labelCard.d.ts +170 -0
  744. package/dist/types/react/hover/placement.d.ts +49 -0
  745. package/dist/types/react/index.d.ts +16 -0
  746. package/dist/types/react/parseChartSpec.d.ts +16 -0
  747. package/dist/types/react/prepare.d.ts +32 -0
  748. package/dist/types/react/prepared.d.ts +53 -0
  749. package/dist/types/react/preparedTable.d.ts +15 -0
  750. package/dist/types/react/rowsInput.d.ts +55 -0
  751. package/dist/types/react/rowsModule.d.ts +18 -0
  752. package/dist/types/react/rowsStore.d.ts +50 -0
  753. package/dist/types/react/scale-group.d.ts +2 -0
  754. package/dist/types/react/scaleGroupContext.d.ts +22 -0
  755. package/dist/types/react/scenePaint.d.ts +10 -0
  756. package/dist/types/react/scrollState.d.ts +26 -0
  757. package/dist/types/react/spec.d.ts +82 -0
  758. package/dist/types/react/specValidation.d.ts +45 -0
  759. package/dist/types/react/story.d.ts +15 -0
  760. package/dist/types/react/theme.d.ts +9 -0
  761. package/dist/types/react/themeContext.d.ts +44 -0
  762. package/dist/types/react/useChartLayout.d.ts +22 -0
  763. package/dist/types/react/useContainerSize.d.ts +57 -0
  764. package/dist/types/react/useHover.d.ts +100 -0
  765. package/dist/types/react/useZoom.d.ts +50 -0
  766. package/dist/types/rows.d.ts +63 -0
  767. package/dist/types/tableLooks.d.ts +6 -0
  768. package/dist/types/theme.d.ts +3 -0
  769. package/dist/types/validate.d.ts +3 -0
  770. package/dist/validate.d.ts +1 -0
  771. package/dist/validate.js +223 -0
  772. package/docs/FONTS.md +68 -0
  773. package/docs/TELEMETRY.md +94 -0
  774. package/docs/manual.md +850 -0
  775. package/docs/reference/bar.md +222 -0
  776. package/docs/reference/bartable.md +143 -0
  777. package/docs/reference/box.md +93 -0
  778. package/docs/reference/bullet.md +118 -0
  779. package/docs/reference/butterfly.md +117 -0
  780. package/docs/reference/choropleth.md +148 -0
  781. package/docs/reference/cohort.md +149 -0
  782. package/docs/reference/column.md +275 -0
  783. package/docs/reference/combo.md +219 -0
  784. package/docs/reference/creative.md +147 -0
  785. package/docs/reference/diagram.md +191 -0
  786. package/docs/reference/dimswitch.md +1395 -0
  787. package/docs/reference/dot.md +117 -0
  788. package/docs/reference/fixtures.md +1089 -0
  789. package/docs/reference/funnel.md +121 -0
  790. package/docs/reference/gantt.md +138 -0
  791. package/docs/reference/grid.md +302 -0
  792. package/docs/reference/heatmap.md +127 -0
  793. package/docs/reference/histogram.md +77 -0
  794. package/docs/reference/kpi.md +115 -0
  795. package/docs/reference/likert.md +113 -0
  796. package/docs/reference/line.md +436 -0
  797. package/docs/reference/mekko.md +114 -0
  798. package/docs/reference/options.md +313 -0
  799. package/docs/reference/pareto.md +102 -0
  800. package/docs/reference/pie.md +114 -0
  801. package/docs/reference/pvm.md +114 -0
  802. package/docs/reference/pyramid.md +99 -0
  803. package/docs/reference/react.md +706 -0
  804. package/docs/reference/reading.md +28 -0
  805. package/docs/reference/sankey.md +110 -0
  806. package/docs/reference/scatter.md +211 -0
  807. package/docs/reference/slope.md +126 -0
  808. package/docs/reference/sparkline.md +74 -0
  809. package/docs/reference/status.md +107 -0
  810. package/docs/reference/table.md +673 -0
  811. package/docs/reference/theme.md +361 -0
  812. package/docs/reference/tilemap.md +121 -0
  813. package/docs/reference/treemap.md +86 -0
  814. package/docs/reference/variance.md +126 -0
  815. package/docs/reference/waffle.md +106 -0
  816. package/docs/reference/waterfall.md +164 -0
  817. package/llms.txt +57 -0
  818. package/package.json +437 -4
@@ -0,0 +1,836 @@
1
+ import {
2
+ liftOrFallback
3
+ } from "./chunk-XN4ARQ2W.js";
4
+ import {
5
+ fieldHeadFont,
6
+ fieldHeadText,
7
+ headInk,
8
+ headRule,
9
+ totalGround,
10
+ totalRule
11
+ } from "./chunk-QTZVVZ2A.js";
12
+ import {
13
+ fixedBarRow
14
+ } from "./chunk-VABRPZVC.js";
15
+ import {
16
+ roundingUnavailable,
17
+ sumConsistentShares
18
+ } from "./chunk-24BHMKDD.js";
19
+ import {
20
+ accumulateStack
21
+ } from "./chunk-M4EUXOLU.js";
22
+ import {
23
+ warnIncompleteComposition
24
+ } from "./chunk-5LGSRWFC.js";
25
+ import {
26
+ rowLabelBand
27
+ } from "./chunk-X4YNDLVA.js";
28
+ import {
29
+ fittedLabel
30
+ } from "./chunk-ZQF34VPS.js";
31
+ import {
32
+ chartPalette
33
+ } from "./chunk-3QWZAEW5.js";
34
+ import {
35
+ yearSpanFromLabels
36
+ } from "./chunk-L3JWM7FR.js";
37
+ import {
38
+ rowDrivenHeight
39
+ } from "./chunk-GZTNTHSW.js";
40
+ import {
41
+ structureCount
42
+ } from "./chunk-LFX7W4B7.js";
43
+ import {
44
+ tableRuleInk
45
+ } from "./chunk-Z2MGTKDR.js";
46
+ import {
47
+ CARD_CLASS_WIDTH,
48
+ calendarCategories,
49
+ chartSizing,
50
+ heightOmitted,
51
+ rowSizing
52
+ } from "./chunk-RL3NUWMY.js";
53
+ import {
54
+ PRIORITY,
55
+ authoredNotes,
56
+ createOccupiedIndex,
57
+ fitText,
58
+ frameTextOptions,
59
+ isNumberAlone,
60
+ labelCtx,
61
+ labelsToNodes,
62
+ legendRequired,
63
+ lineBox,
64
+ moreListedText,
65
+ normalizeLegendOption,
66
+ solveFrame,
67
+ solveLabels
68
+ } from "./chunk-SS42FJVN.js";
69
+ import {
70
+ disclosureNote,
71
+ footerType
72
+ } from "./chunk-BPKXEMRE.js";
73
+ import {
74
+ roundedNumber,
75
+ seriesRasterFormatter
76
+ } from "./chunk-RGZGLKFB.js";
77
+ import {
78
+ cagr,
79
+ chartStrings,
80
+ formatAutomaticNumber,
81
+ formatAutomaticPercent,
82
+ formatShare,
83
+ numberRange,
84
+ printedShare,
85
+ shareSetFormatter
86
+ } from "./chunk-53OYF4ZT.js";
87
+ import {
88
+ canvasMargin,
89
+ dashToken,
90
+ markRolePaint,
91
+ paintColor,
92
+ panelTypeClass,
93
+ rampSlots,
94
+ resolveTheme,
95
+ seriesPaint,
96
+ strokeToken,
97
+ tableEmphasis,
98
+ textScaleOf,
99
+ themeForWidth,
100
+ withSegmentSeams
101
+ } from "./chunk-CWDHCSL2.js";
102
+ import {
103
+ NormalizeError,
104
+ TARGET_SIZE,
105
+ accessibleTitle,
106
+ resolveSize,
107
+ resolveSubtitle
108
+ } from "./chunk-SGD3ZHID.js";
109
+ import {
110
+ maxOf,
111
+ minOf,
112
+ pushAll
113
+ } from "./chunk-WYJEOMNY.js";
114
+ import {
115
+ defaultMeasurer,
116
+ splitNameBreaks
117
+ } from "./chunk-AG2CJ4JY.js";
118
+
119
+ // src/core/strings/bartable.ts
120
+ var EN = {
121
+ // reader-facing wording linked only by its consumers.
122
+ bartableTitle: "Bar table: {v1} rows",
123
+ bartableDescStart: "Table of {v1} rows{v2} and ",
124
+ tableColumnsClause: " with the columns {v1}",
125
+ barPanelOne: "one stacked-bar panel",
126
+ barPanels: "{v1} stacked-bar panels",
127
+ sharedScale: "on one shared scale",
128
+ ownScale: "each on its own scale",
129
+ cascadeDesc: "Each panel is a cascade: a row's bar starts where the row above ended, on a light track over the panel total{v1}{v2}{v3}. ",
130
+ shareColumnClause: ", with a share column beside it",
131
+ combinedShareBracket: " and a bracket with the combined share of {v1}",
132
+ lastColumnClause: "; the last column is {v1}",
133
+ segmentsSentence: "Segments: {v1}. {v2}",
134
+ cascadeValueLabels: "Each bar prints its value inside or beside it.",
135
+ barEndTotalRange: "The label at the end of each bar is the row total or its range.",
136
+ rangeBarDesc: " A bar with a range fills its segments to the low end and runs a light outlined extension to the high end.",
137
+ tableTotalRow: " A {v1} row closes the table.",
138
+ bartableBlankHeading: "{v1} marks a sum left blank because a part is missing",
139
+ bartableBlankTotal: "; the Total of that panel with it",
140
+ bartableMissingHeading: "{v1} marks a missing value",
141
+ cellNotApplicable: "n/a",
142
+ shareHeading: "Share",
143
+ shareChangeSpan: "{v1} share change, pp",
144
+ combinedShareZero: "share not defined: total is zero",
145
+ combinedShareNote: "{v1}: {v2} of {v3}{v4} of {v5} ({v6}).",
146
+ combinedShareRangeNote: "{v1}: {v2} of {v3}{v4} of {v5} at the low end ({v6}); {v7} of {v8}{v4} at the high end ({v9}).",
147
+ // the note names the shaded rows; the compact cascade names its combined row.
148
+ combinedShadedLead: "Shaded rows, {v1}",
149
+ combinedRowLabel: "Top {v1} combined",
150
+ sliverKnown: " ({v1} in the parts drawn)",
151
+ sliverNote: "Too short to compare on the shared{v1} scale, which runs to {v2}"
152
+ }, DE = {
153
+ // reader-facing wording linked only by its consumers.
154
+ bartableTitle: "Balkentabelle: {v1} {v1|Zeile|Zeilen}",
155
+ bartableDescStart: "Tabelle mit {v1} {v1|Zeile|Zeilen}{v2} und ",
156
+ tableColumnsClause: " mit den Spalten {v1}",
157
+ barPanelOne: "einem Feld mit gestapelten Balken",
158
+ barPanels: "{v1} {v1|Feld|Feldern} mit gestapelten Balken",
159
+ sharedScale: "auf einer gemeinsamen Skala",
160
+ ownScale: "jeweils auf eigener Skala",
161
+ cascadeDesc: "Jedes Feld ist eine Kaskade: Der Balken jeder Zeile beginnt am Ende der Zeile dar\xFCber, auf einer hellen Spur \xFCber der Summe des Felds{v1}{v2}{v3}. ",
162
+ shareColumnClause: ", mit einer Anteilsspalte daneben",
163
+ combinedShareBracket: " und einer Klammer mit dem gemeinsamen Anteil von {v1}",
164
+ lastColumnClause: "; letzte Spalte: {v1}",
165
+ segmentsSentence: "Segmente: {v1}. {v2}",
166
+ cascadeValueLabels: "Jeder Balken zeigt seinen Wert innen oder daneben.",
167
+ barEndTotalRange: "Die Beschriftung am Balkenende zeigt die Zeilensumme oder ihre Spanne.",
168
+ rangeBarDesc: " Ein Balken mit Spanne f\xFCllt seine Segmente bis zur unteren Grenze. Eine helle Erweiterung mit Umriss reicht bis zur oberen Grenze.",
169
+ tableTotalRow: " Eine Zeile {v1} schlie\xDFt die Tabelle ab.",
170
+ bartableBlankHeading: "{v1} zeigt eine leere Summe, weil ein Teil fehlt",
171
+ bartableBlankTotal: "; ebenso die Summe dieses Felds",
172
+ bartableMissingHeading: "{v1} zeigt einen fehlenden Wert",
173
+ cellNotApplicable: "k. A.",
174
+ shareHeading: "Anteil",
175
+ shareChangeSpan: "{v1} Anteils\xE4nderung, pp",
176
+ combinedShareZero: "Anteil nicht definiert: Summe ist null",
177
+ combinedShareNote: "{v1}: {v2} von {v3}{v4} in {v5} ({v6}).",
178
+ combinedShareRangeNote: "{v1}: {v2} von {v3}{v4} in {v5} an der unteren Grenze ({v6}); {v7} von {v8}{v4} an der oberen Grenze ({v9}).",
179
+ // the note names the shaded rows; the compact cascade names its combined row.
180
+ combinedShadedLead: "Schattierte Zeilen, {v1}",
181
+ combinedRowLabel: "Top {v1} zusammen",
182
+ sliverKnown: " ({v1} in den gezeichneten Teilen)",
183
+ sliverNote: "Zu kurz zum Vergleich auf der gemeinsamen Skala{v1} bis {v2}"
184
+ }, { chartString } = chartStrings(EN, DE);
185
+
186
+ // src/core/charts/bartable/cascade.ts
187
+ function deriveCascade(rows, panels, opts) {
188
+ let { locale } = opts, base = panels.map((panel) => {
189
+ let starts = [], at = 0;
190
+ for (let value of panel.values)
191
+ starts.push(at), at += value;
192
+ if (!(at > 0))
193
+ throw new NormalizeError(
194
+ "bartable-cascade-zero-total",
195
+ `data.panels[${panels.indexOf(panel)}]`,
196
+ `cascade splits each panel's total, and panel '${panel.id}' sums to zero`,
197
+ "give the panel nonzero values or drop it"
198
+ );
199
+ return { starts, total: at, shares: panel.values.map((value) => value / at * 100) };
200
+ }), { decimals, format } = shareSetFormatter(base.flatMap((panel) => panel.shares), locale), rounded = base.map((panel) => opts.sumConsistent ? sumConsistentShares(panel.shares, locale, void 0, decimals) : null), adjustments = [], warnings = [];
201
+ rounded.forEach((own, p) => {
202
+ own?.warning && warnings.push(roundingUnavailable(panels[p].label, own.warning));
203
+ });
204
+ let printed = base.map((panel, p) => panel.shares.map((share, r) => {
205
+ let own = rounded[p];
206
+ return own ? (own.moved[r] && adjustments.push({ whole: panels[p].label, part: rows[r].label, share: Math.round(share * 1e4) / 1e4, nearest: format(share), printed: own.texts[r] }), { text: own.texts[r], value: own.values[r] }) : { text: format(share), value: printedShare(share, decimals) };
207
+ })), result = {
208
+ panels: base.map((panel, p) => {
209
+ let combined = opts.combined && opts.combined.length > 0 ? opts.sumConsistent ? opts.combined.reduce((sum, r) => sum + printed[p][r].value, 0) : opts.combined.reduce((sum, r) => sum + panel.shares[r], 0) : void 0;
210
+ return {
211
+ ...panel,
212
+ shareTexts: printed[p].map((entry) => entry.text),
213
+ ...combined === void 0 ? {} : { combined: { value: combined, text: formatAutomaticPercent(combined, decimals, !1, locale) } }
214
+ };
215
+ }),
216
+ adjustments,
217
+ warnings
218
+ }, growth = opts.growth, automatic = opts.lift === "none" ? !1 : opts.lift === "compact" ? "compact" : !0;
219
+ if (growth && panels.length >= 2) {
220
+ let first = panels[0], last = panels[panels.length - 1], span = `${first.label}\u2013${last.label}`;
221
+ if (growth.measure === "cagr") {
222
+ let years = growth.years ?? yearSpanFromLabels(first.label, last.label);
223
+ if (years === null || !(years > 0))
224
+ throw new NormalizeError(
225
+ "bartable-cascade-growth-years",
226
+ "options.cascade.growth.years",
227
+ `a CAGR needs the years from '${first.label}' to '${last.label}', and the panel labels name no year`,
228
+ 'label the panels with years ("2019", "FY24") or set cascade.growth.years'
229
+ );
230
+ let values = [...first.values.map((value, r) => cagr(value, last.values[r], years)), cagr(base[0].total, base[base.length - 1].total, years)];
231
+ result.growth = {
232
+ head: growth.label ?? `${span} CAGR, %`,
233
+ values,
234
+ texts: values.map((value) => value === null ? "\u2013" : formatAutomaticNumber(value, { decimals: 1, locale, automatic }))
235
+ };
236
+ } else {
237
+ let lastPrinted = printed[printed.length - 1], values = [...printed[0].map((entry, r) => Number((lastPrinted[r].value - entry.value).toFixed(decimals))), null];
238
+ result.growth = {
239
+ head: growth.label ?? chartString({ locale: { language: locale } }, "shareChangeSpan", { v1: span }),
240
+ values,
241
+ texts: values.map((value) => value === null ? "" : formatAutomaticNumber(value, { decimals, signed: !0, locale, automatic }))
242
+ };
243
+ }
244
+ }
245
+ return result;
246
+ }
247
+
248
+ // src/core/charts/bartable/layout.ts
249
+ var LABEL_GAP = 12, CELL_AIR = 12, PANEL_GAP = 16, END_GAP = 6, MIN_RUN = 40, PREFERRED_RUN = 48, ROW_PITCH = 28, BAR_H = 14, HEAD_GAP = 6, TOTAL_GAP = 6, RANGE_KEY = "__range", RANGE_FILL = { token: "neutralLight" }, RANGE_STROKE = { token: "neutral" }, SHARE_GAP = 8, BRACKET_GAP = 6, BRACKET_ARM = 5, BRACKET_TEXT_GAP = 4, MIN_TRACK = 56, TRACK_FILL = { token: "neutralLight" }, BLOCK_GAP = 12, MIN_COMPACT_LABEL = 48, VALUE_PAD = 3, TOTAL_PAD = 6, ROW_GAP = 4, THIN_BAR = 7, KEY_W = 14, KEY_GAP = 6, COMBINED_PAD = 4, RESIDUAL_FILL = markRolePaint("neutral", !0);
250
+ function pinResidual(data) {
251
+ let order = data.categories.map((_, r) => r).sort((a, b) => +!!data.categories[a].residual - +!!data.categories[b].residual || a - b);
252
+ if (order.every((r, i) => r === i)) return data;
253
+ let pick = (values) => order.map((r) => values[r]);
254
+ return {
255
+ ...data,
256
+ categories: pick(data.categories),
257
+ ...data.columns ? { columns: data.columns.map((column) => ({ ...column, values: pick(column.values) })) } : {},
258
+ panels: data.panels.map((panel) => ({
259
+ ...panel,
260
+ values: Object.fromEntries(Object.entries(panel.values).map(([key, values]) => [key, pick(values)])),
261
+ ...panel.ends ? { ends: pick(panel.ends) } : {}
262
+ }))
263
+ };
264
+ }
265
+ function splitStates(data) {
266
+ let states = /* @__PURE__ */ new WeakMap(), plain = (values) => {
267
+ if (!values.some((value) => value !== null && typeof value == "object")) return values;
268
+ let out = values.map((value) => typeof value == "number" ? value : null);
269
+ return states.set(out, values.map((value) => typeof value == "object" && value !== null ? value.state : void 0)), out;
270
+ }, { columns, ...rest } = data;
271
+ return {
272
+ data: {
273
+ ...rest,
274
+ ...columns ? { columns: columns.map((column) => ({ ...column, values: plain(column.values) })) } : {},
275
+ panels: data.panels.map((panel) => ({ ...panel, values: Object.fromEntries(Object.entries(panel.values).map(([id, values]) => [id, plain(values)])) }))
276
+ },
277
+ states
278
+ };
279
+ }
280
+ function checkCascade(data, growth) {
281
+ let refuse = (path, message, suggest) => {
282
+ throw new NormalizeError("bartable-cascade", path, message, suggest);
283
+ };
284
+ growth && data.panels.length < 2 && refuse("options.cascade.growth", "the growth column compares the first panel with the last, and the table has one panel", "add a second panel, or drop options.cascade.growth"), [...(data.columns ?? []).map((column, i) => ({ id: column.id, path: `data.columns[${i}].id` })), ...data.panels.map((panel, i) => ({ id: panel.id, path: `data.panels[${i}].id` }))].forEach(({ id, path }) => {
285
+ (id === "growth" || id.startsWith("share:")) && refuse(path, `cascade names its own columns 'growth' and 'share:<panel>', and '${id}' takes one of those names`, "rename the column or panel");
286
+ }), data.series.length !== 1 && refuse(
287
+ "data.series",
288
+ `cascade draws one part of the panel total per row, and the table has ${data.series.length} segments; a split inside a cascade step has no baseline to compare its parts by length`,
289
+ "keep one entry in data.series, or set variant 'panels' to stack the segments from zero"
290
+ ), data.panels.forEach((panel, p) => {
291
+ panel.ends && refuse(`data.panels[${p}].ends`, "cascade ends every row where the next starts, so a row has no range", "drop ends, or set variant 'panels'"), panel.aggregate === "none" && refuse(`data.panels[${p}].aggregate`, "cascade splits the panel total, and aggregate 'none' says the rows do not add up", "drop aggregate 'none', or set variant 'panels'");
292
+ let missing = (panel.values[data.series[0].id] ?? []).findIndex((value) => value === null);
293
+ missing >= 0 && refuse(`data.panels[${p}].values.${data.series[0].id}[${missing}]`, "cascade starts each row where the row above ended, so a missing value leaves every row below it without a start", "give the row a value, or drop the row");
294
+ });
295
+ }
296
+ var SLIVER_NOTE = /* @__PURE__ */ Symbol("bartableSliverNote"), SLIVER_PX = 6, HIDDEN_PART_PX = 2;
297
+ function combinedLabel(label, names, options) {
298
+ return label ?? names.reduce((text, name, i, all) => i === 0 ? name : `${text}${i === all.length - 1 ? ` ${chartString(options, "and")} ` : ", "}${name}`, "");
299
+ }
300
+ function twoLineNote(lead, items, tail, font, width, measure, options) {
301
+ let text = (shown, rest) => `${lead}: ${[...shown, ...rest > 0 ? [moreListedText(rest, options)] : []].join(", ")}${tail}.`, fits = (candidate) => fitText(candidate, font, width, 2, measure).title === void 0;
302
+ for (let n = items.length; n > 1; n--) if (fits(text(items.slice(0, n), items.length - n))) return text(items.slice(0, n), items.length - n);
303
+ return text(items.slice(0, 1), items.length - 1);
304
+ }
305
+ function combinedShareNotes(options, rows, panels, locale) {
306
+ let combined = options.combinedShare;
307
+ if (!combined) return [];
308
+ let picked = combined.rows.map((id, i) => {
309
+ if (combined.rows.indexOf(id) !== i)
310
+ throw new NormalizeError(
311
+ "bartable-combined-share-row",
312
+ `options.combinedShare.rows[${i}]`,
313
+ `combinedShare names row '${id}' twice, which counts it twice; name each row once`,
314
+ "drop the repeated row id"
315
+ );
316
+ let r = rows.findIndex((row) => row.id === id);
317
+ if (r < 0)
318
+ throw new NormalizeError(
319
+ "bartable-combined-share-row",
320
+ `options.combinedShare.rows[${i}]`,
321
+ `combinedShare names row '${id}', which the table does not have`,
322
+ `use one of the row ids: ${rows.map((row) => row.id).join(", ")}`
323
+ );
324
+ return r;
325
+ }), label = chartString(options, "combinedShadedLead", { v1: combinedLabel(combined.label, picked.map((r) => rows[r].label), options) }), pct = (part, whole) => whole === 0 ? chartString(options, "combinedShareZero") : formatShare(part / whole * 100, locale);
326
+ return panels.flatMap((entry) => {
327
+ if (entry.panel.aggregate === "none" || entry.rowSums.some((sum) => sum === null)) return [];
328
+ let unit = entry.panel.unit ? ` ${entry.panel.unit}` : "", at = (end, r) => entry.ranges[r]?.[end] ?? entry.rowSums[r], sumAt = (end, of) => of.reduce((sum, r) => sum + at(end, r), 0), all = rows.map((_, r) => r), name = entry.panel.label ?? entry.panel.id;
329
+ if (!entry.ranges.some(Boolean)) {
330
+ let part = sumAt("low", picked), whole = sumAt("low", all);
331
+ return [disclosureNote(chartString(options, "combinedShareNote", { v1: label, v2: entry.fmt(part), v3: entry.fmt(whole), v4: unit, v5: name, v6: pct(part, whole) }))];
332
+ }
333
+ let [lowPart, lowWhole, highPart, highWhole] = [sumAt("low", picked), sumAt("low", all), sumAt("high", picked), sumAt("high", all)];
334
+ return [disclosureNote(chartString(options, "combinedShareRangeNote", { v1: label, v2: entry.fmt(lowPart), v3: entry.fmt(lowWhole), v4: unit, v5: name, v6: pct(lowPart, lowWhole), v7: entry.fmt(highPart), v8: entry.fmt(highWhole), v9: pct(highPart, highWhole) }))];
335
+ });
336
+ }
337
+ var CASCADE_LIFT = /* @__PURE__ */ Symbol("bartableCascadeLift");
338
+ function layoutBarTable(authored, options = {}) {
339
+ if (options.variant !== "cascade" || options[CASCADE_LIFT] !== void 0) return layoutBarTableOnce(authored, options);
340
+ let fixedWidth = options[TARGET_SIZE]?.fixed.width !== !1, misses = (geometry) => fixedWidth && geometry.sizing !== void 0 && geometry.size.width < geometry.sizing.minWidth;
341
+ return liftOrFallback(
342
+ (mode) => layoutBarTableOnce(authored, { ...options, [CASCADE_LIFT]: mode }),
343
+ (lifted, plain) => !misses(plain) && misses(lifted)
344
+ );
345
+ }
346
+ function layoutBarTableOnce(authored, options) {
347
+ let { data, states } = splitStates(pinResidual(authored));
348
+ if (options.cascade !== void 0 && options.variant !== "cascade")
349
+ throw new NormalizeError("bartable-cascade", "options.cascade", "cascade sets the share cascade, and this table draws variant 'panels'", "set variant 'cascade', or drop cascade");
350
+ let cascadeOptions = options.variant === "cascade" ? options.cascade ?? {} : void 0;
351
+ if (cascadeOptions && checkCascade(data, cascadeOptions.growth), options.rounding === "sum-consistent" && cascadeOptions?.share === !1 && !options.combinedShare && cascadeOptions.growth?.measure !== "share-change")
352
+ throw new NormalizeError("bartable-rounding", "options.rounding", "rounding 'sum-consistent' sets how the share columns print, and this table prints none", "set cascade.share on, or drop options.rounding");
353
+ if (options.rounding === "sum-consistent" && !cascadeOptions)
354
+ throw new NormalizeError("bartable-rounding", "options.rounding", "rounding 'sum-consistent' sets how the cascade share columns print, and this table has no cascade", "set variant 'cascade', or drop options.rounding");
355
+ let sharedScale = options.sharedScale ?? cascadeOptions !== void 0;
356
+ if (sharedScale && data.panels.some((panel) => panel.weight !== void 0))
357
+ throw new NormalizeError("bartable-panel-weight", "data.panels", "under sharedScale each panel is as wide as its longest bar on the one scale, so a weight has nothing to set", "drop the weights, or set sharedScale false");
358
+ let warnings = [];
359
+ options.rounding === "nearest" && (!cascadeOptions || cascadeOptions.share === !1 && !options.combinedShare && cascadeOptions.growth?.measure !== "share-change") && warnings.push({
360
+ code: "bartable-rounding-ignored",
361
+ severity: "warn",
362
+ message: "rounding has no effect because this chart has no cascade share calculation.",
363
+ suggest: "Set variant: 'cascade' with cascade.share: true, or remove rounding.",
364
+ field: ["options", "rounding"],
365
+ fix: [{ op: "remove", path: "/options/rounding" }]
366
+ });
367
+ let size = resolveSize(options.size), theme = themeForWidth(resolveTheme(options.theme), panelTypeClass(options) ?? size.width);
368
+ chartPalette(theme, options.palette, warnings);
369
+ let measure = options.measure ?? defaultMeasurer, locale = options.locale?.language, glyph = theme.table?.glyphs?.missing ?? "\u2013", stateGlyph = {
370
+ none: glyph,
371
+ na: theme.table?.glyphs?.na ?? options.strings?.notApplicable ?? chartString(options, "cellNotApplicable"),
372
+ nm: theme.table?.glyphs?.nm ?? "n.m."
373
+ }, range = numberRange, rows = data.categories.map((row) => ({ id: row.id, label: row.label ?? row.id })), series = data.series, columns = data.columns ?? [], showTotal = options.total !== !1, totalLabel = options.strings?.total ?? "Total", incomplete = /* @__PURE__ */ new Set(), single = series.length === 1, blankState = (panel, r) => {
374
+ let found = series.filter((s) => panel.values[s.id]?.[r] === null).map((s) => states.get(panel.values[s.id])?.[r]);
375
+ return found.every((state) => state === found[0]) ? found[0] : void 0;
376
+ }, panels = data.panels.map((panel) => {
377
+ let stacks = rows.map((_, r) => accumulateStack(series.map((s) => panel.values[s.id]?.[r] ?? null))), rowSums = stacks.map((stack, r) => stack.segments.some((segment) => segment === null) ? (single || incomplete.add(r), null) : stack.total), ends = panel.ends ?? [], ranges = rowSums.map((sum, r) => sum === null ? void 0 : ends[r] ?? void 0), stackTotal = rowSums.every((sum) => sum !== null) ? rowSums.reduce((sum, value) => sum + value, 0) : null, sumOf = (end) => rowSums.reduce((sum, value, r) => sum + (ranges[r]?.[end] ?? value), 0), total = panel.aggregate === "none" ? void 0 : stackTotal === null ? null : ranges.some(Boolean) ? { low: sumOf("low"), high: sumOf("high") } : stackTotal, raster = [
378
+ ...rowSums.flatMap((sum, r) => {
379
+ let end = ranges[r];
380
+ return end ? [end.low, end.high] : [sum];
381
+ }),
382
+ ...total == null ? [] : typeof total == "number" ? [total] : [total.low, total.high]
383
+ ], { fmt, spec } = seriesRasterFormatter(panel.format ?? options.format, raster, locale, panel.unit, options.target), endTexts = rowSums.map((sum, r) => {
384
+ let end = ranges[r];
385
+ return sum === null ? stateGlyph[blankState(panel, r) ?? "none"] : end ? range(fmt(end.low), fmt(end.high)) : fmt(sum);
386
+ }), totalText = total === void 0 ? void 0 : total === null ? glyph : typeof total == "number" ? fmt(total) : range(fmt(total.low), fmt(total.high)), label2 = panel.label ?? panel.id, repeatsSubtitle = data.panels.length === 1 && panel.unit !== void 0 && label2.trim().toLowerCase() === (resolveSubtitle(options.subtitle)?.measure ?? "").trim().toLowerCase();
387
+ return {
388
+ panel,
389
+ stacks,
390
+ rowSums,
391
+ ranges,
392
+ stackTotal,
393
+ total,
394
+ fmt,
395
+ spec,
396
+ endTexts,
397
+ totalText,
398
+ head: repeatsSubtitle ? panel.unit : panel.unit ? `${label2}, ${panel.unit}` : label2,
399
+ // A period panel (cascade, or a year alone) heads with a category value and keeps its case and face;
400
+ // a unit alone keeps its case.
401
+ fieldHead: !repeatsSubtitle && cascadeOptions === void 0 && !isNumberAlone(label2),
402
+ unitHead: repeatsSubtitle,
403
+ max: Math.max(0, maxOf(stacks.map((stack, r) => ranges[r]?.high ?? stack.positive)))
404
+ };
405
+ }), numberColumns = columns.map((column) => {
406
+ let fmt = seriesRasterFormatter(column.format, column.values, locale, void 0, options.target).fmt, summed = column.aggregate !== "none", missing = column.values.some((value) => value === null);
407
+ summed && missing && column.values.forEach((value, r) => value === null && incomplete.add(r));
408
+ let total = summed && !missing ? column.values.reduce((sum, value) => sum + value, 0) : null;
409
+ return {
410
+ column,
411
+ texts: column.values.map((value, r) => value === null ? stateGlyph[states.get(column.values)?.[r] ?? "none"] : fmt(value)),
412
+ total,
413
+ totalText: summed ? total === null ? glyph : fmt(total) : void 0
414
+ };
415
+ }), blankEntries = panels.flatMap((entry) => entry.rowSums.flatMap((sum, r) => {
416
+ if (sum !== null || blankState(entry.panel, r)) return [];
417
+ let missing = series.filter((s) => (entry.panel.values[s.id]?.[r] ?? null) === null).map((s) => s.label ?? s.id), where = panels.length > 1 ? `${rows[r].label} in ${entry.panel.label ?? entry.panel.id}` : rows[r].label;
418
+ return [{ where, detail: `${where} (no ${missing.join(" or ")})` }];
419
+ })), blanks = blankEntries.map((entry) => entry.where);
420
+ single && blanks.length > 0 && warnings.push({ code: "missing-value", severity: "info", message: `missing value (null) in ${blanks.join(", ")}: prints ${glyph} at the end of that bar` }), warnIncompleteComposition(
421
+ warnings,
422
+ [...incomplete].sort((a, b) => a - b).map((r) => rows[r].label),
423
+ `a missing part prints ${glyph} at the end of that bar${showTotal ? " and in the Total of its panel or column" : ""}${blankEntries.length > 0 ? `; missing: ${blankEntries.map((entry) => entry.detail).join(", ")}` : ""}`
424
+ );
425
+ let shareNotes = combinedShareNotes(options, rows, panels, locale), bracketRows;
426
+ if (cascadeOptions && options.combinedShare && (bracketRows = options.combinedShare.rows.map((id) => rows.findIndex((row) => row.id === id)).sort((a, b) => a - b), bracketRows.some((r, i) => i > 0 && r !== bracketRows[i - 1] + 1)))
427
+ throw new NormalizeError(
428
+ "bartable-combined-share-row",
429
+ "options.combinedShare.rows",
430
+ "under cascade the combined share prints beside a bracket over its rows, and these rows do not stand together",
431
+ "name rows that follow one another, such as the first five"
432
+ );
433
+ let bracketLabel = bracketRows ? combinedLabel(options.combinedShare.label, bracketRows.map((r) => rows[r].label), options) : void 0, comboRowLabel = bracketRows && options.combinedShare.label === void 0 && bracketRows[0] === 0 ? chartString(options, "combinedRowLabel", { v1: bracketRows.length }) : bracketLabel, cascade = cascadeOptions ? deriveCascade(rows, data.panels.map((panel) => ({ id: panel.id, label: panel.label ?? panel.id, values: panel.values[series[0].id].map((value) => value) })), {
434
+ ...bracketRows ? { combined: bracketRows } : {},
435
+ ...cascadeOptions.growth ? { growth: cascadeOptions.growth } : {},
436
+ // Under cascade the shares add up to 100% unless the author asks for nearest.
437
+ sumConsistent: (options.rounding ?? "sum-consistent") === "sum-consistent",
438
+ ...locale ? { locale } : {},
439
+ lift: options[CASCADE_LIFT] ?? "full"
440
+ }) : void 0;
441
+ cascade && pushAll(warnings, cascade.warnings);
442
+ let showShare = cascadeOptions !== void 0 && cascadeOptions.share !== !1, margin = { ...canvasMargin(theme, size.width), ...options.margin }, noteFont = { family: theme.type.family, ...footerType(theme.type.footnote, options.target, textScaleOf(options)) }, noteW = Math.max(1, size.width - (margin.left ?? 0) - (margin.right ?? 0)), derivedNotes = [
443
+ // Under cascade the bracket prints the combined share.
444
+ ...cascade ? [] : shareNotes,
445
+ ...blanks.length > 0 ? [disclosureNote(twoLineNote(chartString(options, single ? "bartableMissingHeading" : "bartableBlankHeading", { v1: glyph }), blanks, showTotal ? chartString(options, "bartableBlankTotal") : "", noteFont, noteW, measure, options))] : [],
446
+ ...options[SLIVER_NOTE] ?? []
447
+ ], own = series.map((s) => s.fill ? { css: s.fill } : s.colorRole ? markRolePaint(s.colorRole, !0) : void 0), slots = rampSlots(
448
+ theme,
449
+ own,
450
+ options.palette,
451
+ series.length > 1 ? { labels: series.map((s) => s.label ?? s.id), warnings } : void 0
452
+ ), paints = series.map((_, i) => own[i] ?? seriesPaint(slots[i], options.palette)), groups = data.rowGroups?.groups ?? [], groupOwn = groups.map((g) => g.fill ? { css: g.fill } : g.colorRole ? markRolePaint(g.colorRole, !0) : void 0), groupSlots = groups.length > 0 ? rampSlots(theme, groupOwn, options.palette, groups.length > 1 ? { labels: groups.map((g) => g.label ?? g.id), warnings } : void 0) : [], groupPaints = groups.map((_, i) => groupOwn[i] ?? seriesPaint(groupSlots[i], options.palette)), rowPaint = (r, s) => {
453
+ let row = data.categories[r];
454
+ if (row.residual) return RESIDUAL_FILL;
455
+ let g = row.group === void 0 ? -1 : groups.findIndex((group) => group.id === row.group);
456
+ return g >= 0 ? groupPaints[g] : paints[s];
457
+ }, ranged = panels.some((entry) => entry.ranges.some(Boolean)), legendOptions = series.length > 1 || ranged || groups.length > 0 ? legendRequired(options.legend ?? "top", warnings, "bartable", theme, groups.length > 0 ? "the row group colours are named nowhere else" : "the segment colours and the range extension are named nowhere else") : normalizeLegendOption(options.legend), legendItems = groups.length > 0 ? [
458
+ ...data.rowGroups?.title ? [{ id: "__groups", label: data.rowGroups.title, paint: { token: "ink" }, key: "heading" }] : [],
459
+ ...groups.map((g, i) => ({ id: g.id, label: g.label ?? g.id, paint: groupPaints[i], key: "box" }))
460
+ ] : series.map((s, i) => ({ id: s.id, label: s.label ?? s.id, paint: paints[i], key: "box" }));
461
+ if (ranged && legendItems.push({ id: RANGE_KEY, label: options.strings?.range ?? "Range, low to high", paint: RANGE_FILL, stroke: RANGE_STROKE, width: strokeToken(theme, "hair"), key: "box" }), legendOptions?.order) {
462
+ let rank = new Map(legendOptions.order.map((id, i) => [id, i])), headed = groups.flatMap((g) => rank.get(g.id) ?? []);
463
+ headed.length > 0 && rank.set("__groups", minOf(headed) - 0.5), legendItems.sort((a, b) => (rank.get(a.id) ?? 1 / 0) - (rank.get(b.id) ?? 1 / 0));
464
+ }
465
+ let occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), frame = solveFrame(
466
+ {
467
+ size,
468
+ margin,
469
+ ...frameTextOptions(options),
470
+ ...derivedNotes.length > 0 ? { footnotes: [...authoredNotes(options), ...derivedNotes] } : {},
471
+ legend: legendOptions ? { options: legendOptions, items: legendItems } : void 0,
472
+ theme,
473
+ measure
474
+ },
475
+ occupied
476
+ ), plot = frame.plot, cellFont = { family: theme.type.family, ...theme.type.label }, headFont = { ...cellFont, ...theme.type.axis }, fieldFont = fieldHeadFont(theme), fieldText = (text) => fieldHeadText(text, theme), totalFont = { ...cellFont, weight: tableEmphasis(theme) }, width = (text, font) => measure(text, font).width, compact = options.mode === "compact", interleaved = compact && panels.length > 1, fitRows = (maxW, lines) => {
477
+ let fit = (w, n) => rowLabelBand(rows, cellFont, w, n, lineBox(cellFont), measure, { target: options.target, typeRole: "label", breakAfter: !0 }), cut = (band2) => band2.labels.some((label2) => label2.title !== void 0), pieces = (label2) => label2.split(/\s+/).flatMap(splitNameBreaks), band = fit(maxW, lines), most = Math.max(lines, maxOf(rows.map((row) => pieces(row.label).length)));
478
+ for (let n = lines + 1; cut(band) && n <= most; n++) band = fit(maxW, n);
479
+ return cut(band) && (band = fit(Math.max(maxW, maxOf(rows.flatMap((row) => pieces(row.label).map((word) => width(word, cellFont))))), most)), band;
480
+ }, { labels: rowText, width: rowBandW } = compact ? { labels: [], width: 0 } : fitRows(plot.w * 0.3, 3), labelTrack = compact ? 0 : Math.max(rowBandW, showTotal ? width(totalLabel, totalFont) : 0) + LABEL_GAP, x = plot.x + labelTrack, numberTracks = numberColumns.map((entry, i) => {
481
+ let name = entry.column.label ?? entry.column.id, head2 = fieldText(name), overhang = i === 0 && !compact ? labelTrack : 0, inner = Math.max(
482
+ maxOf(entry.texts.map((text) => width(text, cellFont))),
483
+ showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0,
484
+ ...overhang > 0 ? [] : head2.split(/\s+/).map((word) => width(word, fieldFont))
485
+ ), headFitAt = (w) => fitText(head2, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
486
+ for (; overhang > 0 && headFitAt(inner + overhang).title !== void 0 && inner < width(head2, fieldFont); ) inner += 4;
487
+ let track = { ...entry, name, head: head2, headFit: headFitAt(inner + overhang), right: x + CELL_AIR + inner };
488
+ return x += CELL_AIR + inner, track;
489
+ }), fixedW = x - plot.x, weights = panels.map((entry) => entry.panel.weight ?? 1), weightSum = weights.reduce((sum, weight) => sum + weight, 0), endReserves = panels.map((entry) => maxOf(entry.endTexts.map((text) => width(text, cellFont))) + END_GAP), totalWidths = panels.map((entry) => showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0), shareHead = fieldText(options.strings?.share ?? chartString(options, "shareHeading")), shareWs = panels.map((_, p) => showShare ? Math.max(width(shareHead, fieldFont), maxOf(cascade.panels[p].shareTexts.map((text) => width(text, cellFont)))) : 0), bracketWs = panels.map((_, p) => {
490
+ let combined = cascade?.panels[p].combined;
491
+ return combined ? BRACKET_GAP + BRACKET_ARM + BRACKET_TEXT_GAP + width(combined.text, totalFont) : 0;
492
+ }), growth = cascade?.growth, growthHead = growth ? fieldText(growth.head) : "", growthOverhang = compact ? 0 : bracketWs[panels.length - 1], growthInner = growth ? Math.max(maxOf(growth.texts.map((text, r) => width(text, r === rows.length ? totalFont : cellFont))), ...interleaved || growthOverhang > 0 ? [] : growthHead.split(/\s+/).map((word) => width(word, fieldFont))) : 0, growthFit = (w) => fitText(growthHead, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
493
+ for (; growth && !interleaved && growthFit(growthInner + growthOverhang).title !== void 0 && growthInner < width(growthHead, fieldFont); ) growthInner += 4;
494
+ let growthW = growth ? PANEL_GAP + growthInner : 0, sideW = compact ? fixedW + growthW : 0;
495
+ compact && (numberTracks.forEach((track) => {
496
+ track.right += plot.w - sideW;
497
+ }), { labels: rowText } = fitRows(Math.max(MIN_COMPACT_LABEL, plot.w - sideW - LABEL_GAP), 2));
498
+ let extras = panels.map((_, p) => PANEL_GAP + (cascade ? (showShare ? SHARE_GAP + shareWs[p] : 0) + bracketWs[p] : endReserves[p])), spans = panels.map((entry) => cascade ? cascade.panels[panels.indexOf(entry)].total : entry.max), compactW = plot.w - (cascade ? sideW : 0), restW = Math.max(0, plot.w - fixedW - growthW), extrasSum = extras.reduce((sum, w) => sum + w, 0), spanSum = spans.reduce((sum, v) => sum + v, 0), sharedK = spanSum > 0 ? Math.max(0, restW - extrasSum) / spanSum : 0, compactK = minOf(spans.map((span, p) => span > 0 ? Math.max(0, compactW - extras[p] + PANEL_GAP) / span : 1 / 0)), runFloors = panels.map((_, p) => Math.max(PREFERRED_RUN, totalWidths[p] - endReserves[p])), ownRuns = (() => {
499
+ let total = Math.max(0, restW - panels.reduce((sum, _entry, p) => sum + PANEL_GAP + endReserves[p], 0)), held = /* @__PURE__ */ new Set(), runs = panels.map(() => 0);
500
+ for (let pass = 0; pass <= panels.length; pass++) {
501
+ let free = total - [...held].reduce((sum, p) => sum + runFloors[p], 0), freeWeight = weights.reduce((sum, weight, p) => held.has(p) ? sum : sum + weight, 0);
502
+ runs = panels.map((_entry, p) => held.has(p) ? runFloors[p] : freeWeight > 0 ? Math.max(0, free) * weights[p] / freeWeight : 0);
503
+ let low = panels.map((_entry, p) => p).filter((p) => !held.has(p) && runs[p] < runFloors[p] - 1e-9);
504
+ if (low.length === 0 || held.size + low.length >= panels.length) break;
505
+ low.forEach((p) => held.add(p));
506
+ }
507
+ return runs;
508
+ })(), headingFloorRow = Math.max(BAR_H + 4, maxOf(rowText.map((text) => text.h + 2))), headingLines = !compact && !heightOmitted(options.size) && plot.h < 3 * lineBox(headFont) + HEAD_GAP + (showTotal ? TOTAL_GAP : 0) + (rows.length + (showTotal ? 1 : 0)) * headingFloorRow ? 2 : 3, shareColW = showShare ? SHARE_GAP + Math.max(0, maxOf(shareWs)) : 0, interleavedRun = (p) => Math.max(0, cascade ? plot.w - growthW - shareColW : plot.w - endReserves[p]), interleavedK = minOf(spans.map((span, p) => span > 0 ? interleavedRun(p) / span : 1 / 0)), commonShareRight = plot.x + plot.w - growthW, keyTextW = Math.max(1, plot.w - KEY_W - KEY_GAP - CELL_AIR - (cascade ? plot.x + plot.w - commonShareRight + (showShare ? width(shareHead, fieldFont) : 0) : sideW)), panelTracks = panels.map((entry, p) => {
509
+ let face = entry.fieldHead || entry.unitHead ? fieldFont : headFont, head2 = entry.fieldHead ? fieldText(entry.head) : entry.head;
510
+ if (interleaved) {
511
+ let scale2 = sharedScale ? Number.isFinite(interleavedK) ? interleavedK : 0 : spans[p] > 0 ? interleavedRun(p) / spans[p] : 0, headFit2 = fitText(head2, face, keyTextW, 2, measure, { target: options.target, typeRole: "axis" });
512
+ return { ...entry, head: head2, face, origin: plot.x, scale: scale2, trackW: spans[p] * scale2, shareRight: commonShareRight, headFit: headFit2 };
513
+ }
514
+ let w = compact ? compactW + PANEL_GAP : sharedScale ? extras[p] + spans[p] * sharedK : cascade ? restW * weights[p] / weightSum : PANEL_GAP + endReserves[p] + ownRuns[p], origin = compact ? plot.x : x + PANEL_GAP, run = Math.max(0, cascade ? w - extras[p] : w - PANEL_GAP - endReserves[p]), scale = sharedScale ? compact ? Number.isFinite(compactK) ? compactK : 0 : sharedK : spans[p] > 0 ? run / spans[p] : 0, trackW = spans[p] * scale;
515
+ compact || (x += w);
516
+ let headW = cascade ? trackW + (showShare ? SHARE_GAP + shareWs[p] - width(shareHead, fieldFont) - CELL_AIR : 0) : compact ? plot.w - sideW - (sideW > 0 ? CELL_AIR : 0) : w - PANEL_GAP, headFit = fitText(head2, face, Math.max(1, headW), headingLines, measure, { target: options.target, typeRole: "axis" });
517
+ if (entry.panel.unit && headFit.lines.length > 1 && headFit.lines.at(-1) === entry.panel.unit) {
518
+ let before = headFit.lines[headFit.lines.length - 2].split(" "), last = `${before.pop()} ${entry.panel.unit}`;
519
+ width(last, face) <= headW && (headFit.lines.splice(-2, 2, ...before.length ? [before.join(" ")] : [], last), headFit.w = Math.max(...headFit.lines.map((line2) => width(line2, face))), headFit.h = headFit.lines.length * lineBox(face));
520
+ }
521
+ return { ...entry, head: head2, face, origin, scale, trackW, shareRight: origin + trackW + SHARE_GAP + shareWs[p], headFit };
522
+ }), growthTrack = growth ? { right: plot.x + plot.w, headFit: growthFit(interleaved ? Math.max(growthInner, plot.w * 0.4) : growthInner + growthOverhang) } : void 0, growthLift = interleaved && growthTrack && showShare && growthTrack.headFit.w > growthInner ? lineBox(headFont) + 2 : 0;
523
+ if (!cascade && options[SLIVER_NOTE] === void 0) {
524
+ let notesFor = (rule) => panelTracks.flatMap((track) => {
525
+ let items = rows.flatMap((row, r) => {
526
+ let drawn = track.ranges[r]?.high ?? track.stacks[r].positive, range2 = track.ranges[r], k = range2 ? track.stacks[r].positive > 0 ? range2.low / track.stacks[r].positive : 0 : 1, values = series.flatMap((s) => {
527
+ let v = track.panel.values[s.id]?.[r];
528
+ return typeof v == "number" && v !== 0 ? [{ s, v: v * k }] : [];
529
+ }), sliver = drawn * track.scale < SLIVER_PX, thinPart = values.length > 1 && values.some(({ v }) => Math.abs(v) * track.scale < HIDDEN_PART_PX), blankThin = track.rowSums[r] === null && values.some(({ v }) => Math.abs(v) * track.scale < SLIVER_PX);
530
+ if (!(drawn > 0 && (sliver || rule === "all" && (thinPart || blankThin)))) return [];
531
+ let known = track.rowSums[r] === null ? chartString(options, "sliverKnown", { v1: track.fmt(track.stacks[r].total) }) : "", parts = values.map(({ s, v }) => `${s.label ?? s.id} ${track.fmt(v)}`);
532
+ return [{ first: sliver, text: `${row.label} ${track.endTexts[r]}${known}${parts.length > 1 ? ` (${parts.join(", ")})` : ""}` }];
533
+ }).sort((a, b) => Number(b.first) - Number(a.first)).map((item) => item.text), scale = panelTracks.length > 1 ? ` ${track.panel.label ?? track.panel.id}` : "";
534
+ return items.length === 0 ? [] : [twoLineNote(chartString(options, "sliverNote", { v1: scale, v2: track.fmt(track.max) }), items, "", noteFont, noteW, measure, options)];
535
+ }), sliverNotes = notesFor("all");
536
+ if (sliverNotes.length > 0) {
537
+ let listed = layoutBarTable(authored, { ...options, [SLIVER_NOTE]: sliverNotes });
538
+ if (panels.length > 1 && !compact && size.width < CARD_CLASS_WIDTH && options.size !== void 0 && options.mode === void 0 && options.belowMinimum !== "refuse" && panelTypeClass(options) === void 0 && !listed.refused && listed.sizing)
539
+ return { ...listed, sizing: { ...listed.sizing, minWidth: Math.max(listed.sizing.minWidth, CARD_CLASS_WIDTH) } };
540
+ let shortBy = Math.max(listed.sizing?.minHeight ?? 0, listed.frame.minHeight ?? 0) - size.height, fits = shortBy <= 0.5 && (listed.sizing?.minWidth ?? 0) <= size.width + 0.5, authoredHeight = !heightOmitted(options.size) && options[TARGET_SIZE]?.fixed.height !== !1, notesCanFit = shortBy <= sliverNotes.length * (2 * lineBox(noteFont) + 8);
541
+ if (!authoredHeight || fits || !notesCanFit) return listed;
542
+ let mainNotes = notesFor("main");
543
+ if (mainNotes.length > 0) return layoutBarTable(authored, { ...options, [SLIVER_NOTE]: mainNotes });
544
+ }
545
+ }
546
+ let heads = [...numberTracks, ...interleaved ? [] : panelTracks, ...growthTrack ? [growthTrack] : []].map((track) => track.headFit), keyH = interleaved ? panelTracks.reduce((sum, track) => sum + track.headFit.h + 2, 0) - 2 : 0, headH = Math.max(lineBox(headFont), keyH, maxOf(heads.map((head2) => head2.h)), (growthTrack?.headFit.h ?? 0) + growthLift), house = fixedBarRow(theme, rowText.map((text) => text.h + 4)), naturalRowH = house?.step ?? Math.max(ROW_PITCH, maxOf(rowText.map((text) => text.h + 4))), barH = house ? house.step * house.fraction : BAR_H, floorRowH = Math.max(barH + 4, maxOf(rowText.map((text) => text.h + 2))), rowCount = rows.length + (showTotal ? 1 : 0), blockH = headH + HEAD_GAP + (showTotal ? TOTAL_GAP : 0), minimumBlockH = Math.max(
547
+ lineBox(headFont),
548
+ maxOf(numberTracks.map((track) => track.headFit.h)),
549
+ maxOf(panelTracks.map((track) => Math.min(track.headFit.h, 2 * lineBox(headFont)))),
550
+ (growthTrack?.headFit.h ?? 0) + growthLift
551
+ ) + HEAD_GAP + (showTotal ? TOTAL_GAP : 0), tight = interleaved && !cascade, tightFont = { ...cellFont, lineHeight: 1 }, valueFont = tight ? tightFont : cellFont, barLineH = Math.max(barH, measure("0", valueFont).height) + (interleaved ? 2 : 6), panelBarH = (p) => interleaved && !cascade && p > 0 ? THIN_BAR : barH, totalLineH = Math.max(lineBox(totalFont), measure(totalLabel, totalFont).height) + 2, nameBoxH = (r) => tight && rowText[r].lines.length === 1 ? measure(rowText[r].lines[0], tightFont).height : rowText[r].h, nameH = (r) => nameBoxH(r) + 2, unitTops = [0];
552
+ for (let r = 0; r < rows.length; r++) unitTops.push(unitTops[r] + nameH(r) + (interleaved ? panels.length * barLineH + ROW_GAP : barLineH));
553
+ let comboAfter = interleaved && cascade && bracketRows && bracketLabel !== void 0 && cascade.panels.some((c) => c.combined) ? bracketRows.at(-1) : -1, periodTexts = panels.map((entry) => entry.panel.label ?? entry.panel.id), periodW = Math.max(0, maxOf(periodTexts.map((text) => width(text, cellFont)))), comboShareW = Math.max(0, maxOf((cascade?.panels ?? []).map((c) => c.combined ? width(c.combined.text, totalFont) : 0))), comboFit = comboAfter >= 0 ? fitText(comboRowLabel, totalFont, Math.max(MIN_COMPACT_LABEL, commonShareRight - comboShareW - periodW - 2 * CELL_AIR - plot.x), 3, measure, { target: options.target, typeRole: "label" }) : void 0, comboPitch = lineBox(cellFont) + 2, combinedH = comboFit ? 2 * COMBINED_PAD + Math.max(comboFit.h, panels.length * comboPitch) + ROW_GAP : 0, rowTopIn = (r) => unitTops[r] + (comboAfter >= 0 && r > comboAfter ? combinedH : 0), rowsSpan = unitTops[rows.length] + combinedH, totalIn = (p) => showTotal && (compact && !interleaved ? panels[p].totalText !== void 0 || p === 0 && (numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]) : panels.some((panel) => panel.totalText !== void 0) || numberColumns.some((column) => column.totalText !== void 0) || !!growth?.texts[rows.length]), totalBars = panels.map((_entry, p) => p).filter((p) => cascade && panels[p].totalText !== void 0), compactTotalH = interleaved ? totalLineH + totalBars.length * barLineH : totalLineH + barLineH, compactBlockH = (p) => headH + HEAD_GAP + rowsSpan + (showTotal ? TOTAL_GAP : 0) + (totalIn(p) ? compactTotalH : 0), compactRowsH = interleaved ? compactBlockH(0) : panels.reduce((sum, _entry, p) => sum + compactBlockH(p), 0) + (panels.length - 1) * BLOCK_GAP, rowH = compact ? barLineH : Math.max(floorRowH, Math.min(naturalRowH, (plot.h - blockH) / rowCount)), cellBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - (compact ? 6 : 8)) : barH, totalBarH = cascade ? interleaved ? barH : Math.max(barH, rowH - 6) : barH, tableTop = plot.y, rowsTop = tableTop + headH + HEAD_GAP, rowsBottom = rowsTop + rows.length * rowH, totalTop = rowsBottom + TOTAL_GAP, tableH = compact ? compactRowsH : blockH + rowCount * rowH, chromeH = size.height - plot.h, grow = rowDrivenHeight({ options, width: size.width, height: size.height, chromeH, rowsH: compact ? compactRowsH : blockH + rowCount * naturalRowH });
554
+ if (grow !== void 0) return layoutBarTable(authored, { ...options, size: { width: size.width, height: grow } });
555
+ let scene = [...frame.nodes], under = [], contrastInk = /* @__PURE__ */ new Set(), mutedInk = /* @__PURE__ */ new Set(), marks = { segments: [], cells: [] }, requests = [], rightAligned = /* @__PURE__ */ new Set(), fonts = /* @__PURE__ */ new Map(), tableRight = plot.x + plot.w, line = (id, x1, y1, x2, y2, lineWidth, stroke, part) => scene.push({ t: "line", id, x1, y1, x2, y2, stroke, width: lineWidth, owner: {}, part }), label = (id, kind, owner, text, font, rect, fitted) => {
556
+ fonts.set(id, font), requests.push({
557
+ id,
558
+ kind,
559
+ owner,
560
+ text,
561
+ font,
562
+ typeRole: kind === "axisTitle" ? "axis" : "label",
563
+ ...fitted ? fittedLabel(fitted, font) : { lines: [text] },
564
+ priority: PRIORITY.endpoint,
565
+ candidates: [{ slot: `${id}:fixed`, rect, penalty: 0 }]
566
+ });
567
+ }, rowText1 = (text, font, top, at, bandH = rowH) => {
568
+ let box = measure(text, font);
569
+ return { x: "left" in at ? at.left : at.right - box.width, y: top + (bandH - box.height) / 2, w: box.width, h: box.height };
570
+ }, blockTop = (p) => tableTop + (compact ? panels.slice(0, p).reduce((sum, _entry, q) => sum + compactBlockH(q) + BLOCK_GAP, 0) : 0), rowsTopOf = (p) => blockTop(p) + headH + HEAD_GAP, rowsBottomOf = (p) => compact ? rowsTopOf(p) + rowsSpan : rowsBottom, place = (p, r) => {
571
+ if (interleaved) {
572
+ if (r < rows.length) {
573
+ let top3 = rowsTopOf(0) + rowTopIn(r);
574
+ return { labelTop: top3, labelH: tight ? nameBoxH(r) : lineBox(cellFont), barTop: top3 + nameH(r) + p * barLineH };
575
+ }
576
+ let top2 = rowsBottomOf(0) + TOTAL_GAP;
577
+ return { labelTop: top2, labelH: totalLineH, barTop: top2 + totalLineH + Math.max(0, totalBars.indexOf(p)) * barLineH };
578
+ }
579
+ if (!compact) {
580
+ let top2 = r < rows.length ? rowsTop + r * rowH : totalTop;
581
+ return { labelTop: top2, labelH: rowH, barTop: top2 };
582
+ }
583
+ if (r < rows.length) {
584
+ let top2 = rowsTopOf(p) + unitTops[r];
585
+ return { labelTop: top2, labelH: lineBox(cellFont), barTop: top2 + nameH(r) };
586
+ }
587
+ let top = rowsBottomOf(p) + TOTAL_GAP;
588
+ return { labelTop: top, labelH: totalLineH, barTop: top + totalLineH };
589
+ }, nameId = (p, id) => p === 0 ? id : `${id}:${panels[p].panel.id}`, blocks = compact && !interleaved ? panels.map((_entry, p) => p) : [0], headBottom = tableTop + headH;
590
+ numberTracks.forEach((track) => {
591
+ let id = `head:${track.column.id}`;
592
+ rightAligned.add(id), label(
593
+ id,
594
+ "axisTitle",
595
+ { colId: track.column.id },
596
+ track.head,
597
+ fieldFont,
598
+ { x: track.right - track.headFit.w, y: headBottom - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
599
+ track.headFit
600
+ );
601
+ }), panelTracks.forEach((track, p) => {
602
+ if (interleaved) {
603
+ let top = tableTop + headH - keyH + panelTracks.slice(0, p).reduce((sum, other) => sum + other.headFit.h + 2, 0), mid = top + lineBox(headFont) / 2, glyph2 = (id3, y, h, fill) => scene.push({ t: "rect", id: id3, rect: { x: plot.x, y, w: KEY_W, h }, fill, owner: {}, part: "panelKey" });
604
+ if (cascade) {
605
+ let n = panels.length, h = Math.max(2, Math.floor((10 - (n - 1)) / n));
606
+ panels.forEach((_entry, q) => glyph2(`panel-key:${track.panel.id}:${q}`, mid - (n * h + n - 1) / 2 + q * (h + 1), h, q === p ? { token: "inkMuted" } : TRACK_FILL));
607
+ } else {
608
+ let h = Math.max(3, Math.round(panelBarH(p) * 0.7));
609
+ glyph2(`panel-key:${track.panel.id}`, mid - h / 2, h, { token: "inkMuted" });
610
+ }
611
+ if (label(
612
+ `head:${track.panel.id}`,
613
+ "axisTitle",
614
+ { colId: track.panel.id },
615
+ track.head,
616
+ track.face,
617
+ { x: plot.x + KEY_W + KEY_GAP, y: top, w: track.headFit.w, h: track.headFit.h },
618
+ track.headFit
619
+ ), isNumberAlone(track.head) && (requests[requests.length - 1].role = "axis"), p > 0 || !showShare) return;
620
+ let id2 = `head:share:${track.panel.id}`, box2 = measure(shareHead, fieldFont);
621
+ rightAligned.add(id2), label(id2, "axisTitle", { colId: `share:${track.panel.id}` }, shareHead, fieldFont, { x: track.shareRight - box2.width, y: tableTop + headH - box2.height, w: box2.width, h: box2.height });
622
+ return;
623
+ }
624
+ let headBottom2 = blockTop(p) + headH;
625
+ if (label(
626
+ `head:${track.panel.id}`,
627
+ "axisTitle",
628
+ { colId: track.panel.id },
629
+ track.head,
630
+ track.face,
631
+ { x: track.origin, y: headBottom2 - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
632
+ track.headFit
633
+ ), isNumberAlone(track.head) && (requests[requests.length - 1].role = "axis"), !showShare) return;
634
+ let id = `head:share:${track.panel.id}`, box = measure(shareHead, fieldFont);
635
+ rightAligned.add(id), label(id, "axisTitle", { colId: `share:${track.panel.id}` }, shareHead, fieldFont, { x: track.shareRight - box.width, y: headBottom2 - box.height, w: box.width, h: box.height });
636
+ }), growthTrack && (rightAligned.add("head:growth"), label(
637
+ "head:growth",
638
+ "axisTitle",
639
+ { colId: "growth" },
640
+ growthHead,
641
+ fieldFont,
642
+ { x: growthTrack.right - growthTrack.headFit.w, y: headBottom - growthLift - growthTrack.headFit.h, w: growthTrack.headFit.w, h: growthTrack.headFit.h },
643
+ growthTrack.headFit
644
+ ));
645
+ let barValue = (id, owner, text, font, rect, fill, top, lo, hi, total = !1) => {
646
+ let box = measure(text, font), y = top + (rowH - box.height) / 2, candidates = [], pad = total ? TOTAL_PAD : VALUE_PAD, fitsInside = box.width + 2 * pad <= rect.w, inside = (penalty) => candidates.push({ slot: `${id}:inside`, rect: { x: rect.x + pad, y, w: box.width, h: box.height }, penalty, insideFill: paintColor(theme, fill), insidePaint: fill }), left = rect.x - VALUE_PAD - box.width, right = rect.x + rect.w + VALUE_PAD, at = (slot, x2, penalty) => candidates.push({ slot: `${id}:${slot}`, rect: { x: x2, y, w: box.width, h: box.height }, penalty }), atStart = rect.x <= lo + 0.5;
647
+ total || atStart ? fitsInside && inside(0) : (left >= lo && at("left", left, 0), fitsInside && inside(1)), right + box.width <= hi && at("right", right, 2), left < lo && left >= lo - PANEL_GAP + 4 && at("leftGap", left, 3), at("rightOut", right, 4), candidates.splice(0, candidates.length, ...candidates.filter((candidate) => candidate.rect.x >= plot.x && candidate.rect.x + candidate.rect.w <= tableRight)), fonts.set(id, font), contrastInk.add(id), requests.push({ id, kind: "segment", owner, text, font, typeRole: "label", lines: [text], priority: PRIORITY.endpoint, candidates });
648
+ }, head = headRule(theme);
649
+ blocks.forEach((p) => line(nameId(p, "bartable-head-rule"), plot.x, rowsTopOf(p) - HEAD_GAP / 2, tableRight, rowsTopOf(p) - HEAD_GAP / 2, head.width, head.stroke, "tableHeaderRule"));
650
+ let shaded = new Set(!cascade && options.combinedShare ? options.combinedShare.rows : []);
651
+ if (rows.forEach((row, r) => {
652
+ if (!shaded.has(row.id)) return;
653
+ let at = place(0, r), air = interleaved ? ROW_GAP / 2 : 0, top = at.labelTop - air, bottom = compact ? (r + 1 < rows.length ? place(0, r + 1).labelTop : rowsBottomOf(0) + 2 * air) - air : at.labelTop + rowH;
654
+ under.push({ t: "rect", id: `combined-band:${row.id}`, rect: { x: plot.x, y: top, w: tableRight - plot.x, h: bottom - top }, fill: { token: "others", tint: 0.5 }, owner: {}, part: "combinedBand" });
655
+ }), rows.forEach((row, r) => {
656
+ let text = rowText[r];
657
+ blocks.forEach((p) => {
658
+ let at = place(p, r), ruleY = at.labelTop - (interleaved ? ROW_GAP / 2 : 0);
659
+ r > 0 && !cascade && compact && line(nameId(p, `bartable-row-rule:${row.id}`), plot.x, ruleY, tableRight, ruleY, theme.table?.ruleWidths?.row ?? strokeToken(theme, "hair"), tableRuleInk(), "tableRowRule"), label(
660
+ nameId(p, `row:${row.id}`),
661
+ "category",
662
+ { categoryId: row.id },
663
+ row.label,
664
+ cellFont,
665
+ { x: plot.x, y: compact ? at.labelTop : at.labelTop + (rowH - text.h) / 2, w: text.w, h: compact ? nameBoxH(r) : text.h },
666
+ text
667
+ );
668
+ });
669
+ let side = place(0, r);
670
+ if (numberTracks.forEach((track) => {
671
+ let id = `cell:${track.column.id}:${row.id}`, rect = rowText1(track.texts[r], valueFont, side.labelTop, { right: track.right }, side.labelH);
672
+ rightAligned.add(id), label(id, "point", { categoryId: row.id, colId: track.column.id }, track.texts[r], cellFont, rect), marks.cells.push({ rowId: row.id, colId: track.column.id, kind: "column", value: track.column.values[r] ?? null, text: track.texts[r], rect });
673
+ }), panelTracks.forEach((track, p) => {
674
+ let stack = track.stacks[r], top = place(p, r).barTop;
675
+ if (cascade) {
676
+ let c = cascade.panels[p], seriesId = series[0].id, owner2 = { categoryId: row.id, seriesId, colId: track.panel.id }, barY2 = top + (rowH - cellBarH) / 2;
677
+ under.push({ t: "rect", id: `track:${track.panel.id}:${row.id}`, rect: { x: track.origin, y: barY2, w: track.trackW, h: cellBarH }, fill: TRACK_FILL, owner: {}, part: "cascadeTrack" });
678
+ let value = stack.total, rect2 = { x: track.origin + c.starts[r] * track.scale, y: barY2, w: value * track.scale, h: cellBarH }, text2 = track.fmt(value);
679
+ marks.segments.push({ rowId: row.id, panelId: track.panel.id, seriesId, value, text: text2, rect: rect2 });
680
+ let fill = rowPaint(r, 0);
681
+ if (rect2.w > 0 && (scene.push({ t: "rect", id: `segment:${track.panel.id}:${row.id}:${seriesId}`, rect: rect2, fill, owner: owner2, part: "segment", display: { value: text2 } }), occupied.claim(rect2, "mark", owner2, "segment")), barValue(`end:${track.panel.id}:${row.id}`, owner2, text2, cellFont, rect2, fill, top, track.origin, track.origin + track.trackW), marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value, text: text2, rect: rect2 }), !showShare) return;
682
+ let id = `cell:share:${track.panel.id}:${row.id}`, shareRect = rowText1(c.shareTexts[r], cellFont, top, { right: track.shareRight });
683
+ rightAligned.add(id), label(id, "point", { categoryId: row.id, colId: `share:${track.panel.id}` }, c.shareTexts[r], cellFont, shareRect), marks.cells.push({ rowId: row.id, colId: `share:${track.panel.id}`, kind: "share", value: c.shares[r], text: c.shareTexts[r], rect: shareRect });
684
+ return;
685
+ }
686
+ let pBarH = panelBarH(p), barY = top + (rowH - pBarH) / 2, range2 = track.ranges[r], k = range2 ? stack.positive > 0 ? range2.low / stack.positive : 0 : 1;
687
+ stack.segments.forEach((segment, s) => {
688
+ if (!segment) return;
689
+ let seriesId = series[s].id, owner2 = { categoryId: row.id, seriesId, colId: track.panel.id }, drawn = segment.value * k, rect2 = { x: track.origin + segment.start * k * track.scale, y: barY, w: drawn * track.scale, h: pBarH }, text2 = track.fmt(drawn), value = range2 ? roundedNumber(drawn, track.spec) : drawn;
690
+ marks.segments.push({ rowId: row.id, panelId: track.panel.id, seriesId, value, text: text2, rect: rect2 }), !(rect2.w <= 0) && (scene.push({
691
+ t: "rect",
692
+ id: `segment:${track.panel.id}:${row.id}:${seriesId}`,
693
+ rect: rect2,
694
+ fill: rowPaint(r, s),
695
+ owner: owner2,
696
+ part: "segment",
697
+ display: { value: text2 }
698
+ }), occupied.claim(rect2, "mark", owner2, "segment"));
699
+ });
700
+ let endText = track.endTexts[r], owner = { categoryId: row.id, colId: track.panel.id };
701
+ if (range2 && range2.high > range2.low) {
702
+ let rect2 = { x: track.origin + range2.low * track.scale, y: barY, w: (range2.high - range2.low) * track.scale, h: pBarH };
703
+ scene.push({
704
+ t: "rect",
705
+ id: `range:${track.panel.id}:${row.id}`,
706
+ rect: rect2,
707
+ fill: RANGE_FILL,
708
+ stroke: RANGE_STROKE,
709
+ strokeWidth: strokeToken(theme, "hair"),
710
+ owner,
711
+ part: "rangeExtension",
712
+ display: { value: endText }
713
+ }), occupied.claim(rect2, "mark", owner, "rangeExtension");
714
+ }
715
+ let rect = rowText1(endText, valueFont, top, { left: track.origin + (range2?.high ?? stack.positive) * track.scale + END_GAP });
716
+ label(`end:${track.panel.id}:${row.id}`, "total", owner, endText, cellFont, rect);
717
+ let sum = track.rowSums[r] ?? null;
718
+ marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value: range2?.low ?? sum, ...range2 ? { range: range2 } : {}, text: endText, rect });
719
+ }), growthTrack) {
720
+ let id = `cell:growth:${row.id}`, rect = rowText1(growth.texts[r], cellFont, side.labelTop, { right: growthTrack.right }, side.labelH);
721
+ rightAligned.add(id), label(id, "point", { categoryId: row.id, colId: "growth" }, growth.texts[r], cellFont, rect), marks.cells.push({ rowId: row.id, colId: "growth", kind: "growth", value: growth.values[r] ?? null, text: growth.texts[r], rect });
722
+ }
723
+ }), panelTracks.forEach((track, p) => {
724
+ if (!cascade) return;
725
+ let c = cascade.panels[p];
726
+ if (!c.combined || !bracketRows) return;
727
+ if (interleaved) {
728
+ let top = rowsTopOf(0) + unitTops[comboAfter + 1], ruleStroke = { token: "inkMuted" };
729
+ p === 0 && ([top + 1, top + combinedH - ROW_GAP - 1].forEach((y, i) => scene.push({ t: "line", id: `combined-rule:${i === 0 ? "top" : "bottom"}`, x1: plot.x, y1: y, x2: commonShareRight, y2: y, stroke: ruleStroke, width: strokeToken(theme, "hair"), dash: dashToken(theme, "dotted"), owner: {}, part: "combinedRule" })), label("combined:label", "category", {}, comboRowLabel, totalFont, { x: plot.x, y: top + COMBINED_PAD, w: comboFit.w, h: comboFit.h }, comboFit));
730
+ let lineTop = top + COMBINED_PAD + p * comboPitch, box2 = measure(c.combined.text, totalFont), rect2 = { x: track.shareRight - box2.width, y: lineTop + (lineBox(cellFont) - box2.height) / 2, w: box2.width, h: box2.height };
731
+ rightAligned.add(`combined:${track.panel.id}`), label(`combined:${track.panel.id}`, "total", { colId: `share:${track.panel.id}` }, c.combined.text, totalFont, rect2), marks.cells.push({ colId: `share:${track.panel.id}`, kind: "share", combined: !0, value: c.combined.value, text: c.combined.text, rect: rect2 });
732
+ let periodId = `combined:period:${track.panel.id}`;
733
+ mutedInk.add(periodId), rightAligned.add(periodId), label(periodId, "category", { colId: track.panel.id }, periodTexts[p], cellFont, rowText1(periodTexts[p], cellFont, lineTop, { right: rect2.x - CELL_AIR }, lineBox(cellFont)));
734
+ return;
735
+ }
736
+ let inset = (rowH - cellBarH) / 2, y1 = place(p, bracketRows[0]).barTop + inset, y2 = place(p, bracketRows[bracketRows.length - 1]).barTop + rowH - inset, x0 = (showShare ? track.shareRight : track.origin + track.trackW) + BRACKET_GAP, x1 = x0 + BRACKET_ARM, stroke = { token: "axis" };
737
+ line(`bracket:${track.panel.id}:top`, x0, y1, x1, y1, strokeToken(theme, "rule"), stroke, "bracket"), line(`bracket:${track.panel.id}:side`, x1, y1, x1, y2, strokeToken(theme, "rule"), stroke, "bracket"), line(`bracket:${track.panel.id}:bottom`, x0, y2, x1, y2, strokeToken(theme, "rule"), stroke, "bracket");
738
+ let box = measure(c.combined.text, totalFont), rect = { x: x1 + BRACKET_TEXT_GAP, y: (y1 + y2 - box.height) / 2, w: box.width, h: box.height };
739
+ label(`combined:${track.panel.id}`, "total", { colId: `share:${track.panel.id}` }, c.combined.text, totalFont, rect), marks.cells.push({ colId: `share:${track.panel.id}`, kind: "share", combined: !0, value: c.combined.value, text: c.combined.text, rect });
740
+ }), showTotal) {
741
+ let rule = totalRule(theme), ground = totalGround(theme, options.palette);
742
+ blocks.forEach((p) => {
743
+ let at = place(p, rows.length);
744
+ if (totalIn(p)) {
745
+ let bandH = compact ? compactTotalH : Math.min(rowH, Math.max(ROW_PITCH, totalLineH + 4, cascade ? totalBarH + 6 : 0)), bottom = at.labelTop + (compact ? compactTotalH : (rowH + bandH) / 2), top = !compact && bandH < rowH ? bottom - bandH : rowsBottomOf(p) + TOTAL_GAP / 2;
746
+ under.push({ t: "rect", id: nameId(p, "bartable-total-ground"), rect: { x: plot.x, y: top, w: tableRight - plot.x, h: bottom - top }, fill: ground, owner: {}, part: "tableTotalGround" }), line(nameId(p, "bartable-total-rule"), plot.x, top, tableRight, top, rule.width, rule.stroke, "tableTotalRule"), line(nameId(p, "bartable-total-rule-below"), plot.x, bottom, tableRight, bottom, rule.width, rule.stroke, "tableTotalRule");
747
+ }
748
+ totalIn(p) && label(nameId(p, "total:label"), "category", {}, totalLabel, totalFont, rowText1(totalLabel, totalFont, at.labelTop, { left: plot.x }, at.labelH));
749
+ });
750
+ let side = place(0, rows.length), totalX = plot.x + width(totalLabel, totalFont) + CELL_AIR;
751
+ if (numberTracks.forEach((track) => {
752
+ if (track.totalText === void 0) return;
753
+ let id = `total:${track.column.id}`, rect = rowText1(track.totalText, totalFont, side.labelTop, { right: track.right }, side.labelH);
754
+ rightAligned.add(id), label(id, "grandTotal", { colId: track.column.id }, track.totalText, totalFont, rect), marks.cells.push({ colId: track.column.id, kind: "total", value: track.total, text: track.totalText, rect });
755
+ }), panelTracks.forEach((track, p) => {
756
+ if (track.totalText === void 0) return;
757
+ let totalTop2 = interleaved && !cascade ? place(p, rows.length).labelTop : place(p, rows.length).barTop;
758
+ if (cascade) {
759
+ let bar = { x: track.origin, y: totalTop2 + (rowH - totalBarH) / 2, w: track.trackW, h: totalBarH }, fill = markRolePaint("total", !0), owner = { colId: track.panel.id };
760
+ scene.push({ t: "rect", id: `total-bar:${track.panel.id}`, rect: bar, fill, owner, part: "totalBar", display: { value: track.totalText } }), barValue(`total:${track.panel.id}`, owner, track.totalText, totalFont, bar, fill, totalTop2, track.origin, track.origin + track.trackW, !0), marks.cells.push({ colId: track.panel.id, kind: "total", value: track.stackTotal, text: track.totalText, rect: bar });
761
+ return;
762
+ }
763
+ let rect = interleaved ? rowText1(track.totalText, totalFont, totalTop2, { left: totalX }, totalLineH) : rowText1(track.totalText, totalFont, totalTop2, { left: track.origin });
764
+ interleaved && (totalX += rect.w + CELL_AIR), label(`total:${track.panel.id}`, "grandTotal", { colId: track.panel.id }, track.totalText, totalFont, rect);
765
+ let range2 = typeof track.total == "object" && track.total !== null ? track.total : void 0;
766
+ marks.cells.push({ colId: track.panel.id, kind: "total", value: range2?.low ?? track.stackTotal, ...range2 ? { range: range2 } : {}, text: track.totalText, rect });
767
+ }), growthTrack && growth.texts[rows.length]) {
768
+ let text = growth.texts[rows.length], rect = rowText1(text, totalFont, side.labelTop, { right: growthTrack.right }, side.labelH);
769
+ rightAligned.add("total:growth"), label("total:growth", "grandTotal", { colId: "growth" }, text, totalFont, rect), marks.cells.push({ colId: "growth", kind: "growth", value: growth.values[rows.length] ?? null, text, rect });
770
+ }
771
+ }
772
+ let behind = scene.splice(frame.nodes.length);
773
+ pushAll(scene, under), pushAll(scene, behind);
774
+ let solved = solveLabels(requests, occupied, labelCtx(theme, size, options, {
775
+ measure,
776
+ plot,
777
+ labelPad: 1
778
+ })), ink = { token: "ink" }, muted = { token: "inkMuted" }, headPaint = headInk();
779
+ for (let placed of solved.placed) contrastInk.has(placed.id) || (placed.ink = placed.id.startsWith("head:") ? headPaint : mutedInk.has(placed.id) ? muted : ink);
780
+ let texts = labelsToNodes(theme, solved.placed, (placed) => fonts.get(placed.id) ?? cellFont, scene), rects = new Map(solved.placed.map((placed) => [`label:${placed.id}`, placed]));
781
+ for (let node of texts) {
782
+ let placed = rects.get(node.id);
783
+ node.t !== "text" || !placed || !rightAligned.has(placed.id) || (node.x = placed.rect.x + placed.rect.w, node.align = "end");
784
+ }
785
+ pushAll(scene, texts), pushAll(warnings, solved.warnings);
786
+ let segmentNames = series.map((s) => s.label ?? s.id).join(", "), minTracks = panels.map((entry, p) => cascade ? Math.max(MIN_TRACK, ...entry.head.split(/\s+/).map((word) => width(word, headFont)), totalWidths[p] + 2 * END_GAP) : Math.max(MIN_RUN, totalWidths[p] - endReserves[p])), tightest = sharedScale ? minTracks.reduce((best, min, p) => spans[p] > 0 && min / spans[p] > minTracks[best] / spans[best] ? p : best, 0) : -1, widest = spans.indexOf(maxOf(spans)), wideHint = () => tightest >= 0 && tightest !== widest && spans[tightest] > 0 ? `The '${panels[tightest].panel.label ?? panels[tightest].panel.id}' panel's total is ${formatAutomaticPercent(spans[tightest] / spans[widest] * 100, spans[tightest] / spans[widest] < 0.1 ? 1 : 0, !1, locale)} of the '${panels[widest].panel.label ?? panels[widest].panel.id}' panel's, and the panels share one scale, so its track needs ${Math.round(minTracks[tightest])}px. Set options.sharedScale to false to give each panel its own width.` : void 0, panelsW = sharedScale ? extrasSum + maxOf(minTracks.map((min, p) => spans[p] > 0 ? min / spans[p] : 0)) * spanSum : cascade ? Math.max(extrasSum + minTracks.reduce((sum, w) => sum + w, 0), maxOf(panels.map((_, p) => (extras[p] + minTracks[p]) * weightSum / weights[p]))) : panels.reduce((sum, _entry, p) => sum + PANEL_GAP + Math.max((panels.length > 1 ? PREFERRED_RUN : MIN_RUN) + endReserves[p], totalWidths[p]), 0), kMin = Math.max(0, maxOf(minTracks.map((min, p) => spans[p] > 0 ? min / spans[p] : 0))), compactPanelsW = maxOf(panels.map((_, p) => extras[p] - PANEL_GAP + (sharedScale ? spans[p] * kMin : minTracks[p]))), interleavedPanelsW = cascade ? growthW + shareColW + (sharedScale ? kMin * maxOf(spans) : maxOf(minTracks)) : maxOf(panels.map((_, p) => MIN_RUN + endReserves[p])), minWidth = size.width - plot.w + (interleaved ? Math.max(interleavedPanelsW, sideW + LABEL_GAP + MIN_COMPACT_LABEL) : compact ? Math.max(compactPanelsW + (cascade ? sideW : 0), sideW + LABEL_GAP + MIN_COMPACT_LABEL) : fixedW + growthW + panelsW), sizeHint = minWidth > size.width ? wideHint() : void 0;
787
+ return {
788
+ type: "bartable",
789
+ size,
790
+ sizing: rowSizing("bartable", size, { chromeH, minimumRowsH: compact ? compactRowsH : minimumBlockH + rowCount * floorRowH, naturalRowsH: compact ? compactRowsH : blockH + rowCount * naturalRowH, minWidth, ...sizeHint ? { hint: sizeHint } : {} }),
791
+ plot: { x: plot.x, y: tableTop, w: plot.w, h: tableH },
792
+ scene: withSegmentSeams(scene, theme),
793
+ labels: solved.placed,
794
+ axes: [],
795
+ annotations: [],
796
+ ...frame.legend ? { legend: frame.legend } : {},
797
+ frame: frame.frame,
798
+ marks,
799
+ derived: {
800
+ panels: panels.map((entry) => ({ id: entry.panel.id, rowSums: entry.rowSums, ...entry.total === void 0 ? {} : { total: entry.total } })),
801
+ columns: numberColumns.filter((entry) => entry.column.aggregate !== "none").map((entry) => ({ id: entry.column.id, total: entry.total })),
802
+ // The row order as drawn (residual rows pinned last), for the records.
803
+ rowOrder: rows.map((row) => row.id),
804
+ ...cascade ? {
805
+ ...bracketLabel ? { combinedLabel: bracketLabel } : {},
806
+ cascade: cascade.panels.map((c, p) => ({ id: panels[p].panel.id, starts: c.starts, shares: c.shares, ...c.combined ? { combined: c.combined.value } : {} })),
807
+ ...cascade.growth ? { growth: cascade.growth.values } : {},
808
+ ...cascade.adjustments.length > 0 ? { roundingAdjustments: cascade.adjustments } : {}
809
+ } : {}
810
+ },
811
+ a11y: {
812
+ title: accessibleTitle(options.title, chartString(options, "bartableTitle", { v1: rows.length })),
813
+ counts: [structureCount("rows", rows.length, void 0, options), structureCount("panels", panels.length, panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length }))],
814
+ desc: chartString(options, "bartableDescStart", { v1: rows.length, v2: columns.length ? chartString(options, "tableColumnsClause", { v1: numberTracks.map((track) => track.name).join(", ") }) : "" }) + `${panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length })}, ${panels.map((entry) => entry.head).join("; ")}, ${sharedScale ? chartString(options, "sharedScale") : chartString(options, "ownScale")}. ${cascade ? chartString(options, "cascadeDesc", { v1: showShare ? chartString(options, "shareColumnClause") : "", v2: bracketRows ? chartString(options, "combinedShareBracket", { v1: bracketLabel }) : "", v3: growth ? chartString(options, "lastColumnClause", { v1: growth.head }) : "" }) : ""}` + chartString(options, "segmentsSentence", { v1: segmentNames, v2: cascade ? chartString(options, "cascadeValueLabels") : chartString(options, "barEndTotalRange") }) + `${ranged ? chartString(options, "rangeBarDesc") : ""}${showTotal ? chartString(options, "tableTotalRow", { v1: totalLabel }) : ""}`
815
+ },
816
+ warnings,
817
+ debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
818
+ };
819
+ }
820
+
821
+ // src/core/charts/bartable/core.ts
822
+ var bartableCore = {
823
+ type: "bartable",
824
+ sizing: chartSizing("bartable"),
825
+ title: "Bar table",
826
+ summary: "Table rows with number columns and stacked bars. One panel when the rows compare one measure (impact in $bn, split into Run and Grow); several panels when the same split reads in different units side by side ($bn and % of EBITDA). Each panel has its own scale; the end label is the row total or an authored range, whose bar fills the segments to low and extends lightly to high. variant 'cascade': panels as periods of one total (category share by year).",
827
+ aliases: ["bar-table", "table-bars"],
828
+ layout: layoutBarTable,
829
+ categoryLabels: calendarCategories,
830
+ defaults: { total: !0 },
831
+ annotationKinds: []
832
+ };
833
+
834
+ export {
835
+ bartableCore
836
+ };