@markdy/renderer-dom 1.4.9 → 1.4.10

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 +3 -3
package/dist/index.js CHANGED
@@ -6870,8 +6870,8 @@ function createDiagram(opts) {
6870
6870
  const initialMeasureBounds = computeContentBounds();
6871
6871
  const { symmetricContentW: initSymW } = computeSymmetricContentSpan(plan, initialMeasureBounds);
6872
6872
  const naturalHeight = vWidth * initialMeasureBounds.height / initSymW;
6873
- const vHeight = viewport.clientHeight || container.clientHeight || naturalHeight;
6874
- const isHeightConstrained = hasInitialHeightConstraint || vHeight > 0 && Math.abs(vHeight - naturalHeight) > 3;
6873
+ const isHeightConstrained = hasInitialHeightConstraint;
6874
+ const vHeight = isHeightConstrained ? viewport.clientHeight || container.clientHeight || naturalHeight : naturalHeight;
6875
6875
  const resolvedFit = fitViewActive ? "contain" : fitMode === "auto" ? isHeightConstrained ? "contain" : "width" : fitMode;
6876
6876
  const defaultTargetRatio = vWidth <= 480 ? 0.95 : 0.9;
6877
6877
  const targetRatio = Math.min(1, Math.max(0.85, targetWidthRatio ?? defaultTargetRatio));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markdy/renderer-dom",
3
- "version": "1.4.9",
3
+ "version": "1.4.10",
4
4
  "description": "Browser renderer for diagram-native animated MarkdyScript architecture diagrams, built on the Web Animations API.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "html2canvas": "^1.4.1",
49
- "@markdy/core": "1.4.9"
49
+ "@markdy/core": "1.4.10"
50
50
  },
51
51
  "devDependencies": {
52
52
  "jsdom": "^29.1.1",
53
53
  "tsup": "^8.5.1",
54
54
  "typescript": "^5.9.3",
55
55
  "vitest": "^4.1.7",
56
- "@markdy/stdlib-systems": "1.4.9"
56
+ "@markdy/stdlib-systems": "1.4.10"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsup",