taffy-js 0.2.9 → 0.2.11

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/pkg/taffy_wasm.js CHANGED
@@ -512,6 +512,41 @@ export const FlexWrap = Object.freeze({
512
512
  WrapReverse: 2, "2": "WrapReverse",
513
513
  });
514
514
 
515
+ /**
516
+ * Grid auto flow enumeration
517
+ *
518
+ * Controls whether grid items are placed row-wise or column-wise, and whether
519
+ * the sparse or dense packing algorithm is used.
520
+ *
521
+ * @example
522
+ * ```typescript
523
+ * import { GridAutoFlow } from 'taffy-js';
524
+ *
525
+ * style.gridAutoFlow = GridAutoFlow.Row; // Fill rows first
526
+ * style.gridAutoFlow = GridAutoFlow.Column; // Fill columns first
527
+ * style.gridAutoFlow = GridAutoFlow.RowDense; // Fill rows, pack densely
528
+ * ```
529
+ * @enum {0 | 1 | 2 | 3}
530
+ */
531
+ export const GridAutoFlow = Object.freeze({
532
+ /**
533
+ * Items are placed by filling each row in turn, adding new rows as necessary
534
+ */
535
+ Row: 0, "0": "Row",
536
+ /**
537
+ * Items are placed by filling each column in turn, adding new columns as necessary
538
+ */
539
+ Column: 1, "1": "Column",
540
+ /**
541
+ * Combines `Row` with the dense packing algorithm
542
+ */
543
+ RowDense: 2, "2": "RowDense",
544
+ /**
545
+ * Combines `Column` with the dense packing algorithm
546
+ */
547
+ ColumnDense: 3, "3": "ColumnDense",
548
+ });
549
+
515
550
  /**
516
551
  * Main axis alignment enumeration
517
552
  *
@@ -864,17 +899,17 @@ export const Overflow = Object.freeze({
864
899
  */
865
900
  Visible: 0, "0": "Visible",
866
901
  /**
867
- * Content is clipped at the container boundary
902
+ * Content is clipped at the container boundary, but unlike Hidden, this forbids all scrolling
868
903
  */
869
- Hidden: 1, "1": "Hidden",
904
+ Clip: 1, "1": "Clip",
870
905
  /**
871
- * Always display scrollbars for scrollable content
906
+ * Content is clipped at the container boundary
872
907
  */
873
- Scroll: 2, "2": "Scroll",
908
+ Hidden: 2, "2": "Hidden",
874
909
  /**
875
- * Display scrollbars only when content overflows (internally maps to Scroll)
910
+ * Always display scrollbars for scrollable content
876
911
  */
877
- Auto: 3, "3": "Auto",
912
+ Scroll: 3, "3": "Scroll",
878
913
  });
879
914
 
880
915
  /**
@@ -1005,6 +1040,20 @@ export class Style {
1005
1040
  set margin(val) {
1006
1041
  wasm.style_set_margin(this.__wbg_ptr, val);
1007
1042
  }
1043
+ /**
1044
+ * Gets the text-align property
1045
+ *
1046
+ * Used by block layout to implement legacy text alignment behavior.
1047
+ *
1048
+ * @returns - The current [`TextAlign`](JsTextAlign) value
1049
+ *
1050
+ * @defaultValue - `TextAlign.Auto`
1051
+ * @returns {TextAlign}
1052
+ */
1053
+ get textAlign() {
1054
+ const ret = wasm.style_textAlign(this.__wbg_ptr);
1055
+ return ret;
1056
+ }
1008
1057
  /**
1009
1058
  * Gets the align-items property
1010
1059
  *
@@ -1030,6 +1079,19 @@ export class Style {
1030
1079
  const ret = wasm.style_flexShrink(this.__wbg_ptr);
1031
1080
  return ret;
1032
1081
  }
1082
+ /**
1083
+ * Gets the grid-column property
1084
+ *
1085
+ * Defines which column in the grid the item should start and end at.
1086
+ * Corresponds to CSS `grid-column` shorthand.
1087
+ *
1088
+ * @returns - A `Line<GridPlacement>` with start and end placements
1089
+ * @returns {Line<GridPlacement>}
1090
+ */
1091
+ get gridColumn() {
1092
+ const ret = wasm.style_gridColumn(this.__wbg_ptr);
1093
+ return ret;
1094
+ }
1033
1095
  /**
1034
1096
  * Sets the display mode
1035
1097
  *
@@ -1037,7 +1099,6 @@ export class Style {
1037
1099
  *
1038
1100
  *
1039
1101
  * @example
1040
- *
1041
1102
  * ```typescript
1042
1103
  * style.display = Display.Flex;
1043
1104
  * ```
@@ -1072,6 +1133,36 @@ export class Style {
1072
1133
  const ret = wasm.style_aspectRatio(this.__wbg_ptr);
1073
1134
  return ret === 0x100000001 ? undefined : ret;
1074
1135
  }
1136
+ /**
1137
+ * Gets the justify-self property
1138
+ *
1139
+ * Overrides the parent's justify-items for this specific element in the inline axis.
1140
+ *
1141
+ * @returns - The current [`AlignSelf`](JsAlignSelf) value (returns `Auto` if not set)
1142
+ * @returns {AlignSelf | undefined}
1143
+ */
1144
+ get justifySelf() {
1145
+ const ret = wasm.style_justifySelf(this.__wbg_ptr);
1146
+ return ret === 8 ? undefined : ret;
1147
+ }
1148
+ /**
1149
+ * Sets the grid-row property
1150
+ *
1151
+ * @param val - A Line object with start and end GridPlacement values
1152
+ *
1153
+ * @example
1154
+ * ```typescript
1155
+ * style.display = Display.Grid;
1156
+ * // CSS: grid-row: 1 / 3
1157
+ * style.gridRow = { start: 1, end: 3 };
1158
+ * // CSS: grid-row: 2 / span 2
1159
+ * style.gridRow = { start: 2, end: { span: 2 } };
1160
+ * ```
1161
+ * @param {Line<GridPlacement>} val
1162
+ */
1163
+ set gridRow(val) {
1164
+ wasm.style_set_gridRow(this.__wbg_ptr, val);
1165
+ }
1075
1166
  /**
1076
1167
  * Sets the maximum size constraints
1077
1168
  *
@@ -1121,7 +1212,6 @@ export class Style {
1121
1212
  *
1122
1213
  *
1123
1214
  * @example
1124
- *
1125
1215
  * ```typescript
1126
1216
  * style.position = Position.Absolute;
1127
1217
  * style.inset = { left: 10, top: 10, right: "auto", bottom: "auto" };
@@ -1143,6 +1233,33 @@ export class Style {
1143
1233
  const ret = wasm.style_alignContent(this.__wbg_ptr);
1144
1234
  return ret === 9 ? undefined : ret;
1145
1235
  }
1236
+ /**
1237
+ * Gets whether this item is a table
1238
+ *
1239
+ * Table children are handled specially in block layout.
1240
+ *
1241
+ * @returns - Whether the item is treated as a table
1242
+ *
1243
+ * @defaultValue - `false`
1244
+ * @returns {boolean}
1245
+ */
1246
+ get itemIsTable() {
1247
+ const ret = wasm.style_itemIsTable(this.__wbg_ptr);
1248
+ return ret !== 0;
1249
+ }
1250
+ /**
1251
+ * Gets the justify-items property
1252
+ *
1253
+ * Defines the default justify-self for all children in the inline axis.
1254
+ * This is primarily used for CSS Grid layout.
1255
+ *
1256
+ * @returns - The current [`AlignItems`](JsAlignItems) value, or `undefined` if not set
1257
+ * @returns {AlignItems | undefined}
1258
+ */
1259
+ get justifyItems() {
1260
+ const ret = wasm.style_justifyItems(this.__wbg_ptr);
1261
+ return ret === 7 ? undefined : ret;
1262
+ }
1146
1263
  /**
1147
1264
  * Sets the flex grow factor
1148
1265
  *
@@ -1164,7 +1281,6 @@ export class Style {
1164
1281
  *
1165
1282
  *
1166
1283
  * @example
1167
- *
1168
1284
  * ```typescript
1169
1285
  * style.flexWrap = FlexWrap.Wrap;
1170
1286
  * ```
@@ -1187,6 +1303,32 @@ export class Style {
1187
1303
  const ret = wasm.style_flexDirection(this.__wbg_ptr);
1188
1304
  return ret;
1189
1305
  }
1306
+ /**
1307
+ * Gets the grid-auto-flow property
1308
+ *
1309
+ * Controls how auto-placed items are inserted into the grid.
1310
+ *
1311
+ * @returns - The current [`GridAutoFlow`](JsGridAutoFlow) value
1312
+ *
1313
+ * @defaultValue - `GridAutoFlow.Row`
1314
+ * @returns {GridAutoFlow}
1315
+ */
1316
+ get gridAutoFlow() {
1317
+ const ret = wasm.style_gridAutoFlow(this.__wbg_ptr);
1318
+ return ret;
1319
+ }
1320
+ /**
1321
+ * Gets the grid-auto-rows property
1322
+ *
1323
+ * Defines the size of implicitly created rows.
1324
+ *
1325
+ * @returns - An array of track sizing functions
1326
+ * @returns {any}
1327
+ */
1328
+ get gridAutoRows() {
1329
+ const ret = wasm.style_gridAutoRows(this.__wbg_ptr);
1330
+ return ret;
1331
+ }
1190
1332
  /**
1191
1333
  * Sets the align-self property
1192
1334
  *
@@ -1229,6 +1371,20 @@ export class Style {
1229
1371
  set flexBasis(val) {
1230
1372
  wasm.style_set_flexBasis(this.__wbg_ptr, val);
1231
1373
  }
1374
+ /**
1375
+ * Sets the text-align property
1376
+ *
1377
+ * @param val - The new text-align value
1378
+ *
1379
+ * @example
1380
+ * ```typescript
1381
+ * style.textAlign = TextAlign.LegacyCenter;
1382
+ * ```
1383
+ * @param {TextAlign} val
1384
+ */
1385
+ set textAlign(val) {
1386
+ wasm.style_set_textAlign(this.__wbg_ptr, val);
1387
+ }
1232
1388
  /**
1233
1389
  * Gets the justify-content property
1234
1390
  *
@@ -1241,13 +1397,26 @@ export class Style {
1241
1397
  const ret = wasm.style_justifyContent(this.__wbg_ptr);
1242
1398
  return ret === 9 ? undefined : ret;
1243
1399
  }
1400
+ /**
1401
+ * Gets the scrollbar width
1402
+ *
1403
+ * The width of the scrollbar gutter when `overflow` is set to `Scroll`.
1404
+ *
1405
+ * @returns - The scrollbar width in pixels
1406
+ *
1407
+ * @defaultValue - `0`
1408
+ * @returns {number}
1409
+ */
1410
+ get scrollbarWidth() {
1411
+ const ret = wasm.style_scrollbarWidth(this.__wbg_ptr);
1412
+ return ret;
1413
+ }
1244
1414
  /**
1245
1415
  * Sets the align-items property
1246
1416
  *
1247
1417
  * @param val - The new align-items value, or `undefined` to use default
1248
1418
  *
1249
1419
  * @example
1250
- *
1251
1420
  * ```typescript
1252
1421
  * style.alignItems = AlignItems.Center;
1253
1422
  * ```
@@ -1270,6 +1439,38 @@ export class Style {
1270
1439
  set flexShrink(val) {
1271
1440
  wasm.style_set_flexShrink(this.__wbg_ptr, val);
1272
1441
  }
1442
+ /**
1443
+ * Sets the grid-column property
1444
+ *
1445
+ * @param val - A Line object with start and end GridPlacement values
1446
+ *
1447
+ * @example
1448
+ * ```typescript
1449
+ * style.display = Display.Grid;
1450
+ * // CSS: grid-column: 1 / 4
1451
+ * style.gridColumn = { start: 1, end: 4 };
1452
+ * // CSS: grid-column: auto / span 3
1453
+ * style.gridColumn = { start: "auto", end: { span: 3 } };
1454
+ * ```
1455
+ * @param {Line<GridPlacement>} val
1456
+ */
1457
+ set gridColumn(val) {
1458
+ wasm.style_set_gridColumn(this.__wbg_ptr, val);
1459
+ }
1460
+ /**
1461
+ * Gets whether this item is a replaced element
1462
+ *
1463
+ * Replaced elements have special sizing behavior (e.g., `<img>`, `<video>`).
1464
+ *
1465
+ * @returns - Whether the item is a replaced element
1466
+ *
1467
+ * @defaultValue - `false`
1468
+ * @returns {boolean}
1469
+ */
1470
+ get itemIsReplaced() {
1471
+ const ret = wasm.style_itemIsReplaced(this.__wbg_ptr);
1472
+ return ret !== 0;
1473
+ }
1273
1474
  /**
1274
1475
  * Sets the aspect ratio
1275
1476
  *
@@ -1284,6 +1485,32 @@ export class Style {
1284
1485
  set aspectRatio(val) {
1285
1486
  wasm.style_set_aspectRatio(this.__wbg_ptr, val);
1286
1487
  }
1488
+ /**
1489
+ * Sets the justify-self property
1490
+ *
1491
+ * @param val - The new justify-self value, or `undefined`/`Auto` to inherit from parent
1492
+ *
1493
+ * @example
1494
+ * ```typescript
1495
+ * style.justifySelf = AlignSelf.End;
1496
+ * ```
1497
+ * @param {AlignSelf | undefined} val
1498
+ */
1499
+ set justifySelf(val) {
1500
+ wasm.style_set_justifySelf(this.__wbg_ptr, val);
1501
+ }
1502
+ /**
1503
+ * Gets the grid-auto-columns property
1504
+ *
1505
+ * Defines the size of implicitly created columns.
1506
+ *
1507
+ * @returns - An array of track sizing functions
1508
+ * @returns {any}
1509
+ */
1510
+ get gridAutoColumns() {
1511
+ const ret = wasm.style_gridAutoColumns(this.__wbg_ptr);
1512
+ return ret;
1513
+ }
1287
1514
  /**
1288
1515
  * Sets the align-content property
1289
1516
  *
@@ -1298,6 +1525,43 @@ export class Style {
1298
1525
  set alignContent(val) {
1299
1526
  wasm.style_set_alignContent(this.__wbg_ptr, val);
1300
1527
  }
1528
+ /**
1529
+ * Sets whether this item is a table
1530
+ *
1531
+ * @param val - Whether the item should be treated as a table
1532
+ * @param {boolean} val
1533
+ */
1534
+ set itemIsTable(val) {
1535
+ wasm.style_set_itemIsTable(this.__wbg_ptr, val);
1536
+ }
1537
+ /**
1538
+ * Sets the justify-items property
1539
+ *
1540
+ * @param val - The new justify-items value, or `undefined` to use default
1541
+ *
1542
+ * @example
1543
+ * ```typescript
1544
+ * style.display = Display.Grid;
1545
+ * style.justifyItems = AlignItems.Center;
1546
+ * ```
1547
+ * @param {AlignItems | undefined} val
1548
+ */
1549
+ set justifyItems(val) {
1550
+ wasm.style_set_justifyItems(this.__wbg_ptr, val);
1551
+ }
1552
+ /**
1553
+ * Gets the grid-template-rows property
1554
+ *
1555
+ * Defines the track sizing functions (heights) of the grid rows.
1556
+ * Returns Taffy's native serialization format.
1557
+ *
1558
+ * @returns - An array of `GridTrack` values
1559
+ * @returns {GridTrack[]}
1560
+ */
1561
+ get gridTemplateRows() {
1562
+ const ret = wasm.style_gridTemplateRows(this.__wbg_ptr);
1563
+ return ret;
1564
+ }
1301
1565
  /**
1302
1566
  * Sets the flex direction
1303
1567
  *
@@ -1305,7 +1569,6 @@ export class Style {
1305
1569
  *
1306
1570
  *
1307
1571
  * @example
1308
- *
1309
1572
  * ```typescript
1310
1573
  * style.flexDirection = FlexDirection.Column;
1311
1574
  * ```
@@ -1314,6 +1577,48 @@ export class Style {
1314
1577
  set flexDirection(val) {
1315
1578
  wasm.style_set_flexDirection(this.__wbg_ptr, val);
1316
1579
  }
1580
+ /**
1581
+ * Sets the grid-auto-flow property
1582
+ *
1583
+ * @param val - The new grid-auto-flow value
1584
+ *
1585
+ * @example
1586
+ * ```typescript
1587
+ * style.display = Display.Grid;
1588
+ * style.gridAutoFlow = GridAutoFlow.Column;
1589
+ * ```
1590
+ * @param {GridAutoFlow} val
1591
+ */
1592
+ set gridAutoFlow(val) {
1593
+ wasm.style_set_gridAutoFlow(this.__wbg_ptr, val);
1594
+ }
1595
+ /**
1596
+ * Sets the grid-auto-rows property
1597
+ *
1598
+ * @param val - An array of track sizing functions for implicit rows
1599
+ *
1600
+ * @example
1601
+ * ```typescript
1602
+ * style.display = Display.Grid;
1603
+ * style.gridAutoRows = [{ min: "Auto", max: "Auto" }];
1604
+ * ```
1605
+ * @param {any} val
1606
+ */
1607
+ set gridAutoRows(val) {
1608
+ wasm.style_set_gridAutoRows(this.__wbg_ptr, val);
1609
+ }
1610
+ /**
1611
+ * Gets the grid-template-areas property
1612
+ *
1613
+ * Defines named grid areas that can be referenced by grid items.
1614
+ *
1615
+ * @returns - An array of `GridArea` values
1616
+ * @returns {GridArea[]}
1617
+ */
1618
+ get gridTemplateAreas() {
1619
+ const ret = wasm.style_gridTemplateAreas(this.__wbg_ptr);
1620
+ return ret;
1621
+ }
1317
1622
  /**
1318
1623
  * Sets the justify-content property
1319
1624
  *
@@ -1328,6 +1633,159 @@ export class Style {
1328
1633
  set justifyContent(val) {
1329
1634
  wasm.style_set_justifyContent(this.__wbg_ptr, val);
1330
1635
  }
1636
+ /**
1637
+ * Sets the scrollbar width
1638
+ *
1639
+ * @param val - The scrollbar width in pixels
1640
+ *
1641
+ * @example
1642
+ * ```typescript
1643
+ * style.overflow = { x: Overflow.Scroll, y: Overflow.Scroll };
1644
+ * style.scrollbarWidth = 15;
1645
+ * ```
1646
+ * @param {number} val
1647
+ */
1648
+ set scrollbarWidth(val) {
1649
+ wasm.style_set_scrollbarWidth(this.__wbg_ptr, val);
1650
+ }
1651
+ /**
1652
+ * Sets whether this item is a replaced element
1653
+ *
1654
+ * @param val - Whether the item should be treated as a replaced element
1655
+ * @param {boolean} val
1656
+ */
1657
+ set itemIsReplaced(val) {
1658
+ wasm.style_set_itemIsReplaced(this.__wbg_ptr, val);
1659
+ }
1660
+ /**
1661
+ * Gets the grid-template-columns property
1662
+ *
1663
+ * Defines the track sizing functions (widths) of the grid columns.
1664
+ *
1665
+ * @returns - An array of `GridTrack` values
1666
+ * @returns {GridTrack[]}
1667
+ */
1668
+ get gridTemplateColumns() {
1669
+ const ret = wasm.style_gridTemplateColumns(this.__wbg_ptr);
1670
+ return ret;
1671
+ }
1672
+ /**
1673
+ * Sets the grid-auto-columns property
1674
+ *
1675
+ * @param val - An array of track sizing functions for implicit columns
1676
+ * @param {any} val
1677
+ */
1678
+ set gridAutoColumns(val) {
1679
+ wasm.style_set_gridAutoColumns(this.__wbg_ptr, val);
1680
+ }
1681
+ /**
1682
+ * Sets the grid-template-rows property
1683
+ *
1684
+ * @param val - An array of GridTrack objects (Taffy's serde format)
1685
+ *
1686
+ * @example
1687
+ * ```typescript
1688
+ * style.display = Display.Grid;
1689
+ * // Simple: use Taffy's serde format
1690
+ * style.gridTemplateRows = [
1691
+ * { type: "Single", value: { min: { Length: 100 }, max: { Length: 100 } } },
1692
+ * { type: "Single", value: { min: "Auto", max: { Fr: 1.0 } } }
1693
+ * ];
1694
+ * ```
1695
+ * @param {GridTrack[]} val
1696
+ */
1697
+ set gridTemplateRows(val) {
1698
+ wasm.style_set_gridTemplateRows(this.__wbg_ptr, val);
1699
+ }
1700
+ /**
1701
+ * Gets the grid-template-row-names property
1702
+ *
1703
+ * Defines the named lines between the rows.
1704
+ *
1705
+ * @returns - An array of arrays of line names
1706
+ * @returns {string[][]}
1707
+ */
1708
+ get gridTemplateRowNames() {
1709
+ const ret = wasm.style_gridTemplateRowNames(this.__wbg_ptr);
1710
+ return ret;
1711
+ }
1712
+ /**
1713
+ * Sets the grid-template-areas property
1714
+ *
1715
+ * @param val - An array of named grid area definitions
1716
+ *
1717
+ * @example
1718
+ * ```typescript
1719
+ * style.display = Display.Grid;
1720
+ * style.gridTemplateAreas = [
1721
+ * { name: "header", row_start: 1, row_end: 2, column_start: 1, column_end: 4 },
1722
+ * { name: "main", row_start: 2, row_end: 4, column_start: 2, column_end: 4 }
1723
+ * ];
1724
+ * ```
1725
+ * @param {GridArea[]} val
1726
+ */
1727
+ set gridTemplateAreas(val) {
1728
+ wasm.style_set_gridTemplateAreas(this.__wbg_ptr, val);
1729
+ }
1730
+ /**
1731
+ * Sets the grid-template-columns property
1732
+ *
1733
+ * @param val - An array of GridTrack objects
1734
+ *
1735
+ * @example
1736
+ * ```typescript
1737
+ * style.display = Display.Grid;
1738
+ * style.gridTemplateColumns = [
1739
+ * { type: "Single", value: { min: { Length: 200 }, max: { Length: 200 } } },
1740
+ * { type: "Single", value: { min: "Auto", max: { Fr: 1.0 } } },
1741
+ * { type: "Single", value: { min: "Auto", max: { Fr: 1.0 } } }
1742
+ * ];
1743
+ * ```
1744
+ * @param {GridTrack[]} val
1745
+ */
1746
+ set gridTemplateColumns(val) {
1747
+ wasm.style_set_gridTemplateColumns(this.__wbg_ptr, val);
1748
+ }
1749
+ /**
1750
+ * Gets the grid-template-column-names property
1751
+ *
1752
+ * Defines the named lines between the columns.
1753
+ *
1754
+ * @returns - An array of arrays of line names
1755
+ * @returns {string[][]}
1756
+ */
1757
+ get gridTemplateColumnNames() {
1758
+ const ret = wasm.style_gridTemplateColumnNames(this.__wbg_ptr);
1759
+ return ret;
1760
+ }
1761
+ /**
1762
+ * Sets the grid-template-row-names property
1763
+ *
1764
+ * @param val - An array of arrays of line names
1765
+ *
1766
+ * @example
1767
+ * ```typescript
1768
+ * style.gridTemplateRowNames = [["header-start"], ["header-end", "main-start"], ["main-end"]];
1769
+ * ```
1770
+ * @param {string[][]} val
1771
+ */
1772
+ set gridTemplateRowNames(val) {
1773
+ wasm.style_set_gridTemplateRowNames(this.__wbg_ptr, val);
1774
+ }
1775
+ /**
1776
+ * Sets the grid-template-column-names property
1777
+ *
1778
+ * @param val - An array of arrays of line names
1779
+ *
1780
+ * @example
1781
+ * ```typescript
1782
+ * style.gridTemplateColumnNames = [["sidebar-start"], ["sidebar-end", "main-start"], ["main-end"]];
1783
+ * ```
1784
+ * @param {string[][]} val
1785
+ */
1786
+ set gridTemplateColumnNames(val) {
1787
+ wasm.style_set_gridTemplateColumnNames(this.__wbg_ptr, val);
1788
+ }
1331
1789
  /**
1332
1790
  * Gets the gap
1333
1791
  *
@@ -1443,6 +1901,19 @@ export class Style {
1443
1901
  set gap(val) {
1444
1902
  wasm.style_set_gap(this.__wbg_ptr, val);
1445
1903
  }
1904
+ /**
1905
+ * Gets the grid-row property
1906
+ *
1907
+ * Defines which row in the grid the item should start and end at.
1908
+ * Corresponds to CSS `grid-row` shorthand.
1909
+ *
1910
+ * @returns - A `Line<GridPlacement>` with start and end placements
1911
+ * @returns {Line<GridPlacement>}
1912
+ */
1913
+ get gridRow() {
1914
+ const ret = wasm.style_gridRow(this.__wbg_ptr);
1915
+ return ret;
1916
+ }
1446
1917
  /**
1447
1918
  * Gets the maximum size constraints
1448
1919
  *
@@ -2474,6 +2945,39 @@ export class TaffyTree {
2474
2945
  }
2475
2946
  if (Symbol.dispose) TaffyTree.prototype[Symbol.dispose] = TaffyTree.prototype.free;
2476
2947
 
2948
+ /**
2949
+ * Text alignment enumeration (for block layout)
2950
+ *
2951
+ * Used by block layout to implement the legacy behaviour of `<center>` and
2952
+ * `<div align="left | right | center">`.
2953
+ *
2954
+ * @example
2955
+ * ```typescript
2956
+ * import { TextAlign } from 'taffy-js';
2957
+ *
2958
+ * style.textAlign = TextAlign.LegacyCenter; // Center block children
2959
+ * ```
2960
+ * @enum {0 | 1 | 2 | 3}
2961
+ */
2962
+ export const TextAlign = Object.freeze({
2963
+ /**
2964
+ * No special legacy text align behaviour
2965
+ */
2966
+ Auto: 0, "0": "Auto",
2967
+ /**
2968
+ * Corresponds to `-webkit-left` or `-moz-left` in browsers
2969
+ */
2970
+ LegacyLeft: 1, "1": "LegacyLeft",
2971
+ /**
2972
+ * Corresponds to `-webkit-right` or `-moz-right` in browsers
2973
+ */
2974
+ LegacyRight: 2, "2": "LegacyRight",
2975
+ /**
2976
+ * Corresponds to `-webkit-center` or `-moz-center` in browsers
2977
+ */
2978
+ LegacyCenter: 3, "3": "LegacyCenter",
2979
+ });
2980
+
2477
2981
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
2478
2982
 
2479
2983
  async function __wbg_load(module, imports) {
@@ -2513,6 +3017,10 @@ function __wbg_get_imports() {
2513
3017
  const ret = Error(getStringFromWasm0(arg0, arg1));
2514
3018
  return ret;
2515
3019
  };
3020
+ imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
3021
+ const ret = Number(arg0);
3022
+ return ret;
3023
+ };
2516
3024
  imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
2517
3025
  const ret = String(arg1);
2518
3026
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -2600,6 +3108,10 @@ function __wbg_get_imports() {
2600
3108
  const ret = arg0.call(arg1);
2601
3109
  return ret;
2602
3110
  }, arguments) };
3111
+ imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
3112
+ const ret = arg0.done;
3113
+ return ret;
3114
+ };
2603
3115
  imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
2604
3116
  const ret = Object.entries(arg0);
2605
3117
  return ret;
@@ -2677,7 +3189,7 @@ function __wbg_get_imports() {
2677
3189
  const ret = arg0.length;
2678
3190
  return ret;
2679
3191
  };
2680
- imports.wbg.__wbg_log_d1f98d69ddd6fc3e = function(arg0, arg1) {
3192
+ imports.wbg.__wbg_log_23225a7078e26a12 = function(arg0, arg1) {
2681
3193
  console.log(getStringFromWasm0(arg0, arg1));
2682
3194
  };
2683
3195
  imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
@@ -2696,10 +3208,18 @@ function __wbg_get_imports() {
2696
3208
  const ret = new Error();
2697
3209
  return ret;
2698
3210
  };
3211
+ imports.wbg.__wbg_new_b546ae120718850e = function() {
3212
+ const ret = new Map();
3213
+ return ret;
3214
+ };
2699
3215
  imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
2700
3216
  const ret = arg0.next;
2701
3217
  return ret;
2702
3218
  };
3219
+ imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
3220
+ const ret = arg0.next();
3221
+ return ret;
3222
+ }, arguments) };
2703
3223
  imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
2704
3224
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
2705
3225
  };
@@ -2710,6 +3230,13 @@ function __wbg_get_imports() {
2710
3230
  imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
2711
3231
  arg0[arg1] = arg2;
2712
3232
  };
3233
+ imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
3234
+ arg0[arg1 >>> 0] = arg2;
3235
+ };
3236
+ imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
3237
+ const ret = arg0.set(arg1, arg2);
3238
+ return ret;
3239
+ };
2713
3240
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
2714
3241
  const ret = arg1.stack;
2715
3242
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -2729,6 +3256,10 @@ function __wbg_get_imports() {
2729
3256
  const ret = TaffyError.__wrap(arg0);
2730
3257
  return ret;
2731
3258
  };
3259
+ imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
3260
+ const ret = arg0.value;
3261
+ return ret;
3262
+ };
2732
3263
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
2733
3264
  // Cast intrinsic for `Ref(String) -> Externref`.
2734
3265
  const ret = getStringFromWasm0(arg0, arg1);