@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
|
@@ -4,54 +4,67 @@ import {
|
|
|
4
4
|
layoutC4Containers,
|
|
5
5
|
layoutC4Context,
|
|
6
6
|
layoutC4Deployment
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-HJZ4OET2.js";
|
|
8
|
+
import {
|
|
9
|
+
appendArrowheadMarkers,
|
|
10
|
+
appendReverseArrowheadMarkers
|
|
11
|
+
} from "./chunk-XBJJP2HN.js";
|
|
8
12
|
import {
|
|
9
13
|
renderInlineText
|
|
10
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FWNJDD4U.js";
|
|
11
15
|
import {
|
|
16
|
+
ARROWHEAD_HEIGHT,
|
|
17
|
+
ARROWHEAD_WIDTH,
|
|
12
18
|
CARD_RADIUS,
|
|
19
|
+
COLLAPSE_BAR_HEIGHT,
|
|
20
|
+
CONTAINER_RADIUS,
|
|
21
|
+
EDGE_DASH,
|
|
22
|
+
EDGE_LABEL_KNOCKOUT_OPACITY,
|
|
13
23
|
EDGE_STROKE_WIDTH,
|
|
24
|
+
LABEL_FONT_SIZE,
|
|
14
25
|
META_FONT_SIZE,
|
|
15
26
|
META_LINE_HEIGHT,
|
|
16
27
|
NODE_STROKE_WIDTH
|
|
17
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-IIEI7VK5.js";
|
|
18
29
|
import {
|
|
19
30
|
serializeSvg
|
|
20
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-LD2JSKU3.js";
|
|
21
32
|
import {
|
|
22
33
|
TITLE_FONT_SIZE,
|
|
23
34
|
TITLE_FONT_WEIGHT
|
|
24
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-VSPNH7LC.js";
|
|
25
36
|
import {
|
|
26
37
|
renderIntegratedLegend
|
|
27
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-253E5ISJ.js";
|
|
28
39
|
import {
|
|
29
40
|
FONT_FAMILY
|
|
30
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ICLB27PZ.js";
|
|
31
42
|
import {
|
|
32
43
|
LEGEND_HEIGHT
|
|
33
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CKDYRVOC.js";
|
|
34
45
|
import {
|
|
35
46
|
measureText,
|
|
36
47
|
wrapTextToWidth
|
|
37
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-YC6GVLTI.js";
|
|
38
49
|
import {
|
|
39
50
|
parseC4
|
|
40
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-IEK2FUWO.js";
|
|
41
52
|
import {
|
|
42
53
|
preprocessDescriptionLine
|
|
43
54
|
} from "./chunk-IYULMRBE.js";
|
|
44
55
|
import {
|
|
56
|
+
resolveGroupTagColor,
|
|
45
57
|
tagAttrKey
|
|
46
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-O2HU4AQN.js";
|
|
47
59
|
import {
|
|
48
60
|
fillModeFromOptions
|
|
49
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-4CA7TJ44.js";
|
|
50
62
|
import {
|
|
51
63
|
contrastText,
|
|
64
|
+
groupFill,
|
|
52
65
|
mix,
|
|
53
66
|
shapeFill
|
|
54
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-AMQFJ7P7.js";
|
|
55
68
|
|
|
56
69
|
// src/c4/renderer.ts
|
|
57
70
|
import * as d3Selection from "d3-selection";
|
|
@@ -60,9 +73,6 @@ var DIAGRAM_PADDING = 20;
|
|
|
60
73
|
var MAX_SCALE = 3;
|
|
61
74
|
var TITLE_HEIGHT = 30;
|
|
62
75
|
var TYPE_FONT_SIZE = 10;
|
|
63
|
-
var NAME_FONT_SIZE = 14;
|
|
64
|
-
var DESC_FONT_SIZE = 11;
|
|
65
|
-
var DESC_LINE_HEIGHT = 16;
|
|
66
76
|
var EDGE_LABEL_FONT_SIZE = 11;
|
|
67
77
|
var TECH_FONT_SIZE = 10;
|
|
68
78
|
var CARD_H_PAD = 20;
|
|
@@ -71,9 +81,6 @@ var TYPE_LABEL_HEIGHT = 18;
|
|
|
71
81
|
var DIVIDER_GAP = 6;
|
|
72
82
|
var NAME_HEIGHT = 20;
|
|
73
83
|
var BOUNDARY_LABEL_FONT_SIZE = 12;
|
|
74
|
-
var BOUNDARY_STROKE_WIDTH = 1.5;
|
|
75
|
-
var BOUNDARY_RADIUS = 8;
|
|
76
|
-
var DRILL_BAR_HEIGHT = 6;
|
|
77
84
|
var CYLINDER_RY = 8;
|
|
78
85
|
var PERSON_HEAD_R = 4;
|
|
79
86
|
var PERSON_ARM_SPAN = 10;
|
|
@@ -141,10 +148,17 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
141
148
|
const offsetY = titleHeight + DIAGRAM_PADDING + legendReserveH;
|
|
142
149
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMid meet").style("font-family", FONT_FAMILY);
|
|
143
150
|
const defs = svg.append("defs");
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
const markerOpts = {
|
|
152
|
+
idPrefix: "c4",
|
|
153
|
+
width: ARROWHEAD_WIDTH,
|
|
154
|
+
height: ARROWHEAD_HEIGHT,
|
|
155
|
+
baseFill: palette.textMuted
|
|
156
|
+
};
|
|
157
|
+
appendArrowheadMarkers(defs, markerOpts);
|
|
158
|
+
appendReverseArrowheadMarkers(defs, {
|
|
159
|
+
...markerOpts,
|
|
160
|
+
reverseSuffix: "arrow-start"
|
|
161
|
+
});
|
|
148
162
|
if (parsed.title && parsed.options["no-title"] !== "on") {
|
|
149
163
|
const titleEl = svg.append("text").attr("class", "chart-title").attr("x", width / 2).attr("y", 30).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).style(
|
|
150
164
|
"cursor",
|
|
@@ -175,9 +189,9 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
175
189
|
const bidir = hasBidirectionalMarkers(edge.arrowType);
|
|
176
190
|
const pathD = lineGenerator(edge.points);
|
|
177
191
|
if (pathD) {
|
|
178
|
-
const pathEl = edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor).attr("stroke-width", EDGE_STROKE_WIDTH).attr("class", "c4-edge").attr("marker-end", "url(#c4-arrow
|
|
192
|
+
const pathEl = edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor).attr("stroke-width", EDGE_STROKE_WIDTH).attr("class", "c4-edge").attr("marker-end", "url(#c4-arrow)");
|
|
179
193
|
if (dashed) {
|
|
180
|
-
pathEl.attr("stroke-dasharray",
|
|
194
|
+
pathEl.attr("stroke-dasharray", EDGE_DASH);
|
|
181
195
|
}
|
|
182
196
|
if (bidir) {
|
|
183
197
|
pathEl.attr("marker-start", "url(#c4-arrow-start)");
|
|
@@ -194,7 +208,7 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
194
208
|
);
|
|
195
209
|
const bgW = textW + 12;
|
|
196
210
|
const bgH = (labelText ? 16 : 0) + (techText ? 14 : 0) + 4;
|
|
197
|
-
edgeG.append("rect").attr("x", midPt.x - bgW / 2).attr("y", midPt.y - bgH / 2).attr("width", bgW).attr("height", bgH).attr("rx", 3).attr("fill", palette.bg).attr("opacity",
|
|
211
|
+
edgeG.append("rect").attr("x", midPt.x - bgW / 2).attr("y", midPt.y - bgH / 2).attr("width", bgW).attr("height", bgH).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY).attr("class", "c4-edge-label-bg");
|
|
198
212
|
let textY = midPt.y;
|
|
199
213
|
if (labelText && techText) {
|
|
200
214
|
textY = midPt.y - 4;
|
|
@@ -247,7 +261,7 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
247
261
|
nodeG.append("text").attr("x", 0).attr("y", yPos + TYPE_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", TYPE_FONT_SIZE).attr("font-style", "italic").text(typeLabel);
|
|
248
262
|
yPos += TYPE_LABEL_HEIGHT;
|
|
249
263
|
if (node.type === "person") {
|
|
250
|
-
const textWidth = measureText(node.name,
|
|
264
|
+
const textWidth = measureText(node.name, LABEL_FONT_SIZE, { bold: true });
|
|
251
265
|
const gap = 6;
|
|
252
266
|
const totalWidth = PERSON_ICON_W + gap + textWidth;
|
|
253
267
|
const iconCx = -totalWidth / 2 + PERSON_ICON_W / 2;
|
|
@@ -255,38 +269,38 @@ function renderC4Context(container, parsed, layout, palette, isDark, onClickItem
|
|
|
255
269
|
drawPersonIcon(
|
|
256
270
|
nodeG,
|
|
257
271
|
iconCx,
|
|
258
|
-
yPos +
|
|
272
|
+
yPos + LABEL_FONT_SIZE / 2 - 2,
|
|
259
273
|
stroke
|
|
260
274
|
);
|
|
261
|
-
nodeG.append("text").attr("x", textX).attr("y", yPos +
|
|
275
|
+
nodeG.append("text").attr("x", textX).attr("y", yPos + LABEL_FONT_SIZE / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", "bold").text(node.name);
|
|
262
276
|
} else {
|
|
263
|
-
nodeG.append("text").attr("x", 0).attr("y", yPos +
|
|
277
|
+
nodeG.append("text").attr("x", 0).attr("y", yPos + LABEL_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", "bold").text(node.name);
|
|
264
278
|
}
|
|
265
279
|
yPos += NAME_HEIGHT;
|
|
266
|
-
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width",
|
|
280
|
+
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width", 1).attr("stroke-opacity", 0.3);
|
|
267
281
|
yPos += DIVIDER_GAP;
|
|
268
282
|
if (node.description) {
|
|
269
283
|
const contentWidth = w - CARD_H_PAD * 2;
|
|
270
284
|
const lines = wrapTextToWidth(
|
|
271
285
|
node.description,
|
|
272
|
-
|
|
286
|
+
META_FONT_SIZE,
|
|
273
287
|
contentWidth
|
|
274
288
|
);
|
|
275
289
|
for (const line2 of lines) {
|
|
276
|
-
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos +
|
|
290
|
+
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos + META_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", META_FONT_SIZE);
|
|
277
291
|
renderInlineText(
|
|
278
292
|
textEl,
|
|
279
293
|
preprocessDescriptionLine(line2),
|
|
280
294
|
palette,
|
|
281
|
-
|
|
295
|
+
META_FONT_SIZE
|
|
282
296
|
);
|
|
283
|
-
yPos +=
|
|
297
|
+
yPos += META_LINE_HEIGHT;
|
|
284
298
|
}
|
|
285
299
|
}
|
|
286
300
|
if (node.drillable) {
|
|
287
301
|
const clipId = `clip-drill-${node.id.replace(/\s+/g, "-")}`;
|
|
288
302
|
nodeG.append("clipPath").attr("id", clipId).append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", CARD_RADIUS);
|
|
289
|
-
nodeG.append("rect").attr("x", -w / 2).attr("y", h / 2 -
|
|
303
|
+
nodeG.append("rect").attr("x", -w / 2).attr("y", h / 2 - COLLAPSE_BAR_HEIGHT).attr("width", w).attr("height", COLLAPSE_BAR_HEIGHT).attr("fill", fillMode === "solid" ? onFillText : stroke).attr("clip-path", `url(#${clipId})`).attr("class", "c4-drill-bar");
|
|
290
304
|
}
|
|
291
305
|
}
|
|
292
306
|
if (hasLegend) {
|
|
@@ -347,14 +361,14 @@ function drawCylinderCard(nodeG, w, h, fill, stroke, dashed) {
|
|
|
347
361
|
].join(" ");
|
|
348
362
|
const el = nodeG.append("path").attr("d", path).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
349
363
|
if (dashed) {
|
|
350
|
-
el.attr("stroke-dasharray",
|
|
364
|
+
el.attr("stroke-dasharray", EDGE_DASH);
|
|
351
365
|
}
|
|
352
366
|
nodeG.append("ellipse").attr("cx", 0).attr("cy", -h / 2 + ry).attr("rx", w / 2).attr("ry", ry).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
353
367
|
}
|
|
354
368
|
function drawCardRect(nodeG, w, h, fill, stroke, dashed) {
|
|
355
369
|
const el = nodeG.append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", CARD_RADIUS).attr("ry", CARD_RADIUS).attr("fill", fill).attr("stroke", stroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
356
370
|
if (dashed) {
|
|
357
|
-
el.attr("stroke-dasharray",
|
|
371
|
+
el.attr("stroke-dasharray", EDGE_DASH);
|
|
358
372
|
}
|
|
359
373
|
}
|
|
360
374
|
function renderEdges(contentG, edges, palette, onClickItem, obstacleRects) {
|
|
@@ -372,9 +386,9 @@ function renderEdges(contentG, edges, palette, onClickItem, obstacleRects) {
|
|
|
372
386
|
const bidir = hasBidirectionalMarkers(edge.arrowType);
|
|
373
387
|
const pathD = lineGenerator(edge.points);
|
|
374
388
|
if (pathD) {
|
|
375
|
-
const pathEl = edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor).attr("stroke-width", EDGE_STROKE_WIDTH).attr("class", "c4-edge").attr("marker-end", "url(#c4-arrow
|
|
389
|
+
const pathEl = edgeG.append("path").attr("d", pathD).attr("fill", "none").attr("stroke", edgeColor).attr("stroke-width", EDGE_STROKE_WIDTH).attr("class", "c4-edge").attr("marker-end", "url(#c4-arrow)");
|
|
376
390
|
if (dashed) {
|
|
377
|
-
pathEl.attr("stroke-dasharray",
|
|
391
|
+
pathEl.attr("stroke-dasharray", EDGE_DASH);
|
|
378
392
|
}
|
|
379
393
|
if (bidir) {
|
|
380
394
|
pathEl.attr("marker-start", "url(#c4-arrow-start)");
|
|
@@ -404,7 +418,7 @@ function renderEdges(contentG, edges, palette, onClickItem, obstacleRects) {
|
|
|
404
418
|
}
|
|
405
419
|
placeEdgeLabels(pendingLabels, edges, obstacleRects);
|
|
406
420
|
for (const lbl of pendingLabels) {
|
|
407
|
-
lbl.edgeG.append("rect").attr("x", lbl.x - lbl.bgW / 2).attr("y", lbl.y - lbl.bgH / 2).attr("width", lbl.bgW).attr("height", lbl.bgH).attr("rx", 3).attr("fill", palette.bg).attr("opacity",
|
|
421
|
+
lbl.edgeG.append("rect").attr("x", lbl.x - lbl.bgW / 2).attr("y", lbl.y - lbl.bgH / 2).attr("width", lbl.bgW).attr("height", lbl.bgH).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY).attr("class", "c4-edge-label-bg");
|
|
408
422
|
let textY = lbl.y;
|
|
409
423
|
if (lbl.labelText && lbl.techText) {
|
|
410
424
|
textY = lbl.y - 4;
|
|
@@ -669,6 +683,21 @@ function renderLegend(parent, layout, palette, isDark, activeTagGroup, fixedWidt
|
|
|
669
683
|
groups,
|
|
670
684
|
activeGroup: activeTagGroup ?? null,
|
|
671
685
|
mode: exportMode ? "export" : "preview",
|
|
686
|
+
// Keep inactive sibling tag groups visible as name-only pills, exactly as
|
|
687
|
+
// boxes-and-lines does. Without this a c4 reader cannot tell a second
|
|
688
|
+
// colouring dimension EXISTS — not merely that they cannot reach it: the
|
|
689
|
+
// author declared it and it rendered as nothing at all (#567).
|
|
690
|
+
//
|
|
691
|
+
// The pill carries `data-legend-group`, which is what the app walks up to
|
|
692
|
+
// on a click, and C4Preview already wires `onLegendGroupToggle` to flip the
|
|
693
|
+
// active dimension and write the `active-tag` directive back to source. So
|
|
694
|
+
// this needs no app change to be clickable.
|
|
695
|
+
//
|
|
696
|
+
// A CLI-rendered static SVG shows a pill nobody can click, and that is the
|
|
697
|
+
// accepted cost: knowing the dimension is there beats not knowing. Export
|
|
698
|
+
// mode is unaffected — `legend-layout.ts` drops non-active groups before
|
|
699
|
+
// this flag is consulted.
|
|
700
|
+
showInactivePills: true,
|
|
672
701
|
palette,
|
|
673
702
|
isDark,
|
|
674
703
|
width: containerWidth
|
|
@@ -698,10 +727,17 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
698
727
|
const offsetY = titleHeight + DIAGRAM_PADDING + legendReserveH;
|
|
699
728
|
const svg = d3Selection.select(container).append("svg").attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`).attr("preserveAspectRatio", "xMidYMid meet").style("font-family", FONT_FAMILY);
|
|
700
729
|
const defs = svg.append("defs");
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
730
|
+
const markerOpts = {
|
|
731
|
+
idPrefix: "c4",
|
|
732
|
+
width: ARROWHEAD_WIDTH,
|
|
733
|
+
height: ARROWHEAD_HEIGHT,
|
|
734
|
+
baseFill: palette.textMuted
|
|
735
|
+
};
|
|
736
|
+
appendArrowheadMarkers(defs, markerOpts);
|
|
737
|
+
appendReverseArrowheadMarkers(defs, {
|
|
738
|
+
...markerOpts,
|
|
739
|
+
reverseSuffix: "arrow-start"
|
|
740
|
+
});
|
|
705
741
|
if (parsed.title && parsed.options["no-title"] !== "on") {
|
|
706
742
|
const titleEl = svg.append("text").attr("class", "chart-title").attr("x", width / 2).attr("y", 30).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).style(
|
|
707
743
|
"cursor",
|
|
@@ -729,20 +765,27 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
729
765
|
onClickItem(b.lineNumber);
|
|
730
766
|
});
|
|
731
767
|
}
|
|
732
|
-
boundaryG.append("rect").attr("x", b.x).attr("y", b.y).attr("width", b.width).attr("height", b.height).attr("rx",
|
|
768
|
+
boundaryG.append("rect").attr("x", b.x).attr("y", b.y).attr("width", b.width).attr("height", b.height).attr("rx", CONTAINER_RADIUS).attr("ry", CONTAINER_RADIUS).attr("fill", boundaryFill).attr("stroke", boundaryStroke).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
733
769
|
boundaryG.append("text").attr("x", b.x + 12).attr("y", b.y + 16).attr("fill", palette.textMuted).attr("font-size", BOUNDARY_LABEL_FONT_SIZE).attr("font-style", "italic").text(`${b.label} \u2014 ${b.typeLabel}`);
|
|
734
770
|
}
|
|
735
771
|
if (layout.groupBoundaries.length > 0) {
|
|
736
|
-
const
|
|
737
|
-
const
|
|
772
|
+
const neutralFill = mix(palette.surface, palette.bg, 15);
|
|
773
|
+
const neutralStroke = mix(palette.textMuted, palette.bg, 60);
|
|
738
774
|
for (const gb of layout.groupBoundaries) {
|
|
775
|
+
const gbTagColor = resolveGroupTagColor(
|
|
776
|
+
gb.metadata,
|
|
777
|
+
parsed.tagGroups,
|
|
778
|
+
activeTagGroup ?? null
|
|
779
|
+
);
|
|
780
|
+
const groupFillColor = gbTagColor ? groupFill(palette, isDark, gbTagColor) : neutralFill;
|
|
781
|
+
const groupStrokeColor = gbTagColor ?? neutralStroke;
|
|
739
782
|
const gbG = contentG.append("g").attr("class", "c4-group-boundary").attr("data-line-number", String(gb.lineNumber));
|
|
740
783
|
if (onClickItem) {
|
|
741
784
|
gbG.style("cursor", "pointer").on("click", () => {
|
|
742
785
|
onClickItem(gb.lineNumber);
|
|
743
786
|
});
|
|
744
787
|
}
|
|
745
|
-
gbG.append("rect").attr("x", gb.x).attr("y", gb.y).attr("width", gb.width).attr("height", gb.height).attr("rx",
|
|
788
|
+
gbG.append("rect").attr("x", gb.x).attr("y", gb.y).attr("width", gb.width).attr("height", gb.height).attr("rx", CONTAINER_RADIUS).attr("ry", CONTAINER_RADIUS).attr("fill", groupFillColor).attr("stroke", groupStrokeColor).attr("stroke-width", NODE_STROKE_WIDTH);
|
|
746
789
|
gbG.append("text").attr("x", gb.x + 10).attr("y", gb.y + 14).attr("fill", palette.textMuted).attr("font-size", BOUNDARY_LABEL_FONT_SIZE).attr("font-style", "italic").text(gb.label);
|
|
747
790
|
}
|
|
748
791
|
}
|
|
@@ -827,7 +870,7 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
827
870
|
yPos += TYPE_LABEL_HEIGHT;
|
|
828
871
|
}
|
|
829
872
|
if (node.type === "person") {
|
|
830
|
-
const textWidth = measureText(node.name,
|
|
873
|
+
const textWidth = measureText(node.name, LABEL_FONT_SIZE, { bold: true });
|
|
831
874
|
const gap = 6;
|
|
832
875
|
const totalWidth = PERSON_ICON_W + gap + textWidth;
|
|
833
876
|
const iconCx = -totalWidth / 2 + PERSON_ICON_W / 2;
|
|
@@ -835,12 +878,12 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
835
878
|
drawPersonIcon(
|
|
836
879
|
nodeG,
|
|
837
880
|
iconCx,
|
|
838
|
-
yPos +
|
|
881
|
+
yPos + LABEL_FONT_SIZE / 2 - 2,
|
|
839
882
|
stroke
|
|
840
883
|
);
|
|
841
|
-
nodeG.append("text").attr("x", textX).attr("y", yPos +
|
|
884
|
+
nodeG.append("text").attr("x", textX).attr("y", yPos + LABEL_FONT_SIZE / 2).attr("text-anchor", "start").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", "bold").text(node.name);
|
|
842
885
|
} else {
|
|
843
|
-
nodeG.append("text").attr("x", 0).attr("y", yPos +
|
|
886
|
+
nodeG.append("text").attr("x", 0).attr("y", yPos + LABEL_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", LABEL_FONT_SIZE).attr("font-weight", "bold").text(node.name);
|
|
844
887
|
}
|
|
845
888
|
yPos += NAME_HEIGHT;
|
|
846
889
|
if (node.type === "container") {
|
|
@@ -848,23 +891,23 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
848
891
|
const contentWidth = w - CARD_H_PAD * 2;
|
|
849
892
|
const lines = wrapTextToWidth(
|
|
850
893
|
node.description,
|
|
851
|
-
|
|
894
|
+
META_FONT_SIZE,
|
|
852
895
|
contentWidth
|
|
853
896
|
);
|
|
854
897
|
for (const line2 of lines) {
|
|
855
|
-
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos +
|
|
898
|
+
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos + META_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", META_FONT_SIZE);
|
|
856
899
|
renderInlineText(
|
|
857
900
|
textEl,
|
|
858
901
|
preprocessDescriptionLine(line2),
|
|
859
902
|
palette,
|
|
860
|
-
|
|
903
|
+
META_FONT_SIZE
|
|
861
904
|
);
|
|
862
|
-
yPos +=
|
|
905
|
+
yPos += META_LINE_HEIGHT;
|
|
863
906
|
}
|
|
864
907
|
}
|
|
865
908
|
const metaEntries = collectCardMetadata(node.metadata);
|
|
866
909
|
if (metaEntries.length > 0) {
|
|
867
|
-
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width",
|
|
910
|
+
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width", 1).attr("stroke-opacity", 0.3);
|
|
868
911
|
yPos += DIVIDER_GAP;
|
|
869
912
|
const maxKeyWidth = Math.max(
|
|
870
913
|
...metaEntries.map((e) => measureText(`${e.key}: `, META_FONT_SIZE))
|
|
@@ -877,31 +920,31 @@ function renderC4Containers(container, parsed, layout, palette, isDark, onClickI
|
|
|
877
920
|
}
|
|
878
921
|
}
|
|
879
922
|
} else {
|
|
880
|
-
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width",
|
|
923
|
+
nodeG.append("line").attr("x1", -w / 2 + CARD_H_PAD / 2).attr("y1", yPos).attr("x2", w / 2 - CARD_H_PAD / 2).attr("y2", yPos).attr("stroke", fillMode === "solid" ? onFillText : stroke).attr("stroke-width", 1).attr("stroke-opacity", 0.3);
|
|
881
924
|
yPos += DIVIDER_GAP;
|
|
882
925
|
if (node.description) {
|
|
883
926
|
const contentWidth = w - CARD_H_PAD * 2;
|
|
884
927
|
const lines = wrapTextToWidth(
|
|
885
928
|
node.description,
|
|
886
|
-
|
|
929
|
+
META_FONT_SIZE,
|
|
887
930
|
contentWidth
|
|
888
931
|
);
|
|
889
932
|
for (const line2 of lines) {
|
|
890
|
-
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos +
|
|
933
|
+
const textEl = nodeG.append("text").attr("x", 0).attr("y", yPos + META_FONT_SIZE / 2).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", onFillText).attr("font-size", META_FONT_SIZE);
|
|
891
934
|
renderInlineText(
|
|
892
935
|
textEl,
|
|
893
936
|
preprocessDescriptionLine(line2),
|
|
894
937
|
palette,
|
|
895
|
-
|
|
938
|
+
META_FONT_SIZE
|
|
896
939
|
);
|
|
897
|
-
yPos +=
|
|
940
|
+
yPos += META_LINE_HEIGHT;
|
|
898
941
|
}
|
|
899
942
|
}
|
|
900
943
|
}
|
|
901
944
|
if (node.drillable) {
|
|
902
945
|
const clipId = `clip-drill-${node.id.replace(/\s+/g, "-")}`;
|
|
903
946
|
nodeG.append("clipPath").attr("id", clipId).append("rect").attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h).attr("rx", CARD_RADIUS);
|
|
904
|
-
nodeG.append("rect").attr("x", -w / 2).attr("y", h / 2 -
|
|
947
|
+
nodeG.append("rect").attr("x", -w / 2).attr("y", h / 2 - COLLAPSE_BAR_HEIGHT).attr("width", w).attr("height", COLLAPSE_BAR_HEIGHT).attr("fill", fillMode === "solid" ? onFillText : stroke).attr("clip-path", `url(#${clipId})`).attr("class", "c4-drill-bar");
|
|
905
948
|
}
|
|
906
949
|
}
|
|
907
950
|
if (hasLegend) {
|
|
@@ -1039,4 +1082,4 @@ export {
|
|
|
1039
1082
|
renderC4Deployment,
|
|
1040
1083
|
renderC4DeploymentForExport
|
|
1041
1084
|
};
|
|
1042
|
-
//# sourceMappingURL=chunk-
|
|
1085
|
+
//# sourceMappingURL=chunk-EOG4QKKV.js.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// src/utils/fit-canvas.ts
|
|
2
|
+
var MIN_CANVAS_WIDTH = 480;
|
|
3
|
+
function fitDiagramToCanvas(p) {
|
|
4
|
+
const scaleX = (p.width - p.padding * 2) / p.diagramW;
|
|
5
|
+
let scale;
|
|
6
|
+
let canvasHeight;
|
|
7
|
+
let canvasWidth;
|
|
8
|
+
if (p.exportMode) {
|
|
9
|
+
scale = Math.min(p.maxScale, scaleX, 1);
|
|
10
|
+
canvasHeight = p.titleHeight + p.diagramH * scale + p.padding * 2;
|
|
11
|
+
canvasWidth = Math.round(
|
|
12
|
+
Math.min(
|
|
13
|
+
p.width,
|
|
14
|
+
Math.max(MIN_CANVAS_WIDTH, p.diagramW * scale + p.padding * 2)
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
} else {
|
|
18
|
+
const availH = p.height - p.titleHeight;
|
|
19
|
+
const scaleY = (availH - p.padding * 2) / p.diagramH;
|
|
20
|
+
scale = Math.min(p.maxScale, scaleX, scaleY);
|
|
21
|
+
canvasHeight = p.height;
|
|
22
|
+
canvasWidth = p.width;
|
|
23
|
+
}
|
|
24
|
+
const scaledW = p.diagramW * scale;
|
|
25
|
+
return {
|
|
26
|
+
scale,
|
|
27
|
+
offsetX: (canvasWidth - scaledW) / 2,
|
|
28
|
+
offsetY: p.titleHeight + p.padding,
|
|
29
|
+
canvasHeight,
|
|
30
|
+
canvasWidth
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
MIN_CANVAS_WIDTH,
|
|
36
|
+
fitDiagramToCanvas
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=chunk-EPDBWATV.js.map
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EDGE_DASH
|
|
3
|
+
} from "./chunk-IIEI7VK5.js";
|
|
1
4
|
import {
|
|
2
5
|
measureText
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YC6GVLTI.js";
|
|
4
7
|
|
|
5
8
|
// src/utils/card.ts
|
|
6
9
|
function renderNodeCard(container, opts) {
|
|
7
10
|
const rect = container.append("rect").attr("x", 0).attr("y", 0).attr("width", opts.width).attr("height", opts.height).attr("rx", opts.rx).attr("fill", opts.fill).attr("stroke", opts.stroke).attr("stroke-width", opts.strokeWidth);
|
|
8
11
|
if (opts.dashed) {
|
|
9
|
-
rect.attr("stroke-dasharray",
|
|
12
|
+
rect.attr("stroke-dasharray", EDGE_DASH);
|
|
10
13
|
}
|
|
11
14
|
const labelLines = opts.labelLines;
|
|
12
15
|
if (labelLines && labelLines.length > 1) {
|
|
@@ -44,4 +47,4 @@ export {
|
|
|
44
47
|
renderNodeCard,
|
|
45
48
|
renderCollapseBar
|
|
46
49
|
};
|
|
47
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-F66R7CPY.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
extractColor,
|
|
3
3
|
measureIndent,
|
|
4
4
|
parseFirstLine
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4CA7TJ44.js";
|
|
6
6
|
import {
|
|
7
7
|
emit,
|
|
8
8
|
formatDgmoError,
|
|
@@ -507,4 +507,4 @@ export {
|
|
|
507
507
|
VERSION_CONTROL_DIAGNOSTICS,
|
|
508
508
|
parseVersionControl
|
|
509
509
|
};
|
|
510
|
-
//# sourceMappingURL=chunk-
|
|
510
|
+
//# sourceMappingURL=chunk-FFDHZVEL.js.map
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MONO_FAMILY
|
|
3
|
+
} from "./chunk-ICLB27PZ.js";
|
|
4
|
+
|
|
1
5
|
// src/utils/safe-href.ts
|
|
2
6
|
var ALLOWED_SCHEMES = ["http", "https", "mailto"];
|
|
3
7
|
var SCHEME_RE = /^([a-z][a-z0-9+.-]*):/i;
|
|
@@ -76,7 +80,7 @@ function renderInlineText(textEl, text, palette, fontSize) {
|
|
|
76
80
|
if (span.bold) tspan.attr("font-weight", "bold");
|
|
77
81
|
if (span.italic) tspan.attr("font-style", "italic");
|
|
78
82
|
if (span.code) {
|
|
79
|
-
tspan.attr("font-family",
|
|
83
|
+
tspan.attr("font-family", MONO_FAMILY);
|
|
80
84
|
if (fontSize) tspan.attr("font-size", fontSize - 1);
|
|
81
85
|
}
|
|
82
86
|
}
|
|
@@ -90,4 +94,4 @@ export {
|
|
|
90
94
|
stripInlineMarkdown,
|
|
91
95
|
renderInlineText
|
|
92
96
|
};
|
|
93
|
-
//# sourceMappingURL=chunk-
|
|
97
|
+
//# sourceMappingURL=chunk-FWNJDD4U.js.map
|