boardplot 0.54.0 → 0.56.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 +491 -0
- package/README.md +4 -4
- package/dist/{ReaderBox-YXC5XK7D.js → ReaderBox-GLCKYXBU.js} +14 -10
- package/dist/{annotateEngine-5O3IRSQL.js → annotateEngine-QVNAE3EH.js} +3 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-MT4MP3UZ.js → chunk-27OIGDRK.js} +1 -1
- package/dist/{chunk-OD3IH6FG.js → chunk-2DOEZ5QY.js} +39 -21
- package/dist/{chunk-WUKSZNHL.js → chunk-2FKEF2AC.js} +32 -21
- package/dist/{chunk-GYNZ72GO.js → chunk-2HTYGMMG.js} +2 -2
- package/dist/chunk-2NN676RI.js +25 -0
- package/dist/{chunk-4MREJWRM.js → chunk-2NRHD2G7.js} +5 -4
- package/dist/{chunk-3UBTO342.js → chunk-2NSQIPAA.js} +77 -38
- package/dist/{chunk-T7ZCYYQZ.js → chunk-2YO4WRJN.js} +25 -7
- package/dist/{chunk-SHH2AHIU.js → chunk-32LLDRPI.js} +64 -42
- package/dist/{chunk-WEPAE4KG.js → chunk-3465633G.js} +4 -4
- package/dist/{chunk-WGIO6AHP.js → chunk-37PKNVLS.js} +3 -3
- package/dist/chunk-3V62N3Z7.js +24 -0
- package/dist/{chunk-S6CRZKPO.js → chunk-43GGVT7W.js} +5 -5
- package/dist/{chunk-VDAZPGR2.js → chunk-4DZFR52I.js} +2 -2
- package/dist/{chunk-WDONXBQE.js → chunk-4JC3SE4G.js} +1 -1
- package/dist/{chunk-EHVESNLV.js → chunk-4JGBCBDZ.js} +1 -1
- package/dist/{chunk-G6XCUX3I.js → chunk-4JHMCXOB.js} +60 -13
- package/dist/{chunk-GGO43PHB.js → chunk-4KMZAK6J.js} +6 -5
- package/dist/{chunk-GVKFFJ23.js → chunk-4KQHKPB3.js} +462 -149
- package/dist/{chunk-AHQ4L3BE.js → chunk-4LTN7SND.js} +2 -2
- package/dist/{chunk-MZJBPDIL.js → chunk-52WNCUIN.js} +1 -1
- package/dist/{chunk-JAKRPSWP.js → chunk-54ROMBU7.js} +164 -51
- package/dist/{chunk-OZUTYDV4.js → chunk-5DTCOOLU.js} +2 -2
- package/dist/{chunk-DDI2W4TR.js → chunk-5P2TTHBZ.js} +3 -3
- package/dist/{chunk-U2HQELXL.js → chunk-5PPQIF4D.js} +2 -2
- package/dist/{chunk-K4K6KGEF.js → chunk-5S3JQ5AT.js} +241 -195
- package/dist/chunk-5TWY3ZIC.js +19 -0
- package/dist/{chunk-BXEM2CVW.js → chunk-6364WO5D.js} +3 -3
- package/dist/{chunk-ZNHF2XCP.js → chunk-63Y3ROZ7.js} +50 -36
- package/dist/{chunk-VAEC53B3.js → chunk-64LJDGJH.js} +3 -3
- package/dist/{chunk-WZBMTZBM.js → chunk-67QSW5RW.js} +4 -4
- package/dist/{chunk-HGGLJYPZ.js → chunk-6AMN7IKJ.js} +89 -57
- package/dist/{chunk-24BHMKDD.js → chunk-6EYTD777.js} +25 -2
- package/dist/{chunk-HZG5NB7Q.js → chunk-6MJUW5R5.js} +159 -86
- package/dist/{chunk-NGRIT3CY.js → chunk-6QDMRPXI.js} +113 -128
- package/dist/{chunk-HZZH3MQI.js → chunk-6WHWXCHJ.js} +7 -3
- package/dist/{chunk-T3PNYRDM.js → chunk-75WIUG2W.js} +394 -141
- package/dist/{chunk-ZTH6YSVA.js → chunk-76Q7E3TM.js} +117 -102
- 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-CPKHL7FK.js → chunk-7KSUMFBK.js} +1 -1
- package/dist/{chunk-KL2XJQAA.js → chunk-7M2GK7XQ.js} +1729 -196
- package/dist/{chunk-RZB4RPPD.js → chunk-7PPMT5EJ.js} +155 -151
- package/dist/{chunk-JFBEAUJ6.js → chunk-7Q37C6GZ.js} +1 -1
- package/dist/chunk-7STMIK2X.js +94 -0
- package/dist/{chunk-KFWEO4UA.js → chunk-7VMEM3LN.js} +254 -142
- package/dist/{chunk-GSMWHKOW.js → chunk-7VVHTOE7.js} +7 -7
- package/dist/{chunk-KBFPMESI.js → chunk-A2GAWGVJ.js} +246 -79
- package/dist/{chunk-23RWLBZF.js → chunk-AGDDH6XY.js} +3 -3
- package/dist/chunk-AMR4SUAN.js +25 -0
- package/dist/{chunk-6I7YZTY7.js → chunk-BDGLMWPO.js} +12 -4
- package/dist/{chunk-JJJ2KAHR.js → chunk-BIGQKCU7.js} +20 -9
- package/dist/{chunk-LTMF75MR.js → chunk-BISJK67O.js} +208 -62
- package/dist/{chunk-FILDYFT4.js → chunk-BIVL764T.js} +2 -2
- package/dist/{chunk-RNOJSEES.js → chunk-BK6P6KMW.js} +1 -1
- package/dist/{chunk-XB4KZ6WO.js → chunk-BSATR6ZO.js} +40 -13
- package/dist/{chunk-MYCLO35J.js → chunk-BTDGWHGJ.js} +50 -12
- package/dist/{chunk-PDG4IM3L.js → chunk-BVYIKLQ5.js} +1 -1
- package/dist/{chunk-TNHD4UTC.js → chunk-BYCJ6TKI.js} +13 -3
- package/dist/{chunk-NQSDIDRO.js → chunk-CAJ54IEP.js} +5 -5
- package/dist/{chunk-E42JZ2DA.js → chunk-CB4CERXZ.js} +4 -5
- package/dist/{chunk-ENOCOA3F.js → chunk-CCDXK5NA.js} +5 -5
- package/dist/{chunk-7X3UZM7F.js → chunk-CCJP6QZO.js} +1 -1
- package/dist/{chunk-ELPQZIGR.js → chunk-CF4NMRN7.js} +37 -13
- package/dist/{chunk-32X7JGH3.js → chunk-CHAS5A5B.js} +89 -69
- package/dist/{chunk-AVMKRVNP.js → chunk-CKGSGRP7.js} +14 -24
- package/dist/{chunk-3EZRM4YM.js → chunk-CPGASWNN.js} +25 -1
- package/dist/{chunk-BWTX7LUG.js → chunk-CXETOLPX.js} +9 -4
- package/dist/{chunk-D3D7XHBI.js → chunk-CYKXROFG.js} +6 -6
- package/dist/{chunk-DRTA6JG5.js → chunk-D2B3KP35.js} +26 -15
- package/dist/{chunk-TSPWXAAI.js → chunk-DD6RVD3S.js} +6 -7
- package/dist/{chunk-A5TY7H5T.js → chunk-DF3XEFQ7.js} +159 -53
- package/dist/{chunk-P52JHUUM.js → chunk-DLDDRXAI.js} +198 -88
- package/dist/{chunk-XNA6DATU.js → chunk-DLUNQHFO.js} +99 -56
- package/dist/{chunk-2THWIKRB.js → chunk-DMAMWUYY.js} +33 -16
- package/dist/chunk-DQ7YMQVX.js +26 -0
- package/dist/{chunk-4WK3CNW5.js → chunk-DRHQG44U.js} +11 -0
- package/dist/{chunk-WZGJSQKN.js → chunk-DZ3S4RPI.js} +15 -1
- package/dist/chunk-E2ZUBP4Q.js +24 -0
- package/dist/{chunk-G63ROSY5.js → chunk-E555EDOQ.js} +139 -72
- package/dist/{chunk-A7IEVBYI.js → chunk-E76U5H52.js} +1 -5
- package/dist/{chunk-J2ROMB7J.js → chunk-E7V3OHQQ.js} +64 -26
- package/dist/chunk-EBB4PYBN.js +24 -0
- package/dist/{chunk-FPPN5NAR.js → chunk-ECBUFKCP.js} +3 -3
- package/dist/{chunk-5PCCSSII.js → chunk-EGGDPDYJ.js} +1 -1
- package/dist/{chunk-F7X53SZM.js → chunk-EIL3KHAL.js} +12 -7
- package/dist/{chunk-MBVXROCI.js → chunk-EMFUZKYK.js} +20 -3
- package/dist/{chunk-TNNK4IIY.js → chunk-ETMHDCEH.js} +13 -12
- package/dist/{chunk-WMZCOGD6.js → chunk-EZZ533MH.js} +1 -1
- package/dist/{chunk-GEBGBJBD.js → chunk-F2EVCJ4U.js} +41 -34
- package/dist/{chunk-2IXDYW6O.js → chunk-F5BYLT3M.js} +195 -57
- package/dist/{chunk-NRHTC2SQ.js → chunk-F6OLHND5.js} +2 -2
- package/dist/{chunk-3FNY7ZCG.js → chunk-F77TMAUY.js} +141 -79
- package/dist/{chunk-QQNPU27R.js → chunk-FCECYJVA.js} +1 -1
- package/dist/{chunk-RGZGLKFB.js → chunk-FFJGC2DX.js} +418 -62
- package/dist/chunk-FG5L2LUK.js +89 -0
- package/dist/chunk-FMDNJ6PC.js +47 -0
- package/dist/{chunk-4WQ2MBE7.js → chunk-FNMH5WEY.js} +1 -1
- package/dist/{chunk-F35DA442.js → chunk-FNRPQIQE.js} +46 -27
- package/dist/{chunk-7EVIIADO.js → chunk-GC4WOLV3.js} +3 -1
- package/dist/{chunk-JB4YPOMT.js → chunk-GELSK76Y.js} +6 -7
- package/dist/{chunk-5SJQOPL7.js → chunk-GIHH6VC2.js} +4 -4
- package/dist/chunk-GLQ3KCTY.js +24 -0
- package/dist/{chunk-HHS6333D.js → chunk-GM3EGUYW.js} +2 -2
- package/dist/{chunk-PBYUJSEY.js → chunk-GQT2SY2S.js} +66 -43
- package/dist/{chunk-BUPLB3EX.js → chunk-H3IBJQ5A.js} +6 -2
- package/dist/{chunk-K4RCWNLC.js → chunk-HHXIVFAU.js} +11 -8
- package/dist/{chunk-B3F4TS3V.js → chunk-HJRNBKIT.js} +768 -69
- package/dist/chunk-HOU2MZHC.js +61 -0
- package/dist/{chunk-S4QSJAGY.js → chunk-HZUAEMN5.js} +1 -1
- package/dist/chunk-I7H5DU34.js +132 -0
- package/dist/{chunk-YS56RSTZ.js → chunk-IFQN4GKK.js} +161 -69
- package/dist/chunk-IGJ2G5C6.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-INHDHZNP.js +8 -0
- package/dist/chunk-IRXVV65V.js +24 -0
- package/dist/{chunk-IDDA5INB.js → chunk-IVRYF7QA.js} +7 -4
- package/dist/{chunk-3RMTPAEJ.js → chunk-JCAGVAB3.js} +810 -73
- package/dist/{chunk-OMVYFSOM.js → chunk-JCIXYOND.js} +2 -2
- package/dist/{chunk-6TJDWMZV.js → chunk-JEUL777U.js} +83 -9
- package/dist/{chunk-J33RA3YO.js → chunk-JFFREZGT.js} +5 -5
- package/dist/{chunk-AJHYXD5U.js → chunk-JGFHNAHS.js} +2 -2
- package/dist/chunk-JHWYG7V5.js +24 -0
- package/dist/{chunk-EP54VZI5.js → chunk-JIEVDGAF.js} +1 -1
- package/dist/{chunk-IDT7DJ7F.js → chunk-JKOEHRGV.js} +1 -1
- package/dist/chunk-JMGB444D.js +26 -0
- package/dist/{chunk-DSZUV3TM.js → chunk-JTC5SEAQ.js} +3 -3
- package/dist/chunk-JTFKRDDA.js +53 -0
- package/dist/{chunk-RKITD2UJ.js → chunk-JVZTKQFS.js} +6 -3
- package/dist/{chunk-BBL3R5YZ.js → chunk-JXBZIJCG.js} +1 -1
- package/dist/{chunk-WLZ54FWG.js → chunk-JYAZPMSA.js} +70 -1
- package/dist/chunk-K3VZ5QJK.js +19 -0
- package/dist/{chunk-EYLWVI26.js → chunk-KBJMLXNW.js} +165 -124
- package/dist/{chunk-KAQH75T6.js → chunk-KD5GOR2K.js} +82 -48
- package/dist/{chunk-LNKY5Z2X.js → chunk-KDSYZLF6.js} +2 -3
- package/dist/{chunk-7NWFKHSG.js → chunk-KF7HD3EH.js} +116 -42
- package/dist/{chunk-V7RAPZHX.js → chunk-KLB2QC24.js} +3 -3
- package/dist/chunk-KLIZXSBK.js +24 -0
- package/dist/{chunk-HDZGZJKR.js → chunk-KQCKK3LD.js} +100 -36
- package/dist/{chunk-4TPHMIE5.js → chunk-KTHFHD6C.js} +4 -2
- package/dist/{chunk-IYEFEBRN.js → chunk-KZJ5VM6E.js} +14 -3
- package/dist/{chunk-MEG4NMSI.js → chunk-L6YVK6VC.js} +2 -2
- package/dist/chunk-LGNJCPFP.js +28 -0
- package/dist/{chunk-7JQAUJOL.js → chunk-LKMFMNQX.js} +1 -1
- package/dist/{chunk-QY5ZKUWY.js → chunk-MAFPVR4G.js} +9 -3
- package/dist/{chunk-QR35TD2B.js → chunk-MD6DCQMA.js} +37 -37
- package/dist/{chunk-AA4U62G6.js → chunk-MJPXHCBW.js} +4 -4
- package/dist/{chunk-LYVOL4TQ.js → chunk-MOK3ZS6P.js} +2 -1
- package/dist/{chunk-MKVV7GVJ.js → chunk-MOS6WFWM.js} +13 -7
- package/dist/{chunk-2DR5MMDY.js → chunk-MPO5TVGF.js} +12 -6
- package/dist/{chunk-OU5K2JPF.js → chunk-MRAP2UVV.js} +102 -32
- package/dist/chunk-MS7O3KDJ.js +24 -0
- package/dist/{chunk-53OYF4ZT.js → chunk-MSYTF3DZ.js} +26 -11
- package/dist/{chunk-5A6MO4AR.js → chunk-MZACASZY.js} +7 -4
- package/dist/{chunk-H4H4O62O.js → chunk-N5HN5QGH.js} +1 -1
- package/dist/chunk-NCLRZQR6.js +211 -0
- package/dist/{chunk-C54QLNE4.js → chunk-NGA7ICG4.js} +1 -1
- package/dist/{chunk-SFQ5ADIG.js → chunk-NHC2ADGI.js} +315 -151
- package/dist/chunk-NMTWUYUF.js +30 -0
- package/dist/chunk-O36WX56O.js +13 -0
- package/dist/{chunk-FV32N6AF.js → chunk-O6ZTIDWB.js} +6 -4
- package/dist/{chunk-6BJQULXR.js → chunk-O7REHICC.js} +85 -39
- package/dist/{chunk-4FFCIQDG.js → chunk-OG2YUVBW.js} +4 -1
- package/dist/{chunk-CICWSCLC.js → chunk-OJ5CQV7H.js} +146 -69
- package/dist/{chunk-ULTSSIOU.js → chunk-OQQMDSCC.js} +1 -1
- package/dist/{chunk-PJWLKCFX.js → chunk-P4SMC4BY.js} +98 -90
- package/dist/{chunk-JEYJRJ7M.js → chunk-PJBEJR2U.js} +5 -4
- package/dist/{chunk-AZIRTSVP.js → chunk-PQLAZEQV.js} +122 -52
- package/dist/chunk-PZ46S2SY.js +69 -0
- package/dist/chunk-QB5HV4IY.js +24 -0
- package/dist/{chunk-IM4WUIR7.js → chunk-QGFKSDQO.js} +2 -2
- package/dist/chunk-QJWLNP64.js +24 -0
- package/dist/chunk-QLANK3VN.js +24 -0
- package/dist/chunk-QSMGZOT5.js +24 -0
- package/dist/{chunk-UYNAL3Y3.js → chunk-QWCLWFKC.js} +142 -68
- package/dist/chunk-QZIHKQRH.js +26 -0
- package/dist/{chunk-SZCPKGYG.js → chunk-R2IKOLBK.js} +3 -3
- package/dist/{chunk-BRPOSOK5.js → chunk-R5MEBBAA.js} +144 -71
- package/dist/{chunk-47BO6MYI.js → chunk-RJGCYGC3.js} +137 -70
- package/dist/chunk-RLMC5CUP.js +24 -0
- package/dist/{chunk-6NLH6TEP.js → chunk-RMC4OONA.js} +331 -143
- package/dist/{chunk-26P4WRQC.js → chunk-RPIKNMZA.js} +6 -3
- package/dist/{chunk-YF2PYLC4.js → chunk-RSCRIWAH.js} +1 -1
- package/dist/{chunk-DHWCFQNO.js → chunk-RT66UTLJ.js} +4 -18
- package/dist/{chunk-DAVHGK27.js → chunk-S7NRL66K.js} +46 -23
- package/dist/{chunk-VABRPZVC.js → chunk-SA46CNMS.js} +5 -1
- package/dist/chunk-SE7MJ2LQ.js +24 -0
- package/dist/{chunk-L7RHB734.js → chunk-SGDWLXUC.js} +1 -1
- package/dist/{chunk-E64MTTBC.js → chunk-SMHZXHHD.js} +45 -14
- package/dist/{chunk-AG2CJ4JY.js → chunk-SNQ7D5R7.js} +18 -1
- package/dist/{chunk-3V7AA3IZ.js → chunk-SPSGUFTI.js} +11 -3
- package/dist/{chunk-I2E3YDNZ.js → chunk-SRAV6FPB.js} +33 -9
- package/dist/chunk-SRUV7AT6.js +51 -0
- package/dist/{chunk-KJEZFOO6.js → chunk-SS4YGK3E.js} +91 -48
- package/dist/{chunk-WQ55QPEB.js → chunk-SXD3OYAR.js} +241 -118
- package/dist/{chunk-U7LLQ7XM.js → chunk-T2CYNDYU.js} +473 -109
- package/dist/{chunk-FMFCGYCE.js → chunk-T2YDWT54.js} +289 -300
- package/dist/{chunk-KORHKDJW.js → chunk-TE4M52AA.js} +2 -1
- package/dist/chunk-TUW5IYGA.js +24 -0
- package/dist/chunk-TXBO2LWM.js +25 -0
- package/dist/chunk-U3A6FMSI.js +28 -0
- package/dist/{chunk-EHDWWFNV.js → chunk-UBCVBBJJ.js} +3 -3
- package/dist/chunk-UPTXFTKH.js +25 -0
- package/dist/chunk-UREXN6WG.js +25 -0
- package/dist/chunk-UZLR25BW.js +24 -0
- package/dist/{chunk-JEL6665C.js → chunk-UZTQUPTB.js} +6 -6
- package/dist/{chunk-ISWU5YB3.js → chunk-V5JQQMFQ.js} +11 -5
- package/dist/chunk-V634AXDM.js +31 -0
- package/dist/{chunk-57ZGVAU3.js → chunk-V7F4F6JA.js} +39 -6
- package/dist/chunk-VJ7VBB6S.js +58 -0
- package/dist/{chunk-LVXOY5WL.js → chunk-VPL3JYC6.js} +6 -5
- package/dist/{chunk-VWYUUBBP.js → chunk-VVXKFU72.js} +83 -32
- package/dist/{chunk-XTGWCYAR.js → chunk-WBETBGSC.js} +430 -256
- package/dist/chunk-WI5VOSQX.js +125 -0
- package/dist/chunk-WIVFIVFZ.js +27 -0
- package/dist/{chunk-OURX73UJ.js → chunk-WN3HEU3P.js} +13 -11
- package/dist/{chunk-7EOLHBI6.js → chunk-WTQAG2OT.js} +81 -21
- package/dist/{chunk-G57ZO7DB.js → chunk-WWGPTEQB.js} +66 -26
- package/dist/{chunk-33PLBIMA.js → chunk-WXJ5MHLH.js} +3 -2
- package/dist/chunk-X23SZHV5.js +25 -0
- package/dist/{chunk-TKQKXBGC.js → chunk-X3KCQEYZ.js} +10 -8
- package/dist/chunk-X3YP4DUV.js +76 -0
- package/dist/chunk-XC5IRUEL.js +48 -0
- package/dist/{chunk-LFX7W4B7.js → chunk-XCROSJ2Z.js} +1 -1
- package/dist/{chunk-RK4S3VPS.js → chunk-XHRUXZD7.js} +3 -3
- package/dist/{chunk-S32YYDIB.js → chunk-XMP2DNLI.js} +4 -3
- package/dist/{chunk-C3O45JWU.js → chunk-XQMYQ4TN.js} +4 -4
- package/dist/{chunk-QKL7IY42.js → chunk-Y54LU4CU.js} +1 -1
- package/dist/chunk-YHD2FZFP.js +24 -0
- package/dist/{chunk-OMNQXHFF.js → chunk-YK2KWNTU.js} +31 -20
- package/dist/chunk-YMTXTQCN.js +24 -0
- package/dist/{chunk-SGD3ZHID.js → chunk-YOOHNQ3L.js} +15 -4
- package/dist/{chunk-JTJNQKPM.js → chunk-YPYD6OJ3.js} +2 -2
- package/dist/{chunk-3P4PJJND.js → chunk-YYJORENB.js} +6 -6
- package/dist/{chunk-NRF223FR.js → chunk-YZZLIYPA.js} +1 -1
- package/dist/{chunk-WJKVNRCR.js → chunk-Z55DXFWS.js} +18 -17
- package/dist/{chunk-UTQGZF37.js → chunk-ZEYBI47P.js} +1 -1
- package/dist/{chunk-WKWMOZNE.js → chunk-ZJFJ2IKQ.js} +226 -61
- package/dist/{chunk-QJ4WGAC6.js → chunk-ZKJ5L35C.js} +94 -21
- package/dist/{chunk-ZXOD37BE.js → chunk-ZL6IHMOW.js} +73 -39
- package/dist/chunk-ZMPH2OC4.js +24 -0
- package/dist/{chunk-EYZ6SLF3.js → chunk-ZVM5TFGR.js} +7 -7
- package/dist/chunk-ZWNRLIFT.js +24 -0
- package/dist/{chunk-VNLSTZES.js → chunk-ZY72LSQK.js} +314 -92
- package/dist/chunk-ZYQYX66L.js +24 -0
- package/dist/cli/index.js +3 -3
- package/dist/{core-MN45UFF4.js → core-3KLQSYWB.js} +3 -1
- package/dist/{core-DAFZ7YJW.js → core-4HFVG4CP.js} +2 -1
- package/dist/{core-34KIMTK6.js → core-4RR6VSXM.js} +2 -1
- package/dist/{core-7R3ARYNI.js → core-5UF44NDI.js} +5 -1
- package/dist/{core-3CWPIFAL.js → core-7S3XMW5O.js} +3 -1
- package/dist/{core-ONNGSKWQ.js → core-7Y5BZZON.js} +5 -1
- package/dist/{core-AEYGGH7X.js → core-A5AKUB7H.js} +4 -1
- package/dist/{core-YPH723Z7.js → core-AR2T32Y3.js} +8 -1
- package/dist/{core-CJZXX2V3.js → core-BBNY2BX4.js} +2 -1
- package/dist/{core-CJ7FFPDU.js → core-BLHEJ5OK.js} +5 -1
- package/dist/{core-KII4CH3W.js → core-BOG33BFD.js} +3 -1
- package/dist/{core-O2K4BDYH.js → core-DD62MWEW.js} +4 -1
- package/dist/{core-WJSKT5XM.js → core-DFZMOO7E.js} +5 -1
- package/dist/{core-QXIAQFHM.js → core-E2XOSHPR.js} +3 -1
- package/dist/{core-R27R6J5M.js → core-G3LXHW73.js} +3 -1
- package/dist/{core-V7I4F6JW.js → core-GLOZY6Z7.js} +5 -1
- package/dist/{core-KZK3WCUG.js → core-GSILPKUR.js} +3 -1
- package/dist/{core-GEUPUZUY.js → core-H5HO2CED.js} +3 -1
- package/dist/{core-W7AZNHOX.js → core-HDNWVLJW.js} +3 -1
- package/dist/{core-L7Y7YXWR.js → core-HTD5RHE7.js} +1 -1
- package/dist/{core-WHI4ABF2.js → core-ILPXXC2Z.js} +1 -1
- package/dist/{core-RGLOYY73.js → core-J2JD5ODO.js} +6 -1
- package/dist/{core-ASBJZZTP.js → core-JDFUZFRH.js} +2 -1
- package/dist/{core-XKV7GMPG.js → core-K3JX5WPM.js} +2 -1
- package/dist/{core-L5KTPXHC.js → core-LB5M7XL4.js} +3 -1
- package/dist/{core-KCORN7F7.js → core-LGJZUP6H.js} +3 -1
- package/dist/{core-DJPGSTXB.js → core-MU4ALRR7.js} +8 -1
- package/dist/{core-MNUVP5IJ.js → core-QPSAYRFT.js} +5 -1
- package/dist/{core-YVNOHIQ4.js → core-RR2CAZC5.js} +3 -1
- package/dist/{core-KF6GJOGW.js → core-TCSW24N6.js} +7 -1
- package/dist/{core-JLXFDYHX.js → core-TKZZZ6UW.js} +4 -1
- package/dist/{core-7YKLT7KY.js → core-VKZSQFRG.js} +4 -1
- package/dist/{core-EAIFSTDE.js → core-WJNK7F2J.js} +3 -1
- package/dist/{core-JLJTP7P6.js → core-WZ4CHVYL.js} +3 -1
- package/dist/{core-PFXIBWLD.js → core-XW7UJFJZ.js} +4 -1
- package/dist/{core-RCFFJANI.js → core-YMXYUGF5.js} +5 -1
- package/dist/{core-DKJUX7Q4.js → core-ZLSQHZ3I.js} +3 -1
- package/dist/{dataTable-VKEHFLJM.js → dataTable-CNDRVGA5.js} +4 -2
- package/dist/{engine-PPXKJJFI.js → engine-FVEIM3WV.js} +59 -32
- 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 -26
- package/dist/{main-53MXACOU.js → main-THU6VIVU.js} +55 -24
- package/dist/mcp/server.js +50 -22
- 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 -30
- package/dist/react/funnel.js +4 -1
- package/dist/react/gantt.js +4 -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 +95 -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 -27
- 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 +8 -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-LI6KOS46.js} +2 -1
- package/dist/{schema-GVHM2HEF.js → schema-25INXAMY.js} +1 -1
- package/dist/{schema-ZCZCY34J.js → schema-5DUTAVO7.js} +1 -1
- package/dist/{schema-26YUL3MG.js → schema-5KDEQBBT.js} +1 -1
- package/dist/{schema-FT37ZEYY.js → schema-5ZTGVQAJ.js} +1 -3
- package/dist/{schema-CMXL5F5L.js → schema-72EEMYS3.js} +1 -1
- package/dist/{schema-6ZV532RM.js → schema-7NSV542V.js} +1 -1
- package/dist/{schema-HWU55RJL.js → schema-AMT7P7KB.js} +1 -1
- package/dist/{schema-AQD3H5VV.js → schema-AXRDF6ND.js} +1 -1
- package/dist/{schema-SY3MKF5S.js → schema-B2GCEYXD.js} +1 -1
- package/dist/{schema-QLH2DZFI.js → schema-BBTXTWYI.js} +1 -1
- package/dist/{schema-SLQPM32G.js → schema-BKUFZLLI.js} +1 -1
- package/dist/{schema-LYBOPAGQ.js → schema-CGQID64D.js} +1 -1
- package/dist/{schema-QNI6MNQ2.js → schema-FDFQKIO5.js} +1 -1
- package/dist/{schema-KH62LDYK.js → schema-GN6GAIU5.js} +1 -1
- package/dist/{schema-733PO52K.js → schema-GNTKL5DN.js} +1 -1
- package/dist/{schema-ZSYX76MO.js → schema-H2EC4GAQ.js} +1 -1
- package/dist/{schema-H7RKVTVO.js → schema-HH5HOORE.js} +1 -1
- package/dist/{schema-NOPOI5G2.js → schema-J7TNCZIP.js} +1 -1
- package/dist/{schema-WAKLKLBB.js → schema-JH57NFXJ.js} +1 -1
- package/dist/{schema-KFXLS67Q.js → schema-KPEPBGAX.js} +1 -1
- package/dist/{schema-GK6MD4EG.js → schema-L5U4OROI.js} +1 -1
- package/dist/{schema-IOWE3RQO.js → schema-LOQ3AFC7.js} +1 -1
- package/dist/{schema-GSE3QXUK.js → schema-M5JBHQIV.js} +5 -3
- package/dist/{schema-IOKAZVL7.js → schema-MMVPMJEF.js} +1 -1
- package/dist/{schema-B4GFRYIP.js → schema-OU35XA3Z.js} +1 -1
- package/dist/{schema-HRHNGOFC.js → schema-PL3EU6EQ.js} +2 -2
- package/dist/{schema-MNG24WU2.js → schema-PQZWO3BP.js} +1 -1
- package/dist/{schema-5E5J43CF.js → schema-QCIE6M2P.js} +2 -1
- package/dist/{schema-Q4IPIR6W.js → schema-QORUB6EK.js} +1 -1
- package/dist/{schema-33ZF6WKL.js → schema-QPOBZUAR.js} +1 -1
- package/dist/{schema-3W7IFXVN.js → schema-R5Y6NVBH.js} +1 -1
- package/dist/{schema-KHCLVE2V.js → schema-THXXFY6I.js} +1 -1
- package/dist/{schema-HGUBNXUY.js → schema-VYECMPON.js} +1 -1
- package/dist/{schema-PNUC54GC.js → schema-YLE4XXQQ.js} +1 -1
- package/dist/{schema-KORNUIC6.js → schema-ZEVJMFLV.js} +1 -1
- package/dist/{schema-4ZXJCRZR.js → schema-ZG6ZKFRZ.js} +1 -1
- package/dist/{schema-WCDYWS4K.js → schema-ZQSIR5UC.js} +1 -1
- package/dist/{specValidation-H5B4MQST.js → specValidation-VHLGDEME.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/box/types.d.ts +2 -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 +8 -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 +9 -1
- 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 +11 -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 +20 -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 +13 -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 +10 -8
- 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 +8 -7
- 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-4KQHKPB3.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-SMHZXHHD.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-FFJGC2DX.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-MSYTF3DZ.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}`,
|
|
@@ -765,7 +829,16 @@ function yearRowRequests(plan, top) {
|
|
|
765
829
|
function categoryLineAlign(plan, index) {
|
|
766
830
|
return plan.rotation === 0 && (plan.infos[index]?.lines.length ?? 0) > 1 ? { align: "middle" } : {};
|
|
767
831
|
}
|
|
768
|
-
var SIN45 = Math.SQRT1_2, ROTATED_NAME_AIR = 5, nth = (k) => `${k}${k % 100 >= 11 && k % 100 <= 13 ? "th" : ["th", "st", "nd", "rd"][k % 10] ?? "th"}`, ROTATED_HEIGHT_SHARE = 0.3, VERTICAL_HEIGHT_SHARE = 0.5, VERTICAL_MIN_WIDTH = 130,
|
|
832
|
+
var SIN45 = Math.SQRT1_2, ROTATED_NAME_AIR = 5, nth = (k) => `${k}${k % 100 >= 11 && k % 100 <= 13 ? "th" : ["th", "st", "nd", "rd"][k % 10] ?? "th"}`, ROTATED_HEIGHT_SHARE = 0.3, VERTICAL_HEIGHT_SHARE = 0.5, VERTICAL_MIN_WIDTH = 130, VERTICAL_MAX_LINES = 3;
|
|
833
|
+
function stackedName(label, font, room, lines, measure) {
|
|
834
|
+
let least = Math.floor((measure(label, font).width - (lines - 1) * measure(" ", font).width) / lines) - 2;
|
|
835
|
+
if (least > room) return;
|
|
836
|
+
let widest = fitText(label, font, room, lines, measure);
|
|
837
|
+
if (widest.title !== void 0) return;
|
|
838
|
+
let most = Math.min(room, Math.ceil(widest.w)), start = Math.min(most, Math.max(least, Math.min(room, VERTICAL_MIN_WIDTH)));
|
|
839
|
+
return start >= most ? widest : fitText(label, font, start, lines, measure, { wider: most });
|
|
840
|
+
}
|
|
841
|
+
var ROTATED_MIN_WIDTH = 110, DATE_ROW_LABELS = 8, YEAR_LABEL = /^(?:FY\s?)?\d{4}$|^(?:FY\s?)?'?\d{2}$/;
|
|
769
842
|
function calendarLike(labels) {
|
|
770
843
|
return labels.length > 1 && labels.every((l) => {
|
|
771
844
|
let t = l.trim();
|
|
@@ -806,7 +879,7 @@ function strideAfterFontLadder(labels, infos, baseFont, requested, pinned, dateS
|
|
|
806
879
|
let ordinal = (i) => dateStride ? dateStride.ordinals[i] : requested ? requestedRank[i] : i, restart = [];
|
|
807
880
|
labels.forEach((_, i) => restart.push(yearPins[i] ? i : restart[i - 1] ?? -1));
|
|
808
881
|
let steady = (keep2, k) => {
|
|
809
|
-
let
|
|
882
|
+
let drawn2 = labels.map((_, i) => i).filter((i) => keep2[i]), gaps = drawn2.slice(1).map((i, d) => ordinal(i) - ordinal(drawn2[d]));
|
|
810
883
|
return requested === void 0 && gaps.pop(), gaps.every((g) => Math.abs(g - k) <= 1) && maxOf(gaps) - minOf(gaps) <= 1;
|
|
811
884
|
}, 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
885
|
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 +1011,7 @@ function spreadUpright(input, plan) {
|
|
|
938
1011
|
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
1012
|
input.measure(input.labels[i], font).width,
|
|
940
1013
|
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) }),
|
|
1014
|
+
)), 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
1015
|
if (whole(upright, 1)) return upright;
|
|
943
1016
|
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
1017
|
return whole(wrapped, PROSE_TICK_MAX_LINES) ? wrapped : void 0;
|
|
@@ -997,8 +1070,16 @@ function shortMonthNames(labels) {
|
|
|
997
1070
|
if (index.length === lower.length && index.some((i) => monthsShort[i] !== months[i])) return index.map((i) => monthsShort[i]);
|
|
998
1071
|
}
|
|
999
1072
|
}
|
|
1073
|
+
var PROSE_FLOOR_LINES = 3;
|
|
1000
1074
|
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,
|
|
1075
|
+
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) => {
|
|
1076
|
+
let suffix = input.suffixes?.[i] ?? "", slot = (input.widths?.[i] ?? step) - (suffix ? measure(suffix, floorFont).width : 0);
|
|
1077
|
+
if (/[\n\u200d\u{E0020}-\u{E007F}]/u.test(label)) return !0;
|
|
1078
|
+
let parts = label.split(/[^\S\u00a0\u202f]+/).filter(Boolean).flatMap((word) => word.split(/(?<=-)(?=[^-])/));
|
|
1079
|
+
return measure(label, floorFont).width <= PROSE_FLOOR_LINES * slot && parts.every((part) => measure(part, floorFont).width <= slot);
|
|
1080
|
+
}), stepsToFloor = nameRow && smallest.size > axisFloor + 0.01 && floorHolds();
|
|
1081
|
+
stepsToFloor && fonts.push(floorFont);
|
|
1082
|
+
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
1083
|
let suffix = suffixAt(i);
|
|
1003
1084
|
if (!suffix) return info;
|
|
1004
1085
|
let lines = [...info.lines];
|
|
@@ -1023,7 +1104,7 @@ function planRow(input, bundled) {
|
|
|
1023
1104
|
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
1105
|
if (single2 !== void 0 && measure(single2, font).width <= width)
|
|
1025
1106
|
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 : [""];
|
|
1107
|
+
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
1108
|
return withSuffix({
|
|
1028
1109
|
lines,
|
|
1029
1110
|
w: Math.max(...lines.map((l) => measure(l, font).width), 1),
|
|
@@ -1033,7 +1114,7 @@ function planRow(input, bundled) {
|
|
|
1033
1114
|
}, i, font);
|
|
1034
1115
|
});
|
|
1035
1116
|
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) => {
|
|
1117
|
+
}, 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
1118
|
let x = anchor(i, w);
|
|
1038
1119
|
return (i - step2 < 0 || x >= centers[i - step2]) && (i + step2 > n - 1 || x + w <= centers[i + step2]);
|
|
1039
1120
|
}, fits = (infos, keep, minGap = gap) => {
|
|
@@ -1074,7 +1155,7 @@ function planRow(input, bundled) {
|
|
|
1074
1155
|
let lines = [...info.lines];
|
|
1075
1156
|
return lines[lines.length - 1] = `${lines[lines.length - 1] ?? ""} ${words2}`, { ...info, lines, w: info.w + measure(` ${words2}`, font).width };
|
|
1076
1157
|
}));
|
|
1077
|
-
let
|
|
1158
|
+
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
1159
|
let w = measure(String(year), font).width;
|
|
1079
1160
|
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
1161
|
});
|
|
@@ -1213,14 +1294,26 @@ function planRow(input, bundled) {
|
|
|
1213
1294
|
let flat = measureAll(font, 1, !0);
|
|
1214
1295
|
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
1296
|
}
|
|
1216
|
-
let everyName = input.everyName === !0 && !orderedProse, room45 = allowRotate &&
|
|
1297
|
+
let everyName = input.everyName === !0 && !orderedProse, room45 = allowRotate && rotateFonts.some((font) => step * SIN45 >= font.size * (font.lineHeight ?? 1.2) + 2);
|
|
1217
1298
|
if (allowRotate && (input.rotate90 || everyName && !room45)) {
|
|
1218
|
-
let upright =
|
|
1299
|
+
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)), stackFor = (f) => input.rotate90 ? Math.max(1, Math.min(VERTICAL_MAX_LINES, Math.floor((step - 2) / (f.size * (f.lineHeight ?? 1.2))))) : 1, verticalMemo = /* @__PURE__ */ new Map(), verticalAll = (f) => verticalMemo.get(f) ?? verticalMemo.set(f, verticalLines(f)).get(f), verticalLines = (f) => measureAll(f, 1).map((info, i) => {
|
|
1300
|
+
if (info.w <= cap || stackFor(f) < 2) return info;
|
|
1301
|
+
let reserve = suffixAt(i) ? measure(suffixAt(i), f).width : 0, room = Math.max(cap - reserve, 1);
|
|
1302
|
+
for (let lines = 2; lines <= stackFor(f); lines++) {
|
|
1303
|
+
let fitted = stackedName(labels[i], f, room, lines, measure);
|
|
1304
|
+
if (fitted) return withSuffix({ lines: fitted.lines, w: fitted.w, h: fitted.h, truncated: !1 }, i, f);
|
|
1305
|
+
}
|
|
1306
|
+
return info;
|
|
1307
|
+
}), font = upright.find((f) => verticalAll(f).every((info) => info.w <= cap)) ?? upright[0];
|
|
1219
1308
|
if (font) {
|
|
1220
|
-
let cutNames = [],
|
|
1309
|
+
let cutNames = [], stack = stackFor(font), infos = verticalAll(font).map((info, i) => {
|
|
1221
1310
|
if (info.w <= cap) return info;
|
|
1311
|
+
if (cutNames.push(labels[i]), stack > 1) {
|
|
1312
|
+
let fitted = fitText(labels[i], font, cap, stack, measure);
|
|
1313
|
+
return { ...info, lines: fitted.lines, w: Math.min(cap, fitted.w), h: fitted.h, truncated: !0, ...fitted.title !== void 0 ? { title: fitted.title } : {} };
|
|
1314
|
+
}
|
|
1222
1315
|
let cut2 = cutWithTitle(info.lines[0], font, cap, measure);
|
|
1223
|
-
return
|
|
1316
|
+
return { ...info, lines: [cut2.text], w: cap, truncated: !0, ...cut2.title !== void 0 ? { title: cut2.title } : {} };
|
|
1224
1317
|
});
|
|
1225
1318
|
return plan(font, infos, all, "rotate", {
|
|
1226
1319
|
rotation: 90,
|
|
@@ -1237,12 +1330,13 @@ function planRow(input, bundled) {
|
|
|
1237
1330
|
}
|
|
1238
1331
|
}
|
|
1239
1332
|
if (allowRotate) {
|
|
1240
|
-
let rotatable =
|
|
1333
|
+
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
1334
|
if (font) {
|
|
1242
|
-
let cutNotes = [], cutNames = [], infos = measureAll(font, 1).map((info, i) => {
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1335
|
+
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) => {
|
|
1336
|
+
let cap = capAt(i, info.w);
|
|
1337
|
+
if (info.w <= cap) return info;
|
|
1338
|
+
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);
|
|
1339
|
+
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
1340
|
});
|
|
1247
1341
|
return plan(font, infos, all, "rotate", {
|
|
1248
1342
|
rotation: 45,
|
|
@@ -1309,14 +1403,188 @@ function rotatedLeftOverhang(plan, centers, minX) {
|
|
|
1309
1403
|
overhang = Math.max(overhang, minX - left);
|
|
1310
1404
|
}), Math.ceil(overhang);
|
|
1311
1405
|
}
|
|
1312
|
-
function verticalNameRect(centerX, rowTop, width, font) {
|
|
1313
|
-
let lineH = font.size * (font.lineHeight ?? 1.2), pivotX = centerX + font.size * VERTICAL_CAP_SHARE / 2, pivotY = rowTop + 4 + lineH * SIN45 / 2;
|
|
1314
|
-
return { x: pivotX - lineH, y: pivotY - lineH * SIN45 / 2, w: lineH, h: lineH * SIN45 / 2 + width };
|
|
1406
|
+
function verticalNameRect(centerX, rowTop, width, font, lines = 1) {
|
|
1407
|
+
let lineH = font.size * (font.lineHeight ?? 1.2), pivotX = centerX + font.size * VERTICAL_CAP_SHARE / 2 - (lines - 1) * lineH / 2, pivotY = rowTop + 4 + lineH * SIN45 / 2;
|
|
1408
|
+
return { x: pivotX - lineH, y: pivotY - lineH * SIN45 / 2, w: lineH * lines, h: lineH * SIN45 / 2 + width };
|
|
1315
1409
|
}
|
|
1316
1410
|
var VERTICAL_CAP_SHARE = 0.72;
|
|
1317
1411
|
|
|
1412
|
+
// src/core/rowCanvas.ts
|
|
1413
|
+
function tallestContentHeight(width) {
|
|
1414
|
+
return Math.round(width / ASPECT_CAPS.tall);
|
|
1415
|
+
}
|
|
1416
|
+
function rowDrivenHeight(input) {
|
|
1417
|
+
if (input.options.size !== void 0 || panelTypeClass(input.options) !== void 0) return;
|
|
1418
|
+
let cap = Math.max(1400, input.ceiling ?? 0), bounded = Math.min(input.maxHeight ?? cap, cap, Math.ceil(input.chromeH + input.rowsH - 1e-6));
|
|
1419
|
+
return bounded > input.height || input.height - bounded > 2 ? bounded : void 0;
|
|
1420
|
+
}
|
|
1421
|
+
function fixedHeightCanvas(options) {
|
|
1422
|
+
return !heightOmitted(options.size) && options[TARGET_SIZE]?.fixed.height !== !1;
|
|
1423
|
+
}
|
|
1424
|
+
function spareShare(spare, count, cap, even = !1) {
|
|
1425
|
+
if (!(spare > 0) || count <= 0 || !(cap > 0)) return 0;
|
|
1426
|
+
let share = Math.min(cap, spare / count);
|
|
1427
|
+
return even ? Math.floor(share / 2) * 2 : Math.floor(share);
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
// src/core/sourceFollows.ts
|
|
1431
|
+
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;
|
|
1432
|
+
function arcPoints(from, rx, ry, rotation, large, sweep, to) {
|
|
1433
|
+
if (rx === 0 || ry === 0) return [to];
|
|
1434
|
+
rx = Math.abs(rx), ry = Math.abs(ry);
|
|
1435
|
+
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);
|
|
1436
|
+
scale > 1 && (rx *= Math.sqrt(scale), ry *= Math.sqrt(scale));
|
|
1437
|
+
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);
|
|
1438
|
+
return !sweep && span > 0 && (span -= 2 * Math.PI), sweep && span < 0 && (span += 2 * Math.PI), Array.from({ length: 48 }, (_, k) => {
|
|
1439
|
+
let t = start + span * (k + 1) / 48;
|
|
1440
|
+
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 };
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
var POLYLINE = /^[MLZ\d\s,.eE+-]*$/;
|
|
1444
|
+
function polylineLowest(d, stop) {
|
|
1445
|
+
let lowest = -1 / 0, index = 0, end = d.length;
|
|
1446
|
+
for (let i = 0; i < end; ) {
|
|
1447
|
+
let c = d.charCodeAt(i);
|
|
1448
|
+
if (c >= 48 && c <= 57 || c === 45 || c === 46) {
|
|
1449
|
+
let from = i++;
|
|
1450
|
+
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)) ;
|
|
1451
|
+
if (index++ & 1) {
|
|
1452
|
+
let y = +d.slice(from, i);
|
|
1453
|
+
if (y > lowest && (lowest = y, y >= stop))
|
|
1454
|
+
return lowest;
|
|
1455
|
+
}
|
|
1456
|
+
} else i++;
|
|
1457
|
+
}
|
|
1458
|
+
return lowest;
|
|
1459
|
+
}
|
|
1460
|
+
function pathLowest(d, stop) {
|
|
1461
|
+
if (POLYLINE.test(d)) return polylineLowest(d, stop);
|
|
1462
|
+
let lowest = -1 / 0, at = { x: 0, y: 0 }, start = at, see = (y) => {
|
|
1463
|
+
y > lowest && (lowest = y);
|
|
1464
|
+
};
|
|
1465
|
+
for (let [, command, args] of d.matchAll(/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g)) {
|
|
1466
|
+
if (lowest >= stop) return lowest;
|
|
1467
|
+
let n = (args.match(/-?\d*\.?\d+(?:e[+-]?\d+)?/gi) ?? []).map(Number), rel = command === command.toLowerCase(), kind = command.toUpperCase();
|
|
1468
|
+
if (kind === "Z") {
|
|
1469
|
+
at = start;
|
|
1470
|
+
continue;
|
|
1471
|
+
}
|
|
1472
|
+
if (kind === "M" || kind === "L" || kind === "T")
|
|
1473
|
+
for (let i = 0; i + 1 < n.length; i += 2)
|
|
1474
|
+
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);
|
|
1475
|
+
else if (kind === "H")
|
|
1476
|
+
for (let x of n) at = { x: x + (rel ? at.x : 0), y: at.y };
|
|
1477
|
+
else if (kind === "V")
|
|
1478
|
+
for (let y of n)
|
|
1479
|
+
at = { x: at.x, y: y + (rel ? at.y : 0) }, see(at.y);
|
|
1480
|
+
else if (kind === "C")
|
|
1481
|
+
for (let i = 0; i + 5 < n.length; i += 6) {
|
|
1482
|
+
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 } };
|
|
1483
|
+
for (let k = 1; k <= 16; k++) see(cubicPoint(segment, k / 16).y);
|
|
1484
|
+
at = segment.to;
|
|
1485
|
+
}
|
|
1486
|
+
else if (kind === "Q")
|
|
1487
|
+
for (let i = 0; i + 3 < n.length; i += 4) {
|
|
1488
|
+
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 };
|
|
1489
|
+
for (let k = 1; k <= 16; k++) {
|
|
1490
|
+
let t = k / 16, u = 1 - t;
|
|
1491
|
+
see(u * u * at.y + 2 * u * t * control + t * t * end.y);
|
|
1492
|
+
}
|
|
1493
|
+
at = end;
|
|
1494
|
+
}
|
|
1495
|
+
else if (kind === "A")
|
|
1496
|
+
for (let i = 0; i + 6 < n.length; i += 7) {
|
|
1497
|
+
let end = { x: n[i + 5] + (rel ? at.x : 0), y: n[i + 6] + (rel ? at.y : 0) };
|
|
1498
|
+
for (let point of arcPoints(at, n[i], n[i + 1], n[i + 2], !!n[i + 3], !!n[i + 4], end)) see(point.y);
|
|
1499
|
+
at = end;
|
|
1500
|
+
}
|
|
1501
|
+
else if (kind === "S")
|
|
1502
|
+
for (let i = 0; i + 3 < n.length; i += 4)
|
|
1503
|
+
at = { x: n[i + 2] + (rel ? at.x : 0), y: n[i + 3] + (rel ? at.y : 0) }, see(at.y);
|
|
1504
|
+
}
|
|
1505
|
+
return lowest;
|
|
1506
|
+
}
|
|
1507
|
+
function extent(node, stop = 1 / 0) {
|
|
1508
|
+
let dy = node.ty ?? 0;
|
|
1509
|
+
switch (node.t) {
|
|
1510
|
+
case "rect":
|
|
1511
|
+
case "image": {
|
|
1512
|
+
let half = node.t === "rect" && node.stroke ? (node.strokeWidth ?? 1) / 2 : 0;
|
|
1513
|
+
return [node.rect.y + dy - half, node.rect.y + node.rect.h + dy + half];
|
|
1514
|
+
}
|
|
1515
|
+
case "line":
|
|
1516
|
+
return [Math.min(node.y1, node.y2) + dy - node.width / 2, Math.max(node.y1, node.y2) + dy + node.width / 2];
|
|
1517
|
+
case "circle":
|
|
1518
|
+
return [node.cy + dy - node.r, node.cy + dy + node.r];
|
|
1519
|
+
case "path": {
|
|
1520
|
+
let half = node.stroke ? (node.width ?? 1) / 2 : 0, low = pathLowest(node.d, stop - dy - half);
|
|
1521
|
+
if (!Number.isFinite(low)) return;
|
|
1522
|
+
let bottom = low + dy + half;
|
|
1523
|
+
return [bottom, bottom];
|
|
1524
|
+
}
|
|
1525
|
+
case "text": {
|
|
1526
|
+
let lineH = node.font.size * (node.font.lineHeight ?? 1.2) * node.lines.length, bottom = node.y + dy + lineH;
|
|
1527
|
+
if (node.rotate) {
|
|
1528
|
+
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);
|
|
1529
|
+
bottom = node.y + dy + ascent + Math.max(left * sin, (left + width) * sin) + Math.max(-ascent * cos, (lineH - ascent) * cos);
|
|
1530
|
+
}
|
|
1531
|
+
return node.backing && (bottom = Math.max(bottom, node.backing.y + node.backing.h + dy)), [node.y + dy, bottom];
|
|
1532
|
+
}
|
|
1533
|
+
default:
|
|
1534
|
+
return;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
function drawn(node, canvas) {
|
|
1538
|
+
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;
|
|
1539
|
+
}
|
|
1540
|
+
function moved(node, dy) {
|
|
1541
|
+
switch (node.t) {
|
|
1542
|
+
case "text":
|
|
1543
|
+
return { ...node, y: r2(node.y - dy), ...node.backing ? { backing: { ...node.backing, y: r2(node.backing.y - dy) } } : {} };
|
|
1544
|
+
case "rect":
|
|
1545
|
+
case "image":
|
|
1546
|
+
return { ...node, rect: { ...node.rect, y: r2(node.rect.y - dy) } };
|
|
1547
|
+
case "line":
|
|
1548
|
+
return { ...node, y1: r2(node.y1 - dy), y2: r2(node.y2 - dy) };
|
|
1549
|
+
case "circle":
|
|
1550
|
+
return { ...node, cy: r2(node.cy - dy) };
|
|
1551
|
+
default:
|
|
1552
|
+
return { ...node, ty: r2((node.ty ?? 0) - dy) };
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
var up = (rect, dy) => ({ ...rect, y: r2(rect.y - dy) });
|
|
1556
|
+
function sourceFollowsContent(geometry, options) {
|
|
1557
|
+
let { frame, size } = geometry, plotBand = frame.plotRect;
|
|
1558
|
+
if (!plotBand || geometry.story || geometry.type === "choropleth" || panelTypeClass(options) !== void 0 || !fixedHeightCanvas(options ?? {})) return;
|
|
1559
|
+
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);
|
|
1560
|
+
if (tops.length === 0) return;
|
|
1561
|
+
let blockTop = Math.min(...tops), gap = blockTop - plotBottom;
|
|
1562
|
+
if (gap < 0) return;
|
|
1563
|
+
let line = plotBottom - LIFT_OVER, inBlock = blockTop - 0.01, boxes = geometry.scene.map((node) => node.t === "path" ? void 0 : extent(node)), ink = -1 / 0;
|
|
1564
|
+
if (geometry.scene.forEach((node, i) => {
|
|
1565
|
+
let box = boxes[i];
|
|
1566
|
+
box && box[0] < inBlock && drawn(node, size) && (ink = Math.max(ink, box[1]));
|
|
1567
|
+
}), ink >= line) return;
|
|
1568
|
+
for (let [i, node] of geometry.scene.entries()) {
|
|
1569
|
+
if (node.t !== "path" || !drawn(node, size)) continue;
|
|
1570
|
+
let box = boxes[i] = extent(node, inBlock);
|
|
1571
|
+
if (!(!box || box[0] >= inBlock) && (ink = Math.max(ink, box[1]), ink >= line))
|
|
1572
|
+
return;
|
|
1573
|
+
}
|
|
1574
|
+
if (!Number.isFinite(ink)) return;
|
|
1575
|
+
let spare = blockTop - ink - gap;
|
|
1576
|
+
if (spare <= LIFT_OVER || resolveTheme(options?.theme).space.footerFollows === !1) return;
|
|
1577
|
+
let dy = r2(spare);
|
|
1578
|
+
geometry.scene = geometry.scene.map((node, i) => {
|
|
1579
|
+
let box = node.t === "path" ? boxes[i] ?? extent(node, inBlock) : boxes[i];
|
|
1580
|
+
return box && box[0] >= inBlock ? moved(node, dy) : node;
|
|
1581
|
+
});
|
|
1582
|
+
let shifted = {};
|
|
1583
|
+
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) };
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1318
1586
|
// 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];
|
|
1587
|
+
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
1588
|
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
1589
|
column: { width: 280, height: 180 },
|
|
1322
1590
|
line: { width: 280, height: 180 },
|
|
@@ -1352,8 +1620,11 @@ function namesDrawnSeries(data, result) {
|
|
|
1352
1620
|
Array.isArray(item.children) && item.children.forEach(walk);
|
|
1353
1621
|
};
|
|
1354
1622
|
(result.scene ?? []).forEach(walk);
|
|
1355
|
-
let
|
|
1356
|
-
return
|
|
1623
|
+
let drawn2 = entries.filter((entry) => active.has(entry.id));
|
|
1624
|
+
return drawn2.length < 2 || drawn2.every((entry) => named.has(entry.id));
|
|
1625
|
+
}
|
|
1626
|
+
function lostCategoryNames(result) {
|
|
1627
|
+
return result.refused ? [] : result.labels.filter((label) => label.kind === "category" && !!label.hidden && label.hidden !== "redundant" && label.hidden !== "density");
|
|
1357
1628
|
}
|
|
1358
1629
|
function atHardMinimum(options) {
|
|
1359
1630
|
return options?.[HARD_MINIMUM] === !0;
|
|
@@ -1367,10 +1638,10 @@ function requestFloor(policy) {
|
|
|
1367
1638
|
}
|
|
1368
1639
|
var DIAGRAM_BELOW_SHARED_MIN = !0, DIAGRAM_MIN_HEIGHT = 160;
|
|
1369
1640
|
function chartSizing(type, options) {
|
|
1370
|
-
let
|
|
1641
|
+
let compactBullet = type === "bullet" && options?.density === "compact", cardFloor = CARD_FLOOR_TYPES.has(type);
|
|
1371
1642
|
return {
|
|
1372
1643
|
aspect: type === "scatter" ? "4:3" : type === "pie" ? "1:1" : CONTENT_TYPES.has(type) ? "content" : "16:9",
|
|
1373
|
-
minWidth: type === "table" ? 100 : type === "sparkline" ? 88 :
|
|
1644
|
+
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
1645
|
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
1646
|
fit: CONTENT_TYPES.has(type) ? "content" : "fill",
|
|
1376
1647
|
// A compact-density bullet is already its smallest form at 120 px: the row compact floor would raise it.
|
|
@@ -1633,7 +1904,7 @@ function prepareFitLayout(definition, data, origins = /* @__PURE__ */ new WeakMa
|
|
|
1633
1904
|
width < CARD_CLASS_WIDTH && cardClassHeight(definition, data, options, width);
|
|
1634
1905
|
}
|
|
1635
1906
|
let fitted = fitOrRepair(definition, data, options, at), copy = copyLayout(fitted);
|
|
1636
|
-
return origins.set(copy, origins.get(fitted) ?? fitted), withPlotFloorWarning(copy, options, definition.title);
|
|
1907
|
+
return origins.set(copy, origins.get(fitted) ?? fitted), copy.refused || sourceFollowsContent(copy, options), withPlotFloorWarning(copy, options, definition.title);
|
|
1637
1908
|
} finally {
|
|
1638
1909
|
borrowed || (memo.active = !1, memo.heights.clear(), memo.references = void 0);
|
|
1639
1910
|
}
|
|
@@ -1662,7 +1933,7 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1662
1933
|
if (definition.type === "grid" && first.warnings[0]?.code !== "size-below-floor") return first;
|
|
1663
1934
|
let received = first.size, constraints = options?.[TARGET_SIZE] ?? resolveTargetSize(options?.target ?? DEFAULT_TARGET, options?.size);
|
|
1664
1935
|
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) => {
|
|
1936
|
+
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
1937
|
let target = options?.target ?? DEFAULT_TARGET, height = Math.max(requiredSize(received, first.sizing).height, plotFloorHeight(fitted, target));
|
|
1667
1938
|
return fitted.warnings.some((warning) => warning.code === "plot-under-floor") || fitted.warnings.push({
|
|
1668
1939
|
code: "plot-under-floor",
|
|
@@ -1675,7 +1946,7 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1675
1946
|
};
|
|
1676
1947
|
if (fixedFallback) {
|
|
1677
1948
|
let fitted = fitAt(definition, data, { ...options, [HARD_MINIMUM]: !0 });
|
|
1678
|
-
if (!fitted.refused &&
|
|
1949
|
+
if (!fitted.refused && namesKept(fitted)) return warnHardMinimum(fitted);
|
|
1679
1950
|
}
|
|
1680
1951
|
let sourceStep = !!(!staticFrame.pinned && compact && options?.source && constraints.fixed.width && constraints.fixed.height);
|
|
1681
1952
|
if (sourceStep && options)
|
|
@@ -1684,11 +1955,11 @@ function fitOrRepair(definition, data, options, atSize) {
|
|
|
1684
1955
|
if (!fitted.refused) return fitted;
|
|
1685
1956
|
}
|
|
1686
1957
|
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,
|
|
1958
|
+
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
1959
|
for (let hard of [!1, !0]) {
|
|
1689
1960
|
if (!hard && line === void 0) continue;
|
|
1690
|
-
let fitted = fitAt(definition, data, hard ? { ...
|
|
1691
|
-
if (!fitted.refused && !(hard && !
|
|
1961
|
+
let fitted = fitAt(definition, data, hard ? { ...moved2, [HARD_MINIMUM]: !0 } : moved2);
|
|
1962
|
+
if (!fitted.refused && !(hard && !namesKept(fitted)))
|
|
1692
1963
|
return line !== void 0 && fitted.warnings.push({
|
|
1693
1964
|
code: "subtitle-moved-to-notes",
|
|
1694
1965
|
severity: "warn",
|
|
@@ -1855,7 +2126,7 @@ function fitAt(definition, data, options, atSize) {
|
|
|
1855
2126
|
return widthOnly(options?.size) && !result.refused && result.sizing && (result.sizing.naturalHeight = Math.max(result.sizing.naturalHeight, result.size.height)), result;
|
|
1856
2127
|
}
|
|
1857
2128
|
function compactFallbackApplies(definition, options, data) {
|
|
1858
|
-
return declaredSizing(definition, options).compactFloor !== void 0 && options?.belowMinimum !== "refuse" && options?.
|
|
2129
|
+
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
2130
|
}
|
|
1860
2131
|
function compactReplacesRefusal(definition, options, data) {
|
|
1861
2132
|
if (!FALLBACK_COMPACT.has(definition.type) || forcedCompact(options) || !compactFallbackApplies(definition, options, data)) return !1;
|
|
@@ -1927,9 +2198,9 @@ function fitOnce(definition, data, options, compactFallback, atSize) {
|
|
|
1927
2198
|
return tall.refused ? settled : tall;
|
|
1928
2199
|
}
|
|
1929
2200
|
if (!nested) {
|
|
1930
|
-
let plotShare = autoPlotShare(definition, options, width), floorShare = autoPlotShare(definition, { ...options, [PLOT_SHARE]: void 0 }, width),
|
|
2201
|
+
let plotShare = autoPlotShare(definition, options, width), floorShare = autoPlotShare(definition, { ...options, [PLOT_SHARE]: void 0 }, width), freed = (r) => r.refused ? 0 : freedChromeOf(r.frame);
|
|
1931
2202
|
width < CARD_CLASS_WIDTH && (height = Math.max(height, cardClassHeight(definition, data, options, width, !0) ?? 0));
|
|
1932
|
-
let search = (plotPx2, startHeight) => {
|
|
2203
|
+
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
2204
|
let height2 = startHeight, previous, directRefusal, triedDirectRefusal = !1;
|
|
1934
2205
|
for (let pass = 0; pass < 8; pass++) {
|
|
1935
2206
|
let probe = at(width, height2);
|
|
@@ -2124,8 +2395,18 @@ function fitSizeMemo(definition, data, options, compactFallback) {
|
|
|
2124
2395
|
let copy = memoCopy(result);
|
|
2125
2396
|
return readsShare ? (entry.byShare ??= /* @__PURE__ */ new Map()).set(share, copy) : entry.result = copy, memo.set(key, entry), result;
|
|
2126
2397
|
}
|
|
2398
|
+
var MIN_COLUMN_BAR = 3;
|
|
2399
|
+
function columnCannotFit(data, options, width) {
|
|
2400
|
+
let categories = data?.categories;
|
|
2401
|
+
return options?.topN === void 0 && options?.viewDomain === void 0 && Array.isArray(categories) && categories.length * MIN_COLUMN_BAR > width;
|
|
2402
|
+
}
|
|
2403
|
+
function columnBarFloor(geometry) {
|
|
2404
|
+
if (geometry.type !== "column" || geometry.size.width >= CARD_MIN_WIDTH) return 0;
|
|
2405
|
+
let bars = geometry.marks?.bars ?? [], thinnest = Math.min(...bars.map((bar) => bar.rect.w).filter((w) => w > 0));
|
|
2406
|
+
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));
|
|
2407
|
+
}
|
|
2127
2408
|
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:
|
|
2409
|
+
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
2410
|
if (!nested && !fitsSize(requested, definition.type === "grid" ? { ...gatePolicy, minHeight: 0 } : gatePolicy))
|
|
2130
2411
|
return sizeRefusal(definition.type, definition.title, requested, resolveSizing(gatePolicy, requested));
|
|
2131
2412
|
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 +2430,9 @@ function fitSize(definition, data, options, compactFallback) {
|
|
|
2149
2430
|
geometry.frame.minHeight ?? 0,
|
|
2150
2431
|
geometry.frame.plotMinHeight ?? 0,
|
|
2151
2432
|
(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 = {
|
|
2433
|
+
), barFloor = definition.type === "column" ? columnBarFloor(geometry) : 0, measured = {
|
|
2153
2434
|
...geometry.sizing,
|
|
2435
|
+
...barFloor > (geometry.sizing?.minWidth ?? 0) ? { minWidth: barFloor } : {},
|
|
2154
2436
|
...definition.type === "kpi" ? { naturalWidth: Math.min(geometry.sizing?.naturalWidth ?? 360, 360) } : {},
|
|
2155
2437
|
// The height that holds a plot of MIN_COMPACT_PLOT px is the measured floor (HOLDS_COMPACT_PLOT).
|
|
2156
2438
|
minHeight: floorWithFooter - footerExtra,
|
|
@@ -2193,7 +2475,21 @@ function crowdedTailCut(ranked) {
|
|
|
2193
2475
|
}
|
|
2194
2476
|
|
|
2195
2477
|
// src/core/itemBudget.ts
|
|
2196
|
-
var ITEM_BUDGET = 2e3, TYPE_BUDGETS = { likert: 500, mekko: 2e4 }, TOO_MANY_ITEMS = "too-many-items",
|
|
2478
|
+
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 };
|
|
2479
|
+
function checkPointBudget(categories, series, limit = LINE_LIMIT, chart = "a line or area chart") {
|
|
2480
|
+
let cost = categories * series + limit.perSeries * series, cross = categories * series * series, crossOver = limit.crossCap !== void 0 && cross > limit.crossCap;
|
|
2481
|
+
if (cost <= limit.budget && !crossOver) return;
|
|
2482
|
+
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`;
|
|
2483
|
+
throw new NormalizeError(
|
|
2484
|
+
TOO_MANY_ITEMS,
|
|
2485
|
+
"series",
|
|
2486
|
+
message,
|
|
2487
|
+
"draw fewer series, aggregate the periods first (weeks or months), or set window.last or viewDomain to draw part of the periods",
|
|
2488
|
+
void 0,
|
|
2489
|
+
["data", "series"]
|
|
2490
|
+
);
|
|
2491
|
+
}
|
|
2492
|
+
var BUDGETED_LISTS = {
|
|
2197
2493
|
column: ["categories"],
|
|
2198
2494
|
bar: ["categories"],
|
|
2199
2495
|
combo: ["categories"],
|
|
@@ -2214,7 +2510,7 @@ var ITEM_BUDGET = 2e3, TYPE_BUDGETS = { likert: 500, mekko: 2e4 }, TOO_MANY_ITEM
|
|
|
2214
2510
|
treemap: ["items"],
|
|
2215
2511
|
pyramid: ["bands"],
|
|
2216
2512
|
cohort: ["cohorts"]
|
|
2217
|
-
}, TOP_N_TYPES = /* @__PURE__ */ new Set(["bar", "butterfly", "column", "mekko", "pareto", "likert", "pyramid"]), VIEWPORT_TYPES = /* @__PURE__ */ new Set(["column", "combo"]);
|
|
2513
|
+
}, TOP_N_TYPES = /* @__PURE__ */ new Set(["bar", "butterfly", "column", "dot", "mekko", "pareto", "likert", "pyramid", "variance"]), VIEWPORT_TYPES = /* @__PURE__ */ new Set(["column", "combo"]);
|
|
2218
2514
|
function barTotalsAtLeast(data, threshold) {
|
|
2219
2515
|
let series = data?.series, categories = data?.categories ?? [], totals = new Float64Array(categories.length);
|
|
2220
2516
|
if (Array.isArray(series)) for (let one of series) {
|
|
@@ -2230,10 +2526,15 @@ function barTotalsAtLeast(data, threshold) {
|
|
|
2230
2526
|
return count;
|
|
2231
2527
|
}
|
|
2232
2528
|
function drawnCount(type, key, list, data, options) {
|
|
2233
|
-
let count = list.length
|
|
2529
|
+
let count = list.length;
|
|
2530
|
+
if (type === "treemap") return list.filter((item) => {
|
|
2531
|
+
let value = item?.value;
|
|
2532
|
+
return value !== 0 && value !== null;
|
|
2533
|
+
}).length;
|
|
2534
|
+
let topN = options?.topN;
|
|
2234
2535
|
if (TOP_N_TYPES.has(type) && topN?.n !== void 0 && topN.n > 0 && !(type === "column" && options?.anomaly)) {
|
|
2235
2536
|
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));
|
|
2537
|
+
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
2538
|
}
|
|
2238
2539
|
if (VIEWPORT_TYPES.has(type) && key === "categories") {
|
|
2239
2540
|
let ends = options?.viewDomain?.x;
|
|
@@ -2271,21 +2572,51 @@ function checkItemBudget(type, data, options) {
|
|
|
2271
2572
|
}
|
|
2272
2573
|
|
|
2273
2574
|
// src/core/scale.ts
|
|
2274
|
-
function applyAxisBounds(domain,
|
|
2575
|
+
function applyAxisBounds(domain, extent2, axis, warnings) {
|
|
2275
2576
|
return axis?.min === void 0 && axis?.max === void 0 ? domain : domain.map((value, i) => {
|
|
2276
2577
|
let bound = i === 0 ? "min" : "max", authored = axis?.[bound];
|
|
2277
2578
|
if (authored === void 0) return value;
|
|
2278
|
-
let
|
|
2279
|
-
return
|
|
2579
|
+
let drawn2 = i === 0 ? Math.min(authored, extent2[i]) : Math.max(authored, extent2[i]);
|
|
2580
|
+
return drawn2 !== authored && warnings.push({
|
|
2280
2581
|
code: `value-axis-${bound}-ignored`,
|
|
2281
2582
|
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 ${
|
|
2583
|
+
message: `valueAxis.${bound} ${authored} cannot contain the plotted values and their required space; the axis extends to ${drawn2}`,
|
|
2584
|
+
suggest: `Set valueAxis.${bound} to ${drawn2}, or remove valueAxis.${bound}.`,
|
|
2284
2585
|
field: ["options", "valueAxis", bound],
|
|
2285
|
-
fix: [{ op: "replace", path: `/options/valueAxis/${bound}`, value:
|
|
2286
|
-
}),
|
|
2586
|
+
fix: [{ op: "replace", path: `/options/valueAxis/${bound}`, value: drawn2 }]
|
|
2587
|
+
}), drawn2;
|
|
2588
|
+
});
|
|
2589
|
+
}
|
|
2590
|
+
function shownTickStep(step, shown, warnings) {
|
|
2591
|
+
if (step === void 0 || shown) return step;
|
|
2592
|
+
warnings.push({
|
|
2593
|
+
code: "tick-step-ignored",
|
|
2594
|
+
severity: "warn",
|
|
2595
|
+
message: `valueAxis.tickStep ${step} has no effect because the value axis is hidden`,
|
|
2596
|
+
suggest: "set valueAxis.show to true, or drop valueAxis.tickStep",
|
|
2597
|
+
field: ["options", "valueAxis", "tickStep"]
|
|
2287
2598
|
});
|
|
2288
2599
|
}
|
|
2600
|
+
function applyTickStep(domain, step, warnings, inside = !1) {
|
|
2601
|
+
if (step === void 0 || !(step > 0)) return { domain };
|
|
2602
|
+
let from = Math.floor(domain[0] / step + 1e-9), to = Math.ceil(domain[1] / step - 1e-9);
|
|
2603
|
+
if (inside) {
|
|
2604
|
+
let first = Math.ceil(domain[0] / step - 1e-9), last = Math.floor(domain[1] / step + 1e-9);
|
|
2605
|
+
last - first >= 1 ? (from = first, to = last) : inside = !1;
|
|
2606
|
+
}
|
|
2607
|
+
let count = to - from;
|
|
2608
|
+
if (count >= 1 && count <= 20) {
|
|
2609
|
+
let ticks = Array.from({ length: count + 1 }, (_, i) => Number(((from + i) * step).toFixed(10)));
|
|
2610
|
+
if (ticks.every(Number.isFinite) && ticks.at(-1) > ticks[0])
|
|
2611
|
+
return { domain: inside ? domain : [ticks[0], ticks.at(-1)], ticks };
|
|
2612
|
+
}
|
|
2613
|
+
return warnings.push({
|
|
2614
|
+
code: "tick-step-ignored",
|
|
2615
|
+
severity: "warn",
|
|
2616
|
+
message: `valueAxis.tickStep ${step} would draw ${count} intervals over the value domain; the nice ticks are drawn instead`,
|
|
2617
|
+
suggest: "pick a step that gives 1 to 20 intervals"
|
|
2618
|
+
}), { domain };
|
|
2619
|
+
}
|
|
2289
2620
|
var AXIS_BREAK_GAP = 12, MAX_TICK_COUNT = 1e3;
|
|
2290
2621
|
function normalizeTickCount(targetCount) {
|
|
2291
2622
|
return Number.isFinite(targetCount) ? Math.min(MAX_TICK_COUNT, Math.max(1, Math.floor(targetCount))) : 5;
|
|
@@ -2429,10 +2760,10 @@ function bandScale(count, range, opts = {}) {
|
|
|
2429
2760
|
throw new RangeError("bandScale paddingOuter must be between 0 and 1");
|
|
2430
2761
|
if (opts.gapAfter?.some((gap) => !Number.isFinite(gap) || gap < 0))
|
|
2431
2762
|
throw new RangeError("bandScale gapAfter values must be finite and nonnegative");
|
|
2432
|
-
let
|
|
2763
|
+
let extent2 = r1 - r0, n = Math.max(1, count), extraGaps = Array.from(
|
|
2433
2764
|
{ length: n },
|
|
2434
2765
|
(_, i) => i < n - 1 ? Math.max(0, opts.gapAfter?.[i] ?? 0) : 0
|
|
2435
|
-
), extraGapTotal = extraGaps.reduce((sum, value) => sum + value, 0), stepSize =
|
|
2766
|
+
), 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
2767
|
for (let i = 0; i < n; i++)
|
|
2437
2768
|
offsets[i] = extraBefore, extraBefore += extraGaps[i];
|
|
2438
2769
|
return {
|
|
@@ -2458,19 +2789,19 @@ function tickFormatter(spec, ticks) {
|
|
|
2458
2789
|
for (; magnitude !== "none" && largest2 < MAGNITUDE_DIVISOR[magnitude]; ) magnitude = magnitude === "t" ? "bn" : magnitude === "bn" ? "m" : magnitude === "m" ? "k" : "none";
|
|
2459
2790
|
magnitude !== spec.magnitude && (spec = { ...spec, magnitude, ...magnitude === "none" ? { autoMagnitude: void 0, rollMagnitude: void 0 } : {} });
|
|
2460
2791
|
}
|
|
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;
|
|
2792
|
+
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
2793
|
for (; tickSpec.decimals < 20 && !distinct(); )
|
|
2463
2794
|
tickSpec.decimals++, tickSpec.decimals > AUTO_MAX_DECIMALS && (tickSpec.automatic = !1);
|
|
2464
2795
|
let scientific = finite.some((tick) => tick !== 0 && formatWithSpec(tick, tickSpec).includes("\xD7"));
|
|
2465
2796
|
return (value) => formatWithSpec(value, (spec.autoMagnitude || scientific) && value === 0 ? { ...tickSpec, magnitude: "none", decimals: 0 } : tickSpec);
|
|
2466
2797
|
}
|
|
2467
|
-
function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keepEnds = !1) {
|
|
2798
|
+
function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keepEnds = !1, keepTop = !1) {
|
|
2468
2799
|
if (ticks.length <= 2) return [...ticks];
|
|
2469
2800
|
let itemsFor = (values) => values.map((tick, index) => {
|
|
2470
|
-
let size = measure(format(tick), font), pos = scale(tick),
|
|
2801
|
+
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
2802
|
return {
|
|
2472
2803
|
start,
|
|
2473
|
-
size:
|
|
2804
|
+
size: extent2,
|
|
2474
2805
|
priority: endpoint ? 2 : tick === 0 ? 1 : 0
|
|
2475
2806
|
};
|
|
2476
2807
|
});
|
|
@@ -2480,7 +2811,8 @@ function thinAxisTicks(ticks, scale, orient, format, font, measure, labelX, keep
|
|
|
2480
2811
|
let baseStep = Math.abs(regular[1] - regular[0]), origin = regular[0] - Math.round(regular[0] / baseStep) * baseStep;
|
|
2481
2812
|
for (let stride = 1; stride <= regular.length; stride++) {
|
|
2482
2813
|
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))
|
|
2814
|
+
if (!(keepTop && kept.at(-1) !== regular.at(-1)) && kept.length > 0 && sweepHide(itemsFor(kept), 2).every(Boolean))
|
|
2815
|
+
return kept;
|
|
2484
2816
|
}
|
|
2485
2817
|
}
|
|
2486
2818
|
let keep = sweepHide(itemsFor(ticks), 2);
|
|
@@ -2562,12 +2894,12 @@ function withoutRepeatedAxisBreaks(geometry) {
|
|
|
2562
2894
|
}
|
|
2563
2895
|
}
|
|
2564
2896
|
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) => {
|
|
2897
|
+
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
2898
|
let centred = pos - width / 2;
|
|
2567
2899
|
if (!(count > 1 && (index === 0 || index === count - 1))) return centred;
|
|
2568
2900
|
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);
|
|
2901
|
+
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);
|
|
2902
|
+
}, ticks = thinAxisTicks(requestedTicks, scale, orient, formatTick, font, measure, labelX, input.keepEndTicks === !0, input.keepTopTick === !0);
|
|
2571
2903
|
for (let t of ticks) {
|
|
2572
2904
|
let pos = scale(t), text = formatTick(t), tsize = measure(text, font), gridId = input.gridlines && t !== 0 ? `axis:${orient}:grid:${seq}` : void 0;
|
|
2573
2905
|
if (orient === "y") {
|
|
@@ -2772,11 +3104,19 @@ function estimatedPlotAdvice(result, options) {
|
|
|
2772
3104
|
result.warnings = result.warnings.map((w) => w === warning ? {
|
|
2773
3105
|
...rest,
|
|
2774
3106
|
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 } }]
|
|
3107
|
+
suggest: "Use measure for the exact verified size, or leave options.size.height out."
|
|
2777
3108
|
} : w);
|
|
2778
3109
|
}
|
|
2779
|
-
var registry = /* @__PURE__ */ new Map(), aliasIndex = /* @__PURE__ */ new Map(),
|
|
3110
|
+
var registry = /* @__PURE__ */ new Map(), aliasIndex = /* @__PURE__ */ new Map(), registryWaiting = /* @__PURE__ */ new Set(), registryRevision = 0;
|
|
3111
|
+
function onChartRegistered(redraw) {
|
|
3112
|
+
return registryWaiting.add(redraw), () => {
|
|
3113
|
+
registryWaiting.delete(redraw);
|
|
3114
|
+
};
|
|
3115
|
+
}
|
|
3116
|
+
function chartRegistryRevision() {
|
|
3117
|
+
return registryRevision;
|
|
3118
|
+
}
|
|
3119
|
+
var COLORBLIND_IN_LAYOUT = /* @__PURE__ */ new Set(["bar", "dimswitch", "heatmap", "kpi", "status", "table", "variance"]), schemaIndex = /* @__PURE__ */ new Map(), schemaAliasIndex = /* @__PURE__ */ new Map();
|
|
2780
3120
|
function isDefinition(chart) {
|
|
2781
3121
|
return typeof chart.normalize == "function" && chart.dataSchema !== void 0 && chart.optionsSchema !== void 0;
|
|
2782
3122
|
}
|
|
@@ -2808,7 +3148,7 @@ function registerChart(def) {
|
|
|
2808
3148
|
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
3149
|
...authored,
|
|
2810
3150
|
target,
|
|
2811
|
-
theme: { preset: typeof ref == "string" ? ref : ref?.preset ??
|
|
3151
|
+
theme: { preset: typeof ref == "string" ? ref : ref?.preset ?? DEFAULT_PRESET, overrides: theme }
|
|
2812
3152
|
})))), prepared = def.defaultStrings ? withChartDefaultStrings(localized, def.defaultStrings(localized)) : localized;
|
|
2813
3153
|
def.type === "grid" && (data = inheritGridTarget(data, target, textScale, textSize)), def.categoryLabels && (data = withCalendarLabels(data, authored?.locale?.language, def.categoryLabels));
|
|
2814
3154
|
let origins = /* @__PURE__ */ new WeakMap(), legendLayout = prepareLegendLayout(def, data, origins), noteLayouts = /* @__PURE__ */ new WeakMap(), noteRuns = [], layoutBody = ((options) => {
|
|
@@ -2858,7 +3198,7 @@ function registerChart(def) {
|
|
|
2858
3198
|
let noteKey = JSON.stringify([...noted]), noteRun = variants.get(noteKey);
|
|
2859
3199
|
noteRun || (noteRun = prepareLegendLayout(def, data, origins), variants.set(noteKey, noteRun), noteRuns.push(noteRun)), next = noteRun(noteOptions);
|
|
2860
3200
|
}
|
|
2861
|
-
let
|
|
3201
|
+
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
3202
|
if (inA11y) {
|
|
2863
3203
|
let quiet = layoutWithLegendPolicy(def, data, inA11y);
|
|
2864
3204
|
quiet.refused || (next = quiet);
|
|
@@ -2876,7 +3216,7 @@ function registerChart(def) {
|
|
|
2876
3216
|
return { geo: geo2, noteRefused: !1 };
|
|
2877
3217
|
}, sClassMinimum = (minimum, size) => {
|
|
2878
3218
|
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;
|
|
3219
|
+
let at = Math.max(Math.ceil(minimum.minWidth), CARD_MIN_WIDTH), probe;
|
|
2880
3220
|
try {
|
|
2881
3221
|
probe = legendLayout(withoutForcedCompact({
|
|
2882
3222
|
...layoutOptions,
|
|
@@ -2888,7 +3228,7 @@ function registerChart(def) {
|
|
|
2888
3228
|
if (error instanceof NormalizeError) return minimum;
|
|
2889
3229
|
throw error;
|
|
2890
3230
|
}
|
|
2891
|
-
return probe.refused
|
|
3231
|
+
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
3232
|
}, geo = named(layoutOptions).geo;
|
|
2893
3233
|
if (geo.refused) {
|
|
2894
3234
|
if (densityFixed || isWidthProbe(def.type, options) || options[FIXED_SIZE_PROBE] === !0 || compactReplacesRefusal(def, options, data)) return geo;
|
|
@@ -2968,14 +3308,14 @@ function registerChart(def) {
|
|
|
2968
3308
|
severity: "warn",
|
|
2969
3309
|
message: `${truncated.length} placed label(s) omit text; the reading lists their full text in labelsTruncated`,
|
|
2970
3310
|
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;
|
|
3311
|
+
}), 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
3312
|
}), layout2 = ((options) => withSmallValues(prepared.smallValues, () => layoutBody(options)));
|
|
2973
3313
|
return layout2.finish = () => {
|
|
2974
3314
|
legendLayout.finish();
|
|
2975
3315
|
for (let run of noteRuns) run.finish();
|
|
2976
3316
|
noteRuns.length = 0, noteLayouts = /* @__PURE__ */ new WeakMap();
|
|
2977
3317
|
}, layout2;
|
|
2978
|
-
},
|
|
3318
|
+
}, widerForNames = (full, options, layoutOnce) => {
|
|
2979
3319
|
if (options?.[FIXED_SIZE_PROBE]) return;
|
|
2980
3320
|
let height = options?.size?.height === void 0 ? void 0 : full.size.height, width = full.size.width;
|
|
2981
3321
|
for (let step = 0; step < 3; step++) {
|
|
@@ -2994,12 +3334,12 @@ function registerChart(def) {
|
|
|
2994
3334
|
new Map(lost.map((label) => [label.id, label.text]))
|
|
2995
3335
|
);
|
|
2996
3336
|
}, layoutFitted = (data, options, layoutOnce) => {
|
|
2997
|
-
let full = layoutOnce(options)
|
|
2998
|
-
if (def.namesMustPrint === !0 && !full.refused && full.mode !== "compact" &&
|
|
3337
|
+
let full = layoutOnce(options);
|
|
3338
|
+
if (def.namesMustPrint === !0 && !full.refused && full.mode !== "compact" && lostCategoryNames(full).length > 0) {
|
|
2999
3339
|
let compact2 = compactFallbackApplies(def, options, data) ? layoutOnce({ ...options, [FORCE_COMPACT]: !0 }) : full;
|
|
3000
|
-
if (compact2 !== full && !isRefused(compact2) &&
|
|
3340
|
+
if (compact2 !== full && !isRefused(compact2) && lostCategoryNames(compact2).length === 0) return compact2;
|
|
3001
3341
|
let wider = widerForNames(full, options, layoutOnce);
|
|
3002
|
-
return wider || hiddenLabelCollision(def.title, full, new Map(
|
|
3342
|
+
return wider || hiddenLabelCollision(def.title, full, new Map(lostCategoryNames(full).map((label) => [label.id, label.text])));
|
|
3003
3343
|
}
|
|
3004
3344
|
if (!full.refused || full.warnings[0]?.code !== "size-below-floor") return full;
|
|
3005
3345
|
if (staticFrame.pinned && staticFrame.countable && options?.notes?.maxListed !== 0) {
|
|
@@ -3076,12 +3416,16 @@ function registerChart(def) {
|
|
|
3076
3416
|
let options = withDefaultTarget(authored);
|
|
3077
3417
|
return withLayoutMemo(() => {
|
|
3078
3418
|
let withCuts = (data2, options2) => withCutLabelNotes(data2, options2 ?? {}, (next) => layout(data2, next)), geo = loadedDeferred("footer")?.(withCuts, data, options, def.type) ?? withCuts(data, options);
|
|
3079
|
-
|
|
3419
|
+
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));
|
|
3420
|
+
let description = options?.a11y?.description;
|
|
3421
|
+
return description !== void 0 && !geo.refused && (geo.a11y.desc = description, geo.story && (geo.story.desc = description)), geo;
|
|
3080
3422
|
});
|
|
3081
3423
|
};
|
|
3082
3424
|
registry.set(def.type, { ...def, sizing, layout: layoutWithFooter, [LAYOUT_CALL]: createLayout });
|
|
3083
3425
|
for (let alias of aliases)
|
|
3084
3426
|
aliasIndex.set(alias, def.type);
|
|
3427
|
+
registryRevision += 1;
|
|
3428
|
+
for (let redraw of registryWaiting) redraw();
|
|
3085
3429
|
}
|
|
3086
3430
|
function verifiedDensityRefusal(geo, title, options, at) {
|
|
3087
3431
|
let refusal = geo.warnings[0];
|
|
@@ -3189,7 +3533,11 @@ function noPlottedValuesWarning(data) {
|
|
|
3189
3533
|
suggest: "supply the values, or leave the chart out until the data exists"
|
|
3190
3534
|
};
|
|
3191
3535
|
}
|
|
3536
|
+
function chartInputName(name) {
|
|
3537
|
+
return registry.has(name) || aliasIndex.has(name) || schemaIndex.has(name) || schemaAliasIndex.has(name) ? name : caseInsensitiveValue(name, [...registry.keys(), ...aliasIndex.keys(), ...schemaIndex.keys(), ...schemaAliasIndex.keys()]);
|
|
3538
|
+
}
|
|
3192
3539
|
function getChart(typeOrAlias) {
|
|
3540
|
+
typeOrAlias = chartInputName(typeOrAlias) ?? typeOrAlias;
|
|
3193
3541
|
let chart = registry.get(typeOrAlias) ?? registry.get(aliasIndex.get(typeOrAlias) ?? ""), defaults = chart?.aliasDefaults?.[typeOrAlias];
|
|
3194
3542
|
return !chart || !defaults ? chart : {
|
|
3195
3543
|
...chart,
|
|
@@ -3214,6 +3562,7 @@ function registerChartSchemas(schemas, aliases = []) {
|
|
|
3214
3562
|
}
|
|
3215
3563
|
}
|
|
3216
3564
|
function getChartSchemas(typeOrAlias) {
|
|
3565
|
+
typeOrAlias = chartInputName(typeOrAlias) ?? typeOrAlias;
|
|
3217
3566
|
let chart = getChart(typeOrAlias);
|
|
3218
3567
|
return chart && isDefinition(chart) ? chart : schemaIndex.get(typeOrAlias) ?? schemaIndex.get(schemaAliasIndex.get(typeOrAlias) ?? "");
|
|
3219
3568
|
}
|
|
@@ -3253,7 +3602,12 @@ var unsupported = [
|
|
|
3253
3602
|
export {
|
|
3254
3603
|
themeGeometryTokens,
|
|
3255
3604
|
presentationInfo,
|
|
3605
|
+
caseInsensitiveValue,
|
|
3606
|
+
inputConversion,
|
|
3607
|
+
replaceInputValue,
|
|
3256
3608
|
crowdedTailCut,
|
|
3609
|
+
COMBO_LIMIT,
|
|
3610
|
+
checkPointBudget,
|
|
3257
3611
|
typeDocLints,
|
|
3258
3612
|
themeForDensity,
|
|
3259
3613
|
AUTO_LEGEND,
|
|
@@ -3268,6 +3622,8 @@ export {
|
|
|
3268
3622
|
MONTH_START,
|
|
3269
3623
|
isDateNumericTickSequence,
|
|
3270
3624
|
applyAxisBounds,
|
|
3625
|
+
shownTickStep,
|
|
3626
|
+
applyTickStep,
|
|
3271
3627
|
niceStep,
|
|
3272
3628
|
niceDomain,
|
|
3273
3629
|
axisGrid,
|
|
@@ -3296,7 +3652,10 @@ export {
|
|
|
3296
3652
|
measureValueAxisWidth,
|
|
3297
3653
|
withCalendarLabels,
|
|
3298
3654
|
noteName,
|
|
3655
|
+
onChartRegistered,
|
|
3656
|
+
chartRegistryRevision,
|
|
3299
3657
|
registerChart,
|
|
3658
|
+
chartInputName,
|
|
3300
3659
|
getChart,
|
|
3301
3660
|
getChartDefinition,
|
|
3302
3661
|
registerChartSchemas,
|
|
@@ -3312,9 +3671,10 @@ export {
|
|
|
3312
3671
|
dayUnit,
|
|
3313
3672
|
calendarCategories,
|
|
3314
3673
|
calendarNames,
|
|
3315
|
-
|
|
3674
|
+
authoredDateTicks,
|
|
3316
3675
|
dayCategories,
|
|
3317
3676
|
longDayMonths,
|
|
3677
|
+
CROWDED_NAMES,
|
|
3318
3678
|
CATEGORY_ROW_FROM_END,
|
|
3319
3679
|
CATEGORY_ROW_VERTICAL,
|
|
3320
3680
|
yearRowRequests,
|
|
@@ -3329,6 +3689,10 @@ export {
|
|
|
3329
3689
|
rotatedClaimRect,
|
|
3330
3690
|
rotatedLeftOverhang,
|
|
3331
3691
|
verticalNameRect,
|
|
3692
|
+
tallestContentHeight,
|
|
3693
|
+
rowDrivenHeight,
|
|
3694
|
+
fixedHeightCanvas,
|
|
3695
|
+
spareShare,
|
|
3332
3696
|
CARD_MIN_WIDTH,
|
|
3333
3697
|
CARD_CLASS_WIDTH,
|
|
3334
3698
|
SIZE_TOLERANCE,
|