@diagrammo/dgmo 0.50.1 → 0.51.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/dist/advanced.d.ts +6640 -0
- package/dist/advanced.js +207 -161
- package/dist/{analyzer-UYKBXAKR.js → analyzer-BJ54GIFB.js} +3 -3
- package/dist/auto.css +31 -8
- package/dist/auto.d.ts +60 -0
- package/dist/auto.js +169 -133
- package/dist/auto.mjs +2245 -1030
- package/dist/block.css +28 -8
- package/dist/block.d.ts +130 -0
- package/dist/block.js +103 -68
- package/dist/{charts-d3-LR6D3D7A.js → charts-d3-7E4B4IMW.js} +9 -9
- package/dist/{chunk-6IAA2QQ2.js → chunk-2EQMXBBQ.js} +2 -2
- package/dist/{chunk-XJLKLU4D.js → chunk-2ILHQOL3.js} +3 -3
- package/dist/{chunk-SXRTRMEE.js → chunk-2UJSV2VT.js} +3 -3
- package/dist/{chunk-LE4MYMLI.js → chunk-32XPAAET.js} +5 -5
- package/dist/{chunk-NU3XLTGP.js → chunk-332ZR4QU.js} +4 -4
- package/dist/{chunk-F7BFXWNQ.js → chunk-3JLKYGBQ.js} +2 -2
- package/dist/{chunk-QROYX7TT.js → chunk-3LV2NCB6.js} +3 -3
- package/dist/{chunk-ZAD4HV2G.js → chunk-3ODS2VGL.js} +99 -99
- package/dist/{chunk-3XGZF2QJ.js → chunk-3YSQZ75W.js} +6 -6
- package/dist/{chunk-FJUNPCYI.js → chunk-467TVMQL.js} +2 -2
- package/dist/{chunk-HHXOONLX.js → chunk-4B5YISOR.js} +38 -1
- package/dist/{chunk-6HJBFVLO.js → chunk-4QZ43D7I.js} +3 -3
- package/dist/{chunk-4S52SK6G.js → chunk-4VWJ4LW2.js} +15 -8
- package/dist/chunk-4XFBQT5O.js +35 -0
- package/dist/{chunk-2C56LEML.js → chunk-5F5ELR3V.js} +3 -3
- package/dist/{chunk-EAMEADTV.js → chunk-5PDTIBLV.js} +83 -21
- package/dist/{chunk-C2CVAM3U.js → chunk-5PZT4DQG.js} +160 -87
- package/dist/{chunk-IAEC4KLA.js → chunk-5QKQSSPO.js} +2 -2
- package/dist/{chunk-5OWVC2A6.js → chunk-5SVOCD5W.js} +6 -6
- package/dist/{chunk-VBYSIOOY.js → chunk-5WPNFSXP.js} +3 -3
- package/dist/{chunk-4MJ7M6YL.js → chunk-5X6YQA2J.js} +7 -7
- package/dist/{chunk-JJUOHGX2.js → chunk-65WJYYKJ.js} +4 -4
- package/dist/{chunk-3UIKSPFB.js → chunk-6BQFET7X.js} +3 -3
- package/dist/{chunk-U2HGPLZS.js → chunk-6H7O2OPM.js} +14 -1
- package/dist/{chunk-DZXYF2F5.js → chunk-6K2M4VSR.js} +3 -3
- package/dist/{chunk-PGEGPSCZ.js → chunk-6MNGECP2.js} +2 -2
- package/dist/{chunk-3XPUDB7B.js → chunk-6NFYEQDX.js} +266 -38
- package/dist/{chunk-4XK3FLFB.js → chunk-6NYWYNBI.js} +3 -3
- package/dist/{chunk-TWQUYVP3.js → chunk-7DF4J4RL.js} +4 -4
- package/dist/{chunk-H73FP42Q.js → chunk-7DYOELRK.js} +3 -3
- package/dist/{chunk-L3UHP6TD.js → chunk-7L4UJOY6.js} +1 -2
- package/dist/{chunk-QJP6PG7F.js → chunk-AB7INMR5.js} +9 -9
- package/dist/{chunk-3LKM6FMW.js → chunk-AE7II3E3.js} +2 -2
- package/dist/{chunk-BTUTZMPT.js → chunk-AFIEPDLX.js} +97 -42
- package/dist/chunk-APKUAJ2L.js +220 -0
- package/dist/{chunk-X6EZPSW6.js → chunk-AXW3M6OQ.js} +7 -7
- package/dist/{chunk-66RUL3XF.js → chunk-B63YB7X3.js} +5 -5
- package/dist/{chunk-DSWVNQVS.js → chunk-BGP54HVR.js} +4 -59
- package/dist/{chunk-3NODSS6A.js → chunk-BYJBIALT.js} +7 -7
- package/dist/{chunk-3YPY3OXD.js → chunk-CC4YRBWV.js} +2 -2
- package/dist/{chunk-HLJVEAOF.js → chunk-DY7XLRHK.js} +8 -33
- package/dist/{chunk-OMNGQPEZ.js → chunk-E7Y3SYKW.js} +3 -3
- package/dist/{chunk-HTMN2Z6U.js → chunk-EDA6C7MV.js} +50 -7
- package/dist/{chunk-7L3R6I3U.js → chunk-ENRS56GC.js} +3 -3
- package/dist/{chunk-2KGXHFYK.js → chunk-EXOQP75F.js} +7 -7
- package/dist/{chunk-BBGDM4NQ.js → chunk-F3FYUFUH.js} +26 -8
- package/dist/{chunk-GL5UZ6NY.js → chunk-FC5I2KXV.js} +3 -3
- package/dist/{chunk-VVW3F3MD.js → chunk-FTBZV6NE.js} +9 -9
- package/dist/{chunk-7QKLIMRZ.js → chunk-G3PF3S7P.js} +41 -46
- package/dist/{chunk-J6K7RP6P.js → chunk-GD6L76WD.js} +3 -3
- package/dist/{chunk-I2WKW7C7.js → chunk-GGHRAITI.js} +3 -3
- package/dist/{chunk-YIA4LEX4.js → chunk-GNSFLJAA.js} +96 -4
- package/dist/{chunk-IUMPEA64.js → chunk-GROLTAWZ.js} +4 -4
- package/dist/{chunk-Q4V4XQWV.js → chunk-GTWKD3QT.js} +2 -2
- package/dist/{chunk-F2L5GCQ4.js → chunk-GU46PPT3.js} +3 -3
- package/dist/{chunk-6IUAK7RZ.js → chunk-H6PI3KJT.js} +2 -2
- package/dist/{chunk-SCQ5VPUF.js → chunk-HFMYN6N2.js} +2 -2
- package/dist/{chunk-GKC3HILQ.js → chunk-I2QZFCS2.js} +27 -4
- package/dist/{chunk-MCZ5LBZD.js → chunk-IE477RQZ.js} +7 -7
- package/dist/{chunk-3Y2DRD7S.js → chunk-IEDMFNU7.js} +3 -3
- package/dist/{chunk-M5RXSRO2.js → chunk-IEWG6J7C.js} +4 -4
- package/dist/{chunk-P7CE7LXL.js → chunk-IUJODQKX.js} +6 -6
- package/dist/{chunk-NWED7CYO.js → chunk-IUO34HKW.js} +6 -6
- package/dist/{chunk-NX4EQS3U.js → chunk-J76PIKAT.js} +2 -2
- package/dist/{chunk-O7WP4ZD4.js → chunk-JED6ZDEE.js} +2 -2
- package/dist/{chunk-6BFZKBGD.js → chunk-JJXGQIRV.js} +2 -2
- package/dist/{chunk-O7NUCTFU.js → chunk-JM4LEPY3.js} +2 -2
- package/dist/{chunk-VDOOQZUD.js → chunk-JSSX2SX4.js} +4 -4
- package/dist/{chunk-SQLNBA64.js → chunk-KFNWFNAA.js} +3 -3
- package/dist/{chunk-VVZRV54S.js → chunk-KJGG2JKQ.js} +143 -82
- package/dist/{chunk-OTAL43EH.js → chunk-LV4BETUU.js} +8 -2
- package/dist/{chunk-VUJGMJE6.js → chunk-MVN25IF6.js} +4 -4
- package/dist/{chunk-CLD2OKV7.js → chunk-MX2EY5Y7.js} +2 -2
- package/dist/{chunk-Y4RNXEAO.js → chunk-ND76YJCN.js} +139 -25
- package/dist/{chunk-KFZYNWWO.js → chunk-NEQ6GJXB.js} +4 -4
- package/dist/{chunk-PFHVU7UA.js → chunk-NI3XQBPB.js} +2 -2
- package/dist/{chunk-WW32K72E.js → chunk-OJTXTQA2.js} +9 -9
- package/dist/{chunk-YNRDWYZP.js → chunk-OQKP2X3D.js} +170 -51
- package/dist/{chunk-AHGF2YYA.js → chunk-OTOHI4JO.js} +2 -2
- package/dist/{chunk-HEVYAHLW.js → chunk-OU7HLO7I.js} +4 -4
- package/dist/{chunk-GBE54KY6.js → chunk-OZPBJM5Q.js} +3 -3
- package/dist/{chunk-EOFPYPAU.js → chunk-P3NRSSUU.js} +51 -11
- package/dist/{chunk-TSA237IM.js → chunk-PZDBOK2Q.js} +2 -2
- package/dist/{chunk-3P2DKJCG.js → chunk-Q62FEYK3.js} +2 -2
- package/dist/{chunk-DFTFPYUD.js → chunk-QHI5XVUJ.js} +7 -7
- package/dist/{chunk-HQCHYB5F.js → chunk-QOOUC2J5.js} +2 -2
- package/dist/{chunk-XDXNDSKO.js → chunk-QZPEGJOM.js} +5 -2
- package/dist/{chunk-TN35C5KM.js → chunk-RAHVMKBG.js} +2 -2
- package/dist/chunk-RBDIYLA5.js +267 -0
- package/dist/{chunk-OTQKUHRS.js → chunk-RBHWPDBB.js} +3 -3
- package/dist/{chunk-BH3UYK36.js → chunk-RLFVAKEO.js} +3 -3
- package/dist/{chunk-3LH5CLP4.js → chunk-RXKTSFDL.js} +150 -5
- package/dist/{chunk-RZ6YKEUJ.js → chunk-TK2VQQX2.js} +6 -6
- package/dist/{chunk-I7F2A35O.js → chunk-TMACGPW5.js} +25 -47
- package/dist/{chunk-5GJYGP5Z.js → chunk-TRM2J7ZN.js} +8 -8
- package/dist/{chunk-BCYVE3N5.js → chunk-TYS6CSS5.js} +2 -2
- package/dist/{chunk-7PQYTZMA.js → chunk-U5SI5NIM.js} +95 -232
- package/dist/{chunk-KHEYDLMT.js → chunk-VB4UJ3H2.js} +2 -2
- package/dist/{chunk-HGN652MU.js → chunk-VL2O2F3W.js} +2 -2
- package/dist/{chunk-ONA5KPV3.js → chunk-VNSXLA6G.js} +4 -4
- package/dist/{chunk-CMCR5WBW.js → chunk-WBRZJOEC.js} +3 -3
- package/dist/{chunk-5LWQH6QV.js → chunk-WCT3NYCV.js} +1 -1
- package/dist/{chunk-T4VOVZT5.js → chunk-WJ7RW65H.js} +4 -4
- package/dist/{chunk-SCHXJTZL.js → chunk-WQLMU7VG.js} +2 -2
- package/dist/{chunk-C4GQDB5L.js → chunk-WRNFDFPU.js} +2 -2
- package/dist/{chunk-66NVRO4K.js → chunk-X7EC3L2H.js} +7 -7
- package/dist/{chunk-QXKWYZNR.js → chunk-XEQXCIBC.js} +3 -3
- package/dist/{chunk-C63UWAKM.js → chunk-Y2ZE3MSG.js} +2 -2
- package/dist/{chunk-FA6K3FWM.js → chunk-Y6GBQTBK.js} +6 -6
- package/dist/{chunk-7UEMZREK.js → chunk-YAA6IID3.js} +2 -2
- package/dist/{chunk-PZFVK3IH.js → chunk-YGJZWZTY.js} +2 -2
- package/dist/{chunk-7TV5Y53Y.js → chunk-ZJ3LS7DW.js} +3 -3
- package/dist/{chunk-PH5X4GIP.js → chunk-ZO27FGJS.js} +2 -2
- package/dist/cli.cjs +163 -147
- package/dist/clock.js +91 -5
- package/dist/countdown.js +208 -82
- package/dist/dgmo-router-Y2VEX46B.js +86 -0
- package/dist/dimensions-F7B5C4BJ.js +22 -0
- package/dist/editor.js +14 -1
- package/dist/element.d.ts +68 -0
- package/dist/element.js +170 -134
- package/dist/element.mjs +2209 -1015
- package/dist/{flowchart-parser-OE4WHLTF.js → flowchart-parser-MY53QWTZ.js} +4 -4
- package/dist/{flowchart-renderer-GPCSMTOR.js → flowchart-renderer-AQSMEMYF.js} +8 -8
- package/dist/highlight.js +14 -1
- package/dist/index.d.ts +185 -0
- package/dist/index.js +57 -53
- package/dist/{layout-7SKMFYHL.js → layout-46N4JJYK.js} +5 -5
- package/dist/layout-4DIUOX2T.js +14 -0
- package/dist/{layout-7H4H46CS.js → layout-7QXCNOVS.js} +3 -3
- package/dist/{layout-NXG63LWH.js → layout-AM2JWW3X.js} +4 -4
- package/dist/{layout-7MZ5NF2N.js → layout-CBCLPMSG.js} +5 -5
- package/dist/{layout-DC4TVXER.js → layout-EE6GE46Y.js} +5 -5
- package/dist/{layout-FGQWRYYW.js → layout-F4WO357A.js} +3 -3
- package/dist/layout-G23F7LDH.js +9 -0
- package/dist/{layout-QNUQLEHU.js → layout-HYZPWAK5.js} +3 -3
- package/dist/{layout-FWODLIMP.js → layout-JDJAEQ3P.js} +6 -6
- package/dist/layout-MUPRALE5.js +14 -0
- package/dist/{layout-34CLNICW.js → layout-OAC4PEAC.js} +5 -5
- package/dist/{layout-5BG6DFCU.js → layout-YVTNOTN4.js} +6 -6
- package/dist/{layout-PUQCB6AN.js → layout-ZDOSXL5G.js} +7 -7
- package/dist/{layout-search-QS44PI5R.js → layout-search-55FU6HD3.js} +6 -157
- package/dist/map-data/gazetteer.json +1 -1
- package/dist/{parser-36HVKU5U.js → parser-2Q2T4C3B.js} +6 -5
- package/dist/{parser-B5FVS7O6.js → parser-3A42DZ72.js} +3 -3
- package/dist/{parser-CSFUN3CT.js → parser-4RFTKAQX.js} +5 -4
- package/dist/{parser-IJBMRXMC.js → parser-57ILIFZ2.js} +5 -5
- package/dist/{parser-DFFEDKHH.js → parser-5A2UWU6B.js} +3 -3
- package/dist/{parser-H3XEPFPV.js → parser-5PDYJGWA.js} +4 -4
- package/dist/{parser-O4HIUN6G.js → parser-6BJEXUFX.js} +4 -4
- package/dist/{parser-MTOMTWTD.js → parser-6ZKABF5S.js} +6 -5
- package/dist/{parser-WAV5JRPT.js → parser-AIMHGJRR.js} +4 -4
- package/dist/{parser-TXND652E.js → parser-AZJ25OKK.js} +4 -4
- package/dist/{parser-4AI5ZN5F.js → parser-B77S5SZM.js} +3 -3
- package/dist/{parser-IBWNAPY4.js → parser-BEPSWJAD.js} +3 -3
- package/dist/{parser-D5VILGN2.js → parser-BKI42XBQ.js} +4 -4
- package/dist/{parser-LWKKBNSA.js → parser-C3D7MVXY.js} +3 -3
- package/dist/{parser-HYRTF3DO.js → parser-CDG7CHV5.js} +3 -3
- package/dist/{parser-CVMEDULU.js → parser-CZOJ7XQ6.js} +4 -4
- package/dist/{parser-AXKBDGNO.js → parser-E2RL6JYF.js} +5 -5
- package/dist/{parser-PSA4UBSP.js → parser-EH5VE7ZN.js} +4 -4
- package/dist/{parser-K3XXLMUW.js → parser-FQ6GZFMR.js} +4 -4
- package/dist/{parser-RV4M6AS2.js → parser-GKLZKEIK.js} +4 -4
- package/dist/{parser-MPCE5JBG.js → parser-H6ABKHZZ.js} +4 -4
- package/dist/{parser-RZPVAQVX.js → parser-I6GGFKOQ.js} +4 -3
- package/dist/{parser-W4PQUGX3.js → parser-JA7JQ7NF.js} +4 -4
- package/dist/{parser-5OXGPNBF.js → parser-KKTJ6M3Y.js} +5 -5
- package/dist/parser-OK22AC6Y.js +14 -0
- package/dist/{parser-4NO6VZ6S.js → parser-OK2ILHRT.js} +4 -4
- package/dist/{parser-YS7TOS2K.js → parser-OUTPNJWC.js} +3 -3
- package/dist/{parser-KCR2WS3V.js → parser-PORDUX5E.js} +4 -4
- package/dist/{parser-VKOJM7KS.js → parser-SRVFR7PM.js} +4 -4
- package/dist/{parser-TGQZJ5OT.js → parser-UKFFZCFJ.js} +4 -4
- package/dist/{parser-JJR52VAT.js → parser-UMWPLORP.js} +5 -5
- package/dist/{parser-AGVYTQXV.js → parser-Z4TZV2CB.js} +4 -4
- package/dist/{renderer-A5VE5BCI.js → renderer-2AUFT3E2.js} +8 -8
- package/dist/{renderer-FPE3J5VZ.js → renderer-2HTNBIF2.js} +11 -11
- package/dist/{renderer-R2WNIC2C.js → renderer-3K3IB7D5.js} +8 -8
- package/dist/{renderer-2AZ5HJFK.js → renderer-3YNIWF5I.js} +4 -4
- package/dist/{renderer-PJM35LJN.js → renderer-3YPZHMOU.js} +3 -3
- package/dist/{renderer-JCCHNECZ.js → renderer-4WR6WMVF.js} +9 -9
- package/dist/{renderer-HDCCZURL.js → renderer-66MERVQ2.js} +9 -9
- package/dist/{renderer-2QPMJ2DA.js → renderer-6RKQPNJI.js} +9 -9
- package/dist/{renderer-FYSVXL7M.js → renderer-ARMJBP6C.js} +11 -11
- package/dist/{renderer-6OKF44KS.js → renderer-CO2DW7S7.js} +13 -13
- package/dist/{renderer-BSR2O2H6.js → renderer-EDJ2O4S5.js} +13 -12
- package/dist/{renderer-CYB4LK3G.js → renderer-F7U3MFCV.js} +9 -9
- package/dist/{renderer-72LGR2YF.js → renderer-GD2COXVL.js} +4 -2
- package/dist/{renderer-B5TBNZJE.js → renderer-GQIESYEM.js} +8 -8
- package/dist/{renderer-ODUUOPVT.js → renderer-HCKJDFXD.js} +13 -13
- package/dist/{renderer-QAOBLRXV.js → renderer-HYGHO4SJ.js} +10 -10
- package/dist/{renderer-5DSEWF74.js → renderer-JC3RDUT7.js} +8 -8
- package/dist/{renderer-7RH2SI3B.js → renderer-KQB7UGDS.js} +3 -3
- package/dist/{renderer-45PSOL3E.js → renderer-NKJ24TEA.js} +5 -5
- package/dist/{renderer-AUW2BE6G.js → renderer-OYO67VZK.js} +9 -9
- package/dist/{renderer-DAXMXIKD.js → renderer-QIWVHWZO.js} +3 -3
- package/dist/{renderer-PSMMZCKH.js → renderer-QRWACQRI.js} +8 -8
- package/dist/{renderer-4ITCHBT7.js → renderer-QXGN5H3A.js} +5 -5
- package/dist/renderer-QXPP4TA2.js +27 -0
- package/dist/{renderer-KS7YZJE2.js → renderer-RGIYOTKJ.js} +10 -10
- package/dist/{renderer-FF24KZCI.js → renderer-RHT4MHFU.js} +8 -8
- package/dist/{renderer-PPIHO5FI.js → renderer-RYR3TJ46.js} +12 -11
- package/dist/{renderer-NGXZTRK6.js → renderer-SRKDNDFB.js} +8 -8
- package/dist/{renderer-SBS3YWU5.js → renderer-TGTUABCI.js} +8 -8
- package/dist/{renderer-7SD6MSBS.js → renderer-TXJFKPOG.js} +11 -11
- package/dist/{renderer-HVCU2C3Z.js → renderer-UV6MI64M.js} +3 -3
- package/dist/renderer-radial-FWABAZHB.js +21 -0
- package/dist/{resolver-FHBCO3PL.js → resolver-EMTGNR3D.js} +4 -3
- package/dist/{state-parser-3REXRK3R.js → state-parser-6T6CNMPX.js} +4 -4
- package/dist/{state-renderer-XYLNRWXR.js → state-renderer-AWZ3ECAX.js} +8 -8
- package/dist/themes-32xj5ZTW.d.ts +943 -0
- package/docs/language-reference.md +98 -10
- package/gallery/fixtures/clock.dgmo +3 -3
- package/gallery/fixtures/countdown-far.dgmo +2 -0
- package/gallery/fixtures/countdown-tz.dgmo +5 -0
- package/package.json +1 -1
- package/dist/dgmo-router-YTU3ENAX.js +0 -84
- package/dist/dimensions-OTBKC5M6.js +0 -22
- package/dist/layout-6RDJHS6E.js +0 -9
- package/dist/layout-J36454XU.js +0 -14
- package/dist/layout-LD6XTLD6.js +0 -14
- package/dist/parser-4WQQQXCG.js +0 -13
- package/dist/renderer-UYMQQCJK.js +0 -24
- package/dist/renderer-radial-F7X5F2VU.js +0 -21
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
} from "./chunk-YYVTBZZC.js";
|
|
21
21
|
import {
|
|
22
22
|
renderIntegratedLegend
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OU7HLO7I.js";
|
|
24
24
|
import {
|
|
25
25
|
getMaxLegendReservedHeight
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-YAA6IID3.js";
|
|
27
27
|
import {
|
|
28
28
|
TITLE_FONT_SIZE,
|
|
29
29
|
TITLE_FONT_WEIGHT,
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
CHAR_WIDTH_RATIO,
|
|
37
37
|
measureText,
|
|
38
38
|
truncateText
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WCT3NYCV.js";
|
|
40
40
|
import {
|
|
41
41
|
contrastText,
|
|
42
42
|
mix,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "./chunk-P6T66CCZ.js";
|
|
48
48
|
import {
|
|
49
49
|
resolveTagColor
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-467TVMQL.js";
|
|
51
51
|
import {
|
|
52
52
|
resolveColor
|
|
53
53
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -74,7 +74,6 @@ var RAMP_FLOOR = 15;
|
|
|
74
74
|
var VALUE_FONT_SIZE = 11;
|
|
75
75
|
var lineGeneratorLR = d3Shape.line().x((d) => d.x).y((d) => d.y).curve(d3Shape.curveBasis);
|
|
76
76
|
var lineGeneratorTB = d3Shape.line().x((d) => d.x).y((d) => d.y).curve(d3Shape.curveBasis);
|
|
77
|
-
var lineGeneratorStraight = d3Shape.line().x((d) => d.x).y((d) => d.y).curve(d3Shape.curveLinear);
|
|
78
77
|
function splitCamelCase(word) {
|
|
79
78
|
const parts = [];
|
|
80
79
|
let start = 0;
|
|
@@ -327,32 +326,8 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
327
326
|
const scaleX = width / (contentW + sDiagramPadding * 2);
|
|
328
327
|
const scaleY = height / (contentH + sDiagramPadding * 2);
|
|
329
328
|
const scale = Math.min(scaleX, scaleY, 3);
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (parsed.nodePositions && parsed.nodePositions.size > 0) {
|
|
333
|
-
let bMinX = Infinity, bMinY = Infinity, bMaxX = -Infinity, bMaxY = -Infinity;
|
|
334
|
-
const accB = (x, y) => {
|
|
335
|
-
if (x < bMinX) bMinX = x;
|
|
336
|
-
if (x > bMaxX) bMaxX = x;
|
|
337
|
-
if (y < bMinY) bMinY = y;
|
|
338
|
-
if (y > bMaxY) bMaxY = y;
|
|
339
|
-
};
|
|
340
|
-
for (const n of layout.nodes) {
|
|
341
|
-
accB(n.x - n.width / 2, n.y - n.height / 2);
|
|
342
|
-
accB(n.x + n.width / 2, n.y + n.height / 2);
|
|
343
|
-
}
|
|
344
|
-
for (const g of layout.groups) {
|
|
345
|
-
accB(g.x - g.width / 2, g.y - g.height / 2);
|
|
346
|
-
accB(g.x + g.width / 2, g.y + g.height / 2);
|
|
347
|
-
}
|
|
348
|
-
for (const e of layout.edges) for (const p of e.points) accB(p.x, p.y);
|
|
349
|
-
if (Number.isFinite(bMinX)) {
|
|
350
|
-
centerShiftX = (layout.width - bMaxX - bMinX) / 2;
|
|
351
|
-
centerShiftY = (layout.height - bMaxY - bMinY) / 2;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
const offsetX = (width - contentW * scale) / 2 + centerShiftX * scale;
|
|
355
|
-
const offsetY = sDiagramPadding + titleOffset + legendH + centerShiftY * scale;
|
|
329
|
+
const offsetX = (width - contentW * scale) / 2;
|
|
330
|
+
const offsetY = sDiagramPadding + titleOffset + legendH;
|
|
356
331
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMin meet").style("font-family", FONT_FAMILY).style("background", palette.bg);
|
|
357
332
|
if (sctx.isBelowFloor) {
|
|
358
333
|
svg.attr("width", "100%");
|
|
@@ -484,7 +459,7 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
|
|
|
484
459
|
if (points.length < 2) continue;
|
|
485
460
|
const edgeG = diagramG.append("g").attr("class", "bl-edge-group").attr("data-line-number", String(le.lineNumber)).attr("data-from", le.source).attr("data-to", le.target);
|
|
486
461
|
const markerId = `bl-arrow-${color.replace("#", "")}`;
|
|
487
|
-
const gen =
|
|
462
|
+
const gen = parsed.direction === "TB" ? lineGeneratorTB : lineGeneratorLR;
|
|
488
463
|
const path = edgeG.append("path").attr("class", "bl-edge").attr("d", gen(points) ?? "").attr("fill", "none").attr("stroke", color).attr("stroke-width", sEdgeStrokeWidth).attr("marker-end", `url(#${markerId})`);
|
|
489
464
|
if (le.bidirectional) {
|
|
490
465
|
const revId = `bl-arrow-rev-${color.replace("#", "")}`;
|
|
@@ -783,4 +758,4 @@ export {
|
|
|
783
758
|
renderBoxesAndLines,
|
|
784
759
|
renderBoxesAndLinesForExport
|
|
785
760
|
};
|
|
786
|
-
//# sourceMappingURL=chunk-
|
|
761
|
+
//# sourceMappingURL=chunk-DY7XLRHK.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
matchTagBlockHeading,
|
|
5
5
|
stripDefaultModifier,
|
|
6
6
|
tagAttrKey
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-467TVMQL.js";
|
|
8
8
|
import {
|
|
9
9
|
extractColor,
|
|
10
10
|
measureIndent,
|
|
11
11
|
parseFirstLine
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LV4BETUU.js";
|
|
13
13
|
import {
|
|
14
14
|
emit
|
|
15
15
|
} from "./chunk-CXK4DZH3.js";
|
|
@@ -682,4 +682,4 @@ export {
|
|
|
682
682
|
SWIMLANE_DIAGNOSTICS,
|
|
683
683
|
parseSwimlane
|
|
684
684
|
};
|
|
685
|
-
//# sourceMappingURL=chunk-
|
|
685
|
+
//# sourceMappingURL=chunk-E7Y3SYKW.js.map
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
extractDatePrefix,
|
|
3
3
|
parseTimelineDate
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-TMACGPW5.js";
|
|
5
|
+
import {
|
|
6
|
+
makeYearContext,
|
|
7
|
+
parseDateToken,
|
|
8
|
+
resolveTokenYear
|
|
9
|
+
} from "./chunk-RBDIYLA5.js";
|
|
5
10
|
import {
|
|
6
11
|
AUTO_TAG_COLOR_SENTINEL,
|
|
7
12
|
finalizeAutoTagColors,
|
|
@@ -11,7 +16,7 @@ import {
|
|
|
11
16
|
tagAttrKey,
|
|
12
17
|
validateTagGroupNames,
|
|
13
18
|
validateTagValues
|
|
14
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-467TVMQL.js";
|
|
15
20
|
import {
|
|
16
21
|
EVENT_LINE_REGISTRY,
|
|
17
22
|
extractColor,
|
|
@@ -21,7 +26,7 @@ import {
|
|
|
21
26
|
tryParseSharedOption,
|
|
22
27
|
warnUnknownMetaKeys,
|
|
23
28
|
withTagAliases
|
|
24
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-LV4BETUU.js";
|
|
25
30
|
import {
|
|
26
31
|
emit,
|
|
27
32
|
formatDgmoError,
|
|
@@ -159,6 +164,40 @@ function parseEventLine(content, palette) {
|
|
|
159
164
|
};
|
|
160
165
|
if (!content?.trim()) return fail(0, "No content provided");
|
|
161
166
|
const lines = content.split("\n");
|
|
167
|
+
let dateOrder = "mdy";
|
|
168
|
+
let noCurrentYear = false;
|
|
169
|
+
let directiveYear = null;
|
|
170
|
+
for (const raw of lines) {
|
|
171
|
+
const t = raw.trim().toLowerCase();
|
|
172
|
+
if (t === "no-current-year") noCurrentYear = true;
|
|
173
|
+
else if (t === "date-order dmy") dateOrder = "dmy";
|
|
174
|
+
else if (t === "date-order mdy") dateOrder = "mdy";
|
|
175
|
+
else {
|
|
176
|
+
const ym = t.match(/^year\s+(\d{1,4})$/);
|
|
177
|
+
if (ym) directiveYear = parseInt(ym[1], 10);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
let prescan = null;
|
|
181
|
+
for (const raw of lines) {
|
|
182
|
+
const t = raw.trim();
|
|
183
|
+
if (!t) continue;
|
|
184
|
+
const p = parseDateToken(t, { dateOrder });
|
|
185
|
+
if (p?.token.year != null) {
|
|
186
|
+
prescan = p.token.sign * p.token.year;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
const yearCtx = makeYearContext({
|
|
191
|
+
order: dateOrder,
|
|
192
|
+
directiveYear,
|
|
193
|
+
prescanYear: prescan,
|
|
194
|
+
noCurrentYear
|
|
195
|
+
});
|
|
196
|
+
const dateCtx = {
|
|
197
|
+
order: dateOrder,
|
|
198
|
+
resolve: (tok) => resolveTokenYear(tok, yearCtx)
|
|
199
|
+
};
|
|
200
|
+
const isDateDirective = (t) => t === "no-current-year" || t === "date-order dmy" || t === "date-order mdy" || /^year\s+\d{1,4}$/.test(t);
|
|
162
201
|
let contentStarted = false;
|
|
163
202
|
let headerParsed = false;
|
|
164
203
|
const sharedOptions = {};
|
|
@@ -277,6 +316,9 @@ function parseEventLine(content, palette) {
|
|
|
277
316
|
}
|
|
278
317
|
if (indent === 0) {
|
|
279
318
|
currentTagGroup = null;
|
|
319
|
+
if (isDateDirective(trimmed.toLowerCase())) {
|
|
320
|
+
continue;
|
|
321
|
+
}
|
|
280
322
|
if (trimmed.toLowerCase() === "no-scale") {
|
|
281
323
|
options.scale = false;
|
|
282
324
|
continue;
|
|
@@ -329,7 +371,8 @@ function parseEventLine(content, palette) {
|
|
|
329
371
|
currentEra,
|
|
330
372
|
aliasMap,
|
|
331
373
|
result.diagnostics,
|
|
332
|
-
pushWarning
|
|
374
|
+
pushWarning,
|
|
375
|
+
dateCtx
|
|
333
376
|
);
|
|
334
377
|
result.events.push(event);
|
|
335
378
|
currentEvent = event;
|
|
@@ -489,7 +532,7 @@ function validateEraDateOrder(events, eras, emitWarn) {
|
|
|
489
532
|
}
|
|
490
533
|
}
|
|
491
534
|
}
|
|
492
|
-
function parseEventHeader(trimmed, lineNumber, era, aliasMap, diagnostics, pushWarning) {
|
|
535
|
+
function parseEventHeader(trimmed, lineNumber, era, aliasMap, diagnostics, pushWarning, dateCtx) {
|
|
493
536
|
let date = null;
|
|
494
537
|
let dateValue = null;
|
|
495
538
|
let future = false;
|
|
@@ -500,7 +543,7 @@ function parseEventHeader(trimmed, lineNumber, era, aliasMap, diagnostics, pushW
|
|
|
500
543
|
future = true;
|
|
501
544
|
remainder = trimmed.slice(tbdMatch[0].length).trimStart();
|
|
502
545
|
}
|
|
503
|
-
const prefix = future ? null : extractDatePrefix(trimmed);
|
|
546
|
+
const prefix = future ? null : extractDatePrefix(trimmed, dateCtx);
|
|
504
547
|
if (prefix) {
|
|
505
548
|
date = prefix.startDate;
|
|
506
549
|
dateValue = parseTimelineDate(prefix.startDate);
|
|
@@ -555,4 +598,4 @@ export {
|
|
|
555
598
|
EVENT_LINE_DIAGNOSTICS,
|
|
556
599
|
parseEventLine
|
|
557
600
|
};
|
|
558
|
-
//# sourceMappingURL=chunk-
|
|
601
|
+
//# sourceMappingURL=chunk-EDA6C7MV.js.map
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
tagAttrKey,
|
|
10
10
|
validateTagGroupNames,
|
|
11
11
|
validateTagValues
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-467TVMQL.js";
|
|
13
13
|
import {
|
|
14
14
|
extractColor,
|
|
15
15
|
measureIndent,
|
|
16
16
|
parseFirstLine
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LV4BETUU.js";
|
|
18
18
|
import {
|
|
19
19
|
formatDgmoError,
|
|
20
20
|
makeDgmoError,
|
|
@@ -335,4 +335,4 @@ function parseBlockTail(tail, aliasMap) {
|
|
|
335
335
|
export {
|
|
336
336
|
parseBlock
|
|
337
337
|
};
|
|
338
|
-
//# sourceMappingURL=chunk-
|
|
338
|
+
//# sourceMappingURL=chunk-ENRS56GC.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
layoutJourneyMap,
|
|
4
4
|
scoreToColor,
|
|
5
5
|
scoreToCurveY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3JLKYGBQ.js";
|
|
7
7
|
import {
|
|
8
8
|
wrapNoteBody
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TYS6CSS5.js";
|
|
10
10
|
import {
|
|
11
11
|
NOTE_BULLET_INDENT
|
|
12
12
|
} from "./chunk-5DH3KYFH.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-YYVTBZZC.js";
|
|
22
22
|
import {
|
|
23
23
|
renderIntegratedLegend
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-OU7HLO7I.js";
|
|
25
25
|
import {
|
|
26
26
|
FONT_FAMILY
|
|
27
27
|
} from "./chunk-6KFWC4CO.js";
|
|
@@ -29,10 +29,10 @@ import {
|
|
|
29
29
|
measureText,
|
|
30
30
|
truncateText,
|
|
31
31
|
wrapTextToWidth
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WCT3NYCV.js";
|
|
33
33
|
import {
|
|
34
34
|
parseJourneyMap
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-4QZ43D7I.js";
|
|
36
36
|
import {
|
|
37
37
|
contrastText,
|
|
38
38
|
mix,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
resolveActiveTagGroup,
|
|
43
43
|
tagAttrKey
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-467TVMQL.js";
|
|
45
45
|
|
|
46
46
|
// src/journey-map/renderer.ts
|
|
47
47
|
import * as d3 from "d3-selection";
|
|
@@ -848,4 +848,4 @@ export {
|
|
|
848
848
|
renderJourneyMap,
|
|
849
849
|
renderJourneyMapForExport
|
|
850
850
|
};
|
|
851
|
-
//# sourceMappingURL=chunk-
|
|
851
|
+
//# sourceMappingURL=chunk-EXOQP75F.js.map
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderCollapseBar,
|
|
3
3
|
renderNodeCard
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OTOHI4JO.js";
|
|
5
5
|
import {
|
|
6
6
|
CARD_RADIUS,
|
|
7
7
|
CONTAINER_RADIUS
|
|
8
8
|
} from "./chunk-3CIOJ5YJ.js";
|
|
9
9
|
import {
|
|
10
10
|
renderIntegratedLegend
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OU7HLO7I.js";
|
|
12
12
|
import {
|
|
13
13
|
getMaxLegendReservedHeight
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YAA6IID3.js";
|
|
15
15
|
import {
|
|
16
16
|
FONT_FAMILY
|
|
17
17
|
} from "./chunk-6KFWC4CO.js";
|
|
18
18
|
import {
|
|
19
19
|
measureText,
|
|
20
20
|
wrapTextToWidth
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-WCT3NYCV.js";
|
|
22
22
|
import {
|
|
23
23
|
contrastText,
|
|
24
24
|
mix,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
resolveActiveTagGroup,
|
|
29
29
|
resolveTagColor,
|
|
30
30
|
tagAttrKey
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-467TVMQL.js";
|
|
32
32
|
|
|
33
33
|
// src/sketch/renderer.ts
|
|
34
34
|
import * as d3 from "d3-selection";
|
|
@@ -945,6 +945,24 @@ function sketchEdgeGeometry(layout, offsets) {
|
|
|
945
945
|
}
|
|
946
946
|
const W_NODE = 100;
|
|
947
947
|
const W_EDGE = 8;
|
|
948
|
+
const W_PORT = 1.5;
|
|
949
|
+
const isBox = (id) => portsById.has(id);
|
|
950
|
+
const portClashCount = (self, s, t) => {
|
|
951
|
+
const e = layout.edges[self];
|
|
952
|
+
let n = 0;
|
|
953
|
+
for (let j = 0; j < layout.edges.length; j++) {
|
|
954
|
+
if (j === self) continue;
|
|
955
|
+
const ej = layout.edges[j];
|
|
956
|
+
const cj = chosen[j];
|
|
957
|
+
if (!isBox(e.sourceId) && ej.targetId === e.sourceId && ej.sourceId !== e.targetId && // not reciprocal
|
|
958
|
+
cj.t === s)
|
|
959
|
+
n++;
|
|
960
|
+
if (!isBox(e.targetId) && ej.sourceId === e.targetId && ej.targetId !== e.sourceId && // not reciprocal
|
|
961
|
+
cj.s === t)
|
|
962
|
+
n++;
|
|
963
|
+
}
|
|
964
|
+
return n;
|
|
965
|
+
};
|
|
948
966
|
const scoreOf = (c, g, poly, self, polys2, s, t) => {
|
|
949
967
|
let edgeCross = 0;
|
|
950
968
|
for (let j = 0; j < polys2.length; j++) {
|
|
@@ -952,7 +970,7 @@ function sketchEdgeGeometry(layout, offsets) {
|
|
|
952
970
|
const pj = polys2[j];
|
|
953
971
|
if (pj) edgeCross += polyCrossings(poly, pj);
|
|
954
972
|
}
|
|
955
|
-
return pathCrossings(g, c.obstacleRects) * W_NODE + edgeCross * W_EDGE + facingCost(c.source, c.target, s) + facingCost(c.target, c.source, t);
|
|
973
|
+
return pathCrossings(g, c.obstacleRects) * W_NODE + edgeCross * W_EDGE + portClashCount(self, s, t) * W_PORT + facingCost(c.source, c.target, s) + facingCost(c.target, c.source, t);
|
|
956
974
|
};
|
|
957
975
|
const chosen = layout.edges.map(
|
|
958
976
|
(_, i) => sides[i] ?? { s: "R", t: "L" }
|
|
@@ -977,7 +995,7 @@ function sketchEdgeGeometry(layout, offsets) {
|
|
|
977
995
|
if (!c || !g || !p) continue;
|
|
978
996
|
const cur = chosen[i];
|
|
979
997
|
const curScore = scoreOf(c, g, p, i, polys, cur.s, cur.t);
|
|
980
|
-
if (curScore < W_EDGE) continue;
|
|
998
|
+
if (curScore < W_EDGE && portClashCount(i, cur.s, cur.t) === 0) continue;
|
|
981
999
|
let bestScore = curScore;
|
|
982
1000
|
let bestG = g;
|
|
983
1001
|
let bestP = p;
|
|
@@ -1040,4 +1058,4 @@ export {
|
|
|
1040
1058
|
sketchEdgeGeometry,
|
|
1041
1059
|
renderSketchForExport
|
|
1042
1060
|
};
|
|
1043
|
-
//# sourceMappingURL=chunk-
|
|
1061
|
+
//# sourceMappingURL=chunk-F3FYUFUH.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
tryCollectNote
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WQLMU7VG.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveNotes
|
|
6
6
|
} from "./chunk-FMDSF3OV.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
measureIndent,
|
|
17
17
|
parseFirstLine,
|
|
18
18
|
tryParseSharedOption
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-LV4BETUU.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveColorWithDiagnostic
|
|
22
22
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -445,4 +445,4 @@ export {
|
|
|
445
445
|
looksLikeClassDiagram,
|
|
446
446
|
extractSymbols
|
|
447
447
|
};
|
|
448
|
-
//# sourceMappingURL=chunk-
|
|
448
|
+
//# sourceMappingURL=chunk-FC5I2KXV.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
analyzePert
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-J76PIKAT.js";
|
|
4
4
|
import {
|
|
5
5
|
computeNodeSizing,
|
|
6
6
|
layoutPert
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GU46PPT3.js";
|
|
8
8
|
import {
|
|
9
9
|
COLLAPSE_BAR_HEIGHT,
|
|
10
10
|
CONTAINER_HEADER_HEIGHT,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-YYVTBZZC.js";
|
|
19
19
|
import {
|
|
20
20
|
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-OU7HLO7I.js";
|
|
22
22
|
import {
|
|
23
23
|
CAPTION_BOX_PADDING_X,
|
|
24
24
|
CAPTION_BOX_PADDING_Y,
|
|
@@ -35,22 +35,22 @@ import {
|
|
|
35
35
|
} from "./chunk-6KFWC4CO.js";
|
|
36
36
|
import {
|
|
37
37
|
LEGEND_HEIGHT
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-QOOUC2J5.js";
|
|
39
39
|
import {
|
|
40
40
|
measureText,
|
|
41
41
|
truncateText,
|
|
42
42
|
wrapTextToWidth
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WCT3NYCV.js";
|
|
44
44
|
import {
|
|
45
45
|
parsePert
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-5PDTIBLV.js";
|
|
47
47
|
import {
|
|
48
48
|
addCalendarDays,
|
|
49
49
|
formatDuration,
|
|
50
50
|
formatScheduleValue,
|
|
51
51
|
formatSlackValue,
|
|
52
52
|
formatSprintCell
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-7L4UJOY6.js";
|
|
54
54
|
import {
|
|
55
55
|
contrastText,
|
|
56
56
|
mix,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
resolveActiveTagGroup,
|
|
62
62
|
resolveTagColor
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-467TVMQL.js";
|
|
64
64
|
|
|
65
65
|
// src/pert/renderer.ts
|
|
66
66
|
import * as d3Selection from "d3-selection";
|
|
@@ -1815,4 +1815,4 @@ export {
|
|
|
1815
1815
|
measurePertAnalysisBlock,
|
|
1816
1816
|
renderPertAnalysisBlock
|
|
1817
1817
|
};
|
|
1818
|
-
//# sourceMappingURL=chunk-
|
|
1818
|
+
//# sourceMappingURL=chunk-FTBZV6NE.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-BMR4CIEO.js";
|
|
7
7
|
import {
|
|
8
8
|
renderNodeCard
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-OTOHI4JO.js";
|
|
10
10
|
import {
|
|
11
11
|
CARD_RADIUS,
|
|
12
12
|
HEADER_HEIGHT,
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
} from "./chunk-3CIOJ5YJ.js";
|
|
17
17
|
import {
|
|
18
18
|
formatDateLabel
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-B63YB7X3.js";
|
|
20
20
|
import {
|
|
21
21
|
renderIntegratedLegend
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-OU7HLO7I.js";
|
|
23
23
|
import {
|
|
24
24
|
TITLE_FONT_SIZE,
|
|
25
25
|
TITLE_FONT_WEIGHT,
|
|
@@ -29,8 +29,9 @@ import {
|
|
|
29
29
|
FONT_FAMILY
|
|
30
30
|
} from "./chunk-6KFWC4CO.js";
|
|
31
31
|
import {
|
|
32
|
-
CHAR_WIDTH_RATIO
|
|
33
|
-
|
|
32
|
+
CHAR_WIDTH_RATIO,
|
|
33
|
+
wrapTextToWidth
|
|
34
|
+
} from "./chunk-WCT3NYCV.js";
|
|
34
35
|
import {
|
|
35
36
|
contrastText,
|
|
36
37
|
getSeriesColors,
|
|
@@ -41,7 +42,7 @@ import {
|
|
|
41
42
|
import {
|
|
42
43
|
resolveActiveTagGroup,
|
|
43
44
|
resolveTagColor
|
|
44
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-467TVMQL.js";
|
|
45
46
|
import {
|
|
46
47
|
resolveColor
|
|
47
48
|
} from "./chunk-TLVIHFRO.js";
|
|
@@ -58,6 +59,8 @@ var DESC_FONT = 11.5;
|
|
|
58
59
|
var DESC_LINE_H = 16;
|
|
59
60
|
var CARD_PAD = 9;
|
|
60
61
|
var CARD_BODY_TOP = HEADER_HEIGHT + SEPARATOR_GAP;
|
|
62
|
+
var TITLE_LINE_H = 16;
|
|
63
|
+
var TITLE_MAX_W = (CARD_W - CARD_PAD * 2) * 0.93;
|
|
61
64
|
var DOT_R = 5.5;
|
|
62
65
|
var MIN_SPACING = 96;
|
|
63
66
|
var LANE_GAP = 16;
|
|
@@ -136,7 +139,14 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
136
139
|
8,
|
|
137
140
|
Math.floor((CARD_W - CARD_PAD * 2) / (DESC_FONT * CHAR_WIDTH_RATIO))
|
|
138
141
|
);
|
|
139
|
-
const
|
|
142
|
+
const titleLayout = (label) => {
|
|
143
|
+
const lines = wrapTextToWidth(label, LABEL_FONT_SIZE, TITLE_MAX_W, {
|
|
144
|
+
hardBreak: true
|
|
145
|
+
});
|
|
146
|
+
const headerH = Math.max(HEADER_HEIGHT, lines.length * TITLE_LINE_H + 12);
|
|
147
|
+
return { lines, headerH };
|
|
148
|
+
};
|
|
149
|
+
const cardHeight = (headerH, lines, hasDate) => headerH + (hasDate ? DATE_SUBTITLE_H : 0) + (lines.length > 0 ? SEPARATOR_GAP + lines.length * DESC_LINE_H : 0) + (lines.length > 0 ? CARD_PAD : 6);
|
|
140
150
|
const eventColor = (ev) => {
|
|
141
151
|
if (!activeGroup) return accent;
|
|
142
152
|
const tc = resolveTagColor(
|
|
@@ -161,6 +171,7 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
161
171
|
palette.textOnFillDark
|
|
162
172
|
);
|
|
163
173
|
const lines2 = wrapDescription(event.description, charsPerLine);
|
|
174
|
+
const title2 = titleLayout(event.label);
|
|
164
175
|
return {
|
|
165
176
|
kind: "event",
|
|
166
177
|
event,
|
|
@@ -176,10 +187,12 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
176
187
|
color: solid2,
|
|
177
188
|
cardFill: cardFill2,
|
|
178
189
|
titleColor: titleColor2,
|
|
190
|
+
titleLines: title2.lines,
|
|
191
|
+
headerH: title2.headerH,
|
|
179
192
|
lines: lines2,
|
|
180
193
|
bulletColors: [],
|
|
181
194
|
bulletMeta: [],
|
|
182
|
-
cardH: cardHeight(lines2, !!event.date),
|
|
195
|
+
cardH: cardHeight(title2.headerH, lines2, !!event.date),
|
|
183
196
|
x: 0,
|
|
184
197
|
side,
|
|
185
198
|
lane: 0,
|
|
@@ -214,6 +227,7 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
214
227
|
const bulletColors = visibleMembers.map(eventColor);
|
|
215
228
|
const bulletMeta = visibleMembers.map((m) => m.metadata);
|
|
216
229
|
const lines = wrapDescription(memberStrs, charsPerLine);
|
|
230
|
+
const title = titleLayout(era.name);
|
|
217
231
|
return {
|
|
218
232
|
kind: "era",
|
|
219
233
|
event: null,
|
|
@@ -229,10 +243,12 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
229
243
|
color: solid,
|
|
230
244
|
cardFill,
|
|
231
245
|
titleColor,
|
|
246
|
+
titleLines: title.lines,
|
|
247
|
+
headerH: title.headerH,
|
|
232
248
|
lines,
|
|
233
249
|
bulletColors,
|
|
234
250
|
bulletMeta,
|
|
235
|
-
cardH: cardHeight(lines, false),
|
|
251
|
+
cardH: cardHeight(title.headerH, lines, false),
|
|
236
252
|
x: 0,
|
|
237
253
|
side,
|
|
238
254
|
lane: 0,
|
|
@@ -331,32 +347,6 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
331
347
|
p.x = H_MARGIN + i * spacing;
|
|
332
348
|
});
|
|
333
349
|
}
|
|
334
|
-
if (scaled) {
|
|
335
|
-
const SPREAD = CARD_W + FAN_GAP;
|
|
336
|
-
for (let iter = 0; iter < 8; iter++) {
|
|
337
|
-
let moved = false;
|
|
338
|
-
for (const side of ["above", "below"]) {
|
|
339
|
-
const obs = placed.filter((p) => p.side === side).sort((a, b) => a.x - b.x);
|
|
340
|
-
for (let i = 1; i < obs.length; i++) {
|
|
341
|
-
const p = obs[i];
|
|
342
|
-
if (p.kind !== "event") continue;
|
|
343
|
-
const prev = obs[i - 1];
|
|
344
|
-
if (prev.kind === "event" && p.dateValue === prev.dateValue)
|
|
345
|
-
continue;
|
|
346
|
-
const need = prev.x + SPREAD;
|
|
347
|
-
if (need <= p.x) continue;
|
|
348
|
-
const nxt = obs[i + 1];
|
|
349
|
-
const cap = nxt?.kind === "era" ? nxt.x - SPREAD : Infinity;
|
|
350
|
-
const target = Math.min(need, cap);
|
|
351
|
-
if (target > p.x + 0.5) {
|
|
352
|
-
p.x = target;
|
|
353
|
-
moved = true;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
if (!moved) break;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
350
|
for (const side of ["above", "below"]) {
|
|
361
351
|
const arr = placed.filter((p) => p.side === side).sort((a, b) => a.x - b.x);
|
|
362
352
|
const laneRight = [];
|
|
@@ -536,9 +526,9 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
536
526
|
const dateH = dateStr ? DATE_SUBTITLE_H : 0;
|
|
537
527
|
if (parsed.options.noBox) {
|
|
538
528
|
const titleNearTop = p.side === "below";
|
|
539
|
-
const headBandTop = titleNearTop ? 0 : p.cardH -
|
|
540
|
-
const shelfTop = titleNearTop ? 0 : p.cardH -
|
|
541
|
-
const shelfH =
|
|
529
|
+
const headBandTop = titleNearTop ? 0 : p.cardH - p.headerH;
|
|
530
|
+
const shelfTop = titleNearTop ? 0 : p.cardH - p.headerH - dateH;
|
|
531
|
+
const shelfH = p.headerH + dateH;
|
|
542
532
|
const clipId = `dgmo-evt-shelf-${shelfClipSeq++}`;
|
|
543
533
|
cardG.append("clipPath").attr("id", clipId).append("rect").attr("x", 0).attr("y", shelfTop).attr("width", CARD_W).attr("height", shelfH).attr("rx", SHELF_EDGE);
|
|
544
534
|
cardG.append("rect").attr("x", 0).attr("y", shelfTop).attr("width", CARD_W).attr("height", shelfH).attr("clip-path", `url(#${clipId})`).attr(
|
|
@@ -548,18 +538,22 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
548
538
|
const edgeY = titleNearTop ? shelfTop : shelfTop + shelfH - SHELF_EDGE;
|
|
549
539
|
cardG.append("rect").attr("x", 0).attr("y", edgeY).attr("width", CARD_W).attr("height", SHELF_EDGE).attr("clip-path", `url(#${clipId})`).attr("fill", p.color).attr("fill-opacity", p.future ? 0.4 : 1);
|
|
550
540
|
const shelfText = parsed.options.solidFill ? contrastText(p.color, palette.textOnFillLight, palette.textOnFillDark) : p.color;
|
|
551
|
-
|
|
541
|
+
const titleMid = headBandTop + p.headerH / 2;
|
|
542
|
+
const titleTop = titleMid - (p.titleLines.length - 1) * TITLE_LINE_H / 2;
|
|
543
|
+
for (let ti = 0; ti < p.titleLines.length; ti++) {
|
|
544
|
+
cardG.append("text").attr("x", CARD_PAD).attr("y", titleTop + ti * TITLE_LINE_H + LABEL_FONT_SIZE / 2 - 2).attr("fill", shelfText).attr("font-family", FONT_FAMILY).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", 700).text(p.titleLines[ti]);
|
|
545
|
+
}
|
|
552
546
|
if (dateStr) {
|
|
553
547
|
cardG.append("text").attr("x", CARD_PAD).attr(
|
|
554
548
|
"y",
|
|
555
|
-
(titleNearTop ?
|
|
549
|
+
(titleNearTop ? p.headerH : headBandTop - dateH) + DATE_SUBTITLE_FONT + 2
|
|
556
550
|
).attr(
|
|
557
551
|
"fill",
|
|
558
552
|
parsed.options.solidFill ? mix(shelfText, p.color, 25) : mix(palette.text, palette.bg, 55)
|
|
559
553
|
).attr("font-family", FONT_FAMILY).attr("font-size", DATE_SUBTITLE_FONT).attr("font-weight", 600).text(dateStr);
|
|
560
554
|
}
|
|
561
555
|
if (p.lines.length > 0) {
|
|
562
|
-
const startBaseline = titleNearTop ?
|
|
556
|
+
const startBaseline = titleNearTop ? p.headerH + SEPARATOR_GAP + dateH + DESC_FONT : CARD_PAD + DESC_FONT;
|
|
563
557
|
renderBody(
|
|
564
558
|
cardG,
|
|
565
559
|
p.lines,
|
|
@@ -579,21 +573,22 @@ function renderEventLine(container, parsed, palette, isDark, onClickItem, export
|
|
|
579
573
|
stroke: p.color,
|
|
580
574
|
strokeWidth: NODE_STROKE_WIDTH,
|
|
581
575
|
label: p.label,
|
|
576
|
+
labelLines: p.titleLines,
|
|
582
577
|
labelColor: p.titleColor,
|
|
583
578
|
labelFontSize: LABEL_FONT_SIZE,
|
|
584
|
-
headerHeight:
|
|
579
|
+
headerHeight: p.headerH
|
|
585
580
|
});
|
|
586
581
|
if (dateStr) {
|
|
587
|
-
cardG.append("text").attr("x", CARD_W / 2).attr("y",
|
|
582
|
+
cardG.append("text").attr("x", CARD_W / 2).attr("y", p.headerH + DATE_SUBTITLE_FONT + 1).attr("text-anchor", "middle").attr("fill", mix(p.titleColor, p.cardFill, 60)).attr("font-family", FONT_FAMILY).attr("font-size", DATE_SUBTITLE_FONT).attr("font-weight", 600).text(dateStr);
|
|
588
583
|
}
|
|
589
584
|
if (p.lines.length > 0) {
|
|
590
|
-
cardG.append("line").attr("x1", 0).attr("y1",
|
|
585
|
+
cardG.append("line").attr("x1", 0).attr("y1", p.headerH + dateH).attr("x2", CARD_W).attr("y2", p.headerH + dateH).attr("stroke", p.titleColor).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
|
|
591
586
|
renderBody(
|
|
592
587
|
cardG,
|
|
593
588
|
p.lines,
|
|
594
589
|
p.titleColor,
|
|
595
590
|
palette,
|
|
596
|
-
|
|
591
|
+
p.headerH + SEPARATOR_GAP + dateH + DESC_FONT,
|
|
597
592
|
p.bulletColors,
|
|
598
593
|
p.bulletMeta
|
|
599
594
|
);
|
|
@@ -987,4 +982,4 @@ export {
|
|
|
987
982
|
focusEventLine,
|
|
988
983
|
renderEventLineForExport
|
|
989
984
|
};
|
|
990
|
-
//# sourceMappingURL=chunk-
|
|
985
|
+
//# sourceMappingURL=chunk-G3PF3S7P.js.map
|