@diagrammo/dgmo 0.64.1 → 0.65.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 (148) hide show
  1. package/LICENSE +1 -1
  2. package/dist/advanced.d.ts +6771 -0
  3. package/dist/advanced.js +71 -71
  4. package/dist/block.d.ts +142 -0
  5. package/dist/block.js +15 -15
  6. package/dist/chart-meta-D98NbYDp.d.ts +238 -0
  7. package/dist/chart-meta.d.ts +2 -0
  8. package/dist/chart-meta.js +3 -3
  9. package/dist/{charts-d3-ZTXJWEHI.js → charts-d3-I6OE5K3B.js} +9 -9
  10. package/dist/{chunk-C6DMG2V6.js → chunk-27YPE7NO.js} +28 -12
  11. package/dist/{chunk-RBAW7VUG.js → chunk-2EPV7CLY.js} +5 -7
  12. package/dist/{chunk-SCJ7CAJF.js → chunk-3HOCNSPD.js} +2 -2
  13. package/dist/{chunk-Z2ADWRSW.js → chunk-3PSPUYT5.js} +3 -3
  14. package/dist/{chunk-RBBJIHNL.js → chunk-4IE42ODL.js} +11 -11
  15. package/dist/{chunk-SMCUX42K.js → chunk-4TM7MWU4.js} +7 -6
  16. package/dist/{chunk-H3HFC3SQ.js → chunk-5GM6BZO7.js} +3 -3
  17. package/dist/{chunk-7T3A2UK3.js → chunk-5T7K6QND.js} +15 -16
  18. package/dist/{chunk-NKRCPBTJ.js → chunk-6BOPYGJC.js} +6 -6
  19. package/dist/{chunk-37EHGTQ2.js → chunk-6E5YZR4S.js} +18 -16
  20. package/dist/{chunk-MHI6W6XS.js → chunk-6IUL6LER.js} +10 -7
  21. package/dist/{chunk-S5RWWISJ.js → chunk-7L53J53J.js} +4 -4
  22. package/dist/{chunk-WDJ4HAGO.js → chunk-A6CTYC7O.js} +2 -2
  23. package/dist/{chunk-CDMF7P5A.js → chunk-BBCKUAUR.js} +2 -2
  24. package/dist/{chunk-AA4M6F2P.js → chunk-BBY57XAA.js} +3 -3
  25. package/dist/{chunk-NKRVFQGO.js → chunk-BDI25HWH.js} +18 -6
  26. package/dist/{chunk-SVR3YFM3.js → chunk-C666LP3O.js} +20 -15
  27. package/dist/{chunk-KRTO7NRK.js → chunk-D2WHS23S.js} +2 -2
  28. package/dist/{chunk-LYTEVE2N.js → chunk-DBF4IM4U.js} +20 -15
  29. package/dist/{chunk-PCWPYOT4.js → chunk-ET4R3AU5.js} +4 -4
  30. package/dist/{chunk-2KOBOIB2.js → chunk-FBD5ASMB.js} +2 -2
  31. package/dist/{chunk-ES66QH6J.js → chunk-FG24NXKN.js} +2 -2
  32. package/dist/{chunk-3CIOJ5YJ.js → chunk-FJ57274M.js} +3 -1
  33. package/dist/{chunk-6BVIZW5N.js → chunk-FLFBY5GN.js} +14 -12
  34. package/dist/{chunk-XUN3MIO3.js → chunk-G64OVYUT.js} +2 -2
  35. package/dist/{chunk-RQL25P3U.js → chunk-G7QZF6T3.js} +9 -9
  36. package/dist/{chunk-IGIJZHB6.js → chunk-GC7CBX6C.js} +6 -6
  37. package/dist/{chunk-B6AONGTI.js → chunk-GDQN2TPX.js} +21 -14
  38. package/dist/{chunk-CZUSH6NI.js → chunk-GMLSYNFP.js} +10 -9
  39. package/dist/{chunk-R6HCNSP6.js → chunk-GOW5VO6M.js} +2 -2
  40. package/dist/{chunk-SPHC4RYF.js → chunk-GXOMKWQ5.js} +10 -9
  41. package/dist/{chunk-MQHOKBJ6.js → chunk-IJ4FUFTR.js} +5 -5
  42. package/dist/{chunk-V3UQSKWJ.js → chunk-IJSFEU4J.js} +9 -9
  43. package/dist/{chunk-LSFZDBAP.js → chunk-IKHV5IJB.js} +2 -2
  44. package/dist/{chunk-LMXAB4YM.js → chunk-IZ6RWMBM.js} +9 -9
  45. package/dist/{chunk-6VJCURWU.js → chunk-J2EXBAPZ.js} +4 -5
  46. package/dist/{chunk-IX6N5MCY.js → chunk-JCL4K7AK.js} +12 -11
  47. package/dist/{chunk-OBKM6GIJ.js → chunk-JTUDM7S4.js} +10 -10
  48. package/dist/{chunk-CVVICCSB.js → chunk-L65WI4HO.js} +4 -4
  49. package/dist/{chunk-67D4MN2H.js → chunk-LK6LTSLH.js} +2 -2
  50. package/dist/{chunk-KOHIF4LD.js → chunk-MBODBL7C.js} +6 -5
  51. package/dist/chunk-MTGGOCND.js +638 -0
  52. package/dist/{chunk-VJARCVMH.js → chunk-MU3CJPJF.js} +2 -2
  53. package/dist/{chunk-RKTIIU7Z.js → chunk-N6XI5VTA.js} +4 -4
  54. package/dist/{chunk-ODUT5WMC.js → chunk-NVOU7N6C.js} +2 -2
  55. package/dist/{chunk-T4QXHE34.js → chunk-OWUWLZJT.js} +13 -11
  56. package/dist/{chunk-LDVUPGWC.js → chunk-OWVDD5EC.js} +2 -2
  57. package/dist/{chunk-M4HYPDER.js → chunk-P5OCINCI.js} +8 -8
  58. package/dist/{chunk-JU2VMFYC.js → chunk-PZOFMBF3.js} +2 -2
  59. package/dist/{chunk-YLK3JNWP.js → chunk-QNCXONBR.js} +2 -2
  60. package/dist/{chunk-DB2KQ5DN.js → chunk-QRWY5QTA.js} +5 -5
  61. package/dist/{chunk-I2ATN25N.js → chunk-R4XM44BW.js} +25 -16
  62. package/dist/{chunk-DJCZWQ2A.js → chunk-RTTZIX34.js} +4 -4
  63. package/dist/{chunk-OMTBYLKN.js → chunk-TPKNA2U5.js} +9 -7
  64. package/dist/{chunk-DN5HEDE4.js → chunk-TT5B36WO.js} +16 -20
  65. package/dist/{chunk-SF3JAWMY.js → chunk-TWILCDUE.js} +3 -3
  66. package/dist/{chunk-NIZM3LAG.js → chunk-UINRIO77.js} +10 -10
  67. package/dist/{chunk-5H2LIQIH.js → chunk-UJXCDF4E.js} +4 -4
  68. package/dist/{chunk-Z5ID35YP.js → chunk-UTCPNJND.js} +2 -4
  69. package/dist/{chunk-U42ZEK7L.js → chunk-V4BYBIBU.js} +24 -15
  70. package/dist/{chunk-L4IN4OBB.js → chunk-VLI5SYXW.js} +7 -7
  71. package/dist/{chunk-43E26CDA.js → chunk-VS2M72PF.js} +4 -4
  72. package/dist/{chunk-KZ3PCDUJ.js → chunk-VV6HZQ5K.js} +2 -2
  73. package/dist/{chunk-Z5BTSBWW.js → chunk-WF2HDQPG.js} +4 -4
  74. package/dist/{chunk-TAJ2XFTT.js → chunk-XKMCL2YJ.js} +19 -16
  75. package/dist/{chunk-7GUYGQR4.js → chunk-XVEPB2UU.js} +4 -4
  76. package/dist/{chunk-YHTKDIF2.js → chunk-YGFNITPC.js} +11 -11
  77. package/dist/{chunk-I24O2RWT.js → chunk-YJOOIOSR.js} +84 -14
  78. package/dist/{chunk-KPX2OWZR.js → chunk-YKWHUPBP.js} +13 -14
  79. package/dist/{chunk-FRC4LDTQ.js → chunk-YMYPFX4O.js} +36 -30
  80. package/dist/{chunk-VOJOARA6.js → chunk-ZZXPYVS4.js} +82 -77
  81. package/dist/cloud-reference.d.ts +96 -0
  82. package/dist/completion-registry.d.ts +129 -0
  83. package/dist/{dgmo-router-QWRF7ZKM.js → dgmo-router-464FE256.js} +4 -4
  84. package/dist/dgmo-router-Dd5PTjxl.d.ts +540 -0
  85. package/dist/{dimensions-ES6O2T4H.js → dimensions-ILAVBRQ3.js} +7 -7
  86. package/dist/{flowchart-renderer-EXMRHFTQ.js → flowchart-renderer-6JKM2FA4.js} +7 -7
  87. package/dist/index.d.ts +207 -0
  88. package/dist/index.js +15 -15
  89. package/dist/{layout-HBWT2G23.js → layout-4LNMXLVK.js} +3 -3
  90. package/dist/{layout-UU4VJTOP.js → layout-62ERBWCM.js} +3 -3
  91. package/dist/{layout-N6X46MWG.js → layout-6SKHNQYO.js} +4 -4
  92. package/dist/{layout-OH4VQ3OI.js → layout-7JULRP4Y.js} +4 -4
  93. package/dist/{layout-QTZO6CW5.js → layout-FA37VP7V.js} +4 -4
  94. package/dist/layout-IN53LAE6.js +9 -0
  95. package/dist/{layout-H4H4OFE4.js → layout-IO6ORC5T.js} +3 -3
  96. package/dist/{layout-54P3DAXY.js → layout-LVMWK4QY.js} +5 -5
  97. package/dist/{layout-WCOEZPOI.js → layout-MNOTDWXW.js} +4 -4
  98. package/dist/{layout-2T2VCCTM.js → layout-RD7GDM4I.js} +5 -5
  99. package/dist/{layout-SKQMIXTG.js → layout-SBQTN2YM.js} +4 -4
  100. package/dist/{layout-5E2NQZNM.js → layout-SGYR6HBX.js} +3 -3
  101. package/dist/{layout-W3ZBJOIK.js → layout-WIMQIHBU.js} +5 -5
  102. package/dist/{layout-search-AJ6VUVUI.js → layout-search-C44CJQOB.js} +5 -5
  103. package/dist/{legend-constants-QQU3QYBF.js → legend-constants-RGINV5SF.js} +3 -3
  104. package/dist/live-link-resolve.d.ts +73 -0
  105. package/dist/{parser-KSIYWKYF.js → parser-CSKF2KNO.js} +8 -4
  106. package/dist/{parser-2BGDJJ2L.js → parser-WLL63XH7.js} +2 -2
  107. package/dist/{renderer-XLEYPLVL.js → renderer-2UIQVKXK.js} +8 -8
  108. package/dist/{renderer-KOWVTTYR.js → renderer-3GG2DEFQ.js} +7 -7
  109. package/dist/{renderer-XLPNUOYA.js → renderer-6NDYVZXQ.js} +10 -10
  110. package/dist/{renderer-2ARNFXSC.js → renderer-6ST44AVP.js} +10 -10
  111. package/dist/{renderer-YLM4CGBG.js → renderer-ALP46W2X.js} +8 -8
  112. package/dist/{renderer-NHFRVCDC.js → renderer-AOFIEF2T.js} +9 -9
  113. package/dist/{renderer-HLWEJQJW.js → renderer-BEVY3UP5.js} +5 -5
  114. package/dist/{renderer-H6AQ4UIR.js → renderer-BXPWSNTJ.js} +13 -13
  115. package/dist/{renderer-BYWLJDT4.js → renderer-EWTETTII.js} +8 -8
  116. package/dist/{renderer-KK2534AF.js → renderer-FHXAWDNI.js} +4 -4
  117. package/dist/{renderer-OB77AT7V.js → renderer-FI4IKF4I.js} +7 -7
  118. package/dist/{renderer-DMVUBKP7.js → renderer-GHYH6DLG.js} +4 -4
  119. package/dist/{renderer-LSBXYOID.js → renderer-GYYJ4APT.js} +10 -10
  120. package/dist/{renderer-M43ROWET.js → renderer-JFOHE3YB.js} +9 -9
  121. package/dist/{renderer-OA7FSZ4A.js → renderer-L5QGQTLV.js} +3 -3
  122. package/dist/{renderer-7OOC2ZO2.js → renderer-L7S6YVM6.js} +4 -4
  123. package/dist/{renderer-YELZR4QT.js → renderer-LCHVBTV4.js} +12 -12
  124. package/dist/{renderer-IN3UPTZS.js → renderer-M4DAYNWC.js} +3 -3
  125. package/dist/{renderer-WN47AMUM.js → renderer-NXIK3LOA.js} +8 -8
  126. package/dist/{renderer-QR5343AR.js → renderer-OWUXQDHM.js} +3 -3
  127. package/dist/{renderer-FCO42JLK.js → renderer-PJNJOCLB.js} +8 -8
  128. package/dist/{renderer-OYTERGAO.js → renderer-QQBUBD66.js} +9 -9
  129. package/dist/{renderer-PM7JPC3J.js → renderer-REFE3YFH.js} +11 -11
  130. package/dist/{renderer-C6KOE774.js → renderer-RL2JGVPC.js} +10 -10
  131. package/dist/{renderer-ZNTLBQ45.js → renderer-RVFPPKWN.js} +9 -9
  132. package/dist/{renderer-QEHUJHRK.js → renderer-SFQHFPC5.js} +10 -10
  133. package/dist/{renderer-LO4FXQHP.js → renderer-T4CMBGA5.js} +8 -8
  134. package/dist/{renderer-M3PQKXK2.js → renderer-TJD6A3AK.js} +13 -13
  135. package/dist/{renderer-2E7LQC32.js → renderer-URPIVAPI.js} +3 -3
  136. package/dist/{renderer-T5CUGSXP.js → renderer-WENGQEX6.js} +7 -7
  137. package/dist/{renderer-WR3FA3FF.js → renderer-WR6J7NKH.js} +8 -8
  138. package/dist/{renderer-YBEZ5V2H.js → renderer-X3V2G4UL.js} +3 -3
  139. package/dist/{renderer-KPEQ72FY.js → renderer-YAW4VHAI.js} +11 -11
  140. package/dist/{renderer-radial-XWAKJACV.js → renderer-radial-HOUGPUPW.js} +7 -7
  141. package/dist/{state-renderer-LIESKSBO.js → state-renderer-JJSQJZEL.js} +11 -11
  142. package/dist/themes-DiUAG4Bf.d.ts +631 -0
  143. package/docs/ai-integration.md +1 -1
  144. package/docs/language-reference.md +5 -0
  145. package/gallery/fixtures/er.dgmo +1 -1
  146. package/package.json +5 -3
  147. package/dist/chunk-4ASYQ347.js +0 -185
  148. package/dist/layout-5XGYNYVT.js +0 -9
@@ -2,7 +2,7 @@ import {
2
2
  computeQuadrantPointLabels,
3
3
  rectCircleOverlap,
4
4
  rectsOverlap
5
- } from "./chunk-CVVICCSB.js";
5
+ } from "./chunk-L65WI4HO.js";
6
6
  import {
7
7
  EXPORT_HEIGHT,
8
8
  EXPORT_WIDTH,
@@ -11,10 +11,10 @@ import {
11
11
  initD3Chart,
12
12
  renderChartTitle,
13
13
  resolveExportPalette
14
- } from "./chunk-67D4MN2H.js";
14
+ } from "./chunk-LK6LTSLH.js";
15
15
  import {
16
16
  layoutInlineHeader
17
- } from "./chunk-6VJCURWU.js";
17
+ } from "./chunk-J2EXBAPZ.js";
18
18
  import {
19
19
  TITLE_FONT_SIZE,
20
20
  TITLE_FONT_WEIGHT,
@@ -23,21 +23,20 @@ import {
23
23
  } from "./chunk-A4GOY3PE.js";
24
24
  import {
25
25
  computeLegendLayout
26
- } from "./chunk-ES66QH6J.js";
26
+ } from "./chunk-FG24NXKN.js";
27
27
  import {
28
- FONT_CENTRAL_DY,
29
28
  FONT_FAMILY
30
- } from "./chunk-Z5ID35YP.js";
29
+ } from "./chunk-UTCPNJND.js";
31
30
  import {
32
31
  LEGEND_DOT_R,
33
32
  LEGEND_ENTRY_FONT_SIZE,
34
33
  LEGEND_HEIGHT,
35
34
  LEGEND_PILL_FONT_SIZE,
36
35
  legendChromeColors
37
- } from "./chunk-SCJ7CAJF.js";
36
+ } from "./chunk-3HOCNSPD.js";
38
37
  import {
39
38
  measureText
40
- } from "./chunk-4ASYQ347.js";
39
+ } from "./chunk-MTGGOCND.js";
41
40
  import {
42
41
  getExtendedChartLegendGroups,
43
42
  getSimpleChartLegendGroups,
@@ -64,9 +63,7 @@ import {
64
63
  } from "./chunk-42IT4BG2.js";
65
64
 
66
65
  // src/utils/legend-svg.ts
67
- function baselineY(centerY, fontSize) {
68
- return centerY + fontSize * FONT_CENTRAL_DY;
69
- }
66
+ var CENTER = 'dominant-baseline="central"';
70
67
  function esc(s) {
71
68
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
72
69
  }
@@ -81,19 +78,19 @@ function emitCapsule(capsule, palette, groupBg, pillBorder) {
81
78
  `<rect x="${pill.x}" y="${pill.y}" width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="none" stroke="${esc(pillBorder)}" stroke-width="0.75"/>`
82
79
  );
83
80
  inner.push(
84
- `<text x="${pill.x + pill.width / 2}" y="${baselineY(LEGEND_HEIGHT / 2, LEGEND_PILL_FONT_SIZE)}" font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.text)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(capsule.groupName)}</text>`
81
+ `<text x="${pill.x + pill.width / 2}" y="${LEGEND_HEIGHT / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.text)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(capsule.groupName)}</text>`
85
82
  );
86
83
  for (const entry of capsule.entries) {
87
84
  const label = entry.displayValue ?? entry.value;
88
85
  const hit = entry.width != null ? `<rect x="${entry.x}" y="${entry.y}" width="${entry.width}" height="${LEGEND_HEIGHT}" fill="transparent"/>` : "";
89
86
  inner.push(
90
- `<g data-legend-entry="${esc(entry.value.toLowerCase())}" data-series-name="${esc(entry.value)}" style="cursor:pointer">` + hit + `<circle cx="${entry.dotCx}" cy="${entry.dotCy}" r="${LEGEND_DOT_R}" fill="${esc(entry.color)}"/><text x="${entry.textX}" y="${baselineY(entry.dotCy, LEGEND_ENTRY_FONT_SIZE)}" font-size="${LEGEND_ENTRY_FONT_SIZE}" fill="${esc(palette.textMuted)}" font-family="${esc(FONT_FAMILY)}">${esc(label)}</text></g>`
87
+ `<g data-legend-entry="${esc(entry.value.toLowerCase())}" data-series-name="${esc(entry.value)}" style="cursor:pointer">` + hit + `<circle cx="${entry.dotCx}" cy="${entry.dotCy}" r="${LEGEND_DOT_R}" fill="${esc(entry.color)}"/><text x="${entry.textX}" y="${entry.dotCy}" ${CENTER} font-size="${LEGEND_ENTRY_FONT_SIZE}" fill="${esc(palette.textMuted)}" font-family="${esc(FONT_FAMILY)}">${esc(label)}</text></g>`
91
88
  );
92
89
  }
93
90
  return `<g transform="translate(${capsule.x},${capsule.y})" data-legend-group="${esc(tagAttrKey(capsule.groupName))}" style="cursor:pointer">${inner.join("")}</g>`;
94
91
  }
95
92
  function emitPill(pill, palette, groupBg) {
96
- return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${baselineY(pill.height / 2, LEGEND_PILL_FONT_SIZE)}" font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.textMuted)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(pill.groupName)}</text></g>`;
93
+ return `<g transform="translate(${pill.x},${pill.y})" data-legend-group="${esc(tagAttrKey(pill.groupName))}" style="cursor:pointer"><rect width="${pill.width}" height="${pill.height}" rx="${pill.height / 2}" fill="${esc(groupBg)}"/><text x="${pill.width / 2}" y="${pill.height / 2}" ${CENTER} font-size="${LEGEND_PILL_FONT_SIZE}" font-weight="500" fill="${esc(palette.textMuted)}" text-anchor="middle" font-family="${esc(FONT_FAMILY)}">${esc(pill.groupName)}</text></g>`;
97
94
  }
98
95
  function renderLegendSvg(groups, options) {
99
96
  if (groups.length === 0) return { svg: "", height: 0, width: 0 };
@@ -1061,7 +1058,9 @@ function renderHeatmap(svg, chart, width, height, palette, isDark, textColor, bg
1061
1058
  const REF = 100;
1062
1059
  const maxValueW = Math.max(
1063
1060
  1,
1064
- ...rows.flatMap((r) => r.values.map((v) => measureText(fmtNum(v), REF)))
1061
+ ...rows.flatMap(
1062
+ (r) => r.values.map((v) => measureText(fmtNum(v), REF, { bold: true }))
1063
+ )
1065
1064
  );
1066
1065
  const cellFont = Math.max(
1067
1066
  11,
@@ -2065,4 +2064,4 @@ export {
2065
2064
  supportsD3DataChart,
2066
2065
  renderDataChartD3
2067
2066
  };
2068
- //# sourceMappingURL=chunk-7T3A2UK3.js.map
2067
+ //# sourceMappingURL=chunk-5T7K6QND.js.map
@@ -14,11 +14,11 @@ import {
14
14
  } from "./chunk-A4GOY3PE.js";
15
15
  import {
16
16
  FONT_FAMILY
17
- } from "./chunk-Z5ID35YP.js";
17
+ } from "./chunk-UTCPNJND.js";
18
18
  import {
19
19
  CHAR_WIDTH_RATIO,
20
20
  measureText
21
- } from "./chunk-4ASYQ347.js";
21
+ } from "./chunk-MTGGOCND.js";
22
22
  import {
23
23
  fillModeFromOptions
24
24
  } from "./chunk-P2PUWV3Y.js";
@@ -181,16 +181,16 @@ function renderRing(container, parsed, palette, isDark, onClickItem, exportDims)
181
181
  }
182
182
  var MAX_LABEL_ARC = 1.6 * Math.PI;
183
183
  function drawRingCurvedLabel(labelG, defs, pathId, text, cx, cy, rMid, labelFont, textColor, palette) {
184
- const PAD = 1.18;
184
+ const PAD = 1.14;
185
185
  let fs = labelFont;
186
186
  let rPath = rMid - fs * 0.32;
187
187
  const maxLen = MAX_LABEL_ARC * rPath;
188
- const wPadded = measureText(text, labelFont) * PAD;
188
+ const wPadded = measureText(text, labelFont, { bold: true }) * PAD;
189
189
  if (wPadded > maxLen) {
190
190
  fs = Math.max(LABEL_FONT_MIN, Math.floor(labelFont * maxLen / wPadded));
191
191
  rPath = rMid - fs * 0.32;
192
192
  }
193
- const arcLen = measureText(text, fs) * PAD;
193
+ const arcLen = measureText(text, fs, { bold: true }) * PAD;
194
194
  const halfAngle = Math.min(arcLen / (2 * rPath), MAX_LABEL_ARC / 2);
195
195
  const largeArc = halfAngle * 2 > Math.PI ? 1 : 0;
196
196
  const p0x = cx - Math.sin(halfAngle) * rPath;
@@ -296,4 +296,4 @@ export {
296
296
  renderRing,
297
297
  renderRingForExport
298
298
  };
299
- //# sourceMappingURL=chunk-NKRCPBTJ.js.map
299
+ //# sourceMappingURL=chunk-6BOPYGJC.js.map
@@ -8,7 +8,7 @@ import {
8
8
  rectCircleOverlap,
9
9
  rectsOverlap,
10
10
  segmentRectOverlap
11
- } from "./chunk-CVVICCSB.js";
11
+ } from "./chunk-L65WI4HO.js";
12
12
  import {
13
13
  TITLE_FONT_SIZE,
14
14
  TITLE_Y
@@ -16,10 +16,10 @@ import {
16
16
  import {
17
17
  compactNumber,
18
18
  computeLegendLayout
19
- } from "./chunk-ES66QH6J.js";
19
+ } from "./chunk-FG24NXKN.js";
20
20
  import {
21
21
  measureLegendText
22
- } from "./chunk-SCJ7CAJF.js";
22
+ } from "./chunk-3HOCNSPD.js";
23
23
  import {
24
24
  tagAttrKey
25
25
  } from "./chunk-MDI5FMWO.js";
@@ -1036,6 +1036,20 @@ function createLabelMetrics(size) {
1036
1036
  };
1037
1037
  }
1038
1038
 
1039
+ // src/map/layout-constants.ts
1040
+ var FIT_PAD = 24;
1041
+ var WORLD_LABEL_ANCHORS = {
1042
+ US: [-98.5, 39.5],
1043
+ // CONUS geographic centre (near Lebanon, Kansas)
1044
+ // Russia crosses the antimeridian (Chukotka at ~170°W), so on a non-global
1045
+ // (e.g. Europe) projection its geometry smears across the whole frame and the
1046
+ // area-weighted centroid lands mid-map (over Europe) — useless as a label
1047
+ // anchor. Pin it to European Russia (~Volga) so a Europe view labels visible
1048
+ // western Russia on its eastern margin; on a world view this still sits over
1049
+ // Russian land. (See the curated-anchor smear-gate bypass in context-labels.)
1050
+ RU: [45, 58]
1051
+ };
1052
+
1039
1053
  // src/map/region-labels.ts
1040
1054
  function placeRegionLabels(args) {
1041
1055
  const {
@@ -1438,7 +1452,6 @@ function placeRegionLabels(args) {
1438
1452
  }
1439
1453
 
1440
1454
  // src/map/layout.ts
1441
- var FIT_PAD = 24;
1442
1455
  var PATH_DIGITS = 1;
1443
1456
  var THIN_TOL = 0.6;
1444
1457
  var ALBERS_SKEW_MAX = 1.25;
@@ -1483,17 +1496,6 @@ var R_MIN = 4;
1483
1496
  var R_MAX = 22;
1484
1497
  var POI_FILL_OPACITY_MAX = 0.92;
1485
1498
  var POI_FILL_OPACITY_MIN = 0.55;
1486
- var WORLD_LABEL_ANCHORS = {
1487
- US: [-98.5, 39.5],
1488
- // CONUS geographic centre (near Lebanon, Kansas)
1489
- // Russia crosses the antimeridian (Chukotka at ~170°W), so on a non-global
1490
- // (e.g. Europe) projection its geometry smears across the whole frame and the
1491
- // area-weighted centroid lands mid-map (over Europe) — useless as a label
1492
- // anchor. Pin it to European Russia (~Volga) so a Europe view labels visible
1493
- // western Russia on its eastern margin; on a world view this still sits over
1494
- // Russian land. (See the curated-anchor smear-gate bypass in context-labels.)
1495
- RU: [45, 58]
1496
- };
1497
1499
  var MAX_CLUSTER_EXTENT_FACTOR = 0.18;
1498
1500
  var MAX_COLUMN_ROWS = 7;
1499
1501
  var REGION_LABEL_HALO_RATIO = 4.5;
@@ -3363,4 +3365,4 @@ export {
3363
3365
  albersSkewFallback,
3364
3366
  layoutMap
3365
3367
  };
3366
- //# sourceMappingURL=chunk-37EHGTQ2.js.map
3368
+ //# sourceMappingURL=chunk-6E5YZR4S.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-YYVTBZZC.js";
10
10
  import {
11
11
  layoutInlineHeader
12
- } from "./chunk-6VJCURWU.js";
12
+ } from "./chunk-J2EXBAPZ.js";
13
13
  import {
14
14
  TITLE_FONT_SIZE,
15
15
  TITLE_FONT_WEIGHT,
@@ -17,18 +17,18 @@ import {
17
17
  } from "./chunk-A4GOY3PE.js";
18
18
  import {
19
19
  renderIntegratedLegend
20
- } from "./chunk-RBAW7VUG.js";
20
+ } from "./chunk-2EPV7CLY.js";
21
21
  import {
22
22
  getLegendExtent,
23
23
  getMaxLegendReservedHeight
24
- } from "./chunk-ES66QH6J.js";
24
+ } from "./chunk-FG24NXKN.js";
25
25
  import {
26
26
  FONT_FAMILY
27
- } from "./chunk-Z5ID35YP.js";
27
+ } from "./chunk-UTCPNJND.js";
28
28
  import {
29
29
  measureText,
30
30
  truncateText
31
- } from "./chunk-4ASYQ347.js";
31
+ } from "./chunk-MTGGOCND.js";
32
32
  import {
33
33
  isSequenceBlock,
34
34
  isSequenceNote,
@@ -1645,7 +1645,10 @@ function renderSequenceDiagram(container, parsed, palette, isDark, _onNavigateTo
1645
1645
  const msgCount = sectionMsgCounts.get(sec.lineNumber) ?? 0;
1646
1646
  const labelText = isCollapsed ? `${sec.label} (${msgCount} ${msgCount === 1 ? "message" : "messages"})` : sec.label;
1647
1647
  const labelX = (sectionLineX1 + sectionLineX2) / 2;
1648
- const labelHitW = Math.max(80, measureText(labelText, 11) + 24);
1648
+ const labelHitW = Math.max(
1649
+ 80,
1650
+ measureText(labelText, 11, { bold: true }) + 24
1651
+ );
1649
1652
  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");
1650
1653
  sectionG.append("text").attr("x", labelX).attr("y", secY + 4).attr("text-anchor", "middle").attr("fill", lineColor).attr("font-size", 11).attr("font-weight", "bold").attr("class", "section-label").text(labelText);
1651
1654
  }
@@ -1907,4 +1910,4 @@ export {
1907
1910
  renderSequenceDiagram,
1908
1911
  buildNoteMessageMap
1909
1912
  };
1910
- //# sourceMappingURL=chunk-MHI6W6XS.js.map
1913
+ //# sourceMappingURL=chunk-6IUL6LER.js.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  FONT_FAMILY
3
- } from "./chunk-Z5ID35YP.js";
3
+ } from "./chunk-UTCPNJND.js";
4
4
  import {
5
5
  measureText,
6
6
  truncateText
7
- } from "./chunk-4ASYQ347.js";
7
+ } from "./chunk-MTGGOCND.js";
8
8
  import {
9
9
  encodeDiagramUrl
10
10
  } from "./chunk-U7VO6JAA.js";
11
11
  import {
12
12
  parseDgmoChartType
13
- } from "./chunk-AA4M6F2P.js";
13
+ } from "./chunk-BBY57XAA.js";
14
14
  import {
15
15
  chartTypes
16
16
  } from "./chunk-P2PUWV3Y.js";
@@ -204,4 +204,4 @@ export {
204
204
  MONO_FAMILY,
205
205
  renderErrorCard
206
206
  };
207
- //# sourceMappingURL=chunk-S5RWWISJ.js.map
207
+ //# sourceMappingURL=chunk-7L53J53J.js.map
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-A4GOY3PE.js";
10
10
  import {
11
11
  FONT_FAMILY
12
- } from "./chunk-Z5ID35YP.js";
12
+ } from "./chunk-UTCPNJND.js";
13
13
  import {
14
14
  getSeriesColors,
15
15
  mix,
@@ -361,4 +361,4 @@ export {
361
361
  renderGoal,
362
362
  renderGoalForExport
363
363
  };
364
- //# sourceMappingURL=chunk-WDJ4HAGO.js.map
364
+ //# sourceMappingURL=chunk-A6CTYC7O.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-FWVKPEG3.js";
4
4
  import {
5
5
  FONT_FAMILY
6
- } from "./chunk-Z5ID35YP.js";
6
+ } from "./chunk-UTCPNJND.js";
7
7
  import {
8
8
  fixedParts,
9
9
  fixedTimeCells,
@@ -558,4 +558,4 @@ export {
558
558
  renderClock,
559
559
  renderClockForExport
560
560
  };
561
- //# sourceMappingURL=chunk-CDMF7P5A.js.map
561
+ //# sourceMappingURL=chunk-BBCKUAUR.js.map
@@ -72,7 +72,7 @@ import {
72
72
  import {
73
73
  isLiveLinkLine,
74
74
  parseLiveLink
75
- } from "./chunk-6BVIZW5N.js";
75
+ } from "./chunk-FLFBY5GN.js";
76
76
  import {
77
77
  parseEventLine
78
78
  } from "./chunk-QMYJO4EL.js";
@@ -119,7 +119,7 @@ import {
119
119
  import {
120
120
  looksLikeERDiagram,
121
121
  parseERDiagram
122
- } from "./chunk-NKRVFQGO.js";
122
+ } from "./chunk-BDI25HWH.js";
123
123
  import {
124
124
  looksLikeOrg,
125
125
  parseOrg
@@ -2031,4 +2031,4 @@ export {
2031
2031
  knownChartTypeIds,
2032
2032
  parseDgmo
2033
2033
  };
2034
- //# sourceMappingURL=chunk-AA4M6F2P.js.map
2034
+ //# sourceMappingURL=chunk-BBY57XAA.js.map
@@ -109,11 +109,13 @@ function parseRelationship(trimmed, lineNumber, pushError) {
109
109
  }
110
110
  function parseColumn(trimmed) {
111
111
  const rawTokens = tokenizeQuoteAware(trimmed);
112
- if (rawTokens.length === 0) return null;
112
+ if (rawTokens.length === 0) return { ok: false, reason: "not-a-column" };
113
113
  const firstRaw = rawTokens[0];
114
114
  const wasQuoted = firstRaw.startsWith('"') || firstRaw.startsWith("'");
115
115
  const name = stripQuotes(firstRaw);
116
- if (!wasQuoted && !/^\w+$/.test(name)) return null;
116
+ if (!wasQuoted && !/^\w+$/.test(name)) {
117
+ return { ok: false, reason: "not-a-column" };
118
+ }
117
119
  const constraints = [];
118
120
  let type;
119
121
  for (let i = 1; i < rawTokens.length; i++) {
@@ -125,10 +127,10 @@ function parseColumn(trimmed) {
125
127
  } else if (type === void 0) {
126
128
  type = tok;
127
129
  } else {
128
- return null;
130
+ return { ok: false, reason: "unknown-token", name, token: tok };
129
131
  }
130
132
  }
131
- return { name, ...type !== void 0 && { type }, constraints };
133
+ return { ok: true, name, ...type !== void 0 && { type }, constraints };
132
134
  }
133
135
  function parseERDiagram(content, palette) {
134
136
  const lines = content.split("\n");
@@ -315,13 +317,23 @@ function parseERDiagram(content, palette) {
315
317
  continue;
316
318
  }
317
319
  const colResult = parseColumn(trimmed);
318
- if (colResult) {
320
+ if (colResult.ok) {
319
321
  currentTable.columns.push({
320
322
  name: colResult.name,
321
323
  ...colResult.type && { type: colResult.type },
322
324
  constraints: colResult.constraints,
323
325
  lineNumber
324
326
  });
327
+ } else if (colResult.reason === "unknown-token") {
328
+ pushError(
329
+ lineNumber,
330
+ colResult.token.includes(",") ? `Column constraints are space-separated, not comma-separated. Write "${colResult.name} ${colResult.token.replace(/,+$/, "")} \u2026" without the comma.` : `Unexpected "${colResult.token}" in column "${colResult.name}". A column is: name [type] [pk|fk|unique|nullable]`
331
+ );
332
+ } else {
333
+ pushError(
334
+ lineNumber,
335
+ `"${trimmed}" is neither a column nor a relationship. A column is: name [type] [pk|fk|unique|nullable]. A relationship is: 1-label-* target`
336
+ );
325
337
  }
326
338
  continue;
327
339
  }
@@ -521,4 +533,4 @@ export {
521
533
  looksLikeERDiagram,
522
534
  extractSymbols
523
535
  };
524
- //# sourceMappingURL=chunk-NKRVFQGO.js.map
536
+ //# sourceMappingURL=chunk-BDI25HWH.js.map
@@ -3,22 +3,23 @@ import {
3
3
  } from "./chunk-ICZ7M6IZ.js";
4
4
  import {
5
5
  layoutInfra
6
- } from "./chunk-43E26CDA.js";
6
+ } from "./chunk-VS2M72PF.js";
7
7
  import {
8
8
  renderInlineText
9
9
  } from "./chunk-WGC42WJU.js";
10
10
  import {
11
11
  COLLAPSE_BAR_HEIGHT,
12
12
  COLLAPSE_BAR_INSET,
13
+ EDGE_LABEL_KNOCKOUT_OPACITY,
13
14
  EDGE_STROKE_WIDTH,
14
15
  NODE_STROKE_WIDTH
15
- } from "./chunk-3CIOJ5YJ.js";
16
+ } from "./chunk-FJ57274M.js";
16
17
  import {
17
18
  ScaleContext
18
19
  } from "./chunk-YYVTBZZC.js";
19
20
  import {
20
21
  layoutInlineHeader
21
- } from "./chunk-6VJCURWU.js";
22
+ } from "./chunk-J2EXBAPZ.js";
22
23
  import {
23
24
  TITLE_FONT_SIZE,
24
25
  TITLE_FONT_WEIGHT,
@@ -27,14 +28,14 @@ import {
27
28
  } from "./chunk-A4GOY3PE.js";
28
29
  import {
29
30
  renderIntegratedLegend
30
- } from "./chunk-RBAW7VUG.js";
31
+ } from "./chunk-2EPV7CLY.js";
31
32
  import {
32
33
  getLegendExtent,
33
34
  getMaxLegendReservedHeight
34
- } from "./chunk-ES66QH6J.js";
35
+ } from "./chunk-FG24NXKN.js";
35
36
  import {
36
37
  FONT_FAMILY
37
- } from "./chunk-Z5ID35YP.js";
38
+ } from "./chunk-UTCPNJND.js";
38
39
  import {
39
40
  LEGEND_CAPSULE_PAD,
40
41
  LEGEND_DOT_R,
@@ -45,12 +46,12 @@ import {
45
46
  LEGEND_PILL_FONT_SIZE,
46
47
  LEGEND_PILL_PAD,
47
48
  measureLegendText
48
- } from "./chunk-SCJ7CAJF.js";
49
+ } from "./chunk-3HOCNSPD.js";
49
50
  import {
50
51
  CHAR_WIDTH_RATIO,
51
52
  measureText,
52
53
  truncateText
53
- } from "./chunk-4ASYQ347.js";
54
+ } from "./chunk-MTGGOCND.js";
54
55
  import {
55
56
  parseInfra
56
57
  } from "./chunk-I7IQ2NEJ.js";
@@ -948,7 +949,7 @@ function renderEdgeLabels(svg, edges, nodes, groups, palette, _isDark, animate,
948
949
  const labelText = edge.label;
949
950
  const g = svg.append("g").attr("class", animate ? "infra-edge-label" : "");
950
951
  const textWidth = measureText(labelText, EDGE_LABEL_FONT_SIZE) + 8;
951
- g.append("rect").attr("x", midPt.x - textWidth / 2).attr("y", midPt.y - 8).attr("width", textWidth).attr("height", 16).attr("rx", 3).attr("fill", palette.bg).attr("opacity", 0.9);
952
+ g.append("rect").attr("x", midPt.x - textWidth / 2).attr("y", midPt.y - 8).attr("width", textWidth).attr("height", 16).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY);
952
953
  g.append("text").attr("x", midPt.x).attr("y", midPt.y + 4).attr("text-anchor", "middle").attr("font-family", FONT_FAMILY).attr("font-size", sc.sEdgeLabelFontSize).attr("fill", palette.textMuted).text(labelText);
953
954
  if (animate) {
954
955
  const pathD = buildPathD(wps, direction);
@@ -1123,7 +1124,11 @@ function renderNodes(svg, nodes, palette, isDark, animate, expandedNodeIds, acti
1123
1124
  }
1124
1125
  const rows = [...computedSection, ...declaredSection];
1125
1126
  const maxKeyWidth = Math.max(
1126
- ...rows.map((r) => measureText(`${r.key}: `, sc.sMetaFontSize))
1127
+ ...rows.map(
1128
+ (r) => measureText(`${r.key}: `, sc.sMetaFontSize, {
1129
+ bold: Boolean(r.inverted && r.invertedBg)
1130
+ })
1131
+ )
1127
1132
  );
1128
1133
  const valueX = x + 10 + maxKeyWidth;
1129
1134
  let rowY = sepY + NODE_SEPARATOR_GAP + sc.sMetaFontSize;
@@ -1364,19 +1369,19 @@ function renderLegend(rootSvg, legendGroups, totalWidth, legendY, palette, isDar
1364
1369
  if (playback && playback.expanded && !playbackEl.empty()) {
1365
1370
  const pillWidth = measureLegendText("Playback", LEGEND_PILL_FONT_SIZE) + LEGEND_PILL_PAD;
1366
1371
  let entryX = pillWidth + 8;
1367
- const entryY = LEGEND_HEIGHT / 2 + LEGEND_ENTRY_FONT_SIZE / 2 - 1;
1372
+ const entryY = LEGEND_HEIGHT / 2;
1368
1373
  const ppLabel = playback.paused ? "\u25B6" : "\u23F8";
1369
- playbackEl.append("text").attr("x", entryX).attr("y", entryY).attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("fill", palette.textMuted).attr("data-playback-action", "toggle-pause").style("cursor", "pointer").text(ppLabel);
1374
+ playbackEl.append("text").attr("x", entryX).attr("y", entryY).attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_PILL_FONT_SIZE).attr("fill", palette.textMuted).attr("data-playback-action", "toggle-pause").style("cursor", "pointer").text(ppLabel);
1370
1375
  entryX += LEGEND_PILL_FONT_SIZE * 0.8 + 6;
1371
1376
  for (const s of playback.speedOptions) {
1372
1377
  const label = `${s}x`;
1373
1378
  const isSpeedActive = playback.speed === s;
1374
- const slotW = measureLegendText(label, LEGEND_ENTRY_FONT_SIZE) + SPEED_BADGE_H_PAD * 2;
1379
+ const slotW = measureLegendText(label, LEGEND_ENTRY_FONT_SIZE, { bold: true }) + SPEED_BADGE_H_PAD * 2;
1375
1380
  const badgeH = LEGEND_ENTRY_FONT_SIZE + SPEED_BADGE_V_PAD * 2;
1376
1381
  const badgeY = (LEGEND_HEIGHT - badgeH) / 2;
1377
1382
  const speedG = playbackEl.append("g").attr("data-playback-action", "set-speed").attr("data-playback-value", String(s)).style("cursor", "pointer");
1378
1383
  speedG.append("rect").attr("x", entryX).attr("y", badgeY).attr("width", slotW).attr("height", badgeH).attr("rx", badgeH / 2).attr("fill", isSpeedActive ? palette.primary : "transparent");
1379
- speedG.append("text").attr("x", entryX + slotW / 2).attr("y", entryY).attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("font-weight", isSpeedActive ? "600" : "400").attr("fill", isSpeedActive ? palette.bg : palette.textMuted).attr("text-anchor", "middle").text(label);
1384
+ speedG.append("text").attr("x", entryX + slotW / 2).attr("y", entryY).attr("dominant-baseline", "central").attr("font-family", FONT_FAMILY).attr("font-size", LEGEND_ENTRY_FONT_SIZE).attr("font-weight", isSpeedActive ? "600" : "400").attr("fill", isSpeedActive ? palette.bg : palette.textMuted).attr("text-anchor", "middle").text(label);
1380
1385
  entryX += slotW + SPEED_BADGE_GAP;
1381
1386
  }
1382
1387
  }
@@ -1608,4 +1613,4 @@ export {
1608
1613
  renderInfra,
1609
1614
  parseAndLayoutInfra
1610
1615
  };
1611
- //# sourceMappingURL=chunk-SVR3YFM3.js.map
1616
+ //# sourceMappingURL=chunk-C666LP3O.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  measureText,
3
3
  wrapTextToWidth
4
- } from "./chunk-4ASYQ347.js";
4
+ } from "./chunk-MTGGOCND.js";
5
5
  import {
6
6
  fillModeFromOptions
7
7
  } from "./chunk-P2PUWV3Y.js";
@@ -290,4 +290,4 @@ export {
290
290
  scoreToCurveY,
291
291
  layoutJourneyMap
292
292
  };
293
- //# sourceMappingURL=chunk-KRTO7NRK.js.map
293
+ //# sourceMappingURL=chunk-D2WHS23S.js.map
@@ -13,15 +13,16 @@ import {
13
13
  stripInlineMarkdown
14
14
  } from "./chunk-WGC42WJU.js";
15
15
  import {
16
+ EDGE_LABEL_KNOCKOUT_OPACITY,
16
17
  EDGE_STROKE_WIDTH,
17
18
  NODE_STROKE_WIDTH
18
- } from "./chunk-3CIOJ5YJ.js";
19
+ } from "./chunk-FJ57274M.js";
19
20
  import {
20
21
  ScaleContext
21
22
  } from "./chunk-YYVTBZZC.js";
22
23
  import {
23
24
  layoutInlineHeader
24
- } from "./chunk-6VJCURWU.js";
25
+ } from "./chunk-J2EXBAPZ.js";
25
26
  import {
26
27
  TITLE_FONT_SIZE,
27
28
  TITLE_FONT_WEIGHT,
@@ -29,19 +30,19 @@ import {
29
30
  } from "./chunk-A4GOY3PE.js";
30
31
  import {
31
32
  renderIntegratedLegend
32
- } from "./chunk-RBAW7VUG.js";
33
+ } from "./chunk-2EPV7CLY.js";
33
34
  import {
34
35
  getLegendExtent,
35
36
  getMaxLegendReservedHeight
36
- } from "./chunk-ES66QH6J.js";
37
+ } from "./chunk-FG24NXKN.js";
37
38
  import {
38
39
  FONT_FAMILY
39
- } from "./chunk-Z5ID35YP.js";
40
+ } from "./chunk-UTCPNJND.js";
40
41
  import {
41
42
  CHAR_WIDTH_RATIO,
42
43
  measureText,
43
44
  truncateText
44
- } from "./chunk-4ASYQ347.js";
45
+ } from "./chunk-MTGGOCND.js";
45
46
  import {
46
47
  resolveTagColor
47
48
  } from "./chunk-MDI5FMWO.js";
@@ -126,16 +127,17 @@ function splitLabelChunks(label) {
126
127
  return chunks;
127
128
  }
128
129
  function fitLabelToHeader(label, nodeWidth, maxLines) {
130
+ const BOLD = { bold: true };
129
131
  const maxTextWidth = nodeWidth - NODE_TEXT_PADDING * 2;
130
132
  const words = splitLabelChunks(label);
131
133
  for (let fontSize = NODE_FONT_SIZE; fontSize >= MIN_NODE_FONT_SIZE; fontSize--) {
132
- if (maxTextWidth < measureText("MM", fontSize)) continue;
134
+ if (maxTextWidth < measureText("MM", fontSize, BOLD)) continue;
133
135
  const lines = [];
134
136
  let current = "";
135
137
  for (const word of words) {
136
138
  const joiner = current && word.spaceBefore ? " " : "";
137
139
  const test = current ? `${current}${joiner}${word.text}` : word.text;
138
- if (measureText(test, fontSize) <= maxTextWidth) {
140
+ if (measureText(test, fontSize, BOLD) <= maxTextWidth) {
139
141
  current = test;
140
142
  } else {
141
143
  if (current) lines.push(current);
@@ -143,28 +145,31 @@ function fitLabelToHeader(label, nodeWidth, maxLines) {
143
145
  }
144
146
  }
145
147
  if (current) lines.push(current);
146
- const fits = (l) => measureText(l, fontSize) <= maxTextWidth;
148
+ const fits = (l) => measureText(l, fontSize, BOLD) <= maxTextWidth;
147
149
  if (lines.length <= maxLines && lines.every(fits)) {
148
150
  return { lines, fontSize };
149
151
  }
150
152
  if (lines.length <= maxLines) {
151
153
  const result2 = lines.map(
152
- (l) => fits(l) ? l : truncateText(l, fontSize, maxTextWidth)
154
+ (l) => fits(l) ? l : truncateText(l, fontSize, maxTextWidth, BOLD)
153
155
  );
154
156
  return { lines: result2, fontSize };
155
157
  }
156
- const result = lines.slice(0, maxLines).map((l) => fits(l) ? l : truncateText(l, fontSize, maxTextWidth));
158
+ const result = lines.slice(0, maxLines).map(
159
+ (l) => fits(l) ? l : truncateText(l, fontSize, maxTextWidth, BOLD)
160
+ );
157
161
  const last = result[maxLines - 1];
158
162
  if (!last.endsWith("\u2026")) {
159
163
  result[maxLines - 1] = truncateText(
160
164
  last + "\u2026",
161
165
  fontSize,
162
- maxTextWidth
166
+ maxTextWidth,
167
+ BOLD
163
168
  );
164
169
  }
165
170
  return { lines: result, fontSize };
166
171
  }
167
- const truncated = truncateText(label, MIN_NODE_FONT_SIZE, maxTextWidth);
172
+ const truncated = truncateText(label, MIN_NODE_FONT_SIZE, maxTextWidth, BOLD);
168
173
  return { lines: [truncated], fontSize: MIN_NODE_FONT_SIZE };
169
174
  }
170
175
  function nodeColors(node, tagGroups, activeGroupName, palette, isDark, value, fillMode) {
@@ -738,7 +743,7 @@ function renderBoxesAndLines(container, parsed, layout, palette, isDark, options
738
743
  const lh = le.labelHeight ?? sEdgeLabelFontSize + 6;
739
744
  const lines = le.labelLines;
740
745
  const labelG = labelLayer.append("g").attr("class", "bl-edge-label").attr("data-line-number", String(le.lineNumber));
741
- labelG.append("rect").attr("x", lx - lw / 2).attr("y", ly - lh / 2).attr("width", lw).attr("height", lh).attr("rx", 3).attr("fill", palette.bg).attr("opacity", 0.72);
746
+ labelG.append("rect").attr("x", lx - lw / 2).attr("y", ly - lh / 2).attr("width", lw).attr("height", lh).attr("rx", 3).attr("fill", palette.bg).attr("opacity", EDGE_LABEL_KNOCKOUT_OPACITY);
742
747
  const text = labelG.append("text").attr("x", lx).attr("text-anchor", "middle").attr("font-family", FONT_FAMILY).attr("font-size", sEdgeLabelFontSize).attr("fill", palette.textMuted);
743
748
  const firstY = ly - (lines.length - 1) / 2 * labelLineHeight + sEdgeLabelFontSize / 3;
744
749
  lines.forEach((line2, k) => {
@@ -833,4 +838,4 @@ export {
833
838
  renderBoxesAndLines,
834
839
  renderBoxesAndLinesForExport
835
840
  };
836
- //# sourceMappingURL=chunk-LYTEVE2N.js.map
841
+ //# sourceMappingURL=chunk-DBF4IM4U.js.map