boardplot 0.55.0 → 0.57.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 (479) hide show
  1. package/CHANGELOG.md +153 -0
  2. package/README.md +3 -3
  3. package/dist/{ReaderBox-3FFPHWSI.js → ReaderBox-GCIITQCX.js} +5 -5
  4. package/dist/{annotateEngine-ET4DM2OK.js → annotateEngine-JMZI6QEG.js} +1 -1
  5. package/dist/build-identity.json +3 -3
  6. package/dist/{chunk-RO2PSSAI.js → chunk-26WNBTWB.js} +21 -5
  7. package/dist/{chunk-3AJY353W.js → chunk-2AJWRVZ2.js} +4 -3
  8. package/dist/{chunk-NVGAEQ6M.js → chunk-2BHLRHF2.js} +2 -2
  9. package/dist/{chunk-CZ3WCG55.js → chunk-2HD5RY2U.js} +11 -3
  10. package/dist/{chunk-HR2BKLS3.js → chunk-2I76VFMZ.js} +186 -241
  11. package/dist/{chunk-3B3CFJ2H.js → chunk-2KCK63DD.js} +2 -2
  12. package/dist/{chunk-GDZI5ZJ7.js → chunk-2WTD3GCR.js} +11 -3
  13. package/dist/{chunk-EBC5TMI2.js → chunk-2X6XY4K4.js} +27 -10
  14. package/dist/{chunk-MJMOKPTF.js → chunk-3DUGZ7ML.js} +196 -138
  15. package/dist/{chunk-N5TZL74Y.js → chunk-3LNVEE5Z.js} +1 -1
  16. package/dist/{chunk-DB2JKPOX.js → chunk-43PCSBVQ.js} +567 -14
  17. package/dist/{chunk-WEMUCDPK.js → chunk-4JGBCBDZ.js} +1 -1
  18. package/dist/{chunk-7UPZPFHQ.js → chunk-4JNHF6JW.js} +12 -12
  19. package/dist/{chunk-4X3HNETE.js → chunk-4RN4OM6I.js} +3 -3
  20. package/dist/{chunk-Z7NHFNH3.js → chunk-4U2WSW6F.js} +107 -26
  21. package/dist/{chunk-6D4EO3S7.js → chunk-53OEKS4L.js} +5 -3
  22. package/dist/{chunk-E44W4EEG.js → chunk-54HEIM2A.js} +2 -2
  23. package/dist/{chunk-CLGUFVHM.js → chunk-5H4HFRDO.js} +6 -6
  24. package/dist/{chunk-SFG7NG23.js → chunk-5HTGSB6Y.js} +3 -3
  25. package/dist/{chunk-WXJ5MHLH.js → chunk-5JTRCSBN.js} +1 -1
  26. package/dist/{chunk-4Y7BA2NW.js → chunk-5P4MXWKP.js} +4 -4
  27. package/dist/{chunk-MLW72KWN.js → chunk-5RHP7YTL.js} +5 -5
  28. package/dist/{chunk-AB35GVPG.js → chunk-5TUDYKNL.js} +41 -31
  29. package/dist/{chunk-HZUAEMN5.js → chunk-5WSIH4SR.js} +1 -1
  30. package/dist/{chunk-YTCIGJUU.js → chunk-62JZL6FW.js} +45 -37
  31. package/dist/{chunk-S7NRL66K.js → chunk-6EE6XEMA.js} +4 -4
  32. package/dist/chunk-6JXBLQJ2.js +32 -0
  33. package/dist/{chunk-BGJRCG7N.js → chunk-6KHRMK3I.js} +46 -26
  34. package/dist/{chunk-3OZRODC4.js → chunk-6LQKU6YN.js} +4 -4
  35. package/dist/chunk-6VU2XI3W.js +89 -0
  36. package/dist/{chunk-E6HDUEGK.js → chunk-6WJOHZPW.js} +5 -5
  37. package/dist/{chunk-XJQXFVXY.js → chunk-6XU5XGYV.js} +7 -8
  38. package/dist/{chunk-QOWE55RR.js → chunk-6ZN2XJFI.js} +11 -6
  39. package/dist/{chunk-4WT3T5SH.js → chunk-72OJBDRB.js} +205 -60
  40. package/dist/{chunk-GFIT3FRE.js → chunk-73O6AOAA.js} +63 -47
  41. package/dist/{chunk-DEYAI662.js → chunk-76UL4CT4.js} +60 -24
  42. package/dist/chunk-7BQK2UDV.js +13 -0
  43. package/dist/{chunk-NHYKSPL4.js → chunk-7EQU2TUN.js} +304 -119
  44. package/dist/{chunk-FS6ZE5TG.js → chunk-7FAO4ICF.js} +2 -2
  45. package/dist/{chunk-LSF76AS3.js → chunk-7MYJUJZV.js} +6 -2
  46. package/dist/{chunk-D2QMNHCC.js → chunk-7P7D6WXR.js} +11 -2
  47. package/dist/{chunk-GCSCHK5Y.js → chunk-A33MFWHW.js} +3 -3
  48. package/dist/{chunk-3C24WWUQ.js → chunk-A6XCVOC5.js} +1 -1
  49. package/dist/{chunk-O7DVW3IE.js → chunk-AFA32LHN.js} +134 -37
  50. package/dist/{chunk-WALYNKBN.js → chunk-AFGQXMKT.js} +264 -88
  51. package/dist/{chunk-ZTMZOKVC.js → chunk-AKJO6N4K.js} +3 -3
  52. package/dist/{chunk-P6TA7M3G.js → chunk-ANNQJWDX.js} +11 -11
  53. package/dist/{chunk-KFGZMHIB.js → chunk-AOIZJ7GR.js} +7 -7
  54. package/dist/chunk-B5A7X2BA.js +44 -0
  55. package/dist/{chunk-HGT3UKDW.js → chunk-BDCKHLUB.js} +16 -16
  56. package/dist/{chunk-NUCYUKVH.js → chunk-BFDPY7JM.js} +10 -3
  57. package/dist/{chunk-BK6P6KMW.js → chunk-BM2A3IGQ.js} +1 -1
  58. package/dist/{chunk-H3AEYPRP.js → chunk-BO5EJBLH.js} +249 -129
  59. package/dist/chunk-BQIADGJB.js +23 -0
  60. package/dist/{chunk-F6CVYNDY.js → chunk-BY5JGQFZ.js} +24 -7
  61. package/dist/{chunk-WDIVAU5U.js → chunk-C5SQEYTQ.js} +78 -57
  62. package/dist/{chunk-NCZWLV7T.js → chunk-CEMXGMQN.js} +2 -2
  63. package/dist/{chunk-6H3OSHEY.js → chunk-CIDOL4FO.js} +5 -5
  64. package/dist/{chunk-WAPCCJUB.js → chunk-CT4RFZO4.js} +6 -6
  65. package/dist/{chunk-7Q37C6GZ.js → chunk-CV3NC75L.js} +1 -1
  66. package/dist/{chunk-GDVR3XHT.js → chunk-D3PQAVFW.js} +23 -13
  67. package/dist/{chunk-GMJFCBR6.js → chunk-D5G67OER.js} +1 -1
  68. package/dist/{chunk-BFFPYT3Y.js → chunk-D5RAVZ5C.js} +6 -7
  69. package/dist/{chunk-FQF7GSJK.js → chunk-DJBMA4FW.js} +4 -4
  70. package/dist/{chunk-4DZFR52I.js → chunk-DPUCT567.js} +2 -2
  71. package/dist/{chunk-ZHFUMVW7.js → chunk-DYSEZVIJ.js} +18 -2
  72. package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
  73. package/dist/{chunk-YXM4W3TN.js → chunk-EDBUVDRI.js} +118 -68
  74. package/dist/{chunk-JBMWRXDS.js → chunk-EEBMK6T6.js} +6 -6
  75. package/dist/{chunk-CYKIX3IQ.js → chunk-EEL2N4Y6.js} +7 -8
  76. package/dist/{chunk-PYV6ZIR6.js → chunk-EFKFZNQC.js} +24 -18
  77. package/dist/{chunk-IOKWBUQP.js → chunk-EHNGPUTO.js} +6 -6
  78. package/dist/{chunk-ZBSNF5F7.js → chunk-EHQLLZCQ.js} +49 -22
  79. package/dist/{chunk-ONKSGT2M.js → chunk-EWR6WVOV.js} +6 -6
  80. package/dist/{chunk-MTRV3BJL.js → chunk-EY4OA4OF.js} +1005 -666
  81. package/dist/{chunk-Y3L655X6.js → chunk-F4JAGDPD.js} +6 -6
  82. package/dist/{chunk-LRCO4G7C.js → chunk-FAFUMSPR.js} +35 -26
  83. package/dist/{chunk-63L35UCI.js → chunk-FERP4WS3.js} +19 -9
  84. package/dist/{chunk-N5HN5QGH.js → chunk-FF7MV4D4.js} +1 -1
  85. package/dist/{chunk-G63WXSQP.js → chunk-FJKFYQ5I.js} +23 -18
  86. package/dist/chunk-FL3FQ2YA.js +27 -0
  87. package/dist/{chunk-YOOHNQ3L.js → chunk-FX5VZK5F.js} +4 -0
  88. package/dist/{chunk-37A6CLR5.js → chunk-G5BUGYIL.js} +70 -18
  89. package/dist/{chunk-JU7S52HI.js → chunk-G5CELEUR.js} +6 -6
  90. package/dist/{chunk-EW47LNWH.js → chunk-GADI2DU7.js} +11 -10
  91. package/dist/{chunk-F6OLHND5.js → chunk-GAFEN3H7.js} +2 -2
  92. package/dist/{chunk-EXDMYV5W.js → chunk-GC4WOLV3.js} +1 -1
  93. package/dist/{chunk-WFSOKGGA.js → chunk-GHFTKVJN.js} +1 -1
  94. package/dist/chunk-GKDUIDU6.js +138 -0
  95. package/dist/{chunk-LA5OYJ5P.js → chunk-GKQLKUMF.js} +188 -84
  96. package/dist/{chunk-LLDKKEUD.js → chunk-GS5UG6QD.js} +1 -1
  97. package/dist/{chunk-BWVNCLUS.js → chunk-H2POQ4LB.js} +5 -5
  98. package/dist/{chunk-WSJDLZSZ.js → chunk-H3EWFSWI.js} +97 -53
  99. package/dist/{chunk-XPOMQWXY.js → chunk-H6EJ63QN.js} +20 -18
  100. package/dist/{chunk-Q3E74U2W.js → chunk-HB3TH7GY.js} +3 -3
  101. package/dist/{chunk-MLGEBFEX.js → chunk-HC6WHTBX.js} +2 -2
  102. package/dist/{chunk-X7XTIM6U.js → chunk-HDSHS2QZ.js} +47 -32
  103. package/dist/{chunk-QBJDHFJJ.js → chunk-HFFKN7PA.js} +11 -6
  104. package/dist/{chunk-K5S3K6QK.js → chunk-HGPFEG2L.js} +7 -8
  105. package/dist/{chunk-7Z73MM35.js → chunk-HVX2E26J.js} +46 -26
  106. package/dist/{chunk-KAYBRD4F.js → chunk-I3DLERI7.js} +2 -2
  107. package/dist/{chunk-SPSGUFTI.js → chunk-I4NUYVP5.js} +1 -1
  108. package/dist/{chunk-OHGEDG46.js → chunk-I5ZADE2U.js} +1 -1
  109. package/dist/{chunk-CPGASWNN.js → chunk-I65OLJ2X.js} +1 -1
  110. package/dist/{chunk-LAVVML3X.js → chunk-I6QGYRY4.js} +3 -3
  111. package/dist/{chunk-N7N5NIAU.js → chunk-I7KDPCC7.js} +3 -3
  112. package/dist/{chunk-UF3HSFAE.js → chunk-IFURKTOL.js} +3 -3
  113. package/dist/{chunk-Y54LU4CU.js → chunk-IPWUBZ4P.js} +1 -1
  114. package/dist/{chunk-IQDMZ33D.js → chunk-IRXTNSZL.js} +10 -10
  115. package/dist/{chunk-GD5TYS5R.js → chunk-IUVJVMKS.js} +13 -13
  116. package/dist/{chunk-E5OEWMNX.js → chunk-IVQT2E3Y.js} +66 -36
  117. package/dist/{chunk-7DAH2E4T.js → chunk-IW3YUMPI.js} +2 -2
  118. package/dist/chunk-IXM6BAM4.js +53 -0
  119. package/dist/{chunk-XVUQMZWV.js → chunk-IZRTNCJQ.js} +5 -5
  120. package/dist/{chunk-KZH2QI6S.js → chunk-J22ETKDJ.js} +2 -2
  121. package/dist/{chunk-HJRNBKIT.js → chunk-JARJP576.js} +3 -3
  122. package/dist/{chunk-4YHZSPAJ.js → chunk-JHWDTV4K.js} +5 -1
  123. package/dist/{chunk-PQYJZMCR.js → chunk-JIH52I36.js} +79 -79
  124. package/dist/{chunk-LFUJTEJO.js → chunk-JKXJWCJ5.js} +71 -36
  125. package/dist/{chunk-2BP6X5GX.js → chunk-JMOBA5ES.js} +2 -2
  126. package/dist/{chunk-2TAK2ELB.js → chunk-JMXNXLAC.js} +5 -1
  127. package/dist/{chunk-Z5V6ZM76.js → chunk-JRRSKCGG.js} +3 -3
  128. package/dist/{chunk-IVRYF7QA.js → chunk-JSA3ESEJ.js} +1 -1
  129. package/dist/{chunk-NOCIN2EM.js → chunk-K6Y4HBK7.js} +32 -32
  130. package/dist/{chunk-WQT6HIIY.js → chunk-KAAB2DIV.js} +23 -13
  131. package/dist/{chunk-GM2HIU6C.js → chunk-KF3ZHLHQ.js} +7 -8
  132. package/dist/{chunk-3XOWXLLQ.js → chunk-KGS5Z7SL.js} +3 -3
  133. package/dist/{chunk-AIU4GZV5.js → chunk-KIXNHDXS.js} +7 -8
  134. package/dist/{chunk-ILFQ75N4.js → chunk-KJLH5EHD.js} +29 -29
  135. package/dist/{chunk-UIYXMPDW.js → chunk-KLQKHA3T.js} +6 -6
  136. package/dist/chunk-KQ2WZ6BY.js +11 -0
  137. package/dist/{chunk-5SLJGRUO.js → chunk-KUMJI5B6.js} +32 -18
  138. package/dist/{chunk-XYYRHGQI.js → chunk-L2XRUG4P.js} +7 -8
  139. package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
  140. package/dist/{chunk-RTXRIZYU.js → chunk-LFX5BERN.js} +167 -70
  141. package/dist/{chunk-D7G27EYZ.js → chunk-LGMV7ZV4.js} +4 -4
  142. package/dist/{chunk-H4VDQ7OE.js → chunk-LO3AGGE3.js} +7 -8
  143. package/dist/{chunk-UNMIUILK.js → chunk-LSKCKGCF.js} +5 -1
  144. package/dist/{chunk-CVIW2MV4.js → chunk-LSR3SBJ4.js} +78 -37
  145. package/dist/{chunk-V634AXDM.js → chunk-LUZ7HXBT.js} +1 -1
  146. package/dist/{chunk-B3AXM3MT.js → chunk-LW4ZQGVL.js} +2 -2
  147. package/dist/{chunk-H3IBJQ5A.js → chunk-M2OQK2FO.js} +1 -1
  148. package/dist/{chunk-AZM4YNRE.js → chunk-M74H7QYD.js} +2 -2
  149. package/dist/{chunk-M427S3G7.js → chunk-MOQFYJ3F.js} +6 -6
  150. package/dist/{chunk-QRVIS2QB.js → chunk-MQ5EKWIG.js} +51 -9
  151. package/dist/{chunk-LHKDZAWN.js → chunk-MSYTF3DZ.js} +10 -3
  152. package/dist/{chunk-LD4LML5P.js → chunk-MTCDGSYW.js} +9 -1
  153. package/dist/{chunk-KHRAJDBM.js → chunk-NCCDEUHD.js} +1 -1
  154. package/dist/{chunk-IGVAWAOK.js → chunk-NIDH22DI.js} +31 -7
  155. package/dist/{chunk-IF2ZABAM.js → chunk-NINK4G7U.js} +2 -2
  156. package/dist/{chunk-F5V7YFKS.js → chunk-NO7GRVUU.js} +10 -8
  157. package/dist/{chunk-EBVJCVXL.js → chunk-NRYERHEI.js} +6 -6
  158. package/dist/{chunk-OJ2BPQGQ.js → chunk-O4D27FKH.js} +1 -1
  159. package/dist/{chunk-RYPJB3RO.js → chunk-O7Y6RJ4D.js} +23 -11
  160. package/dist/{chunk-2C4SYWZ3.js → chunk-OAT6FWKL.js} +7 -8
  161. package/dist/{chunk-VL7WLE4H.js → chunk-OF7FMGH5.js} +6 -6
  162. package/dist/{chunk-V3MSLNSD.js → chunk-OKM5LYYP.js} +7 -8
  163. package/dist/{chunk-YV5KYGE5.js → chunk-OQQMDSCC.js} +1 -1
  164. package/dist/{chunk-QKWBDH2L.js → chunk-OTGNVAI4.js} +2 -2
  165. package/dist/{chunk-HFRQLMKK.js → chunk-PSYPB22T.js} +3 -3
  166. package/dist/{chunk-JXBZIJCG.js → chunk-PYGEIPPH.js} +1 -1
  167. package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
  168. package/dist/{chunk-MQYIBGZE.js → chunk-Q7VPTN5X.js} +4 -4
  169. package/dist/{chunk-XZLU3G23.js → chunk-QFIRPOXR.js} +6 -2
  170. package/dist/{chunk-QBRRJ5OR.js → chunk-QHPJ5ZKS.js} +6 -6
  171. package/dist/{chunk-R27IDIJI.js → chunk-QLWUFEKR.js} +6 -6
  172. package/dist/{chunk-COQEHO7B.js → chunk-QNLESRH6.js} +3 -1
  173. package/dist/{chunk-5UVJKB7L.js → chunk-QRZESG66.js} +40 -29
  174. package/dist/{chunk-KND4OM4B.js → chunk-QYOZ46ZQ.js} +70 -23
  175. package/dist/{chunk-HLOXWM2O.js → chunk-QZMLSK43.js} +244 -74
  176. package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
  177. package/dist/{chunk-AF7EB6N6.js → chunk-RHBQ2Q5H.js} +104 -47
  178. package/dist/{chunk-Y2CAIAUI.js → chunk-RHVP62HI.js} +6 -6
  179. package/dist/{chunk-EAR43REB.js → chunk-RMVCKO6N.js} +16 -14
  180. package/dist/chunk-RRPTQGRU.js +47 -0
  181. package/dist/{chunk-IF76JRXT.js → chunk-S2TSXUYP.js} +6 -6
  182. package/dist/{chunk-O2KKQNGW.js → chunk-SD6ENKTO.js} +7 -2
  183. package/dist/{chunk-J5PL6JLL.js → chunk-SGDWLXUC.js} +1 -1
  184. package/dist/{chunk-75TWO5B2.js → chunk-SHAAMKN7.js} +45 -24
  185. package/dist/{chunk-NB7M4KX4.js → chunk-SHCW2TCA.js} +11 -11
  186. package/dist/{chunk-3ZAH24P6.js → chunk-SSZB3VXG.js} +19 -19
  187. package/dist/chunk-SXAZDIGM.js +84 -0
  188. package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
  189. package/dist/{chunk-ODZJ4LW7.js → chunk-T3WCDDIL.js} +7 -2
  190. package/dist/{chunk-OOFSQ5AS.js → chunk-T5MBORBK.js} +1 -1
  191. package/dist/{chunk-OY2UJ4XK.js → chunk-TDDSWNGD.js} +25 -17
  192. package/dist/{chunk-5DMHMQFP.js → chunk-TGR6PRKG.js} +3 -3
  193. package/dist/{chunk-EGPXEY2K.js → chunk-TKERVBJ3.js} +7 -8
  194. package/dist/{chunk-6C64IBOG.js → chunk-TMXRTYGT.js} +10 -4
  195. package/dist/{chunk-RNIYG6PI.js → chunk-TQ5HHNM3.js} +2 -2
  196. package/dist/{chunk-LF6RTFNK.js → chunk-TWRFVW3J.js} +5 -3
  197. package/dist/{chunk-7FKY6YWU.js → chunk-TXMS7QUJ.js} +3 -3
  198. package/dist/{chunk-H5L2P2GO.js → chunk-UBXIGE2P.js} +3 -2
  199. package/dist/{chunk-7Q2WV6D2.js → chunk-UCIAHSJK.js} +2 -2
  200. package/dist/{chunk-BVYIKLQ5.js → chunk-UD6U4EF5.js} +1 -1
  201. package/dist/{chunk-4CJ6UCX4.js → chunk-UFZXZJJG.js} +5 -5
  202. package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
  203. package/dist/{chunk-CKNOLGRR.js → chunk-UP4JSNDR.js} +1 -1
  204. package/dist/{chunk-3B3K7TD5.js → chunk-USFIDSTO.js} +8 -6
  205. package/dist/{chunk-PZ46S2SY.js → chunk-V3UE3TB7.js} +2 -2
  206. package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
  207. package/dist/{chunk-BSATR6ZO.js → chunk-V62B23VC.js} +13 -1
  208. package/dist/{chunk-NA6WLZ66.js → chunk-VFLMBA2M.js} +68 -18
  209. package/dist/chunk-VJ7VBB6S.js +58 -0
  210. package/dist/{chunk-32IKJMUF.js → chunk-VM5CQ7CG.js} +3 -3
  211. package/dist/{chunk-6WZZADRL.js → chunk-VMGTNB6H.js} +6 -6
  212. package/dist/{chunk-WWIY6BBY.js → chunk-VT7PBGL2.js} +8 -8
  213. package/dist/{chunk-3L2VXXM4.js → chunk-VY2NPB2Q.js} +2 -2
  214. package/dist/{chunk-QEP3X3OV.js → chunk-VY67Q6CJ.js} +20 -20
  215. package/dist/{chunk-W45AR6EW.js → chunk-W5SVS4B6.js} +2 -2
  216. package/dist/{chunk-U7W7GYXP.js → chunk-W7Q6PLT4.js} +37 -37
  217. package/dist/{chunk-7GVYMGLK.js → chunk-WDAZ2MT4.js} +8 -4
  218. package/dist/{chunk-T5Y4HXYO.js → chunk-WE5WVQE4.js} +13 -1
  219. package/dist/chunk-WJQX7HBH.js +54 -0
  220. package/dist/{chunk-EC2PGJ64.js → chunk-WKWCNS6K.js} +6 -6
  221. package/dist/{chunk-2ALFFOKB.js → chunk-WSKZZ2ZB.js} +14 -14
  222. package/dist/{chunk-5SHI57XD.js → chunk-WZB6R2ZX.js} +7 -5
  223. package/dist/{chunk-MEMPP7VZ.js → chunk-X5OVVMZX.js} +1 -1
  224. package/dist/{chunk-UDKYY27B.js → chunk-XCROSJ2Z.js} +1 -1
  225. package/dist/{chunk-ROLR7HRB.js → chunk-XFCBH3TI.js} +3 -3
  226. package/dist/{chunk-XMN3Z43K.js → chunk-XJUZC53Y.js} +1 -1
  227. package/dist/chunk-XN7JDII2.js +2047 -0
  228. package/dist/{chunk-RUWNG2JC.js → chunk-XNV7VOIT.js} +4 -4
  229. package/dist/{chunk-KC52E5G4.js → chunk-XR7VOF2V.js} +10 -8
  230. package/dist/{chunk-Z2X4JQNY.js → chunk-XYUXB5VK.js} +8 -3
  231. package/dist/{chunk-SC42DPNV.js → chunk-Y5IKCXQR.js} +7 -8
  232. package/dist/{chunk-YLC42C3M.js → chunk-Y5WHM2Q5.js} +1 -1
  233. package/dist/{chunk-IGNBQT23.js → chunk-Y7Q3VEYC.js} +96 -5
  234. package/dist/{chunk-O6NJDRXE.js → chunk-YB6QGOCO.js} +2 -2
  235. package/dist/{chunk-AM2CG7VX.js → chunk-YBYV56FS.js} +3 -3
  236. package/dist/{chunk-O4WJWHCH.js → chunk-YCUNFAEE.js} +90 -42
  237. package/dist/{chunk-V7F4F6JA.js → chunk-YFI5PN5O.js} +5 -7
  238. package/dist/{chunk-SBR2RLEQ.js → chunk-YGPLUENN.js} +89 -59
  239. package/dist/chunk-YGZEG3JV.js +123 -0
  240. package/dist/{chunk-WG5CJGLU.js → chunk-YJGFT63R.js} +8 -3
  241. package/dist/{chunk-KEDNHCGB.js → chunk-YNHPPZ7S.js} +1 -1
  242. package/dist/{chunk-EZZ533MH.js → chunk-YO5UKKCQ.js} +1 -1
  243. package/dist/{chunk-SZXKV3BX.js → chunk-YTEJYLU7.js} +5 -1
  244. package/dist/{chunk-33FCWTGT.js → chunk-Z257SH5U.js} +1 -1
  245. package/dist/{chunk-O7W35PT3.js → chunk-Z2BDTZDT.js} +14 -12
  246. package/dist/{chunk-EQRFSVDD.js → chunk-ZDD3MJ2H.js} +1 -1
  247. package/dist/{chunk-APQPYM2Z.js → chunk-ZNX5J7D7.js} +3 -3
  248. package/dist/{chunk-VBVG6NEL.js → chunk-ZSYU6LIH.js} +5 -5
  249. package/dist/{chunk-2YNF6AHH.js → chunk-ZTSJ7NY6.js} +6 -2
  250. package/dist/chunk-ZV3SNRJI.js +122 -0
  251. package/dist/cli/index.js +1 -1
  252. package/dist/{core-6HMJHFRR.js → core-4M4RY7MX.js} +4 -1
  253. package/dist/{core-RPQBIOU4.js → core-4PW4MXWR.js} +4 -1
  254. package/dist/{core-MV6KGAUV.js → core-5S5CJHBG.js} +5 -1
  255. package/dist/{core-XMTKUXLO.js → core-7TTM4KRP.js} +6 -1
  256. package/dist/{core-EYJ3WJK4.js → core-7XKNJM7Y.js} +4 -1
  257. package/dist/{core-3IJPBNGC.js → core-A7HXVSKB.js} +5 -1
  258. package/dist/{core-CLLIG7ZU.js → core-AMWCZTOT.js} +2 -1
  259. package/dist/{core-2YTKFBNZ.js → core-AVA4XLQ2.js} +4 -1
  260. package/dist/{core-UAY2G7LN.js → core-BJZEJ63L.js} +5 -1
  261. package/dist/{core-PTRQPQTO.js → core-CCB3IXGD.js} +4 -1
  262. package/dist/{core-HJUGHAX7.js → core-D2OIGYC7.js} +2 -1
  263. package/dist/{core-NTWHFDM4.js → core-DMDAXVMY.js} +3 -1
  264. package/dist/{core-2SICIP63.js → core-EMSJRGSE.js} +3 -4
  265. package/dist/{core-MEC6A5DD.js → core-FCSA74RT.js} +2 -1
  266. package/dist/{core-CBEGB2NO.js → core-FTQBESDS.js} +3 -1
  267. package/dist/{core-GRWI22NS.js → core-GS4DXDDG.js} +4 -1
  268. package/dist/{core-CAL7YNFC.js → core-JDZDBTID.js} +2 -1
  269. package/dist/{core-H7KMWYP5.js → core-L3UR75IJ.js} +2 -1
  270. package/dist/{core-JMYMIH6Z.js → core-MAW4S3KA.js} +4 -1
  271. package/dist/{core-T4ZH3FAU.js → core-N2JEWJ7D.js} +3 -1
  272. package/dist/{core-T2KHX5LG.js → core-OBPTBKX6.js} +4 -1
  273. package/dist/{core-CTZLHGXE.js → core-OFPPRHYY.js} +5 -1
  274. package/dist/{core-QABTVASG.js → core-QFAVWFI3.js} +5 -1
  275. package/dist/{core-FX7HRKTF.js → core-QM34237W.js} +9 -1
  276. package/dist/{core-GQC6VDW5.js → core-SKMHEA4Y.js} +5 -1
  277. package/dist/{core-VBR253SM.js → core-T3OSZOVV.js} +2 -1
  278. package/dist/{core-7JKE7H32.js → core-UNX4ZV4M.js} +4 -1
  279. package/dist/core-VRVL6LIM.js +49 -0
  280. package/dist/{core-OIC5KJSD.js → core-VT35VDVS.js} +4 -1
  281. package/dist/{core-3647Z25D.js → core-VWYXK2R3.js} +4 -1
  282. package/dist/{core-YEFGEW3Z.js → core-WNT6ZMRO.js} +5 -1
  283. package/dist/{core-VMIBBHXI.js → core-WP73P4CW.js} +4 -1
  284. package/dist/{core-ULZ7XUQP.js → core-WPEYRK6Y.js} +2 -1
  285. package/dist/{core-PMYCLXT7.js → core-WXZJ7V7S.js} +2 -1
  286. package/dist/{core-KEB5PBCO.js → core-XKXDXALI.js} +3 -1
  287. package/dist/{core-OWCTIPHD.js → core-ZACFV6XR.js} +2 -1
  288. package/dist/{core-BMY7OL76.js → core-ZSERZGK6.js} +5 -1
  289. package/dist/{dataTable-2ZXK54TP.js → dataTable-7IO546LM.js} +11 -2
  290. package/dist/{engine-HGXSWGOI.js → engine-US3N6UCH.js} +51 -15
  291. package/dist/fixtures.js +3 -1
  292. package/dist/fonts.js +1 -1
  293. package/dist/geo/dach.js +1 -1
  294. package/dist/geo/de-states.js +1 -1
  295. package/dist/geo/eu27.js +1 -1
  296. package/dist/geo/europe.js +1 -1
  297. package/dist/geo/index.js +2 -2
  298. package/dist/geo/us-states.js +1 -1
  299. package/dist/geo/world.js +1 -1
  300. package/dist/index.js +32 -19
  301. package/dist/{main-PVT6FMGC.js → main-2UWKGUHR.js} +28 -13
  302. package/dist/mcp/server.js +24 -13
  303. package/dist/react/bar.js +6 -1
  304. package/dist/react/bartable.js +8 -1
  305. package/dist/react/box.js +6 -1
  306. package/dist/react/bullet.js +7 -1
  307. package/dist/react/butterfly.js +6 -1
  308. package/dist/react/choropleth.js +8 -1
  309. package/dist/react/cohort.js +9 -1
  310. package/dist/react/column.js +6 -1
  311. package/dist/react/combo.js +6 -1
  312. package/dist/react/creative.js +8 -1
  313. package/dist/react/diagram.js +8 -1
  314. package/dist/react/dimswitch.js +6 -1
  315. package/dist/react/dot.js +6 -1
  316. package/dist/react/export.js +27 -19
  317. package/dist/react/funnel.js +6 -1
  318. package/dist/react/gantt.js +8 -1
  319. package/dist/react/grid.js +5 -1
  320. package/dist/react/heatmap.js +7 -1
  321. package/dist/react/histogram.js +6 -1
  322. package/dist/react/index.js +94 -84
  323. package/dist/react/kpi.js +7 -1
  324. package/dist/react/likert.js +6 -1
  325. package/dist/react/line.js +6 -1
  326. package/dist/react/mekko.js +6 -1
  327. package/dist/react/pareto.js +6 -1
  328. package/dist/react/pie.js +6 -1
  329. package/dist/react/prepare.js +36 -20
  330. package/dist/react/pvm.js +7 -1
  331. package/dist/react/pyramid.js +6 -1
  332. package/dist/react/sankey.js +8 -1
  333. package/dist/react/scatter.js +6 -1
  334. package/dist/react/slope.js +7 -1
  335. package/dist/react/sparkline.js +7 -1
  336. package/dist/react/spec.js +17 -11
  337. package/dist/react/status.js +12 -1
  338. package/dist/react/story.js +5 -3
  339. package/dist/react/table.js +6 -1
  340. package/dist/react/theme.js +8 -3
  341. package/dist/react/tilemap.js +7 -1
  342. package/dist/react/treemap.js +7 -1
  343. package/dist/react/variance.js +6 -1
  344. package/dist/react/waffle.js +7 -1
  345. package/dist/react/waterfall.js +7 -1
  346. package/dist/rows.js +3 -2
  347. package/dist/{rowsModule-JTDPTWXG.js → rowsModule-DYDVHBAX.js} +2 -1
  348. package/dist/{schema-GLN7IHSH.js → schema-3KMU5737.js} +1 -1
  349. package/dist/{schema-NVMEOHAW.js → schema-4JRNXEZF.js} +3 -1
  350. package/dist/{schema-7CPGNCOL.js → schema-626QXX4G.js} +3 -1
  351. package/dist/{schema-BMD5JR3Y.js → schema-6PL46VXZ.js} +3 -1
  352. package/dist/{schema-2Q7IJ22V.js → schema-6V5K3J2V.js} +4 -1
  353. package/dist/{schema-3XLO43SX.js → schema-A2XUZUCV.js} +3 -1
  354. package/dist/{schema-XKY2EQFH.js → schema-CNJ4Y6CT.js} +3 -1
  355. package/dist/{schema-BKHQ3ZUH.js → schema-DHMMGDTI.js} +3 -1
  356. package/dist/{schema-XHKSGMUH.js → schema-F2Q6MH7W.js} +3 -1
  357. package/dist/{schema-GGG2VOY7.js → schema-FC6J6KZC.js} +5 -1
  358. package/dist/{schema-ZE7WUNFS.js → schema-FGE5YK3S.js} +3 -1
  359. package/dist/{schema-WZLWHOMY.js → schema-FSYDLMGD.js} +1 -1
  360. package/dist/{schema-FYULDJFB.js → schema-G5KSSI5W.js} +1 -1
  361. package/dist/{schema-V3BPW4LA.js → schema-GXOG4MXL.js} +1 -1
  362. package/dist/{schema-76XRTBCJ.js → schema-HEB6ZDI5.js} +3 -1
  363. package/dist/{schema-HIDW4BA4.js → schema-I44IDRGD.js} +1 -1
  364. package/dist/{schema-BOGTPL7F.js → schema-IFTIMTS3.js} +1 -1
  365. package/dist/{schema-KIJA53MB.js → schema-IUY7VYHJ.js} +3 -1
  366. package/dist/{schema-C7NVOQNV.js → schema-J4HCSD5C.js} +5 -2
  367. package/dist/{schema-WIZ2TZAT.js → schema-JCU6LTYD.js} +1 -1
  368. package/dist/{schema-5KHDHTIX.js → schema-JJWORI7D.js} +3 -1
  369. package/dist/{schema-BUTNGYTT.js → schema-K4V4PYBO.js} +3 -1
  370. package/dist/{schema-LHMEXFLY.js → schema-LGLQBRC4.js} +3 -1
  371. package/dist/{schema-5753NOAL.js → schema-MD22QYZU.js} +1 -1
  372. package/dist/{schema-2M3LXR35.js → schema-MGETMQYC.js} +3 -1
  373. package/dist/{schema-FZKNIAIH.js → schema-MQB6CE5V.js} +3 -1
  374. package/dist/{schema-U26KG42U.js → schema-NMIYKGHE.js} +3 -1
  375. package/dist/{schema-MT6NA5AL.js → schema-NOBNFD2F.js} +3 -1
  376. package/dist/{schema-3OLBUVMZ.js → schema-OXO2XY4Y.js} +1 -1
  377. package/dist/{schema-G2PLJCYL.js → schema-PHIHMDVB.js} +1 -1
  378. package/dist/{schema-UHHFTVGS.js → schema-UXWKA3PI.js} +3 -1
  379. package/dist/{schema-J53LCIY3.js → schema-WBOPCTPC.js} +1 -1
  380. package/dist/{schema-TA3MSAPQ.js → schema-WFGDVBJK.js} +1 -1
  381. package/dist/{schema-MUTAVQMI.js → schema-WX2RS4OU.js} +3 -1
  382. package/dist/{schema-XATDKZPW.js → schema-XIHAKX3B.js} +18 -1
  383. package/dist/{schema-LEQNLBNG.js → schema-XRSORYBI.js} +3 -1
  384. package/dist/{schema-FNTAAXQ3.js → schema-YDZCGL56.js} +3 -1
  385. package/dist/{specValidation-X5XJBPTP.js → specValidation-XGELWQUU.js} +2 -1
  386. package/dist/theme.js +5 -1
  387. package/dist/types/core/charts/bartable/types.d.ts +14 -1
  388. package/dist/types/core/charts/box/types.d.ts +5 -1
  389. package/dist/types/core/charts/choropleth/layout.d.ts +1 -5
  390. package/dist/types/core/charts/choropleth/types.d.ts +19 -0
  391. package/dist/types/core/charts/cohort/types.d.ts +16 -3
  392. package/dist/types/core/charts/creative/types.d.ts +21 -0
  393. package/dist/types/core/charts/dimswitch/compile.d.ts +15 -2
  394. package/dist/types/core/charts/dimswitch/types.d.ts +24 -1
  395. package/dist/types/core/charts/gantt/calendar.d.ts +20 -0
  396. package/dist/types/core/charts/gantt/columns.d.ts +56 -0
  397. package/dist/types/core/charts/gantt/layout.d.ts +8 -2
  398. package/dist/types/core/charts/gantt/model.d.ts +296 -0
  399. package/dist/types/core/charts/grid/metricStack.d.ts +9 -0
  400. package/dist/types/core/charts/grid/metricStackSchema.d.ts +13 -0
  401. package/dist/types/core/charts/histogram/types.d.ts +8 -0
  402. package/dist/types/core/charts/likert/layout.d.ts +10 -8
  403. package/dist/types/core/charts/pvm/types.d.ts +9 -1
  404. package/dist/types/core/charts/pyramid/types.d.ts +3 -1
  405. package/dist/types/core/charts/sankey/types.d.ts +5 -1
  406. package/dist/types/core/charts/status/layout.d.ts +3 -0
  407. package/dist/types/core/charts/table/resolve.d.ts +14 -0
  408. package/dist/types/core/footer.d.ts +2 -0
  409. package/dist/types/core/format.d.ts +4 -0
  410. package/dist/types/core/formatSpec.d.ts +10 -0
  411. package/dist/types/core/frame.d.ts +1 -1
  412. package/dist/types/core/geo/types.d.ts +2 -0
  413. package/dist/types/core/geometry.d.ts +1 -1
  414. package/dist/types/core/label/categoryRow.d.ts +1 -1
  415. package/dist/types/core/normalize/shared.d.ts +2 -0
  416. package/dist/types/core/registry.d.ts +4 -5
  417. package/dist/types/core/request.d.ts +6 -0
  418. package/dist/types/core/schema/capability.d.ts +20 -7
  419. package/dist/types/core/schema/generatedColumns.d.ts +168 -0
  420. package/dist/types/core/text.d.ts +16 -0
  421. package/dist/types/core/themeGeometry.d.ts +9 -0
  422. package/dist/types/core/timeAxis.d.ts +6 -1
  423. package/dist/types/core/types/diagram.d.ts +7 -0
  424. package/dist/types/core/types/options.d.ts +83 -12
  425. package/dist/types/core/types/table.d.ts +23 -3
  426. package/dist/types/index.d.ts +2 -0
  427. package/dist/types/react/barrelCharts.d.ts +16 -5
  428. package/dist/types/react/charts/butterfly.d.ts +2 -2
  429. package/dist/types/react/charts/dot.d.ts +7 -1
  430. package/dist/types/react/charts/pareto.d.ts +4 -1
  431. package/dist/types/react/charts/variance.d.ts +3 -1
  432. package/dist/types/react/hover/labelCard.d.ts +18 -3
  433. package/dist/types/react/prepare.d.ts +7 -1
  434. package/dist/types/theme.d.ts +2 -0
  435. package/dist/validate.js +16 -5
  436. package/docs/manual.md +31 -3
  437. package/docs/reference/bar.md +3 -0
  438. package/docs/reference/bartable.md +16 -1
  439. package/docs/reference/box.md +8 -1
  440. package/docs/reference/bullet.md +12 -1
  441. package/docs/reference/butterfly.md +7 -1
  442. package/docs/reference/choropleth.md +15 -2
  443. package/docs/reference/cohort.md +25 -5
  444. package/docs/reference/column.md +1 -0
  445. package/docs/reference/combo.md +1 -0
  446. package/docs/reference/creative.md +13 -0
  447. package/docs/reference/diagram.md +5 -0
  448. package/docs/reference/dimswitch.md +50 -32
  449. package/docs/reference/dot.md +7 -2
  450. package/docs/reference/fixtures.md +57 -0
  451. package/docs/reference/funnel.md +5 -0
  452. package/docs/reference/gantt.md +10 -2
  453. package/docs/reference/grid.md +9 -2
  454. package/docs/reference/heatmap.md +6 -0
  455. package/docs/reference/histogram.md +2 -2
  456. package/docs/reference/kpi.md +5 -1
  457. package/docs/reference/likert.md +8 -0
  458. package/docs/reference/line.md +1 -1
  459. package/docs/reference/options.md +4 -3
  460. package/docs/reference/pareto.md +1 -1
  461. package/docs/reference/pvm.md +7 -1
  462. package/docs/reference/pyramid.md +6 -0
  463. package/docs/reference/react.md +1 -2
  464. package/docs/reference/sankey.md +6 -2
  465. package/docs/reference/slope.md +6 -0
  466. package/docs/reference/sparkline.md +1 -1
  467. package/docs/reference/status.md +7 -1
  468. package/docs/reference/table.md +16 -4
  469. package/docs/reference/tilemap.md +2 -2
  470. package/docs/reference/treemap.md +1 -1
  471. package/docs/reference/waffle.md +1 -1
  472. package/docs/reference/waterfall.md +4 -1
  473. package/package.json +1 -1
  474. package/dist/chunk-FI5EXISD.js +0 -27
  475. package/dist/chunk-O36WX56O.js +0 -13
  476. package/dist/chunk-YGTNVZJE.js +0 -89
  477. package/dist/chunk-ZGHBDMYF.js +0 -24
  478. package/dist/chunk-ZLYQWUNR.js +0 -1794
  479. package/dist/core-SKRADU7T.js +0 -41
@@ -1,39 +1,46 @@
1
1
  import {
2
2
  liftOrFallback
3
- } from "./chunk-APQPYM2Z.js";
3
+ } from "./chunk-ZNX5J7D7.js";
4
+ import {
5
+ nameTrackRefusals,
6
+ overrideIgnored,
7
+ widthCapped,
8
+ widthFloored,
9
+ yieldingWidths
10
+ } from "./chunk-YGZEG3JV.js";
4
11
  import {
5
12
  fixedBarRow
6
- } from "./chunk-SA46CNMS.js";
13
+ } from "./chunk-ED7GLWTF.js";
7
14
  import {
8
15
  roundingUnavailable,
9
16
  shareRoundingNotes,
10
17
  sumConsistentShares
11
- } from "./chunk-UF3HSFAE.js";
18
+ } from "./chunk-IFURKTOL.js";
12
19
  import {
13
20
  accumulateStack
14
- } from "./chunk-3B3K7TD5.js";
21
+ } from "./chunk-USFIDSTO.js";
15
22
  import {
16
23
  digitSeat,
17
24
  digitSeatEdge
18
- } from "./chunk-SFG7NG23.js";
25
+ } from "./chunk-5HTGSB6Y.js";
19
26
  import {
20
27
  warnIncompleteComposition
21
- } from "./chunk-KAYBRD4F.js";
28
+ } from "./chunk-I3DLERI7.js";
22
29
  import {
23
30
  rowLabelBand
24
- } from "./chunk-HFRQLMKK.js";
31
+ } from "./chunk-PSYPB22T.js";
25
32
  import {
26
33
  fittedLabel
27
- } from "./chunk-ROLR7HRB.js";
34
+ } from "./chunk-XFCBH3TI.js";
28
35
  import {
29
36
  chartPalette
30
- } from "./chunk-7DAH2E4T.js";
37
+ } from "./chunk-IW3YUMPI.js";
31
38
  import {
32
39
  yearSpanFromLabels
33
- } from "./chunk-N5TZL74Y.js";
40
+ } from "./chunk-3LNVEE5Z.js";
34
41
  import {
35
42
  structureCount
36
- } from "./chunk-UDKYY27B.js";
43
+ } from "./chunk-XCROSJ2Z.js";
37
44
  import {
38
45
  fieldHeadFont,
39
46
  fieldHeadText,
@@ -41,10 +48,13 @@ import {
41
48
  headRule,
42
49
  totalGround,
43
50
  totalRule
44
- } from "./chunk-SPSGUFTI.js";
51
+ } from "./chunk-I4NUYVP5.js";
45
52
  import {
46
53
  tableRuleInk
47
54
  } from "./chunk-Z2MGTKDR.js";
55
+ import {
56
+ generatedIdWarnings
57
+ } from "./chunk-SXAZDIGM.js";
48
58
  import {
49
59
  CARD_CLASS_WIDTH,
50
60
  calendarCategories,
@@ -53,7 +63,7 @@ import {
53
63
  heightOmitted,
54
64
  rowDrivenHeight,
55
65
  rowSizing
56
- } from "./chunk-WALYNKBN.js";
66
+ } from "./chunk-AFGQXMKT.js";
57
67
  import {
58
68
  PRIORITY,
59
69
  authoredNotes,
@@ -69,17 +79,17 @@ import {
69
79
  normalizeLegendOption,
70
80
  solveFrame,
71
81
  solveLabels
72
- } from "./chunk-2ALFFOKB.js";
82
+ } from "./chunk-WSKZZ2ZB.js";
73
83
  import {
74
84
  disclosureNote,
75
85
  footerType,
76
86
  quietMethodNote
77
- } from "./chunk-5SHI57XD.js";
87
+ } from "./chunk-WZB6R2ZX.js";
78
88
  import {
79
89
  nonAdditiveFormat,
80
90
  roundedNumber,
81
91
  seriesRasterFormatter
82
- } from "./chunk-GDVR3XHT.js";
92
+ } from "./chunk-D3PQAVFW.js";
83
93
  import {
84
94
  cagr,
85
95
  chartStrings,
@@ -89,7 +99,7 @@ import {
89
99
  numberRange,
90
100
  printedShare,
91
101
  shareSetFormatter
92
- } from "./chunk-LHKDZAWN.js";
102
+ } from "./chunk-MSYTF3DZ.js";
93
103
  import {
94
104
  canvasMargin,
95
105
  dashToken,
@@ -104,14 +114,14 @@ import {
104
114
  textScaleOf,
105
115
  themeForWidth,
106
116
  withSegmentSeams
107
- } from "./chunk-HJRNBKIT.js";
117
+ } from "./chunk-JARJP576.js";
108
118
  import {
109
119
  NormalizeError,
110
120
  TARGET_SIZE,
111
121
  accessibleTitle,
112
122
  resolveSize,
113
123
  resolveSubtitle
114
- } from "./chunk-YOOHNQ3L.js";
124
+ } from "./chunk-FX5VZK5F.js";
115
125
  import {
116
126
  maxOf,
117
127
  minOf,
@@ -120,7 +130,7 @@ import {
120
130
  import {
121
131
  defaultMeasurer,
122
132
  splitNameBreaks
123
- } from "./chunk-SNQ7D5R7.js";
133
+ } from "./chunk-UIHGGWES.js";
124
134
 
125
135
  // src/core/strings/bartable.ts
126
136
  var EN = {
@@ -370,6 +380,36 @@ function combinedShareNotes(options, rows, panels, locale, authored) {
370
380
  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) }))];
371
381
  });
372
382
  }
383
+ function alignedIn(left, right, w, align) {
384
+ return align === "right" ? right - w : Math.min(align === "left" ? left : left + (right - left - w) / 2, right - w);
385
+ }
386
+ function columnKeyWarnings(data, options, compact, sharedScale) {
387
+ let warnings = [], panelIds = data.panels.map((panel) => panel.id), columnIds = (data.columns ?? []).map((column) => column.id), overrides = options.columnOverrides ?? {};
388
+ pushAll(warnings, generatedIdWarnings("bartable", "columnOverrides", options.columnOverrides, ["label", ...columnIds, ...panelIds])), pushAll(warnings, generatedIdWarnings("bartable", "columnOrder", options.columnOrder, [...columnIds.length > 0 ? ["numbers"] : [], "panels"])), pushAll(warnings, nameTrackRefusals(overrides, [...columnIds, ...panelIds]));
389
+ for (let id of panelIds)
390
+ if (overrides[id]?.width !== void 0 && sharedScale ? warnings.push(overrideIgnored(id, "width", "under sharedScale or a cascade the one scale sets the panel width")) : overrides[id]?.width !== void 0 && compact && warnings.push(overrideIgnored(id, "width", "the compact form draws each panel across the whole width")), compact && panelIds.length > 1) for (let key of ["headAlign", "align"]) overrides[id]?.[key] !== void 0 && warnings.push(overrideIgnored(id, key, "the compact form names several panels in a key"));
391
+ if (compact) {
392
+ for (let key of ["width", "align"]) overrides.label?.[key] !== void 0 && warnings.push(overrideIgnored("label", key, "the compact form sets each row name above its bar"));
393
+ options.columnOrder !== void 0 && warnings.push({ code: "option-ignored", severity: "warn", field: ["options", "columnOrder"], message: "columnOrder has no effect: the compact form keeps the number columns at the right edge", suggest: "Remove columnOrder, or draw the chart wider.", fix: [{ op: "remove", path: "/options/columnOrder" }] });
394
+ }
395
+ if (options.total === !1 && options.totalPosition !== void 0 && warnings.push({ code: "option-ignored", severity: "warn", field: ["options", "totalPosition"], message: "totalPosition has no effect: total is false, so no Total row is drawn", suggest: "Remove totalPosition, or set total to true.", fix: [{ op: "remove", path: "/options/totalPosition" }] }), options.columnHeads === !1) {
396
+ let units = [...new Set(data.panels.flatMap((panel) => panel.unit ?? []))];
397
+ units.length > 0 && warnings.push({
398
+ code: "column-heads-unit-hidden",
399
+ severity: "warn",
400
+ field: ["options", "columnHeads"],
401
+ message: `columnHeads: false removes the only print of the unit ${units.join(", ")}`,
402
+ suggest: "Name the unit in the subtitle or a footnote."
403
+ }), panelIds.length + columnIds.length > 1 && warnings.push({
404
+ code: "column-heads-names-hidden",
405
+ severity: "warn",
406
+ field: ["options", "columnHeads"],
407
+ message: "columnHeads: false removes the only names of the number columns and panels",
408
+ suggest: "Name them in the subtitle or a footnote, or keep the heads."
409
+ });
410
+ }
411
+ return warnings;
412
+ }
373
413
  var CASCADE_LIFT = /* @__PURE__ */ Symbol("bartableCascadeLift");
374
414
  function layoutBarTable(authored, options = {}) {
375
415
  if (options.variant !== "cascade" || options[CASCADE_LIFT] !== void 0) return layoutBarTableOnce(authored, options);
@@ -387,7 +427,7 @@ function layoutBarTableOnce(authored, options) {
387
427
  throw new NormalizeError("bartable-cascade", "options.segmentValues", "segmentValues sets the part values of variant 'panels', and a cascade bar is one part that prints its own value", "set variant 'panels', or drop segmentValues");
388
428
  let cascadeOptions = options.variant === "cascade" ? options.cascade ?? {} : void 0;
389
429
  cascadeOptions && checkCascade(split.data, cascadeOptions.growth);
390
- let warnings = [], data = withAggregates(split.data, options, warnings);
430
+ let warnings = [], data = withAggregates(split.data, options, warnings), overrides = options.columnOverrides ?? {}, headsDrawn = options.columnHeads !== !1, valuesPrinted = options.labels?.point !== !1;
391
431
  if (options.rounding === "sum-consistent" && cascadeOptions?.share === !1 && !options.combinedShare && cascadeOptions.growth?.measure !== "share-change")
392
432
  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");
393
433
  if (options.rounding === "sum-consistent" && !cascadeOptions)
@@ -422,7 +462,7 @@ function layoutBarTableOnce(authored, options) {
422
462
  ], { fmt, spec } = seriesRasterFormatter(panel.format ?? options.format, raster, locale, panel.unit, options.target), endTexts = rowSums.map((sum, r) => {
423
463
  let end = ranges[r];
424
464
  return sum === null ? stateGlyph[blankState(panel, r) ?? "none"] : end ? range(fmt(end.low), fmt(end.high)) : fmt(sum);
425
- }), 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();
465
+ }), 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, headOverride = overrides[panel.id]?.label, repeatsSubtitle = headOverride === void 0 && data.panels.length === 1 && panel.unit !== void 0 && label2.trim().toLowerCase() === (resolveSubtitle(options.subtitle)?.measure ?? "").trim().toLowerCase();
426
466
  return {
427
467
  panel,
428
468
  stacks,
@@ -434,10 +474,10 @@ function layoutBarTableOnce(authored, options) {
434
474
  spec,
435
475
  endTexts,
436
476
  totalText,
437
- head: repeatsSubtitle ? panel.unit : panel.unit ? `${label2}, ${panel.unit}` : label2,
477
+ head: headOverride ?? (repeatsSubtitle ? panel.unit : panel.unit ? `${label2}, ${panel.unit}` : label2),
438
478
  // A period panel (cascade, or a year alone) heads with a category value and keeps its case and face;
439
479
  // a unit alone keeps its case.
440
- fieldHead: !repeatsSubtitle && cascadeOptions === void 0 && !isNumberAlone(label2),
480
+ fieldHead: !repeatsSubtitle && cascadeOptions === void 0 && !isNumberAlone(headOverride ?? label2),
441
481
  unitHead: repeatsSubtitle,
442
482
  max: Math.max(0, maxOf(stacks.map((stack, r) => ranges[r]?.high ?? stack.positive)))
443
483
  };
@@ -478,7 +518,7 @@ function layoutBarTableOnce(authored, options) {
478
518
  lift: options[CASCADE_LIFT] ?? "full"
479
519
  }) : void 0;
480
520
  cascade && pushAll(warnings, cascade.warnings);
481
- 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)), partsPrinted = panels.map((entry) => !cascade && series.length > 1 && options.segmentValues !== !1 && entry.spec.decimals <= PART_DECIMALS), partsMissTotal = panels.some((entry, p) => partsPrinted[p] && entry.rowSums.some((sum, r) => {
521
+ 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)), partsPrinted = panels.map((entry) => !cascade && series.length > 1 && options.segmentValues !== !1 && valuesPrinted && entry.spec.decimals <= PART_DECIMALS), partsMissTotal = panels.some((entry, p) => partsPrinted[p] && entry.rowSums.some((sum, r) => {
482
522
  if (sum === null || entry.ranges[r]) return !1;
483
523
  let rounded = series.reduce((acc, s) => acc + roundedNumber(Math.max(0, entry.panel.values[s.id]?.[r] ?? 0), entry.spec), 0);
484
524
  return Math.abs(rounded - roundedNumber(sum, entry.spec)) > 1e-9 * Math.max(1, Math.abs(sum));
@@ -518,43 +558,72 @@ function layoutBarTableOnce(authored, options) {
518
558
  measure
519
559
  },
520
560
  occupied
521
- ), 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) => {
561
+ ), 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";
562
+ pushAll(warnings, columnKeyWarnings(data, options, compact, sharedScale || cascadeOptions !== void 0));
563
+ let interleaved = compact && panels.length > 1, fitRows = (maxW, lines) => {
522
564
  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)));
523
565
  for (let n = lines + 1; cut(band) && n <= most; n++) band = fit(maxW, n);
524
566
  return cut(band) && (band = fit(Math.max(maxW, maxOf(rows.flatMap((row) => pieces(row.label).map((word) => width(word, cellFont))))), most)), band;
525
- }, { 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) => {
526
- let name = entry.column.label ?? entry.column.id, head2 = fieldText(name), overhang = i === 0 && !compact ? labelTrack : 0, inner = Math.max(
567
+ }, panelsFirst = !compact && (() => {
568
+ let order = options.columnOrder ?? [], at = (id) => {
569
+ let i = order.indexOf(id);
570
+ return i < 0 ? id === "numbers" ? order.length : order.length + 1 : i;
571
+ };
572
+ return at("panels") < at("numbers");
573
+ })(), weights = panels.map((entry) => entry.panel.weight ?? 1), weightSum = weights.reduce((sum, weight) => sum + weight, 0), endReserves = panels.map((entry) => {
574
+ let texts2 = valuesPrinted ? entry.endTexts : entry.endTexts.filter((_, r) => entry.rowSums[r] === null);
575
+ return texts2.length === 0 ? 0 : maxOf(texts2.map((text) => width(text, cellFont))) + END_GAP;
576
+ }), 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(headsDrawn ? width(shareHead, fieldFont) : 0, maxOf(cascade.panels[p].shareTexts.map((text) => width(text, cellFont)))) : 0), bracketWs = panels.map((_, p) => {
577
+ let combined = cascade?.panels[p].combined;
578
+ return combined ? BRACKET_GAP + BRACKET_ARM + BRACKET_TEXT_GAP + width(combined.text, totalFont) : 0;
579
+ }), growth = cascade?.growth, growthHead = growth ? fieldText(growth.head) : "", growthOverhang = !compact && !(panelsFirst && numberColumns.length > 0) ? bracketWs[panels.length - 1] : 0, growthInner = growth ? Math.max(maxOf(growth.texts.map((text, r) => width(text, r === rows.length ? totalFont : cellFont))), ...interleaved || growthOverhang > 0 || !headsDrawn ? [] : growthHead.split(/\s+/).map((word) => width(word, fieldFont))) : 0, growthFit = (w) => fitText(growthHead, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
580
+ for (; growth && headsDrawn && !interleaved && growthFit(growthInner + growthOverhang).title !== void 0 && growthInner < width(growthHead, fieldFont); ) growthInner += 4;
581
+ let growthW = growth ? PANEL_GAP + growthInner : 0, 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), extrasSum = extras.reduce((sum, w) => sum + w, 0), spanSum = spans.reduce((sum, v) => sum + v, 0), minTracks = panels.map((entry, p) => cascade ? Math.max(MIN_TRACK, ...(headsDrawn ? entry.head.split(/\s+/) : []).map((word) => width(word, headFont)), totalWidths[p] + 2 * END_GAP) : Math.max(MIN_RUN, totalWidths[p] - endReserves[p])), 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), words = (label2) => label2.split(/\s+/).flatMap(splitNameBreaks), labelWidth = compact ? void 0 : overrides.label?.width, valueFloor = (entry) => CELL_AIR + Math.max(
582
+ maxOf(entry.texts.map((text) => width(text, cellFont))),
583
+ showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0
584
+ ), labelRoom = plot.w - growthW - panelsW - numberColumns.reduce((sum, entry) => sum + valueFloor(entry), 0), { labels: rowText, width: rowBandW } = compact ? { labels: [], width: 0 } : fitRows(labelWidth === void 0 ? plot.w * 0.3 : Math.max(1, Math.min(labelWidth, labelRoom) - LABEL_GAP), 3), labelFloor = Math.max(rowBandW, showTotal ? width(totalLabel, totalFont) : 0) + LABEL_GAP;
585
+ labelWidth !== void 0 && labelWidth > Math.max(labelRoom, labelFloor) && warnings.push(widthCapped("bartable", "label")), labelWidth !== void 0 && labelWidth < labelFloor && warnings.push(widthFloored("bartable", "label"));
586
+ let labelTrack = compact ? 0 : labelWidth === void 0 ? labelFloor : Math.max(labelFloor, Math.min(labelWidth, labelRoom)), labelTrackFloor = labelWidth === void 0 ? labelTrack : Math.max(maxOf(rows.flatMap((row) => words(row.label).map((word) => width(word, cellFont)))), showTotal ? width(totalLabel, totalFont) : 0) + LABEL_GAP, x = plot.x + labelTrack, numberNaturals = numberColumns.map((entry, i) => {
587
+ let name = overrides[entry.column.id]?.label ?? entry.column.label ?? entry.column.id, head2 = fieldText(name), overhang = i === 0 && !compact && !panelsFirst && headsDrawn ? labelTrack : 0, inner = Math.max(
527
588
  maxOf(entry.texts.map((text) => width(text, cellFont))),
528
589
  showTotal && entry.totalText !== void 0 ? width(entry.totalText, totalFont) : 0,
529
- ...overhang > 0 ? [] : head2.split(/\s+/).map((word) => width(word, fieldFont))
590
+ ...overhang > 0 || !headsDrawn ? [] : head2.split(/\s+/).map((word) => width(word, fieldFont))
530
591
  ), headFitAt = (w) => fitText(head2, fieldFont, w, 3, measure, { target: options.target, typeRole: "axis" });
531
- for (; (overhang > 0 || interleaved && cascade?.growth) && headFitAt(inner + overhang).title !== void 0 && inner < width(head2, fieldFont); ) inner += 4;
532
- let track = { ...entry, name, head: head2, headFit: headFitAt(inner + overhang), right: x + CELL_AIR + inner };
592
+ for (; headsDrawn && (overhang > 0 || interleaved && cascade?.growth) && headFitAt(inner + overhang).title !== void 0 && inner < width(head2, fieldFont); ) inner += 4;
593
+ return { entry, name, head: head2, overhang, inner, headFitAt };
594
+ }), numberSurplus = numberNaturals.map((natural) => {
595
+ let asked = overrides[natural.entry.column.id]?.width;
596
+ return asked !== void 0 && asked < CELL_AIR + natural.inner && warnings.push(widthFloored("bartable", natural.entry.column.id)), asked === void 0 ? 0 : Math.max(0, asked - CELL_AIR - natural.inner);
597
+ }), numberSurplusSum = numberSurplus.reduce((sum, value) => sum + value, 0), numberRoom = Math.max(0, plot.w - growthW - (compact ? LABEL_GAP + MIN_COMPACT_LABEL : labelTrack + panelsW) - numberNaturals.reduce((sum, natural) => sum + CELL_AIR + natural.inner, 0)), numberScale = numberSurplusSum > numberRoom ? numberRoom / numberSurplusSum : 1, numberTracks = numberNaturals.map(({ entry, name, head: head2, overhang, inner: natural, headFitAt }, i) => {
598
+ numberScale < 1 && numberSurplus[i] > 0 && warnings.push(widthCapped("bartable", entry.column.id));
599
+ let inner = numberSurplus[i] > 0 ? natural + numberSurplus[i] * numberScale : natural, track = { ...entry, name, head: head2, inner, headFit: headFitAt(inner + overhang), right: x + CELL_AIR + inner };
533
600
  return x += CELL_AIR + inner, track;
534
- }), 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) => {
535
- let combined = cascade?.panels[p].combined;
536
- return combined ? BRACKET_GAP + BRACKET_ARM + BRACKET_TEXT_GAP + width(combined.text, totalFont) : 0;
537
- }), 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" });
538
- for (; growth && !interleaved && growthFit(growthInner + growthOverhang).title !== void 0 && growthInner < width(growthHead, fieldFont); ) growthInner += 4;
539
- let growthW = growth ? PANEL_GAP + growthInner : 0, sideW = compact ? fixedW + growthW : 0;
601
+ }), fixedW = x - plot.x, minFixedW = labelWidth === void 0 && numberSurplusSum === 0 ? fixedW : labelTrackFloor + numberNaturals.reduce((sum, natural) => sum + CELL_AIR + natural.inner, 0), sideW = compact ? fixedW + growthW : 0, minSideW = compact ? minFixedW + growthW : 0;
540
602
  compact && (numberTracks.forEach((track) => {
541
603
  track.right += plot.w - sideW;
542
604
  }), { labels: rowText } = fitRows(Math.max(MIN_COMPACT_LABEL, plot.w - sideW - LABEL_GAP), 2));
543
- 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 = (() => {
544
- 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);
605
+ let compactW = plot.w - (cascade ? sideW : 0), restW = Math.max(0, plot.w - fixedW - growthW), 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])), panelWidth = (p) => compact || sharedScale || cascade ? void 0 : overrides[panels[p].panel.id]?.width, runRoom = Math.max(0, restW - panels.reduce((sum, _entry, p) => sum + PANEL_GAP + endReserves[p], 0)), runSurplus = panels.map((entry, p) => {
606
+ let asked = panelWidth(p);
607
+ return asked !== void 0 && asked < PANEL_GAP + endReserves[p] + runFloors[p] && warnings.push(widthFloored("bartable", entry.panel.id)), asked === void 0 ? 0 : Math.max(0, asked - PANEL_GAP - endReserves[p] - runFloors[p]);
608
+ }), runSurplusSum = runSurplus.reduce((sum, value) => sum + value, 0), runSpare = Math.max(0, runRoom - runFloors.reduce((sum, floor) => sum + floor, 0)), runScale = runSurplusSum > runSpare ? runSpare / runSurplusSum : 1;
609
+ panels.forEach((entry, p) => {
610
+ runScale < 1 && runSurplus[p] > 0 && warnings.push(widthCapped("bartable", entry.panel.id));
611
+ });
612
+ let heldRun = (p) => runFloors[p] + runSurplus[p] * runScale, ownRuns = (() => {
613
+ let total = runRoom, held = new Set(panels.flatMap((_, p) => panelWidth(p) === void 0 ? [] : [p])), runs = panels.map(() => 0);
545
614
  for (let pass = 0; pass <= panels.length; pass++) {
546
- let free = total - [...held].reduce((sum, p) => sum + runFloors[p], 0), freeWeight = weights.reduce((sum, weight, p) => held.has(p) ? sum : sum + weight, 0);
547
- runs = panels.map((_entry, p) => held.has(p) ? runFloors[p] : freeWeight > 0 ? Math.max(0, free) * weights[p] / freeWeight : 0);
615
+ let free = total - [...held].reduce((sum, p) => sum + heldRun(p), 0), freeWeight = weights.reduce((sum, weight, p) => held.has(p) ? sum : sum + weight, 0);
616
+ runs = panels.map((_entry, p) => held.has(p) ? heldRun(p) : freeWeight > 0 ? Math.max(0, free) * weights[p] / freeWeight : 0);
548
617
  let low = panels.map((_entry, p) => p).filter((p) => !held.has(p) && runs[p] < runFloors[p] - 1e-9);
549
618
  if (low.length === 0 || held.size + low.length >= panels.length) break;
550
619
  low.forEach((p) => held.add(p));
551
620
  }
552
621
  return runs;
553
- })(), 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, periodNameFull = interleaved && cascade ? maxOf(panels.map((entry) => width(entry.head, headFont))) : 0, periodNameW = interleaved && cascade ? Math.min(periodNameFull, plot.w / 3) + END_GAP : 0, interleavedRun = (p) => Math.max(0, cascade ? plot.w - growthW - shareColW - periodNameW : 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) => {
622
+ })(), 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, periodNameFull = interleaved && cascade && headsDrawn ? maxOf(panels.map((entry) => width(entry.head, headFont))) : 0, periodNameW = interleaved && cascade && headsDrawn ? Math.min(periodNameFull, plot.w / 3) + END_GAP : 0, interleavedRun = (p) => Math.max(0, cascade ? plot.w - growthW - shareColW - periodNameW : 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)), panelsStart = x = panelsFirst ? plot.x + labelTrack : x, panelTracks = panels.map((entry, p) => {
554
623
  let face = entry.fieldHead || entry.unitHead ? fieldFont : headFont, head2 = entry.fieldHead ? fieldText(entry.head) : entry.head;
555
624
  if (interleaved) {
556
625
  let scale2 = sharedScale ? Number.isFinite(interleavedK) ? interleavedK : 0 : spans[p] > 0 ? interleavedRun(p) / spans[p] : 0, headFit2 = cascade ? fitText(head2, face, Math.max(1, periodNameW - END_GAP), 1, measure, { target: options.target, typeRole: "axis" }) : fitText(head2, face, keyTextW, 2, measure, { target: options.target, typeRole: "axis" });
557
- return { ...entry, head: head2, face, origin: plot.x, scale: scale2, trackW: spans[p] * scale2, shareRight: commonShareRight, headFit: headFit2 };
626
+ return { ...entry, head: head2, face, origin: plot.x, scale: scale2, trackW: spans[p] * scale2, shareRight: commonShareRight, headFit: headFit2, headW: keyTextW };
558
627
  }
559
628
  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;
560
629
  compact || (x += w);
@@ -563,8 +632,12 @@ function layoutBarTableOnce(authored, options) {
563
632
  let before = headFit.lines[headFit.lines.length - 2].split(" "), last = `${before.pop()} ${entry.panel.unit}`;
564
633
  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));
565
634
  }
566
- return { ...entry, head: head2, face, origin, scale, trackW, shareRight: origin + trackW + SHARE_GAP + shareWs[p], headFit };
567
- }), growthTrack = growth ? { right: plot.x + plot.w, headFit: growthFit(interleaved ? Math.max(growthInner, plot.w * 0.4) : growthInner + growthOverhang) } : void 0, overlaps = (left, right, otherLeft, otherRight) => left < otherRight + 1 && right + 1 > otherLeft, shareBox = interleaved && growthTrack && showShare ? measure(shareHead, fieldFont) : void 0, shareRight = panelTracks[0]?.shareRight ?? 0, shareLift = shareBox ? Math.max(0, maxOf(numberTracks.filter((track) => overlaps(shareRight - shareBox.width, shareRight, track.right - track.headFit.w, track.right)).map((track) => track.headFit.h + 2))) : 0, growthLift = interleaved && growthTrack ? Math.max(
635
+ return { ...entry, head: head2, face, origin, scale, trackW, shareRight: origin + trackW + SHARE_GAP + shareWs[p], headFit, headW };
636
+ });
637
+ panelsFirst && numberTracks.forEach((track) => {
638
+ track.right += x - panelsStart;
639
+ });
640
+ let growthTrack = growth ? { right: plot.x + plot.w, headFit: growthFit(interleaved ? Math.max(growthInner, plot.w * 0.4) : growthInner + growthOverhang) } : void 0, overlaps = (left, right, otherLeft, otherRight) => left < otherRight + 1 && right + 1 > otherLeft, shareBox = interleaved && growthTrack && showShare ? measure(shareHead, fieldFont) : void 0, shareRight = panelTracks[0]?.shareRight ?? 0, shareLift = shareBox ? Math.max(0, maxOf(numberTracks.filter((track) => overlaps(shareRight - shareBox.width, shareRight, track.right - track.headFit.w, track.right)).map((track) => track.headFit.h + 2))) : 0, growthLift = interleaved && growthTrack ? Math.max(
568
641
  showShare && growthTrack.headFit.w > growthInner ? lineBox(headFont) + 2 : 0,
569
642
  maxOf(numberTracks.filter((track) => overlaps(growthTrack.right - growthTrack.headFit.w, growthTrack.right, track.right - track.headFit.w, track.right)).map((track) => track.headFit.h + 2)),
570
643
  shareBox && overlaps(growthTrack.right - growthTrack.headFit.w, growthTrack.right, shareRight - shareBox.width, shareRight) ? shareLift + shareBox.height + 2 : 0
@@ -592,20 +665,25 @@ function layoutBarTableOnce(authored, options) {
592
665
  if (mainNotes.length > 0) return layoutBarTable(authored, { ...options, [SLIVER_NOTE]: mainNotes });
593
666
  }
594
667
  }
595
- let heads = [...numberTracks, ...interleaved ? [] : panelTracks, ...growthTrack ? [growthTrack] : []].map((track) => track.headFit), keyH = interleaved && !cascade ? panelTracks.reduce((sum, track) => sum + track.headFit.h + 2, 0) - 2 : 0, headH = Math.max(lineBox(headFont), keyH, maxOf(heads.map((head2) => head2.h)), shareHeadH, (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(
668
+ let heads = [...numberTracks, ...interleaved ? [] : panelTracks, ...growthTrack ? [growthTrack] : []].map((track) => track.headFit), keyH = interleaved && !cascade ? panelTracks.reduce((sum, track) => sum + track.headFit.h + 2, 0) - 2 : 0, headH = headsDrawn ? Math.max(lineBox(headFont), keyH, maxOf(heads.map((head2) => head2.h)), shareHeadH, (growthTrack?.headFit.h ?? 0) + growthLift) : 0, headGap = headsDrawn ? HEAD_GAP : 0, 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 + headGap + (showTotal ? TOTAL_GAP : 0), minimumBlockH = (headsDrawn ? Math.max(
596
669
  lineBox(headFont),
597
670
  maxOf(numberTracks.map((track) => track.headFit.h)),
598
671
  maxOf(panelTracks.map((track) => Math.min(track.headFit.h, 2 * lineBox(headFont)))),
599
672
  shareHeadH,
600
673
  (growthTrack?.headFit.h ?? 0) + growthLift
601
- ) + 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];
674
+ ) : 0) + headGap + (showTotal ? TOTAL_GAP : 0);
675
+ if (labelWidth !== void 0 && fixedHeightCanvas(options) && minimumBlockH + rowCount * floorRowH > plot.h) {
676
+ let { width: _width, ...nameSettings } = overrides.label, wider = layoutBarTable(authored, { ...options, columnOverrides: { ...overrides, label: nameSettings } });
677
+ return { ...wider, warnings: [...wider.warnings, overrideIgnored("label", "width", "the wrapped row names would not fit the pinned height")] };
678
+ }
679
+ let 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];
602
680
  for (let r = 0; r < rows.length; r++) unitTops.push(unitTops[r] + nameH(r) + (interleaved ? panels.length * barLineH + ROW_GAP : barLineH));
603
- 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, spareRowH = options.heightFill !== "none" && fixedHeightCanvas(options) && !compact && !house ? Math.floor(Math.min(naturalRowH * MAX_ROW_GROWTH, (plot.h - blockH) / rowCount)) : 0, rowH = compact ? barLineH : Math.max(floorRowH, Math.min(naturalRowH, (plot.h - blockH) / rowCount), spareRowH);
681
+ let comboAfter = interleaved && cascade && bracketRows && bracketLabel !== void 0 && cascade.panels.some((c) => c.combined) ? bracketRows.at(-1) : -1, periodTexts = panels.map((entry) => overrides[entry.panel.id]?.label ?? 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 + headGap + 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, spareRowH = options.heightFill !== "none" && fixedHeightCanvas(options) && !compact && !house ? Math.floor(Math.min(naturalRowH * MAX_ROW_GROWTH, (plot.h - blockH) / rowCount)) : 0, rowH = compact ? barLineH : Math.max(floorRowH, Math.min(naturalRowH, (plot.h - blockH) / rowCount), spareRowH);
604
682
  rowH > naturalRowH && (barH += Math.round((rowH - naturalRowH) * BAR_GROWTH));
605
- let 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 });
683
+ let 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 + headGap, 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 });
606
684
  if (grow !== void 0) return layoutBarTable(authored, { ...options, size: { width: size.width, height: grow } });
607
- 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) => {
608
- fonts.set(id, font), requests.push({
685
+ 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, align) => {
686
+ fonts.set(id, font), align === "right" && rightAligned.add(id), requests.push({
609
687
  id,
610
688
  kind,
611
689
  owner,
@@ -613,44 +691,46 @@ function layoutBarTableOnce(authored, options) {
613
691
  font,
614
692
  typeRole: kind === "axisTitle" ? "axis" : "label",
615
693
  ...fitted ? fittedLabel(fitted, font) : { lines: [text] },
694
+ ...align === "left" ? { align: "start" } : align === "center" ? { align: "middle" } : {},
616
695
  priority: PRIORITY.endpoint,
617
696
  candidates: [{ slot: `${id}:fixed`, rect, penalty: 0 }]
618
697
  });
619
698
  }, rowText1 = (text, font, top, at, bandH = rowH) => {
620
699
  let box = measure(text, font);
621
700
  return { x: "left" in at ? at.left : at.right - box.width, y: top + (bandH - box.height) / 2, w: box.width, h: box.height };
622
- }, 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) => {
701
+ }, blockTop = (p) => tableTop + (compact ? panels.slice(0, p).reduce((sum, _entry, q) => sum + compactBlockH(q) + BLOCK_GAP, 0) : 0), rowsTopOf = (p) => blockTop(p) + headH + headGap, totalLead = (p) => options.totalPosition === "top" && totalIn(p) ? (compact ? compactTotalH : rowH) + TOTAL_GAP : 0, rowsBottomOf = (p) => compact ? rowsTopOf(p) + totalLead(p) + rowsSpan : rowsBottom + totalLead(p), place = (p, r) => {
623
702
  if (interleaved) {
624
703
  if (r < rows.length) {
625
- let top3 = rowsTopOf(0) + rowTopIn(r);
704
+ let top3 = rowsTopOf(0) + totalLead(0) + rowTopIn(r);
626
705
  return { labelTop: top3, labelH: tight ? nameBoxH(r) : lineBox(cellFont), barTop: top3 + nameH(r) + p * barLineH };
627
706
  }
628
- let top2 = rowsBottomOf(0) + TOTAL_GAP;
707
+ let top2 = totalLead(0) > 0 ? rowsTopOf(0) : rowsBottomOf(0) + TOTAL_GAP;
629
708
  return { labelTop: top2, labelH: totalLineH, barTop: top2 + totalLineH + Math.max(0, totalBars.indexOf(p)) * barLineH };
630
709
  }
631
710
  if (!compact) {
632
- let top2 = r < rows.length ? rowsTop + r * rowH : totalTop;
711
+ let top2 = r < rows.length ? rowsTop + totalLead(0) + r * rowH : totalLead(0) > 0 ? rowsTop : totalTop;
633
712
  return { labelTop: top2, labelH: rowH, barTop: top2 };
634
713
  }
635
714
  if (r < rows.length) {
636
- let top2 = rowsTopOf(p) + unitTops[r];
715
+ let top2 = rowsTopOf(p) + totalLead(p) + unitTops[r];
637
716
  return { labelTop: top2, labelH: lineBox(cellFont), barTop: top2 + nameH(r) };
638
717
  }
639
- let top = rowsBottomOf(p) + TOTAL_GAP;
718
+ let top = totalLead(p) > 0 ? rowsTopOf(p) : rowsBottomOf(p) + TOTAL_GAP;
640
719
  return { labelTop: top, labelH: totalLineH, barTop: top + totalLineH };
641
720
  }, nameId = (p, id) => p === 0 ? id : `${id}:${panels[p].panel.id}`, blocks = compact && !interleaved ? panels.map((_entry, p) => p) : [0], headBottom = tableTop + headH;
642
- numberTracks.forEach((track) => {
643
- let id = `head:${track.column.id}`;
644
- rightAligned.add(id), label(
721
+ headsDrawn && numberTracks.forEach((track) => {
722
+ let id = `head:${track.column.id}`, override = overrides[track.column.id], align = override?.headAlign ?? override?.align ?? "right";
723
+ label(
645
724
  id,
646
725
  "axisTitle",
647
726
  { colId: track.column.id },
648
727
  track.head,
649
728
  fieldFont,
650
- { x: track.right - track.headFit.w, y: headBottom - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
651
- track.headFit
729
+ { x: alignedIn(track.right - track.inner, track.right, track.headFit.w, align), y: headBottom - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
730
+ track.headFit,
731
+ align
652
732
  );
653
- }), panelTracks.forEach((track, p) => {
733
+ }), headsDrawn && panelTracks.forEach((track, p) => {
654
734
  if (interleaved) {
655
735
  let top = cascade ? place(p, 0).barTop : tableTop + headH - keyH + panelTracks.slice(0, p).reduce((sum, other) => sum + other.headFit.h + 2, 0);
656
736
  if (cascade)
@@ -680,19 +760,20 @@ function layoutBarTableOnce(authored, options) {
680
760
  rightAligned.add(id2), label(id2, "axisTitle", { colId: `share:${track.panel.id}` }, shareHead, fieldFont, { x: track.shareRight - box2.width, y: tableTop + headH - shareLift - box2.height, w: box2.width, h: box2.height });
681
761
  return;
682
762
  }
683
- let headBottom2 = blockTop(p) + headH;
763
+ let headBottom2 = blockTop(p) + headH, headAlign = overrides[track.panel.id]?.headAlign ?? overrides[track.panel.id]?.align;
684
764
  if (label(
685
765
  `head:${track.panel.id}`,
686
766
  "axisTitle",
687
767
  { colId: track.panel.id },
688
768
  track.head,
689
769
  track.face,
690
- { x: track.origin, y: headBottom2 - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
691
- track.headFit
770
+ { x: headAlign === void 0 ? track.origin : alignedIn(track.origin, track.origin + track.headW, track.headFit.w, headAlign), y: headBottom2 - track.headFit.h, w: track.headFit.w, h: track.headFit.h },
771
+ track.headFit,
772
+ headAlign
692
773
  ), isNumberAlone(track.head) && (requests[requests.length - 1].role = "axis"), !showShare) return;
693
774
  let id = `head:share:${track.panel.id}`, box = measure(shareHead, fieldFont);
694
775
  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 });
695
- }), growthTrack && (rightAligned.add("head:growth"), label(
776
+ }), growthTrack && headsDrawn && (rightAligned.add("head:growth"), label(
696
777
  "head:growth",
697
778
  "axisTitle",
698
779
  { colId: "growth" },
@@ -705,13 +786,15 @@ function layoutBarTableOnce(authored, options) {
705
786
  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;
706
787
  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 });
707
788
  }, head = headRule(theme);
708
- 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"));
789
+ headsDrawn && 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"));
709
790
  let shaded = new Set(!cascade && options.combinedShare ? options.combinedShare.rows : []);
710
- if (rows.forEach((row, r) => {
791
+ rows.forEach((row, r) => {
711
792
  if (!shaded.has(row.id)) return;
712
793
  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;
713
794
  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" });
714
- }), rows.forEach((row, r) => {
795
+ });
796
+ let nameAlign = compact ? void 0 : overrides.label?.align, nameX = (w) => nameAlign === void 0 ? plot.x : alignedIn(plot.x, plot.x + labelTrack - LABEL_GAP, w, nameAlign);
797
+ if (rows.forEach((row, r) => {
715
798
  let text = rowText[r];
716
799
  blocks.forEach((p) => {
717
800
  let at = place(p, r), ruleY = at.labelTop - (interleaved ? ROW_GAP / 2 : 0);
@@ -721,14 +804,15 @@ function layoutBarTableOnce(authored, options) {
721
804
  { categoryId: row.id },
722
805
  row.label,
723
806
  cellFont,
724
- { x: plot.x, y: compact ? at.labelTop : at.labelTop + (rowH - text.h) / 2, w: text.w, h: compact ? nameBoxH(r) : text.h },
725
- text
807
+ { x: nameX(text.w), y: compact ? at.labelTop : at.labelTop + (rowH - text.h) / 2, w: text.w, h: compact ? nameBoxH(r) : text.h },
808
+ text,
809
+ nameAlign
726
810
  );
727
811
  });
728
812
  let side = place(0, r);
729
813
  if (numberTracks.forEach((track) => {
730
- let id = `cell:${track.column.id}:${row.id}`, rect = rowText1(track.texts[r], valueFont, side.labelTop, { right: track.right }, side.labelH);
731
- 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 });
814
+ let id = `cell:${track.column.id}:${row.id}`, align = overrides[track.column.id]?.align ?? "right", box = rowText1(track.texts[r], valueFont, side.labelTop, { right: track.right }, side.labelH), rect = { ...box, x: alignedIn(track.right - track.inner, track.right, box.w, align) };
815
+ label(id, "point", { categoryId: row.id, colId: track.column.id }, track.texts[r], cellFont, rect, void 0, align), marks.cells.push({ rowId: row.id, colId: track.column.id, kind: "column", value: track.column.values[r] ?? null, text: track.texts[r], rect });
732
816
  }), panelTracks.forEach((track, p) => {
733
817
  let stack = track.stacks[r], top = place(p, r).barTop;
734
818
  if (cascade) {
@@ -737,7 +821,7 @@ function layoutBarTableOnce(authored, options) {
737
821
  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);
738
822
  marks.segments.push({ rowId: row.id, panelId: track.panel.id, seriesId, value, text: text2, rect: rect2 });
739
823
  let fill = rowPaint(r, 0);
740
- 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;
824
+ 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")), valuesPrinted && 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;
741
825
  let id = `cell:share:${track.panel.id}:${row.id}`, shareRect = rowText1(c.shareTexts[r], cellFont, top, { right: track.shareRight });
742
826
  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 });
743
827
  return;
@@ -790,7 +874,7 @@ function layoutBarTableOnce(authored, options) {
790
874
  }), occupied.claim(rect2, "mark", owner, "rangeExtension");
791
875
  }
792
876
  let rect = rowText1(endText, valueFont, top, { left: track.origin + (range2?.high ?? stack.positive) * track.scale + END_GAP });
793
- label(`end:${track.panel.id}:${row.id}`, "total", owner, endText, cellFont, rect);
877
+ (valuesPrinted || track.rowSums[r] === null) && label(`end:${track.panel.id}:${row.id}`, "total", owner, endText, cellFont, rect);
794
878
  let sum = track.rowSums[r] ?? null;
795
879
  marks.cells.push({ rowId: row.id, colId: track.panel.id, kind: "end", value: range2?.low ?? sum, ...range2 ? { range: range2 } : {}, text: endText, rect });
796
880
  }), growthTrack) {
@@ -802,7 +886,7 @@ function layoutBarTableOnce(authored, options) {
802
886
  let c = cascade.panels[p];
803
887
  if (!c.combined || !bracketRows) return;
804
888
  if (interleaved) {
805
- let top = rowsTopOf(0) + unitTops[comboAfter + 1], ruleStroke = { token: "inkMuted" };
889
+ let top = rowsTopOf(0) + totalLead(0) + unitTops[comboAfter + 1], ruleStroke = { token: "inkMuted" };
806
890
  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));
807
891
  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 };
808
892
  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 });
@@ -819,16 +903,19 @@ function layoutBarTableOnce(authored, options) {
819
903
  blocks.forEach((p) => {
820
904
  let at = place(p, rows.length);
821
905
  if (totalIn(p)) {
822
- 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;
823
- 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");
906
+ 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), first = totalLead(p) > 0, top = !compact && bandH < rowH ? bottom - bandH : first ? at.labelTop - headGap / 2 : rowsBottomOf(p) + TOTAL_GAP / 2;
907
+ 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" }), first && headsDrawn && top === at.labelTop - headGap / 2 || 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");
908
+ }
909
+ if (totalIn(p)) {
910
+ let box = rowText1(totalLabel, totalFont, at.labelTop, { left: plot.x }, at.labelH);
911
+ label(nameId(p, "total:label"), "category", {}, totalLabel, totalFont, { ...box, x: nameX(box.w) }, void 0, nameAlign);
824
912
  }
825
- totalIn(p) && label(nameId(p, "total:label"), "category", {}, totalLabel, totalFont, rowText1(totalLabel, totalFont, at.labelTop, { left: plot.x }, at.labelH));
826
913
  });
827
914
  let side = place(0, rows.length), totalX = plot.x + width(totalLabel, totalFont) + CELL_AIR;
828
915
  if (numberTracks.forEach((track) => {
829
916
  if (track.totalText === void 0) return;
830
- let id = `total:${track.column.id}`, rect = rowText1(track.totalText, totalFont, side.labelTop, { right: track.right }, side.labelH);
831
- 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 });
917
+ let id = `total:${track.column.id}`, align = overrides[track.column.id]?.align ?? "right", box = rowText1(track.totalText, totalFont, side.labelTop, { right: track.right }, side.labelH), rect = { ...box, x: alignedIn(track.right - track.inner, track.right, box.w, align) };
918
+ label(id, "grandTotal", { colId: track.column.id }, track.totalText, totalFont, rect, void 0, align), marks.cells.push({ colId: track.column.id, kind: "total", value: track.total, text: track.totalText, rect });
832
919
  }), panelTracks.forEach((track, p) => {
833
920
  if (track.totalText === void 0) return;
834
921
  let totalTop2 = interleaved && !cascade ? place(p, rows.length).labelTop : place(p, rows.length).barTop;
@@ -860,7 +947,19 @@ function layoutBarTableOnce(authored, options) {
860
947
  node.t !== "text" || !placed || !rightAligned.has(placed.id) || (node.x = placed.rect.x + placed.rect.w, node.align = "end");
861
948
  }
862
949
  pushAll(scene, texts), pushAll(warnings, solved.warnings);
863
- 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]))), cascadeRest = growthW + shareColW + END_GAP + (sharedScale ? kMin * maxOf(spans) : maxOf(minTracks)), interleavedPanelsW = cascade ? Math.min(cascadeRest + periodNameFull, 1.5 * cascadeRest) : 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;
950
+ let segmentNames = series.map((s) => s.label ?? s.id).join(", "), 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, 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]))), cascadeRest = growthW + shareColW + END_GAP + (sharedScale ? kMin * maxOf(spans) : maxOf(minTracks)), interleavedPanelsW = cascade ? Math.min(cascadeRest + periodNameFull, 1.5 * cascadeRest) : maxOf(panels.map((_, p) => MIN_RUN + endReserves[p])), minWidth = size.width - plot.w + (interleaved ? Math.max(interleavedPanelsW, minSideW + LABEL_GAP + MIN_COMPACT_LABEL) : compact ? Math.max(compactPanelsW + (cascade ? minSideW : 0), minSideW + LABEL_GAP + MIN_COMPACT_LABEL) : minFixedW + growthW + panelsW);
951
+ if (panelsFirst && numberColumns.length > 0 && minWidth > size.width) {
952
+ let { columnOrder: _order, ...defaultOrder } = options, drawn = layoutBarTable(authored, defaultOrder);
953
+ return { ...drawn, warnings: [...drawn.warnings, {
954
+ code: "option-ignored",
955
+ severity: "warn",
956
+ field: ["options", "columnOrder"],
957
+ message: "columnOrder has no effect at this width: the number heads need their room over the name track",
958
+ suggest: "Draw the chart wider, or remove columnOrder.",
959
+ fix: [{ op: "remove", path: "/options/columnOrder" }]
960
+ }] };
961
+ }
962
+ let sizeHint = minWidth > size.width ? wideHint() : void 0;
864
963
  return {
865
964
  type: "bartable",
866
965
  size,
@@ -888,7 +987,7 @@ function layoutBarTableOnce(authored, options) {
888
987
  a11y: {
889
988
  title: accessibleTitle(options.title, chartString(options, "bartableTitle", { v1: rows.length })),
890
989
  counts: [structureCount("rows", rows.length, void 0, options), structureCount("panels", panels.length, panels.length === 1 ? chartString(options, "barPanelOne") : chartString(options, "barPanels", { v1: panels.length }))],
891
- 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") + (solved.placed.some((placed) => placed.id.startsWith("part:")) ? chartString(options, "barPartValues") : "") }) + `${ranged ? chartString(options, "rangeBarDesc") : ""}${showTotal ? chartString(options, "tableTotalRow", { v1: totalLabel }) : ""}`
990
+ 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: valuesPrinted ? cascade ? chartString(options, "cascadeValueLabels") : chartString(options, "barEndTotalRange") + (solved.placed.some((placed) => placed.id.startsWith("part:")) ? chartString(options, "barPartValues") : "") : "" }) + `${ranged ? chartString(options, "rangeBarDesc") : ""}${showTotal ? chartString(options, "tableTotalRow", { v1: totalLabel }) : ""}`
892
991
  },
893
992
  warnings,
894
993
  debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
@@ -903,6 +1002,11 @@ var bartableCore = {
903
1002
  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).",
904
1003
  aliases: ["bar-table", "table-bars"],
905
1004
  layout: layoutBarTable,
1005
+ finishLayout: (layout) => yieldingWidths("bartable", layout, (data) => [...(data.columns ?? []).map((column) => column.id), ...data.panels.map((panel) => panel.id)], {
1006
+ head: (id) => `head:${id}`,
1007
+ // Only number cells read align. Nothing inside a panel does: its Total and values keep their place.
1008
+ cell: (label, id, data) => (data.columns ?? []).some((column) => column.id === id) && (label.startsWith(`cell:${id}:`) || label === `total:${id}`)
1009
+ }),
906
1010
  categoryLabels: calendarCategories,
907
1011
  defaults: { total: !0 },
908
1012
  annotationKinds: []