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 +11 -0
- package/README.md +6 -12
- package/ai/manifest.json +1 -1
- package/dist/cjs/examples.js +253 -13
- package/dist/cjs/index.js +4 -2
- package/dist/esm/examples.js +253 -13
- package/dist/esm/examples.js.map +1 -1
- package/dist/esm/index.js +4 -2
- package/dist/esm/index.js.map +1 -1
- package/docs/DOCUMENTATION_WORKFLOW.md +2 -1
- package/package.json +1 -1
- package/src/displaybox/demos/AutoLayoutDemoTab.tsx +11 -5
- package/src/displaybox/demos/autoLayoutDemo.ts +233 -0
- package/src/displaybox/demos/basicDemo.ts +6 -6
- package/src/displaybox/demos/selectionDemo.ts +12 -12
package/dist/esm/examples.js
CHANGED
|
@@ -741,7 +741,7 @@ var createBasicState = function () { return ({
|
|
|
741
741
|
var basicDemoConfig = ({
|
|
742
742
|
id: 'basic',
|
|
743
743
|
title: 'Basic Diagram',
|
|
744
|
-
description: 'Elements, ports, link, and labels.',
|
|
744
|
+
description: 'Elements, ports, link, and labels. Drag empty paper to pan; use Shift + drag for marquee selection.',
|
|
745
745
|
createState: createBasicState,
|
|
746
746
|
elementShapes: baseElementShapes,
|
|
747
747
|
portShapes: basePortShapes,
|
|
@@ -1119,7 +1119,7 @@ var createSelectionState = function () { return ({
|
|
|
1119
1119
|
texts: [
|
|
1120
1120
|
{
|
|
1121
1121
|
id: 'select-tip',
|
|
1122
|
-
content: 'Click to select, drag to move,
|
|
1122
|
+
content: 'Click to select, drag to move, drag empty paper to pan, Shift + drag to marquee-select.',
|
|
1123
1123
|
position: { x: 80, y: 80 },
|
|
1124
1124
|
},
|
|
1125
1125
|
],
|
|
@@ -1127,7 +1127,7 @@ var createSelectionState = function () { return ({
|
|
|
1127
1127
|
var selectionDemoConfig = ({
|
|
1128
1128
|
id: 'selection',
|
|
1129
1129
|
title: 'Selection + Interaction',
|
|
1130
|
-
description: 'Click to select, drag to move,
|
|
1130
|
+
description: 'Click to select, drag to move, drag empty paper to pan, Shift + drag to marquee-select, delete to remove.',
|
|
1131
1131
|
createState: createSelectionState,
|
|
1132
1132
|
elementShapes: baseElementShapes,
|
|
1133
1133
|
portShapes: basePortShapes,
|
|
@@ -1427,6 +1427,192 @@ var createAutoLayoutState = function (lockComparisonChildren) {
|
|
|
1427
1427
|
{ id: 'deep-grid-b', position: { x: 0, y: 0 }, size: { width: 40, height: 28 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
|
|
1428
1428
|
{ id: 'deep-grid-c', position: { x: 0, y: 0 }, size: { width: 52, height: 24 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
|
|
1429
1429
|
{ id: 'deep-grid-d', position: { x: 0, y: 0 }, size: { width: 28, height: 30 }, shapeId: 'default', parentId: 'deep-grid-nested-parent' },
|
|
1430
|
+
{
|
|
1431
|
+
id: 'layout-grid-empty-compare',
|
|
1432
|
+
position: { x: 930, y: 70 },
|
|
1433
|
+
size: { width: 280, height: 190 },
|
|
1434
|
+
shapeId: 'panel',
|
|
1435
|
+
layout: {
|
|
1436
|
+
mode: 'grid',
|
|
1437
|
+
padding: { x: 12, y: 12 },
|
|
1438
|
+
gap: 12,
|
|
1439
|
+
align: 'center',
|
|
1440
|
+
autoResize: 'grow-shrink',
|
|
1441
|
+
gridTemplate: [4, 4, 4],
|
|
1442
|
+
gridChildWidthResizeEnabled: true,
|
|
1443
|
+
childMinWidth: 44,
|
|
1444
|
+
childMinHeight: 52,
|
|
1445
|
+
},
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
id: 'empty-grid-slot',
|
|
1449
|
+
position: { x: 0, y: 0 },
|
|
1450
|
+
size: { width: 28, height: 18 },
|
|
1451
|
+
shapeId: 'default',
|
|
1452
|
+
parentId: 'layout-grid-empty-compare',
|
|
1453
|
+
layout: {
|
|
1454
|
+
mode: 'grid',
|
|
1455
|
+
padding: { x: 8, y: 8 },
|
|
1456
|
+
gap: 8,
|
|
1457
|
+
align: 'center',
|
|
1458
|
+
autoResize: 'grow-shrink',
|
|
1459
|
+
gridTemplate: [6, 6],
|
|
1460
|
+
gridChildWidthResizeEnabled: true,
|
|
1461
|
+
},
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
id: 'filled-grid-slot',
|
|
1465
|
+
position: { x: 0, y: 0 },
|
|
1466
|
+
size: { width: 92, height: 88 },
|
|
1467
|
+
shapeId: 'default',
|
|
1468
|
+
parentId: 'layout-grid-empty-compare',
|
|
1469
|
+
layout: {
|
|
1470
|
+
mode: 'grid',
|
|
1471
|
+
padding: { x: 8, y: 8 },
|
|
1472
|
+
gap: 8,
|
|
1473
|
+
align: 'center',
|
|
1474
|
+
autoResize: 'grow-shrink',
|
|
1475
|
+
gridTemplate: [6, 6],
|
|
1476
|
+
gridChildWidthResizeEnabled: true,
|
|
1477
|
+
childMinWidth: 18,
|
|
1478
|
+
childMinHeight: 18,
|
|
1479
|
+
},
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
id: 'empty-grid-compare-leaf',
|
|
1483
|
+
position: { x: 0, y: 0 },
|
|
1484
|
+
size: { width: 60, height: 70 },
|
|
1485
|
+
shapeId: 'default',
|
|
1486
|
+
parentId: 'layout-grid-empty-compare',
|
|
1487
|
+
},
|
|
1488
|
+
{ id: 'filled-grid-slot-a', position: { x: 0, y: 0 }, size: { width: 34, height: 22 }, shapeId: 'default', parentId: 'filled-grid-slot' },
|
|
1489
|
+
{ id: 'filled-grid-slot-b', position: { x: 0, y: 0 }, size: { width: 40, height: 24 }, shapeId: 'default', parentId: 'filled-grid-slot' },
|
|
1490
|
+
{ id: 'filled-grid-slot-c', position: { x: 0, y: 0 }, size: { width: 48, height: 22 }, shapeId: 'default', parentId: 'filled-grid-slot' },
|
|
1491
|
+
{
|
|
1492
|
+
id: 'layout-grid-mixed-modes',
|
|
1493
|
+
position: { x: 930, y: 320 },
|
|
1494
|
+
size: { width: 340, height: 240 },
|
|
1495
|
+
shapeId: 'panel',
|
|
1496
|
+
layout: {
|
|
1497
|
+
mode: 'grid',
|
|
1498
|
+
padding: { x: 12, y: 12 },
|
|
1499
|
+
gap: 12,
|
|
1500
|
+
align: 'center',
|
|
1501
|
+
autoResize: 'grow-shrink',
|
|
1502
|
+
gridTemplate: [4, 4, 4],
|
|
1503
|
+
gridChildWidthResizeEnabled: true,
|
|
1504
|
+
childMinWidth: 52,
|
|
1505
|
+
childMinHeight: 64,
|
|
1506
|
+
},
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
id: 'mixed-grid-child',
|
|
1510
|
+
position: { x: 0, y: 0 },
|
|
1511
|
+
size: { width: 88, height: 88 },
|
|
1512
|
+
shapeId: 'default',
|
|
1513
|
+
parentId: 'layout-grid-mixed-modes',
|
|
1514
|
+
layout: {
|
|
1515
|
+
mode: 'grid',
|
|
1516
|
+
padding: { x: 8, y: 8 },
|
|
1517
|
+
gap: 8,
|
|
1518
|
+
align: 'center',
|
|
1519
|
+
autoResize: 'grow-shrink',
|
|
1520
|
+
gridTemplate: [6, 6],
|
|
1521
|
+
gridChildWidthResizeEnabled: true,
|
|
1522
|
+
childMinWidth: 18,
|
|
1523
|
+
childMinHeight: 18,
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
id: 'mixed-column-child',
|
|
1528
|
+
position: { x: 0, y: 0 },
|
|
1529
|
+
size: { width: 92, height: 96 },
|
|
1530
|
+
shapeId: 'default',
|
|
1531
|
+
parentId: 'layout-grid-mixed-modes',
|
|
1532
|
+
layout: {
|
|
1533
|
+
mode: 'vertical',
|
|
1534
|
+
padding: { x: 8, y: 8 },
|
|
1535
|
+
gap: 8,
|
|
1536
|
+
align: 'center',
|
|
1537
|
+
autoResize: 'grow-shrink',
|
|
1538
|
+
},
|
|
1539
|
+
},
|
|
1540
|
+
{
|
|
1541
|
+
id: 'mixed-row-child',
|
|
1542
|
+
position: { x: 0, y: 0 },
|
|
1543
|
+
size: { width: 104, height: 84 },
|
|
1544
|
+
shapeId: 'default',
|
|
1545
|
+
parentId: 'layout-grid-mixed-modes',
|
|
1546
|
+
layout: {
|
|
1547
|
+
mode: 'horizontal',
|
|
1548
|
+
padding: { x: 8, y: 8 },
|
|
1549
|
+
gap: 8,
|
|
1550
|
+
align: 'center',
|
|
1551
|
+
autoResize: 'grow-shrink',
|
|
1552
|
+
},
|
|
1553
|
+
},
|
|
1554
|
+
{ id: 'mixed-grid-a', position: { x: 0, y: 0 }, size: { width: 34, height: 22 }, shapeId: 'default', parentId: 'mixed-grid-child' },
|
|
1555
|
+
{ id: 'mixed-grid-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'mixed-grid-child' },
|
|
1556
|
+
{ id: 'mixed-column-a', position: { x: 0, y: 0 }, size: { width: 60, height: 20 }, shapeId: 'default', parentId: 'mixed-column-child' },
|
|
1557
|
+
{ id: 'mixed-column-b', position: { x: 0, y: 0 }, size: { width: 68, height: 24 }, shapeId: 'default', parentId: 'mixed-column-child' },
|
|
1558
|
+
{ id: 'mixed-row-a', position: { x: 0, y: 0 }, size: { width: 32, height: 28 }, shapeId: 'default', parentId: 'mixed-row-child' },
|
|
1559
|
+
{ id: 'mixed-row-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'mixed-row-child' },
|
|
1560
|
+
{
|
|
1561
|
+
id: 'layout-column-grid-tree',
|
|
1562
|
+
position: { x: 40, y: 520 },
|
|
1563
|
+
size: { width: 340, height: 220 },
|
|
1564
|
+
shapeId: 'panel',
|
|
1565
|
+
layout: { mode: 'vertical', padding: { x: 12, y: 12 }, gap: 12, align: 'start', autoResize: 'grow-shrink' },
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
id: 'column-grid-tree-top',
|
|
1569
|
+
position: { x: 0, y: 0 },
|
|
1570
|
+
size: { width: 180, height: 88 },
|
|
1571
|
+
shapeId: 'default',
|
|
1572
|
+
parentId: 'layout-column-grid-tree',
|
|
1573
|
+
layout: {
|
|
1574
|
+
mode: 'grid',
|
|
1575
|
+
padding: { x: 8, y: 8 },
|
|
1576
|
+
gap: 8,
|
|
1577
|
+
align: 'center',
|
|
1578
|
+
autoResize: 'grow-shrink',
|
|
1579
|
+
gridTemplate: [6, 6],
|
|
1580
|
+
gridChildWidthResizeEnabled: true,
|
|
1581
|
+
childMinWidth: 18,
|
|
1582
|
+
childMinHeight: 18,
|
|
1583
|
+
},
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
id: 'column-grid-tree-branch',
|
|
1587
|
+
position: { x: 0, y: 0 },
|
|
1588
|
+
size: { width: 220, height: 96 },
|
|
1589
|
+
shapeId: 'default',
|
|
1590
|
+
parentId: 'layout-column-grid-tree',
|
|
1591
|
+
layout: { mode: 'horizontal', padding: { x: 8, y: 8 }, gap: 8, align: 'center', autoResize: 'grow-shrink' },
|
|
1592
|
+
},
|
|
1593
|
+
{ id: 'column-grid-top-a', position: { x: 0, y: 0 }, size: { width: 52, height: 22 }, shapeId: 'default', parentId: 'column-grid-tree-top' },
|
|
1594
|
+
{ id: 'column-grid-top-b', position: { x: 0, y: 0 }, size: { width: 44, height: 24 }, shapeId: 'default', parentId: 'column-grid-tree-top' },
|
|
1595
|
+
{
|
|
1596
|
+
id: 'column-grid-tree-inner-grid',
|
|
1597
|
+
position: { x: 0, y: 0 },
|
|
1598
|
+
size: { width: 120, height: 84 },
|
|
1599
|
+
shapeId: 'default',
|
|
1600
|
+
parentId: 'column-grid-tree-branch',
|
|
1601
|
+
layout: {
|
|
1602
|
+
mode: 'grid',
|
|
1603
|
+
padding: { x: 8, y: 8 },
|
|
1604
|
+
gap: 8,
|
|
1605
|
+
align: 'center',
|
|
1606
|
+
autoResize: 'grow-shrink',
|
|
1607
|
+
gridTemplate: [6, 6],
|
|
1608
|
+
gridChildWidthResizeEnabled: true,
|
|
1609
|
+
childMinWidth: 18,
|
|
1610
|
+
childMinHeight: 18,
|
|
1611
|
+
},
|
|
1612
|
+
},
|
|
1613
|
+
{ id: 'column-grid-tree-leaf', position: { x: 0, y: 0 }, size: { width: 58, height: 62 }, shapeId: 'default', parentId: 'column-grid-tree-branch' },
|
|
1614
|
+
{ id: 'column-grid-inner-a', position: { x: 0, y: 0 }, size: { width: 30, height: 22 }, shapeId: 'default', parentId: 'column-grid-tree-inner-grid' },
|
|
1615
|
+
{ id: 'column-grid-inner-b', position: { x: 0, y: 0 }, size: { width: 42, height: 24 }, shapeId: 'default', parentId: 'column-grid-tree-inner-grid' },
|
|
1430
1616
|
{
|
|
1431
1617
|
id: 'layout-lock-compare',
|
|
1432
1618
|
position: { x: 420, y: 410 },
|
|
@@ -1524,6 +1710,50 @@ var createAutoLayoutState = function (lockComparisonChildren) {
|
|
|
1524
1710
|
{ id: 'label-deep-grid-b', content: 'grid-b', position: { x: 6, y: -14 }, ownerId: 'deep-grid-b' },
|
|
1525
1711
|
{ id: 'label-deep-grid-c', content: 'grid-c', position: { x: 6, y: -14 }, ownerId: 'deep-grid-c' },
|
|
1526
1712
|
{ id: 'label-deep-grid-d', content: 'grid-d', position: { x: 6, y: -14 }, ownerId: 'deep-grid-d' },
|
|
1713
|
+
{
|
|
1714
|
+
id: 'label-layout-grid-empty-compare',
|
|
1715
|
+
content: 'Grid owner: empty vs filled nested grids',
|
|
1716
|
+
position: { x: 8, y: 6 },
|
|
1717
|
+
ownerId: 'layout-grid-empty-compare',
|
|
1718
|
+
layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
|
|
1719
|
+
},
|
|
1720
|
+
{ id: 'label-empty-grid-slot', content: 'empty nested grid', position: { x: 6, y: -16 }, ownerId: 'empty-grid-slot' },
|
|
1721
|
+
{ id: 'label-filled-grid-slot', content: 'nested grid with children', position: { x: 6, y: -16 }, ownerId: 'filled-grid-slot' },
|
|
1722
|
+
{ id: 'label-empty-grid-compare-leaf', content: 'leaf sibling', position: { x: 6, y: -16 }, ownerId: 'empty-grid-compare-leaf' },
|
|
1723
|
+
{ id: 'label-filled-grid-slot-a', content: 'slot-a', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-a' },
|
|
1724
|
+
{ id: 'label-filled-grid-slot-b', content: 'slot-b', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-b' },
|
|
1725
|
+
{ id: 'label-filled-grid-slot-c', content: 'slot-c', position: { x: 6, y: -14 }, ownerId: 'filled-grid-slot-c' },
|
|
1726
|
+
{
|
|
1727
|
+
id: 'label-layout-grid-mixed-modes',
|
|
1728
|
+
content: 'Grid owner: mixed child layout modes',
|
|
1729
|
+
position: { x: 8, y: 6 },
|
|
1730
|
+
ownerId: 'layout-grid-mixed-modes',
|
|
1731
|
+
layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
|
|
1732
|
+
},
|
|
1733
|
+
{ id: 'label-mixed-grid-child', content: 'grid child', position: { x: 6, y: -16 }, ownerId: 'mixed-grid-child' },
|
|
1734
|
+
{ id: 'label-mixed-column-child', content: 'vertical child', position: { x: 6, y: -16 }, ownerId: 'mixed-column-child' },
|
|
1735
|
+
{ id: 'label-mixed-row-child', content: 'horizontal child', position: { x: 6, y: -16 }, ownerId: 'mixed-row-child' },
|
|
1736
|
+
{ id: 'label-mixed-grid-a', content: 'grid-a', position: { x: 6, y: -14 }, ownerId: 'mixed-grid-a' },
|
|
1737
|
+
{ id: 'label-mixed-grid-b', content: 'grid-b', position: { x: 6, y: -14 }, ownerId: 'mixed-grid-b' },
|
|
1738
|
+
{ id: 'label-mixed-column-a', content: 'col-a', position: { x: 6, y: -14 }, ownerId: 'mixed-column-a' },
|
|
1739
|
+
{ id: 'label-mixed-column-b', content: 'col-b', position: { x: 6, y: -14 }, ownerId: 'mixed-column-b' },
|
|
1740
|
+
{ id: 'label-mixed-row-a', content: 'row-a', position: { x: 6, y: -14 }, ownerId: 'mixed-row-a' },
|
|
1741
|
+
{ id: 'label-mixed-row-b', content: 'row-b', position: { x: 6, y: -14 }, ownerId: 'mixed-row-b' },
|
|
1742
|
+
{
|
|
1743
|
+
id: 'label-layout-column-grid-tree',
|
|
1744
|
+
content: 'Vertical owner with grid descendants',
|
|
1745
|
+
position: { x: 8, y: 6 },
|
|
1746
|
+
ownerId: 'layout-column-grid-tree',
|
|
1747
|
+
layout: { boundsMode: 'owner-width', wrap: 'word', overflow: 'clip', padding: 0 },
|
|
1748
|
+
},
|
|
1749
|
+
{ id: 'label-column-grid-tree-top', content: 'top-level grid child', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-top' },
|
|
1750
|
+
{ id: 'label-column-grid-tree-branch', content: 'row branch with inner grid', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-branch' },
|
|
1751
|
+
{ id: 'label-column-grid-top-a', content: 'top-a', position: { x: 6, y: -14 }, ownerId: 'column-grid-top-a' },
|
|
1752
|
+
{ id: 'label-column-grid-top-b', content: 'top-b', position: { x: 6, y: -14 }, ownerId: 'column-grid-top-b' },
|
|
1753
|
+
{ id: 'label-column-grid-tree-inner-grid', content: 'nested grid descendant', position: { x: 6, y: -16 }, ownerId: 'column-grid-tree-inner-grid' },
|
|
1754
|
+
{ id: 'label-column-grid-tree-leaf', content: 'branch leaf', position: { x: 6, y: -14 }, ownerId: 'column-grid-tree-leaf' },
|
|
1755
|
+
{ id: 'label-column-grid-inner-a', content: 'inner-a', position: { x: 6, y: -14 }, ownerId: 'column-grid-inner-a' },
|
|
1756
|
+
{ id: 'label-column-grid-inner-b', content: 'inner-b', position: { x: 6, y: -14 }, ownerId: 'column-grid-inner-b' },
|
|
1527
1757
|
{
|
|
1528
1758
|
id: 'label-layout-lock-compare',
|
|
1529
1759
|
content: 'Child drag lock comparison',
|
|
@@ -6286,6 +6516,8 @@ var AutoLayoutService = /** @class */ (function () {
|
|
|
6286
6516
|
return this.applyResolvedLayout(parentId, parent, desiredPositions, desiredSizes, {
|
|
6287
6517
|
width: newParentWidth,
|
|
6288
6518
|
height: newParentHeight,
|
|
6519
|
+
}, {
|
|
6520
|
+
preserveResizedLayoutParentSize: true,
|
|
6289
6521
|
});
|
|
6290
6522
|
};
|
|
6291
6523
|
AutoLayoutService.prototype.resolveGridCellWidths = function (rowInnerWidth, weights) {
|
|
@@ -6295,7 +6527,7 @@ var AutoLayoutService = /** @class */ (function () {
|
|
|
6295
6527
|
var safeWeights = weights.map(function (weight) { return _this.clampGridUnits(weight); });
|
|
6296
6528
|
return this.distributeWeightedSizes(Math.max(0, rowInnerWidth), safeWeights);
|
|
6297
6529
|
};
|
|
6298
|
-
AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize) {
|
|
6530
|
+
AutoLayoutService.prototype.applyResolvedLayout = function (parentId, parent, desiredPositions, desiredSizes, parentSize, options) {
|
|
6299
6531
|
var _this = this;
|
|
6300
6532
|
var _a;
|
|
6301
6533
|
var patches = [];
|
|
@@ -6314,7 +6546,7 @@ var AutoLayoutService = /** @class */ (function () {
|
|
|
6314
6546
|
var resizePatches = _this.commandQueue.run(createResizeElementCommand(childId, fittedSize), _this.model);
|
|
6315
6547
|
patches.push.apply(patches, resizePatches);
|
|
6316
6548
|
movedPortIds.push.apply(movedPortIds, _this.collectElementPortIds(childId));
|
|
6317
|
-
var nested = _this.applyLayoutForParent(childId);
|
|
6549
|
+
var nested = _this.applyLayoutForParent(childId, (options === null || options === void 0 ? void 0 : options.preserveResizedLayoutParentSize) ? { preserveParentSize: true } : undefined);
|
|
6318
6550
|
patches.push.apply(patches, nested.patches);
|
|
6319
6551
|
movedPortIds.push.apply(movedPortIds, nested.movedPortIds);
|
|
6320
6552
|
}
|
|
@@ -13892,6 +14124,9 @@ var parentOptions = [
|
|
|
13892
14124
|
{ id: 'layout-grid', label: 'Grid layout' },
|
|
13893
14125
|
{ id: 'layout-nested', label: 'Nested layout' },
|
|
13894
14126
|
{ id: 'layout-grid-deep', label: 'Nested grid' },
|
|
14127
|
+
{ id: 'layout-grid-empty-compare', label: 'Grid empty vs filled' },
|
|
14128
|
+
{ id: 'layout-grid-mixed-modes', label: 'Grid mixed child modes' },
|
|
14129
|
+
{ id: 'layout-column-grid-tree', label: 'Non-grid with grid descendants' },
|
|
13895
14130
|
{ id: 'layout-lock-compare', label: 'Child lock compare' },
|
|
13896
14131
|
{ id: 'layout-manual', label: 'Manual (compare)' },
|
|
13897
14132
|
];
|
|
@@ -14220,15 +14455,17 @@ var AutoLayoutDemo = function () {
|
|
|
14220
14455
|
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."),
|
|
14221
14456
|
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."),
|
|
14222
14457
|
React.createElement("p", { style: { marginTop: 0, marginBottom: 0, fontSize: 13, color: '#333' } },
|
|
14223
|
-
"The ",
|
|
14458
|
+
"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 ",
|
|
14224
14459
|
React.createElement("code", null, "layout-grid-deep"),
|
|
14225
|
-
"
|
|
14226
|
-
React.createElement("code", null, "
|
|
14227
|
-
"
|
|
14228
|
-
React.createElement("code", null, "
|
|
14229
|
-
"
|
|
14230
|
-
React.createElement("code", null, "
|
|
14231
|
-
"
|
|
14460
|
+
" for enabled 12-unit nested-child resize,",
|
|
14461
|
+
React.createElement("code", null, "layout-grid-empty-compare"),
|
|
14462
|
+
" for empty-versus-filled nested grid comparison, ",
|
|
14463
|
+
React.createElement("code", null, "layout-grid-mixed-modes"),
|
|
14464
|
+
"for direct-child layout mixing, and ",
|
|
14465
|
+
React.createElement("code", null, "layout-column-grid-tree"),
|
|
14466
|
+
" for a non-grid owner that still contains grid-layout descendants. The child drag lock comparison lives beside them in ",
|
|
14467
|
+
React.createElement("code", null, "layout-lock-compare"),
|
|
14468
|
+
".")),
|
|
14232
14469
|
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 }),
|
|
14233
14470
|
React.createElement("div", { style: { display: 'grid', gap: 12, marginBottom: 12 } },
|
|
14234
14471
|
React.createElement("div", { style: { display: 'flex', flexWrap: 'wrap', gap: 12, alignItems: 'center' } },
|
|
@@ -14344,6 +14581,9 @@ var AutoLayoutDemo = function () {
|
|
|
14344
14581
|
React.createElement("ul", { style: { marginTop: 0, paddingLeft: 18, fontSize: 13 } },
|
|
14345
14582
|
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."),
|
|
14346
14583
|
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."),
|
|
14584
|
+
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."),
|
|
14585
|
+
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."),
|
|
14586
|
+
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."),
|
|
14347
14587
|
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."),
|
|
14348
14588
|
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."),
|
|
14349
14589
|
React.createElement("li", null, "Resize lock: with grid child width resize off, select grid-b and drag diagonally; width should stay fixed."),
|