boardplot 0.54.0 → 0.55.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.
- package/CHANGELOG.md +448 -0
- package/README.md +4 -4
- package/dist/{ReaderBox-YXC5XK7D.js → ReaderBox-3FFPHWSI.js} +14 -10
- package/dist/{annotateEngine-5O3IRSQL.js → annotateEngine-ET4DM2OK.js} +3 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-GVKFFJ23.js → chunk-2ALFFOKB.js} +460 -148
- package/dist/chunk-2BP6X5GX.js +125 -0
- package/dist/chunk-2C4SYWZ3.js +25 -0
- package/dist/{chunk-23RWLBZF.js → chunk-2TAK2ELB.js} +3 -3
- package/dist/{chunk-J33RA3YO.js → chunk-2YNF6AHH.js} +5 -5
- package/dist/{chunk-DDI2W4TR.js → chunk-32IKJMUF.js} +3 -3
- package/dist/{chunk-7X3UZM7F.js → chunk-33FCWTGT.js} +1 -1
- package/dist/{chunk-KL2XJQAA.js → chunk-37A6CLR5.js} +1729 -196
- package/dist/{chunk-EHDWWFNV.js → chunk-3AJY353W.js} +3 -3
- package/dist/chunk-3B3CFJ2H.js +48 -0
- package/dist/{chunk-6TJDWMZV.js → chunk-3B3K7TD5.js} +83 -9
- package/dist/{chunk-WDONXBQE.js → chunk-3C24WWUQ.js} +1 -1
- package/dist/{chunk-BWTX7LUG.js → chunk-3L2VXXM4.js} +9 -4
- package/dist/{chunk-OD3IH6FG.js → chunk-3OZRODC4.js} +39 -21
- package/dist/{chunk-JB4YPOMT.js → chunk-3XOWXLLQ.js} +6 -7
- package/dist/{chunk-JAKRPSWP.js → chunk-3ZAH24P6.js} +164 -51
- package/dist/{chunk-2THWIKRB.js → chunk-4CJ6UCX4.js} +33 -16
- package/dist/{chunk-VDAZPGR2.js → chunk-4DZFR52I.js} +2 -2
- package/dist/{chunk-AZIRTSVP.js → chunk-4WT3T5SH.js} +122 -52
- package/dist/{chunk-FPPN5NAR.js → chunk-4X3HNETE.js} +3 -3
- package/dist/{chunk-WZBMTZBM.js → chunk-4Y7BA2NW.js} +4 -4
- package/dist/{chunk-TSPWXAAI.js → chunk-4YHZSPAJ.js} +6 -7
- package/dist/{chunk-GSMWHKOW.js → chunk-5DMHMQFP.js} +7 -7
- package/dist/{chunk-E64MTTBC.js → chunk-5SHI57XD.js} +45 -14
- package/dist/{chunk-A5TY7H5T.js → chunk-5SLJGRUO.js} +139 -47
- package/dist/{chunk-47BO6MYI.js → chunk-5UVJKB7L.js} +137 -70
- package/dist/{chunk-D3D7XHBI.js → chunk-63L35UCI.js} +6 -6
- package/dist/{chunk-S6CRZKPO.js → chunk-6C64IBOG.js} +5 -5
- package/dist/{chunk-ENOCOA3F.js → chunk-6D4EO3S7.js} +5 -5
- package/dist/chunk-6H3OSHEY.js +25 -0
- package/dist/chunk-6WZZADRL.js +25 -0
- package/dist/{chunk-HGGLJYPZ.js → chunk-75TWO5B2.js} +89 -57
- package/dist/chunk-7ADUVRG5.js +14 -0
- package/dist/{chunk-U4P6TQRW.js → chunk-7DAH2E4T.js} +2 -2
- package/dist/{chunk-43OQ26TL.js → chunk-7FKY6YWU.js} +8 -8
- package/dist/{chunk-RKITD2UJ.js → chunk-7GVYMGLK.js} +6 -3
- package/dist/{chunk-DSZUV3TM.js → chunk-7Q2WV6D2.js} +3 -3
- package/dist/{chunk-JFBEAUJ6.js → chunk-7Q37C6GZ.js} +1 -1
- package/dist/{chunk-GEBGBJBD.js → chunk-7UPZPFHQ.js} +41 -34
- package/dist/{chunk-T7ZCYYQZ.js → chunk-7Z73MM35.js} +14 -6
- package/dist/{chunk-VWYUUBBP.js → chunk-AB35GVPG.js} +80 -31
- package/dist/{chunk-HZG5NB7Q.js → chunk-AF7EB6N6.js} +151 -84
- package/dist/chunk-AIU4GZV5.js +24 -0
- package/dist/{chunk-TNHD4UTC.js → chunk-AM2CG7VX.js} +13 -3
- package/dist/{chunk-BXEM2CVW.js → chunk-APQPYM2Z.js} +3 -3
- package/dist/{chunk-AHQ4L3BE.js → chunk-AZM4YNRE.js} +2 -2
- package/dist/{chunk-U2HQELXL.js → chunk-B3AXM3MT.js} +2 -2
- package/dist/{chunk-6I7YZTY7.js → chunk-BDGLMWPO.js} +12 -4
- package/dist/{chunk-MKVV7GVJ.js → chunk-BFFPYT3Y.js} +13 -7
- package/dist/{chunk-EYLWVI26.js → chunk-BGJRCG7N.js} +135 -114
- package/dist/{chunk-RNOJSEES.js → chunk-BK6P6KMW.js} +1 -1
- package/dist/{chunk-XB4KZ6WO.js → chunk-BSATR6ZO.js} +40 -13
- package/dist/{chunk-PDG4IM3L.js → chunk-BVYIKLQ5.js} +1 -1
- package/dist/chunk-BWVNCLUS.js +19 -0
- package/dist/{chunk-MT4MP3UZ.js → chunk-CKNOLGRR.js} +1 -1
- package/dist/chunk-CLGUFVHM.js +24 -0
- package/dist/{chunk-VAEC53B3.js → chunk-COQEHO7B.js} +3 -3
- package/dist/{chunk-3EZRM4YM.js → chunk-CPGASWNN.js} +25 -1
- package/dist/{chunk-SFQ5ADIG.js → chunk-CVIW2MV4.js} +284 -150
- package/dist/chunk-CYKIX3IQ.js +24 -0
- package/dist/{chunk-4MREJWRM.js → chunk-CZ3WCG55.js} +5 -4
- package/dist/{chunk-DRTA6JG5.js → chunk-D2B3KP35.js} +26 -15
- package/dist/{chunk-E42JZ2DA.js → chunk-D2QMNHCC.js} +4 -5
- package/dist/{chunk-AA4U62G6.js → chunk-D7G27EYZ.js} +4 -4
- package/dist/{chunk-3RMTPAEJ.js → chunk-DB2JKPOX.js} +806 -69
- package/dist/{chunk-G6XCUX3I.js → chunk-DEYAI662.js} +60 -13
- package/dist/{chunk-4WK3CNW5.js → chunk-DRHQG44U.js} +11 -0
- package/dist/{chunk-WZGJSQKN.js → chunk-DZ3S4RPI.js} +15 -1
- package/dist/{chunk-JTJNQKPM.js → chunk-E44W4EEG.js} +2 -2
- package/dist/{chunk-QJ4WGAC6.js → chunk-E5OEWMNX.js} +66 -12
- package/dist/chunk-E6HDUEGK.js +26 -0
- package/dist/{chunk-A7IEVBYI.js → chunk-E76U5H52.js} +1 -5
- package/dist/{chunk-2IXDYW6O.js → chunk-EAR43REB.js} +195 -57
- package/dist/{chunk-MYCLO35J.js → chunk-EBC5TMI2.js} +29 -8
- package/dist/chunk-EBVJCVXL.js +25 -0
- package/dist/chunk-EC2PGJ64.js +24 -0
- package/dist/chunk-EGPXEY2K.js +24 -0
- package/dist/{chunk-LYVOL4TQ.js → chunk-EQRFSVDD.js} +2 -1
- package/dist/{chunk-WKWMOZNE.js → chunk-EW47LNWH.js} +226 -61
- package/dist/{chunk-7EVIIADO.js → chunk-EXDMYV5W.js} +3 -1
- package/dist/{chunk-WMZCOGD6.js → chunk-EZZ533MH.js} +1 -1
- package/dist/{chunk-K4RCWNLC.js → chunk-F5V7YFKS.js} +11 -8
- package/dist/{chunk-JEYJRJ7M.js → chunk-F6CVYNDY.js} +5 -4
- package/dist/{chunk-NRHTC2SQ.js → chunk-F6OLHND5.js} +2 -2
- package/dist/chunk-FI5EXISD.js +27 -0
- package/dist/{chunk-F35DA442.js → chunk-FQF7GSJK.js} +46 -27
- package/dist/{chunk-GYNZ72GO.js → chunk-FS6ZE5TG.js} +2 -2
- package/dist/{chunk-6BJQULXR.js → chunk-G63WXSQP.js} +75 -34
- package/dist/{chunk-DHWCFQNO.js → chunk-GCSCHK5Y.js} +4 -18
- package/dist/{chunk-WUKSZNHL.js → chunk-GD5TYS5R.js} +32 -21
- package/dist/{chunk-RGZGLKFB.js → chunk-GDVR3XHT.js} +418 -62
- package/dist/{chunk-UTQGZF37.js → chunk-GDZI5ZJ7.js} +1 -1
- package/dist/{chunk-FMFCGYCE.js → chunk-GFIT3FRE.js} +277 -291
- package/dist/chunk-GM2HIU6C.js +24 -0
- package/dist/{chunk-MZJBPDIL.js → chunk-GMJFCBR6.js} +1 -1
- package/dist/{chunk-PBYUJSEY.js → chunk-H3AEYPRP.js} +66 -43
- package/dist/{chunk-BUPLB3EX.js → chunk-H3IBJQ5A.js} +6 -2
- package/dist/chunk-H4VDQ7OE.js +24 -0
- package/dist/{chunk-FV32N6AF.js → chunk-H5L2P2GO.js} +6 -4
- package/dist/{chunk-F7X53SZM.js → chunk-HFRQLMKK.js} +12 -7
- package/dist/{chunk-KJEZFOO6.js → chunk-HGT3UKDW.js} +91 -48
- package/dist/{chunk-B3F4TS3V.js → chunk-HJRNBKIT.js} +768 -69
- package/dist/{chunk-G63ROSY5.js → chunk-HLOXWM2O.js} +118 -62
- package/dist/{chunk-NGRIT3CY.js → chunk-HR2BKLS3.js} +113 -128
- package/dist/{chunk-S4QSJAGY.js → chunk-HZUAEMN5.js} +1 -1
- package/dist/{chunk-OZUTYDV4.js → chunk-IF2ZABAM.js} +2 -2
- package/dist/chunk-IF76JRXT.js +24 -0
- package/dist/{chunk-4ZGN4ZUN.js → chunk-IGNBQT23.js} +87 -3
- package/dist/{chunk-B6LHZLLK.js → chunk-IGVAWAOK.js} +31 -101
- package/dist/{chunk-KFWEO4UA.js → chunk-ILFQ75N4.js} +253 -141
- package/dist/chunk-INHDHZNP.js +8 -0
- package/dist/chunk-IOKWBUQP.js +25 -0
- package/dist/{chunk-JJJ2KAHR.js → chunk-IQDMZ33D.js} +20 -9
- package/dist/{chunk-IDDA5INB.js → chunk-IVRYF7QA.js} +7 -4
- package/dist/{chunk-L7RHB734.js → chunk-J5PL6JLL.js} +1 -1
- package/dist/chunk-JBMWRXDS.js +24 -0
- package/dist/{chunk-IDT7DJ7F.js → chunk-JKOEHRGV.js} +1 -1
- package/dist/chunk-JMGB444D.js +26 -0
- package/dist/chunk-JU7S52HI.js +26 -0
- package/dist/{chunk-BBL3R5YZ.js → chunk-JXBZIJCG.js} +1 -1
- package/dist/{chunk-WLZ54FWG.js → chunk-JYAZPMSA.js} +70 -1
- package/dist/chunk-K5S3K6QK.js +24 -0
- package/dist/{chunk-V7RAPZHX.js → chunk-KAYBRD4F.js} +3 -3
- package/dist/{chunk-OMNQXHFF.js → chunk-KC52E5G4.js} +31 -20
- package/dist/{chunk-LNKY5Z2X.js → chunk-KDSYZLF6.js} +2 -3
- package/dist/{chunk-C3O45JWU.js → chunk-KEDNHCGB.js} +4 -4
- package/dist/chunk-KFGZMHIB.js +28 -0
- package/dist/{chunk-QQNPU27R.js → chunk-KHRAJDBM.js} +1 -1
- package/dist/{chunk-ZTH6YSVA.js → chunk-KND4OM4B.js} +117 -102
- package/dist/{chunk-IM4WUIR7.js → chunk-KZH2QI6S.js} +2 -2
- package/dist/{chunk-IYEFEBRN.js → chunk-KZJ5VM6E.js} +14 -3
- package/dist/{chunk-CICWSCLC.js → chunk-LA5OYJ5P.js} +146 -69
- package/dist/{chunk-I2E3YDNZ.js → chunk-LAVVML3X.js} +33 -9
- package/dist/{chunk-TKQKXBGC.js → chunk-LD4LML5P.js} +10 -8
- package/dist/{chunk-OURX73UJ.js → chunk-LF6RTFNK.js} +13 -11
- package/dist/{chunk-HDZGZJKR.js → chunk-LFUJTEJO.js} +100 -36
- package/dist/{chunk-53OYF4ZT.js → chunk-LHKDZAWN.js} +16 -8
- package/dist/{chunk-5PCCSSII.js → chunk-LLDKKEUD.js} +1 -1
- package/dist/{chunk-VNLSTZES.js → chunk-LRCO4G7C.js} +314 -92
- package/dist/{chunk-HZZH3MQI.js → chunk-LSF76AS3.js} +7 -3
- package/dist/chunk-M427S3G7.js +25 -0
- package/dist/{chunk-WGIO6AHP.js → chunk-MEMPP7VZ.js} +3 -3
- package/dist/{chunk-K4K6KGEF.js → chunk-MJMOKPTF.js} +186 -167
- package/dist/chunk-MLGEBFEX.js +47 -0
- package/dist/chunk-MLW72KWN.js +24 -0
- package/dist/chunk-MQYIBGZE.js +19 -0
- package/dist/{chunk-6NLH6TEP.js → chunk-MTRV3BJL.js} +301 -130
- package/dist/{chunk-H4H4O62O.js → chunk-N5HN5QGH.js} +1 -1
- package/dist/chunk-N5TZL74Y.js +53 -0
- package/dist/chunk-N7N5NIAU.js +211 -0
- package/dist/{chunk-G57ZO7DB.js → chunk-NA6WLZ66.js} +66 -26
- package/dist/{chunk-XNA6DATU.js → chunk-NB7M4KX4.js} +99 -56
- package/dist/{chunk-WEPAE4KG.js → chunk-NCZWLV7T.js} +4 -4
- package/dist/{chunk-C54QLNE4.js → chunk-NGA7ICG4.js} +1 -1
- package/dist/{chunk-RZB4RPPD.js → chunk-NHYKSPL4.js} +154 -99
- package/dist/chunk-NMTWUYUF.js +30 -0
- package/dist/{chunk-XTGWCYAR.js → chunk-NOCIN2EM.js} +430 -256
- package/dist/{chunk-RK4S3VPS.js → chunk-NUCYUKVH.js} +3 -3
- package/dist/{chunk-S32YYDIB.js → chunk-NVGAEQ6M.js} +4 -3
- package/dist/{chunk-4FFCIQDG.js → chunk-O2KKQNGW.js} +4 -1
- package/dist/chunk-O36WX56O.js +13 -0
- package/dist/{chunk-P52JHUUM.js → chunk-O4WJWHCH.js} +187 -85
- package/dist/{chunk-MEG4NMSI.js → chunk-O6NJDRXE.js} +2 -2
- package/dist/{chunk-UYNAL3Y3.js → chunk-O7DVW3IE.js} +141 -68
- package/dist/{chunk-TNNK4IIY.js → chunk-O7W35PT3.js} +13 -12
- package/dist/{chunk-26P4WRQC.js → chunk-ODZJ4LW7.js} +6 -3
- package/dist/{chunk-7JQAUJOL.js → chunk-OHGEDG46.js} +1 -1
- package/dist/{chunk-ISWU5YB3.js → chunk-OJ2BPQGQ.js} +11 -5
- package/dist/chunk-ONKSGT2M.js +28 -0
- package/dist/{chunk-EP54VZI5.js → chunk-OOFSQ5AS.js} +1 -1
- package/dist/{chunk-SHH2AHIU.js → chunk-OY2UJ4XK.js} +64 -42
- package/dist/{chunk-OU5K2JPF.js → chunk-P6TA7M3G.js} +102 -32
- package/dist/{chunk-PJWLKCFX.js → chunk-PQYJZMCR.js} +98 -90
- package/dist/{chunk-ELPQZIGR.js → chunk-PYV6ZIR6.js} +37 -13
- package/dist/chunk-PZ46S2SY.js +69 -0
- package/dist/{chunk-5SJQOPL7.js → chunk-Q3E74U2W.js} +4 -4
- package/dist/{chunk-4TPHMIE5.js → chunk-QBJDHFJJ.js} +4 -2
- package/dist/chunk-QBRRJ5OR.js +24 -0
- package/dist/{chunk-3FNY7ZCG.js → chunk-QEP3X3OV.js} +141 -79
- package/dist/{chunk-OMVYFSOM.js → chunk-QKWBDH2L.js} +2 -2
- package/dist/{chunk-QY5ZKUWY.js → chunk-QOWE55RR.js} +9 -3
- package/dist/{chunk-LVXOY5WL.js → chunk-QRVIS2QB.js} +6 -5
- package/dist/chunk-R27IDIJI.js +24 -0
- package/dist/{chunk-FILDYFT4.js → chunk-RNIYG6PI.js} +2 -2
- package/dist/{chunk-AVMKRVNP.js → chunk-RO2PSSAI.js} +13 -23
- package/dist/{chunk-2DR5MMDY.js → chunk-ROLR7HRB.js} +12 -6
- package/dist/{chunk-YF2PYLC4.js → chunk-RSCRIWAH.js} +1 -1
- package/dist/{chunk-T3PNYRDM.js → chunk-RTXRIZYU.js} +370 -134
- package/dist/{chunk-GGO43PHB.js → chunk-RUWNG2JC.js} +6 -5
- package/dist/chunk-RYPJB3RO.js +132 -0
- package/dist/{chunk-DAVHGK27.js → chunk-S7NRL66K.js} +46 -23
- package/dist/{chunk-VABRPZVC.js → chunk-SA46CNMS.js} +5 -1
- package/dist/{chunk-ZXOD37BE.js → chunk-SBR2RLEQ.js} +72 -38
- package/dist/chunk-SC42DPNV.js +24 -0
- package/dist/{chunk-MBVXROCI.js → chunk-SFG7NG23.js} +20 -3
- package/dist/{chunk-AG2CJ4JY.js → chunk-SNQ7D5R7.js} +18 -1
- package/dist/{chunk-3V7AA3IZ.js → chunk-SPSGUFTI.js} +11 -3
- package/dist/chunk-SRUV7AT6.js +51 -0
- package/dist/{chunk-NRF223FR.js → chunk-SZXKV3BX.js} +1 -1
- package/dist/{chunk-5A6MO4AR.js → chunk-T5Y4HXYO.js} +7 -4
- package/dist/{chunk-QR35TD2B.js → chunk-U7W7GYXP.js} +37 -37
- package/dist/{chunk-LFX7W4B7.js → chunk-UDKYY27B.js} +1 -1
- package/dist/{chunk-24BHMKDD.js → chunk-UF3HSFAE.js} +25 -2
- package/dist/chunk-UIYXMPDW.js +24 -0
- package/dist/{chunk-CPKHL7FK.js → chunk-UNMIUILK.js} +1 -1
- package/dist/chunk-V3MSLNSD.js +24 -0
- package/dist/chunk-V634AXDM.js +31 -0
- package/dist/{chunk-57ZGVAU3.js → chunk-V7F4F6JA.js} +39 -6
- package/dist/{chunk-JEL6665C.js → chunk-VBVG6NEL.js} +6 -6
- package/dist/chunk-VL7WLE4H.js +24 -0
- package/dist/chunk-W45AR6EW.js +94 -0
- package/dist/{chunk-U7LLQ7XM.js → chunk-WALYNKBN.js} +446 -103
- package/dist/{chunk-J2ROMB7J.js → chunk-WAPCCJUB.js} +64 -26
- package/dist/{chunk-WQ55QPEB.js → chunk-WDIVAU5U.js} +241 -118
- package/dist/{chunk-EHVESNLV.js → chunk-WEMUCDPK.js} +1 -1
- package/dist/{chunk-HHS6333D.js → chunk-WFSOKGGA.js} +2 -2
- package/dist/{chunk-AJHYXD5U.js → chunk-WG5CJGLU.js} +2 -2
- package/dist/{chunk-WJKVNRCR.js → chunk-WQT6HIIY.js} +18 -17
- package/dist/{chunk-KAQH75T6.js → chunk-WSJDLZSZ.js} +78 -47
- package/dist/{chunk-3UBTO342.js → chunk-WWIY6BBY.js} +77 -38
- package/dist/{chunk-33PLBIMA.js → chunk-WXJ5MHLH.js} +3 -2
- package/dist/chunk-X3YP4DUV.js +76 -0
- package/dist/{chunk-ZNHF2XCP.js → chunk-X7XTIM6U.js} +50 -36
- package/dist/chunk-XJQXFVXY.js +24 -0
- package/dist/{chunk-NQSDIDRO.js → chunk-XMN3Z43K.js} +5 -5
- package/dist/{chunk-32X7JGH3.js → chunk-XPOMQWXY.js} +89 -69
- package/dist/chunk-XVUQMZWV.js +24 -0
- package/dist/chunk-XYYRHGQI.js +24 -0
- package/dist/{chunk-EYZ6SLF3.js → chunk-XZLU3G23.js} +7 -7
- package/dist/chunk-Y2CAIAUI.js +24 -0
- package/dist/{chunk-3P4PJJND.js → chunk-Y3L655X6.js} +6 -6
- package/dist/{chunk-QKL7IY42.js → chunk-Y54LU4CU.js} +1 -1
- package/dist/chunk-YGTNVZJE.js +89 -0
- package/dist/{chunk-4WQ2MBE7.js → chunk-YLC42C3M.js} +1 -1
- package/dist/{chunk-SGD3ZHID.js → chunk-YOOHNQ3L.js} +15 -4
- package/dist/{chunk-7NWFKHSG.js → chunk-YTCIGJUU.js} +116 -42
- package/dist/{chunk-ULTSSIOU.js → chunk-YV5KYGE5.js} +1 -1
- package/dist/{chunk-BRPOSOK5.js → chunk-YXM4W3TN.js} +144 -71
- package/dist/{chunk-7EOLHBI6.js → chunk-Z2X4JQNY.js} +81 -21
- package/dist/{chunk-SZCPKGYG.js → chunk-Z5V6ZM76.js} +3 -3
- package/dist/{chunk-KBFPMESI.js → chunk-Z7NHFNH3.js} +165 -79
- package/dist/{chunk-LTMF75MR.js → chunk-ZBSNF5F7.js} +208 -62
- package/dist/chunk-ZGHBDMYF.js +24 -0
- package/dist/{chunk-KORHKDJW.js → chunk-ZHFUMVW7.js} +2 -1
- package/dist/{chunk-YS56RSTZ.js → chunk-ZLYQWUNR.js} +84 -50
- package/dist/chunk-ZTMZOKVC.js +61 -0
- package/dist/cli/index.js +3 -3
- package/dist/{core-WJSKT5XM.js → core-2SICIP63.js} +5 -1
- package/dist/{core-CJ7FFPDU.js → core-2YTKFBNZ.js} +5 -1
- package/dist/{core-JLXFDYHX.js → core-3647Z25D.js} +4 -1
- package/dist/{core-ASBJZZTP.js → core-3IJPBNGC.js} +2 -1
- package/dist/{core-DJPGSTXB.js → core-6HMJHFRR.js} +8 -1
- package/dist/{core-ONNGSKWQ.js → core-7JKE7H32.js} +5 -1
- package/dist/{core-MNUVP5IJ.js → core-BMY7OL76.js} +5 -1
- package/dist/{core-GEUPUZUY.js → core-CAL7YNFC.js} +3 -1
- package/dist/{core-JLJTP7P6.js → core-CBEGB2NO.js} +3 -1
- package/dist/{core-XKV7GMPG.js → core-CLLIG7ZU.js} +2 -1
- package/dist/{core-L7Y7YXWR.js → core-CTZLHGXE.js} +1 -1
- package/dist/{core-KZK3WCUG.js → core-EYJ3WJK4.js} +3 -1
- package/dist/{core-KF6GJOGW.js → core-FX7HRKTF.js} +2 -1
- package/dist/{core-EAIFSTDE.js → core-GQC6VDW5.js} +3 -1
- package/dist/{core-R27R6J5M.js → core-GRWI22NS.js} +3 -1
- package/dist/{core-7YKLT7KY.js → core-H7KMWYP5.js} +4 -1
- package/dist/{core-CJZXX2V3.js → core-HJUGHAX7.js} +2 -1
- package/dist/{core-YPH723Z7.js → core-JMYMIH6Z.js} +8 -1
- package/dist/{core-7R3ARYNI.js → core-KEB5PBCO.js} +5 -1
- package/dist/{core-AEYGGH7X.js → core-MEC6A5DD.js} +4 -1
- package/dist/{core-L5KTPXHC.js → core-MV6KGAUV.js} +3 -1
- package/dist/{core-34KIMTK6.js → core-NTWHFDM4.js} +2 -1
- package/dist/{core-RGLOYY73.js → core-OIC5KJSD.js} +6 -1
- package/dist/{core-V7I4F6JW.js → core-OWCTIPHD.js} +5 -1
- package/dist/{core-RCFFJANI.js → core-PMYCLXT7.js} +5 -1
- package/dist/{core-MN45UFF4.js → core-PTRQPQTO.js} +3 -1
- package/dist/{core-DKJUX7Q4.js → core-QABTVASG.js} +2 -1
- package/dist/{core-PFXIBWLD.js → core-RPQBIOU4.js} +4 -1
- package/dist/{core-W7AZNHOX.js → core-SKRADU7T.js} +3 -1
- package/dist/{core-KII4CH3W.js → core-T2KHX5LG.js} +3 -1
- package/dist/{core-DAFZ7YJW.js → core-T4ZH3FAU.js} +2 -1
- package/dist/{core-WHI4ABF2.js → core-UAY2G7LN.js} +1 -1
- package/dist/{core-O2K4BDYH.js → core-ULZ7XUQP.js} +4 -1
- package/dist/{core-3CWPIFAL.js → core-VBR253SM.js} +3 -1
- package/dist/{core-YVNOHIQ4.js → core-VMIBBHXI.js} +3 -1
- package/dist/{core-KCORN7F7.js → core-XMTKUXLO.js} +3 -1
- package/dist/{core-QXIAQFHM.js → core-YEFGEW3Z.js} +3 -1
- package/dist/{dataTable-VKEHFLJM.js → dataTable-2ZXK54TP.js} +3 -2
- package/dist/{engine-PPXKJJFI.js → engine-HGXSWGOI.js} +26 -27
- package/dist/fixtures.js +6 -1
- package/dist/{fontTables-WYCZNRE7.js → fontTables-ZPZQ6IR3.js} +1 -1
- package/dist/fonts.js +2 -1
- package/dist/geo/dach.js +3 -1
- package/dist/geo/de-states.js +3 -1
- package/dist/geo/eu27.js +3 -1
- package/dist/geo/europe.js +3 -1
- package/dist/geo/index.js +4 -2
- package/dist/geo/us-states.js +3 -1
- package/dist/geo/world.js +3 -1
- package/dist/index.js +31 -27
- package/dist/{main-53MXACOU.js → main-PVT6FMGC.js} +54 -24
- package/dist/mcp/server.js +50 -23
- package/dist/{module-SVEW5ZUE.js → module-ZSR7KTAS.js} +1 -1
- package/dist/react/bar.js +6 -1
- package/dist/react/bartable.js +6 -1
- package/dist/react/box.js +6 -1
- package/dist/react/bullet.js +4 -1
- package/dist/react/butterfly.js +5 -1
- package/dist/react/choropleth.js +4 -1
- package/dist/react/cohort.js +4 -1
- package/dist/react/column.js +9 -1
- package/dist/react/combo.js +3 -1
- package/dist/react/creative.js +2 -1
- package/dist/react/diagram.js +3 -1
- package/dist/react/dimswitch.js +4 -1
- package/dist/react/dot.js +9 -1
- package/dist/react/export.js +33 -31
- package/dist/react/funnel.js +4 -1
- package/dist/react/gantt.js +3 -1
- package/dist/react/grid.js +4 -1
- package/dist/react/heatmap.js +4 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +94 -90
- package/dist/react/kpi.js +2 -1
- package/dist/react/likert.js +7 -1
- package/dist/react/line.js +4 -1
- package/dist/react/mekko.js +5 -1
- package/dist/react/pareto.js +3 -1
- package/dist/react/pie.js +5 -1
- package/dist/react/prepare.js +33 -28
- package/dist/react/pvm.js +4 -1
- package/dist/react/pyramid.js +5 -1
- package/dist/react/sankey.js +4 -1
- package/dist/react/scatter.js +4 -1
- package/dist/react/slope.js +6 -1
- package/dist/react/sparkline.js +4 -1
- package/dist/react/spec.js +25 -32
- package/dist/react/status.js +3 -1
- package/dist/react/story.js +6 -4
- package/dist/react/table.js +4 -1
- package/dist/react/theme.js +6 -3
- package/dist/react/tilemap.js +4 -1
- package/dist/react/treemap.js +3 -1
- package/dist/react/variance.js +5 -1
- package/dist/react/waffle.js +3 -1
- package/dist/react/waterfall.js +4 -1
- package/dist/{resvg-ZOVDIZTV.js → resvg-VB7S5HRF.js} +1 -1
- package/dist/rows.js +2 -3
- package/dist/{rowsModule-L3MBGPBH.js → rowsModule-JTDPTWXG.js} +2 -1
- package/dist/{schema-6ZV532RM.js → schema-2M3LXR35.js} +1 -1
- package/dist/{schema-WAKLKLBB.js → schema-2Q7IJ22V.js} +1 -1
- package/dist/{schema-IOKAZVL7.js → schema-3OLBUVMZ.js} +1 -1
- package/dist/{schema-ZSYX76MO.js → schema-3XLO43SX.js} +1 -1
- package/dist/{schema-KHCLVE2V.js → schema-5753NOAL.js} +1 -1
- package/dist/{schema-QNI6MNQ2.js → schema-5KHDHTIX.js} +1 -1
- package/dist/{schema-HWU55RJL.js → schema-76XRTBCJ.js} +1 -1
- package/dist/{schema-KFXLS67Q.js → schema-7CPGNCOL.js} +1 -1
- package/dist/{schema-26YUL3MG.js → schema-BKHQ3ZUH.js} +1 -1
- package/dist/{schema-CMXL5F5L.js → schema-BMD5JR3Y.js} +1 -1
- package/dist/{schema-HGUBNXUY.js → schema-BOGTPL7F.js} +1 -1
- package/dist/{schema-733PO52K.js → schema-BUTNGYTT.js} +1 -1
- package/dist/{schema-GSE3QXUK.js → schema-C7NVOQNV.js} +5 -3
- package/dist/{schema-LYBOPAGQ.js → schema-FNTAAXQ3.js} +1 -1
- package/dist/{schema-MNG24WU2.js → schema-FYULDJFB.js} +1 -1
- package/dist/{schema-4ZXJCRZR.js → schema-FZKNIAIH.js} +1 -1
- package/dist/{schema-IOWE3RQO.js → schema-G2PLJCYL.js} +1 -1
- package/dist/{schema-HRHNGOFC.js → schema-GGG2VOY7.js} +2 -2
- package/dist/{schema-WCDYWS4K.js → schema-GLN7IHSH.js} +1 -1
- package/dist/{schema-H7RKVTVO.js → schema-HIDW4BA4.js} +1 -1
- package/dist/{schema-KH62LDYK.js → schema-J53LCIY3.js} +1 -1
- package/dist/{schema-5E5J43CF.js → schema-KIJA53MB.js} +2 -1
- package/dist/{schema-3W7IFXVN.js → schema-LEQNLBNG.js} +1 -1
- package/dist/{schema-GK6MD4EG.js → schema-LHMEXFLY.js} +1 -1
- package/dist/{schema-FT37ZEYY.js → schema-MT6NA5AL.js} +1 -3
- package/dist/{schema-NOPOI5G2.js → schema-MUTAVQMI.js} +1 -1
- package/dist/{schema-PNUC54GC.js → schema-NVMEOHAW.js} +1 -1
- package/dist/{schema-QLH2DZFI.js → schema-TA3MSAPQ.js} +1 -1
- package/dist/{schema-B4GFRYIP.js → schema-U26KG42U.js} +1 -1
- package/dist/{schema-KORNUIC6.js → schema-UHHFTVGS.js} +1 -1
- package/dist/{schema-GVHM2HEF.js → schema-V3BPW4LA.js} +1 -1
- package/dist/{schema-SY3MKF5S.js → schema-WIZ2TZAT.js} +1 -1
- package/dist/{schema-ZCZCY34J.js → schema-WZLWHOMY.js} +1 -1
- package/dist/{schema-Q4IPIR6W.js → schema-XATDKZPW.js} +1 -1
- package/dist/{schema-SLQPM32G.js → schema-XHKSGMUH.js} +1 -1
- package/dist/{schema-33ZF6WKL.js → schema-XKY2EQFH.js} +1 -1
- package/dist/{schema-AQD3H5VV.js → schema-ZE7WUNFS.js} +1 -1
- package/dist/{specValidation-H5B4MQST.js → specValidation-X5XJBPTP.js} +3 -1
- package/dist/theme.js +4 -2
- package/dist/{themeShapeRules-54U5EIZR.js → themeShapeRules-PW4BQHKL.js} +1 -1
- package/dist/types/core/a11y/recordsShared.d.ts +4 -0
- package/dist/types/core/annotate.d.ts +39 -0
- package/dist/types/core/annotateArms.d.ts +1 -1
- package/dist/types/core/axis.d.ts +2 -0
- package/dist/types/core/calendarLabels.d.ts +15 -0
- package/dist/types/core/charts/band/stacks.d.ts +71 -2
- package/dist/types/core/charts/bartable/types.d.ts +10 -0
- package/dist/types/core/charts/choropleth/index.d.ts +7 -0
- package/dist/types/core/charts/choropleth/layout.d.ts +7 -0
- package/dist/types/core/charts/choropleth/schema.d.ts +36 -0
- package/dist/types/core/charts/cohort/types.d.ts +8 -1
- package/dist/types/core/charts/column/layout.d.ts +1 -1
- package/dist/types/core/charts/column/model.d.ts +4 -0
- package/dist/types/core/charts/combo/endpoints.d.ts +1 -1
- package/dist/types/core/charts/creative/types.d.ts +1 -1
- package/dist/types/core/charts/dimswitch/compile.d.ts +2 -0
- package/dist/types/core/charts/dimswitch/types.d.ts +8 -0
- package/dist/types/core/charts/grid/normalize.d.ts +18 -1
- package/dist/types/core/charts/heatmap/fixtures.d.ts +2 -2
- package/dist/types/core/charts/histogram/types.d.ts +14 -2
- package/dist/types/core/charts/likert/layout.d.ts +14 -9
- package/dist/types/core/charts/logAxis.d.ts +55 -0
- package/dist/types/core/charts/pvm/types.d.ts +6 -0
- package/dist/types/core/charts/pyramid/types.d.ts +7 -4
- package/dist/types/core/charts/sankey/types.d.ts +3 -1
- package/dist/types/core/charts/scatter/clamp.d.ts +155 -0
- package/dist/types/core/charts/scatter/frontier.d.ts +21 -0
- package/dist/types/core/charts/scatter/index.d.ts +9 -0
- package/dist/types/core/charts/scatter/layout.d.ts +26 -0
- package/dist/types/core/charts/scatter/logAxis.d.ts +14 -0
- package/dist/types/core/charts/scatter/model.d.ts +258 -0
- package/dist/types/core/charts/scatter/schema.d.ts +57 -0
- package/dist/types/core/charts/scatter/trend.d.ts +54 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +47 -0
- package/dist/types/core/charts/sparkline/fixtures.d.ts +1 -1
- package/dist/types/core/charts/status/layout.d.ts +5 -3
- package/dist/types/core/charts/table/resolve.d.ts +0 -7
- package/dist/types/core/charts/tilemap/index.d.ts +6 -0
- package/dist/types/core/charts/tilemap/layout.d.ts +5 -0
- package/dist/types/core/charts/tilemap/schema.d.ts +4 -0
- package/dist/types/core/charts/treemap/types.d.ts +2 -2
- package/dist/types/core/charts/variance/fixtures.d.ts +2 -1
- package/dist/types/core/charts/waffle/types.d.ts +2 -0
- package/dist/types/core/dateFormat.d.ts +1 -1
- package/dist/types/core/doc/diagnostics.d.ts +8 -0
- package/dist/types/core/doc/document.d.ts +9 -1
- package/dist/types/core/doc/ownedDocumentCopy.d.ts +2 -1
- package/dist/types/core/fontMetrics/index.d.ts +1 -1
- package/dist/types/core/footer.d.ts +9 -1
- package/dist/types/core/format.d.ts +4 -1
- package/dist/types/core/formatSpec.d.ts +84 -6
- package/dist/types/core/frame.d.ts +41 -8
- package/dist/types/core/geo/packs/registry.d.ts +3 -2
- package/dist/types/core/geometry.d.ts +19 -0
- package/dist/types/core/icons.d.ts +11 -0
- package/dist/types/core/inputError.d.ts +3 -0
- package/dist/types/core/isoDate.d.ts +2 -0
- package/dist/types/core/label/categoryRow.d.ts +8 -0
- package/dist/types/core/label/occupied.d.ts +5 -0
- package/dist/types/core/label/solver.d.ts +31 -2
- package/dist/types/core/notes.d.ts +13 -1
- package/dist/types/core/ols.d.ts +38 -0
- package/dist/types/core/periodYears.d.ts +5 -1
- package/dist/types/core/registry.d.ts +12 -0
- package/dist/types/core/request.d.ts +3 -2
- package/dist/types/core/scale.d.ts +7 -0
- package/dist/types/core/schema/capability.d.ts +17 -20
- package/dist/types/core/schema/namedColumns.d.ts +6 -0
- package/dist/types/core/schema/refusals.d.ts +1 -4
- package/dist/types/core/shareRounding.d.ts +8 -0
- package/dist/types/core/sizing.d.ts +17 -12
- package/dist/types/core/story.d.ts +3 -0
- package/dist/types/core/target.d.ts +6 -0
- package/dist/types/core/text.d.ts +8 -0
- package/dist/types/core/theme.d.ts +52 -1
- package/dist/types/core/types/annotations.d.ts +15 -3
- package/dist/types/core/types/data.d.ts +4 -1
- package/dist/types/core/types/diagram.d.ts +81 -2
- package/dist/types/core/types/optionInput.d.ts +13 -0
- package/dist/types/core/types/options.d.ts +65 -24
- package/dist/types/core/types/scene.d.ts +79 -2
- package/dist/types/core/types/table.d.ts +9 -0
- package/dist/types/core/types/theme.d.ts +48 -3
- package/dist/types/index.d.ts +28 -27
- package/dist/types/optionTypes.d.ts +44 -0
- package/dist/types/react/DimSwitchChart.d.ts +2 -1
- package/dist/types/react/RefusalBoundary.d.ts +25 -0
- package/dist/types/react/SceneRenderer.d.ts +3 -1
- package/dist/types/react/SizePlaceholder.d.ts +2 -1
- package/dist/types/react/TableChart.d.ts +8 -4
- package/dist/types/react/barrelCharts.d.ts +1521 -1012
- package/dist/types/react/charts/bar.d.ts +36 -25
- package/dist/types/react/charts/bartable.d.ts +36 -25
- package/dist/types/react/charts/box.d.ts +36 -25
- package/dist/types/react/charts/bullet.d.ts +36 -25
- package/dist/types/react/charts/butterfly.d.ts +36 -25
- package/dist/types/react/charts/choropleth.d.ts +36 -25
- package/dist/types/react/charts/cohort.d.ts +76 -50
- package/dist/types/react/charts/column.d.ts +36 -25
- package/dist/types/react/charts/combo.d.ts +2 -1
- package/dist/types/react/charts/creative.d.ts +31 -25
- package/dist/types/react/charts/diagram.d.ts +302 -160
- package/dist/types/react/charts/dot.d.ts +36 -25
- package/dist/types/react/charts/funnel.d.ts +36 -25
- package/dist/types/react/charts/gantt.d.ts +36 -25
- package/dist/types/react/charts/grid.d.ts +38 -27
- package/dist/types/react/charts/heatmap.d.ts +36 -25
- package/dist/types/react/charts/histogram.d.ts +36 -25
- package/dist/types/react/charts/kpi.d.ts +36 -25
- package/dist/types/react/charts/likert.d.ts +36 -25
- package/dist/types/react/charts/line.d.ts +36 -25
- package/dist/types/react/charts/mekko.d.ts +36 -25
- package/dist/types/react/charts/pareto.d.ts +33 -25
- package/dist/types/react/charts/pie.d.ts +36 -25
- package/dist/types/react/charts/pvm.d.ts +36 -25
- package/dist/types/react/charts/pyramid.d.ts +33 -25
- package/dist/types/react/charts/sankey.d.ts +36 -25
- package/dist/types/react/charts/scatter.d.ts +36 -25
- package/dist/types/react/charts/slope.d.ts +36 -25
- package/dist/types/react/charts/sparkline.d.ts +36 -25
- package/dist/types/react/charts/status.d.ts +36 -25
- package/dist/types/react/charts/tilemap.d.ts +36 -25
- package/dist/types/react/charts/treemap.d.ts +36 -25
- package/dist/types/react/charts/variance.d.ts +36 -25
- package/dist/types/react/charts/waffle.d.ts +36 -25
- package/dist/types/react/charts/waterfall.d.ts +36 -25
- package/dist/types/react/createChartComponent.d.ts +11 -9
- package/dist/types/react/footerFrame.d.ts +1 -1
- package/dist/types/react/hover/engine.d.ts +2 -1
- package/dist/types/react/hover/labelCard.d.ts +14 -2
- package/dist/types/react/prepare.d.ts +2 -2
- package/dist/types/react/prepared.d.ts +5 -1
- package/dist/types/react/useContainerSize.d.ts +2 -0
- package/dist/types/rows.d.ts +1 -1
- package/dist/validate.js +12 -8
- package/docs/manual.md +139 -35
- package/docs/reference/bar.md +10 -7
- package/docs/reference/bartable.md +7 -3
- package/docs/reference/box.md +5 -2
- package/docs/reference/bullet.md +7 -5
- package/docs/reference/butterfly.md +12 -5
- package/docs/reference/choropleth.md +9 -7
- package/docs/reference/cohort.md +3 -2
- package/docs/reference/column.md +14 -7
- package/docs/reference/combo.md +8 -6
- package/docs/reference/creative.md +1 -1
- package/docs/reference/diagram.md +94 -18
- package/docs/reference/dimswitch.md +16 -13
- package/docs/reference/dot.md +7 -4
- package/docs/reference/fixtures.md +49 -5
- package/docs/reference/funnel.md +4 -3
- package/docs/reference/gantt.md +1 -1
- package/docs/reference/grid.md +1 -1
- package/docs/reference/heatmap.md +6 -4
- package/docs/reference/histogram.md +7 -4
- package/docs/reference/kpi.md +11 -8
- package/docs/reference/likert.md +7 -3
- package/docs/reference/line.md +9 -8
- package/docs/reference/mekko.md +4 -4
- package/docs/reference/options.md +34 -32
- package/docs/reference/pareto.md +4 -4
- package/docs/reference/pie.md +8 -7
- package/docs/reference/pvm.md +4 -2
- package/docs/reference/pyramid.md +4 -4
- package/docs/reference/react.md +20 -11
- package/docs/reference/sankey.md +5 -3
- package/docs/reference/scatter.md +3 -3
- package/docs/reference/slope.md +7 -6
- package/docs/reference/sparkline.md +6 -5
- package/docs/reference/status.md +6 -4
- package/docs/reference/table.md +28 -26
- package/docs/reference/theme.md +93 -85
- package/docs/reference/tilemap.md +7 -6
- package/docs/reference/treemap.md +6 -5
- package/docs/reference/variance.md +8 -5
- package/docs/reference/waffle.md +2 -1
- package/docs/reference/waterfall.md +12 -9
- package/docs/use-cases.md +25 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/dist/chunk-2HXKW6U6.js +0 -24
- package/dist/chunk-35ZTANEK.js +0 -24
- package/dist/chunk-3CLLHMFF.js +0 -24
- package/dist/chunk-46ZPFJAM.js +0 -24
- package/dist/chunk-6BWSF5PS.js +0 -24
- package/dist/chunk-6K2TMVPF.js +0 -42
- package/dist/chunk-6KWIQ5KF.js +0 -18
- package/dist/chunk-6ZXMA4TY.js +0 -24
- package/dist/chunk-7HFUG25L.js +0 -24
- package/dist/chunk-7R5EV5MS.js +0 -24
- package/dist/chunk-7X65ZQN4.js +0 -38
- package/dist/chunk-ATUZTGZI.js +0 -25
- package/dist/chunk-BW5VLBSZ.js +0 -15
- package/dist/chunk-BYD7VLAI.js +0 -24
- package/dist/chunk-CEY646NZ.js +0 -28
- package/dist/chunk-D7GZPMHW.js +0 -24
- package/dist/chunk-FIANWJXX.js +0 -19
- package/dist/chunk-H4SYN3QA.js +0 -24
- package/dist/chunk-HC4NDND6.js +0 -24
- package/dist/chunk-HNVW3YDS.js +0 -25
- package/dist/chunk-HW7BPJNQ.js +0 -24
- package/dist/chunk-I5L3QTKQ.js +0 -24
- package/dist/chunk-IK4BHOPZ.js +0 -33
- package/dist/chunk-IMJXJHFW.js +0 -88
- package/dist/chunk-JDEVGTSX.js +0 -24
- package/dist/chunk-K2KU4HHT.js +0 -25
- package/dist/chunk-KDMKHR5A.js +0 -32
- package/dist/chunk-KNZD53L4.js +0 -24
- package/dist/chunk-KOJ5QETJ.js +0 -8
- package/dist/chunk-KSQEG6DX.js +0 -24
- package/dist/chunk-KVSJ2O4Q.js +0 -24
- package/dist/chunk-L3JWM7FR.js +0 -50
- package/dist/chunk-L7FSCT4M.js +0 -28
- package/dist/chunk-LMPZKCDM.js +0 -24
- package/dist/chunk-MONVTUHR.js +0 -24
- package/dist/chunk-NWQTSZYC.js +0 -24
- package/dist/chunk-OM67S6S4.js +0 -19
- package/dist/chunk-OTW5SEFS.js +0 -21
- package/dist/chunk-PGV25HTX.js +0 -25
- package/dist/chunk-QGCEHR6S.js +0 -13
- package/dist/chunk-T3IGJARD.js +0 -22
- package/dist/chunk-U2ES66IN.js +0 -26
- package/dist/chunk-U6CJPTOB.js +0 -19
- package/dist/chunk-VDVXGAIP.js +0 -24
- package/dist/chunk-VGWWUCAB.js +0 -24
- package/dist/chunk-X4U6PT3Z.js +0 -33
- package/dist/chunk-XXNLNZ7E.js +0 -24
- package/dist/chunk-ZBJNEJSL.js +0 -24
- package/dist/chunk-ZWJTHFWB.js +0 -27
- /package/dist/{DiagnosticDetails-UNYNYCAH.js → DiagnosticDetails-JFBBXOT2.js} +0 -0
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
chartRefusals,
|
|
3
|
+
isRefused
|
|
4
|
+
} from "./chunk-PZ46S2SY.js";
|
|
1
5
|
import {
|
|
2
6
|
prepareFractionAnnotations
|
|
3
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CPGASWNN.js";
|
|
4
8
|
import {
|
|
9
|
+
ASPECT_CAPS,
|
|
5
10
|
COMPACT_SOURCE_LINES,
|
|
6
11
|
DATE_TICK_STRIDES,
|
|
7
12
|
DENSITY_VALUES,
|
|
@@ -50,7 +55,7 @@ import {
|
|
|
50
55
|
withDensityNotes,
|
|
51
56
|
withHiddenLabelNote,
|
|
52
57
|
withNoteInA11y
|
|
53
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-2ALFFOKB.js";
|
|
54
59
|
import {
|
|
55
60
|
COMPACT_OMITTED_NOTES,
|
|
56
61
|
copyFrame,
|
|
@@ -61,22 +66,19 @@ import {
|
|
|
61
66
|
rankKeyShown,
|
|
62
67
|
staticFrame,
|
|
63
68
|
withEngineNotes
|
|
64
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-5SHI57XD.js";
|
|
65
70
|
import {
|
|
66
71
|
DATE_NAME_LANGUAGES,
|
|
67
72
|
dateNames
|
|
68
73
|
} from "./chunk-QBR6IKIX.js";
|
|
69
|
-
import {
|
|
70
|
-
chartRefusals,
|
|
71
|
-
isRefused
|
|
72
|
-
} from "./chunk-B6LHZLLK.js";
|
|
73
74
|
import {
|
|
74
75
|
MAGNITUDE_DIVISOR,
|
|
75
76
|
decimalCap,
|
|
76
77
|
formatWithSpec,
|
|
77
78
|
neededDecimals,
|
|
78
|
-
parseISODate
|
|
79
|
-
|
|
79
|
+
parseISODate,
|
|
80
|
+
utcDate
|
|
81
|
+
} from "./chunk-GDVR3XHT.js";
|
|
80
82
|
import {
|
|
81
83
|
AUTO_MAX_DECIMALS,
|
|
82
84
|
chartString,
|
|
@@ -86,13 +88,15 @@ import {
|
|
|
86
88
|
withNumberMarks,
|
|
87
89
|
withSmallValues,
|
|
88
90
|
wordLanguage
|
|
89
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-LHKDZAWN.js";
|
|
90
92
|
import {
|
|
93
|
+
DEFAULT_PRESET,
|
|
91
94
|
GRAMMAR_STROKE,
|
|
92
95
|
REMOVED_NAMES,
|
|
93
96
|
TABLE_HEAD_PARTS,
|
|
94
97
|
WIDE_CANVAS_MIN_WIDTH,
|
|
95
98
|
casingUnderFills,
|
|
99
|
+
colorblindRoles,
|
|
96
100
|
fillEdges,
|
|
97
101
|
gridDash,
|
|
98
102
|
labelsOnFills,
|
|
@@ -112,10 +116,17 @@ import {
|
|
|
112
116
|
textSizeOf,
|
|
113
117
|
typeWidthClass,
|
|
114
118
|
withoutOrphanAnnotationMarks
|
|
115
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-HJRNBKIT.js";
|
|
116
120
|
import {
|
|
117
121
|
loadedDeferred
|
|
118
|
-
} from "./chunk-
|
|
122
|
+
} from "./chunk-DRHQG44U.js";
|
|
123
|
+
import {
|
|
124
|
+
cubicPoint
|
|
125
|
+
} from "./chunk-JYAZPMSA.js";
|
|
126
|
+
import {
|
|
127
|
+
addWhereAbsent,
|
|
128
|
+
toJsonPointer
|
|
129
|
+
} from "./chunk-ZQ4VFQID.js";
|
|
119
130
|
import {
|
|
120
131
|
DEFAULT_TARGET,
|
|
121
132
|
NormalizeError,
|
|
@@ -127,10 +138,7 @@ import {
|
|
|
127
138
|
resolveTargetSize,
|
|
128
139
|
targetFloorsPx,
|
|
129
140
|
withDefaultTarget
|
|
130
|
-
} from "./chunk-
|
|
131
|
-
import {
|
|
132
|
-
addWhereAbsent
|
|
133
|
-
} from "./chunk-ZQ4VFQID.js";
|
|
141
|
+
} from "./chunk-YOOHNQ3L.js";
|
|
134
142
|
import {
|
|
135
143
|
maxOf,
|
|
136
144
|
minOf,
|
|
@@ -141,7 +149,32 @@ import {
|
|
|
141
149
|
defaultMeasurer,
|
|
142
150
|
measureText,
|
|
143
151
|
wrapText
|
|
144
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-SNQ7D5R7.js";
|
|
153
|
+
|
|
154
|
+
// src/core/inputConversion.ts
|
|
155
|
+
function caseInsensitiveValue(value, allowed) {
|
|
156
|
+
if (typeof value != "string" || allowed.includes(value)) return;
|
|
157
|
+
let matches = [...new Set(allowed.filter((entry) => typeof entry == "string" && entry.toLowerCase() === value.toLowerCase()))];
|
|
158
|
+
return matches.length === 1 ? matches[0] : void 0;
|
|
159
|
+
}
|
|
160
|
+
function inputConversion(field, from, to) {
|
|
161
|
+
let source = typeof from == "string" ? `the text ${JSON.stringify(from)}` : `the number ${from}`, target = typeof to == "number" ? `the number ${to}` : typeof to == "boolean" ? `the boolean ${to}` : JSON.stringify(to);
|
|
162
|
+
return {
|
|
163
|
+
code: "input-converted",
|
|
164
|
+
severity: "info",
|
|
165
|
+
field,
|
|
166
|
+
message: `${field.join(".")}: ${source} is ${typeof to == "string" ? "drawn as" : "read as"} ${target}`,
|
|
167
|
+
fix: [{ op: "replace", path: toJsonPointer(field), value: to }]
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function replaceInputValue(input, path, value) {
|
|
171
|
+
if (!path.length) return value;
|
|
172
|
+
let [key, ...rest] = path, copy = Array.isArray(input) ? [...input] : Object.create(Object.getPrototypeOf(input));
|
|
173
|
+
if (!Array.isArray(input))
|
|
174
|
+
for (let own of Reflect.ownKeys(input))
|
|
175
|
+
own !== String(key) && Object.defineProperty(copy, own, Object.getOwnPropertyDescriptor(input, own));
|
|
176
|
+
return Object.defineProperty(copy, key, { value: replaceInputValue(input[key], rest, value), enumerable: !0, configurable: !0, writable: !0 }), copy;
|
|
177
|
+
}
|
|
145
178
|
|
|
146
179
|
// src/core/themeDensity.ts
|
|
147
180
|
var COMPACT_SPACE_RATIO = 22 / 27, LABEL_PAD = { min: 1, max: 16 }, TIER_FACET = { min: 4, max: 64 }, LEGEND_ROW = { min: 12, max: 28 }, GAP = { min: 0, max: 32 }, CANVAS = { min: 0, max: 96 };
|
|
@@ -187,7 +220,7 @@ function themeForDensity(theme, density = "comfortable", width) {
|
|
|
187
220
|
|
|
188
221
|
// src/core/compact.ts
|
|
189
222
|
function tightTheme(ref, width) {
|
|
190
|
-
let dense = themeForDensity(resolveTheme(ref), "compact", width), preset = (typeof ref == "string" ? ref : ref?.preset) ??
|
|
223
|
+
let dense = themeForDensity(resolveTheme(ref), "compact", width), preset = (typeof ref == "string" ? ref : ref?.preset) ?? DEFAULT_PRESET, authored = typeof ref == "object" && ref !== null ? ref.overrides ?? {} : {};
|
|
191
224
|
return { preset, overrides: libraryPatch({ ...authored, space: dense.space }, authored) };
|
|
192
225
|
}
|
|
193
226
|
function authoredList(options) {
|
|
@@ -195,8 +228,8 @@ function authoredList(options) {
|
|
|
195
228
|
}
|
|
196
229
|
var MOVED_SUBTITLE = /* @__PURE__ */ Symbol("boardplot.movedSubtitle");
|
|
197
230
|
function omittedCompactNotes(type, options) {
|
|
198
|
-
let hasReplacementNote = "methodNote" in options && options.methodNote === !1, preserveNotes = staticFrame.pinned || type === "bullet" || hasReplacementNote || !options.title,
|
|
199
|
-
return preserveNotes ? [] : authoredNotes(options).filter((note) => note !==
|
|
231
|
+
let hasReplacementNote = "methodNote" in options && options.methodNote === !1, preserveNotes = staticFrame.pinned || type === "bullet" || hasReplacementNote || !options.title, moved2 = options[MOVED_SUBTITLE], hidden = hiddenNoteLine(options);
|
|
232
|
+
return preserveNotes ? [] : authoredNotes(options).filter((note) => note !== moved2 && note !== hidden);
|
|
200
233
|
}
|
|
201
234
|
function compactOptions(type, options, floor, width) {
|
|
202
235
|
let omitted = omittedCompactNotes(type, options), base = omitted.length === 0 ? { ...options, mode: "compact" } : withAuthoredFootnotes({ ...options, mode: "compact", [COMPACT_OMITTED_NOTES]: omitted.length }, authoredNotes(options).filter((note) => !omitted.includes(note)), authoredList(options));
|
|
@@ -442,8 +475,7 @@ function layoutWithLegendPolicy(definition, data, options) {
|
|
|
442
475
|
}
|
|
443
476
|
}
|
|
444
477
|
function prepareLegendLayout(definition, data, origins = /* @__PURE__ */ new WeakMap()) {
|
|
445
|
-
let baseline = prepareFitLayout(definition, data, origins), candidate = prepareFitLayout(definition, data, origins), unitBaseline = prepareFitLayout(definition, data, origins), unitCandidate = prepareFitLayout(definition, data, origins), compactLayouts = /* @__PURE__ */ new Map(), series = data?.series, names = new Map(Array.isArray(series) ? series.map((item) => [item.id, item.label ?? item.id]) : []), refs = footnoteRefs(data),
|
|
446
|
-
Array.isArray(options?.footnotes) && options.footnotes.length > 0 && (options = Object.assign({}, options, { [FOOTNOTE_REFS]: refs }));
|
|
478
|
+
let baseline = prepareFitLayout(definition, data, origins), candidate = prepareFitLayout(definition, data, origins), unitBaseline = prepareFitLayout(definition, data, origins), unitCandidate = prepareFitLayout(definition, data, origins), compactLayouts = /* @__PURE__ */ new Map(), series = data?.series, names = new Map(Array.isArray(series) ? series.map((item) => [item.id, item.label ?? item.id]) : []), refs = footnoteRefs(data), draw = (options) => {
|
|
447
479
|
let automatic = names.size > 0 && !contentSized(definition.type, options) && panelTypeClass(options) === void 0 && (options?.legend === void 0 || options.legend === "auto");
|
|
448
480
|
automatic && options?.[LEGEND_HEIGHT] === void 0 && (options = Object.assign({}, options, { [LEGEND_HEIGHT]: { height: "auto", names } }));
|
|
449
481
|
let result = layoutWithKeys(definition, data, options, baseline, candidate);
|
|
@@ -473,17 +505,25 @@ function prepareLegendLayout(definition, data, origins = /* @__PURE__ */ new Wea
|
|
|
473
505
|
}
|
|
474
506
|
}
|
|
475
507
|
return !result.refused && panelTypeClass(options) === void 0 && result.warnings.push(...typeDocLints(definition.type, options, result)), result;
|
|
508
|
+
}, run = ((options) => {
|
|
509
|
+
Array.isArray(options?.footnotes) && options.footnotes.length > 0 && (options = Object.assign({}, options, { [FOOTNOTE_REFS]: refs }));
|
|
510
|
+
let column = options;
|
|
511
|
+
if (definition.type === "column" && options?.legend === "none" && column?.seriesLabels !== void 0 && !column.valueAxis?.percent && (column.variant ?? "grouped") === "grouped") {
|
|
512
|
+
let keyed = draw(Object.assign({}, options, { legend: void 0 }));
|
|
513
|
+
if (!keyed.refused) return keyed;
|
|
514
|
+
}
|
|
515
|
+
return draw(options);
|
|
476
516
|
});
|
|
477
517
|
return run.finish = () => {
|
|
478
518
|
baseline.finish(), candidate.finish(), unitBaseline.finish(), unitCandidate.finish();
|
|
479
|
-
for (let
|
|
519
|
+
for (let draw2 of compactLayouts.values()) draw2.finish();
|
|
480
520
|
compactLayouts.clear();
|
|
481
521
|
}, run;
|
|
482
522
|
}
|
|
483
523
|
function layoutWithKeys(definition, data, options, fitBaseline, fitCandidate) {
|
|
484
524
|
let requested = options?.legend === "auto", baselineOptions = requested ? { ...options, legend: void 0 } : options, baseline = fitBaseline(baselineOptions);
|
|
485
|
-
if (!baseline.refused && options?.legend === "none"
|
|
486
|
-
return definition.requiredKey(baseline, data, options, fitCandidate);
|
|
525
|
+
if (!baseline.refused && definition.requiredKey && panelTypeClass(options) === void 0 && (options?.legend === "none" || options?.legend === void 0 && resolveTheme(options?.theme).legend?.auto !== !0))
|
|
526
|
+
return definition.requiredKey(baseline, data, options ?? {}, fitCandidate);
|
|
487
527
|
if (baseline.refused || !requested && (options?.legend !== void 0 || panelTypeClass(options) !== void 0 || resolveTheme(options?.theme).legend?.auto !== !0 && !needsSeriesKey(definition.type, data, options, baseline))) return baseline;
|
|
488
528
|
let candidateOptions = Object.assign({}, baselineOptions, { [AUTO_LEGEND]: !0 });
|
|
489
529
|
candidateOptions.legend = "top", definition.type !== "mekko" && (candidateOptions.mode = baseline.mode);
|
|
@@ -498,27 +538,24 @@ function layoutWithKeys(definition, data, options, fitBaseline, fitCandidate) {
|
|
|
498
538
|
}
|
|
499
539
|
|
|
500
540
|
// src/core/calendarLabels.ts
|
|
501
|
-
var MONTH = /^(\d{4})-(0[1-9]|1[0-2])$/, WEEK = /^(\d{4})-W(0[1-9]|[1-4]\d|5[0-3])$/, QUARTER = /^(\d{4})-Q([1-4])
|
|
502
|
-
let date = /* @__PURE__ */ new Date(0);
|
|
503
|
-
return date.setUTCFullYear(year, month, day), date;
|
|
504
|
-
};
|
|
541
|
+
var MONTH = /^(\d{4})-(0[1-9]|1[0-2])$/, WEEK = /^(\d{4})-W(0[1-9]|[1-4]\d|5[0-3])$/, QUARTER = /^(\d{4})-Q([1-4])$/;
|
|
505
542
|
function isoWeek(date) {
|
|
506
|
-
let thursday =
|
|
507
|
-
return { week: 1 + Math.floor((thursday.getTime() -
|
|
543
|
+
let thursday = utcDate(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate() + 3 - (date.getUTCDay() + 6) % 7), weekYear = thursday.getUTCFullYear();
|
|
544
|
+
return { week: 1 + Math.floor((thursday.getTime() - utcDate(weekYear, 0, 1).getTime()) / 6048e5), weekYear };
|
|
508
545
|
}
|
|
509
546
|
function pointOf(text) {
|
|
510
547
|
let day = parseISODate(text);
|
|
511
548
|
if (day) return { unit: "day", date: day };
|
|
512
549
|
let month = MONTH.exec(text);
|
|
513
|
-
if (month) return { unit: "month", date:
|
|
550
|
+
if (month) return { unit: "month", date: utcDate(+month[1], +month[2] - 1) };
|
|
514
551
|
let quarter = QUARTER.exec(text);
|
|
515
|
-
if (quarter) return { unit: "quarter", date:
|
|
552
|
+
if (quarter) return { unit: "quarter", date: utcDate(+quarter[1], (+quarter[2] - 1) * 3) };
|
|
516
553
|
let week = WEEK.exec(text);
|
|
517
554
|
if (!week) return;
|
|
518
|
-
let jan4 =
|
|
555
|
+
let jan4 = utcDate(+week[1], 0, 4), date = utcDate(+week[1], 0, 4 - (jan4.getUTCDay() + 6) % 7 + (+week[2] - 1) * 7), iso = isoWeek(date);
|
|
519
556
|
return iso.weekYear === +week[1] && iso.week === +week[2] ? { unit: "week", date, ...iso } : void 0;
|
|
520
557
|
}
|
|
521
|
-
var monthIndex = (date) => date.getUTCFullYear() * 12 + date.getUTCMonth(), isMonthEnd = (date) =>
|
|
558
|
+
var monthIndex = (date) => date.getUTCFullYear() * 12 + date.getUTCMonth(), isMonthEnd = (date) => utcDate(date.getUTCFullYear(), date.getUTCMonth() + 1, 0).getUTCDate() === date.getUTCDate();
|
|
522
559
|
function dayUnit(dates) {
|
|
523
560
|
if (dates.length < 2) return "day";
|
|
524
561
|
let ends = dates.every(isMonthEnd);
|
|
@@ -589,6 +626,33 @@ function dateTickRow(cats, dateTicks, language, weekStartsOn) {
|
|
|
589
626
|
}
|
|
590
627
|
};
|
|
591
628
|
}
|
|
629
|
+
function authoredDateTicks(cats, options, warnings) {
|
|
630
|
+
let dateTicks = options.categoryAxis?.dateTicks;
|
|
631
|
+
if (!dateTicks) return;
|
|
632
|
+
let ticked = dateTickRow(cats, dateTicks, options.locale?.language, options.locale?.weekStartsOn);
|
|
633
|
+
if (ticked.ticks === null)
|
|
634
|
+
warnings.push({
|
|
635
|
+
code: "date-ticks-unsupported",
|
|
636
|
+
severity: "info",
|
|
637
|
+
message: `categoryAxis.dateTicks '${dateTicks}' was ignored: not every category carries an ISO date, so no calendar interval can be resolved`,
|
|
638
|
+
suggest: "give each category an ISO 'date' or drop categoryAxis.dateTicks"
|
|
639
|
+
});
|
|
640
|
+
else if (cats.some((category, i) => i > 0 && category.date < cats[i - 1].date)) {
|
|
641
|
+
warnings.push({
|
|
642
|
+
code: "date-ticks-unsupported",
|
|
643
|
+
severity: "info",
|
|
644
|
+
message: `categoryAxis.dateTicks '${dateTicks}' was ignored: the categories are not in date order (for example sorted by value), so no calendar interval can be resolved`,
|
|
645
|
+
suggest: "keep the categories in date order or drop categoryAxis.dateTicks"
|
|
646
|
+
});
|
|
647
|
+
return;
|
|
648
|
+
} else dateTicks !== "weeks" && options.locale?.weekStartsOn !== void 0 && warnings.push({
|
|
649
|
+
code: "week-start-ignored",
|
|
650
|
+
severity: "info",
|
|
651
|
+
message: `locale.weekStartsOn was ignored: a week boundary only decides something for dateTicks 'weeks', and the requested interval is '${dateTicks}'`,
|
|
652
|
+
suggest: "set categoryAxis.dateTicks to 'weeks' or drop locale.weekStartsOn"
|
|
653
|
+
});
|
|
654
|
+
return ticked;
|
|
655
|
+
}
|
|
592
656
|
function dayCategories(cats) {
|
|
593
657
|
if (calendarMonths(cats.map((category) => category.date ?? category.id))?.unit === "day")
|
|
594
658
|
return cats.map((category) => category.date === void 0 ? { ...category, date: category.id } : category);
|
|
@@ -670,8 +734,8 @@ function tickLabelX(cx, width, index, count, edgeAnchored) {
|
|
|
670
734
|
function sweepHide(items, gap = 2) {
|
|
671
735
|
let keep = new Array(items.length).fill(!1), order = items.map((_, i) => i).sort((a, b) => items[b].priority - items[a].priority || a - b), kept = [];
|
|
672
736
|
for (let i of order) {
|
|
673
|
-
let it = items[i], start = it.start, end = it.start + it.size;
|
|
674
|
-
kept.some((k) => start < k.end + gap && k.start < end + gap) || (keep[i] = !0, kept.push({ start, end }));
|
|
737
|
+
let it = items[i], start = it.start, end = it.start + it.size, lane = it.lane ?? 0;
|
|
738
|
+
kept.some((k) => k.lane === lane && start < k.end + gap && k.start < end + gap) || (keep[i] = !0, kept.push({ start, end, lane }));
|
|
675
739
|
}
|
|
676
740
|
return keep;
|
|
677
741
|
}
|
|
@@ -732,7 +796,7 @@ function clamp1(v, lo, hi) {
|
|
|
732
796
|
}
|
|
733
797
|
|
|
734
798
|
// src/core/label/categoryRow.ts
|
|
735
|
-
var CATEGORY_ROW_FROM_END = /* @__PURE__ */ Symbol("categoryRowFromEnd"), CATEGORY_ROW_VERTICAL = /* @__PURE__ */ Symbol("categoryRowVertical"), YEAR_ROW_GAP = 2, SPREAD_GAP = 7.5;
|
|
799
|
+
var CROWDED_NAMES = /* @__PURE__ */ new Set(["category-labels-rotated", "category-labels-truncated", "category-stride"]), CATEGORY_ROW_FROM_END = /* @__PURE__ */ Symbol("categoryRowFromEnd"), CATEGORY_ROW_VERTICAL = /* @__PURE__ */ Symbol("categoryRowVertical"), YEAR_ROW_GAP = 2, SPREAD_GAP = 7.5;
|
|
736
800
|
function yearRowRequests(plan, top) {
|
|
737
801
|
let under = (plan.underRow?.items ?? []).map(({ index, text, x, w, h }) => ({
|
|
738
802
|
id: `category-under:${index}`,
|
|
@@ -806,7 +870,7 @@ function strideAfterFontLadder(labels, infos, baseFont, requested, pinned, dateS
|
|
|
806
870
|
let ordinal = (i) => dateStride ? dateStride.ordinals[i] : requested ? requestedRank[i] : i, restart = [];
|
|
807
871
|
labels.forEach((_, i) => restart.push(yearPins[i] ? i : restart[i - 1] ?? -1));
|
|
808
872
|
let steady = (keep2, k) => {
|
|
809
|
-
let
|
|
873
|
+
let drawn2 = labels.map((_, i) => i).filter((i) => keep2[i]), gaps = drawn2.slice(1).map((i, d) => ordinal(i) - ordinal(drawn2[d]));
|
|
810
874
|
return requested === void 0 && gaps.pop(), gaps.every((g) => Math.abs(g - k) <= 1) && maxOf(gaps) - minOf(gaps) <= 1;
|
|
811
875
|
}, ticks = requested?.filter(Boolean).length ?? n, calendar = dateStride?.calendar === !0, each = calendar && requested === void 0 ? dateStride.perStep ?? 1 : 1, candidates = dateStride ? dateStride.strides.filter((k) => k < ticks * each && k >= minStride) : strideCandidates(labels), attempt = (k, restartAtYears) => {
|
|
812
876
|
let from = (i) => fromEnd ? ordinal(n - 1) : restartAtYears && restart[i] >= 0 ? ordinal(restart[i]) : 0, onStride = (i) => (ordinal(i) - from(i)) % k === 0, keep2 = labels.map((_, i) => !fromEnd && pinned[i] || onStride(i) && (requested?.[i] ?? !0));
|
|
@@ -938,7 +1002,7 @@ function spreadUpright(input, plan) {
|
|
|
938
1002
|
let { centers, step } = input, [x0, x1] = input.range ?? [centers[0] - step / 2, centers[n - 1] + step / 2], font = input.fonts[0], endRoom = (i) => Math.max(step, Math.min(
|
|
939
1003
|
input.measure(input.labels[i], font).width,
|
|
940
1004
|
2 * (i === 0 ? centers[0] - x0 : x1 - centers[n - 1])
|
|
941
|
-
)), upright = planCategoryRowCascade({ ...input, widths: input.labels.map((_, i) => i === 0 || i === n - 1 ? endRoom(i) : 2 * step - 8) }),
|
|
1005
|
+
)), upright = planCategoryRowCascade({ ...input, widths: input.labels.map((_, i) => i === 0 || i === n - 1 ? endRoom(i) : 2 * step - 8) }), drawn2 = (p) => p.keep.filter(Boolean).length, whole = (p, lines) => p.rotation === 0 && drawn2(p) >= drawn2(plan) && p.infos.every((info, i) => !p.keep[i] || !info.truncated && info.lines.length <= lines);
|
|
942
1006
|
if (whole(upright, 1)) return upright;
|
|
943
1007
|
let font0 = input.fonts[0], widestWord = (label) => Math.max(0, ...label.split(/\s+/).filter(Boolean).map((word) => input.measure(word, font0).width)), wrapped = planCategoryRowCascade({ ...input, widths: input.labels.map((label, i) => i === 0 || i === n - 1 ? endRoom(i) : Math.max(step, Math.ceil(widestWord(label)) + 1)) });
|
|
944
1008
|
return whole(wrapped, PROSE_TICK_MAX_LINES) ? wrapped : void 0;
|
|
@@ -997,8 +1061,16 @@ function shortMonthNames(labels) {
|
|
|
997
1061
|
if (index.length === lower.length && index.some((i) => monthsShort[i] !== months[i])) return index.map((i) => monthsShort[i]);
|
|
998
1062
|
}
|
|
999
1063
|
}
|
|
1064
|
+
var PROSE_FLOOR_LINES = 3;
|
|
1000
1065
|
function planRow(input, bundled) {
|
|
1001
|
-
let { labels, centers, step, measure } = input, n = labels.length, dateNumeric = input.calendar?.length === n && input.calendar.every(Boolean) || isDateNumericTickSequence(labels), periodRow = dateNumeric || input.periods === !0 || calendarLike(labels), secondary = periodRow && input.secondary !== void 0 && input.secondary.size < input.fonts[0].size ? { ...input.secondary, size: input.fonts[0].size } : void 0,
|
|
1066
|
+
let { labels, centers, step, measure } = input, n = labels.length, dateNumeric = input.calendar?.length === n && input.calendar.every(Boolean) || isDateNumericTickSequence(labels), periodRow = dateNumeric || input.periods === !0 || calendarLike(labels), secondary = periodRow && input.secondary !== void 0 && input.secondary.size < input.fonts[0].size ? { ...input.secondary, size: input.fonts[0].size } : void 0, ladder = secondary ? [secondary, ...input.fonts.filter((font) => font.size < secondary.size)] : input.fonts, axisFloor = targetFloorsPx(input.target ?? DEFAULT_TARGET, input.textScale)[secondary ? "secondary" : "axis"], fonts = ladder.filter((font, index) => index === 0 || font.size >= axisFloor), smallest = fonts.at(-1), nameRow = input.stepToFloor === !0 && !periodRow && !(input.ordered || input.strideFromEnd || numberedSequence(labels)), floorFont = { ...fonts[0], size: axisFloor }, floorHolds = () => labels.every((label, i) => {
|
|
1067
|
+
let suffix = input.suffixes?.[i] ?? "", slot = (input.widths?.[i] ?? step) - (suffix ? measure(suffix, floorFont).width : 0);
|
|
1068
|
+
if (/[\n\u200d\u{E0020}-\u{E007F}]/u.test(label)) return !0;
|
|
1069
|
+
let parts = label.split(/[^\S\u00a0\u202f]+/).filter(Boolean).flatMap((word) => word.split(/(?<=-)(?=[^-])/));
|
|
1070
|
+
return measure(label, floorFont).width <= PROSE_FLOOR_LINES * slot && parts.every((part) => measure(part, floorFont).width <= slot);
|
|
1071
|
+
}), stepsToFloor = nameRow && smallest.size > axisFloor + 0.01 && floorHolds();
|
|
1072
|
+
stepsToFloor && fonts.push(floorFont);
|
|
1073
|
+
let rotateFonts = stepsToFloor ? fonts.slice(0, -1) : fonts, gap = input.gap ?? 4, padding = input.padding ?? 6, allowRotate = input.rotate ?? !0, orderedProse = (input.ordered || input.strideFromEnd || numberedSequence(labels)) && !dateNumeric, baseFont = fonts[0], growingWidths = (font) => bundled && font.size > 0 && (font.letterSpacing ?? 0) >= 0, maxRotatedWidth = input.maxRotatedWidth ?? rotatedWidthCap(input.plotHeight, n * step, baseFont), widthAt = (i) => input.widths?.[i] ?? step, suffixAt = (i) => input.suffixes?.[i] ?? "", withSuffix = (info, i, font) => {
|
|
1002
1074
|
let suffix = suffixAt(i);
|
|
1003
1075
|
if (!suffix) return info;
|
|
1004
1076
|
let lines = [...info.lines];
|
|
@@ -1023,7 +1095,7 @@ function planRow(input, bundled) {
|
|
|
1023
1095
|
let width = Math.max(widthAt(i) - pad - reserve, 1), single2 = !growingWidths(font) || /[\n\u200d\u{E0020}-\u{E007F}]/u.test(label) ? void 0 : label.split(/[^\S\u00a0\u202f]+/).filter(Boolean).join(" ");
|
|
1024
1096
|
if (single2 !== void 0 && measure(single2, font).width <= width)
|
|
1025
1097
|
return withSuffix({ lines: [single2], w: Math.max(measure(single2, font).width, 1), h: font.size * (font.lineHeight ?? 1.2), truncated: !1 }, i, font);
|
|
1026
|
-
let wrap = fitText(label, font, width, maxLines, measure), lines = wrap.lines.length ? wrap.lines : [""];
|
|
1098
|
+
let hyphenRetry = nameRow && /[-_/.]/.test(label) && measure(label, font).width <= maxLines * width, wrap = fitText(label, font, width, maxLines, measure, hyphenRetry ? { hyphenRetry: !0 } : {}), lines = wrap.lines.length ? wrap.lines : [""];
|
|
1027
1099
|
return withSuffix({
|
|
1028
1100
|
lines,
|
|
1029
1101
|
w: Math.max(...lines.map((l) => measure(l, font).width), 1),
|
|
@@ -1033,7 +1105,7 @@ function planRow(input, bundled) {
|
|
|
1033
1105
|
}, i, font);
|
|
1034
1106
|
});
|
|
1035
1107
|
return rows.set(key, infos), infos;
|
|
1036
|
-
}, words = labels.map((label) => /[\n\u200d\u{E0020}-\u{E007F}]/u.test(label) ? [] : label.split(/[^\S\u00a0\u202f]+/).filter(Boolean)), wholeRows = (font, maxLines, pad = padding, kept) => growingWidths(font) && words.some((parts, i) => (!kept || kept[i]) && parts.some((word) => measure(word, font).width > Math.max(widthAt(i) - pad - (suffixAt(i) ? measure(suffixAt(i), font).width : 0), 1))) ? void 0 : measureAll(font, maxLines, !1, pad), rowStart = n > 0 ? centers[0] - widthAt(0) / 2 : 0, rowEnd = n > 0 ? centers[n - 1] + widthAt(n - 1) / 2 : 0, stridingOrdered = !1, spreadX, anchor = (i, w) => spreadX?.[i] !== void 0 ? spreadX[i] : input.edgeAnchored === !0 || stridingOrdered ? tickLabelX(centers[i], w, i, n, !0) : Math.max(rowStart, Math.min(centers[i] - w / 2, rowEnd - w)), xOf = (infos) => (i) => anchor(i, infos[i].w), ownsItsRoom = (i, w, step2 = 1) => {
|
|
1108
|
+
}, words = labels.map((label) => /[\n\u200d\u{E0020}-\u{E007F}]/u.test(label) ? [] : label.split(/[^\S\u00a0\u202f]+/).filter(Boolean).flatMap((word) => nameRow ? word.split(/(?<=-)(?=[^-])/) : [word])), wholeRows = (font, maxLines, pad = padding, kept) => growingWidths(font) && words.some((parts, i) => (!kept || kept[i]) && parts.some((word) => measure(word, font).width > Math.max(widthAt(i) - pad - (suffixAt(i) ? measure(suffixAt(i), font).width : 0), 1))) ? void 0 : measureAll(font, maxLines, !1, pad), rowStart = n > 0 ? centers[0] - widthAt(0) / 2 : 0, rowEnd = n > 0 ? centers[n - 1] + widthAt(n - 1) / 2 : 0, stridingOrdered = !1, spreadX, anchor = (i, w) => spreadX?.[i] !== void 0 ? spreadX[i] : input.edgeAnchored === !0 || stridingOrdered ? tickLabelX(centers[i], w, i, n, !0) : Math.max(rowStart, Math.min(centers[i] - w / 2, rowEnd - w)), xOf = (infos) => (i) => anchor(i, infos[i].w), ownsItsRoom = (i, w, step2 = 1) => {
|
|
1037
1109
|
let x = anchor(i, w);
|
|
1038
1110
|
return (i - step2 < 0 || x >= centers[i - step2]) && (i + step2 > n - 1 || x + w <= centers[i + step2]);
|
|
1039
1111
|
}, fits = (infos, keep, minGap = gap) => {
|
|
@@ -1074,7 +1146,7 @@ function planRow(input, bundled) {
|
|
|
1074
1146
|
let lines = [...info.lines];
|
|
1075
1147
|
return lines[lines.length - 1] = `${lines[lines.length - 1] ?? ""} ${words2}`, { ...info, lines, w: info.w + measure(` ${words2}`, font).width };
|
|
1076
1148
|
}));
|
|
1077
|
-
let
|
|
1149
|
+
let drawn2 = infos.filter((_, i) => keep[i]), maxLines = rotation ? 1 : Math.max(1, maxOf(drawn2.map((info) => info.lines.length))), lineH = font.size * (font.lineHeight ?? 1.2), labelsHeight = rotation === 90 ? Math.max(maxOf(drawn2.map((info) => info.w)), 1) : rotation ? Math.max(maxOf(drawn2.map((info) => info.w)), 1) * SIN45 + lineH * SIN45 : maxLines * lineH, xAt = xOf(infos), hasMonths = yearSpans.some((span) => span.month), years = hasMonths ? monthRow(xAt, font, lineH) : yearSpans.map(({ year, from, to }) => {
|
|
1078
1150
|
let w = measure(String(year), font).width;
|
|
1079
1151
|
return { id: `category-year:${year}`, text: String(year), w, h: lineH, x: Math.max(rowStart, Math.min((centers[from] + centers[to]) / 2 - w / 2, rowEnd - w)) };
|
|
1080
1152
|
});
|
|
@@ -1213,9 +1285,9 @@ function planRow(input, bundled) {
|
|
|
1213
1285
|
let flat = measureAll(font, 1, !0);
|
|
1214
1286
|
if (!flat.some((info) => info.truncated) && flat.every((info, i) => info.w <= widthAt(i)) && fits(flat, all, 4)) return plan(font, flat, all, font === baseFont ? "fit" : "font-down");
|
|
1215
1287
|
}
|
|
1216
|
-
let everyName = input.everyName === !0 && !orderedProse, room45 = allowRotate &&
|
|
1288
|
+
let everyName = input.everyName === !0 && !orderedProse, room45 = allowRotate && rotateFonts.some((font) => step * SIN45 >= font.size * (font.lineHeight ?? 1.2) + 2);
|
|
1217
1289
|
if (allowRotate && (input.rotate90 || everyName && !room45)) {
|
|
1218
|
-
let upright =
|
|
1290
|
+
let upright = rotateFonts.filter((font2) => step >= font2.size * (font2.lineHeight ?? 1.2) + 2), cap = Math.max(VERTICAL_MIN_WIDTH, Math.floor((input.plotHeight ?? 0) * VERTICAL_HEIGHT_SHARE)), font = upright.find((f) => measureAll(f, 1).every((info) => info.w <= cap)) ?? upright[0];
|
|
1219
1291
|
if (font) {
|
|
1220
1292
|
let cutNames = [], infos = measureAll(font, 1).map((info, i) => {
|
|
1221
1293
|
if (info.w <= cap) return info;
|
|
@@ -1237,12 +1309,13 @@ function planRow(input, bundled) {
|
|
|
1237
1309
|
}
|
|
1238
1310
|
}
|
|
1239
1311
|
if (allowRotate) {
|
|
1240
|
-
let rotatable =
|
|
1312
|
+
let rotatable = rotateFonts.filter((font2) => step * SIN45 >= font2.size * (font2.lineHeight ?? 1.2) + 2), font = rotatable.find((font2) => measureAll(font2, 1).every((info) => info.w <= maxRotatedWidth)) ?? rotatable[0];
|
|
1241
1313
|
if (font) {
|
|
1242
|
-
let cutNotes = [], cutNames = [], infos = measureAll(font, 1).map((info, i) => {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1314
|
+
let lineH = font.size * (font.lineHeight ?? 1.2), spare = n * step - n * (lineH + 2) / SIN45 - n, reach = (i) => (spare + centers[i] - 4) / SIN45 - lineH, capAt = (i, w) => input.maxRotatedWidth !== void 0 || w <= reach(i) ? maxRotatedWidth : Math.max(ROTATED_MIN_WIDTH, Math.min(maxRotatedWidth, Math.floor(reach(i)))), cutNotes = [], cutNames = [], infos = measureAll(font, 1).map((info, i) => {
|
|
1315
|
+
let cap = capAt(i, info.w);
|
|
1316
|
+
if (info.w <= cap) return info;
|
|
1317
|
+
let mark = input.cutMarkFrom === void 0 || suffixAt(i) ? "" : ` ${footnoteMark(input.cutMarkFrom + cutNotes.length)}`, suffix = suffixAt(i) + mark, reserve = suffix ? measure(suffix, font).width : 0, bare = suffixAt(i) && info.lines[0].endsWith(suffixAt(i)) ? info.lines[0].slice(0, -suffixAt(i).length) : info.lines[0], cut2 = cutWithTitle(bare, font, Math.max(cap - reserve, 1), measure);
|
|
1318
|
+
return cutNames.push(labels[i]), mark && cutNotes.push(disclosureNote(`${mark.trim()} ${labels[i]}.`)), { ...info, lines: [`${cut2.text}${suffix}`], w: cap, truncated: !0, ...cut2.title !== void 0 ? { title: cut2.title } : {} };
|
|
1246
1319
|
});
|
|
1247
1320
|
return plan(font, infos, all, "rotate", {
|
|
1248
1321
|
rotation: 45,
|
|
@@ -1315,8 +1388,182 @@ function verticalNameRect(centerX, rowTop, width, font) {
|
|
|
1315
1388
|
}
|
|
1316
1389
|
var VERTICAL_CAP_SHARE = 0.72;
|
|
1317
1390
|
|
|
1391
|
+
// src/core/rowCanvas.ts
|
|
1392
|
+
function tallestContentHeight(width) {
|
|
1393
|
+
return Math.round(width / ASPECT_CAPS.tall);
|
|
1394
|
+
}
|
|
1395
|
+
function rowDrivenHeight(input) {
|
|
1396
|
+
if (input.options.size !== void 0 || panelTypeClass(input.options) !== void 0) return;
|
|
1397
|
+
let cap = Math.max(1400, input.ceiling ?? 0), bounded = Math.min(input.maxHeight ?? cap, cap, Math.ceil(input.chromeH + input.rowsH - 1e-6));
|
|
1398
|
+
return bounded > input.height || input.height - bounded > 2 ? bounded : void 0;
|
|
1399
|
+
}
|
|
1400
|
+
function fixedHeightCanvas(options) {
|
|
1401
|
+
return !heightOmitted(options.size) && options[TARGET_SIZE]?.fixed.height !== !1;
|
|
1402
|
+
}
|
|
1403
|
+
function spareShare(spare, count, cap, even = !1) {
|
|
1404
|
+
if (!(spare > 0) || count <= 0 || !(cap > 0)) return 0;
|
|
1405
|
+
let share = Math.min(cap, spare / count);
|
|
1406
|
+
return even ? Math.floor(share / 2) * 2 : Math.floor(share);
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
// src/core/sourceFollows.ts
|
|
1410
|
+
var LIFT_OVER = 8, ASCENT = 0.88, clear = (paint) => !paint || paint === "none" || paint.css === "transparent" || paint.css === "none", r2 = (value) => Math.round(value * 100) / 100;
|
|
1411
|
+
function arcPoints(from, rx, ry, rotation, large, sweep, to) {
|
|
1412
|
+
if (rx === 0 || ry === 0) return [to];
|
|
1413
|
+
rx = Math.abs(rx), ry = Math.abs(ry);
|
|
1414
|
+
let phi = rotation * Math.PI / 180, cp = Math.cos(phi), sp = Math.sin(phi), dx = (from.x - to.x) / 2, dy = (from.y - to.y) / 2, x1 = cp * dx + sp * dy, y1 = -sp * dx + cp * dy, scale = x1 * x1 / (rx * rx) + y1 * y1 / (ry * ry);
|
|
1415
|
+
scale > 1 && (rx *= Math.sqrt(scale), ry *= Math.sqrt(scale));
|
|
1416
|
+
let num = rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1, den = rx * rx * y1 * y1 + ry * ry * x1 * x1, co = (large === sweep ? -1 : 1) * Math.sqrt(Math.max(0, num / den)), cxp = co * rx * y1 / ry, cyp = -co * ry * x1 / rx, cx = cp * cxp - sp * cyp + (from.x + to.x) / 2, cy = sp * cxp + cp * cyp + (from.y + to.y) / 2, angle = (ux, uy, vx, vy) => Math.atan2(ux * vy - uy * vx, ux * vx + uy * vy), start = angle(1, 0, (x1 - cxp) / rx, (y1 - cyp) / ry), span = angle((x1 - cxp) / rx, (y1 - cyp) / ry, (-x1 - cxp) / rx, (-y1 - cyp) / ry);
|
|
1417
|
+
return !sweep && span > 0 && (span -= 2 * Math.PI), sweep && span < 0 && (span += 2 * Math.PI), Array.from({ length: 48 }, (_, k) => {
|
|
1418
|
+
let t = start + span * (k + 1) / 48;
|
|
1419
|
+
return { x: cp * rx * Math.cos(t) - sp * ry * Math.sin(t) + cx, y: sp * rx * Math.cos(t) + cp * ry * Math.sin(t) + cy };
|
|
1420
|
+
});
|
|
1421
|
+
}
|
|
1422
|
+
var POLYLINE = /^[MLZ\d\s,.eE+-]*$/;
|
|
1423
|
+
function polylineLowest(d, stop) {
|
|
1424
|
+
let lowest = -1 / 0, index = 0, end = d.length;
|
|
1425
|
+
for (let i = 0; i < end; ) {
|
|
1426
|
+
let c = d.charCodeAt(i);
|
|
1427
|
+
if (c >= 48 && c <= 57 || c === 45 || c === 46) {
|
|
1428
|
+
let from = i++;
|
|
1429
|
+
for (let e = d.charCodeAt(i); i < end && (e >= 48 && e <= 57 || e === 46 || e === 101 || e === 69 || (e === 45 || e === 43) && (d.charCodeAt(i - 1) | 32) === 101); e = d.charCodeAt(++i)) ;
|
|
1430
|
+
if (index++ & 1) {
|
|
1431
|
+
let y = +d.slice(from, i);
|
|
1432
|
+
if (y > lowest && (lowest = y, y >= stop))
|
|
1433
|
+
return lowest;
|
|
1434
|
+
}
|
|
1435
|
+
} else i++;
|
|
1436
|
+
}
|
|
1437
|
+
return lowest;
|
|
1438
|
+
}
|
|
1439
|
+
function pathLowest(d, stop) {
|
|
1440
|
+
if (POLYLINE.test(d)) return polylineLowest(d, stop);
|
|
1441
|
+
let lowest = -1 / 0, at = { x: 0, y: 0 }, start = at, see = (y) => {
|
|
1442
|
+
y > lowest && (lowest = y);
|
|
1443
|
+
};
|
|
1444
|
+
for (let [, command, args] of d.matchAll(/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g)) {
|
|
1445
|
+
if (lowest >= stop) return lowest;
|
|
1446
|
+
let n = (args.match(/-?\d*\.?\d+(?:e[+-]?\d+)?/gi) ?? []).map(Number), rel = command === command.toLowerCase(), kind = command.toUpperCase();
|
|
1447
|
+
if (kind === "Z") {
|
|
1448
|
+
at = start;
|
|
1449
|
+
continue;
|
|
1450
|
+
}
|
|
1451
|
+
if (kind === "M" || kind === "L" || kind === "T")
|
|
1452
|
+
for (let i = 0; i + 1 < n.length; i += 2)
|
|
1453
|
+
at = { x: n[i] + (rel ? at.x : 0), y: n[i + 1] + (rel ? at.y : 0) }, kind === "M" && i === 0 && (start = at), see(at.y);
|
|
1454
|
+
else if (kind === "H")
|
|
1455
|
+
for (let x of n) at = { x: x + (rel ? at.x : 0), y: at.y };
|
|
1456
|
+
else if (kind === "V")
|
|
1457
|
+
for (let y of n)
|
|
1458
|
+
at = { x: at.x, y: y + (rel ? at.y : 0) }, see(at.y);
|
|
1459
|
+
else if (kind === "C")
|
|
1460
|
+
for (let i = 0; i + 5 < n.length; i += 6) {
|
|
1461
|
+
let ox = rel ? at.x : 0, oy = rel ? at.y : 0, segment = { from: at, c1: { x: n[i] + ox, y: n[i + 1] + oy }, c2: { x: n[i + 2] + ox, y: n[i + 3] + oy }, to: { x: n[i + 4] + ox, y: n[i + 5] + oy } };
|
|
1462
|
+
for (let k = 1; k <= 16; k++) see(cubicPoint(segment, k / 16).y);
|
|
1463
|
+
at = segment.to;
|
|
1464
|
+
}
|
|
1465
|
+
else if (kind === "Q")
|
|
1466
|
+
for (let i = 0; i + 3 < n.length; i += 4) {
|
|
1467
|
+
let ox = rel ? at.x : 0, oy = rel ? at.y : 0, control = n[i + 1] + oy, end = { x: n[i + 2] + ox, y: n[i + 3] + oy };
|
|
1468
|
+
for (let k = 1; k <= 16; k++) {
|
|
1469
|
+
let t = k / 16, u = 1 - t;
|
|
1470
|
+
see(u * u * at.y + 2 * u * t * control + t * t * end.y);
|
|
1471
|
+
}
|
|
1472
|
+
at = end;
|
|
1473
|
+
}
|
|
1474
|
+
else if (kind === "A")
|
|
1475
|
+
for (let i = 0; i + 6 < n.length; i += 7) {
|
|
1476
|
+
let end = { x: n[i + 5] + (rel ? at.x : 0), y: n[i + 6] + (rel ? at.y : 0) };
|
|
1477
|
+
for (let point of arcPoints(at, n[i], n[i + 1], n[i + 2], !!n[i + 3], !!n[i + 4], end)) see(point.y);
|
|
1478
|
+
at = end;
|
|
1479
|
+
}
|
|
1480
|
+
else if (kind === "S")
|
|
1481
|
+
for (let i = 0; i + 3 < n.length; i += 4)
|
|
1482
|
+
at = { x: n[i + 2] + (rel ? at.x : 0), y: n[i + 3] + (rel ? at.y : 0) }, see(at.y);
|
|
1483
|
+
}
|
|
1484
|
+
return lowest;
|
|
1485
|
+
}
|
|
1486
|
+
function extent(node, stop = 1 / 0) {
|
|
1487
|
+
let dy = node.ty ?? 0;
|
|
1488
|
+
switch (node.t) {
|
|
1489
|
+
case "rect":
|
|
1490
|
+
case "image": {
|
|
1491
|
+
let half = node.t === "rect" && node.stroke ? (node.strokeWidth ?? 1) / 2 : 0;
|
|
1492
|
+
return [node.rect.y + dy - half, node.rect.y + node.rect.h + dy + half];
|
|
1493
|
+
}
|
|
1494
|
+
case "line":
|
|
1495
|
+
return [Math.min(node.y1, node.y2) + dy - node.width / 2, Math.max(node.y1, node.y2) + dy + node.width / 2];
|
|
1496
|
+
case "circle":
|
|
1497
|
+
return [node.cy + dy - node.r, node.cy + dy + node.r];
|
|
1498
|
+
case "path": {
|
|
1499
|
+
let half = node.stroke ? (node.width ?? 1) / 2 : 0, low = pathLowest(node.d, stop - dy - half);
|
|
1500
|
+
if (!Number.isFinite(low)) return;
|
|
1501
|
+
let bottom = low + dy + half;
|
|
1502
|
+
return [bottom, bottom];
|
|
1503
|
+
}
|
|
1504
|
+
case "text": {
|
|
1505
|
+
let lineH = node.font.size * (node.font.lineHeight ?? 1.2) * node.lines.length, bottom = node.y + dy + lineH;
|
|
1506
|
+
if (node.rotate) {
|
|
1507
|
+
let width = Math.max(0, ...node.lines.map((line) => defaultMeasurer(line, node.font).width)), left = node.align === "end" ? -width : node.align === "middle" ? -width / 2 : 0, ascent = node.font.size * ASCENT, angle = node.rotate * Math.PI / 180, sin = Math.sin(angle), cos = Math.cos(angle);
|
|
1508
|
+
bottom = node.y + dy + ascent + Math.max(left * sin, (left + width) * sin) + Math.max(-ascent * cos, (lineH - ascent) * cos);
|
|
1509
|
+
}
|
|
1510
|
+
return node.backing && (bottom = Math.max(bottom, node.backing.y + node.backing.h + dy)), [node.y + dy, bottom];
|
|
1511
|
+
}
|
|
1512
|
+
default:
|
|
1513
|
+
return;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
function drawn(node, canvas) {
|
|
1517
|
+
return node.opacity === 0 ? !1 : node.t === "rect" ? clear(node.fill) && !node.stroke ? !1 : !(node.rect.w >= canvas.width * 0.97 && node.rect.h >= canvas.height * 0.97) : node.t === "path" ? !clear(node.fill) || !!node.stroke : node.t === "text" ? node.lines.some((line) => String(line).trim() !== "") : !0;
|
|
1518
|
+
}
|
|
1519
|
+
function moved(node, dy) {
|
|
1520
|
+
switch (node.t) {
|
|
1521
|
+
case "text":
|
|
1522
|
+
return { ...node, y: r2(node.y - dy), ...node.backing ? { backing: { ...node.backing, y: r2(node.backing.y - dy) } } : {} };
|
|
1523
|
+
case "rect":
|
|
1524
|
+
case "image":
|
|
1525
|
+
return { ...node, rect: { ...node.rect, y: r2(node.rect.y - dy) } };
|
|
1526
|
+
case "line":
|
|
1527
|
+
return { ...node, y1: r2(node.y1 - dy), y2: r2(node.y2 - dy) };
|
|
1528
|
+
case "circle":
|
|
1529
|
+
return { ...node, cy: r2(node.cy - dy) };
|
|
1530
|
+
default:
|
|
1531
|
+
return { ...node, ty: r2((node.ty ?? 0) - dy) };
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
var up = (rect, dy) => ({ ...rect, y: r2(rect.y - dy) });
|
|
1535
|
+
function sourceFollowsContent(geometry, options) {
|
|
1536
|
+
let { frame, size } = geometry, plotBand = frame.plotRect;
|
|
1537
|
+
if (!plotBand || geometry.story || geometry.type === "choropleth" || panelTypeClass(options) !== void 0 || !fixedHeightCanvas(options ?? {})) return;
|
|
1538
|
+
let plotBottom = plotBand.y + plotBand.h, tops = [frame.footerRect?.y, frame.eventKeyRect?.y, geometry.legend && geometry.legend.rect.y >= plotBottom - 0.5 ? geometry.legend.rect.y : void 0].filter((top) => top !== void 0);
|
|
1539
|
+
if (tops.length === 0) return;
|
|
1540
|
+
let blockTop = Math.min(...tops), gap = blockTop - plotBottom;
|
|
1541
|
+
if (gap < 0) return;
|
|
1542
|
+
let line = plotBottom - LIFT_OVER, inBlock = blockTop - 0.01, boxes = geometry.scene.map((node) => node.t === "path" ? void 0 : extent(node)), ink = -1 / 0;
|
|
1543
|
+
if (geometry.scene.forEach((node, i) => {
|
|
1544
|
+
let box = boxes[i];
|
|
1545
|
+
box && box[0] < inBlock && drawn(node, size) && (ink = Math.max(ink, box[1]));
|
|
1546
|
+
}), ink >= line) return;
|
|
1547
|
+
for (let [i, node] of geometry.scene.entries()) {
|
|
1548
|
+
if (node.t !== "path" || !drawn(node, size)) continue;
|
|
1549
|
+
let box = boxes[i] = extent(node, inBlock);
|
|
1550
|
+
if (!(!box || box[0] >= inBlock) && (ink = Math.max(ink, box[1]), ink >= line))
|
|
1551
|
+
return;
|
|
1552
|
+
}
|
|
1553
|
+
if (!Number.isFinite(ink)) return;
|
|
1554
|
+
let spare = blockTop - ink - gap;
|
|
1555
|
+
if (spare <= LIFT_OVER || resolveTheme(options?.theme).space.footerFollows === !1) return;
|
|
1556
|
+
let dy = r2(spare);
|
|
1557
|
+
geometry.scene = geometry.scene.map((node, i) => {
|
|
1558
|
+
let box = node.t === "path" ? boxes[i] ?? extent(node, inBlock) : boxes[i];
|
|
1559
|
+
return box && box[0] >= inBlock ? moved(node, dy) : node;
|
|
1560
|
+
});
|
|
1561
|
+
let shifted = {};
|
|
1562
|
+
frame.footerRect && (shifted.footerRect = up(frame.footerRect, dy)), frame.eventKeyRect && (shifted.eventKeyRect = up(frame.eventKeyRect, dy)), frame.notesButton?.y !== void 0 && (shifted.notesButton = { ...frame.notesButton, y: r2(frame.notesButton.y - dy) }), Object.assign(frame, shifted), geometry.legend && geometry.legend.rect.y >= blockTop - 0.01 && (geometry.legend = { ...geometry.legend, rect: up(geometry.legend.rect, dy) }), geometry.debug = { ...geometry.debug, occupied: geometry.debug.occupied.map((claim) => (claim.kind === "frame" || claim.kind === "legend") && claim.rect.y >= blockTop - 0.01 ? { ...claim, rect: up(claim.rect, dy) } : claim) };
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1318
1565
|
// src/core/sizing.ts
|
|
1319
|
-
var ROW_TYPES = /* @__PURE__ */ new Set(["bar", "bartable", "bullet", "butterfly", "gantt", "likert", "cohort", "table", "funnel", "status", "heatmap"]), ROW_FAMILY = ["bar", "bartable", "funnel", "butterfly", "likert", "status", "gantt", "cohort", "heatmap", "bullet"], BAND_FAMILY = ["waterfall", "pareto", "variance", "pyramid", "box", "mekko", "pvm"], CARD_MIN_WIDTH = 280, CARD_CLASS_WIDTH = 480, CARD_STEPS = [400, CARD_CLASS_WIDTH];
|
|
1566
|
+
var ROW_TYPES = /* @__PURE__ */ new Set(["bar", "bartable", "bullet", "butterfly", "gantt", "likert", "cohort", "table", "funnel", "status", "heatmap"]), ROW_FAMILY = ["bar", "bartable", "funnel", "butterfly", "likert", "status", "gantt", "cohort", "heatmap", "bullet"], BAND_FAMILY = ["waterfall", "pareto", "variance", "pyramid", "box", "mekko", "pvm"], CARD_MIN_WIDTH = 280, NARROW_MIN_WIDTH = 120, MAP_MIN_WIDTH = 160, CARD_CLASS_WIDTH = 480, CARD_STEPS = [400, CARD_CLASS_WIDTH];
|
|
1320
1567
|
var CARD_FLOOR_CONTENT_TYPES = /* @__PURE__ */ new Set(["butterfly", "diagram", "funnel", "grid", "heatmap", "kpi", "status"]), REPAIR_PROBE_TYPES = /* @__PURE__ */ new Set(["status", "bullet"]), CARD_FLOOR_TYPES = /* @__PURE__ */ new Set([...ROW_FAMILY, ...BAND_FAMILY]), CONTENT_TYPES = /* @__PURE__ */ new Set([...ROW_TYPES, "kpi", "pie", "diagram", "sparkline", "slope", "choropleth"]), ROW_COMPACT_FLOOR = { width: CARD_MIN_WIDTH, height: 28 }, BAND_COMPACT_FLOOR = { width: CARD_MIN_WIDTH, height: 180 }, COMPACT_FLOORS = {
|
|
1321
1568
|
column: { width: 280, height: 180 },
|
|
1322
1569
|
line: { width: 280, height: 180 },
|
|
@@ -1352,8 +1599,11 @@ function namesDrawnSeries(data, result) {
|
|
|
1352
1599
|
Array.isArray(item.children) && item.children.forEach(walk);
|
|
1353
1600
|
};
|
|
1354
1601
|
(result.scene ?? []).forEach(walk);
|
|
1355
|
-
let
|
|
1356
|
-
return
|
|
1602
|
+
let drawn2 = entries.filter((entry) => active.has(entry.id));
|
|
1603
|
+
return drawn2.length < 2 || drawn2.every((entry) => named.has(entry.id));
|
|
1604
|
+
}
|
|
1605
|
+
function lostCategoryNames(result) {
|
|
1606
|
+
return result.refused ? [] : result.labels.filter((label) => label.kind === "category" && !!label.hidden && label.hidden !== "redundant" && label.hidden !== "density");
|
|
1357
1607
|
}
|
|
1358
1608
|
function atHardMinimum(options) {
|
|
1359
1609
|
return options?.[HARD_MINIMUM] === !0;
|
|
@@ -1367,10 +1617,10 @@ function requestFloor(policy) {
|
|
|
1367
1617
|
}
|
|
1368
1618
|
var DIAGRAM_BELOW_SHARED_MIN = !0, DIAGRAM_MIN_HEIGHT = 160;
|
|
1369
1619
|
function chartSizing(type, options) {
|
|
1370
|
-
let
|
|
1620
|
+
let compactBullet = type === "bullet" && options?.density === "compact", cardFloor = CARD_FLOOR_TYPES.has(type);
|
|
1371
1621
|
return {
|
|
1372
1622
|
aspect: type === "scatter" ? "4:3" : type === "pie" ? "1:1" : CONTENT_TYPES.has(type) ? "content" : "16:9",
|
|
1373
|
-
minWidth: type === "table" ? 100 : type === "sparkline" ? 88 :
|
|
1623
|
+
minWidth: type === "table" ? 100 : type === "sparkline" ? 88 : compactBullet ? 120 : type === "kpi" || type === "pie" ? NARROW_MIN_WIDTH : type === "choropleth" ? MAP_MIN_WIDTH : cardFloor ? CARD_MIN_WIDTH : CARD_CLASS_WIDTH,
|
|
1374
1624
|
minHeight: type === "scatter" ? 360 : type === "pie" ? 320 : type === "table" ? 80 : type === "sparkline" ? 24 : ROW_TYPES.has(type) || type === "kpi" ? 28 : type === "diagram" && DIAGRAM_BELOW_SHARED_MIN ? DIAGRAM_MIN_HEIGHT : 270,
|
|
1375
1625
|
fit: CONTENT_TYPES.has(type) ? "content" : "fill",
|
|
1376
1626
|
// A compact-density bullet is already its smallest form at 120 px: the row compact floor would raise it.
|
|
@@ -1633,7 +1883,7 @@ function prepareFitLayout(definition, data, origins = /* @__PURE__ */ new WeakMa
|
|
|
1633
1883
|
width < CARD_CLASS_WIDTH && cardClassHeight(definition, data, options, width);
|
|
1634
1884
|
}
|
|
1635
1885
|
let fitted = fitOrRepair(definition, data, options, at), copy = copyLayout(fitted);
|
|
1636
|
-
return origins.set(copy, origins.get(fitted) ?? fitted), withPlotFloorWarning(copy, options, definition.title);
|
|
1886
|
+
return origins.set(copy, origins.get(fitted) ?? fitted), copy.refused || sourceFollowsContent(copy, options), withPlotFloorWarning(copy, options, definition.title);
|
|
1637
1887
|
} finally {
|
|
1638
1888
|
borrowed || (memo.active = !1, memo.heights.clear(), memo.references = void 0);
|
|
1639
1889
|
}
|
|
@@ -1662,7 +1912,7 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1662
1912
|
if (definition.type === "grid" && first.warnings[0]?.code !== "size-below-floor") return first;
|
|
1663
1913
|
let received = first.size, constraints = options?.[TARGET_SIZE] ?? resolveTargetSize(options?.target ?? DEFAULT_TARGET, options?.size);
|
|
1664
1914
|
if (isWidthProbe(definition.type, options) && constraints.fixed.width && !constraints.fixed.height && first.warnings[0]?.code === "size-below-floor" && received.width < first.sizing.minWidth) return first;
|
|
1665
|
-
let compact = options?.mode === "compact" || belowMinimum(declaredSizing(definition, options), first.size, options, definition.type) || forcedCompact(options), fixedFallback = options && (compact || definition.type === "treemap" || definition.type === "sankey") && options.belowMinimum !== "refuse" && options.mode !== "full" && panelTypeClass(options) === void 0 && constraints.fixed.width && constraints.fixed.height, warnHardMinimum = (fitted) => {
|
|
1915
|
+
let compact = options?.mode === "compact" || belowMinimum(declaredSizing(definition, options), first.size, options, definition.type) || forcedCompact(options), fixedFallback = options && (compact || definition.type === "treemap" || definition.type === "sankey") && options.belowMinimum !== "refuse" && options.mode !== "full" && panelTypeClass(options) === void 0 && constraints.fixed.width && constraints.fixed.height, namesKept = (fitted) => namesDrawnSeries(data, fitted) && (definition.hardMinimumKeepsNames !== !0 || lostCategoryNames(fitted).length === 0), warnHardMinimum = (fitted) => {
|
|
1666
1916
|
let target = options?.target ?? DEFAULT_TARGET, height = Math.max(requiredSize(received, first.sizing).height, plotFloorHeight(fitted, target));
|
|
1667
1917
|
return fitted.warnings.some((warning) => warning.code === "plot-under-floor") || fitted.warnings.push({
|
|
1668
1918
|
code: "plot-under-floor",
|
|
@@ -1675,7 +1925,7 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1675
1925
|
};
|
|
1676
1926
|
if (fixedFallback) {
|
|
1677
1927
|
let fitted = fitAt(definition, data, { ...options, [HARD_MINIMUM]: !0 });
|
|
1678
|
-
if (!fitted.refused &&
|
|
1928
|
+
if (!fitted.refused && namesKept(fitted)) return warnHardMinimum(fitted);
|
|
1679
1929
|
}
|
|
1680
1930
|
let sourceStep = !!(!staticFrame.pinned && compact && options?.source && constraints.fixed.width && constraints.fixed.height);
|
|
1681
1931
|
if (sourceStep && options)
|
|
@@ -1684,11 +1934,11 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1684
1934
|
if (!fitted.refused) return fitted;
|
|
1685
1935
|
}
|
|
1686
1936
|
if (fixedFallback) {
|
|
1687
|
-
let authored = options, subtitle = resolveSubtitle(authored.subtitle), line = subtitle && authored.footnotes !== !1 && !authored.unit?.trim() ? subtitleLine(subtitle) : void 0, footer = sourceStep ? { ...options, [COMPACT_SOURCE_LINES]: 0 } : options,
|
|
1937
|
+
let authored = options, subtitle = resolveSubtitle(authored.subtitle), line = subtitle && authored.footnotes !== !1 && !authored.unit?.trim() ? subtitleLine(subtitle) : void 0, footer = sourceStep ? { ...options, [COMPACT_SOURCE_LINES]: 0 } : options, moved2 = line === void 0 ? footer : { ...footer, subtitle: void 0, footnotes: [...authored.footnotes || [], line], [MOVED_SUBTITLE]: line };
|
|
1688
1938
|
for (let hard of [!1, !0]) {
|
|
1689
1939
|
if (!hard && line === void 0) continue;
|
|
1690
|
-
let fitted = fitAt(definition, data, hard ? { ...
|
|
1691
|
-
if (!fitted.refused && !(hard && !
|
|
1940
|
+
let fitted = fitAt(definition, data, hard ? { ...moved2, [HARD_MINIMUM]: !0 } : moved2);
|
|
1941
|
+
if (!fitted.refused && !(hard && !namesKept(fitted)))
|
|
1692
1942
|
return line !== void 0 && fitted.warnings.push({
|
|
1693
1943
|
code: "subtitle-moved-to-notes",
|
|
1694
1944
|
severity: "warn",
|
|
@@ -1855,7 +2105,7 @@ function fitAt(definition, data, options, atSize) {
|
|
|
1855
2105
|
return widthOnly(options?.size) && !result.refused && result.sizing && (result.sizing.naturalHeight = Math.max(result.sizing.naturalHeight, result.size.height)), result;
|
|
1856
2106
|
}
|
|
1857
2107
|
function compactFallbackApplies(definition, options, data) {
|
|
1858
|
-
return declaredSizing(definition, options).compactFloor !== void 0 && options?.belowMinimum !== "refuse" && options?.
|
|
2108
|
+
return declaredSizing(definition, options).compactFloor !== void 0 && options?.belowMinimum !== "refuse" && (options?.[TARGET_SIZE] ?? resolveTargetSize(options?.target ?? DEFAULT_TARGET, options?.size)).fixed.width && panelTypeClass(options) === void 0 && definition.type !== "mekko" && options?.mode !== "full" && (data === void 0 || definition.compactForm?.(data, options) !== !1);
|
|
1859
2109
|
}
|
|
1860
2110
|
function compactReplacesRefusal(definition, options, data) {
|
|
1861
2111
|
if (!FALLBACK_COMPACT.has(definition.type) || forcedCompact(options) || !compactFallbackApplies(definition, options, data)) return !1;
|
|
@@ -1927,9 +2177,9 @@ function fitOnce(definition, data, options, compactFallback, atSize) {
|
|
|
1927
2177
|
return tall.refused ? settled : tall;
|
|
1928
2178
|
}
|
|
1929
2179
|
if (!nested) {
|
|
1930
|
-
let plotShare = autoPlotShare(definition, options, width), floorShare = autoPlotShare(definition, { ...options, [PLOT_SHARE]: void 0 }, width),
|
|
2180
|
+
let plotShare = autoPlotShare(definition, options, width), floorShare = autoPlotShare(definition, { ...options, [PLOT_SHARE]: void 0 }, width), freed = (r) => r.refused ? 0 : freedChromeOf(r.frame);
|
|
1931
2181
|
width < CARD_CLASS_WIDTH && (height = Math.max(height, cardClassHeight(definition, data, options, width, !0) ?? 0));
|
|
1932
|
-
let search = (plotPx2, startHeight) => {
|
|
2182
|
+
let wholeAxis = { ...options, valueAxis: { ...options.valueAxis, break: !1 } }, drawnProbe = declared.aspect === "16:9" && options?.valueAxis?.break === "auto" && wholeBridgePlotPx(definition.type, wholeAxis, width) !== 0 ? at(width, height) : void 0, allowanceOptions = drawnProbe && !drawnProbe.refused && !drawnProbe.axes.some((axis) => axis.break) && !drawnProbe.scene.some((node) => node.t === "line" && (node.part === "barBreak" || node.part === "axisBreak")) ? wholeAxis : options, plotPx = declared.aspect === "16:9" ? autoPlotPx(target, width) + typePlotPx(definition.type, allowanceOptions, width) : PLOT_FLOOR_PX[target], search = (plotPx2, startHeight) => {
|
|
1933
2183
|
let height2 = startHeight, previous, directRefusal, triedDirectRefusal = !1;
|
|
1934
2184
|
for (let pass = 0; pass < 8; pass++) {
|
|
1935
2185
|
let probe = at(width, height2);
|
|
@@ -2124,8 +2374,18 @@ function fitSizeMemo(definition, data, options, compactFallback) {
|
|
|
2124
2374
|
let copy = memoCopy(result);
|
|
2125
2375
|
return readsShare ? (entry.byShare ??= /* @__PURE__ */ new Map()).set(share, copy) : entry.result = copy, memo.set(key, entry), result;
|
|
2126
2376
|
}
|
|
2377
|
+
var MIN_COLUMN_BAR = 3;
|
|
2378
|
+
function columnCannotFit(data, options, width) {
|
|
2379
|
+
let categories = data?.categories;
|
|
2380
|
+
return options?.topN === void 0 && options?.viewDomain === void 0 && Array.isArray(categories) && categories.length * MIN_COLUMN_BAR > width;
|
|
2381
|
+
}
|
|
2382
|
+
function columnBarFloor(geometry) {
|
|
2383
|
+
if (geometry.type !== "column" || geometry.size.width >= CARD_MIN_WIDTH) return 0;
|
|
2384
|
+
let bars = geometry.marks?.bars ?? [], thinnest = Math.min(...bars.map((bar) => bar.rect.w).filter((w) => w > 0));
|
|
2385
|
+
return !Number.isFinite(thinnest) || thinnest >= MIN_COLUMN_BAR ? 0 : Math.min(CARD_MIN_WIDTH, Math.ceil(geometry.size.width - geometry.plot.w + geometry.plot.w * MIN_COLUMN_BAR / thinnest));
|
|
2386
|
+
}
|
|
2127
2387
|
function fitSize(definition, data, options, compactFallback) {
|
|
2128
|
-
let declared = declaredSizing(definition, options), requested = resolveSize(options?.size, options?.target), nested = panelTypeClass(options) !== void 0, floor = requestFloor(declared), growsFull = definition.type === "pie" && !(options?.[TARGET_SIZE] ?? resolveTargetSize(options?.target ?? DEFAULT_TARGET, options?.size)).fixed.height, tight = !nested && (compactFallback || belowMinimum(declared, growsFull ? { ...requested, height: declared.minHeight } : requested, options, definition.type)), gatePolicy = tight ? { ...declared, minWidth:
|
|
2388
|
+
let declared = declaredSizing(definition, options), requested = resolveSize(options?.size, options?.target), nested = panelTypeClass(options) !== void 0, floor = requestFloor(declared), growsFull = definition.type === "pie" && !(options?.[TARGET_SIZE] ?? resolveTargetSize(options?.target ?? DEFAULT_TARGET, options?.size)).fixed.height, tight = !nested && (compactFallback || belowMinimum(declared, growsFull ? { ...requested, height: declared.minHeight } : requested, options, definition.type)), gateWidth = definition.type === "column" && !columnCannotFit(data, options, requested.width) ? Math.min(floor.width, NARROW_MIN_WIDTH) : floor.width, gatePolicy = tight ? { ...declared, minWidth: gateWidth, minHeight: floor.height } : declared;
|
|
2129
2389
|
if (!nested && !fitsSize(requested, definition.type === "grid" ? { ...gatePolicy, minHeight: 0 } : gatePolicy))
|
|
2130
2390
|
return sizeRefusal(definition.type, definition.title, requested, resolveSizing(gatePolicy, requested));
|
|
2131
2391
|
let mode = tight || definition.type !== "mekko" && options?.mode === "compact" ? "compact" : "full", layoutOptions = mode === "compact" ? compactOptions(definition.type, options ?? {}, tight ? floor : void 0, requested.width) : options, rawOptions = definition.type === "kpi" ? { ...layoutOptions, typeClass: "M" } : layoutOptions, layout = (runOptions) => {
|
|
@@ -2149,8 +2409,9 @@ function fitSize(definition, data, options, compactFallback) {
|
|
|
2149
2409
|
geometry.frame.minHeight ?? 0,
|
|
2150
2410
|
geometry.frame.plotMinHeight ?? 0,
|
|
2151
2411
|
(heightShort || tight) && HOLDS_COMPACT_PLOT.has(definition.type) ? Math.ceil(geometry.size.height + (atHardMinimum(options) && !HARD_KEEPS_COMPACT_PLOT.has(definition.type) ? HARD_COMPACT_PLOT : MIN_COMPACT_PLOT) - plotForFloor(geometry).h) : 0
|
|
2152
|
-
), measured = {
|
|
2412
|
+
), barFloor = definition.type === "column" ? columnBarFloor(geometry) : 0, measured = {
|
|
2153
2413
|
...geometry.sizing,
|
|
2414
|
+
...barFloor > (geometry.sizing?.minWidth ?? 0) ? { minWidth: barFloor } : {},
|
|
2154
2415
|
...definition.type === "kpi" ? { naturalWidth: Math.min(geometry.sizing?.naturalWidth ?? 360, 360) } : {},
|
|
2155
2416
|
// The height that holds a plot of MIN_COMPACT_PLOT px is the measured floor (HOLDS_COMPACT_PLOT).
|
|
2156
2417
|
minHeight: floorWithFooter - footerExtra,
|
|
@@ -2193,7 +2454,21 @@ function crowdedTailCut(ranked) {
|
|
|
2193
2454
|
}
|
|
2194
2455
|
|
|
2195
2456
|
// src/core/itemBudget.ts
|
|
2196
|
-
var ITEM_BUDGET = 2e3, TYPE_BUDGETS = { likert: 500, mekko: 2e4 }, TOO_MANY_ITEMS = "too-many-items",
|
|
2457
|
+
var ITEM_BUDGET = 2e3, TYPE_BUDGETS = { likert: 500, mekko: 2e4 }, TOO_MANY_ITEMS = "too-many-items", LINE_LIMIT = { budget: 3e5, perSeries: 100, crossCap: 1e8 }, COMBO_LIMIT = { budget: 2e4, perSeries: 40 };
|
|
2458
|
+
function checkPointBudget(categories, series, limit = LINE_LIMIT, chart = "a line or area chart") {
|
|
2459
|
+
let cost = categories * series + limit.perSeries * series, cross = categories * series * series, crossOver = limit.crossCap !== void 0 && cross > limit.crossCap;
|
|
2460
|
+
if (cost <= limit.budget && !crossOver) return;
|
|
2461
|
+
let message = cost > limit.budget ? `${series} series of ${categories} categories cost ${cost} (the points plus ${limit.perSeries} for each series), over the ${limit.budget} ${chart} draws; it would take minutes or run out of memory` : `${series} series of ${categories} categories give ${categories} x ${series} x ${series} = ${cross}, over the ${limit.crossCap} ${chart} draws; it would run out of memory`;
|
|
2462
|
+
throw new NormalizeError(
|
|
2463
|
+
TOO_MANY_ITEMS,
|
|
2464
|
+
"series",
|
|
2465
|
+
message,
|
|
2466
|
+
"draw fewer series, aggregate the periods first (weeks or months), or set window.last or viewDomain to draw part of the periods",
|
|
2467
|
+
void 0,
|
|
2468
|
+
["data", "series"]
|
|
2469
|
+
);
|
|
2470
|
+
}
|
|
2471
|
+
var BUDGETED_LISTS = {
|
|
2197
2472
|
column: ["categories"],
|
|
2198
2473
|
bar: ["categories"],
|
|
2199
2474
|
combo: ["categories"],
|
|
@@ -2214,7 +2489,7 @@ var ITEM_BUDGET = 2e3, TYPE_BUDGETS = { likert: 500, mekko: 2e4 }, TOO_MANY_ITEM
|
|
|
2214
2489
|
treemap: ["items"],
|
|
2215
2490
|
pyramid: ["bands"],
|
|
2216
2491
|
cohort: ["cohorts"]
|
|
2217
|
-
}, TOP_N_TYPES = /* @__PURE__ */ new Set(["bar", "butterfly", "column", "mekko", "pareto", "likert", "pyramid"]), VIEWPORT_TYPES = /* @__PURE__ */ new Set(["column", "combo"]);
|
|
2492
|
+
}, TOP_N_TYPES = /* @__PURE__ */ new Set(["bar", "butterfly", "column", "dot", "mekko", "pareto", "likert", "pyramid", "variance"]), VIEWPORT_TYPES = /* @__PURE__ */ new Set(["column", "combo"]);
|
|
2218
2493
|
function barTotalsAtLeast(data, threshold) {
|
|
2219
2494
|
let series = data?.series, categories = data?.categories ?? [], totals = new Float64Array(categories.length);
|
|
2220
2495
|
if (Array.isArray(series)) for (let one of series) {
|
|
@@ -2230,10 +2505,15 @@ function barTotalsAtLeast(data, threshold) {
|
|
|
2230
2505
|
return count;
|
|
2231
2506
|
}
|
|
2232
2507
|
function drawnCount(type, key, list, data, options) {
|
|
2233
|
-
let count = list.length
|
|
2508
|
+
let count = list.length;
|
|
2509
|
+
if (type === "treemap") return list.filter((item) => {
|
|
2510
|
+
let value = item?.value;
|
|
2511
|
+
return value !== 0 && value !== null;
|
|
2512
|
+
}).length;
|
|
2513
|
+
let topN = options?.topN;
|
|
2234
2514
|
if (TOP_N_TYPES.has(type) && topN?.n !== void 0 && topN.n > 0 && !(type === "column" && options?.anomaly)) {
|
|
2235
2515
|
let kept = Math.min(count, type === "bar" ? Math.max(1, topN.n) : topN.n);
|
|
2236
|
-
type === "bar" && topN.threshold !== void 0 && (kept = Math.min(kept, Math.max(1, barTotalsAtLeast(data, topN.threshold)))), count = Math.min(count, kept + (topN.rest === !1 || kept === count ? 0 : 1));
|
|
2516
|
+
type === "bar" && topN.threshold !== void 0 && (kept = Math.min(kept, Math.max(1, barTotalsAtLeast(data, topN.threshold)))), count = Math.min(count, kept + (type === "dot" || type === "variance" || topN.rest === !1 || kept === count ? 0 : 1));
|
|
2237
2517
|
}
|
|
2238
2518
|
if (VIEWPORT_TYPES.has(type) && key === "categories") {
|
|
2239
2519
|
let ends = options?.viewDomain?.x;
|
|
@@ -2271,21 +2551,51 @@ function checkItemBudget(type, data, options) {
|
|
|
2271
2551
|
}
|
|
2272
2552
|
|
|
2273
2553
|
// src/core/scale.ts
|
|
2274
|
-
function applyAxisBounds(domain,
|
|
2554
|
+
function applyAxisBounds(domain, extent2, axis, warnings) {
|
|
2275
2555
|
return axis?.min === void 0 && axis?.max === void 0 ? domain : domain.map((value, i) => {
|
|
2276
2556
|
let bound = i === 0 ? "min" : "max", authored = axis?.[bound];
|
|
2277
2557
|
if (authored === void 0) return value;
|
|
2278
|
-
let
|
|
2279
|
-
return
|
|
2558
|
+
let drawn2 = i === 0 ? Math.min(authored, extent2[i]) : Math.max(authored, extent2[i]);
|
|
2559
|
+
return drawn2 !== authored && warnings.push({
|
|
2280
2560
|
code: `value-axis-${bound}-ignored`,
|
|
2281
2561
|
severity: "warn",
|
|
2282
|
-
message: `valueAxis.${bound} ${authored} cannot contain the plotted values and their required space; the axis extends to ${
|
|
2283
|
-
suggest: `Set valueAxis.${bound} to ${
|
|
2562
|
+
message: `valueAxis.${bound} ${authored} cannot contain the plotted values and their required space; the axis extends to ${drawn2}`,
|
|
2563
|
+
suggest: `Set valueAxis.${bound} to ${drawn2}, or remove valueAxis.${bound}.`,
|
|
2284
2564
|
field: ["options", "valueAxis", bound],
|
|
2285
|
-
fix: [{ op: "replace", path: `/options/valueAxis/${bound}`, value:
|
|
2286
|
-
}),
|
|
2565
|
+
fix: [{ op: "replace", path: `/options/valueAxis/${bound}`, value: drawn2 }]
|
|
2566
|
+
}), drawn2;
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
function shownTickStep(step, shown, warnings) {
|
|
2570
|
+
if (step === void 0 || shown) return step;
|
|
2571
|
+
warnings.push({
|
|
2572
|
+
code: "tick-step-ignored",
|
|
2573
|
+
severity: "warn",
|
|
2574
|
+
message: `valueAxis.tickStep ${step} has no effect because the value axis is hidden`,
|
|
2575
|
+
suggest: "set valueAxis.show to true, or drop valueAxis.tickStep",
|
|
2576
|
+
field: ["options", "valueAxis", "tickStep"]
|
|
2287
2577
|
});
|
|
2288
2578
|
}
|
|
2579
|
+
function applyTickStep(domain, step, warnings, inside = !1) {
|
|
2580
|
+
if (step === void 0 || !(step > 0)) return { domain };
|
|
2581
|
+
let from = Math.floor(domain[0] / step + 1e-9), to = Math.ceil(domain[1] / step - 1e-9);
|
|
2582
|
+
if (inside) {
|
|
2583
|
+
let first = Math.ceil(domain[0] / step - 1e-9), last = Math.floor(domain[1] / step + 1e-9);
|
|
2584
|
+
last - first >= 1 ? (from = first, to = last) : inside = !1;
|
|
2585
|
+
}
|
|
2586
|
+
let count = to - from;
|
|
2587
|
+
if (count >= 1 && count <= 20) {
|
|
2588
|
+
let ticks = Array.from({ length: count + 1 }, (_, i) => Number(((from + i) * step).toFixed(10)));
|
|
2589
|
+
if (ticks.every(Number.isFinite) && ticks.at(-1) > ticks[0])
|
|
2590
|
+
return { domain: inside ? domain : [ticks[0], ticks.at(-1)], ticks };
|
|
2591
|
+
}
|
|
2592
|
+
return warnings.push({
|
|
2593
|
+
code: "tick-step-ignored",
|
|
2594
|
+
severity: "warn",
|
|
2595
|
+
message: `valueAxis.tickStep ${step} would draw ${count} intervals over the value domain; the nice ticks are drawn instead`,
|
|
2596
|
+
suggest: "pick a step that gives 1 to 20 intervals"
|
|
2597
|
+
}), { domain };
|
|
2598
|
+
}
|
|
2289
2599
|
var AXIS_BREAK_GAP = 12, MAX_TICK_COUNT = 1e3;
|
|
2290
2600
|
function normalizeTickCount(targetCount) {
|
|
2291
2601
|
return Number.isFinite(targetCount) ? Math.min(MAX_TICK_COUNT, Math.max(1, Math.floor(targetCount))) : 5;
|
|
@@ -2429,10 +2739,10 @@ function bandScale(count, range, opts = {}) {
|
|
|
2429
2739
|
throw new RangeError("bandScale paddingOuter must be between 0 and 1");
|
|
2430
2740
|
if (opts.gapAfter?.some((gap) => !Number.isFinite(gap) || gap < 0))
|
|
2431
2741
|
throw new RangeError("bandScale gapAfter values must be finite and nonnegative");
|
|
2432
|
-
let
|
|
2742
|
+
let extent2 = r1 - r0, n = Math.max(1, count), extraGaps = Array.from(
|
|
2433
2743
|
{ length: n },
|
|
2434
2744
|
(_, i) => i < n - 1 ? Math.max(0, opts.gapAfter?.[i] ?? 0) : 0
|
|
2435
|
-
), extraGapTotal = extraGaps.reduce((sum, value) => sum + value, 0), stepSize =
|
|
2745
|
+
), extraGapTotal = extraGaps.reduce((sum, value) => sum + value, 0), stepSize = extent2 / (n - paddingInner + 2 * paddingOuter + extraGapTotal), rawBandwidth = stepSize * (1 - paddingInner), wholeBandwidth = Math.round(rawBandwidth), bandwidth = Math.abs(rawBandwidth - wholeBandwidth) < 1e-9 ? wholeBandwidth : rawBandwidth, start = r0 + stepSize * paddingOuter, offsets = [], extraBefore = 0;
|
|
2436
2746
|
for (let i = 0; i < n; i++)
|
|
2437
2747
|
offsets[i] = extraBefore, extraBefore += extraGaps[i];
|
|
2438
2748
|
return {
|
|
@@ -2458,19 +2768,19 @@ function tickFormatter(spec, ticks) {
|
|
|
2458
2768
|
for (; magnitude !== "none" && largest2 < MAGNITUDE_DIVISOR[magnitude]; ) magnitude = magnitude === "t" ? "bn" : magnitude === "bn" ? "m" : magnitude === "m" ? "k" : "none";
|
|
2459
2769
|
magnitude !== spec.magnitude && (spec = { ...spec, magnitude, ...magnitude === "none" ? { autoMagnitude: void 0, rollMagnitude: void 0 } : {} });
|
|
2460
2770
|
}
|
|
2461
|
-
let divisor = MAGNITUDE_DIVISOR[spec.magnitude], scaled = ticks.map((tick) => tick / divisor).filter((tick) => Number.isFinite(tick) && (spec.magnitude === "none" || Math.abs(tick) < 1e3)), cap = decimalCap(scaled, spec.decimals), largest = Math.max(0, maxOf(scaled.map((tick) => Math.abs(tick)))), noise = largest > 0 && largest < 1 ? largest : 1, tickSpec = { ...spec, autoMagnitude: void 0, wholeFrom: void 0, decimals: Math.max(0, maxOf(scaled.map((tick) => neededDecimals(tick, cap, noise, spec.decimals)))) }, finite = ticks.filter((tick) => Number.isFinite(tick)), distinct = () => new Set(finite.map((tick) => formatWithSpec(tick, tickSpec))).size === new Set(finite).size;
|
|
2771
|
+
let divisor = MAGNITUDE_DIVISOR[spec.magnitude], scaled = ticks.map((tick) => tick / divisor).filter((tick) => Number.isFinite(tick) && (spec.magnitude === "none" || Math.abs(tick) < 1e3)), cap = decimalCap(scaled, spec.decimals), largest = Math.max(0, maxOf(scaled.map((tick) => Math.abs(tick)))), noise = largest > 0 && largest < 1 ? largest : 1, tickSpec = { ...spec, ...spec.significantDigits === void 0 ? {} : { significantDigits: void 0 }, autoMagnitude: void 0, wholeFrom: void 0, decimals: Math.max(0, maxOf(scaled.map((tick) => neededDecimals(tick, cap, noise, spec.decimals)))) }, finite = ticks.filter((tick) => Number.isFinite(tick)), distinct = () => new Set(finite.map((tick) => formatWithSpec(tick, tickSpec))).size === new Set(finite).size;
|
|
2462
2772
|
for (; tickSpec.decimals < 20 && !distinct(); )
|
|
2463
2773
|
tickSpec.decimals++, tickSpec.decimals > AUTO_MAX_DECIMALS && (tickSpec.automatic = !1);
|
|
2464
2774
|
let scientific = finite.some((tick) => tick !== 0 && formatWithSpec(tick, tickSpec).includes("\xD7"));
|
|
2465
2775
|
return (value) => formatWithSpec(value, (spec.autoMagnitude || scientific) && value === 0 ? { ...tickSpec, magnitude: "none", decimals: 0 } : tickSpec);
|
|
2466
2776
|
}
|
|
2467
|
-
function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keepEnds = !1) {
|
|
2777
|
+
function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keepEnds = !1, keepTop = !1) {
|
|
2468
2778
|
if (ticks.length <= 2) return [...ticks];
|
|
2469
2779
|
let itemsFor = (values) => values.map((tick, index) => {
|
|
2470
|
-
let size = measure(format(tick), font), pos = scale(tick),
|
|
2780
|
+
let size = measure(format(tick), font), pos = scale(tick), extent2 = orient === "x" ? size.width : size.height, start = orient === "x" ? labelX(pos, size.width, index, values.length) : pos - size.height / 2, endpoint = index === 0 || index === values.length - 1;
|
|
2471
2781
|
return {
|
|
2472
2782
|
start,
|
|
2473
|
-
size:
|
|
2783
|
+
size: extent2,
|
|
2474
2784
|
priority: endpoint ? 2 : tick === 0 ? 1 : 0
|
|
2475
2785
|
};
|
|
2476
2786
|
});
|
|
@@ -2480,7 +2790,8 @@ function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keep
|
|
|
2480
2790
|
let baseStep = Math.abs(regular[1] - regular[0]), origin = regular[0] - Math.round(regular[0] / baseStep) * baseStep;
|
|
2481
2791
|
for (let stride = 1; stride <= regular.length; stride++) {
|
|
2482
2792
|
let kept = regular.filter((tick) => Math.abs((tick - origin) / (baseStep * stride) - Math.round((tick - origin) / (baseStep * stride))) < 1e-9);
|
|
2483
|
-
if (kept.length > 0 && sweepHide(itemsFor(kept), 2).every(Boolean))
|
|
2793
|
+
if (!(keepTop && kept.at(-1) !== regular.at(-1)) && kept.length > 0 && sweepHide(itemsFor(kept), 2).every(Boolean))
|
|
2794
|
+
return kept;
|
|
2484
2795
|
}
|
|
2485
2796
|
}
|
|
2486
2797
|
let keep = sweepHide(itemsFor(ticks), 2);
|
|
@@ -2562,12 +2873,12 @@ function withoutRepeatedAxisBreaks(geometry) {
|
|
|
2562
2873
|
}
|
|
2563
2874
|
}
|
|
2564
2875
|
function layoutValueAxis(input, occupied) {
|
|
2565
|
-
let { scale, plot, orient, theme, measure } = input, font = secondaryFont(theme), requestedTicks = input.ticks ?? scale.ticks(input.tickCount ?? 5), nodes = [], axis = { axis: orient === "y" ? "y" : "x", ticks: [] }, reserved = 0, seq = 0, formatTick = input.formatSpec ? tickFormatter(input.formatSpec, requestedTicks) : input.format, labelX = (pos, width, index, count) => {
|
|
2876
|
+
let { scale, plot, orient, theme, measure } = input, font = secondaryFont(theme), requestedTicks = input.ticks ?? scale.ticks(input.tickCount ?? 5), nodes = [], axis = { axis: orient === "y" ? "y" : "x", ticks: [] }, reserved = 0, seq = 0, formatTick = input.formatSpec ? tickFormatter(input.formatSpec, requestedTicks) : input.format, mirrored = requestedTicks.length > 1 && scale(requestedTicks[0]) > scale(requestedTicks[requestedTicks.length - 1]), labelX = (pos, width, index, count) => {
|
|
2566
2877
|
let centred = pos - width / 2;
|
|
2567
2878
|
if (!(count > 1 && (index === 0 || index === count - 1))) return centred;
|
|
2568
2879
|
let box = { x: centred, y: plot.y + plot.h + 6, w: width, h: font.size * (font.lineHeight ?? 1.2) };
|
|
2569
|
-
return centred >= 0 && centred + width <= (input.canvasWidth ?? 1 / 0) && occupied.hitsWhich(box, 0).length === 0 ? centred : tickLabelX(pos, width, index, count, !0);
|
|
2570
|
-
}, ticks = thinAxisTicks(requestedTicks, scale, orient, formatTick, font, measure, labelX, input.keepEndTicks === !0);
|
|
2880
|
+
return centred >= 0 && centred + width <= (input.canvasWidth ?? 1 / 0) && occupied.hitsWhich(box, 0).length === 0 ? centred : tickLabelX(pos, width, mirrored ? count - 1 - index : index, count, !0);
|
|
2881
|
+
}, ticks = thinAxisTicks(requestedTicks, scale, orient, formatTick, font, measure, labelX, input.keepEndTicks === !0, input.keepTopTick === !0);
|
|
2571
2882
|
for (let t of ticks) {
|
|
2572
2883
|
let pos = scale(t), text = formatTick(t), tsize = measure(text, font), gridId = input.gridlines && t !== 0 ? `axis:${orient}:grid:${seq}` : void 0;
|
|
2573
2884
|
if (orient === "y") {
|
|
@@ -2772,11 +3083,19 @@ function estimatedPlotAdvice(result, options) {
|
|
|
2772
3083
|
result.warnings = result.warnings.map((w) => w === warning ? {
|
|
2773
3084
|
...rest,
|
|
2774
3085
|
message: `${rest.message.replace(/; (?:the chart needs|the estimated height is) .*$/, "")}; the estimated height is ${height} px; use measure for the exact verified size`,
|
|
2775
|
-
suggest: "Use measure for the exact verified size, or leave options.size.height out."
|
|
2776
|
-
fix: [{ op: "replace", path: "/options/size", value: { width: result.size.width, height } }]
|
|
3086
|
+
suggest: "Use measure for the exact verified size, or leave options.size.height out."
|
|
2777
3087
|
} : w);
|
|
2778
3088
|
}
|
|
2779
|
-
var registry = /* @__PURE__ */ new Map(), aliasIndex = /* @__PURE__ */ new Map(),
|
|
3089
|
+
var registry = /* @__PURE__ */ new Map(), aliasIndex = /* @__PURE__ */ new Map(), registryWaiting = /* @__PURE__ */ new Set(), registryRevision = 0;
|
|
3090
|
+
function onChartRegistered(redraw) {
|
|
3091
|
+
return registryWaiting.add(redraw), () => {
|
|
3092
|
+
registryWaiting.delete(redraw);
|
|
3093
|
+
};
|
|
3094
|
+
}
|
|
3095
|
+
function chartRegistryRevision() {
|
|
3096
|
+
return registryRevision;
|
|
3097
|
+
}
|
|
3098
|
+
var COLORBLIND_IN_LAYOUT = /* @__PURE__ */ new Set(["bar", "dimswitch", "heatmap", "kpi", "status", "table", "variance"]), schemaIndex = /* @__PURE__ */ new Map(), schemaAliasIndex = /* @__PURE__ */ new Map();
|
|
2780
3099
|
function isDefinition(chart) {
|
|
2781
3100
|
return typeof chart.normalize == "function" && chart.dataSchema !== void 0 && chart.optionsSchema !== void 0;
|
|
2782
3101
|
}
|
|
@@ -2808,7 +3127,7 @@ function registerChart(def) {
|
|
|
2808
3127
|
let target = authored?.target ?? DEFAULT_TARGET, removedNames = authored?.[REMOVED_NAMES] ?? removedNameWarnings(authored), textScale = textScaleOf(authored), textSize = textSizeOf(authored), theme = resolveTargetTheme(authored?.theme, target, textScale, textSize), ref = authored?.theme, localized = withNumberMarks(withLocaleStrings(footnoteSwitch(resolveCanvasOptions({
|
|
2809
3128
|
...authored,
|
|
2810
3129
|
target,
|
|
2811
|
-
theme: { preset: typeof ref == "string" ? ref : ref?.preset ??
|
|
3130
|
+
theme: { preset: typeof ref == "string" ? ref : ref?.preset ?? DEFAULT_PRESET, overrides: theme }
|
|
2812
3131
|
})))), prepared = def.defaultStrings ? withChartDefaultStrings(localized, def.defaultStrings(localized)) : localized;
|
|
2813
3132
|
def.type === "grid" && (data = inheritGridTarget(data, target, textScale, textSize)), def.categoryLabels && (data = withCalendarLabels(data, authored?.locale?.language, def.categoryLabels));
|
|
2814
3133
|
let origins = /* @__PURE__ */ new WeakMap(), legendLayout = prepareLegendLayout(def, data, origins), noteLayouts = /* @__PURE__ */ new WeakMap(), noteRuns = [], layoutBody = ((options) => {
|
|
@@ -2858,7 +3177,7 @@ function registerChart(def) {
|
|
|
2858
3177
|
let noteKey = JSON.stringify([...noted]), noteRun = variants.get(noteKey);
|
|
2859
3178
|
noteRun || (noteRun = prepareLegendLayout(def, data, origins), variants.set(noteKey, noteRun), noteRuns.push(noteRun)), next = noteRun(noteOptions);
|
|
2860
3179
|
}
|
|
2861
|
-
let
|
|
3180
|
+
let moved2 = !staticFrame.pinned && (geo2.mode === "compact" || !resolved.fixed.height) && next.refused && next.warnings[0]?.code === "size-below-floor" ? withNoteInA11y(noteOptions) : void 0, movedLine = moved2 ? hiddenNoteLine(noteOptions) : void 0, inA11y = moved2 && movedLine ? { ...moved2, footnotes: authoredNotes(moved2).filter((note) => note !== movedLine) } : moved2;
|
|
2862
3181
|
if (inA11y) {
|
|
2863
3182
|
let quiet = layoutWithLegendPolicy(def, data, inA11y);
|
|
2864
3183
|
quiet.refused || (next = quiet);
|
|
@@ -2876,7 +3195,7 @@ function registerChart(def) {
|
|
|
2876
3195
|
return { geo: geo2, noteRefused: !1 };
|
|
2877
3196
|
}, sClassMinimum = (minimum, size) => {
|
|
2878
3197
|
if (nested || isWidthProbe(def.type, options) || minimum.aspect !== "content" || size.width < 720 || minimum.minWidth >= 720) return minimum;
|
|
2879
|
-
let at = Math.ceil(minimum.minWidth), probe;
|
|
3198
|
+
let at = Math.max(Math.ceil(minimum.minWidth), CARD_MIN_WIDTH), probe;
|
|
2880
3199
|
try {
|
|
2881
3200
|
probe = legendLayout(withoutForcedCompact({
|
|
2882
3201
|
...layoutOptions,
|
|
@@ -2888,7 +3207,7 @@ function registerChart(def) {
|
|
|
2888
3207
|
if (error instanceof NormalizeError) return minimum;
|
|
2889
3208
|
throw error;
|
|
2890
3209
|
}
|
|
2891
|
-
return probe.refused
|
|
3210
|
+
return (probe.refused ? probe.warnings[0]?.code === "size-below-floor" : at > minimum.minWidth) && probe.sizing && probe.sizing.minWidth > minimum.minWidth ? { ...minimum, minWidth: Math.min(720, probe.sizing.minWidth) } : minimum;
|
|
2892
3211
|
}, geo = named(layoutOptions).geo;
|
|
2893
3212
|
if (geo.refused) {
|
|
2894
3213
|
if (densityFixed || isWidthProbe(def.type, options) || options[FIXED_SIZE_PROBE] === !0 || compactReplacesRefusal(def, options, data)) return geo;
|
|
@@ -2968,14 +3287,14 @@ function registerChart(def) {
|
|
|
2968
3287
|
severity: "warn",
|
|
2969
3288
|
message: `${truncated.length} placed label(s) omit text; the reading lists their full text in labelsTruncated`,
|
|
2970
3289
|
suggest: "give the labels more room or shorten their text"
|
|
2971
|
-
}), pushAll(geo.warnings, unmatchedIdWarnings(geo, data, options?.highlight, pins, nested)), geo.presentation = presentationInfo(geo, target, panelTypeClass(options), textScale), pushAll(geo.warnings, removedNames), geo;
|
|
3290
|
+
}), pushAll(geo.warnings, unmatchedIdWarnings(geo, data, def.type === "sankey" ? void 0 : options?.highlight, pins, nested)), geo.presentation = presentationInfo(geo, target, panelTypeClass(options), textScale), pushAll(geo.warnings, removedNames), geo;
|
|
2972
3291
|
}), layout2 = ((options) => withSmallValues(prepared.smallValues, () => layoutBody(options)));
|
|
2973
3292
|
return layout2.finish = () => {
|
|
2974
3293
|
legendLayout.finish();
|
|
2975
3294
|
for (let run of noteRuns) run.finish();
|
|
2976
3295
|
noteRuns.length = 0, noteLayouts = /* @__PURE__ */ new WeakMap();
|
|
2977
3296
|
}, layout2;
|
|
2978
|
-
},
|
|
3297
|
+
}, widerForNames = (full, options, layoutOnce) => {
|
|
2979
3298
|
if (options?.[FIXED_SIZE_PROBE]) return;
|
|
2980
3299
|
let height = options?.size?.height === void 0 ? void 0 : full.size.height, width = full.size.width;
|
|
2981
3300
|
for (let step = 0; step < 3; step++) {
|
|
@@ -2994,12 +3313,12 @@ function registerChart(def) {
|
|
|
2994
3313
|
new Map(lost.map((label) => [label.id, label.text]))
|
|
2995
3314
|
);
|
|
2996
3315
|
}, layoutFitted = (data, options, layoutOnce) => {
|
|
2997
|
-
let full = layoutOnce(options)
|
|
2998
|
-
if (def.namesMustPrint === !0 && !full.refused && full.mode !== "compact" &&
|
|
3316
|
+
let full = layoutOnce(options);
|
|
3317
|
+
if (def.namesMustPrint === !0 && !full.refused && full.mode !== "compact" && lostCategoryNames(full).length > 0) {
|
|
2999
3318
|
let compact2 = compactFallbackApplies(def, options, data) ? layoutOnce({ ...options, [FORCE_COMPACT]: !0 }) : full;
|
|
3000
|
-
if (compact2 !== full && !isRefused(compact2) &&
|
|
3319
|
+
if (compact2 !== full && !isRefused(compact2) && lostCategoryNames(compact2).length === 0) return compact2;
|
|
3001
3320
|
let wider = widerForNames(full, options, layoutOnce);
|
|
3002
|
-
return wider || hiddenLabelCollision(def.title, full, new Map(
|
|
3321
|
+
return wider || hiddenLabelCollision(def.title, full, new Map(lostCategoryNames(full).map((label) => [label.id, label.text])));
|
|
3003
3322
|
}
|
|
3004
3323
|
if (!full.refused || full.warnings[0]?.code !== "size-below-floor") return full;
|
|
3005
3324
|
if (staticFrame.pinned && staticFrame.countable && options?.notes?.maxListed !== 0) {
|
|
@@ -3076,12 +3395,16 @@ function registerChart(def) {
|
|
|
3076
3395
|
let options = withDefaultTarget(authored);
|
|
3077
3396
|
return withLayoutMemo(() => {
|
|
3078
3397
|
let withCuts = (data2, options2) => withCutLabelNotes(data2, options2 ?? {}, (next) => layout(data2, next)), geo = loadedDeferred("footer")?.(withCuts, data, options, def.type) ?? withCuts(data, options);
|
|
3079
|
-
|
|
3398
|
+
geo = verifiedDensityRefusal(geo, def.title, options ?? {}, (size) => layoutWithFooter(data, { ...authored, size, [ACCEPTANCE_PROBE]: !0 })), geo.refused || (finishCutLabelNotes(geo), reportLabelOmissions(geo, options, data)), !options[FULL_LAYOUT_PROBE] && !options[ACCEPTANCE_PROBE] && estimatedPlotAdvice(geo, options), !geo.refused && options.colorblindSafe === !0 && !COLORBLIND_IN_LAYOUT.has(def.type) && (geo.scene = colorblindRoles(geo.scene).value, geo.labels = colorblindRoles(geo.labels).value, geo.legend && (geo.legend = colorblindRoles(geo.legend).value), geo.annotations = colorblindRoles(geo.annotations).value), geo.warnings.some((warning) => warning.fix) && (geo.warnings = geo.warnings.map((warning) => warning.fix ? { ...warning, fix: addWhereAbsent({ data, options: authored }, warning.fix) } : warning));
|
|
3399
|
+
let description = options?.a11y?.description;
|
|
3400
|
+
return description !== void 0 && !geo.refused && (geo.a11y.desc = description, geo.story && (geo.story.desc = description)), geo;
|
|
3080
3401
|
});
|
|
3081
3402
|
};
|
|
3082
3403
|
registry.set(def.type, { ...def, sizing, layout: layoutWithFooter, [LAYOUT_CALL]: createLayout });
|
|
3083
3404
|
for (let alias of aliases)
|
|
3084
3405
|
aliasIndex.set(alias, def.type);
|
|
3406
|
+
registryRevision += 1;
|
|
3407
|
+
for (let redraw of registryWaiting) redraw();
|
|
3085
3408
|
}
|
|
3086
3409
|
function verifiedDensityRefusal(geo, title, options, at) {
|
|
3087
3410
|
let refusal = geo.warnings[0];
|
|
@@ -3189,7 +3512,11 @@ function noPlottedValuesWarning(data) {
|
|
|
3189
3512
|
suggest: "supply the values, or leave the chart out until the data exists"
|
|
3190
3513
|
};
|
|
3191
3514
|
}
|
|
3515
|
+
function chartInputName(name) {
|
|
3516
|
+
return registry.has(name) || aliasIndex.has(name) || schemaIndex.has(name) || schemaAliasIndex.has(name) ? name : caseInsensitiveValue(name, [...registry.keys(), ...aliasIndex.keys(), ...schemaIndex.keys(), ...schemaAliasIndex.keys()]);
|
|
3517
|
+
}
|
|
3192
3518
|
function getChart(typeOrAlias) {
|
|
3519
|
+
typeOrAlias = chartInputName(typeOrAlias) ?? typeOrAlias;
|
|
3193
3520
|
let chart = registry.get(typeOrAlias) ?? registry.get(aliasIndex.get(typeOrAlias) ?? ""), defaults = chart?.aliasDefaults?.[typeOrAlias];
|
|
3194
3521
|
return !chart || !defaults ? chart : {
|
|
3195
3522
|
...chart,
|
|
@@ -3214,6 +3541,7 @@ function registerChartSchemas(schemas, aliases = []) {
|
|
|
3214
3541
|
}
|
|
3215
3542
|
}
|
|
3216
3543
|
function getChartSchemas(typeOrAlias) {
|
|
3544
|
+
typeOrAlias = chartInputName(typeOrAlias) ?? typeOrAlias;
|
|
3217
3545
|
let chart = getChart(typeOrAlias);
|
|
3218
3546
|
return chart && isDefinition(chart) ? chart : schemaIndex.get(typeOrAlias) ?? schemaIndex.get(schemaAliasIndex.get(typeOrAlias) ?? "");
|
|
3219
3547
|
}
|
|
@@ -3253,7 +3581,12 @@ var unsupported = [
|
|
|
3253
3581
|
export {
|
|
3254
3582
|
themeGeometryTokens,
|
|
3255
3583
|
presentationInfo,
|
|
3584
|
+
caseInsensitiveValue,
|
|
3585
|
+
inputConversion,
|
|
3586
|
+
replaceInputValue,
|
|
3256
3587
|
crowdedTailCut,
|
|
3588
|
+
COMBO_LIMIT,
|
|
3589
|
+
checkPointBudget,
|
|
3257
3590
|
typeDocLints,
|
|
3258
3591
|
themeForDensity,
|
|
3259
3592
|
AUTO_LEGEND,
|
|
@@ -3268,6 +3601,8 @@ export {
|
|
|
3268
3601
|
MONTH_START,
|
|
3269
3602
|
isDateNumericTickSequence,
|
|
3270
3603
|
applyAxisBounds,
|
|
3604
|
+
shownTickStep,
|
|
3605
|
+
applyTickStep,
|
|
3271
3606
|
niceStep,
|
|
3272
3607
|
niceDomain,
|
|
3273
3608
|
axisGrid,
|
|
@@ -3296,7 +3631,10 @@ export {
|
|
|
3296
3631
|
measureValueAxisWidth,
|
|
3297
3632
|
withCalendarLabels,
|
|
3298
3633
|
noteName,
|
|
3634
|
+
onChartRegistered,
|
|
3635
|
+
chartRegistryRevision,
|
|
3299
3636
|
registerChart,
|
|
3637
|
+
chartInputName,
|
|
3300
3638
|
getChart,
|
|
3301
3639
|
getChartDefinition,
|
|
3302
3640
|
registerChartSchemas,
|
|
@@ -3312,9 +3650,10 @@ export {
|
|
|
3312
3650
|
dayUnit,
|
|
3313
3651
|
calendarCategories,
|
|
3314
3652
|
calendarNames,
|
|
3315
|
-
|
|
3653
|
+
authoredDateTicks,
|
|
3316
3654
|
dayCategories,
|
|
3317
3655
|
longDayMonths,
|
|
3656
|
+
CROWDED_NAMES,
|
|
3318
3657
|
CATEGORY_ROW_FROM_END,
|
|
3319
3658
|
CATEGORY_ROW_VERTICAL,
|
|
3320
3659
|
yearRowRequests,
|
|
@@ -3329,6 +3668,10 @@ export {
|
|
|
3329
3668
|
rotatedClaimRect,
|
|
3330
3669
|
rotatedLeftOverhang,
|
|
3331
3670
|
verticalNameRect,
|
|
3671
|
+
tallestContentHeight,
|
|
3672
|
+
rowDrivenHeight,
|
|
3673
|
+
fixedHeightCanvas,
|
|
3674
|
+
spareShare,
|
|
3332
3675
|
CARD_MIN_WIDTH,
|
|
3333
3676
|
CARD_CLASS_WIDTH,
|
|
3334
3677
|
SIZE_TOLERANCE,
|