boardplot 0.55.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +153 -0
- package/README.md +3 -3
- package/dist/{ReaderBox-3FFPHWSI.js → ReaderBox-GCIITQCX.js} +5 -5
- package/dist/{annotateEngine-ET4DM2OK.js → annotateEngine-JMZI6QEG.js} +1 -1
- package/dist/build-identity.json +3 -3
- package/dist/{chunk-RO2PSSAI.js → chunk-26WNBTWB.js} +21 -5
- package/dist/{chunk-3AJY353W.js → chunk-2AJWRVZ2.js} +4 -3
- package/dist/{chunk-NVGAEQ6M.js → chunk-2BHLRHF2.js} +2 -2
- package/dist/{chunk-CZ3WCG55.js → chunk-2HD5RY2U.js} +11 -3
- package/dist/{chunk-HR2BKLS3.js → chunk-2I76VFMZ.js} +186 -241
- package/dist/{chunk-3B3CFJ2H.js → chunk-2KCK63DD.js} +2 -2
- package/dist/{chunk-GDZI5ZJ7.js → chunk-2WTD3GCR.js} +11 -3
- package/dist/{chunk-EBC5TMI2.js → chunk-2X6XY4K4.js} +27 -10
- package/dist/{chunk-MJMOKPTF.js → chunk-3DUGZ7ML.js} +196 -138
- package/dist/{chunk-N5TZL74Y.js → chunk-3LNVEE5Z.js} +1 -1
- package/dist/{chunk-DB2JKPOX.js → chunk-43PCSBVQ.js} +567 -14
- package/dist/{chunk-WEMUCDPK.js → chunk-4JGBCBDZ.js} +1 -1
- package/dist/{chunk-7UPZPFHQ.js → chunk-4JNHF6JW.js} +12 -12
- package/dist/{chunk-4X3HNETE.js → chunk-4RN4OM6I.js} +3 -3
- package/dist/{chunk-Z7NHFNH3.js → chunk-4U2WSW6F.js} +107 -26
- package/dist/{chunk-6D4EO3S7.js → chunk-53OEKS4L.js} +5 -3
- package/dist/{chunk-E44W4EEG.js → chunk-54HEIM2A.js} +2 -2
- package/dist/{chunk-CLGUFVHM.js → chunk-5H4HFRDO.js} +6 -6
- package/dist/{chunk-SFG7NG23.js → chunk-5HTGSB6Y.js} +3 -3
- package/dist/{chunk-WXJ5MHLH.js → chunk-5JTRCSBN.js} +1 -1
- package/dist/{chunk-4Y7BA2NW.js → chunk-5P4MXWKP.js} +4 -4
- package/dist/{chunk-MLW72KWN.js → chunk-5RHP7YTL.js} +5 -5
- package/dist/{chunk-AB35GVPG.js → chunk-5TUDYKNL.js} +41 -31
- package/dist/{chunk-HZUAEMN5.js → chunk-5WSIH4SR.js} +1 -1
- package/dist/{chunk-YTCIGJUU.js → chunk-62JZL6FW.js} +45 -37
- package/dist/{chunk-S7NRL66K.js → chunk-6EE6XEMA.js} +4 -4
- package/dist/chunk-6JXBLQJ2.js +32 -0
- package/dist/{chunk-BGJRCG7N.js → chunk-6KHRMK3I.js} +46 -26
- package/dist/{chunk-3OZRODC4.js → chunk-6LQKU6YN.js} +4 -4
- package/dist/chunk-6VU2XI3W.js +89 -0
- package/dist/{chunk-E6HDUEGK.js → chunk-6WJOHZPW.js} +5 -5
- package/dist/{chunk-XJQXFVXY.js → chunk-6XU5XGYV.js} +7 -8
- package/dist/{chunk-QOWE55RR.js → chunk-6ZN2XJFI.js} +11 -6
- package/dist/{chunk-4WT3T5SH.js → chunk-72OJBDRB.js} +205 -60
- package/dist/{chunk-GFIT3FRE.js → chunk-73O6AOAA.js} +63 -47
- package/dist/{chunk-DEYAI662.js → chunk-76UL4CT4.js} +60 -24
- package/dist/chunk-7BQK2UDV.js +13 -0
- package/dist/{chunk-NHYKSPL4.js → chunk-7EQU2TUN.js} +304 -119
- package/dist/{chunk-FS6ZE5TG.js → chunk-7FAO4ICF.js} +2 -2
- package/dist/{chunk-LSF76AS3.js → chunk-7MYJUJZV.js} +6 -2
- package/dist/{chunk-D2QMNHCC.js → chunk-7P7D6WXR.js} +11 -2
- package/dist/{chunk-GCSCHK5Y.js → chunk-A33MFWHW.js} +3 -3
- package/dist/{chunk-3C24WWUQ.js → chunk-A6XCVOC5.js} +1 -1
- package/dist/{chunk-O7DVW3IE.js → chunk-AFA32LHN.js} +134 -37
- package/dist/{chunk-WALYNKBN.js → chunk-AFGQXMKT.js} +264 -88
- package/dist/{chunk-ZTMZOKVC.js → chunk-AKJO6N4K.js} +3 -3
- package/dist/{chunk-P6TA7M3G.js → chunk-ANNQJWDX.js} +11 -11
- package/dist/{chunk-KFGZMHIB.js → chunk-AOIZJ7GR.js} +7 -7
- package/dist/chunk-B5A7X2BA.js +44 -0
- package/dist/{chunk-HGT3UKDW.js → chunk-BDCKHLUB.js} +16 -16
- package/dist/{chunk-NUCYUKVH.js → chunk-BFDPY7JM.js} +10 -3
- package/dist/{chunk-BK6P6KMW.js → chunk-BM2A3IGQ.js} +1 -1
- package/dist/{chunk-H3AEYPRP.js → chunk-BO5EJBLH.js} +249 -129
- package/dist/chunk-BQIADGJB.js +23 -0
- package/dist/{chunk-F6CVYNDY.js → chunk-BY5JGQFZ.js} +24 -7
- package/dist/{chunk-WDIVAU5U.js → chunk-C5SQEYTQ.js} +78 -57
- package/dist/{chunk-NCZWLV7T.js → chunk-CEMXGMQN.js} +2 -2
- package/dist/{chunk-6H3OSHEY.js → chunk-CIDOL4FO.js} +5 -5
- package/dist/{chunk-WAPCCJUB.js → chunk-CT4RFZO4.js} +6 -6
- package/dist/{chunk-7Q37C6GZ.js → chunk-CV3NC75L.js} +1 -1
- package/dist/{chunk-GDVR3XHT.js → chunk-D3PQAVFW.js} +23 -13
- package/dist/{chunk-GMJFCBR6.js → chunk-D5G67OER.js} +1 -1
- package/dist/{chunk-BFFPYT3Y.js → chunk-D5RAVZ5C.js} +6 -7
- package/dist/{chunk-FQF7GSJK.js → chunk-DJBMA4FW.js} +4 -4
- package/dist/{chunk-4DZFR52I.js → chunk-DPUCT567.js} +2 -2
- package/dist/{chunk-ZHFUMVW7.js → chunk-DYSEZVIJ.js} +18 -2
- package/dist/{chunk-SA46CNMS.js → chunk-ED7GLWTF.js} +4 -1
- package/dist/{chunk-YXM4W3TN.js → chunk-EDBUVDRI.js} +118 -68
- package/dist/{chunk-JBMWRXDS.js → chunk-EEBMK6T6.js} +6 -6
- package/dist/{chunk-CYKIX3IQ.js → chunk-EEL2N4Y6.js} +7 -8
- package/dist/{chunk-PYV6ZIR6.js → chunk-EFKFZNQC.js} +24 -18
- package/dist/{chunk-IOKWBUQP.js → chunk-EHNGPUTO.js} +6 -6
- package/dist/{chunk-ZBSNF5F7.js → chunk-EHQLLZCQ.js} +49 -22
- package/dist/{chunk-ONKSGT2M.js → chunk-EWR6WVOV.js} +6 -6
- package/dist/{chunk-MTRV3BJL.js → chunk-EY4OA4OF.js} +1005 -666
- package/dist/{chunk-Y3L655X6.js → chunk-F4JAGDPD.js} +6 -6
- package/dist/{chunk-LRCO4G7C.js → chunk-FAFUMSPR.js} +35 -26
- package/dist/{chunk-63L35UCI.js → chunk-FERP4WS3.js} +19 -9
- package/dist/{chunk-N5HN5QGH.js → chunk-FF7MV4D4.js} +1 -1
- package/dist/{chunk-G63WXSQP.js → chunk-FJKFYQ5I.js} +23 -18
- package/dist/chunk-FL3FQ2YA.js +27 -0
- package/dist/{chunk-YOOHNQ3L.js → chunk-FX5VZK5F.js} +4 -0
- package/dist/{chunk-37A6CLR5.js → chunk-G5BUGYIL.js} +70 -18
- package/dist/{chunk-JU7S52HI.js → chunk-G5CELEUR.js} +6 -6
- package/dist/{chunk-EW47LNWH.js → chunk-GADI2DU7.js} +11 -10
- package/dist/{chunk-F6OLHND5.js → chunk-GAFEN3H7.js} +2 -2
- package/dist/{chunk-EXDMYV5W.js → chunk-GC4WOLV3.js} +1 -1
- package/dist/{chunk-WFSOKGGA.js → chunk-GHFTKVJN.js} +1 -1
- package/dist/chunk-GKDUIDU6.js +138 -0
- package/dist/{chunk-LA5OYJ5P.js → chunk-GKQLKUMF.js} +188 -84
- package/dist/{chunk-LLDKKEUD.js → chunk-GS5UG6QD.js} +1 -1
- package/dist/{chunk-BWVNCLUS.js → chunk-H2POQ4LB.js} +5 -5
- package/dist/{chunk-WSJDLZSZ.js → chunk-H3EWFSWI.js} +97 -53
- package/dist/{chunk-XPOMQWXY.js → chunk-H6EJ63QN.js} +20 -18
- package/dist/{chunk-Q3E74U2W.js → chunk-HB3TH7GY.js} +3 -3
- package/dist/{chunk-MLGEBFEX.js → chunk-HC6WHTBX.js} +2 -2
- package/dist/{chunk-X7XTIM6U.js → chunk-HDSHS2QZ.js} +47 -32
- package/dist/{chunk-QBJDHFJJ.js → chunk-HFFKN7PA.js} +11 -6
- package/dist/{chunk-K5S3K6QK.js → chunk-HGPFEG2L.js} +7 -8
- package/dist/{chunk-7Z73MM35.js → chunk-HVX2E26J.js} +46 -26
- package/dist/{chunk-KAYBRD4F.js → chunk-I3DLERI7.js} +2 -2
- package/dist/{chunk-SPSGUFTI.js → chunk-I4NUYVP5.js} +1 -1
- package/dist/{chunk-OHGEDG46.js → chunk-I5ZADE2U.js} +1 -1
- package/dist/{chunk-CPGASWNN.js → chunk-I65OLJ2X.js} +1 -1
- package/dist/{chunk-LAVVML3X.js → chunk-I6QGYRY4.js} +3 -3
- package/dist/{chunk-N7N5NIAU.js → chunk-I7KDPCC7.js} +3 -3
- package/dist/{chunk-UF3HSFAE.js → chunk-IFURKTOL.js} +3 -3
- package/dist/{chunk-Y54LU4CU.js → chunk-IPWUBZ4P.js} +1 -1
- package/dist/{chunk-IQDMZ33D.js → chunk-IRXTNSZL.js} +10 -10
- package/dist/{chunk-GD5TYS5R.js → chunk-IUVJVMKS.js} +13 -13
- package/dist/{chunk-E5OEWMNX.js → chunk-IVQT2E3Y.js} +66 -36
- package/dist/{chunk-7DAH2E4T.js → chunk-IW3YUMPI.js} +2 -2
- package/dist/chunk-IXM6BAM4.js +53 -0
- package/dist/{chunk-XVUQMZWV.js → chunk-IZRTNCJQ.js} +5 -5
- package/dist/{chunk-KZH2QI6S.js → chunk-J22ETKDJ.js} +2 -2
- package/dist/{chunk-HJRNBKIT.js → chunk-JARJP576.js} +3 -3
- package/dist/{chunk-4YHZSPAJ.js → chunk-JHWDTV4K.js} +5 -1
- package/dist/{chunk-PQYJZMCR.js → chunk-JIH52I36.js} +79 -79
- package/dist/{chunk-LFUJTEJO.js → chunk-JKXJWCJ5.js} +71 -36
- package/dist/{chunk-2BP6X5GX.js → chunk-JMOBA5ES.js} +2 -2
- package/dist/{chunk-2TAK2ELB.js → chunk-JMXNXLAC.js} +5 -1
- package/dist/{chunk-Z5V6ZM76.js → chunk-JRRSKCGG.js} +3 -3
- package/dist/{chunk-IVRYF7QA.js → chunk-JSA3ESEJ.js} +1 -1
- package/dist/{chunk-NOCIN2EM.js → chunk-K6Y4HBK7.js} +32 -32
- package/dist/{chunk-WQT6HIIY.js → chunk-KAAB2DIV.js} +23 -13
- package/dist/{chunk-GM2HIU6C.js → chunk-KF3ZHLHQ.js} +7 -8
- package/dist/{chunk-3XOWXLLQ.js → chunk-KGS5Z7SL.js} +3 -3
- package/dist/{chunk-AIU4GZV5.js → chunk-KIXNHDXS.js} +7 -8
- package/dist/{chunk-ILFQ75N4.js → chunk-KJLH5EHD.js} +29 -29
- package/dist/{chunk-UIYXMPDW.js → chunk-KLQKHA3T.js} +6 -6
- package/dist/chunk-KQ2WZ6BY.js +11 -0
- package/dist/{chunk-5SLJGRUO.js → chunk-KUMJI5B6.js} +32 -18
- package/dist/{chunk-XYYRHGQI.js → chunk-L2XRUG4P.js} +7 -8
- package/dist/{chunk-JYBT2JNY.js → chunk-LE3LSEUL.js} +27 -2
- package/dist/{chunk-RTXRIZYU.js → chunk-LFX5BERN.js} +167 -70
- package/dist/{chunk-D7G27EYZ.js → chunk-LGMV7ZV4.js} +4 -4
- package/dist/{chunk-H4VDQ7OE.js → chunk-LO3AGGE3.js} +7 -8
- package/dist/{chunk-UNMIUILK.js → chunk-LSKCKGCF.js} +5 -1
- package/dist/{chunk-CVIW2MV4.js → chunk-LSR3SBJ4.js} +78 -37
- package/dist/{chunk-V634AXDM.js → chunk-LUZ7HXBT.js} +1 -1
- package/dist/{chunk-B3AXM3MT.js → chunk-LW4ZQGVL.js} +2 -2
- package/dist/{chunk-H3IBJQ5A.js → chunk-M2OQK2FO.js} +1 -1
- package/dist/{chunk-AZM4YNRE.js → chunk-M74H7QYD.js} +2 -2
- package/dist/{chunk-M427S3G7.js → chunk-MOQFYJ3F.js} +6 -6
- package/dist/{chunk-QRVIS2QB.js → chunk-MQ5EKWIG.js} +51 -9
- package/dist/{chunk-LHKDZAWN.js → chunk-MSYTF3DZ.js} +10 -3
- package/dist/{chunk-LD4LML5P.js → chunk-MTCDGSYW.js} +9 -1
- package/dist/{chunk-KHRAJDBM.js → chunk-NCCDEUHD.js} +1 -1
- package/dist/{chunk-IGVAWAOK.js → chunk-NIDH22DI.js} +31 -7
- package/dist/{chunk-IF2ZABAM.js → chunk-NINK4G7U.js} +2 -2
- package/dist/{chunk-F5V7YFKS.js → chunk-NO7GRVUU.js} +10 -8
- package/dist/{chunk-EBVJCVXL.js → chunk-NRYERHEI.js} +6 -6
- package/dist/{chunk-OJ2BPQGQ.js → chunk-O4D27FKH.js} +1 -1
- package/dist/{chunk-RYPJB3RO.js → chunk-O7Y6RJ4D.js} +23 -11
- package/dist/{chunk-2C4SYWZ3.js → chunk-OAT6FWKL.js} +7 -8
- package/dist/{chunk-VL7WLE4H.js → chunk-OF7FMGH5.js} +6 -6
- package/dist/{chunk-V3MSLNSD.js → chunk-OKM5LYYP.js} +7 -8
- package/dist/{chunk-YV5KYGE5.js → chunk-OQQMDSCC.js} +1 -1
- package/dist/{chunk-QKWBDH2L.js → chunk-OTGNVAI4.js} +2 -2
- package/dist/{chunk-HFRQLMKK.js → chunk-PSYPB22T.js} +3 -3
- package/dist/{chunk-JXBZIJCG.js → chunk-PYGEIPPH.js} +1 -1
- package/dist/{chunk-KZJ5VM6E.js → chunk-PZ3TQFSY.js} +15 -1
- package/dist/{chunk-MQYIBGZE.js → chunk-Q7VPTN5X.js} +4 -4
- package/dist/{chunk-XZLU3G23.js → chunk-QFIRPOXR.js} +6 -2
- package/dist/{chunk-QBRRJ5OR.js → chunk-QHPJ5ZKS.js} +6 -6
- package/dist/{chunk-R27IDIJI.js → chunk-QLWUFEKR.js} +6 -6
- package/dist/{chunk-COQEHO7B.js → chunk-QNLESRH6.js} +3 -1
- package/dist/{chunk-5UVJKB7L.js → chunk-QRZESG66.js} +40 -29
- package/dist/{chunk-KND4OM4B.js → chunk-QYOZ46ZQ.js} +70 -23
- package/dist/{chunk-HLOXWM2O.js → chunk-QZMLSK43.js} +244 -74
- package/dist/{chunk-NGA7ICG4.js → chunk-RDJ3ZU6O.js} +16 -13
- package/dist/{chunk-AF7EB6N6.js → chunk-RHBQ2Q5H.js} +104 -47
- package/dist/{chunk-Y2CAIAUI.js → chunk-RHVP62HI.js} +6 -6
- package/dist/{chunk-EAR43REB.js → chunk-RMVCKO6N.js} +16 -14
- package/dist/chunk-RRPTQGRU.js +47 -0
- package/dist/{chunk-IF76JRXT.js → chunk-S2TSXUYP.js} +6 -6
- package/dist/{chunk-O2KKQNGW.js → chunk-SD6ENKTO.js} +7 -2
- package/dist/{chunk-J5PL6JLL.js → chunk-SGDWLXUC.js} +1 -1
- package/dist/{chunk-75TWO5B2.js → chunk-SHAAMKN7.js} +45 -24
- package/dist/{chunk-NB7M4KX4.js → chunk-SHCW2TCA.js} +11 -11
- package/dist/{chunk-3ZAH24P6.js → chunk-SSZB3VXG.js} +19 -19
- package/dist/chunk-SXAZDIGM.js +84 -0
- package/dist/{chunk-QHRE2M6V.js → chunk-T2L5H2WW.js} +4 -3
- package/dist/{chunk-ODZJ4LW7.js → chunk-T3WCDDIL.js} +7 -2
- package/dist/{chunk-OOFSQ5AS.js → chunk-T5MBORBK.js} +1 -1
- package/dist/{chunk-OY2UJ4XK.js → chunk-TDDSWNGD.js} +25 -17
- package/dist/{chunk-5DMHMQFP.js → chunk-TGR6PRKG.js} +3 -3
- package/dist/{chunk-EGPXEY2K.js → chunk-TKERVBJ3.js} +7 -8
- package/dist/{chunk-6C64IBOG.js → chunk-TMXRTYGT.js} +10 -4
- package/dist/{chunk-RNIYG6PI.js → chunk-TQ5HHNM3.js} +2 -2
- package/dist/{chunk-LF6RTFNK.js → chunk-TWRFVW3J.js} +5 -3
- package/dist/{chunk-7FKY6YWU.js → chunk-TXMS7QUJ.js} +3 -3
- package/dist/{chunk-H5L2P2GO.js → chunk-UBXIGE2P.js} +3 -2
- package/dist/{chunk-7Q2WV6D2.js → chunk-UCIAHSJK.js} +2 -2
- package/dist/{chunk-BVYIKLQ5.js → chunk-UD6U4EF5.js} +1 -1
- package/dist/{chunk-4CJ6UCX4.js → chunk-UFZXZJJG.js} +5 -5
- package/dist/{chunk-SNQ7D5R7.js → chunk-UIHGGWES.js} +51 -11
- package/dist/{chunk-CKNOLGRR.js → chunk-UP4JSNDR.js} +1 -1
- package/dist/{chunk-3B3K7TD5.js → chunk-USFIDSTO.js} +8 -6
- package/dist/{chunk-PZ46S2SY.js → chunk-V3UE3TB7.js} +2 -2
- package/dist/{chunk-KDSYZLF6.js → chunk-V5IFI3FV.js} +8 -1
- package/dist/{chunk-BSATR6ZO.js → chunk-V62B23VC.js} +13 -1
- package/dist/{chunk-NA6WLZ66.js → chunk-VFLMBA2M.js} +68 -18
- package/dist/chunk-VJ7VBB6S.js +58 -0
- package/dist/{chunk-32IKJMUF.js → chunk-VM5CQ7CG.js} +3 -3
- package/dist/{chunk-6WZZADRL.js → chunk-VMGTNB6H.js} +6 -6
- package/dist/{chunk-WWIY6BBY.js → chunk-VT7PBGL2.js} +8 -8
- package/dist/{chunk-3L2VXXM4.js → chunk-VY2NPB2Q.js} +2 -2
- package/dist/{chunk-QEP3X3OV.js → chunk-VY67Q6CJ.js} +20 -20
- package/dist/{chunk-W45AR6EW.js → chunk-W5SVS4B6.js} +2 -2
- package/dist/{chunk-U7W7GYXP.js → chunk-W7Q6PLT4.js} +37 -37
- package/dist/{chunk-7GVYMGLK.js → chunk-WDAZ2MT4.js} +8 -4
- package/dist/{chunk-T5Y4HXYO.js → chunk-WE5WVQE4.js} +13 -1
- package/dist/chunk-WJQX7HBH.js +54 -0
- package/dist/{chunk-EC2PGJ64.js → chunk-WKWCNS6K.js} +6 -6
- package/dist/{chunk-2ALFFOKB.js → chunk-WSKZZ2ZB.js} +14 -14
- package/dist/{chunk-5SHI57XD.js → chunk-WZB6R2ZX.js} +7 -5
- package/dist/{chunk-MEMPP7VZ.js → chunk-X5OVVMZX.js} +1 -1
- package/dist/{chunk-UDKYY27B.js → chunk-XCROSJ2Z.js} +1 -1
- package/dist/{chunk-ROLR7HRB.js → chunk-XFCBH3TI.js} +3 -3
- package/dist/{chunk-XMN3Z43K.js → chunk-XJUZC53Y.js} +1 -1
- package/dist/chunk-XN7JDII2.js +2047 -0
- package/dist/{chunk-RUWNG2JC.js → chunk-XNV7VOIT.js} +4 -4
- package/dist/{chunk-KC52E5G4.js → chunk-XR7VOF2V.js} +10 -8
- package/dist/{chunk-Z2X4JQNY.js → chunk-XYUXB5VK.js} +8 -3
- package/dist/{chunk-SC42DPNV.js → chunk-Y5IKCXQR.js} +7 -8
- package/dist/{chunk-YLC42C3M.js → chunk-Y5WHM2Q5.js} +1 -1
- package/dist/{chunk-IGNBQT23.js → chunk-Y7Q3VEYC.js} +96 -5
- package/dist/{chunk-O6NJDRXE.js → chunk-YB6QGOCO.js} +2 -2
- package/dist/{chunk-AM2CG7VX.js → chunk-YBYV56FS.js} +3 -3
- package/dist/{chunk-O4WJWHCH.js → chunk-YCUNFAEE.js} +90 -42
- package/dist/{chunk-V7F4F6JA.js → chunk-YFI5PN5O.js} +5 -7
- package/dist/{chunk-SBR2RLEQ.js → chunk-YGPLUENN.js} +89 -59
- package/dist/chunk-YGZEG3JV.js +123 -0
- package/dist/{chunk-WG5CJGLU.js → chunk-YJGFT63R.js} +8 -3
- package/dist/{chunk-KEDNHCGB.js → chunk-YNHPPZ7S.js} +1 -1
- package/dist/{chunk-EZZ533MH.js → chunk-YO5UKKCQ.js} +1 -1
- package/dist/{chunk-SZXKV3BX.js → chunk-YTEJYLU7.js} +5 -1
- package/dist/{chunk-33FCWTGT.js → chunk-Z257SH5U.js} +1 -1
- package/dist/{chunk-O7W35PT3.js → chunk-Z2BDTZDT.js} +14 -12
- package/dist/{chunk-EQRFSVDD.js → chunk-ZDD3MJ2H.js} +1 -1
- package/dist/{chunk-APQPYM2Z.js → chunk-ZNX5J7D7.js} +3 -3
- package/dist/{chunk-VBVG6NEL.js → chunk-ZSYU6LIH.js} +5 -5
- package/dist/{chunk-2YNF6AHH.js → chunk-ZTSJ7NY6.js} +6 -2
- package/dist/chunk-ZV3SNRJI.js +122 -0
- package/dist/cli/index.js +1 -1
- package/dist/{core-6HMJHFRR.js → core-4M4RY7MX.js} +4 -1
- package/dist/{core-RPQBIOU4.js → core-4PW4MXWR.js} +4 -1
- package/dist/{core-MV6KGAUV.js → core-5S5CJHBG.js} +5 -1
- package/dist/{core-XMTKUXLO.js → core-7TTM4KRP.js} +6 -1
- package/dist/{core-EYJ3WJK4.js → core-7XKNJM7Y.js} +4 -1
- package/dist/{core-3IJPBNGC.js → core-A7HXVSKB.js} +5 -1
- package/dist/{core-CLLIG7ZU.js → core-AMWCZTOT.js} +2 -1
- package/dist/{core-2YTKFBNZ.js → core-AVA4XLQ2.js} +4 -1
- package/dist/{core-UAY2G7LN.js → core-BJZEJ63L.js} +5 -1
- package/dist/{core-PTRQPQTO.js → core-CCB3IXGD.js} +4 -1
- package/dist/{core-HJUGHAX7.js → core-D2OIGYC7.js} +2 -1
- package/dist/{core-NTWHFDM4.js → core-DMDAXVMY.js} +3 -1
- package/dist/{core-2SICIP63.js → core-EMSJRGSE.js} +3 -4
- package/dist/{core-MEC6A5DD.js → core-FCSA74RT.js} +2 -1
- package/dist/{core-CBEGB2NO.js → core-FTQBESDS.js} +3 -1
- package/dist/{core-GRWI22NS.js → core-GS4DXDDG.js} +4 -1
- package/dist/{core-CAL7YNFC.js → core-JDZDBTID.js} +2 -1
- package/dist/{core-H7KMWYP5.js → core-L3UR75IJ.js} +2 -1
- package/dist/{core-JMYMIH6Z.js → core-MAW4S3KA.js} +4 -1
- package/dist/{core-T4ZH3FAU.js → core-N2JEWJ7D.js} +3 -1
- package/dist/{core-T2KHX5LG.js → core-OBPTBKX6.js} +4 -1
- package/dist/{core-CTZLHGXE.js → core-OFPPRHYY.js} +5 -1
- package/dist/{core-QABTVASG.js → core-QFAVWFI3.js} +5 -1
- package/dist/{core-FX7HRKTF.js → core-QM34237W.js} +9 -1
- package/dist/{core-GQC6VDW5.js → core-SKMHEA4Y.js} +5 -1
- package/dist/{core-VBR253SM.js → core-T3OSZOVV.js} +2 -1
- package/dist/{core-7JKE7H32.js → core-UNX4ZV4M.js} +4 -1
- package/dist/core-VRVL6LIM.js +49 -0
- package/dist/{core-OIC5KJSD.js → core-VT35VDVS.js} +4 -1
- package/dist/{core-3647Z25D.js → core-VWYXK2R3.js} +4 -1
- package/dist/{core-YEFGEW3Z.js → core-WNT6ZMRO.js} +5 -1
- package/dist/{core-VMIBBHXI.js → core-WP73P4CW.js} +4 -1
- package/dist/{core-ULZ7XUQP.js → core-WPEYRK6Y.js} +2 -1
- package/dist/{core-PMYCLXT7.js → core-WXZJ7V7S.js} +2 -1
- package/dist/{core-KEB5PBCO.js → core-XKXDXALI.js} +3 -1
- package/dist/{core-OWCTIPHD.js → core-ZACFV6XR.js} +2 -1
- package/dist/{core-BMY7OL76.js → core-ZSERZGK6.js} +5 -1
- package/dist/{dataTable-2ZXK54TP.js → dataTable-7IO546LM.js} +11 -2
- package/dist/{engine-HGXSWGOI.js → engine-US3N6UCH.js} +51 -15
- package/dist/fixtures.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 +32 -19
- package/dist/{main-PVT6FMGC.js → main-2UWKGUHR.js} +28 -13
- package/dist/mcp/server.js +24 -13
- package/dist/react/bar.js +6 -1
- package/dist/react/bartable.js +8 -1
- package/dist/react/box.js +6 -1
- package/dist/react/bullet.js +7 -1
- package/dist/react/butterfly.js +6 -1
- package/dist/react/choropleth.js +8 -1
- package/dist/react/cohort.js +9 -1
- package/dist/react/column.js +6 -1
- package/dist/react/combo.js +6 -1
- package/dist/react/creative.js +8 -1
- package/dist/react/diagram.js +8 -1
- package/dist/react/dimswitch.js +6 -1
- package/dist/react/dot.js +6 -1
- package/dist/react/export.js +27 -19
- package/dist/react/funnel.js +6 -1
- package/dist/react/gantt.js +8 -1
- package/dist/react/grid.js +5 -1
- package/dist/react/heatmap.js +7 -1
- package/dist/react/histogram.js +6 -1
- package/dist/react/index.js +94 -84
- package/dist/react/kpi.js +7 -1
- package/dist/react/likert.js +6 -1
- package/dist/react/line.js +6 -1
- package/dist/react/mekko.js +6 -1
- package/dist/react/pareto.js +6 -1
- package/dist/react/pie.js +6 -1
- package/dist/react/prepare.js +36 -20
- package/dist/react/pvm.js +7 -1
- package/dist/react/pyramid.js +6 -1
- package/dist/react/sankey.js +8 -1
- package/dist/react/scatter.js +6 -1
- package/dist/react/slope.js +7 -1
- package/dist/react/sparkline.js +7 -1
- package/dist/react/spec.js +17 -11
- package/dist/react/status.js +12 -1
- package/dist/react/story.js +5 -3
- package/dist/react/table.js +6 -1
- package/dist/react/theme.js +8 -3
- package/dist/react/tilemap.js +7 -1
- package/dist/react/treemap.js +7 -1
- package/dist/react/variance.js +6 -1
- package/dist/react/waffle.js +7 -1
- package/dist/react/waterfall.js +7 -1
- package/dist/rows.js +3 -2
- package/dist/{rowsModule-JTDPTWXG.js → rowsModule-DYDVHBAX.js} +2 -1
- package/dist/{schema-GLN7IHSH.js → schema-3KMU5737.js} +1 -1
- package/dist/{schema-NVMEOHAW.js → schema-4JRNXEZF.js} +3 -1
- package/dist/{schema-7CPGNCOL.js → schema-626QXX4G.js} +3 -1
- package/dist/{schema-BMD5JR3Y.js → schema-6PL46VXZ.js} +3 -1
- package/dist/{schema-2Q7IJ22V.js → schema-6V5K3J2V.js} +4 -1
- package/dist/{schema-3XLO43SX.js → schema-A2XUZUCV.js} +3 -1
- package/dist/{schema-XKY2EQFH.js → schema-CNJ4Y6CT.js} +3 -1
- package/dist/{schema-BKHQ3ZUH.js → schema-DHMMGDTI.js} +3 -1
- package/dist/{schema-XHKSGMUH.js → schema-F2Q6MH7W.js} +3 -1
- package/dist/{schema-GGG2VOY7.js → schema-FC6J6KZC.js} +5 -1
- package/dist/{schema-ZE7WUNFS.js → schema-FGE5YK3S.js} +3 -1
- package/dist/{schema-WZLWHOMY.js → schema-FSYDLMGD.js} +1 -1
- package/dist/{schema-FYULDJFB.js → schema-G5KSSI5W.js} +1 -1
- package/dist/{schema-V3BPW4LA.js → schema-GXOG4MXL.js} +1 -1
- package/dist/{schema-76XRTBCJ.js → schema-HEB6ZDI5.js} +3 -1
- package/dist/{schema-HIDW4BA4.js → schema-I44IDRGD.js} +1 -1
- package/dist/{schema-BOGTPL7F.js → schema-IFTIMTS3.js} +1 -1
- package/dist/{schema-KIJA53MB.js → schema-IUY7VYHJ.js} +3 -1
- package/dist/{schema-C7NVOQNV.js → schema-J4HCSD5C.js} +5 -2
- package/dist/{schema-WIZ2TZAT.js → schema-JCU6LTYD.js} +1 -1
- package/dist/{schema-5KHDHTIX.js → schema-JJWORI7D.js} +3 -1
- package/dist/{schema-BUTNGYTT.js → schema-K4V4PYBO.js} +3 -1
- package/dist/{schema-LHMEXFLY.js → schema-LGLQBRC4.js} +3 -1
- package/dist/{schema-5753NOAL.js → schema-MD22QYZU.js} +1 -1
- package/dist/{schema-2M3LXR35.js → schema-MGETMQYC.js} +3 -1
- package/dist/{schema-FZKNIAIH.js → schema-MQB6CE5V.js} +3 -1
- package/dist/{schema-U26KG42U.js → schema-NMIYKGHE.js} +3 -1
- package/dist/{schema-MT6NA5AL.js → schema-NOBNFD2F.js} +3 -1
- package/dist/{schema-3OLBUVMZ.js → schema-OXO2XY4Y.js} +1 -1
- package/dist/{schema-G2PLJCYL.js → schema-PHIHMDVB.js} +1 -1
- package/dist/{schema-UHHFTVGS.js → schema-UXWKA3PI.js} +3 -1
- package/dist/{schema-J53LCIY3.js → schema-WBOPCTPC.js} +1 -1
- package/dist/{schema-TA3MSAPQ.js → schema-WFGDVBJK.js} +1 -1
- package/dist/{schema-MUTAVQMI.js → schema-WX2RS4OU.js} +3 -1
- package/dist/{schema-XATDKZPW.js → schema-XIHAKX3B.js} +18 -1
- package/dist/{schema-LEQNLBNG.js → schema-XRSORYBI.js} +3 -1
- package/dist/{schema-FNTAAXQ3.js → schema-YDZCGL56.js} +3 -1
- package/dist/{specValidation-X5XJBPTP.js → specValidation-XGELWQUU.js} +2 -1
- package/dist/theme.js +5 -1
- package/dist/types/core/charts/bartable/types.d.ts +14 -1
- package/dist/types/core/charts/box/types.d.ts +5 -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/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 +20 -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/histogram/types.d.ts +8 -0
- package/dist/types/core/charts/likert/layout.d.ts +10 -8
- package/dist/types/core/charts/pvm/types.d.ts +9 -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/status/layout.d.ts +3 -0
- package/dist/types/core/charts/table/resolve.d.ts +14 -0
- package/dist/types/core/footer.d.ts +2 -0
- package/dist/types/core/format.d.ts +4 -0
- package/dist/types/core/formatSpec.d.ts +10 -0
- package/dist/types/core/frame.d.ts +1 -1
- package/dist/types/core/geo/types.d.ts +2 -0
- package/dist/types/core/geometry.d.ts +1 -1
- package/dist/types/core/label/categoryRow.d.ts +1 -1
- package/dist/types/core/normalize/shared.d.ts +2 -0
- package/dist/types/core/registry.d.ts +4 -5
- package/dist/types/core/request.d.ts +6 -0
- package/dist/types/core/schema/capability.d.ts +20 -7
- package/dist/types/core/schema/generatedColumns.d.ts +168 -0
- package/dist/types/core/text.d.ts +16 -0
- package/dist/types/core/themeGeometry.d.ts +9 -0
- package/dist/types/core/timeAxis.d.ts +6 -1
- package/dist/types/core/types/diagram.d.ts +7 -0
- package/dist/types/core/types/options.d.ts +83 -12
- package/dist/types/core/types/table.d.ts +23 -3
- package/dist/types/index.d.ts +2 -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 +18 -3
- package/dist/types/react/prepare.d.ts +7 -1
- package/dist/types/theme.d.ts +2 -0
- package/dist/validate.js +16 -5
- package/docs/manual.md +31 -3
- package/docs/reference/bar.md +3 -0
- package/docs/reference/bartable.md +16 -1
- package/docs/reference/box.md +8 -1
- package/docs/reference/bullet.md +12 -1
- package/docs/reference/butterfly.md +7 -1
- package/docs/reference/choropleth.md +15 -2
- package/docs/reference/cohort.md +25 -5
- package/docs/reference/column.md +1 -0
- package/docs/reference/combo.md +1 -0
- package/docs/reference/creative.md +13 -0
- package/docs/reference/diagram.md +5 -0
- package/docs/reference/dimswitch.md +50 -32
- package/docs/reference/dot.md +7 -2
- package/docs/reference/fixtures.md +57 -0
- package/docs/reference/funnel.md +5 -0
- package/docs/reference/gantt.md +10 -2
- package/docs/reference/grid.md +9 -2
- package/docs/reference/heatmap.md +6 -0
- package/docs/reference/histogram.md +2 -2
- package/docs/reference/kpi.md +5 -1
- package/docs/reference/likert.md +8 -0
- package/docs/reference/line.md +1 -1
- package/docs/reference/options.md +4 -3
- package/docs/reference/pareto.md +1 -1
- package/docs/reference/pvm.md +7 -1
- package/docs/reference/pyramid.md +6 -0
- package/docs/reference/react.md +1 -2
- package/docs/reference/sankey.md +6 -2
- package/docs/reference/slope.md +6 -0
- package/docs/reference/sparkline.md +1 -1
- package/docs/reference/status.md +7 -1
- package/docs/reference/table.md +16 -4
- package/docs/reference/tilemap.md +2 -2
- package/docs/reference/treemap.md +1 -1
- package/docs/reference/waffle.md +1 -1
- package/docs/reference/waterfall.md +4 -1
- package/package.json +1 -1
- package/dist/chunk-FI5EXISD.js +0 -27
- package/dist/chunk-O36WX56O.js +0 -13
- package/dist/chunk-YGTNVZJE.js +0 -89
- package/dist/chunk-ZGHBDMYF.js +0 -24
- package/dist/chunk-ZLYQWUNR.js +0 -1794
- package/dist/core-SKRADU7T.js +0 -41
|
@@ -6,30 +6,33 @@ import {
|
|
|
6
6
|
normalizeMetricStack,
|
|
7
7
|
stackError,
|
|
8
8
|
stackRange
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VM5CQ7CG.js";
|
|
10
10
|
import {
|
|
11
11
|
scalePanelSemantics
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OTGNVAI4.js";
|
|
13
13
|
import {
|
|
14
14
|
STACK_ROOM
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5HTGSB6Y.js";
|
|
16
16
|
import {
|
|
17
17
|
normalizeGridData,
|
|
18
18
|
parseGridLegendPanelData,
|
|
19
19
|
parseGridTextPanelData
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-YFI5PN5O.js";
|
|
21
21
|
import {
|
|
22
22
|
categoryBandFromCenters
|
|
23
23
|
} from "./chunk-CDZHNLO6.js";
|
|
24
24
|
import {
|
|
25
25
|
structureCount
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XCROSJ2Z.js";
|
|
27
|
+
import {
|
|
28
|
+
lineBoxes
|
|
29
|
+
} from "./chunk-B5A7X2BA.js";
|
|
27
30
|
import {
|
|
28
31
|
isRecord
|
|
29
32
|
} from "./chunk-MCYM3RNF.js";
|
|
30
33
|
import {
|
|
31
|
-
|
|
32
|
-
} from "./chunk-
|
|
34
|
+
generatedIdWarnings
|
|
35
|
+
} from "./chunk-SXAZDIGM.js";
|
|
33
36
|
import {
|
|
34
37
|
CARD_CLASS_WIDTH,
|
|
35
38
|
CARD_MIN_WIDTH,
|
|
@@ -53,7 +56,7 @@ import {
|
|
|
53
56
|
stackedColumnPlotPx,
|
|
54
57
|
varianceTierWeights,
|
|
55
58
|
withCalendarLabels
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-AFGQXMKT.js";
|
|
57
60
|
import {
|
|
58
61
|
LEFT_OUT_OF_NOTE,
|
|
59
62
|
PRIORITY,
|
|
@@ -74,18 +77,22 @@ import {
|
|
|
74
77
|
solveLabels,
|
|
75
78
|
stringsIn,
|
|
76
79
|
valueNoteLine
|
|
77
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-WSKZZ2ZB.js";
|
|
78
81
|
import {
|
|
79
82
|
disclosureNote,
|
|
80
|
-
disclosuresShown
|
|
81
|
-
|
|
83
|
+
disclosuresShown,
|
|
84
|
+
slotDemandHeight
|
|
85
|
+
} from "./chunk-WZB6R2ZX.js";
|
|
86
|
+
import {
|
|
87
|
+
emptyIdRecord
|
|
88
|
+
} from "./chunk-LINZPU5D.js";
|
|
82
89
|
import {
|
|
83
90
|
authoredStrings,
|
|
84
91
|
chartStrings,
|
|
85
92
|
currentSmallValues,
|
|
86
93
|
localeStrings,
|
|
87
94
|
notApplicableGlyph
|
|
88
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-MSYTF3DZ.js";
|
|
89
96
|
import {
|
|
90
97
|
cellMeta,
|
|
91
98
|
cellValue
|
|
@@ -107,7 +114,7 @@ import {
|
|
|
107
114
|
themeForWidth,
|
|
108
115
|
themeRegistrations,
|
|
109
116
|
typeWidthClass
|
|
110
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-JARJP576.js";
|
|
111
118
|
import {
|
|
112
119
|
requireChartCores
|
|
113
120
|
} from "./chunk-DRHQG44U.js";
|
|
@@ -119,12 +126,13 @@ import {
|
|
|
119
126
|
NormalizeError,
|
|
120
127
|
TARGET_SIZE,
|
|
121
128
|
accessibleTitle,
|
|
129
|
+
floorTextScale,
|
|
122
130
|
normalizeCategory,
|
|
123
131
|
normalizeSeriesValues,
|
|
124
132
|
resolveCanvasOptions,
|
|
125
133
|
resolveHighlight,
|
|
126
134
|
resolveSize
|
|
127
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-FX5VZK5F.js";
|
|
128
136
|
import {
|
|
129
137
|
maxOf,
|
|
130
138
|
minOf,
|
|
@@ -133,7 +141,7 @@ import {
|
|
|
133
141
|
import {
|
|
134
142
|
defaultMeasurer,
|
|
135
143
|
wrapText
|
|
136
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-UIHGGWES.js";
|
|
137
145
|
|
|
138
146
|
// src/core/grid/gridKey.ts
|
|
139
147
|
var GRID_KEY_ONLY = /* @__PURE__ */ Symbol("gridKeyOnly");
|
|
@@ -318,8 +326,16 @@ var EN = {
|
|
|
318
326
|
legendName: "Legend",
|
|
319
327
|
legendItemsCount: "{v1} legend items.",
|
|
320
328
|
stackChangeMethod: "Change: average per {v1}, {v2} \u2192 {v3}; rates use volume weighting",
|
|
329
|
+
stackAverageMethod: "Average per {v1}, {v2} \u2192 {v3}; rates use volume weighting",
|
|
321
330
|
stackLeftMethod: "Left: volume-weighted mature rates and remaining per 100",
|
|
331
|
+
stackRightMethod: "Right: volume-weighted mature rates and remaining per 100",
|
|
322
332
|
stackAboveMethod: "Above each panel: volume-weighted mature rates and remaining per 100",
|
|
333
|
+
stackLeftRates: "Left: volume-weighted mature rates",
|
|
334
|
+
stackRightRates: "Right: volume-weighted mature rates",
|
|
335
|
+
stackAboveRates: "Above each panel: volume-weighted mature rates",
|
|
336
|
+
stackLeftRemaining: "Left: remaining per 100",
|
|
337
|
+
stackRightRemaining: "Right: remaining per 100",
|
|
338
|
+
stackAboveRemaining: "Above each panel: remaining per 100",
|
|
323
339
|
notYetMature: "Not yet mature",
|
|
324
340
|
labelsShowTotals: "Labels show totals"
|
|
325
341
|
}, DE = {
|
|
@@ -341,14 +357,22 @@ var EN = {
|
|
|
341
357
|
legendName: "Legende",
|
|
342
358
|
legendItemsCount: "{v1} {v1|Legendeneintrag|Legendeneintr\xE4ge}.",
|
|
343
359
|
stackChangeMethod: "\xC4nderung: Mittelwert je {v1}, {v2} \u2192 {v3}; Raten sind nach Volumen gewichtet",
|
|
360
|
+
stackAverageMethod: "Mittelwert je {v1}, {v2} \u2192 {v3}; Raten sind nach Volumen gewichtet",
|
|
344
361
|
stackLeftMethod: "Links: nach Volumen gewichtete ausgereifte Raten und Rest je 100",
|
|
362
|
+
stackRightMethod: "Rechts: nach Volumen gewichtete ausgereifte Raten und Rest je 100",
|
|
345
363
|
stackAboveMethod: "\xDCber jedem Feld: nach Volumen gewichtete ausgereifte Raten und Rest je 100",
|
|
364
|
+
stackLeftRates: "Links: nach Volumen gewichtete ausgereifte Raten",
|
|
365
|
+
stackRightRates: "Rechts: nach Volumen gewichtete ausgereifte Raten",
|
|
366
|
+
stackAboveRates: "\xDCber jedem Feld: nach Volumen gewichtete ausgereifte Raten",
|
|
367
|
+
stackLeftRemaining: "Links: Rest je 100",
|
|
368
|
+
stackRightRemaining: "Rechts: Rest je 100",
|
|
369
|
+
stackAboveRemaining: "\xDCber jedem Feld: Rest je 100",
|
|
346
370
|
notYetMature: "Noch nicht ausgereift",
|
|
347
371
|
labelsShowTotals: "Beschriftungen zeigen Summen"
|
|
348
372
|
}, { chartString } = chartStrings(EN, DE);
|
|
349
373
|
|
|
350
374
|
// src/core/charts/grid/metricStackLayout.ts
|
|
351
|
-
var neutral = { token: "markInk" }, muted = { token: "inkMuted" }, accent = { token: "focus" }, wash = (base, weight, pageFloor) => ({ token: "markInk", theme: { kind: "mix", from: base, to: { token: "background" }, weight, ...pageFloor === void 0 ? {} : { pageFloor } } }), NO_WIDER_SEARCH = /* @__PURE__ */ Symbol("boardplot.metricStackNoWiderSearch"), COMPACT_READOUT = /* @__PURE__ */ Symbol("boardplot.metricStackCompactReadout");
|
|
375
|
+
var neutral = { token: "markInk" }, muted = { token: "inkMuted" }, accent = { token: "focus" }, wash = (base, weight, pageFloor) => ({ token: "markInk", theme: { kind: "mix", from: base, to: { token: "background" }, weight, ...pageFloor === void 0 ? {} : { pageFloor } } }), NO_WIDER_SEARCH = /* @__PURE__ */ Symbol("boardplot.metricStackNoWiderSearch"), COMPACT_READOUT = /* @__PURE__ */ Symbol("boardplot.metricStackCompactReadout"), GUTTER_LIMIT = /* @__PURE__ */ Symbol("boardplot.metricStackGutterLimit");
|
|
352
376
|
function widerThatPlaces(raw, options, size, automatic) {
|
|
353
377
|
let draws = (width) => {
|
|
354
378
|
try {
|
|
@@ -373,10 +397,52 @@ function widerThatPlaces(raw, options, size, automatic) {
|
|
|
373
397
|
return high;
|
|
374
398
|
}
|
|
375
399
|
}
|
|
400
|
+
function printedReadout(readout, showHeadline, showSpan) {
|
|
401
|
+
if (showHeadline && showSpan) return readout;
|
|
402
|
+
let byId = new Map(readout.claims.map((claim) => [claim.id, claim])), kept = /* @__PURE__ */ new Set(), keep = (id) => {
|
|
403
|
+
let claim = byId.get(id);
|
|
404
|
+
!claim || kept.has(id) || (kept.add(id), claim.inputs.forEach((input) => keep(input.ref)));
|
|
405
|
+
}, panel = `stack:${readout.panelId}`;
|
|
406
|
+
return showHeadline && (keep(`${panel}:headline`), keep(`${panel}:rate`)), showSpan && (keep(`${panel}:before`), keep(`${panel}:after`)), {
|
|
407
|
+
...readout,
|
|
408
|
+
claims: readout.claims.filter((claim) => kept.has(claim.id)),
|
|
409
|
+
...showHeadline ? {} : { headline: null, headlineText: "" },
|
|
410
|
+
...showSpan ? {} : { before: null, after: null, spanText: "" }
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
function stackColumnWarnings(stack, narrow, floored, capped) {
|
|
414
|
+
let inStack = (key, authored, drawn) => generatedIdWarnings("grid", key, authored, drawn).map((warning) => ({ ...warning, field: ["options", "stack", ...(warning.field ?? []).slice(1)] })), warnings = [
|
|
415
|
+
...inStack("columnVisibility", stack.columnVisibility, ["name", "unit", "headline", "span"]),
|
|
416
|
+
...inStack("columnOverrides", stack.columnOverrides, ["gutter"]),
|
|
417
|
+
...inStack("columnOrder", stack.columnOrder, ["gutter", "plot"])
|
|
418
|
+
], ignored = (key, what) => ({
|
|
419
|
+
code: "option-ignored",
|
|
420
|
+
severity: "warn",
|
|
421
|
+
field: ["options", "stack", key],
|
|
422
|
+
message: `this canvas seats each readout above its panel, with no gutter track, so ${what} does nothing here`,
|
|
423
|
+
suggest: "Widen the chart to draw the gutter."
|
|
424
|
+
});
|
|
425
|
+
return narrow && stack.columnOverrides?.gutter && warnings.push(ignored("columnOverrides", "the gutter override")), narrow && stack.columnOrder?.length && warnings.push(ignored("columnOrder", "columnOrder")), floored && warnings.push({
|
|
426
|
+
code: "generated-column-width-floored",
|
|
427
|
+
severity: "warn",
|
|
428
|
+
field: ["options", "stack", "columnOverrides", "gutter", "width"],
|
|
429
|
+
message: "the gutter width is under what its readouts need, so the gutter stays as wide as they need",
|
|
430
|
+
suggest: "Raise the width, or shorten the panel titles."
|
|
431
|
+
}), capped && warnings.push({
|
|
432
|
+
code: "generated-column-width-capped",
|
|
433
|
+
severity: "warn",
|
|
434
|
+
field: ["options", "stack", "columnOverrides", "gutter", "width"],
|
|
435
|
+
message: "the gutter width leaves too little room for the values on this canvas, so it gave way",
|
|
436
|
+
suggest: "Lower the width, or widen the chart."
|
|
437
|
+
}), warnings;
|
|
438
|
+
}
|
|
376
439
|
function layoutMetricStack(raw, options) {
|
|
377
440
|
let data = normalizeMetricStack(raw);
|
|
378
441
|
options.stack || stackError("options.stack", "Shared measures require options.stack: {}"), (options.sharedAxis === "none" || options.sharedScale === !0 || options.columns !== void 0 || options.gutters !== void 0 || options.anchors !== void 0 || options.alignmentRules !== void 0 || options.panelOrder !== void 0) && stackError("options", "A metric stack owns top-down order, shared categories, spacing and independent scales; remove conflicting grid controls");
|
|
379
|
-
let stack = options.stack
|
|
442
|
+
let stack = options.stack, showUnit = stack.columnVisibility?.unit !== !1, showHeadline = stack.columnVisibility?.headline !== !1, showSpan = stack.columnVisibility?.span !== !1, gutterAfter = (() => {
|
|
443
|
+
let order = stack.columnOrder ?? [], plotAt = order.indexOf("plot"), gutterAt2 = order.indexOf("gutter");
|
|
444
|
+
return plotAt >= 0 && (gutterAt2 < 0 || plotAt < gutterAt2);
|
|
445
|
+
})();
|
|
380
446
|
stack.heights && options.rows && stackError("options", "Use stack.heights or rows, not both"), (stack.heights && stack.heights.length !== data.panels.length || options.rows && options.rows.length !== data.panels.length) && stackError("options", "Supply one height or row weight per panel");
|
|
381
447
|
let theme = themeForWidth(resolveTheme(options.theme), resolveSize(options.size).width), measure = options.measure ?? defaultMeasurer, na = notApplicableGlyph(options.strings), computed = computeMetricStack(data, options.locale?.language, na), font = (role, weight) => ({ family: theme.type.family, ...theme.type[role], ...weight ? { weight } : {} }), valueFont = font("label", 700), nameFont = font("label", 700), unitFont = font("axis"), heroFont = font("title", 700), axisFont = font("axis"), noteFont = font("footnote"), keyFont = secondaryFont(theme), heightOf = (f) => f.size * (f.lineHeight ?? 1.2), textBox = (text, f, width) => {
|
|
382
448
|
let lines = wrapText(text, f, width, Number.MAX_SAFE_INTEGER, measure).lines;
|
|
@@ -384,11 +450,11 @@ function layoutMetricStack(raw, options) {
|
|
|
384
450
|
}, spacingError = (field, message, fix) => {
|
|
385
451
|
throw new NormalizeError("metric-stack-spacing", field, message, "Increase the named dimension; the engine does not shrink or overlap required labels.", fix);
|
|
386
452
|
}, heightFix = (i, px) => stack.heights ? [{ op: "replace", path: `/options/stack/heights/${i}`, value: px }] : void 0, minGap = Math.ceil(heightOf(axisFont) + 8), compactReadout = options[COMPACT_READOUT] === !0, gap = compactReadout && !computed.maturing.length ? 10 : Math.max(26, minGap), arrowWidth = Math.max(unitFont.size, measure("\u2192", unitFont).width), spanSpace = measure(" ", unitFont).width, spanWidths = computed.panels.map((p) => measure(p.readout.spanText, unitFont).width + arrowWidth - measure("\u2192", unitFont).width), minGutter = Math.ceil(Math.max(120, maxOf(computed.panels.map((p, i) => Math.max(
|
|
387
|
-
spanWidths[i],
|
|
388
|
-
measure(p.readout.headlineText, heroFont).width,
|
|
389
|
-
|
|
453
|
+
showSpan ? spanWidths[i] : 0,
|
|
454
|
+
showHeadline ? measure(p.readout.headlineText, heroFont).width : 0,
|
|
455
|
+
...(showUnit ? `${p.panel.title} ${p.panel.unit}` : p.panel.title).split(/\s+/).map((word) => measure(word, nameFont).width)
|
|
390
456
|
)))) + 4), nameWidth = Math.ceil(maxOf(computed.panels.flatMap((p) => p.panel.title.split(`
|
|
391
|
-
`).map((line) => measure(line, nameFont).width)))) + 4, heroBlock = Math.max(heroFont.size, heightOf(heroFont) / 2 + heightOf(unitFont) / 2 + 0.36 * (heroFont.size - unitFont.size)), oneLine = (p, i) => measure(p.readout.headlineText, heroFont).width + 3 * spanSpace + spanWidths[i]
|
|
457
|
+
`).map((line) => measure(line, nameFont).width)))) + 4, heroBlock = showHeadline ? showSpan ? Math.max(heroFont.size, heightOf(heroFont) / 2 + heightOf(unitFont) / 2 + 0.36 * (heroFont.size - unitFont.size)) : heroFont.size : showSpan ? heightOf(unitFont) : 0, oneLine = (p, i) => showHeadline ? showSpan ? measure(p.readout.headlineText, heroFont).width + 3 * spanSpace + spanWidths[i] : measure(p.readout.headlineText, heroFont).width : showSpan ? spanWidths[i] : 0, compactFloor = compactReadout ? Math.ceil(maxOf(computed.panels.map(oneLine)) + 4) : 0, defaultGutter = Math.max(170, minGutter, Math.min(320, nameWidth), compactFloor), gutterGap = Math.max(28, heightOf(axisFont)), partial = partialIds(data.categories), notes = [...options.footnotes || []], listed = [], stateNotes = {}, engineNumbers = [], notesOff = frameTextOptions(options).footnotesOff, stateNote = (state, authored, engine) => {
|
|
392
458
|
if (authored === void 0 && (!disclosuresShown(options) || notesOff)) {
|
|
393
459
|
listed.push(disclosureNote(engine()));
|
|
394
460
|
return;
|
|
@@ -459,10 +525,20 @@ function layoutMetricStack(raw, options) {
|
|
|
459
525
|
return { occupied: occupied2, frame: frame2 };
|
|
460
526
|
};
|
|
461
527
|
automatic && (size = { ...size, height: Math.max(size.height, 1600) });
|
|
462
|
-
let { occupied, frame } = frameAt(), valueWidth = maxOf(computed.panels.flatMap((p) => p.values.map((v) => v === null ? measure(na, valueFont).width : measure(formatPanelValue(p.panel, v, options.locale?.language), valueFont).width))) + 4, categoryWidth = maxOf(data.categories.flatMap((c) => c.label.split(/\s+/).map((word) => measure(word, keyFont).width))) + 3, valueRoom = Math.max(20, valueWidth, categoryWidth) * data.categories.length,
|
|
463
|
-
let
|
|
464
|
-
|
|
465
|
-
|
|
528
|
+
let { occupied, frame } = frameAt(), valueWidth = maxOf(computed.panels.flatMap((p) => p.values.map((v) => v === null ? measure(na, valueFont).width : measure(formatPanelValue(p.panel, v, options.locale?.language), valueFont).width))) + 4, categoryWidth = maxOf(data.categories.flatMap((c) => c.label.split(/\s+/).map((word) => measure(word, keyFont).width))) + 3, valueRoom = Math.max(20, valueWidth, categoryWidth) * data.categories.length, NO_BOX = { lines: [], w: 0, h: 0 }, unitBox = (p, width) => showUnit ? textBox(p.panel.unit, keyFont, width) : NO_BOX, gutterAt = (width) => {
|
|
529
|
+
let boxes = computed.panels.map((p) => {
|
|
530
|
+
let name = textBox(p.panel.title, nameFont, width), unit = unitBox(p, width), beside = showUnit && compactReadout && name.lines.length === 1 && unit.lines.length === 1 && name.w + 2 * spanSpace + unit.w <= width;
|
|
531
|
+
return { name, unit, beside, top: beside ? Math.max(name.h, unit.h) : showUnit ? name.h + 2 + unit.h : name.h };
|
|
532
|
+
}), keys = computed.panels.map((_, i) => keyLayout(i, width, !compactReadout)), heights2 = boxes.map((box, i) => {
|
|
533
|
+
if (compactReadout) return box.top + 4 + heroBlock + keys[i].h - (heroBlock ? 0 : 4);
|
|
534
|
+
let keyed = keys[i].h ? keys[i].h + 6 : 0;
|
|
535
|
+
return showUnit && showHeadline && showSpan ? box.name.h + box.unit.h + heightOf(heroFont) + heightOf(unitFont) + 18 + keyed : box.top + (showHeadline ? 10 + heightOf(heroFont) : 0) + (showSpan ? (showHeadline ? 6 : 10) + heightOf(unitFont) : 0) + keyed;
|
|
536
|
+
});
|
|
537
|
+
return { boxes, keys, heights: heights2 };
|
|
538
|
+
}, atDefault = gutterAt(defaultGutter), narrow = frame.plot.w - defaultGutter - gutterGap < valueRoom || atDefault.heights.some((h, i) => stack.heights !== void 0 && Math.ceil(h) > stack.heights[i]), authoredGutter = narrow ? void 0 : stack.columnOverrides?.gutter?.width, widest = frame.plot.w - gutterGap - valueRoom, heldHeight = !automatic || stack.heights !== void 0 || options.rows !== void 0, fitGutter = (width) => {
|
|
539
|
+
let at = gutterAt(width);
|
|
540
|
+
return !heldHeight || at.heights.every((h, i) => h <= atDefault.heights[i]) ? at : void 0;
|
|
541
|
+
}, wanted = authoredGutter === void 0 ? defaultGutter : Math.min(Math.max(authoredGutter, minGutter, compactFloor), widest, options[GUTTER_LIMIT] ?? 1 / 0), fitted = wanted === defaultGutter ? atDefault : fitGutter(wanted), gutter = fitted ? wanted : defaultGutter, { boxes: gutterBoxes, keys: gutterKeys, heights: gutterHeights } = fitted ?? atDefault, gutterFloored = authoredGutter !== void 0 && gutter > authoredGutter, gutterCapped = authoredGutter !== void 0 && gutter < authoredGutter, thin = narrow && frame.plot.w < valueRoom, lastIndex = data.categories.length - 1, named = (ci) => !thin || ci % 2 === lastIndex % 2, onRight = gutterAfter && !narrow, plotX = narrow || onRight ? frame.plot.x : frame.plot.x + gutter + gutterGap, plotW = narrow ? frame.plot.w : frame.plot.w - gutter - gutterGap, trackX = onRight ? frame.plot.x + plotW + gutterGap : frame.plot.x, trackW = narrow ? frame.plot.w : gutter, trackAlign = narrow ? void 0 : stack.columnOverrides?.gutter?.align, seat = (w) => trackAlign === "right" ? trackX + trackW - w : trackAlign === "center" ? trackX + (trackW - w) / 2 : trackX, step = plotW / data.categories.length, minimumWidth = Math.ceil(size.width - plotW + (thin ? valueRoom / 2 : valueRoom)), needsWidth = (width) => ({
|
|
466
542
|
type: "grid",
|
|
467
543
|
size,
|
|
468
544
|
plot: frame.plot,
|
|
@@ -480,7 +556,7 @@ function layoutMetricStack(raw, options) {
|
|
|
480
556
|
});
|
|
481
557
|
if (size.width < minimumWidth) return needsWidth(minimumWidth);
|
|
482
558
|
let heads = narrow ? computed.panels.map((p, i) => {
|
|
483
|
-
let name = textBox(p.panel.title, nameFont, frame.plot.w), unit =
|
|
559
|
+
let name = textBox(p.panel.title, nameFont, frame.plot.w), unit = unitBox(p, frame.plot.w), unitBeside = showUnit && name.lines.length === 1 && unit.lines.length === 1 && name.w + 2 * spanSpace + unit.w <= frame.plot.w, hero = measure(p.readout.headlineText, heroFont).width, spanBeside = showHeadline && showSpan && hero + 3 * spanSpace + spanWidths[i] + 2 * spanSpace <= frame.plot.w, top = unitBeside ? Math.max(name.h, unit.h) : showUnit ? name.h + 2 + unit.h : name.h, block = showHeadline ? showSpan ? heightOf(heroFont) + (spanBeside ? 0 : 6 + heightOf(unitFont)) : heightOf(heroFont) : showSpan ? heightOf(unitFont) : 0, key = keyLayout(i, frame.plot.w, !1), body = block ? showHeadline && showSpan ? top + 8 + heightOf(heroFont) + (spanBeside ? 0 : 6 + heightOf(unitFont)) + 6 : top + 8 + block + 6 : top + 6;
|
|
484
560
|
return { name, unit, unitBeside, spanBeside, top, key, body, h: body + (key.h ? key.h + 4 : 0) };
|
|
485
561
|
}) : void 0, minimumHeights = gutterHeights.map((h) => Math.ceil(Math.max(narrow ? 0 : h, 3 * heightOf(valueFont) + 20))), heights = computed.panels.map((p, i) => stack.heights?.[i] ?? Math.max(minimumHeights[i], p.panel.type === "column" ? p.parts.length > 1 ? narrow ? 110 : 150 : narrow ? 120 : 200 : narrow ? 90 : 130));
|
|
486
562
|
if (options.rows) {
|
|
@@ -493,7 +569,7 @@ function layoutMetricStack(raw, options) {
|
|
|
493
569
|
let headRoom = heads?.reduce((sum2, head) => sum2 + head.h, 0) ?? 0, partialOnValues = computed.panels.some((p) => p.panel.type === "column" && computed.partial.some((i) => p.values[i] !== null)), partialMark = marker(stateNotes.partial), toDate = ` ${options.strings?.toDate ?? localeStrings(options.locale?.language).toDate}`, categoryName = (c) => c.label + (c.partial ? partialMark ? partialOnValues ? "" : partialMark : saysToDate(c.label, toDate.trim()) ? "" : toDate : ""), categoryBoxes = data.categories.map((c) => textBox(categoryName(c), keyFont, (thin ? 2 : 1) * step - 3)), categoryHeight = maxOf(categoryBoxes.map((b) => b.h)), periodBoxes = data.periods?.map((period) => {
|
|
494
570
|
let indexes = stackRange(data, period), bold = data.windows ? [data.windows.base, data.windows.compare].some((w) => w.from === period.from && w.to === period.to) : indexes.every((i) => computed.mature.includes(i)), f = { ...keyFont, weight: bold ? 700 : keyFont.weight };
|
|
495
571
|
return { ...textBox(period.label, f, indexes.length * step - 4), indexes, bold, font: f };
|
|
496
|
-
}), axisHeight = (compactReadout ? 8 : 12) + categoryHeight + (periodBoxes ? 10 + maxOf(periodBoxes.map((b) => b.h)) : 0) + (compactReadout ? 4 : 10), bandFirstIndex = data.states?.maturing ? data.panels.findIndex((p) => data.states.maturing.panels.includes(p.id)) : -1, firstOverhang = computed.maturing.length ? gap : 0, readLogic = data.panels.some((p) => p.readout === "change") && data.windows ? chartString(options, "stackChangeMethod", { v1: metricStackGrain(data), v2: data.windows.base.label, v3: data.windows.compare.label }) : chartString(options, narrow ? "
|
|
572
|
+
}), axisHeight = (compactReadout ? 8 : 12) + categoryHeight + (periodBoxes ? 10 + maxOf(periodBoxes.map((b) => b.h)) : 0) + (compactReadout ? 4 : 10), bandFirstIndex = data.states?.maturing ? data.panels.findIndex((p) => data.states.maturing.panels.includes(p.id)) : -1, firstOverhang = computed.maturing.length ? gap : 0, hasMethod = showHeadline || showSpan, readLogic = data.panels.some((p) => p.readout === "change") && data.windows ? chartString(options, showHeadline ? "stackChangeMethod" : "stackAverageMethod", { v1: metricStackGrain(data), v2: data.windows.base.label, v3: data.windows.compare.label }) : chartString(options, `stack${narrow ? "Above" : onRight ? "Right" : "Left"}${showSpan ? showHeadline ? "Method" : "Remaining" : "Rates"}`), readLogicBox = hasMethod ? textBox(readLogic, keyFont, frame.plot.w) : NO_BOX, topRoom = (hasMethod ? readLogicBox.h + 12 + (compactReadout ? 4 : 30) : 0) + (bandFirstIndex === 0 ? firstOverhang : 0), neededPlotHeight = topRoom + headRoom + heights.reduce((a, b) => a + b, 0) + gap * (heights.length - 1) + axisHeight, overhead = size.height - frame.plot.h, naturalHeight = Math.ceil(overhead + neededPlotHeight), shrinks = !stack.heights && !options.rows, floorPlotHeight = neededPlotHeight - heights.reduce((a, b) => a + b, 0) + minimumHeights.reduce((a, b) => a + b, 0), floorHeight = shrinks ? Math.ceil(overhead + floorPlotHeight) : naturalHeight, minHeight = naturalHeight;
|
|
497
573
|
if (automatic)
|
|
498
574
|
size = { ...size, height: naturalHeight }, { occupied, frame } = frameAt();
|
|
499
575
|
else if (frame.plot.h < neededPlotHeight - 0.01)
|
|
@@ -538,12 +614,12 @@ function layoutMetricStack(raw, options) {
|
|
|
538
614
|
let box = measure(text, f);
|
|
539
615
|
put(id, text, f, { x: x - box.width / 2, y: y2, w: box.width, h: heightOf(f) }, owner, ink, role, kind, [text], claimId, below);
|
|
540
616
|
};
|
|
541
|
-
put("stack:read-logic", readLogic, keyFont, { x: frame.plot.x, y: frame.plot.y, w: readLogicBox.w, h: readLogicBox.h }, {}, muted, "secondary", "annotation", readLogicBox.lines), scene.push({ t: "line", id: "stack:header-rule", x1: frame.plot.x, x2: frame.plot.x + frame.plot.w, y1: frame.plot.y + readLogicBox.h + 10, y2: frame.plot.y + readLogicBox.h + 10, stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "headerRule" });
|
|
617
|
+
put("stack:read-logic", readLogic, keyFont, { x: frame.plot.x, y: frame.plot.y, w: readLogicBox.w, h: readLogicBox.h }, {}, muted, "secondary", "annotation", readLogicBox.lines), hasMethod && scene.push({ t: "line", id: "stack:header-rule", x1: frame.plot.x, x2: frame.plot.x + frame.plot.w, y1: frame.plot.y + readLogicBox.h + 10, y2: frame.plot.y + readLogicBox.h + 10, stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "headerRule" });
|
|
542
618
|
let plots = [], tops = [], y = frame.plot.y + topRoom;
|
|
543
619
|
heights.forEach((h, i) => {
|
|
544
620
|
tops.push(y), y += heads?.[i].h ?? 0, plots.push({ x: plotX, y, w: plotW, h }), y += h + gap;
|
|
545
621
|
});
|
|
546
|
-
let derived = { gap, gutterWidth: narrow ? 0 : gutter, axisOwner: data.panels.at(-1).id, readouts: computed.panels.map((p) => p.readout), panels: [] }, bandLabelHeight = 0;
|
|
622
|
+
let derived = { gap, gutterWidth: narrow ? 0 : gutter, axisOwner: data.panels.at(-1).id, readouts: computed.panels.map((p) => printedReadout(p.readout, showHeadline, showSpan)), panels: [] }, bandLabelHeight = 0;
|
|
547
623
|
if (computed.maturing.length) {
|
|
548
624
|
let scope = data.states.maturing, indexes = scope.panels.map((id) => data.panels.findIndex((p) => p.id === id)).sort((a, b) => a - b), first = plots[indexes[0]], last = plots[indexes.at(-1)], firstTop = tops[indexes[0]], bandAt = categoryBandFromCenters(data.categories.map((c) => c.id), first, (i) => plotX + (i + 0.5) * step, "x"), left = bandAt(scope.from), right = bandAt(scope.to), rect = { x: left.x, y: firstTop - firstOverhang, w: right.x + right.w - left.x, h: last.y + last.h - firstTop + firstOverhang }, nodeId = "stack:maturing:band";
|
|
549
625
|
derived.band = { rect, panels: indexes.map((i) => data.panels[i].id), categoryIds: computed.maturing.map((i) => data.categories[i].id), nodeId }, scene.push({ t: "rect", id: nodeId, rect, fill: wash(neutral, 0.035), owner: { annotationId: "stack:maturing" }, part: "band" });
|
|
@@ -558,15 +634,16 @@ function layoutMetricStack(raw, options) {
|
|
|
558
634
|
scene.push(node), ci !== void 0 && nodeIds[ci].push(node.id);
|
|
559
635
|
};
|
|
560
636
|
marks.panels.push({ id: p.panel.id, type: p.panel.type, plot, content: { x: frame.plot.x, y: plot.y, w: frame.plot.w, h: plot.h }, title: p.panel.title, row: pi, column: 0 }), derived.panels.push({ id: p.panel.id, domain: [0, domainMax], plot, values: p.values, states: p.states, displayed, nodeIds });
|
|
561
|
-
let boxes = heads?.[pi] ?? gutterBoxes[pi], head = heads?.[pi], gy = tops[pi]
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
put(`${p.panel.id}:
|
|
567
|
-
let
|
|
568
|
-
|
|
569
|
-
|
|
637
|
+
let boxes = heads?.[pi] ?? gutterBoxes[pi], head = heads?.[pi], gy = tops[pi], lineAlign = trackAlign === "right" ? "end" : trackAlign === "center" ? "middle" : void 0, putLines = (...args) => {
|
|
638
|
+
put(...args);
|
|
639
|
+
let last = requests.at(-1);
|
|
640
|
+
lineAlign && last?.id === args[0] && (last.align = lineAlign);
|
|
641
|
+
}, unitBeside = head ? head.unitBeside : gutterBoxes[pi].beside, nameX = seat(unitBeside ? boxes.name.w + 2 * spanSpace + boxes.unit.w : boxes.name.w);
|
|
642
|
+
putLines(`${p.panel.id}:name`, p.panel.title, nameFont, { x: nameX, y: gy, w: boxes.name.w, h: boxes.name.h }, owner, { token: "ink" }, "label", "category", boxes.name.lines), unitBeside ? put(`${p.panel.id}:unit`, p.panel.unit, keyFont, { x: nameX + boxes.name.w + 2 * spanSpace, y: gy + boxes.name.h - boxes.unit.h, w: boxes.unit.w, h: boxes.unit.h }, owner, muted, "secondary", "category", boxes.unit.lines) : showUnit ? (gy += boxes.name.h + 2, putLines(`${p.panel.id}:unit`, p.panel.unit, keyFont, { x: seat(boxes.unit.w), y: gy, w: boxes.unit.w, h: boxes.unit.h }, owner, muted, "secondary", "category", boxes.unit.lines)) : gy += boxes.name.h, gy = head ? tops[pi] + head.top + 8 : unitBeside ? tops[pi] + gutterBoxes[pi].top + 4 : gy + boxes.unit.h + (compactReadout ? 4 : 10);
|
|
643
|
+
let hero = measure(p.readout.headlineText, heroFont), headlineClaim = p.readout.claims.find((c) => c.id === `stack:${p.panel.id}:headline` || c.id === `stack:${p.panel.id}:rate`), sideBySide = showHeadline && showSpan && (head?.spanBeside || !head && compactReadout), heroX = seat(sideBySide ? hero.width + 3 * spanSpace + spanWidths[pi] : hero.width);
|
|
644
|
+
showHeadline && put(`${p.panel.id}:headline`, p.readout.headlineText, heroFont, { x: heroX, y: gy, w: hero.width, h: compactReadout ? heroFont.size : heightOf(heroFont) }, owner, color, "title", "point", [p.readout.headlineText], headlineClaim.id);
|
|
645
|
+
let before = p.readout.claims.find((c) => c.id === `stack:${p.panel.id}:before`), after = p.readout.claims.find((c) => c.id === `stack:${p.panel.id}:after`), gx = sideBySide ? heroX : seat(spanWidths[pi]), heroTop = gy;
|
|
646
|
+
if (sideBySide ? (gx += hero.width + 3 * spanSpace, gy += heightOf(heroFont) / 2 - heightOf(unitFont) / 2 + 0.36 * (heroFont.size - unitFont.size)) : showHeadline && (gy += heightOf(heroFont) + 6), showSpan) for (let [suffix, text, claim] of [["before", before.output.displayed, before.id], ["arrow", "\u2192", void 0], ["after", after.output.displayed, after.id]]) {
|
|
570
647
|
suffix === "arrow" && (gx += spanSpace);
|
|
571
648
|
let width = suffix === "arrow" ? arrowWidth : measure(text, unitFont).width;
|
|
572
649
|
put(`${p.panel.id}:${suffix}`, text, unitFont, { x: gx, y: gy, w: width, h: heightOf(unitFont) }, owner, muted, "axis", "point", [text], claim), gx += width + (suffix === "arrow" ? spanSpace : 0);
|
|
@@ -574,10 +651,10 @@ function layoutMetricStack(raw, options) {
|
|
|
574
651
|
let barWidth = step * 0.64, segmentLabels = stacked(p) && !thin && data.categories.every((_, ci) => {
|
|
575
652
|
let part = p.parts[0][ci];
|
|
576
653
|
return !visible(ci) || !part || part / domainMax * plot.h >= heightOf(valueFont) + 10 && measure(formatValue(part), valueFont).width < barWidth - 6;
|
|
577
|
-
}), key = head ? head.key : gutterKeys[pi], keyTop = head ? tops[pi] + head.body : compactReadout ? heroTop + heroBlock : gy + heightOf(unitFont) + 6;
|
|
654
|
+
}), key = head ? head.key : gutterKeys[pi], keyTop = head ? tops[pi] + head.body : compactReadout ? heroTop + heroBlock : gy + (showSpan ? heightOf(unitFont) + 6 : 0);
|
|
578
655
|
for (let item of key.placed) {
|
|
579
656
|
if (item.id === "stack:totals" && segmentLabels) continue;
|
|
580
|
-
let
|
|
657
|
+
let rowW = maxOf(key.placed.filter((other) => other.dy === item.dy && !(other.id === "stack:totals" && segmentLabels)).map((other) => other.dx + other.w)), kx = seat(rowW) + item.dx, ky = keyTop + item.dy;
|
|
581
658
|
item.paint && scene.push({ t: "rect", id: `${p.panel.id}:key:${item.id}`, rect: { x: kx, y: ky + (keyRow - keySwatch) / 2, w: keySwatch, h: keySwatch }, fill: item.paint, owner: { seriesId: item.id }, part: "swatch" });
|
|
582
659
|
let tx = item.paint ? kx + keySwatch + 5 : kx;
|
|
583
660
|
put(`${p.panel.id}:key:${item.id}:label`, item.label, keyFont, { x: tx, y: ky + (keyRow - heightOf(keyFont)) / 2, w: item.textW, h: heightOf(keyFont) * item.lines.length }, { seriesId: item.id }, muted, "secondary", "category", item.lines);
|
|
@@ -645,6 +722,21 @@ function layoutMetricStack(raw, options) {
|
|
|
645
722
|
label.ink = inks.get(label.id) ?? label.ink, label.font = fonts.get(label.id);
|
|
646
723
|
let hidden = solved.placed.filter((l) => l.hidden && !yielding.has(l.id));
|
|
647
724
|
if (hidden.length) {
|
|
725
|
+
if (gutter > defaultGutter && !options[NO_WIDER_SEARCH]) {
|
|
726
|
+
let places = (width2) => {
|
|
727
|
+
try {
|
|
728
|
+
return layoutMetricStack(raw, { ...options, [GUTTER_LIMIT]: width2, [NO_WIDER_SEARCH]: !0 }).scene.length > 0;
|
|
729
|
+
} catch (error) {
|
|
730
|
+
if (error instanceof NormalizeError) return !1;
|
|
731
|
+
throw error;
|
|
732
|
+
}
|
|
733
|
+
}, low = defaultGutter, high = gutter;
|
|
734
|
+
for (; high - low > 1; ) {
|
|
735
|
+
let mid = Math.floor((low + high) / 2);
|
|
736
|
+
places(mid) ? low = mid : high = mid;
|
|
737
|
+
}
|
|
738
|
+
return layoutMetricStack(raw, { ...options, [GUTTER_LIMIT]: low });
|
|
739
|
+
}
|
|
648
740
|
let width = options[NO_WIDER_SEARCH] ? void 0 : widerThatPlaces(raw, options, size, automatic);
|
|
649
741
|
if (width !== void 0) return needsWidth(width);
|
|
650
742
|
spacingError("options.size", `Metric stack cannot place ${hidden.map((l) => `'${l.text}'`).join(", ")} at ${size.width} \xD7 ${size.height} px`);
|
|
@@ -664,8 +756,8 @@ function layoutMetricStack(raw, options) {
|
|
|
664
756
|
marks,
|
|
665
757
|
derived: { metricStack: derived, sharedPlotX: plotX, sharedPlotW: plotW, tierGap: gap },
|
|
666
758
|
sizing: { aspect: "content", fit: "content", minWidth: size.width, minHeight, measuredMinWidth: size.width, measuredMinHeight: minHeight, naturalWidth: size.width, naturalHeight, comfortableWidth: size.width, comfortableHeight: naturalHeight },
|
|
667
|
-
a11y: { title: accessibleTitle(options.title, chartString(options, "metricStackTitle", { v1: data.panels.length })), counts, desc: chartString(options, "metricStackDesc", { v1: counts.map((c) => c.text).join(", "), v2: data.panels.map((p) => p.title).join("; "), v3: computed.panels.map((p) => `${p.panel.title}: ${p.readout.headlineText
|
|
668
|
-
warnings: solved.warnings,
|
|
759
|
+
a11y: { title: accessibleTitle(options.title, chartString(options, "metricStackTitle", { v1: data.panels.length })), counts, desc: chartString(options, "metricStackDesc", { v1: counts.map((c) => c.text).join(", "), v2: data.panels.map((p) => p.title).join("; "), v3: hasMethod ? computed.panels.map((p) => `${p.panel.title}: ${[...showHeadline ? [p.readout.headlineText] : [], ...showSpan ? [p.readout.spanText] : []].join("; ")}.`).join(" ") : "" }) },
|
|
760
|
+
warnings: [...solved.warnings, ...stackColumnWarnings(stack, narrow, gutterFloored, gutterCapped)],
|
|
669
761
|
debug: { occupied: occupied.snapshot(), decisions: solved.decisions }
|
|
670
762
|
};
|
|
671
763
|
}
|
|
@@ -740,21 +832,21 @@ function gridRowHeights(height, children, rows, gaps) {
|
|
|
740
832
|
let flexibleWeight = sum(rows.filter((_, row) => fixed[row] === void 0)), remaining = Math.max(0, height - sum(gaps) - sum(fixed.map((value) => value ?? 0)));
|
|
741
833
|
return rows.map((weight, row) => fixed[row] ?? remaining * weight / flexibleWeight);
|
|
742
834
|
}
|
|
743
|
-
function gridSizing(size, area, children, rows, columns, rowGaps, columnGaps, automaticRows = !1) {
|
|
744
|
-
let fixed = contentRows(children, rows, rowGaps, automaticRows), required = (axis, weights, gaps,
|
|
835
|
+
function gridSizing(size, area, children, rows, columns, rowGaps, columnGaps, automaticRows = !1, minimumRows = rows, askedRows, slotsFirst = !1) {
|
|
836
|
+
let fixed = contentRows(children, rows, rowGaps, automaticRows), required = (axis, weights, gaps, mode = "minimum") => {
|
|
745
837
|
let heights = weights.map((_, row) => axis === "row" ? fixed[row] : void 0), flexible = weights.map((weight, row) => heights[row] === void 0 ? weight : 0), total = sum(flexible);
|
|
746
838
|
return sum(gaps) + sum(heights.map((value) => value ?? 0)) + Math.max(0, maxOf(children.map((child) => {
|
|
747
|
-
let start = child[axis], span = axis === "row" ? child.rowSpan : child.columnSpan, g = child.geometry, need = axis === "column" ? g.sizing?.minWidth ?? 0 : (natural ? g.sizing?.naturalHeight : g.sizing?.minHeight) ?? (g.refused ? 0 : Math.max(g.frame.minHeight ?? 0, g.frame.plotMinHeight ?? 0)), weight = sum(flexible.slice(start, start + span)), held = sum(heights.slice(start, start + span).map((value) => value ?? 0));
|
|
839
|
+
let start = child[axis], span = axis === "row" ? child.rowSpan : child.columnSpan, g = child.geometry, need = axis === "column" ? g.sizing?.minWidth ?? 0 : (mode === "natural" ? g.sizing?.naturalHeight : mode === "asked" ? Math.max(g.sizing?.minHeight ?? 0, g.refused ? 0 : g.frame.plotMinHeight ?? 0) : g.sizing?.minHeight) ?? (g.refused ? 0 : Math.max(g.frame.minHeight ?? 0, g.frame.plotMinHeight ?? 0)), weight = sum(flexible.slice(start, start + span)), held = sum(heights.slice(start, start + span).map((value) => value ?? 0));
|
|
748
840
|
return weight === 0 ? 0 : Math.max(0, need - held - sum(gaps.slice(start, start + span - 1))) * total / weight;
|
|
749
841
|
})));
|
|
750
|
-
}, hasContentRows = fixed.some((value) => value !== void 0), content = hasContentRows || children.length > 0 && children.every((child) => child.geometry.sizing?.fit === "content"), policy = chartSizing("grid"), chrome = size.height - area.h,
|
|
751
|
-
|
|
842
|
+
}, hasContentRows = fixed.some((value) => value !== void 0), content = hasContentRows || children.length > 0 && children.every((child) => child.geometry.sizing?.fit === "content"), policy = chartSizing("grid"), chrome = size.height - area.h, slotMinimum = required("row", rows, rowGaps), minimumHeight = minimumRows === rows ? slotMinimum : required("row", minimumRows, rowGaps), naturalRows = hasContentRows ? Math.max(
|
|
843
|
+
slotMinimum,
|
|
752
844
|
sum(rowGaps) + sum(fixed.map((value) => value ?? 0)) + Math.max(0, resolveSizing(policy, size).naturalHeight - chrome - sum(rowGaps)) * sum(rows.filter((_, row) => fixed[row] === void 0)) / sum(rows)
|
|
753
|
-
) : required("row", rows, rowGaps,
|
|
845
|
+
) : required("row", rows, rowGaps, "natural");
|
|
754
846
|
return resolveSizing(content ? { ...policy, fit: "content", aspect: "content", minHeight: 0 } : policy, size, {
|
|
755
847
|
minWidth: size.width - area.w + required("column", columns, columnGaps),
|
|
756
|
-
minHeight: chrome +
|
|
757
|
-
...content ? { naturalHeight: chrome + naturalRows } : {}
|
|
848
|
+
minHeight: chrome + (slotsFirst ? slotMinimum : Math.min(minimumHeight, slotMinimum)),
|
|
849
|
+
...content ? { naturalHeight: chrome + naturalRows } : minimumHeight < slotMinimum ? { naturalHeight: Math.max(resolveSizing(policy, size).naturalHeight, chrome + slotMinimum, askedRows && size.height >= chrome + minimumHeight ? chrome + required("row", askedRows, rowGaps, "asked") : 0) } : {}
|
|
758
850
|
});
|
|
759
851
|
}
|
|
760
852
|
var GridChildRefusal = class extends Error {
|
|
@@ -783,7 +875,7 @@ function serializableOptions(options) {
|
|
|
783
875
|
let { measure: _measure, ...rest } = options;
|
|
784
876
|
return rest;
|
|
785
877
|
}
|
|
786
|
-
var TIER_WEIGHT_FIRST = 2.2, TIER_SLACK_PASSES = 32, TIER_SLACK_BACKOFFS = 8;
|
|
878
|
+
var TIER_WEIGHT_FIRST = 2.2, TIER_SLACK_PASSES = 32, TIER_SLACK_BACKOFFS = 8, TIER_PLOT_FLOOR = 10.5, DROPPED_VALUE_WARNINGS = /* @__PURE__ */ new Set(["label-hidden", "values-in-note", "value-labels-dropped-series"]);
|
|
787
879
|
function sharedYGroup(panels) {
|
|
788
880
|
let group = null;
|
|
789
881
|
for (let p of panels) {
|
|
@@ -947,7 +1039,7 @@ function layoutGridPass(data, options = {}) {
|
|
|
947
1039
|
if (geo.refused) throw new GridChildRefusal(panel.id, geo);
|
|
948
1040
|
if (options.target && tierReserve > 0)
|
|
949
1041
|
for (let pass = 0; pass < 3; pass++) {
|
|
950
|
-
let missing = Math.ceil(tierReserve - occupiedBounds(geo).y);
|
|
1042
|
+
let missing = Math.ceil(tierReserve - occupiedBounds(geo, measure).y);
|
|
951
1043
|
if (missing <= 0) break;
|
|
952
1044
|
let margin2 = finalOptions.margin;
|
|
953
1045
|
if (finalOptions = { ...finalOptions, margin: { ...margin2, top: (margin2?.top ?? marginTop) + missing } }, geo = layoutChildChart(panel.data, finalOptions, def.layout), geo.refused) throw new GridChildRefusal(panel.id, geo);
|
|
@@ -996,7 +1088,7 @@ function layoutGridPass(data, options = {}) {
|
|
|
996
1088
|
let children = data.panels.map((p, i) => layoutPanel(p, i, slots[i]));
|
|
997
1089
|
return !uniformLineEndpointLegend && !keepEndNames && landsOnEndpointLegend(children) && (uniformLineEndpointLegend = !0, children = data.panels.map((p, i) => layoutPanel(p, i, slots[i]))), alignSharedValues(children);
|
|
998
1090
|
}, measureTierContents = (laidOut) => {
|
|
999
|
-
let childContent = laidOut.map((child) => occupiedBounds(child.geo)), tierLabels = laidOut.map((child, index) => {
|
|
1091
|
+
let childContent = laidOut.map((child) => occupiedBounds(child.geo, measure)), tierLabels = laidOut.map((child, index) => {
|
|
1000
1092
|
if (!child.tierCaption && !child.tierDetail) return;
|
|
1001
1093
|
let font = { family: theme.type.family, ...theme.type.axis }, titleSize = child.tierCaption ? measuredCaption(child.tierCaption, font, child.geo.size.width, measure) : void 0, detailSize = child.tierDetail ? measuredCaption(child.tierDetail, font, child.geo.size.width, measure) : void 0, lineGap = titleSize && detailSize ? theme.space.labelPad : 0, height = (titleSize?.height ?? 0) + lineGap + (detailSize?.height ?? 0), y = childContent[index].y - theme.space.labelPad - height, title = titleSize ? { x: 0, y, w: titleSize.width, h: titleSize.height } : void 0;
|
|
1002
1094
|
y += (titleSize?.height ?? 0) + lineGap;
|
|
@@ -1070,15 +1162,38 @@ function layoutGridPass(data, options = {}) {
|
|
|
1070
1162
|
rowGaps,
|
|
1071
1163
|
Array(columns - 1).fill(gap),
|
|
1072
1164
|
!0
|
|
1073
|
-
)
|
|
1074
|
-
|
|
1075
|
-
|
|
1165
|
+
), tierRepaired = !1, plainFits = () => !0, packTiers = (repair) => {
|
|
1166
|
+
let weights = tierWeights(data.panels), wSum = weights.reduce((sum2, weight) => sum2 + weight, 0), gapFloor = Math.min(4, theme.space.tierGap), gapCapacity = (theme.space.tierGap - gapFloor) * (n - 1), contentTotal = () => tierContents.localContent.reduce((sum2, bounds) => sum2 + bounds.h, 0), tierMinimums = () => children.map((child) => child.geo.sizing?.minHeight ?? 0), settle = (heights2) => {
|
|
1167
|
+
slots.forEach((slot, index) => {
|
|
1168
|
+
slots[index] = { ...slot, h: heights2[index] };
|
|
1169
|
+
});
|
|
1170
|
+
let y = area.y + area.h;
|
|
1171
|
+
for (let i of bottomUpOrder)
|
|
1172
|
+
y -= slots[i].h, slots[i] = { ...slots[i], y }, y -= theme.space.tierGap;
|
|
1173
|
+
children = balanceVarianceTierPlots(slots, layoutChildren(), varianceWeights, layoutChildren), tierContents = measureTierContents(children);
|
|
1174
|
+
}, minimums = tierMinimums(), usable = area.h - theme.space.tierGap * (n - 1);
|
|
1175
|
+
repair && !varianceWeights && slots.some((slot, i) => slot.h + 0.5 < minimums[i] && children[i].geo.plot.h < (children[i].geo.frame.plotMinHeight ?? 0)) && minimums.reduce((a, b) => a + b, 0) <= usable && (tierRepaired = !0, settle(heightsHoldingMinimums(usable, weights, minimums)));
|
|
1176
|
+
let squeeze = (deficit) => {
|
|
1177
|
+
let give = children.map((child, i) => child.geo.plot.h > TIER_PLOT_FLOOR ? weights[i] : 0), giveSum = give.reduce((a, b) => a + b, 0);
|
|
1178
|
+
if (giveSum === 0) return !1;
|
|
1179
|
+
let before = { slots: slots.map((slot) => ({ ...slot })), children, tierContents, total: contentTotal(), sharedX, sharedW };
|
|
1180
|
+
tierRepaired = !0;
|
|
1181
|
+
let floors = tierMinimums();
|
|
1182
|
+
return settle(slots.map((slot, i) => Math.max(Math.min(slot.h, floors[i]), slot.h - deficit * give[i] / giveSum))), contentTotal() < before.total - 0.5 ? !0 : (before.slots.forEach((slot, i) => {
|
|
1183
|
+
slots[i] = slot;
|
|
1184
|
+
}), { children, tierContents, sharedX, sharedW } = before, !1);
|
|
1185
|
+
}, slackNow = () => area.h - packReserve - theme.space.tierGap * (n - 1) - contentTotal();
|
|
1186
|
+
plainFits = () => slackNow() >= -gapCapacity - 1;
|
|
1076
1187
|
for (let pass = 0; pass < TIER_SLACK_PASSES; pass++) {
|
|
1077
|
-
let slack =
|
|
1188
|
+
let slack = slackNow();
|
|
1078
1189
|
if (slack < 0 && slack >= -gapCapacity) {
|
|
1079
1190
|
effectiveTierGap = theme.space.tierGap + slack / (n - 1);
|
|
1080
1191
|
break;
|
|
1081
1192
|
}
|
|
1193
|
+
if (slack < -gapCapacity) {
|
|
1194
|
+
if (!repair || !squeeze(-slack - gapCapacity)) break;
|
|
1195
|
+
continue;
|
|
1196
|
+
}
|
|
1082
1197
|
if (slack <= theme.space.tierGap) break;
|
|
1083
1198
|
let previousSlots = slots.map((slot) => ({ ...slot })), previousChildren = children, previousTierContents = tierContents, previousSharedX = sharedX, previousSharedW = sharedW, growth = Math.max(slack, wSum * theme.space.tierGap), accepted = !1;
|
|
1084
1199
|
for (let backoff = 0; backoff < TIER_SLACK_BACKOFFS; backoff++) {
|
|
@@ -1102,6 +1217,25 @@ function layoutGridPass(data, options = {}) {
|
|
|
1102
1217
|
break;
|
|
1103
1218
|
}
|
|
1104
1219
|
}
|
|
1220
|
+
repair && slackNow() < -gapCapacity - 1 && warnings.push({
|
|
1221
|
+
code: "grid-panel-too-short",
|
|
1222
|
+
severity: "warn",
|
|
1223
|
+
message: `the tiers need ${Math.ceil(-slackNow() - gapCapacity)} px more height than the canvas gives, so the top tier runs into the frame above it`,
|
|
1224
|
+
suggest: "increase the grid height"
|
|
1225
|
+
});
|
|
1226
|
+
};
|
|
1227
|
+
if (packedTiers && requirements().minHeight <= size.height) {
|
|
1228
|
+
let state = () => ({ slots: slots.map((slot) => ({ ...slot })), children, tierContents, sharedX, sharedW, gap: effectiveTierGap, warnings: warnings.slice() }), restore = (saved) => {
|
|
1229
|
+
saved.slots.forEach((slot, i) => {
|
|
1230
|
+
slots[i] = slot;
|
|
1231
|
+
}), { children, tierContents, sharedX, sharedW } = saved, effectiveTierGap = saved.gap, warnings.length = 0, warnings.push(...saved.warnings);
|
|
1232
|
+
}, start = state();
|
|
1233
|
+
if (tierRepaired = !1, packTiers(!0), tierRepaired) {
|
|
1234
|
+
let repaired = state(), raised = requirements().minHeight > size.height, droppedValues = () => children.reduce((sum2, child) => sum2 + child.geo.warnings.filter((warning) => DROPPED_VALUE_WARNINGS.has(warning.code)).length, 0), repairedDrops = droppedValues();
|
|
1235
|
+
restore(start), packTiers(!1);
|
|
1236
|
+
let fits = plainFits();
|
|
1237
|
+
!raised && !(fits && droppedValues() < repairedDrops) && restore(repaired);
|
|
1238
|
+
}
|
|
1105
1239
|
}
|
|
1106
1240
|
let sizing = requirements(), { tierLabels, localContent } = tierContents, panelY = slots.map((slot) => slot.y);
|
|
1107
1241
|
if (packedTiers) {
|
|
@@ -1271,8 +1405,19 @@ function appendPanelScene(scene, geometry, panelId, prefix, dx, dy) {
|
|
|
1271
1405
|
function withoutCategoryLabels(labels) {
|
|
1272
1406
|
return labels === !1 ? !1 : { ...isRecord(labels) ? labels : {}, category: !1 };
|
|
1273
1407
|
}
|
|
1274
|
-
function
|
|
1408
|
+
function heightsHoldingMinimums(usable, weights, minimums) {
|
|
1409
|
+
let held = /* @__PURE__ */ new Set();
|
|
1410
|
+
for (; ; ) {
|
|
1411
|
+
let free = usable - [...held].reduce((sum2, i) => sum2 + minimums[i], 0), open = weights.reduce((sum2, weight, i) => sum2 + (held.has(i) ? 0 : weight), 0), heights = weights.map((weight, i) => held.has(i) ? minimums[i] : free * weight / open), under = heights.flatMap((height, i) => !held.has(i) && height < minimums[i] ? [i] : []);
|
|
1412
|
+
if (under.length === 0) return heights;
|
|
1413
|
+
under.forEach((i) => held.add(i));
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
function occupiedBounds(geometry, measure) {
|
|
1275
1417
|
let rects = geometry.debug.occupied.filter((item) => item.kind !== "reserved").map((item) => item.rect);
|
|
1418
|
+
for (let node of geometry.scene)
|
|
1419
|
+
if (!(node.t !== "text" || !node.rotate || node.opacity === 0))
|
|
1420
|
+
for (let box of lineBoxes(node, measure)) rects.push({ x: box.x0, y: box.y0, w: box.x1 - box.x0, h: box.y1 - box.y0 });
|
|
1276
1421
|
if (rects.length === 0) return geometry.plot;
|
|
1277
1422
|
let x1 = minOf(rects.map((rect) => rect.x)), y1 = minOf(rects.map((rect) => rect.y)), x2 = maxOf(rects.map((rect) => rect.x + rect.w)), y2 = maxOf(rects.map((rect) => rect.y + rect.h));
|
|
1278
1423
|
return { x: x1, y: y1, w: x2 - x1, h: y2 - y1 };
|
|
@@ -1498,7 +1643,7 @@ function shareRowGridlines(geometry, columns) {
|
|
|
1498
1643
|
}
|
|
1499
1644
|
}
|
|
1500
1645
|
}
|
|
1501
|
-
var SHARED_AXIS_EDGE = 8, FACET_PLOT_SHARE = 0.5, FACET_COLUMN_SHARE = 0.85, FACET_HEAD_TOP = 5, FACET_HEAD_PULL = 11;
|
|
1646
|
+
var SHARED_AXIS_EDGE = 8, FACET_PLOT_SHARE = 0.5, FACET_COLUMN_SHARE = 0.85, FACET_HEAD_TOP = 5, FACET_HEAD_PULL = 11, FACET_HEAD_TEXT_GAP = 2;
|
|
1502
1647
|
function facetSpan(geometry) {
|
|
1503
1648
|
let plot = geometry.plot, bars = geometry.marks?.bars, tops = Array.isArray(bars) ? bars.flatMap((bar) => bar.rect && bar.rect.h > 0 ? [bar.rect.y] : []) : [];
|
|
1504
1649
|
return tops.length > 0 ? plot.y + plot.h - minOf(tops) : plot.h;
|
|
@@ -1533,12 +1678,12 @@ function gridFormOf(data, options = {}) {
|
|
|
1533
1678
|
let { panels } = normalizeGridData(data);
|
|
1534
1679
|
return usesAuthoredLayout(panels, options) ? "panels" : legacyGridForm(panels, { ...options, sharedAxis: gridShare(panels, options.sharedAxis) });
|
|
1535
1680
|
}
|
|
1536
|
-
function layoutLegacyGrid(normalized, options) {
|
|
1681
|
+
function layoutLegacyGrid(normalized, options, headPull = FACET_HEAD_PULL) {
|
|
1537
1682
|
let theme = themeForWidth(resolveTheme(options.theme), gridTypeClass(options)), measure = options.measure ?? defaultMeasurer, groupResult = resolveSharedYDomains(normalized.panels, options, normalized.repeatFacet === !0), form = legacyGridForm(groupResult.panels, options), compactTiers = form === "tiers", canvasWidth = resolveSize(options.size).width, gridMargin = { ...canvasMargin(theme, canvasWidth), ...options.margin }, columns = options.sharedAxis === "category" || options.sharedAxis === void 0 ? 1 : Math.max(1, Number(options.columns ?? 1)), facets = form === "facets", sharedAxis = facets && sharedYGroup(groupResult.panels) !== null && groupResult.panels.every((panel) => {
|
|
1538
1683
|
let axis = panel.options?.valueAxis;
|
|
1539
1684
|
return isRecord(axis) && axis.show === !0;
|
|
1540
1685
|
}), rowCaption = facets ? normalized.rowCaption : void 0, facetHeads = facets && !sharedAxis, headedGaps = facetHeads ? facetHeadedGaps(theme.space.facetGap, canvasWidth) : void 0, gap = columns === 1 ? theme.space.tierGap : headedGaps?.column ?? theme.space.facetGap, slotWidth = (canvasWidth - gridMargin.left - gridMargin.right - gap * (columns - 1)) / columns, rowCaptionFont = { family: theme.type.family, ...theme.type.axis }, rowCaptionHeight = rowCaption ? measuredCaption(rowCaption, rowCaptionFont, canvasWidth - gridMargin.left - gridMargin.right, measure).height + 6 : 0, preparedPanels = groupResult.panels.map((authoredPanel, index) => {
|
|
1541
|
-
let childTitle = authoredPanel.options?.title, panel = facets && authoredPanel.title === void 0 && typeof childTitle == "string" && childTitle.trim().length > 0 ? { ...authoredPanel, title: childTitle, options: Object.fromEntries(Object.entries(authoredPanel.options).filter(([key]) => key !== "title")) } : authoredPanel, captionHeight = compactTiers ? 0 : measureCaptionBand(panel, theme, measure, slotWidth), panelOptions = panel.options ?? {}, margin = isRecord(panelOptions.margin) ? panelOptions.margin : {}, { title: panelTitle, ...panelWithoutTitle } = panel, axis = isRecord(panelOptions.valueAxis) ? panelOptions.valueAxis : {}, firstRow = index < columns, headTop = facetHeads ? FACET_HEAD_TOP : 20, pull = facetHeads && captionHeight > 0 ?
|
|
1686
|
+
let childTitle = authoredPanel.options?.title, panel = facets && authoredPanel.title === void 0 && typeof childTitle == "string" && childTitle.trim().length > 0 ? { ...authoredPanel, title: childTitle, options: Object.fromEntries(Object.entries(authoredPanel.options).filter(([key]) => key !== "title")) } : authoredPanel, captionHeight = compactTiers ? 0 : measureCaptionBand(panel, theme, measure, slotWidth), panelOptions = panel.options ?? {}, margin = isRecord(panelOptions.margin) ? panelOptions.margin : {}, { title: panelTitle, ...panelWithoutTitle } = panel, axis = isRecord(panelOptions.valueAxis) ? panelOptions.valueAxis : {}, firstRow = index < columns, headTop = facetHeads ? FACET_HEAD_TOP : 20, pull = facetHeads && captionHeight > 0 ? headPull : 0;
|
|
1542
1687
|
return {
|
|
1543
1688
|
...compactTiers ? panelWithoutTitle : panel,
|
|
1544
1689
|
options: {
|
|
@@ -1571,7 +1716,7 @@ function layoutLegacyGrid(normalized, options) {
|
|
|
1571
1716
|
...(options.sharedAxis ?? "category") !== "category" && panel.chart ? { x: panel.chart.offset.x, y: panel.chart.offset.y, w: slotWidth } : {}
|
|
1572
1717
|
})), captionSlots = compactTiers ? [] : preparedPanels.map((panel, index) => ({ panel, slot: slots[index] })), captionNodes = [], captionClaims = [], highlighted = new Set(
|
|
1573
1718
|
resolveHighlight(options.highlight).filter((id) => preparedPanels.some((panel) => panel.id === id))
|
|
1574
|
-
), facetPull = facetHeads && preparedPanels[0] && measureCaptionBand(preparedPanels[0], theme, measure, slotWidth) > 0 ?
|
|
1719
|
+
), facetPull = facetHeads && preparedPanels[0] && measureCaptionBand(preparedPanels[0], theme, measure, slotWidth) > 0 ? headPull : 0;
|
|
1575
1720
|
if (rowCaption && preparedPanels.length > 0) {
|
|
1576
1721
|
let first = preparedPanels[0], top = numeric(first.options.margin.top, 20) - measureCaptionBand(first, theme, measure, slotWidth), band = panelCaptionBand(
|
|
1577
1722
|
{ id: "grid", type: "text", data: {}, caption: rowCaption, options: { margin: { left: 0, right: 0, top } } },
|
|
@@ -1584,10 +1729,17 @@ function layoutLegacyGrid(normalized, options) {
|
|
|
1584
1729
|
);
|
|
1585
1730
|
pushAll(captionNodes, band.nodes), pushAll(captionClaims, band.claims);
|
|
1586
1731
|
}
|
|
1732
|
+
let headClash = 0;
|
|
1587
1733
|
for (let entry of captionSlots) {
|
|
1588
|
-
let band = panelCaptionBand(entry.panel, theme, measure, entry.slot, highlighted, !1, facetHeads && measureCaptionBand(entry.panel, theme, measure, slotWidth) > 0 ?
|
|
1589
|
-
entry.titleNodeId = band.nodes.find((n) => n.part === "panelTitle")?.id, entry.captionNodeId = band.nodes.find((n) => n.part === "panelCaption")?.id, pushAll(captionNodes, band.nodes), pushAll(captionClaims, band.claims)
|
|
1734
|
+
let band = panelCaptionBand(entry.panel, theme, measure, entry.slot, highlighted, !1, facetHeads && measureCaptionBand(entry.panel, theme, measure, slotWidth) > 0 ? headPull : 0);
|
|
1735
|
+
if (entry.titleNodeId = band.nodes.find((n) => n.part === "panelTitle")?.id, entry.captionNodeId = band.nodes.find((n) => n.part === "panelCaption")?.id, pushAll(captionNodes, band.nodes), pushAll(captionClaims, band.claims), facetHeads && headPull === FACET_HEAD_PULL)
|
|
1736
|
+
for (let head of band.claims) {
|
|
1737
|
+
let bottom = head.rect.y + head.rect.h + FACET_HEAD_TEXT_GAP;
|
|
1738
|
+
for (let claim of geometry.debug.occupied)
|
|
1739
|
+
claim.kind !== "axis" || claim.rect.h <= 2 || claim.rect.y <= head.rect.y || claim.rect.x >= head.rect.x + head.rect.w || claim.rect.x + claim.rect.w <= head.rect.x || claim.rect.y < bottom && claim.rect.y + claim.rect.h > head.rect.y && (headClash = Math.max(headClash, bottom - claim.rect.y));
|
|
1740
|
+
}
|
|
1590
1741
|
}
|
|
1742
|
+
if (headClash > 0.01) return layoutLegacyGrid(normalized, options, Math.max(0, headPull - headClash));
|
|
1591
1743
|
let markById = new Map(geometry.marks.panels.map((panel) => [panel.id, panel]));
|
|
1592
1744
|
for (let entry of captionSlots) {
|
|
1593
1745
|
let mark = markById.get(entry.panel.id);
|
|
@@ -1612,13 +1764,13 @@ function layoutLegacyGrid(normalized, options) {
|
|
|
1612
1764
|
}
|
|
1613
1765
|
};
|
|
1614
1766
|
}
|
|
1615
|
-
var
|
|
1767
|
+
var TIER_PLOT_FLOOR2 = 10.5, TIER_HEIGHT_STEP = 16;
|
|
1616
1768
|
function withTierPlot(geometry, panels, options) {
|
|
1617
1769
|
let sizing = geometry.sizing, weights = options.sharedAxis === "category" && sharedYGroup(panels) === null ? varianceTierWeights(panels) : void 0;
|
|
1618
1770
|
if (!weights || !sizing || geometry.refused) return geometry;
|
|
1619
1771
|
let column = panels.findIndex((panel) => panel.type === "column"), columnOptions = panels[column].options;
|
|
1620
1772
|
if (columnOptions?.variant !== "stacked") return geometry;
|
|
1621
|
-
let open = options[TARGET_SIZE]?.fixed.height === !1, hides = open && sliversHidden(geometry), { width, height } = geometry.size, plots = geometry.marks.panels.map((panel) => panel.chart?.geometry.plot.h ?? 0), share = weights.reduce((sum2, weight) => sum2 + weight, 0) / weights[column], need = autoPlotPx(options.target ?? DEFAULT_TARGET, width) * share, reservePlot = stackedColumnPlotPx("column", columnOptions, width), reserve = Math.ceil(reservePlot * share), reach = need / share + reservePlot, squashed = plots.some((plot) => plot <=
|
|
1773
|
+
let open = options[TARGET_SIZE]?.fixed.height === !1, hides = open && sliversHidden(geometry), { width, height } = geometry.size, plots = geometry.marks.panels.map((panel) => panel.chart?.geometry.plot.h ?? 0), share = weights.reduce((sum2, weight) => sum2 + weight, 0) / weights[column], need = autoPlotPx(options.target ?? DEFAULT_TARGET, width) * share, reservePlot = stackedColumnPlotPx("column", columnOptions, width), reserve = Math.ceil(reservePlot * share), reach = need / share + reservePlot, squashed = plots.some((plot) => plot <= TIER_PLOT_FLOOR2), id = panels[column].id, columnData = panels[column].data, withheld = new Set(columnData?.series?.flatMap((series) => series.values.flatMap((cell, index) => cellMeta(cell)?.label === !1 ? [`${id}/segment:${series.id}:${columnData.categories?.[index]?.id}`] : [])) ?? []), needs = hides ? geometry.labels.filter((label) => label.id.startsWith(`${id}/segment:`) && !withheld.has(label.id)).map((label) => {
|
|
1622
1774
|
let mark = geometry.scene.find((node) => node.id === label.id.replace("/segment:", "/mark:"));
|
|
1623
1775
|
return plots[column] * ((label[DIGIT_SEAT]?.lineH ?? label.rect.h) + STACK_ROOM) / (mark?.rect?.h ?? 0);
|
|
1624
1776
|
}) : [], wanted = Math.max(0, maxOf(needs.filter((plot) => plot <= reach))), drawn = plots[column] + (sizing.naturalHeight - height) / share;
|
|
@@ -1834,6 +1986,7 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1834
1986
|
), child.panel.align)), child.relayout ? { ...child, geometry: child.relayout(child.margin, valueSize) } : layoutAuthoredChild(child.panel, child.placement, child.slot, panels, options, legendItems, theme, measure)));
|
|
1835
1987
|
}
|
|
1836
1988
|
}
|
|
1989
|
+
let sizingRows = rowWeights, sizedRows = rowWeights, askedRows, packedTiers = !1, typeStepsFirst = options.target !== void 0 && floorTextScale(options.target) !== void 0 && options.textScale === void 0 && options.textSize === void 0 && options.belowMinimum !== "refuse";
|
|
1837
1990
|
if (naturalTierWeights) {
|
|
1838
1991
|
let wrap = () => children.map((child) => ({ child, geo: child.geometry })), tierSlots = children.map((child) => child.slot);
|
|
1839
1992
|
for (let pass = 0; pass < 3; pass++)
|
|
@@ -1841,7 +1994,14 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1841
1994
|
for (let child of children) child.geometry = child.relayout(child.margin);
|
|
1842
1995
|
return wrap();
|
|
1843
1996
|
});
|
|
1844
|
-
let contentHeight = () => children.reduce((sum2, child) => sum2 +
|
|
1997
|
+
let contentHeight = () => children.reduce((sum2, child) => sum2 + occupiedBounds(child.geometry, measure).h, 0), available = area.h - rowGaps.reduce((sum2, gap) => sum2 + gap, 0), weight = naturalTierWeights.reduce((sum2, value) => sum2 + value, 0), packed = children.every((child) => !child.panel.align) && !options.anchors?.baselines, reportedRows, minimums = children.map((child) => child.geometry.sizing?.minHeight ?? 0);
|
|
1998
|
+
if (packed && !typeStepsFirst && children.some((child, index) => child.slot.h + 0.5 < minimums[index] && child.geometry.plot.h < (child.geometry.frame.plotMinHeight ?? 0)) && minimums.reduce((sum2, value) => sum2 + value, 0) <= available) {
|
|
1999
|
+
reportedRows = rowWeights.map((_, row) => tierSlots[provisional.findIndex((p) => p.row === row)].h);
|
|
2000
|
+
let heights = heightsHoldingMinimums(available, naturalTierWeights, minimums);
|
|
2001
|
+
children.forEach((child, index) => {
|
|
2002
|
+
child.slot.h = heights[index], child.geometry = child.relayout(child.margin);
|
|
2003
|
+
});
|
|
2004
|
+
}
|
|
1845
2005
|
if (packed && children.every((child) => child.slot.h >= (child.geometry.sizing?.minHeight ?? 0)))
|
|
1846
2006
|
for (let pass = 0; pass < 8; pass++) {
|
|
1847
2007
|
let slack = available - contentHeight();
|
|
@@ -1864,12 +2024,17 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1864
2024
|
break;
|
|
1865
2025
|
}
|
|
1866
2026
|
}
|
|
1867
|
-
rowWeights = rowWeights.map((_, row) => tierSlots[provisional.findIndex((p) => p.row === row)].h),
|
|
2027
|
+
if (rowWeights = rowWeights.map((_, row) => tierSlots[provisional.findIndex((p) => p.row === row)].h), sizedRows = reportedRows ?? rowWeights, sizingRows = sizedRows, packed) {
|
|
2028
|
+
packedTiers = !0;
|
|
2029
|
+
let rowChild = (row) => children.find((child) => child.placement.row === row)?.geometry;
|
|
2030
|
+
sizingRows = sizedRows.map((weight2, row) => rowChild(row)?.sizing?.minHeight ?? weight2), children.some((child) => child.geometry.size.height + 1e-6 < (child.geometry.frame.plotMinHeight ?? 0)) && (askedRows = sizingRows.map((height, row) => Math.max(height, rowChild(row)?.frame.plotMinHeight ?? 0)));
|
|
2031
|
+
}
|
|
2032
|
+
rowBands = trackBands(area.y, area.h, rowWeights, rowGaps, options.gutters?.rows !== void 0), tierSlots.forEach((slot, index) => {
|
|
1868
2033
|
slot.y = rowBands[provisional[index].row].start;
|
|
1869
2034
|
});
|
|
1870
2035
|
let bottom = area.y + area.h;
|
|
1871
2036
|
for (let index of packed ? bottomUpTierOrder(panels) : []) {
|
|
1872
|
-
let child = children[index], bounds =
|
|
2037
|
+
let child = children[index], bounds = occupiedBounds(child.geometry, measure);
|
|
1873
2038
|
child.slot.y = bottom - bounds.y - bounds.h, rowBands[child.placement.row] = { start: bottom - bounds.h, size: bounds.h }, bottom -= bounds.h + (rowGaps[child.placement.row - 1] ?? 0);
|
|
1874
2039
|
}
|
|
1875
2040
|
}
|
|
@@ -1934,7 +2099,7 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1934
2099
|
);
|
|
1935
2100
|
let nodeId = `grid:alignment:${rule.id}`;
|
|
1936
2101
|
if (rule.orientation === "vertical") {
|
|
1937
|
-
let y1 = from?.slot.y ?? area.y, y2 = (to?.slot.y ?? area.y) + (to?.slot.h ?? area.h), runs = guideRuns(occupiedAll, "vertical", coordinate.value, y1, y2);
|
|
2102
|
+
let y1 = from?.slot.y ?? area.y, y2 = (to?.slot.y ?? area.y) + (to?.slot.h ?? area.h), runs = guideRuns(occupiedAll, scene, "vertical", coordinate.value, y1, y2);
|
|
1938
2103
|
scene.push(runs.length === 1 && runs[0][0] === Math.min(y1, y2) && runs[0][1] === Math.max(y1, y2) ? { t: "line", id: nodeId, x1: coordinate.value, y1, x2: coordinate.value, y2, stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "alignmentRule" } : { t: "path", id: nodeId, d: runs.map(([a, b]) => `M${fmtPathNumber(coordinate.value)} ${fmtPathNumber(a)}V${fmtPathNumber(b)}`).join(""), stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "alignmentRule" }), occupiedAll.push({
|
|
1939
2104
|
rect: { x: coordinate.value - 0.5, y: Math.min(y1, y2), w: 1, h: Math.abs(y2 - y1) },
|
|
1940
2105
|
kind: "axis",
|
|
@@ -1942,7 +2107,7 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1942
2107
|
part: "alignmentRule"
|
|
1943
2108
|
});
|
|
1944
2109
|
} else {
|
|
1945
|
-
let x1 = from?.slot.x ?? area.x, x2 = (to?.slot.x ?? area.x) + (to?.slot.w ?? area.w), runs = guideRuns(occupiedAll, "horizontal", coordinate.value, x1, x2);
|
|
2110
|
+
let x1 = from?.slot.x ?? area.x, x2 = (to?.slot.x ?? area.x) + (to?.slot.w ?? area.w), runs = guideRuns(occupiedAll, scene, "horizontal", coordinate.value, x1, x2);
|
|
1946
2111
|
scene.push(runs.length === 1 && runs[0][0] === Math.min(x1, x2) && runs[0][1] === Math.max(x1, x2) ? { t: "line", id: nodeId, x1, y1: coordinate.value, x2, y2: coordinate.value, stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "alignmentRule" } : { t: "path", id: nodeId, d: runs.map(([a, b]) => `M${fmtPathNumber(a)} ${fmtPathNumber(coordinate.value)}H${fmtPathNumber(b)}`).join(""), stroke: { token: "grid" }, width: strokeToken(theme, "hair"), owner: {}, part: "alignmentRule" }), occupiedAll.push({
|
|
1947
2112
|
rect: { x: Math.min(x1, x2), y: coordinate.value - 0.5, w: Math.abs(x2 - x1), h: 1 },
|
|
1948
2113
|
kind: "axis",
|
|
@@ -1952,12 +2117,13 @@ function layoutAuthoredGrid(rawPanels, options, repeatFacet) {
|
|
|
1952
2117
|
}
|
|
1953
2118
|
marks.alignmentRules.push({ id: rule.id, nodeId, orientation: rule.orientation });
|
|
1954
2119
|
}
|
|
2120
|
+
packedTiers && slotDemandHeight.add(frameResult.frame);
|
|
1955
2121
|
let compactNotes = children.flatMap((child) => child.geometry.a11y.compactNotes ?? []);
|
|
1956
2122
|
return {
|
|
1957
2123
|
type: "grid",
|
|
1958
2124
|
size,
|
|
1959
2125
|
sizing: withReadoutPlotHeight(
|
|
1960
|
-
gridSizing(size, area, children.map((child) => ({ geometry: child.geometry, ...child.placement })),
|
|
2126
|
+
gridSizing(size, area, children.map((child) => ({ geometry: child.geometry, ...child.placement })), sizedRows, columnWeights, rowGaps, columnGaps, automaticRows, sizingRows, askedRows, typeStepsFirst),
|
|
1961
2127
|
size,
|
|
1962
2128
|
automaticRows ? children : []
|
|
1963
2129
|
),
|
|
@@ -2406,8 +2572,12 @@ function baselineY(geometry) {
|
|
|
2406
2572
|
let axis = geometry.axes.find((candidate) => candidate.axis === "x" && candidate.baselineNodeId), node = axis?.baselineNodeId ? geometry.scene.find((candidate) => candidate.id === axis.baselineNodeId) : void 0;
|
|
2407
2573
|
return node?.t === "line" && node.y1 === node.y2 ? node.y1 : null;
|
|
2408
2574
|
}
|
|
2409
|
-
function guideRuns(occupied, orientation, at, start, end) {
|
|
2410
|
-
let vertical = orientation === "vertical",
|
|
2575
|
+
function guideRuns(occupied, scene, orientation, at, start, end) {
|
|
2576
|
+
let vertical = orientation === "vertical", collinear = scene.flatMap((node) => {
|
|
2577
|
+
if (node.t !== "line" || node.part === "alignmentRule") return [];
|
|
2578
|
+
let tx = node.tx ?? 0, ty = node.ty ?? 0;
|
|
2579
|
+
return vertical ? node.x1 === node.x2 && Math.abs(node.x1 + tx - at) <= 1 ? [[Math.min(node.y1, node.y2) + ty, Math.max(node.y1, node.y2) + ty]] : [] : node.y1 === node.y2 && Math.abs(node.y1 + ty - at) <= 1 ? [[Math.min(node.x1, node.x2) + tx, Math.max(node.x1, node.x2) + tx]] : [];
|
|
2580
|
+
}), blocks = occupied.filter((claim) => claim.part !== "alignmentRule" && claim.rect.w > 2 && claim.rect.h > 2).filter((claim) => vertical ? claim.rect.x < at && claim.rect.x + claim.rect.w > at : claim.rect.y < at && claim.rect.y + claim.rect.h > at).map((claim) => vertical ? [claim.rect.y - 3, claim.rect.y + claim.rect.h + 3] : [claim.rect.x - 3, claim.rect.x + claim.rect.w + 3]).concat(collinear).sort((a, b) => a[0] - b[0]), runs = [], from = Math.min(start, end), last = Math.max(start, end);
|
|
2411
2581
|
for (let [a, b] of blocks)
|
|
2412
2582
|
Math.min(a, last) - from >= 12 && runs.push([from, Math.min(a, last)]), from = Math.max(from, b);
|
|
2413
2583
|
return last - from >= 12 && runs.push([from, last]), runs;
|