@diagrammo/dgmo 0.95.0 → 0.97.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 (279) hide show
  1. package/README.md +1 -1
  2. package/dist/advanced.d.ts +190 -568
  3. package/dist/advanced.js +259 -470
  4. package/dist/block.d.ts +8 -0
  5. package/dist/block.js +144 -73
  6. package/dist/{calculator-BNH3GSJE.js → calculator-CIGGTURF.js} +2 -2
  7. package/dist/{chart-meta-BbjsRY7o.d.ts → chart-meta-B7niEd52.d.ts} +3 -1
  8. package/dist/chart-meta.d.ts +2 -2
  9. package/dist/chart-meta.js +19 -19
  10. package/dist/{chart-types-Cppnp31G.d.ts → chart-types-Dxtv4XSz.d.ts} +4 -5
  11. package/dist/{charts-d3-SZV2SFTM.js → charts-d3-INWEGMSD.js} +14 -14
  12. package/dist/{chunk-P5XA627W.js → chunk-2FMOLWX4.js} +73 -65
  13. package/dist/{chunk-MLY5ALOV.js → chunk-2SZILMQT.js} +57 -15
  14. package/dist/chunk-35A3J4Z5.js +14 -0
  15. package/dist/{chunk-UXNA2H2V.js → chunk-3C4OXVZJ.js} +2 -2
  16. package/dist/{chunk-IZHGT5HD.js → chunk-3HL6NSSQ.js} +63 -18
  17. package/dist/{chunk-2WQ3YZMN.js → chunk-3IUMSK72.js} +2 -2
  18. package/dist/{chunk-LAXMUSGW.js → chunk-44RLIAYC.js} +17 -10
  19. package/dist/{chunk-H7AXCRO7.js → chunk-453IWXZ3.js} +0 -11
  20. package/dist/{chunk-2I4UQG7W.js → chunk-47INRTZ6.js} +2 -2
  21. package/dist/{chunk-IN7XI6NO.js → chunk-4NMRS6HW.js} +1 -1
  22. package/dist/{chunk-KLBTJEIK.js → chunk-4TK26YHH.js} +2 -2
  23. package/dist/{chunk-CN4RDJDV.js → chunk-5TGZBHEJ.js} +1 -1
  24. package/dist/{chunk-IXHWS2HI.js → chunk-5WZYJC2P.js} +2 -2
  25. package/dist/{chunk-KBDMEOLI.js → chunk-65JFUANT.js} +1 -1
  26. package/dist/{chunk-D3K4U3ZM.js → chunk-6K2W3FH7.js} +8 -5
  27. package/dist/{chunk-NXU4N5WT.js → chunk-6OUMYNAJ.js} +1 -1
  28. package/dist/{chunk-KRPLP5LP.js → chunk-6PUBFB6D.js} +24 -3
  29. package/dist/{chunk-EXHXTMVR.js → chunk-6S2H6EKN.js} +3 -3
  30. package/dist/{chunk-KSZB7TIY.js → chunk-6SDEXSJY.js} +42 -22
  31. package/dist/{chunk-IQN2NGEU.js → chunk-6YBZFOTA.js} +13 -13
  32. package/dist/{chunk-IHN6WDEY.js → chunk-74XR7Z3I.js} +13 -13
  33. package/dist/{chunk-2J2CWWWK.js → chunk-7ASVGFW3.js} +1 -1
  34. package/dist/{chunk-BH2SF4TT.js → chunk-7QKWU7FX.js} +3 -3
  35. package/dist/{chunk-A6YINTY6.js → chunk-7RACGVUY.js} +1 -1
  36. package/dist/{chunk-VB4VMB2I.js → chunk-7TEAFIEJ.js} +9 -5
  37. package/dist/{chunk-UNCCZ3NU.js → chunk-A3V72YIL.js} +14 -1
  38. package/dist/{chunk-BCV2VJTM.js → chunk-A5LFM62B.js} +3 -3
  39. package/dist/{chunk-U6VS3T2M.js → chunk-AULFF7L2.js} +4 -4
  40. package/dist/{chunk-LKZCUFOW.js → chunk-B7ZH5EQ2.js} +2 -2
  41. package/dist/{chunk-VGAMBOOC.js → chunk-C6ME2L4T.js} +2 -2
  42. package/dist/{chunk-3PP746YM.js → chunk-CGP7RGLJ.js} +1 -1
  43. package/dist/{chunk-67N26CER.js → chunk-CLW45YKE.js} +2 -1
  44. package/dist/{chunk-VTESGA5F.js → chunk-CUOMNKYW.js} +4 -4
  45. package/dist/{chunk-CDM6XMOT.js → chunk-CUTEHGXO.js} +2 -2
  46. package/dist/{chunk-NERQSSYD.js → chunk-D67YE4LR.js} +1 -1
  47. package/dist/{chunk-XOMIYMQ3.js → chunk-D7KZE2XJ.js} +39 -17
  48. package/dist/{chunk-NMS5XSLX.js → chunk-DFEVFLEG.js} +3 -3
  49. package/dist/{chunk-EBVVMUAA.js → chunk-DKMZ4VMV.js} +1 -1
  50. package/dist/{chunk-V5D6GDNK.js → chunk-DRY4W4W6.js} +36 -15
  51. package/dist/{chunk-XJQ6Z3FO.js → chunk-E6GHXMH2.js} +8 -8
  52. package/dist/{chunk-KBEWVCK3.js → chunk-EBJLT7PH.js} +1 -1
  53. package/dist/{chunk-TASRGDYP.js → chunk-EEIGHOJR.js} +92 -23
  54. package/dist/{chunk-AQQUJEDN.js → chunk-EUPUVYWO.js} +1 -1
  55. package/dist/{chunk-7IALGIOI.js → chunk-F2OAZHOX.js} +10 -5
  56. package/dist/{chunk-JXGSTBW6.js → chunk-FK6HZYGK.js} +4 -14
  57. package/dist/{chunk-OSSTOSXU.js → chunk-FTW2E2YH.js} +7 -10
  58. package/dist/{chunk-5P2L5QXE.js → chunk-FZVCS2XY.js} +4 -2
  59. package/dist/chunk-G24NSISJ.js +69 -0
  60. package/dist/{chunk-EBIDNRSR.js → chunk-GFQFLLP3.js} +2 -2
  61. package/dist/{chunk-RQTDUZUH.js → chunk-GLLYHYGT.js} +27 -17
  62. package/dist/{chunk-VLC6WNRD.js → chunk-GULGSH2Z.js} +4 -0
  63. package/dist/{chunk-H5NVCOEJ.js → chunk-GXBH7WNN.js} +2 -2
  64. package/dist/{chunk-C6G36F5S.js → chunk-H242TVAE.js} +9 -9
  65. package/dist/{chunk-5XBYLYYI.js → chunk-H7DZYHQF.js} +3 -3
  66. package/dist/{chunk-GLCMUTO5.js → chunk-HQNZJMNS.js} +1 -1
  67. package/dist/{chunk-IY62DXT2.js → chunk-IAM3IDL4.js} +2 -2
  68. package/dist/{chunk-IGJEKO2P.js → chunk-II6D6NWX.js} +8 -8
  69. package/dist/{chunk-AULZD45V.js → chunk-IUFTAFGN.js} +2 -2
  70. package/dist/{chunk-FWVE373X.js → chunk-IZEKHIV6.js} +3 -3
  71. package/dist/{chunk-BQMHJ6OW.js → chunk-J3YM6RA5.js} +22 -14
  72. package/dist/{chunk-R6EGUTIV.js → chunk-J467QBZF.js} +23 -3
  73. package/dist/{chunk-JJ7RGTAU.js → chunk-J7JF4QKA.js} +40 -30
  74. package/dist/{chunk-E7F76M3U.js → chunk-JULBDTNU.js} +61 -9
  75. package/dist/{chunk-EPDBWATV.js → chunk-K7RRXZHS.js} +4 -2
  76. package/dist/{chunk-ZECJ7Q6C.js → chunk-KMB754DO.js} +33 -6
  77. package/dist/chunk-KNKZGRRB.js +439 -0
  78. package/dist/{chunk-XIUGSUE4.js → chunk-KTGJQJB3.js} +6 -2
  79. package/dist/{chunk-4SACN2C5.js → chunk-KW3CC7SB.js} +1 -1
  80. package/dist/{chunk-3GUEYQGL.js → chunk-L3K5O3Z5.js} +3 -3
  81. package/dist/chunk-LRTSTDJ6.js +126 -0
  82. package/dist/{chunk-NBAAIRFP.js → chunk-LZATSXAA.js} +5 -2
  83. package/dist/{chunk-USE6HIOZ.js → chunk-MJ725XHD.js} +1156 -330
  84. package/dist/{chunk-3KVUFHUJ.js → chunk-NBISN6FH.js} +2 -2
  85. package/dist/{chunk-RITTLIDJ.js → chunk-NN5RUHXV.js} +84 -16
  86. package/dist/{chunk-62GLKE6Q.js → chunk-NOZMRPXI.js} +112 -157
  87. package/dist/{chunk-4XYZJTFO.js → chunk-NQFZ7LXC.js} +14 -6
  88. package/dist/chunk-NTDWVTEY.js +12 -0
  89. package/dist/{chunk-BQO24BDM.js → chunk-O3HRF25Z.js} +1 -1
  90. package/dist/{chunk-ZD3QCNB7.js → chunk-OSSA5UWA.js} +3 -3
  91. package/dist/{chunk-UOCWYLYT.js → chunk-OZXKW5NA.js} +1 -1
  92. package/dist/{chunk-NPDVWFAQ.js → chunk-PLQZJZ2K.js} +1 -1
  93. package/dist/chunk-PRG7NIUU.js +272 -0
  94. package/dist/{chunk-S4SJ4LLY.js → chunk-PSNRB75I.js} +3 -3
  95. package/dist/{chunk-QPQWY5RU.js → chunk-PT5VFY3B.js} +38 -14
  96. package/dist/{chunk-KAO7JL4I.js → chunk-PU5X3P3T.js} +6 -5
  97. package/dist/{chunk-J7Q4AB23.js → chunk-PZ5LAAO3.js} +2 -2
  98. package/dist/{chunk-TOHTKLKE.js → chunk-Q5Q5JLRT.js} +1 -1
  99. package/dist/{chunk-Y3SIQN4J.js → chunk-Q6V342WS.js} +17 -5
  100. package/dist/{chunk-RBVFNUAL.js → chunk-QDPTOIG7.js} +5 -5
  101. package/dist/{chunk-ERT7XDQW.js → chunk-QIITSGI5.js} +1 -1
  102. package/dist/{chunk-NM5V5EKY.js → chunk-QLIZ7SB7.js} +1 -1
  103. package/dist/chunk-QLNLRZ37.js +181 -0
  104. package/dist/{chunk-HHVIE45A.js → chunk-QOLRTPGH.js} +6 -6
  105. package/dist/{chunk-2ZW4NBYX.js → chunk-R4SXMBGF.js} +1 -1
  106. package/dist/chunk-R4U7IIRX.js +178 -0
  107. package/dist/{chunk-BRGRIZQB.js → chunk-RC6PISCK.js} +4 -2
  108. package/dist/{chunk-UIEKW4SG.js → chunk-REKLKGR6.js} +3 -4
  109. package/dist/{chunk-TIIZIAGS.js → chunk-RFGQDIOI.js} +843 -233
  110. package/dist/{chunk-FVTYJUXR.js → chunk-ROFSIFSY.js} +4 -4
  111. package/dist/{chunk-VSAKEMDD.js → chunk-ROH4LYBL.js} +71 -21
  112. package/dist/{chunk-4UVCTLRH.js → chunk-SNDCXT5R.js} +9 -7
  113. package/dist/{chunk-R46N5KR4.js → chunk-SQBCNEJB.js} +2 -1
  114. package/dist/{chunk-66JTY4AN.js → chunk-TDUBTDXS.js} +1 -1
  115. package/dist/{chunk-PGSGJLUR.js → chunk-TMB4YY3J.js} +34 -4
  116. package/dist/{chunk-UZ7EZW3B.js → chunk-TO53KK2P.js} +6 -1
  117. package/dist/{chunk-5KKZXA44.js → chunk-V3ICBS2O.js} +7 -5
  118. package/dist/{chunk-GWQRTA5W.js → chunk-V65EDV6S.js} +3 -3
  119. package/dist/{chunk-VF7IKIRS.js → chunk-VKT3BVRO.js} +35 -11
  120. package/dist/{chunk-L5S32VZJ.js → chunk-VOO65FKC.js} +12 -12
  121. package/dist/{chunk-PVWIBKV2.js → chunk-VQWLASDC.js} +2 -2
  122. package/dist/{chunk-JILEYZ2V.js → chunk-VVL2KKG4.js} +1 -1
  123. package/dist/{chunk-GI5R5B3S.js → chunk-VVZDBUHA.js} +2 -2
  124. package/dist/{chunk-PGBTUGDB.js → chunk-W46OMHOK.js} +23 -27
  125. package/dist/{chunk-XCKNFFKM.js → chunk-WH6E6SHC.js} +2 -4
  126. package/dist/{chunk-H6BT45SN.js → chunk-WPYJAHRP.js} +1 -1
  127. package/dist/{chunk-LJGE43SG.js → chunk-WXGFB2O2.js} +3 -3
  128. package/dist/{chunk-YQMIKX54.js → chunk-XCYGOCMS.js} +102 -52
  129. package/dist/{chunk-BTP2BMWN.js → chunk-XEMCNQQW.js} +15 -15
  130. package/dist/{chunk-NVZ7R4EK.js → chunk-XMUFXJI2.js} +6 -6
  131. package/dist/{chunk-AM42TLSZ.js → chunk-XZGXVN4T.js} +5 -5
  132. package/dist/{chunk-5OTA2PUH.js → chunk-YCIBBVI2.js} +2 -2
  133. package/dist/{chunk-V2NQV7VL.js → chunk-YFIDR7JH.js} +2 -2
  134. package/dist/{chunk-USZLHYEQ.js → chunk-YFWIFKRQ.js} +3 -3
  135. package/dist/{chunk-6XLMTAEX.js → chunk-YIHRLY55.js} +33 -6
  136. package/dist/{chunk-CYRB2JTN.js → chunk-YLKPRT6U.js} +1 -1
  137. package/dist/{chunk-KMU65FYM.js → chunk-YSDSFXQD.js} +1 -1
  138. package/dist/{chunk-ZI6WC24V.js → chunk-ZBJV4KNU.js} +1 -1
  139. package/dist/{chunk-4EX4OKGZ.js → chunk-ZCKVTZHD.js} +41 -19
  140. package/dist/{chunk-7PJBJ2DU.js → chunk-ZMVMGZAJ.js} +1 -1
  141. package/dist/{chunk-6EFCOES2.js → chunk-ZRW4B4KF.js} +48 -14
  142. package/dist/{chunk-A2A2I4Z4.js → chunk-ZTKO2RD4.js} +5 -5
  143. package/dist/collapse-6IGH2B24.js +31 -0
  144. package/dist/{collapse-BSPH3BFM.js → collapse-6X5S2S3G.js} +2 -1
  145. package/dist/collapse-GOWNCVHZ.js +7 -0
  146. package/dist/collapse-HNTPLB2Q.js +11 -0
  147. package/dist/collapse-NUM7DPJA.js +10 -0
  148. package/dist/completion-registry.js +28 -39
  149. package/dist/countdown.js +1 -1
  150. package/dist/dgmo-router-RSYWR5IS.js +101 -0
  151. package/dist/dimensions-KXAI7U2B.js +21 -0
  152. package/dist/editor.js +884 -222
  153. package/dist/{flowchart-parser-J3VWIFWB.js → flowchart-parser-UI5VZNGJ.js} +5 -5
  154. package/dist/{flowchart-renderer-FECH5KK5.js → flowchart-renderer-IYWPKPCF.js} +18 -18
  155. package/dist/fold-at-line-DmSAa1eU.d.ts +11 -0
  156. package/dist/highlight.js +886 -224
  157. package/dist/index.d.ts +89 -6
  158. package/dist/index.js +91 -70
  159. package/dist/{layout-TIBRMWHL.js → layout-6VY3DHYD.js} +6 -6
  160. package/dist/{layout-5SZ5A64I.js → layout-7C2QZCEZ.js} +10 -10
  161. package/dist/{layout-2WESJYRE.js → layout-7E7BNOGO.js} +3 -2
  162. package/dist/layout-BSK374N6.js +11 -0
  163. package/dist/{layout-RH3N46HP.js → layout-FJDBY3WG.js} +6 -5
  164. package/dist/{layout-YBMT74MG.js → layout-G3RVKEC4.js} +10 -10
  165. package/dist/{layout-KV27UW25.js → layout-GC5XX2RH.js} +2 -2
  166. package/dist/{layout-JTIRCKAW.js → layout-R6ULGQJK.js} +6 -6
  167. package/dist/{layout-HFBK5UEG.js → layout-ROI5KVSO.js} +3 -3
  168. package/dist/{layout-3TSVAGWH.js → layout-SPPS225I.js} +3 -3
  169. package/dist/{layout-HF3PMI4H.js → layout-VTGOYGRC.js} +2 -2
  170. package/dist/{layout-EWXHEXNS.js → layout-WBH5IHYK.js} +10 -10
  171. package/dist/layout-WTHBGTH2.js +15 -0
  172. package/dist/layout-ZCCABSV7.js +15 -0
  173. package/dist/{layout-search-AWPJWBKT.js → layout-search-DSIDKKQO.js} +8 -8
  174. package/dist/{legend-constants-55MFBXYF.js → legend-constants-KF3MKWL2.js} +2 -2
  175. package/dist/{parser-NUU3DVW4.js → parser-3PMYAVFL.js} +2 -2
  176. package/dist/{parser-KJPPUN4D.js → parser-5KVFS4RN.js} +2 -2
  177. package/dist/{parser-6TDWUKM5.js → parser-BA43YPIQ.js} +3 -3
  178. package/dist/{parser-EFF22GYO.js → parser-CFAYEWLF.js} +3 -3
  179. package/dist/{parser-A3AN76RQ.js → parser-DRFEX6OX.js} +3 -3
  180. package/dist/{parser-H5OODY5N.js → parser-DWVBRBB2.js} +3 -3
  181. package/dist/{parser-BJ7RJNUM.js → parser-E4B7HJT2.js} +3 -3
  182. package/dist/{parser-5UZV32ZI.js → parser-FWQY3HJX.js} +2 -2
  183. package/dist/{parser-RTWPFKXG.js → parser-GMCXCJSP.js} +3 -3
  184. package/dist/{parser-NL73FSFI.js → parser-IHFHPFL7.js} +3 -3
  185. package/dist/{parser-BTSTKY5G.js → parser-IU6425JW.js} +6 -6
  186. package/dist/{parser-ZRIZFDZY.js → parser-IZYIXDJX.js} +6 -6
  187. package/dist/{parser-4TBSWULQ.js → parser-JQGUTDSX.js} +3 -3
  188. package/dist/{parser-TUAEX6ML.js → parser-JRKPOO2Z.js} +3 -3
  189. package/dist/{parser-KMKVFET2.js → parser-KI2XYB2R.js} +2 -2
  190. package/dist/parser-LDVVBP7S.js +12 -0
  191. package/dist/{parser-YG625J5H.js → parser-MAGFK6OK.js} +4 -4
  192. package/dist/{parser-AR2GON37.js → parser-MH5BDN7X.js} +4 -4
  193. package/dist/{parser-EAQPZX2B.js → parser-MUHFEM4G.js} +3 -3
  194. package/dist/{parser-RCIEKN7Y.js → parser-P375HO7Q.js} +2 -2
  195. package/dist/{parser-GMQJISZ6.js → parser-PYY5BRLQ.js} +2 -2
  196. package/dist/parser-QEMFMVF5.js +12 -0
  197. package/dist/{parser-GDLKUBTO.js → parser-QIPDBT5M.js} +2 -2
  198. package/dist/{parser-BT4NI6JY.js → parser-RNBDDEGL.js} +3 -3
  199. package/dist/{parser-MA7L3XND.js → parser-RSWZGQA7.js} +6 -6
  200. package/dist/{parser-K2DI26SC.js → parser-SGX2PVR5.js} +2 -2
  201. package/dist/{parser-KKF6Y5MM.js → parser-SJUEFKNM.js} +4 -3
  202. package/dist/{parser-3QIFY5IN.js → parser-UMNBPXG2.js} +2 -2
  203. package/dist/{parser-F7NDRPMA.js → parser-WE4VSBBY.js} +3 -3
  204. package/dist/{parser-4Y6PODW6.js → parser-WKEYS7N3.js} +3 -3
  205. package/dist/{parser-KLCSFQ3J.js → parser-WPXUUNA2.js} +3 -3
  206. package/dist/{parser-LTRQASGB.js → parser-XP3RCOTN.js} +3 -3
  207. package/dist/{parser-2IKPQVKX.js → parser-YV4RBHG7.js} +3 -3
  208. package/dist/{parser-3LT3ZUUC.js → parser-YZ3J542U.js} +2 -2
  209. package/dist/{redraw-AHW7EUUF.js → redraw-BZ4GI6IC.js} +6 -4
  210. package/dist/{redraw-STZ4WJAI.js → redraw-LEOXS7C6.js} +3 -3
  211. package/dist/{renderer-IGSHD3OT.js → renderer-2V5NVI3V.js} +16 -16
  212. package/dist/renderer-4PKYVOYL.js +39 -0
  213. package/dist/{renderer-IVHD7ENY.js → renderer-66SCERH7.js} +14 -12
  214. package/dist/renderer-6IAXRZLK.js +85 -0
  215. package/dist/{renderer-XCLARXCK.js → renderer-6O5SV5YE.js} +10 -10
  216. package/dist/{renderer-IXBOT6DU.js → renderer-7OXMSF4R.js} +4 -4
  217. package/dist/{renderer-AM7P4LN7.js → renderer-A36NL2SS.js} +8 -8
  218. package/dist/{renderer-ACQQ2JXA.js → renderer-ASPBBACI.js} +13 -11
  219. package/dist/{renderer-W4MUMXJE.js → renderer-BXVTYE27.js} +7 -6
  220. package/dist/renderer-CC6O6GQK.js +18 -0
  221. package/dist/{renderer-Y47EM337.js → renderer-CNDB4JTZ.js} +17 -17
  222. package/dist/renderer-COV2DXTM.js +41 -0
  223. package/dist/renderer-DXCATVLO.js +30 -0
  224. package/dist/{renderer-JYHA6R2D.js → renderer-E5E3OJ42.js} +12 -11
  225. package/dist/{renderer-DAZWHNLI.js → renderer-E7LC7HCU.js} +5 -5
  226. package/dist/{renderer-RUSQJFFC.js → renderer-F3JYZERE.js} +4 -4
  227. package/dist/{renderer-7OGGV327.js → renderer-FAFSRFGR.js} +9 -9
  228. package/dist/renderer-HIB6LZWZ.js +26 -0
  229. package/dist/renderer-HLDRRFZB.js +28 -0
  230. package/dist/renderer-INQMQPNN.js +22 -0
  231. package/dist/renderer-ITJ67HXO.js +27 -0
  232. package/dist/{renderer-UTEEJDGB.js → renderer-JLOKFKOZ.js} +14 -13
  233. package/dist/{renderer-2LYX6NHN.js → renderer-KOPJ76GS.js} +10 -10
  234. package/dist/{renderer-MWZC7TMD.js → renderer-M2467III.js} +14 -13
  235. package/dist/{renderer-HX6ICPDX.js → renderer-MYKL6VG6.js} +6 -6
  236. package/dist/{renderer-BXD5KVSR.js → renderer-S6L3JR6C.js} +11 -11
  237. package/dist/{renderer-NOYLNVTI.js → renderer-SYWVZ4CY.js} +3 -3
  238. package/dist/renderer-TCTZZ5Y6.js +32 -0
  239. package/dist/{renderer-QTPWRRJ7.js → renderer-UIHCYXBY.js} +12 -12
  240. package/dist/{renderer-36446HSH.js → renderer-WIBVOPRC.js} +6 -4
  241. package/dist/{renderer-2QPHDBZY.js → renderer-XMJ6XZGL.js} +12 -11
  242. package/dist/{renderer-TINHO2IO.js → renderer-ZTHXOBXW.js} +8 -8
  243. package/dist/{renderer-radial-WFUX3Z3C.js → renderer-radial-FC25BDCZ.js} +8 -8
  244. package/dist/{state-parser-PMNHLHLE.js → state-parser-2PQRH5JE.js} +6 -6
  245. package/dist/state-renderer-YP6HWLJR.js +43 -0
  246. package/dist/{themes-DzIH3Hjv.d.ts → themes-DoLdhUXV.d.ts} +1 -1
  247. package/docs/ai-integration.md +4 -4
  248. package/docs/language-reference.md +154 -104
  249. package/gallery/fixtures/swot-relabel.dgmo +19 -0
  250. package/gallery/fixtures/swot-tags.dgmo +16 -0
  251. package/gallery/fixtures/swot.dgmo +13 -0
  252. package/gallery/fixtures/whiteboard.dgmo +1 -0
  253. package/package.json +1 -1
  254. package/dist/chunk-6BQSDF77.js +0 -734
  255. package/dist/chunk-NWSPPGIE.js +0 -60
  256. package/dist/chunk-R2K5L4UA.js +0 -49
  257. package/dist/chunk-VBMRZCMQ.js +0 -1465
  258. package/dist/chunk-WZBZXZ6T.js +0 -636
  259. package/dist/collapse-TCVK3RPO.js +0 -8
  260. package/dist/dgmo-router-6YLKM6WU.js +0 -101
  261. package/dist/dimensions-DS6FWLRY.js +0 -21
  262. package/dist/layout-D4L44NRG.js +0 -11
  263. package/dist/layout-MXHR3P35.js +0 -15
  264. package/dist/layout-ND26WVX2.js +0 -15
  265. package/dist/layout-VDCJOZSH.js +0 -11
  266. package/dist/parser-PEZ7RN43.js +0 -14
  267. package/dist/parser-YHDGKPZI.js +0 -14
  268. package/dist/renderer-4VGO27EE.js +0 -41
  269. package/dist/renderer-6BDK47V6.js +0 -30
  270. package/dist/renderer-ISQJ2ELA.js +0 -25
  271. package/dist/renderer-KJ3V5BYP.js +0 -26
  272. package/dist/renderer-O6RP52CQ.js +0 -22
  273. package/dist/renderer-P3WR7TKD.js +0 -39
  274. package/dist/renderer-UGW4N2W5.js +0 -28
  275. package/dist/renderer-WPN2SXGT.js +0 -29
  276. package/dist/renderer-XDX6S7OV.js +0 -30
  277. package/dist/renderer-ZV6KCLCL.js +0 -85
  278. package/dist/state-renderer-JQ5DS66J.js +0 -42
  279. package/gallery/fixtures/sketch.dgmo +0 -22
@@ -8,7 +8,7 @@ import {
8
8
  tagAttrKey,
9
9
  validateTagGroupNames,
10
10
  validateTagValues
11
- } from "./chunk-4SACN2C5.js";
11
+ } from "./chunk-KW3CC7SB.js";
12
12
  import {
13
13
  TREEMAP_REGISTRY,
14
14
  extractColor,
@@ -21,7 +21,7 @@ import {
21
21
  stripQuotes,
22
22
  warnUnknownMetaKeys,
23
23
  withTagAliases
24
- } from "./chunk-TIIZIAGS.js";
24
+ } from "./chunk-RFGQDIOI.js";
25
25
  import {
26
26
  emit,
27
27
  formatDgmoError,
@@ -1,28 +1,32 @@
1
1
  import {
2
2
  parseKanban
3
- } from "./chunk-LKZCUFOW.js";
3
+ } from "./chunk-B7ZH5EQ2.js";
4
4
  import {
5
5
  serializeSvg
6
- } from "./chunk-CYRB2JTN.js";
6
+ } from "./chunk-YLKPRT6U.js";
7
7
  import {
8
8
  ScaleContext
9
9
  } from "./chunk-24YPR5EH.js";
10
+ import {
11
+ renderCollapseBar
12
+ } from "./chunk-LRTSTDJ6.js";
10
13
  import {
11
14
  TITLE_FONT_SIZE,
12
15
  TITLE_FONT_WEIGHT
13
- } from "./chunk-VLC6WNRD.js";
16
+ } from "./chunk-GULGSH2Z.js";
14
17
  import {
15
18
  CARD_RADIUS
16
- } from "./chunk-XCKNFFKM.js";
19
+ } from "./chunk-WH6E6SHC.js";
17
20
  import {
18
21
  keepSwimlaneToggleFocus,
19
22
  renderIntegratedLegend,
20
23
  wireSwimlaneToggle
21
- } from "./chunk-NMS5XSLX.js";
24
+ } from "./chunk-DFEVFLEG.js";
22
25
  import {
23
26
  getMaxLegendReservedHeight
24
- } from "./chunk-JILEYZ2V.js";
27
+ } from "./chunk-VVL2KKG4.js";
25
28
  import {
29
+ parseInlineMarkdown,
26
30
  renderInlineText
27
31
  } from "./chunk-QKPOIJBT.js";
28
32
  import {
@@ -30,18 +34,19 @@ import {
30
34
  } from "./chunk-ICLB27PZ.js";
31
35
  import {
32
36
  tagAttrKey
33
- } from "./chunk-4SACN2C5.js";
37
+ } from "./chunk-KW3CC7SB.js";
34
38
  import {
35
39
  fillModeFromOptions,
36
40
  legendSuppressed
37
- } from "./chunk-TIIZIAGS.js";
41
+ } from "./chunk-RFGQDIOI.js";
38
42
  import {
39
43
  LEGEND_HEIGHT,
40
44
  measureLegendText
41
- } from "./chunk-UOCWYLYT.js";
45
+ } from "./chunk-OZXKW5NA.js";
42
46
  import {
43
- measureText
44
- } from "./chunk-KAO7JL4I.js";
47
+ measureText,
48
+ truncateText
49
+ } from "./chunk-PU5X3P3T.js";
45
50
  import {
46
51
  contrastText,
47
52
  mix,
@@ -154,6 +159,7 @@ var COLUMN_GAP = 16;
154
159
  var COLUMN_HEADER_HEIGHT = 36;
155
160
  var COLUMN_PADDING = 12;
156
161
  var COLUMN_MIN_WIDTH = 200;
162
+ var CARD_TITLE_MAX_WIDTH = COLUMN_MIN_WIDTH * 2;
157
163
  var CARD_HEADER_HEIGHT = 24;
158
164
  var CARD_META_LINE_HEIGHT = 14;
159
165
  var CARD_SEPARATOR_GAP = 4;
@@ -253,7 +259,27 @@ function collapsedChips(cards, group) {
253
259
  function collapsedLaneLabel(laneName, total) {
254
260
  return `${laneName} (${total})`;
255
261
  }
256
- function computeLayout(parsed, _palette, collapsedColumns, hiddenMetaGroups, sDiagramPadding = DIAGRAM_PADDING, sTitleHeight = TITLE_HEIGHT, sCardTitleFontSize = CARD_TITLE_FONT_SIZE, sColumnHeaderFontSize = COLUMN_HEADER_FONT_SIZE, sColumnHeaderHeight = COLUMN_HEADER_HEIGHT, sColumnPadding = COLUMN_PADDING, sCardPaddingX = CARD_PADDING_X, sCardPaddingY = CARD_PADDING_Y, sCardSeparatorGap = CARD_SEPARATOR_GAP, sCardMetaLineHeight = CARD_META_LINE_HEIGHT, sCardHeaderHeight = CARD_HEADER_HEIGHT, sCardMetaFontSize = CARD_META_FONT_SIZE, sCardGap = CARD_GAP, sColumnMinWidth = COLUMN_MIN_WIDTH, sColumnGap = COLUMN_GAP, sCollapsedColumnWidth = COLLAPSED_COLUMN_WIDTH, activeTagGroup = null, sCollapsedChipHeight = COLLAPSED_CHIP_HEIGHT, sCollapsedChipGap = COLLAPSED_CHIP_GAP, sCollapsedNameGap = COLLAPSED_NAME_GAP) {
262
+ var RTL_START = /^[\P{L}]*[\u0590-\u08ff\ufb1d-\ufdff\ufe70-\ufeff]/u;
263
+ function renderCardTitle(titleEl, title, palette, fontSize, maxWidth) {
264
+ if (measureText(title, fontSize) > maxWidth) {
265
+ const plain = parseInlineMarkdown(title).map((span) => span.text).join("");
266
+ const shown = truncateText(plain, fontSize, maxWidth);
267
+ if (shown !== plain) {
268
+ if (RTL_START.test(plain)) {
269
+ const x = Number(titleEl.attr("x"));
270
+ const ellipsisEl = titleEl.clone(false).text("\u2026");
271
+ ellipsisEl.attr("x", x);
272
+ titleEl.attr("x", x + measureText("\u2026", fontSize)).text(shown.slice(0, -1));
273
+ } else {
274
+ titleEl.text(shown);
275
+ }
276
+ titleEl.append("title").text(plain);
277
+ return;
278
+ }
279
+ }
280
+ renderInlineText(titleEl, title, palette, fontSize);
281
+ }
282
+ function computeLayout(parsed, _palette, collapsedColumns, hiddenMetaGroups, sDiagramPadding = DIAGRAM_PADDING, sTitleHeight = TITLE_HEIGHT, sCardTitleFontSize = CARD_TITLE_FONT_SIZE, sColumnHeaderFontSize = COLUMN_HEADER_FONT_SIZE, sColumnHeaderHeight = COLUMN_HEADER_HEIGHT, sColumnPadding = COLUMN_PADDING, sCardPaddingX = CARD_PADDING_X, sCardPaddingY = CARD_PADDING_Y, sCardSeparatorGap = CARD_SEPARATOR_GAP, sCardMetaLineHeight = CARD_META_LINE_HEIGHT, sCardHeaderHeight = CARD_HEADER_HEIGHT, sCardMetaFontSize = CARD_META_FONT_SIZE, sCardGap = CARD_GAP, sColumnMinWidth = COLUMN_MIN_WIDTH, sColumnGap = COLUMN_GAP, sCollapsedColumnWidth = COLLAPSED_COLUMN_WIDTH, activeTagGroup = null, sCollapsedChipHeight = COLLAPSED_CHIP_HEIGHT, sCollapsedChipGap = COLLAPSED_CHIP_GAP, sCollapsedNameGap = COLLAPSED_NAME_GAP, sCardTitleMaxWidth = CARD_TITLE_MAX_WIDTH) {
257
283
  const showTitle = !!parsed.title && parsed.options["no-title"] !== "on";
258
284
  const headerHeight = showTitle ? sTitleHeight + 8 : 0;
259
285
  const startY = sDiagramPadding + headerHeight;
@@ -279,7 +305,10 @@ function computeLayout(parsed, _palette, collapsedColumns, hiddenMetaGroups, sDi
279
305
  const cardLayouts = [];
280
306
  let cardY = sColumnHeaderHeight + sColumnPadding;
281
307
  for (const card of col.cards) {
282
- const titleWidth = measureText(card.title, sCardTitleFontSize);
308
+ const titleWidth = Math.min(
309
+ measureText(card.title, sCardTitleFontSize),
310
+ sCardTitleMaxWidth
311
+ );
283
312
  maxCardTextWidth = Math.max(
284
313
  maxCardTextWidth,
285
314
  titleWidth + sCardPaddingX * 2
@@ -443,7 +472,10 @@ function drawKanban(container, parsed, palette, isDark, options) {
443
472
  activeTagGroup,
444
473
  sCollapsedChipHeight,
445
474
  sCollapsedChipGap,
446
- sCollapsedNameGap
475
+ sCollapsedNameGap,
476
+ // Reserved at the size the title is DRAWN at, which a shrunken screen layout
477
+ // does not shrink as far as its boxes, so the cap holds the same characters.
478
+ CARD_TITLE_MAX_WIDTH * (sCardTitleFontSize / CARD_TITLE_FONT_SIZE)
447
479
  );
448
480
  const width = exportDims?.width ?? layout.totalWidth;
449
481
  const height = exportDims?.height ?? layout.totalHeight;
@@ -561,6 +593,7 @@ function drawKanban(container, parsed, palette, isDark, options) {
561
593
  const col = colLayout.column;
562
594
  const isColCollapsed = collapsedColumns?.has(col.id) ?? false;
563
595
  const g = svg.append("g").attr("class", "kanban-column").attr("data-column-id", col.id).attr("data-line-number", col.lineNumber);
596
+ g.attr("data-group-toggle", col.id).attr("role", "button").attr("aria-expanded", String(!isColCollapsed)).attr("aria-label", col.name);
564
597
  const thisColBg = defaultColBg;
565
598
  const colColor = resolveColumnTagColor(col, parsed.tagGroups, activeTagGroup ?? null) ?? col.color;
566
599
  const thisColHeaderBg = colColor ? shapeFill(palette, colColor, isDark, { mode: fillMode }) : defaultColHeaderBg;
@@ -577,6 +610,17 @@ function drawKanban(container, parsed, palette, isDark, options) {
577
610
  g.append("rect").attr("x", colLayout.x).attr("y", colLayout.y).attr("width", sCollapsedColumnWidth).attr("height", sColumnHeaderHeight).attr("rx", sColumnHeaderRadius).attr("fill", thisColHeaderBg);
578
611
  g.append("text").attr("x", colLayout.x + sCollapsedColumnWidth / 2).attr("y", colLayout.y + sColumnHeaderHeight / 2).attr("dominant-baseline", "central").attr("font-size", sWipFontSize).attr("font-weight", "bold").attr("fill", col.color ? onHeaderText : palette.textMuted).attr("text-anchor", "middle").text(String(col.cards.length));
579
612
  g.append("text").attr("x", colLayout.x + sCollapsedColumnWidth / 2).attr("y", colLayout.y + sColumnHeaderHeight + sColumnPadding).attr("font-size", sCardTitleFontSize).attr("font-weight", "bold").attr("fill", palette.text).attr("text-anchor", "middle").attr("writing-mode", "tb").text(col.name);
613
+ renderCollapseBar(g, {
614
+ x: colLayout.x,
615
+ y: colLayout.y,
616
+ width: sCollapsedColumnWidth,
617
+ height: colLayout.height,
618
+ rx: sColumnRadius,
619
+ fill: colColor ?? wellStroke,
620
+ clipId: `kanban-col-clip-${col.id.replace(/[^A-Za-z0-9_-]/g, "_")}`,
621
+ prefix: "kanban",
622
+ scale: ctx
623
+ });
580
624
  const chips = collapsedChips(col.cards, activeGroup);
581
625
  if (chips.length > 0) {
582
626
  const chipX = colLayout.x + sCollapsedChipInset;
@@ -640,6 +684,18 @@ function drawKanban(container, parsed, palette, isDark, options) {
640
684
  wipExceeded ? palette.colors.red : col.color ? onHeaderText : palette.textMuted
641
685
  ).attr("font-weight", wipExceeded ? "bold" : "normal").text(badgeText);
642
686
  }
687
+ renderCollapseBar(g, {
688
+ expanded: true,
689
+ x: colLayout.x,
690
+ y: colLayout.y,
691
+ width: colLayout.width,
692
+ height: colLayout.height,
693
+ rx: sColumnRadius,
694
+ fill: colColor ?? wellStroke,
695
+ clipId: `kanban-col-clip-${col.id.replace(/[^A-Za-z0-9_-]/g, "_")}`,
696
+ prefix: "kanban",
697
+ scale: ctx
698
+ });
643
699
  for (const cardLayout of colLayout.cardLayouts) {
644
700
  const card = cardLayout.card;
645
701
  const resolvedColor = resolveCardTagColor(
@@ -681,7 +737,13 @@ function drawKanban(container, parsed, palette, isDark, options) {
681
737
  const cy = colLayout.y + cardLayout.y;
682
738
  cg.append("rect").attr("x", cx).attr("y", cy).attr("width", cardLayout.width).attr("height", cardLayout.height).attr("rx", sCardRadius).attr("fill", cardFill).attr("stroke", cardStroke).attr("stroke-width", sCardStrokeWidth);
683
739
  const titleEl = cg.append("text").attr("x", cx + sCardPaddingX).attr("y", cy + sCardPaddingY + sCardTitleFontSize).attr("font-size", sCardTitleFontSize).attr("font-weight", "normal").attr("fill", onCardText);
684
- renderInlineText(titleEl, card.title, palette, sCardTitleFontSize);
740
+ renderCardTitle(
741
+ titleEl,
742
+ card.title,
743
+ palette,
744
+ sCardTitleFontSize,
745
+ cardLayout.width - sCardPaddingX * 2
746
+ );
685
747
  if (hasMeta) {
686
748
  const separatorY = cy + sCardHeaderHeight;
687
749
  cg.append("line").attr("x1", cx).attr("y1", separatorY).attr("x2", cx + cardLayout.width).attr("y2", separatorY).attr("stroke", fillMode === "solid" ? onCardText : cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
@@ -1147,7 +1209,13 @@ function renderSwimlaneCard(parent, cardLayout, tagGroups, activeTagGroup, palet
1147
1209
  const cy = cardLayout.y;
1148
1210
  cg.append("rect").attr("x", cx).attr("y", cy).attr("width", cardLayout.width).attr("height", cardLayout.height).attr("rx", sCardRadius).attr("fill", cardFill).attr("stroke", cardStroke).attr("stroke-width", sCardStrokeWidth);
1149
1211
  const titleEl = cg.append("text").attr("x", cx + sCardPaddingX).attr("y", cy + sCardPaddingY + sCardTitleFontSize).attr("font-size", sCardTitleFontSize).attr("font-weight", "normal").attr("fill", onCardText);
1150
- renderInlineText(titleEl, card.title, palette, sCardTitleFontSize);
1212
+ renderCardTitle(
1213
+ titleEl,
1214
+ card.title,
1215
+ palette,
1216
+ sCardTitleFontSize,
1217
+ cardLayout.width - sCardPaddingX * 2
1218
+ );
1151
1219
  if (hasMeta) {
1152
1220
  const separatorY = cy + sCardHeaderHeight;
1153
1221
  cg.append("line").attr("x1", cx).attr("y1", separatorY).attr("x2", cx + cardLayout.width).attr("y2", separatorY).attr("stroke", cardStroke).attr("stroke-opacity", 0.3).attr("stroke-width", 1);
@@ -1,33 +1,43 @@
1
+ import {
2
+ applyCollapseProjection,
3
+ collapsedGroupId,
4
+ collapsedSequenceNoteLinesFromSource,
5
+ isCollapsibleGroup,
6
+ isFoldableSequenceNote
7
+ } from "./chunk-R4U7IIRX.js";
1
8
  import {
2
9
  ScaleContext
3
10
  } from "./chunk-24YPR5EH.js";
11
+ import {
12
+ collapseBarHeight,
13
+ renderCollapseBar
14
+ } from "./chunk-LRTSTDJ6.js";
4
15
  import {
5
16
  layoutInlineHeader
6
- } from "./chunk-UIEKW4SG.js";
17
+ } from "./chunk-REKLKGR6.js";
7
18
  import {
8
19
  TITLE_FONT_SIZE,
9
20
  TITLE_FONT_WEIGHT,
10
21
  TITLE_Y
11
- } from "./chunk-VLC6WNRD.js";
22
+ } from "./chunk-GULGSH2Z.js";
12
23
  import {
13
24
  ARROWHEAD_HEIGHT,
14
25
  ARROWHEAD_WIDTH,
15
- COLLAPSE_BAR_HEIGHT,
16
26
  EDGE_DASH,
17
27
  HAIRLINE_DASH
18
- } from "./chunk-XCKNFFKM.js";
28
+ } from "./chunk-WH6E6SHC.js";
19
29
  import {
20
30
  renderIntegratedLegend
21
- } from "./chunk-NMS5XSLX.js";
31
+ } from "./chunk-DFEVFLEG.js";
22
32
  import {
23
33
  getLegendExtent,
24
34
  getMaxLegendReservedHeight
25
- } from "./chunk-JILEYZ2V.js";
35
+ } from "./chunk-VVL2KKG4.js";
26
36
  import {
27
37
  isSequenceBlock,
28
38
  isSequenceNote,
29
39
  isSequenceSection
30
- } from "./chunk-VSAKEMDD.js";
40
+ } from "./chunk-ROH4LYBL.js";
31
41
  import {
32
42
  wrapDescriptionLines
33
43
  } from "./chunk-7WEYXYLC.js";
@@ -40,19 +50,19 @@ import {
40
50
  import {
41
51
  resolveActiveTagGroup,
42
52
  tagAttrKey
43
- } from "./chunk-4SACN2C5.js";
53
+ } from "./chunk-KW3CC7SB.js";
44
54
  import {
45
55
  fillModeFromOptions,
46
56
  legendInlineRequested,
47
57
  legendSuppressed
48
- } from "./chunk-TIIZIAGS.js";
58
+ } from "./chunk-RFGQDIOI.js";
49
59
  import {
50
60
  legendChromeColors
51
- } from "./chunk-UOCWYLYT.js";
61
+ } from "./chunk-OZXKW5NA.js";
52
62
  import {
53
63
  measureText,
54
64
  truncateText
55
- } from "./chunk-KAO7JL4I.js";
65
+ } from "./chunk-PU5X3P3T.js";
56
66
  import {
57
67
  contrastText,
58
68
  mix,
@@ -63,135 +73,6 @@ import {
63
73
  // src/sequence/renderer.ts
64
74
  import * as d3Selection from "d3-selection";
65
75
 
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;
99
- };
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 };
150
- });
151
- return {
152
- participants,
153
- messages,
154
- elements,
155
- groups,
156
- collapsedGroupIds: memberToGroup
157
- };
158
- }
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
- }
191
- }
192
- return result;
193
- }
194
-
195
76
  // src/sequence/tag-resolution.ts
196
77
  function propagateGroupTags(participantMeta, groups) {
197
78
  for (const group of [...groups].sort((a, b) => b.depth - a.depth)) {
@@ -762,6 +643,9 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
762
643
  const elements = collapsed ? collapsed.elements : parsed.elements;
763
644
  const groups = collapsed ? collapsed.groups : parsed.groups;
764
645
  const collapsedSections = options?.collapsedSections;
646
+ const collapsedNoteLines = options?.collapsedNotes ?? collapsedSequenceNoteLinesFromSource(parsed);
647
+ const isNoteFolded = (note) => isFoldableSequenceNote(note) && collapsedNoteLines.has(note.lineNumber);
648
+ const shownNoteText = (note) => isNoteFolded(note) ? note.text.split("\n")[0] : note.text;
765
649
  const autonumber = parsedOptions["autonumber"]?.toLowerCase() === "on";
766
650
  const sourceMessageNumberByLine = new Map(
767
651
  parsed.messages.map((message, index) => [message.lineNumber, index + 1])
@@ -907,6 +791,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
907
791
  const clampStep = (i) => Math.min(Math.max(i, 0), lastStepIdx);
908
792
  const activations = activationsOff ? [] : computeActivations(allRenderSteps).map((a) => {
909
793
  const closingStep = allRenderSteps[a.endStep];
794
+ const openingStep = allRenderSteps[a.startStep];
910
795
  return {
911
796
  ...a,
912
797
  startStep: clampStep(allToFiltered[a.startStep] ?? 0),
@@ -914,7 +799,14 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
914
799
  // True when the return that closes this bar was dropped from the
915
800
  // layout, so `endStep` is not the bar's own event but whatever
916
801
  // happens next. The bar has to stop short of it — see the render.
917
- implicitEnd: closingStep !== void 0 && !stepSurvives(closingStep)
802
+ implicitEnd: closingStep !== void 0 && !stepSurvives(closingStep),
803
+ // True when nothing laid out follows the dropped return, so
804
+ // `endStep` clamps back onto the last step and the bar ends where
805
+ // a next step WOULD sit instead (#1436); a last unreturned call's
806
+ // bar used to draw 0 tall. Only for a bar whose own call is laid
807
+ // out: one opened inside a collapsed section clamps onto a step
808
+ // that is not its own, and stays the 0-tall bar it always was.
809
+ endsAfterLast: openingStep !== void 0 && stepSurvives(openingStep) && (allToFiltered[a.endStep] ?? 0) >= renderSteps.length
918
810
  };
919
811
  });
920
812
  const stepSpacing = 35;
@@ -1042,7 +934,10 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1042
934
  const note = els[j];
1043
935
  const sc = isNoteAfterSelfCall(note);
1044
936
  const maxW = noteEffectiveMaxW(note.participantId, note.position, sc);
1045
- const noteH = computeNoteHeight(note.text, noteTextWidth(maxW));
937
+ const noteH = computeNoteHeight(
938
+ shownNoteText(note),
939
+ noteTextWidth(maxW)
940
+ );
1046
941
  totalExtent += noteH + NOTE_OFFSET_BELOW;
1047
942
  j++;
1048
943
  }
@@ -1247,7 +1142,8 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1247
1142
  }
1248
1143
  });
1249
1144
  for (const act of activations) {
1250
- if (!act.implicitEnd || act.endStep <= act.startStep) continue;
1145
+ if (!act.implicitEnd || act.endsAfterLast) continue;
1146
+ if (act.endStep <= act.startStep) continue;
1251
1147
  const step = renderSteps[act.endStep];
1252
1148
  if (!step || step.from === step.to) continue;
1253
1149
  if (step.from === act.participantId || step.to === act.participantId) {
@@ -1278,6 +1174,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1278
1174
  const stepYPositions = [];
1279
1175
  const sectionYPositions = /* @__PURE__ */ new Map();
1280
1176
  let layoutEndY;
1177
+ let stepsEndY;
1281
1178
  {
1282
1179
  let curY = lifelineStartY0 + messageStartOffset;
1283
1180
  for (let i = 0; i < renderSteps.length; i++) {
@@ -1300,6 +1197,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1300
1197
  const isSelfCall = step.type === "call" && step.from === step.to;
1301
1198
  curY += isSelfCall ? sSelfCallHeight + 25 : stepSpacing;
1302
1199
  }
1200
+ stepsEndY = curY;
1303
1201
  for (const sec of trailingSections) {
1304
1202
  const bandPad = collapsedBandPad(sec);
1305
1203
  curY += SECTION_TOP_PAD + bandPad;
@@ -1366,7 +1264,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1366
1264
  effectiveNotePosition(note),
1367
1265
  isNoteAfterSelfCall(note)
1368
1266
  );
1369
- const noteH = computeNoteHeight(note.text, noteTextWidth(maxW));
1267
+ const noteH = computeNoteHeight(shownNoteText(note), noteTextWidth(maxW));
1370
1268
  contentBottomY = Math.max(
1371
1269
  contentBottomY,
1372
1270
  noteTopY + noteH + NOTE_TRAILING_GAP
@@ -1528,7 +1426,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1528
1426
  const padTop = hasExpandedGroup ? (maxGroupDepth + 1 - group.depth) * GROUP_PADDING_TOP : 0;
1529
1427
  const padBottom = hasExpandedGroup ? groupBottomPad(group.depth, maxGroupDepth) : 0;
1530
1428
  const height = sBoxH + padTop + padBottom;
1531
- const barHeight = ctx.structural(COLLAPSE_BAR_HEIGHT);
1429
+ const barHeight = collapseBarHeight(ctx);
1532
1430
  collapsedGroupBoxes.set(collapsedGroupId(group, parsed.groups), {
1533
1431
  name: group.name,
1534
1432
  lineNumber: group.lineNumber,
@@ -1540,9 +1438,7 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1540
1438
  height,
1541
1439
  // Centred in the box ABOVE the bar, so the bar does not push the name
1542
1440
  // off-centre the way it would if the whole box were used.
1543
- nameY: -padTop + (height - barHeight) / 2,
1544
- barY: -padTop + height - barHeight,
1545
- barHeight
1441
+ nameY: -padTop + (height - barHeight) / 2
1546
1442
  });
1547
1443
  }
1548
1444
  const framedGroups = [...groups].sort((a, b) => a.depth - b.depth);
@@ -1803,8 +1699,9 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1803
1699
  if (px === void 0) return null;
1804
1700
  const x = px - sActivationWidth / 2 + act.depth * ACTIVATION_NEST_OFFSET;
1805
1701
  const y1 = stepY(act.startStep);
1806
- const rawY2 = stepY(act.endStep);
1807
- const implicitY2 = rawY2 - labelRoomBefore[act.endStep] - ACTIVATION_IMPLICIT_END_CLEARANCE;
1702
+ const rawY2 = act.endsAfterLast ? stepsEndY : stepY(act.endStep);
1703
+ const roomBefore = act.endsAfterLast ? 0 : labelRoomBefore[act.endStep];
1704
+ const implicitY2 = rawY2 - roomBefore - ACTIVATION_IMPLICIT_END_CLEARANCE;
1808
1705
  const y2 = act.implicitEnd && implicitY2 > y1 + sActivationWidth ? implicitY2 : rawY2;
1809
1706
  return { x, y: y1, width: sActivationWidth, height: y2 - y1 };
1810
1707
  });
@@ -1863,7 +1760,11 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1863
1760
  if (px === void 0) continue;
1864
1761
  const { topY, position, afterSelfCall, maxW, textWidth } = noteLayout;
1865
1762
  const isRight = position === "right";
1866
- const wrappedLines = wrapTextLines(note.text, textWidth, sNoteFontSize);
1763
+ const wrappedLines = wrapTextLines(
1764
+ shownNoteText(note),
1765
+ textWidth,
1766
+ sNoteFontSize
1767
+ );
1867
1768
  const noteH = wrappedLines.length * sNoteLineH + sNotePadV * 2;
1868
1769
  const maxLineW = Math.max(
1869
1770
  ...wrappedLines.map((l) => measureText(l.text, sNoteFontSize))
@@ -1875,6 +1776,8 @@ function layoutSequencePass(parsed, containerWidth, options, fit) {
1875
1776
  const rightOffset = afterSelfCall && isRight ? sActivationWidth / 2 + sSelfCallWidth + sNoteGap : sActivationWidth + sNoteGap;
1876
1777
  const noteX = isRight ? px + rightOffset : px - sActivationWidth - sNoteGap - noteW;
1877
1778
  noteBoxes.set(note, {
1779
+ foldable: isFoldableSequenceNote(note),
1780
+ folded: isNoteFolded(note),
1878
1781
  x: noteX,
1879
1782
  y: topY,
1880
1783
  width: noteW,
@@ -2082,9 +1985,24 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2082
1985
  if (collapsible) {
2083
1986
  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");
2084
1987
  }
2085
- 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");
1988
+ 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");
1989
+ if (!collapsible) frameRect.attr("pointer-events", "none");
2086
1990
  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");
2087
1991
  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);
1992
+ if (collapsible) {
1993
+ renderCollapseBar(groupG, {
1994
+ expanded: true,
1995
+ x: frame.x,
1996
+ y: frame.y,
1997
+ width: frame.width,
1998
+ height: frame.height,
1999
+ rx: 6,
2000
+ fill: strokeColor,
2001
+ clipId: `clip-group-frame-${group.lineNumber}`,
2002
+ prefix: "sequence",
2003
+ scale: ctx
2004
+ });
2005
+ }
2088
2006
  }
2089
2007
  participants.forEach((participant) => {
2090
2008
  const cx = participantX.get(participant.id);
@@ -2113,7 +2031,7 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2113
2031
  const meta = collapsedGroupBoxes.get(participant.id);
2114
2032
  const drillColor = effectiveTagColor ?? mix(palette.textMuted, themeBaseBg(palette, isDark), 55);
2115
2033
  const boxW = sBoxW;
2116
- const { padTop, height: fullH, nameY, barY, barHeight } = meta;
2034
+ const { padTop, height: fullH, nameY } = meta;
2117
2035
  const clipId = `clip-drill-group-${participant.id.replace(/[^a-zA-Z0-9-]/g, "-")}`;
2118
2036
  const participantG = svg.select(
2119
2037
  `.participant[data-participant-id="${participant.id}"]`
@@ -2123,8 +2041,17 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2123
2041
  const pStroke = effectiveTagColor ?? palette.border;
2124
2042
  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);
2125
2043
  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));
2126
- participantG.append("clipPath").attr("id", clipId).append("rect").attr("x", -boxW / 2).attr("y", -padTop).attr("width", boxW).attr("height", fullH).attr("rx", 6);
2127
- 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})`);
2044
+ renderCollapseBar(participantG, {
2045
+ x: -boxW / 2,
2046
+ y: -padTop,
2047
+ width: boxW,
2048
+ height: fullH,
2049
+ rx: 6,
2050
+ fill: drillColor,
2051
+ clipId,
2052
+ prefix: "sequence",
2053
+ scale: ctx
2054
+ });
2128
2055
  }
2129
2056
  const llColor = effectiveTagColor ?? palette.textMuted;
2130
2057
  for (const [segTop, segBottom] of lifelines.get(participant.id) ?? []) {
@@ -2189,6 +2116,18 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2189
2116
  const bandFill = isCollapsed ? legendChromeColors(palette, isDark).groupBg : lineColor;
2190
2117
  const bandOpacity = isCollapsed ? 1 : isDark ? 0.1 : 0.08;
2191
2118
  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");
2119
+ renderCollapseBar(sectionG, {
2120
+ expanded: !isCollapsed,
2121
+ x: band.x,
2122
+ y: secY - BAND_HEIGHT / 2,
2123
+ width: band.width,
2124
+ height: BAND_HEIGHT,
2125
+ rx: 2,
2126
+ fill: lineColor,
2127
+ clipId: `seq-section-clip-${sec.lineNumber}`,
2128
+ prefix: "sequence-section",
2129
+ scale: ctx
2130
+ });
2192
2131
  const { labelText, labelWidth, labelX, labelBaseline } = band;
2193
2132
  const labelHitW = Math.max(80, labelWidth + 24);
2194
2133
  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");
@@ -2306,7 +2245,10 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2306
2245
  const box = noteBoxes.get(el);
2307
2246
  if (box === void 0) continue;
2308
2247
  const { x: noteX, y: noteTopY, width: noteW, height: noteH } = box;
2309
- 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));
2248
+ 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));
2249
+ if (box.foldable) {
2250
+ 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");
2251
+ }
2310
2252
  noteG.append("path").attr(
2311
2253
  "d",
2312
2254
  [
@@ -2333,6 +2275,20 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
2333
2275
  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");
2334
2276
  renderInlineText(textEl, line.text, palette, sNoteFontSize);
2335
2277
  }
2278
+ if (box.foldable) {
2279
+ renderCollapseBar(noteG, {
2280
+ expanded: !box.folded,
2281
+ x: noteX,
2282
+ y: noteTopY,
2283
+ width: noteW,
2284
+ height: noteH,
2285
+ rx: 0,
2286
+ fill: palette.textMuted,
2287
+ clipId: `clip-note-${String(el.lineNumber)}`,
2288
+ prefix: "sequence-note",
2289
+ scale: ctx
2290
+ });
2291
+ }
2336
2292
  } else if (isSequenceBlock(el)) {
2337
2293
  renderNoteElements(el.children);
2338
2294
  if (el.elseIfBranches) {
@@ -2456,7 +2412,6 @@ function renderParticipant(svg, participant, cx, cy, palette, isDark, color, tag
2456
2412
  }
2457
2413
 
2458
2414
  export {
2459
- applyCollapseProjection,
2460
2415
  groupMessagesBySection,
2461
2416
  summarizeSectionParticipation,
2462
2417
  buildRenderSequence,