@diagrammo/dgmo 0.89.0 → 0.91.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 +1 -1
- package/dist/advanced.d.ts +589 -15
- package/dist/advanced.js +813 -211
- package/dist/block.d.ts +11 -2
- package/dist/block.js +94 -64
- package/dist/{calculator-35YVW4QO.js → calculator-3LZUWOBK.js} +2 -2
- package/dist/{chart-meta-Bev5Ebjr.d.ts → chart-meta-B_WTMP0y.d.ts} +1 -1
- package/dist/chart-meta.d.ts +2 -2
- package/dist/chart-meta.js +18 -17
- package/dist/{chart-types-Bf8C5QQW.d.ts → chart-types-V2NcgN5O.d.ts} +4 -0
- package/dist/{charts-d3-KEQSUWKP.js → charts-d3-YXD6VGZQ.js} +8 -7
- package/dist/{chunk-PMNITNPR.js → chunk-273GB7WK.js} +6 -5
- package/dist/{chunk-HAMF4F3P.js → chunk-2A4OFZ2Z.js} +5 -5
- package/dist/{chunk-K5XT7NHD.js → chunk-2AM6VA3A.js} +10 -10
- package/dist/{chunk-XJ2TBXHA.js → chunk-2UV627GG.js} +9 -9
- package/dist/{chunk-7WGCQE2E.js → chunk-2ZVLI6GQ.js} +1 -1
- package/dist/{chunk-JVZ7KFAX.js → chunk-37QQXKFV.js} +9 -10
- package/dist/{chunk-M2BCY7H3.js → chunk-3LINSNJT.js} +199 -146
- package/dist/{chunk-WPL5PFXE.js → chunk-3SLRZKLB.js} +6 -6
- package/dist/chunk-3UR4F7FE.js +14 -0
- package/dist/{chunk-ZUCXFXLD.js → chunk-3YTAOMMN.js} +2 -2
- package/dist/{chunk-NIUO2TNR.js → chunk-4HG4PYHM.js} +197 -203
- package/dist/{chunk-BOO24UMJ.js → chunk-4YO7VJTP.js} +1 -1
- package/dist/{chunk-HUNDJTTH.js → chunk-53BJIOLF.js} +1 -1
- package/dist/{chunk-LR6RRDWN.js → chunk-57L2JPP2.js} +10 -6
- package/dist/{chunk-IIOLFAGJ.js → chunk-5DIBB2QG.js} +51 -32
- package/dist/{chunk-S2WE7TVK.js → chunk-5MDQMB6A.js} +1 -1
- package/dist/{chunk-7Z2VFRP5.js → chunk-5U6DXIMV.js} +47 -24
- package/dist/{chunk-QIOYTQDZ.js → chunk-5VPWIC6T.js} +9 -9
- package/dist/{chunk-JRUEIRJB.js → chunk-634LDSN6.js} +3 -3
- package/dist/{chunk-VEPIAUSK.js → chunk-6BQSDF77.js} +1 -5
- package/dist/{chunk-LPYYZCSI.js → chunk-6NO3MNBC.js} +3 -3
- package/dist/{chunk-ITSBBQTH.js → chunk-6QEXWMBP.js} +13 -17
- package/dist/{chunk-DDPGEGHB.js → chunk-7BBRSOKS.js} +3 -3
- package/dist/{chunk-WQ6G6FFM.js → chunk-AR4QVMWG.js} +5 -2
- package/dist/{chunk-BB6QKWHZ.js → chunk-B6EUFLRP.js} +10 -10
- package/dist/{chunk-C4FRGZGX.js → chunk-CDT33RHG.js} +1 -1
- package/dist/{chunk-WP22MHH6.js → chunk-CPGKRI7H.js} +10 -13
- package/dist/{chunk-ZNNVI5SR.js → chunk-CU2PZLZP.js} +53 -31
- package/dist/{chunk-CUYHST3B.js → chunk-CVZBLHHW.js} +1 -1
- package/dist/{chunk-Y7PSAHAY.js → chunk-CXIPV2FY.js} +3 -3
- package/dist/{chunk-NRPELUB6.js → chunk-D7DXNQW5.js} +2 -2
- package/dist/{chunk-YMFQLWZ2.js → chunk-D7PP35BA.js} +1 -1
- package/dist/{chunk-RGWYZR3S.js → chunk-DLX7MEN4.js} +2 -2
- package/dist/chunk-EDPDAUBL.js +825 -0
- package/dist/{chunk-GSYZZFI5.js → chunk-EP7BT3HU.js} +2 -2
- package/dist/{chunk-ICZ7M6IZ.js → chunk-EQJ3U5EW.js} +1 -1
- package/dist/{chunk-3C2FWS2J.js → chunk-EWERNTOX.js} +1 -1
- package/dist/{chunk-XUCQVKLQ.js → chunk-F2436VRR.js} +4 -4
- package/dist/{chunk-UG2XG57E.js → chunk-F26ZPBSF.js} +3 -3
- package/dist/{chunk-UWKRPQZO.js → chunk-FJCYK4K3.js} +25 -22
- package/dist/{chunk-FKLE6QA3.js → chunk-G22UV5AF.js} +12 -12
- package/dist/{chunk-GUTZCRBT.js → chunk-G3EUQMV4.js} +4 -4
- package/dist/{chunk-SOPM5PLO.js → chunk-GCDW3WAY.js} +14 -14
- package/dist/{chunk-7UDAIP6W.js → chunk-HFG7KQOY.js} +13 -15
- package/dist/{chunk-ID2K3IHI.js → chunk-HLE5QGZJ.js} +1 -1
- package/dist/{chunk-QFHWYWQL.js → chunk-HLVGZXM5.js} +2 -2
- package/dist/{chunk-7C2RAGPT.js → chunk-HSGWR2FL.js} +16 -16
- package/dist/{chunk-P3SKSKJI.js → chunk-HWXUQCDY.js} +3 -3
- package/dist/{chunk-HTWH2XQL.js → chunk-HYV6GSXM.js} +6 -3
- package/dist/{chunk-3RYBTEF5.js → chunk-I74AQRVD.js} +6 -12
- package/dist/chunk-IHK3Y2HG.js +781 -0
- package/dist/{chunk-7KPHRTND.js → chunk-II4XJETG.js} +1 -1
- package/dist/{chunk-RXIKESRI.js → chunk-IMHNZITR.js} +2 -2
- package/dist/{chunk-TAP2NZEU.js → chunk-IMKPFW67.js} +13 -13
- package/dist/{chunk-FKZ2Y3Q5.js → chunk-IS6WFBX7.js} +3 -3
- package/dist/{chunk-47E5UTXE.js → chunk-IUBCDNT2.js} +2 -2
- package/dist/{chunk-EXKCRXPO.js → chunk-IWTUXGHN.js} +12 -12
- package/dist/{chunk-C7QRRTAW.js → chunk-J2SQNZ6D.js} +2 -2
- package/dist/{chunk-DZPHN2WN.js → chunk-JA2S7PHR.js} +14 -14
- package/dist/{chunk-DPSMX4EY.js → chunk-JJQWCI35.js} +4 -4
- package/dist/chunk-JJUDOR4I.js +110 -0
- package/dist/{chunk-LYLNMN77.js → chunk-K3BYD3WU.js} +8 -3
- package/dist/{chunk-3AQJNY65.js → chunk-KFXY5IW2.js} +149 -43
- package/dist/{chunk-J64NZ6NF.js → chunk-KSZHIAI2.js} +1 -1
- package/dist/{chunk-LCJURK7L.js → chunk-LKR4FACF.js} +2 -4
- package/dist/{chunk-PIXJL77H.js → chunk-M6J25PAZ.js} +1 -1
- package/dist/{chunk-IJ27L3R4.js → chunk-MA42PIGJ.js} +1 -1
- package/dist/{chunk-IQ6P3HDE.js → chunk-MI6SJJQU.js} +2 -2
- package/dist/{chunk-N4BBSDWI.js → chunk-MJKQ5ZYY.js} +140 -151
- package/dist/{chunk-6K7RODXG.js → chunk-MKFQ5E7J.js} +1 -1
- package/dist/{chunk-AZ24RI5L.js → chunk-MNL547RV.js} +6 -6
- package/dist/{chunk-44GP7PD5.js → chunk-MPJQMMBZ.js} +12 -0
- package/dist/{chunk-ECMA6XE2.js → chunk-N254IJM2.js} +13 -13
- package/dist/{layout-search-YKUL4VBV.js → chunk-NWPMLX2V.js} +27 -30
- package/dist/{chunk-DV2VEJCC.js → chunk-NWSPPGIE.js} +6 -6
- package/dist/{chunk-GDJW64XE.js → chunk-OYKNMFUY.js} +1 -1
- package/dist/{chunk-B3S76BZO.js → chunk-PSGSFRRE.js} +4 -4
- package/dist/{chunk-4AJKOUBO.js → chunk-PUZ63XZM.js} +13 -11
- package/dist/{chunk-UQLHKLF4.js → chunk-PZVTFQI2.js} +8 -8
- package/dist/{chunk-W7QN5BC5.js → chunk-Q3N7PI3B.js} +180 -7
- package/dist/{chunk-L5AFONQU.js → chunk-QKJ6MQXW.js} +2 -4
- package/dist/{chunk-7SX4IY6T.js → chunk-QVKTAU7P.js} +1 -1
- package/dist/{chunk-SLQT3JP3.js → chunk-R7BSF7Z7.js} +1 -1
- package/dist/{chunk-4R6OMKXB.js → chunk-RHXIUUWB.js} +5 -5
- package/dist/{chunk-MHAYUS65.js → chunk-RMTOZALT.js} +8 -5
- package/dist/{chunk-HSRQDWV7.js → chunk-ROCBGUJN.js} +8 -17
- package/dist/{chunk-44FTCIRI.js → chunk-RVTYIGWZ.js} +9 -9
- package/dist/{chunk-RU725VCJ.js → chunk-SKF7XLCM.js} +10 -35
- package/dist/{chunk-RPKBWJBB.js → chunk-SMTWQ66K.js} +6 -6
- package/dist/{chunk-3AX6MCI6.js → chunk-SPQVER4T.js} +2 -2
- package/dist/{chunk-CX6OH5WP.js → chunk-SWBHH2UW.js} +4 -4
- package/dist/{chunk-WP2RLGDI.js → chunk-TCX5PMEY.js} +1 -1
- package/dist/{chunk-7TF3QOOD.js → chunk-TIVMAITN.js} +14 -0
- package/dist/{chunk-NSR2CGV6.js → chunk-TLPY4ZBI.js} +611 -437
- package/dist/{chunk-WRCAH3UO.js → chunk-TPEYEOXA.js} +15 -15
- package/dist/{chunk-FJNXXGTR.js → chunk-UWJP4JSZ.js} +3 -3
- package/dist/{chunk-MY6GUH26.js → chunk-V3KHZQPK.js} +3 -3
- package/dist/{chunk-66YFDTT6.js → chunk-VGSSAMLA.js} +4 -4
- package/dist/{chunk-Q6SQISHT.js → chunk-VMD2CYVP.js} +311 -74
- package/dist/{chunk-MFW6P7WH.js → chunk-WNTPJZU7.js} +3 -3
- package/dist/{chunk-7W4XLIVH.js → chunk-WTE27AJT.js} +14 -14
- package/dist/{chunk-UKJLPA7R.js → chunk-X6IZP2BD.js} +1 -1
- package/dist/{chunk-2GM7N5TV.js → chunk-XLAREWBK.js} +9 -9
- package/dist/{chunk-AYOVY75O.js → chunk-XLPJJ35N.js} +4 -4
- package/dist/{chunk-NGC3IZRY.js → chunk-XQTRGKQ3.js} +4 -4
- package/dist/{chunk-WEF6MXFG.js → chunk-YZG37S7L.js} +9 -9
- package/dist/{chunk-LFKSHDVI.js → chunk-ZB2Q67NO.js} +14 -13
- package/dist/{chunk-JQ57AWDL.js → chunk-ZJ4PYTCK.js} +1 -1
- package/dist/completion-registry.d.ts +6 -0
- package/dist/completion-registry.js +62 -6
- package/dist/{compute-JAP5E2E4.js → compute-2XWFVO7K.js} +1 -1
- package/dist/{d3-B6524aaP.d.ts → d3-2S3PrXik.d.ts} +11 -0
- package/dist/dgmo-router-YHBMKTXY.js +94 -0
- package/dist/{dimensions-7MF7VSGS.js → dimensions-QMGWJQTR.js} +5 -5
- package/dist/editor.js +12 -0
- package/dist/{flowchart-parser-GG7XBLQH.js → flowchart-parser-BLJ6RA53.js} +4 -4
- package/dist/{flowchart-renderer-DZQZRL2F.js → flowchart-renderer-FXRQKXAK.js} +12 -8
- package/dist/highlight.js +12 -0
- package/dist/index.d.ts +26 -5
- package/dist/index.js +84 -57
- package/dist/{layout-5VSMZPMG.js → layout-5HCEF7VO.js} +1 -1
- package/dist/{layout-6L3BIFEZ.js → layout-6PLSBB5X.js} +3 -3
- package/dist/{layout-UIV56NUA.js → layout-B7PQRAMB.js} +1 -1
- package/dist/{layout-IGAVGDME.js → layout-CCVCLZ6S.js} +1 -1
- package/dist/{layout-PP36LUTA.js → layout-CRUAP7JG.js} +3 -3
- package/dist/{layout-Q3RYSODA.js → layout-G42FDCF3.js} +3 -3
- package/dist/{layout-EFEZ533S.js → layout-IV4H2FLB.js} +3 -3
- package/dist/{layout-4RRC7XU7.js → layout-JTNRSGOS.js} +6 -3
- package/dist/{layout-H4K54IW3.js → layout-RBLD5EGX.js} +6 -3
- package/dist/{layout-SW3XWYKC.js → layout-ROAVGBUC.js} +1 -1
- package/dist/{layout-XUW444O5.js → layout-T2DQ4M77.js} +8 -4
- package/dist/{layout-MSSHF45T.js → layout-UPQGIT3N.js} +2 -2
- package/dist/{layout-DXVAYF6W.js → layout-VRJ5YFUE.js} +2 -2
- package/dist/{layout-ZP7XYVXF.js → layout-YKGQRFDM.js} +2 -4
- package/dist/layout-search-L75YOBME.js +42 -0
- package/dist/{palettes-WZAIQTEG.js → palettes-WQHELGVQ.js} +2 -1
- package/dist/{parser-ZLKYDFI5.js → parser-2XCDVLSN.js} +3 -3
- package/dist/{parser-GZ3LVF72.js → parser-3MGA2MTM.js} +2 -2
- package/dist/{parser-NOANDFJ4.js → parser-4AR25MAS.js} +2 -2
- package/dist/{parser-GCCWMBTU.js → parser-4QNRCGU5.js} +5 -4
- package/dist/{parser-LANGKWRG.js → parser-6LMB7BQQ.js} +2 -2
- package/dist/{parser-WEVTMBJ5.js → parser-6NSQLPTS.js} +3 -3
- package/dist/{parser-KYPP2DX6.js → parser-6X4GGH2R.js} +4 -4
- package/dist/parser-AL6YL7KM.js +12 -0
- package/dist/{parser-5655XSOR.js → parser-D6YRVV75.js} +3 -3
- package/dist/{parser-NGHQQGD2.js → parser-EY3VJWBE.js} +3 -3
- package/dist/{parser-TL3JA4RI.js → parser-EYF4ZSZO.js} +3 -3
- package/dist/{parser-256EIWB2.js → parser-FDXUQ5TI.js} +2 -2
- package/dist/{parser-JOOAVBJI.js → parser-H2DJEAPG.js} +3 -3
- package/dist/{parser-AKBVJHMK.js → parser-ILWAA3QJ.js} +3 -3
- package/dist/{parser-AN3MGHRL.js → parser-KMFMNZYI.js} +3 -3
- package/dist/{parser-IMM2JJX3.js → parser-MDSVVCJP.js} +4 -4
- package/dist/{parser-OVQTTTUJ.js → parser-OFTMA36M.js} +2 -2
- package/dist/{parser-LGS65QPN.js → parser-Q3UAOLEZ.js} +2 -2
- package/dist/{parser-DGF3ZEO6.js → parser-QL4DEPVA.js} +4 -4
- package/dist/{parser-XYY5NHP4.js → parser-R6OETHWM.js} +2 -2
- package/dist/{parser-GEKPWSSK.js → parser-UEDPLM46.js} +3 -3
- package/dist/{parser-KZMALSB2.js → parser-UL6WN6W5.js} +4 -4
- package/dist/{parser-J4DVNL4W.js → parser-ULSUK36C.js} +4 -4
- package/dist/{parser-KZMJNKDW.js → parser-UY3K4ROB.js} +2 -2
- package/dist/{parser-KFYRTGTC.js → parser-UYQNNQKT.js} +4 -4
- package/dist/{parser-DHSFIUPU.js → parser-VG747VR6.js} +3 -3
- package/dist/{parser-UTXFJG4X.js → parser-VK4PNDX4.js} +3 -3
- package/dist/{parser-SA3RAJFS.js → parser-WSONWDFN.js} +2 -2
- package/dist/{parser-NPXPJHWN.js → parser-X5FQ36KJ.js} +3 -3
- package/dist/{parser-OKB64MMN.js → parser-XO5IAXMT.js} +3 -3
- package/dist/{parser-HCGXNHHL.js → parser-YVHO2NRM.js} +3 -3
- package/dist/{parser-P4TOQYNN.js → parser-YWZGIU3C.js} +3 -3
- package/dist/{parser-337TACHB.js → parser-ZFLSULFC.js} +3 -3
- package/dist/{parser-7OEE7QT6.js → parser-ZR7JAKSW.js} +2 -2
- package/dist/{renderer-CHQZES6G.js → renderer-3N64GVNM.js} +2 -2
- package/dist/{renderer-JR2XNZAH.js → renderer-43IVPARP.js} +5 -5
- package/dist/{renderer-J4OS77PK.js → renderer-4MEZYGU6.js} +3 -3
- package/dist/{renderer-IR5GGAPB.js → renderer-54GXA3UO.js} +11 -7
- package/dist/{renderer-7VQOKAII.js → renderer-7EAWN7MC.js} +6 -6
- package/dist/{renderer-QQHQY3GT.js → renderer-7SEXPBGM.js} +5 -5
- package/dist/{renderer-P4XCRNCY.js → renderer-B7B7BQM3.js} +9 -9
- package/dist/{renderer-7HOSI6JJ.js → renderer-I2LYSQBV.js} +4 -4
- package/dist/{renderer-6OQM32X3.js → renderer-IPDCAACY.js} +3 -3
- package/dist/{renderer-JRVY7HAD.js → renderer-J2LOMTBC.js} +4 -4
- package/dist/renderer-JUH6M3XF.js +46 -0
- package/dist/renderer-KY6O5JTX.js +80 -0
- package/dist/{renderer-FCXRDYSJ.js → renderer-LHTDI5RV.js} +7 -7
- package/dist/{renderer-XHEMXBQM.js → renderer-LWL3IJOF.js} +5 -5
- package/dist/{renderer-BLHN3RCY.js → renderer-MRMFYYZT.js} +2 -2
- package/dist/{renderer-DBNDLKPE.js → renderer-NCIDGJ2R.js} +7 -7
- package/dist/{renderer-3AD4NDF5.js → renderer-OPA4JJKX.js} +6 -6
- package/dist/{renderer-XFEZ5UBE.js → renderer-QMNC7TGN.js} +6 -6
- package/dist/{renderer-5GZNGZU5.js → renderer-QQNPJGAP.js} +9 -7
- package/dist/{renderer-CEIX5JPA.js → renderer-R7OYCJEA.js} +2 -2
- package/dist/{renderer-WQ654YT5.js → renderer-R7RK7FKI.js} +1 -1
- package/dist/{renderer-4JE5ORRO.js → renderer-RFP55AW7.js} +13 -10
- package/dist/{renderer-NAA7D33G.js → renderer-S3NFBJCY.js} +15 -11
- package/dist/{renderer-43ESBXVY.js → renderer-SD4ZHHAR.js} +8 -6
- package/dist/{renderer-WB75JME5.js → renderer-SE7Z5AOL.js} +6 -6
- package/dist/{renderer-YTEZK3GC.js → renderer-T2WUA7MC.js} +7 -7
- package/dist/{renderer-VYWCMRWA.js → renderer-TWKEZ3DD.js} +5 -5
- package/dist/{renderer-DCJ4AQ3N.js → renderer-U5PD72G7.js} +5 -5
- package/dist/{renderer-EAORWLVK.js → renderer-VCTKBUTR.js} +7 -7
- package/dist/{renderer-7L7J4DHO.js → renderer-VNZTWATB.js} +7 -6
- package/dist/{renderer-2ZQ6DPVD.js → renderer-YDNWK6RI.js} +2 -2
- package/dist/{renderer-VGQMJC5K.js → renderer-YDOWBIUB.js} +11 -10
- package/dist/{renderer-7MCC6GKH.js → renderer-YQPZ7O2C.js} +2 -2
- package/dist/{renderer-ZXQXRNDR.js → renderer-ZQ77CM6Y.js} +6 -6
- package/dist/{renderer-radial-NA5DVBG4.js → renderer-radial-TNNEL3YN.js} +5 -5
- package/dist/{resolver-XSXE2TRX.js → resolver-6DJLZF6Y.js} +1 -1
- package/dist/{state-parser-FE3RF6XY.js → state-parser-NIIVOU2Y.js} +4 -4
- package/dist/{state-renderer-4S2C2CHB.js → state-renderer-TVLEG32M.js} +14 -10
- package/dist/{themes-CzuBdx1T.d.ts → themes-Cm2YBcT8.d.ts} +38 -2
- package/docs/ai-integration.md +4 -3
- package/docs/language-reference.md +162 -12
- package/gallery/fixtures/sketch.dgmo +2 -2
- package/gallery/fixtures/whiteboard.dgmo +18 -0
- package/package.json +2 -1
- package/dist/chunk-6EK55ART.js +0 -116
- package/dist/chunk-HTNLLT34.js +0 -72
- package/dist/dgmo-router-7WANZOBD.js +0 -92
- package/dist/renderer-TJJGFQGT.js +0 -78
- package/dist/{chunk-3FCSOYN4.js → chunk-5P2L5QXE.js} +0 -0
- package/dist/{chunk-HJRP6PXL.js → chunk-BQVTV4LB.js} +0 -0
- package/dist/{chunk-LYRDIVSY.js → chunk-GLCMUTO5.js} +0 -0
- package/dist/{chunk-5LE2CTLS.js → chunk-NTJ5HVV6.js} +3 -3
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
searchPlacement
|
|
3
|
+
} from "./chunk-JJUDOR4I.js";
|
|
4
4
|
import {
|
|
5
|
+
buildPlacedNotes,
|
|
5
6
|
noteCanvasShift
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q3N7PI3B.js";
|
|
7
8
|
import {
|
|
8
9
|
resolveNotes
|
|
9
10
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -69,6 +70,7 @@ function findConnectedComponents(tableIds, relationships) {
|
|
|
69
70
|
}
|
|
70
71
|
return components;
|
|
71
72
|
}
|
|
73
|
+
var newDagreGraph = () => new dagre.graphlib.Graph({ multigraph: true });
|
|
72
74
|
function layoutComponent(tables, rels, dimMap) {
|
|
73
75
|
const nodePositions = /* @__PURE__ */ new Map();
|
|
74
76
|
const edgePoints = /* @__PURE__ */ new Map();
|
|
@@ -87,22 +89,44 @@ function layoutComponent(tables, rels, dimMap) {
|
|
|
87
89
|
height: dims.height
|
|
88
90
|
};
|
|
89
91
|
}
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
92
|
+
const place = (ranker, shuffle) => {
|
|
93
|
+
const ord = shuffle ?? ((a) => a.slice());
|
|
94
|
+
const g2 = newDagreGraph();
|
|
95
|
+
g2.setGraph({
|
|
96
|
+
rankdir: "LR",
|
|
97
|
+
ranker,
|
|
98
|
+
nodesep: 40,
|
|
99
|
+
ranksep: 80,
|
|
100
|
+
edgesep: 20
|
|
101
|
+
});
|
|
102
|
+
g2.setDefaultEdgeLabel(() => ({}));
|
|
103
|
+
for (const table of ord(tables)) {
|
|
104
|
+
const dims = dimMap.get(table.id);
|
|
105
|
+
g2.setNode(table.id, { width: dims.width, height: dims.height });
|
|
106
|
+
}
|
|
107
|
+
for (const rel of ord(rels)) {
|
|
108
|
+
g2.setEdge(
|
|
109
|
+
rel.source,
|
|
110
|
+
rel.target,
|
|
111
|
+
{ label: rel.label ?? "" },
|
|
112
|
+
String(rel.lineNumber)
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
dagre.layout(g2);
|
|
116
|
+
return g2;
|
|
117
|
+
};
|
|
118
|
+
const { g, edgePoints: bent } = searchPlacement("LR", place, (lay) => ({
|
|
119
|
+
nodes: tables.map((t) => {
|
|
120
|
+
const p = lay.node(t.id);
|
|
121
|
+
return { id: t.id, x: p.x, y: p.y, width: p.width, height: p.height };
|
|
122
|
+
}),
|
|
123
|
+
edges: rels.map((r) => ({
|
|
124
|
+
source: r.source,
|
|
125
|
+
target: r.target,
|
|
126
|
+
points: lay.edge(r.source, r.target, String(r.lineNumber))?.points ?? []
|
|
127
|
+
}))
|
|
128
|
+
}));
|
|
129
|
+
const routeOf = (i, rel) => bent?.[i] ?? g.edge(rel.source, rel.target, String(rel.lineNumber))?.points ?? [];
|
|
106
130
|
let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
107
131
|
for (const table of tables) {
|
|
108
132
|
const pos = g.node(table.id);
|
|
@@ -112,22 +136,21 @@ function layoutComponent(tables, rels, dimMap) {
|
|
|
112
136
|
maxX = Math.max(maxX, pos.x + dims.width / 2);
|
|
113
137
|
maxY = Math.max(maxY, pos.y + dims.height / 2);
|
|
114
138
|
}
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
for (const pt of
|
|
139
|
+
rels.forEach((rel, i) => {
|
|
140
|
+
const pts = routeOf(i, rel);
|
|
141
|
+
for (const pt of pts) {
|
|
118
142
|
minX = Math.min(minX, pt.x);
|
|
119
143
|
minY = Math.min(minY, pt.y);
|
|
120
144
|
maxX = Math.max(maxX, pt.x);
|
|
121
145
|
maxY = Math.max(maxY, pt.y);
|
|
122
146
|
}
|
|
123
|
-
if (rel.label &&
|
|
124
|
-
const pts = ed.points;
|
|
147
|
+
if (rel.label && pts.length > 0) {
|
|
125
148
|
const mid = pts[Math.floor(pts.length / 2)];
|
|
126
149
|
const hw = (measureText(rel.label, EDGE_LABEL_FONT_SIZE) + 8) / 2;
|
|
127
150
|
minX = Math.min(minX, mid.x - hw);
|
|
128
151
|
maxX = Math.max(maxX, mid.x + hw);
|
|
129
152
|
}
|
|
130
|
-
}
|
|
153
|
+
});
|
|
131
154
|
for (const table of tables) {
|
|
132
155
|
const pos = g.node(table.id);
|
|
133
156
|
const dims = dimMap.get(table.id);
|
|
@@ -137,16 +160,12 @@ function layoutComponent(tables, rels, dimMap) {
|
|
|
137
160
|
...dims
|
|
138
161
|
});
|
|
139
162
|
}
|
|
140
|
-
|
|
141
|
-
const ed = g.edge(rel.source, rel.target, String(rel.lineNumber));
|
|
163
|
+
rels.forEach((rel, i) => {
|
|
142
164
|
edgePoints.set(
|
|
143
165
|
rel.lineNumber,
|
|
144
|
-
(
|
|
145
|
-
x: pt.x - minX,
|
|
146
|
-
y: pt.y - minY
|
|
147
|
-
}))
|
|
166
|
+
routeOf(i, rel).map((pt) => ({ x: pt.x - minX, y: pt.y - minY }))
|
|
148
167
|
);
|
|
149
|
-
}
|
|
168
|
+
});
|
|
150
169
|
return {
|
|
151
170
|
nodePositions,
|
|
152
171
|
edgePoints,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
searchPlacement
|
|
3
|
+
} from "./chunk-JJUDOR4I.js";
|
|
4
4
|
import {
|
|
5
|
+
buildPlacedNotes,
|
|
5
6
|
noteCanvasShift
|
|
6
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-Q3N7PI3B.js";
|
|
7
8
|
import {
|
|
8
9
|
resolveNotes
|
|
9
10
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -75,32 +76,51 @@ function computeNodeDimensions(node) {
|
|
|
75
76
|
const height = headerHeight + fieldsHeight + methodsHeight;
|
|
76
77
|
return { width, height, headerHeight, fieldsHeight, methodsHeight };
|
|
77
78
|
}
|
|
79
|
+
var newDagreGraph = () => new dagre.graphlib.Graph();
|
|
78
80
|
function layoutClassDiagram(parsed, options) {
|
|
79
81
|
if (parsed.classes.length === 0) {
|
|
80
82
|
return { nodes: [], edges: [], width: 0, height: 0 };
|
|
81
83
|
}
|
|
82
|
-
const g = new dagre.graphlib.Graph();
|
|
83
|
-
g.setGraph({
|
|
84
|
-
rankdir: "TB",
|
|
85
|
-
nodesep: 60,
|
|
86
|
-
ranksep: 80,
|
|
87
|
-
edgesep: 20
|
|
88
|
-
});
|
|
89
|
-
g.setDefaultEdgeLabel(() => ({}));
|
|
90
84
|
const dimMap = /* @__PURE__ */ new Map();
|
|
91
85
|
for (const node of parsed.classes) {
|
|
92
|
-
|
|
93
|
-
dimMap.set(node.id, dims);
|
|
94
|
-
g.setNode(node.id, {
|
|
95
|
-
label: node.name,
|
|
96
|
-
width: dims.width,
|
|
97
|
-
height: dims.height
|
|
98
|
-
});
|
|
86
|
+
dimMap.set(node.id, computeNodeDimensions(node));
|
|
99
87
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
88
|
+
const place = (ranker, shuffle) => {
|
|
89
|
+
const ord = shuffle ?? ((a) => a.slice());
|
|
90
|
+
const g2 = newDagreGraph();
|
|
91
|
+
g2.setGraph({
|
|
92
|
+
rankdir: "TB",
|
|
93
|
+
ranker,
|
|
94
|
+
nodesep: 60,
|
|
95
|
+
ranksep: 80,
|
|
96
|
+
edgesep: 20
|
|
97
|
+
});
|
|
98
|
+
g2.setDefaultEdgeLabel(() => ({}));
|
|
99
|
+
for (const node of ord(parsed.classes)) {
|
|
100
|
+
const dims = dimMap.get(node.id);
|
|
101
|
+
g2.setNode(node.id, {
|
|
102
|
+
label: node.name,
|
|
103
|
+
width: dims.width,
|
|
104
|
+
height: dims.height
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
for (const rel of ord(parsed.relationships)) {
|
|
108
|
+
g2.setEdge(rel.source, rel.target, { label: rel.label ?? "" });
|
|
109
|
+
}
|
|
110
|
+
dagre.layout(g2);
|
|
111
|
+
return g2;
|
|
112
|
+
};
|
|
113
|
+
const { g, edgePoints } = searchPlacement("TB", place, (lay) => ({
|
|
114
|
+
nodes: parsed.classes.map((n) => {
|
|
115
|
+
const p = lay.node(n.id);
|
|
116
|
+
return { id: n.id, x: p.x, y: p.y, width: p.width, height: p.height };
|
|
117
|
+
}),
|
|
118
|
+
edges: parsed.relationships.map((r) => ({
|
|
119
|
+
source: r.source,
|
|
120
|
+
target: r.target,
|
|
121
|
+
points: lay.edge(r.source, r.target)?.points ?? []
|
|
122
|
+
}))
|
|
123
|
+
}));
|
|
104
124
|
const notesSuppressed = parsed.options?.["no-notes"] === "on";
|
|
105
125
|
const noteByNode = notesSuppressed || !parsed.notes ? /* @__PURE__ */ new Map() : resolveNotes(
|
|
106
126
|
parsed.notes,
|
|
@@ -137,13 +157,13 @@ function layoutClassDiagram(parsed, options) {
|
|
|
137
157
|
...note && { note }
|
|
138
158
|
};
|
|
139
159
|
});
|
|
140
|
-
const layoutEdges = parsed.relationships.map((rel) => {
|
|
160
|
+
const layoutEdges = parsed.relationships.map((rel, i) => {
|
|
141
161
|
const edgeData = g.edge(rel.source, rel.target);
|
|
142
162
|
const layoutEdge = {
|
|
143
163
|
source: rel.source,
|
|
144
164
|
target: rel.target,
|
|
145
165
|
type: rel.type,
|
|
146
|
-
points: edgeData?.points ?? [],
|
|
166
|
+
points: edgePoints?.[i] ?? edgeData?.points ?? [],
|
|
147
167
|
...rel.label !== void 0 && { label: rel.label },
|
|
148
168
|
lineNumber: rel.lineNumber
|
|
149
169
|
};
|
|
@@ -175,6 +195,9 @@ function layoutClassDiagram(parsed, options) {
|
|
|
175
195
|
);
|
|
176
196
|
}
|
|
177
197
|
}
|
|
198
|
+
for (const edge of layoutEdges) {
|
|
199
|
+
for (const pt of edge.points) extend(pt.x, pt.y, pt.x, pt.y);
|
|
200
|
+
}
|
|
178
201
|
if (!Number.isFinite(bbMinX)) {
|
|
179
202
|
bbMinX = 0;
|
|
180
203
|
bbMinY = 0;
|
|
@@ -7,28 +7,28 @@ import {
|
|
|
7
7
|
mutedFill,
|
|
8
8
|
resolveCellColor,
|
|
9
9
|
resolveColorMode
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-53BJIOLF.js";
|
|
11
|
+
import {
|
|
12
|
+
renderIntegratedLegend
|
|
13
|
+
} from "./chunk-QVKTAU7P.js";
|
|
11
14
|
import {
|
|
12
15
|
layoutInlineHeader
|
|
13
16
|
} from "./chunk-CNUN5GO6.js";
|
|
17
|
+
import {
|
|
18
|
+
getLegendExtent,
|
|
19
|
+
getMaxLegendReservedHeight
|
|
20
|
+
} from "./chunk-NS7L7YKH.js";
|
|
14
21
|
import {
|
|
15
22
|
TITLE_FONT_SIZE,
|
|
16
23
|
TITLE_FONT_WEIGHT,
|
|
17
24
|
TITLE_Y
|
|
18
25
|
} from "./chunk-VLC6WNRD.js";
|
|
19
|
-
import {
|
|
20
|
-
renderIntegratedLegend
|
|
21
|
-
} from "./chunk-7SX4IY6T.js";
|
|
22
|
-
import {
|
|
23
|
-
getLegendExtent,
|
|
24
|
-
getMaxLegendReservedHeight
|
|
25
|
-
} from "./chunk-NS7L7YKH.js";
|
|
26
26
|
import {
|
|
27
27
|
FONT_FAMILY
|
|
28
28
|
} from "./chunk-ICLB27PZ.js";
|
|
29
29
|
import {
|
|
30
30
|
tagAttrKey
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
32
32
|
import {
|
|
33
33
|
LEGEND_GROUP_GAP
|
|
34
34
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GRAPH_DX
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TIVMAITN.js";
|
|
4
4
|
import {
|
|
5
5
|
tryCollectNote
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KSZHIAI2.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveNotes
|
|
9
9
|
} from "./chunk-O753JUEZ.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
measureIndent,
|
|
22
22
|
parseFirstLine,
|
|
23
23
|
tryParseSharedOption
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
25
25
|
import {
|
|
26
26
|
NAME_DIAGNOSTIC_CODES,
|
|
27
27
|
emit,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SKETCH_DIAGNOSTIC_CODES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NWSPPGIE.js";
|
|
4
4
|
import {
|
|
5
5
|
makeDgmoError
|
|
6
6
|
} from "./chunk-BYU54C3S.js";
|
|
@@ -471,7 +471,6 @@ function layoutSketch(parsed, options = {}) {
|
|
|
471
471
|
nodes.push({
|
|
472
472
|
id: unit.node.id,
|
|
473
473
|
label: unit.node.label,
|
|
474
|
-
shape: unit.node.shape,
|
|
475
474
|
metadata: unit.node.metadata,
|
|
476
475
|
...unit.node.description && { description: unit.node.description },
|
|
477
476
|
lineNumber: unit.node.lineNumber,
|
|
@@ -487,7 +486,6 @@ function layoutSketch(parsed, options = {}) {
|
|
|
487
486
|
nodes.push({
|
|
488
487
|
id: unit.box.id,
|
|
489
488
|
label: unit.box.label,
|
|
490
|
-
shape: "rectangle",
|
|
491
489
|
metadata: unit.box.metadata,
|
|
492
490
|
lineNumber: unit.box.lineNumber,
|
|
493
491
|
slot: cardSpot,
|
|
@@ -509,7 +507,6 @@ function layoutSketch(parsed, options = {}) {
|
|
|
509
507
|
nodes.push({
|
|
510
508
|
id: child.node.id,
|
|
511
509
|
label: child.node.label,
|
|
512
|
-
shape: child.node.shape,
|
|
513
510
|
metadata: child.node.metadata,
|
|
514
511
|
...child.node.description && {
|
|
515
512
|
description: child.node.description
|
|
@@ -551,7 +548,6 @@ function layoutSketch(parsed, options = {}) {
|
|
|
551
548
|
nodes.push({
|
|
552
549
|
id: gc.node.id,
|
|
553
550
|
label: gc.node.label,
|
|
554
|
-
shape: gc.node.shape,
|
|
555
551
|
metadata: gc.node.metadata,
|
|
556
552
|
...gc.node.description && { description: gc.node.description },
|
|
557
553
|
boxLabel: innerBox.label,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
compactNumber
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-53BJIOLF.js";
|
|
4
4
|
import {
|
|
5
5
|
parseInlineMarkdown
|
|
6
6
|
} from "./chunk-S7W75MIM.js";
|
|
@@ -43,11 +43,11 @@ function computeMetrics(parsed) {
|
|
|
43
43
|
}
|
|
44
44
|
function autoBandColor(pctFrac, palette) {
|
|
45
45
|
const name = pctFrac < 0.5 ? "red" : pctFrac < 0.8 ? "orange" : "green";
|
|
46
|
-
return resolveColor(name, palette)
|
|
46
|
+
return resolveColor(name, palette) ?? name;
|
|
47
47
|
}
|
|
48
48
|
function resolvePaint(parsed, palette, isDark, pctFrac) {
|
|
49
49
|
const autoColor = !parsed.options.noAutoColor && parsed.hasTarget ? autoBandColor(pctFrac, palette) : null;
|
|
50
|
-
const base = parsed.color && resolveColor(parsed.color, palette)
|
|
50
|
+
const base = (parsed.color && resolveColor(parsed.color, palette)) ?? parsed.color ?? autoColor ?? getSeriesColors(palette)[0];
|
|
51
51
|
return {
|
|
52
52
|
base,
|
|
53
53
|
// §1.9 fill family: tint (default) / solid / outline. In outline mode the
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
stripDefaultModifier,
|
|
18
18
|
tagAttrKey,
|
|
19
19
|
validateTagGroupNames
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
21
21
|
import {
|
|
22
22
|
AliasRegistry,
|
|
23
23
|
GANTT_BOOLEAN_SET,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
splitNameAndMeta,
|
|
33
33
|
warnUnknownMetaKeys,
|
|
34
34
|
withTagAliases
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
36
36
|
import {
|
|
37
37
|
getSeriesColors
|
|
38
38
|
} from "./chunk-L24LESXF.js";
|
|
@@ -326,7 +326,7 @@ function parseGantt(content, palette) {
|
|
|
326
326
|
// Peel after extractColor — the quotes are what keep a trailing
|
|
327
327
|
// color word inside the label (§2.2).
|
|
328
328
|
label: peelQuotedName(eraExtracted.label),
|
|
329
|
-
color: eraExtracted.color
|
|
329
|
+
color: eraExtracted.color ?? null,
|
|
330
330
|
lineNumber
|
|
331
331
|
});
|
|
332
332
|
} else {
|
|
@@ -357,7 +357,7 @@ function parseGantt(content, palette) {
|
|
|
357
357
|
// Peel after extractColor — the quotes are what keep a trailing
|
|
358
358
|
// color word inside the label (§2.2).
|
|
359
359
|
label: peelQuotedName(markerExtracted.label),
|
|
360
|
-
color: markerExtracted.color
|
|
360
|
+
color: markerExtracted.color ?? null,
|
|
361
361
|
lineNumber
|
|
362
362
|
});
|
|
363
363
|
} else {
|
|
@@ -383,7 +383,7 @@ function parseGantt(content, palette) {
|
|
|
383
383
|
diagnostics,
|
|
384
384
|
lineNumber
|
|
385
385
|
);
|
|
386
|
-
const color = extracted.color
|
|
386
|
+
const color = extracted.color ?? seriesColors[currentTagGroup.entries.length % seriesColors.length] ?? "#888888";
|
|
387
387
|
const isFirstEntry = currentTagGroup.entries.length === 0;
|
|
388
388
|
currentTagGroup.entries.push({
|
|
389
389
|
value: extracted.label,
|
|
@@ -582,7 +582,7 @@ function parseGantt(content, palette) {
|
|
|
582
582
|
startDate: "",
|
|
583
583
|
endDate: "",
|
|
584
584
|
label: peelQuotedName(eraExtracted.label),
|
|
585
|
-
color: eraExtracted.color
|
|
585
|
+
color: eraExtracted.color ?? null,
|
|
586
586
|
lineNumber,
|
|
587
587
|
...startOff && { offsetStart: startOff },
|
|
588
588
|
...endOff && { offsetEnd: endOff }
|
|
@@ -602,7 +602,7 @@ function parseGantt(content, palette) {
|
|
|
602
602
|
result.markers.push({
|
|
603
603
|
date: "",
|
|
604
604
|
label: peelQuotedName(markerExtracted.label),
|
|
605
|
-
color: markerExtracted.color
|
|
605
|
+
color: markerExtracted.color ?? null,
|
|
606
606
|
lineNumber,
|
|
607
607
|
...dateOff && { offsetDate: dateOff }
|
|
608
608
|
});
|
|
@@ -685,7 +685,7 @@ function parseGantt(content, palette) {
|
|
|
685
685
|
startDate: eraMatch.start,
|
|
686
686
|
endDate: eraMatch.end,
|
|
687
687
|
label: peelQuotedName(eraExtracted.label),
|
|
688
|
-
color: eraExtracted.color
|
|
688
|
+
color: eraExtracted.color ?? null,
|
|
689
689
|
lineNumber
|
|
690
690
|
});
|
|
691
691
|
continue;
|
|
@@ -710,7 +710,7 @@ function parseGantt(content, palette) {
|
|
|
710
710
|
result.markers.push({
|
|
711
711
|
date: markerMatch.iso,
|
|
712
712
|
label: peelQuotedName(markerExtracted.label),
|
|
713
|
-
color: markerExtracted.color
|
|
713
|
+
color: markerExtracted.color ?? null,
|
|
714
714
|
lineNumber
|
|
715
715
|
});
|
|
716
716
|
continue;
|
|
@@ -1086,7 +1086,7 @@ function parseGantt(content, palette) {
|
|
|
1086
1086
|
validateTagGroupNames(result.tagGroups, warn, (line, msg) => {
|
|
1087
1087
|
const diag = makeDgmoError(line, msg);
|
|
1088
1088
|
diagnostics.push(diag);
|
|
1089
|
-
|
|
1089
|
+
result.error ??= formatDgmoError(diag);
|
|
1090
1090
|
});
|
|
1091
1091
|
const activeTagWarning = activeTagNoMatchMessage(
|
|
1092
1092
|
result.options.activeTag,
|
|
@@ -1094,7 +1094,7 @@ function parseGantt(content, palette) {
|
|
|
1094
1094
|
);
|
|
1095
1095
|
if (activeTagWarning) {
|
|
1096
1096
|
warn(
|
|
1097
|
-
result.options.optionLineNumbers["active-tag"]
|
|
1097
|
+
result.options.optionLineNumbers["active-tag"] ?? 1,
|
|
1098
1098
|
activeTagWarning,
|
|
1099
1099
|
"W_ACTIVE_TAG_NO_MATCH"
|
|
1100
1100
|
);
|
|
@@ -1107,12 +1107,8 @@ function parseGantt(content, palette) {
|
|
|
1107
1107
|
result.options.sprintMode = "auto";
|
|
1108
1108
|
}
|
|
1109
1109
|
if (result.options.sprintMode) {
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
}
|
|
1113
|
-
if (result.options.sprintNumber === null) {
|
|
1114
|
-
result.options.sprintNumber = 1;
|
|
1115
|
-
}
|
|
1110
|
+
result.options.sprintLength ??= { amount: 2, unit: "w" };
|
|
1111
|
+
result.options.sprintNumber ??= 1;
|
|
1116
1112
|
}
|
|
1117
1113
|
result.diagnostics.push(...nameAliasMap.finish());
|
|
1118
1114
|
return result;
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
} from "./chunk-RE27AX7O.js";
|
|
8
8
|
import {
|
|
9
9
|
parseDgmoChartType
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2AM6VA3A.js";
|
|
11
11
|
import {
|
|
12
12
|
chartTypes
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
14
14
|
import {
|
|
15
15
|
measureText,
|
|
16
16
|
truncateText
|
|
@@ -189,7 +189,7 @@ function frownMark(cx, cy, color) {
|
|
|
189
189
|
}
|
|
190
190
|
function diagrammoIcon(x, y, size) {
|
|
191
191
|
const s = size / 100;
|
|
192
|
-
return `<g transform="translate(${x} ${y}) scale(${s})"><
|
|
192
|
+
return `<g transform="translate(${x} ${y}) scale(${s})"><g transform="translate(-3.27 -4.56) scale(1.0911)"><rect x="11" y="8" width="22" height="39.5" rx="2.5" fill="#c0504d"/><rect x="11" y="52.5" width="22" height="22.1" rx="2.5" fill="#5b9357"/><rect x="11" y="79.6" width="22" height="12.4" rx="2.5" fill="#4f96c4"/><path fill="#3a9188" d="M45 11.12 A3 3 0 0 1 48.23 8.12 A42 42 0 0 1 86.52 43.65 A3 3 0 0 1 83.78 47.10 L72.76 47.92 A3 3 0 0 1 69.59 45.47 A25 25 0 0 0 47.68 25.14 A3 3 0 0 1 45 22.16 Z"/><path fill="#7d5ba6" d="M83.78 52.90 A3 3 0 0 1 86.52 56.35 A42 42 0 0 1 74.53 79.87 A3 3 0 0 1 70.13 79.67 L62.99 71.24 A3 3 0 0 1 63.12 67.23 A25 25 0 0 0 69.59 54.53 A3 3 0 0 1 72.76 52.08 Z"/><path fill="#cc7a33" d="M65.43 83.08 A3 3 0 0 1 64.27 87.32 A42 42 0 0 1 48.23 91.88 A3 3 0 0 1 45 88.88 L45 77.84 A3 3 0 0 1 47.68 74.86 A25 25 0 0 0 55.78 72.56 A3 3 0 0 1 59.63 73.69 Z"/></g></g>`;
|
|
193
193
|
}
|
|
194
194
|
function docIcon(x, y, size, color) {
|
|
195
195
|
const s = size / 18;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
splitNameAndMeta,
|
|
6
6
|
tryParseSharedOption,
|
|
7
7
|
warnUnknownMetaKeys
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
9
9
|
import {
|
|
10
10
|
makeDgmoError,
|
|
11
11
|
makeFail
|
|
@@ -159,7 +159,10 @@ function parseCycle(content) {
|
|
|
159
159
|
warn(lineNum, "Edge line found outside of a node context.");
|
|
160
160
|
continue;
|
|
161
161
|
}
|
|
162
|
-
const edgeLabel = bareMatch ? void 0 :
|
|
162
|
+
const edgeLabel = bareMatch ? void 0 : (
|
|
163
|
+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an empty label is stored as no label
|
|
164
|
+
labeledMatch[1]?.trim() || void 0
|
|
165
|
+
);
|
|
163
166
|
const rest = (bareMatch ? bareMatch[1] ?? "" : labeledMatch[2] ?? "").trim();
|
|
164
167
|
const edgeSplit = splitNameAndMeta(
|
|
165
168
|
rest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutOrg
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MI6SJJQU.js";
|
|
4
4
|
import {
|
|
5
5
|
renderCollapseBar,
|
|
6
6
|
renderNodeCard
|
|
@@ -8,6 +8,9 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
ScaleContext
|
|
10
10
|
} from "./chunk-24YPR5EH.js";
|
|
11
|
+
import {
|
|
12
|
+
renderIntegratedLegend
|
|
13
|
+
} from "./chunk-QVKTAU7P.js";
|
|
11
14
|
import {
|
|
12
15
|
CARD_RADIUS,
|
|
13
16
|
COLLAPSE_BAR_HEIGHT,
|
|
@@ -29,29 +32,26 @@ import {
|
|
|
29
32
|
extractExportSvg,
|
|
30
33
|
runInExportContainer
|
|
31
34
|
} from "./chunk-SEKNYIMO.js";
|
|
35
|
+
import {
|
|
36
|
+
getMaxLegendReservedHeight
|
|
37
|
+
} from "./chunk-NS7L7YKH.js";
|
|
32
38
|
import {
|
|
33
39
|
TITLE_FONT_SIZE,
|
|
34
40
|
TITLE_FONT_WEIGHT
|
|
35
41
|
} from "./chunk-VLC6WNRD.js";
|
|
36
|
-
import {
|
|
37
|
-
renderIntegratedLegend
|
|
38
|
-
} from "./chunk-7SX4IY6T.js";
|
|
39
|
-
import {
|
|
40
|
-
getMaxLegendReservedHeight
|
|
41
|
-
} from "./chunk-NS7L7YKH.js";
|
|
42
42
|
import {
|
|
43
43
|
FONT_FAMILY
|
|
44
44
|
} from "./chunk-ICLB27PZ.js";
|
|
45
45
|
import {
|
|
46
46
|
parseOrg
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-UWJP4JSZ.js";
|
|
48
48
|
import {
|
|
49
49
|
resolveTagColor,
|
|
50
50
|
tagAttrKey
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
52
52
|
import {
|
|
53
53
|
fillModeFromOptions
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-MPJQMMBZ.js";
|
|
55
55
|
import {
|
|
56
56
|
EYE_CLOSED_PATH,
|
|
57
57
|
EYE_OPEN_PATH,
|
|
@@ -4,10 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
computeNodeSizing,
|
|
6
6
|
layoutPert
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-273GB7WK.js";
|
|
8
8
|
import {
|
|
9
9
|
ScaleContext
|
|
10
10
|
} from "./chunk-24YPR5EH.js";
|
|
11
|
+
import {
|
|
12
|
+
renderIntegratedLegend
|
|
13
|
+
} from "./chunk-QVKTAU7P.js";
|
|
11
14
|
import {
|
|
12
15
|
ARROWHEAD_HEIGHT,
|
|
13
16
|
ARROWHEAD_WIDTH,
|
|
@@ -30,6 +33,9 @@ import {
|
|
|
30
33
|
import {
|
|
31
34
|
serializeSvg
|
|
32
35
|
} from "./chunk-OOCVGX4W.js";
|
|
36
|
+
import {
|
|
37
|
+
getLegendExtent
|
|
38
|
+
} from "./chunk-NS7L7YKH.js";
|
|
33
39
|
import {
|
|
34
40
|
CAPTION_BOX_PADDING_X,
|
|
35
41
|
CAPTION_BOX_PADDING_Y,
|
|
@@ -41,18 +47,12 @@ import {
|
|
|
41
47
|
TITLE_FONT_WEIGHT,
|
|
42
48
|
TITLE_Y
|
|
43
49
|
} from "./chunk-VLC6WNRD.js";
|
|
44
|
-
import {
|
|
45
|
-
renderIntegratedLegend
|
|
46
|
-
} from "./chunk-7SX4IY6T.js";
|
|
47
|
-
import {
|
|
48
|
-
getLegendExtent
|
|
49
|
-
} from "./chunk-NS7L7YKH.js";
|
|
50
50
|
import {
|
|
51
51
|
FONT_FAMILY
|
|
52
52
|
} from "./chunk-ICLB27PZ.js";
|
|
53
53
|
import {
|
|
54
54
|
parsePert
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-37QQXKFV.js";
|
|
56
56
|
import {
|
|
57
57
|
addCalendarDays,
|
|
58
58
|
formatDuration,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
resolveActiveTagGroup,
|
|
66
66
|
resolveGroupTagColor,
|
|
67
67
|
resolveTagColor
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QKJ6MQXW.js";
|
|
69
69
|
import {
|
|
70
70
|
LEGEND_HEIGHT
|
|
71
71
|
} from "./chunk-I6GGMCTV.js";
|
|
@@ -918,10 +918,7 @@ function renderNodes(root, _defs, resolved, layout, palette, isDark, sizing, onC
|
|
|
918
918
|
} else {
|
|
919
919
|
band = isCritical ? "red" : null;
|
|
920
920
|
}
|
|
921
|
-
const g = layer.append("g").attr("class", "pert-node").attr("transform", `translate(${node.x}, ${node.y})`).attr("data-activity-id", node.id).attr("data-line-number", String(r.activity.lineNumber)).attr(
|
|
922
|
-
"data-group-id",
|
|
923
|
-
r.activity.groupId !== void 0 ? r.activity.groupId : ""
|
|
924
|
-
).attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
|
|
921
|
+
const g = layer.append("g").attr("class", "pert-node").attr("transform", `translate(${node.x}, ${node.y})`).attr("data-activity-id", node.id).attr("data-line-number", String(r.activity.lineNumber)).attr("data-group-id", r.activity.groupId ?? "").attr("data-critical-path", String(isCritical)).attr("data-criticality-band", band ?? "").attr("data-duration-rank", isTopMu ? "top" : isBottomMu ? "bottom" : "");
|
|
925
922
|
if (r.activity.tags) {
|
|
926
923
|
for (const [tagKey, tagValue] of Object.entries(r.activity.tags)) {
|
|
927
924
|
g.attr(`data-tag-${tagKey}`, String(tagValue).toLowerCase());
|