@diagrammo/dgmo 0.54.0 → 0.55.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 (196) hide show
  1. package/dist/advanced.d.ts +76 -9
  2. package/dist/advanced.js +118 -95
  3. package/dist/auto.js +125 -124
  4. package/dist/auto.mjs +1579 -282
  5. package/dist/block.js +49 -48
  6. package/dist/chart-meta.js +43 -43
  7. package/dist/{charts-d3-25E4VWXO.js → charts-d3-KZ6V4OP2.js} +7 -6
  8. package/dist/{chunk-MTZOXISJ.js → chunk-2HX6ZGY7.js} +3 -3
  9. package/dist/{chunk-ICKXIMBA.js → chunk-2R6HG6D5.js} +5 -5
  10. package/dist/{chunk-NUTWTV6G.js → chunk-2ZJXKJSI.js} +102 -56
  11. package/dist/{chunk-LPJ6H5X4.js → chunk-32HUNA33.js} +53 -11
  12. package/dist/{chunk-UIT7E6UF.js → chunk-3BFXELBL.js} +51 -4
  13. package/dist/{chunk-C2UORMIA.js → chunk-3BZJ5KD5.js} +7 -3
  14. package/dist/{chunk-A3BDLDYG.js → chunk-3FUTFYSP.js} +57 -18
  15. package/dist/{chunk-DPGQ5UMO.js → chunk-4MZCJV4M.js} +6 -6
  16. package/dist/{chunk-WWHECSYZ.js → chunk-4R5KIPNX.js} +2 -2
  17. package/dist/{chunk-47JNEKJA.js → chunk-5D5VHDJM.js} +43 -8
  18. package/dist/{chunk-KQYQECWQ.js → chunk-5H5GWWA4.js} +49 -13
  19. package/dist/{chunk-RRGKMJYL.js → chunk-5K5XBEXT.js} +8 -3
  20. package/dist/{chunk-HAA25PLC.js → chunk-6NJWBMJV.js} +44 -9
  21. package/dist/{chunk-3FRO35WW.js → chunk-A2ARDILY.js} +17 -3
  22. package/dist/{chunk-TLNVYWPA.js → chunk-A2PTRSAO.js} +2 -2
  23. package/dist/{chunk-APKUAJ2L.js → chunk-A2RUBBVT.js} +14 -1
  24. package/dist/{chunk-KS5ZSM5T.js → chunk-A4UJP4IS.js} +61 -13
  25. package/dist/{chunk-LRSW4JLE.js → chunk-AKE6C2D7.js} +3 -3
  26. package/dist/{chunk-2NZOHEP4.js → chunk-ASPS5O6F.js} +3 -3
  27. package/dist/{chunk-KV4HLIJE.js → chunk-AU75JHSR.js} +6 -3
  28. package/dist/{chunk-R5BGGBFF.js → chunk-DS4MDEQ7.js} +2 -2
  29. package/dist/{chunk-7JDTNFAK.js → chunk-EFUQENO5.js} +76 -32
  30. package/dist/{chunk-BULHGPHK.js → chunk-EMSOFHEN.js} +2 -2
  31. package/dist/{chunk-IYNKLCAZ.js → chunk-ETTDF3S2.js} +45 -7
  32. package/dist/{chunk-KDK5EKUR.js → chunk-ETYF5QZR.js} +2 -2
  33. package/dist/{chunk-COJW2NEY.js → chunk-F5ZNUMSY.js} +50 -11
  34. package/dist/{chunk-EAI6XJ7D.js → chunk-FBP33UM6.js} +3 -3
  35. package/dist/{chunk-KINOX74I.js → chunk-FGAMFJNJ.js} +48 -10
  36. package/dist/{chunk-J7HQPVYH.js → chunk-GRXPFBYC.js} +23 -2
  37. package/dist/{chunk-GQ5ECRP4.js → chunk-GTO5VCYG.js} +3 -3
  38. package/dist/{chunk-RJ5LBZ5U.js → chunk-HES4K6DV.js} +13 -13
  39. package/dist/{chunk-ADCHLNWT.js → chunk-HGKOVKAX.js} +3 -3
  40. package/dist/{chunk-EPRF3ZRV.js → chunk-HLGOG44K.js} +2 -2
  41. package/dist/{chunk-KQ3FNRGR.js → chunk-HUTP35XT.js} +5 -4
  42. package/dist/{chunk-OJ435DQZ.js → chunk-HX7QNHC6.js} +3 -3
  43. package/dist/{chunk-6KL7TFLS.js → chunk-IALX52TR.js} +2 -2
  44. package/dist/{chunk-7SP4C6EV.js → chunk-IF4KYSJZ.js} +7 -3
  45. package/dist/{chunk-5XSNLXU5.js → chunk-IG6J7JWH.js} +51 -12
  46. package/dist/{chunk-M24VXUFG.js → chunk-IIUYKQ5J.js} +3 -3
  47. package/dist/{chunk-5VXU6MND.js → chunk-INTAQV2Y.js} +2 -2
  48. package/dist/{chunk-3KHJJP3J.js → chunk-ITXL2KU5.js} +2 -2
  49. package/dist/{chunk-I47VHSPS.js → chunk-IWG2ECAO.js} +2 -2
  50. package/dist/{chunk-CSHFU6LT.js → chunk-JGCEFKZP.js} +7 -7
  51. package/dist/{chunk-O576GYAP.js → chunk-JQLSFZZP.js} +2 -2
  52. package/dist/{chunk-AHTTKERF.js → chunk-JR7Q6GHE.js} +2 -2
  53. package/dist/{chunk-4T6OCSJ2.js → chunk-KC3WBBI7.js} +3 -3
  54. package/dist/{chunk-BM7MG6HT.js → chunk-KK3L5NVK.js} +3 -3
  55. package/dist/{chunk-FR6UFVSV.js → chunk-L2DIXZUT.js} +91 -41
  56. package/dist/{chunk-WW4BQ744.js → chunk-LCRPGGGS.js} +6 -6
  57. package/dist/{chunk-GKYHWJXI.js → chunk-LKGQ46P4.js} +3 -3
  58. package/dist/{chunk-IOIMQHQ6.js → chunk-LW7STMYZ.js} +2 -2
  59. package/dist/{chunk-OR3R27CU.js → chunk-M53MDBIW.js} +2 -2
  60. package/dist/{chunk-T7Y554OK.js → chunk-MEH4TJEX.js} +4 -4
  61. package/dist/{chunk-T3FAJAJT.js → chunk-MNS2ENXF.js} +3 -3
  62. package/dist/{chunk-CCGWX6AO.js → chunk-MSWIBF6J.js} +2 -2
  63. package/dist/{chunk-B7N5KYXQ.js → chunk-NL7FUIVD.js} +4 -4
  64. package/dist/{chunk-EQOMY4PY.js → chunk-NN5TF4OV.js} +2 -2
  65. package/dist/{chunk-BZJIITYM.js → chunk-NPPUZ4SK.js} +4 -4
  66. package/dist/{chunk-XWODFBHJ.js → chunk-NYOOPQFD.js} +7 -3
  67. package/dist/{chunk-VQFDBNYF.js → chunk-O4CZDTQA.js} +3 -3
  68. package/dist/{chunk-FVMKCZHF.js → chunk-P5XXIVEU.js} +2 -2
  69. package/dist/{chunk-F7XM366V.js → chunk-PC4YLEKA.js} +3 -3
  70. package/dist/{chunk-AQEYUVGJ.js → chunk-PCVXXPYU.js} +12 -5
  71. package/dist/{chunk-TJN2OIVG.js → chunk-PKUWYPI5.js} +180 -12
  72. package/dist/{chunk-W6PCFRPL.js → chunk-PSIDVCBA.js} +2 -2
  73. package/dist/{chunk-RIEAN4D5.js → chunk-PV7ND5WL.js} +48 -8
  74. package/dist/{chunk-7K6NDSXH.js → chunk-Q5CMQVWF.js} +3 -3
  75. package/dist/{chunk-FFVFZLRT.js → chunk-QQXFYTLC.js} +346 -46
  76. package/dist/{chunk-N7BSBAVP.js → chunk-QZYGRDMM.js} +108 -89
  77. package/dist/{chunk-U4IN6AHE.js → chunk-RKBCKCSF.js} +2 -2
  78. package/dist/{chunk-GK32ZFZY.js → chunk-RSBH2C7O.js} +3 -3
  79. package/dist/{chunk-OSXQKC3S.js → chunk-RYNCWA5X.js} +6 -3
  80. package/dist/{chunk-S7YFT3PO.js → chunk-RZWIPDZ2.js} +3 -3
  81. package/dist/{chunk-7UPFTBOW.js → chunk-S52F62GW.js} +4 -4
  82. package/dist/{chunk-WKNAJ4BR.js → chunk-SCOHNGPG.js} +51 -10
  83. package/dist/{chunk-BWYFIVZF.js → chunk-UBQU2BY6.js} +3 -3
  84. package/dist/{chunk-VMSBMIHW.js → chunk-UES4P7FN.js} +2 -2
  85. package/dist/chunk-US3P2DQO.js +87 -0
  86. package/dist/{chunk-AJFHNS67.js → chunk-UXXLE6AH.js} +5 -5
  87. package/dist/{chunk-M3H7ZE6C.js → chunk-VMWSZCAK.js} +5 -4
  88. package/dist/{chunk-S7FOIURR.js → chunk-VVIRAGID.js} +6 -6
  89. package/dist/{chunk-3SBHODJ4.js → chunk-VXTUWXFB.js} +48 -9
  90. package/dist/{chunk-HFEOOQ46.js → chunk-W4TSD3IP.js} +2 -2
  91. package/dist/{chunk-7U4OR7CD.js → chunk-WB3NA3JJ.js} +2 -2
  92. package/dist/{chunk-3SEEP2JM.js → chunk-WITOJZGL.js} +8 -4
  93. package/dist/{chunk-6OYDOQ2Q.js → chunk-WVGNXDEE.js} +2 -2
  94. package/dist/{chunk-UEU6IYKY.js → chunk-X3X4LZDC.js} +2 -2
  95. package/dist/{chunk-SBOAZ7YK.js → chunk-XKKH2DPG.js} +39 -39
  96. package/dist/{chunk-NR5HCAUD.js → chunk-XSVWUOUZ.js} +1 -1
  97. package/dist/{chunk-62Y27T4C.js → chunk-Y4BBGFKY.js} +2 -2
  98. package/dist/{chunk-YENNFS5F.js → chunk-YP2T5YUP.js} +8 -3
  99. package/dist/{chunk-2NYXI35Z.js → chunk-YXKNXIWA.js} +5 -4
  100. package/dist/{chunk-KBVOVDYP.js → chunk-ZGIBV36U.js} +3 -3
  101. package/dist/{chunk-4ZIKWVSQ.js → chunk-ZP265ICS.js} +4 -4
  102. package/dist/{chunk-DLU643TF.js → chunk-ZWVKTWK6.js} +3 -3
  103. package/dist/{chunk-QBYP2FBZ.js → chunk-ZXNHHO6D.js} +2 -2
  104. package/dist/cli.cjs +150 -147
  105. package/dist/clock.js +34 -1
  106. package/dist/completion-registry.js +12 -4
  107. package/dist/dgmo-router-T4HGLIGA.js +88 -0
  108. package/dist/{dimensions-L6BXQXXL.js → dimensions-3JINHSYK.js} +6 -6
  109. package/dist/editor.js +10 -1
  110. package/dist/element.js +124 -123
  111. package/dist/element.mjs +1579 -282
  112. package/dist/{flowchart-parser-UKYOW3VM.js → flowchart-parser-M7KKTLX7.js} +4 -4
  113. package/dist/{flowchart-renderer-DCFKUDDR.js → flowchart-renderer-FFEQFQEU.js} +5 -5
  114. package/dist/highlight.js +10 -1
  115. package/dist/index.js +58 -48
  116. package/dist/{layout-G2ABQJQZ.js → layout-3ZZBKUQC.js} +3 -3
  117. package/dist/{layout-CH4HFFRD.js → layout-AUKTWGYL.js} +4 -4
  118. package/dist/{layout-QBNAMEOA.js → layout-CRLTSFYQ.js} +3 -3
  119. package/dist/{layout-25Y3VDYF.js → layout-FNZDJGKF.js} +4 -4
  120. package/dist/{layout-NY7MHJCL.js → layout-GHWRJKZQ.js} +4 -4
  121. package/dist/{layout-ITLPDG6M.js → layout-LGXOKUCD.js} +4 -4
  122. package/dist/{layout-A6OIGZN2.js → layout-UR7CYAHL.js} +2 -2
  123. package/dist/{layout-4SPLI4HG.js → layout-UTMEVFHN.js} +4 -4
  124. package/dist/{layout-search-LUI475P3.js → layout-search-U2H4ORFJ.js} +8 -6
  125. package/dist/{parser-XRDUX2AR.js → parser-2AXPSKWB.js} +5 -5
  126. package/dist/{parser-B2A7XOAK.js → parser-2AZ2KQTO.js} +4 -4
  127. package/dist/{parser-VVE4THG3.js → parser-2LF33IS2.js} +4 -4
  128. package/dist/{parser-MHKYQPC2.js → parser-3QJ2Z4H4.js} +3 -3
  129. package/dist/parser-5GCQFSTQ.js +13 -0
  130. package/dist/{parser-XCPMEB2Z.js → parser-62OHBRU5.js} +3 -3
  131. package/dist/{parser-GML6V2KZ.js → parser-7LYJFZCP.js} +4 -4
  132. package/dist/{parser-LTA2BOZO.js → parser-BMOTF72G.js} +3 -3
  133. package/dist/{parser-FHRMFUNX.js → parser-CIFLYZYP.js} +3 -3
  134. package/dist/{parser-KTYF6WO5.js → parser-D2UL2G5U.js} +3 -3
  135. package/dist/{parser-5C3PEZK3.js → parser-DM2APTKB.js} +3 -3
  136. package/dist/{parser-X5XLFY4Z.js → parser-DYYTPLBL.js} +4 -4
  137. package/dist/{parser-WPPJGB4R.js → parser-GOUGUTPU.js} +4 -4
  138. package/dist/{parser-T3D7BV6O.js → parser-HGVUVD6J.js} +3 -3
  139. package/dist/{parser-F4FEU57T.js → parser-IEJD3CZB.js} +3 -3
  140. package/dist/{parser-FY3YFFBS.js → parser-JBEWNLAV.js} +5 -5
  141. package/dist/{parser-2UWWNTFL.js → parser-JMXPHNZD.js} +4 -4
  142. package/dist/{parser-YULS5MLD.js → parser-JMXSQY3K.js} +4 -4
  143. package/dist/{parser-YPWYT46P.js → parser-LUXS7J32.js} +4 -4
  144. package/dist/{parser-O7YQYFEN.js → parser-M5BUHULF.js} +4 -4
  145. package/dist/{parser-MVSYFK63.js → parser-MESRHUS4.js} +4 -4
  146. package/dist/{parser-HA3PF5FL.js → parser-OOYNI2UT.js} +4 -4
  147. package/dist/{parser-OPIXXUY4.js → parser-PVBUAVRR.js} +4 -4
  148. package/dist/{parser-3RXYQSA7.js → parser-QKRBSQLJ.js} +5 -5
  149. package/dist/{parser-CCNJKDDA.js → parser-S6NWSIJO.js} +4 -4
  150. package/dist/{parser-S4EJPNVN.js → parser-SFEK6Q7Z.js} +4 -4
  151. package/dist/{parser-7UI6UQ7B.js → parser-SUV52NQW.js} +4 -4
  152. package/dist/{parser-ESHNUFME.js → parser-SZHGLOOZ.js} +4 -4
  153. package/dist/{parser-66RYGJRB.js → parser-TO7IENWL.js} +4 -4
  154. package/dist/{parser-FPCWDYQV.js → parser-TVAMC7CQ.js} +4 -4
  155. package/dist/{parser-LU7UAKNB.js → parser-VAW46R57.js} +4 -4
  156. package/dist/{parser-6MQM7WT3.js → parser-XDSPOXSE.js} +4 -4
  157. package/dist/pert.d.ts +2 -0
  158. package/dist/{renderer-YVMETH6V.js → renderer-3PWLOJPD.js} +8 -8
  159. package/dist/{renderer-7HMZ5OCJ.js → renderer-5EMHIQL5.js} +3 -3
  160. package/dist/{renderer-2DME63VZ.js → renderer-5PODNLYP.js} +4 -4
  161. package/dist/{renderer-4A32DX5L.js → renderer-AQJIQ2XU.js} +7 -6
  162. package/dist/{renderer-RMAM2SOJ.js → renderer-BEW3AYFT.js} +8 -8
  163. package/dist/{renderer-YP3P6UVT.js → renderer-C3UYAXA6.js} +8 -6
  164. package/dist/{renderer-X2LYSMLU.js → renderer-CENXCMWG.js} +3 -3
  165. package/dist/{renderer-6CFML5G3.js → renderer-CXM3ARYN.js} +8 -7
  166. package/dist/{renderer-LHVCKEWF.js → renderer-DW6TEBLA.js} +8 -7
  167. package/dist/{renderer-Y3NXZINM.js → renderer-FE5M6SEZ.js} +8 -7
  168. package/dist/{renderer-G4UOW3RH.js → renderer-FXK6ZL3P.js} +3 -3
  169. package/dist/{renderer-4K5YYX5R.js → renderer-G5ESLCJB.js} +9 -8
  170. package/dist/{renderer-P3YQES7B.js → renderer-HTDS4FED.js} +9 -8
  171. package/dist/{renderer-YEFOOULC.js → renderer-IO4KCFVL.js} +8 -8
  172. package/dist/{renderer-FXMGCSRP.js → renderer-IRAFJNTK.js} +7 -6
  173. package/dist/{renderer-SES7QZYL.js → renderer-MFTTFW32.js} +9 -8
  174. package/dist/{renderer-Z4GNKNXO.js → renderer-MPXI4FVL.js} +6 -6
  175. package/dist/{renderer-RA4PTAMF.js → renderer-NVBEMQ6L.js} +5 -5
  176. package/dist/{renderer-7ZNVOVFG.js → renderer-OOGDCR6K.js} +3 -3
  177. package/dist/{renderer-CJ56SUMF.js → renderer-Q5P72O4A.js} +7 -7
  178. package/dist/{renderer-WCWI4I6A.js → renderer-QZESC66H.js} +2 -2
  179. package/dist/{renderer-B7Y6I7JX.js → renderer-RDBUXW7P.js} +4 -4
  180. package/dist/{renderer-V5SNTPAM.js → renderer-S4XB3JR2.js} +9 -9
  181. package/dist/{renderer-COJZZ4F6.js → renderer-SIWEEWJ5.js} +7 -6
  182. package/dist/{renderer-C3RI4OPJ.js → renderer-TKTM2SL4.js} +8 -7
  183. package/dist/{renderer-WVD6G2TS.js → renderer-TXTTV4HA.js} +8 -7
  184. package/dist/{renderer-HQ4JFZOV.js → renderer-UZIU4AHK.js} +7 -6
  185. package/dist/{renderer-3VY3VXJE.js → renderer-V72VJIGG.js} +9 -8
  186. package/dist/{renderer-PLVIARM7.js → renderer-VEGOEZOI.js} +7 -6
  187. package/dist/{renderer-OZX5KGQM.js → renderer-W6I6T2TA.js} +6 -6
  188. package/dist/{renderer-TQ5QDZOE.js → renderer-WSHJRR2T.js} +6 -6
  189. package/dist/{renderer-radial-VYBZAXXE.js → renderer-radial-AG75PBYD.js} +7 -7
  190. package/dist/{resolver-WFKZYBJ2.js → resolver-ZSFQQRTH.js} +3 -3
  191. package/dist/{state-parser-VIW2WNA5.js → state-parser-KIPZGIB4.js} +5 -5
  192. package/dist/{state-renderer-H22AQD3U.js → state-renderer-U6OSJG52.js} +9 -8
  193. package/docs/language-reference.md +2 -1
  194. package/package.json +1 -1
  195. package/dist/dgmo-router-TGZWFIZO.js +0 -88
  196. package/dist/parser-6GN5YJBJ.js +0 -13
@@ -15,9 +15,15 @@ import {
15
15
  import {
16
16
  ScaleContext
17
17
  } from "./chunk-YYVTBZZC.js";
18
+ import {
19
+ layoutInlineHeader
20
+ } from "./chunk-US3P2DQO.js";
18
21
  import {
19
22
  renderIntegratedLegend
20
- } from "./chunk-2NZOHEP4.js";
23
+ } from "./chunk-ASPS5O6F.js";
24
+ import {
25
+ getLegendExtent
26
+ } from "./chunk-GRXPFBYC.js";
21
27
  import {
22
28
  TITLE_FONT_SIZE,
23
29
  TITLE_FONT_WEIGHT,
@@ -28,7 +34,7 @@ import {
28
34
  } from "./chunk-6KFWC4CO.js";
29
35
  import {
30
36
  parseERDiagram
31
- } from "./chunk-B7N5KYXQ.js";
37
+ } from "./chunk-NL7FUIVD.js";
32
38
  import {
33
39
  LEGEND_HEIGHT
34
40
  } from "./chunk-Q5IHQ4NW.js";
@@ -43,11 +49,12 @@ import {
43
49
  import {
44
50
  resolveTagColor,
45
51
  tagAttrKey
46
- } from "./chunk-AHTTKERF.js";
52
+ } from "./chunk-JR7Q6GHE.js";
47
53
  import {
48
54
  fillModeFromOptions,
55
+ legendInlineRequested,
49
56
  legendSuppressed
50
- } from "./chunk-3FRO35WW.js";
57
+ } from "./chunk-A2ARDILY.js";
51
58
 
52
59
  // src/er/renderer.ts
53
60
  import * as d3Selection from "d3-selection";
@@ -274,7 +281,55 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
274
281
  const sTitleFontSize = ctx.text(TITLE_FONT_SIZE);
275
282
  const sTitleY = ctx.structural(TITLE_Y);
276
283
  const naturalW = diagramW + sDiagramPadding * 2;
277
- const naturalH = diagramH + titleHeight + legendReserveH + sDiagramPadding * 2;
284
+ const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
285
+ const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
286
+ const presentRoles = semanticRoles ? ROLE_ORDER.filter((role) => {
287
+ for (const r of semanticRoles.values()) {
288
+ if (r === role) return true;
289
+ }
290
+ return false;
291
+ }) : [];
292
+ const semanticGroups = presentRoles.length > 0 ? [
293
+ {
294
+ name: "Role",
295
+ entries: presentRoles.map((role) => ({
296
+ value: ROLE_LABELS[role],
297
+ color: palette.colors[ROLE_COLORS[role]]
298
+ }))
299
+ }
300
+ ] : [];
301
+ const showSemanticLegend = semanticRoles !== null && !noLegend && presentRoles.length > 0;
302
+ const inlineRequested = legendInlineRequested(parsed.options);
303
+ const hasLegend = hasTagLegend || showSemanticLegend;
304
+ const inlineLegendGroups = hasTagLegend ? parsed.tagGroups : semanticGroups;
305
+ const inlineActiveGroup = hasTagLegend ? activeTagGroup ?? null : semanticActive ? "Role" : null;
306
+ const inlineContainerW = exportDims?.width ?? naturalW;
307
+ const legendExtent = inlineRequested && hasLegend ? getLegendExtent(
308
+ {
309
+ groups: inlineLegendGroups,
310
+ position: {
311
+ placement: "top-center",
312
+ titleRelation: "inline-with-title"
313
+ },
314
+ mode: exportMode ? "export" : "preview"
315
+ },
316
+ { activeGroup: inlineActiveGroup },
317
+ inlineContainerW
318
+ ) : { width: 0, height: 0 };
319
+ const header = layoutInlineHeader({
320
+ requested: inlineRequested,
321
+ title: parsed.title ?? "",
322
+ hasLegend,
323
+ legendWidth: legendExtent.width,
324
+ legendHeight: legendExtent.height,
325
+ containerWidth: inlineContainerW,
326
+ titleBandHeight: titleHeight,
327
+ legendReserve: legendReserveH,
328
+ titleBaselineY: sTitleY,
329
+ titleFontSize: sTitleFontSize
330
+ });
331
+ const effectiveReserveH = header.inline ? 0 : legendReserveH;
332
+ const naturalH = diagramH + titleHeight + effectiveReserveH + sDiagramPadding * 2;
278
333
  let viewW;
279
334
  let viewH;
280
335
  let scale;
@@ -283,24 +338,24 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
283
338
  if (exportDims) {
284
339
  viewW = exportDims.width ?? naturalW;
285
340
  viewH = exportDims.height ?? naturalH;
286
- const availH = viewH - titleHeight - legendReserveH;
341
+ const availH = viewH - titleHeight - effectiveReserveH;
287
342
  const scaleX = (viewW - sDiagramPadding * 2) / diagramW;
288
343
  const scaleY = (availH - sDiagramPadding * 2) / diagramH;
289
344
  scale = Math.min(MAX_SCALE, scaleX, scaleY);
290
345
  const scaledW = diagramW * scale;
291
346
  offsetX = (viewW - scaledW) / 2;
292
- offsetY = titleHeight + legendReserveH + sDiagramPadding;
347
+ offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
293
348
  } else {
294
349
  viewW = naturalW;
295
350
  viewH = naturalH;
296
351
  scale = 1;
297
352
  offsetX = sDiagramPadding;
298
- offsetY = titleHeight + legendReserveH + sDiagramPadding;
353
+ offsetY = titleHeight + effectiveReserveH + sDiagramPadding;
299
354
  }
300
355
  if (viewW <= 0 || viewH <= 0) return;
301
356
  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
357
  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(
358
+ 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
359
  "cursor",
305
360
  onClickItem && parsed.titleLineNumber ? "pointer" : "default"
306
361
  ).text(parsed.title);
@@ -317,8 +372,6 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
317
372
  }
318
373
  const contentG = svg.append("g").attr("transform", `translate(${offsetX}, ${offsetY}) scale(${scale})`);
319
374
  const seriesColors = getSeriesColors(palette);
320
- const semanticRoles = useSemanticColors ? classifyEREntities([...parsed.tables], [...parsed.relationships]) : null;
321
- const semanticActive = semanticRoles !== null && (semanticColorsActive ?? true);
322
375
  const useLabels = parsed.options["notation"] === "labels";
323
376
  for (const edge of layout.edges) {
324
377
  if (edge.points.length < 2) continue;
@@ -462,46 +515,43 @@ function renderERDiagram(container, parsed, layout, palette, isDark, onClickItem
462
515
  }
463
516
  if (hasTagLegend) {
464
517
  const legendY = sDiagramPadding + titleHeight;
465
- const legendG = svg.append("g").attr("class", "er-tag-legend").attr("transform", `translate(0,${legendY})`);
518
+ const legendG = svg.append("g").attr("class", "er-tag-legend").attr(
519
+ "transform",
520
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
521
+ );
466
522
  renderIntegratedLegend(legendG, {
467
523
  groups: parsed.tagGroups,
468
524
  activeGroup: activeTagGroup ?? null,
469
525
  mode: exportMode ? "export" : "preview",
526
+ position: {
527
+ placement: "top-center",
528
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
529
+ },
470
530
  palette,
471
531
  isDark,
472
532
  width: viewW
473
533
  });
474
534
  legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
475
535
  }
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;
536
+ if (showSemanticLegend) {
537
+ const legendY = sDiagramPadding + titleHeight;
538
+ const legendG = svg.append("g").attr("class", "er-semantic-legend").attr(
539
+ "transform",
540
+ header.inline ? `translate(${header.legendX}, ${header.legendY})` : `translate(0,${legendY})`
541
+ );
542
+ renderIntegratedLegend(legendG, {
543
+ groups: semanticGroups,
544
+ activeGroup: semanticActive ? "Role" : null,
545
+ mode: exportMode ? "export" : "preview",
546
+ position: {
547
+ placement: "top-center",
548
+ titleRelation: header.inline ? "inline-with-title" : "below-title"
549
+ },
550
+ palette,
551
+ isDark,
552
+ width: viewW
482
553
  });
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
- }
554
+ legendG.selectAll("[data-legend-group]").classed("er-legend-group", true);
505
555
  }
506
556
  }
507
557
  function renderERDiagramForExport(content, theme, palette) {
@@ -550,4 +600,4 @@ export {
550
600
  renderERDiagram,
551
601
  renderERDiagramForExport
552
602
  };
553
- //# sourceMappingURL=chunk-FR6UFVSV.js.map
603
+ //# sourceMappingURL=chunk-L2DIXZUT.js.map
@@ -3,7 +3,7 @@ import {
3
3
  layoutJourneyMap,
4
4
  scoreToColor,
5
5
  scoreToCurveY
6
- } from "./chunk-HFEOOQ46.js";
6
+ } from "./chunk-W4TSD3IP.js";
7
7
  import {
8
8
  wrapNoteBody
9
9
  } from "./chunk-UU6LUYUH.js";
@@ -21,13 +21,13 @@ import {
21
21
  } from "./chunk-YYVTBZZC.js";
22
22
  import {
23
23
  renderIntegratedLegend
24
- } from "./chunk-2NZOHEP4.js";
24
+ } from "./chunk-ASPS5O6F.js";
25
25
  import {
26
26
  FONT_FAMILY
27
27
  } from "./chunk-6KFWC4CO.js";
28
28
  import {
29
29
  parseJourneyMap
30
- } from "./chunk-KQ3FNRGR.js";
30
+ } from "./chunk-HUTP35XT.js";
31
31
  import {
32
32
  measureText,
33
33
  truncateText,
@@ -42,10 +42,10 @@ import {
42
42
  import {
43
43
  resolveActiveTagGroup,
44
44
  tagAttrKey
45
- } from "./chunk-AHTTKERF.js";
45
+ } from "./chunk-JR7Q6GHE.js";
46
46
  import {
47
47
  fillModeFromOptions
48
- } from "./chunk-3FRO35WW.js";
48
+ } from "./chunk-A2ARDILY.js";
49
49
 
50
50
  // src/journey-map/renderer.ts
51
51
  import * as d3 from "d3-selection";
@@ -868,4 +868,4 @@ export {
868
868
  renderJourneyMap,
869
869
  renderJourneyMapForExport
870
870
  };
871
- //# sourceMappingURL=chunk-WW4BQ744.js.map
871
+ //# sourceMappingURL=chunk-LCRPGGGS.js.map
@@ -17,10 +17,10 @@ import {
17
17
  import {
18
18
  resolveTagColor,
19
19
  tagAttrKey
20
- } from "./chunk-AHTTKERF.js";
20
+ } from "./chunk-JR7Q6GHE.js";
21
21
  import {
22
22
  fillModeFromOptions
23
- } from "./chunk-3FRO35WW.js";
23
+ } from "./chunk-A2ARDILY.js";
24
24
  import {
25
25
  CATEGORICAL_COLOR_ORDER,
26
26
  resolveColor
@@ -401,4 +401,4 @@ function drawCenteredLabel(g, label, cx, cy, fill, fontSize, tight = false, halo
401
401
  export {
402
402
  renderSwimlaneForExport
403
403
  };
404
- //# sourceMappingURL=chunk-GKYHWJXI.js.map
404
+ //# sourceMappingURL=chunk-LKGQ46P4.js.map
@@ -19,7 +19,7 @@ import {
19
19
  injectDefaultTagMetadata,
20
20
  resolveTagColor,
21
21
  tagAttrKey
22
- } from "./chunk-AHTTKERF.js";
22
+ } from "./chunk-JR7Q6GHE.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-LW7STMYZ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  compactNumber
3
- } from "./chunk-6OYDOQ2Q.js";
3
+ } from "./chunk-WVGNXDEE.js";
4
4
  import {
5
5
  parseInlineMarkdown
6
6
  } from "./chunk-3HDBAXF5.js";
@@ -361,4 +361,4 @@ export {
361
361
  renderGoal,
362
362
  renderGoalForExport
363
363
  };
364
- //# sourceMappingURL=chunk-OR3R27CU.js.map
364
+ //# sourceMappingURL=chunk-M53MDBIW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryCollectNote
3
- } from "./chunk-WWHECSYZ.js";
3
+ } from "./chunk-4R5KIPNX.js";
4
4
  import {
5
5
  resolveNotes
6
6
  } from "./chunk-QZAW5SFH.js";
@@ -19,7 +19,7 @@ import {
19
19
  tagAttrKey,
20
20
  validateTagGroupNames,
21
21
  validateTagValues
22
- } from "./chunk-AHTTKERF.js";
22
+ } from "./chunk-JR7Q6GHE.js";
23
23
  import {
24
24
  ALL_CHART_TYPES,
25
25
  FILL_FAMILY_TOKENS,
@@ -32,7 +32,7 @@ import {
32
32
  parseMetadataRegion,
33
33
  tryParseSharedOption,
34
34
  withTagAliases
35
- } from "./chunk-3FRO35WW.js";
35
+ } from "./chunk-A2ARDILY.js";
36
36
  import {
37
37
  resolveColorWithDiagnostic
38
38
  } from "./chunk-ZKPPI6BF.js";
@@ -543,4 +543,4 @@ export {
543
543
  parseState,
544
544
  looksLikeState
545
545
  };
546
- //# sourceMappingURL=chunk-T7Y554OK.js.map
546
+ //# sourceMappingURL=chunk-MEH4TJEX.js.map
@@ -10,7 +10,7 @@ import {
10
10
  tagAttrKey,
11
11
  validateTagGroupNames,
12
12
  validateTagValues
13
- } from "./chunk-AHTTKERF.js";
13
+ } from "./chunk-JR7Q6GHE.js";
14
14
  import {
15
15
  OPTION_NOCOLON_RE,
16
16
  ORG_REGISTRY,
@@ -20,7 +20,7 @@ import {
20
20
  splitNameAndMeta,
21
21
  warnUnknownMetaKeys,
22
22
  withTagAliases
23
- } from "./chunk-3FRO35WW.js";
23
+ } from "./chunk-A2ARDILY.js";
24
24
  import {
25
25
  formatDgmoError,
26
26
  makeDgmoError,
@@ -362,4 +362,4 @@ export {
362
362
  looksLikeOrg,
363
363
  parseOrg
364
364
  };
365
- //# sourceMappingURL=chunk-T3FAJAJT.js.map
365
+ //# sourceMappingURL=chunk-MNS2ENXF.js.map
@@ -2,7 +2,7 @@ import {
2
2
  extractColor,
3
3
  measureIndent,
4
4
  parseFirstLine
5
- } from "./chunk-3FRO35WW.js";
5
+ } from "./chunk-A2ARDILY.js";
6
6
  import {
7
7
  emit,
8
8
  formatDgmoError,
@@ -507,4 +507,4 @@ export {
507
507
  VERSION_CONTROL_DIAGNOSTICS,
508
508
  parseVersionControl
509
509
  };
510
- //# sourceMappingURL=chunk-CCGWX6AO.js.map
510
+ //# sourceMappingURL=chunk-MSWIBF6J.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tryCollectNote
3
- } from "./chunk-WWHECSYZ.js";
3
+ } from "./chunk-4R5KIPNX.js";
4
4
  import {
5
5
  resolveNotes
6
6
  } from "./chunk-QZAW5SFH.js";
@@ -19,7 +19,7 @@ import {
19
19
  tagAttrKey,
20
20
  validateTagGroupNames,
21
21
  validateTagValues
22
- } from "./chunk-AHTTKERF.js";
22
+ } from "./chunk-JR7Q6GHE.js";
23
23
  import {
24
24
  ER_REGISTRY,
25
25
  OPTION_NOCOLON_RE,
@@ -32,7 +32,7 @@ import {
32
32
  tryParseSharedOption,
33
33
  warnUnknownMetaKeys,
34
34
  withTagAliases
35
- } from "./chunk-3FRO35WW.js";
35
+ } from "./chunk-A2ARDILY.js";
36
36
  import {
37
37
  resolveColorWithDiagnostic
38
38
  } from "./chunk-ZKPPI6BF.js";
@@ -521,4 +521,4 @@ export {
521
521
  looksLikeERDiagram,
522
522
  extractSymbols
523
523
  };
524
- //# sourceMappingURL=chunk-B7N5KYXQ.js.map
524
+ //# sourceMappingURL=chunk-NL7FUIVD.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  isTagBlockHeading,
6
6
  matchTagBlockHeading
7
- } from "./chunk-AHTTKERF.js";
7
+ } from "./chunk-JR7Q6GHE.js";
8
8
  import {
9
9
  makeDgmoError
10
10
  } from "./chunk-4W2PE66Q.js";
@@ -401,4 +401,4 @@ export {
401
401
  normalizePertSourceForShare,
402
402
  resolveOrgImports
403
403
  };
404
- //# sourceMappingURL=chunk-EQOMY4PY.js.map
404
+ //# sourceMappingURL=chunk-NN5TF4OV.js.map
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-YYVTBZZC.js";
8
8
  import {
9
9
  renderIntegratedLegend
10
- } from "./chunk-2NZOHEP4.js";
10
+ } from "./chunk-ASPS5O6F.js";
11
11
  import {
12
12
  getMaxLegendReservedHeight
13
- } from "./chunk-J7HQPVYH.js";
13
+ } from "./chunk-GRXPFBYC.js";
14
14
  import {
15
15
  FONT_FAMILY
16
16
  } from "./chunk-6KFWC4CO.js";
@@ -27,7 +27,7 @@ import {
27
27
  import {
28
28
  fillModeFromOptions,
29
29
  legendSuppressed
30
- } from "./chunk-3FRO35WW.js";
30
+ } from "./chunk-A2ARDILY.js";
31
31
 
32
32
  // src/tech-radar/renderer.ts
33
33
  import * as d3Selection2 from "d3-selection";
@@ -1603,4 +1603,4 @@ export {
1603
1603
  renderTechRadar,
1604
1604
  renderTechRadarForExport
1605
1605
  };
1606
- //# sourceMappingURL=chunk-BZJIITYM.js.map
1606
+ //# sourceMappingURL=chunk-NPPUZ4SK.js.map
@@ -7,7 +7,7 @@ import {
7
7
  tagAttrKey,
8
8
  validateTagGroupNames,
9
9
  validateTagValues
10
- } from "./chunk-AHTTKERF.js";
10
+ } from "./chunk-JR7Q6GHE.js";
11
11
  import {
12
12
  TREEMAP_REGISTRY,
13
13
  extractColor,
@@ -20,7 +20,7 @@ import {
20
20
  stripQuotes,
21
21
  warnUnknownMetaKeys,
22
22
  withTagAliases
23
- } from "./chunk-3FRO35WW.js";
23
+ } from "./chunk-A2ARDILY.js";
24
24
  import {
25
25
  emit,
26
26
  formatDgmoError,
@@ -317,6 +317,10 @@ function handleDirective(trimmed, options, result, pushWarning, lineNumber) {
317
317
  else if (key === "legend") options.noLegend = true;
318
318
  return true;
319
319
  }
320
+ if (/^legend-inline\s*$/i.test(trimmed)) {
321
+ options.legendInline = true;
322
+ return true;
323
+ }
320
324
  {
321
325
  const fm = fillModeFromToken(trimmed);
322
326
  if (fm !== null) {
@@ -436,4 +440,4 @@ export {
436
440
  TREEMAP_DIAGNOSTICS,
437
441
  parseTreemap
438
442
  };
439
- //# sourceMappingURL=chunk-XWODFBHJ.js.map
443
+ //# sourceMappingURL=chunk-NYOOPQFD.js.map
@@ -9,13 +9,13 @@ import {
9
9
  matchTagBlockHeading,
10
10
  stripDefaultModifier,
11
11
  tagAttrKey
12
- } from "./chunk-AHTTKERF.js";
12
+ } from "./chunk-JR7Q6GHE.js";
13
13
  import {
14
14
  extractColor,
15
15
  fillModeFromToken,
16
16
  measureIndent,
17
17
  parseFirstLine
18
- } from "./chunk-3FRO35WW.js";
18
+ } from "./chunk-A2ARDILY.js";
19
19
  import {
20
20
  emit
21
21
  } from "./chunk-4W2PE66Q.js";
@@ -264,4 +264,4 @@ export {
264
264
  parseBody,
265
265
  extractSymbols
266
266
  };
267
- //# sourceMappingURL=chunk-VQFDBNYF.js.map
267
+ //# sourceMappingURL=chunk-O4CZDTQA.js.map
@@ -5,7 +5,7 @@ import {
5
5
  normalizeNumericToken,
6
6
  parseFirstLine,
7
7
  tryParseSharedOption
8
- } from "./chunk-3FRO35WW.js";
8
+ } from "./chunk-A2ARDILY.js";
9
9
  import {
10
10
  makeDgmoError,
11
11
  makeFail
@@ -158,4 +158,4 @@ function parseGoal(content, palette) {
158
158
  export {
159
159
  parseGoal
160
160
  };
161
- //# sourceMappingURL=chunk-FVMKCZHF.js.map
161
+ //# sourceMappingURL=chunk-P5XXIVEU.js.map
@@ -13,7 +13,7 @@ import {
13
13
  tagAttrKey,
14
14
  validateTagGroupNames,
15
15
  validateTagValues
16
- } from "./chunk-AHTTKERF.js";
16
+ } from "./chunk-JR7Q6GHE.js";
17
17
  import {
18
18
  ALL_CHART_TYPES,
19
19
  OPTION_NOCOLON_RE,
@@ -25,7 +25,7 @@ import {
25
25
  tryParseSharedOption,
26
26
  warnUnknownMetaKeys,
27
27
  withTagAliases
28
- } from "./chunk-3FRO35WW.js";
28
+ } from "./chunk-A2ARDILY.js";
29
29
  import {
30
30
  formatDgmoError,
31
31
  makeDgmoError,
@@ -520,4 +520,4 @@ export {
520
520
  looksLikeSitemap,
521
521
  parseSitemap
522
522
  };
523
- //# sourceMappingURL=chunk-F7XM366V.js.map
523
+ //# sourceMappingURL=chunk-PC4YLEKA.js.map
@@ -12,7 +12,7 @@ import {
12
12
  normalizeNumericToken,
13
13
  parseFirstLine,
14
14
  parseSeriesNames
15
- } from "./chunk-3FRO35WW.js";
15
+ } from "./chunk-A2ARDILY.js";
16
16
  import {
17
17
  RECOGNIZED_COLOR_NAMES,
18
18
  resolveColorWithDiagnostic
@@ -57,6 +57,7 @@ var KNOWN_BOOLEANS = /* @__PURE__ */ new Set([
57
57
  "fill-outline",
58
58
  "no-title",
59
59
  "no-legend",
60
+ "legend-inline",
60
61
  "no-auto-y",
61
62
  "fill",
62
63
  "hole"
@@ -202,6 +203,8 @@ function parseChart(content, palette) {
202
203
  result.noTitle = true;
203
204
  } else if (firstToken === "no-legend") {
204
205
  result.noLegend = true;
206
+ } else if (firstToken === "legend-inline") {
207
+ result.legendInline = true;
205
208
  } else if (firstToken === "no-auto-y") {
206
209
  result.noAutoY = true;
207
210
  } else if (firstToken === "fill") {
@@ -787,7 +790,7 @@ function parseExtendedChartFull(content, palette) {
787
790
  const spaceIdx2 = trimmed.indexOf(" ");
788
791
  const lastTok = trimmed.substring(trimmed.lastIndexOf(" ") + 1);
789
792
  const hasNumericSuffix = spaceIdx2 >= 0 && !isNaN(parseFloat(normalizeNumericToken(lastTok) ?? lastTok));
790
- const isBareKeywordOption = spaceIdx2 < 0 && /^(fill-tint|fill-solid|fill-outline|no-name|no-value|no-percent|shade|no-title)$/i.test(
793
+ const isBareKeywordOption = spaceIdx2 < 0 && /^(fill|fill-tint|fill-solid|fill-outline|no-name|no-value|no-percent|no-title)$/i.test(
791
794
  trimmed
792
795
  );
793
796
  const leadToken = spaceIdx2 >= 0 ? trimmed.substring(0, spaceIdx2).toLowerCase() : "";
@@ -919,8 +922,8 @@ function parseExtendedChartFull(content, palette) {
919
922
  result.noPercent = true;
920
923
  continue;
921
924
  }
922
- if (firstToken === "shade") {
923
- result.shade = true;
925
+ if (firstToken === "fill" && spaceIdx < 0) {
926
+ result.fill = true;
924
927
  continue;
925
928
  }
926
929
  const fillFamily = fillModeFromToken(firstToken);
@@ -937,6 +940,10 @@ function parseExtendedChartFull(content, palette) {
937
940
  result.noLegend = true;
938
941
  continue;
939
942
  }
943
+ if (firstToken === "legend-inline" && spaceIdx < 0) {
944
+ result.legendInline = true;
945
+ continue;
946
+ }
940
947
  if (firstToken.startsWith("no-") && spaceIdx < 0) {
941
948
  continue;
942
949
  }
@@ -1147,4 +1154,4 @@ export {
1147
1154
  getSimpleChartLegendGroups,
1148
1155
  getExtendedChartLegendGroups
1149
1156
  };
1150
- //# sourceMappingURL=chunk-AQEYUVGJ.js.map
1157
+ //# sourceMappingURL=chunk-PCVXXPYU.js.map