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,28 +1,40 @@
1
+ import {
2
+ cohortOptionRefusals
3
+ } from "./chunk-6JXBLQJ2.js";
1
4
  import {
2
5
  layoutHeatmap
3
- } from "./chunk-AF7EB6N6.js";
6
+ } from "./chunk-RHBQ2Q5H.js";
4
7
  import {
5
8
  liftOrFallback,
6
9
  missesSize,
7
10
  tightSpacingWarning
8
- } from "./chunk-APQPYM2Z.js";
11
+ } from "./chunk-ZNX5J7D7.js";
12
+ import {
13
+ overrideIgnored,
14
+ widthFloored
15
+ } from "./chunk-YGZEG3JV.js";
9
16
  import {
10
17
  fitColumn,
11
18
  fittedLabel,
12
19
  gutterBudget,
13
20
  stepDownFont
14
- } from "./chunk-ROLR7HRB.js";
21
+ } from "./chunk-XFCBH3TI.js";
15
22
  import {
16
23
  chartTheme
17
- } from "./chunk-7DAH2E4T.js";
24
+ } from "./chunk-IW3YUMPI.js";
18
25
  import {
19
26
  AVERAGE_ROW_ID,
20
27
  deriveRetention,
21
28
  missingCohortRate
22
- } from "./chunk-JXBZIJCG.js";
29
+ } from "./chunk-PYGEIPPH.js";
30
+ import {
31
+ fitsRoom,
32
+ widthsThatFit,
33
+ withoutWidths
34
+ } from "./chunk-IXM6BAM4.js";
23
35
  import {
24
36
  structureCount
25
- } from "./chunk-UDKYY27B.js";
37
+ } from "./chunk-XCROSJ2Z.js";
26
38
  import {
27
39
  fieldHeadFont,
28
40
  fieldHeadText,
@@ -30,10 +42,13 @@ import {
30
42
  headRule,
31
43
  totalGround,
32
44
  totalRule
33
- } from "./chunk-SPSGUFTI.js";
45
+ } from "./chunk-I4NUYVP5.js";
34
46
  import {
35
47
  tableRuleInk
36
48
  } from "./chunk-Z2MGTKDR.js";
49
+ import {
50
+ generatedIdWarnings
51
+ } from "./chunk-SXAZDIGM.js";
37
52
  import {
38
53
  SIZE_TOLERANCE,
39
54
  VERIFY_ADVICE,
@@ -43,13 +58,14 @@ import {
43
58
  rowDrivenHeight,
44
59
  rowSizing,
45
60
  spareShare
46
- } from "./chunk-WALYNKBN.js";
61
+ } from "./chunk-AFGQXMKT.js";
47
62
  import {
48
63
  PRIORITY,
49
64
  UNIT_LINE,
50
65
  authoredNotes,
51
66
  clamp,
52
67
  createOccupiedIndex,
68
+ fitText,
53
69
  frameRendersUnit,
54
70
  frameTextOptions,
55
71
  labelCtx,
@@ -60,16 +76,16 @@ import {
60
76
  subtitleUnitClause,
61
77
  textCarriesCohortUnit,
62
78
  withAuthoredFootnotes
63
- } from "./chunk-2ALFFOKB.js";
79
+ } from "./chunk-WSKZZ2ZB.js";
64
80
  import {
65
81
  disclosureNote,
66
82
  keepShownNotes,
67
83
  staticFrame
68
- } from "./chunk-5SHI57XD.js";
84
+ } from "./chunk-WZB6R2ZX.js";
69
85
  import {
70
86
  AUTOMATIC_FORMAT,
71
87
  formatterFromExample
72
- } from "./chunk-GDVR3XHT.js";
88
+ } from "./chunk-D3PQAVFW.js";
73
89
  import {
74
90
  autoDecimals,
75
91
  chartStrings,
@@ -81,7 +97,7 @@ import {
81
97
  roundHalfUp,
82
98
  smallRateDecimals,
83
99
  typicalDecimals
84
- } from "./chunk-LHKDZAWN.js";
100
+ } from "./chunk-MSYTF3DZ.js";
85
101
  import {
86
102
  canvasMargin,
87
103
  emphasisInk,
@@ -94,14 +110,14 @@ import {
94
110
  strokeToken,
95
111
  tableEmphasis,
96
112
  textScaleOf
97
- } from "./chunk-HJRNBKIT.js";
113
+ } from "./chunk-JARJP576.js";
98
114
  import {
99
115
  NormalizeError,
100
116
  TARGET_SIZE,
101
117
  accessibleTitle,
102
118
  resolveSize,
103
119
  resolveSubtitle
104
- } from "./chunk-YOOHNQ3L.js";
120
+ } from "./chunk-FX5VZK5F.js";
105
121
  import {
106
122
  maxOf,
107
123
  minOf,
@@ -109,7 +125,7 @@ import {
109
125
  } from "./chunk-WYJEOMNY.js";
110
126
  import {
111
127
  defaultMeasurer
112
- } from "./chunk-SNQ7D5R7.js";
128
+ } from "./chunk-UIHGGWES.js";
113
129
 
114
130
  // src/core/strings/cohort.ts
115
131
  var EN = {
@@ -151,6 +167,7 @@ var EN = {
151
167
  valueSupport: "{value} on {count} cohort{count||s}",
152
168
  descStart: "Cohort {measure} triangle, {cohorts} cohorts by {periods} periods since start. {formula} ",
153
169
  descReach: "Period 0 is 100% by construction. The oldest cohort reaches {first}; the newest reaches {last}. ",
170
+ descReachShown: "The oldest cohort reaches {first}; the newest reaches {last}. ",
154
171
  descBlank: "{count} cell{count||s} are blank because those cohorts have not reached that period. ",
155
172
  descAverage: "Weighted averages run from {first} to {last}. ",
156
173
  descBases: "Bases: {first} for the oldest cohort, {last} for the newest.",
@@ -173,6 +190,7 @@ var EN = {
173
190
  high: "High",
174
191
  exhibitTitle: "Cohort {measure} table: {count} cohorts",
175
192
  exhibitDesc: "{measure} table with a separate cohort-size column and periods {periods}. {formula} Empty cells are unobserved{anchor}.{missing}{total}",
193
+ exhibitDescNoSize: "{measure} table with periods {periods}. {formula} Empty cells are unobserved{anchor}.{missing}{total}",
176
194
  exhibitDescAnchor: "; period 0 is 100% by definition",
177
195
  exhibitDescMissing: " A dash marks a missing count, or a rate or total that needs it.",
178
196
  exhibitDescTotal: " The total row is weighted by {basis}."
@@ -215,6 +233,7 @@ var EN = {
215
233
  valueSupport: "{value} aus {count} {count|Kohorte|Kohorten}",
216
234
  descStart: "Kohorten-Dreieck f\xFCr {measure}, {cohorts} Kohorten nach {periods} Perioden seit Beginn. {formula} ",
217
235
  descReach: "Periode 0 ist definitionsgem\xE4\xDF 100%. Die \xE4lteste Kohorte erreicht {first}; die j\xFCngste erreicht {last}. ",
236
+ descReachShown: "Die \xE4lteste Kohorte erreicht {first}; die j\xFCngste erreicht {last}. ",
218
237
  descBlank: "{count} {count|Zelle ist|Zellen sind} leer, da diese Kohorten die Periode noch nicht erreicht haben. ",
219
238
  descAverage: "Gewichtete Mittelwerte reichen von {first} bis {last}. ",
220
239
  descBases: "Basis: {first} f\xFCr die \xE4lteste Kohorte, {last} f\xFCr die j\xFCngste.",
@@ -237,6 +256,7 @@ var EN = {
237
256
  high: "Hoch",
238
257
  exhibitTitle: "Kohortentabelle f\xFCr {measure}: {count} Kohorten",
239
258
  exhibitDesc: "Tabelle f\xFCr {measure} mit eigener Spalte f\xFCr die Kohortengr\xF6\xDFe und den Perioden {periods}. {formula} Leere Zellen sind unbeobachtet{anchor}.{missing}{total}",
259
+ exhibitDescNoSize: "Tabelle f\xFCr {measure} mit den Perioden {periods}. {formula} Leere Zellen sind unbeobachtet{anchor}.{missing}{total}",
240
260
  exhibitDescAnchor: "; Periode 0 ist per Definition 100%",
241
261
  exhibitDescMissing: " Ein Strich zeigt eine fehlende Anzahl oder eine Quote oder Summe, die diese Anzahl ben\xF6tigt.",
242
262
  exhibitDescTotal: " Die Summenzeile ist nach {basis} gewichtet."
@@ -265,8 +285,23 @@ function cohortFormula(options, basis) {
265
285
  }
266
286
 
267
287
  // src/core/charts/cohort/exhibit.ts
268
- var LABEL_TRACK = 118, SIZE_TRACK = 96, ROW_H = 28, MAX_ROW_GROWTH = 0.8, STANDOFF_BELOW = 12, BASE_LINE_H = 16, HEADER_H = 28, LEGEND_H = 18, BIN_TINTS = [0.94, 0.8, 0.58, 0.3, 0], TIGHT_SPACING = /* @__PURE__ */ Symbol("cohortTightSpacing"), COHORT_LIFT = /* @__PURE__ */ Symbol("cohortZeroLift"), REGULAR_WIDTH = /* @__PURE__ */ Symbol("cohortRegularWidth"), STACKED_TEXT = /* @__PURE__ */ Symbol("cohortStackedText"), HIDDEN_PERIODS = /* @__PURE__ */ Symbol("cohortHiddenPeriods"), PROBE_HEIGHT = 4e3;
288
+ var LABEL_TRACK = 118, SIZE_TRACK = 96, ROW_H = 28, MAX_ROW_GROWTH = 0.8, STANDOFF_BELOW = 12, BASE_LINE_H = 16, HEADER_H = 28, LEGEND_H = 18, BIN_TINTS = [0.94, 0.8, 0.58, 0.3, 0], TIGHT_SPACING = /* @__PURE__ */ Symbol("cohortTightSpacing"), COHORT_LIFT = /* @__PURE__ */ Symbol("cohortZeroLift"), REGULAR_WIDTH = /* @__PURE__ */ Symbol("cohortRegularWidth"), STACKED_TEXT = /* @__PURE__ */ Symbol("cohortStackedText"), HIDDEN_PERIODS = /* @__PURE__ */ Symbol("cohortHiddenPeriods"), DEFAULT_HEAD_ROOM = /* @__PURE__ */ Symbol("cohortDefaultHeadRoom"), PROBE_HEIGHT = 4e3;
269
289
  function layoutCohortExhibit(sourceData, options) {
290
+ if (options.columnOverrides === void 0) return layoutLifted(sourceData, options);
291
+ let pinned = options[TARGET_SIZE]?.fixed.height ?? !heightOmitted(options.size), hidden = (geometry) => geometry.labels.filter((label) => label.hidden !== void 0 && label.hidden !== "redundant" || label.title !== void 0).length, withHeads = (next) => {
292
+ let asked = layoutLifted(sourceData, next);
293
+ if (next.columnOverrides?.label?.label === void 0 && next.columnOverrides?.size?.label === void 0) return asked;
294
+ let room = layoutLifted(sourceData, { ...next, [DEFAULT_HEAD_ROOM]: "wrap" });
295
+ return fitsRoom(asked, pinned) && hidden(asked) === 0 && (asked.derived.visiblePeriods?.length ?? 0) >= (room.derived.visiblePeriods?.length ?? 0) ? asked : fitsRoom(room, pinned) ? room : layoutLifted(sourceData, { ...next, [DEFAULT_HEAD_ROOM]: "oneLine" });
296
+ }, first = withHeads(options), fitted = widthsThatFit(options, (next) => next === options ? first : withHeads(next), pinned, { hidden });
297
+ if (!fitsRoom(fitted, pinned) && fitsRoom(first, pinned) && !first.labels.some((label) => label.hidden !== void 0 && label.hidden !== "redundant")) return first;
298
+ if (!fitted.labels.some((label) => label.hidden !== void 0 && label.hidden !== "redundant")) return fitted;
299
+ let plain = withHeads(withoutWidths(options)), printed = new Set(fitted.labels.filter((label) => label.hidden === void 0).map((label) => label.id));
300
+ if (!fitsRoom(plain, pinned) || !plain.labels.some((label) => label.hidden === void 0 && !printed.has(label.id))) return fitted;
301
+ let narrowed = Object.keys(options.columnOverrides).filter((id) => options.columnOverrides[id].width !== void 0);
302
+ return { ...plain, warnings: [...plain.warnings, ...narrowed.map((id) => widthFloored("cohort", id))] };
303
+ }
304
+ function layoutLifted(sourceData, options) {
270
305
  return options.format || options[COHORT_LIFT] !== void 0 ? layoutCohortExhibitOnce(sourceData, options) : liftOrFallback(
271
306
  (mode) => layoutCohortExhibitOnce(sourceData, mode === "full" ? options : { ...options, [COHORT_LIFT]: mode }),
272
307
  (lifted, plain) => costsWidth(lifted, plain, options)
@@ -283,12 +318,12 @@ function layoutCohortExhibitOnce(sourceData, options) {
283
318
  let warnings = [], data = options.excludeCurrentPeriod ? withoutCurrentPeriod(sourceData) : sourceData, basis = options.basis ?? "cohort", totals = options.total ?? "weighted", result = deriveRetention(data, { basis, averages: !1 });
284
319
  pushAll(warnings, result.warnings);
285
320
  let derived = result.derived, available = Array.from({ length: derived.periodCount }, (_, index) => index), visible = normalizeVisiblePeriods(options.visiblePeriods, available, warnings);
286
- options.designatedPeriod !== void 0 && options.variant === "pure" && !visible.includes(options.designatedPeriod) && warnings.push({
321
+ options.designatedPeriod !== void 0 && options.designatedPeriod !== !1 && options.variant === "pure" && !visible.includes(options.designatedPeriod) && warnings.push({
287
322
  code: "designated-period-out-of-range",
288
323
  severity: "warn",
289
324
  message: `designatedPeriod ${options.designatedPeriod} is not one of the ${visible.length} periods the exhibit shows; no column is emphasised`,
290
325
  suggest: "pick a zero-based period index the exhibit shows"
291
- });
326
+ }), pushAll(warnings, exhibitKeyWarnings(options, totals === "weighted"));
292
327
  let total = totals === "weighted" ? deriveExhibitTotal(derived) : void 0, outputDerived = {
293
328
  ...derived,
294
329
  visiblePeriods: visible,
@@ -296,8 +331,8 @@ function layoutCohortExhibitOnce(sourceData, options) {
296
331
  ...options.excludeCurrentPeriod ? { excludedCurrentPeriod: !0 } : {}
297
332
  }, removed = sourceData.cohorts[sourceData.cohorts.length - 1], exclusion = options.excludeCurrentPeriod ? disclosureNote(/^de(?:-|$)/i.test(options.locale?.language ?? "") ? `Ausgeschlossen: laufende Periode. Kohorte ${removed.label ?? removed.id}; letzte Beobachtung jeder fr\xFCheren Kohorte.` : `Excluded: running period. Cohort ${removed.label ?? removed.id}; last observation of each earlier cohort.`) : void 0, full = buildExhibit(data, outputDerived, visible, options, [...warnings], exclusion), misses = missesSize(full, options), { width: missesWidth, height: missesHeight } = misses;
298
333
  if (options.belowMinimum === "refuse" || !full.sizing || !(missesWidth || missesHeight)) return full;
299
- let tightWith = (names) => buildExhibit(data, outputDerived, visible, { ...options, [TIGHT_SPACING]: { columns: missesWidth, rows: missesHeight, names } }, [...warnings], exclusion), tight = tightWith(!1);
300
- if (missesWidth && tight.sizing && tight.size.width + 0.5 < tight.sizing.minWidth && tight.sizing.minWidth - tight.size.width <= 8) {
334
+ let rowsTight = missesHeight, tightWith = (names) => buildExhibit(data, outputDerived, visible, { ...options, [TIGHT_SPACING]: { columns: missesWidth, rows: rowsTight, names } }, [...warnings], exclusion), tight = tightWith(!1), keyed = options.columnOverrides !== void 0 || options.columnHeads === !1 || options.columnVisibility?.size === !1 || options.columnOrder !== void 0;
335
+ if (!rowsTight && keyed && missesSize(tight, options).height && (rowsTight = !0, tight = tightWith(!1)), missesWidth && tight.sizing && tight.size.width + 0.5 < tight.sizing.minWidth && tight.sizing.minWidth - tight.size.width <= 8) {
301
336
  let tighter = tightWith(!0);
302
337
  tighter.labels.some((label) => label.hidden === "collision") || (tight = tighter);
303
338
  }
@@ -307,16 +342,16 @@ function layoutCohortExhibitOnce(sourceData, options) {
307
342
  let hidden = visible.filter((period) => !periods.includes(period)), leftOut = hidden.filter((period) => period !== 0);
308
343
  return buildExhibit(data, { ...outputDerived, visiblePeriods: periods, ...leftOut.length > 0 ? { periodsLeftOut: leftOut } : {} }, periods, {
309
344
  ...options,
310
- [TIGHT_SPACING]: { columns: !0, rows: missesHeight, names: !0 },
345
+ [TIGHT_SPACING]: { columns: !0, rows: rowsTight, names: !0 },
311
346
  [STACKED_TEXT]: !0,
312
347
  ...widthOnly ? { size: { width: full.size.width, height: Math.max(full.size.height, PROBE_HEIGHT) } } : {},
313
348
  ...hidden.length > 0 ? { [HIDDEN_PERIODS]: hidden } : {}
314
349
  }, [...warnings], exclusion);
315
- }, draws = (geometry) => !hides(geometry) && !missesSize(geometry, options).width, columns = visible, anchorFull = visible[0] === 0 && visible.length > 1 && derived.cohorts.every((row) => row.observedPeriods === 0 || row.retention[0] === 1), fits = draws(at(visible, !0));
316
- if (!fits && anchorFull && (columns = visible.slice(1), fits = draws(at(columns, !0))), !fits && options.visiblePeriods === void 0) {
350
+ }, draws = (geometry) => !hides(geometry) && !missesSize(geometry, options).width, columns = visible, anchorFull = visible[0] === 0 && visible.length > 1 && derived.cohorts.every((row) => row.observedPeriods === 0 || row.retention[0] === 1), widthFree = Object.values(options.columnOverrides ?? {}).some((override) => override.width !== void 0) ? layoutCohortExhibitOnce(sourceData, withoutWidths(options)).derived.visiblePeriods : void 0, fits = widthFree !== void 0 || draws(at(visible, !0));
351
+ if (widthFree !== void 0 ? columns = widthFree : !fits && anchorFull && (columns = visible.slice(1), fits = draws(at(columns, !0))), !fits && options.visiblePeriods === void 0) {
317
352
  let candidates = columns, kept = (count) => {
318
353
  let first = candidates.slice(0, count), designated = options.variant === "pure" ? options.designatedPeriod : void 0;
319
- return designated === void 0 || first.includes(designated) || !candidates.includes(designated) ? first : [...first.slice(0, count - 1), designated];
354
+ return designated === void 0 || designated === !1 || first.includes(designated) || !candidates.includes(designated) ? first : [...first.slice(0, count - 1), designated];
320
355
  }, low = 0, high = candidates.length;
321
356
  for (; high - low > 1; ) {
322
357
  let count = Math.floor((low + high) / 2);
@@ -324,7 +359,7 @@ function layoutCohortExhibitOnce(sourceData, options) {
324
359
  }
325
360
  columns = kept(Math.max(1, low));
326
361
  }
327
- if (tight = at(columns), hides(tight) && (missesSize(tight, options).height || (tight.sizing?.naturalHeight ?? 0) > tight.size.height + SIZE_TOLERANCE)) return tight;
362
+ if (tight = at(columns), !rowsTight && keyed && missesSize(tight, options).height && (rowsTight = !0, tight = at(columns)), hides(tight) && (missesSize(tight, options).height || (tight.sizing?.naturalHeight ?? 0) > tight.size.height + SIZE_TOLERANCE)) return tight;
328
363
  }
329
364
  if (hides(tight)) return full;
330
365
  if (compactForm) {
@@ -461,24 +496,54 @@ function retentionFormatter(options, rows, compact) {
461
496
  return `${lift !== "none" && percent !== 0 && Number(roundHalfUp(Math.abs(percent), decimals2)) === 0 && (lift === "compact" || compact?.(text + suffix)) ? numberFormat(options.locale?.language ?? "en-US", { notation: "scientific", maximumSignificantDigits: 1 }).format(percent) : text}${suffix}`;
462
497
  };
463
498
  }
499
+ function exhibitKeyWarnings(options, hasTotal) {
500
+ let parts = exhibitParts(options), overrides = options.columnOverrides ?? {}, shownBlocks = [...parts.showSize ? ["size"] : [], "periods"];
501
+ return [
502
+ ...generatedIdWarnings("cohort", "columnVisibility", options.columnVisibility, ["label", "size"]),
503
+ ...generatedIdWarnings("cohort", "columnOverrides", options.columnOverrides, ["label", ...shownBlocks]),
504
+ ...generatedIdWarnings("cohort", "columnOrder", options.columnOrder, shownBlocks),
505
+ ...parts.showSize ? [] : [{
506
+ code: "cohort-size-hidden",
507
+ severity: "warn",
508
+ field: ["options", "columnVisibility", "size"],
509
+ message: "the size column is hidden, so no row states its cohort size \u2014 a cohort of 40 next to a cohort of 4,000 reads as an equal comparison",
510
+ suggest: "keep the size column, or state the cohort sizes in the subtitle or a note"
511
+ }],
512
+ ...overrides.periods?.label !== void 0 ? [overrideIgnored("periods", "label", "each period keeps its own head")] : [],
513
+ ...parts.heads ? [] : Object.keys(overrides).flatMap((id) => id === "size" && !parts.showSize || !["label", "size", "periods"].includes(id) ? [] : ["headAlign", "label"].filter((field) => overrides[id][field] !== void 0 && !(id === "periods" && field === "label")).map((field) => overrideIgnored(id, field, "columnHeads false draws no head"))),
514
+ ...options.totalPosition !== void 0 && !hasTotal ? [{
515
+ code: "option-ignored",
516
+ severity: "warn",
517
+ field: ["options", "totalPosition"],
518
+ message: "totalPosition has no effect: total is false, so no summary row is drawn",
519
+ suggest: "Remove totalPosition, or remove total: false.",
520
+ fix: [{ op: "remove", path: "/options/totalPosition" }]
521
+ }] : []
522
+ ];
523
+ }
524
+ function exhibitParts(options) {
525
+ let showSize = options.columnVisibility?.size !== !1, firstBlock = options.columnOrder?.find((id) => id === "periods" || id === "size" && showSize);
526
+ return { showSize, sizeAfterPeriods: showSize && firstBlock === "periods", heads: options.columnHeads !== !1 };
527
+ }
528
+ var TEXT_ALIGN = { left: "start", center: "middle", right: "end" }, TRACK_INSET = 4, anchorIn = (align, left, width) => align === "start" ? left + TRACK_INSET : align === "end" ? left + width - TRACK_INSET : left + width / 2, leftOf = (align, x, width) => align === "start" ? x : align === "middle" ? x - width / 2 : x - width, sizeHeadWords = (options) => options.columnOverrides?.size?.label ?? options.cohortSizeLabel ?? chartString(options, "cohortSize"), sizeHeadRoom = (options) => options[DEFAULT_HEAD_ROOM] ? options.cohortSizeLabel ?? chartString(options, "cohortSize") : sizeHeadWords(options);
464
529
  function exhibitTracks(rows, visible, data, options, font, measure, format = retentionFormatter(options, rows), stackFont = font, head) {
465
- let tight = options[TIGHT_SPACING]?.columns === !0, air = options[STACKED_TEXT] ? 6 : 4, width = (text, wrapFont = stackFont) => options[STACKED_TEXT] ? maxOf(twoLines(text, wrapFont, measure).map((line) => measure(line, wrapFont).width)) : measure(text, font).width, label = Math.max(tight ? 0 : LABEL_TRACK, maxOf(rows.map((row) => measure(row.label, font).width + (tight ? 4 : 12)))), sizeHead = Math.max(
466
- width(options.cohortSizeLabel ?? chartString(options, "cohortSize"), font),
530
+ let { showSize, heads } = exhibitParts(options), authored = options.columnOverrides, stopsFigures = options.figures === !1 && options.variant === "stepped", tight = options[TIGHT_SPACING]?.columns === !0, air = options[STACKED_TEXT] ? 6 : 4, width = (text, wrapFont = stackFont) => options[STACKED_TEXT] ? maxOf(twoLines(text, wrapFont, measure).map((line) => measure(line, wrapFont).width)) : measure(text, font).width, label = Math.max(tight ? 0 : LABEL_TRACK, maxOf(rows.map((row) => measure(row.label, font).width + (tight ? 4 : 12)))), sizeHead = heads ? Math.max(
531
+ width(sizeHeadRoom(options), font),
467
532
  head ? options[STACKED_TEXT] ? width(head.text, head.font) : measure(head.text, head.font).width : 0
468
- ), size = Math.max(
533
+ ) : 0, size = showSize ? authored?.size?.width ?? Math.max(
469
534
  tight ? 0 : SIZE_TRACK,
470
535
  sizeHead + (tight ? air : 18),
471
536
  maxOf(rows.map((row) => measure(formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 }), font).width + (tight ? air : 18)))
472
- ), values = rows.flatMap((row) => visible.flatMap((period) => {
537
+ ) : 0, values = rows.flatMap((row) => visible.flatMap((period) => {
473
538
  let value = row.retention[period];
474
- return period >= row.observedPeriods || value === null || value === void 0 ? [] : [format(value, period)];
539
+ return period >= row.observedPeriods || value === null || value === void 0 || stopsFigures && period !== 0 ? [] : [format(value, period)];
475
540
  })), support = visible.flatMap((period) => {
476
541
  let observed = rows.filter((row) => row.kind !== "total" && period < row.observedPeriods), rates = observed.flatMap((row) => row.retention[period] == null ? [] : [row.retention[period]]);
477
542
  return [
478
543
  ...rows.some((row) => row.kind === "total") && options.basis !== "previous" ? [chartString(options, "baseValue", { value: formatAutomaticNumber(observed.reduce((sum, row) => sum + row.base, 0), { locale: options.locale?.language, decimals: 0 }) })] : [],
479
- ...options.variant === "stepped" && (options.formatScope ?? "column") === "column" ? rates.length ? [numberRange(format(minOf(rates), period), format(maxOf(rates), period))] : [] : []
544
+ ...heads && options.variant === "stepped" && (options.formatScope ?? "column") === "column" ? rates.length ? [numberRange(format(minOf(rates), period), format(maxOf(rates), period))] : [] : []
480
545
  ];
481
- }), month = Math.max(tight ? 0 : 56, maxOf([...visible.map((period) => periodName(data.periodLabel, period, options.locale?.language)), ...values].map((text) => measure(text, font).width + (tight ? air : 16))), maxOf(support.map((text) => width(text) + (tight ? air : 16))));
546
+ }), month = authored?.periods?.width ?? Math.max(tight ? 0 : 56, maxOf([...heads ? visible.map((period) => periodName(data.periodLabel, period, options.locale?.language)) : [], ...values].map((text) => measure(text, font).width + (tight ? air : 16))), maxOf(support.map((text) => width(text) + (tight ? air : 16))));
482
547
  return { label, size, month };
483
548
  }
484
549
  function pureEmphasis(options, period, value) {
@@ -516,7 +581,13 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
516
581
  chartTheme(options),
517
582
  options.palette,
518
583
  warnings
519
- ), size = resolveSize(options.size), tightRows = options[TIGHT_SPACING]?.rows === !0, rowAir = tightRows ? 6 : 8, rowH = Math.max(tightRows ? 0 : ROW_H, theme.type.label.size * (theme.type.label.lineHeight ?? 1.2) + rowAir), headerRowH = Math.max(tightRows ? 0 : HEADER_H, theme.type.axis.size * (theme.type.axis.lineHeight ?? 1.2) + rowAir), baseRowH = Math.max(BASE_LINE_H, theme.type.label.size * (theme.type.label.lineHeight ?? 1.2) + 4), measure = options.measure ?? defaultMeasurer, occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), margin = { top: options.exhibitLabel ? 38 : 20, right: 16, bottom: 14, left: canvasMargin(theme, size.width).left, ...options.margin }, methodFootnotes = exhibitNotes(data, derived, options, visible), authored = authoredNotes(options), ownFootnotes = authored.filter((note) => note !== exclusion), frameOptions = ownFootnotes.length === authored.length ? options : withAuthoredFootnotes(options, authored, ownFootnotes), rowData = exhibitRows(data, derived, options).map((row) => style === "stepped" && row.kind === "total" ? { ...row, label: chartString(options, "weightedAverage") } : row), totalId = rowData.find((row) => row.kind === "total")?.id, formatValue = retentionFormatter(options, rowData), measureName = cohortMeasure(options), unit = options.unit?.trim() || "%", carriesUnit = (text) => textCarriesCohortUnit(text, unit), subtitle = resolveSubtitle(options.subtitle), measureHasUnit = subtitle !== void 0 && carriesUnit(subtitle.measure), authoredUnit = options.unit?.trim(), subtitleUnit = measureHasUnit || options[UNIT_LINE] !== void 0 || subtitle !== void 0 && !!authoredUnit && frameRendersUnit({ subtitle, unit: authoredUnit }), footnotes = [...ownFootnotes, ...exclusion ? [exclusion] : [], ...methodFootnotes], ruleOverNotes = staticFrame.pinned && options.source !== void 0 && footnotes.length > 0, frame = solveFrame(
584
+ ), size = resolveSize(options.size), tightRows = options[TIGHT_SPACING]?.rows === !0, rowAir = tightRows ? 6 : 8, rowH = Math.max(tightRows ? 0 : ROW_H, theme.type.label.size * (theme.type.label.lineHeight ?? 1.2) + rowAir), headerRowH = Math.max(tightRows ? 0 : HEADER_H, theme.type.axis.size * (theme.type.axis.lineHeight ?? 1.2) + rowAir), baseRowH = Math.max(BASE_LINE_H, theme.type.label.size * (theme.type.label.lineHeight ?? 1.2) + 4), measure = options.measure ?? defaultMeasurer, occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height }), margin = { top: options.exhibitLabel ? 38 : 20, right: 16, bottom: 14, left: canvasMargin(theme, size.width).left, ...options.margin }, methodFootnotes = exhibitNotes(data, derived, options, visible), authored = authoredNotes(options), ownFootnotes = authored.filter((note) => note !== exclusion), frameOptions = ownFootnotes.length === authored.length ? options : withAuthoredFootnotes(options, authored, ownFootnotes), namedRows = exhibitRows(data, derived, options).map((row) => style === "stepped" && row.kind === "total" ? { ...row, label: chartString(options, "weightedAverage") } : row), totalOnTop = options.totalPosition === "top" && namedRows.at(-1)?.kind === "total", rowData = totalOnTop ? [namedRows.at(-1), ...namedRows.slice(0, -1)] : namedRows, { showSize, sizeAfterPeriods, heads } = exhibitParts(options), overrides = options.columnOverrides, alignOf = (id, fallback) => {
585
+ let align = overrides?.[id]?.align;
586
+ return align === void 0 ? fallback : TEXT_ALIGN[align];
587
+ }, headAlignOf = (id, fallback) => {
588
+ let align = overrides?.[id]?.headAlign;
589
+ return align === void 0 ? alignOf(id, fallback) : TEXT_ALIGN[align];
590
+ }, totalId = rowData.find((row) => row.kind === "total")?.id, formatValue = retentionFormatter(options, rowData), measureName = cohortMeasure(options), unit = options.unit?.trim() || "%", carriesUnit = (text) => textCarriesCohortUnit(text, unit), subtitle = resolveSubtitle(options.subtitle), measureHasUnit = subtitle !== void 0 && carriesUnit(subtitle.measure), authoredUnit = options.unit?.trim(), subtitleUnit = measureHasUnit || options[UNIT_LINE] !== void 0 || subtitle !== void 0 && !!authoredUnit && frameRendersUnit({ subtitle, unit: authoredUnit }), footnotes = [...ownFootnotes, ...exclusion ? [exclusion] : [], ...methodFootnotes], ruleOverNotes = staticFrame.pinned && options.source !== void 0 && footnotes.length > 0, frame = solveFrame(
520
591
  {
521
592
  size,
522
593
  margin,
@@ -527,39 +598,39 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
527
598
  measure
528
599
  },
529
600
  occupied
530
- ), nodes = [...frame.nodes], requests = [], fontById = /* @__PURE__ */ new Map(), labelInk = /* @__PURE__ */ new Map(), cellPaints = /* @__PURE__ */ new Map(), marks = { cells: [], sizeCells: [] }, drawnSubtitle = frame.nodes.flatMap((node) => node.t === "text" && node.id.startsWith("frame:subtitle") ? node.lines : []).join(" "), needsUnit = options.unitShown !== !0 && !carriesUnit(formatValue(1, 0)) && !(subtitleUnit && carriesUnit(drawnSubtitle)), unitCaption = carriesUnit(measureName) ? measureName : `${measureName}${subtitleUnitClause(unit, measureName)}`, totalGap = style === "stepped" && derived.total ? 6 : 0, trackFont = { family: theme.type.family, ...theme.type.label, weight: tableEmphasis(theme) }, headFont = fieldHeadFont(theme), sizeHead = { font: headFont, text: fieldHeadText(options.cohortSizeLabel ?? chartString(options, "cohortSize"), theme) }, stackFont = secondaryFont(theme), tracks = exhibitTracks(rowData, visible, data, options, trackFont, measure, formatValue, stackFont, sizeHead), regularWidth = tracks.label + tracks.size + visible.length * tracks.month, nameFont = { family: theme.type.family, ...theme.type.label }, rowNames = fitColumn(rowData.map((row) => {
531
- let font = row.kind === "total" ? { ...nameFont, weight: tableEmphasis(theme) } : nameFont, cap = Math.max(24, frame.plot.w * 0.3 - 12);
601
+ ), nodes = [...frame.nodes], requests = [], fontById = /* @__PURE__ */ new Map(), labelInk = /* @__PURE__ */ new Map(), cellPaints = /* @__PURE__ */ new Map(), marks = { cells: [], sizeCells: [] }, drawnSubtitle = frame.nodes.flatMap((node) => node.t === "text" && node.id.startsWith("frame:subtitle") ? node.lines : []).join(" "), needsUnit = options.unitShown !== !0 && !carriesUnit(formatValue(1, 0)) && !(subtitleUnit && carriesUnit(drawnSubtitle)), unitCaption = carriesUnit(measureName) ? measureName : `${measureName}${subtitleUnitClause(unit, measureName)}`, totalGap = style === "stepped" && derived.total ? 6 : 0, trackFont = { family: theme.type.family, ...theme.type.label, weight: tableEmphasis(theme) }, headFont = fieldHeadFont(theme), sizeHead = { font: headFont, text: fieldHeadText(sizeHeadRoom(options), theme) }, stackFont = secondaryFont(theme), tracks = exhibitTracks(rowData, visible, data, options, trackFont, measure, formatValue, stackFont, sizeHead), regularWidth = tracks.label + tracks.size + visible.length * tracks.month, nameFont = { family: theme.type.family, ...theme.type.label }, gap = options[TIGHT_SPACING]?.names === !0 ? 4 : 12, labelWidth = overrides?.label?.width, rowNames = fitColumn(rowData.map((row) => {
602
+ let font = row.kind === "total" ? { ...nameFont, weight: tableEmphasis(theme) } : nameFont, cap = labelWidth === void 0 ? Math.max(24, frame.plot.w * 0.3 - 12) : Math.max(1, labelWidth - gap);
532
603
  return {
533
604
  text: row.label,
534
605
  font,
535
606
  maxWidth: cap,
536
607
  maxLines: 2,
537
- wider: gutterBudget(cap, frame.plot.w, tracks.size + visible.length * tracks.month) - 12,
608
+ wider: labelWidth === void 0 ? gutterBudget(cap, frame.plot.w, tracks.size + visible.length * tracks.month) - 12 : cap,
538
609
  shrink: stepDownFont(theme, font, "label", options.target, textScaleOf(options)),
539
610
  target: options.target,
540
611
  textScale: textScaleOf(options),
541
612
  typeRole: "label"
542
613
  };
543
- }), measure), gap = options[TIGHT_SPACING]?.names === !0 ? 4 : 12;
544
- tracks.label = Math.max(measure(chartString(options, "cohort"), nameFont).width + gap, measure(fieldHeadText(chartString(options, "cohort"), theme), headFont).width + gap, maxOf(rowNames.map((name) => name.w + gap))), rowH = Math.max(rowH, maxOf(rowNames.map((name) => name.h + rowAir)));
614
+ }), measure), cornerWords = overrides?.label?.label, cornerText = fieldHeadText(cornerWords ?? chartString(options, "cohort"), theme), cornerShare = cornerWords === void 0 ? 1 / 0 : frame.plot.w * 0.45, cornerRoomWords = options[DEFAULT_HEAD_ROOM] ? chartString(options, "cohort") : cornerWords ?? chartString(options, "cohort"), cornerReserve = heads ? Math.max(measure(cornerRoomWords, nameFont).width + gap, measure(fieldHeadText(cornerRoomWords, theme), headFont).width + gap) : 0;
615
+ tracks.label = labelWidth ?? Math.max(Math.min(cornerReserve, cornerShare), maxOf(rowNames.map((name) => name.w + gap))), rowH = Math.max(rowH, maxOf(rowNames.map((name) => name.h + rowAir)));
545
616
  let fullWidth = tracks.label + tracks.size + visible.length * tracks.month;
546
617
  if (style === "pure" && !options.format && frame.plot.w < fullWidth) {
547
618
  let rateWidth = tracks.month * Math.min(1, frame.plot.w / fullWidth) - 2;
548
619
  formatValue = retentionFormatter(options, rowData, (text) => measure(text, trackFont).width > rateWidth), tracks = { ...exhibitTracks(rowData, visible, data, options, trackFont, measure, formatValue, stackFont, sizeHead), label: tracks.label };
549
620
  }
550
- let showSteppedLegend = style === "stepped" && options.legend !== "none", steps = options.steps ?? DEFAULT_STEPS, caption = options.strings?.cohortMeasure ? `${measureName}${options.unit && !carriesUnit(measureName) ? ` (${options.unit})` : ""}` : options.unit ?? measureName, keyFont = { family: theme.type.family, ...theme.type.axis }, keyFits = (text) => measure(text, keyFont).width + 10 + steppedKeyText(scope, caption, steps, options.locale?.language).labels.reduce((width, label) => width + 16 + (label ? 4 + measure(label, keyFont).width : 0), 0) <= frame.plot.w, keyUnit = !needsUnit || !showSteppedLegend ? void 0 : scope === "column" ? chartString(options, "withinColumnUnit", { unit: unitCaption }) : carriesUnit(caption) ? void 0 : unitCaption, keyCaption = keyUnit !== void 0 && keyFits(keyUnit) ? keyUnit : void 0, keyFlow = showSteppedLegend ? steppedKeyFlow(steppedKeyText(scope, caption, steps, options.locale?.language, keyCaption), keyFont, measure, size.width - frame.plot.x) : void 0, legendOffset = keyFlow ? LEGEND_H + keyFlow.pitch * (keyFlow.rows - 1) + 10 : 0, tableTop = frame.plot.y + legendOffset, desiredWidth = tracks.label + tracks.size + visible.length * tracks.month, scale = Math.min(1, frame.plot.w / desiredWidth), labelW = tracks.label * scale, sizeW = tracks.size * scale, heightFill = options.heightFill !== "none", monthW = style === "stepped" && !heightFill ? tracks.month * scale : (frame.plot.w - labelW - sizeW) / visible.length, tableLeft = frame.plot.x, sizeLeft = tableLeft + labelW, monthLeft = sizeLeft + sizeW, tableRight = monthLeft + visible.length * monthW, averageBases = derived.total && derived.basis !== "previous" ? visible.map((period) => derived.cohorts.reduce((sum, row) => sum + (period < row.observedPeriods ? row.base : 0), 0)) : void 0, columnRanges = scope === "column" ? visible.map((period) => {
621
+ let showSteppedLegend = style === "stepped" && options.legend !== "none", steps = options.steps ?? DEFAULT_STEPS, caption = options.strings?.cohortMeasure ? `${measureName}${options.unit && !carriesUnit(measureName) ? ` (${options.unit})` : ""}` : options.unit ?? measureName, keyFont = { family: theme.type.family, ...theme.type.axis }, keyFits = (text) => measure(text, keyFont).width + 10 + steppedKeyText(scope, caption, steps, options.locale?.language).labels.reduce((width, label) => width + 16 + (label ? 4 + measure(label, keyFont).width : 0), 0) <= frame.plot.w, keyUnit = !needsUnit || !showSteppedLegend ? void 0 : scope === "column" ? chartString(options, "withinColumnUnit", { unit: unitCaption }) : carriesUnit(caption) ? void 0 : unitCaption, keyCaption = keyUnit !== void 0 && keyFits(keyUnit) ? keyUnit : void 0, keyFlow = showSteppedLegend ? steppedKeyFlow(steppedKeyText(scope, caption, steps, options.locale?.language, keyCaption), keyFont, measure, size.width - frame.plot.x) : void 0, legendOffset = keyFlow ? LEGEND_H + keyFlow.pitch * (keyFlow.rows - 1) + 10 : 0, tableTop = frame.plot.y + legendOffset, desiredWidth = tracks.label + tracks.size + visible.length * tracks.month, scale = Math.min(1, frame.plot.w / desiredWidth), labelW = tracks.label * scale, sizeW = tracks.size * scale, heightFill = options.heightFill !== "none", monthW = overrides?.periods?.width !== void 0 || style === "stepped" && !heightFill ? tracks.month * scale : (frame.plot.w - labelW - sizeW) / visible.length, tableLeft = frame.plot.x, sizeLeft = tableLeft + labelW + (sizeAfterPeriods ? visible.length * monthW : 0), monthLeft = tableLeft + labelW + (sizeAfterPeriods ? 0 : sizeW), tableRight = sizeAfterPeriods ? sizeLeft + sizeW : monthLeft + visible.length * monthW, averageBases = derived.total && derived.basis !== "previous" ? visible.map((period) => derived.cohorts.reduce((sum, row) => sum + (period < row.observedPeriods ? row.base : 0), 0)) : void 0, columnRanges = scope === "column" && heads ? visible.map((period) => {
551
622
  let values = derived.cohorts.flatMap((row) => {
552
623
  let value = period < row.observedPeriods ? row.retention[period] : null;
553
624
  return value == null ? [] : [value];
554
625
  });
555
626
  return period === 0 || values.length === 0 ? void 0 : { min: minOf(values), max: maxOf(values) };
556
- }) : void 0, axisFont = options[STACKED_TEXT] ? stackFont : { family: theme.type.family, ...theme.type.axis }, baseFont = options[STACKED_TEXT] ? stackFont : { family: theme.type.family, ...theme.type.label }, lineH = (font) => font.size * (font.lineHeight ?? 1.2), wrapped = (text, font, room) => options[STACKED_TEXT] && measure(text, font).width > room ? twoLines(text, font, measure) : [text], sizeHeader = sizeHead.text, sizeHeaderFont = headFont, sizeHeaderLines = wrapped(sizeHeader, sizeHeaderFont, sizeW - 4), rangeLines = columnRanges?.map((range, column) => {
627
+ }) : void 0, axisFont = options[STACKED_TEXT] ? stackFont : { family: theme.type.family, ...theme.type.axis }, baseFont = options[STACKED_TEXT] ? stackFont : { family: theme.type.family, ...theme.type.label }, lineH = (font) => font.size * (font.lineHeight ?? 1.2), wrapped = (text, font, room) => options[STACKED_TEXT] && measure(text, font).width > room ? twoLines(text, font, measure) : [text], sizeHeader = fieldHeadText(sizeHeadWords(options), theme), sizeHeaderFont = headFont, headFit = (text, room) => text !== "" && measure(text, headFont).width > room ? fitText(text, headFont, Math.max(1, room), tightRows || options[DEFAULT_HEAD_ROOM] === "oneLine" ? 1 : 2, measure, { target: options.target, typeRole: "label" }) : void 0, sizeFit = overrides?.size?.label === void 0 ? void 0 : headFit(sizeHeader, sizeW - 4), sizeHeaderLines = showSize && heads ? sizeFit?.lines ?? wrapped(sizeHeader, sizeHeaderFont, sizeW - 4) : [], sizeEnd = sizeLeft + sizeW - (options[STACKED_TEXT] || sizeAfterPeriods || overrides?.size?.width !== void 0 ? 4 : 18) * scale, sizeAt = (align) => align === "end" ? sizeEnd : anchorIn(align, sizeLeft, sizeW), sizeHeadAlign = headAlignOf("size", "end"), sizeCellAlign = alignOf("size", "end"), sizeHeadWidth = maxOf(sizeHeaderLines.map((line) => measure(line, headFont).width)), cornerRoom = showSize && !sizeAfterPeriods ? leftOf(sizeHeadAlign, sizeAt(sizeHeadAlign), sizeHeadWidth) - 8 - tableLeft : labelW - 8, cornerFit = cornerWords === void 0 || !heads ? void 0 : headFit(cornerText, Math.min(labelW - 4, cornerRoom)), cornerLines = cornerFit?.lines ?? (cornerWords === void 0 ? [] : [cornerText]), rangeLines = columnRanges?.map((range, column) => {
557
628
  if (!range) return [];
558
629
  let [low, high] = [formatValue(range.min, visible[column]), formatValue(range.max, visible[column])];
559
630
  return wrapped(low === high ? low : numberRange(low, high), axisFont, monthW - 4);
560
631
  }), baseLines = averageBases?.map((base) => wrapped(chartString(options, "baseValue", { value: formatAutomaticNumber(base, { locale: options.locale?.language, decimals: 0 }) }), baseFont, monthW - 4)), extraLines = (blocks) => Math.max(0, maxOf((blocks ?? []).map((lines) => lines.length - 1)));
561
- headerRowH = Math.max(headerRowH, sizeHeaderLines.length * lineH(sizeHeaderFont) + rowAir);
562
- let baseLineH = averageBases ? baseRowH + extraLines(baseLines) * lineH(baseFont) : 0, headerH = headerRowH + (columnRanges ? baseRowH + extraLines(rangeLines) * lineH(axisFont) : 0), naturalRowH = rowH, naturalBottom = tableTop + headerH + rowData.length * rowH + totalGap + baseLineH, tableBottom = naturalBottom;
632
+ headerRowH = Math.max(headerRowH, Math.max(1, sizeHeaderLines.length, cornerLines.length) * lineH(sizeHeaderFont) + rowAir);
633
+ let baseLineH = averageBases ? baseRowH + extraLines(baseLines) * lineH(baseFont) : 0, headerH = heads ? headerRowH + (columnRanges ? baseRowH + extraLines(rangeLines) * lineH(axisFont) : 0) : 0, naturalRowH = rowH, headBand = columnRanges && (!showSize || sizeAfterPeriods || overrides !== void 0) ? Math.min(naturalRowH, headerRowH) : naturalRowH, naturalBottom = tableTop + headerH + rowData.length * rowH + totalGap + baseLineH, tableBottom = naturalBottom;
563
634
  {
564
635
  let grow = rowDrivenHeight({
565
636
  options,
@@ -574,10 +645,10 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
574
645
  let extra = spareShare(frame.plot.y + frame.plot.h - naturalBottom - 6 - STANDOFF_BELOW, rowData.length, naturalRowH * MAX_ROW_GROWTH, !0);
575
646
  rowH += extra, tableBottom += rowData.length * extra;
576
647
  }
577
- let headerFont = { family: theme.type.family, ...theme.type.axis }, cellFont = { family: theme.type.family, ...theme.type.label }, strongFont = { ...cellFont, weight: emphasisWeight(theme) }, totalFont = { ...cellFont, weight: tableEmphasis(theme) }, totalPaint = totalGround(theme, options.palette), mutedInk = { token: "inkMuted" }, background = { token: "background" }, designated = options.designatedPeriod ?? 3, binByPeriod = columnBins(derived, visible, scope, steps, totalId), rules = [], addLine = (id, x1, y1, x2, y2, width, stroke, part) => {
648
+ let headerFont = { family: theme.type.family, ...theme.type.axis }, cellFont = { family: theme.type.family, ...theme.type.label }, strongFont = { ...cellFont, weight: emphasisWeight(theme) }, totalFont = { ...cellFont, weight: tableEmphasis(theme) }, totalPaint = totalGround(theme, options.palette), mutedInk = { token: "inkMuted" }, background = { token: "background" }, designated = options.designatedPeriod === !1 ? void 0 : options.designatedPeriod ?? 3, binByPeriod = columnBins(derived, visible, scope, steps, totalId), rules = [], addLine = (id, x1, y1, x2, y2, width, stroke, part) => {
578
649
  rules.push({ t: "line", id, x1, y1, x2, y2, stroke, width, owner: {}, part }), occupied.claim({ x: Math.min(x1, x2), y: Math.min(y1, y2), w: Math.max(1, Math.abs(x2 - x1)), h: Math.max(1, Math.abs(y2 - y1)) }, "axis", {}, part);
579
650
  }, head = headRule(theme);
580
- addLine("cohort-header-bottom", tableLeft, tableTop + headerH, tableRight, tableTop + headerH, head.width, head.stroke, "tableRule");
651
+ heads && addLine("cohort-header-bottom", tableLeft, tableTop + headerH, tableRight, tableTop + headerH, head.width, head.stroke, "tableRule");
581
652
  let addLabel = (id, text, rect, font, ink, owner = {}, kind = "point", insidePaint, fitted, align, claimId) => {
582
653
  requests.push({
583
654
  id,
@@ -603,8 +674,8 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
603
674
  w: measured.width,
604
675
  h: measured.height
605
676
  };
606
- }, addBlock = (id, lines, font, x, y, h, align, ink, owner, kind) => {
607
- let w = maxOf(lines.map((line) => measure(line, font).width)), blockH = lines.length === 1 ? measure(lines[0], font).height : lines.length * lineH(font), rect = { x: align === "middle" ? x - w / 2 : x - w, y: y + (h - blockH) / 2, w, h: blockH };
677
+ }, addBlock = (id, lines, font, x, y, h, align, ink, owner, kind, title) => {
678
+ let w = maxOf(lines.map((line) => measure(line, font).width)), blockH = lines.length === 1 ? measure(lines[0], font).height : lines.length * lineH(font), rect = { x: leftOf(align, x, w), y: y + (h - blockH) / 2, w, h: blockH };
608
679
  addLabel(
609
680
  id,
610
681
  lines.join(" "),
@@ -614,67 +685,105 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
614
685
  owner,
615
686
  kind,
616
687
  void 0,
617
- { lines, w, h: blockH, font, ...font === stackFont ? { typeRole: "secondary" } : {} },
618
- lines.length === 1 ? void 0 : align
619
- );
620
- }, keyShowsUnit = showSteppedLegend && (keyCaption !== void 0 || scope === "classic" && carriesUnit(caption)), sizeEnd = sizeLeft + sizeW - (options[STACKED_TEXT] ? 4 : 18) * scale, cornerRoom = sizeEnd - maxOf(sizeHeaderLines.map((line) => measure(line, headFont).width)) - 8 - tableLeft, cornerTexts = [unitCaption, subtitleUnitClause(unit, "").trim(), unit], unitCorner = needsUnit && !keyShowsUnit ? cornerTexts.find((text) => text !== "" && measure(text, headerFont).width <= cornerRoom) : void 0, corner = unitCorner ?? fieldHeadText(chartString(options, "cohort"), theme), cornerFont = unitCorner === void 0 ? headFont : headerFont, headPaint = headInk();
621
- if (addLabel("cohort-header-label", corner, measuredRect(corner, cornerFont, tableLeft, tableTop, "start", naturalRowH), cornerFont, headPaint, {}, "axisTitle"), sizeHeaderLines.length > 1 ? addBlock("cohort-header-size", sizeHeaderLines, headFont, sizeEnd, tableTop, headerRowH, "end", headPaint, {}, "axisTitle") : addLabel("cohort-header-size", sizeHeader, measuredRect(sizeHeader, headFont, sizeEnd, tableTop, "end", naturalRowH), headFont, headPaint, {}, "axisTitle"), visible.forEach((period, column) => {
622
- let text = periodName(data.periodLabel, period, options.locale?.language), ink = style === "pure" && period === designated ? emphasisInk(theme) : headPaint;
623
- addLabel(
624
- `cohort-header-period:${period}`,
625
- text,
626
- measuredRect(text, headerFont, monthLeft + (column + 0.5) * monthW, tableTop, "middle", naturalRowH),
627
- headerFont,
628
- ink,
629
- {},
630
- "axisTitle"
688
+ { lines, w, h: blockH, font, ...title === void 0 ? {} : { title }, ...font === stackFont ? { typeRole: "secondary" } : {} },
689
+ lines.length === 1 || align === "start" ? void 0 : align
631
690
  );
632
- let range = columnRanges?.[column];
633
- if (range && options[STACKED_TEXT])
634
- addBlock(`cohort-header-range:${period}`, rangeLines[column], axisFont, monthLeft + (column + 0.5) * monthW, tableTop + headerRowH - 4, headerH - headerRowH, "middle", mutedInk, { categoryId: `t${period}` }, "point");
635
- else if (range) {
636
- let rangeFont = { family: theme.type.family, ...theme.type.axis }, [low, high] = [formatValue(range.min, period), formatValue(range.max, period)], rangeText = low === high ? low : numberRange(low, high), measured = measure(rangeText, rangeFont);
691
+ }, keyShowsUnit = showSteppedLegend && (keyCaption !== void 0 || scope === "classic" && carriesUnit(caption)), cornerTexts = [unitCaption, subtitleUnitClause(unit, "").trim(), unit], headPaint = headInk(), periodHeadAlign = headAlignOf("periods", "middle"), periodCellAlign = alignOf("periods", "middle"), columnAt = (column, align) => align === "middle" ? monthLeft + (column + 0.5) * monthW : anchorIn(align, monthLeft + column * monthW, monthW), unitInCorner = needsUnit && !keyShowsUnit;
692
+ if (cornerWords !== void 0 && heads && unitInCorner && !carriesUnit(cornerWords) && warnings.push({
693
+ code: "cohort-unit-unprinted",
694
+ severity: "warn",
695
+ field: ["options", "columnOverrides", "label", "label"],
696
+ message: `the corner head was the only place that named the unit (${unit}), and columnOverrides.label.label does not; the rates now print with no unit`,
697
+ suggest: "name the unit in that head, or set unit with a subtitle measure"
698
+ }), !heads) {
699
+ let lost = [
700
+ `the periods (${periodRuns(data.periodLabel, visible, options.locale?.language)})`,
701
+ ...unitInCorner ? [`the unit (${unit})`] : [],
702
+ ...scope === "column" && showSteppedLegend ? ["the numbers behind the key's Low and High"] : []
703
+ ];
704
+ warnings.push({
705
+ code: "cohort-heads-hidden",
706
+ severity: "warn",
707
+ field: ["options", "columnHeads"],
708
+ message: `columnHeads false leaves ${lost.join(", ")} printed nowhere, so the reader cannot tell the columns apart`,
709
+ suggest: "name them in the title, the subtitle or a note, or keep the heads"
710
+ });
711
+ }
712
+ if (heads) {
713
+ if (cornerWords !== "") {
714
+ let cornerAlign = headAlignOf("label", "start"), cornerSpan = Math.min(labelW - gap, cornerRoom), placeCorner = (width) => cornerAlign === "start" || width <= cornerSpan ? { x: cornerAlign === "start" ? tableLeft : cornerAlign === "end" ? tableLeft + cornerSpan : tableLeft + cornerSpan / 2, align: cornerAlign } : (overrides?.label?.headAlign !== void 0 && overrides.label.headAlign !== "left" && warnings.push(overrideIgnored("label", "headAlign", "the head fills its track, so it has no room to align")), { x: tableLeft, align: "start" });
715
+ if (cornerFit) {
716
+ let { x, align } = placeCorner(Math.max(...cornerFit.lines.map((line) => measure(line, headFont).width)));
717
+ addBlock("cohort-header-label", cornerFit.lines, headFont, x, tableTop, headerRowH, align, headPaint, {}, "axisTitle", cornerFit.title);
718
+ } else if (cornerWords !== void 0) {
719
+ let { x, align } = placeCorner(measure(cornerText, headFont).width);
720
+ addLabel("cohort-header-label", cornerText, measuredRect(cornerText, headFont, x, tableTop, align, naturalRowH), headFont, headPaint, {}, "axisTitle");
721
+ } else {
722
+ let unitCorner = unitInCorner ? cornerTexts.find((text) => text !== "" && measure(text, headerFont).width <= cornerRoom) : void 0, corner = unitCorner ?? cornerText, cornerFont = unitCorner === void 0 ? headFont : headerFont, { x, align } = placeCorner(measure(corner, cornerFont).width);
723
+ addLabel("cohort-header-label", corner, measuredRect(corner, cornerFont, x, tableTop, align, naturalRowH), cornerFont, headPaint, {}, "axisTitle");
724
+ }
725
+ }
726
+ showSize && sizeHeader !== "" && (sizeHeaderLines.length > 1 || sizeFit ? addBlock("cohort-header-size", sizeHeaderLines, headFont, sizeAt(sizeHeadAlign), tableTop, headerRowH, sizeHeadAlign, headPaint, {}, "axisTitle", sizeFit?.title) : addLabel("cohort-header-size", sizeHeader, measuredRect(sizeHeader, headFont, sizeAt(sizeHeadAlign), tableTop, sizeHeadAlign, naturalRowH), headFont, headPaint, {}, "axisTitle")), visible.forEach((period, column) => {
727
+ let text = periodName(data.periodLabel, period, options.locale?.language), ink = style === "pure" && period === designated ? emphasisInk(theme) : headPaint;
637
728
  addLabel(
638
- `cohort-header-range:${period}`,
639
- rangeText,
640
- { x: monthLeft + (column + 0.5) * monthW - measured.width / 2, y: tableTop + headerRowH - 4 + (baseRowH - measured.height) / 2, w: measured.width, h: measured.height },
641
- rangeFont,
642
- mutedInk,
643
- { categoryId: `t${period}` },
644
- "point"
729
+ `cohort-header-period:${period}`,
730
+ text,
731
+ measuredRect(text, headerFont, columnAt(column, periodHeadAlign), tableTop, periodHeadAlign, headBand),
732
+ headerFont,
733
+ ink,
734
+ {},
735
+ "axisTitle"
645
736
  );
646
- }
647
- }), rowData.forEach((row, rowIndex) => {
648
- let y = tableTop + headerH + rowIndex * rowH + (row.kind === "total" ? totalGap : 0), rowFont = row.kind === "total" ? totalFont : cellFont;
649
- if (style === "pure" && rowIndex > 0 && row.kind !== "total" && addLine(`cohort-row-rule:${row.id}`, tableLeft, y, tableRight, y, theme.table?.ruleWidths?.row ?? strokeToken(theme, "hair"), tableRuleInk(), "rowRule"), row.kind === "total") {
737
+ let range = columnRanges?.[column];
738
+ if (range && options[STACKED_TEXT])
739
+ addBlock(`cohort-header-range:${period}`, rangeLines[column], axisFont, columnAt(column, periodHeadAlign), tableTop + headerRowH - 4, headerH - headerRowH, periodHeadAlign, mutedInk, { categoryId: `t${period}` }, "point");
740
+ else if (range) {
741
+ let rangeFont = { family: theme.type.family, ...theme.type.axis }, [low, high] = [formatValue(range.min, period), formatValue(range.max, period)], rangeText = low === high ? low : numberRange(low, high), measured = measure(rangeText, rangeFont);
742
+ addLabel(
743
+ `cohort-header-range:${period}`,
744
+ rangeText,
745
+ { x: leftOf(periodHeadAlign, columnAt(column, periodHeadAlign), measured.width), y: tableTop + headerRowH - 4 + (baseRowH - measured.height) / 2, w: measured.width, h: measured.height },
746
+ rangeFont,
747
+ mutedInk,
748
+ { categoryId: `t${period}` },
749
+ "point"
750
+ );
751
+ }
752
+ });
753
+ }
754
+ let nameAlign = alignOf("label", "start");
755
+ if (rowData.forEach((row, rowIndex) => {
756
+ let y = tableTop + headerH + rowIndex * rowH + (totalOnTop ? row.kind === "total" ? 0 : baseLineH + totalGap : row.kind === "total" ? totalGap : 0), rowFont = row.kind === "total" ? totalFont : cellFont;
757
+ if (style === "pure" && rowIndex > 0 && row.kind !== "total" && rowData[rowIndex - 1].kind !== "total" && addLine(`cohort-row-rule:${row.id}`, tableLeft, y, tableRight, y, theme.table?.ruleWidths?.row ?? strokeToken(theme, "hair"), tableRuleInk(), "rowRule"), row.kind === "total") {
650
758
  let rule = totalRule(theme);
651
- nodes.push({ t: "rect", id: `cohort-total-ground:${row.id}`, rect: { x: tableLeft, y, w: tableRight - tableLeft, h: rowH }, fill: totalPaint, owner: {}, part: "cohortTotalGround" }), addLine(`cohort-total-rule:${row.id}`, tableLeft, y - totalGap / 2, tableRight, y - totalGap / 2, rule.width, rule.stroke, "totalRule"), rules.push({ t: "line", id: `cohort-total-rule-below:${row.id}`, x1: tableLeft, y1: y + rowH, x2: tableRight, y2: y + rowH, stroke: rule.stroke, width: rule.width, owner: {}, part: "totalRule" });
759
+ nodes.push({ t: "rect", id: `cohort-total-ground:${row.id}`, rect: { x: tableLeft, y, w: tableRight - tableLeft, h: rowH }, fill: totalPaint, owner: {}, part: "cohortTotalGround" }), totalOnTop ? heads || rules.push({ t: "line", id: `cohort-total-rule:${row.id}`, x1: tableLeft, y1: y, x2: tableRight, y2: y, stroke: rule.stroke, width: rule.width, owner: {}, part: "totalRule" }) : addLine(`cohort-total-rule:${row.id}`, tableLeft, y - totalGap / 2, tableRight, y - totalGap / 2, rule.width, rule.stroke, "totalRule"), rules.push({ t: "line", id: `cohort-total-rule-below:${row.id}`, x1: tableLeft, y1: y + rowH, x2: tableRight, y2: y + rowH, stroke: rule.stroke, width: rule.width, owner: {}, part: "totalRule" });
652
760
  }
653
- let rowGround = row.kind === "total" ? totalPaint : background;
654
- addLabel(
761
+ let rowGround = row.kind === "total" ? totalPaint : background, sizeText = formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 }), nameRoom = Math.min(tableLeft + labelW - gap, showSize && !sizeAfterPeriods ? leftOf(sizeCellAlign, sizeAt(sizeCellAlign), measure(sizeText, rowFont).width) - 4 : 1 / 0) - tableLeft - rowNames[rowIndex].w;
762
+ if (addLabel(
655
763
  `cohort-row:${row.id}`,
656
764
  row.label,
657
- { x: tableLeft, y: y + (rowH - rowNames[rowIndex].h) / 2, w: rowNames[rowIndex].w, h: rowNames[rowIndex].h },
765
+ { x: nameAlign === "start" || nameRoom <= 0 ? tableLeft : tableLeft + (nameAlign === "end" ? nameRoom : nameRoom / 2), y: y + (rowH - rowNames[rowIndex].h) / 2, w: rowNames[rowIndex].w, h: rowNames[rowIndex].h },
658
766
  rowFont,
659
767
  { token: "ink" },
660
768
  { seriesId: row.id },
661
769
  "series",
662
770
  void 0,
663
- rowNames[rowIndex]
664
- );
665
- let sizeRect = { x: sizeLeft, y, w: sizeW, h: rowH }, sizeNodeId = `cohort-size:${row.id}`;
666
- nodes.push({ t: "rect", id: sizeNodeId, rect: sizeRect, fill: rowGround, owner: { seriesId: row.id, categoryId: "cohort-size" }, part: "cohortSize", display: { value: formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 }) } }), occupied.claim(sizeRect, "mark", { seriesId: row.id, categoryId: "cohort-size" }, "cohortSize"), marks.sizeCells.push({ rowId: row.id, rowLabel: row.label, value: row.base, rect: sizeRect, nodeId: sizeNodeId, kind: row.kind });
667
- let sizeText = formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 });
668
- addLabel(
669
- `cohort-size-label:${row.id}`,
670
- sizeText,
671
- measuredRect(sizeText, rowFont, sizeEnd, y, "end"),
672
- rowFont,
673
- { token: "ink" },
674
- { seriesId: row.id, categoryId: "cohort-size" },
675
- "point",
676
- rowGround
677
- ), visible.forEach((period, column) => {
771
+ rowNames[rowIndex],
772
+ nameAlign === "start" || nameRoom <= 0 ? void 0 : nameAlign
773
+ ), showSize) {
774
+ let sizeRect = { x: sizeLeft, y, w: sizeW, h: rowH }, sizeNodeId = `cohort-size:${row.id}`;
775
+ nodes.push({ t: "rect", id: sizeNodeId, rect: sizeRect, fill: rowGround, owner: { seriesId: row.id, categoryId: "cohort-size" }, part: "cohortSize", display: { value: formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 }) } }), occupied.claim(sizeRect, "mark", { seriesId: row.id, categoryId: "cohort-size" }, "cohortSize"), marks.sizeCells.push({ rowId: row.id, rowLabel: row.label, value: row.base, rect: sizeRect, nodeId: sizeNodeId, kind: row.kind }), addLabel(
776
+ `cohort-size-label:${row.id}`,
777
+ sizeText,
778
+ measuredRect(sizeText, rowFont, sizeAt(sizeCellAlign), y, sizeCellAlign),
779
+ rowFont,
780
+ { token: "ink" },
781
+ { seriesId: row.id, categoryId: "cohort-size" },
782
+ "point",
783
+ rowGround
784
+ );
785
+ }
786
+ visible.forEach((period, column) => {
678
787
  let retention = period < row.observedPeriods ? row.retention[period] ?? null : null, missing = row.kind === "total" ? derived.cohorts.some((cohort) => missingCohortRate(cohort, period, derived.basis)) : missingCohortRate(derived.cohorts.find((cohort) => cohort.id === row.id), period, derived.basis), rect = {
679
788
  x: monthLeft + column * monthW,
680
789
  y,
@@ -699,12 +808,12 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
699
808
  rect,
700
809
  nodeId,
701
810
  retention
702
- }), retention === null && !missing) return;
811
+ }), retention === null && !missing || options.figures === !1 && style === "stepped" && retention !== null && period !== 0) return;
703
812
  let text = missing ? "\u2014" : formatValue(retention, period), highlighted = style === "pure" && retention !== null && pureEmphasis(options, period, retention), font = row.kind === "total" && style !== "pure" ? totalFont : highlighted ? strongFont : cellFont, ink = period === 0 ? mutedInk : highlighted ? emphasisInk(theme, paint) : style === "stepped" && (bin ?? 0) >= 3 ? { token: "inkInverse" } : { token: "ink" };
704
813
  addLabel(
705
814
  `cohort-cell:${row.id}:t${period}`,
706
815
  text,
707
- measuredRect(text, font, rect.x + rect.w / 2, y, "middle"),
816
+ measuredRect(text, font, periodCellAlign === "middle" ? rect.x + rect.w / 2 : anchorIn(periodCellAlign, rect.x, rect.w), y, periodCellAlign),
708
817
  font,
709
818
  ink,
710
819
  { seriesId: row.id, categoryId: `t${period}` },
@@ -716,17 +825,17 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
716
825
  );
717
826
  });
718
827
  }), averageBases) {
719
- let y = tableBottom - baseLineH;
828
+ let y = totalOnTop ? tableTop + headerH + rowH : tableBottom - baseLineH;
720
829
  visible.forEach((period, column) => {
721
830
  if (options[STACKED_TEXT]) {
722
- addBlock(`cohort-average-base:t${period}`, baseLines[column], baseFont, monthLeft + (column + 0.5) * monthW, y, baseLineH, "middle", mutedInk, { seriesId: totalId, categoryId: `t${period}` }, "annotation");
831
+ addBlock(`cohort-average-base:t${period}`, baseLines[column], baseFont, columnAt(column, periodCellAlign), y, baseLineH, periodCellAlign, mutedInk, { seriesId: totalId, categoryId: `t${period}` }, "annotation");
723
832
  return;
724
833
  }
725
834
  let text = chartString(options, "baseValue", { value: formatAutomaticNumber(averageBases[column], { locale: options.locale?.language, decimals: 0 }) }), measured = measure(text, baseFont);
726
835
  addLabel(
727
836
  `cohort-average-base:t${period}`,
728
837
  text,
729
- { x: monthLeft + (column + 0.5) * monthW - measured.width / 2, y: y + (baseLineH - measured.height) / 2, w: measured.width, h: measured.height },
838
+ { x: leftOf(periodCellAlign, columnAt(column, periodCellAlign), measured.width), y: y + (baseLineH - measured.height) / 2, w: measured.width, h: measured.height },
730
839
  baseFont,
731
840
  mutedInk,
732
841
  { seriesId: totalId, categoryId: `t${period}` },
@@ -786,7 +895,7 @@ function buildExhibit(data, derived, visible, options, warnings, exclusion) {
786
895
  derived,
787
896
  a11y: {
788
897
  title: accessibleTitle(options.title, chartString(options, "exhibitTitle", { measure: measureName.toLocaleLowerCase(options.locale?.language ?? "en"), count: String(derived.cohorts.length) })),
789
- desc: chartString(options, "exhibitDesc", { measure: measureName, periods: visible.map((period) => periodName(data.periodLabel, period, options.locale?.language)).join(", "), formula: cohortFormula(options, derived.basis), anchor: visible.includes(0) ? chartString(options, "exhibitDescAnchor") : "", missing: derived.cohorts.some((row) => visible.some((period) => missingCohortRate(row, period, derived.basis))) ? chartString(options, "exhibitDescMissing") : "", total: derived.total ? chartString(options, "exhibitDescTotal", { basis: chartString(options, derived.basis === "previous" ? "previousBasis" : "cohortBasis") }) : "" })
898
+ desc: chartString(options, showSize ? "exhibitDesc" : "exhibitDescNoSize", { measure: measureName, periods: visible.map((period) => periodName(data.periodLabel, period, options.locale?.language)).join(", "), formula: cohortFormula(options, derived.basis), anchor: visible.includes(0) ? chartString(options, "exhibitDescAnchor") : "", missing: derived.cohorts.some((row) => visible.some((period) => missingCohortRate(row, period, derived.basis))) ? chartString(options, "exhibitDescMissing") : "", total: derived.total ? chartString(options, "exhibitDescTotal", { basis: chartString(options, derived.basis === "previous" ? "previousBasis" : "cohortBasis") }) : "" })
790
899
  },
791
900
  warnings,
792
901
  debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
@@ -890,7 +999,7 @@ function steppedKeyFlow(text, font, measure, width) {
890
999
  var ANSWERED_HERE = ["palette", "sort", "valueAxis", "annotations"];
891
1000
  function layoutCohort(data, options = {}) {
892
1001
  let warnings = cohortBasisWarnings(options);
893
- if (options.variant !== void 0 && options.variant !== "heatmap") {
1002
+ if (pushAll(warnings, cohortOptionRefusals(options)), options.variant !== void 0 && options.variant !== "heatmap") {
894
1003
  let geometry = layoutCohortExhibit(data, options);
895
1004
  return options.labels !== void 0 && geometry.warnings.push({
896
1005
  code: "labels-exhibit-unsupported",
@@ -899,7 +1008,7 @@ function layoutCohort(data, options = {}) {
899
1008
  suggest: "drop 'labels', or set variant 'heatmap', which honours it"
900
1009
  }), pushAll(geometry.warnings, warnings), geometry;
901
1010
  }
902
- let basis = options.basis ?? "cohort", averagesMode = options.averages ?? !1, methodNote = options.methodNote === !0;
1011
+ let basis = options.basis ?? "cohort", averagesMode = options.total ?? options.averages ?? !1, methodNote = options.methodNote === !0;
903
1012
  options.sort?.categories !== void 0 && options.sort.categories !== "sheet" && warnings.push({
904
1013
  code: "cohort-sort-ignored",
905
1014
  severity: "warn",
@@ -919,7 +1028,7 @@ function layoutCohort(data, options = {}) {
919
1028
  suggest: "remove options.valueAxis"
920
1029
  });
921
1030
  let {
922
- derived,
1031
+ derived: allPeriods,
923
1032
  warnings: derivedWarnings,
924
1033
  notMeaningful,
925
1034
  unsupportedAveragePeriods
@@ -928,7 +1037,7 @@ function layoutCohort(data, options = {}) {
928
1037
  averages: averagesMode
929
1038
  });
930
1039
  pushAll(warnings, derivedWarnings);
931
- let periodCount = derived.periodCount, periodIds = Array.from({ length: periodCount }, (_, t) => `t${t}`), periodNames = periodLabels(data.periodLabel, periodCount, options), baseSuffix = /* @__PURE__ */ new Map();
1040
+ let periodCount = allPeriods.periodCount, periodIds = Array.from({ length: periodCount }, (_, t) => `t${t}`), periodNames = periodLabels(data.periodLabel, periodCount, options), everyPeriod = periodIds.map((_, t) => t), visible = normalizeVisiblePeriods(options.visiblePeriods, everyPeriod, warnings), shown = new Set(visible), derived = options.visiblePeriods === void 0 ? allPeriods : { ...allPeriods, visiblePeriods: visible }, visibleSpan = (row) => visible.filter((t) => t < row.observedPeriods), baseSuffix = /* @__PURE__ */ new Map();
932
1041
  for (let row of derived.cohorts)
933
1042
  baseSuffix.set(row.id, `(n\xA0=\xA0${formatAutomaticNumber(row.base, { locale: options.locale?.language, decimals: 0 })})`);
934
1043
  let cohortLabel = (index) => `${data.cohorts[index].label ?? data.cohorts[index].id} ${baseSuffix.get(derived.cohorts[index].id)}`, theme = resolveSemanticPaletteTheme(
@@ -942,27 +1051,27 @@ function layoutCohort(data, options = {}) {
942
1051
  if (r === null) return null;
943
1052
  let paint = t === 0 ? ANCHOR_PAINT : average ? averagePaint(r) : cohortPaint(r);
944
1053
  return cellPaint.set(`cell:${rowId}:t${t}`, paint), { pct: r * 100, fill: cssOf(paint), ...options.format ? {} : { [AUTOMATIC_FORMAT]: !0, format: formatAutomaticPercent(1, smallRateDecimals(r * 100), !1, options.locale?.language) } };
945
- }, reverseRows = segmentSort === "reverse", shownSupports = derived.averages?.flatMap((a, t) => derived.cohorts.some((row) => missingCohortRate(row, t, basis)) ? [] : [{ support: a.support, t }]) ?? [], supports = shownSupports.map((a) => a.support), averageSupportSuffix = supports.length === 0 ? "" : supports[0] === supports[supports.length - 1] ? `(${chartString(options, "support", { count: String(supports[0]) })})` : `(${chartString(options, "supportRange", { first: String(supports[0]), last: String(supports[supports.length - 1]) })})`, averageLabel = [chartString(options, "weightedAverage"), averageSupportSuffix].filter(Boolean).join(" "), averageRow = derived.averages ? [
1054
+ }, reverseRows = segmentSort === "reverse", shownSupports = derived.averages?.flatMap((a, t) => !shown.has(t) || derived.cohorts.some((row) => missingCohortRate(row, t, basis)) ? [] : [{ support: a.support, t }]) ?? [], supports = shownSupports.map((a) => a.support), averageSupportSuffix = supports.length === 0 ? "" : supports[0] === supports[supports.length - 1] ? `(${chartString(options, "support", { count: String(supports[0]) })})` : `(${chartString(options, "supportRange", { first: String(supports[0]), last: String(supports[supports.length - 1]) })})`, averageLabel = [chartString(options, "weightedAverage"), averageSupportSuffix].filter(Boolean).join(" "), averageRow = derived.averages ? [
946
1055
  {
947
1056
  id: AVERAGE_ROW_ID,
948
1057
  label: averageLabel,
949
- values: derived.averages.map((a, t) => cellFor(AVERAGE_ROW_ID, t, a.value, !0))
1058
+ values: visible.map((t) => cellFor(AVERAGE_ROW_ID, t, derived.averages[t].value, !0))
950
1059
  }
951
1060
  ] : [], hostData = {
952
- categories: periodIds.map((id, t) => ({ id, label: periodNames[t] })),
1061
+ categories: visible.map((t) => ({ id: periodIds[t], label: periodNames[t] })),
953
1062
  series: [
954
1063
  ...reverseRows ? averageRow : [],
955
1064
  ...derived.cohorts.map((row, index) => ({
956
1065
  id: row.id,
957
1066
  label: cohortLabel(index),
958
- values: Array.from({ length: periodCount }, (_, t) => t >= row.observedPeriods ? null : cellFor(row.id, t, row.retention[t], !1))
1067
+ values: visible.map((t) => t >= row.observedPeriods ? null : cellFor(row.id, t, row.retention[t], !1))
959
1068
  })),
960
1069
  ...reverseRows ? [] : averageRow
961
1070
  ]
962
1071
  }, baseFootnotes = [
963
1072
  ...authoredNotes(options),
964
- ...derived.cohorts.some((row) => row.retention.some((_, t) => missingCohortRate(row, t, basis))) ? [disclosureNote(chartString(options, "hatchMissing"))] : [],
965
- ...cohortNotes(basis, derived.averages, shownSupports, notMeaningful, unsupportedAveragePeriods, periodNames, methodNote, options)
1073
+ ...derived.cohorts.some((row) => visibleSpan(row).some((t) => missingCohortRate(row, t, basis))) ? [disclosureNote(chartString(options, "hatchMissing"))] : [],
1074
+ ...cohortNotes(basis, derived.averages, shownSupports, shownNotMeaningful(data, derived, visible, notMeaningful), unsupportedAveragePeriods.filter((t) => shown.has(t)), periodNames, methodNote && shown.has(0), methodNote, options)
966
1075
  ], build = (extra) => (
967
1076
  // Only the author's own notes keep a number; the rest are derived.
968
1077
  layoutHeatmap(hostData, withAuthoredFootnotes({
@@ -985,12 +1094,15 @@ function layoutCohort(data, options = {}) {
985
1094
  ...[0, 0.25, 0.5, 0.75, 1].map((r) => ({
986
1095
  id: `scale:${r * 100}`,
987
1096
  // The top swatch also paints cells above their own base.
988
- label: r === 1 && derived.cohorts.some((cohort) => cohort.retention.some((value) => value !== null && value > 1)) ? "100%+" : `${r * 100}%`,
1097
+ label: r === 1 && derived.cohorts.some((cohort) => visibleSpan(cohort).some((t) => {
1098
+ let value = cohort.retention[t];
1099
+ return value != null && value > 1;
1100
+ })) ? "100%+" : `${r * 100}%`,
989
1101
  paint: cohortPaint(r),
990
1102
  ...rampTint(r) >= 0.8 ? { stroke: { token: "neutralMark" } } : {}
991
1103
  })),
992
1104
  // Period 0 is grey, not the ramp's 100%: the key says why.
993
- { id: "scale:base", label: chartString(options, "periodBase", { period: periodNames[0] }), paint: ANCHOR_PAINT },
1105
+ ...shown.has(0) ? [{ id: "scale:base", label: chartString(options, "periodBase", { period: periodNames[0] }), paint: ANCHOR_PAINT }] : [],
994
1106
  // The average row rides its own grey ramp; its swatch shows the
995
1107
  // ramp at 50%, so the key covers every fill drawn.
996
1108
  ...derived.averages ? [{ id: "scale:average", label: chartString(options, "averageGrey"), paint: averagePaint(0.5) }] : []
@@ -1001,14 +1113,14 @@ function layoutCohort(data, options = {}) {
1001
1113
  // A row name too long for the band is cut before its base, never the base.
1002
1114
  rowSuffix: Object.fromEntries(baseSuffix)
1003
1115
  }, [...baseFootnotes, ...extra], options.footnotes))
1004
- ), host = build([]), lost = countSuppressed(host, derived, methodNote);
1116
+ ), host = build([]), lost = countSuppressed(host, derived, methodNote, shown);
1005
1117
  if (lost.total > 0) {
1006
1118
  host = build([disclosureNote(suppressionNote(lost, options))]);
1007
- let second = countSuppressed(host, derived, methodNote);
1119
+ let second = countSuppressed(host, derived, methodNote, shown);
1008
1120
  if (second.total !== lost.total || second.drawn !== lost.drawn) {
1009
1121
  host = build([disclosureNote(suppressionNote(second, options))]);
1010
- let third = countSuppressed(host, derived, methodNote);
1011
- third.total !== second.total || third.drawn !== second.drawn ? (host = build([disclosureNote(chartString(options, "uncountedSuppressed"))]), lost = countSuppressed(host, derived, methodNote)) : lost = third;
1122
+ let third = countSuppressed(host, derived, methodNote, shown);
1123
+ third.total !== second.total || third.drawn !== second.drawn ? (host = build([disclosureNote(chartString(options, "uncountedSuppressed"))]), lost = countSuppressed(host, derived, methodNote, shown)) : lost = third;
1012
1124
  } else
1013
1125
  lost = second;
1014
1126
  }
@@ -1073,14 +1185,14 @@ function layoutCohort(data, options = {}) {
1073
1185
  marks: { cells },
1074
1186
  derived,
1075
1187
  a11y: {
1076
- title: accessibleTitle(options.title, chartString(options, "title", { measure: cohortMeasure(options).toLocaleLowerCase(options.locale?.language ?? "en"), cohorts: String(derived.cohorts.length), periods: String(periodCount) })),
1188
+ title: accessibleTitle(options.title, chartString(options, "title", { measure: cohortMeasure(options).toLocaleLowerCase(options.locale?.language ?? "en"), cohorts: String(derived.cohorts.length), periods: String(visible.length) })),
1077
1189
  counts: [
1078
1190
  structureCount("cohorts", derived.cohorts.length),
1079
- structureCount("periods", derived.periodCount),
1191
+ structureCount("periods", visible.length),
1080
1192
  structureCount("cells", unobserved, chartString(options, "cells", { count: String(unobserved) })),
1081
- ...derived.averages ? [derived.averages[0], derived.averages[derived.averages.length - 1]].flatMap((a) => a.value === null ? [] : [structureCount("cohorts", a.support, chartString(options, "support", { count: String(a.support) }))]) : []
1193
+ ...derived.averages ? [derived.averages[visible[0]], derived.averages[visible.at(-1)]].flatMap((a) => a.value === null ? [] : [structureCount("cohorts", a.support, chartString(options, "support", { count: String(a.support) }))]) : []
1082
1194
  ],
1083
- desc: describe(derived, periodNames, unobserved, options)
1195
+ desc: describe(derived, periodNames, unobserved, options, visible)
1084
1196
  },
1085
1197
  warnings
1086
1198
  };
@@ -1109,13 +1221,13 @@ function periodLabels(periodLabel, count, options) {
1109
1221
  let initial = (periodLabel ?? "").trim().charAt(0).toUpperCase();
1110
1222
  return Array.from({ length: count }, (_, t) => initial === "" ? chartString(options, "period", { period: String(t) }) : `${initial}${t}`);
1111
1223
  }
1112
- function cohortNotes(basis, averages, shownSupports, notMeaningful, unsupported, periodNames, methodNote, options) {
1224
+ function cohortNotes(basis, averages, shownSupports, notMeaningful, unsupported, periodNames, anchorNote, methodNote, options) {
1113
1225
  let notes = [
1114
1226
  ...methodNote || basis === "previous" ? [chartString(options, "formulaCount", { formula: cohortFormula(options, basis).replace(/[.!?]$/, "") })] : [],
1115
1227
  // The anchor column's value is stated ONCE here rather than repeated in
1116
1228
  // every cell. With the note off the anchor cells count like any other in
1117
1229
  // the suppression note (countSuppressed).
1118
- ...methodNote ? [disclosureNote(chartString(options, "anchorNote", { period: periodNames[0] }))] : []
1230
+ ...anchorNote ? [disclosureNote(chartString(options, "anchorNote", { period: periodNames[0] }))] : []
1119
1231
  ];
1120
1232
  if (notMeaningful.length > 0 && notes.push(disclosureNote(chartString(options, "hatchNm", { periods: notMeaningful.join(", ") }))), averages) {
1121
1233
  notes.push(
@@ -1137,9 +1249,9 @@ function suppressionNote(lost, options) {
1137
1249
  return lost.total >= lost.drawn ? chartString(options, "allSuppressed", { count: String(lost.drawn) }) : chartString(options, "someSuppressed", { count: String(lost.total), total: String(lost.drawn) });
1138
1250
  }
1139
1251
  var NM_PAINT = { token: "neutral", tint: 0.55 };
1140
- function countSuppressed(host, derived, methodNote) {
1252
+ function countSuppressed(host, derived, methodNote, shown) {
1141
1253
  let visible = new Set(host.labels.filter((label) => !label.hidden).map((label) => label.id)), drawnPer = /* @__PURE__ */ new Map(), lostPer = /* @__PURE__ */ new Map(), count = (rowId, t, value) => {
1142
- value !== null && (t === 0 && methodNote || (drawnPer.set(t, (drawnPer.get(t) ?? 0) + 1), visible.has(`point:${rowId}:t${t}`) || lostPer.set(t, (lostPer.get(t) ?? 0) + 1)));
1254
+ value === null || !shown.has(t) || t === 0 && methodNote || (drawnPer.set(t, (drawnPer.get(t) ?? 0) + 1), visible.has(`point:${rowId}:t${t}`) || lostPer.set(t, (lostPer.get(t) ?? 0) + 1));
1143
1255
  };
1144
1256
  for (let row of derived.cohorts)
1145
1257
  for (let t = 0; t < row.observedPeriods; t++) count(row.id, t, row.retention[t] ?? null);
@@ -1157,14 +1269,22 @@ function withAverageRow(highlight, hasAverages) {
1157
1269
  function stripAnswered(options) {
1158
1270
  let rest = { ...options };
1159
1271
  for (let key of ANSWERED_HERE) delete rest[key];
1160
- return delete rest.basis, delete rest.averages, delete rest.methodNote, keepShownNotes(options, rest);
1272
+ return delete rest.basis, delete rest.averages, delete rest.total, delete rest.visiblePeriods, delete rest.methodNote, keepShownNotes(options, rest);
1273
+ }
1274
+ function shownNotMeaningful(data, derived, visible, phrases) {
1275
+ return derived.visiblePeriods === void 0 ? [...phrases] : derived.cohorts.flatMap((row, index) => {
1276
+ let from = visible.find((t) => t < row.observedPeriods && row.retention[t] === null && !missingCohortRate(row, t, derived.basis));
1277
+ return from === void 0 ? [] : [`'${data.cohorts[index].label ?? row.id}' from period ${from}`];
1278
+ });
1161
1279
  }
1162
- function describe(derived, periodNames, unobserved, options) {
1280
+ function describe(derived, periodNames, unobserved, options, visible) {
1163
1281
  let first = derived.cohorts[0], last = derived.cohorts[derived.cohorts.length - 1], pct = (v) => `${formatAutomaticNumber(v * 100, { decimals: autoDecimals(v * 100), locale: options.locale?.language })}%`, at = (index) => {
1164
- let row = derived.cohorts[index], t = row.observedPeriods - 1, r = row.retention[t] ?? null;
1282
+ let row = derived.cohorts[index], t = derived.visiblePeriods === void 0 ? row.observedPeriods - 1 : visible.filter((period) => period < row.observedPeriods).at(-1);
1283
+ if (t === void 0) return chartString(options, "atPeriod", { value: chartString(options, "notReached"), period: periodNames[visible[0]] });
1284
+ let r = row.retention[t] ?? null;
1165
1285
  return r === null ? chartString(options, "atPeriod", { value: chartString(options, missingCohortRate(row, t, derived.basis) ? "missing" : "notMeaningful"), period: periodNames[t] }) : chartString(options, "atPeriod", { value: pct(r), period: periodNames[t] });
1166
1286
  }, average = (a, t) => a.value === null ? derived.cohorts.some((row) => missingCohortRate(row, t, derived.basis)) ? chartString(options, "missingAt", { period: periodNames[t] }) : chartString(options, "blankAverage") : chartString(options, "valueSupport", { value: pct(a.value), count: String(a.support) }), basisWord = cohortFormula(options, derived.basis);
1167
- return chartString(options, "descStart", { measure: cohortMeasure(options).toLocaleLowerCase(options.locale?.language ?? "en"), cohorts: String(derived.cohorts.length), periods: String(derived.periodCount), formula: basisWord }) + chartString(options, "descReach", { first: at(0), last: at(derived.cohorts.length - 1) }) + chartString(options, "descBlank", { count: String(unobserved) }) + (derived.averages ? chartString(options, "descAverage", { first: average(derived.averages[0], 0), last: average(derived.averages[derived.averages.length - 1], derived.averages.length - 1) }) : "") + chartString(options, "descBases", { first: String(first.base), last: String(last.base) });
1287
+ return chartString(options, "descStart", { measure: cohortMeasure(options).toLocaleLowerCase(options.locale?.language ?? "en"), cohorts: String(derived.cohorts.length), periods: String(visible.length), formula: basisWord }) + chartString(options, visible.includes(0) ? "descReach" : "descReachShown", { first: at(0), last: at(derived.cohorts.length - 1) }) + chartString(options, "descBlank", { count: String(unobserved) }) + (derived.averages ? chartString(options, "descAverage", { first: average(derived.averages[visible[0]], visible[0]), last: average(derived.averages[visible.at(-1)], visible.at(-1)) }) : "") + chartString(options, "descBases", { first: String(first.base), last: String(last.base) });
1168
1288
  }
1169
1289
 
1170
1290
  // src/core/charts/cohort/core.ts