@diagrammo/dgmo 0.77.0 → 0.79.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/README.md +17 -13
- package/dist/advanced.d.ts +197 -23
- package/dist/advanced.js +161 -142
- package/dist/block.css +1 -1
- package/dist/block.d.ts +2 -2
- package/dist/block.js +62 -58
- package/dist/{calculator-CVQ54JNE.js → calculator-OHTCZSBW.js} +3 -3
- package/dist/{chart-meta-Cf_jkApJ.d.ts → chart-meta-B7lSmrzg.d.ts} +2 -2
- package/dist/chart-meta.d.ts +3 -3
- package/dist/chart-meta.js +45 -44
- package/dist/charts-d3-EST3Z5VG.js +31 -0
- package/dist/{chunk-U4DS2ODO.js → chunk-253E5ISJ.js} +9 -9
- package/dist/{chunk-7IATMZSA.js → chunk-26EVL454.js} +1 -25
- package/dist/{chunk-MG3DE3VO.js → chunk-2F7AG7LA.js} +4 -4
- package/dist/{chunk-OWVDD5EC.js → chunk-2R2M2C6V.js} +2 -2
- package/dist/{chunk-LYJ53DBK.js → chunk-2RAH6GVR.js} +56 -41
- package/dist/{chunk-Q74GP3GK.js → chunk-37NDM5NW.js} +3 -3
- package/dist/{chunk-N6MZSBOL.js → chunk-3BN3WCUD.js} +5 -2
- package/dist/chunk-3DPOIW3W.js +10 -0
- package/dist/{chunk-HDLRRY3N.js → chunk-3KFGPXHD.js} +195 -135
- package/dist/{chunk-NWNSXHA5.js → chunk-3KNA7OIO.js} +3 -3
- package/dist/{chunk-M5OOAP65.js → chunk-4CA7TJ44.js} +2 -1
- package/dist/{chunk-M5JT2AU7.js → chunk-4L43NPSQ.js} +10 -6
- package/dist/{chunk-4YER7UCV.js → chunk-4T6V7JJA.js} +3 -3
- package/dist/{chunk-3E4YB6TY.js → chunk-4YSWUQKZ.js} +12 -7
- package/dist/{chunk-6BVAW7KI.js → chunk-54JYWS7D.js} +50 -43
- package/dist/{chunk-7NSNE52V.js → chunk-55DMCFGM.js} +3 -3
- package/dist/{chunk-XPBJVSRY.js → chunk-5BV5MXLY.js} +38 -32
- package/dist/{chunk-5VMUVJO4.js → chunk-5DWF3N3V.js} +3 -3
- package/dist/{chunk-SSEAULA5.js → chunk-6775W3UW.js} +19 -15
- package/dist/{chunk-2QRIMMIH.js → chunk-6EMJRAEY.js} +3 -3
- package/dist/{chunk-OZOHREFQ.js → chunk-6FUIPWTS.js} +14 -15
- package/dist/{chunk-F4V67JXG.js → chunk-6JIMYPXR.js} +4 -4
- package/dist/{chunk-CHOK7NCJ.js → chunk-7AEMAUDF.js} +29 -25
- package/dist/{chunk-NVOU7N6C.js → chunk-7DCM3CB5.js} +2 -2
- package/dist/{chunk-UBDVAHGK.js → chunk-7EUTTKNU.js} +36 -31
- package/dist/{chunk-76NHL5UG.js → chunk-7I6NWTPE.js} +2 -2
- package/dist/{chunk-OKXWPKUC.js → chunk-7SHL2WME.js} +2 -2
- package/dist/{chunk-SWEKCK34.js → chunk-AFOHIR2O.js} +3 -3
- package/dist/{chunk-RWFMOVHG.js → chunk-AI7TZQ2R.js} +3 -3
- package/dist/{chunk-BWJLLNUX.js → chunk-ALVK3TBO.js} +3 -3
- package/dist/{chunk-GLREDNBA.js → chunk-AMQFJ7P7.js} +21 -2
- package/dist/{chunk-RGW26UAR.js → chunk-CCETDPLV.js} +11 -11
- package/dist/{chunk-5ZD4DDG7.js → chunk-CE654SL2.js} +17 -14
- package/dist/{chunk-TPN7RJOM.js → chunk-CFYTCBRH.js} +4 -4
- package/dist/{chunk-YT5ICQ4R.js → chunk-CKDYRVOC.js} +3 -3
- package/dist/{chunk-WQXD3IIN.js → chunk-CRBW2WS7.js} +11 -9
- package/dist/{chunk-J76YDS4V.js → chunk-CREALBZL.js} +3 -3
- package/dist/{chunk-MZEGUDTA.js → chunk-CSTYDCKB.js} +16 -16
- package/dist/{chunk-QBM5BURJ.js → chunk-DG5IQW74.js} +10 -10
- package/dist/{chunk-Y2CYNRL7.js → chunk-DN6K6QCF.js} +2 -2
- package/dist/{chunk-43AJKH2U.js → chunk-DQOCYWB6.js} +12 -10
- package/dist/{chunk-FTTB64OJ.js → chunk-EBEFYSVZ.js} +40 -40
- package/dist/{chunk-L65WI4HO.js → chunk-EDU2OCIQ.js} +2 -2
- package/dist/{chunk-SWUQJ5VR.js → chunk-EOG4QKKV.js} +108 -65
- package/dist/chunk-EPDBWATV.js +38 -0
- package/dist/{chunk-5GM6BZO7.js → chunk-F66R7CPY.js} +6 -3
- package/dist/{chunk-7BMX2M3F.js → chunk-FFDHZVEL.js} +2 -2
- package/dist/{chunk-WGC42WJU.js → chunk-FWNJDD4U.js} +6 -2
- package/dist/{chunk-SI3PYDL4.js → chunk-GWA6UGNX.js} +22 -22
- package/dist/{chunk-QMFIZQTB.js → chunk-HIOJSYDA.js} +7 -5
- package/dist/{chunk-NHQ7HUAS.js → chunk-HJ5DKZPO.js} +12 -10
- package/dist/{chunk-FPRMP6YA.js → chunk-HJZ4OET2.js} +32 -17
- package/dist/{chunk-N5NQIZ56.js → chunk-HLTVEXML.js} +25 -25
- package/dist/{chunk-6IN4F4RH.js → chunk-I6DFQQER.js} +42 -44
- package/dist/chunk-ICLB27PZ.js +11 -0
- package/dist/{chunk-R3XI2VC7.js → chunk-IDJGV6VM.js} +2 -1
- package/dist/{chunk-ZM27UI5O.js → chunk-IEK2FUWO.js} +19 -6
- package/dist/{chunk-FJ57274M.js → chunk-IIEI7VK5.js} +15 -1
- package/dist/{chunk-DY7KDZUF.js → chunk-IZK2H4KU.js} +3 -3
- package/dist/{chunk-CRLVJZWX.js → chunk-JOG6W3VS.js} +2 -2
- package/dist/{chunk-XFXJXLK7.js → chunk-JTLLQT34.js} +19 -19
- package/dist/{chunk-MS5574I7.js → chunk-K3K7JHZI.js} +2 -2
- package/dist/{chunk-GOW5VO6M.js → chunk-KHRZCKKG.js} +2 -2
- package/dist/{chunk-D3B6YEZK.js → chunk-KIF4UFD2.js} +20 -16
- package/dist/{chunk-EUVUOPRC.js → chunk-KYK6PMB5.js} +55 -34
- package/dist/{chunk-RU2HHHYA.js → chunk-LD2JSKU3.js} +12 -2
- package/dist/{chunk-CYMYZYLI.js → chunk-LJ7X6ZNV.js} +25 -28
- package/dist/{chunk-ICVIJLBA.js → chunk-LLYHYPYG.js} +4 -4
- package/dist/{chunk-VRPV6QXR.js → chunk-LLZVRWVS.js} +2 -2
- package/dist/{chunk-Z7KVOVE4.js → chunk-LXTMP3VT.js} +7 -4
- package/dist/{chunk-7CXW6EGX.js → chunk-MDUCF376.js} +28 -26
- package/dist/{chunk-KWSBNLSC.js → chunk-MQAD75AY.js} +2 -2
- package/dist/{chunk-XCFIAGT7.js → chunk-MUTZSF2A.js} +17 -16
- package/dist/{chunk-CF3I5SOG.js → chunk-NVI5G57O.js} +29 -27
- package/dist/{chunk-76LHNLGX.js → chunk-O2HU4AQN.js} +34 -5
- package/dist/{chunk-46KVXDUJ.js → chunk-O5QG5IFV.js} +12 -3
- package/dist/{chunk-V4NHFY22.js → chunk-OLRVGPJ3.js} +33 -20
- package/dist/{chunk-WHWUVDYK.js → chunk-OM6XZAKM.js} +7 -7
- package/dist/{chunk-DSXWJAOA.js → chunk-OMN4F42L.js} +17 -15
- package/dist/{chunk-LM3HY3VG.js → chunk-P4U5GST7.js} +3 -3
- package/dist/{chunk-BH3BQICT.js → chunk-PKW4TLJC.js} +88 -44
- package/dist/{chunk-GRN44Z6A.js → chunk-PQR7E3LY.js} +2 -2
- package/dist/{chunk-SH4PPRU7.js → chunk-Q5KGGW7Z.js} +2 -2
- package/dist/{chunk-RV5A3EGI.js → chunk-QDHOIBHZ.js} +21 -20
- package/dist/{chunk-UH5YTZN7.js → chunk-QDTFFVLT.js} +113 -23
- package/dist/chunk-QFIXL3OK.js +68 -0
- package/dist/{chunk-QXMHBIQG.js → chunk-QGXH64FT.js} +52 -49
- package/dist/{chunk-VS2M72PF.js → chunk-RLJKH4ZO.js} +4 -2
- package/dist/{chunk-6ZZKEYBS.js → chunk-RN3DOUOU.js} +17 -15
- package/dist/{chunk-VBJCGGNF.js → chunk-RPP3NHKV.js} +2 -2
- package/dist/{chunk-RTTZIX34.js → chunk-RVWWCQAB.js} +3 -3
- package/dist/{chunk-FR5EVD2X.js → chunk-RWF7TCGT.js} +68 -38
- package/dist/{chunk-LKS56RDT.js → chunk-S6GPBJWG.js} +2 -2
- package/dist/{chunk-UJBP57UJ.js → chunk-S7ZJEQPW.js} +4 -4
- package/dist/{chunk-3H4PDNP4.js → chunk-SEOM2BGQ.js} +3 -3
- package/dist/{chunk-5PFNUDXR.js → chunk-T3EW35M2.js} +3 -3
- package/dist/{chunk-3SP6G4LN.js → chunk-TPQ6Q7JP.js} +3 -3
- package/dist/{chunk-B52RL5VV.js → chunk-ULUZBEFO.js} +11 -11
- package/dist/{chunk-F4X5NVKY.js → chunk-UNYOWKEC.js} +13 -4
- package/dist/{chunk-DEW62ON3.js → chunk-VSPNH7LC.js} +2 -2
- package/dist/{chunk-C2WH3BMS.js → chunk-VTWUHX4H.js} +10 -7
- package/dist/{chunk-DJL5PO27.js → chunk-W4MC3KP6.js} +2 -2
- package/dist/{chunk-MU3CJPJF.js → chunk-W6DBWWPC.js} +3 -3
- package/dist/{chunk-JLODGGN2.js → chunk-WC72PTV4.js} +3 -3
- package/dist/{chunk-NCT22MOD.js → chunk-WMIKC5XO.js} +2 -2
- package/dist/{chunk-H7BYMIVK.js → chunk-WY4L675I.js} +70 -44
- package/dist/chunk-XBJJP2HN.js +37 -0
- package/dist/{chunk-KRTLS3G6.js → chunk-XDEEYDPQ.js} +4 -4
- package/dist/{chunk-S5P5Z5Y5.js → chunk-XNAMWOPJ.js} +3 -3
- package/dist/{chunk-2MTM4E6M.js → chunk-XND5JIJA.js} +68 -65
- package/dist/{chunk-S6OXNZBM.js → chunk-XWC4RQ7T.js} +4 -4
- package/dist/{chunk-UCZBRGJN.js → chunk-XXLAZQ5E.js} +2 -2
- package/dist/{chunk-LXXVHLTH.js → chunk-Y22BJKMK.js} +3 -3
- package/dist/{chunk-OO2L2LWV.js → chunk-Y2KFQX5K.js} +89 -66
- package/dist/{chunk-TI4YUUW6.js → chunk-Y3OLUMJH.js} +31 -30
- package/dist/{chunk-CIWFL2LM.js → chunk-Y3RYIGHZ.js} +17 -15
- package/dist/{chunk-MTGGOCND.js → chunk-YC6GVLTI.js} +61 -10
- package/dist/{chunk-TKIPK5P6.js → chunk-YD2HPT7W.js} +5 -7
- package/dist/{chunk-3O7ZYVJV.js → chunk-YPVP6I62.js} +19 -15
- package/dist/{chunk-FF7LRT5L.js → chunk-YQIZIKCK.js} +35 -27
- package/dist/{chunk-M526IKKH.js → chunk-Z4COUG7H.js} +2 -2
- package/dist/{chunk-LTTZX6RD.js → chunk-Z5ZCTCX4.js} +3 -3
- package/dist/{chunk-QOVM5VRC.js → chunk-ZASX45SU.js} +3 -3
- package/dist/{chunk-W7UBPARG.js → chunk-ZH3BWGTE.js} +3 -3
- package/dist/{chunk-TN754B3R.js → chunk-ZZZJVDIL.js} +2 -2
- package/dist/clock.js +11 -5
- package/dist/completion-registry.js +3 -3
- package/dist/countdown.js +26 -20
- package/dist/{d3-BiaJtaSw.d.ts → d3-Bje6Mla1.d.ts} +1 -1
- package/dist/dgmo-router-OXFV43XX.js +90 -0
- package/dist/{dgmo-router-BwXHZ_P3.d.ts → dgmo-router-zWf4Uxxg.d.ts} +1 -1
- package/dist/dimensions-AN34SPVX.js +22 -0
- package/dist/{flowchart-parser-NVBP3C5D.js → flowchart-parser-MRNAVG35.js} +4 -4
- package/dist/flowchart-renderer-IGSKJFMF.js +37 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +75 -60
- package/dist/{layout-Y2V3LYV7.js → layout-5AYAYUJH.js} +2 -2
- package/dist/{layout-ZAGUFT2G.js → layout-6APS2RRG.js} +8 -7
- package/dist/{layout-B5GQVXXY.js → layout-6VUNAH6F.js} +8 -7
- package/dist/{layout-RV2T2YTT.js → layout-74HDWQYG.js} +6 -5
- package/dist/{layout-6SKHNQYO.js → layout-FCIYZV63.js} +4 -4
- package/dist/{layout-4LNMXLVK.js → layout-J2Z2SYH5.js} +3 -3
- package/dist/layout-LELNMRM5.js +16 -0
- package/dist/{layout-EM4DLMAX.js → layout-OPF6KTOH.js} +5 -5
- package/dist/layout-SUND6B7D.js +9 -0
- package/dist/layout-WASEHV3S.js +19 -0
- package/dist/{layout-SGYR6HBX.js → layout-XAJLQPI6.js} +3 -3
- package/dist/layout-XY45TFJ4.js +16 -0
- package/dist/layout-YPRXVCW5.js +19 -0
- package/dist/{layout-2OJ25STS.js → layout-ZJOWB27N.js} +9 -8
- package/dist/{layout-search-UOKEMER5.js → layout-search-3JKNSUTJ.js} +8 -7
- package/dist/{legend-constants-PLN2YHGM.js → legend-constants-RSWFR3L6.js} +4 -4
- package/dist/{palettes-54YSI3IX.js → palettes-IAF6WVL4.js} +5 -3
- package/dist/{parser-QOIZGW7I.js → parser-2Y7LWKNO.js} +4 -4
- package/dist/{parser-EQ4I3TSH.js → parser-4GUQUDAC.js} +5 -5
- package/dist/{parser-TA5TYZNL.js → parser-4OXANARZ.js} +5 -5
- package/dist/{parser-L7T7FY3H.js → parser-56UEMRXS.js} +4 -4
- package/dist/{parser-2GMHFSTS.js → parser-66QZQYGE.js} +4 -4
- package/dist/{parser-3AOMUX5D.js → parser-6SS7DKVW.js} +4 -4
- package/dist/{parser-QYAIFXLP.js → parser-AYURCBDZ.js} +4 -4
- package/dist/{parser-5XFGK5C5.js → parser-COPCQEHV.js} +6 -6
- package/dist/{parser-F4ZKDGUZ.js → parser-DEWJM5PX.js} +3 -3
- package/dist/{parser-ZXQZZK6W.js → parser-DQKZDA2J.js} +4 -3
- package/dist/{parser-WCFG3DZA.js → parser-EMPM3V35.js} +3 -3
- package/dist/{parser-6FUESG4N.js → parser-EP2JQJNV.js} +4 -4
- package/dist/{parser-ZYAFHXKQ.js → parser-FDDHTBRV.js} +4 -4
- package/dist/{parser-3KQONLXZ.js → parser-FDESUQ32.js} +3 -3
- package/dist/{parser-LV7PQBUG.js → parser-GK6CMK4P.js} +4 -4
- package/dist/{parser-WVE6SKB7.js → parser-H33OKBUB.js} +4 -4
- package/dist/{parser-ML3LVNDV.js → parser-HJBSWTDY.js} +4 -4
- package/dist/{parser-PR3OR3LO.js → parser-HRIKI5O3.js} +5 -5
- package/dist/{parser-H4ZUNLX4.js → parser-I77632XB.js} +3 -3
- package/dist/{parser-YWQCC33R.js → parser-JGMQE7FS.js} +4 -4
- package/dist/{parser-WMJEPZDC.js → parser-JIPG576H.js} +4 -4
- package/dist/{parser-E3OHNNTH.js → parser-JNJ2IFSO.js} +4 -4
- package/dist/{parser-CJNP7RKR.js → parser-LCUQTABE.js} +4 -4
- package/dist/{parser-4DLU4SNG.js → parser-LXU3MGG6.js} +3 -3
- package/dist/{parser-WWRRG2DV.js → parser-N4YB5EIZ.js} +4 -4
- package/dist/{parser-XVSDFO56.js → parser-NC36PRBR.js} +3 -3
- package/dist/{parser-RDBXEVI4.js → parser-O6WYAXTS.js} +4 -4
- package/dist/{parser-4KFJKLP2.js → parser-UHABNZBC.js} +3 -3
- package/dist/{parser-GCVSRQPY.js → parser-V6HULGXW.js} +4 -4
- package/dist/{parser-UTR5WE4O.js → parser-VVWZIMYS.js} +4 -4
- package/dist/{parser-B2XQNHZM.js → parser-YJGTPT7A.js} +3 -3
- package/dist/{parser-WQNT7T2P.js → parser-YQ5F7ATB.js} +3 -3
- package/dist/{parser-ZT3PU2HT.js → parser-ZUH2G7J2.js} +4 -4
- package/dist/renderer-2ZGZSSCV.js +39 -0
- package/dist/renderer-33AB7UAZ.js +35 -0
- package/dist/renderer-43KEDLTQ.js +23 -0
- package/dist/renderer-4E6NNPNU.js +29 -0
- package/dist/renderer-4HFT4HJG.js +39 -0
- package/dist/renderer-63MHARNI.js +20 -0
- package/dist/renderer-6HPV7BMG.js +23 -0
- package/dist/renderer-BVJ3NVRB.js +20 -0
- package/dist/renderer-DV44AS75.js +28 -0
- package/dist/renderer-FLLVGYUY.js +30 -0
- package/dist/renderer-FSV7MTW3.js +17 -0
- package/dist/renderer-H6XEVHKH.js +27 -0
- package/dist/renderer-HNEMQJXT.js +21 -0
- package/dist/{renderer-CVWQD442.js → renderer-IIN3RY4F.js} +6 -5
- package/dist/renderer-K2OWHNBV.js +25 -0
- package/dist/renderer-M6UIXQHH.js +27 -0
- package/dist/renderer-N5CRYFBI.js +31 -0
- package/dist/{renderer-VF7X66SL.js → renderer-O3O6A3RY.js} +16 -16
- package/dist/renderer-OVRX36WE.js +39 -0
- package/dist/renderer-PLKMHBAB.js +30 -0
- package/dist/{renderer-G2DPKJAN.js → renderer-REHVBQ57.js} +17 -16
- package/dist/{renderer-GHBF5PRH.js → renderer-RW446FGL.js} +6 -5
- package/dist/renderer-SJV75NUI.js +28 -0
- package/dist/renderer-TKWW45LZ.js +36 -0
- package/dist/{renderer-FTX67CYZ.js → renderer-UHLTPQTW.js} +7 -6
- package/dist/renderer-UNYFAMFE.js +16 -0
- package/dist/renderer-URXHBQOF.js +26 -0
- package/dist/renderer-VBAQQWDB.js +25 -0
- package/dist/renderer-VI72MVFW.js +77 -0
- package/dist/renderer-XGJIACBV.js +25 -0
- package/dist/renderer-XVTKGPYT.js +20 -0
- package/dist/{renderer-R5HIRN2M.js → renderer-YLIICO4R.js} +9 -9
- package/dist/renderer-ZG6GPWZF.js +27 -0
- package/dist/renderer-radial-7UHFYOOL.js +21 -0
- package/dist/{state-parser-TPA67IXM.js → state-parser-XT4ZPQAF.js} +5 -5
- package/dist/state-renderer-6TVII5ZJ.js +41 -0
- package/dist/{tag-groups-BAtkq0b_.d.ts → tag-groups-DIJV_50B.d.ts} +18 -9
- package/dist/{themes-DpsyRSO7.d.ts → themes-Bgkyh6gh.d.ts} +2 -2
- package/docs/architecture-report.md +3 -3
- package/docs/language-reference.md +128 -30
- package/docs/migration-sequence-color-to-tags.md +16 -8
- package/package.json +7 -6
- package/dist/charts-d3-HMEMHSSW.js +0 -29
- package/dist/chunk-53SEVJQM.js +0 -9
- package/dist/chunk-LP7EC4MI.js +0 -16
- package/dist/chunk-YM5RMLFO.js +0 -40
- package/dist/dgmo-router-A3LIHT6H.js +0 -89
- package/dist/dimensions-OFF4GRFL.js +0 -22
- package/dist/flowchart-renderer-BBJUPORB.js +0 -36
- package/dist/layout-5ILNODTP.js +0 -15
- package/dist/layout-IN53LAE6.js +0 -9
- package/dist/layout-KQUSB45X.js +0 -18
- package/dist/layout-ROORJQ4X.js +0 -18
- package/dist/layout-VUZ3MLOI.js +0 -15
- package/dist/renderer-2ANDPQWC.js +0 -16
- package/dist/renderer-2LDT4TUX.js +0 -25
- package/dist/renderer-2NYQDW37.js +0 -20
- package/dist/renderer-2RIIIO34.js +0 -39
- package/dist/renderer-3HFU3DTO.js +0 -25
- package/dist/renderer-4BF6ILP6.js +0 -27
- package/dist/renderer-5E2AH5TO.js +0 -38
- package/dist/renderer-62SLWRYF.js +0 -27
- package/dist/renderer-ANJUDBOS.js +0 -34
- package/dist/renderer-D6GJ6EVK.js +0 -30
- package/dist/renderer-DNFV2IQI.js +0 -36
- package/dist/renderer-EDVCGIQO.js +0 -76
- package/dist/renderer-EFQSMHID.js +0 -27
- package/dist/renderer-GZLRX764.js +0 -24
- package/dist/renderer-H2HYLFN3.js +0 -20
- package/dist/renderer-IR5655M7.js +0 -28
- package/dist/renderer-L237AOOZ.js +0 -16
- package/dist/renderer-LSJWYGOL.js +0 -39
- package/dist/renderer-LWXDMZOV.js +0 -28
- package/dist/renderer-MYSVPERC.js +0 -22
- package/dist/renderer-OL5QSZPC.js +0 -31
- package/dist/renderer-P26HH3NA.js +0 -30
- package/dist/renderer-RNFECJ5D.js +0 -21
- package/dist/renderer-RPZVNCTF.js +0 -26
- package/dist/renderer-SDNWZDUY.js +0 -23
- package/dist/renderer-UKHH4UWV.js +0 -25
- package/dist/renderer-Y3Y7PEUS.js +0 -20
- package/dist/renderer-radial-QNGCGKZP.js +0 -21
- package/dist/state-renderer-ELWDRXD6.js +0 -40
|
@@ -2,7 +2,10 @@ import {
|
|
|
2
2
|
computeQuadrantPointLabels,
|
|
3
3
|
rectCircleOverlap,
|
|
4
4
|
rectsOverlap
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-EDU2OCIQ.js";
|
|
6
|
+
import {
|
|
7
|
+
MIN_CANVAS_WIDTH
|
|
8
|
+
} from "./chunk-EPDBWATV.js";
|
|
6
9
|
import {
|
|
7
10
|
EXPORT_HEIGHT,
|
|
8
11
|
EXPORT_WIDTH,
|
|
@@ -11,38 +14,38 @@ import {
|
|
|
11
14
|
initD3Chart,
|
|
12
15
|
renderChartTitle,
|
|
13
16
|
resolveExportPalette
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4YSWUQKZ.js";
|
|
15
18
|
import {
|
|
16
19
|
layoutInlineHeader
|
|
17
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2F7AG7LA.js";
|
|
18
21
|
import {
|
|
19
22
|
TITLE_FONT_SIZE,
|
|
20
23
|
TITLE_FONT_WEIGHT,
|
|
21
24
|
TITLE_OFFSET,
|
|
22
25
|
TITLE_Y
|
|
23
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VSPNH7LC.js";
|
|
24
27
|
import {
|
|
25
28
|
computeLegendLayout
|
|
26
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LLZVRWVS.js";
|
|
27
30
|
import {
|
|
28
31
|
FONT_FAMILY
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ICLB27PZ.js";
|
|
30
33
|
import {
|
|
31
34
|
LEGEND_DOT_R,
|
|
32
35
|
LEGEND_ENTRY_FONT_SIZE,
|
|
33
36
|
LEGEND_HEIGHT,
|
|
34
37
|
LEGEND_PILL_FONT_SIZE,
|
|
35
38
|
legendChromeColors
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CKDYRVOC.js";
|
|
37
40
|
import {
|
|
38
41
|
measureText
|
|
39
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-YC6GVLTI.js";
|
|
40
43
|
import {
|
|
41
44
|
getExtendedChartLegendGroups,
|
|
42
45
|
getSimpleChartLegendGroups,
|
|
43
46
|
parseChart,
|
|
44
47
|
parseExtendedChart
|
|
45
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-Z4COUG7H.js";
|
|
46
49
|
import {
|
|
47
50
|
EMPHASIS_DIM_OPACITY,
|
|
48
51
|
EMPHASIS_DIM_TEXT_OPACITY,
|
|
@@ -50,7 +53,7 @@ import {
|
|
|
50
53
|
} from "./chunk-2CW5ZTNH.js";
|
|
51
54
|
import {
|
|
52
55
|
tagAttrKey
|
|
53
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-O2HU4AQN.js";
|
|
54
57
|
import {
|
|
55
58
|
contrastText,
|
|
56
59
|
getSegmentColors,
|
|
@@ -60,7 +63,93 @@ import {
|
|
|
60
63
|
mix,
|
|
61
64
|
shapeFill,
|
|
62
65
|
themeBaseBg
|
|
63
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-AMQFJ7P7.js";
|
|
67
|
+
|
|
68
|
+
// src/charts-d3/natural-size.ts
|
|
69
|
+
var UNCOUNTED_WIDTH = 720;
|
|
70
|
+
var MIN_NATURAL_WIDTH = MIN_CANVAS_WIDTH;
|
|
71
|
+
var STEP_PER_CATEGORY = 80;
|
|
72
|
+
var STEP_PER_SERIES_IN_GROUP = 28;
|
|
73
|
+
var STEP_PER_LINE_POINT = 48;
|
|
74
|
+
var STEP_PER_HEATMAP_COLUMN = 64;
|
|
75
|
+
var STEP_PER_SANKEY_DEPTH = 220;
|
|
76
|
+
var AXIS_FURNITURE = 120;
|
|
77
|
+
function clamp(w) {
|
|
78
|
+
return Math.round(Math.max(MIN_NATURAL_WIDTH, Math.min(EXPORT_WIDTH, w)));
|
|
79
|
+
}
|
|
80
|
+
function sankeyDepth(links) {
|
|
81
|
+
const targets = new Set(links.map((l) => l.target));
|
|
82
|
+
const roots = new Set(
|
|
83
|
+
links.map((l) => l.source).filter((n) => !targets.has(n))
|
|
84
|
+
);
|
|
85
|
+
if (roots.size === 0) return 2;
|
|
86
|
+
const next = /* @__PURE__ */ new Map();
|
|
87
|
+
for (const l of links)
|
|
88
|
+
next.set(l.source, [...next.get(l.source) ?? [], l.target]);
|
|
89
|
+
let depth = 1;
|
|
90
|
+
let level = [...roots];
|
|
91
|
+
const seen = new Set(level);
|
|
92
|
+
while (level.length > 0 && depth < 12) {
|
|
93
|
+
const following = level.flatMap((n) => next.get(n) ?? []).filter((n) => !seen.has(n));
|
|
94
|
+
if (following.length === 0) break;
|
|
95
|
+
following.forEach((n) => seen.add(n));
|
|
96
|
+
level = [...new Set(following)];
|
|
97
|
+
depth += 1;
|
|
98
|
+
}
|
|
99
|
+
return depth;
|
|
100
|
+
}
|
|
101
|
+
function naturalDataChartSize(content, palette) {
|
|
102
|
+
const width = naturalDataChartWidth(content, palette);
|
|
103
|
+
if (width === null) return null;
|
|
104
|
+
return {
|
|
105
|
+
width,
|
|
106
|
+
height: Math.round(width * EXPORT_HEIGHT / EXPORT_WIDTH)
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function naturalDataChartWidth(content, palette) {
|
|
110
|
+
const ext = parseExtendedChart(content, palette);
|
|
111
|
+
if (ext && !ext.error) {
|
|
112
|
+
switch (ext.type) {
|
|
113
|
+
case "heatmap": {
|
|
114
|
+
const cols = ext.columns?.length ?? 0;
|
|
115
|
+
if (cols === 0) return UNCOUNTED_WIDTH;
|
|
116
|
+
return clamp(AXIS_FURNITURE + cols * STEP_PER_HEATMAP_COLUMN);
|
|
117
|
+
}
|
|
118
|
+
case "sankey":
|
|
119
|
+
case "chord": {
|
|
120
|
+
const links = ext.links ?? [];
|
|
121
|
+
if (ext.type === "chord" || links.length === 0) return UNCOUNTED_WIDTH;
|
|
122
|
+
return clamp(sankeyDepth(links) * STEP_PER_SANKEY_DEPTH);
|
|
123
|
+
}
|
|
124
|
+
case "funnel":
|
|
125
|
+
case "scatter":
|
|
126
|
+
case "function":
|
|
127
|
+
return UNCOUNTED_WIDTH;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const std = parseChart(content, palette);
|
|
131
|
+
if (!std || std.error || std.data.length === 0) return null;
|
|
132
|
+
switch (std.type) {
|
|
133
|
+
case "pie":
|
|
134
|
+
case "radar":
|
|
135
|
+
case "polar-area":
|
|
136
|
+
return UNCOUNTED_WIDTH;
|
|
137
|
+
case "bar": {
|
|
138
|
+
if (std.orientation === "horizontal") return UNCOUNTED_WIDTH;
|
|
139
|
+
const series = Math.max(1, std.seriesNames?.length ?? 1);
|
|
140
|
+
const grouped = std.barLayout === "group" ? series : 1;
|
|
141
|
+
const step = Math.max(
|
|
142
|
+
STEP_PER_CATEGORY,
|
|
143
|
+
grouped * STEP_PER_SERIES_IN_GROUP
|
|
144
|
+
);
|
|
145
|
+
return clamp(AXIS_FURNITURE + std.data.length * step);
|
|
146
|
+
}
|
|
147
|
+
case "line":
|
|
148
|
+
return clamp(AXIS_FURNITURE + std.data.length * STEP_PER_LINE_POINT);
|
|
149
|
+
default:
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
64
153
|
|
|
65
154
|
// src/utils/legend-svg.ts
|
|
66
155
|
var CENTER = 'dominant-baseline="central"';
|
|
@@ -78,7 +167,7 @@ function emitCapsule(capsule, palette, groupBg, pillBorder) {
|
|
|
78
167
|
`<rect x="${pill.x}" y="${pill.y}" width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="none" stroke="${esc(pillBorder)}" stroke-width="0.75"/>`
|
|
79
168
|
);
|
|
80
169
|
inner.push(
|
|
81
|
-
`<text x="${pill.x + pill.width / 2}" y="${LEGEND_HEIGHT / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="
|
|
170
|
+
`<text x="${pill.x + pill.width / 2}" y="${LEGEND_HEIGHT / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="normal" fill="${esc(palette.text)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(capsule.groupName)}</text>`
|
|
82
171
|
);
|
|
83
172
|
for (const entry of capsule.entries) {
|
|
84
173
|
const label = entry.displayValue ?? entry.value;
|
|
@@ -90,7 +179,7 @@ function emitCapsule(capsule, palette, groupBg, pillBorder) {
|
|
|
90
179
|
return `<g transform="translate(${capsule.x},${capsule.y})" data-legend-group="${esc(tagAttrKey(capsule.groupName))}" style="cursor:pointer">${inner.join("")}</g>`;
|
|
91
180
|
}
|
|
92
181
|
function emitPill(pill, palette, groupBg) {
|
|
93
|
-
return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${pill.height / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="
|
|
182
|
+
return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${pill.height / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="normal" fill="${esc(palette.textMuted)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(pill.groupName)}</text></g>`;
|
|
94
183
|
}
|
|
95
184
|
function renderLegendSvg(groups, options) {
|
|
96
185
|
if (groups.length === 0) return { svg: "", height: 0, width: 0 };
|
|
@@ -261,11 +350,11 @@ function computeLeftMargin(yLabel, leftLabels) {
|
|
|
261
350
|
}
|
|
262
351
|
function drawXAxisTitle(svg, label, cx, y, textColor) {
|
|
263
352
|
if (!label) return;
|
|
264
|
-
svg.append("text").attr("x", cx).attr("y", y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight",
|
|
353
|
+
svg.append("text").attr("x", cx).attr("y", y).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", "bold").text(label);
|
|
265
354
|
}
|
|
266
355
|
function drawYAxisTitle(svg, label, cy, x, textColor) {
|
|
267
356
|
if (!label) return;
|
|
268
|
-
svg.append("text").attr("transform", `translate(${x},${cy}) rotate(-90)`).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight",
|
|
357
|
+
svg.append("text").attr("transform", `translate(${x},${cy}) rotate(-90)`).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", AXIS_LABEL_FONT).attr("font-family", FONT_FAMILY).attr("font-weight", "bold").text(label);
|
|
269
358
|
}
|
|
270
359
|
function tagDatum(sel, o) {
|
|
271
360
|
const cls = (sel.attr("class") ?? "").split(/\s+/).filter(Boolean);
|
|
@@ -855,7 +944,7 @@ function renderPie(svg, chart, width, height, palette, isDark, textColor, topIns
|
|
|
855
944
|
}
|
|
856
945
|
}
|
|
857
946
|
if (hasHole && !chart.noCenterTotal) {
|
|
858
|
-
g.append("text").attr("text-anchor", "middle").attr("y", Math.max(4, 8 * labelScale)).attr("fill", textColor).attr("font-size", Math.max(11, 26 * labelScale)).attr("font-weight",
|
|
947
|
+
g.append("text").attr("text-anchor", "middle").attr("y", Math.max(4, 8 * labelScale)).attr("fill", textColor).attr("font-size", Math.max(11, 26 * labelScale)).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(total));
|
|
859
948
|
}
|
|
860
949
|
}
|
|
861
950
|
|
|
@@ -1072,18 +1161,18 @@ function renderFunnel(svg, chart, width, height, colors, palette, isDark, topIns
|
|
|
1072
1161
|
const yMid = (y0 + y1) / 2;
|
|
1073
1162
|
const halfEdge = (topW + botW) / 4;
|
|
1074
1163
|
if (!chart.noName) {
|
|
1075
|
-
svg.append("text").attr("x", cx - halfEdge - PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "end").attr("fill", stroke).attr("font-size", sideFont).attr("font-weight",
|
|
1164
|
+
svg.append("text").attr("x", cx - halfEdge - PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "end").attr("fill", stroke).attr("font-size", sideFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(d.label);
|
|
1076
1165
|
}
|
|
1077
1166
|
const showPct = !chart.noPercent && i > 0;
|
|
1078
1167
|
const valueInside = valueInsideAt(plotW, i);
|
|
1079
1168
|
if (valueInside) {
|
|
1080
1169
|
const valueSize = valueSizeAt(plotW, i);
|
|
1081
1170
|
const valueFill = fillMode === "solid" ? contrastText(fill, palette.textOnFillLight, palette.textOnFillDark) : stroke;
|
|
1082
|
-
svg.append("text").attr("x", cx).attr("y", yMid + valueSize * 0.35).attr("text-anchor", "middle").attr("fill", valueFill).attr("font-size", valueSize).attr("font-weight",
|
|
1171
|
+
svg.append("text").attr("x", cx).attr("y", yMid + valueSize * 0.35).attr("text-anchor", "middle").attr("fill", valueFill).attr("font-size", valueSize).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(d.value));
|
|
1083
1172
|
}
|
|
1084
1173
|
const showValueRight = !chart.noValue && !valueInside;
|
|
1085
1174
|
if (showValueRight || showPct) {
|
|
1086
|
-
const text = svg.append("text").attr("x", cx + halfEdge + PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "start").attr("font-size", sideFont).attr("font-weight",
|
|
1175
|
+
const text = svg.append("text").attr("x", cx + halfEdge + PAD).attr("y", yMid + sideFont * 0.35).attr("text-anchor", "start").attr("font-size", sideFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY);
|
|
1087
1176
|
if (showValueRight) {
|
|
1088
1177
|
text.append("tspan").attr("fill", stroke).text(fmtNum(d.value));
|
|
1089
1178
|
}
|
|
@@ -1183,7 +1272,7 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
|
|
|
1183
1272
|
color: ramp
|
|
1184
1273
|
});
|
|
1185
1274
|
if (!chart.noValue) {
|
|
1186
|
-
const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(ramp)).attr("font-size", cellFont).attr("font-weight",
|
|
1275
|
+
const label = svg.append("text").attr("x", left + ci * cw + cw / 2).attr("y", top + ri * ch + ch / 2 + cellFont / 3).attr("text-anchor", "middle").attr("fill", labelTint(ramp)).attr("font-size", cellFont).attr("font-weight", "bold").attr("font-family", FONT_FAMILY).text(fmtNum(v));
|
|
1187
1276
|
tagDatum(label, {
|
|
1188
1277
|
line: row.lineNumber,
|
|
1189
1278
|
key: cellKey,
|
|
@@ -1909,8 +1998,9 @@ function firstNonCommentToken(content) {
|
|
|
1909
1998
|
async function renderDataChartD3(content, theme, palette, dims) {
|
|
1910
1999
|
const effectivePalette = await resolveExportPalette(theme, palette);
|
|
1911
2000
|
const isDark = theme === "dark";
|
|
1912
|
-
const
|
|
1913
|
-
const
|
|
2001
|
+
const natural = naturalDataChartSize(content, effectivePalette);
|
|
2002
|
+
const w = dims?.width && dims.width > 0 ? Math.round(dims.width) : natural?.width ?? EXPORT_WIDTH;
|
|
2003
|
+
const h = dims?.height && dims.height > 0 ? Math.round(dims.height) : dims?.width && dims.width > 0 ? Math.round(w * EXPORT_HEIGHT / EXPORT_WIDTH) : natural?.height ?? EXPORT_HEIGHT;
|
|
1914
2004
|
const container = createExportContainer(w, h);
|
|
1915
2005
|
const init = initD3Chart(container, effectivePalette, {
|
|
1916
2006
|
width: w,
|
|
@@ -2151,4 +2241,4 @@ export {
|
|
|
2151
2241
|
supportsD3DataChart,
|
|
2152
2242
|
renderDataChartD3
|
|
2153
2243
|
};
|
|
2154
|
-
//# sourceMappingURL=chunk-
|
|
2244
|
+
//# sourceMappingURL=chunk-QDTFFVLT.js.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
serializeSvg
|
|
3
|
+
} from "./chunk-LD2JSKU3.js";
|
|
4
|
+
import {
|
|
5
|
+
FONT_FAMILY
|
|
6
|
+
} from "./chunk-ICLB27PZ.js";
|
|
7
|
+
|
|
8
|
+
// src/utils/export-container.ts
|
|
9
|
+
function runInExportContainer(width, height, fn) {
|
|
10
|
+
const container = document.createElement("div");
|
|
11
|
+
container.style.width = `${width}px`;
|
|
12
|
+
container.style.height = `${height}px`;
|
|
13
|
+
container.style.position = "absolute";
|
|
14
|
+
container.style.left = "-9999px";
|
|
15
|
+
document.body.appendChild(container);
|
|
16
|
+
try {
|
|
17
|
+
return fn(container);
|
|
18
|
+
} finally {
|
|
19
|
+
document.body.removeChild(container);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function paintRootBackground(svgEl, theme, bg) {
|
|
23
|
+
if (theme === "transparent") return;
|
|
24
|
+
const vb = (svgEl.getAttribute("viewBox") ?? "").trim().split(/[\s,]+/);
|
|
25
|
+
if (vb.length !== 4) return;
|
|
26
|
+
const [x, y, w, h] = vb.map(Number);
|
|
27
|
+
if (!Number.isFinite(w) || !Number.isFinite(h) || w <= 0 || h <= 0) return;
|
|
28
|
+
const want = bg.trim().toLowerCase();
|
|
29
|
+
for (const rect2 of Array.from(svgEl.querySelectorAll(":scope > rect"))) {
|
|
30
|
+
const fill = (rect2.getAttribute("fill") ?? "").trim().toLowerCase();
|
|
31
|
+
if (fill !== want) continue;
|
|
32
|
+
if (Number(rect2.getAttribute("width")) !== w) continue;
|
|
33
|
+
if (Number(rect2.getAttribute("height")) !== h) continue;
|
|
34
|
+
rect2.remove();
|
|
35
|
+
}
|
|
36
|
+
const rect = svgEl.ownerDocument.createElementNS(
|
|
37
|
+
"http://www.w3.org/2000/svg",
|
|
38
|
+
"rect"
|
|
39
|
+
);
|
|
40
|
+
rect.setAttribute("class", "dgmo-canvas-bg");
|
|
41
|
+
rect.setAttribute("x", String(x));
|
|
42
|
+
rect.setAttribute("y", String(y));
|
|
43
|
+
rect.setAttribute("width", String(w));
|
|
44
|
+
rect.setAttribute("height", String(h));
|
|
45
|
+
rect.setAttribute("fill", bg);
|
|
46
|
+
svgEl.insertBefore(rect, svgEl.firstChild);
|
|
47
|
+
}
|
|
48
|
+
function extractExportSvg(container, theme, palette) {
|
|
49
|
+
const svgEl = container.querySelector("svg");
|
|
50
|
+
if (!svgEl) return "";
|
|
51
|
+
if (theme === "transparent") {
|
|
52
|
+
svgEl.style.background = "none";
|
|
53
|
+
} else if (palette && !svgEl.style.background) {
|
|
54
|
+
svgEl.style.background = palette.bg;
|
|
55
|
+
}
|
|
56
|
+
svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
|
|
57
|
+
svgEl.style.fontFamily = FONT_FAMILY;
|
|
58
|
+
svgEl.querySelectorAll("[data-export-ignore]").forEach((el) => el.remove());
|
|
59
|
+
if (palette) paintRootBackground(svgEl, theme, palette.bg);
|
|
60
|
+
return serializeSvg(svgEl);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export {
|
|
64
|
+
runInExportContainer,
|
|
65
|
+
paintRootBackground,
|
|
66
|
+
extractExportSvg
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=chunk-QFIXL3OK.js.map
|
|
@@ -5,18 +5,23 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
ScaleContext
|
|
7
7
|
} from "./chunk-24YPR5EH.js";
|
|
8
|
+
import {
|
|
9
|
+
EDGE_DASH,
|
|
10
|
+
GRID_DASH,
|
|
11
|
+
scaleDash
|
|
12
|
+
} from "./chunk-IIEI7VK5.js";
|
|
8
13
|
import {
|
|
9
14
|
createTooltip,
|
|
10
15
|
hideTooltip,
|
|
11
16
|
renderChartTitle,
|
|
12
17
|
showTooltip
|
|
13
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-4YSWUQKZ.js";
|
|
14
19
|
import {
|
|
15
20
|
renderIntegratedLegend
|
|
16
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-253E5ISJ.js";
|
|
17
22
|
import {
|
|
18
23
|
FONT_FAMILY
|
|
19
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-ICLB27PZ.js";
|
|
20
25
|
import {
|
|
21
26
|
LEGEND_CAPSULE_PAD,
|
|
22
27
|
LEGEND_DOT_R,
|
|
@@ -29,35 +34,33 @@ import {
|
|
|
29
34
|
legendChromeColors,
|
|
30
35
|
measureLegendText,
|
|
31
36
|
truncateLegendText
|
|
32
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-CKDYRVOC.js";
|
|
33
38
|
import {
|
|
34
39
|
parseTimelineDate
|
|
35
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-XXLAZQ5E.js";
|
|
36
41
|
import {
|
|
37
42
|
resolveTagColor,
|
|
38
43
|
tagAttrKey
|
|
39
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-O2HU4AQN.js";
|
|
45
|
+
import {
|
|
46
|
+
DEFAULT_PALETTE_ID,
|
|
47
|
+
getPalette
|
|
48
|
+
} from "./chunk-IDJGV6VM.js";
|
|
40
49
|
import {
|
|
50
|
+
getEraColors,
|
|
41
51
|
getSeriesColors,
|
|
42
52
|
mix,
|
|
43
53
|
shapeFill,
|
|
44
54
|
themeBaseBg
|
|
45
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-AMQFJ7P7.js";
|
|
46
56
|
|
|
47
57
|
// src/timeline/renderer.ts
|
|
48
58
|
import * as d3Scale from "d3-scale";
|
|
49
59
|
import * as d3Selection from "d3-selection";
|
|
50
|
-
function getEraColors(palette) {
|
|
51
|
-
return [
|
|
52
|
-
palette.colors.blue,
|
|
53
|
-
palette.colors.green,
|
|
54
|
-
palette.colors.yellow,
|
|
55
|
-
palette.colors.orange,
|
|
56
|
-
palette.colors.purple
|
|
57
|
-
];
|
|
58
|
-
}
|
|
59
60
|
function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter, onLeave, hasScale = false, _tooltip = null, palette, reservedLabelY, fillMode, outlineBg) {
|
|
60
|
-
const eraColors =
|
|
61
|
+
const eraColors = getEraColors(
|
|
62
|
+
palette ?? getPalette(DEFAULT_PALETTE_ID).light
|
|
63
|
+
);
|
|
61
64
|
eras.forEach((era, i) => {
|
|
62
65
|
const startVal = parseTimelineDate(era.startDate);
|
|
63
66
|
const endVal = parseTimelineDate(era.endDate);
|
|
@@ -84,7 +87,7 @@ function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter
|
|
|
84
87
|
applyEraFill(
|
|
85
88
|
eraG.append("rect").attr("x", 0).attr("y", y).attr("width", innerWidth).attr("height", h)
|
|
86
89
|
);
|
|
87
|
-
labelEl = eraG.append("text").attr("x", 6).attr("y", y + 18).attr("text-anchor", "start").attr("fill", color).attr("font-size",
|
|
90
|
+
labelEl = eraG.append("text").attr("x", 6).attr("y", y + 18).attr("text-anchor", "start").attr("fill", color).attr("font-size", 13).attr("font-weight", "bold").attr("opacity", 0.8).text(displayLabel);
|
|
88
91
|
} else {
|
|
89
92
|
const x = Math.min(start, end);
|
|
90
93
|
const w = Math.abs(end - start);
|
|
@@ -99,7 +102,7 @@ function renderEras(g, eras, scale, isVertical, innerWidth, innerHeight, onEnter
|
|
|
99
102
|
displayLabel = truncateLegendText(era.label, 13, maxW, { bold: true });
|
|
100
103
|
truncated = displayLabel !== era.label;
|
|
101
104
|
}
|
|
102
|
-
labelEl = eraG.append("text").attr("x", x + w / 2).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
105
|
+
labelEl = eraG.append("text").attr("x", x + w / 2).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 13).attr("font-weight", "bold").attr("opacity", 0.8).text(displayLabel);
|
|
103
106
|
}
|
|
104
107
|
eraG.on("mouseenter", function() {
|
|
105
108
|
onEnter(startVal, endVal);
|
|
@@ -135,8 +138,8 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
135
138
|
};
|
|
136
139
|
const markerG = g.append("g").attr("class", "tl-marker").attr("data-marker-date", String(dateVal)).attr("data-line-number", String(marker.lineNumber)).style("cursor", "pointer");
|
|
137
140
|
if (isVertical) {
|
|
138
|
-
markerG.append("line").attr("x1", 0).attr("y1", pos).attr("x2", innerWidth).attr("y2", pos).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
139
|
-
markerG.append("text").attr("x", -diamondSize - 8).attr("y", pos - diamondSize - 4).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
141
|
+
markerG.append("line").attr("x1", 0).attr("y1", pos).attr("x2", innerWidth).attr("y2", pos).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray", EDGE_DASH).attr("opacity", lineOpacity);
|
|
142
|
+
markerG.append("text").attr("x", -diamondSize - 8).attr("y", pos - diamondSize - 4).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 11).attr("font-weight", "bold").text(marker.label);
|
|
140
143
|
applyDiamondFill(
|
|
141
144
|
markerG.append("path").attr(
|
|
142
145
|
"d",
|
|
@@ -169,14 +172,14 @@ function renderMarkers(g, markers, scale, isVertical, innerWidth, innerHeight, o
|
|
|
169
172
|
});
|
|
170
173
|
truncated = displayLabel !== marker.label;
|
|
171
174
|
}
|
|
172
|
-
const labelEl = markerG.append("text").attr("x", pos).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size",
|
|
175
|
+
const labelEl = markerG.append("text").attr("x", pos).attr("y", labelY).attr("text-anchor", "middle").attr("fill", color).attr("font-size", 11).attr("font-weight", "bold").text(displayLabel);
|
|
173
176
|
applyDiamondFill(
|
|
174
177
|
markerG.append("path").attr(
|
|
175
178
|
"d",
|
|
176
179
|
`M${pos},${diamondY - diamondSize} l${diamondSize},${diamondSize} l-${diamondSize},${diamondSize} l-${diamondSize},-${diamondSize} Z`
|
|
177
180
|
)
|
|
178
181
|
);
|
|
179
|
-
markerG.append("line").attr("x1", pos).attr("y1", lineTop).attr("x2", pos).attr("y2", innerHeight).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
182
|
+
markerG.append("line").attr("x1", pos).attr("y1", lineTop).attr("x2", pos).attr("y2", innerHeight).attr("stroke", color).attr("stroke-width", 1.5).attr("stroke-dasharray", EDGE_DASH).attr("opacity", lineOpacity);
|
|
180
183
|
markerG.on("mouseenter", function() {
|
|
181
184
|
onEnter(dateVal);
|
|
182
185
|
if (truncated) labelEl.text(marker.label);
|
|
@@ -238,17 +241,17 @@ function renderTimeScale(g, scale, isVertical, innerWidth, innerHeight, textColo
|
|
|
238
241
|
const guideOpacity = 0.15;
|
|
239
242
|
for (const tick of ticks) {
|
|
240
243
|
if (isVertical) {
|
|
241
|
-
g.append("line").attr("x1", 0).attr("y1", tick.pos).attr("x2", innerWidth).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray",
|
|
244
|
+
g.append("line").attr("x1", 0).attr("y1", tick.pos).attr("x2", innerWidth).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray", GRID_DASH).attr("opacity", guideOpacity);
|
|
242
245
|
g.append("line").attr("x1", -tickLen).attr("y1", tick.pos).attr("x2", 0).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
243
|
-
g.append("text").attr("x", -tickLen - 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", textColor).attr("font-size",
|
|
246
|
+
g.append("text").attr("x", -tickLen - 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
244
247
|
g.append("line").attr("x1", innerWidth).attr("y1", tick.pos).attr("x2", innerWidth + tickLen).attr("y2", tick.pos).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
245
|
-
g.append("text").attr("x", innerWidth + tickLen + 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
248
|
+
g.append("text").attr("x", innerWidth + tickLen + 3).attr("y", tick.pos).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
246
249
|
} else {
|
|
247
|
-
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", 0).attr("x2", tick.pos).attr("y2", innerHeight).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray",
|
|
250
|
+
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", 0).attr("x2", tick.pos).attr("y2", innerHeight).attr("stroke", textColor).attr("stroke-width", 1).attr("stroke-dasharray", GRID_DASH).attr("opacity", guideOpacity);
|
|
248
251
|
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", innerHeight).attr("x2", tick.pos).attr("y2", innerHeight + tickLen).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
249
|
-
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size",
|
|
252
|
+
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
250
253
|
g.append("line").attr("class", "tl-scale-tick").attr("x1", tick.pos).attr("y1", -tickLen).attr("x2", tick.pos).attr("y2", 0).attr("stroke", textColor).attr("stroke-width", 1).attr("opacity", opacity);
|
|
251
|
-
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size",
|
|
254
|
+
g.append("text").attr("class", "tl-scale-tick").attr("x", tick.pos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", textColor).attr("font-size", 10).attr("opacity", opacity).text(tick.label);
|
|
252
255
|
}
|
|
253
256
|
}
|
|
254
257
|
}
|
|
@@ -257,15 +260,15 @@ function showEventDatesOnScale(g, scale, startDate, endDate, innerHeight, accent
|
|
|
257
260
|
const tickLen = 6;
|
|
258
261
|
const startPos = scale(parseTimelineDate(startDate));
|
|
259
262
|
const startLabel = formatDateLabel(startDate);
|
|
260
|
-
g.append("line").attr("class", "tl-event-date").attr("x1", startPos).attr("y1", -tickLen).attr("x2", startPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
261
|
-
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
262
|
-
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
263
|
+
g.append("line").attr("class", "tl-event-date").attr("x1", startPos).attr("y1", -tickLen).attr("x2", startPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray", GRID_DASH).attr("opacity", 0.6);
|
|
264
|
+
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(startLabel);
|
|
265
|
+
g.append("text").attr("class", "tl-event-date").attr("x", startPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(startLabel);
|
|
263
266
|
if (endDate) {
|
|
264
267
|
const endPos = scale(parseTimelineDate(endDate));
|
|
265
268
|
const endLabel = formatDateLabel(endDate);
|
|
266
|
-
g.append("line").attr("class", "tl-event-date").attr("x1", endPos).attr("y1", -tickLen).attr("x2", endPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray",
|
|
267
|
-
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
268
|
-
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size",
|
|
269
|
+
g.append("line").attr("class", "tl-event-date").attr("x1", endPos).attr("y1", -tickLen).attr("x2", endPos).attr("y2", innerHeight).attr("stroke", accentColor).attr("stroke-width", 1.5).attr("stroke-dasharray", GRID_DASH).attr("opacity", 0.6);
|
|
270
|
+
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", -tickLen - 4).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(endLabel);
|
|
271
|
+
g.append("text").attr("class", "tl-event-date").attr("x", endPos).attr("y", innerHeight + tickLen + 12).attr("text-anchor", "middle").attr("fill", accentColor).attr("font-size", 10).attr("font-weight", "bold").text(endLabel);
|
|
269
272
|
}
|
|
270
273
|
}
|
|
271
274
|
function hideEventDatesOnScale(g) {
|
|
@@ -296,7 +299,7 @@ function renderTimelineGroupLegend(g, groups, groupColorMap, textColor, palette,
|
|
|
296
299
|
const itemG = g.append("g").attr("class", "tl-legend-item").attr("data-group", grp.name).style("cursor", "pointer").on("mouseenter", () => onHover(grp.name)).on("mouseleave", () => onLeave());
|
|
297
300
|
itemG.append("rect").attr("x", legendX).attr("y", legendY - PILL_H / 2).attr("width", pillW).attr("height", PILL_H).attr("rx", PILL_H / 2).attr("fill", pillBg);
|
|
298
301
|
itemG.append("circle").attr("cx", legendX + PAD_X + DOT_R).attr("cy", legendY).attr("r", DOT_R).attr("fill", color);
|
|
299
|
-
itemG.append("text").attr("x", legendX + PAD_X + DOT_R * 2 + DOT_GAP).attr("y", legendY).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
302
|
+
itemG.append("text").attr("x", legendX + PAD_X + DOT_R * 2 + DOT_GAP).attr("y", legendY).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", FONT_SIZE).attr("font-family", FONT_FAMILY).text(grp.name);
|
|
300
303
|
legendX += pillW + GAP;
|
|
301
304
|
}
|
|
302
305
|
}
|
|
@@ -933,13 +936,13 @@ function renderTimelineHorizontalTimeSort(container, parsed, palette, isDark, se
|
|
|
933
936
|
}
|
|
934
937
|
evG.append("rect").attr("x", x).attr("y", y - sBarH / 2).attr("width", rectW).attr("height", sBarH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
935
938
|
if (labelFitsInside) {
|
|
936
|
-
evG.append("text").attr("x", x + ctx.aesthetic(8)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
939
|
+
evG.append("text").attr("x", x + ctx.aesthetic(8)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
937
940
|
} else {
|
|
938
941
|
const sLabelGap = ctx.aesthetic(6);
|
|
939
942
|
const wouldFlipLeft = x + rectW > innerWidth * 0.6;
|
|
940
943
|
const labelFitsLeft = x - sLabelGap - estLabelWidth > 0;
|
|
941
944
|
const flipLeft = wouldFlipLeft && labelFitsLeft;
|
|
942
|
-
evG.append("text").attr("x", flipLeft ? x - sLabelGap : x + rectW + sLabelGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size",
|
|
945
|
+
evG.append("text").attr("x", flipLeft ? x - sLabelGap : x + rectW + sLabelGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
943
946
|
}
|
|
944
947
|
} else {
|
|
945
948
|
const estLabelWidth = ev.label.length * sCharW;
|
|
@@ -948,7 +951,7 @@ function renderTimelineHorizontalTimeSort(container, parsed, palette, isDark, se
|
|
|
948
951
|
const labelFitsLeft = x - sPointGap - estLabelWidth > 0;
|
|
949
952
|
const flipLeft = wouldFlipLeft && labelFitsLeft;
|
|
950
953
|
evG.append("circle").attr("cx", x).attr("cy", y).attr("r", sPointR).attr("fill", shapeFill(palette, color, isDark, { mode: fillMode })).attr("stroke", color).attr("stroke-width", sPointStroke);
|
|
951
|
-
evG.append("text").attr("x", flipLeft ? x - sPointGap : x + sPointGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size",
|
|
954
|
+
evG.append("text").attr("x", flipLeft ? x - sPointGap : x + sPointGap).attr("y", y).attr("dy", "0.35em").attr("text-anchor", flipLeft ? "end" : "start").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
952
955
|
}
|
|
953
956
|
});
|
|
954
957
|
}
|
|
@@ -1118,7 +1121,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1118
1121
|
g.append("rect").attr("class", "tl-group-header-bg").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", bandW).attr("height", bandH).attr("rx", sBandRx).attr("fill", shapeFill(palette, laneColor, isDark, { mode: fillMode })).style("pointer-events", "none");
|
|
1119
1122
|
g.append("rect").attr("class", "tl-group-header-accent").attr("data-group", lane.name).attr("x", bandX).attr("y", bandY).attr("width", sBandAccentW).attr("height", bandH).attr("fill", laneColor).attr("clip-path", `url(#${clipId})`).style("pointer-events", "none");
|
|
1120
1123
|
const headerG = g.append("g").attr("class", "tl-group-header").attr("data-group", lane.name).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, lane.name)).on("mouseleave", () => fadeReset(g)).on("click", () => toggleGroup(lane.name));
|
|
1121
|
-
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size",
|
|
1124
|
+
headerG.append("text").attr("x", -margin.left + ctx.aesthetic(10)).attr("y", curY + sBarH / 2).attr("dy", "0.35em").attr("text-anchor", "start").attr("fill", textColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold").text(`${toggleIcon} ${lane.name}`);
|
|
1122
1125
|
if (lane.events.length > 0) {
|
|
1123
1126
|
const evDates = lane.events.map((ev) => parseTimelineDate(ev.date));
|
|
1124
1127
|
const evEndDates = lane.events.filter((ev) => ev.endDate).map((ev) => parseTimelineDate(ev.endDate));
|
|
@@ -1172,7 +1175,7 @@ function renderTimelineHorizontalGrouped(container, parsed, palette, isDark, set
|
|
|
1172
1175
|
const evColor = eventColor(ev);
|
|
1173
1176
|
const isPoint = !ev.endDate;
|
|
1174
1177
|
const icon = isPoint ? "\u25C6" : "\u25CF";
|
|
1175
|
-
const labelEl = evG.append("text").attr("class", "tl-event-label").attr("x", -margin.left + ctx.aesthetic(20)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size",
|
|
1178
|
+
const labelEl = evG.append("text").attr("class", "tl-event-label").attr("x", -margin.left + ctx.aesthetic(20)).attr("y", y).attr("dy", "0.35em").attr("text-anchor", "start").attr("font-size", sEventFont).attr("fill", textColor);
|
|
1176
1179
|
labelEl.append("tspan").attr("fill", evColor).text(icon);
|
|
1177
1180
|
labelEl.append("tspan").attr("fill", textColor).text(" " + ev.label);
|
|
1178
1181
|
if (ev.endDate) {
|
|
@@ -1252,7 +1255,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1252
1255
|
const sEventFontSm = ctx.text(11);
|
|
1253
1256
|
const sDateFont = ctx.text(10);
|
|
1254
1257
|
const sLaneHeaderFont = ctx.text(12);
|
|
1255
|
-
const sDash =
|
|
1258
|
+
const sDash = scaleDash(GRID_DASH, (n) => ctx.structural(n));
|
|
1256
1259
|
const useGroupedVertical = tagLanes != null || timelineSort === "group" && timelineGroups.length > 0;
|
|
1257
1260
|
if (useGroupedVertical) {
|
|
1258
1261
|
let laneNames;
|
|
@@ -1356,7 +1359,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1356
1359
|
const laneColor = groupColorMap.get(laneName) ?? textColor;
|
|
1357
1360
|
const laneCenter = laneX + laneWidth / 2;
|
|
1358
1361
|
const headerG = g.append("g").attr("class", "tl-lane-header").attr("data-group", laneName).style("cursor", "pointer").on("mouseenter", () => fadeToGroup(g, laneName)).on("mouseleave", () => fadeReset(g));
|
|
1359
|
-
headerG.append("text").attr("x", laneCenter).attr("y", -ctx.structural(15)).attr("text-anchor", "middle").attr("fill", laneColor).attr("font-size",
|
|
1362
|
+
headerG.append("text").attr("x", laneCenter).attr("y", -ctx.structural(15)).attr("text-anchor", "middle").attr("fill", laneColor).attr("font-size", sLaneHeaderFont).attr("font-weight", "bold").text(laneName);
|
|
1360
1363
|
g.append("line").attr("x1", laneCenter).attr("y1", 0).attr("x2", laneCenter).attr("y2", innerHeight).attr("stroke", mutedColor).attr("stroke-width", 1).attr("stroke-dasharray", sDash);
|
|
1361
1364
|
const laneEvents = laneEventsByName.get(laneName) ?? [];
|
|
1362
1365
|
for (const ev of laneEvents) {
|
|
@@ -1406,13 +1409,13 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1406
1409
|
stroke = `url(#${strokeGradientId})`;
|
|
1407
1410
|
}
|
|
1408
1411
|
evG.append("rect").attr("x", laneCenter - sBarW / 2).attr("y", y).attr("width", sBarW).attr("height", rectH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
1409
|
-
evG.append("text").attr("x", laneCenter + sBarW + ctx.aesthetic(2)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1412
|
+
evG.append("text").attr("x", laneCenter + sBarW + ctx.aesthetic(2)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
1410
1413
|
} else {
|
|
1411
1414
|
evG.append("circle").attr("cx", laneCenter).attr("cy", y).attr("r", sPointR).attr(
|
|
1412
1415
|
"fill",
|
|
1413
1416
|
shapeFill(palette, evColor, isDark, { mode: fillMode })
|
|
1414
1417
|
).attr("stroke", evColor).attr("stroke-width", sPointStroke);
|
|
1415
|
-
evG.append("text").attr("x", laneCenter + ctx.aesthetic(10)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1418
|
+
evG.append("text").attr("x", laneCenter + ctx.aesthetic(10)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFont).text(ev.label);
|
|
1416
1419
|
}
|
|
1417
1420
|
}
|
|
1418
1421
|
});
|
|
@@ -1547,10 +1550,10 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1547
1550
|
stroke = `url(#${strokeGradientId})`;
|
|
1548
1551
|
}
|
|
1549
1552
|
evG.append("rect").attr("x", axisX - sBarW / 2).attr("y", y).attr("width", sBarW).attr("height", rectH).attr("rx", sBarRx).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", sBarStroke);
|
|
1550
|
-
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1553
|
+
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y + rectH / 2).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
1551
1554
|
} else {
|
|
1552
1555
|
evG.append("circle").attr("cx", axisX).attr("cy", y).attr("r", sPointR).attr("fill", shapeFill(palette, color, isDark, { mode: fillMode })).attr("stroke", color).attr("stroke-width", sPointStroke);
|
|
1553
|
-
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size",
|
|
1556
|
+
evG.append("text").attr("x", axisX + sBarW + ctx.aesthetic(4)).attr("y", y).attr("dy", "0.35em").attr("fill", textColor).attr("font-size", sEventFontSm).text(ev.label);
|
|
1554
1557
|
}
|
|
1555
1558
|
evG.append("text").attr("x", axisX - ctx.aesthetic(14)).attr(
|
|
1556
1559
|
"y",
|
|
@@ -1558,7 +1561,7 @@ function renderTimelineVertical(container, parsed, palette, isDark, setup, hover
|
|
|
1558
1561
|
yScale(parseTimelineDate(ev.endDate)) - yScale(parseTimelineDate(ev.date)),
|
|
1559
1562
|
4
|
|
1560
1563
|
) / 2 : y
|
|
1561
|
-
).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", mutedColor).attr("font-size",
|
|
1564
|
+
).attr("dy", "0.35em").attr("text-anchor", "end").attr("fill", mutedColor).attr("font-size", sDateFont).text(ev.date + (ev.endDate ? `\u2192${ev.endDate}` : ""));
|
|
1562
1565
|
}
|
|
1563
1566
|
}
|
|
1564
1567
|
}
|
|
@@ -1672,4 +1675,4 @@ export {
|
|
|
1672
1675
|
formatDateLabel,
|
|
1673
1676
|
renderTimeline
|
|
1674
1677
|
};
|
|
1675
|
-
//# sourceMappingURL=chunk-
|
|
1678
|
+
//# sourceMappingURL=chunk-QGXH64FT.js.map
|