@diagrammo/dgmo 0.96.0 → 0.98.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.
Files changed (264) hide show
  1. package/dist/advanced.d.ts +178 -8
  2. package/dist/advanced.js +232 -246
  3. package/dist/block.d.ts +8 -0
  4. package/dist/block.js +138 -66
  5. package/dist/{calculator-GIB7POFX.js → calculator-CIGGTURF.js} +2 -2
  6. package/dist/{chart-meta-uImk4eTn.d.ts → chart-meta-B7niEd52.d.ts} +3 -1
  7. package/dist/chart-meta.d.ts +2 -2
  8. package/dist/chart-meta.js +19 -19
  9. package/dist/{chart-types-CBVYiLqy.d.ts → chart-types-Dxtv4XSz.d.ts} +3 -0
  10. package/dist/{charts-d3-IRP5VANE.js → charts-d3-INWEGMSD.js} +14 -14
  11. package/dist/{chunk-VLI6AWS3.js → chunk-3C4OXVZJ.js} +2 -2
  12. package/dist/{chunk-I3ZRIMR7.js → chunk-3EDV56HL.js} +15 -15
  13. package/dist/{chunk-OO4GUE4E.js → chunk-3F74NDUY.js} +63 -18
  14. package/dist/{chunk-RGFVHYDP.js → chunk-3IUMSK72.js} +2 -2
  15. package/dist/chunk-42AZPI2W.js +150 -0
  16. package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
  17. package/dist/{chunk-FHX373L5.js → chunk-47INRTZ6.js} +2 -2
  18. package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
  19. package/dist/{chunk-JBAFAKGX.js → chunk-4PZP6URA.js} +41 -51
  20. package/dist/{chunk-5LG526X7.js → chunk-5TGZBHEJ.js} +1 -1
  21. package/dist/{chunk-BD4O4D2A.js → chunk-5WZYJC2P.js} +2 -2
  22. package/dist/{chunk-DPNSDCR3.js → chunk-65JFUANT.js} +1 -1
  23. package/dist/{chunk-EZ6BI5LL.js → chunk-6OUMYNAJ.js} +1 -1
  24. package/dist/{chunk-U6N547QA.js → chunk-6PUBFB6D.js} +24 -3
  25. package/dist/{chunk-IKXQ6NVR.js → chunk-6Q46GMKH.js} +21 -58
  26. package/dist/{chunk-DKCVAQU3.js → chunk-6YRTBI2F.js} +53 -75
  27. package/dist/{chunk-RTRORHSP.js → chunk-7QKWU7FX.js} +3 -3
  28. package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
  29. package/dist/{chunk-H7RQG4PH.js → chunk-A3N4UHHL.js} +2 -2
  30. package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
  31. package/dist/chunk-AHUBG6GR.js +188 -0
  32. package/dist/{chunk-P3PSLC2K.js → chunk-AULFF7L2.js} +2 -2
  33. package/dist/{chunk-SCYVGPLI.js → chunk-B7ZH5EQ2.js} +2 -2
  34. package/dist/{chunk-TUOZ6AXC.js → chunk-BTFB7W5Z.js} +16 -4
  35. package/dist/{chunk-THTYCJGF.js → chunk-BWVJTYTJ.js} +4 -4
  36. package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
  37. package/dist/{chunk-H7JVKUA5.js → chunk-CES7REQM.js} +44 -60
  38. package/dist/{chunk-B2YVZ3QU.js → chunk-CGP7RGLJ.js} +1 -1
  39. package/dist/{chunk-34JOHSVE.js → chunk-CUTEHGXO.js} +2 -2
  40. package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
  41. package/dist/{chunk-TPCP2UOI.js → chunk-D6XR22KO.js} +3 -3
  42. package/dist/{chunk-OAZ6BIIB.js → chunk-D7FHY6DO.js} +9 -7
  43. package/dist/{chunk-67N26CER.js → chunk-DA2GIHAY.js} +38 -5
  44. package/dist/{chunk-PGD6CNWO.js → chunk-DFEVFLEG.js} +3 -3
  45. package/dist/{chunk-VVTCUIPN.js → chunk-DKMZ4VMV.js} +1 -1
  46. package/dist/{chunk-VJ7NLYFE.js → chunk-DYI73PFY.js} +3 -3
  47. package/dist/{chunk-IQZSKWE5.js → chunk-E6GHXMH2.js} +8 -8
  48. package/dist/{chunk-I2I2FKAK.js → chunk-EBJLT7PH.js} +1 -1
  49. package/dist/{chunk-K2SFH3GJ.js → chunk-ENXENGW5.js} +3 -3
  50. package/dist/{chunk-FKJWZWNU.js → chunk-EUPUVYWO.js} +1 -1
  51. package/dist/{chunk-26EVL454.js → chunk-F4DGHT3F.js} +20 -0
  52. package/dist/{chunk-WLGOIMTI.js → chunk-FDVUD3PR.js} +4 -4
  53. package/dist/{chunk-IU7XKZA6.js → chunk-FK6HZYGK.js} +4 -14
  54. package/dist/{chunk-67RKJEKF.js → chunk-FTRW6YGU.js} +35 -11
  55. package/dist/{chunk-2M3K6GD2.js → chunk-FTW2E2YH.js} +6 -6
  56. package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
  57. package/dist/chunk-G24NSISJ.js +69 -0
  58. package/dist/{chunk-4B45SNZH.js → chunk-G36XKXWT.js} +17 -15
  59. package/dist/{chunk-5H7SA5ZD.js → chunk-GFQFLLP3.js} +2 -2
  60. package/dist/{chunk-MAYTYF5S.js → chunk-GMJBBFKC.js} +3 -3
  61. package/dist/{chunk-5BG4OSWJ.js → chunk-GNQYARON.js} +20 -57
  62. package/dist/{chunk-RVOSA4RR.js → chunk-GNWCMWTO.js} +441 -267
  63. package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
  64. package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
  65. package/dist/{chunk-7UWVHNPM.js → chunk-H242TVAE.js} +9 -9
  66. package/dist/{chunk-CD7VQCDL.js → chunk-H7XXQSYA.js} +63 -53
  67. package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
  68. package/dist/{chunk-WTPS73RM.js → chunk-II6D6NWX.js} +8 -8
  69. package/dist/{chunk-3W73ZP6W.js → chunk-IMBFWXHF.js} +3 -3
  70. package/dist/{chunk-5ARANBIE.js → chunk-IUFTAFGN.js} +2 -2
  71. package/dist/{chunk-AQRSEQZV.js → chunk-IZEKHIV6.js} +3 -3
  72. package/dist/{chunk-WGNP5ND2.js → chunk-J3YM6RA5.js} +3 -3
  73. package/dist/{chunk-YFIUABSF.js → chunk-J467QBZF.js} +23 -3
  74. package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
  75. package/dist/{chunk-TIPNNOZC.js → chunk-KKJG3LBY.js} +41 -19
  76. package/dist/{chunk-YVIPJGFG.js → chunk-KMB754DO.js} +33 -6
  77. package/dist/chunk-KNKZGRRB.js +439 -0
  78. package/dist/{chunk-SIABEREK.js → chunk-KTGJQJB3.js} +2 -2
  79. package/dist/{chunk-LGUFJ7Y2.js → chunk-KW3CC7SB.js} +1 -1
  80. package/dist/{chunk-ITDF3MWD.js → chunk-L3K5O3Z5.js} +3 -3
  81. package/dist/{chunk-NI4L6HEU.js → chunk-LZATSXAA.js} +1 -1
  82. package/dist/{chunk-EPB3UEMD.js → chunk-NBISN6FH.js} +2 -2
  83. package/dist/{chunk-VNAPEZX2.js → chunk-NHN6GBG7.js} +1 -1
  84. package/dist/{chunk-EM5SA7NC.js → chunk-NQFZ7LXC.js} +4 -4
  85. package/dist/chunk-NTDWVTEY.js +12 -0
  86. package/dist/{chunk-ZBOIYC2G.js → chunk-NXOIH5JK.js} +8 -13
  87. package/dist/{chunk-AUXUNV73.js → chunk-O3HRF25Z.js} +1 -1
  88. package/dist/{chunk-KDWEOT54.js → chunk-O5APWRZN.js} +192 -230
  89. package/dist/{chunk-GLL237AP.js → chunk-OSSA5UWA.js} +3 -3
  90. package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
  91. package/dist/{chunk-QEU6VM4O.js → chunk-PLQZJZ2K.js} +1 -1
  92. package/dist/chunk-PRG7NIUU.js +272 -0
  93. package/dist/{chunk-CP73WWLN.js → chunk-PRYAVMU6.js} +48 -14
  94. package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
  95. package/dist/{chunk-B7BSRVNC.js → chunk-PZ5LAAO3.js} +2 -2
  96. package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
  97. package/dist/{chunk-MVUNMJKO.js → chunk-Q6OKTHYL.js} +71 -57
  98. package/dist/{chunk-ZOKD5F7M.js → chunk-QDPTOIG7.js} +5 -5
  99. package/dist/{chunk-2BYFNZVM.js → chunk-QGSQ2LMB.js} +57 -15
  100. package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
  101. package/dist/{chunk-K2WXMXI2.js → chunk-QLIZ7SB7.js} +1 -1
  102. package/dist/{chunk-P6LKX3IQ.js → chunk-QOLRTPGH.js} +6 -6
  103. package/dist/{chunk-FBK32S4D.js → chunk-R4SXMBGF.js} +1 -1
  104. package/dist/chunk-R4U7IIRX.js +178 -0
  105. package/dist/{chunk-DWMQ24JR.js → chunk-RC6PISCK.js} +4 -2
  106. package/dist/{chunk-R5L5E3TC.js → chunk-REKLKGR6.js} +3 -3
  107. package/dist/{chunk-FUYEXLAN.js → chunk-RFGQDIOI.js} +837 -220
  108. package/dist/{chunk-W5MMPPGX.js → chunk-ROFSIFSY.js} +4 -4
  109. package/dist/{chunk-JCC3B2GS.js → chunk-ROH4LYBL.js} +65 -21
  110. package/dist/{chunk-MYHR3PMH.js → chunk-S5VZLZUQ.js} +7 -7
  111. package/dist/{chunk-JRN2CRXJ.js → chunk-TDUBTDXS.js} +1 -1
  112. package/dist/{chunk-IZFJZCF6.js → chunk-TGQQD2KC.js} +84 -16
  113. package/dist/{chunk-GM2SLMQW.js → chunk-TMB4YY3J.js} +34 -4
  114. package/dist/{chunk-HH3DHNQA.js → chunk-UWWQECLC.js} +2 -2
  115. package/dist/{chunk-HZX4QZGR.js → chunk-V65EDV6S.js} +3 -3
  116. package/dist/{chunk-OYGJZA24.js → chunk-VHVQT4EW.js} +39 -19
  117. package/dist/{chunk-KQAPFIYF.js → chunk-VQWLASDC.js} +2 -2
  118. package/dist/chunk-VTGGPBLW.js +14 -0
  119. package/dist/{chunk-LRHPBWOY.js → chunk-VUBCCY65.js} +32 -69
  120. package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
  121. package/dist/{chunk-D7DGLJ7N.js → chunk-VVZDBUHA.js} +2 -2
  122. package/dist/{chunk-B5CEV7IR.js → chunk-VYEIMHL5.js} +38 -14
  123. package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
  124. package/dist/{chunk-P2GNNEMN.js → chunk-WPYJAHRP.js} +1 -1
  125. package/dist/{chunk-RIK6WUMO.js → chunk-XCYGOCMS.js} +43 -26
  126. package/dist/{chunk-PWZEJNO6.js → chunk-XMUFXJI2.js} +6 -6
  127. package/dist/{chunk-5G4DOOX2.js → chunk-XPOEE2RW.js} +9 -5
  128. package/dist/{chunk-EMGNCG5C.js → chunk-XZGXVN4T.js} +5 -5
  129. package/dist/{chunk-BUVLLK3D.js → chunk-Y24QPREP.js} +27 -17
  130. package/dist/{chunk-GEHK4UD5.js → chunk-YCIOLYWL.js} +92 -23
  131. package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
  132. package/dist/{chunk-6XLMTAEX.js → chunk-YIHRLY55.js} +33 -6
  133. package/dist/{chunk-CYRB2JTN.js → chunk-YLKPRT6U.js} +1 -1
  134. package/dist/{chunk-KMU65FYM.js → chunk-YSDSFXQD.js} +1 -1
  135. package/dist/{chunk-M4ZUIW3J.js → chunk-Z6V73LD6.js} +3 -3
  136. package/dist/{chunk-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
  137. package/dist/{chunk-YSGOXZBB.js → chunk-ZMVMGZAJ.js} +1 -1
  138. package/dist/{chunk-O2HNVNKO.js → chunk-ZTKO2RD4.js} +5 -5
  139. package/dist/{chunk-5GU6C5WB.js → chunk-ZXPSNBZC.js} +3 -3
  140. package/dist/collapse-6IGH2B24.js +31 -0
  141. package/dist/collapse-GOWNCVHZ.js +7 -0
  142. package/dist/collapse-HNTPLB2Q.js +11 -0
  143. package/dist/collapse-NUM7DPJA.js +10 -0
  144. package/dist/completion-registry.js +27 -4
  145. package/dist/dgmo-router-RXV7BNPN.js +101 -0
  146. package/dist/dimensions-KXAI7U2B.js +21 -0
  147. package/dist/editor.js +882 -215
  148. package/dist/{flowchart-parser-SM5LHF2D.js → flowchart-parser-JAZRKKKJ.js} +5 -5
  149. package/dist/flowchart-renderer-JED3RESY.js +40 -0
  150. package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
  151. package/dist/highlight.js +883 -216
  152. package/dist/index.d.ts +52 -5
  153. package/dist/index.js +79 -63
  154. package/dist/{layout-LNVIH45F.js → layout-6QXAC2WA.js} +7 -6
  155. package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
  156. package/dist/layout-BSK374N6.js +11 -0
  157. package/dist/{layout-FCFUVCRI.js → layout-DJOZCSAP.js} +10 -10
  158. package/dist/{layout-R6G4MEO3.js → layout-FJDBY3WG.js} +5 -5
  159. package/dist/{layout-H2KP5A6M.js → layout-GC5XX2RH.js} +2 -2
  160. package/dist/{layout-KELSNWBD.js → layout-LCHMEGTV.js} +10 -10
  161. package/dist/{layout-PPIVGJXD.js → layout-ROI5KVSO.js} +3 -3
  162. package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
  163. package/dist/{layout-AF4KA5B2.js → layout-VHBM32OD.js} +6 -6
  164. package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
  165. package/dist/layout-WTHBGTH2.js +15 -0
  166. package/dist/layout-ZCCABSV7.js +15 -0
  167. package/dist/{layout-MPSH3YWE.js → layout-ZDMJL4KO.js} +10 -10
  168. package/dist/{layout-search-C2TYUH4L.js → layout-search-UZYZE4PR.js} +8 -8
  169. package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
  170. package/dist/{parser-6WURFLOB.js → parser-3KMY23A2.js} +3 -3
  171. package/dist/{parser-DGLKH4NT.js → parser-3PMYAVFL.js} +2 -2
  172. package/dist/{parser-OHBBDCG4.js → parser-5KVFS4RN.js} +2 -2
  173. package/dist/{parser-QWTECQEC.js → parser-ASXY2CPV.js} +6 -6
  174. package/dist/{parser-UHKROC7Z.js → parser-BA43YPIQ.js} +3 -3
  175. package/dist/{parser-F75WNYMK.js → parser-CFAYEWLF.js} +3 -3
  176. package/dist/{parser-MWINQNQW.js → parser-DRFEX6OX.js} +3 -3
  177. package/dist/{parser-W6NX3AIV.js → parser-DWVBRBB2.js} +3 -3
  178. package/dist/{parser-DRUGM3R6.js → parser-FWQY3HJX.js} +2 -2
  179. package/dist/{parser-4GHAYZKZ.js → parser-GBB5MYAN.js} +6 -6
  180. package/dist/{parser-GBQY3WOZ.js → parser-GMCXCJSP.js} +3 -3
  181. package/dist/{parser-BPYHIG24.js → parser-IHFHPFL7.js} +3 -3
  182. package/dist/{parser-TTGZYLYD.js → parser-JQGUTDSX.js} +3 -3
  183. package/dist/{parser-BNRX35NT.js → parser-JRKPOO2Z.js} +3 -3
  184. package/dist/{parser-B7SCN7FG.js → parser-KI2XYB2R.js} +2 -2
  185. package/dist/parser-LDVVBP7S.js +12 -0
  186. package/dist/{parser-L7SI3PW4.js → parser-MAGFK6OK.js} +4 -4
  187. package/dist/{parser-722KLLAQ.js → parser-MH5BDN7X.js} +3 -3
  188. package/dist/{parser-5RUD4A3X.js → parser-MUHFEM4G.js} +3 -3
  189. package/dist/{parser-Y7QXD2UR.js → parser-P375HO7Q.js} +2 -2
  190. package/dist/{parser-LUJX7AXO.js → parser-PYY5BRLQ.js} +2 -2
  191. package/dist/parser-QEMFMVF5.js +12 -0
  192. package/dist/{parser-WIKXZP4X.js → parser-QIPDBT5M.js} +2 -2
  193. package/dist/{parser-2AXU2MHJ.js → parser-RNBDDEGL.js} +3 -3
  194. package/dist/{parser-H6HT2WFQ.js → parser-SGX2PVR5.js} +2 -2
  195. package/dist/{parser-ZWWQZ4XZ.js → parser-SJUEFKNM.js} +3 -3
  196. package/dist/{parser-4BOP77CD.js → parser-UMNBPXG2.js} +2 -2
  197. package/dist/{parser-GM5B2EPW.js → parser-WE4VSBBY.js} +3 -3
  198. package/dist/{parser-XEJP37GQ.js → parser-WKEYS7N3.js} +3 -3
  199. package/dist/{parser-DWV2CYBS.js → parser-WPXUUNA2.js} +3 -3
  200. package/dist/{parser-5HQPPVHJ.js → parser-XP3RCOTN.js} +3 -3
  201. package/dist/{parser-F3JJNIFC.js → parser-YV4RBHG7.js} +3 -3
  202. package/dist/{parser-CRJYLOHA.js → parser-YZ3J542U.js} +2 -2
  203. package/dist/{parser-ZV756RMP.js → parser-ZSBMGGTD.js} +6 -6
  204. package/dist/renderer-37LMEGLD.js +26 -0
  205. package/dist/{renderer-TS5NHOQD.js → renderer-3EIZRVO3.js} +12 -11
  206. package/dist/renderer-4LK2RFHD.js +28 -0
  207. package/dist/{renderer-BYLQ37T2.js → renderer-4WD4ZIEH.js} +16 -15
  208. package/dist/renderer-67PNYODC.js +32 -0
  209. package/dist/{renderer-GKY55M4Z.js → renderer-6O5SV5YE.js} +10 -10
  210. package/dist/{renderer-VNJOZPSH.js → renderer-6VBL2DWH.js} +17 -17
  211. package/dist/{renderer-F7YGMEGQ.js → renderer-7OXMSF4R.js} +4 -4
  212. package/dist/{renderer-6HU44IGJ.js → renderer-A36NL2SS.js} +8 -8
  213. package/dist/renderer-CC6O6GQK.js +18 -0
  214. package/dist/renderer-CUEMI3PI.js +85 -0
  215. package/dist/{renderer-QZJZIAT3.js → renderer-D6BEC6LI.js} +6 -4
  216. package/dist/{renderer-5GP7YUS4.js → renderer-DT2PP7NJ.js} +7 -6
  217. package/dist/{renderer-MGF2NNGG.js → renderer-E7LC7HCU.js} +5 -5
  218. package/dist/{renderer-PEJF6R2I.js → renderer-F3JYZERE.js} +4 -4
  219. package/dist/{renderer-CVCCW7UT.js → renderer-FAFSRFGR.js} +9 -9
  220. package/dist/renderer-GHYW6Y3A.js +27 -0
  221. package/dist/{renderer-VUXAAGUG.js → renderer-HRUKL4T6.js} +12 -11
  222. package/dist/renderer-INQMQPNN.js +22 -0
  223. package/dist/{renderer-LJPUCG3U.js → renderer-KOPJ76GS.js} +10 -10
  224. package/dist/renderer-KVC7Z4T2.js +39 -0
  225. package/dist/{renderer-MVBAQP3M.js → renderer-MYKL6VG6.js} +6 -6
  226. package/dist/{renderer-D6EH5UQ6.js → renderer-QVUPRQ4L.js} +13 -12
  227. package/dist/{renderer-SYRH3B62.js → renderer-RBAMFLZQ.js} +14 -13
  228. package/dist/{renderer-YJVQT7QG.js → renderer-S6L3JR6C.js} +11 -11
  229. package/dist/{renderer-ONENGXFQ.js → renderer-SGRZKIMS.js} +14 -12
  230. package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
  231. package/dist/{renderer-66NCRXSC.js → renderer-TJPBVNVG.js} +14 -11
  232. package/dist/renderer-WK2BPXND.js +41 -0
  233. package/dist/renderer-ZG7WOBBN.js +30 -0
  234. package/dist/{renderer-N6PM5CSG.js → renderer-ZRPL5COW.js} +14 -13
  235. package/dist/{renderer-2V2XY2V7.js → renderer-ZTHXOBXW.js} +8 -8
  236. package/dist/{renderer-radial-4R7AKETK.js → renderer-radial-FC25BDCZ.js} +8 -8
  237. package/dist/{state-parser-EQBBEKHR.js → state-parser-LSFAJFMV.js} +6 -6
  238. package/dist/state-renderer-QTDBFB4F.js +43 -0
  239. package/dist/{themes-CbJL3w8L.d.ts → themes-DoLdhUXV.d.ts} +1 -1
  240. package/docs/ai-integration.md +4 -3
  241. package/docs/language-reference.md +100 -14
  242. package/gallery/fixtures/swot-relabel.dgmo +19 -0
  243. package/gallery/fixtures/swot-tags.dgmo +16 -0
  244. package/gallery/fixtures/swot.dgmo +13 -0
  245. package/package.json +1 -1
  246. package/dist/chunk-R2K5L4UA.js +0 -49
  247. package/dist/collapse-TCVK3RPO.js +0 -8
  248. package/dist/dgmo-router-EPBQKQW2.js +0 -100
  249. package/dist/dimensions-DBCRBZIU.js +0 -21
  250. package/dist/flowchart-renderer-PPS2GTTD.js +0 -40
  251. package/dist/layout-3J72UULM.js +0 -15
  252. package/dist/layout-IXQNVRBE.js +0 -15
  253. package/dist/layout-VDCJOZSH.js +0 -11
  254. package/dist/parser-HM6FEX5K.js +0 -14
  255. package/dist/renderer-2MCV75JQ.js +0 -41
  256. package/dist/renderer-5AEDVLAA.js +0 -31
  257. package/dist/renderer-7C76HP5W.js +0 -30
  258. package/dist/renderer-7RAMBMTH.js +0 -22
  259. package/dist/renderer-E3334XLT.js +0 -84
  260. package/dist/renderer-LFZKG2GR.js +0 -26
  261. package/dist/renderer-MZIWP55B.js +0 -28
  262. package/dist/renderer-N75E3UVY.js +0 -25
  263. package/dist/renderer-VNUDN6F5.js +0 -39
  264. package/dist/state-renderer-SOGZ2CNN.js +0 -42
@@ -1,14 +1,17 @@
1
+ import {
2
+ QUEUE_CAP
3
+ } from "./chunk-VTGGPBLW.js";
1
4
  import {
2
5
  META_FONT_SIZE,
3
6
  META_LINE_HEIGHT
4
- } from "./chunk-XCKNFFKM.js";
7
+ } from "./chunk-WH6E6SHC.js";
5
8
  import {
6
9
  UNTAGGED_TAG_COLOR,
7
10
  tagAttrKey
8
- } from "./chunk-LGUFJ7Y2.js";
11
+ } from "./chunk-KW3CC7SB.js";
9
12
  import {
10
13
  legendSuppressed
11
- } from "./chunk-FUYEXLAN.js";
14
+ } from "./chunk-RFGQDIOI.js";
12
15
  import {
13
16
  LEGEND_CAPSULE_PAD,
14
17
  LEGEND_DOT_R,
@@ -19,16 +22,11 @@ import {
19
22
  LEGEND_PILL_FONT_SIZE,
20
23
  LEGEND_PILL_PAD,
21
24
  measureLegendText
22
- } from "./chunk-UOCWYLYT.js";
25
+ } from "./chunk-OZXKW5NA.js";
23
26
  import {
24
27
  measureText,
25
28
  wrapTextToWidth
26
- } from "./chunk-KAO7JL4I.js";
27
-
28
- // src/shape-caps.ts
29
- var CYLINDER_RY = 8;
30
- var QUEUE_CAP = 16;
31
- var FILE_WAVE = 10;
29
+ } from "./chunk-PU5X3P3T.js";
32
30
 
33
31
  // src/c4/layout.ts
34
32
  import dagre from "@dagrejs/dagre";
@@ -1736,9 +1734,6 @@ function layoutC4Deployment(parsed, activeTagGroup) {
1736
1734
  }
1737
1735
 
1738
1736
  export {
1739
- CYLINDER_RY,
1740
- QUEUE_CAP,
1741
- FILE_WAVE,
1742
1737
  rollUpContextRelationships,
1743
1738
  collectCardMetadata,
1744
1739
  computeC4NodeDimensions,
@@ -7,7 +7,7 @@ import {
7
7
  splitNameAndMeta,
8
8
  warnUnknownMetaKeys,
9
9
  withTagAliases
10
- } from "./chunk-FUYEXLAN.js";
10
+ } from "./chunk-RFGQDIOI.js";
11
11
  import {
12
12
  makeDgmoError
13
13
  } from "./chunk-BYU54C3S.js";
@@ -1,33 +1,47 @@
1
+ import {
2
+ applyCollapseProjection,
3
+ collapsedGroupId,
4
+ collapsedSequenceNoteLinesFromSource,
5
+ isCollapsibleGroup,
6
+ isFoldableSequenceNote
7
+ } from "./chunk-R4U7IIRX.js";
8
+ import {
9
+ SEQUENCE_CYLINDER_RY,
10
+ SEQUENCE_QUEUE_CAP
11
+ } from "./chunk-VTGGPBLW.js";
1
12
  import {
2
13
  ScaleContext
3
14
  } from "./chunk-24YPR5EH.js";
15
+ import {
16
+ collapseBarHeight,
17
+ renderCollapseBar
18
+ } from "./chunk-42AZPI2W.js";
4
19
  import {
5
20
  layoutInlineHeader
6
- } from "./chunk-R5L5E3TC.js";
21
+ } from "./chunk-REKLKGR6.js";
7
22
  import {
8
23
  TITLE_FONT_SIZE,
9
24
  TITLE_FONT_WEIGHT,
10
25
  TITLE_Y
11
- } from "./chunk-VLC6WNRD.js";
26
+ } from "./chunk-GULGSH2Z.js";
12
27
  import {
13
28
  ARROWHEAD_HEIGHT,
14
29
  ARROWHEAD_WIDTH,
15
- COLLAPSE_BAR_HEIGHT,
16
30
  EDGE_DASH,
17
31
  HAIRLINE_DASH
18
- } from "./chunk-XCKNFFKM.js";
32
+ } from "./chunk-WH6E6SHC.js";
19
33
  import {
20
34
  renderIntegratedLegend
21
- } from "./chunk-PGD6CNWO.js";
35
+ } from "./chunk-DFEVFLEG.js";
22
36
  import {
23
37
  getLegendExtent,
24
38
  getMaxLegendReservedHeight
25
- } from "./chunk-JILEYZ2V.js";
39
+ } from "./chunk-VVL2KKG4.js";
26
40
  import {
27
41
  isSequenceBlock,
28
42
  isSequenceNote,
29
43
  isSequenceSection
30
- } from "./chunk-JCC3B2GS.js";
44
+ } from "./chunk-ROH4LYBL.js";
31
45
  import {
32
46
  wrapDescriptionLines
33
47
  } from "./chunk-7WEYXYLC.js";
@@ -40,19 +54,19 @@ import {
40
54
  import {
41
55
  resolveActiveTagGroup,
42
56
  tagAttrKey
43
- } from "./chunk-LGUFJ7Y2.js";
57
+ } from "./chunk-KW3CC7SB.js";
44
58
  import {
45
59
  fillModeFromOptions,
46
60
  legendInlineRequested,
47
61
  legendSuppressed
48
- } from "./chunk-FUYEXLAN.js";
62
+ } from "./chunk-RFGQDIOI.js";
49
63
  import {
50
64
  legendChromeColors
51
- } from "./chunk-UOCWYLYT.js";
65
+ } from "./chunk-OZXKW5NA.js";
52
66
  import {
53
67
  measureText,
54
68
  truncateText
55
- } from "./chunk-KAO7JL4I.js";
69
+ } from "./chunk-PU5X3P3T.js";
56
70
  import {
57
71
  contrastText,
58
72
  mix,
@@ -63,133 +77,83 @@ import {
63
77
  // src/sequence/renderer.ts
64
78
  import * as d3Selection from "d3-selection";
65
79
 
66
- // src/sequence/collapse.ts
67
- function isCollapsibleGroup(group) {
68
- return group.participantIds.length > 1;
69
- }
70
- function collapsedGroupId(group, groups) {
71
- const shared = groups.some((g) => g !== group && g.name === group.name);
72
- return shared ? `${group.name}@${group.lineNumber}` : group.name;
73
- }
74
- function applyCollapseProjection(parsed, requestedGroups) {
75
- const collapsedGroups = new Set(
76
- parsed.groups.filter((g) => requestedGroups.has(g.lineNumber) && isCollapsibleGroup(g)).map((g) => g.lineNumber)
77
- );
78
- if (collapsedGroups.size === 0) {
79
- return {
80
- participants: parsed.participants,
81
- messages: parsed.messages,
82
- elements: parsed.elements,
83
- groups: parsed.groups,
84
- collapsedGroupIds: /* @__PURE__ */ new Map()
85
- };
86
- }
87
- const byName = new Map(parsed.groups.map((g) => [g.name, g]));
88
- const insideCollapsed = (group) => {
89
- let parentName = group.parent;
90
- const seen = /* @__PURE__ */ new Set();
91
- while (parentName !== void 0 && !seen.has(parentName)) {
92
- seen.add(parentName);
93
- const ancestor = byName.get(parentName);
94
- if (!ancestor) return false;
95
- if (collapsedGroups.has(ancestor.lineNumber)) return true;
96
- parentName = ancestor.parent;
97
- }
98
- return false;
80
+ // src/sequence/participant-shapes.ts
81
+ var PARTICIPANT_BOX_HEIGHT = 50;
82
+ var STROKE_WIDTH = 1.5;
83
+ function cylinder(axis, w, h, cap) {
84
+ const v = axis === "y";
85
+ const start = v ? cap : -w / 2 + cap;
86
+ const span = (v ? h : w) - cap * 2;
87
+ const end = start + span;
88
+ const [lo, hi, mid, half] = v ? [-w / 2, w / 2, 0, w / 2] : [0, h, h / 2, h / 2];
89
+ const at = (a, c) => v ? [c, a] : [a, c];
90
+ const capAt = (a) => {
91
+ const [cx, cy] = at(a, mid);
92
+ const [rx, ry] = v ? [half, cap] : [cap, half];
93
+ return { tag: "ellipse", paint: "shape", attrs: { cx, cy, rx, ry } };
99
94
  };
100
- const memberToGroup = /* @__PURE__ */ new Map();
101
- const virtualIds = /* @__PURE__ */ new Set();
102
- const groupById = /* @__PURE__ */ new Map();
103
- const byDepth = [...parsed.groups].sort((a, b) => a.depth - b.depth);
104
- for (const group of byDepth) {
105
- if (!collapsedGroups.has(group.lineNumber)) continue;
106
- if (insideCollapsed(group)) continue;
107
- const id = collapsedGroupId(group, parsed.groups);
108
- virtualIds.add(id);
109
- groupById.set(id, group);
110
- for (const memberId of group.participantIds) {
111
- if (!memberToGroup.has(memberId)) {
112
- memberToGroup.set(memberId, id);
113
- }
114
- }
115
- }
116
- const participants = [];
117
- const insertedGroups = /* @__PURE__ */ new Set();
118
- for (const p of parsed.participants) {
119
- const groupId = memberToGroup.get(p.id);
120
- if (groupId) {
121
- if (!insertedGroups.has(groupId)) {
122
- insertedGroups.add(groupId);
123
- const group = groupById.get(groupId);
124
- participants.push({
125
- id: groupId,
126
- label: group.name,
127
- type: "default",
128
- lineNumber: group.lineNumber
129
- });
130
- }
131
- } else if (virtualIds.has(p.id)) {
132
- } else {
133
- participants.push(p);
134
- }
135
- }
136
- const remap = (id) => memberToGroup.get(id) ?? id;
137
- const messages = parsed.messages.map((msg) => ({
138
- ...msg,
139
- from: remap(msg.from),
140
- to: remap(msg.to)
141
- }));
142
- const elements = remapElements(parsed.elements, memberToGroup);
143
- const groups = parsed.groups.filter((g) => !collapsedGroups.has(g.lineNumber) && !insideCollapsed(g)).map((g) => {
144
- const remapped = [];
145
- for (const id of g.participantIds) {
146
- const to = memberToGroup.get(id) ?? id;
147
- if (!remapped.includes(to)) remapped.push(to);
148
- }
149
- return { ...g, participantIds: remapped };
95
+ const wall = (c) => {
96
+ const [x1, y1] = at(start, c);
97
+ const [x2, y2] = at(end, c);
98
+ return { tag: "line", paint: "line", attrs: { x1, y1, x2, y2 } };
99
+ };
100
+ const [x, y] = at(start, lo);
101
+ const body = {
102
+ tag: "rect",
103
+ paint: "body",
104
+ attrs: { x, y, width: v ? w : span, height: v ? span : h }
105
+ };
106
+ return [capAt(end), body, wall(lo), wall(hi), capAt(start)];
107
+ }
108
+ function actor(h) {
109
+ const sc = h / PARTICIPANT_BOX_HEIGHT;
110
+ const hip = h * 0.65;
111
+ const legY = h - 2 * sc;
112
+ const line = (x1, y1, x2, y2) => ({
113
+ tag: "line",
114
+ paint: "line",
115
+ attrs: { x1, y1, x2, y2 }
150
116
  });
151
117
  return {
152
- participants,
153
- messages,
154
- elements,
155
- groups,
156
- collapsedGroupIds: memberToGroup
118
+ parts: [
119
+ {
120
+ tag: "circle",
121
+ paint: "ring",
122
+ attrs: { cx: 0, cy: 10 * sc, r: 8 * sc }
123
+ },
124
+ line(0, 19 * sc, 0, hip),
125
+ line(-16 * sc, 24 * sc, 16 * sc, 24 * sc),
126
+ line(0, hip, -12 * sc, legY),
127
+ line(0, hip, 12 * sc, legY)
128
+ ],
129
+ strokeWidth: Math.max(1.2, 2.5 * sc),
130
+ dashed: false
157
131
  };
158
132
  }
159
- function remapElements(elements, memberToGroup) {
160
- const remap = (id) => memberToGroup.get(id) ?? id;
161
- const result = [];
162
- for (const el of elements) {
163
- if (isSequenceSection(el)) {
164
- result.push(el);
165
- } else if (isSequenceNote(el)) {
166
- result.push({
167
- ...el,
168
- participantId: remap(el.participantId)
169
- });
170
- } else if (isSequenceBlock(el)) {
171
- result.push({
172
- ...el,
173
- children: remapElements(el.children, memberToGroup),
174
- elseChildren: remapElements(el.elseChildren, memberToGroup),
175
- ...el.elseIfBranches ? {
176
- elseIfBranches: el.elseIfBranches.map((branch) => ({
177
- ...branch,
178
- children: remapElements(branch.children, memberToGroup)
179
- }))
180
- } : {}
181
- });
182
- } else {
183
- const msg = el;
184
- const from = remap(msg.from);
185
- const to = remap(msg.to);
186
- if (from === to && from !== msg.from && !msg.label) {
187
- continue;
188
- }
189
- result.push({ ...msg, from, to });
190
- }
133
+ function participantShape(type, w, h) {
134
+ const drawn = (parts, dashed = false) => ({
135
+ parts,
136
+ strokeWidth: STROKE_WIDTH,
137
+ dashed
138
+ });
139
+ switch (type) {
140
+ case "actor":
141
+ return actor(h);
142
+ case "database":
143
+ return drawn(cylinder("y", w, h, SEQUENCE_CYLINDER_RY));
144
+ case "cache":
145
+ return drawn(cylinder("y", w, h, SEQUENCE_CYLINDER_RY), true);
146
+ case "queue":
147
+ return drawn(cylinder("x", w, h, SEQUENCE_QUEUE_CAP));
148
+ default:
149
+ return drawn([
150
+ {
151
+ tag: "rect",
152
+ paint: "shape",
153
+ attrs: { x: -w / 2, y: 0, width: w, height: h, rx: 2, ry: 2 }
154
+ }
155
+ ]);
191
156
  }
192
- return result;
193
157
  }
194
158
 
195
159
  // src/sequence/tag-resolution.ts
@@ -278,7 +242,6 @@ function resolveSequenceTags(parsed, activeTagGroup) {
278
242
  // src/sequence/renderer.ts
279
243
  var PARTICIPANT_GAP = 160;
280
244
  var PARTICIPANT_BOX_WIDTH = 120;
281
- var PARTICIPANT_BOX_HEIGHT = 50;
282
245
  var LABEL_FONT_SIZE = 13;
283
246
  var TOP_MARGIN = 20;
284
247
  var TITLE_HEIGHT = 30;
@@ -345,67 +308,23 @@ function wrapLabelWords(words, maxWidth, fontSize, sep = "") {
345
308
  }
346
309
  var fill = (palette, isDark, color, fillMode) => color ? shapeFill(palette, color, isDark, { mode: fillMode }) : isDark ? mix(palette.overlay, palette.surface, 50) : mix(palette.bg, palette.surface, 50);
347
310
  var stroke = (palette, color) => color ?? palette.border;
348
- var SW = 1.5;
349
311
  var W = PARTICIPANT_BOX_WIDTH;
350
312
  var H = PARTICIPANT_BOX_HEIGHT;
351
- function renderRectParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
352
- g.append("rect").attr("x", -w / 2).attr("y", 0).attr("width", w).attr("height", h).attr("rx", 2).attr("ry", 2).attr("fill", fill(palette, isDark, color, fillMode)).attr("stroke", stroke(palette, color)).attr("stroke-width", SW);
353
- }
354
- function renderActorParticipant(g, palette, color, h = H) {
355
- const sc = h / H;
356
- const headR = 8 * sc;
357
- const cx = 0;
358
- const headY = 10 * sc;
359
- const bodyTopY = 19 * sc;
360
- const bodyBottomY = h * 0.65;
361
- const legY = h - 2 * sc;
362
- const armY = 24 * sc;
363
- const armSpan = 16 * sc;
364
- const legSpan = 12 * sc;
365
- const s = stroke(palette, color);
366
- const actorSW = Math.max(1.2, 2.5 * sc);
367
- g.append("circle").attr("cx", cx).attr("cy", headY).attr("r", headR).attr("fill", "none").attr("stroke", s).attr("stroke-width", actorSW);
368
- g.append("line").attr("x1", cx).attr("y1", bodyTopY).attr("x2", cx).attr("y2", bodyBottomY).attr("stroke", s).attr("stroke-width", actorSW);
369
- g.append("line").attr("x1", cx - armSpan).attr("y1", armY).attr("x2", cx + armSpan).attr("y2", armY).attr("stroke", s).attr("stroke-width", actorSW);
370
- g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx - legSpan).attr("y2", legY).attr("stroke", s).attr("stroke-width", actorSW);
371
- g.append("line").attr("x1", cx).attr("y1", bodyBottomY).attr("x2", cx + legSpan).attr("y2", legY).attr("stroke", s).attr("stroke-width", actorSW);
372
- }
373
- function renderDatabaseParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
374
- const ry = 7;
375
- const topY = ry;
376
- const bodyH = h - ry * 2;
377
- const f = fill(palette, isDark, color, fillMode);
378
- const s = stroke(palette, color);
379
- g.append("ellipse").attr("cx", 0).attr("cy", topY + bodyH).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
380
- g.append("rect").attr("class", "participant-body").attr("x", -w / 2).attr("y", topY).attr("width", w).attr("height", bodyH).attr("fill", f).attr("stroke", "none");
381
- g.append("line").attr("x1", -w / 2).attr("y1", topY).attr("x2", -w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW);
382
- g.append("line").attr("x1", w / 2).attr("y1", topY).attr("x2", w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW);
383
- g.append("ellipse").attr("cx", 0).attr("cy", topY).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
384
- }
385
- function renderQueueParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
386
- const rx = 10;
387
- const leftX = -w / 2 + rx;
388
- const bodyW = w - rx * 2;
389
- const f = fill(palette, isDark, color, fillMode);
390
- const s = stroke(palette, color);
391
- g.append("ellipse").attr("cx", leftX + bodyW).attr("cy", h / 2).attr("rx", rx).attr("ry", h / 2).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
392
- g.append("rect").attr("class", "participant-body").attr("x", leftX).attr("y", 0).attr("width", bodyW).attr("height", h).attr("fill", f).attr("stroke", "none");
393
- g.append("line").attr("x1", leftX).attr("y1", 0).attr("x2", leftX + bodyW).attr("y2", 0).attr("stroke", s).attr("stroke-width", SW);
394
- g.append("line").attr("x1", leftX).attr("y1", h).attr("x2", leftX + bodyW).attr("y2", h).attr("stroke", s).attr("stroke-width", SW);
395
- g.append("ellipse").attr("cx", leftX).attr("cy", h / 2).attr("rx", rx).attr("ry", h / 2).attr("fill", f).attr("stroke", s).attr("stroke-width", SW);
396
- }
397
- function renderCacheParticipant(g, palette, isDark, color, fillMode, w = W, h = H) {
398
- const ry = 7;
399
- const topY = ry;
400
- const bodyH = h - ry * 2;
401
- const f = fill(palette, isDark, color, fillMode);
402
- const s = stroke(palette, color);
403
- const dash = EDGE_DASH;
404
- g.append("ellipse").attr("cx", 0).attr("cy", topY + bodyH).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
405
- g.append("rect").attr("class", "participant-body").attr("x", -w / 2).attr("y", topY).attr("width", w).attr("height", bodyH).attr("fill", f).attr("stroke", "none");
406
- g.append("line").attr("x1", -w / 2).attr("y1", topY).attr("x2", -w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
407
- g.append("line").attr("x1", w / 2).attr("y1", topY).attr("x2", w / 2).attr("y2", topY + bodyH).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
408
- g.append("ellipse").attr("cx", 0).attr("cy", topY).attr("rx", w / 2).attr("ry", ry).attr("fill", f).attr("stroke", s).attr("stroke-width", SW).attr("stroke-dasharray", dash);
313
+ function drawParticipantShape(g, shape, fillColor, strokeColor) {
314
+ for (const part of shape.parts) {
315
+ const el = g.append(part.tag);
316
+ if (part.paint === "body") el.attr("class", "participant-body");
317
+ for (const [name, value] of Object.entries(part.attrs))
318
+ el.attr(name, value);
319
+ if (part.paint === "body") {
320
+ el.attr("fill", fillColor).attr("stroke", "none");
321
+ continue;
322
+ }
323
+ if (part.paint !== "line")
324
+ el.attr("fill", part.paint === "ring" ? "none" : fillColor);
325
+ el.attr("stroke", strokeColor).attr("stroke-width", shape.strokeWidth);
326
+ if (shape.dashed) el.attr("stroke-dasharray", EDGE_DASH);
327
+ }
409
328
  }
410
329
  function groupMessagesBySection(elements, messages) {
411
330
  const groups = [];
@@ -762,6 +681,9 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
762
681
  const elements = collapsed ? collapsed.elements : parsed.elements;
763
682
  const groups = collapsed ? collapsed.groups : parsed.groups;
764
683
  const collapsedSections = options?.collapsedSections;
684
+ const collapsedNoteLines = options?.collapsedNotes ?? collapsedSequenceNoteLinesFromSource(parsed);
685
+ const isNoteFolded = (note) => isFoldableSequenceNote(note) && collapsedNoteLines.has(note.lineNumber);
686
+ const shownNoteText = (note) => isNoteFolded(note) ? note.text.split("\n")[0] : note.text;
765
687
  const autonumber = parsedOptions["autonumber"]?.toLowerCase() === "on";
766
688
  const sourceMessageNumberByLine = new Map(
767
689
  parsed.messages.map((message, index) => [message.lineNumber, index + 1])
@@ -1050,7 +972,10 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1050
972
  const note = els[j];
1051
973
  const sc = isNoteAfterSelfCall(note);
1052
974
  const maxW = noteEffectiveMaxW(note.participantId, note.position, sc);
1053
- const noteH = computeNoteHeight(note.text, noteTextWidth(maxW));
975
+ const noteH = computeNoteHeight(
976
+ shownNoteText(note),
977
+ noteTextWidth(maxW)
978
+ );
1054
979
  totalExtent += noteH + NOTE_OFFSET_BELOW;
1055
980
  j++;
1056
981
  }
@@ -1377,7 +1302,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1377
1302
  effectiveNotePosition(note),
1378
1303
  isNoteAfterSelfCall(note)
1379
1304
  );
1380
- const noteH = computeNoteHeight(note.text, noteTextWidth(maxW));
1305
+ const noteH = computeNoteHeight(shownNoteText(note), noteTextWidth(maxW));
1381
1306
  contentBottomY = Math.max(
1382
1307
  contentBottomY,
1383
1308
  noteTopY + noteH + NOTE_TRAILING_GAP
@@ -1539,7 +1464,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1539
1464
  const padTop = hasExpandedGroup ? (maxGroupDepth + 1 - group.depth) * GROUP_PADDING_TOP : 0;
1540
1465
  const padBottom = hasExpandedGroup ? groupBottomPad(group.depth, maxGroupDepth) : 0;
1541
1466
  const height = sBoxH + padTop + padBottom;
1542
- const barHeight = ctx.structural(COLLAPSE_BAR_HEIGHT);
1467
+ const barHeight = collapseBarHeight(ctx);
1543
1468
  collapsedGroupBoxes.set(collapsedGroupId(group, parsed.groups), {
1544
1469
  name: group.name,
1545
1470
  lineNumber: group.lineNumber,
@@ -1551,9 +1476,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1551
1476
  height,
1552
1477
  // Centred in the box ABOVE the bar, so the bar does not push the name
1553
1478
  // off-centre the way it would if the whole box were used.
1554
- nameY: -padTop + (height - barHeight) / 2,
1555
- barY: -padTop + height - barHeight,
1556
- barHeight
1479
+ nameY: -padTop + (height - barHeight) / 2
1557
1480
  });
1558
1481
  }
1559
1482
  const framedGroups = [...groups].sort((a, b) => a.depth - b.depth);
@@ -1875,7 +1798,11 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1875
1798
  if (px === void 0) continue;
1876
1799
  const { topY, position, afterSelfCall, maxW, textWidth } = noteLayout;
1877
1800
  const isRight = position === "right";
1878
- const wrappedLines = wrapTextLines(note.text, textWidth, sNoteFontSize);
1801
+ const wrappedLines = wrapTextLines(
1802
+ shownNoteText(note),
1803
+ textWidth,
1804
+ sNoteFontSize
1805
+ );
1879
1806
  const noteH = wrappedLines.length * sNoteLineH + sNotePadV * 2;
1880
1807
  const maxLineW = Math.max(
1881
1808
  ...wrappedLines.map((l) => measureText(l.text, sNoteFontSize))
@@ -1887,6 +1814,8 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1887
1814
  const rightOffset = afterSelfCall && isRight ? sActivationWidth / 2 + sSelfCallWidth + sNoteGap : sActivationWidth + sNoteGap;
1888
1815
  const noteX = isRight ? px + rightOffset : px - sActivationWidth - sNoteGap - noteW;
1889
1816
  noteBoxes.set(note, {
1817
+ foldable: isFoldableSequenceNote(note),
1818
+ folded: isNoteFolded(note),
1890
1819
  x: noteX,
1891
1820
  y: topY,
1892
1821
  width: noteW,
@@ -2094,9 +2023,24 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2094
2023
  if (collapsible) {
2095
2024
  groupG.attr("data-line-number", String(group.lineNumber)).attr("role", "button").attr("aria-expanded", "true").attr("aria-label", groupToggleName(group.name, group.participantIds)).attr("cursor", "pointer");
2096
2025
  }
2097
- groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.height).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("pointer-events", "none").attr("class", "group-box");
2026
+ const frameRect = groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.height).attr("rx", 6).attr("fill", fillColor).attr("stroke", strokeColor).attr("stroke-width", 1).attr("stroke-opacity", 0.5).attr("class", "group-box");
2027
+ if (!collapsible) frameRect.attr("pointer-events", "none");
2098
2028
  groupG.append("rect").attr("x", frame.x).attr("y", frame.y).attr("width", frame.width).attr("height", frame.headerHeight).attr("fill", "transparent").attr("class", "group-label-hit");
2099
2029
  groupG.append("text").attr("x", frame.labelX).attr("y", frame.labelY).attr("text-anchor", "middle").attr("fill", strokeColor).attr("font-size", sGroupLabelSize).attr("font-weight", GROUP_LABEL_WEIGHT).attr("opacity", 0.7).attr("pointer-events", "none").attr("class", "group-label").text(group.name);
2030
+ if (collapsible) {
2031
+ renderCollapseBar(groupG, {
2032
+ expanded: true,
2033
+ x: frame.x,
2034
+ y: frame.y,
2035
+ width: frame.width,
2036
+ height: frame.height,
2037
+ rx: 6,
2038
+ fill: strokeColor,
2039
+ clipId: `clip-group-frame-${group.lineNumber}`,
2040
+ prefix: "sequence",
2041
+ scale: ctx
2042
+ });
2043
+ }
2100
2044
  }
2101
2045
  participants.forEach((participant) => {
2102
2046
  const cx = participantX.get(participant.id);
@@ -2125,7 +2069,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2125
2069
  const meta = collapsedGroupBoxes.get(participant.id);
2126
2070
  const drillColor = effectiveTagColor ?? mix(palette.textMuted, themeBaseBg(palette, isDark), 55);
2127
2071
  const boxW = sBoxW;
2128
- const { padTop, height: fullH, nameY, barY, barHeight } = meta;
2072
+ const { padTop, height: fullH, nameY } = meta;
2129
2073
  const clipId = `clip-drill-group-${participant.id.replace(/[^a-zA-Z0-9-]/g, "-")}`;
2130
2074
  const participantG = svg.select(
2131
2075
  `.participant[data-participant-id="${participant.id}"]`
@@ -2135,8 +2079,17 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2135
2079
  const pStroke = effectiveTagColor ?? palette.border;
2136
2080
  participantG.append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6).attr("fill", pFill).attr("stroke", pStroke).attr("stroke-width", 1.5);
2137
2081
  participantG.append("text").attr("x", 0).attr("y", nameY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("fill", palette.text).attr("font-size", sLabelFontSize).attr("font-weight", "normal").attr("class", "collapsed-group-label").text(truncateText(participant.label, sLabelFontSize, sLabelTextWidth));
2138
- participantG.append("clipPath").attr("id", clipId).append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6);
2139
- participantG.append("rect").attr("class", "sequence-drill-bar").attr("x", -boxW / 2).attr("y", barY).attr("width", boxW).attr("height", barHeight).attr("fill", drillColor).attr("clip-path", `url(#${clipId})`);
2082
+ renderCollapseBar(participantG, {
2083
+ x: -boxW / 2,
2084
+ y: -padTop,
2085
+ width: boxW,
2086
+ height: fullH,
2087
+ rx: 6,
2088
+ fill: drillColor,
2089
+ clipId,
2090
+ prefix: "sequence",
2091
+ scale: ctx
2092
+ });
2140
2093
  }
2141
2094
  const llColor = effectiveTagColor ?? palette.textMuted;
2142
2095
  for (const [segTop, segBottom] of lifelines.get(participant.id) ?? []) {
@@ -2201,6 +2154,18 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2201
2154
  const bandFill = isCollapsed ? legendChromeColors(palette, isDark).groupBg : lineColor;
2202
2155
  const bandOpacity = isCollapsed ? 1 : isDark ? 0.1 : 0.08;
2203
2156
  sectionG.append("rect").attr("x", band.x).attr("y", secY - BAND_HEIGHT / 2).attr("width", band.width).attr("height", BAND_HEIGHT).attr("fill", bandFill).attr("opacity", bandOpacity).attr("rx", 2).attr("pointer-events", "none").attr("class", "section-divider");
2157
+ renderCollapseBar(sectionG, {
2158
+ expanded: !isCollapsed,
2159
+ x: band.x,
2160
+ y: secY - BAND_HEIGHT / 2,
2161
+ width: band.width,
2162
+ height: BAND_HEIGHT,
2163
+ rx: 2,
2164
+ fill: lineColor,
2165
+ clipId: `seq-section-clip-${sec.lineNumber}`,
2166
+ prefix: "sequence-section",
2167
+ scale: ctx
2168
+ });
2204
2169
  const { labelText, labelWidth, labelX, labelBaseline } = band;
2205
2170
  const labelHitW = Math.max(80, labelWidth + 24);
2206
2171
  sectionG.append("rect").attr("x", labelX - labelHitW / 2).attr("y", secY - BAND_HEIGHT / 2).attr("width", labelHitW).attr("height", BAND_HEIGHT).attr("fill", "transparent").attr("class", "section-label-hit");
@@ -2318,7 +2283,10 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2318
2283
  const box = noteBoxes.get(el);
2319
2284
  if (box === void 0) continue;
2320
2285
  const { x: noteX, y: noteTopY, width: noteW, height: noteH } = box;
2321
- const noteG = svg.append("g").attr("class", "note").attr("data-note-toggle", "").attr("data-line-number", String(el.lineNumber)).attr("data-line-end", String(el.endLineNumber));
2286
+ const noteG = svg.append("g").attr("class", box.folded ? "note note-collapsed" : "note").attr("data-line-number", String(el.lineNumber)).attr("data-line-end", String(el.endLineNumber));
2287
+ if (box.foldable) {
2288
+ noteG.attr("data-note-toggle", String(el.lineNumber)).attr("role", "button").attr("aria-expanded", box.folded ? "false" : "true").attr("aria-label", el.text.split("\n")[0]).style("cursor", "pointer");
2289
+ }
2322
2290
  noteG.append("path").attr(
2323
2291
  "d",
2324
2292
  [
@@ -2345,6 +2313,20 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2345
2313
  const textEl = noteG.append("text").attr("x", line.x).attr("y", line.y).attr("fill", palette.text).attr("font-size", sNoteFontSize).attr("class", "note-text");
2346
2314
  renderInlineText(textEl, line.text, palette, sNoteFontSize);
2347
2315
  }
2316
+ if (box.foldable) {
2317
+ renderCollapseBar(noteG, {
2318
+ expanded: !box.folded,
2319
+ x: noteX,
2320
+ y: noteTopY,
2321
+ width: noteW,
2322
+ height: noteH,
2323
+ rx: 0,
2324
+ fill: palette.textMuted,
2325
+ clipId: `clip-note-${String(el.lineNumber)}`,
2326
+ prefix: "sequence-note",
2327
+ scale: ctx
2328
+ });
2329
+ }
2348
2330
  } else if (isSequenceBlock(el)) {
2349
2331
  renderNoteElements(el.children);
2350
2332
  if (el.elseIfBranches) {
@@ -2415,31 +2397,12 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
2415
2397
  g.attr(`data-tag-${tagAttrKey(tagAttr.key)}`, tagAttr.value);
2416
2398
  }
2417
2399
  if (overlaid) return;
2418
- switch (participant.type) {
2419
- case "actor":
2420
- renderActorParticipant(g, palette, color, boxH);
2421
- break;
2422
- case "database":
2423
- renderDatabaseParticipant(
2424
- g,
2425
- palette,
2426
- isDark,
2427
- color,
2428
- fillMode,
2429
- boxW,
2430
- boxH
2431
- );
2432
- break;
2433
- case "queue":
2434
- renderQueueParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2435
- break;
2436
- case "cache":
2437
- renderCacheParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2438
- break;
2439
- default:
2440
- renderRectParticipant(g, palette, isDark, color, fillMode, boxW, boxH);
2441
- break;
2442
- }
2400
+ drawParticipantShape(
2401
+ g,
2402
+ participantShape(participant.type, boxW, boxH),
2403
+ fill(palette, isDark, color, fillMode),
2404
+ stroke(palette, color)
2405
+ );
2443
2406
  const isActor = participant.type === "actor";
2444
2407
  const labelLines = splitParticipantLabel(
2445
2408
  participant.label,
@@ -2468,7 +2431,6 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
2468
2431
  }
2469
2432
 
2470
2433
  export {
2471
- applyCollapseProjection,
2472
2434
  groupMessagesBySection,
2473
2435
  summarizeSectionParticipation,
2474
2436
  buildRenderSequence,