boardplot 0.56.0 → 0.58.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 +408 -0
- package/README.md +49 -15
- package/dist/{DiagnosticDetails-JFBBXOT2.js → DiagnosticDetails-VGSL4NJK.js} +1 -1
- package/dist/{ReaderBox-GLCKYXBU.js → ReaderBox-MHMXIDAJ.js} +8 -7
- package/dist/{annotateEngine-QVNAE3EH.js → annotateEngine-753KQBNN.js} +2 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-HZUAEMN5.js → chunk-2CQBBN7M.js} +4 -4
- package/dist/{chunk-K3VZ5QJK.js → chunk-2ETK5TSA.js} +4 -4
- package/dist/{chunk-HHXIVFAU.js → chunk-2ETSI2EL.js} +11 -9
- package/dist/{chunk-ECBUFKCP.js → chunk-2GRXHWRH.js} +3 -3
- package/dist/{chunk-ZVM5TFGR.js → chunk-2HII2B6S.js} +6 -2
- package/dist/{chunk-WBETBGSC.js → chunk-2LC2H3ZM.js} +1003 -907
- package/dist/chunk-2NX7EO7H.js +23 -0
- package/dist/{chunk-52WNCUIN.js → chunk-2QI2PK2O.js} +1 -1
- package/dist/{chunk-QWCLWFKC.js → chunk-2VKQQLP7.js} +180 -58
- package/dist/chunk-3DOVXJ6K.js +602 -0
- package/dist/{chunk-CAJ54IEP.js → chunk-3E6NLODZ.js} +1 -1
- package/dist/{chunk-MOS6WFWM.js → chunk-3HA4IJTO.js} +9 -9
- package/dist/{chunk-JCIXYOND.js → chunk-3HPPTQEW.js} +4 -4
- package/dist/{chunk-7VVHTOE7.js → chunk-3KT2647F.js} +4 -2
- package/dist/{chunk-O6ZTIDWB.js → chunk-3MFVJMP6.js} +3 -2
- package/dist/{chunk-KQCKK3LD.js → chunk-3P3FKPFN.js} +170 -73
- package/dist/{chunk-WI5VOSQX.js → chunk-3XAJSMYD.js} +2 -2
- package/dist/{chunk-CPGASWNN.js → chunk-42QKUSHJ.js} +13 -3
- package/dist/{chunk-QB5HV4IY.js → chunk-44JU3VOT.js} +7 -8
- package/dist/{chunk-BYCJ6TKI.js → chunk-44K75CYE.js} +3 -3
- package/dist/{chunk-MS7O3KDJ.js → chunk-4FNM4D57.js} +6 -6
- package/dist/{chunk-BVYIKLQ5.js → chunk-4ROZ4TFL.js} +1 -1
- package/dist/{chunk-3V62N3Z7.js → chunk-4VV3KUFT.js} +7 -8
- package/dist/{chunk-MAFPVR4G.js → chunk-54YO56IK.js} +10 -5
- package/dist/{chunk-JMGB444D.js → chunk-5ACFYNA4.js} +8 -4
- package/dist/{chunk-6AMN7IKJ.js → chunk-5JEU6MWC.js} +49 -28
- package/dist/{chunk-NCLRZQR6.js → chunk-5JIB4VJA.js} +18 -10
- package/dist/{chunk-SXD3OYAR.js → chunk-5OP3E2ZD.js} +205 -96
- package/dist/{chunk-SS4YGK3E.js → chunk-5SLBD4BT.js} +72 -304
- package/dist/{chunk-XMP2DNLI.js → chunk-5SVGTQTW.js} +4 -4
- package/dist/chunk-5U567TYU.js +23 -0
- package/dist/chunk-5ZLF4S7X.js +40 -0
- package/dist/{chunk-T2YDWT54.js → chunk-5ZMTQATF.js} +261 -147
- package/dist/{chunk-WXJ5MHLH.js → chunk-62BDQTO6.js} +2 -2
- package/dist/chunk-64K3V4VN.js +25 -0
- package/dist/{chunk-BK6P6KMW.js → chunk-67YJJJIB.js} +1 -1
- package/dist/{chunk-32LLDRPI.js → chunk-6DJNFT2K.js} +42 -32
- package/dist/{chunk-JYAZPMSA.js → chunk-6IUK6PAH.js} +7 -6
- package/dist/{chunk-7STMIK2X.js → chunk-6JFQCVNN.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-5TWY3ZIC.js → chunk-6XPV6M3Q.js} +5 -5
- package/dist/{chunk-MPO5TVGF.js → chunk-6ZDSEITW.js} +3 -3
- package/dist/{chunk-75WIUG2W.js → chunk-72HVDLMT.js} +172 -78
- package/dist/chunk-75NU5RLX.js +24 -0
- package/dist/chunk-76GPN6AT.js +72 -0
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-CF4NMRN7.js → chunk-7CAYRPJV.js} +45 -25
- package/dist/{chunk-U3A6FMSI.js → chunk-7GWWBHVQ.js} +7 -7
- package/dist/{chunk-CHAS5A5B.js → chunk-7NYUFMLJ.js} +149 -86
- package/dist/{chunk-D2B3KP35.js → chunk-7VWXXBTC.js} +4 -0
- package/dist/chunk-A65B23JK.js +113 -0
- package/dist/{chunk-4KMZAK6J.js → chunk-A7R6FUS6.js} +4 -4
- package/dist/{chunk-E2ZUBP4Q.js → chunk-AEVGUOPB.js} +7 -8
- package/dist/chunk-AHIK2N72.js +53 -0
- package/dist/{chunk-KLB2QC24.js → chunk-AICO24HJ.js} +5 -2
- package/dist/{chunk-7KSUMFBK.js → chunk-AJGSCVVW.js} +5 -1
- package/dist/{chunk-RSCRIWAH.js → chunk-AL62JJTB.js} +10 -3
- package/dist/{chunk-E7V3OHQQ.js → chunk-AN2V2LC4.js} +37 -22
- package/dist/{chunk-JIEVDGAF.js → chunk-AOFUA5XP.js} +1 -1
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-2HTYGMMG.js → chunk-BCMEGJRX.js} +2 -2
- package/dist/{chunk-KD5GOR2K.js → chunk-BDIKWR45.js} +124 -69
- package/dist/{chunk-FNRPQIQE.js → chunk-BG6AIWAK.js} +4 -6
- package/dist/{chunk-ZMPH2OC4.js → chunk-BOT6W3VB.js} +7 -8
- package/dist/{chunk-DRHQG44U.js → chunk-BQBD6Q5J.js} +6 -2
- package/dist/{chunk-2DOEZ5QY.js → chunk-BZ67BJBH.js} +11 -10
- package/dist/{chunk-UBCVBBJJ.js → chunk-C47POAC5.js} +4 -3
- package/dist/{chunk-O7REHICC.js → chunk-C5OBPO4Z.js} +36 -28
- package/dist/{chunk-IGNBQT23.js → chunk-CCAAI56H.js} +121 -10
- package/dist/{chunk-RPIKNMZA.js → chunk-CDUR3KWV.js} +7 -2
- package/dist/{chunk-MZACASZY.js → chunk-CMPHT2LS.js} +14 -2
- package/dist/{chunk-FHA3KMFC.js → chunk-CQBPNE7Z.js} +5 -1
- package/dist/{chunk-IVRYF7QA.js → chunk-CR5FP5SF.js} +1 -1
- package/dist/{chunk-DD6RVD3S.js → chunk-D2TQX7UJ.js} +5 -1
- package/dist/{chunk-VVXKFU72.js → chunk-DEANHDXU.js} +62 -41
- package/dist/{chunk-GM3EGUYW.js → chunk-DHGE46UK.js} +1 -1
- package/dist/{chunk-UZTQUPTB.js → chunk-DIHX6NUB.js} +5 -5
- package/dist/{chunk-MD6DCQMA.js → chunk-DILQ34NW.js} +37 -37
- package/dist/{chunk-YMTXTQCN.js → chunk-DJKRYJP7.js} +6 -6
- package/dist/{chunk-JCAGVAB3.js → chunk-DKLC6QLF.js} +1200 -21
- package/dist/{chunk-SRAV6FPB.js → chunk-DNHTMCUP.js} +3 -3
- package/dist/{chunk-CKGSGRP7.js → chunk-DORE2RHL.js} +21 -5
- package/dist/{chunk-SMHZXHHD.js → chunk-DZYTXZNS.js} +15 -5
- package/dist/chunk-E262NRFP.js +39 -0
- package/dist/{chunk-V5JQQMFQ.js → chunk-E5YF236N.js} +4 -1
- package/dist/{chunk-IGJ2G5C6.js → chunk-EBUK7HJP.js} +6 -6
- package/dist/{chunk-ZL6IHMOW.js → chunk-ECBHC272.js} +198 -119
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/chunk-EFW43JQJ.js +24 -0
- package/dist/{chunk-5P2TTHBZ.js → chunk-EHRRHSPV.js} +2 -2
- package/dist/{chunk-JXBZIJCG.js → chunk-EILNJQMN.js} +32 -12
- package/dist/{chunk-GELSK76Y.js → chunk-ERDKMZ7O.js} +3 -3
- package/dist/{chunk-T2CYNDYU.js → chunk-ETRAPN5G.js} +366 -130
- package/dist/{chunk-JEUL777U.js → chunk-ETUKDEGL.js} +21 -12
- package/dist/chunk-F2ET5ZTT.js +49 -0
- package/dist/{chunk-2YO4WRJN.js → chunk-F3XOBFS4.js} +40 -29
- package/dist/{chunk-SPSGUFTI.js → chunk-FB6X7QHA.js} +1 -1
- package/dist/{chunk-5PPQIF4D.js → chunk-FGW54I23.js} +7 -8
- package/dist/{chunk-JTC5SEAQ.js → chunk-FP5B5XIL.js} +7 -3
- package/dist/{chunk-RJGCYGC3.js → chunk-FRHQGA5Q.js} +86 -250
- package/dist/{chunk-YZZLIYPA.js → chunk-FRR7BJ3B.js} +5 -1
- package/dist/{chunk-4DZFR52I.js → chunk-FVWHEM2N.js} +7 -5
- package/dist/{chunk-YPYD6OJ3.js → chunk-FWSMENKH.js} +2 -2
- package/dist/{chunk-YYJORENB.js → chunk-FWTUGNSF.js} +8 -8
- package/dist/{chunk-GIHH6VC2.js → chunk-FZKDZQ6U.js} +10 -6
- package/dist/{chunk-S7NRL66K.js → chunk-G4FF6G3I.js} +26 -17
- package/dist/{chunk-PQLAZEQV.js → chunk-GB6BZSTL.js} +248 -92
- package/dist/chunk-GCIHRRDJ.js +24 -0
- package/dist/{chunk-X3KCQEYZ.js → chunk-GHCU6OSE.js} +9 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/chunk-GO66OCN7.js +24 -0
- package/dist/chunk-GOFS336W.js +24 -0
- package/dist/{chunk-AGDDH6XY.js → chunk-GQYT7G4F.js} +5 -1
- package/dist/{chunk-WN3HEU3P.js → chunk-GUTLXO7Q.js} +140 -89
- package/dist/chunk-H3VICNTN.js +47 -0
- package/dist/{chunk-GC4WOLV3.js → chunk-HAG3K6PQ.js} +14 -2
- package/dist/{chunk-CB4CERXZ.js → chunk-HBQHSZ6S.js} +11 -2
- package/dist/chunk-HTQGJQZN.js +124 -0
- package/dist/{chunk-F77TMAUY.js → chunk-HUQRO6VF.js} +39 -36
- package/dist/{chunk-4KQHKPB3.js → chunk-I5VDW2XZ.js} +543 -509
- package/dist/{chunk-43GGVT7W.js → chunk-I5VNHDPR.js} +11 -4
- package/dist/{chunk-4LTN7SND.js → chunk-IDXYHDQY.js} +1 -1
- package/dist/{chunk-Y54LU4CU.js → chunk-IIWZJ5ZM.js} +1 -1
- package/dist/{chunk-FMDNJ6PC.js → chunk-IPBOREIY.js} +2 -2
- package/dist/chunk-IU335UO7.js +27 -0
- package/dist/{chunk-JVZTKQFS.js → chunk-IVDTP6SV.js} +9 -5
- package/dist/{chunk-BDGLMWPO.js → chunk-IXOBDDMW.js} +11 -2
- package/dist/{chunk-EIL3KHAL.js → chunk-J4QRB6DQ.js} +5 -5
- package/dist/{chunk-3465633G.js → chunk-JCMGKQVS.js} +3 -3
- package/dist/{chunk-YK2KWNTU.js → chunk-JM7UTLF3.js} +28 -14
- package/dist/{chunk-CXETOLPX.js → chunk-JNDWRV34.js} +4 -4
- package/dist/{chunk-DLUNQHFO.js → chunk-JSRQTDZZ.js} +26 -24
- package/dist/{chunk-WTQAG2OT.js → chunk-JT3UTEWZ.js} +8 -3
- package/dist/{chunk-GQT2SY2S.js → chunk-JUYRDZSV.js} +291 -151
- package/dist/{chunk-LKMFMNQX.js → chunk-JVGL2SCN.js} +1 -1
- package/dist/{chunk-4JC3SE4G.js → chunk-JY4LTPOV.js} +1 -1
- package/dist/chunk-K7XPTQBJ.js +267 -0
- package/dist/{chunk-P4SMC4BY.js → chunk-KGBUXMFP.js} +120 -86
- package/dist/{chunk-XC5IRUEL.js → chunk-KIE5V3DA.js} +2 -2
- package/dist/{chunk-RT66UTLJ.js → chunk-KU4PCG4W.js} +2 -2
- package/dist/{chunk-VPL3JYC6.js → chunk-KVBLTAO7.js} +52 -10
- package/dist/{chunk-XCROSJ2Z.js → chunk-KW4JXWHO.js} +1 -1
- package/dist/{chunk-PJBEJR2U.js → chunk-KWIP5YRA.js} +24 -7
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-R2IKOLBK.js → chunk-LG6M2JTH.js} +3 -3
- package/dist/{chunk-DF3XEFQ7.js → chunk-LIE2WSB4.js} +21 -18
- package/dist/{chunk-Z55DXFWS.js → chunk-LJDATBPB.js} +26 -16
- package/dist/{chunk-KLIZXSBK.js → chunk-LMMS675D.js} +10 -9
- package/dist/{chunk-MRAP2UVV.js → chunk-LPKGZ664.js} +286 -35
- package/dist/{chunk-JFFREZGT.js → chunk-LPMSGO7L.js} +6 -2
- package/dist/chunk-LQWINE7K.js +211 -0
- package/dist/{chunk-6MJUW5R5.js → chunk-MKMMQDIY.js} +139 -71
- package/dist/{chunk-F5BYLT3M.js → chunk-MQ4IEDM5.js} +462 -138
- package/dist/{chunk-QGFKSDQO.js → chunk-MRM4KJ2O.js} +2 -2
- package/dist/{chunk-ETMHDCEH.js → chunk-MX2OZHIT.js} +102 -42
- package/dist/{chunk-6EYTD777.js → chunk-MXUPMGRY.js} +2 -2
- package/dist/{chunk-2FKEF2AC.js → chunk-NHU26HQ7.js} +58 -35
- package/dist/{chunk-KBJMLXNW.js → chunk-NQVJ4FPY.js} +161 -78
- package/dist/chunk-NZ7FX3AE.js +65 -0
- package/dist/chunk-OALBVELJ.js +23 -0
- package/dist/{chunk-5S3JQ5AT.js → chunk-OGZ4UPYK.js} +183 -137
- package/dist/{chunk-6WHWXCHJ.js → chunk-OMNB27GM.js} +7 -3
- package/dist/{chunk-EGGDPDYJ.js → chunk-OO63YP35.js} +1 -1
- package/dist/{chunk-ZYQYX66L.js → chunk-OPYDTW5Q.js} +6 -6
- package/dist/{chunk-A2GAWGVJ.js → chunk-OSJN7KDS.js} +68 -39
- package/dist/{chunk-RMC4OONA.js → chunk-OSJXIW6I.js} +1030 -1123
- package/dist/{chunk-X23SZHV5.js → chunk-OVVE42P4.js} +6 -6
- package/dist/{chunk-CCJP6QZO.js → chunk-OZA7HA6L.js} +1 -1
- package/dist/chunk-OZLKEBCD.js +54 -0
- package/dist/{chunk-TE4M52AA.js → chunk-P6DEFCMQ.js} +18 -2
- package/dist/{chunk-AMR4SUAN.js → chunk-PDTIQL3B.js} +6 -6
- package/dist/{chunk-BIVL764T.js → chunk-PJ5BYZPN.js} +2 -2
- package/dist/{chunk-BISJK67O.js → chunk-PK7Z7WRJ.js} +98 -46
- package/dist/{chunk-7VMEM3LN.js → chunk-PL6NWB5U.js} +178 -113
- package/dist/chunk-PMT75APP.js +94 -0
- package/dist/chunk-PP6A4X55.js +11 -0
- package/dist/{chunk-I7H5DU34.js → chunk-PPCH3PLO.js} +25 -13
- package/dist/{chunk-BIGQKCU7.js → chunk-PPE6S7WU.js} +42 -24
- package/dist/{chunk-2NSQIPAA.js → chunk-PT7KSIEO.js} +23 -36
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-ZJFJ2IKQ.js → chunk-QAUGRVRU.js} +122 -23
- package/dist/{chunk-BTDGWHGJ.js → chunk-QMFWZG2P.js} +39 -19
- package/dist/{chunk-L6YVK6VC.js → chunk-QZGGCE45.js} +2 -2
- package/dist/{chunk-67QSW5RW.js → chunk-R2RJQ3BM.js} +4 -4
- package/dist/{chunk-ZY72LSQK.js → chunk-R7HBIQ63.js} +102 -61
- package/dist/{chunk-4JHMCXOB.js → chunk-RBNDZLYS.js} +77 -36
- package/dist/chunk-RCSY4CT4.js +2170 -0
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-2NN676RI.js → chunk-RHQRPJHS.js} +7 -8
- package/dist/chunk-RI6XQKWJ.js +26 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-RJICOOB3.js} +18 -8
- package/dist/{chunk-5DTCOOLU.js → chunk-RLAVNCQJ.js} +2 -2
- package/dist/{chunk-CYKXROFG.js → chunk-ROPPWJQB.js} +23 -12
- package/dist/{chunk-54ROMBU7.js → chunk-SELOV32X.js} +105 -50
- package/dist/{chunk-TUW5IYGA.js → chunk-SQI4NWTQ.js} +9 -9
- package/dist/{chunk-ZEYBI47P.js → chunk-SRJ74CMG.js} +11 -3
- package/dist/{chunk-NHC2ADGI.js → chunk-STWOURLG.js} +253 -144
- package/dist/chunk-SWMFXSVW.js +23 -0
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-EMFUZKYK.js → chunk-SZ5VGWDY.js} +3 -3
- package/dist/{chunk-R5MEBBAA.js → chunk-T26G23RS.js} +442 -119
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/chunk-T7GPIJ4L.js +89 -0
- package/dist/{chunk-MJPXHCBW.js → chunk-TAEB3RU6.js} +5 -5
- package/dist/{chunk-V7F4F6JA.js → chunk-TBDIMTRD.js} +37 -16
- package/dist/{chunk-63Y3ROZ7.js → chunk-TFFPEWNP.js} +102 -64
- package/dist/{chunk-EZZ533MH.js → chunk-TMEUK2WS.js} +6 -2
- package/dist/{chunk-37PKNVLS.js → chunk-TVOMGNFQ.js} +1 -1
- package/dist/{chunk-HJRNBKIT.js → chunk-TX5FSNAU.js} +436 -30
- package/dist/{chunk-V634AXDM.js → chunk-U52PNFPX.js} +1 -1
- package/dist/{chunk-QLANK3VN.js → chunk-U74AWJ3X.js} +6 -6
- package/dist/chunk-UC7LBW7N.js +26 -0
- package/dist/{chunk-PZ46S2SY.js → chunk-UCKUAKYQ.js} +2 -2
- package/dist/{chunk-KF7HD3EH.js → chunk-UCYL3YA7.js} +77 -55
- package/dist/{chunk-HOU2MZHC.js → chunk-UD2GI3CS.js} +11 -4
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-LGNJCPFP.js → chunk-ULQIC76A.js} +10 -13
- package/dist/{chunk-KTHFHD6C.js → chunk-UY34DDUM.js} +11 -6
- package/dist/{chunk-6QDMRPXI.js → chunk-UYMFLWM6.js} +215 -258
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-JTFKRDDA.js → chunk-V7FV66KL.js} +1 -1
- package/dist/{chunk-27OIGDRK.js → chunk-V7NUJEJE.js} +1 -1
- package/dist/{chunk-CCDXK5NA.js → chunk-VESSIKBG.js} +8 -3
- package/dist/{chunk-QSMGZOT5.js → chunk-VRFJAF3R.js} +7 -8
- package/dist/chunk-VS2R3OGN.js +34 -0
- package/dist/{chunk-RLMC5CUP.js → chunk-VS5B4J2D.js} +7 -8
- package/dist/{chunk-7M2GK7XQ.js → chunk-W4R6SGU3.js} +252 -121
- package/dist/{chunk-JKOEHRGV.js → chunk-WDLWWEHZ.js} +1 -1
- package/dist/{chunk-7DAH2E4T.js → chunk-WFBN2HXR.js} +2 -2
- package/dist/{chunk-DLDDRXAI.js → chunk-WJS6SAWA.js} +296 -145
- package/dist/{chunk-WWGPTEQB.js → chunk-WQYNKF33.js} +73 -22
- package/dist/{chunk-64LJDGJH.js → chunk-WUP6C4ZD.js} +4 -2
- package/dist/{chunk-F2EVCJ4U.js → chunk-X24WAHHV.js} +87 -43
- package/dist/{chunk-OJ5CQV7H.js → chunk-X3UCQPVV.js} +209 -96
- package/dist/{chunk-7FKY6YWU.js → chunk-X46PSAJ7.js} +6 -6
- package/dist/{chunk-H3IBJQ5A.js → chunk-XD5XB22R.js} +2 -2
- package/dist/chunk-XDIAQEYK.js +28 -0
- package/dist/{chunk-7PPMT5EJ.js → chunk-XFPNYHX3.js} +372 -105
- package/dist/{chunk-FCECYJVA.js → chunk-XIBVAKCO.js} +1 -1
- package/dist/{chunk-OG2YUVBW.js → chunk-XMX4PCFL.js} +8 -3
- package/dist/{chunk-2NRHD2G7.js → chunk-XRRG4MBM.js} +12 -4
- package/dist/{chunk-FNMH5WEY.js → chunk-XTFO6D4L.js} +1 -1
- package/dist/chunk-XWRI3N5O.js +70 -0
- package/dist/{chunk-ZKJ5L35C.js → chunk-XXPLPSOE.js} +36 -25
- package/dist/{chunk-XQMYQ4TN.js → chunk-XZXZNI7A.js} +1 -1
- package/dist/{chunk-E555EDOQ.js → chunk-YEJZ2OYS.js} +490 -182
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-F6OLHND5.js → chunk-Z3WQXVFV.js} +2 -2
- package/dist/{chunk-FFJGC2DX.js → chunk-Z6DUNKFU.js} +173 -40
- package/dist/{chunk-N5HN5QGH.js → chunk-Z6H5ED2I.js} +1 -1
- package/dist/{chunk-7Q37C6GZ.js → chunk-ZBOOMLHD.js} +1 -1
- package/dist/{chunk-MOK3ZS6P.js → chunk-ZDJ7C64T.js} +1 -1
- package/dist/{chunk-GLQ3KCTY.js → chunk-ZGZLEUKM.js} +7 -8
- package/dist/{chunk-YHD2FZFP.js → chunk-ZHRGX225.js} +6 -6
- package/dist/{chunk-76Q7E3TM.js → chunk-ZIVCPXXL.js} +510 -646
- package/dist/{chunk-BSATR6ZO.js → chunk-ZNRSYS76.js} +21 -3
- package/dist/{chunk-DMAMWUYY.js → chunk-ZSLTSCTI.js} +5 -5
- package/dist/{chunk-IGVAWAOK.js → chunk-ZSYFQSPF.js} +43 -9
- package/dist/cli/index.js +8 -3
- package/dist/{core-7Y5BZZON.js → core-43GLGBOY.js} +8 -1
- package/dist/{core-7S3XMW5O.js → core-5GI3ERXO.js} +4 -1
- package/dist/{core-K3JX5WPM.js → core-5L7TMK7I.js} +6 -1
- package/dist/{core-LB5M7XL4.js → core-7TO4OVY5.js} +6 -1
- package/dist/{core-ILPXXC2Z.js → core-BJVENHFQ.js} +7 -1
- package/dist/{core-JDFUZFRH.js → core-BX4MFWKC.js} +6 -1
- package/dist/{core-XW7UJFJZ.js → core-C3KXTOIZ.js} +7 -1
- package/dist/{core-WJNK7F2J.js → core-C5Y6BFLL.js} +7 -1
- package/dist/{core-WZ4CHVYL.js → core-CLUSJ2SK.js} +5 -1
- package/dist/{core-TCSW24N6.js → core-E3IN2VVH.js} +5 -1
- package/dist/{core-MU4ALRR7.js → core-FD67NQOV.js} +6 -1
- package/dist/{core-YMXYUGF5.js → core-FDKMLRAK.js} +5 -1
- package/dist/{core-VKZSQFRG.js → core-FL6Z3VVX.js} +5 -1
- package/dist/{core-5UF44NDI.js → core-JC7JUFPY.js} +8 -1
- package/dist/{core-RR2CAZC5.js → core-JF33TADA.js} +8 -1
- package/dist/{core-4RR6VSXM.js → core-JH32ZAKM.js} +4 -1
- package/dist/{core-G3LXHW73.js → core-JYYZPPQV.js} +7 -1
- package/dist/{core-4HFVG4CP.js → core-KJTKCV4U.js} +4 -1
- package/dist/{core-GSILPKUR.js → core-LCQPE5Y6.js} +8 -1
- package/dist/{core-GLOZY6Z7.js → core-LHVGWE54.js} +6 -1
- package/dist/{core-J2JD5ODO.js → core-OVSNBOCE.js} +9 -1
- package/dist/{core-BLHEJ5OK.js → core-PPEC236B.js} +5 -1
- package/dist/{core-ZLSQHZ3I.js → core-QTJZDK5H.js} +5 -1
- package/dist/{core-TKZZZ6UW.js → core-R3YZCOUZ.js} +7 -1
- package/dist/{core-HTD5RHE7.js → core-RIBW5XU4.js} +7 -1
- package/dist/{core-AR2T32Y3.js → core-RJFILBWL.js} +8 -1
- package/dist/{core-A5AKUB7H.js → core-RWSXEKTE.js} +4 -1
- package/dist/{core-DD62MWEW.js → core-SOPPZLEH.js} +5 -1
- package/dist/{core-HDNWVLJW.js → core-TBUZCXLX.js} +5 -1
- package/dist/{core-BOG33BFD.js → core-TZ5QLTAX.js} +5 -1
- package/dist/{core-H5HO2CED.js → core-U7E5W4MY.js} +3 -1
- package/dist/{core-QPSAYRFT.js → core-UBNVSL44.js} +7 -1
- package/dist/{core-E2XOSHPR.js → core-UDRD4WIU.js} +6 -1
- package/dist/{core-DFZMOO7E.js → core-UVJZ4HY2.js} +7 -1
- package/dist/{core-LGJZUP6H.js → core-X7WWYQH4.js} +8 -1
- package/dist/{core-BBNY2BX4.js → core-XP56X47I.js} +5 -1
- package/dist/{core-3KLQSYWB.js → core-XQG54CYG.js} +6 -1
- package/dist/{dataTable-CNDRVGA5.js → dataTable-U7W4I6IF.js} +15 -2
- package/dist/{engine-FVEIM3WV.js → engine-O5V26MGR.js} +32 -19
- package/dist/fixtures.js +4 -1
- package/dist/flags-BVLSAXT3.js +10 -0
- package/dist/{fontTables-ZPZQ6IR3.js → fontTables-JUW7ZTQY.js} +3 -1
- package/dist/fonts.js +1 -1
- package/dist/geo/dach.js +1 -1
- package/dist/geo/de-states.js +1 -1
- package/dist/geo/eu27.js +1 -1
- package/dist/geo/europe.js +1 -1
- package/dist/geo/index.js +2 -2
- package/dist/geo/us-states.js +1 -1
- package/dist/geo/world.js +1 -1
- package/dist/index.js +41 -22
- package/dist/{main-THU6VIVU.js → main-35GS47XC.js} +68 -123
- package/dist/mcp/server.js +131 -118
- package/dist/react/bar.js +10 -1
- package/dist/react/bartable.js +10 -1
- package/dist/react/box.js +8 -1
- package/dist/react/bullet.js +10 -1
- package/dist/react/butterfly.js +10 -1
- package/dist/react/choropleth.js +10 -1
- package/dist/react/cohort.js +11 -1
- package/dist/react/column.js +10 -1
- package/dist/react/combo.js +10 -1
- package/dist/react/creative.js +11 -1
- package/dist/react/diagram.js +10 -1
- package/dist/react/dimswitch.js +11 -1
- package/dist/react/dot.js +9 -1
- package/dist/react/export.js +36 -18
- package/dist/react/funnel.js +9 -1
- package/dist/react/gantt.js +9 -1
- package/dist/react/grid.js +10 -1
- package/dist/react/heatmap.js +9 -1
- package/dist/react/histogram.js +11 -1
- package/dist/react/index.js +101 -85
- package/dist/react/kpi.js +10 -1
- package/dist/react/likert.js +11 -1
- package/dist/react/line.js +9 -1
- package/dist/react/mekko.js +10 -1
- package/dist/react/pareto.js +11 -1
- package/dist/react/pie.js +9 -1
- package/dist/react/prepare.js +49 -21
- package/dist/react/pvm.js +12 -1
- package/dist/react/pyramid.js +10 -1
- package/dist/react/sankey.js +10 -1
- package/dist/react/scatter.js +8 -1
- package/dist/react/slope.js +10 -1
- package/dist/react/sparkline.js +10 -1
- package/dist/react/spec.js +24 -14
- package/dist/react/status.js +9 -1
- package/dist/react/story.js +5 -2
- package/dist/react/table.js +9 -1
- package/dist/react/theme.js +10 -3
- package/dist/react/tilemap.js +9 -1
- package/dist/react/treemap.js +9 -1
- package/dist/react/variance.js +10 -1
- package/dist/react/waffle.js +9 -1
- package/dist/react/waterfall.js +11 -1
- package/dist/{resvg-VB7S5HRF.js → resvg-ZYEZTSUO.js} +3 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-LI6KOS46.js → rowsModule-H2S6WW4D.js} +2 -1
- package/dist/{schema-CGQID64D.js → schema-2R32F6AW.js} +1 -1
- package/dist/{schema-H2EC4GAQ.js → schema-2TPGJGVR.js} +1 -1
- package/dist/{schema-THXXFY6I.js → schema-47BG2TZA.js} +1 -3
- package/dist/{schema-AMT7P7KB.js → schema-56MOEOVR.js} +1 -1
- package/dist/{schema-GNTKL5DN.js → schema-5MSR4LNN.js} +1 -1
- package/dist/{schema-5ZTGVQAJ.js → schema-5RIYEWE6.js} +1 -1
- package/dist/{schema-LOQ3AFC7.js → schema-A26ZNGTZ.js} +1 -3
- package/dist/{schema-MMVPMJEF.js → schema-ALBF6V7Y.js} +1 -3
- package/dist/{schema-BKUFZLLI.js → schema-BA6WP5YZ.js} +1 -1
- package/dist/{schema-PQZWO3BP.js → schema-CBL2SMVR.js} +1 -3
- package/dist/{schema-BBTXTWYI.js → schema-CWKGLDSR.js} +1 -3
- package/dist/{schema-5KDEQBBT.js → schema-DBIQFL56.js} +1 -1
- package/dist/{schema-KPEPBGAX.js → schema-DL7V6NN2.js} +1 -1
- package/dist/{schema-PL3EU6EQ.js → schema-DUVJMFKQ.js} +4 -2
- package/dist/{schema-L5U4OROI.js → schema-ECJERHKF.js} +2 -1
- package/dist/{schema-YLE4XXQQ.js → schema-EDSEKZDJ.js} +1 -1
- package/dist/{schema-HH5HOORE.js → schema-ESR6ZIK4.js} +1 -3
- package/dist/{schema-5DUTAVO7.js → schema-F7TWGLRZ.js} +1 -3
- package/dist/{schema-B2GCEYXD.js → schema-FGB6IGZM.js} +1 -3
- package/dist/{schema-7NSV542V.js → schema-FKGGTM4Z.js} +2 -1
- package/dist/{schema-72EEMYS3.js → schema-FU2AFIEE.js} +1 -1
- package/dist/{schema-QORUB6EK.js → schema-JNJFCYBM.js} +18 -1
- package/dist/{schema-JH57NFXJ.js → schema-JYZ4RF6S.js} +2 -1
- package/dist/{schema-25INXAMY.js → schema-K7F6TEDK.js} +1 -2
- package/dist/{schema-OU35XA3Z.js → schema-KAK6DZX4.js} +1 -1
- package/dist/{schema-R5Y6NVBH.js → schema-MOKWIGF7.js} +1 -1
- package/dist/{schema-ZQSIR5UC.js → schema-MQT6BMNK.js} +1 -3
- package/dist/{schema-FDFQKIO5.js → schema-MR3BPPQR.js} +1 -1
- package/dist/{schema-VYECMPON.js → schema-OPXZYIW7.js} +1 -3
- package/dist/{schema-ZEVJMFLV.js → schema-PV7JGX5H.js} +1 -1
- package/dist/{schema-QPOBZUAR.js → schema-PWPQF5RC.js} +1 -1
- package/dist/{schema-GN6GAIU5.js → schema-PYQEUC5P.js} +1 -3
- package/dist/{schema-M5JBHQIV.js → schema-QPIC5MAG.js} +9 -2
- package/dist/{schema-QCIE6M2P.js → schema-R42VXFIS.js} +1 -1
- package/dist/{schema-J7TNCZIP.js → schema-TVUJNEX7.js} +1 -1
- package/dist/{schema-AXRDF6ND.js → schema-Y4TI2T3T.js} +1 -1
- package/dist/{schema-ZG6ZKFRZ.js → schema-ZU2EU2VP.js} +1 -1
- package/dist/{specValidation-VHLGDEME.js → specValidation-2NHJT7TQ.js} +4 -1
- package/dist/theme.js +7 -2
- package/dist/{themeShapeRules-PW4BQHKL.js → themeShapeRules-G7UZX6GJ.js} +1 -1
- package/dist/types/core/annotate.d.ts +27 -2
- package/dist/types/core/annotateArms.d.ts +3 -1
- package/dist/types/core/annotateTargets.d.ts +4 -0
- package/dist/types/core/annotationOrigin.d.ts +13 -0
- package/dist/types/core/axis.d.ts +2 -2
- package/dist/types/core/charts/band/stacks.d.ts +7 -1
- package/dist/types/core/charts/bartable/types.d.ts +14 -1
- package/dist/types/core/charts/box/types.d.ts +3 -1
- package/dist/types/core/charts/choropleth/layout.d.ts +1 -5
- package/dist/types/core/charts/choropleth/types.d.ts +19 -0
- package/dist/types/core/charts/cohort/types.d.ts +16 -3
- package/dist/types/core/charts/column/model.d.ts +13 -0
- package/dist/types/core/charts/combo/layout.d.ts +7 -0
- package/dist/types/core/charts/creative/types.d.ts +21 -0
- package/dist/types/core/charts/dimswitch/compile.d.ts +15 -2
- package/dist/types/core/charts/dimswitch/types.d.ts +24 -1
- package/dist/types/core/charts/gantt/calendar.d.ts +24 -0
- package/dist/types/core/charts/gantt/columns.d.ts +56 -0
- package/dist/types/core/charts/gantt/layout.d.ts +8 -2
- package/dist/types/core/charts/gantt/model.d.ts +296 -0
- package/dist/types/core/charts/grid/metricStack.d.ts +9 -0
- package/dist/types/core/charts/grid/metricStackSchema.d.ts +13 -0
- package/dist/types/core/charts/grid/normalize.d.ts +5 -0
- package/dist/types/core/charts/grid/schema.d.ts +2 -2
- package/dist/types/core/charts/histogram/types.d.ts +8 -0
- package/dist/types/core/charts/likert/layout.d.ts +10 -8
- package/dist/types/core/charts/pareto/layout.d.ts +2 -0
- package/dist/types/core/charts/pvm/types.d.ts +10 -1
- package/dist/types/core/charts/pyramid/types.d.ts +3 -1
- package/dist/types/core/charts/sankey/types.d.ts +5 -1
- package/dist/types/core/charts/scatter/clamp.d.ts +2 -1
- package/dist/types/core/charts/scatter/model.d.ts +5 -0
- package/dist/types/core/charts/scatter/valueLines.d.ts +3 -1
- package/dist/types/core/charts/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +22 -3
- package/dist/types/core/charts/table/view.d.ts +24 -1
- package/dist/types/core/claims/browser.d.ts +2 -0
- package/dist/types/core/claims/ids.d.ts +38 -0
- package/dist/types/core/deferred.d.ts +1 -0
- package/dist/types/core/doc/diagnostics.d.ts +3 -2
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/formatSpec.d.ts +43 -14
- package/dist/types/core/frame.d.ts +26 -59
- package/dist/types/core/frameText.d.ts +203 -0
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +3 -1
- package/dist/types/core/label/categoryRow.d.ts +19 -2
- package/dist/types/core/label/solver.d.ts +23 -2
- package/dist/types/core/normalize/shared.d.ts +14 -2
- package/dist/types/core/notes.d.ts +15 -2
- package/dist/types/core/reading.d.ts +12 -1
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +7 -1
- package/dist/types/core/schema/capability.d.ts +32 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/seriesIdentity.d.ts +4 -1
- package/dist/types/core/sizing.d.ts +32 -1
- package/dist/types/core/structureCounts.d.ts +3 -1
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/theme.d.ts +33 -4
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/themeRules.d.ts +2 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/annotations.d.ts +74 -4
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +118 -15
- package/dist/types/core/types/scene.d.ts +30 -2
- package/dist/types/core/types/table.d.ts +27 -3
- package/dist/types/core/types/theme.d.ts +23 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/react/TableChart.d.ts +5 -0
- package/dist/types/react/barrelCharts.d.ts +16 -5
- package/dist/types/react/charts/butterfly.d.ts +2 -2
- package/dist/types/react/charts/dot.d.ts +7 -1
- package/dist/types/react/charts/pareto.d.ts +4 -1
- package/dist/types/react/charts/variance.d.ts +3 -1
- package/dist/types/react/hover/labelCard.d.ts +11 -2
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +23 -6
- package/docs/TELEMETRY.md +2 -2
- package/docs/manual.md +283 -65
- package/docs/reference/bar.md +15 -4
- package/docs/reference/bartable.md +17 -2
- package/docs/reference/box.md +15 -4
- package/docs/reference/bullet.md +21 -6
- package/docs/reference/butterfly.md +17 -6
- package/docs/reference/choropleth.md +16 -5
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +19 -4
- package/docs/reference/combo.md +11 -5
- package/docs/reference/creative.md +17 -8
- package/docs/reference/diagram.md +6 -1
- package/docs/reference/dimswitch.md +71 -118
- package/docs/reference/dot.md +16 -7
- package/docs/reference/fixtures.md +94 -1
- package/docs/reference/funnel.md +14 -5
- package/docs/reference/gantt.md +17 -16
- package/docs/reference/grid.md +13 -3
- package/docs/reference/heatmap.md +16 -6
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +17 -4
- package/docs/reference/line.md +18 -5
- package/docs/reference/mekko.md +10 -5
- package/docs/reference/options.md +20 -15
- package/docs/reference/pareto.md +9 -5
- package/docs/reference/pie.md +9 -5
- package/docs/reference/pvm.md +16 -6
- package/docs/reference/pyramid.md +14 -4
- package/docs/reference/react.md +6 -7
- package/docs/reference/sankey.md +7 -3
- package/docs/reference/scatter.md +8 -4
- package/docs/reference/slope.md +15 -5
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +41 -110
- package/docs/reference/theme.md +12 -4
- package/docs/reference/tilemap.md +2 -4
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/variance.md +12 -6
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/warnings.md +1077 -0
- package/docs/reference/waterfall.md +20 -5
- package/docs/use-cases.md +25 -13
- package/llms.txt +19 -6
- package/package.json +18 -3
- package/dist/chunk-6364WO5D.js +0 -47
- package/dist/chunk-DQ7YMQVX.js +0 -26
- package/dist/chunk-EBB4PYBN.js +0 -24
- package/dist/chunk-FG5L2LUK.js +0 -89
- package/dist/chunk-IFQN4GKK.js +0 -1852
- package/dist/chunk-IRXVV65V.js +0 -24
- package/dist/chunk-JGFHNAHS.js +0 -22
- package/dist/chunk-JHWYG7V5.js +0 -24
- package/dist/chunk-M4SPKUZE.js +0 -7
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-QJWLNP64.js +0 -24
- package/dist/chunk-QZIHKQRH.js +0 -26
- package/dist/chunk-SE7MJ2LQ.js +0 -24
- package/dist/chunk-TXBO2LWM.js +0 -25
- package/dist/chunk-UPTXFTKH.js +0 -25
- package/dist/chunk-UREXN6WG.js +0 -25
- package/dist/chunk-UZLR25BW.js +0 -24
- package/dist/chunk-WIVFIVFZ.js +0 -27
- package/dist/chunk-WZL4EEBS.js +0 -11
- package/dist/chunk-XHRUXZD7.js +0 -28
- package/dist/chunk-ZWNRLIFT.js +0 -24
|
@@ -1,83 +1,92 @@
|
|
|
1
1
|
import {
|
|
2
2
|
chartPalette,
|
|
3
3
|
chartTheme
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WFBN2HXR.js";
|
|
5
5
|
import {
|
|
6
6
|
diagramKindError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZBOOMLHD.js";
|
|
8
8
|
import {
|
|
9
9
|
compileIcon
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XD5XB22R.js";
|
|
11
|
+
import {
|
|
12
|
+
fitsRoom,
|
|
13
|
+
widthsThatFit
|
|
14
|
+
} from "./chunk-AHIK2N72.js";
|
|
11
15
|
import {
|
|
12
16
|
structureCount
|
|
13
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KW4JXWHO.js";
|
|
18
|
+
import {
|
|
19
|
+
generatedIdWarnings
|
|
20
|
+
} from "./chunk-SXAZDIGM.js";
|
|
14
21
|
import {
|
|
15
22
|
CARD_MIN_WIDTH,
|
|
16
23
|
chartSizing,
|
|
17
24
|
contentSizing,
|
|
25
|
+
heightOmitted,
|
|
18
26
|
resolveSizing,
|
|
19
27
|
rowDrivenHeight,
|
|
20
28
|
sizeRefusal
|
|
21
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-ETRAPN5G.js";
|
|
22
30
|
import {
|
|
23
31
|
PRIORITY,
|
|
24
|
-
boundsOf,
|
|
25
|
-
clamp,
|
|
26
|
-
createOccupiedIndex,
|
|
27
32
|
fitText,
|
|
28
33
|
frameTextOptions,
|
|
29
|
-
inflate,
|
|
30
34
|
labelCtx,
|
|
31
35
|
labelsToNodes,
|
|
32
|
-
rectCenter,
|
|
33
|
-
rectContains,
|
|
34
|
-
rectLineDistance,
|
|
35
|
-
rectsOverlap,
|
|
36
36
|
seatLeader,
|
|
37
37
|
solveFrame,
|
|
38
38
|
solveLabels
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-I5VDW2XZ.js";
|
|
40
40
|
import {
|
|
41
41
|
chartStrings
|
|
42
42
|
} from "./chunk-MSYTF3DZ.js";
|
|
43
43
|
import {
|
|
44
|
+
boundsOf,
|
|
44
45
|
canvasMargin,
|
|
46
|
+
clamp,
|
|
47
|
+
classStepWidth,
|
|
45
48
|
contrastInkPaint,
|
|
49
|
+
createOccupiedIndex,
|
|
46
50
|
dashToken,
|
|
47
51
|
emphasisWeight,
|
|
48
52
|
groundTextPaint,
|
|
49
53
|
headingWeight,
|
|
54
|
+
inflate,
|
|
50
55
|
markRolePaint,
|
|
51
56
|
paintColor,
|
|
52
57
|
panelTypeClass,
|
|
58
|
+
rectCenter,
|
|
59
|
+
rectContains,
|
|
60
|
+
rectLineDistance,
|
|
61
|
+
rectsOverlap,
|
|
53
62
|
resolveSurface,
|
|
54
63
|
resolveTheme,
|
|
55
64
|
secondaryFont,
|
|
56
65
|
seriesPaint,
|
|
57
66
|
strokeToken,
|
|
58
67
|
themeForWidth
|
|
59
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-TX5FSNAU.js";
|
|
60
69
|
import {
|
|
61
70
|
monotonePath,
|
|
62
71
|
monotoneSegments
|
|
63
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-6IUK6PAH.js";
|
|
64
73
|
import {
|
|
65
74
|
NormalizeError,
|
|
66
75
|
TARGET_SIZE,
|
|
67
76
|
accessibleTitle,
|
|
68
77
|
resolveSize
|
|
69
|
-
} from "./chunk-
|
|
70
|
-
import {
|
|
71
|
-
maxOf,
|
|
72
|
-
minOf,
|
|
73
|
-
pushAll
|
|
74
|
-
} from "./chunk-WYJEOMNY.js";
|
|
78
|
+
} from "./chunk-RJICOOB3.js";
|
|
75
79
|
import {
|
|
76
80
|
compareText,
|
|
77
81
|
defaultMeasurer,
|
|
78
82
|
wrapNameText,
|
|
79
83
|
wrapText
|
|
80
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-UIHGGWES.js";
|
|
85
|
+
import {
|
|
86
|
+
maxOf,
|
|
87
|
+
minOf,
|
|
88
|
+
pushAll
|
|
89
|
+
} from "./chunk-WYJEOMNY.js";
|
|
81
90
|
|
|
82
91
|
// src/core/strings/diagram.ts
|
|
83
92
|
var EN = {
|
|
@@ -149,21 +158,25 @@ function automaticEdgeId(preset, index, source, target) {
|
|
|
149
158
|
}
|
|
150
159
|
|
|
151
160
|
// src/core/charts/diagram/model.ts
|
|
161
|
+
function authoredItem(list, key, id, ...field) {
|
|
162
|
+
let matches = (list ?? []).flatMap((item, index) => item.id === id ? [index] : []);
|
|
163
|
+
return matches.length === 1 ? ["data", key, matches[0], ...field] : void 0;
|
|
164
|
+
}
|
|
152
165
|
var stableOrder = (items) => items.map((item, sourceIndex) => ({ item, sourceIndex })).sort(
|
|
153
166
|
(a, b) => (a.item.order ?? a.sourceIndex) - (b.item.order ?? b.sourceIndex) || compareText(a.item.id, b.item.id)
|
|
154
167
|
).map(({ item }) => item);
|
|
155
168
|
function normalizeDiagramModel(rawData, rawOptions) {
|
|
156
|
-
if (!Array.isArray(rawData.nodes) || rawData.nodes.length === 0) throw new NormalizeError("empty-data", "nodes", "diagram requires at least one node");
|
|
157
|
-
let nodes = stableOrder(rawData.nodes).map((node) => ({ ...node })), groups = stableOrder(rawData.groups ?? []), groupEnds = /* @__PURE__ */ new Map(), resolveEnd = (edge, end) => {
|
|
169
|
+
if (!Array.isArray(rawData.nodes) || rawData.nodes.length === 0) throw new NormalizeError("empty-data", "nodes", "diagram requires at least one node", void 0, void 0, ["data", "nodes"]);
|
|
170
|
+
let nodes = stableOrder(rawData.nodes).map((node) => ({ ...node })), groups = stableOrder(rawData.groups ?? []), groupEnds = /* @__PURE__ */ new Map(), resolveEnd = (edge, end, index) => {
|
|
158
171
|
let endpoint2 = edge[end];
|
|
159
172
|
if (!("groupId" in endpoint2)) return endpoint2;
|
|
160
|
-
if (rawOptions.variant !== "architecture") throw new NormalizeError("invalid-membership", `edges[${edge.id}].${end}`, `only variant 'architecture' ends an edge on a group, not '${rawOptions.variant}'`, "name a node, or set options.variant to architecture");
|
|
173
|
+
if (rawOptions.variant !== "architecture") throw new NormalizeError("invalid-membership", `edges[${edge.id}].${end}`, `only variant 'architecture' ends an edge on a group, not '${rawOptions.variant}'`, "name a node, or set options.variant to architecture", void 0, ["data", "edges", index, end]);
|
|
161
174
|
let member = nodes.find((node) => node.groupId !== void 0 && groupWithin(groups, node.groupId, endpoint2.groupId));
|
|
162
|
-
if (!member) throw new NormalizeError("invalid-membership", `edges[${edge.id}].${end}`, `group '${endpoint2.groupId}' has no nodes to end edge '${edge.id}' on`, `add a node to group '${endpoint2.groupId}'
|
|
175
|
+
if (!member) throw new NormalizeError("invalid-membership", `edges[${edge.id}].${end}`, `group '${endpoint2.groupId}' has no nodes to end edge '${edge.id}' on`, `add a node to group '${endpoint2.groupId}'`, void 0, ["data", "edges", index, end]);
|
|
163
176
|
return groupEnds.set(edge.id, { ...groupEnds.get(edge.id), [end]: endpoint2.groupId }), { nodeId: member.id };
|
|
164
177
|
}, data = {
|
|
165
178
|
nodes,
|
|
166
|
-
edges: (rawData.edges ?? []).map((edge) => ({ ...edge, source: resolveEnd(edge, "source"), target: resolveEnd(edge, "target") })).sort((a, b) => compareText(a.id, b.id)),
|
|
179
|
+
edges: (rawData.edges ?? []).map((edge, index) => ({ ...edge, source: resolveEnd(edge, "source", index), target: resolveEnd(edge, "target", index) })).sort((a, b) => compareText(a.id, b.id)),
|
|
167
180
|
groups,
|
|
168
181
|
lanes: stableOrder(rawData.lanes ?? []),
|
|
169
182
|
key: rawData.key ?? [],
|
|
@@ -172,7 +185,7 @@ function normalizeDiagramModel(rawData, rawOptions) {
|
|
|
172
185
|
...rawData.inset ? { inset: rawData.inset } : {},
|
|
173
186
|
groupEnds
|
|
174
187
|
};
|
|
175
|
-
if (validatePreset(data, rawOptions, rawData
|
|
188
|
+
if (validatePreset(data, rawOptions, rawData), rawOptions.variant === "architecture") {
|
|
176
189
|
let policy = new Set(groups.filter((group) => group.kind === "policy").map((group) => group.id));
|
|
177
190
|
data.nodes = data.nodes.map((node) => node.groupId !== void 0 && policy.has(node.groupId) ? { ...node, shape: { kind: "text" } } : node), applyHighlight(data, rawOptions.highlight);
|
|
178
191
|
}
|
|
@@ -203,50 +216,57 @@ var ARCHITECTURE_NODE_REFUSALS = [
|
|
|
203
216
|
["caption", "use secondaryLabel"],
|
|
204
217
|
["ports", "the engine picks the ports: remove them"]
|
|
205
218
|
];
|
|
206
|
-
function validateGroups(data, options) {
|
|
219
|
+
function validateGroups(data, options, authored) {
|
|
207
220
|
let byId = new Map(data.groups.map((group) => [group.id, group]));
|
|
208
221
|
for (let group of data.groups) {
|
|
209
222
|
let path = [group.id];
|
|
210
223
|
for (let at = group.parentId; at !== void 0; at = byId.get(at)?.parentId) {
|
|
211
|
-
if (path.includes(at)) throw new NormalizeError("diagram-group-cycle", `groups[${group.id}].parentId`, `the groups ${[...path, at].map((id) => `'${id}'`).join(" \u2192 ")} form a cycle`, `remove parentId from group '${at}'
|
|
224
|
+
if (path.includes(at)) throw new NormalizeError("diagram-group-cycle", `groups[${group.id}].parentId`, `the groups ${[...path, at].map((id) => `'${id}'`).join(" \u2192 ")} form a cycle`, `remove parentId from group '${at}'`, void 0, authoredItem(authored.groups, "groups", group.id, "parentId"));
|
|
212
225
|
path.push(at);
|
|
213
226
|
}
|
|
214
|
-
if (path.length > 3) throw new NormalizeError("invalid-membership", `groups[${group.id}].parentId`, `group '${group.id}' sits ${path.length} levels deep, and zones nest up to three`, "flatten one level");
|
|
215
|
-
if (group.parentId !== void 0 && options.flow === "lanes") throw new NormalizeError("invalid-membership", `groups[${group.id}].parentId`, "flow 'lanes' draws flat zones", "remove parentId, or use flow 'columns'");
|
|
227
|
+
if (path.length > 3) throw new NormalizeError("invalid-membership", `groups[${group.id}].parentId`, `group '${group.id}' sits ${path.length} levels deep, and zones nest up to three`, "flatten one level", void 0, authoredItem(authored.groups, "groups", group.id, "parentId"));
|
|
228
|
+
if (group.parentId !== void 0 && options.flow === "lanes") throw new NormalizeError("invalid-membership", `groups[${group.id}].parentId`, "flow 'lanes' draws flat zones", "remove parentId, or use flow 'columns'", void 0, authoredItem(authored.groups, "groups", group.id, "parentId"));
|
|
216
229
|
}
|
|
217
230
|
let policies = data.groups.filter((group) => group.kind === "policy");
|
|
218
|
-
if (policies.length > 1) throw new NormalizeError("invalid-membership", "groups", "an exhibit has one policy strip", `merge group '${policies[1].id}' into '${policies[0].id}'
|
|
231
|
+
if (policies.length > 1) throw new NormalizeError("invalid-membership", "groups", "an exhibit has one policy strip", `merge group '${policies[1].id}' into '${policies[0].id}'`, void 0, ["data", "groups"]);
|
|
219
232
|
let policy = policies[0];
|
|
220
233
|
if (!policy) return;
|
|
221
234
|
if (policy.parentId !== void 0 || policy.protected || data.groups.some((group) => group.parentId === policy.id))
|
|
222
|
-
throw new NormalizeError("invalid-membership", `groups[${policy.id}]`, "a policy strip spans the exhibit, so it takes no parent, no child and no protection", "use a zone for that");
|
|
235
|
+
throw new NormalizeError("invalid-membership", `groups[${policy.id}]`, "a policy strip spans the exhibit, so it takes no parent, no child and no protection", "use a zone for that", void 0, authoredItem(authored.groups, "groups", policy.id));
|
|
223
236
|
let wired = data.edges.find((edge) => [edge.source.nodeId, edge.target.nodeId].some((id) => data.nodes.find((node) => node.id === id)?.groupId === policy.id));
|
|
224
|
-
if (wired) throw new NormalizeError("invalid-membership", `edges[${wired.id}]`, `edge '${wired.id}' touches the policy strip, whose items take no edges`, "move the node to a zone, or remove the edge");
|
|
237
|
+
if (wired) throw new NormalizeError("invalid-membership", `edges[${wired.id}]`, `edge '${wired.id}' touches the policy strip, whose items take no edges`, "move the node to a zone, or remove the edge", void 0, authoredItem(authored.edges, "edges", wired.id));
|
|
225
238
|
}
|
|
226
|
-
function validateArchitecture(data, options) {
|
|
227
|
-
validateGroups(data, options);
|
|
239
|
+
function validateArchitecture(data, options, authored) {
|
|
240
|
+
validateGroups(data, options, authored);
|
|
228
241
|
let policy = data.groups.find((group) => group.kind === "policy")?.id;
|
|
229
242
|
if (options.flow === "lanes") {
|
|
230
|
-
if (data.lanes.length === 0) throw new NormalizeError("invalid-membership", "lanes", "flow 'lanes' requires data.lanes", "add data.lanes, or remove options.flow");
|
|
243
|
+
if (data.lanes.length === 0) throw new NormalizeError("invalid-membership", "lanes", "flow 'lanes' requires data.lanes", "add data.lanes, or remove options.flow", void 0, ["data", "lanes"]);
|
|
231
244
|
let vertical = data.lanes.find((lane) => lane.orientation !== "horizontal");
|
|
232
|
-
if (vertical) throw new NormalizeError("invalid-membership", `lanes[${vertical.id}].orientation`, "flow 'lanes' stacks horizontal lanes", `set lane '${vertical.id}' to orientation 'horizontal'
|
|
245
|
+
if (vertical) throw new NormalizeError("invalid-membership", `lanes[${vertical.id}].orientation`, "flow 'lanes' stacks horizontal lanes", `set lane '${vertical.id}' to orientation 'horizontal'`, void 0, authoredItem(authored.lanes, "lanes", vertical.id, "orientation"));
|
|
233
246
|
let outside = data.nodes.find((node) => !node.laneId && (policy === void 0 || node.groupId !== policy));
|
|
234
|
-
if (outside) throw new NormalizeError("invalid-membership", `nodes[${outside.id}].laneId`, `flow 'lanes' requires every node to name its lane, and '${outside.id}' names none`, `set nodes[${outside.id}].laneId
|
|
247
|
+
if (outside) throw new NormalizeError("invalid-membership", `nodes[${outside.id}].laneId`, `flow 'lanes' requires every node to name its lane, and '${outside.id}' names none`, `set nodes[${outside.id}].laneId`, void 0, authoredItem(authored.nodes, "nodes", outside.id, "laneId"));
|
|
235
248
|
let policyNode = data.nodes.find((node) => policy !== void 0 && node.groupId === policy && node.laneId !== void 0);
|
|
236
|
-
if (policyNode) throw new NormalizeError("invalid-membership", `nodes[${policyNode.id}].laneId`, `policy node '${policyNode.id}' cannot also belong to a lane`, "remove laneId from the policy node, or move it out of the policy strip");
|
|
249
|
+
if (policyNode) throw new NormalizeError("invalid-membership", `nodes[${policyNode.id}].laneId`, `policy node '${policyNode.id}' cannot also belong to a lane`, "remove laneId from the policy node, or move it out of the policy strip", void 0, authoredItem(authored.nodes, "nodes", policyNode.id, "laneId"));
|
|
237
250
|
} else if (data.lanes.length > 0 || data.nodes.some((node) => node.laneId))
|
|
238
|
-
throw new NormalizeError(
|
|
251
|
+
throw new NormalizeError(
|
|
252
|
+
"invalid-membership",
|
|
253
|
+
"lanes",
|
|
254
|
+
"flow 'columns' reads groups, not lanes",
|
|
255
|
+
"set options.flow to 'lanes', or remove the lanes",
|
|
256
|
+
void 0,
|
|
257
|
+
data.lanes.length > 0 ? ["data", "lanes"] : void 0
|
|
258
|
+
);
|
|
239
259
|
for (let node of data.nodes) {
|
|
240
260
|
for (let [field, fix] of ARCHITECTURE_NODE_REFUSALS)
|
|
241
|
-
if (node[field] !== void 0) throw new NormalizeError("invalid-membership", `nodes[${node.id}].${field}`, `variant 'architecture' does not read ${field}`, fix);
|
|
261
|
+
if (node[field] !== void 0) throw new NormalizeError("invalid-membership", `nodes[${node.id}].${field}`, `variant 'architecture' does not read ${field}`, fix, void 0, authoredItem(authored.nodes, "nodes", node.id, field));
|
|
242
262
|
if (!["rectangle", "roundedRect", "store"].includes(node.shape.kind))
|
|
243
|
-
throw new NormalizeError("invalid-membership", `nodes[${node.id}].shape`, `variant 'architecture' does not draw shape '${node.shape.kind}'`, "use shape 'rectangle', 'roundedRect' or 'store'");
|
|
244
|
-
if (node.shape.kind === "store" && node.repeat !== void 0) throw new NormalizeError("invalid-membership", `nodes[${node.id}].repeat`, "a store draws no stacked copies", "remove repeat, or use a rectangle");
|
|
263
|
+
throw new NormalizeError("invalid-membership", `nodes[${node.id}].shape`, `variant 'architecture' does not draw shape '${node.shape.kind}'`, "use shape 'rectangle', 'roundedRect' or 'store'", void 0, authoredItem(authored.nodes, "nodes", node.id, "shape"));
|
|
264
|
+
if (node.shape.kind === "store" && node.repeat !== void 0) throw new NormalizeError("invalid-membership", `nodes[${node.id}].repeat`, "a store draws no stacked copies", "remove repeat, or use a rectangle", void 0, authoredItem(authored.nodes, "nodes", node.id, "repeat"));
|
|
245
265
|
}
|
|
246
266
|
for (let edge of data.edges) {
|
|
247
|
-
if (edge.waypoints) throw new NormalizeError("invalid-membership", `edges[${edge.id}].waypoints`, "variant 'architecture' does not read waypoints", "the engine routes every edge: use track to line up its nodes");
|
|
248
|
-
if (edge.routing) throw new NormalizeError("invalid-membership", `edges[${edge.id}].routing`, "variant 'architecture' does not read routing", "the engine routes every edge: remove routing");
|
|
249
|
-
if (edge.source.portId || edge.target.portId) throw new NormalizeError("invalid-membership", `edges[${edge.id}]`, "variant 'architecture' does not read portId", "the engine picks the ports: remove portId");
|
|
267
|
+
if (edge.waypoints) throw new NormalizeError("invalid-membership", `edges[${edge.id}].waypoints`, "variant 'architecture' does not read waypoints", "the engine routes every edge: use track to line up its nodes", void 0, authoredItem(authored.edges, "edges", edge.id, "waypoints"));
|
|
268
|
+
if (edge.routing) throw new NormalizeError("invalid-membership", `edges[${edge.id}].routing`, "variant 'architecture' does not read routing", "the engine routes every edge: remove routing", void 0, authoredItem(authored.edges, "edges", edge.id, "routing"));
|
|
269
|
+
if (edge.source.portId || edge.target.portId) throw new NormalizeError("invalid-membership", `edges[${edge.id}]`, "variant 'architecture' does not read portId", "the engine picks the ports: remove portId", void 0, authoredItem(authored.edges, "edges", edge.id));
|
|
250
270
|
}
|
|
251
271
|
let forward = data.edges.filter((edge) => edge.flow !== "return" && edge.source.nodeId !== edge.target.nodeId), waiting = new Map(data.nodes.map((node) => [node.id, 0]));
|
|
252
272
|
for (let edge of forward) waiting.set(edge.target.nodeId, waiting.get(edge.target.nodeId) + 1);
|
|
@@ -260,44 +280,53 @@ function validateArchitecture(data, options) {
|
|
|
260
280
|
"diagram-cycle",
|
|
261
281
|
"edges",
|
|
262
282
|
`the forward edges ${looped.map((edge) => `'${edge.id}'`).join(", ")} form a cycle`,
|
|
263
|
-
`set flow: 'return' on the edge that closes the loop, for example '${looped[looped.length - 1].id}'
|
|
283
|
+
`set flow: 'return' on the edge that closes the loop, for example '${looped[looped.length - 1].id}'`,
|
|
284
|
+
void 0,
|
|
285
|
+
["data", "edges"]
|
|
264
286
|
);
|
|
265
287
|
let edgeIds = new Set(data.edges.map((edge) => edge.id)), channelled = /* @__PURE__ */ new Set();
|
|
266
288
|
for (let channel of data.channels)
|
|
267
289
|
for (let id of channel.edgeIds) {
|
|
268
|
-
if (!edgeIds.has(id)) throw new NormalizeError("diagram-channel-mismatch", `channels[${channel.id}].edgeIds`, `channel '${channel.id}' names the unknown edge '${id}'`, "name an edge of data.edges");
|
|
269
|
-
if (channelled.has(id)) throw new NormalizeError("diagram-channel-mismatch", `channels[${channel.id}].edgeIds`, `edge '${id}' is in two channels`, "keep each edge in one channel");
|
|
290
|
+
if (!edgeIds.has(id)) throw new NormalizeError("diagram-channel-mismatch", `channels[${channel.id}].edgeIds`, `channel '${channel.id}' names the unknown edge '${id}'`, "name an edge of data.edges", void 0, ["data", "channels", data.channels.indexOf(channel), "edgeIds", channel.edgeIds.indexOf(id)]);
|
|
291
|
+
if (channelled.has(id)) throw new NormalizeError("diagram-channel-mismatch", `channels[${channel.id}].edgeIds`, `edge '${id}' is in two channels`, "keep each edge in one channel", void 0, ["data", "channels", data.channels.indexOf(channel), "edgeIds"]);
|
|
270
292
|
channelled.add(id);
|
|
271
293
|
}
|
|
272
294
|
for (let [id, ends] of data.groupEnds) {
|
|
273
295
|
let edge = data.edges.find((item) => item.id === id), other = (end) => data.nodes.find((node) => node.id === edge[end].nodeId)?.groupId, inner = (group, end) => group !== void 0 && (ends[end] !== void 0 ? groupWithin(data.groups, ends[end], group) : groupWithin(data.groups, other(end) ?? "", group));
|
|
274
|
-
if (inner(ends.source, "target") || inner(ends.target, "source")) throw new NormalizeError("invalid-membership", `edges[${id}]`, `edge '${id}' ends on a zone that holds its other end`, "end it on a node");
|
|
275
|
-
if (ends.source !== void 0 && data.groups.find((group) => group.id === ends.source)?.kind === "policy") throw new NormalizeError("invalid-membership", `edges[${id}]`, "a policy strip takes no edges", "end the edge on a zone");
|
|
276
|
-
if (ends.target !== void 0 && data.groups.find((group) => group.id === ends.target)?.kind === "policy") throw new NormalizeError("invalid-membership", `edges[${id}]`, "a policy strip takes no edges", "end the edge on a zone");
|
|
296
|
+
if (inner(ends.source, "target") || inner(ends.target, "source")) throw new NormalizeError("invalid-membership", `edges[${id}]`, `edge '${id}' ends on a zone that holds its other end`, "end it on a node", void 0, authoredItem(authored.edges, "edges", id));
|
|
297
|
+
if (ends.source !== void 0 && data.groups.find((group) => group.id === ends.source)?.kind === "policy") throw new NormalizeError("invalid-membership", `edges[${id}]`, "a policy strip takes no edges", "end the edge on a zone", void 0, authoredItem(authored.edges, "edges", id, "source"));
|
|
298
|
+
if (ends.target !== void 0 && data.groups.find((group) => group.id === ends.target)?.kind === "policy") throw new NormalizeError("invalid-membership", `edges[${id}]`, "a policy strip takes no edges", "end the edge on a zone", void 0, authoredItem(authored.edges, "edges", id, "target"));
|
|
277
299
|
}
|
|
278
300
|
let groupIds = new Set(data.groups.map((group) => group.id)), calloutTargets = /* @__PURE__ */ new Set();
|
|
279
301
|
for (let callout of data.callouts) {
|
|
280
302
|
let target = callout.target;
|
|
281
|
-
if (!("nodeId" in target ? data.nodes.some((node) => node.id === target.nodeId) : "edgeId" in target ? edgeIds.has(target.edgeId) : groupIds.has(target.groupId))) throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' names an unknown target`, "name a node, edge or group of this diagram");
|
|
303
|
+
if (!("nodeId" in target ? data.nodes.some((node) => node.id === target.nodeId) : "edgeId" in target ? edgeIds.has(target.edgeId) : groupIds.has(target.groupId))) throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' names an unknown target`, "name a node, edge or group of this diagram", void 0, ["data", "callouts", data.callouts.indexOf(callout), "target"]);
|
|
282
304
|
if ("groupId" in target && options.flow === "lanes" && data.groups.find((group) => group.id === target.groupId)?.kind !== "policy" && !data.nodes.some((node) => node.groupId === target.groupId))
|
|
283
|
-
throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' targets empty zone '${target.groupId}', which has no frame in flow 'lanes'`, `add a node to zone '${target.groupId}', or choose another target
|
|
305
|
+
throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' targets empty zone '${target.groupId}', which has no frame in flow 'lanes'`, `add a node to zone '${target.groupId}', or choose another target`, void 0, ["data", "callouts", data.callouts.indexOf(callout), "target"]);
|
|
284
306
|
let targetKey = "nodeId" in target ? `node:${target.nodeId}` : "edgeId" in target ? `edge:${target.edgeId}` : `group:${target.groupId}`;
|
|
285
|
-
if (calloutTargets.has(targetKey)) throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' targets a node, edge or zone that already has a callout`, "merge the callout text into one callout");
|
|
307
|
+
if (calloutTargets.has(targetKey)) throw new NormalizeError("invalid-membership", `callouts[${callout.id}].target`, `callout '${callout.id}' targets a node, edge or zone that already has a callout`, "merge the callout text into one callout", void 0, ["data", "callouts", data.callouts.indexOf(callout), "target"]);
|
|
286
308
|
calloutTargets.add(targetKey);
|
|
287
309
|
}
|
|
288
310
|
}
|
|
289
|
-
function validatePreset(data, options,
|
|
311
|
+
function validatePreset(data, options, authored) {
|
|
290
312
|
if (options.variant === "architecture") {
|
|
291
|
-
validateArchitecture(data, options);
|
|
313
|
+
validateArchitecture(data, options, authored);
|
|
292
314
|
return;
|
|
293
315
|
}
|
|
294
|
-
let
|
|
316
|
+
let onlyNode = data.nodes.find((node) => node.track !== void 0 || node.span !== void 0 || node.repeat !== void 0 || node.protected !== void 0 || node.shape.kind === "store"), onlyEdge = onlyNode ? void 0 : data.edges.find((edge) => edge.flow !== void 0), onlyGroup = onlyNode || onlyEdge ? void 0 : data.groups.find((group) => group.kind !== void 0 || group.parentId !== void 0 || group.protected !== void 0), architectureOnly = onlyNode?.id ?? onlyEdge?.id ?? onlyGroup?.id ?? (data.channels.length > 0 ? "channels" : data.callouts.length > 0 ? "callouts" : data.inset ? "inset" : void 0);
|
|
295
317
|
if (architectureOnly !== void 0)
|
|
296
|
-
throw new NormalizeError(
|
|
318
|
+
throw new NormalizeError(
|
|
319
|
+
"invalid-membership",
|
|
320
|
+
architectureOnly,
|
|
321
|
+
`track, span, repeat, protected, shape store, edge flow, group kind, parentId, channels, callouts and inset are read only by variant 'architecture', not '${options.variant}'`,
|
|
322
|
+
"remove them, or set options.variant to 'architecture'",
|
|
323
|
+
void 0,
|
|
324
|
+
onlyNode ? authoredItem(authored.nodes, "nodes", onlyNode.id) : onlyEdge ? authoredItem(authored.edges, "edges", onlyEdge.id) : onlyGroup ? authoredItem(authored.groups, "groups", onlyGroup.id) : ["data", architectureOnly]
|
|
325
|
+
);
|
|
297
326
|
let looped = data.edges.find((edge) => edge.source.nodeId === edge.target.nodeId);
|
|
298
|
-
if (looped) throw new NormalizeError("invalid-membership", `edges[${looped.id}]`, `self-loops are read only by variant 'architecture', not '${options.variant}'`, "remove the edge");
|
|
327
|
+
if (looped) throw new NormalizeError("invalid-membership", `edges[${looped.id}]`, `self-loops are read only by variant 'architecture', not '${options.variant}'`, "remove the edge", void 0, authoredItem(authored.edges, "edges", looped.id));
|
|
299
328
|
let membership = data.nodes.filter((node) => node.groupId || node.laneId), requireKinds = () => {
|
|
300
|
-
let error = diagramKindError(
|
|
329
|
+
let error = diagramKindError(authored.nodes, options);
|
|
301
330
|
if (error) throw error;
|
|
302
331
|
};
|
|
303
332
|
if (options.variant === "customer-journey" || options.variant === "roadmap") {
|
|
@@ -305,38 +334,54 @@ function validatePreset(data, options, authoredNodes) {
|
|
|
305
334
|
throw new NormalizeError(
|
|
306
335
|
"invalid-membership",
|
|
307
336
|
"groups",
|
|
308
|
-
`variant '${options.variant}' reads lane membership, not groups
|
|
337
|
+
`variant '${options.variant}' reads lane membership, not groups`,
|
|
338
|
+
void 0,
|
|
339
|
+
void 0,
|
|
340
|
+
data.groups.length > 0 ? ["data", "groups"] : void 0
|
|
309
341
|
);
|
|
310
342
|
if (data.lanes.length === 0 || data.lanes.some((lane) => lane.orientation !== "vertical"))
|
|
311
343
|
throw new NormalizeError(
|
|
312
344
|
"invalid-membership",
|
|
313
345
|
"lanes",
|
|
314
|
-
`variant '${options.variant}' requires vertical lanes
|
|
346
|
+
`variant '${options.variant}' requires vertical lanes`,
|
|
347
|
+
void 0,
|
|
348
|
+
void 0,
|
|
349
|
+
["data", "lanes"]
|
|
315
350
|
);
|
|
316
351
|
let member = data.nodes.find((node) => !node.laneId);
|
|
317
352
|
if (member)
|
|
318
353
|
throw new NormalizeError(
|
|
319
354
|
"invalid-membership",
|
|
320
355
|
`nodes[${member.id}].laneId`,
|
|
321
|
-
`variant '${options.variant}' requires every node to name its phase lane
|
|
356
|
+
`variant '${options.variant}' requires every node to name its phase lane`,
|
|
357
|
+
void 0,
|
|
358
|
+
void 0,
|
|
359
|
+
authoredItem(authored.nodes, "nodes", member.id, "laneId")
|
|
322
360
|
);
|
|
323
361
|
if (requireKinds(), options.variant === "roadmap" && !data.nodes.some((node) => node.kind === "milestone"))
|
|
324
|
-
throw new NormalizeError("invalid-roadmap", "nodes", "roadmap requires at least one milestone");
|
|
325
|
-
validateMonotonePins(data, options);
|
|
362
|
+
throw new NormalizeError("invalid-roadmap", "nodes", "roadmap requires at least one milestone", void 0, void 0, ["data", "nodes"]);
|
|
363
|
+
validateMonotonePins(data, options, authored);
|
|
326
364
|
return;
|
|
327
365
|
}
|
|
328
366
|
if (options.variant === "strategy-house") {
|
|
329
367
|
if (data.lanes.length > 0 || data.nodes.some((node) => node.laneId))
|
|
330
|
-
throw new NormalizeError(
|
|
368
|
+
throw new NormalizeError(
|
|
369
|
+
"invalid-membership",
|
|
370
|
+
"lanes",
|
|
371
|
+
"variant 'strategy-house' reads groups, not lanes",
|
|
372
|
+
void 0,
|
|
373
|
+
void 0,
|
|
374
|
+
data.lanes.length > 0 ? ["data", "lanes"] : void 0
|
|
375
|
+
);
|
|
331
376
|
let vision = data.nodes.filter((node) => node.kind === "vision"), foundation = data.nodes.filter((node) => node.kind === "foundation");
|
|
332
377
|
if (vision.length !== 1 || vision[0].shape.kind !== "roof")
|
|
333
|
-
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires exactly one roof-shaped vision");
|
|
378
|
+
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires exactly one roof-shaped vision", void 0, void 0, ["data", "nodes"]);
|
|
334
379
|
if (foundation.length !== 1)
|
|
335
|
-
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires exactly one foundation");
|
|
380
|
+
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires exactly one foundation", void 0, void 0, ["data", "nodes"]);
|
|
336
381
|
if (!data.nodes.some((node) => node.kind === "initiative") || !data.nodes.some((node) => node.kind === "enabler"))
|
|
337
|
-
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires initiatives and enablers");
|
|
382
|
+
throw new NormalizeError("invalid-strategy-house", "nodes", "strategy-house requires initiatives and enablers", void 0, void 0, ["data", "nodes"]);
|
|
338
383
|
if (data.groups.length === 0)
|
|
339
|
-
throw new NormalizeError("invalid-strategy-house", "groups", "strategy-house requires objective groups");
|
|
384
|
+
throw new NormalizeError("invalid-strategy-house", "groups", "strategy-house requires objective groups", void 0, void 0, ["data", "groups"]);
|
|
340
385
|
let invalid = data.nodes.find(
|
|
341
386
|
(node) => node.kind === "initiative" && (!node.groupId || !data.groups.some((group) => group.id === node.groupId))
|
|
342
387
|
);
|
|
@@ -344,7 +389,10 @@ function validatePreset(data, options, authoredNodes) {
|
|
|
344
389
|
throw new NormalizeError(
|
|
345
390
|
"invalid-membership",
|
|
346
391
|
`nodes[${invalid.id}].groupId`,
|
|
347
|
-
"strategy-house initiatives require an objective group"
|
|
392
|
+
"strategy-house initiatives require an objective group",
|
|
393
|
+
void 0,
|
|
394
|
+
void 0,
|
|
395
|
+
authoredItem(authored.nodes, "nodes", invalid.id, "groupId")
|
|
348
396
|
);
|
|
349
397
|
return;
|
|
350
398
|
}
|
|
@@ -352,13 +400,19 @@ function validatePreset(data, options, authoredNodes) {
|
|
|
352
400
|
throw new NormalizeError(
|
|
353
401
|
"invalid-membership",
|
|
354
402
|
`nodes[${membership[0].id}]`,
|
|
355
|
-
`variant '${options.variant}' does not read group or lane membership
|
|
403
|
+
`variant '${options.variant}' does not read group or lane membership`,
|
|
404
|
+
void 0,
|
|
405
|
+
void 0,
|
|
406
|
+
authoredItem(authored.nodes, "nodes", membership[0].id)
|
|
356
407
|
);
|
|
357
408
|
if (data.lanes.length > 0 || options.variant !== "hierarchy" && data.groups.length > 0)
|
|
358
409
|
throw new NormalizeError(
|
|
359
410
|
"invalid-membership",
|
|
360
411
|
options.variant === "hierarchy" ? "lanes" : "groups",
|
|
361
|
-
`variant '${options.variant}' does not read this membership surface
|
|
412
|
+
`variant '${options.variant}' does not read this membership surface`,
|
|
413
|
+
void 0,
|
|
414
|
+
void 0,
|
|
415
|
+
data.lanes.length > 0 ? ["data", "lanes"] : ["data", "groups"]
|
|
362
416
|
);
|
|
363
417
|
requireKinds(), (options.variant === "hierarchy" || options.variant === "issue-tree") && validateRootedDag(data, options.variant);
|
|
364
418
|
}
|
|
@@ -378,7 +432,9 @@ function validateRootedDag(data, variant) {
|
|
|
378
432
|
"diagram-cycle",
|
|
379
433
|
"edges",
|
|
380
434
|
`${variant} primary graph contains a cycle: ${[...path.slice(at), id].join(" \u2192 ")}`,
|
|
381
|
-
"remove or dot (dash: dotted) one edge of the loop"
|
|
435
|
+
"remove or dot (dash: dotted) one edge of the loop",
|
|
436
|
+
void 0,
|
|
437
|
+
["data", "edges"]
|
|
382
438
|
);
|
|
383
439
|
if (!visited.has(id)) {
|
|
384
440
|
path.push(id);
|
|
@@ -387,11 +443,11 @@ function validateRootedDag(data, variant) {
|
|
|
387
443
|
}
|
|
388
444
|
};
|
|
389
445
|
if (roots.length === 0 && [...nodeIds].sort(compareText).forEach(visit), roots.length !== 1)
|
|
390
|
-
throw new NormalizeError("invalid-root", "edges", `${variant} requires one primary root, found ${roots.length}
|
|
446
|
+
throw new NormalizeError("invalid-root", "edges", `${variant} requires one primary root, found ${roots.length}`, void 0, void 0, ["data", "edges"]);
|
|
391
447
|
if (visit(roots[0]), visited.size !== nodeIds.size)
|
|
392
|
-
throw new NormalizeError("invalid-root", "edges", `${variant} primary graph is disconnected
|
|
448
|
+
throw new NormalizeError("invalid-root", "edges", `${variant} primary graph is disconnected`, void 0, void 0, ["data", "edges"]);
|
|
393
449
|
}
|
|
394
|
-
function validateMonotonePins(data, options) {
|
|
450
|
+
function validateMonotonePins(data, options, authored) {
|
|
395
451
|
if (options.variant !== "roadmap") return;
|
|
396
452
|
let laneOrder = new Map(data.lanes.map((lane, index) => [lane.id, index])), pinned = data.nodes.filter((node) => node.kind === "milestone" && node.position).sort(
|
|
397
453
|
(a, b) => (laneOrder.get(a.laneId) ?? 0) - (laneOrder.get(b.laneId) ?? 0) || (a.order ?? 0) - (b.order ?? 0) || compareText(a.id, b.id)
|
|
@@ -402,7 +458,10 @@ function validateMonotonePins(data, options) {
|
|
|
402
458
|
throw new NormalizeError(
|
|
403
459
|
"non-monotone-roadmap",
|
|
404
460
|
`nodes[${pinned[index].id}].position`,
|
|
405
|
-
"authored roadmap milestone positions must increase in x and rise monotonically"
|
|
461
|
+
"authored roadmap milestone positions must increase in x and rise monotonically",
|
|
462
|
+
void 0,
|
|
463
|
+
void 0,
|
|
464
|
+
authoredItem(authored.nodes, "nodes", pinned[index].id, "position")
|
|
406
465
|
);
|
|
407
466
|
}
|
|
408
467
|
}
|
|
@@ -1340,7 +1399,13 @@ function groupsFromMembers(context, result) {
|
|
|
1340
1399
|
return groups.map(({ group, members, rects, memberBounds, pad }, index) => {
|
|
1341
1400
|
let header = Math.max(group.padding ?? pad, line + context.u / 2), left = memberBounds.x - pad, right = memberBounds.x + memberBounds.w + pad, title = { x: memberBounds.x, w: memberBounds.w }, entered = rects.filter((rect, at) => parents.has(members[at].id) && rect.y === memberBounds.y);
|
|
1342
1401
|
if (entered.length > 0) {
|
|
1343
|
-
let crossings2 = entered.map(centre).sort((a, b) => a - b), edges = [left, ...crossings2.flatMap((x) => [x - context.u, x + context.u]), right], stretches = edges.flatMap((x, at) => at % 2 === 0 ? [{ x, w: edges[at + 1] - x }] : []), top = memberBounds.y - pad, bottom = memberBounds.y + memberBounds.h + pad,
|
|
1402
|
+
let crossings2 = entered.map(centre).sort((a, b) => a - b), edges = [left, ...crossings2.flatMap((x) => [x - context.u, x + context.u]), right], stretches = edges.flatMap((x, at) => at % 2 === 0 ? [{ x, w: edges[at + 1] - x }] : []), top = memberBounds.y - pad, bottom = memberBounds.y + memberBounds.h + pad, others = [...result.nodeRects].filter(([id]) => !members.some((node) => node.id === id)), beside = [...frames.filter((_, at) => at !== index), ...others.map(([, rect]) => rect)].filter((rect) => rect.y < bottom && rect.y + rect.h > top), neighbourCrossings = others.filter(([id, rect]) => parents.has(id) && rect.y < bottom && rect.y + rect.h > top).map(([, rect]) => centre(rect)), roomLeft = Math.max(0, left - Math.max(context.plot.x, maxOf([
|
|
1403
|
+
...beside.filter((rect) => rect.x + rect.w <= left).map((rect) => rect.x + rect.w + context.u),
|
|
1404
|
+
...neighbourCrossings.filter((x) => x <= left)
|
|
1405
|
+
]))), roomRight = Math.max(0, Math.min(context.plot.x + context.plot.w, minOf([
|
|
1406
|
+
...beside.filter((rect) => rect.x >= right).map((rect) => rect.x - context.u),
|
|
1407
|
+
...neighbourCrossings.filter((x) => x >= right)
|
|
1408
|
+
])) - right), runs = entered.map((rect) => {
|
|
1344
1409
|
let [a, b] = [centre(rect), parents.get(members[rects.indexOf(rect)].id)].sort((p, q2) => p - q2);
|
|
1345
1410
|
return { a, b };
|
|
1346
1411
|
}), place2 = (need, clearOfRuns) => {
|
|
@@ -1646,22 +1711,44 @@ function layoutArchitecture(data, options, plot, fonts, measure, u, palette, the
|
|
|
1646
1711
|
let planFonts = { ...fonts, text: { ...secondaryFont(theme), weight: 400 } };
|
|
1647
1712
|
if (!data.inset) return planArchitecture(data, options, plot, planFonts, measure, u, palette, theme, badges, plans);
|
|
1648
1713
|
let beside = plot.w >= INSET_BESIDE_WIDTH, gap = 6 * u, width = beside ? insetWidth(data.inset, plot.w, fonts, measure, u) : plot.w, layout = planArchitecture(data, options, beside ? { ...plot, w: plot.w - width - gap } : plot, planFonts, measure, u, palette, theme, badges, plans), bottom = Math.max(...[...layout.preset.nodeRects.values(), ...layout.preset.groups.map((group) => group.bounds), ...layout.preset.lanes.map((lane) => lane.bounds), ...layout.extent].map((rect) => rect.y + rect.h)), box = { x: plot.x + plot.w - width, y: beside ? plot.y : bottom + gap, w: width }, panel = insetPanel(data.inset, box, !beside, fonts, measure, u), end = box.y + panel.height, stroke = { token: "axis" }, hair = strokeToken(theme, "hair"), rule = beside ? { x1: box.x - gap / 2, y1: plot.y, x2: box.x - gap / 2, y2: Math.max(bottom, end) } : { x1: plot.x, y1: bottom + gap / 2, x2: plot.x + plot.w, y2: bottom + gap / 2 };
|
|
1649
|
-
return layout.preset.decorationScene.push({ t: "line", id: diagramSceneId("inset", "rule"), ...rule, stroke, width: hair, owner: {}, part: "diagramLane" }), layout.channelLabels = [...layout.channelLabels ?? [], ...panel.labels], layout.extent.push(...panel.labels.map((label) => label.rect)), end > plot.y + plot.h + 1 && !layout.warnings.some((warning) => warning.code === "diagram-size-too-small") && layout.warnings.push({ code: "diagram-size-too-small", severity: "error", message: `architecture needs ${Math.ceil(end - plot.y - plot.h)} px more height` }), layout;
|
|
1714
|
+
return layout.preset.decorationScene.push({ t: "line", id: diagramSceneId("inset", "rule"), ...rule, stroke, width: hair, owner: {}, part: "diagramLane" }), layout.channelLabels = [...layout.channelLabels ?? [], ...panel.labels], layout.warnings = [...layout.warnings ?? [], ...insetWarnings(data.inset, box.w, fonts, measure, u)], layout.extent.push(...panel.labels.map((label) => label.rect)), end > plot.y + plot.h + 1 && !layout.warnings.some((warning) => warning.code === "diagram-size-too-small") && layout.warnings.push({ code: "diagram-size-too-small", severity: "error", message: `architecture needs ${Math.ceil(end - plot.y - plot.h)} px more height` }), layout;
|
|
1715
|
+
}
|
|
1716
|
+
function insetWarnings(inset, panelW, fonts, measure, u) {
|
|
1717
|
+
let tracks = inset.columnOverrides;
|
|
1718
|
+
if (!tracks) return [];
|
|
1719
|
+
let unknown = generatedIdWarnings("diagram", "columnOverrides", tracks, inset.rows ? ["label", "value"] : []).map((warning) => ({ ...warning, field: ["data", "inset", "columnOverrides", warning.field.at(-1)] })), widest = Math.max(...(inset.rows ?? []).map((row) => (tracks.label?.width ?? measure(row.label, fonts.text).width) + (tracks.value?.width ?? measure(row.value, fonts.name).width) + 2 * u), 0), capped = inset.rows !== void 0 && (tracks.label?.width !== void 0 || tracks.value?.width !== void 0) && (widest > panelW + 1 || (tracks.value?.width ?? 0) > Math.floor(panelW / 2)), rows = inset.rows ?? [], floored = tracks.label?.width !== void 0 && rows.some((row) => row.label.split(/\s+/).some((word) => Math.ceil(measure(word, fonts.text).width) + 1 > tracks.label.width)) || tracks.value?.width !== void 0 && rows.some((row) => Math.ceil(measure(row.value, fonts.name).width) + 1 > tracks.value.width);
|
|
1720
|
+
return [
|
|
1721
|
+
...unknown,
|
|
1722
|
+
...capped ? [{
|
|
1723
|
+
code: "generated-column-width-capped",
|
|
1724
|
+
severity: "warn",
|
|
1725
|
+
field: ["data", "inset", "columnOverrides"],
|
|
1726
|
+
message: `the authored inset columns do not fit the ${Math.round(panelW)} px panel, so they were reduced`,
|
|
1727
|
+
suggest: "Use smaller widths, or give the chart more width."
|
|
1728
|
+
}] : [],
|
|
1729
|
+
...floored ? [{
|
|
1730
|
+
code: "generated-column-width-floored",
|
|
1731
|
+
severity: "warn",
|
|
1732
|
+
field: ["data", "inset", "columnOverrides"],
|
|
1733
|
+
message: "an authored inset width is narrower than its text, so it was raised",
|
|
1734
|
+
suggest: "Use a larger width, or leave the width out."
|
|
1735
|
+
}] : []
|
|
1736
|
+
];
|
|
1650
1737
|
}
|
|
1651
1738
|
function insetWidth(inset, plotW, fonts, measure, u) {
|
|
1652
|
-
let need = Math.max(
|
|
1653
|
-
measure(inset.title, fonts.title).width,
|
|
1654
|
-
...(inset.rows ?? []).map((row) => measure(row.label, fonts.text).width + measure(row.value, fonts.name).width + 3 * u),
|
|
1739
|
+
let tracks = inset.columnOverrides, need = Math.max(
|
|
1740
|
+
inset.heading === !1 ? 0 : measure(inset.title, fonts.title).width,
|
|
1741
|
+
...(inset.rows ?? []).map((row) => (tracks?.label?.width ?? measure(row.label, fonts.text).width) + (tracks?.value?.width ?? measure(row.value, fonts.name).width) + 3 * u),
|
|
1655
1742
|
...(inset.kpis ?? []).flatMap((kpi) => [measure(kpi.value, kpiFont(fonts)).width, measure(kpi.label, fonts.text).width])
|
|
1656
1743
|
);
|
|
1657
1744
|
return q(Math.max(36 * u, Math.min(Math.ceil(need), INSET_MAX_SHARE * plotW)));
|
|
1658
1745
|
}
|
|
1659
1746
|
var kpiFont = (fonts) => ({ ...fonts.title, size: Math.round(fonts.title.size * 1.75) });
|
|
1660
1747
|
function insetPanel(inset, box, wide, fonts, measure, u) {
|
|
1661
|
-
let labels = [], seat = (id, text, font, x, y2, width,
|
|
1748
|
+
let labels = [], seat = (id, text, font, x, y2, width, align = "left") => {
|
|
1662
1749
|
let wrapped = wrapText(text, font, width, 4, measure), w = Math.ceil(Math.max(...wrapped.lines.map((line) => measure(line, font).width))) + 1, h = wrapped.lines.length * font.size * (font.lineHeight ?? 1.2);
|
|
1663
|
-
return labels.push({ id: `inset-label:${id}`, text, rect: qRect({ x: right ? x + width - w : x, y: y2, w, h }), owner: {}, font }), h;
|
|
1664
|
-
}, y = box.y + seat("title", inset.title, fonts.title, box.x, box.y, box.w) + 2 * u, kpis = inset.kpis ?? [], across = wide ? kpis.length : 1, cell = (box.w - (across - 1) * 3 * u) / Math.max(1, across);
|
|
1750
|
+
return labels.push({ id: `inset-label:${id}`, text, rect: qRect({ x: align === "right" ? x + width - w : align === "center" ? x + (width - w) / 2 : x, y: y2, w, h }), owner: {}, font }), h;
|
|
1751
|
+
}, tracks = inset.columnOverrides, y = box.y + (inset.heading === !1 ? 0 : seat("title", inset.title, fonts.title, box.x, box.y, box.w) + 2 * u), kpis = inset.kpis ?? [], across = wide ? kpis.length : 1, cell = (box.w - (across - 1) * 3 * u) / Math.max(1, across);
|
|
1665
1752
|
for (let at = 0; at < kpis.length; at += across) {
|
|
1666
1753
|
let tallest = 0;
|
|
1667
1754
|
kpis.slice(at, at + across).forEach((kpi, index) => {
|
|
@@ -1669,8 +1756,9 @@ function insetPanel(inset, box, wide, fonts, measure, u) {
|
|
|
1669
1756
|
tallest = Math.max(tallest, top + u + seat(`kpi:${at + index}:label`, kpi.label, fonts.text, x, y + top + u, cell));
|
|
1670
1757
|
}), y += tallest + 2 * u;
|
|
1671
1758
|
}
|
|
1759
|
+
let widestValue = tracks?.value?.align === void 0 && (tracks?.label?.align ?? "left") === "left" ? 0 : Math.max(0, ...(inset.rows ?? []).map((row) => Math.ceil(measure(row.value, fonts.name).width) + 1));
|
|
1672
1760
|
return (inset.rows ?? []).forEach((row, index) => {
|
|
1673
|
-
let value = Math.min(Math.ceil(measure(row.value, fonts.name).width) + 1, Math.floor(box.w / 2)), name = seat(`row:${index}:label`, row.label, fonts.text, box.x, y,
|
|
1761
|
+
let value = Math.min(Math.max(Math.ceil(measure(row.value, fonts.name).width) + 1, tracks?.value?.width ?? 0, widestValue), Math.floor(box.w / 2)), room = box.w - value - 2 * u, wordFloor = Math.max(0, ...row.label.split(/\s+/).map((word) => Math.ceil(measure(word, fonts.text).width) + 1)), nameW = tracks?.label?.width === void 0 ? room : Math.min(room, Math.max(wordFloor, tracks.label.width)), name = seat(`row:${index}:label`, row.label, fonts.text, box.x, y, nameW, tracks?.label?.align), worth = seat(`row:${index}:value`, row.value, fonts.name, box.x + box.w - value, y, value, tracks?.value?.align ?? "right");
|
|
1674
1762
|
y += Math.max(name, worth) + u;
|
|
1675
1763
|
}), { labels, height: y - box.y - u };
|
|
1676
1764
|
}
|
|
@@ -1766,30 +1854,38 @@ function bandFrames(band) {
|
|
|
1766
1854
|
}
|
|
1767
1855
|
var unitIndex = (units, id) => units.findIndex((unit) => unit.nodes.some((node) => node.id === id));
|
|
1768
1856
|
function columnsFor(env) {
|
|
1769
|
-
let { plot, u } = env;
|
|
1770
|
-
|
|
1857
|
+
let { plot, u, data, name, text, measure } = env;
|
|
1858
|
+
if (plot.w < 380) return 1;
|
|
1859
|
+
let gutter = 2 * GAP_HALF, node = Math.max(...data.nodes.map((item) => Math.ceil(Math.max(
|
|
1860
|
+
measure(item.label, name).width,
|
|
1861
|
+
item.secondaryLabel ? measure(item.secondaryLabel, text).width : 0
|
|
1862
|
+
)) + 1 + 4 * u + (item.icon ? 3.5 * u : 0) + lockWidth(item, u) + stackOf(item)));
|
|
1863
|
+
return Math.max(1, Math.floor((plot.w + 6 * u) / (40 * u)), Math.floor((plot.w + gutter) / (node + gutter)));
|
|
1771
1864
|
}
|
|
1772
1865
|
function* arrangements(env) {
|
|
1773
1866
|
if (env.options.flow === "lanes") {
|
|
1774
|
-
let
|
|
1775
|
-
for (let
|
|
1776
|
-
let arrangement = arrangeLanes(env,
|
|
1867
|
+
let wide2 = columnsFor(env);
|
|
1868
|
+
for (let cap = wide2; cap >= 1; cap--) {
|
|
1869
|
+
let arrangement = arrangeLanes(env, cap);
|
|
1777
1870
|
arrangement && (yield arrangement);
|
|
1778
1871
|
}
|
|
1779
1872
|
return;
|
|
1780
1873
|
}
|
|
1781
|
-
let units = unitsOf(env),
|
|
1782
|
-
for (let
|
|
1783
|
-
for (let
|
|
1784
|
-
let
|
|
1785
|
-
|
|
1786
|
-
|
|
1874
|
+
let units = unitsOf(env), seen = /* @__PURE__ */ new Set(), wide = columnsFor(env);
|
|
1875
|
+
for (let cap = wide; cap >= 1; cap--)
|
|
1876
|
+
for (let perBand = Math.min(5, rootsOf(units).length); perBand >= 1; perBand--)
|
|
1877
|
+
for (let inner = cap; inner >= (cap === wide ? 1 : cap); inner--) {
|
|
1878
|
+
let arrangement = arrangeColumns(env, units, perBand, inner, cap);
|
|
1879
|
+
if (!arrangement) continue;
|
|
1880
|
+
let key = JSON.stringify([[...arrangement.cells].map(([id, cell]) => [id, cell.band, cell.c0, cell.c1, cell.r0, cell.r1]), arrangement.bands.map((band) => [band.cols, band.rows])]);
|
|
1881
|
+
seen.has(key) || (seen.add(key), yield arrangement);
|
|
1882
|
+
}
|
|
1787
1883
|
}
|
|
1788
1884
|
function fallbackArrangement(env) {
|
|
1789
1885
|
return env.options.flow === "lanes" ? arrangeLanes(env, 1) : arrangeColumns(env, unitsOf(env), 1, 1, 1);
|
|
1790
1886
|
}
|
|
1791
1887
|
function refuseTrack(a, b) {
|
|
1792
|
-
throw new NormalizeError("diagram-track-conflict", "nodes", `nodes '${a}' and '${b}' claim one cell`, `give '${b}' another track
|
|
1888
|
+
throw new NormalizeError("diagram-track-conflict", "nodes", `nodes '${a}' and '${b}' claim one cell`, `give '${b}' another track`, void 0, ["data", "nodes"]);
|
|
1793
1889
|
}
|
|
1794
1890
|
function arrangeColumns(env, units, perBand, inner, cap) {
|
|
1795
1891
|
let tracks = [...new Set(env.data.nodes.flatMap((node) => node.track === void 0 ? [] : [node.track]))], cells = /* @__PURE__ */ new Map(), bands = [], width = (unit) => Math.min(inner, Math.max(1, new Set(localColumns(unit, env).values()).size)), slices = [], roots = rootsOf(units);
|
|
@@ -1937,7 +2033,7 @@ function measureNodeText(node, width, env) {
|
|
|
1937
2033
|
return { height: lead.lines.length * lineH(name) + (second ? 0.5 * u + second.lines.length * lineH(text) : 0) };
|
|
1938
2034
|
}
|
|
1939
2035
|
function place(arrangement, gaps, env, force = !1) {
|
|
1940
|
-
let { plot, u, title, measure } = env, lanesFlow = arrangement.lanes !== void 0, pad = 2.5 * u, titleH = title.size * (title.lineHeight ?? 1.2), laneZoneGap = Math.max(0, titleH / 2 + 2 - 2 * u), innerGap = 2 * GAP_HALF, unitGap = 2 * GAP_HALF, gap = (key, base) => Math.max(base, gaps.get(key) ?? 0), laneLabel = lanesFlow && !arrangement.labelAbove ? laneLabelWidth(env) : 0, geometry = { rects: /* @__PURE__ */ new Map(), textBoxes: /* @__PURE__ */ new Map(), icons: /* @__PURE__ */ new Map(), badges: /* @__PURE__ */ new Map(), zones: [], loops: [], locks: /* @__PURE__ */ new Map(), lanes: [], labelClaims: [], xs: [], ys: [], gaps: [], width: plot.w, labelLeft: plot.x + laneLabel }, outerL = gap("oL", 0), outerR = gap("oR", 0), frameInset = lanesFlow && env.data.groups.some((group) => group.kind !== "policy") ? 1.5 * u + 1 : 0, left = plot.x + laneLabel + outerL + frameInset, right = plot.x + plot.w - outerR - frameInset, axisX = [[left - Math.max(outerL, 2 * PITCH) / 2, "oL"], [right + Math.max(outerR, 2 * PITCH) / 2, "oR"]], axisY = [], strip = placePolicy(geometry, env);
|
|
2036
|
+
let { plot, u, title, measure } = env, lanesFlow = arrangement.lanes !== void 0, pad = 2.5 * u, titleH = title.size * (title.lineHeight ?? 1.2), laneZoneGap = Math.max(0, titleH / 2 + 2 - 2 * u), innerGap = 2 * GAP_HALF, unitGap = 2 * GAP_HALF, gap = (key, base) => Math.max(base, gaps.get(key) ?? 0), laneLabel = lanesFlow && !arrangement.labelAbove ? laneLabelWidth(env) : 0, geometry = { rects: /* @__PURE__ */ new Map(), textBoxes: /* @__PURE__ */ new Map(), icons: /* @__PURE__ */ new Map(), badges: /* @__PURE__ */ new Map(), zones: [], loops: [], loopReach: /* @__PURE__ */ new Map(), locks: /* @__PURE__ */ new Map(), lanes: [], labelClaims: [], xs: [], ys: [], gaps: [], width: plot.w, labelLeft: plot.x + laneLabel }, outerL = gap("oL", 0), outerR = gap("oR", 0), frameInset = lanesFlow && env.data.groups.some((group) => group.kind !== "policy") ? 1.5 * u + 1 : 0, left = plot.x + laneLabel + outerL + frameInset, right = plot.x + plot.w - outerR - frameInset, axisX = [[left - Math.max(outerL, 2 * PITCH) / 2, "oL"], [right + Math.max(outerR, 2 * PITCH) / 2, "oR"]], axisY = [], strip = placePolicy(geometry, env);
|
|
1941
2037
|
if (strip === void 0 && !force)
|
|
1942
2038
|
return;
|
|
1943
2039
|
let flowTop = plot.y + (strip ?? 0), y = flowTop, spans = /* @__PURE__ */ new Map();
|
|
@@ -1990,7 +2086,8 @@ function place(arrangement, gaps, env, force = !1) {
|
|
|
1990
2086
|
}
|
|
1991
2087
|
rowY[r] = q(cursor), cursor += rowH[r], axisY.push([rowY[r] + rowH[r] / 2]);
|
|
1992
2088
|
let loop = env.data.edges.filter((edge) => selfLoop(edge) && own.some((cell) => cell.r1 === r && cell.node.id === edge.source.nodeId));
|
|
1993
|
-
|
|
2089
|
+
for (let edge of loop) geometry.loopReach.set(edge.id, gap(`loop:${edge.id}`, LOOP_REACH * u));
|
|
2090
|
+
if (loop.length > 0 && (cursor += Math.max(...loop.map((edge) => geometry.loopReach.get(edge.id))) + PITCH + (loop.some((edge) => edge.label) ? env.text.size * (env.text.lineHeight ?? 1.2) + TEXT_CLEARANCE + 1 : 0)), lane && r === lane.r1) {
|
|
1994
2091
|
let laneBox = geometry.lanes.at(-1);
|
|
1995
2092
|
cursor += 2 * u, laneBox.bounds.h = cursor - laneBox.bounds.y;
|
|
1996
2093
|
}
|
|
@@ -2116,7 +2213,7 @@ function routeEdges(geometry, env, outward, cache, key) {
|
|
|
2116
2213
|
return { routes, dots, labels, channels, problems, needs, unseated };
|
|
2117
2214
|
}
|
|
2118
2215
|
function routeLines(geometry, env, outward) {
|
|
2119
|
-
let { data } = env, { xs, ys, rects } = geometry, W = xs.length, H = ys.length, loops = new Map(data.edges.filter(selfLoop).map((edge) => [edge.id, selfLoopRoute(rects.get(edge.source.nodeId), env)]));
|
|
2216
|
+
let { data } = env, { xs, ys, rects } = geometry, W = xs.length, H = ys.length, loops = new Map(data.edges.filter(selfLoop).map((edge) => [edge.id, selfLoopRoute(rects.get(edge.source.nodeId), geometry.loopReach.get(edge.id) ?? LOOP_REACH * env.u, env)]));
|
|
2120
2217
|
geometry.loops = [...loops.values()].map(([a, b, c]) => ({ x: a.x, y: a.y, w: c.x - a.x, h: b.y - a.y }));
|
|
2121
2218
|
let stubClaims = [...geometry.labelClaims, ...geometry.loops].map((claim) => grown(claim, TEXT_CLEARANCE)), blocked = obstacleGrid(geometry, W, H), zones = geometry.zones.filter((zone) => !zone.policy), frameUse = frameCrossings(geometry, zones, W, H), walledH = new Uint8Array(W * H), walledV = new Uint8Array(W * H), order = [...data.edges].sort((a, b) => +(a.flow === "return") - +(b.flow === "return") || env.order.get(a.source.nodeId) - env.order.get(b.source.nodeId) || (a.id < b.id ? -1 : a.id > b.id ? 1 : 0)), useH = /* @__PURE__ */ new Map(), useV = /* @__PURE__ */ new Map(), states = 4 * W * H, cost = new Float64Array(states), prev = new Int32Array(states), goal = new Float64Array(states), runs = [], problems = [], sides = [], down = env.options.flow === "lanes";
|
|
2122
2219
|
order.forEach((edge, edgeIndex) => {
|
|
@@ -2244,8 +2341,8 @@ function frameHits(points, { x, y, w, h }) {
|
|
|
2244
2341
|
if (a.x === b.x && a.x > x && a.x < x + w) for (let frame of [y, y + h]) lo.y < frame && frame < hi.y && hits.push({ x: a.x, y: frame });
|
|
2245
2342
|
}), hits;
|
|
2246
2343
|
}
|
|
2247
|
-
function selfLoopRoute(rect, env) {
|
|
2248
|
-
let bottom = rect.y + rect.h, reach = snap(bottom +
|
|
2344
|
+
function selfLoopRoute(rect, depth, env) {
|
|
2345
|
+
let bottom = rect.y + rect.h, reach = snap(bottom + depth), right = snap(rect.x + rect.w - 2 * env.u), left = snap(right - 4 * env.u);
|
|
2249
2346
|
return [{ x: left, y: bottom }, { x: left, y: reach }, { x: right, y: reach }, { x: right, y: bottom }];
|
|
2250
2347
|
}
|
|
2251
2348
|
function findLast(items, test) {
|
|
@@ -2413,7 +2510,7 @@ function grown(rect, by) {
|
|
|
2413
2510
|
return { x: rect.x - by, y: rect.y - by, w: rect.w + 2 * by, h: rect.h + 2 * by };
|
|
2414
2511
|
}
|
|
2415
2512
|
function labelClear(box, blockers, plot) {
|
|
2416
|
-
if (box.x < plot.x || box.x + box.w > plot.x + plot.w) return !1;
|
|
2513
|
+
if (box.x < plot.x || box.x + box.w > plot.x + plot.w || box.y < plot.y) return !1;
|
|
2417
2514
|
let left = box.x - TEXT_CLEARANCE, top = box.y - TEXT_CLEARANCE, right = left + (box.w + 2 * TEXT_CLEARANCE), bottom = top + (box.h + 2 * TEXT_CLEARANCE);
|
|
2418
2515
|
for (let rect of blockers) if (left < rect.x + rect.w && rect.x < right && top < rect.y + rect.h && rect.y < bottom) return !1;
|
|
2419
2516
|
return !0;
|
|
@@ -2599,7 +2696,12 @@ function placeLabels(order, polylines, segmentBoxes, geometry, env, needs, unsea
|
|
|
2599
2696
|
out.set(edge.id, search.seat), otherLabels.push(search.seat), spacing.push(search.seat, spacedLabel(search.seat, env.u));
|
|
2600
2697
|
continue;
|
|
2601
2698
|
}
|
|
2602
|
-
if (unseated.push(edge.id),
|
|
2699
|
+
if (unseated.push(edge.id), selfLoop(edge)) {
|
|
2700
|
+
let reach = geometry.loopReach.get(edge.id) ?? 0, room = points[0].x - off - 2 - geometry.rects.get(edge.source.nodeId).x, need = (block3) => q(block3.height) / 2 + off, block2 = blocks.find((item) => need(item) > reach && item.width <= room) ?? blocks.at(-1);
|
|
2701
|
+
needs.set(`loop:${edge.id}`, Math.max(needs.get(`loop:${edge.id}`) ?? 0, Math.ceil(need(block2))));
|
|
2702
|
+
continue;
|
|
2703
|
+
}
|
|
2704
|
+
if (edge.flow === "return" && !outward.has(edge.id)) continue;
|
|
2603
2705
|
let block = blocks.at(-1), tall = 2 * (block.height + off + TEXT_CLEARANCE), along = flat.find((seg) => segmentLength(seg) >= block.width + 2 * off && rows.some((row2) => gapContains(row2, segmentMiddle(seg))));
|
|
2604
2706
|
if (along) {
|
|
2605
2707
|
let row2 = rows.find((item) => gapContains(item, segmentMiddle(along)));
|
|
@@ -2608,7 +2710,7 @@ function placeLabels(order, polylines, segmentBoxes, geometry, env, needs, unsea
|
|
|
2608
2710
|
}
|
|
2609
2711
|
let longest = [...segments].sort((a, b) => segmentLength(b) - segmentLength(a))[0];
|
|
2610
2712
|
if (!longest) continue;
|
|
2611
|
-
let inside = geometry.gaps.find((item) => gapContains(item, segmentMiddle(longest))), wide = labelGutterWidth(block.width, longest), gap = (inside?.axis === "v" && wide > env.plot.w / 3 ? rows.filter((item) => item.rect.y > Math.min(longest[0].y, longest[1].y) && item.rect.y + item.rect.h < Math.max(longest[0].y, longest[1].y)).sort((a, b) => Math.abs(a.rect.y - segmentMiddle(longest).y) - Math.abs(b.rect.y - segmentMiddle(longest).y))[0] : void 0) ?? inside;
|
|
2713
|
+
let inside = geometry.gaps.find((item) => gapContains(item, segmentMiddle(longest))), wide = labelGutterWidth(block.width, longest), full = (item) => item.rect.h >= tall, gap = (inside?.axis === "v" && wide > env.plot.w / 3 ? rows.filter((item) => item.rect.y > Math.min(longest[0].y, longest[1].y) && item.rect.y + item.rect.h < Math.max(longest[0].y, longest[1].y)).sort((a, b) => Number(full(a)) - Number(full(b)) || Math.abs(a.rect.y - segmentMiddle(longest).y) - Math.abs(b.rect.y - segmentMiddle(longest).y))[0] : void 0) ?? inside;
|
|
2612
2714
|
if (gap) {
|
|
2613
2715
|
if (gap.axis === "v" && longest[0].y === longest[1].y) {
|
|
2614
2716
|
let tracks = [];
|
|
@@ -3380,8 +3482,8 @@ function resolvePort(nodeId, rect, source, automatic) {
|
|
|
3380
3482
|
break;
|
|
3381
3483
|
}
|
|
3382
3484
|
} else {
|
|
3383
|
-
let
|
|
3384
|
-
distance <=
|
|
3485
|
+
let perimeter = (source.at.perimeter % 1 + 1) % 1, halfW = rect.w / 2, topRight = halfW, bottomRight = topRight + rect.h, bottomLeft = bottomRight + rect.w, topLeft = bottomLeft + rect.h, distance = perimeter * 2 * (rect.w + rect.h);
|
|
3486
|
+
distance <= topRight ? (point = { x: rect.x + halfW + distance, y: rect.y }, normal = { x: 0, y: -1 }) : distance <= bottomRight ? (point = { x: rect.x + rect.w, y: rect.y + Math.min(rect.h, distance - topRight) }, normal = { x: 1, y: 0 }) : distance <= bottomLeft ? (point = { x: rect.x + rect.w - Math.min(rect.w, distance - bottomRight), y: rect.y + rect.h }, normal = { x: 0, y: 1 }) : distance <= topLeft ? (point = { x: rect.x, y: rect.y + rect.h - Math.min(rect.h, distance - bottomLeft) }, normal = { x: -1, y: 0 }) : (point = { x: rect.x + Math.min(halfW, distance - topLeft), y: rect.y }, normal = { x: 0, y: -1 });
|
|
3385
3487
|
}
|
|
3386
3488
|
return {
|
|
3387
3489
|
nodeId,
|
|
@@ -3823,6 +3925,27 @@ var pointKey = (point) => `${q(point.x)},${q(point.y)}`, uniqueSorted = (values)
|
|
|
3823
3925
|
// src/core/charts/diagram/layout.ts
|
|
3824
3926
|
var DIAGRAM_MIN_WIDTH = 480, NARROW_PRESETS = /* @__PURE__ */ new Set(["circular-process", "strategy-house"]);
|
|
3825
3927
|
function layoutDiagram(rawData, rawOptions, measureMinimum = !0) {
|
|
3928
|
+
let inset = rawData.inset;
|
|
3929
|
+
if (inset?.columnOverrides === void 0) return layoutPlanned(rawData, rawOptions, measureMinimum);
|
|
3930
|
+
let { columnOverrides: tracks, ...rest } = inset, pinned = rawOptions?.[TARGET_SIZE]?.fixed.height ?? !heightOmitted(rawOptions?.size);
|
|
3931
|
+
if (!pinned) return layoutPlanned(rawData, rawOptions, measureMinimum);
|
|
3932
|
+
let draw = ({ columnOverrides }) => layoutPlanned({ ...rawData, inset: { ...rest, ...columnOverrides ? { columnOverrides } : {} } }, rawOptions, measureMinimum), field = ["data", "inset", "columnOverrides"], drawn = widthsThatFit({ columnOverrides: tracks }, draw, pinned, { field }), dropLabel = tracks?.label?.align !== void 0 && tracks.label.align !== "left", dropValue = tracks?.value?.align !== void 0;
|
|
3933
|
+
if (fitsRoom(drawn, pinned) || !dropLabel && !dropValue) return drawn;
|
|
3934
|
+
let unaligned = { ...tracks }, dropped = [...dropLabel ? ["label"] : [], ...dropValue ? ["value"] : []];
|
|
3935
|
+
for (let id of dropped) {
|
|
3936
|
+
let { align: _align, ...others } = tracks[id];
|
|
3937
|
+
unaligned[id] = others;
|
|
3938
|
+
}
|
|
3939
|
+
let plain = widthsThatFit({ columnOverrides: unaligned }, draw, pinned, { field });
|
|
3940
|
+
return fitsRoom(plain, pinned) ? { ...plain, warnings: [...plain.warnings, ...dropped.map((id) => ({
|
|
3941
|
+
code: "option-ignored",
|
|
3942
|
+
severity: "warn",
|
|
3943
|
+
field: [...field, id, "align"],
|
|
3944
|
+
message: `the aligned inset columns need more height than this chart has, so ${id}.align was ignored`,
|
|
3945
|
+
suggest: `Give the chart more height, or remove ${id}.align.`
|
|
3946
|
+
}))] } : drawn;
|
|
3947
|
+
}
|
|
3948
|
+
function layoutPlanned(rawData, rawOptions, measureMinimum) {
|
|
3826
3949
|
let planned = rawOptions?.variant === "architecture" && !(ARCHITECTURE_PLANS in rawOptions);
|
|
3827
3950
|
return layoutDiagramPass(rawData, planned ? { ...rawOptions, [ARCHITECTURE_PLANS]: /* @__PURE__ */ new Map() } : rawOptions, measureMinimum);
|
|
3828
3951
|
}
|
|
@@ -3921,7 +4044,7 @@ function layoutDiagramPass(rawData, rawOptions, measureMinimum, fitOnly = !1) {
|
|
|
3921
4044
|
measure,
|
|
3922
4045
|
u,
|
|
3923
4046
|
badgeText,
|
|
3924
|
-
size.width >= 720 ? 2 * stepFont.size : 0,
|
|
4047
|
+
classStepWidth(size.width) >= 720 ? 2 * stepFont.size : 0,
|
|
3925
4048
|
fixedHeight
|
|
3926
4049
|
) : roadmapEligible(data, options) ? layoutRoadmapCompact(data, options, plot, labelFont, laneFont, measure, u, diagramPalette, theme) : void 0, edgeLabelFont = options.variant === "architecture" ? org?.secondaryFont ?? labelFont : labelFont, narrow = org !== void 0 || NARROW_PRESETS.has(options.variant), narrowCard = !narrow && panelTypeClass(options) === void 0 && size.width < DIAGRAM_MIN_WIDTH, probe = fitOnly && !narrowCard, preset = org?.preset ?? layoutPreset(theme, presetContext);
|
|
3927
4050
|
if (org?.warnings && pushAll(warnings, org.warnings), !externalLabels && !org)
|
|
@@ -4022,7 +4145,10 @@ function layoutDiagramPass(rawData, rawOptions, measureMinimum, fitOnly = !1) {
|
|
|
4022
4145
|
throw new NormalizeError(
|
|
4023
4146
|
"diagram-node-unplaced",
|
|
4024
4147
|
`nodes[${node.id}]`,
|
|
4025
|
-
`variant '${options.variant}' did not place node '${node.id}'
|
|
4148
|
+
`variant '${options.variant}' did not place node '${node.id}'`,
|
|
4149
|
+
void 0,
|
|
4150
|
+
void 0,
|
|
4151
|
+
authoredItem(rawData.nodes, "nodes", node.id)
|
|
4026
4152
|
);
|
|
4027
4153
|
let icon = node.icon ?? (node.shape.kind === "icon" ? node.shape.name : void 0), iconReserve = org ? 0 : preset.contentTopReserves.get(node.id) ?? (icon ? Math.min(rect.h * 0.42, 28) : 0), contentRect = org ? org.labelBoxes.get(node.id) : qRect({
|
|
4028
4154
|
x: rect.x + 2 * u,
|
|
@@ -4205,7 +4331,7 @@ function layoutDiagramPass(rawData, rawOptions, measureMinimum, fitOnly = !1) {
|
|
|
4205
4331
|
let rect = routed.labelBoxes.get(edge.id);
|
|
4206
4332
|
if (edge.label) {
|
|
4207
4333
|
if (!rect) {
|
|
4208
|
-
|
|
4334
|
+
edgeLabelKinds.set(`edge-label:${edge.id}`, "diagramEdge"), edgeLabelRequests.push({
|
|
4209
4335
|
id: `edge-label:${edge.id}`,
|
|
4210
4336
|
kind: "annotation",
|
|
4211
4337
|
typeRole: "label",
|
|
@@ -4215,7 +4341,7 @@ function layoutDiagramPass(rawData, rawOptions, measureMinimum, fitOnly = !1) {
|
|
|
4215
4341
|
font: edgeLabelFont,
|
|
4216
4342
|
priority: PRIORITY.interior,
|
|
4217
4343
|
candidates: []
|
|
4218
|
-
})
|
|
4344
|
+
});
|
|
4219
4345
|
return;
|
|
4220
4346
|
}
|
|
4221
4347
|
addBoxLabelRequest(
|
|
@@ -4558,13 +4684,18 @@ function remapLabelKinds(labels, kinds) {
|
|
|
4558
4684
|
kind && (label.kind = kind);
|
|
4559
4685
|
});
|
|
4560
4686
|
}
|
|
4687
|
+
var UNPLACED = {
|
|
4688
|
+
diagramNode: { code: "diagram-node-label-unplaced", severity: "error" },
|
|
4689
|
+
diagramSecondary: { code: "diagram-secondary-label-unplaced", severity: "warn" },
|
|
4690
|
+
diagramCaption: { code: "diagram-caption-unplaced", severity: "warn" },
|
|
4691
|
+
diagramBadge: { code: "diagram-size-too-small", severity: "error" }
|
|
4692
|
+
};
|
|
4561
4693
|
function translateLabelLosses(labels, kinds, warnings) {
|
|
4562
4694
|
for (let label of labels) {
|
|
4563
4695
|
if (!label.hidden) continue;
|
|
4564
|
-
let kind = kinds.get(label.id),
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
severity: kind === "diagramNode" || kind === "diagramBadge" ? "error" : "warn",
|
|
4696
|
+
let kind = kinds.get(label.id), unplaced = kind && UNPLACED[kind];
|
|
4697
|
+
unplaced && warnings.push({
|
|
4698
|
+
...unplaced,
|
|
4568
4699
|
message: `${kind} '${label.text}' has no collision-free placement`,
|
|
4569
4700
|
...kind === "diagramBadge" ? { suggest: `shorten badge '${label.text}' or give node '${label.owner.pointId}' more space` } : {},
|
|
4570
4701
|
...kind === "diagramCaption" ? { suggest: "increase the canvas height or node spacing; shorten the caption or move it into secondaryLabel if it must stay inside the node" } : {},
|