boardplot 0.52.5 → 0.54.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 +58 -0
- package/README.md +13 -12
- package/dist/{ReaderBox-VUNSFKZY.js → ReaderBox-YXC5XK7D.js} +6 -5
- package/dist/{annotateEngine-H7OW4H3W.js → annotateEngine-5O3IRSQL.js} +3 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-ZSLGN6CO.js → chunk-23RWLBZF.js} +1 -1
- package/dist/{chunk-HAAUJDGB.js → chunk-24BHMKDD.js} +2 -2
- package/dist/{chunk-MDYLOIS2.js → chunk-26P4WRQC.js} +1 -1
- package/dist/{chunk-EWVKBRLV.js → chunk-2DR5MMDY.js} +2 -2
- package/dist/{chunk-3ZCKEANJ.js → chunk-2HXKW6U6.js} +3 -3
- package/dist/{chunk-GWQIXU37.js → chunk-2IXDYW6O.js} +30 -28
- package/dist/{chunk-OLNORNCT.js → chunk-2THWIKRB.js} +4 -4
- package/dist/{chunk-JRPI64AQ.js → chunk-32X7JGH3.js} +18 -15
- package/dist/{chunk-PUVGWJQ5.js → chunk-35ZTANEK.js} +4 -4
- package/dist/{chunk-FOKEGVPB.js → chunk-3CLLHMFF.js} +3 -3
- package/dist/{chunk-XYONCO5Q.js → chunk-3FNY7ZCG.js} +19 -16
- package/dist/{chunk-X7TXGKRX.js → chunk-3P4PJJND.js} +6 -6
- package/dist/{chunk-4DNOEV3Q.js → chunk-3RMTPAEJ.js} +79 -2
- package/dist/{chunk-NYEY6W5R.js → chunk-3UBTO342.js} +8 -8
- package/dist/{chunk-MCOIEWW6.js → chunk-3V7AA3IZ.js} +1 -1
- package/dist/{chunk-RJQ5YS3Q.js → chunk-43OQ26TL.js} +10 -6
- package/dist/{chunk-V422EKLW.js → chunk-46ZPFJAM.js} +3 -3
- package/dist/{chunk-W7UZXD5D.js → chunk-47BO6MYI.js} +18 -15
- package/dist/{chunk-5T5YW52S.js → chunk-4FFCIQDG.js} +1 -1
- package/dist/{chunk-KU4YS6HN.js → chunk-4MREJWRM.js} +1 -1
- package/dist/{chunk-IDTLHPTK.js → chunk-4TPHMIE5.js} +2 -2
- package/dist/{chunk-2MTWKMEG.js → chunk-4WK3CNW5.js} +13 -6
- package/dist/{chunk-ORUJI3VB.js → chunk-4WQ2MBE7.js} +1 -1
- package/dist/chunk-4ZGN4ZUN.js +164 -0
- package/dist/{chunk-YQ2B3YVF.js → chunk-53OYF4ZT.js} +1 -1
- package/dist/{chunk-JL5BRMDT.js → chunk-57ZGVAU3.js} +1 -1
- package/dist/{chunk-VYMGZ27S.js → chunk-5A6MO4AR.js} +3 -2
- package/dist/{chunk-WHSTEAVP.js → chunk-5PCCSSII.js} +1 -1
- package/dist/{chunk-Z256ACGC.js → chunk-5SJQOPL7.js} +2 -2
- package/dist/{chunk-RNOD2UWF.js → chunk-6BJQULXR.js} +12 -12
- package/dist/{chunk-2DHJJ2EN.js → chunk-6BWSF5PS.js} +3 -3
- package/dist/{chunk-CAE2HK2G.js → chunk-6I7YZTY7.js} +3 -11
- package/dist/{chunk-XW5J5JAX.js → chunk-6K2TMVPF.js} +2 -2
- package/dist/{chunk-IZ35GMGB.js → chunk-6NLH6TEP.js} +13 -10
- package/dist/{chunk-TTR7EWNH.js → chunk-6TJDWMZV.js} +4 -4
- package/dist/{chunk-KSYVTEKR.js → chunk-6ZXMA4TY.js} +3 -3
- package/dist/{chunk-OH7FA4TF.js → chunk-7EOLHBI6.js} +1 -1
- package/dist/{chunk-3W23F7EY.js → chunk-7EVIIADO.js} +1 -1
- package/dist/{chunk-EC2NAYPQ.js → chunk-7HFUG25L.js} +3 -3
- package/dist/{chunk-DLC23CKC.js → chunk-7JQAUJOL.js} +1 -1
- package/dist/{chunk-3I6RANBJ.js → chunk-7NWFKHSG.js} +36 -32
- package/dist/{chunk-RNXITK5M.js → chunk-7R5EV5MS.js} +3 -3
- package/dist/{chunk-ELYU6TRQ.js → chunk-7X3UZM7F.js} +1 -1
- package/dist/{chunk-UZF3G2FN.js → chunk-A5TY7H5T.js} +5 -5
- package/dist/{chunk-XEGRWWNO.js → chunk-AA4U62G6.js} +2 -2
- package/dist/{chunk-TXINIAFL.js → chunk-AG2CJ4JY.js} +10 -5
- package/dist/{chunk-R5SWC3EW.js → chunk-AHQ4L3BE.js} +1 -1
- package/dist/{chunk-35DZP2R2.js → chunk-AJHYXD5U.js} +2 -2
- package/dist/{chunk-TPYV2FTV.js → chunk-ATUZTGZI.js} +3 -3
- package/dist/{chunk-S53OGZL6.js → chunk-AVMKRVNP.js} +1 -1
- package/dist/{chunk-R3WI7ZLE.js → chunk-AZIRTSVP.js} +14 -11
- package/dist/{chunk-II7652VA.js → chunk-B3F4TS3V.js} +47 -20
- package/dist/{chunk-DCCJRLAJ.js → chunk-B6LHZLLK.js} +5 -0
- package/dist/{chunk-M6KTNAND.js → chunk-BRPOSOK5.js} +17 -11
- package/dist/{chunk-EQT3EPTB.js → chunk-BWTX7LUG.js} +1 -1
- package/dist/{chunk-BVWU6GOB.js → chunk-BXEM2CVW.js} +2 -2
- package/dist/{chunk-A7A4PDG5.js → chunk-BYD7VLAI.js} +3 -3
- package/dist/{chunk-JFG4DHKQ.js → chunk-C3O45JWU.js} +1 -1
- package/dist/{chunk-BKYMLFUG.js → chunk-C54QLNE4.js} +1 -1
- package/dist/{chunk-7JVAQX6C.js → chunk-CEY646NZ.js} +4 -4
- package/dist/{chunk-GZ4RHGIW.js → chunk-CICWSCLC.js} +19 -19
- package/dist/{chunk-QHFQHQDC.js → chunk-CPKHL7FK.js} +2 -2
- package/dist/{chunk-NXNQQ3DS.js → chunk-D3D7XHBI.js} +7 -14
- package/dist/{chunk-RSWVH7DB.js → chunk-D7GZPMHW.js} +3 -3
- package/dist/chunk-DAVHGK27.js +657 -0
- package/dist/{chunk-7VXZDB45.js → chunk-DDI2W4TR.js} +1 -1
- package/dist/{chunk-JLCAWQ3H.js → chunk-DHWCFQNO.js} +3 -3
- package/dist/{chunk-GQS46LC3.js → chunk-DSZUV3TM.js} +11 -3
- package/dist/{chunk-H57TJD3B.js → chunk-E42JZ2DA.js} +1 -1
- package/dist/{chunk-YTSSXSZR.js → chunk-E64MTTBC.js} +3 -3
- package/dist/{chunk-NT3HAZYT.js → chunk-EHDWWFNV.js} +1 -1
- package/dist/{chunk-FT3F72C3.js → chunk-EHVESNLV.js} +1 -1
- package/dist/{chunk-W2RGSGRR.js → chunk-ELPQZIGR.js} +13 -10
- package/dist/{chunk-7IFLQMJL.js → chunk-ENOCOA3F.js} +5 -4
- package/dist/{chunk-KPMGGE4W.js → chunk-EP54VZI5.js} +1 -1
- package/dist/{chunk-QG6MOQLI.js → chunk-EYLWVI26.js} +17 -14
- package/dist/{chunk-NEVSQGOI.js → chunk-EYZ6SLF3.js} +2 -2
- package/dist/{chunk-HFG76JTS.js → chunk-F35DA442.js} +3 -3
- package/dist/{chunk-A372DLQX.js → chunk-F7X53SZM.js} +3 -3
- package/dist/{chunk-PTVOXB5T.js → chunk-FHA3KMFC.js} +6 -2
- package/dist/{chunk-S4F27M7N.js → chunk-FILDYFT4.js} +2 -2
- package/dist/{chunk-WMJPFLF3.js → chunk-FMFCGYCE.js} +29 -25
- package/dist/{chunk-TPZB2YWR.js → chunk-FPPN5NAR.js} +2 -2
- package/dist/{chunk-5DJXJXDE.js → chunk-FV32N6AF.js} +1 -1
- package/dist/{chunk-MJMJEURO.js → chunk-G57ZO7DB.js} +10 -10
- package/dist/{chunk-WDUNR2VI.js → chunk-G63ROSY5.js} +22 -19
- package/dist/{chunk-V4VC25UL.js → chunk-G6XCUX3I.js} +4 -4
- package/dist/{chunk-JLZM7XMZ.js → chunk-GEBGBJBD.js} +14 -11
- package/dist/{chunk-FT47HQ5U.js → chunk-GGO43PHB.js} +4 -4
- package/dist/{chunk-XDLQRSSH.js → chunk-GSMWHKOW.js} +2 -2
- package/dist/{chunk-2JAWQ7VV.js → chunk-GVKFFJ23.js} +11 -10
- package/dist/{chunk-Q6XJOJTY.js → chunk-GYNZ72GO.js} +2 -2
- package/dist/{chunk-WRHFBCVY.js → chunk-H4SYN3QA.js} +3 -3
- package/dist/{chunk-MEISCROL.js → chunk-HC4NDND6.js} +3 -3
- package/dist/{chunk-I322G5UG.js → chunk-HDZGZJKR.js} +17 -14
- package/dist/{chunk-3GZECHOK.js → chunk-HGGLJYPZ.js} +12 -12
- package/dist/{chunk-B67K5X4M.js → chunk-HHS6333D.js} +1 -1
- package/dist/{chunk-6UBEGKIQ.js → chunk-HNVW3YDS.js} +3 -3
- package/dist/{chunk-GZ2VNM4L.js → chunk-HW7BPJNQ.js} +3 -3
- package/dist/{chunk-NG5IGZXC.js → chunk-HZG5NB7Q.js} +23 -20
- package/dist/{chunk-S7VDRUED.js → chunk-HZZH3MQI.js} +1 -1
- package/dist/{chunk-CS4DHFNG.js → chunk-I2E3YDNZ.js} +3 -3
- package/dist/{chunk-YAYRRKC7.js → chunk-I5L3QTKQ.js} +3 -3
- package/dist/{chunk-KYELSLDJ.js → chunk-IDT7DJ7F.js} +1 -1
- package/dist/{chunk-JETXFF3M.js → chunk-IK4BHOPZ.js} +1 -1
- package/dist/{chunk-GDQ3NGDZ.js → chunk-IM4WUIR7.js} +2 -2
- package/dist/chunk-IMJXJHFW.js +88 -0
- package/dist/{chunk-5C7TWNYZ.js → chunk-ISWU5YB3.js} +1 -1
- package/dist/{chunk-5KWXRYAT.js → chunk-J2ROMB7J.js} +17 -11
- package/dist/{chunk-WJMUMN3I.js → chunk-J33RA3YO.js} +2 -2
- package/dist/{chunk-627P6T25.js → chunk-JAKRPSWP.js} +21 -18
- package/dist/{chunk-PEN2DK7T.js → chunk-JB4YPOMT.js} +2 -2
- package/dist/{chunk-YP3I6W7T.js → chunk-JDEVGTSX.js} +3 -3
- package/dist/{chunk-JSX3C6LL.js → chunk-JEL6665C.js} +5 -5
- package/dist/{chunk-DFKTS6XJ.js → chunk-JEYJRJ7M.js} +1 -1
- package/dist/{chunk-JA755JHN.js → chunk-JJJ2KAHR.js} +10 -7
- package/dist/{chunk-SGSPYHFE.js → chunk-JTJNQKPM.js} +8 -5
- package/dist/{chunk-DGDOGOTQ.js → chunk-K2KU4HHT.js} +3 -3
- package/dist/{chunk-CRZKGHZ6.js → chunk-K4K6KGEF.js} +17 -19
- package/dist/{chunk-QVABTUDS.js → chunk-K4RCWNLC.js} +7 -7
- package/dist/{chunk-GULJ6KVT.js → chunk-KAQH75T6.js} +14 -14
- package/dist/{chunk-2UVTHU7A.js → chunk-KBFPMESI.js} +37 -27
- package/dist/{chunk-S5ADHIZK.js → chunk-KFWEO4UA.js} +28 -25
- package/dist/{chunk-MIXKQJ64.js → chunk-KJEZFOO6.js} +18 -18
- package/dist/{chunk-NLOMCLKI.js → chunk-KL2XJQAA.js} +8 -8
- package/dist/{chunk-2AKWCMS4.js → chunk-KNZD53L4.js} +3 -3
- package/dist/{chunk-DVKBU23L.js → chunk-KORHKDJW.js} +1 -1
- package/dist/{chunk-NMCOUVN5.js → chunk-KSQEG6DX.js} +3 -3
- package/dist/{chunk-TVHLKVUO.js → chunk-KVSJ2O4Q.js} +3 -3
- package/dist/{chunk-XTNV2YMB.js → chunk-L3JWM7FR.js} +1 -1
- package/dist/{chunk-IZCOG3FS.js → chunk-L7FSCT4M.js} +4 -4
- package/dist/{chunk-Z5VSLLNY.js → chunk-L7RHB734.js} +1 -1
- package/dist/{chunk-B2EBEXIS.js → chunk-LFX7W4B7.js} +1 -1
- package/dist/chunk-LINZPU5D.js +8 -0
- package/dist/{chunk-COKHNEJP.js → chunk-LMPZKCDM.js} +3 -3
- package/dist/{chunk-ZVTFZF4V.js → chunk-LTMF75MR.js} +8 -8
- package/dist/{chunk-A6XCAQ52.js → chunk-LVXOY5WL.js} +7 -6
- package/dist/{chunk-3HHNQPAH.js → chunk-LYVOL4TQ.js} +1 -1
- package/dist/{chunk-HJXXFPOL.js → chunk-MBVXROCI.js} +2 -2
- package/dist/{chunk-76ANFJOI.js → chunk-MCYM3RNF.js} +1 -1
- package/dist/{chunk-F77BNDAT.js → chunk-MEG4NMSI.js} +2 -2
- package/dist/{chunk-C64FBRJO.js → chunk-MKVV7GVJ.js} +5 -5
- package/dist/{chunk-XPWRD424.js → chunk-MONVTUHR.js} +3 -3
- package/dist/{chunk-YI2ZVTCB.js → chunk-MT4MP3UZ.js} +1 -1
- package/dist/{chunk-V4DYVLOO.js → chunk-MYCLO35J.js} +5 -5
- package/dist/{chunk-4SM2ONUC.js → chunk-MZJBPDIL.js} +1 -1
- package/dist/{chunk-CYDZP5W6.js → chunk-NGRIT3CY.js} +26 -23
- package/dist/{chunk-2SGIHKKU.js → chunk-NQSDIDRO.js} +1 -1
- package/dist/{chunk-WVSNSWBJ.js → chunk-NRF223FR.js} +1 -1
- package/dist/{chunk-QXILAMAU.js → chunk-NRHTC2SQ.js} +1 -1
- package/dist/{chunk-H7UZZ7KP.js → chunk-NWQTSZYC.js} +3 -3
- package/dist/{chunk-OAPCJO6W.js → chunk-O3VN6BTL.js} +1 -0
- package/dist/{chunk-LO2DANS6.js → chunk-OD3IH6FG.js} +5 -5
- package/dist/{chunk-S62M63LU.js → chunk-OM67S6S4.js} +3 -3
- package/dist/{chunk-UEU46Q3D.js → chunk-OMNQXHFF.js} +7 -7
- package/dist/{chunk-HZQEQ34U.js → chunk-OMVYFSOM.js} +3 -3
- package/dist/{chunk-COYPDRJK.js → chunk-OTW5SEFS.js} +2 -2
- package/dist/{chunk-GH3ZMBFX.js → chunk-OU5K2JPF.js} +11 -11
- package/dist/{chunk-AZOUSKZD.js → chunk-OURX73UJ.js} +1 -1
- package/dist/{chunk-27QQEWNV.js → chunk-OZUTYDV4.js} +2 -2
- package/dist/{chunk-TSR5YDPS.js → chunk-P52JHUUM.js} +23 -20
- package/dist/{chunk-YFG4E3N2.js → chunk-PBYUJSEY.js} +14 -14
- package/dist/{chunk-A3ULWR5N.js → chunk-PDG4IM3L.js} +1 -1
- package/dist/{chunk-AFK47A6O.js → chunk-PGV25HTX.js} +3 -3
- package/dist/{chunk-A5JWFZVU.js → chunk-PJWLKCFX.js} +80 -81
- package/dist/{chunk-MNJ2DHU6.js → chunk-QJ4WGAC6.js} +8 -8
- package/dist/{chunk-VB2MJLET.js → chunk-QQNPU27R.js} +1 -1
- package/dist/{chunk-6JUJ2DU3.js → chunk-QR35TD2B.js} +37 -37
- package/dist/{chunk-LC3PSQJJ.js → chunk-QY5ZKUWY.js} +1 -1
- package/dist/{chunk-ASAON7G4.js → chunk-RGZGLKFB.js} +4 -4
- package/dist/{chunk-S4ONWRJE.js → chunk-RK4S3VPS.js} +2 -2
- package/dist/{chunk-TXZBBZOG.js → chunk-RKITD2UJ.js} +2 -2
- package/dist/{chunk-ETHWK2RZ.js → chunk-RNOJSEES.js} +1 -1
- package/dist/{chunk-PGIQMQRU.js → chunk-RZB4RPPD.js} +228 -95
- package/dist/{chunk-XO5ONLVM.js → chunk-S32YYDIB.js} +1 -1
- package/dist/{chunk-QN6JHMGU.js → chunk-S4QSJAGY.js} +1 -1
- package/dist/{chunk-IXSZ7OKR.js → chunk-S6CRZKPO.js} +1 -1
- package/dist/{chunk-YHTO46W2.js → chunk-SFQ5ADIG.js} +35 -31
- package/dist/{chunk-Y4PXIJMD.js → chunk-SHH2AHIU.js} +14 -14
- package/dist/{chunk-HUF6TQ2J.js → chunk-SZCPKGYG.js} +3 -3
- package/dist/{chunk-K2HNV4LE.js → chunk-T3PNYRDM.js} +12 -12
- package/dist/{chunk-QNHZXFRA.js → chunk-T7ZCYYQZ.js} +3 -3
- package/dist/{chunk-JY4R3GML.js → chunk-TKQKXBGC.js} +1 -1
- package/dist/{chunk-XDS4UZGR.js → chunk-TNHD4UTC.js} +3 -3
- package/dist/{chunk-FGAGGPFF.js → chunk-TNNK4IIY.js} +8 -8
- package/dist/{chunk-LC6DYCTG.js → chunk-TSPWXAAI.js} +1 -1
- package/dist/{chunk-HX3MQ3H4.js → chunk-U2ES66IN.js} +3 -3
- package/dist/{chunk-MFLH5ZDQ.js → chunk-U2HQELXL.js} +2 -2
- package/dist/{chunk-SXGTRZFN.js → chunk-U4P6TQRW.js} +3 -2
- package/dist/{chunk-KFFNCDX6.js → chunk-U6CJPTOB.js} +3 -3
- package/dist/{chunk-GQPESFAF.js → chunk-U7LLQ7XM.js} +11 -11
- package/dist/{chunk-IN4QT33I.js → chunk-ULTSSIOU.js} +1 -1
- package/dist/{chunk-HUFCSX2Y.js → chunk-UTQGZF37.js} +17 -6
- package/dist/{chunk-CCQNL33L.js → chunk-UYNAL3Y3.js} +9 -9
- package/dist/{chunk-7QDAHY5M.js → chunk-V7RAPZHX.js} +2 -2
- package/dist/{chunk-6XE3GVGU.js → chunk-VAEC53B3.js} +3 -2
- package/dist/{chunk-YKO3VCTF.js → chunk-VDVXGAIP.js} +3 -3
- package/dist/{chunk-WYJMV62X.js → chunk-VGWWUCAB.js} +3 -3
- package/dist/{chunk-5ENRZX6I.js → chunk-VNLSTZES.js} +19 -16
- package/dist/{chunk-D4BIV6WG.js → chunk-VWYUUBBP.js} +19 -16
- package/dist/{chunk-JMH5MD5A.js → chunk-WDONXBQE.js} +1 -1
- package/dist/{chunk-62FR4FYJ.js → chunk-WEPAE4KG.js} +2 -2
- package/dist/{chunk-A5LZUYK4.js → chunk-WGIO6AHP.js} +3 -2
- package/dist/{chunk-UQSVWO7Z.js → chunk-WJKVNRCR.js} +8 -7
- package/dist/{chunk-24WB3HMB.js → chunk-WKWMOZNE.js} +22 -7
- package/dist/{chunk-V667FCIJ.js → chunk-WMZCOGD6.js} +1 -1
- package/dist/{chunk-33CBPK5Q.js → chunk-WQ55QPEB.js} +51 -45
- package/dist/{chunk-SLTMRTXV.js → chunk-WUKSZNHL.js} +15 -12
- package/dist/{chunk-QETGGFH2.js → chunk-WZBMTZBM.js} +3 -3
- package/dist/{chunk-XY5O74BH.js → chunk-X4U6PT3Z.js} +3 -3
- package/dist/{chunk-E2HEVF23.js → chunk-XNA6DATU.js} +10 -10
- package/dist/{chunk-ALKTNXMR.js → chunk-XTGWCYAR.js} +37 -37
- package/dist/{chunk-3XQ635KD.js → chunk-XXNLNZ7E.js} +3 -3
- package/dist/{chunk-YEDYBMCW.js → chunk-YF2PYLC4.js} +1 -1
- package/dist/{chunk-ZJKOLOVF.js → chunk-YS56RSTZ.js} +26 -20
- package/dist/{chunk-RTJXOIIQ.js → chunk-YWP7XFKD.js} +1 -1
- package/dist/{chunk-ATTE3FYC.js → chunk-ZBJNEJSL.js} +3 -3
- package/dist/{chunk-A2FHZH7E.js → chunk-ZNHF2XCP.js} +35 -21
- package/dist/{chunk-ERAIVAK5.js → chunk-ZTH6YSVA.js} +37 -4
- package/dist/{chunk-KS7DXCXH.js → chunk-ZWJTHFWB.js} +3 -3
- package/dist/{chunk-EKQMYG2B.js → chunk-ZXOD37BE.js} +18 -18
- package/dist/cli/index.js +2 -2
- package/dist/{core-5Z6UW5DS.js → core-34KIMTK6.js} +2 -1
- package/dist/{core-XXIOJY2X.js → core-3CWPIFAL.js} +3 -1
- package/dist/{core-WLVU2HWX.js → core-7R3ARYNI.js} +3 -1
- package/dist/{core-DU77ZYPR.js → core-7YKLT7KY.js} +3 -1
- package/dist/{core-QUYSNTC7.js → core-AEYGGH7X.js} +3 -1
- package/dist/{core-CPN2HF75.js → core-ASBJZZTP.js} +2 -1
- package/dist/{core-JQV7STNF.js → core-CJ7FFPDU.js} +3 -1
- package/dist/{core-PL64QPOH.js → core-CJZXX2V3.js} +3 -1
- package/dist/{core-T5Q4DSH2.js → core-DAFZ7YJW.js} +2 -1
- package/dist/{core-RUA3EWW3.js → core-DJPGSTXB.js} +3 -1
- package/dist/{core-KBH3EJZV.js → core-DKJUX7Q4.js} +2 -1
- package/dist/{core-FFLPH5XK.js → core-EAIFSTDE.js} +3 -1
- package/dist/{core-E6YD7VU4.js → core-GEUPUZUY.js} +3 -1
- package/dist/{core-OK2ZY5OJ.js → core-JLJTP7P6.js} +2 -1
- package/dist/{core-RY6IFRKM.js → core-JLXFDYHX.js} +3 -1
- package/dist/{core-ZH7XTJTD.js → core-KCORN7F7.js} +3 -1
- package/dist/{core-IZVZ2B7Y.js → core-KF6GJOGW.js} +2 -1
- package/dist/{core-DBRILYNB.js → core-KII4CH3W.js} +2 -1
- package/dist/{core-TJX3I7KH.js → core-KZK3WCUG.js} +3 -1
- package/dist/{core-RE3L6YCM.js → core-L5KTPXHC.js} +2 -1
- package/dist/{core-CS7AKNME.js → core-L7Y7YXWR.js} +2 -1
- package/dist/{core-IV26EL5C.js → core-MN45UFF4.js} +3 -1
- package/dist/{core-PVINU5JJ.js → core-MNUVP5IJ.js} +3 -1
- package/dist/{core-OW5V74Q4.js → core-O2K4BDYH.js} +3 -1
- package/dist/{core-ZHE7N4NS.js → core-ONNGSKWQ.js} +3 -1
- package/dist/{core-KFBW5PRT.js → core-PFXIBWLD.js} +3 -1
- package/dist/{core-ZJYLJWZQ.js → core-QXIAQFHM.js} +2 -1
- package/dist/{core-KWGXHBJE.js → core-R27R6J5M.js} +3 -1
- package/dist/{core-OV5MPTZP.js → core-RCFFJANI.js} +3 -1
- package/dist/{core-WQPHNVNY.js → core-RGLOYY73.js} +3 -1
- package/dist/{core-SE67HHFG.js → core-V7I4F6JW.js} +3 -1
- package/dist/{core-6LLJNZ4O.js → core-W7AZNHOX.js} +3 -1
- package/dist/{core-MZMR2DF4.js → core-WHI4ABF2.js} +2 -1
- package/dist/{core-6ANZ2OWO.js → core-WJSKT5XM.js} +2 -1
- package/dist/{core-EE55P6XK.js → core-XKV7GMPG.js} +3 -1
- package/dist/{core-ULUA5ZB2.js → core-YPH723Z7.js} +3 -1
- package/dist/{core-SCWEVNUY.js → core-YVNOHIQ4.js} +3 -1
- package/dist/{dataTable-IL7HVDHL.js → dataTable-VKEHFLJM.js} +3 -2
- package/dist/{engine-MYLZI5VH.js → engine-PPXKJJFI.js} +12 -11
- package/dist/fixtures.js +3 -1
- package/dist/{fontTables-ZYBUCJ5N.js → fontTables-WYCZNRE7.js} +1 -1
- package/dist/fonts.js +1 -1
- package/dist/index.js +21 -19
- package/dist/{main-ISJ53IS5.js → main-53MXACOU.js} +12 -10
- package/dist/mcp/server.js +18 -15
- package/dist/react/bar.js +3 -1
- package/dist/react/bartable.js +2 -1
- package/dist/react/box.js +3 -1
- package/dist/react/bullet.js +3 -1
- package/dist/react/butterfly.js +3 -1
- package/dist/react/choropleth.js +2 -1
- package/dist/react/cohort.js +3 -1
- package/dist/react/column.js +3 -1
- package/dist/react/combo.js +3 -1
- package/dist/react/creative.js +2 -1
- package/dist/react/diagram.js +2 -1
- package/dist/react/dimswitch.js +3 -1
- package/dist/react/dot.js +3 -1
- package/dist/react/export.js +20 -18
- package/dist/react/funnel.js +3 -1
- package/dist/react/gantt.js +2 -1
- package/dist/react/grid.js +3 -1
- package/dist/react/heatmap.js +3 -1
- package/dist/react/histogram.js +3 -1
- package/dist/react/index.js +86 -84
- package/dist/react/kpi.js +2 -1
- package/dist/react/likert.js +3 -1
- package/dist/react/line.js +3 -1
- package/dist/react/mekko.js +3 -1
- package/dist/react/pareto.js +3 -1
- package/dist/react/pie.js +3 -1
- package/dist/react/prepare.js +20 -18
- package/dist/react/pvm.js +3 -1
- package/dist/react/pyramid.js +3 -1
- package/dist/react/sankey.js +2 -1
- package/dist/react/scatter.js +3 -1
- package/dist/react/slope.js +3 -1
- package/dist/react/sparkline.js +2 -1
- package/dist/react/spec.js +36 -26
- package/dist/react/status.js +2 -1
- package/dist/react/story.js +4 -3
- package/dist/react/table.js +3 -1
- package/dist/react/theme.js +4 -3
- package/dist/react/tilemap.js +2 -1
- package/dist/react/treemap.js +2 -1
- package/dist/react/variance.js +3 -1
- package/dist/react/waffle.js +2 -1
- package/dist/react/waterfall.js +3 -1
- package/dist/rows.js +2 -2
- package/dist/{rowsModule-3Y4I3M3E.js → rowsModule-L3MBGPBH.js} +2 -1
- package/dist/{schema-STGL44TL.js → schema-26YUL3MG.js} +4 -1
- package/dist/{schema-5YTNQ6JY.js → schema-33ZF6WKL.js} +4 -1
- package/dist/{schema-E6YOSOWB.js → schema-3W7IFXVN.js} +3 -1
- package/dist/{schema-G4KFMQBL.js → schema-4ZXJCRZR.js} +4 -1
- package/dist/{schema-QJJPRRE7.js → schema-5E5J43CF.js} +4 -1
- package/dist/{schema-34ZELWRQ.js → schema-6ZV532RM.js} +4 -1
- package/dist/{schema-P63S63GE.js → schema-733PO52K.js} +4 -1
- package/dist/{schema-QEVSIMGO.js → schema-AQD3H5VV.js} +4 -1
- package/dist/{schema-EVLLL5UF.js → schema-B4GFRYIP.js} +4 -1
- package/dist/{schema-EQQB43AY.js → schema-CMXL5F5L.js} +4 -1
- package/dist/{schema-IF5N3J56.js → schema-FT37ZEYY.js} +4 -1
- package/dist/{schema-2GUBWOBC.js → schema-GK6MD4EG.js} +4 -1
- package/dist/{schema-MEAFRXVH.js → schema-GSE3QXUK.js} +4 -2
- package/dist/{schema-4735XAZX.js → schema-GVHM2HEF.js} +4 -1
- package/dist/{schema-E2ISJ65D.js → schema-H7RKVTVO.js} +4 -1
- package/dist/{schema-XYYDUUHS.js → schema-HGUBNXUY.js} +4 -1
- package/dist/{schema-KFC4WYH4.js → schema-HRHNGOFC.js} +3 -1
- package/dist/{schema-PNC3Z7AH.js → schema-HWU55RJL.js} +4 -1
- package/dist/{schema-3BHL2B76.js → schema-IOKAZVL7.js} +4 -1
- package/dist/{schema-7J3NAIN2.js → schema-IOWE3RQO.js} +4 -1
- package/dist/{schema-2BMZOHXI.js → schema-KFXLS67Q.js} +4 -1
- package/dist/{schema-EYQ5IBLF.js → schema-KH62LDYK.js} +4 -1
- package/dist/{schema-S3EQKVOT.js → schema-KHCLVE2V.js} +4 -1
- package/dist/{schema-PA2MXYY4.js → schema-KORNUIC6.js} +4 -1
- package/dist/{schema-AOJJ7JZB.js → schema-LYBOPAGQ.js} +4 -1
- package/dist/{schema-GH7IKSOU.js → schema-MNG24WU2.js} +4 -1
- package/dist/{schema-PDZ6256H.js → schema-NOPOI5G2.js} +4 -1
- package/dist/{schema-T4NE2EAO.js → schema-PNUC54GC.js} +4 -1
- package/dist/{schema-P7LJFJAJ.js → schema-Q4IPIR6W.js} +4 -1
- package/dist/{schema-TQYTESG3.js → schema-QLH2DZFI.js} +4 -1
- package/dist/{schema-D3RCMN3T.js → schema-QNI6MNQ2.js} +4 -1
- package/dist/{schema-W376PAJG.js → schema-SLQPM32G.js} +4 -1
- package/dist/{schema-EYZVD73N.js → schema-SY3MKF5S.js} +4 -1
- package/dist/{schema-JJYJOQTT.js → schema-WAKLKLBB.js} +4 -1
- package/dist/{schema-IG7JIR4H.js → schema-WCDYWS4K.js} +4 -1
- package/dist/{schema-CVMV4LRA.js → schema-ZCZCY34J.js} +4 -1
- package/dist/{schema-L7263JMT.js → schema-ZSYX76MO.js} +4 -1
- package/dist/{specValidation-NVBIZMEE.js → specValidation-H5B4MQST.js} +3 -1
- package/dist/theme.js +3 -2
- package/dist/{themeShapeRules-5C2463YH.js → themeShapeRules-54U5EIZR.js} +1 -1
- package/dist/types/core/annotateEngine.d.ts +14 -0
- package/dist/types/core/charts/gantt/layout.d.ts +7 -0
- package/dist/types/core/charts/grid/schema.d.ts +1 -1
- package/dist/types/core/deferred.d.ts +6 -1
- package/dist/types/core/formatSpec.d.ts +2 -0
- package/dist/types/core/label/solver.d.ts +5 -1
- package/dist/types/core/rows.d.ts +2 -0
- package/dist/types/core/theme.d.ts +3 -1
- package/dist/types/core/themeShape.d.ts +3 -3
- package/dist/types/core/themeValidate.d.ts +3 -3
- package/dist/types/core/types/annotations.d.ts +6 -2
- package/dist/types/core/types/data.d.ts +8 -3
- package/dist/types/core/types/theme.d.ts +2 -1
- package/dist/types/react/rowsStore.d.ts +5 -0
- package/dist/types/react/spec.d.ts +17 -0
- package/dist/types/rows.d.ts +6 -1
- package/dist/validate.js +8 -6
- package/docs/manual.md +19 -5
- package/docs/reference/box.md +1 -1
- package/docs/reference/fixtures.md +1 -0
- package/docs/reference/gantt.md +11 -5
- package/docs/reference/histogram.md +1 -1
- package/docs/reference/line.md +1 -1
- package/docs/reference/react.md +3 -0
- package/docs/reference/table.md +1 -1
- package/docs/reference/theme.md +2 -3
- package/docs/use-cases.md +198 -0
- package/llms.txt +4 -3
- package/package.json +2 -1
- package/dist/chunk-2GELJH37.js +0 -88
- package/dist/chunk-4GB7TBY7.js +0 -373
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seatsPastBlockers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GYNZ72GO.js";
|
|
4
4
|
import {
|
|
5
5
|
fittedLabel
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2DR5MMDY.js";
|
|
7
7
|
import {
|
|
8
8
|
chartTheme
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U4P6TQRW.js";
|
|
10
10
|
import {
|
|
11
11
|
rowDrivenHeight
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OTW5SEFS.js";
|
|
13
13
|
import {
|
|
14
14
|
structureCount
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-LFX7W4B7.js";
|
|
16
16
|
import {
|
|
17
17
|
ACCEPTANCE_PROBE,
|
|
18
18
|
AUTO_LEGEND,
|
|
@@ -24,8 +24,9 @@ import {
|
|
|
24
24
|
heightOmitted,
|
|
25
25
|
rowSizing,
|
|
26
26
|
spread1DResult
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-U7LLQ7XM.js";
|
|
28
28
|
import {
|
|
29
|
+
CROSSABLE_RULE_PART,
|
|
29
30
|
PRIORITY,
|
|
30
31
|
SWATCH_RESERVE,
|
|
31
32
|
authoredFootnoteCount,
|
|
@@ -44,19 +45,20 @@ import {
|
|
|
44
45
|
segmentHitsRect,
|
|
45
46
|
solveFrame,
|
|
46
47
|
solveLabels
|
|
47
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-GVKFFJ23.js";
|
|
48
49
|
import {
|
|
49
50
|
disclosureNote,
|
|
50
51
|
disclosuresShown
|
|
51
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-E64MTTBC.js";
|
|
52
53
|
import {
|
|
53
54
|
parseISODate
|
|
54
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-RGZGLKFB.js";
|
|
55
56
|
import {
|
|
56
57
|
chartStrings
|
|
57
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-53OYF4ZT.js";
|
|
58
59
|
import {
|
|
59
60
|
canvasMargin,
|
|
61
|
+
contrastInkPaint,
|
|
60
62
|
dashToken,
|
|
61
63
|
emphasisWeight,
|
|
62
64
|
markRolePaint,
|
|
@@ -69,11 +71,11 @@ import {
|
|
|
69
71
|
separationStroke,
|
|
70
72
|
strokeToken,
|
|
71
73
|
surfaceFloorPaint
|
|
72
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-B3F4TS3V.js";
|
|
73
75
|
import {
|
|
74
76
|
contrastRatio,
|
|
75
77
|
tint
|
|
76
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-4WK3CNW5.js";
|
|
77
79
|
import {
|
|
78
80
|
fmtPathNumber
|
|
79
81
|
} from "./chunk-WLZ54FWG.js";
|
|
@@ -92,7 +94,7 @@ import {
|
|
|
92
94
|
import {
|
|
93
95
|
compareText,
|
|
94
96
|
defaultMeasurer
|
|
95
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-AG2CJ4JY.js";
|
|
96
98
|
|
|
97
99
|
// src/core/strings/gantt.ts
|
|
98
100
|
var EN = {
|
|
@@ -196,7 +198,7 @@ var TIERS = {
|
|
|
196
198
|
};
|
|
197
199
|
|
|
198
200
|
// src/core/charts/gantt/domain.ts
|
|
199
|
-
var ITEM_KINDS = ["bar", "milestone", "chevron", "bracket", "shade"], MAX_COLS = 3;
|
|
201
|
+
var ITEM_KINDS = ["bar", "milestone", "chevron", "bracket", "shade", "rule"], MAX_COLS = 3;
|
|
200
202
|
function resolveGanttEnv(options, warnings) {
|
|
201
203
|
let theme = resolveSemanticPaletteTheme(
|
|
202
204
|
chartTheme(options),
|
|
@@ -282,10 +284,11 @@ function normalizeRows(data, warnings) {
|
|
|
282
284
|
}),
|
|
283
285
|
marker: raw.marker ?? "diamond",
|
|
284
286
|
colorRole: raw.colorRole
|
|
285
|
-
} : void 0;
|
|
287
|
+
} : void 0, sublabel = raw.sublabel?.trim().split(/\s+/).join(" ");
|
|
286
288
|
return {
|
|
287
289
|
id: raw.id,
|
|
288
290
|
label: raw.label ?? raw.id,
|
|
291
|
+
...sublabel ? { sublabel } : {},
|
|
289
292
|
kind: raw.kind ?? "task",
|
|
290
293
|
indent: Math.max(0, raw.indent ?? 0),
|
|
291
294
|
cols,
|
|
@@ -308,17 +311,24 @@ function ganttCalendar(items, cadenceDays, options, warnings) {
|
|
|
308
311
|
minDay = Math.min(minDay, it.startDay), maxDay = Math.max(maxDay, it.endDay);
|
|
309
312
|
for (let day of cadenceDays)
|
|
310
313
|
minDay = Math.min(minDay, day), maxDay = Math.max(maxDay, day + 1);
|
|
311
|
-
let
|
|
314
|
+
let todayParsed = options.today === void 0 ? null : parseISODate(options.today);
|
|
315
|
+
if (options.today !== void 0 && !todayParsed) throw new NormalizeError("invalid-date", "options.today", `invalid ISO date '${options.today}'`);
|
|
316
|
+
let dataSpan = options.calendar?.span === "data", todayEnd = todayParsed && dayNum(todayParsed) >= minDay ? dayNum(todayParsed) + 1 : -1 / 0, dataStart = minDay, dataEnd = Math.max(maxDay, todayEnd), edgeRadius = (day) => dataSpan ? items.some((it) => it.kind === "milestone" && it.startDay === day) ? 8 : cadenceDays.includes(day) ? 6 : 0 : 0, edgeR = { start: edgeRadius(dataStart), end: edgeRadius(dataEnd - 1) }, spanDays = dataSpan ? dataEnd - dataStart : maxDay - minDay, granularity = spanDays > 548 ? "quarters" : spanDays >= 90 ? "months" : "weeks", startDay = options.calendar?.weeks === "startDay";
|
|
317
|
+
startDay && granularity !== "weeks" && warnings.push({
|
|
318
|
+
code: "calendar-weeks-ignored",
|
|
319
|
+
severity: "info",
|
|
320
|
+
message: `calendar.weeks 'startDay' names week cells; this chart's head shows ${granularity}, so it is ignored`,
|
|
321
|
+
suggest: "remove calendar.weeks, or shorten the span to under 90 days"
|
|
322
|
+
});
|
|
323
|
+
let tier = startDay && granularity === "weeks" ? { ...TIERS.weeks, minorFmts: ["d"] } : TIERS[granularity], d0Day = dataSpan ? dataStart : dayNum(floorTo(tier.minor, dateFromDay(minDay))), d1Day = dataSpan ? dataEnd : dayNum(ceilTo(tier.minor, dateFromDay(maxDay)));
|
|
312
324
|
options.weekends && granularity !== "weeks" && warnings.push({
|
|
313
325
|
code: "weekends-ignored",
|
|
314
326
|
severity: "info",
|
|
315
327
|
message: `weekends shading only renders at week granularity (span is ${granularity})`
|
|
316
328
|
});
|
|
317
329
|
let todayDay = null;
|
|
318
|
-
if (
|
|
319
|
-
let
|
|
320
|
-
if (!td) throw new NormalizeError("invalid-date", "options.today", `invalid ISO date '${options.today}'`);
|
|
321
|
-
let dn = dayNum(td);
|
|
330
|
+
if (todayParsed) {
|
|
331
|
+
let dn = dayNum(todayParsed);
|
|
322
332
|
dn < d0Day || dn >= d1Day ? warnings.push({
|
|
323
333
|
code: "today-out-of-range",
|
|
324
334
|
severity: "info",
|
|
@@ -329,7 +339,7 @@ function ganttCalendar(items, cadenceDays, options, warnings) {
|
|
|
329
339
|
code: "elapsed-without-today",
|
|
330
340
|
severity: "info",
|
|
331
341
|
message: "elapsed shading requires a visible options.today boundary \u2014 tint suppressed"
|
|
332
|
-
}), { granularity, tier, d0Day, d1Day, todayDay };
|
|
342
|
+
}), { granularity, tier, d0Day, d1Day, edgeR, todayDay };
|
|
333
343
|
}
|
|
334
344
|
function resolveGanttEvents(options, anchorDayById, span, warnings) {
|
|
335
345
|
let authoredEvents = (options.annotations ?? []).filter(
|
|
@@ -340,8 +350,8 @@ function resolveGanttEvents(options, anchorDayById, span, warnings) {
|
|
|
340
350
|
if (eventIds.has(id) || id === "today" || id === "elapsed")
|
|
341
351
|
throw new NormalizeError("duplicate-id", `options.annotations[${i}]`, `duplicate event id '${id}'`);
|
|
342
352
|
eventIds.add(id);
|
|
343
|
-
let at = typeof annotation.at == "string" ? annotation.at : annotation.at && "categoryId" in annotation.at ? annotation.at.categoryId : null, date = at === null ? null : parseISODate(at),
|
|
344
|
-
if (
|
|
353
|
+
let at = typeof annotation.at == "string" ? annotation.at : annotation.at && "categoryId" in annotation.at ? annotation.at.categoryId : null, date = at === null ? null : parseISODate(at), ruleDay = date ? dayNum(date) : at === null ? null : anchorDayById.get(at) ?? null;
|
|
354
|
+
if (ruleDay === null) {
|
|
345
355
|
warnings.push({
|
|
346
356
|
code: "bad-anchor",
|
|
347
357
|
severity: "warn",
|
|
@@ -350,6 +360,7 @@ function resolveGanttEvents(options, anchorDayById, span, warnings) {
|
|
|
350
360
|
});
|
|
351
361
|
return;
|
|
352
362
|
}
|
|
363
|
+
let day = Math.floor(ruleDay);
|
|
353
364
|
if (day < span.d0Day || day >= span.d1Day) {
|
|
354
365
|
warnings.push({
|
|
355
366
|
code: "event-out-of-range",
|
|
@@ -362,9 +373,11 @@ function resolveGanttEvents(options, anchorDayById, span, warnings) {
|
|
|
362
373
|
events.push({
|
|
363
374
|
id,
|
|
364
375
|
day,
|
|
376
|
+
ruleDay,
|
|
365
377
|
label: annotation.label,
|
|
366
378
|
tone: annotation.tone,
|
|
367
379
|
priority: annotation.priority,
|
|
380
|
+
badge: annotation.labelPlacement === "badge",
|
|
368
381
|
annotation
|
|
369
382
|
});
|
|
370
383
|
}), events;
|
|
@@ -456,9 +469,9 @@ function resolveGanttDomain(data, env, warnings) {
|
|
|
456
469
|
for (let it of allItems) resolveAnchor(it);
|
|
457
470
|
pushAll(warnings, overlapWarnings(rows));
|
|
458
471
|
let anchorDayById = /* @__PURE__ */ new Map();
|
|
459
|
-
for (let item of allItems) anchorDayById.set(item.id, item.startDay);
|
|
472
|
+
for (let item of allItems) anchorDayById.set(item.id, item.startDay + (item.kind === "milestone" ? 0.5 : 0));
|
|
460
473
|
for (let row of rows)
|
|
461
|
-
for (let event of row.cadence?.events ?? []) anchorDayById.set(event.id, event.day);
|
|
474
|
+
for (let event of row.cadence?.events ?? []) anchorDayById.set(event.id, event.day + 0.5);
|
|
462
475
|
let calendar = ganttCalendar(allItems, allCadenceDays, env.options, warnings), events = resolveGanttEvents(env.options, anchorDayById, calendar, warnings);
|
|
463
476
|
return {
|
|
464
477
|
rows,
|
|
@@ -466,19 +479,20 @@ function resolveGanttDomain(data, env, warnings) {
|
|
|
466
479
|
majorStarts: boundariesOf(calendar.tier.major, calendar.d0Day, calendar.d1Day),
|
|
467
480
|
minorStarts: boundariesOf(calendar.tier.minor, calendar.d0Day, calendar.d1Day),
|
|
468
481
|
events,
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
eventFootnotes: events.length > 3 ? events.map((event) => event.label) : [],
|
|
482
|
+
// Above three events the labels move to numbered footnotes. Badge events print their own label and never count.
|
|
483
|
+
eventBadgeMode: events.filter((event) => !event.badge).length > 3,
|
|
484
|
+
eventFootnotes: events.filter((event) => !event.badge).length > 3 ? events.filter((event) => !event.badge).map((event) => event.label) : [],
|
|
472
485
|
itemLabelNotes: env.labelOn("item") ? rows.flatMap((row) => row.items.flatMap((item) => ganttItemLabel(item, env).missing.map((part) => `${item.id} (${row.label}): requested ${part} label is empty.`))) : [],
|
|
473
486
|
milestones: planMilestones(rows, env, calendar.d0Day, calendar.d1Day)
|
|
474
487
|
};
|
|
475
488
|
}
|
|
476
489
|
|
|
477
490
|
// src/core/charts/gantt/model.ts
|
|
491
|
+
var RULE_LABEL_GAP = { eventRule: 4, todayLine: 6 };
|
|
478
492
|
function laneTop(band, rows, index) {
|
|
479
493
|
return band.rowY[index] + (rows[index]?.shared && !band.sharedLine ? 0 : band.nameLineH);
|
|
480
494
|
}
|
|
481
|
-
var NO_LANE = /* @__PURE__ */ Symbol("ganttNoLane");
|
|
495
|
+
var NO_LANE = /* @__PURE__ */ Symbol("ganttNoLane"), ROW_TEXT_PITCH = /* @__PURE__ */ Symbol("ganttRowTextPitch"), BADGE_LEVELS = /* @__PURE__ */ Symbol("ganttBadgeLevels");
|
|
482
496
|
|
|
483
497
|
// src/core/charts/gantt/marks.ts
|
|
484
498
|
function itemDates(item) {
|
|
@@ -532,7 +546,7 @@ function separatedFill(ctx, authored, rowId) {
|
|
|
532
546
|
};
|
|
533
547
|
}
|
|
534
548
|
function backgroundLayers(ctx, domain) {
|
|
535
|
-
let { env, band, body, nodes } = ctx, { options, surface } = env, { rows, todayDay, d0Day
|
|
549
|
+
let { env, band, body, nodes } = ctx, { options, surface } = env, { rows, todayDay, d0Day } = domain, { rowsTop, rowsBottom } = band, { x, bodyX, bodyW } = body, elapsed = [];
|
|
536
550
|
if (options.rowTint && rows.forEach((r, i) => {
|
|
537
551
|
i % 2 === 1 && nodes.push({
|
|
538
552
|
t: "rect",
|
|
@@ -556,9 +570,9 @@ function backgroundLayers(ctx, domain) {
|
|
|
556
570
|
}
|
|
557
571
|
if (options.weekends && domain.granularity === "weeks") {
|
|
558
572
|
let wk = 0;
|
|
559
|
-
for (let
|
|
560
|
-
let to = Math.min(
|
|
561
|
-
nodes.push({
|
|
573
|
+
for (let saturday = dayNum(floorTo("week", dateFromDay(d0Day))) + 5; saturday < body.dayTo; saturday += 7) {
|
|
574
|
+
let day = Math.max(saturday, body.dayFrom), to = Math.min(saturday + 2, body.dayTo);
|
|
575
|
+
to <= day || nodes.push({
|
|
562
576
|
t: "rect",
|
|
563
577
|
id: `weekend:${wk++}`,
|
|
564
578
|
rect: { x: x(day), y: rowsTop, w: x(to) - x(day), h: rowsBottom - rowsTop },
|
|
@@ -591,8 +605,8 @@ function backgroundLayers(ctx, domain) {
|
|
|
591
605
|
return { elapsed, shades };
|
|
592
606
|
}
|
|
593
607
|
function headerRow(ctx, domain, tierRow) {
|
|
594
|
-
let { kindTag, unit, starts, y, font, fmts, ink } = tierRow, { d0Day, d1Day } = domain, { x } = ctx.body, { headerRowH } = ctx.band, lang = ctx.env.lang, cells = starts.map((s, i) => {
|
|
595
|
-
let a = Math.max(dayNum(s),
|
|
608
|
+
let { kindTag, unit, starts, y, font, fmts, ink, startDay } = tierRow, { d0Day, d1Day } = domain, { x } = ctx.body, { headerRowH } = ctx.band, lang = ctx.env.lang, cells = starts.map((s, i) => {
|
|
609
|
+
let a = Math.max(dayNum(s), ctx.body.dayFrom), b = Math.min(i + 1 < starts.length ? dayNum(starts[i + 1]) : ctx.body.dayTo, ctx.body.dayTo);
|
|
596
610
|
return { x: x(a), y, w: x(b) - x(a), h: headerRowH };
|
|
597
611
|
}), sizeCache = /* @__PURE__ */ new Map(), sized = (text) => {
|
|
598
612
|
let entry = sizeCache.get(text);
|
|
@@ -603,16 +617,16 @@ function headerRow(ctx, domain, tierRow) {
|
|
|
603
617
|
starts.forEach((s, i) => {
|
|
604
618
|
let cell = cells[i];
|
|
605
619
|
ctx.nodes.push({ t: "rect", id: `header:${kindTag}:${i}`, rect: cell, fill: { token: "background" }, stroke: { token: "grid" }, strokeWidth: strokeToken(ctx.env.theme, "hair"), owner: {}, part: "headerCell" });
|
|
606
|
-
let text = cellFmts.map((f) => formatDate(
|
|
620
|
+
let named = startDay ? dateFromDay(Math.max(dayNum(s), d0Day)) : s, text = cellFmts.map((f) => formatDate(named, f, lang)).find((candidate) => fits(candidate, i));
|
|
607
621
|
if (text !== void 0) {
|
|
608
|
-
let { width: tw, height: th } = sized(text), name = { x: cell.x + cell.w / 2 - tw / 2, y: cell.y + (headerRowH - th) / 2, w: tw, h: th };
|
|
622
|
+
let { width: tw, height: th } = sized(text), name = { x: startDay ? cell.x + 6 : cell.x + cell.w / 2 - tw / 2, y: cell.y + (headerRowH - th) / 2, w: tw, h: th };
|
|
609
623
|
ctx.headNames.push(name), ctx.nodes.push({ t: "text", typeRole: "axis", id: `header:${kindTag}:${i}:text`, x: name.x, y: name.y, lines: [text], align: "start", font, ink, owner: {}, part: "scale" });
|
|
610
624
|
}
|
|
611
625
|
});
|
|
612
626
|
}
|
|
613
627
|
function calendarGrid(ctx, domain) {
|
|
614
628
|
let { band, body, nodes, env } = ctx, { tier, majorStarts, minorStarts, d0Day, d1Day } = domain, { x, bodyX, bodyW } = body, { rowsTop, rowsBottom, headerTop } = band;
|
|
615
|
-
headerRow(ctx, domain, { kindTag: "major", unit: tier.major, starts: majorStarts, y: headerTop, font: env.fonts.headerMajor, fmts: tier.majorFmts, ink: { token: "ink" } }), headerRow(ctx, domain, { kindTag: "minor", unit: tier.minor, starts: minorStarts, y: headerTop + band.headerRowH, font: env.fonts.tick, fmts: tier.minorFmts, ink: { token: "inkMuted" } }), ctx.claims.claim({ x: bodyX, y: headerTop, w: bodyW, h: band.headerH }, "axis", {});
|
|
629
|
+
headerRow(ctx, domain, { kindTag: "major", unit: tier.major, starts: majorStarts, y: headerTop, font: env.fonts.headerMajor, fmts: tier.majorFmts, ink: { token: "ink" } }), headerRow(ctx, domain, { kindTag: "minor", unit: tier.minor, starts: minorStarts, y: headerTop + band.headerRowH, font: env.fonts.tick, fmts: tier.minorFmts, ink: { token: "inkMuted" }, startDay: tier.minorFmts[0] === "d" }), ctx.claims.claim({ x: bodyX, y: headerTop, w: bodyW, h: band.headerH }, "axis", {});
|
|
616
630
|
let majorDays = new Set(majorStarts.map(dayNum)), gridLine = (id, d, dash) => ({ t: "line", id, x1: x(d), y1: rowsTop, x2: x(d), y2: rowsBottom, stroke: { token: "grid" }, width: strokeToken(env.theme, "rule"), ...dash ? { dash } : {}, owner: {}, part: "grid" }), gseq = 0;
|
|
617
631
|
for (let s of majorStarts) {
|
|
618
632
|
let d = dayNum(s);
|
|
@@ -623,7 +637,7 @@ function calendarGrid(ctx, domain) {
|
|
|
623
637
|
let d = dayNum(s);
|
|
624
638
|
d <= d0Day || d >= d1Day || majorDays.has(d) || nodes.push(gridLine(`grid:minor:${gseq++}`, d, [2, 3]));
|
|
625
639
|
}
|
|
626
|
-
[
|
|
640
|
+
[body.dayFrom, body.dayTo].forEach((d, i) => nodes.push(gridLine(`grid:edge:${i}`, d)));
|
|
627
641
|
}
|
|
628
642
|
function milestonePaints(env, paints, r, it) {
|
|
629
643
|
let { theme } = env, milestonePaint = paints.item(it), milestoneBacking = r.items.filter(
|
|
@@ -672,7 +686,10 @@ function rowMarks(ctx, r, i, shades, marks) {
|
|
|
672
686
|
place.rect = shades.get(it.id).rect, itemNodes.push({ ...itemDates(it), id: it.id, kind: it.kind, nodeId: shades.get(it.id).nodeId, rect: place.rect });
|
|
673
687
|
continue;
|
|
674
688
|
}
|
|
675
|
-
if (it.kind === "
|
|
689
|
+
if (it.kind === "rule") {
|
|
690
|
+
let y = place.rect.y + place.rect.h - 1;
|
|
691
|
+
nodes.push({ t: "line", id: nodeId, x1: xs, y1: y, x2: xs + place.rect.w, y2: y, stroke: surfaceFloorPaint(markRolePaint("neutralLight", !0), barSurfaces(ctx.env)), width: 2, owner, part: "ganttRule", display });
|
|
692
|
+
} else if (it.kind === "bar") {
|
|
676
693
|
let fill = surfaceFloorPaint(ctx.paints.item(it), barSurfaces(ctx.env)), seam = { stroke: { token: "background" }, strokeWidth: strokeToken(env.theme, "hair") }, paint = touching.has(it.id) ? { fill, ...seam, separation: { fill, backing: ctx.paints.rowBackingPaint(r.id), fallback: seam, surface: !0, grounds: barSurfaces(ctx.env) } } : separatedFill(ctx, ctx.paints.item(it), r.id);
|
|
677
694
|
nodes.push({ t: "rect", id: nodeId, rect: place.rect, ...paint, owner, part: "bar", display });
|
|
678
695
|
} else if (it.kind === "chevron") {
|
|
@@ -714,17 +731,42 @@ function ruleNodes(id, x, top, bottom, headNames, style) {
|
|
|
714
731
|
return y < bottom && runs.push([y, bottom]), runs.filter(([y1, y2]) => y2 - y1 >= 3).reverse().map(([y1, y2], index) => ({ t: "line", id: index === 0 ? id : `${id}:head:${index}`, x1: x, y1, x2: x, y2, ...style }));
|
|
715
732
|
}
|
|
716
733
|
function claimRule(claims, band, domain, x, halfWidth, owner) {
|
|
717
|
-
let { headerTop, rowsBottom } = band;
|
|
734
|
+
let { headerTop, rowsTop, rowsBottom } = band;
|
|
718
735
|
if (!band.stacked) {
|
|
719
|
-
claims.claim({ x: x - halfWidth, y: headerTop, w: 2 * halfWidth, h:
|
|
736
|
+
claims.claim({ x: x - halfWidth, y: headerTop, w: 2 * halfWidth, h: rowsTop - headerTop }, "annotation", owner), claims.claim({ x: x - halfWidth, y: rowsTop, w: 2 * halfWidth, h: rowsBottom - rowsTop }, "annotation", owner, CROSSABLE_RULE_PART);
|
|
720
737
|
return;
|
|
721
738
|
}
|
|
722
|
-
claims.claim({ x: x - halfWidth, y: headerTop, w: 2 * halfWidth, h: band.headerH }, "annotation", owner), domain.rows.forEach((_, i) => claims.claim({ x: x - halfWidth, y: laneTop(band, domain.rows, i), w: 2 * halfWidth, h: band.rowHs[i] }, "annotation", owner));
|
|
739
|
+
claims.claim({ x: x - halfWidth, y: headerTop, w: 2 * halfWidth, h: band.headerH }, "annotation", owner), domain.rows.forEach((_, i) => claims.claim({ x: x - halfWidth, y: laneTop(band, domain.rows, i), w: 2 * halfWidth, h: band.rowHs[i] }, "annotation", owner, CROSSABLE_RULE_PART));
|
|
740
|
+
}
|
|
741
|
+
function badgeRadius(env, domain) {
|
|
742
|
+
return Math.max(9, ...domain.events.filter((event) => event.badge).map((event) => env.measure(event.label, env.fonts.strong).width / 2 + 4));
|
|
743
|
+
}
|
|
744
|
+
function badgeFill(event) {
|
|
745
|
+
return { token: event.tone === "bad" ? "bad" : "ink" };
|
|
746
|
+
}
|
|
747
|
+
function markerBand(domain, markerLabelH) {
|
|
748
|
+
return domain.events.some((event) => !event.badge) ? domain.eventBadgeMode ? markerLabelH + 8 : 2 * markerLabelH + 8 : domain.todayDay !== null ? markerLabelH + 6 : 0;
|
|
749
|
+
}
|
|
750
|
+
function badgeLevels(env, domain, x) {
|
|
751
|
+
let levels = /* @__PURE__ */ new Map();
|
|
752
|
+
if (!env.labelOn("annotation")) return levels;
|
|
753
|
+
let pitch = 2 * badgeRadius(env, domain) + 4, xs = [];
|
|
754
|
+
for (let event of domain.events.filter((e) => e.badge).sort((a, b) => a.ruleDay - b.ruleDay)) {
|
|
755
|
+
let ex = x(event.ruleDay), level = 0;
|
|
756
|
+
for (; xs[level]?.some((other) => Math.abs(other - ex) < pitch); ) level++;
|
|
757
|
+
(xs[level] ??= []).push(ex), levels.set(event.id, level);
|
|
758
|
+
}
|
|
759
|
+
return levels;
|
|
760
|
+
}
|
|
761
|
+
function badgeStrip(env, domain) {
|
|
762
|
+
if (!env.labelOn("annotation") || !domain.events.some((event) => event.badge)) return 0;
|
|
763
|
+
let r = badgeRadius(env, domain), levels = env.options[BADGE_LEVELS] ?? 1;
|
|
764
|
+
return 2 * r + 8 + (levels - 1) * (2 * r + 4);
|
|
723
765
|
}
|
|
724
766
|
function eventRules(env, domain, band, body, layer, headNames) {
|
|
725
|
-
let { headerTop, rowsBottom, markerLabelH } = band, { labelOn, measure } = env, { tick } = env.fonts, { nodes, claims, requests } = layer, badgeNo = (
|
|
726
|
-
domain.events.forEach((event
|
|
727
|
-
let ex = body.x(event.
|
|
767
|
+
let { headerTop, rowsBottom, markerLabelH } = band, { labelOn, measure } = env, { tick } = env.fonts, { nodes, claims, requests } = layer, keyed = domain.events.filter((event) => !event.badge), badgeNo = (event) => keyed.indexOf(event) + 1 + authoredFootnoteCount(env.options), r = badgeRadius(env, domain), levels = badgeLevels(env, domain, body.x), badges = [];
|
|
768
|
+
domain.events.forEach((event) => {
|
|
769
|
+
let ex = body.x(event.ruleDay), owner = { annotationId: event.id }, badgeCy = headerTop - markerBand(domain, markerLabelH) - 2 - r - (levels.get(event.id) ?? 0) * (2 * r + 4), drawsBadge = event.badge && labelOn("annotation"), rule = ruleNodes(`ann:event:${event.id}:line`, ex, drawsBadge ? badgeCy + r + 2 : headerTop, rowsBottom, headNames, {
|
|
728
770
|
stroke: { token: event.tone === "bad" ? "bad" : "leader" },
|
|
729
771
|
width: strokeToken(env.theme, "rule"),
|
|
730
772
|
dash: dashToken(env.theme, "reference"),
|
|
@@ -733,21 +775,48 @@ function eventRules(env, domain, band, body, layer, headNames) {
|
|
|
733
775
|
}), nodeIds = rule.map((piece) => piece.id);
|
|
734
776
|
pushAll(nodes, rule), claimRule(claims, band, domain, ex, 1.5, owner);
|
|
735
777
|
let labelId = `event:${event.id}`;
|
|
736
|
-
if (
|
|
737
|
-
|
|
778
|
+
if (event.badge) {
|
|
779
|
+
if (drawsBadge) {
|
|
780
|
+
let badgeId = `ann:event:${event.id}:badge`;
|
|
781
|
+
badges.push({
|
|
782
|
+
t: "circle",
|
|
783
|
+
id: badgeId,
|
|
784
|
+
cx: ex,
|
|
785
|
+
cy: badgeCy,
|
|
786
|
+
r,
|
|
787
|
+
fill: badgeFill(event),
|
|
788
|
+
owner,
|
|
789
|
+
part: "eventBadge"
|
|
790
|
+
}), nodeIds.push(badgeId), claims.claim({ x: ex - r - 1, y: badgeCy - r - 1, w: 2 * (r + 1), h: 2 * (r + 1) }, "annotation", owner), badgeCy + r + 2 < headerTop && claims.claim({ x: ex - 1.5, y: badgeCy + r + 2, w: 3, h: headerTop - badgeCy - r - 2 }, "annotation", owner, CROSSABLE_RULE_PART);
|
|
791
|
+
let { strong } = env.fonts, tsize = measure(event.label, strong);
|
|
792
|
+
requests.push({
|
|
793
|
+
id: labelId,
|
|
794
|
+
kind: "annotation",
|
|
795
|
+
typeRole: "label",
|
|
796
|
+
role: "note",
|
|
797
|
+
owner,
|
|
798
|
+
text: event.label,
|
|
799
|
+
lines: [event.label],
|
|
800
|
+
font: strong,
|
|
801
|
+
priority: event.priority ?? PRIORITY.valueLine,
|
|
802
|
+
candidates: [{ slot: "badge", rect: { x: ex - tsize.width / 2, y: badgeCy - tsize.height / 2, w: tsize.width, h: tsize.height }, penalty: 0, overRules: !0 }]
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
} else if (domain.eventBadgeMode) {
|
|
806
|
+
let badgeCy2 = headerTop - markerLabelH / 2 - 2, badgeId = `ann:event:${event.id}:badge`;
|
|
738
807
|
if (nodes.push({
|
|
739
808
|
t: "circle",
|
|
740
809
|
id: badgeId,
|
|
741
810
|
cx: ex,
|
|
742
|
-
cy:
|
|
811
|
+
cy: badgeCy2,
|
|
743
812
|
r: 7,
|
|
744
813
|
fill: { token: "background" },
|
|
745
814
|
stroke: { token: event.tone === "bad" ? "bad" : "leader" },
|
|
746
815
|
strokeWidth: strokeToken(env.theme, "mark"),
|
|
747
816
|
owner,
|
|
748
817
|
part: "eventBadge"
|
|
749
|
-
}), nodeIds.push(badgeId), claims.claim({ x: ex - 7 - 1, y:
|
|
750
|
-
let text = String(badgeNo(
|
|
818
|
+
}), nodeIds.push(badgeId), claims.claim({ x: ex - 7 - 1, y: badgeCy2 - 7 - 1, w: 16, h: 16 }, "annotation", owner), labelOn("annotation")) {
|
|
819
|
+
let text = String(badgeNo(event)), tsize = measure(text, tick);
|
|
751
820
|
requests.push({
|
|
752
821
|
id: labelId,
|
|
753
822
|
kind: "annotation",
|
|
@@ -759,12 +828,12 @@ function eventRules(env, domain, band, body, layer, headNames) {
|
|
|
759
828
|
font: tick,
|
|
760
829
|
priority: event.priority ?? PRIORITY.valueLine,
|
|
761
830
|
candidates: [
|
|
762
|
-
{ slot: "badge", rect: { x: ex - tsize.width / 2, y:
|
|
831
|
+
{ slot: "badge", rect: { x: ex - tsize.width / 2, y: badgeCy2 - tick.size / 2, w: tsize.width, h: tick.size }, penalty: 0 }
|
|
763
832
|
]
|
|
764
833
|
});
|
|
765
834
|
}
|
|
766
835
|
} else if (labelOn("annotation")) {
|
|
767
|
-
let tsize = measure(event.label, tick), top = headerTop -
|
|
836
|
+
let tsize = measure(event.label, tick), top = headerTop - markerBand(domain, markerLabelH) + 2, labelRowH = markerLabelH + 2, candidates = [];
|
|
768
837
|
for (let row of [0, 1])
|
|
769
838
|
candidates.push(
|
|
770
839
|
{ slot: `right-${row}`, rect: { x: ex + 4, y: top + row * labelRowH, w: tsize.width, h: tick.size }, penalty: row },
|
|
@@ -789,11 +858,11 @@ function eventRules(env, domain, band, body, layer, headNames) {
|
|
|
789
858
|
// The record says what the badge says: both count on from the
|
|
790
859
|
// author's own notes, which the frame numbers first. A
|
|
791
860
|
// record that kept its own count read as an authored override.
|
|
792
|
-
computedText: domain.eventBadgeMode ? `${badgeNo(
|
|
861
|
+
computedText: domain.eventBadgeMode && !event.badge ? `${badgeNo(event)} \u2014 ${event.label}` : event.label,
|
|
793
862
|
nodeIds,
|
|
794
863
|
labelId: labelOn("annotation") ? labelId : void 0
|
|
795
864
|
});
|
|
796
|
-
});
|
|
865
|
+
}), pushAll(nodes, badges);
|
|
797
866
|
}
|
|
798
867
|
function layoutGanttAnnotations(env, domain, band, body, headNames) {
|
|
799
868
|
let layer = {
|
|
@@ -868,7 +937,7 @@ function stackedGap(env) {
|
|
|
868
937
|
return { name: 12, cell: env.measure(" ", env.fonts.label).width };
|
|
869
938
|
}
|
|
870
939
|
function stackedLineWidth(env, domain, plotW) {
|
|
871
|
-
let { options, fonts, measure } = env, rows = domain.rows.filter((row) => !row.shared), fontOf = (r) => r.indent === 0 ? fonts.strong : fonts.label, nameW = (r) => Math.min(r.indent, 6) * INDENT_PX + measure(r.label.trim().split(/\s+/).join(" "), fontOf(r)).width
|
|
940
|
+
let { options, fonts, measure } = env, rows = domain.rows.filter((row) => !row.shared), fontOf = (r) => r.indent === 0 ? fonts.strong : fonts.label, gap = stackedGap(env), nameW = (r) => Math.min(r.indent, 6) * INDENT_PX + measure(r.label.trim().split(/\s+/).join(" "), fontOf(r)).width + (r.sublabel ? gap.name + measure(r.sublabel, fonts.label).width : 0), lineW = Math.max(0, maxOf(rows.map((row) => {
|
|
872
941
|
let cells = stackedCells(env, row);
|
|
873
942
|
return nameW(row) + (cells.length ? gap.name + cells.reduce((sum, cell) => sum + cell.w, 0) + (cells.length - 1) * gap.cell : 0);
|
|
874
943
|
})), stackedHeaders(env, domain.rows).reduce((sum, header) => sum + header.w, 0));
|
|
@@ -945,7 +1014,7 @@ function sharedLabelsNeedLine(domain, plot) {
|
|
|
945
1014
|
if (!shared) return !1;
|
|
946
1015
|
let x = (day) => plot.x + (day - domain.d0Day) / (domain.d1Day - domain.d0Day) * plot.w, rr = 8, blockers = [
|
|
947
1016
|
...shared.items.map((item) => ({ x: x(item.startDay + 0.5), half: rr })),
|
|
948
|
-
...domain.events.map((event) => ({ x: x(event.
|
|
1017
|
+
...domain.events.map((event) => ({ x: x(event.ruleDay), half: 6 })),
|
|
949
1018
|
...domain.todayDay === null ? [] : [{ x: x(domain.todayDay + 0.5), half: 3 }]
|
|
950
1019
|
], clear = 3, free = (from, to) => from >= plot.x && to <= plot.x + plot.w && blockers.every((blocker) => blocker.x + blocker.half + clear <= from || blocker.x - blocker.half - clear >= to);
|
|
951
1020
|
return shared.items.some((item) => {
|
|
@@ -972,7 +1041,7 @@ function ganttFrame(env, domain, paints, warnings, milestoneKey = [], heightOpen
|
|
|
972
1041
|
measure
|
|
973
1042
|
},
|
|
974
1043
|
claims
|
|
975
|
-
), plot0 = frame.plot, headerRowH = measure("Q1 2026", fonts.headerMajor).height + 6, headerH = 2 * headerRowH, markerLabelH = Math.max(measure(chartString(env.options, "today"), fonts.strong).height, measure(chartString(env.options, "eventName"), fonts.tick).height), markerStrip = domain
|
|
1044
|
+
), plot0 = frame.plot, headerRowH = measure("Q1 2026", fonts.headerMajor).height + 6, headerH = 2 * headerRowH, markerLabelH = Math.max(measure(chartString(env.options, "today"), fonts.strong).height, measure(chartString(env.options, "eventName"), fonts.tick).height), markerStrip = markerBand(domain, markerLabelH) + badgeStrip(env, domain), headerTop = plot0.y + markerStrip, lineW = stackedLineWidth(env, domain, plot0.w), stackedFloor = domain.rows.length * STACKED_LANE_FLOOR + domain.rows.filter((row) => !row.shared).length * (measure("Hg", fonts.strong).height + STACKED_NAME_AIR) + measure("Hg", fonts.headerMajor).height + 6, stackedLineW = lineW !== void 0 && (heightOpen || plot0.h - markerStrip - headerH >= stackedFloor) ? lineW : void 0, stacked = stackedLineW !== void 0, n = domain.rows.length, sharedLine = stacked && sharedLabelsNeedLine(domain, plot0), named = domain.rows.filter((row) => !row.shared || sharedLine).length, nameLineH = stacked ? measure("Hg", fonts.strong).height + STACKED_NAME_AIR : 0, colHeaderH = stacked && stackedHeaders(env, domain.rows).length > 0 ? measure("Hg", fonts.headerMajor).height + 6 : 0, rowsTop = headerTop + headerH + colHeaderH, bodyH = Math.max(10, plot0.y + plot0.h - rowsTop), lanePitch = stacked ? domain.milestones.clusterRowH > GANTT_ROW_PITCH ? domain.milestones.clusterRowH : STACKED_LANE_PITCH : domain.milestones.clusterRowH, textPitch = stacked ? void 0 : env.options[ROW_TEXT_PITCH], pitches = domain.rows.map((row) => Math.max(lanePitch, domain.milestones.flagPitch.get(row.id) ?? 0, textPitch?.get(row.id) ?? 0)), extra = pitches.reduce((sum, pitch) => sum + pitch - lanePitch, 0), squeeze = Math.min(1, Math.max(6 * n, bodyH - named * nameLineH) / (n * lanePitch + extra)), rowH = extra > 0 ? lanePitch * squeeze : Math.min(lanePitch, Math.max(6, (bodyH - named * nameLineH) / n)), rowHs = extra > 0 ? pitches.map((pitch) => pitch * squeeze) : pitches.map(() => rowH), rowY = [rowsTop];
|
|
976
1045
|
for (let i = 0; i < n; i++) rowY.push(stacked ? rowY[i] + rowHs[i] + (domain.rows[i].shared && !sharedLine ? 0 : nameLineH) : extra > 0 ? rowY[i] + rowHs[i] : rowsTop + (i + 1) * rowH);
|
|
977
1046
|
let band = {
|
|
978
1047
|
headerRowH,
|
|
@@ -995,7 +1064,7 @@ function ganttFrame(env, domain, paints, warnings, milestoneKey = [], heightOpen
|
|
|
995
1064
|
};
|
|
996
1065
|
return { frame, claims, band };
|
|
997
1066
|
}
|
|
998
|
-
function completeRowName(row, font, measure) {
|
|
1067
|
+
function completeRowName(row, font, measure, subFont) {
|
|
999
1068
|
let words = row.label.trim().split(/\s+/).filter(Boolean), lines = [words.join(" ")], width = measure(lines[0], font).width;
|
|
1000
1069
|
for (let split = 1; split < words.length; split++) {
|
|
1001
1070
|
let pair = [words.slice(0, split).join(" "), words.slice(split).join(" ")], needed = Math.max(...pair.map((line) => measure(line, font).width));
|
|
@@ -1007,7 +1076,8 @@ function completeRowName(row, font, measure) {
|
|
|
1007
1076
|
h: (lines.length - 1) * font.size * (font.lineHeight ?? 1.2) + font.size,
|
|
1008
1077
|
indentPx: Math.min(row.indent, 6) * INDENT_PX,
|
|
1009
1078
|
font,
|
|
1010
|
-
baseFont: font
|
|
1079
|
+
baseFont: font,
|
|
1080
|
+
...row.sublabel ? { sub: { text: row.sublabel, w: measure(row.sublabel, subFont).width, h: subFont.size } } : {}
|
|
1011
1081
|
};
|
|
1012
1082
|
}
|
|
1013
1083
|
function planMetadataColumns(rows, headers, startX, cap, headerY, headerH, font, headerFont, measure, target) {
|
|
@@ -1095,23 +1165,23 @@ function ganttBody(env, domain, frame, band, warnings) {
|
|
|
1095
1165
|
fonts.headerMajor,
|
|
1096
1166
|
measure,
|
|
1097
1167
|
env.options.target
|
|
1098
|
-
), laneLabelW = milestones.laneLabelW, measuredColumns = planColumns(0).colWs, rowFontOf = (r) => r.indent === 0 ? fonts.strong : fonts.label, completeNames = rows.map((row) => completeRowName(row, rowFontOf(row), measure)), minimumLabelBandW = Math.max(0, maxOf(completeNames.filter((_, i) => !rows[i].shared).map(
|
|
1168
|
+
), laneLabelW = milestones.laneLabelW, measuredColumns = planColumns(0).colWs, rowFontOf = (r) => r.indent === 0 ? fonts.strong : fonts.label, completeNames = rows.map((row) => completeRowName(row, rowFontOf(row), measure, fonts.label)), bandW = (name) => name.indentPx + Math.max(name.w, name.sub?.w ?? 0), minimumLabelBandW = Math.max(0, maxOf(completeNames.filter((_, i) => !rows[i].shared).map(bandW))), minimumTimeline = 80, laneReserve = laneLabelW && env.options.mode !== "compact" ? 12 + laneLabelW : 0, availableNames = plot0.w - 12 - measuredColumns.reduce((sum, width) => sum + width, 0) - (measuredColumns.length ? 4 : 0) - minimumTimeline - laneReserve, naturalNames = Math.max(0, maxOf(rows.filter((row) => !row.shared).map((row) => Math.min(row.indent, 6) * INDENT_PX + Math.max(measure(row.label, rowFontOf(row)).width, row.sublabel ? measure(row.sublabel, fonts.label).width : 0)))), nameBudget = Math.max(minimumLabelBandW, Math.min(naturalNames, plot0.w * 0.3, availableNames)), rowLabels = band.stacked ? completeNames.map((name, i) => {
|
|
1099
1169
|
let text = rows[i].label.trim().split(/\s+/).join(" ");
|
|
1100
1170
|
return { ...name, lines: [text], w: measure(text, name.font).width, h: name.font.size };
|
|
1101
1171
|
}) : completeNames.map((name, i) => {
|
|
1102
1172
|
let text = rows[i].label.trim().split(/\s+/).join(" "), width = measure(text, name.font).width;
|
|
1103
1173
|
return width + name.indentPx <= nameBudget ? { ...name, lines: [text], w: width, h: name.font.size } : name;
|
|
1104
|
-
}), labelBandW = Math.max(0, maxOf(rowLabels.filter((_, i) => !rows[i].shared).map(
|
|
1174
|
+
}), labelBandW = Math.max(0, maxOf(rowLabels.filter((_, i) => !rows[i].shared).map(bandW))), columns = band.stacked ? stackedColumns(env, rows, band, plot0.x + plot0.w) : planColumns(plot0.x + labelBandW + 12), colCount = columns.colWs.length, bodyX = band.stacked ? plot0.x : plot0.x + labelBandW + 12 + columns.colWs.reduce((sum, width) => sum + width, 0) + (colCount > 0 ? 4 : 0), availableBodyW = Math.max(40, plot0.x + plot0.w - bodyX), laneGap = 12, laneEnabled = !band.stacked && !env.options[NO_LANE] && laneLabelW > 0 && env.options.mode !== "compact" && availableBodyW >= 80 + laneGap + laneLabelW;
|
|
1105
1175
|
laneLabelW > 0 && !laneEnabled && !band.stacked && !env.options[NO_LANE] && warnings.push({
|
|
1106
1176
|
code: "milestone-lane-overflow",
|
|
1107
1177
|
severity: "warn",
|
|
1108
1178
|
message: "milestone labels cannot reserve a shared leader lane at this canvas width",
|
|
1109
1179
|
suggest: "increase chart width or shorten milestone labels"
|
|
1110
1180
|
});
|
|
1111
|
-
let bodyW = Math.max(40, availableBodyW - (laneEnabled ? laneGap + laneLabelW : 0)), x = (day) => bodyX + (day - d0Day) / (d1Day - d0Day) * bodyW, ruleClaims = [
|
|
1112
|
-
...domain.events.map((event) => ({ x: x(event.
|
|
1113
|
-
//
|
|
1114
|
-
...domain.todayDay === null ? [] : [{ x: x(domain.todayDay + 0.5), halfWidth: 1 }]
|
|
1181
|
+
let bodyW = Math.max(40, availableBodyW - (laneEnabled ? laneGap + laneLabelW : 0)), { start: rL, end: rR } = domain.edgeR, dayW = (bodyW - rL - rR) / (d1Day - d0Day), dayFrom = d0Day - rL / dayW, dayTo = d1Day + rR / dayW, x = rL || rR ? (day) => bodyX + (day - dayFrom) * dayW : (day) => bodyX + (day - d0Day) / (d1Day - d0Day) * bodyW, ruleClaims = [
|
|
1182
|
+
...domain.events.map((event) => ({ x: x(event.ruleDay), halfWidth: 4, gap: RULE_LABEL_GAP.eventRule })),
|
|
1183
|
+
// a slide seat keeps 7 px off an event rule
|
|
1184
|
+
...domain.todayDay === null ? [] : [{ x: x(domain.todayDay + 0.5), halfWidth: 1, gap: RULE_LABEL_GAP.todayLine }]
|
|
1115
1185
|
].sort((a, b) => a.x - b.x), clusteredLabelY = /* @__PURE__ */ new Map();
|
|
1116
1186
|
for (let group of domain.milestones.clusters) {
|
|
1117
1187
|
let minRow = minOf(group.map((entry) => entry.rowIndex)), maxRow = maxOf(group.map((entry) => entry.rowIndex)), centers = spread1DResult(
|
|
@@ -1137,6 +1207,8 @@ function ganttBody(env, domain, frame, band, warnings) {
|
|
|
1137
1207
|
laneEnabled,
|
|
1138
1208
|
laneX: bodyX + bodyW + laneGap,
|
|
1139
1209
|
x,
|
|
1210
|
+
dayFrom,
|
|
1211
|
+
dayTo,
|
|
1140
1212
|
ruleClaims,
|
|
1141
1213
|
clusteredLabelY
|
|
1142
1214
|
};
|
|
@@ -1192,8 +1264,8 @@ function spanLabel(ctx, row, place) {
|
|
|
1192
1264
|
...ctx.body.ruleClaims.map((rule) => ({ ...rect, x: rule.x - rule.halfWidth, w: 2 * rule.halfWidth }))
|
|
1193
1265
|
], nextToArrow = (seat) => {
|
|
1194
1266
|
let [from, to] = seat.x >= rect.x + rect.w ? [rect.x + rect.w, seat.x] : [seat.x + seat.w, rect.x];
|
|
1195
|
-
return !arrowRetry || ![...otherMarks, ...ctx.spanClearance ?? []].some((other) => other.y < seat.y + seat.h && seat.y < other.y + other.h && other.x < to && other.x + other.w > from);
|
|
1196
|
-
}, past = (ctx.spanClearance ? seatsPastBlockers(backed.rect, "x", ctx.body.bodyX, ctx.body.inner.x + ctx.body.inner.w, pastObstacles, 3) : []).filter(nextToArrow).map((rect2, index) => ({ ...backed, slot: `backedPast:${index + 1}`, rect: rect2, penalty: 4.5 + index * 0.1 })), duration = it.endDay - it.startDay;
|
|
1267
|
+
return !(arrowRetry || ctx.crossRules && ctx.body.ruleClaims.length > 0) || ![...otherMarks, ...ctx.spanClearance ?? []].some((other) => other.y < seat.y + seat.h && seat.y < other.y + other.h && other.x < to && other.x + other.w > from);
|
|
1268
|
+
}, past = (ctx.spanClearance ? seatsPastBlockers(backed.rect, "x", ctx.body.bodyX, ctx.body.inner.x + ctx.body.inner.w, pastObstacles, 3) : []).filter(nextToArrow).map((rect2, index) => ({ ...backed, slot: `backedPast:${index + 1}`, rect: rect2, penalty: 4.5 + index * 0.1 })), duration = it.endDay - it.startDay, seats = clearOfLeader((fits ? [inside, ...insideShape, ...slideCandidates, insideStart, insideEnd, right, left, ...past, ...offCentre] : [right, left, backed, ...past, ...offCentre]).filter(clearOfMarks));
|
|
1197
1269
|
ctx.requests.push({
|
|
1198
1270
|
id: `item:${it.rowId}:${it.id}`,
|
|
1199
1271
|
kind: "item",
|
|
@@ -1204,7 +1276,36 @@ function spanLabel(ctx, row, place) {
|
|
|
1204
1276
|
font: fonts.label,
|
|
1205
1277
|
// Keep the one span name before milestones compete for the row bands.
|
|
1206
1278
|
priority: (rowMilestoneItems.length && offCentre.length ? PRIORITY.extreme + 1 : PRIORITY.interior) + Math.min(99, duration) + bonus(ctx.env, it),
|
|
1207
|
-
candidates:
|
|
1279
|
+
candidates: ctx.crossRules ? crossingRules(ctx.body.ruleClaims, seats) : seats
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
function crossingRules(rules, candidates) {
|
|
1283
|
+
let crossed = (rect) => rules.filter((rule) => rule.x >= rect.x - rule.gap && rule.x <= rect.x + rect.w + rule.gap).length, clear = [], crossing = [];
|
|
1284
|
+
for (let candidate of candidates) {
|
|
1285
|
+
let n = candidate.insideFill === void 0 ? 0 : crossed(candidate.rect);
|
|
1286
|
+
n ? crossing.push({ ...candidate, penalty: candidate.penalty + n, overRules: !0 }) : clear.push(candidate);
|
|
1287
|
+
}
|
|
1288
|
+
if (!crossing.length) return clear;
|
|
1289
|
+
crossing.sort((a, b) => a.penalty - b.penalty);
|
|
1290
|
+
let out = [];
|
|
1291
|
+
for (let candidate of clear) {
|
|
1292
|
+
for (; crossing.length && crossing[0].penalty < candidate.penalty; ) out.push(crossing.shift());
|
|
1293
|
+
out.push(candidate);
|
|
1294
|
+
}
|
|
1295
|
+
return [...out, ...crossing];
|
|
1296
|
+
}
|
|
1297
|
+
function ruleLabel(ctx, place) {
|
|
1298
|
+
let { it, rect, owner } = place, text = ganttItemLabel(it, ctx.env).text, tsize = ctx.env.measure(text, ctx.env.fonts.label);
|
|
1299
|
+
ctx.requests.push({
|
|
1300
|
+
id: `item:${it.rowId}:${it.id}`,
|
|
1301
|
+
kind: "item",
|
|
1302
|
+
typeRole: "label",
|
|
1303
|
+
owner,
|
|
1304
|
+
text,
|
|
1305
|
+
lines: [text],
|
|
1306
|
+
font: ctx.env.fonts.label,
|
|
1307
|
+
priority: PRIORITY.interior + Math.min(99, it.endDay - it.startDay) + bonus(ctx.env, it),
|
|
1308
|
+
candidates: [{ slot: "aboveRule", rect: { x: rect.x + 4, y: rect.y + rect.h - 4 - tsize.height, w: tsize.width, h: tsize.height }, penalty: 0, overRules: !0 }]
|
|
1208
1309
|
});
|
|
1209
1310
|
}
|
|
1210
1311
|
function milestoneLabel(ctx, row, place) {
|
|
@@ -1309,10 +1410,25 @@ function bracketLabel(ctx, rowId, place) {
|
|
|
1309
1410
|
]
|
|
1310
1411
|
});
|
|
1311
1412
|
}
|
|
1413
|
+
var SUBLABEL_GAP = 2;
|
|
1312
1414
|
function activityLabels(ctx, place) {
|
|
1313
1415
|
let { row: r, index: i, cy } = place;
|
|
1314
1416
|
if (r.shared) return;
|
|
1315
|
-
let { env, body } = ctx, { label } = env.fonts, rl = body.rowLabels[i], nameCy = ctx.band.rowY[i] + ctx.band.nameLineH / 2;
|
|
1417
|
+
let { env, body } = ctx, { label } = env.fonts, rl = body.rowLabels[i], nameCy = ctx.band.rowY[i] + ctx.band.nameLineH / 2, nameY = ctx.band.stacked ? nameCy - rl.h / 2 : cy - (rl.h + (rl.sub ? SUBLABEL_GAP + rl.sub.h : 0)) / 2, priority = PRIORITY.endpoint + (env.highlights.has(r.id) ? PRIORITY.highlightBonus : 0);
|
|
1418
|
+
if (rl.sub) {
|
|
1419
|
+
let rect = ctx.band.stacked ? { x: body.inner.x + rl.indentPx + rl.w + stackedGap(env).name, y: nameCy - rl.sub.h / 2, w: rl.sub.w, h: rl.sub.h } : { x: body.inner.x + rl.indentPx, y: nameY + rl.h + SUBLABEL_GAP, w: rl.sub.w, h: rl.sub.h };
|
|
1420
|
+
ctx.requests.push({
|
|
1421
|
+
id: `sublabel:${r.id}`,
|
|
1422
|
+
kind: "activity",
|
|
1423
|
+
typeRole: "label",
|
|
1424
|
+
owner: { categoryId: r.id },
|
|
1425
|
+
text: rl.sub.text,
|
|
1426
|
+
lines: [rl.sub.text],
|
|
1427
|
+
font: label,
|
|
1428
|
+
priority,
|
|
1429
|
+
candidates: [{ slot: "left", rect, penalty: 0 }]
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1316
1432
|
if (ctx.requests.push({
|
|
1317
1433
|
id: `activity:${r.id}`,
|
|
1318
1434
|
kind: "activity",
|
|
@@ -1321,8 +1437,8 @@ function activityLabels(ctx, place) {
|
|
|
1321
1437
|
text: r.label,
|
|
1322
1438
|
...fittedLabel({ lines: rl.lines, w: rl.w, h: rl.h, font: rl.font, ...rl.title ? { title: rl.title } : {} }, rl.baseFont),
|
|
1323
1439
|
font: rl.baseFont,
|
|
1324
|
-
priority
|
|
1325
|
-
candidates: [{ slot: "left", rect: { x: body.inner.x + rl.indentPx, y:
|
|
1440
|
+
priority,
|
|
1441
|
+
candidates: [{ slot: "left", rect: { x: body.inner.x + rl.indentPx, y: nameY, w: rl.w, h: rl.h }, penalty: 0 }]
|
|
1326
1442
|
}), ctx.band.stacked) {
|
|
1327
1443
|
stackedCellLabels(ctx, place, nameCy);
|
|
1328
1444
|
return;
|
|
@@ -1371,15 +1487,15 @@ function stackedCellLabels(ctx, place, nameCy) {
|
|
|
1371
1487
|
candidates: [{ slot: "left", rect, penalty: 0 }]
|
|
1372
1488
|
});
|
|
1373
1489
|
}
|
|
1374
|
-
function planGanttLabels(env, domain, band, body, geometry, paints, keyed = /* @__PURE__ */ new Map(), flagRows = /* @__PURE__ */ new Set(), spanClearance) {
|
|
1490
|
+
function planGanttLabels(env, domain, band, body, geometry, paints, keyed = /* @__PURE__ */ new Map(), flagRows = /* @__PURE__ */ new Set(), spanClearance, crossRules = !1) {
|
|
1375
1491
|
let obstacles = [
|
|
1376
1492
|
...geometry.claims.snapshot().map((claim) => claim.rect),
|
|
1377
1493
|
...body.ruleClaims.map((rule) => ({ x: rule.x - rule.halfWidth, y: body.plot.y, w: 2 * rule.halfWidth, h: body.plot.h }))
|
|
1378
|
-
], ctx = { env, domain, band, body, paints, requests: env.labelOn("activity") ? [...body.columns.headerRequests] : [], obstacles, keyed, flagRows, spanClearance }, itemsOn = env.labelOn("item");
|
|
1494
|
+
], ctx = { env, domain, band, body, paints, requests: env.labelOn("activity") ? [...body.columns.headerRequests] : [], obstacles, keyed, flagRows, spanClearance, crossRules }, itemsOn = env.labelOn("item");
|
|
1379
1495
|
for (let place of geometry.rows) {
|
|
1380
1496
|
for (let item of place.items) {
|
|
1381
1497
|
let { it } = item;
|
|
1382
|
-
it.kind === "milestone" ? itemsOn && domain.milestones.byId.has(it.id) && milestoneLabel(ctx, place, item) : itemsOn && ganttItemLabel(it, env).text && (it.kind === "bracket" ? bracketLabel(ctx, place.row.id, item) : spanLabel(ctx, place, item));
|
|
1498
|
+
it.kind === "milestone" ? itemsOn && domain.milestones.byId.has(it.id) && milestoneLabel(ctx, place, item) : itemsOn && ganttItemLabel(it, env).text && (it.kind === "bracket" ? bracketLabel(ctx, place.row.id, item) : it.kind === "rule" ? ruleLabel(ctx, item) : spanLabel(ctx, place, item));
|
|
1383
1499
|
}
|
|
1384
1500
|
env.labelOn("activity") && activityLabels(ctx, place);
|
|
1385
1501
|
}
|
|
@@ -1395,36 +1511,37 @@ function planGanttLabels(env, domain, band, body, geometry, paints, keyed = /* @
|
|
|
1395
1511
|
// src/core/charts/gantt/layout.ts
|
|
1396
1512
|
function rowSummaries(env, domain) {
|
|
1397
1513
|
return domain.rows.map((r) => {
|
|
1514
|
+
let name = r.sublabel ? `${r.label}, ${r.sublabel}` : r.label;
|
|
1398
1515
|
if (r.cadence) {
|
|
1399
1516
|
let days = r.cadence.events.map((event) => event.day);
|
|
1400
|
-
return chartString(env.options, "cadenceSummary", { v1:
|
|
1517
|
+
return chartString(env.options, "cadenceSummary", { v1: name, v2: days.length, v3: fmtDay(env, minOf(days)), v4: fmtDay(env, maxOf(days)) });
|
|
1401
1518
|
}
|
|
1402
1519
|
if (r.shared) return chartString(env.options, "sharedMilestonesSummary", { v1: r.items.map((it) => `${it.label ?? it.id} ${fmtDay(env, it.startDay)}`).join(", ") });
|
|
1403
|
-
if (r.items.length === 0) return
|
|
1520
|
+
if (r.items.length === 0) return name;
|
|
1404
1521
|
let lo = 1 / 0, hi = -1 / 0;
|
|
1405
1522
|
for (let it of r.items)
|
|
1406
1523
|
lo = Math.min(lo, it.startDay), hi = Math.max(hi, it.endDay);
|
|
1407
|
-
return `${
|
|
1524
|
+
return `${name} ${fmtDay(env, lo)} \u2013 ${fmtDay(env, hi - 1)}`;
|
|
1408
1525
|
});
|
|
1409
1526
|
}
|
|
1410
1527
|
function labelNodes(env, domain, labels) {
|
|
1411
|
-
let { strong, tick, headerMajor, label } = env.fonts, rowIndent = new Map(domain.rows.map((r) => [r.id, r.indent]))
|
|
1412
|
-
return labelsToNodes(
|
|
1528
|
+
let { strong, tick, headerMajor, label } = env.fonts, rowIndent = new Map(domain.rows.map((r) => [r.id, r.indent])), badges = new Map(domain.events.filter((event) => event.badge).map((event) => [`event:${event.id}`, badgeFill(event)])), nodes = labelsToNodes(
|
|
1413
1529
|
env.theme,
|
|
1414
1530
|
labels,
|
|
1415
|
-
(l) => l.kind === "valueLine" ? strong : l.id.startsWith("event:") ? tick : l.id.startsWith("colHeader:") ? headerMajor : l.kind === "activity" && !l.id.startsWith("col:") && (rowIndent.get(l.owner.categoryId ?? "") ?? 0) === 0 ? strong : label
|
|
1416
|
-
);
|
|
1531
|
+
(l) => l.kind === "valueLine" || badges.has(l.id) ? strong : l.id.startsWith("event:") ? tick : l.id.startsWith("colHeader:") ? headerMajor : l.kind === "activity" && !l.id.startsWith("col:") && !l.id.startsWith("sublabel:") && (rowIndent.get(l.owner.categoryId ?? "") ?? 0) === 0 ? strong : label
|
|
1532
|
+
), rules = new Set(domain.rows.flatMap((row) => row.items.filter((it) => it.kind === "rule").map((it) => it.id)));
|
|
1533
|
+
return nodes.map((node) => node.t !== "text" ? node : badges.has(node.id.replace(/^label:/, "")) ? { ...node, ink: contrastInkPaint(badges.get(node.id.replace(/^label:/, ""))) } : node.id.startsWith("label:sublabel:") || node.part === "item" && rules.has(node.owner.segmentId ?? "") ? { ...node, ink: { token: "inkMuted" } } : node);
|
|
1417
1534
|
}
|
|
1418
1535
|
function assembleGanttGeometry(input) {
|
|
1419
1536
|
let { env, domain, frame, band, body } = input, { solved } = input, { size, options } = env, spans = new Map(input.geometry.rows.flatMap((row) => row.items.filter((item) => ["bar", "chevron", "shade"].includes(item.it.kind)).map((item) => [item.it.id, { row, item }]))), unsafe = new Set(solved.placed.filter((label) => {
|
|
1420
1537
|
let span = spans.get(label.owner.segmentId ?? "");
|
|
1421
|
-
return label.pinned || !span ? !1 : label.hidden ? label.hidden === "collision" && span.item.it.kind === "chevron" && !span.row.items.some((item) => item.it.kind === "milestone") : ganttSpanBlockers(span.row, { id: span.item.it.id, rect: label.rect }).some((rect) => rectsOverlap(label.rect, rect, 2)) || !rectContains(span.item.rect, label.rect) && solved.placed.some((other) => other !== label && !other.hidden && other.kind === "item" && other.owner.categoryId === label.owner.categoryId && label.rect.y < other.rect.y + other.rect.h && label.rect.y + label.rect.h > other.rect.y && rectsOverlap(label.rect, other.rect, 12));
|
|
1538
|
+
return label.pinned || !span ? !1 : label.hidden ? label.hidden === "collision" && (span.item.it.kind === "chevron" && !span.row.items.some((item) => item.it.kind === "milestone") || body.ruleClaims.length > 0) : ganttSpanBlockers(span.row, { id: span.item.it.id, rect: label.rect }).some((rect) => rectsOverlap(label.rect, rect, 2)) || !rectContains(span.item.rect, label.rect) && solved.placed.some((other) => other !== label && !other.hidden && other.kind === "item" && other.owner.categoryId === label.owner.categoryId && label.rect.y < other.rect.y + other.rect.h && label.rect.y + label.rect.h > other.rect.y && rectsOverlap(label.rect, other.rect, 12));
|
|
1422
1539
|
}).map((label) => label.id));
|
|
1423
1540
|
if (unsafe.size) {
|
|
1424
1541
|
let owners = new Set(solved.placed.filter((label) => unsafe.has(label.id)).map((label) => label.owner.segmentId)), occupied = createOccupiedIndex({ x: 0, y: 0, w: size.width, h: size.height });
|
|
1425
1542
|
for (let claim of input.occupied.snapshot())
|
|
1426
1543
|
claim.kind === "label" && owners.has(claim.owner.segmentId) || occupied.claim(claim.rect, claim.kind, claim.owner, claim.part, claim.polygon);
|
|
1427
|
-
let kept = solved.placed.filter((label) => !label.hidden && !unsafe.has(label.id)), leaders = kept.flatMap((label) => label.leader ? leaderPieces(label.leader.d, 64) : []), requests = planGanttLabels(env, domain, band, body, input.geometry, ganttPaints(env, domain.rows), /* @__PURE__ */ new Map(), input.flagRows, kept.map((label) => label.rect)).filter((request) => unsafe.has(request.id)).map((request) => ({
|
|
1544
|
+
let kept = solved.placed.filter((label) => !label.hidden && !unsafe.has(label.id)), leaders = kept.flatMap((label) => label.leader ? leaderPieces(label.leader.d, 64) : []), requests = planGanttLabels(env, domain, band, body, input.geometry, ganttPaints(env, domain.rows), /* @__PURE__ */ new Map(), input.flagRows, kept.map((label) => label.rect), !0).filter((request) => unsafe.has(request.id)).map((request) => ({
|
|
1428
1545
|
...request,
|
|
1429
1546
|
candidates: request.candidates.filter((candidate) => !leaders.some(([a, b]) => segmentHitsRect(a, b, candidate.rect, 2)))
|
|
1430
1547
|
})), repair = solveLabels(requests, occupied, {
|
|
@@ -1456,7 +1573,7 @@ function assembleGanttGeometry(input) {
|
|
|
1456
1573
|
severity: "warn",
|
|
1457
1574
|
owner: label.owner,
|
|
1458
1575
|
message: `Arrow name '${label.text}' has no clear label seat at this size`,
|
|
1459
|
-
suggest: "increase chart width or
|
|
1576
|
+
suggest: "increase chart width or shorten the arrow name"
|
|
1460
1577
|
});
|
|
1461
1578
|
let { rows, granularity, d0Day, d1Day, milestones } = domain, n = rows.length, { colWs } = body.columns, laneLabelW = milestones.laneLabelW;
|
|
1462
1579
|
return {
|
|
@@ -1464,18 +1581,18 @@ function assembleGanttGeometry(input) {
|
|
|
1464
1581
|
size,
|
|
1465
1582
|
sizing: rowSizing("gantt", size, {
|
|
1466
1583
|
chromeH: size.height - band.bodyH,
|
|
1467
|
-
minimumRowsH: band.stacked ? n * Math.max(STACKED_LANE_FLOOR, input.keyRowHeight) + rows.filter((row) => !row.shared || band.sharedLine).length * band.nameLineH : n * Math.max(28, input.keyRowHeight, maxOf(body.rowLabels.map((label) => label.h + LABEL_PAD))),
|
|
1584
|
+
minimumRowsH: band.stacked ? n * Math.max(STACKED_LANE_FLOOR, input.keyRowHeight) + rows.filter((row) => !row.shared || band.sharedLine).length * band.nameLineH : n * Math.max(28, input.keyRowHeight, maxOf(body.rowLabels.map((label) => label.h + (label.sub ? 2 + label.sub.h : 0) + LABEL_PAD))),
|
|
1468
1585
|
naturalRowsH: Math.max(band.naturalRowsH, (input.cardHeight ?? 0) - (size.height - band.bodyH)),
|
|
1469
1586
|
minWidth: band.stacked ? size.width - body.inner.w + Math.max(80, band.stackedLineW) : size.width - body.inner.w + body.minimumLabelBandW + 12 + colWs.reduce((sum, width) => sum + width, 0) + (colWs.length ? 4 : 0) + 80 + (laneLabelW && options.mode !== "compact" ? body.laneGap + laneLabelW : 0)
|
|
1470
1587
|
}),
|
|
1471
1588
|
plot: body.plot,
|
|
1472
|
-
scene: [...frame.nodes, ...gridAroundLabels([...input.geometry.nodes, ...input.annotated.nodes], solved.placed), ...labelNodes(env, domain, solved.placed)],
|
|
1589
|
+
scene: [...frame.nodes, ...gridAroundLabels([...input.geometry.nodes, ...input.annotated.nodes], solved.placed, spans), ...labelNodes(env, domain, solved.placed)],
|
|
1473
1590
|
labels: solved.placed,
|
|
1474
1591
|
axes: [
|
|
1475
1592
|
{
|
|
1476
1593
|
axis: "x",
|
|
1477
1594
|
ticks: domain.minorStarts.map((s) => ({
|
|
1478
|
-
at: formatDate(s, "yyyy-MM-dd"),
|
|
1595
|
+
at: formatDate(dateFromDay(Math.max(dayNum(s), d0Day)), "yyyy-MM-dd"),
|
|
1479
1596
|
pos: body.x(Math.max(dayNum(s), d0Day))
|
|
1480
1597
|
}))
|
|
1481
1598
|
}
|
|
@@ -1501,11 +1618,16 @@ function assembleGanttGeometry(input) {
|
|
|
1501
1618
|
debug: { occupied: input.occupied.snapshot(), decisions: solved.decisions }
|
|
1502
1619
|
};
|
|
1503
1620
|
}
|
|
1504
|
-
function gridAroundLabels(nodes, placed) {
|
|
1505
|
-
let
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
let
|
|
1621
|
+
function gridAroundLabels(nodes, placed, spans) {
|
|
1622
|
+
let labels = placed.filter((label) => !label.hidden);
|
|
1623
|
+
if (labels.length === 0) return [...nodes];
|
|
1624
|
+
let grid = labels.map((label) => label.rect), rules = labels.map((label) => {
|
|
1625
|
+
let mark = spans.get(label.owner.segmentId ?? "")?.item.rect;
|
|
1626
|
+
return mark && rectContains(mark, label.rect) ? { ...label.rect, y: mark.y, h: mark.h } : { ...label.rect, y: label.rect.y - 1, h: label.rect.h + 2 };
|
|
1627
|
+
});
|
|
1628
|
+
return nodes.flatMap((node) => {
|
|
1629
|
+
if (node.t !== "line" || node.part !== "grid" && node.part !== "todayLine" && node.part !== "eventRule" || node.x1 !== node.x2) return [node];
|
|
1630
|
+
let { x1, y1, y2, id, t: _t, x2: _x2, ...style } = node, gap = node.part === "grid" ? 2 : RULE_LABEL_GAP[node.part], near = (node.part === "grid" ? grid : rules).filter((rect) => x1 >= rect.x - gap && x1 <= rect.x + rect.w + gap && rect.y < Math.max(y1, y2) && rect.y + rect.h > Math.min(y1, y2));
|
|
1509
1631
|
if (!near.length) return [node];
|
|
1510
1632
|
let pieces = ruleNodes(id, x1, Math.min(y1, y2), Math.max(y1, y2), near.map((rect) => ({ ...rect, x: rect.x - gap + 2, w: rect.w + 2 * (gap - 2) })), style);
|
|
1511
1633
|
return node.part === "grid" ? pieces : pieces.map((piece, index) => index ? { ...piece, id: `${id}:label:${index}` } : piece);
|
|
@@ -1525,7 +1647,7 @@ function layoutGanttPass(data, options = {}, keyed = /* @__PURE__ */ new Set(),
|
|
|
1525
1647
|
code: "format-unused",
|
|
1526
1648
|
severity: "warn",
|
|
1527
1649
|
field: ["options", "format"],
|
|
1528
|
-
message: "'gantt' has no value labels of its own; options.format is ignored
|
|
1650
|
+
message: "'gantt' has no value labels of its own; options.format is ignored",
|
|
1529
1651
|
suggest: "Remove options.format. Gantt formats calendar dates through its date options.",
|
|
1530
1652
|
fix: [{ op: "remove", path: "/options/format" }]
|
|
1531
1653
|
});
|
|
@@ -1549,7 +1671,18 @@ function layoutGanttPass(data, options = {}, keyed = /* @__PURE__ */ new Set(),
|
|
|
1549
1671
|
rowsH: band.naturalRowsH
|
|
1550
1672
|
});
|
|
1551
1673
|
if (grow !== void 0) return layoutGanttPass(data, { ...options, size: { width: size.width, height: grow } }, keyed, autoHeight, flags);
|
|
1552
|
-
let body = ganttBody(env, domain, frame, band, warnings)
|
|
1674
|
+
let body = ganttBody(env, domain, frame, band, warnings);
|
|
1675
|
+
if (!band.stacked) {
|
|
1676
|
+
let known = options[ROW_TEXT_PITCH] ?? /* @__PURE__ */ new Map(), grown = new Map(known);
|
|
1677
|
+
if (body.rowLabels.forEach((label, i) => {
|
|
1678
|
+
let need = label.sub ? label.h + 2 + label.sub.h + 2 * LABEL_PAD : 0, id = domain.rows[i].id;
|
|
1679
|
+
need > Math.max(GANTT_ROW_PITCH, known.get(id) ?? 0) + 0.5 && grown.set(id, need);
|
|
1680
|
+
}), grown.size > known.size) return layoutGanttPass(data, { ...options, [ROW_TEXT_PITCH]: grown }, keyed, autoHeight, flags);
|
|
1681
|
+
}
|
|
1682
|
+
let badgeLevelCount = 1 + Math.max(0, ...badgeLevels(env, domain, body.x).values());
|
|
1683
|
+
if (badgeLevelCount > (options[BADGE_LEVELS] ?? 1))
|
|
1684
|
+
return layoutGanttPass(data, { ...options, [BADGE_LEVELS]: badgeLevelCount }, keyed, autoHeight, flags);
|
|
1685
|
+
let geometry = layoutGanttMarks(env, domain, band, body, paints);
|
|
1553
1686
|
if (commitClaims(occupied, geometry.claims), heightOpen && flags.rows.size && !flags.pitch) {
|
|
1554
1687
|
let pitch = new Map(geometry.rows.filter((place) => flags.rows.has(place.row.id)).map((place) => [place.row.id, flagRowPitch(planRowFlags(domain, body, place))]).filter(([, pitch2]) => pitch2 > 0));
|
|
1555
1688
|
return layoutGanttPass(data, options, keyed, autoHeight, { rows: flags.rows, pitch });
|