orcasvn-react-diagrams 0.2.7 → 0.2.8

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.2.8] - 2026-05-24
6
+
7
+ ### Fixed
8
+ - Grid auto-layout now preserves the owner-assigned slot size of a direct child that is itself an empty non-manual layout parent during the active layout cycle.
9
+ - Enabled `layout.gridChildWidthResizeEnabled` resize redistribution now keeps that nested layout parent at its resolved slot size instead of collapsing it back to empty padding bounds.
10
+
11
+ ### Docs
12
+ - Updated `README.md` release highlights for `v0.2.8`.
13
+ - Refreshed release workflow metadata for `v0.2.8`.
14
+
5
15
  ## [0.2.7] - 2026-05-18
6
16
 
7
17
  ### Added
@@ -30,6 +40,7 @@ All notable changes to this project are documented in this file.
30
40
 
31
41
  ### Changed
32
42
  - Grid auto-layout now keeps overflow rows on the established fallback model while deriving row occupancy from flat slot templates.
43
+ - Grid auto-layout `gridTemplate` now uses a flat one-level slot array shape such as `[12,4,8]` instead of nested row arrays, with rows derived greedily during layout.
33
44
  - Partial grid rows keep proportional occupied width when children are added, and direct child move/resize relayout now preserves parent width unless topology actually changes.
34
45
  - Resize-handle interaction now applies bounds changes directly without routing through move semantics.
35
46
  - Auto routing now preserves endpoint-host interior avoidance for offset attach anchors by treating projected border-equivalent endpoints like boundary endpoints.
package/README.md CHANGED
@@ -30,18 +30,12 @@ editor.addElement({
30
30
  });
31
31
  ```
32
32
 
33
- ## Release Highlights (v0.2.7)
34
-
35
- - Includes all completed `v0.2.1` through `v0.2.6` work, plus `v0.2.7` updates.
36
- - `v0.2.7` child interaction update:
37
- - parent elements can suppress built-in drag for direct child elements with `childElementInteraction.movable = false`
38
- - locked child elements remain selectable, while programmatic movement and layout-driven repositioning still work
39
- - `v0.2.7` viewport gesture update:
40
- - empty-paper primary drag now pans without requiring `Ctrl`
41
- - pan direction now follows pointer movement
42
- - marquee selection now uses `Shift + drag` on empty paper
43
- - `v0.2.7` grid auto-layout update:
44
- - enabled `layout.gridChildWidthResizeEnabled` now applies the same 12-unit width-topology behavior to all direct grid children, including nested layout parents
33
+ ## Release Highlights (v0.2.8)
34
+
35
+ - Includes all completed `v0.2.1` through `v0.2.7` work, plus `v0.2.8` updates.
36
+ - `v0.2.8` grid auto-layout fix:
37
+ - direct grid children that are themselves non-manual layout parents now keep the owner-assigned slot size for the active layout cycle, even when they are empty
38
+ - enabled `layout.gridChildWidthResizeEnabled` resize flows now preserve that assigned size instead of collapsing the nested layout parent back to padding-only bounds
45
39
 
46
40
  ## API Docs
47
41
 
package/ai/manifest.json CHANGED
@@ -30,5 +30,5 @@
30
30
  "analysis/White paper/Overview.md",
31
31
  "analysis/White paper/Requirements-Functional.md"
32
32
  ],
33
- "updatedAt": "2026-05-18"
33
+ "updatedAt": "2026-05-24"
34
34
  }
@@ -743,7 +743,7 @@ var createBasicState = function () { return ({
743
743
  var basicDemoConfig = ({
744
744
  id: 'basic',
745
745
  title: 'Basic Diagram',
746
- description: 'Elements, ports, link, and labels.',
746
+ description: 'Elements, ports, link, and labels. Drag empty paper to pan; use Shift + drag for marquee selection.',
747
747
  createState: createBasicState,
748
748
  elementShapes: baseElementShapes,
749
749
  portShapes: basePortShapes,
@@ -1121,7 +1121,7 @@ var createSelectionState = function () { return ({
1121
1121
  texts: [
1122
1122
  {
1123
1123
  id: 'select-tip',
1124
- content: 'Click to select, drag to move, Delete/Backspace to remove.',
1124
+ content: 'Click to select, drag to move, drag empty paper to pan, Shift + drag to marquee-select.',
1125
1125
  position: { x: 80, y: 80 },
1126
1126
  },
1127
1127
  ],
@@ -1129,7 +1129,7 @@ var createSelectionState = function () { return ({
1129
1129
  var selectionDemoConfig = ({
1130
1130
  id: 'selection',
1131
1131
  title: 'Selection + Interaction',
1132
- description: 'Click to select, drag to move, marquee-select on empty space, delete to remove.',
1132
+ description: 'Click to select, drag to move, drag empty paper to pan, Shift + drag to marquee-select, delete to remove.',
1133
1133
  createState: createSelectionState,
1134
1134
  elementShapes: baseElementShapes,
1135
1135
  portShapes: basePortShapes,
@@ -1429,6 +1429,192 @@ var createAutoLayoutState = function (lockComparisonChildren) {
1429
1429
  { id: 'deep-grid-b', position: { x: 0, y: 0 }, size: { width: 40, height: 28 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
1430
1430
  { id: 'deep-grid-c', position: { x: 0, y: 0 }, size: { width: 52, height: 24 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
1431
1431
  { id: 'deep-grid-d', position: { x: 0, y: 0 }, size: { width: 28, height: 30 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
1432
+ {
1433
+ id: 'layout-grid-empty-compare',
1434
+ position: { x: 930, y: 70 },
1435
+ size: { width: 280, height: 190 },
1436
+ shapeId: 'panel',
1437
+ layout: {
1438
+ mode: 'grid',
1439
+ padding: { x: 12, y: 12 },
1440
+ gap: 12,
1441
+ align: 'center',
1442
+ autoResize: 'grow-shrink',
1443
+ gridTemplate: [4, 4, 4],
1444
+ gridChildWidthResizeEnabled: true,
1445
+ childMinWidth: 44,
1446
+ childMinHeight: 52,
1447
+ },
1448
+ },
1449
+ {
1450
+ id: 'empty-grid-slot',
1451
+ position: { x: 0, y: 0 },
1452
+ size: { width: 28, height: 18 },
1453
+ shapeId: 'default',
1454
+ parentId: 'layout-grid-empty-compare',
1455
+ layout: {
1456
+ mode: 'grid',
1457
+ padding: { x: 8, y: 8 },
1458
+ gap: 8,
1459
+ align: 'center',
1460
+ autoResize: 'grow-shrink',
1461
+ gridTemplate: [6, 6],
1462
+ gridChildWidthResizeEnabled: true,
1463
+ },
1464
+ },
1465
+ {
1466
+ id: 'filled-grid-slot',
1467
+ position: { x: 0, y: 0 },
1468
+ size: { width: 92, height: 88 },
1469
+ shapeId: 'default',
1470
+ parentId: 'layout-grid-empty-compare',
1471
+ layout: {
1472
+ mode: 'grid',
1473
+ padding: { x: 8, y: 8 },
1474
+ gap: 8,
1475
+ align: 'center',
1476
+ autoResize: 'grow-shrink',
1477
+ gridTemplate: [6, 6],
1478
+ gridChildWidthResizeEnabled: true,
1479
+ childMinWidth: 18,
1480
+ childMinHeight: 18,
1481
+ },
1482
+ },
1483
+ {
1484
+ id: 'empty-grid-compare-leaf',
1485
+ position: { x: 0, y: 0 },
1486
+ size: { width: 60, height: 70 },
1487
+ shapeId: 'default',
1488
+ parentId: 'layout-grid-empty-compare',
1489
+ },
1490
+ { id: 'filled-grid-slot-a', position: { x: 0, y: 0 }, size: { width: 34, height: 22 }, shapeId: 'default', parentId: 'filled-grid-slot' },
1491
+ { id: 'filled-grid-slot-b', position: { x: 0, y: 0 }, size: { width: 40, height: 24 }, shapeId: 'default', parentId: 'filled-grid-slot' },
1492
+ { id: 'filled-grid-slot-c', position: { x: 0, y: 0 }, size: { width: 48, height: 22 }, shapeId: 'default', parentId: 'filled-grid-slot' },
1493
+ {
1494
+ id: 'layout-grid-mixed-modes',
1495
+ position: { x: 930, y: 320 },
1496
+ size: { width: 340, height: 240 },
1497
+ shapeId: 'panel',
1498
+ layout: {
1499
+ mode: 'grid',
1500
+ padding: { x: 12, y: 12 },
1501
+ gap: 12,
1502
+ align: 'center',
1503
+ autoResize: 'grow-shrink',
1504
+ gridTemplate: [4, 4, 4],
1505
+ gridChildWidthResizeEnabled: true,
1506
+ childMinWidth: 52,
1507
+ childMinHeight: 64,
1508
+ },
1509
+ },
1510
+ {
1511
+ id: 'mixed-grid-child',
1512
+ position: { x: 0, y: 0 },
1513
+ size: { width: 88, height: 88 },
1514
+ shapeId: 'default',
1515
+ parentId: 'layout-grid-mixed-modes',
1516
+ layout: {
1517
+ mode: 'grid',
1518
+ padding: { x: 8, y: 8 },
1519
+ gap: 8,
1520
+ align: 'center',
1521
+ autoResize: 'grow-shrink',
1522
+ gridTemplate: [6, 6],
1523
+ gridChildWidthResizeEnabled: true,
1524
+ childMinWidth: 18,
1525
+ childMinHeight: 18,
1526
+ },
1527
+ },
1528
+ {
1529
+ id: 'mixed-column-child',
1530
+ position: { x: 0, y: 0 },
1531
+ size: { width: 92, height: 96 },
1532
+ shapeId: 'default',
1533
+ parentId: 'layout-grid-mixed-modes',
1534
+ layout: {
1535
+ mode: 'vertical',
1536
+ padding: { x: 8, y: 8 },
1537
+ gap: 8,
1538
+ align: 'center',
1539
+ autoResize: 'grow-shrink',
1540
+ },
1541
+ },
1542
+ {
1543
+ id: 'mixed-row-child',
1544
+ position: { x: 0, y: 0 },
1545
+ size: { width: 104, height: 84 },
1546
+ shapeId: 'default',
1547
+ parentId: 'layout-grid-mixed-modes',
1548
+ layout: {
1549
+ mode: 'horizontal',
1550
+ padding: { x: 8, y: 8 },
1551
+ gap: 8,
1552
+ align: 'center',
1553
+ autoResize: 'grow-shrink',
1554
+ },
1555
+ },
1556
+ { id: 'mixed-grid-a', position: { x: 0, y: 0 }, size: { width: 34, height: 22 }, shapeId: 'default', parentId: 'mixed-grid-child' },
1557
+ { id: 'mixed-grid-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'mixed-grid-child' },
1558
+ { id: 'mixed-column-a', position: { x: 0, y: 0 }, size: { width: 60, height: 20 }, shapeId: 'default', parentId: 'mixed-column-child' },
1559
+ { id: 'mixed-column-b', position: { x: 0, y: 0 }, size: { width: 68, height: 24 }, shapeId: 'default', parentId: 'mixed-column-child' },
1560
+ { id: 'mixed-row-a', position: { x: 0, y: 0 }, size: { width: 32, height: 28 }, shapeId: 'default', parentId: 'mixed-row-child' },
1561
+ { id: 'mixed-row-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'mixed-row-child' },
1562
+ {
1563
+ id: 'layout-column-grid-tree',
1564
+ position: { x: 40, y: 520 },
1565
+ size: { width: 340, height: 220 },
1566
+ shapeId: 'panel',
1567
+ layout: { mode: 'vertical', padding: { x: 12, y: 12 }, gap: 12, align: 'start', autoResize: 'grow-shrink' },
1568
+ },
1569
+ {
1570
+ id: 'column-grid-tree-top',
1571
+ position: { x: 0, y: 0 },
1572
+ size: { width: 180, height: 88 },
1573
+ shapeId: 'default',
1574
+ parentId: 'layout-column-grid-tree',
1575
+ layout: {
1576
+ mode: 'grid',
1577
+ padding: { x: 8, y: 8 },
1578
+ gap: 8,
1579
+ align: 'center',
1580
+ autoResize: 'grow-shrink',
1581
+ gridTemplate: [6, 6],
1582
+ gridChildWidthResizeEnabled: true,
1583
+ childMinWidth: 18,
1584
+ childMinHeight: 18,
1585
+ },
1586
+ },
1587
+ {
1588
+ id: 'column-grid-tree-branch',
1589
+ position: { x: 0, y: 0 },
1590
+ size: { width: 220, height: 96 },
1591
+ shapeId: 'default',
1592
+ parentId: 'layout-column-grid-tree',
1593
+ layout: { mode: 'horizontal', padding: { x: 8, y: 8 }, gap: 8, align: 'center', autoResize: 'grow-shrink' },
1594
+ },
1595
+ { id: 'column-grid-top-a', position: { x: 0, y: 0 }, size: { width: 52, height: 22 }, shapeId: 'default', parentId: 'column-grid-tree-top' },
1596
+ { id: 'column-grid-top-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'column-grid-tree-top' },
1597
+ {
1598
+ id: 'column-grid-tree-inner-grid',
1599
+ position: { x: 0, y: 0 },
1600
+ size: { width: 120, height: 84 },
1601
+ shapeId: 'default',
1602
+ parentId: 'column-grid-tree-branch',
1603
+ layout: {
1604
+ mode: 'grid',
1605
+ padding: { x: 8, y: 8 },
1606
+ gap: 8,
1607
+ align: 'center',
1608
+ autoResize: 'grow-shrink',
1609
+ gridTemplate: [6, 6],
1610
+ gridChildWidthResizeEnabled: true,
1611
+ childMinWidth: 18,
1612
+ childMinHeight: 18,
1613
+ },
1614
+ },
1615
+ { id: 'column-grid-tree-leaf', position: { x: 0, y: 0 }, size: { width: 58, height: 62 }, shapeId: 'default', parentId: 'column-grid-tree-branch' },
1616
+ { id: 'column-grid-inner-a', position: { x: 0, y: 0 }, size: { width: 30, height: 22 }, shapeId: 'default', parentId: 'column-grid-tree-inner-grid' },
1617
+ { id: 'column-grid-inner-b', position: { x: 0, y: 0 }, size: { width: 42, height: 24 }, shapeId: 'default', parentId: 'column-grid-tree-inner-grid' },
1432
1618
  {
1433
1619
  id: 'layout-lock-compare',
1434
1620
  position: { x: 420, y: 410 },
@@ -1526,6 +1712,50 @@ var createAutoLayoutState = function (lockComparisonChildren) {
1526
1712
  { id: 'label-deep-grid-b', content: 'grid-b', position: { x: 6, y: -14 }, ownerId: 'deep-grid-b' },
1527
1713
  { id: 'label-deep-grid-c', content: 'grid-c', position: { x: 6, y: -14 }, ownerId: 'deep-grid-c' },
1528
1714
  { id: 'label-deep-grid-d', content: 'grid-d', position: { x: 6, y: -14 }, ownerId: 'deep-grid-d' },
1715
+ {
1716
+ id: 'label-layout-grid-empty-compare',
1717
+ content: 'Grid owner: empty vs filled nested grids',
1718
+ position: { x: 8, y: 6 },
1719
+ ownerId: 'layout-grid-empty-compare',
1720
+ layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
1721
+ },
1722
+ { id: 'label-empty-grid-slot', content: 'empty nested grid', position: { x: 6, y: -16 }, ownerId: 'empty-grid-slot' },
1723
+ { id: 'label-filled-grid-slot', content: 'nested grid with children', position: { x: 6, y: -16 }, ownerId: 'filled-grid-slot' },
1724
+ { id: 'label-empty-grid-compare-leaf', content: 'leaf sibling', position: { x: 6, y: -16 }, ownerId: 'empty-grid-compare-leaf' },
1725
+ { id: 'label-filled-grid-slot-a', content: 'slot-a', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-a' },
1726
+ { id: 'label-filled-grid-slot-b', content: 'slot-b', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-b' },
1727
+ { id: 'label-filled-grid-slot-c', content: 'slot-c', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-c' },
1728
+ {
1729
+ id: 'label-layout-grid-mixed-modes',
1730
+ content: 'Grid owner: mixed child layout modes',
1731
+ position: { x: 8, y: 6 },
1732
+ ownerId: 'layout-grid-mixed-modes',
1733
+ layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
1734
+ },
1735
+ { id: 'label-mixed-grid-child', content: 'grid child', position: { x: 6, y: -16 }, ownerId: 'mixed-grid-child' },
1736
+ { id: 'label-mixed-column-child', content: 'vertical child', position: { x: 6, y: -16 }, ownerId: 'mixed-column-child' },
1737
+ { id: 'label-mixed-row-child', content: 'horizontal child', position: { x: 6, y: -16 }, ownerId: 'mixed-row-child' },
1738
+ { id: 'label-mixed-grid-a', content: 'grid-a', position: { x: 6, y: -14 }, ownerId: 'mixed-grid-a' },
1739
+ { id: 'label-mixed-grid-b', content: 'grid-b', position: { x: 6, y: -14 }, ownerId: 'mixed-grid-b' },
1740
+ { id: 'label-mixed-column-a', content: 'col-a', position: { x: 6, y: -14 }, ownerId: 'mixed-column-a' },
1741
+ { id: 'label-mixed-column-b', content: 'col-b', position: { x: 6, y: -14 }, ownerId: 'mixed-column-b' },
1742
+ { id: 'label-mixed-row-a', content: 'row-a', position: { x: 6, y: -14 }, ownerId: 'mixed-row-a' },
1743
+ { id: 'label-mixed-row-b', content: 'row-b', position: { x: 6, y: -14 }, ownerId: 'mixed-row-b' },
1744
+ {
1745
+ id: 'label-layout-column-grid-tree',
1746
+ content: 'Vertical owner with grid descendants',
1747
+ position: { x: 8, y: 6 },
1748
+ ownerId: 'layout-column-grid-tree',
1749
+ layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
1750
+ },
1751
+ { id: 'label-column-grid-tree-top', content: 'top-level grid child', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-top' },
1752
+ { id: 'label-column-grid-tree-branch', content: 'row branch with inner grid', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-branch' },
1753
+ { id: 'label-column-grid-top-a', content: 'top-a', position: { x: 6, y: -14 }, ownerId: 'column-grid-top-a' },
1754
+ { id: 'label-column-grid-top-b', content: 'top-b', position: { x: 6, y: -14 }, ownerId: 'column-grid-top-b' },
1755
+ { id: 'label-column-grid-tree-inner-grid', content: 'nested grid descendant', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-inner-grid' },
1756
+ { id: 'label-column-grid-tree-leaf', content: 'branch leaf', position: { x: 6, y: -14 }, ownerId: 'column-grid-tree-leaf' },
1757
+ { id: 'label-column-grid-inner-a', content: 'inner-a', position: { x: 6, y: -14 }, ownerId: 'column-grid-inner-a' },
1758
+ { id: 'label-column-grid-inner-b', content: 'inner-b', position: { x: 6, y: -14 }, ownerId: 'column-grid-inner-b' },
1529
1759
  {
1530
1760
  id: 'label-layout-lock-compare',
1531
1761
  content: 'Child drag lock comparison',
@@ -6288,6 +6518,8 @@ var AutoLayoutService = /** @class */ (function () {
6288
6518
  return this.applyResolvedLayout(parentId, parent, desiredPositions, desiredSizes, {
6289
6519
  width: newParentWidth,
6290
6520
  height: newParentHeight,
6521
+ }, {
6522
+ preserveResizedLayoutParentSize: true,
6291
6523
  });
6292
6524
  };
6293
6525
  AutoLayoutService.prototype.resolveGridCellWidths = function (rowInnerWidth, weights) {
@@ -6297,7 +6529,7 @@ var AutoLayoutService = /** @class */ (function () {
6297
6529
  var safeWeights = weights.map(function (weight) { return _this.clampGridUnits(weight); });
6298
6530
  return this.distributeWeightedSizes(Math.max(0, rowInnerWidth), safeWeights);
6299
6531
  };
6300
- AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize) {
6532
+ AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize, options) {
6301
6533
  var _this = this;
6302
6534
  var _a;
6303
6535
  var patches = [];
@@ -6316,7 +6548,7 @@ var AutoLayoutService = /** @class */ (function () {
6316
6548
  var resizePatches = _this.commandQueue.run(createResizeElementCommand(childId, fittedSize), _this.model);
6317
6549
  patches.push.apply(patches, resizePatches);
6318
6550
  movedPortIds.push.apply(movedPortIds, _this.collectElementPortIds(childId));
6319
- var nested = _this.applyLayoutForParent(childId);
6551
+ var nested = _this.applyLayoutForParent(childId, (options === null || options === void 0 ? void 0 : options.preserveResizedLayoutParentSize) ? { preserveParentSize: true } : undefined);
6320
6552
  patches.push.apply(patches, nested.patches);
6321
6553
  movedPortIds.push.apply(movedPortIds, nested.movedPortIds);
6322
6554
  }
@@ -13894,6 +14126,9 @@ var parentOptions = [
13894
14126
  { id: 'layout-grid', label: 'Grid layout' },
13895
14127
  { id: 'layout-nested', label: 'Nested layout' },
13896
14128
  { id: 'layout-grid-deep', label: 'Nested grid' },
14129
+ { id: 'layout-grid-empty-compare', label: 'Grid empty vs filled' },
14130
+ { id: 'layout-grid-mixed-modes', label: 'Grid mixed child modes' },
14131
+ { id: 'layout-column-grid-tree', label: 'Non-grid with grid descendants' },
13897
14132
  { id: 'layout-lock-compare', label: 'Child lock compare' },
13898
14133
  { id: 'layout-manual', label: 'Manual (compare)' },
13899
14134
  ];
@@ -14222,15 +14457,17 @@ var AutoLayoutDemo = function () {
14222
14457
  React.createElement("p", { style: { marginTop: 0 } }, "Try horizontal, vertical, grid, nested, and manual layout containers. Select a layout parent directly on the canvas or pick it from the list; the controls below always act on the current selection. Drag, resize, add, or remove children to see automatic reflow. Use fit controls, explicit child min/max constraints, auto-resize policy, 12-unit grid templates, and the optional grid child width-resize capability to validate current behavior."),
14223
14458
  React.createElement("p", { style: { marginTop: 0, fontSize: 13, color: '#333' } }, "Grid child width resize starts enabled for the seeded grid parents in this demo. With the capability on, horizontal drag can wrap rows automatically from a flat 12-unit slot array, resize direct grid children in 1/12 steps, and reorder peers by drag position. That now includes nested layout parents as well as leaf children. Turn the checkbox off on a selected grid parent to compare the older locked-width behavior where a mostly downward drag keeps width stable while height changes."),
14224
14459
  React.createElement("p", { style: { marginTop: 0, marginBottom: 0, fontSize: 13, color: '#333' } },
14225
- "The ",
14460
+ "The seeded scenarios now cover empty nested grids, mixed child layout modes under one grid owner, and grid descendants inside a non-grid tree. Use ",
14226
14461
  React.createElement("code", null, "layout-grid-deep"),
14227
- " scenario now keeps the outer container focused on grid behavior with three direct grid children, including one nested grid parent that also follows the enabled 12-unit resize path. The child drag lock comparison lives beside it in ",
14228
- React.createElement("code", null, " layout-lock-compare"),
14229
- "; toggle the lock, try dragging",
14230
- React.createElement("code", null, " deep-lock-child-a"),
14231
- " versus ",
14232
- React.createElement("code", null, " deep-free-child-a"),
14233
- ", then use the API move shortcut to confirm the policy suppresses built-in drag without freezing geometry.")),
14462
+ " for enabled 12-unit nested-child resize,",
14463
+ React.createElement("code", null, "layout-grid-empty-compare"),
14464
+ " for empty-versus-filled nested grid comparison, ",
14465
+ React.createElement("code", null, "layout-grid-mixed-modes"),
14466
+ "for direct-child layout mixing, and ",
14467
+ React.createElement("code", null, "layout-column-grid-tree"),
14468
+ " for a non-grid owner that still contains grid-layout descendants. The child drag lock comparison lives beside them in ",
14469
+ React.createElement("code", null, "layout-lock-compare"),
14470
+ ".")),
14234
14471
  React.createElement(DisplayBoxControls, { actions: demo.actions, snapEnabled: controls.snapEnabled, selectedLinkRouting: controls.selectedLinkRouting, canToggleLinkRouting: controls.canToggleLinkRouting, onReload: controls.handleReload, onZoomIn: controls.handleZoomIn, onZoomOut: controls.handleZoomOut, onResetViewport: controls.handleResetViewport, onToggleSnap: controls.handleToggleSnap, onManualRender: controls.handleManualRender, onToggleLinkRouting: controls.handleToggleLinkRouting, onAction: controls.handleAction, onExportImage: controls.handleExportImage, onClearExportPreview: controls.handleClearExportPreview, exportPreviewDataUrl: controls.exportPreviewDataUrl, exportError: controls.exportError }),
14235
14472
  React.createElement("div", { style: { display: 'grid', gap: 12, marginBottom: 12 } },
14236
14473
  React.createElement("div", { style: { display: 'flex', flexWrap: 'wrap', gap: 12, alignItems: 'center' } },
@@ -14346,6 +14583,9 @@ var AutoLayoutDemo = function () {
14346
14583
  React.createElement("ul", { style: { marginTop: 0, paddingLeft: 18, fontSize: 13 } },
14347
14584
  React.createElement("li", null, "Nested grid: target layout-grid-deep to inspect an outer grid where all three direct children, including the nested grid parent, use enabled 12-unit resize."),
14348
14585
  React.createElement("li", null, "Select deep-grid-nested-parent and drag a horizontal resize handle; it should snap in grid units and then reflow inner children inside the resized container."),
14586
+ React.createElement("li", null, "Empty nested grid: target layout-grid-empty-compare and compare empty-grid-slot against filled-grid-slot. The empty nested grid should still occupy its assigned outer slot."),
14587
+ React.createElement("li", null, "Mixed grid children: target layout-grid-mixed-modes to inspect one grid owner whose direct children use grid, vertical, and horizontal auto-layout modes side by side."),
14588
+ React.createElement("li", null, "Non-grid with grid descendants: target layout-column-grid-tree to inspect a vertical parent that still contains grid-layout containers deeper in the subtree."),
14349
14589
  React.createElement("li", null, "Lock comparison: target layout-lock-compare, toggle Lock comparison child drag, then compare deep-lock-child-a and deep-free-child-a."),
14350
14590
  React.createElement("li", null, "Use Move lock target via API after locking; the child should still reposition because the policy only suppresses built-in drag."),
14351
14591
  React.createElement("li", null, "Resize lock: with grid child width resize off, select grid-b and drag diagonally; width should stay fixed."),
package/dist/cjs/index.js CHANGED
@@ -2441,6 +2441,8 @@ var AutoLayoutService = /** @class */ (function () {
2441
2441
  return this.applyResolvedLayout(parentId, parent, desiredPositions, desiredSizes, {
2442
2442
  width: newParentWidth,
2443
2443
  height: newParentHeight,
2444
+ }, {
2445
+ preserveResizedLayoutParentSize: true,
2444
2446
  });
2445
2447
  };
2446
2448
  AutoLayoutService.prototype.resolveGridCellWidths = function (rowInnerWidth, weights) {
@@ -2450,7 +2452,7 @@ var AutoLayoutService = /** @class */ (function () {
2450
2452
  var safeWeights = weights.map(function (weight) { return _this.clampGridUnits(weight); });
2451
2453
  return this.distributeWeightedSizes(Math.max(0, rowInnerWidth), safeWeights);
2452
2454
  };
2453
- AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize) {
2455
+ AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize, options) {
2454
2456
  var _this = this;
2455
2457
  var _a;
2456
2458
  var patches = [];
@@ -2469,7 +2471,7 @@ var AutoLayoutService = /** @class */ (function () {
2469
2471
  var resizePatches = _this.commandQueue.run(createResizeElementCommand(childId, fittedSize), _this.model);
2470
2472
  patches.push.apply(patches, resizePatches);
2471
2473
  movedPortIds.push.apply(movedPortIds, _this.collectElementPortIds(childId));
2472
- var nested = _this.applyLayoutForParent(childId);
2474
+ var nested = _this.applyLayoutForParent(childId, (options === null || options === void 0 ? void 0 : options.preserveResizedLayoutParentSize) ? { preserveParentSize: true } : undefined);
2473
2475
  patches.push.apply(patches, nested.patches);
2474
2476
  movedPortIds.push.apply(movedPortIds, nested.movedPortIds);
2475
2477
  }