@markdy/core 1.4.7 → 1.4.9

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 (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1190,11 +1190,11 @@ function layoutRanked(ast, edges, opts) {
1190
1190
  return nodes;
1191
1191
  }
1192
1192
  if (isVertical) {
1193
- const contentH = ast.meta.height - SAFE - TITLE_BAND - SAFE;
1193
+ const contentH = Math.max(NODE_H, ast.meta.height - (hasTitle ? titleBand : SAFE) - bottomBand - SAFE);
1194
1194
  const maxNodeH = Math.max(...nodeIds.map((id) => nodeDims.get(id)?.height ?? NODE_H));
1195
1195
  const rowGap = Math.max(maxNodeH + 40, Math.min(200, contentH / Math.max(rankCount, 1)));
1196
1196
  const totalH = (rankCount - 1) * rowGap + maxNodeH;
1197
- const startY = TITLE_BAND + Math.max(0, (contentH - totalH) / 2);
1197
+ const startY = (hasTitle ? titleBand : SAFE) + Math.max(0, (contentH - totalH) / 2);
1198
1198
  for (const [rank, ids] of [...byRank.entries()].sort((a, b) => a[0] - b[0])) {
1199
1199
  const rowCount = ids.length;
1200
1200
  const maxRowW = Math.max(...ids.map((id) => nodeDims.get(id)?.width ?? NODE_W));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/core",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "description": "Diagram-native MarkdyScript parser and compiler (auto-layout, edge routing, cue scheduling) — zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",