@diagrammo/dgmo 0.54.0 → 0.56.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 (277) hide show
  1. package/dist/advanced.d.ts +138 -11
  2. package/dist/advanced.js +140 -115
  3. package/dist/{analyzer-TDN5KJFP.js → analyzer-HQUXKZ5J.js} +3 -3
  4. package/dist/auto.js +129 -126
  5. package/dist/auto.mjs +2731 -882
  6. package/dist/block.js +58 -56
  7. package/dist/{calculator-VBIT6GQF.js → calculator-BBKAAQGD.js} +3 -3
  8. package/dist/chart-meta.js +49 -49
  9. package/dist/charts-d3-D67V6KHE.js +29 -0
  10. package/dist/{chunk-5VXU6MND.js → chunk-23THM67F.js} +2 -2
  11. package/dist/{chunk-N7BSBAVP.js → chunk-2JMNOEAU.js} +117 -98
  12. package/dist/{chunk-6OYDOQ2Q.js → chunk-2UZVMWSQ.js} +4 -4
  13. package/dist/{chunk-3FRO35WW.js → chunk-3KOPPSUQ.js} +19 -5
  14. package/dist/{chunk-IYNKLCAZ.js → chunk-3R67RRPC.js} +126 -57
  15. package/dist/{chunk-JYDMBWRP.js → chunk-42IT4BG2.js} +2 -2
  16. package/dist/{chunk-O576GYAP.js → chunk-4MB4UOT5.js} +3 -3
  17. package/dist/{chunk-3KHJJP3J.js → chunk-4MJOBVY7.js} +3 -3
  18. package/dist/{chunk-3SEEP2JM.js → chunk-5J2RQGFG.js} +9 -5
  19. package/dist/{chunk-EAI6XJ7D.js → chunk-5VLUAAAE.js} +4 -4
  20. package/dist/{chunk-FVMKCZHF.js → chunk-5XMDSXZT.js} +3 -3
  21. package/dist/{chunk-LPJ6H5X4.js → chunk-5ZDHXS5N.js} +60 -15
  22. package/dist/{chunk-MEQYZZFR.js → chunk-6IVXRTXH.js} +96 -23
  23. package/dist/chunk-6VJCURWU.js +87 -0
  24. package/dist/{chunk-QZAW5SFH.js → chunk-7NK42OIB.js} +2 -2
  25. package/dist/{chunk-EQOMY4PY.js → chunk-7SXTD7L6.js} +3 -3
  26. package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
  27. package/dist/{chunk-S7FOIURR.js → chunk-A4DAZO3U.js} +12 -9
  28. package/dist/{chunk-AJFHNS67.js → chunk-AIH6M5J6.js} +7 -7
  29. package/dist/{chunk-KS5ZSM5T.js → chunk-AMC2OGXF.js} +64 -16
  30. package/dist/{chunk-SSHS42QG.js → chunk-AN465MXC.js} +2 -2
  31. package/dist/{chunk-BZJIITYM.js → chunk-AOJJSGXE.js} +5 -5
  32. package/dist/{chunk-T7Y554OK.js → chunk-APD52YJV.js} +8 -8
  33. package/dist/{chunk-FFVFZLRT.js → chunk-BR2VSKHI.js} +377 -60
  34. package/dist/{chunk-7K6NDSXH.js → chunk-C3BWDEYN.js} +5 -5
  35. package/dist/{chunk-HO3RCNF6.js → chunk-CGLBK5Q4.js} +2 -2
  36. package/dist/{chunk-ADYKAKE3.js → chunk-CQ7Y3O67.js} +7 -4
  37. package/dist/{chunk-WKNAJ4BR.js → chunk-CQOC2MD6.js} +66 -13
  38. package/dist/{chunk-TLNVYWPA.js → chunk-CXI6X54X.js} +3 -3
  39. package/dist/{chunk-AQEYUVGJ.js → chunk-CY5KE2P5.js} +67 -10
  40. package/dist/{chunk-COVYNAKJ.js → chunk-D3WTEBGT.js} +2 -2
  41. package/dist/{chunk-AHTTKERF.js → chunk-D5FANMSG.js} +3 -3
  42. package/dist/{chunk-CCGWX6AO.js → chunk-D64FRGKU.js} +3 -3
  43. package/dist/{chunk-RRGKMJYL.js → chunk-DIKIHU52.js} +9 -4
  44. package/dist/{chunk-BULHGPHK.js → chunk-DNSEG6P2.js} +3 -3
  45. package/dist/{chunk-UJRTPOHH.js → chunk-DUI5SMFX.js} +2 -2
  46. package/dist/{chunk-VQFDBNYF.js → chunk-EEKGMS63.js} +4 -4
  47. package/dist/{chunk-MTZOXISJ.js → chunk-ES3MUYRX.js} +5 -5
  48. package/dist/{chunk-J7HQPVYH.js → chunk-ES66QH6J.js} +24 -3
  49. package/dist/{chunk-ZKPPI6BF.js → chunk-EXNKNJ65.js} +2 -2
  50. package/dist/{chunk-2NYXI35Z.js → chunk-FCA2UGJT.js} +7 -6
  51. package/dist/{chunk-M3H7ZE6C.js → chunk-FERE46TP.js} +7 -6
  52. package/dist/{chunk-B4XS2AF2.js → chunk-FWVKPEG3.js} +3 -3
  53. package/dist/{chunk-S7YFT3PO.js → chunk-FXVPSTDT.js} +6 -6
  54. package/dist/{chunk-BM7MG6HT.js → chunk-FZECLCCU.js} +4 -4
  55. package/dist/{chunk-SBOAZ7YK.js → chunk-GDGOVO2I.js} +60 -41
  56. package/dist/{chunk-QBYP2FBZ.js → chunk-GG7TK3IA.js} +5 -5
  57. package/dist/{chunk-GQ5ECRP4.js → chunk-GUVVQW3Y.js} +5 -5
  58. package/dist/{chunk-R5BGGBFF.js → chunk-HE57UQHL.js} +3 -3
  59. package/dist/{chunk-4ZIKWVSQ.js → chunk-HIMDUQT7.js} +7 -7
  60. package/dist/{chunk-CSHFU6LT.js → chunk-HKKPUUNK.js} +10 -10
  61. package/dist/{chunk-KINOX74I.js → chunk-HODUM6LY.js} +50 -12
  62. package/dist/{chunk-47JNEKJA.js → chunk-HOPTF3ZP.js} +47 -12
  63. package/dist/{chunk-WW4BQ744.js → chunk-HPJITTF7.js} +11 -8
  64. package/dist/{chunk-BEOAKGNA.js → chunk-I55PVEIX.js} +2 -2
  65. package/dist/{chunk-7JDTNFAK.js → chunk-IMXG673Y.js} +78 -34
  66. package/dist/{chunk-4T6OCSJ2.js → chunk-JE3SMHRZ.js} +6 -6
  67. package/dist/{chunk-KQYQECWQ.js → chunk-JXFB3APA.js} +52 -16
  68. package/dist/{chunk-OJ435DQZ.js → chunk-KF575IXC.js} +4 -4
  69. package/dist/{chunk-IOIMQHQ6.js → chunk-KIGV66SP.js} +3 -3
  70. package/dist/{chunk-ICKXIMBA.js → chunk-KSPCR75O.js} +7 -7
  71. package/dist/{chunk-JTSMEYIZ.js → chunk-L43KTQTW.js} +5 -2
  72. package/dist/{chunk-DLU643TF.js → chunk-LV5BFA24.js} +6 -6
  73. package/dist/{chunk-RJ5LBZ5U.js → chunk-MD2KWAXJ.js} +16 -16
  74. package/dist/{chunk-KDK5EKUR.js → chunk-MGLJA5TK.js} +3 -3
  75. package/dist/{chunk-FR6UFVSV.js → chunk-N2KO445N.js} +99 -46
  76. package/dist/{chunk-C2UORMIA.js → chunk-NFAHDPCG.js} +8 -4
  77. package/dist/{chunk-7UPFTBOW.js → chunk-NHZAYL2X.js} +7 -7
  78. package/dist/{chunk-PIXZTCKH.js → chunk-NVQXIDLE.js} +3 -3
  79. package/dist/chunk-NZ5QVASG.js +20 -0
  80. package/dist/{chunk-F7XM366V.js → chunk-OHBIN74X.js} +4 -4
  81. package/dist/{chunk-4W2PE66Q.js → chunk-OLMWTJVU.js} +11 -1
  82. package/dist/{chunk-HAA25PLC.js → chunk-OWLGERJL.js} +46 -11
  83. package/dist/{chunk-NUTWTV6G.js → chunk-P6XFQVYY.js} +103 -57
  84. package/dist/{chunk-GKYHWJXI.js → chunk-PECYPUJJ.js} +5 -5
  85. package/dist/{chunk-T3FAJAJT.js → chunk-PFG3EVRD.js} +4 -4
  86. package/dist/{chunk-2NZOHEP4.js → chunk-QDOYT6UW.js} +5 -5
  87. package/dist/{chunk-EPRF3ZRV.js → chunk-QWUYFUNO.js} +3 -3
  88. package/dist/{chunk-I47VHSPS.js → chunk-R7ECJQTB.js} +10 -8
  89. package/dist/{chunk-BWYFIVZF.js → chunk-RBIX3HQQ.js} +4 -4
  90. package/dist/{chunk-COJW2NEY.js → chunk-RK3Y4WMV.js} +57 -15
  91. package/dist/{chunk-KQ3FNRGR.js → chunk-RQGNELB3.js} +7 -6
  92. package/dist/{chunk-WF64MW5G.js → chunk-RRX4Z4TH.js} +2 -2
  93. package/dist/{chunk-W6PCFRPL.js → chunk-RV2N7COG.js} +4 -4
  94. package/dist/{chunk-UEU6IYKY.js → chunk-S6QDCFEU.js} +2 -2
  95. package/dist/{chunk-Q5IHQ4NW.js → chunk-SCJ7CAJF.js} +2 -2
  96. package/dist/{chunk-3B2GXZCX.js → chunk-SK7PCW4F.js} +2 -2
  97. package/dist/{chunk-6KL7TFLS.js → chunk-SOBGK35Z.js} +4 -4
  98. package/dist/{chunk-WWHECSYZ.js → chunk-ST3ZNEUQ.js} +3 -3
  99. package/dist/{chunk-3IUHKMJI.js → chunk-U2BKSEKU.js} +2 -2
  100. package/dist/{chunk-KBVOVDYP.js → chunk-U7ZQTUZT.js} +6 -6
  101. package/dist/{chunk-3SBHODJ4.js → chunk-ULONXAOD.js} +50 -11
  102. package/dist/{chunk-B7N5KYXQ.js → chunk-ULR3BVNH.js} +8 -8
  103. package/dist/{chunk-YENNFS5F.js → chunk-USFZQPJ2.js} +10 -5
  104. package/dist/{chunk-OR3R27CU.js → chunk-UZ6L5VQJ.js} +4 -4
  105. package/dist/{chunk-ADCHLNWT.js → chunk-VKN7YW4Q.js} +10 -7
  106. package/dist/{chunk-XWODFBHJ.js → chunk-VSFAJUEF.js} +8 -4
  107. package/dist/{chunk-HFEOOQ46.js → chunk-VU3DOZ6C.js} +3 -3
  108. package/dist/{chunk-M24VXUFG.js → chunk-VYEQPPS6.js} +7 -7
  109. package/dist/{chunk-5XSNLXU5.js → chunk-W2I2EXSC.js} +58 -16
  110. package/dist/{chunk-7U4OR7CD.js → chunk-W4EKQ2P6.js} +2 -2
  111. package/dist/{chunk-UIT7E6UF.js → chunk-WFX6AUQO.js} +52 -5
  112. package/dist/{chunk-RIEAN4D5.js → chunk-WK3UFCZC.js} +51 -11
  113. package/dist/{chunk-7SP4C6EV.js → chunk-WOMXS5R7.js} +24 -5
  114. package/dist/chunk-WTTIODDV.js +10 -0
  115. package/dist/{chunk-GK32ZFZY.js → chunk-X32RDWT5.js} +5 -5
  116. package/dist/{chunk-LRSW4JLE.js → chunk-XN4ZSACM.js} +4 -4
  117. package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
  118. package/dist/{chunk-OSXQKC3S.js → chunk-Y2L2LET6.js} +8 -5
  119. package/dist/{chunk-TJN2OIVG.js → chunk-YG5KQ55U.js} +182 -14
  120. package/dist/{chunk-DPGQ5UMO.js → chunk-YH62K5D4.js} +15 -12
  121. package/dist/{chunk-A3BDLDYG.js → chunk-YJUF2N3C.js} +62 -23
  122. package/dist/{chunk-VMSBMIHW.js → chunk-YM2ZQIVG.js} +4 -4
  123. package/dist/{chunk-KV4HLIJE.js → chunk-YNAHUNMA.js} +7 -4
  124. package/dist/{chunk-62Y27T4C.js → chunk-YWPWRR7W.js} +2 -2
  125. package/dist/{chunk-U4IN6AHE.js → chunk-ZMMYCERO.js} +2 -2
  126. package/dist/cli.cjs +155 -149
  127. package/dist/clock.js +34 -1
  128. package/dist/completion-registry.js +15 -7
  129. package/dist/dgmo-router-GSWUPLP2.js +88 -0
  130. package/dist/dimensions-PLECMFTR.js +22 -0
  131. package/dist/editor.js +10 -1
  132. package/dist/element.js +131 -128
  133. package/dist/element.mjs +2731 -882
  134. package/dist/flowchart-parser-DA3V2SLH.js +21 -0
  135. package/dist/{flowchart-renderer-DCFKUDDR.js → flowchart-renderer-UQVXOUW4.js} +13 -12
  136. package/dist/highlight.js +10 -1
  137. package/dist/index.js +72 -57
  138. package/dist/{layout-A6OIGZN2.js → layout-2BJDECLZ.js} +5 -8
  139. package/dist/{layout-NF4EWFLT.js → layout-3XFPPFXI.js} +4 -4
  140. package/dist/layout-A5UVXINF.js +15 -0
  141. package/dist/layout-HIK4ZJFQ.js +15 -0
  142. package/dist/{layout-CB3XWCOI.js → layout-NX37NSRY.js} +3 -3
  143. package/dist/layout-OHAIIXBC.js +10 -0
  144. package/dist/{layout-QBNAMEOA.js → layout-QRVYYYZ3.js} +6 -6
  145. package/dist/{layout-ITLPDG6M.js → layout-SNIEAZ2I.js} +8 -8
  146. package/dist/{layout-SP7HJWKA.js → layout-UFZQI6SX.js} +4 -4
  147. package/dist/{layout-G2ABQJQZ.js → layout-UXMNKETK.js} +7 -7
  148. package/dist/layout-WDXNSQQF.js +15 -0
  149. package/dist/{layout-search-LUI475P3.js → layout-search-I4VNIRGT.js} +320 -36
  150. package/dist/{legend-constants-B77VKB3R.js → legend-constants-QQU3QYBF.js} +5 -5
  151. package/dist/{palettes-FGTNFARW.js → palettes-WO3VA6NU.js} +4 -4
  152. package/dist/parser-4TX6U4ZU.js +11 -0
  153. package/dist/{parser-X5XLFY4Z.js → parser-4ZIJDGPG.js} +6 -6
  154. package/dist/parser-5UZWYSIV.js +16 -0
  155. package/dist/parser-6CM27UPA.js +14 -0
  156. package/dist/parser-73YUU35J.js +11 -0
  157. package/dist/parser-A6M25MLK.js +11 -0
  158. package/dist/parser-AYZTKZC3.js +11 -0
  159. package/dist/parser-CCAUZLYI.js +15 -0
  160. package/dist/parser-D7YZX3CH.js +12 -0
  161. package/dist/parser-DQ2DGDYO.js +11 -0
  162. package/dist/parser-GGCDY65M.js +14 -0
  163. package/dist/parser-HMQZPPOK.js +19 -0
  164. package/dist/parser-IPBEW2DG.js +13 -0
  165. package/dist/{parser-66RYGJRB.js → parser-JWAGGYLL.js} +7 -7
  166. package/dist/parser-KTVDCWHG.js +13 -0
  167. package/dist/{parser-OPIXXUY4.js → parser-LNEAHGXF.js} +7 -7
  168. package/dist/parser-LQDEU22S.js +15 -0
  169. package/dist/{parser-VVE4THG3.js → parser-MH62NYKM.js} +6 -6
  170. package/dist/parser-O5XCVGZG.js +11 -0
  171. package/dist/parser-OPOGIKFR.js +17 -0
  172. package/dist/parser-PEBXIOPX.js +12 -0
  173. package/dist/parser-PQXN6SBB.js +18 -0
  174. package/dist/parser-Q3KNFXQR.js +12 -0
  175. package/dist/parser-Q62VR2UJ.js +20 -0
  176. package/dist/parser-QEWSTNEJ.js +15 -0
  177. package/dist/{parser-7UI6UQ7B.js → parser-QL2LBPFE.js} +7 -7
  178. package/dist/{parser-LTA2BOZO.js → parser-QN3GJJ3J.js} +5 -5
  179. package/dist/parser-RBNOWHGM.js +15 -0
  180. package/dist/parser-SJ7ECFAP.js +13 -0
  181. package/dist/parser-VVTCMQWY.js +16 -0
  182. package/dist/parser-WT3DSNPQ.js +13 -0
  183. package/dist/parser-XWNSCDY6.js +13 -0
  184. package/dist/pert.d.ts +2 -0
  185. package/dist/{renderer-WVD6G2TS.js → renderer-2NU7M5PN.js} +14 -12
  186. package/dist/renderer-3IETIUZB.js +30 -0
  187. package/dist/renderer-4VLQKKTV.js +39 -0
  188. package/dist/{renderer-HQ4JFZOV.js → renderer-52S6JM5R.js} +12 -11
  189. package/dist/renderer-53FU55KK.js +19 -0
  190. package/dist/renderer-5CU6GYF2.js +27 -0
  191. package/dist/{renderer-LHVCKEWF.js → renderer-5G3PORFD.js} +13 -12
  192. package/dist/renderer-CB2DOQ2O.js +25 -0
  193. package/dist/{renderer-B7Y6I7JX.js → renderer-CL4SAUA5.js} +8 -8
  194. package/dist/{renderer-FXMGCSRP.js → renderer-CRAIC4ER.js} +12 -10
  195. package/dist/renderer-DZ5N6BHW.js +26 -0
  196. package/dist/renderer-FRBPMKPP.js +25 -0
  197. package/dist/renderer-HGWKAXS6.js +16 -0
  198. package/dist/renderer-I5MAFUKX.js +26 -0
  199. package/dist/{renderer-K7XLVPH5.js → renderer-IWNHBIZ6.js} +5 -5
  200. package/dist/renderer-J5MMVCGN.js +29 -0
  201. package/dist/renderer-J5TL5ZX4.js +39 -0
  202. package/dist/renderer-JNC6VJMN.js +24 -0
  203. package/dist/{renderer-X2LYSMLU.js → renderer-KUIZNLAQ.js} +6 -6
  204. package/dist/renderer-M6AFKVLS.js +21 -0
  205. package/dist/renderer-MLDGFZDW.js +23 -0
  206. package/dist/{renderer-YVMETH6V.js → renderer-O4ECS2BI.js} +13 -12
  207. package/dist/{renderer-YEFOOULC.js → renderer-OZIPP7VF.js} +14 -13
  208. package/dist/{renderer-C3RI4OPJ.js → renderer-P7O6OUYC.js} +13 -12
  209. package/dist/renderer-Q3A7572V.js +25 -0
  210. package/dist/renderer-QRX7Q2YN.js +22 -0
  211. package/dist/{renderer-WCWI4I6A.js → renderer-RJT3MOUU.js} +5 -5
  212. package/dist/{renderer-7HMZ5OCJ.js → renderer-SYT4L7GE.js} +6 -6
  213. package/dist/{renderer-G4UOW3RH.js → renderer-TOKGYFTG.js} +6 -6
  214. package/dist/renderer-WWC5VGHH.js +27 -0
  215. package/dist/{renderer-P3YQES7B.js → renderer-YVCD55ZX.js} +15 -13
  216. package/dist/renderer-YWYX6WAI.js +16 -0
  217. package/dist/renderer-radial-QG644QYY.js +21 -0
  218. package/dist/{resolver-WFKZYBJ2.js → resolver-W3WKLWDP.js} +4 -4
  219. package/dist/state-parser-NQGVYSM3.js +19 -0
  220. package/dist/state-renderer-NKV5B3KH.js +40 -0
  221. package/docs/language-reference.md +11 -2
  222. package/package.json +2 -2
  223. package/dist/charts-d3-25E4VWXO.js +0 -27
  224. package/dist/dgmo-router-TGZWFIZO.js +0 -88
  225. package/dist/dimensions-L6BXQXXL.js +0 -22
  226. package/dist/flowchart-parser-UKYOW3VM.js +0 -21
  227. package/dist/layout-25Y3VDYF.js +0 -19
  228. package/dist/layout-4SPLI4HG.js +0 -15
  229. package/dist/layout-CH4HFFRD.js +0 -15
  230. package/dist/layout-NY7MHJCL.js +0 -15
  231. package/dist/parser-2UWWNTFL.js +0 -12
  232. package/dist/parser-3RXYQSA7.js +0 -18
  233. package/dist/parser-5C3PEZK3.js +0 -11
  234. package/dist/parser-6GN5YJBJ.js +0 -13
  235. package/dist/parser-6MQM7WT3.js +0 -15
  236. package/dist/parser-B2A7XOAK.js +0 -12
  237. package/dist/parser-CCNJKDDA.js +0 -16
  238. package/dist/parser-ESHNUFME.js +0 -13
  239. package/dist/parser-F4FEU57T.js +0 -11
  240. package/dist/parser-FHRMFUNX.js +0 -15
  241. package/dist/parser-FPCWDYQV.js +0 -13
  242. package/dist/parser-FY3YFFBS.js +0 -20
  243. package/dist/parser-GML6V2KZ.js +0 -14
  244. package/dist/parser-HA3PF5FL.js +0 -15
  245. package/dist/parser-KTYF6WO5.js +0 -11
  246. package/dist/parser-LU7UAKNB.js +0 -13
  247. package/dist/parser-MHKYQPC2.js +0 -11
  248. package/dist/parser-MVSYFK63.js +0 -17
  249. package/dist/parser-O7YQYFEN.js +0 -15
  250. package/dist/parser-S4EJPNVN.js +0 -19
  251. package/dist/parser-T3D7BV6O.js +0 -11
  252. package/dist/parser-WPPJGB4R.js +0 -12
  253. package/dist/parser-XCPMEB2Z.js +0 -11
  254. package/dist/parser-XRDUX2AR.js +0 -14
  255. package/dist/parser-YPWYT46P.js +0 -16
  256. package/dist/parser-YULS5MLD.js +0 -13
  257. package/dist/renderer-2DME63VZ.js +0 -16
  258. package/dist/renderer-3VY3VXJE.js +0 -37
  259. package/dist/renderer-4A32DX5L.js +0 -24
  260. package/dist/renderer-4K5YYX5R.js +0 -28
  261. package/dist/renderer-6CFML5G3.js +0 -22
  262. package/dist/renderer-7ZNVOVFG.js +0 -16
  263. package/dist/renderer-CJ56SUMF.js +0 -26
  264. package/dist/renderer-COJZZ4F6.js +0 -25
  265. package/dist/renderer-OZX5KGQM.js +0 -21
  266. package/dist/renderer-PLVIARM7.js +0 -24
  267. package/dist/renderer-RA4PTAMF.js +0 -19
  268. package/dist/renderer-RMAM2SOJ.js +0 -28
  269. package/dist/renderer-SES7QZYL.js +0 -37
  270. package/dist/renderer-TQ5QDZOE.js +0 -22
  271. package/dist/renderer-V5SNTPAM.js +0 -27
  272. package/dist/renderer-Y3NXZINM.js +0 -24
  273. package/dist/renderer-YP3P6UVT.js +0 -24
  274. package/dist/renderer-Z4GNKNXO.js +0 -24
  275. package/dist/renderer-radial-VYBZAXXE.js +0 -21
  276. package/dist/state-parser-VIW2WNA5.js +0 -19
  277. package/dist/state-renderer-H22AQD3U.js +0 -38
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  computeNodeText,
3
3
  layoutMindmap
4
- } from "./chunk-5VXU6MND.js";
4
+ } from "./chunk-23THM67F.js";
5
5
  import {
6
6
  extractExportSvg,
7
7
  runInExportContainer
8
- } from "./chunk-JTSMEYIZ.js";
8
+ } from "./chunk-L43KTQTW.js";
9
9
  import {
10
10
  renderInlineText
11
11
  } from "./chunk-3HDBAXF5.js";
@@ -17,12 +17,16 @@ import {
17
17
  import {
18
18
  ScaleContext
19
19
  } from "./chunk-YYVTBZZC.js";
20
+ import {
21
+ layoutInlineHeader
22
+ } from "./chunk-6VJCURWU.js";
20
23
  import {
21
24
  renderIntegratedLegend
22
- } from "./chunk-2NZOHEP4.js";
25
+ } from "./chunk-QDOYT6UW.js";
23
26
  import {
27
+ getLegendExtent,
24
28
  getMaxLegendReservedHeight
25
- } from "./chunk-J7HQPVYH.js";
29
+ } from "./chunk-ES66QH6J.js";
26
30
  import {
27
31
  TITLE_FONT_SIZE,
28
32
  TITLE_FONT_WEIGHT
@@ -32,24 +36,25 @@ import {
32
36
  } from "./chunk-6KFWC4CO.js";
33
37
  import {
34
38
  parseMindmap
35
- } from "./chunk-OJ435DQZ.js";
39
+ } from "./chunk-KF575IXC.js";
36
40
  import {
37
41
  preprocessDescriptionLine
38
42
  } from "./chunk-IYULMRBE.js";
39
43
  import {
40
44
  LEGEND_GROUP_GAP
41
- } from "./chunk-Q5IHQ4NW.js";
45
+ } from "./chunk-SCJ7CAJF.js";
42
46
  import {
43
47
  contrastText,
44
48
  shapeFill
45
- } from "./chunk-JYDMBWRP.js";
49
+ } from "./chunk-42IT4BG2.js";
46
50
  import {
47
51
  tagAttrKey
48
- } from "./chunk-AHTTKERF.js";
52
+ } from "./chunk-D5FANMSG.js";
49
53
  import {
50
54
  fillModeFromOptions,
55
+ legendInlineRequested,
51
56
  legendSuppressed
52
- } from "./chunk-3FRO35WW.js";
57
+ } from "./chunk-3KOPPSUQ.js";
53
58
 
54
59
  // src/mindmap/renderer.ts
55
60
  import * as d3Selection from "d3-selection";
@@ -105,8 +110,33 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
105
110
  const showTitle = !!parsed.title && parsed.options["no-title"] !== "on";
106
111
  const fixedTitle = !isExport && showTitle;
107
112
  const titleReserve = fixedTitle ? TITLE_HEIGHT : 0;
113
+ const inlineRequested = legendInlineRequested(parsed.options);
114
+ const legendExtent = inlineRequested && fixedLegend ? getLegendExtent(
115
+ {
116
+ groups: parsed.tagGroups,
117
+ position: {
118
+ placement: "top-center",
119
+ titleRelation: "inline-with-title"
120
+ },
121
+ mode: isExport ? "export" : "preview"
122
+ },
123
+ { activeGroup: activeTagGroup ?? null },
124
+ containerWidth
125
+ ) : { width: 0, height: 0 };
126
+ const header = layoutInlineHeader({
127
+ requested: inlineRequested,
128
+ title: parsed.title ?? "",
129
+ hasLegend: fixedLegend,
130
+ legendWidth: legendExtent.width,
131
+ legendHeight: legendExtent.height,
132
+ containerWidth,
133
+ titleBandHeight: titleReserve,
134
+ legendReserve,
135
+ titleBaselineY: DIAGRAM_PADDING + TITLE_FONT_SIZE,
136
+ titleFontSize: TITLE_FONT_SIZE
137
+ });
108
138
  const availWidth = containerWidth;
109
- const availHeight = containerHeight - DIAGRAM_PADDING * 2 - legendReserve - titleReserve;
139
+ const availHeight = containerHeight - DIAGRAM_PADDING * 2 - (header.inline ? 0 : legendReserve) - titleReserve;
110
140
  let ctx = isExport ? ScaleContext.identity() : ScaleContext.fromBox(
111
141
  availWidth,
112
142
  layout.width,
@@ -147,7 +177,7 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
147
177
  const scaledWidth = renderLayout.width * fitScale;
148
178
  const scaledHeight = renderLayout.height * fitScale;
149
179
  const offsetX = Math.max(0, (availWidth - scaledWidth) / 2);
150
- const offsetY = DIAGRAM_PADDING + legendReserve + titleReserve + Math.max(0, (availHeight - scaledHeight) / 2);
180
+ const offsetY = DIAGRAM_PADDING + (header.inline ? 0 : legendReserve) + titleReserve + Math.max(0, (availHeight - scaledHeight) / 2);
151
181
  const mainG = svg.append("g").attr(
152
182
  "transform",
153
183
  `translate(${offsetX}, ${offsetY})${fitScale < 1 ? ` scale(${fitScale})` : ""}`
@@ -157,9 +187,9 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
157
187
  }
158
188
  if (showTitle) {
159
189
  const titleParent = fixedTitle ? svg : mainG;
160
- const titleX = fixedTitle ? containerWidth / 2 : renderLayout.width / 2;
190
+ const titleX = fixedTitle ? header.titleX : renderLayout.width / 2;
161
191
  const titleY = fixedTitle ? DIAGRAM_PADDING + TITLE_FONT_SIZE : TITLE_FONT_SIZE;
162
- const titleText = titleParent.append("text").attr("x", titleX).attr("y", titleY).attr("text-anchor", "middle").attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("class", "chart-title").text(parsed.title);
192
+ const titleText = titleParent.append("text").attr("x", titleX).attr("y", titleY).attr("text-anchor", fixedTitle ? header.titleAnchor : "middle").attr("font-size", TITLE_FONT_SIZE).attr("font-weight", TITLE_FONT_WEIGHT).attr("fill", palette.text).attr("class", "chart-title").text(parsed.title);
163
193
  if (parsed.titleLineNumber) {
164
194
  titleText.attr("data-line-number", parsed.titleLineNumber);
165
195
  }
@@ -168,7 +198,10 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
168
198
  }
169
199
  }
170
200
  if (fixedLegend) {
171
- const legendG = svg.append("g").attr("class", "mindmap-legend-fixed").attr("transform", `translate(0, ${DIAGRAM_PADDING + titleReserve})`);
201
+ const legendG = svg.append("g").attr("class", "mindmap-legend-fixed").attr(
202
+ "transform",
203
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0, ${DIAGRAM_PADDING + titleReserve})`
204
+ );
172
205
  const usedValues = /* @__PURE__ */ new Map();
173
206
  for (const node of renderLayout.nodes) {
174
207
  for (const tg of parsed.tagGroups) {
@@ -209,7 +242,10 @@ function renderMindmap(container, parsed, layout, palette, isDark, onClickItem,
209
242
  entries: tg.entries.filter((e) => used?.has(e.value.toLowerCase())).map((e) => ({ value: e.value, color: e.color }))
210
243
  };
211
244
  }),
212
- position: { placement: "top-center", titleRelation: "below-title" },
245
+ position: {
246
+ placement: "top-center",
247
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
248
+ },
213
249
  mode: options?.exportMode ? "export" : "preview",
214
250
  ...controlsToggles !== void 0 && { controlsGroup: controlsToggles },
215
251
  ...options?.controlsHost !== void 0 && {
@@ -390,4 +426,4 @@ export {
390
426
  renderMindmap,
391
427
  renderMindmapForExport
392
428
  };
393
- //# sourceMappingURL=chunk-KQYQECWQ.js.map
429
+ //# sourceMappingURL=chunk-JXFB3APA.js.map
@@ -10,7 +10,7 @@ import {
10
10
  tagAttrKey,
11
11
  validateTagGroupNames,
12
12
  validateTagValues
13
- } from "./chunk-AHTTKERF.js";
13
+ } from "./chunk-D5FANMSG.js";
14
14
  import {
15
15
  MINDMAP_REGISTRY,
16
16
  OPTION_NOCOLON_RE,
@@ -22,13 +22,13 @@ import {
22
22
  tryParseSharedOption,
23
23
  warnUnknownMetaKeys,
24
24
  withTagAliases
25
- } from "./chunk-3FRO35WW.js";
25
+ } from "./chunk-3KOPPSUQ.js";
26
26
  import {
27
27
  formatDgmoError,
28
28
  makeDgmoError,
29
29
  makeFail,
30
30
  suggest
31
- } from "./chunk-4W2PE66Q.js";
31
+ } from "./chunk-OLMWTJVU.js";
32
32
 
33
33
  // src/mindmap/parser.ts
34
34
  var KNOWN_OPTIONS = /* @__PURE__ */ new Set(["active-tag"]);
@@ -323,4 +323,4 @@ function findMetadataParent(indent, indentStack) {
323
323
  export {
324
324
  parseMindmap
325
325
  };
326
- //# sourceMappingURL=chunk-OJ435DQZ.js.map
326
+ //# sourceMappingURL=chunk-KF575IXC.js.map
@@ -11,7 +11,7 @@ import {
11
11
  LEGEND_PILL_FONT_SIZE,
12
12
  LEGEND_PILL_PAD,
13
13
  measureLegendText
14
- } from "./chunk-Q5IHQ4NW.js";
14
+ } from "./chunk-SCJ7CAJF.js";
15
15
  import {
16
16
  measureText
17
17
  } from "./chunk-4ASYQ347.js";
@@ -19,7 +19,7 @@ import {
19
19
  injectDefaultTagMetadata,
20
20
  resolveTagColor,
21
21
  tagAttrKey
22
- } from "./chunk-AHTTKERF.js";
22
+ } from "./chunk-D5FANMSG.js";
23
23
 
24
24
  // src/sitemap/layout.ts
25
25
  import dagre from "@dagrejs/dagre";
@@ -617,4 +617,4 @@ function layoutSitemap(parsed, hiddenCounts, activeTagGroup, hiddenAttributes, e
617
617
  export {
618
618
  layoutSitemap
619
619
  };
620
- //# sourceMappingURL=chunk-IOIMQHQ6.js.map
620
+ //# sourceMappingURL=chunk-KIGV66SP.js.map
@@ -6,19 +6,19 @@ import {
6
6
  formatPct,
7
7
  resolveCellColor,
8
8
  resolveColorMode
9
- } from "./chunk-6OYDOQ2Q.js";
9
+ } from "./chunk-2UZVMWSQ.js";
10
10
  import {
11
11
  renderIntegratedLegend
12
- } from "./chunk-2NZOHEP4.js";
12
+ } from "./chunk-QDOYT6UW.js";
13
13
  import {
14
14
  getMaxLegendReservedHeight
15
- } from "./chunk-J7HQPVYH.js";
15
+ } from "./chunk-ES66QH6J.js";
16
16
  import {
17
17
  FONT_FAMILY
18
18
  } from "./chunk-6KFWC4CO.js";
19
19
  import {
20
20
  LEGEND_GROUP_GAP
21
- } from "./chunk-Q5IHQ4NW.js";
21
+ } from "./chunk-SCJ7CAJF.js";
22
22
  import {
23
23
  measureText
24
24
  } from "./chunk-4ASYQ347.js";
@@ -29,10 +29,10 @@ import {
29
29
  hexToHSL,
30
30
  hslToHex,
31
31
  relativeLuminance
32
- } from "./chunk-JYDMBWRP.js";
32
+ } from "./chunk-42IT4BG2.js";
33
33
  import {
34
34
  tagAttrKey
35
- } from "./chunk-AHTTKERF.js";
35
+ } from "./chunk-D5FANMSG.js";
36
36
 
37
37
  // src/treemap/renderer-radial.ts
38
38
  import * as d3Selection from "d3-selection";
@@ -422,4 +422,4 @@ export {
422
422
  renderTreemapRadialForExport,
423
423
  renderTreemapRadial
424
424
  };
425
- //# sourceMappingURL=chunk-ICKXIMBA.js.map
425
+ //# sourceMappingURL=chunk-KSPCR75O.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ serializeSvg
3
+ } from "./chunk-NZ5QVASG.js";
1
4
  import {
2
5
  FONT_FAMILY
3
6
  } from "./chunk-6KFWC4CO.js";
@@ -27,11 +30,11 @@ function extractExportSvg(container, theme, palette) {
27
30
  svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
28
31
  svgEl.style.fontFamily = FONT_FAMILY;
29
32
  svgEl.querySelectorAll("[data-export-ignore]").forEach((el) => el.remove());
30
- return svgEl.outerHTML;
33
+ return serializeSvg(svgEl);
31
34
  }
32
35
 
33
36
  export {
34
37
  runInExportContainer,
35
38
  extractExportSvg
36
39
  };
37
- //# sourceMappingURL=chunk-JTSMEYIZ.js.map
40
+ //# sourceMappingURL=chunk-L43KTQTW.js.map
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-7TF3QOOD.js";
4
4
  import {
5
5
  tryCollectNote
6
- } from "./chunk-WWHECSYZ.js";
6
+ } from "./chunk-ST3ZNEUQ.js";
7
7
  import {
8
8
  resolveNotes
9
- } from "./chunk-QZAW5SFH.js";
9
+ } from "./chunk-7NK42OIB.js";
10
10
  import {
11
11
  parseInArrowLabel
12
- } from "./chunk-WF64MW5G.js";
12
+ } from "./chunk-RRX4Z4TH.js";
13
13
  import {
14
14
  displayName,
15
15
  normalizeName
@@ -21,7 +21,7 @@ import {
21
21
  measureIndent,
22
22
  parseFirstLine,
23
23
  tryParseSharedOption
24
- } from "./chunk-3FRO35WW.js";
24
+ } from "./chunk-3KOPPSUQ.js";
25
25
  import {
26
26
  NAME_DIAGNOSTIC_CODES,
27
27
  emit,
@@ -29,7 +29,7 @@ import {
29
29
  makeDgmoError,
30
30
  nameMergedMessage,
31
31
  suggest
32
- } from "./chunk-4W2PE66Q.js";
32
+ } from "./chunk-OLMWTJVU.js";
33
33
 
34
34
  // src/graph/flowchart-parser.ts
35
35
  function nodeId(shape, label) {
@@ -470,4 +470,4 @@ export {
470
470
  looksLikeFlowchart,
471
471
  extractSymbols
472
472
  };
473
- //# sourceMappingURL=chunk-DLU643TF.js.map
473
+ //# sourceMappingURL=chunk-LV5BFA24.js.map
@@ -1,26 +1,27 @@
1
1
  import {
2
2
  buildSwatches
3
- } from "./chunk-B4XS2AF2.js";
3
+ } from "./chunk-FWVKPEG3.js";
4
4
  import {
5
5
  FONT_FAMILY
6
6
  } from "./chunk-6KFWC4CO.js";
7
7
  import {
8
8
  fixedParts,
9
+ fixedTimeCells,
9
10
  formatTime,
10
11
  handAngles,
11
12
  rampColor,
12
13
  sunLine,
13
14
  workStatus,
14
15
  zoneParts
15
- } from "./chunk-APKUAJ2L.js";
16
+ } from "./chunk-A2RUBBVT.js";
16
17
  import {
17
18
  contrastText,
18
19
  mix,
19
20
  themeBaseBg
20
- } from "./chunk-JYDMBWRP.js";
21
+ } from "./chunk-42IT4BG2.js";
21
22
  import {
22
23
  resolveColor
23
- } from "./chunk-ZKPPI6BF.js";
24
+ } from "./chunk-EXNKNJ65.js";
24
25
 
25
26
  // src/clock/renderer.ts
26
27
  import * as d3Selection from "d3-selection";
@@ -307,12 +308,12 @@ function drawRow(svg, entry, index, parsed, now, rowTop, rowH, geom, col) {
307
308
  const baseY = center + 16;
308
309
  const capTop = baseY - mainFont * 0.7;
309
310
  const sf = 20;
310
- const mainW = [...ts.main].reduce(
311
- (w, c) => w + mainFont * (c === ":" ? 0.334 : 0.6),
312
- 0
313
- );
314
- const stackX = contentLeft + mainW + 5;
315
- g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", contentLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", mainFont).attr("font-weight", 600).attr("textLength", mainW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(ts.main);
311
+ const gap = 5;
312
+ const { cells, width: mainW } = fixedTimeCells(ts.main, contentLeft, mainFont);
313
+ const stackX = contentLeft + mainW + gap;
314
+ const mainText = g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("y", baseY).attr("text-anchor", "middle").attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", mainFont).attr("font-weight", 600).attr("data-dgmo-clock-x0", contentLeft).attr("data-dgmo-clock-fs", mainFont).attr("data-dgmo-clock-gap", gap);
315
+ for (const c of cells)
316
+ mainText.append("tspan").attr("x", c.x).text(c.ch);
316
317
  g.append("text").attr("data-dgmo-clock-digital-part", "sec").attr("x", stackX).attr("y", capTop + sf * 0.72).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 600).style("font-variant-numeric", "tabular-nums").text(`:${ts.sec}`);
317
318
  if (ts.ap)
318
319
  g.append("text").attr("data-dgmo-clock-digital-part", "ap").attr("x", stackX).attr("y", baseY).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 600).text(ts.ap);
@@ -471,14 +472,13 @@ function drawColumns(body, parsed, now, top, geom, col) {
471
472
  const gap = 11;
472
473
  const cap = 0.7;
473
474
  const tf = fitFont(ts.main, 54, innerW - 30 - gap, 20);
474
- const mainW = [...ts.main].reduce(
475
- (w, c) => w + tf * (c === ":" ? 0.334 : 0.6),
476
- 0
477
- );
475
+ const mainW = fixedTimeCells(ts.main, 0, tf).width;
478
476
  const stackW = Math.max(estWidth(`:${ts.sec}`, sf), estWidth(ts.ap, sf));
479
477
  const gLeft = cx - (mainW + gap + stackW) / 2;
480
478
  const baseY = cy + tf * 0.34;
481
- g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("x", gLeft).attr("y", baseY).attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", tf).attr("font-weight", 600).attr("textLength", mainW).attr("lengthAdjust", "spacing").style("font-variant-numeric", "tabular-nums").text(ts.main);
479
+ const mainText = g.append("text").attr("data-dgmo-clock-digital", "").attr("data-dgmo-clock-digital-part", "main").attr("y", baseY).attr("text-anchor", "middle").attr("fill", timeColor).attr("font-family", FONT_FAMILY).attr("font-size", tf).attr("font-weight", 600).attr("data-dgmo-clock-x0", gLeft).attr("data-dgmo-clock-fs", tf).attr("data-dgmo-clock-gap", gap);
480
+ for (const c of fixedTimeCells(ts.main, gLeft, tf).cells)
481
+ mainText.append("tspan").attr("x", c.x).text(c.ch);
482
482
  const stackX = gLeft + mainW + gap;
483
483
  g.append("text").attr("data-dgmo-clock-digital-part", "sec").attr("x", stackX).attr("y", baseY - tf * cap + sf * cap).attr("fill", muted).attr("font-family", FONT_FAMILY).attr("font-size", sf).attr("font-weight", 500).text(`:${ts.sec}`);
484
484
  if (ts.ap)
@@ -558,4 +558,4 @@ export {
558
558
  renderClock,
559
559
  renderClockForExport
560
560
  };
561
- //# sourceMappingURL=chunk-RJ5LBZ5U.js.map
561
+ //# sourceMappingURL=chunk-MD2KWAXJ.js.map
@@ -5,11 +5,11 @@ import {
5
5
  splitNameAndMeta,
6
6
  tryParseSharedOption,
7
7
  warnUnknownMetaKeys
8
- } from "./chunk-3FRO35WW.js";
8
+ } from "./chunk-3KOPPSUQ.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail
12
- } from "./chunk-4W2PE66Q.js";
12
+ } from "./chunk-OLMWTJVU.js";
13
13
 
14
14
  // src/pyramid/parser.ts
15
15
  var MAX_LAYERS = 15;
@@ -127,4 +127,4 @@ function parsePyramid(content) {
127
127
  export {
128
128
  parsePyramid
129
129
  };
130
- //# sourceMappingURL=chunk-KDK5EKUR.js.map
130
+ //# sourceMappingURL=chunk-MGLJA5TK.js.map
@@ -4,10 +4,10 @@ import {
4
4
  renderNoteBadge,
5
5
  renderNoteBox,
6
6
  renderNoteConnector
7
- } from "./chunk-3IUHKMJI.js";
7
+ } from "./chunk-U2BKSEKU.js";
8
8
  import {
9
9
  layoutERDiagram
10
- } from "./chunk-SSHS42QG.js";
10
+ } from "./chunk-AN465MXC.js";
11
11
  import {
12
12
  EDGE_STROKE_WIDTH,
13
13
  NODE_STROKE_WIDTH
@@ -15,9 +15,18 @@ import {
15
15
  import {
16
16
  ScaleContext
17
17
  } from "./chunk-YYVTBZZC.js";
18
+ import {
19
+ layoutInlineHeader
20
+ } from "./chunk-6VJCURWU.js";
21
+ import {
22
+ serializeSvg
23
+ } from "./chunk-NZ5QVASG.js";
18
24
  import {
19
25
  renderIntegratedLegend
20
- } from "./chunk-2NZOHEP4.js";
26
+ } from "./chunk-QDOYT6UW.js";
27
+ import {
28
+ getLegendExtent
29
+ } from "./chunk-ES66QH6J.js";
21
30
  import {
22
31
  TITLE_FONT_SIZE,
23
32
  TITLE_FONT_WEIGHT,
@@ -28,10 +37,10 @@ import {
28
37
  } from "./chunk-6KFWC4CO.js";
29
38
  import {
30
39
  parseERDiagram
31
- } from "./chunk-B7N5KYXQ.js";
40
+ } from "./chunk-ULR3BVNH.js";
32
41
  import {
33
42
  LEGEND_HEIGHT
34
- } from "./chunk-Q5IHQ4NW.js";
43
+ } from "./chunk-SCJ7CAJF.js";
35
44
  import {
36
45
  measureText
37
46
  } from "./chunk-4ASYQ347.js";
@@ -39,15 +48,16 @@ import {
39
48
  contrastText,
40
49
  getSeriesColors,
41
50
  shapeFill
42
- } from "./chunk-JYDMBWRP.js";
51
+ } from "./chunk-42IT4BG2.js";
43
52
  import {
44
53
  resolveTagColor,
45
54
  tagAttrKey
46
- } from "./chunk-AHTTKERF.js";
55
+ } from "./chunk-D5FANMSG.js";
47
56
  import {
48
57
  fillModeFromOptions,
58
+ legendInlineRequested,
49
59
  legendSuppressed
50
- } from "./chunk-3FRO35WW.js";
60
+ } from "./chunk-3KOPPSUQ.js";
51
61
 
52
62
  // src/er/renderer.ts
53
63
  import * as d3Selection from "d3-selection";
@@ -274,7 +284,55 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
274
284
  const sTitleFontSize = ctx.text(TITLE_FONT_SIZE);
275
285
  const sTitleY = ctx.structural(TITLE_Y);
276
286
  const naturalW = diagramW + sDiagramPadding * 2;
277
- const naturalH = diagramH + titleHeight + legendReserveH + sDiagramPadding * 2;
287
+ const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
288
+ const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
289
+ const presentRoles = semanticRoles ? ROLE_ORDER.filter((role) => {
290
+ for (const r of semanticRoles.values()) {
291
+ if (r === role) return true;
292
+ }
293
+ return false;
294
+ }) : [];
295
+ const semanticGroups = presentRoles.length > 0 ? [
296
+ {
297
+ name: "Role",
298
+ entries: presentRoles.map((role) => ({
299
+ value: ROLE_LABELS[role],
300
+ color: palette.colors[ROLE_COLORS[role]]
301
+ }))
302
+ }
303
+ ] : [];
304
+ const showSemanticLegend = semanticRoles !== null && !noLegend && presentRoles.length > 0;
305
+ const inlineRequested = legendInlineRequested(parsed.options);
306
+ const hasLegend = hasTagLegend || showSemanticLegend;
307
+ const inlineLegendGroups = hasTagLegend ? parsed.tagGroups : semanticGroups;
308
+ const inlineActiveGroup = hasTagLegend ? activeTagGroup ?? null : semanticActive ? "Role" : null;
309
+ const inlineContainerW = exportDims?.width ?? naturalW;
310
+ const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
311
+ {
312
+ groups: inlineLegendGroups,
313
+ position: {
314
+ placement: "top-center",
315
+ titleRelation: "inline-with-title"
316
+ },
317
+ mode: exportMode ? "export" : "preview"
318
+ },
319
+ { activeGroup: inlineActiveGroup },
320
+ inlineContainerW
321
+ ) : { width: 0, height: 0 };
322
+ const header = layoutInlineHeader({
323
+ requested: inlineRequested,
324
+ title: parsed.title ?? "",
325
+ hasLegend,
326
+ legendWidth: legendExtent.width,
327
+ legendHeight: legendExtent.height,
328
+ containerWidth: inlineContainerW,
329
+ titleBandHeight: titleHeight,
330
+ legendReserve: legendReserveH,
331
+ titleBaselineY: sTitleY,
332
+ titleFontSize: sTitleFontSize
333
+ });
334
+ const effectiveReserveH = header.inline ? 0 : legendReserveH;
335
+ const naturalH = diagramH + titleHeight + effectiveReserveH + sDiagramPadding * 2;
278
336
  let viewW;
279
337
  let viewH;
280
338
  let scale;
@@ -283,24 +341,24 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
283
341
  if (exportDims) {
284
342
  viewW = exportDims.width ?? naturalW;
285
343
  viewH = exportDims.height ?? naturalH;
286
- const availH = viewH - titleHeight - legendReserveH;
344
+ const availH = viewH - titleHeight - effectiveReserveH;
287
345
  const scaleX = (viewW - sDiagramPadding * 2) / diagramW;
288
346
  const scaleY = (availH - sDiagramPadding * 2) / diagramH;
289
347
  scale = Math.min(MAX_SCALE, scaleX, scaleY);
290
348
  const scaledW = diagramW * scale;
291
349
  offsetX = (viewW - scaledW) / 2;
292
- offsetY = titleHeight + legendReserveH + sDiagramPadding;
350
+ offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
293
351
  } else {
294
352
  viewW = naturalW;
295
353
  viewH = naturalH;
296
354
  scale = 1;
297
355
  offsetX = sDiagramPadding;
298
- offsetY = titleHeight + legendReserveH + sDiagramPadding;
356
+ offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
299
357
  }
300
358
  if (viewW <= 0 || viewH <= 0) return;
301
359
  const svg = d3Selection.select(container).append("svg").attr("width", exportDims ? viewW : "100%").attr("height", exportDims ? viewH : "100%").attr("viewBox", `0 0 ${viewW} ${viewH}`).attr("preserveAspectRatio", "xMidYMid meet").style("font-family", FONT_FAMILY);
302
360
  if (showTitle) {
303
- const titleEl = svg.append("text").attr("class", "chart-title").attr("x", viewW / 2).attr("y", sTitleY).attr("text-anchor", "middle").attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).style(
361
+ const titleEl = svg.append("text").attr("class", "chart-title").attr("x", header.titleX).attr("y", sTitleY).attr("text-anchor", header.titleAnchor).attr("fill", palette.text).attr("font-size", sTitleFontSize).attr("font-weight", TITLE_FONT_WEIGHT).style(
304
362
  "cursor",
305
363
  onClickItem && parsed.titleLineNumber ? "pointer" : "default"
306
364
  ).text(parsed.title);
@@ -317,8 +375,6 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
317
375
  }
318
376
  const contentG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
319
377
  const seriesColors = getSeriesColors(palette);
320
- const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
321
- const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
322
378
  const useLabels = parsed.options["notation"] === "labels";
323
379
  for (const edge of layout.edges) {
324
380
  if (edge.points.length < 2) continue;
@@ -462,46 +518,43 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
462
518
  }
463
519
  if (hasTagLegend) {
464
520
  const legendY = sDiagramPadding + titleHeight;
465
- const legendG = svg.append("g").attr("class", "er-tag-legend").attr("transform", `translate(0,${legendY})`);
521
+ const legendG = svg.append("g").attr("class", "er-tag-legend").attr(
522
+ "transform",
523
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
524
+ );
466
525
  renderIntegratedLegend(legendG, {
467
526
  groups: parsed.tagGroups,
468
527
  activeGroup: activeTagGroup ?? null,
469
528
  mode: exportMode ? "export" : "preview",
529
+ position: {
530
+ placement: "top-center",
531
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
532
+ },
470
533
  palette,
471
534
  isDark,
472
535
  width: viewW
473
536
  });
474
537
  legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
475
538
  }
476
- if (semanticRoles && !noLegend) {
477
- const presentRoles = ROLE_ORDER.filter((role) => {
478
- for (const r of semanticRoles.values()) {
479
- if (r === role) return true;
480
- }
481
- return false;
539
+ if (showSemanticLegend) {
540
+ const legendY = sDiagramPadding + titleHeight;
541
+ const legendG = svg.append("g").attr("class", "er-semantic-legend").attr(
542
+ "transform",
543
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
544
+ );
545
+ renderIntegratedLegend(legendG, {
546
+ groups: semanticGroups,
547
+ activeGroup: semanticActive ? "Role" : null,
548
+ mode: exportMode ? "export" : "preview",
549
+ position: {
550
+ placement: "top-center",
551
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
552
+ },
553
+ palette,
554
+ isDark,
555
+ width: viewW
482
556
  });
483
- if (presentRoles.length > 0) {
484
- const legendY = sDiagramPadding + titleHeight;
485
- const semanticGroups = [
486
- {
487
- name: "Role",
488
- entries: presentRoles.map((role) => ({
489
- value: ROLE_LABELS[role],
490
- color: palette.colors[ROLE_COLORS[role]]
491
- }))
492
- }
493
- ];
494
- const legendG = svg.append("g").attr("class", "er-semantic-legend").attr("transform", `translate(0,${legendY})`);
495
- renderIntegratedLegend(legendG, {
496
- groups: semanticGroups,
497
- activeGroup: semanticActive ? "Role" : null,
498
- mode: exportMode ? "export" : "preview",
499
- palette,
500
- isDark,
501
- width: viewW
502
- });
503
- legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
504
- }
557
+ legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
505
558
  }
506
559
  }
507
560
  function renderERDiagramForExport(content, theme, palette) {
@@ -540,7 +593,7 @@ function renderERDiagramForExport(content, theme, palette) {
540
593
  }
541
594
  svgEl.setAttribute("xmlns", "http://www.w3.org/2000/svg");
542
595
  svgEl.style.fontFamily = FONT_FAMILY;
543
- return svgEl.outerHTML;
596
+ return serializeSvg(svgEl);
544
597
  } finally {
545
598
  document.body.removeChild(container);
546
599
  }
@@ -550,4 +603,4 @@ export {
550
603
  renderERDiagram,
551
604
  renderERDiagramForExport
552
605
  };
553
- //# sourceMappingURL=chunk-FR6UFVSV.js.map
606
+ //# sourceMappingURL=chunk-N2KO445N.js.map