taffy-layout 1.0.2 → 1.1.0
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/LICENSE +21 -0
- package/README.ja-JP.md +17 -2
- package/README.md +17 -2
- package/README.zh-CN.md +17 -2
- package/package.json +2 -2
- package/pkg/LICENSE +21 -0
- package/pkg/README.md +17 -2
- package/pkg/taffy_wasm.d.ts +474 -2
- package/pkg/taffy_wasm.js +906 -18
- package/pkg/taffy_wasm_bg.wasm +0 -0
- package/pkg/taffy_wasm_bg.wasm.d.ts +63 -1
package/pkg/taffy_wasm.js
CHANGED
|
@@ -147,6 +147,16 @@ function passArray64ToWasm0(arg, malloc) {
|
|
|
147
147
|
return ptr;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
151
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
152
|
+
for (let i = 0; i < array.length; i++) {
|
|
153
|
+
const add = addToExternrefTable0(array[i]);
|
|
154
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
155
|
+
}
|
|
156
|
+
WASM_VECTOR_LEN = array.length;
|
|
157
|
+
return ptr;
|
|
158
|
+
}
|
|
159
|
+
|
|
150
160
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
151
161
|
if (realloc === undefined) {
|
|
152
162
|
const buf = cachedTextEncoder.encode(arg);
|
|
@@ -1002,6 +1012,16 @@ export class Style {
|
|
|
1002
1012
|
const ret = wasm.style_alignSelf(this.__wbg_ptr);
|
|
1003
1013
|
return ret === 8 ? undefined : ret;
|
|
1004
1014
|
}
|
|
1015
|
+
/**
|
|
1016
|
+
* Gets the top border width
|
|
1017
|
+
*
|
|
1018
|
+
* @returns - The current top border width as a [`LengthPercentage`](JsLengthPercentage)
|
|
1019
|
+
* @returns {any}
|
|
1020
|
+
*/
|
|
1021
|
+
get borderTop() {
|
|
1022
|
+
const ret = wasm.style_borderTop(this.__wbg_ptr);
|
|
1023
|
+
return ret;
|
|
1024
|
+
}
|
|
1005
1025
|
/**
|
|
1006
1026
|
* Gets the box sizing mode
|
|
1007
1027
|
*
|
|
@@ -1016,6 +1036,16 @@ export class Style {
|
|
|
1016
1036
|
const ret = wasm.style_boxSizing(this.__wbg_ptr);
|
|
1017
1037
|
return ret;
|
|
1018
1038
|
}
|
|
1039
|
+
/**
|
|
1040
|
+
* Gets the column gap (horizontal spacing between items)
|
|
1041
|
+
*
|
|
1042
|
+
* @returns - The current column gap as a [`LengthPercentage`](JsLengthPercentage)
|
|
1043
|
+
* @returns {any}
|
|
1044
|
+
*/
|
|
1045
|
+
get columnGap() {
|
|
1046
|
+
const ret = wasm.style_columnGap(this.__wbg_ptr);
|
|
1047
|
+
return ret;
|
|
1048
|
+
}
|
|
1019
1049
|
/**
|
|
1020
1050
|
* Gets the flex-basis
|
|
1021
1051
|
*
|
|
@@ -1028,6 +1058,56 @@ export class Style {
|
|
|
1028
1058
|
const ret = wasm.style_flexBasis(this.__wbg_ptr);
|
|
1029
1059
|
return ret;
|
|
1030
1060
|
}
|
|
1061
|
+
/**
|
|
1062
|
+
* Gets the top margin
|
|
1063
|
+
*
|
|
1064
|
+
* @returns - The current top margin as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
1065
|
+
* @returns {any}
|
|
1066
|
+
*/
|
|
1067
|
+
get marginTop() {
|
|
1068
|
+
const ret = wasm.style_marginTop(this.__wbg_ptr);
|
|
1069
|
+
return ret;
|
|
1070
|
+
}
|
|
1071
|
+
/**
|
|
1072
|
+
* Gets the maximum height
|
|
1073
|
+
*
|
|
1074
|
+
* @returns - The current maximum height as a [`Dimension`](JsDimension)
|
|
1075
|
+
* @returns {Dimension}
|
|
1076
|
+
*/
|
|
1077
|
+
get maxHeight() {
|
|
1078
|
+
const ret = wasm.style_maxHeight(this.__wbg_ptr);
|
|
1079
|
+
return ret;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Gets the minimum height
|
|
1083
|
+
*
|
|
1084
|
+
* @returns - The current minimum height as a [`Dimension`](JsDimension)
|
|
1085
|
+
* @returns {Dimension}
|
|
1086
|
+
*/
|
|
1087
|
+
get minHeight() {
|
|
1088
|
+
const ret = wasm.style_minHeight(this.__wbg_ptr);
|
|
1089
|
+
return ret;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Gets the horizontal overflow behavior
|
|
1093
|
+
*
|
|
1094
|
+
* @returns - The current [`Overflow`](JsOverflow) value for the x-axis
|
|
1095
|
+
* @returns {Overflow}
|
|
1096
|
+
*/
|
|
1097
|
+
get overflowX() {
|
|
1098
|
+
const ret = wasm.style_overflowX(this.__wbg_ptr);
|
|
1099
|
+
return ret;
|
|
1100
|
+
}
|
|
1101
|
+
/**
|
|
1102
|
+
* Gets the vertical overflow behavior
|
|
1103
|
+
*
|
|
1104
|
+
* @returns - The current [`Overflow`](JsOverflow) value for the y-axis
|
|
1105
|
+
* @returns {Overflow}
|
|
1106
|
+
*/
|
|
1107
|
+
get overflowY() {
|
|
1108
|
+
const ret = wasm.style_overflowY(this.__wbg_ptr);
|
|
1109
|
+
return ret;
|
|
1110
|
+
}
|
|
1031
1111
|
/**
|
|
1032
1112
|
* Sets the border width
|
|
1033
1113
|
*
|
|
@@ -1043,6 +1123,41 @@ export class Style {
|
|
|
1043
1123
|
set border(val) {
|
|
1044
1124
|
wasm.style_set_border(this.__wbg_ptr, val);
|
|
1045
1125
|
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Sets the bottom inset offset
|
|
1128
|
+
*
|
|
1129
|
+
* @param val - The new bottom offset value
|
|
1130
|
+
*
|
|
1131
|
+
* @example
|
|
1132
|
+
* ```typescript
|
|
1133
|
+
* const style = new Style();
|
|
1134
|
+
* style.position = Position.Absolute;
|
|
1135
|
+
* style.bottom = 0;
|
|
1136
|
+
* style.bottom = "10%";
|
|
1137
|
+
* style.bottom = "auto";
|
|
1138
|
+
* ```
|
|
1139
|
+
* @param {any} val
|
|
1140
|
+
*/
|
|
1141
|
+
set bottom(val) {
|
|
1142
|
+
wasm.style_set_bottom(this.__wbg_ptr, val);
|
|
1143
|
+
}
|
|
1144
|
+
/**
|
|
1145
|
+
* Sets the height
|
|
1146
|
+
*
|
|
1147
|
+
* @param val - The new height value
|
|
1148
|
+
*
|
|
1149
|
+
* @example
|
|
1150
|
+
* ```typescript
|
|
1151
|
+
* const style = new Style();
|
|
1152
|
+
* style.height = 100;
|
|
1153
|
+
* style.height = "75%";
|
|
1154
|
+
* style.height = "auto";
|
|
1155
|
+
* ```
|
|
1156
|
+
* @param {Dimension} val
|
|
1157
|
+
*/
|
|
1158
|
+
set height(val) {
|
|
1159
|
+
wasm.style_set_height(this.__wbg_ptr, val);
|
|
1160
|
+
}
|
|
1046
1161
|
/**
|
|
1047
1162
|
* Sets the margin
|
|
1048
1163
|
*
|
|
@@ -1084,6 +1199,16 @@ export class Style {
|
|
|
1084
1199
|
const ret = wasm.style_alignItems(this.__wbg_ptr);
|
|
1085
1200
|
return ret === 7 ? undefined : ret;
|
|
1086
1201
|
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Gets the left border width
|
|
1204
|
+
*
|
|
1205
|
+
* @returns - The current left border width as a [`LengthPercentage`](JsLengthPercentage)
|
|
1206
|
+
* @returns {any}
|
|
1207
|
+
*/
|
|
1208
|
+
get borderLeft() {
|
|
1209
|
+
const ret = wasm.style_borderLeft(this.__wbg_ptr);
|
|
1210
|
+
return ret;
|
|
1211
|
+
}
|
|
1087
1212
|
/**
|
|
1088
1213
|
* Gets the flex shrink factor
|
|
1089
1214
|
*
|
|
@@ -1110,6 +1235,26 @@ export class Style {
|
|
|
1110
1235
|
const ret = wasm.style_gridColumn(this.__wbg_ptr);
|
|
1111
1236
|
return ret;
|
|
1112
1237
|
}
|
|
1238
|
+
/**
|
|
1239
|
+
* Gets the left margin
|
|
1240
|
+
*
|
|
1241
|
+
* @returns - The current left margin as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
1242
|
+
* @returns {any}
|
|
1243
|
+
*/
|
|
1244
|
+
get marginLeft() {
|
|
1245
|
+
const ret = wasm.style_marginLeft(this.__wbg_ptr);
|
|
1246
|
+
return ret;
|
|
1247
|
+
}
|
|
1248
|
+
/**
|
|
1249
|
+
* Gets the top padding
|
|
1250
|
+
*
|
|
1251
|
+
* @returns - The current top padding as a [`LengthPercentage`](JsLengthPercentage)
|
|
1252
|
+
* @returns {any}
|
|
1253
|
+
*/
|
|
1254
|
+
get paddingTop() {
|
|
1255
|
+
const ret = wasm.style_paddingTop(this.__wbg_ptr);
|
|
1256
|
+
return ret;
|
|
1257
|
+
}
|
|
1113
1258
|
/**
|
|
1114
1259
|
* Sets the display mode
|
|
1115
1260
|
*
|
|
@@ -1141,6 +1286,22 @@ export class Style {
|
|
|
1141
1286
|
set padding(val) {
|
|
1142
1287
|
wasm.style_set_padding(this.__wbg_ptr, val);
|
|
1143
1288
|
}
|
|
1289
|
+
/**
|
|
1290
|
+
* Sets the row gap (vertical spacing between items)
|
|
1291
|
+
*
|
|
1292
|
+
* @param val - The new row gap value
|
|
1293
|
+
*
|
|
1294
|
+
* @example
|
|
1295
|
+
* ```typescript
|
|
1296
|
+
* const style = new Style();
|
|
1297
|
+
* style.rowGap = 10;
|
|
1298
|
+
* style.rowGap = "5%";
|
|
1299
|
+
* ```
|
|
1300
|
+
* @param {any} val
|
|
1301
|
+
*/
|
|
1302
|
+
set rowGap(val) {
|
|
1303
|
+
wasm.style_set_rowGap(this.__wbg_ptr, val);
|
|
1304
|
+
}
|
|
1144
1305
|
/**
|
|
1145
1306
|
* Gets the aspect ratio
|
|
1146
1307
|
*
|
|
@@ -1153,6 +1314,26 @@ export class Style {
|
|
|
1153
1314
|
const ret = wasm.style_aspectRatio(this.__wbg_ptr);
|
|
1154
1315
|
return ret === 0x100000001 ? undefined : ret;
|
|
1155
1316
|
}
|
|
1317
|
+
/**
|
|
1318
|
+
* Gets the right border width
|
|
1319
|
+
*
|
|
1320
|
+
* @returns - The current right border width as a [`LengthPercentage`](JsLengthPercentage)
|
|
1321
|
+
* @returns {any}
|
|
1322
|
+
*/
|
|
1323
|
+
get borderRight() {
|
|
1324
|
+
const ret = wasm.style_borderRight(this.__wbg_ptr);
|
|
1325
|
+
return ret;
|
|
1326
|
+
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Gets the grid-row-end property
|
|
1329
|
+
*
|
|
1330
|
+
* @returns - The current grid row end placement as a [`GridPlacement`](JsGridPlacement)
|
|
1331
|
+
* @returns {any}
|
|
1332
|
+
*/
|
|
1333
|
+
get gridRowEnd() {
|
|
1334
|
+
const ret = wasm.style_gridRowEnd(this.__wbg_ptr);
|
|
1335
|
+
return ret;
|
|
1336
|
+
}
|
|
1156
1337
|
/**
|
|
1157
1338
|
* Gets the justify-self property
|
|
1158
1339
|
*
|
|
@@ -1165,6 +1346,26 @@ export class Style {
|
|
|
1165
1346
|
const ret = wasm.style_justifySelf(this.__wbg_ptr);
|
|
1166
1347
|
return ret === 8 ? undefined : ret;
|
|
1167
1348
|
}
|
|
1349
|
+
/**
|
|
1350
|
+
* Gets the right margin
|
|
1351
|
+
*
|
|
1352
|
+
* @returns - The current right margin as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
1353
|
+
* @returns {any}
|
|
1354
|
+
*/
|
|
1355
|
+
get marginRight() {
|
|
1356
|
+
const ret = wasm.style_marginRight(this.__wbg_ptr);
|
|
1357
|
+
return ret;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Gets the left padding
|
|
1361
|
+
*
|
|
1362
|
+
* @returns - The current left padding as a [`LengthPercentage`](JsLengthPercentage)
|
|
1363
|
+
* @returns {any}
|
|
1364
|
+
*/
|
|
1365
|
+
get paddingLeft() {
|
|
1366
|
+
const ret = wasm.style_paddingLeft(this.__wbg_ptr);
|
|
1367
|
+
return ret;
|
|
1368
|
+
}
|
|
1168
1369
|
/**
|
|
1169
1370
|
* Sets the grid-row property
|
|
1170
1371
|
*
|
|
@@ -1258,6 +1459,16 @@ export class Style {
|
|
|
1258
1459
|
const ret = wasm.style_alignContent(this.__wbg_ptr);
|
|
1259
1460
|
return ret === 9 ? undefined : ret;
|
|
1260
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Gets the bottom border width
|
|
1464
|
+
*
|
|
1465
|
+
* @returns - The current bottom border width as a [`LengthPercentage`](JsLengthPercentage)
|
|
1466
|
+
* @returns {any}
|
|
1467
|
+
*/
|
|
1468
|
+
get borderBottom() {
|
|
1469
|
+
const ret = wasm.style_borderBottom(this.__wbg_ptr);
|
|
1470
|
+
return ret;
|
|
1471
|
+
}
|
|
1261
1472
|
/**
|
|
1262
1473
|
* Gets whether this item is a table
|
|
1263
1474
|
*
|
|
@@ -1285,6 +1496,26 @@ export class Style {
|
|
|
1285
1496
|
const ret = wasm.style_justifyItems(this.__wbg_ptr);
|
|
1286
1497
|
return ret === 7 ? undefined : ret;
|
|
1287
1498
|
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Gets the bottom margin
|
|
1501
|
+
*
|
|
1502
|
+
* @returns - The current bottom margin as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
1503
|
+
* @returns {any}
|
|
1504
|
+
*/
|
|
1505
|
+
get marginBottom() {
|
|
1506
|
+
const ret = wasm.style_marginBottom(this.__wbg_ptr);
|
|
1507
|
+
return ret;
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
* Gets the right padding
|
|
1511
|
+
*
|
|
1512
|
+
* @returns - The current right padding as a [`LengthPercentage`](JsLengthPercentage)
|
|
1513
|
+
* @returns {any}
|
|
1514
|
+
*/
|
|
1515
|
+
get paddingRight() {
|
|
1516
|
+
const ret = wasm.style_paddingRight(this.__wbg_ptr);
|
|
1517
|
+
return ret;
|
|
1518
|
+
}
|
|
1288
1519
|
/**
|
|
1289
1520
|
* Sets the flex grow factor
|
|
1290
1521
|
*
|
|
@@ -1316,6 +1547,38 @@ export class Style {
|
|
|
1316
1547
|
set flexWrap(val) {
|
|
1317
1548
|
wasm.style_set_flexWrap(this.__wbg_ptr, val);
|
|
1318
1549
|
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Sets the maximum width
|
|
1552
|
+
*
|
|
1553
|
+
* @param val - The new maximum width value
|
|
1554
|
+
*
|
|
1555
|
+
* @example
|
|
1556
|
+
* ```typescript
|
|
1557
|
+
* const style = new Style();
|
|
1558
|
+
* style.maxWidth = 500;
|
|
1559
|
+
* style.maxWidth = "auto";
|
|
1560
|
+
* ```
|
|
1561
|
+
* @param {Dimension} val
|
|
1562
|
+
*/
|
|
1563
|
+
set maxWidth(val) {
|
|
1564
|
+
wasm.style_set_maxWidth(this.__wbg_ptr, val);
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Sets the minimum width
|
|
1568
|
+
*
|
|
1569
|
+
* @param val - The new minimum width value
|
|
1570
|
+
*
|
|
1571
|
+
* @example
|
|
1572
|
+
* ```typescript
|
|
1573
|
+
* const style = new Style();
|
|
1574
|
+
* style.minWidth = 100;
|
|
1575
|
+
* style.minWidth = "auto";
|
|
1576
|
+
* ```
|
|
1577
|
+
* @param {Dimension} val
|
|
1578
|
+
*/
|
|
1579
|
+
set minWidth(val) {
|
|
1580
|
+
wasm.style_set_minWidth(this.__wbg_ptr, val);
|
|
1581
|
+
}
|
|
1319
1582
|
/**
|
|
1320
1583
|
* Gets the flex direction
|
|
1321
1584
|
*
|
|
@@ -1356,6 +1619,26 @@ export class Style {
|
|
|
1356
1619
|
const ret = wasm.style_gridAutoRows(this.__wbg_ptr);
|
|
1357
1620
|
return ret;
|
|
1358
1621
|
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Gets the grid-row-start property
|
|
1624
|
+
*
|
|
1625
|
+
* @returns - The current grid row start placement as a [`GridPlacement`](JsGridPlacement)
|
|
1626
|
+
* @returns {any}
|
|
1627
|
+
*/
|
|
1628
|
+
get gridRowStart() {
|
|
1629
|
+
const ret = wasm.style_gridRowStart(this.__wbg_ptr);
|
|
1630
|
+
return ret;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Gets the bottom padding
|
|
1634
|
+
*
|
|
1635
|
+
* @returns - The current bottom padding as a [`LengthPercentage`](JsLengthPercentage)
|
|
1636
|
+
* @returns {any}
|
|
1637
|
+
*/
|
|
1638
|
+
get paddingBottom() {
|
|
1639
|
+
const ret = wasm.style_paddingBottom(this.__wbg_ptr);
|
|
1640
|
+
return ret;
|
|
1641
|
+
}
|
|
1359
1642
|
/**
|
|
1360
1643
|
* Sets the align-self property
|
|
1361
1644
|
*
|
|
@@ -1371,6 +1654,22 @@ export class Style {
|
|
|
1371
1654
|
set alignSelf(val) {
|
|
1372
1655
|
wasm.style_set_alignSelf(this.__wbg_ptr, val);
|
|
1373
1656
|
}
|
|
1657
|
+
/**
|
|
1658
|
+
* Sets the top border width
|
|
1659
|
+
*
|
|
1660
|
+
* @param val - The new top border width value
|
|
1661
|
+
*
|
|
1662
|
+
* @example
|
|
1663
|
+
* ```typescript
|
|
1664
|
+
* const style = new Style();
|
|
1665
|
+
* style.borderTop = 1;
|
|
1666
|
+
* style.borderTop = "2%";
|
|
1667
|
+
* ```
|
|
1668
|
+
* @param {any} val
|
|
1669
|
+
*/
|
|
1670
|
+
set borderTop(val) {
|
|
1671
|
+
wasm.style_set_borderTop(this.__wbg_ptr, val);
|
|
1672
|
+
}
|
|
1374
1673
|
/**
|
|
1375
1674
|
* Sets the box sizing mode
|
|
1376
1675
|
*
|
|
@@ -1386,6 +1685,22 @@ export class Style {
|
|
|
1386
1685
|
set boxSizing(val) {
|
|
1387
1686
|
wasm.style_set_boxSizing(this.__wbg_ptr, val);
|
|
1388
1687
|
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Sets the column gap (horizontal spacing between items)
|
|
1690
|
+
*
|
|
1691
|
+
* @param val - The new column gap value
|
|
1692
|
+
*
|
|
1693
|
+
* @example
|
|
1694
|
+
* ```typescript
|
|
1695
|
+
* const style = new Style();
|
|
1696
|
+
* style.columnGap = 10;
|
|
1697
|
+
* style.columnGap = "5%";
|
|
1698
|
+
* ```
|
|
1699
|
+
* @param {any} val
|
|
1700
|
+
*/
|
|
1701
|
+
set columnGap(val) {
|
|
1702
|
+
wasm.style_set_columnGap(this.__wbg_ptr, val);
|
|
1703
|
+
}
|
|
1389
1704
|
/**
|
|
1390
1705
|
* Sets the flex-basis
|
|
1391
1706
|
*
|
|
@@ -1401,6 +1716,85 @@ export class Style {
|
|
|
1401
1716
|
set flexBasis(val) {
|
|
1402
1717
|
wasm.style_set_flexBasis(this.__wbg_ptr, val);
|
|
1403
1718
|
}
|
|
1719
|
+
/**
|
|
1720
|
+
* Sets the top margin
|
|
1721
|
+
*
|
|
1722
|
+
* @param val - The new top margin value
|
|
1723
|
+
*
|
|
1724
|
+
* @example
|
|
1725
|
+
* ```typescript
|
|
1726
|
+
* const style = new Style();
|
|
1727
|
+
* style.marginTop = 5;
|
|
1728
|
+
* style.marginTop = "10%";
|
|
1729
|
+
* style.marginTop = "auto";
|
|
1730
|
+
* ```
|
|
1731
|
+
* @param {any} val
|
|
1732
|
+
*/
|
|
1733
|
+
set marginTop(val) {
|
|
1734
|
+
wasm.style_set_marginTop(this.__wbg_ptr, val);
|
|
1735
|
+
}
|
|
1736
|
+
/**
|
|
1737
|
+
* Sets the maximum height
|
|
1738
|
+
*
|
|
1739
|
+
* @param val - The new maximum height value
|
|
1740
|
+
*
|
|
1741
|
+
* @example
|
|
1742
|
+
* ```typescript
|
|
1743
|
+
* const style = new Style();
|
|
1744
|
+
* style.maxHeight = 300;
|
|
1745
|
+
* style.maxHeight = "auto";
|
|
1746
|
+
* ```
|
|
1747
|
+
* @param {Dimension} val
|
|
1748
|
+
*/
|
|
1749
|
+
set maxHeight(val) {
|
|
1750
|
+
wasm.style_set_maxHeight(this.__wbg_ptr, val);
|
|
1751
|
+
}
|
|
1752
|
+
/**
|
|
1753
|
+
* Sets the minimum height
|
|
1754
|
+
*
|
|
1755
|
+
* @param val - The new minimum height value
|
|
1756
|
+
*
|
|
1757
|
+
* @example
|
|
1758
|
+
* ```typescript
|
|
1759
|
+
* const style = new Style();
|
|
1760
|
+
* style.minHeight = 50;
|
|
1761
|
+
* style.minHeight = "auto";
|
|
1762
|
+
* ```
|
|
1763
|
+
* @param {Dimension} val
|
|
1764
|
+
*/
|
|
1765
|
+
set minHeight(val) {
|
|
1766
|
+
wasm.style_set_minHeight(this.__wbg_ptr, val);
|
|
1767
|
+
}
|
|
1768
|
+
/**
|
|
1769
|
+
* Sets the horizontal overflow behavior
|
|
1770
|
+
*
|
|
1771
|
+
* @param val - The new overflow value for the x-axis
|
|
1772
|
+
*
|
|
1773
|
+
* @example
|
|
1774
|
+
* ```typescript
|
|
1775
|
+
* const style = new Style();
|
|
1776
|
+
* style.overflowX = Overflow.Hidden;
|
|
1777
|
+
* ```
|
|
1778
|
+
* @param {Overflow} val
|
|
1779
|
+
*/
|
|
1780
|
+
set overflowX(val) {
|
|
1781
|
+
wasm.style_set_overflowX(this.__wbg_ptr, val);
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Sets the vertical overflow behavior
|
|
1785
|
+
*
|
|
1786
|
+
* @param val - The new overflow value for the y-axis
|
|
1787
|
+
*
|
|
1788
|
+
* @example
|
|
1789
|
+
* ```typescript
|
|
1790
|
+
* const style = new Style();
|
|
1791
|
+
* style.overflowY = Overflow.Scroll;
|
|
1792
|
+
* ```
|
|
1793
|
+
* @param {Overflow} val
|
|
1794
|
+
*/
|
|
1795
|
+
set overflowY(val) {
|
|
1796
|
+
wasm.style_set_overflowY(this.__wbg_ptr, val);
|
|
1797
|
+
}
|
|
1404
1798
|
/**
|
|
1405
1799
|
* Sets the text-align property
|
|
1406
1800
|
*
|
|
@@ -1416,6 +1810,16 @@ export class Style {
|
|
|
1416
1810
|
set textAlign(val) {
|
|
1417
1811
|
wasm.style_set_textAlign(this.__wbg_ptr, val);
|
|
1418
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Gets the grid-column-end property
|
|
1815
|
+
*
|
|
1816
|
+
* @returns - The current grid column end placement as a [`GridPlacement`](JsGridPlacement)
|
|
1817
|
+
* @returns {any}
|
|
1818
|
+
*/
|
|
1819
|
+
get gridColumnEnd() {
|
|
1820
|
+
const ret = wasm.style_gridColumnEnd(this.__wbg_ptr);
|
|
1821
|
+
return ret;
|
|
1822
|
+
}
|
|
1419
1823
|
/**
|
|
1420
1824
|
* Gets the justify-content property
|
|
1421
1825
|
*
|
|
@@ -1458,38 +1862,87 @@ export class Style {
|
|
|
1458
1862
|
wasm.style_set_alignItems(this.__wbg_ptr, val);
|
|
1459
1863
|
}
|
|
1460
1864
|
/**
|
|
1461
|
-
* Sets the
|
|
1865
|
+
* Sets the left border width
|
|
1866
|
+
*
|
|
1867
|
+
* @param val - The new left border width value
|
|
1868
|
+
*
|
|
1869
|
+
* @example
|
|
1870
|
+
* ```typescript
|
|
1871
|
+
* const style = new Style();
|
|
1872
|
+
* style.borderLeft = 1;
|
|
1873
|
+
* style.borderLeft = "2%";
|
|
1874
|
+
* ```
|
|
1875
|
+
* @param {any} val
|
|
1876
|
+
*/
|
|
1877
|
+
set borderLeft(val) {
|
|
1878
|
+
wasm.style_set_borderLeft(this.__wbg_ptr, val);
|
|
1879
|
+
}
|
|
1880
|
+
/**
|
|
1881
|
+
* Sets the flex shrink factor
|
|
1882
|
+
*
|
|
1883
|
+
* @param val - The new flex shrink factor (must be >= 0)
|
|
1884
|
+
*
|
|
1885
|
+
* @example
|
|
1886
|
+
* ```typescript
|
|
1887
|
+
* const style = new Style();
|
|
1888
|
+
* style.flexShrink = 2;
|
|
1889
|
+
* ```
|
|
1890
|
+
* @param {number} val
|
|
1891
|
+
*/
|
|
1892
|
+
set flexShrink(val) {
|
|
1893
|
+
wasm.style_set_flexShrink(this.__wbg_ptr, val);
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
* Sets the grid-column property
|
|
1897
|
+
*
|
|
1898
|
+
* @param val - A Line object with start and end GridPlacement values
|
|
1899
|
+
*
|
|
1900
|
+
* @example
|
|
1901
|
+
* ```typescript
|
|
1902
|
+
* const style = new Style();
|
|
1903
|
+
* style.display = Display.Grid;
|
|
1904
|
+
* // CSS: grid-column: 1 / 4
|
|
1905
|
+
* style.gridColumn = { start: 1, end: 4 };
|
|
1906
|
+
* // CSS: grid-column: auto / span 3
|
|
1907
|
+
* style.gridColumn = { start: "auto", end: { span: 3 } };
|
|
1908
|
+
* ```
|
|
1909
|
+
* @param {Line<GridPlacement>} val
|
|
1910
|
+
*/
|
|
1911
|
+
set gridColumn(val) {
|
|
1912
|
+
wasm.style_set_gridColumn(this.__wbg_ptr, val);
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* Sets the left margin
|
|
1462
1916
|
*
|
|
1463
|
-
* @param val - The new
|
|
1917
|
+
* @param val - The new left margin value
|
|
1464
1918
|
*
|
|
1465
1919
|
* @example
|
|
1466
1920
|
* ```typescript
|
|
1467
1921
|
* const style = new Style();
|
|
1468
|
-
* style.
|
|
1922
|
+
* style.marginLeft = 10;
|
|
1923
|
+
* style.marginLeft = "5%";
|
|
1924
|
+
* style.marginLeft = "auto";
|
|
1469
1925
|
* ```
|
|
1470
|
-
* @param {
|
|
1926
|
+
* @param {any} val
|
|
1471
1927
|
*/
|
|
1472
|
-
set
|
|
1473
|
-
wasm.
|
|
1928
|
+
set marginLeft(val) {
|
|
1929
|
+
wasm.style_set_marginLeft(this.__wbg_ptr, val);
|
|
1474
1930
|
}
|
|
1475
1931
|
/**
|
|
1476
|
-
* Sets the
|
|
1932
|
+
* Sets the top padding
|
|
1477
1933
|
*
|
|
1478
|
-
* @param val -
|
|
1934
|
+
* @param val - The new top padding value
|
|
1479
1935
|
*
|
|
1480
1936
|
* @example
|
|
1481
1937
|
* ```typescript
|
|
1482
1938
|
* const style = new Style();
|
|
1483
|
-
* style.
|
|
1484
|
-
*
|
|
1485
|
-
* style.gridColumn = { start: 1, end: 4 };
|
|
1486
|
-
* // CSS: grid-column: auto / span 3
|
|
1487
|
-
* style.gridColumn = { start: "auto", end: { span: 3 } };
|
|
1939
|
+
* style.paddingTop = 10;
|
|
1940
|
+
* style.paddingTop = "5%";
|
|
1488
1941
|
* ```
|
|
1489
|
-
* @param {
|
|
1942
|
+
* @param {any} val
|
|
1490
1943
|
*/
|
|
1491
|
-
set
|
|
1492
|
-
wasm.
|
|
1944
|
+
set paddingTop(val) {
|
|
1945
|
+
wasm.style_set_paddingTop(this.__wbg_ptr, val);
|
|
1493
1946
|
}
|
|
1494
1947
|
/**
|
|
1495
1948
|
* Gets whether this item is a replaced element
|
|
@@ -1520,6 +1973,40 @@ export class Style {
|
|
|
1520
1973
|
set aspectRatio(val) {
|
|
1521
1974
|
wasm.style_set_aspectRatio(this.__wbg_ptr, val);
|
|
1522
1975
|
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Sets the right border width
|
|
1978
|
+
*
|
|
1979
|
+
* @param val - The new right border width value
|
|
1980
|
+
*
|
|
1981
|
+
* @example
|
|
1982
|
+
* ```typescript
|
|
1983
|
+
* const style = new Style();
|
|
1984
|
+
* style.borderRight = 1;
|
|
1985
|
+
* style.borderRight = "2%";
|
|
1986
|
+
* ```
|
|
1987
|
+
* @param {any} val
|
|
1988
|
+
*/
|
|
1989
|
+
set borderRight(val) {
|
|
1990
|
+
wasm.style_set_borderRight(this.__wbg_ptr, val);
|
|
1991
|
+
}
|
|
1992
|
+
/**
|
|
1993
|
+
* Sets the grid-row-end property
|
|
1994
|
+
*
|
|
1995
|
+
* @param val - The new grid row end placement
|
|
1996
|
+
*
|
|
1997
|
+
* @example
|
|
1998
|
+
* ```typescript
|
|
1999
|
+
* const style = new Style();
|
|
2000
|
+
* style.display = Display.Grid;
|
|
2001
|
+
* style.gridRowEnd = 3;
|
|
2002
|
+
* style.gridRowEnd = "auto";
|
|
2003
|
+
* style.gridRowEnd = { span: 2 };
|
|
2004
|
+
* ```
|
|
2005
|
+
* @param {any} val
|
|
2006
|
+
*/
|
|
2007
|
+
set gridRowEnd(val) {
|
|
2008
|
+
wasm.style_set_gridRowEnd(this.__wbg_ptr, val);
|
|
2009
|
+
}
|
|
1523
2010
|
/**
|
|
1524
2011
|
* Sets the justify-self property
|
|
1525
2012
|
*
|
|
@@ -1535,6 +2022,39 @@ export class Style {
|
|
|
1535
2022
|
set justifySelf(val) {
|
|
1536
2023
|
wasm.style_set_justifySelf(this.__wbg_ptr, val);
|
|
1537
2024
|
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Sets the right margin
|
|
2027
|
+
*
|
|
2028
|
+
* @param val - The new right margin value
|
|
2029
|
+
*
|
|
2030
|
+
* @example
|
|
2031
|
+
* ```typescript
|
|
2032
|
+
* const style = new Style();
|
|
2033
|
+
* style.marginRight = 10;
|
|
2034
|
+
* style.marginRight = "5%";
|
|
2035
|
+
* style.marginRight = "auto";
|
|
2036
|
+
* ```
|
|
2037
|
+
* @param {any} val
|
|
2038
|
+
*/
|
|
2039
|
+
set marginRight(val) {
|
|
2040
|
+
wasm.style_set_marginRight(this.__wbg_ptr, val);
|
|
2041
|
+
}
|
|
2042
|
+
/**
|
|
2043
|
+
* Sets the left padding
|
|
2044
|
+
*
|
|
2045
|
+
* @param val - The new left padding value
|
|
2046
|
+
*
|
|
2047
|
+
* @example
|
|
2048
|
+
* ```typescript
|
|
2049
|
+
* const style = new Style();
|
|
2050
|
+
* style.paddingLeft = 20;
|
|
2051
|
+
* style.paddingLeft = "10%";
|
|
2052
|
+
* ```
|
|
2053
|
+
* @param {any} val
|
|
2054
|
+
*/
|
|
2055
|
+
set paddingLeft(val) {
|
|
2056
|
+
wasm.style_set_paddingLeft(this.__wbg_ptr, val);
|
|
2057
|
+
}
|
|
1538
2058
|
/**
|
|
1539
2059
|
* Gets the grid-auto-columns property
|
|
1540
2060
|
*
|
|
@@ -1547,6 +2067,16 @@ export class Style {
|
|
|
1547
2067
|
const ret = wasm.style_gridAutoColumns(this.__wbg_ptr);
|
|
1548
2068
|
return ret;
|
|
1549
2069
|
}
|
|
2070
|
+
/**
|
|
2071
|
+
* Gets the grid-column-start property
|
|
2072
|
+
*
|
|
2073
|
+
* @returns - The current grid column start placement as a [`GridPlacement`](JsGridPlacement)
|
|
2074
|
+
* @returns {any}
|
|
2075
|
+
*/
|
|
2076
|
+
get gridColumnStart() {
|
|
2077
|
+
const ret = wasm.style_gridColumnStart(this.__wbg_ptr);
|
|
2078
|
+
return ret;
|
|
2079
|
+
}
|
|
1550
2080
|
/**
|
|
1551
2081
|
* Sets the align-content property
|
|
1552
2082
|
*
|
|
@@ -1562,6 +2092,22 @@ export class Style {
|
|
|
1562
2092
|
set alignContent(val) {
|
|
1563
2093
|
wasm.style_set_alignContent(this.__wbg_ptr, val);
|
|
1564
2094
|
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Sets the bottom border width
|
|
2097
|
+
*
|
|
2098
|
+
* @param val - The new bottom border width value
|
|
2099
|
+
*
|
|
2100
|
+
* @example
|
|
2101
|
+
* ```typescript
|
|
2102
|
+
* const style = new Style();
|
|
2103
|
+
* style.borderBottom = 1;
|
|
2104
|
+
* style.borderBottom = "2%";
|
|
2105
|
+
* ```
|
|
2106
|
+
* @param {any} val
|
|
2107
|
+
*/
|
|
2108
|
+
set borderBottom(val) {
|
|
2109
|
+
wasm.style_set_borderBottom(this.__wbg_ptr, val);
|
|
2110
|
+
}
|
|
1565
2111
|
/**
|
|
1566
2112
|
* Sets whether this item is a table
|
|
1567
2113
|
*
|
|
@@ -1587,6 +2133,39 @@ export class Style {
|
|
|
1587
2133
|
set justifyItems(val) {
|
|
1588
2134
|
wasm.style_set_justifyItems(this.__wbg_ptr, val);
|
|
1589
2135
|
}
|
|
2136
|
+
/**
|
|
2137
|
+
* Sets the bottom margin
|
|
2138
|
+
*
|
|
2139
|
+
* @param val - The new bottom margin value
|
|
2140
|
+
*
|
|
2141
|
+
* @example
|
|
2142
|
+
* ```typescript
|
|
2143
|
+
* const style = new Style();
|
|
2144
|
+
* style.marginBottom = 5;
|
|
2145
|
+
* style.marginBottom = "10%";
|
|
2146
|
+
* style.marginBottom = "auto";
|
|
2147
|
+
* ```
|
|
2148
|
+
* @param {any} val
|
|
2149
|
+
*/
|
|
2150
|
+
set marginBottom(val) {
|
|
2151
|
+
wasm.style_set_marginBottom(this.__wbg_ptr, val);
|
|
2152
|
+
}
|
|
2153
|
+
/**
|
|
2154
|
+
* Sets the right padding
|
|
2155
|
+
*
|
|
2156
|
+
* @param val - The new right padding value
|
|
2157
|
+
*
|
|
2158
|
+
* @example
|
|
2159
|
+
* ```typescript
|
|
2160
|
+
* const style = new Style();
|
|
2161
|
+
* style.paddingRight = 20;
|
|
2162
|
+
* style.paddingRight = "10%";
|
|
2163
|
+
* ```
|
|
2164
|
+
* @param {any} val
|
|
2165
|
+
*/
|
|
2166
|
+
set paddingRight(val) {
|
|
2167
|
+
wasm.style_set_paddingRight(this.__wbg_ptr, val);
|
|
2168
|
+
}
|
|
1590
2169
|
/**
|
|
1591
2170
|
* Gets the grid-template-rows property
|
|
1592
2171
|
*
|
|
@@ -1647,6 +2226,40 @@ export class Style {
|
|
|
1647
2226
|
set gridAutoRows(val) {
|
|
1648
2227
|
wasm.style_set_gridAutoRows(this.__wbg_ptr, val);
|
|
1649
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* Sets the grid-row-start property
|
|
2231
|
+
*
|
|
2232
|
+
* @param val - The new grid row start placement
|
|
2233
|
+
*
|
|
2234
|
+
* @example
|
|
2235
|
+
* ```typescript
|
|
2236
|
+
* const style = new Style();
|
|
2237
|
+
* style.display = Display.Grid;
|
|
2238
|
+
* style.gridRowStart = 1;
|
|
2239
|
+
* style.gridRowStart = "auto";
|
|
2240
|
+
* style.gridRowStart = { span: 2 };
|
|
2241
|
+
* ```
|
|
2242
|
+
* @param {any} val
|
|
2243
|
+
*/
|
|
2244
|
+
set gridRowStart(val) {
|
|
2245
|
+
wasm.style_set_gridRowStart(this.__wbg_ptr, val);
|
|
2246
|
+
}
|
|
2247
|
+
/**
|
|
2248
|
+
* Sets the bottom padding
|
|
2249
|
+
*
|
|
2250
|
+
* @param val - The new bottom padding value
|
|
2251
|
+
*
|
|
2252
|
+
* @example
|
|
2253
|
+
* ```typescript
|
|
2254
|
+
* const style = new Style();
|
|
2255
|
+
* style.paddingBottom = 10;
|
|
2256
|
+
* style.paddingBottom = "5%";
|
|
2257
|
+
* ```
|
|
2258
|
+
* @param {any} val
|
|
2259
|
+
*/
|
|
2260
|
+
set paddingBottom(val) {
|
|
2261
|
+
wasm.style_set_paddingBottom(this.__wbg_ptr, val);
|
|
2262
|
+
}
|
|
1650
2263
|
/**
|
|
1651
2264
|
* Gets the grid-template-areas property
|
|
1652
2265
|
*
|
|
@@ -1659,6 +2272,24 @@ export class Style {
|
|
|
1659
2272
|
const ret = wasm.style_gridTemplateAreas(this.__wbg_ptr);
|
|
1660
2273
|
return ret;
|
|
1661
2274
|
}
|
|
2275
|
+
/**
|
|
2276
|
+
* Sets the grid-column-end property
|
|
2277
|
+
*
|
|
2278
|
+
* @param val - The new grid column end placement
|
|
2279
|
+
*
|
|
2280
|
+
* @example
|
|
2281
|
+
* ```typescript
|
|
2282
|
+
* const style = new Style();
|
|
2283
|
+
* style.display = Display.Grid;
|
|
2284
|
+
* style.gridColumnEnd = 4;
|
|
2285
|
+
* style.gridColumnEnd = "auto";
|
|
2286
|
+
* style.gridColumnEnd = { span: 3 };
|
|
2287
|
+
* ```
|
|
2288
|
+
* @param {any} val
|
|
2289
|
+
*/
|
|
2290
|
+
set gridColumnEnd(val) {
|
|
2291
|
+
wasm.style_set_gridColumnEnd(this.__wbg_ptr, val);
|
|
2292
|
+
}
|
|
1662
2293
|
/**
|
|
1663
2294
|
* Sets the justify-content property
|
|
1664
2295
|
*
|
|
@@ -1720,6 +2351,24 @@ export class Style {
|
|
|
1720
2351
|
set gridAutoColumns(val) {
|
|
1721
2352
|
wasm.style_set_gridAutoColumns(this.__wbg_ptr, val);
|
|
1722
2353
|
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Sets the grid-column-start property
|
|
2356
|
+
*
|
|
2357
|
+
* @param val - The new grid column start placement
|
|
2358
|
+
*
|
|
2359
|
+
* @example
|
|
2360
|
+
* ```typescript
|
|
2361
|
+
* const style = new Style();
|
|
2362
|
+
* style.display = Display.Grid;
|
|
2363
|
+
* style.gridColumnStart = 1;
|
|
2364
|
+
* style.gridColumnStart = "auto";
|
|
2365
|
+
* style.gridColumnStart = { span: 2 };
|
|
2366
|
+
* ```
|
|
2367
|
+
* @param {any} val
|
|
2368
|
+
*/
|
|
2369
|
+
set gridColumnStart(val) {
|
|
2370
|
+
wasm.style_set_gridColumnStart(this.__wbg_ptr, val);
|
|
2371
|
+
}
|
|
1723
2372
|
/**
|
|
1724
2373
|
* Sets the grid-template-rows property
|
|
1725
2374
|
*
|
|
@@ -1834,23 +2483,113 @@ export class Style {
|
|
|
1834
2483
|
const ret = wasm.style_gap(this.__wbg_ptr);
|
|
1835
2484
|
return ret;
|
|
1836
2485
|
}
|
|
2486
|
+
/**
|
|
2487
|
+
* Reads multiple style properties in a single WASM call.
|
|
2488
|
+
*
|
|
2489
|
+
* Supports dot notation for nested properties (e.g., `"size.width"`, `"margin.left"`).
|
|
2490
|
+
*
|
|
2491
|
+
* @param keys - Property paths to read
|
|
2492
|
+
* @returns - Single value if one key, array of values if multiple keys
|
|
2493
|
+
*
|
|
2494
|
+
* @example
|
|
2495
|
+
* ```typescript
|
|
2496
|
+
* const style = new Style();
|
|
2497
|
+
* style.display = Display.Flex;
|
|
2498
|
+
* style.size = { width: 100, height: "50%" };
|
|
2499
|
+
*
|
|
2500
|
+
* // Read single property
|
|
2501
|
+
* const d = style.get("display");
|
|
2502
|
+
*
|
|
2503
|
+
* // Read nested property
|
|
2504
|
+
* const w = style.get("size.width");
|
|
2505
|
+
*
|
|
2506
|
+
* // Read multiple properties with destructuring
|
|
2507
|
+
* const [display, width, margin] = style.get("display", "size.width", "margin.left");
|
|
2508
|
+
* ```
|
|
2509
|
+
* @param {...string[]} keys
|
|
2510
|
+
* @returns {any}
|
|
2511
|
+
*/
|
|
2512
|
+
get(...keys) {
|
|
2513
|
+
const ptr0 = passArrayJsValueToWasm0(keys, wasm.__wbindgen_malloc);
|
|
2514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2515
|
+
const ret = wasm.style_get(this.__wbg_ptr, ptr0, len0);
|
|
2516
|
+
return ret;
|
|
2517
|
+
}
|
|
1837
2518
|
/**
|
|
1838
2519
|
* Creates a new Style instance with default values
|
|
1839
2520
|
*
|
|
2521
|
+
* @param props - Optional object with initial style properties
|
|
1840
2522
|
* @returns - A new `Style` object with all properties set to CSS defaults
|
|
1841
2523
|
*
|
|
1842
2524
|
* @example
|
|
1843
2525
|
* ```typescript
|
|
2526
|
+
* // Create with defaults
|
|
1844
2527
|
* const style = new Style();
|
|
1845
2528
|
* console.log(style.display); // Display.Block
|
|
2529
|
+
*
|
|
2530
|
+
* // Create with initial properties
|
|
2531
|
+
* const style2 = new Style({
|
|
2532
|
+
* display: Display.Flex,
|
|
2533
|
+
* flexDirection: FlexDirection.Column,
|
|
2534
|
+
* "size.width": 200,
|
|
2535
|
+
* "margin.left": 10
|
|
2536
|
+
* });
|
|
1846
2537
|
* ```
|
|
2538
|
+
* @param {any | null} [props]
|
|
1847
2539
|
*/
|
|
1848
|
-
constructor() {
|
|
1849
|
-
const ret = wasm.style_new();
|
|
2540
|
+
constructor(props) {
|
|
2541
|
+
const ret = wasm.style_new(isLikeNone(props) ? 0 : addToExternrefTable0(props));
|
|
1850
2542
|
this.__wbg_ptr = ret >>> 0;
|
|
1851
2543
|
StyleFinalization.register(this, this.__wbg_ptr, this);
|
|
1852
2544
|
return this;
|
|
1853
2545
|
}
|
|
2546
|
+
/**
|
|
2547
|
+
* Sets multiple style properties in a single WASM call.
|
|
2548
|
+
*
|
|
2549
|
+
* Accepts an object where keys are property paths (supporting dot notation)
|
|
2550
|
+
* and values are the new property values.
|
|
2551
|
+
*
|
|
2552
|
+
* @param props - Object with property paths as keys and values to set
|
|
2553
|
+
*
|
|
2554
|
+
* @example
|
|
2555
|
+
* ```typescript
|
|
2556
|
+
* const style = new Style();
|
|
2557
|
+
*
|
|
2558
|
+
* // Set multiple properties at once
|
|
2559
|
+
* style.set({
|
|
2560
|
+
* display: Display.Flex,
|
|
2561
|
+
* flexDirection: FlexDirection.Column,
|
|
2562
|
+
* "size.width": 200,
|
|
2563
|
+
* "size.height": "50%",
|
|
2564
|
+
* "margin.left": 10,
|
|
2565
|
+
* "margin.right": "auto"
|
|
2566
|
+
* });
|
|
2567
|
+
* ```
|
|
2568
|
+
* @param {any} props
|
|
2569
|
+
*/
|
|
2570
|
+
set(props) {
|
|
2571
|
+
wasm.style_set(this.__wbg_ptr, props);
|
|
2572
|
+
}
|
|
2573
|
+
/**
|
|
2574
|
+
* Gets the top inset offset
|
|
2575
|
+
*
|
|
2576
|
+
* @returns - The current top offset as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
2577
|
+
* @returns {any}
|
|
2578
|
+
*/
|
|
2579
|
+
get top() {
|
|
2580
|
+
const ret = wasm.style_top(this.__wbg_ptr);
|
|
2581
|
+
return ret;
|
|
2582
|
+
}
|
|
2583
|
+
/**
|
|
2584
|
+
* Gets the left inset offset
|
|
2585
|
+
*
|
|
2586
|
+
* @returns - The current left offset as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
2587
|
+
* @returns {any}
|
|
2588
|
+
*/
|
|
2589
|
+
get left() {
|
|
2590
|
+
const ret = wasm.style_left(this.__wbg_ptr);
|
|
2591
|
+
return ret;
|
|
2592
|
+
}
|
|
1854
2593
|
/**
|
|
1855
2594
|
* Gets the size (width and height)
|
|
1856
2595
|
*
|
|
@@ -1873,6 +2612,26 @@ export class Style {
|
|
|
1873
2612
|
const ret = wasm.style_inset(this.__wbg_ptr);
|
|
1874
2613
|
return ret;
|
|
1875
2614
|
}
|
|
2615
|
+
/**
|
|
2616
|
+
* Gets the right inset offset
|
|
2617
|
+
*
|
|
2618
|
+
* @returns - The current right offset as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
2619
|
+
* @returns {any}
|
|
2620
|
+
*/
|
|
2621
|
+
get right() {
|
|
2622
|
+
const ret = wasm.style_right(this.__wbg_ptr);
|
|
2623
|
+
return ret;
|
|
2624
|
+
}
|
|
2625
|
+
/**
|
|
2626
|
+
* Gets the width
|
|
2627
|
+
*
|
|
2628
|
+
* @returns - The current width as a [`Dimension`](JsDimension)
|
|
2629
|
+
* @returns {Dimension}
|
|
2630
|
+
*/
|
|
2631
|
+
get width() {
|
|
2632
|
+
const ret = wasm.style_width(this.__wbg_ptr);
|
|
2633
|
+
return ret;
|
|
2634
|
+
}
|
|
1876
2635
|
/**
|
|
1877
2636
|
* Gets the border width
|
|
1878
2637
|
*
|
|
@@ -1885,6 +2644,26 @@ export class Style {
|
|
|
1885
2644
|
const ret = wasm.style_border(this.__wbg_ptr);
|
|
1886
2645
|
return ret;
|
|
1887
2646
|
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Gets the bottom inset offset
|
|
2649
|
+
*
|
|
2650
|
+
* @returns - The current bottom offset as a [`LengthPercentageAuto`](JsLengthPercentageAuto)
|
|
2651
|
+
* @returns {any}
|
|
2652
|
+
*/
|
|
2653
|
+
get bottom() {
|
|
2654
|
+
const ret = wasm.style_bottom(this.__wbg_ptr);
|
|
2655
|
+
return ret;
|
|
2656
|
+
}
|
|
2657
|
+
/**
|
|
2658
|
+
* Gets the height
|
|
2659
|
+
*
|
|
2660
|
+
* @returns - The current height as a [`Dimension`](JsDimension)
|
|
2661
|
+
* @returns {Dimension}
|
|
2662
|
+
*/
|
|
2663
|
+
get height() {
|
|
2664
|
+
const ret = wasm.style_height(this.__wbg_ptr);
|
|
2665
|
+
return ret;
|
|
2666
|
+
}
|
|
1888
2667
|
/**
|
|
1889
2668
|
* Gets the margin
|
|
1890
2669
|
*
|
|
@@ -1923,6 +2702,16 @@ export class Style {
|
|
|
1923
2702
|
const ret = wasm.style_padding(this.__wbg_ptr);
|
|
1924
2703
|
return ret;
|
|
1925
2704
|
}
|
|
2705
|
+
/**
|
|
2706
|
+
* Gets the row gap (vertical spacing between items)
|
|
2707
|
+
*
|
|
2708
|
+
* @returns - The current row gap as a [`LengthPercentage`](JsLengthPercentage)
|
|
2709
|
+
* @returns {any}
|
|
2710
|
+
*/
|
|
2711
|
+
get rowGap() {
|
|
2712
|
+
const ret = wasm.style_rowGap(this.__wbg_ptr);
|
|
2713
|
+
return ret;
|
|
2714
|
+
}
|
|
1926
2715
|
/**
|
|
1927
2716
|
* Sets the gap
|
|
1928
2717
|
*
|
|
@@ -1938,6 +2727,24 @@ export class Style {
|
|
|
1938
2727
|
set gap(val) {
|
|
1939
2728
|
wasm.style_set_gap(this.__wbg_ptr, val);
|
|
1940
2729
|
}
|
|
2730
|
+
/**
|
|
2731
|
+
* Sets the top inset offset
|
|
2732
|
+
*
|
|
2733
|
+
* @param val - The new top offset value
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```typescript
|
|
2737
|
+
* const style = new Style();
|
|
2738
|
+
* style.position = Position.Absolute;
|
|
2739
|
+
* style.top = 0;
|
|
2740
|
+
* style.top = "10%";
|
|
2741
|
+
* style.top = "auto";
|
|
2742
|
+
* ```
|
|
2743
|
+
* @param {any} val
|
|
2744
|
+
*/
|
|
2745
|
+
set top(val) {
|
|
2746
|
+
wasm.style_set_top(this.__wbg_ptr, val);
|
|
2747
|
+
}
|
|
1941
2748
|
/**
|
|
1942
2749
|
* Gets the grid-row property
|
|
1943
2750
|
*
|
|
@@ -1997,6 +2804,24 @@ export class Style {
|
|
|
1997
2804
|
const ret = wasm.style_position(this.__wbg_ptr);
|
|
1998
2805
|
return ret;
|
|
1999
2806
|
}
|
|
2807
|
+
/**
|
|
2808
|
+
* Sets the left inset offset
|
|
2809
|
+
*
|
|
2810
|
+
* @param val - The new left offset value
|
|
2811
|
+
*
|
|
2812
|
+
* @example
|
|
2813
|
+
* ```typescript
|
|
2814
|
+
* const style = new Style();
|
|
2815
|
+
* style.position = Position.Absolute;
|
|
2816
|
+
* style.left = 0;
|
|
2817
|
+
* style.left = "10%";
|
|
2818
|
+
* style.left = "auto";
|
|
2819
|
+
* ```
|
|
2820
|
+
* @param {any} val
|
|
2821
|
+
*/
|
|
2822
|
+
set left(val) {
|
|
2823
|
+
wasm.style_set_left(this.__wbg_ptr, val);
|
|
2824
|
+
}
|
|
2000
2825
|
/**
|
|
2001
2826
|
* Sets the size (width and height)
|
|
2002
2827
|
*
|
|
@@ -2039,6 +2864,26 @@ export class Style {
|
|
|
2039
2864
|
const ret = wasm.style_flexWrap(this.__wbg_ptr);
|
|
2040
2865
|
return ret;
|
|
2041
2866
|
}
|
|
2867
|
+
/**
|
|
2868
|
+
* Gets the maximum width
|
|
2869
|
+
*
|
|
2870
|
+
* @returns - The current maximum width as a [`Dimension`](JsDimension)
|
|
2871
|
+
* @returns {Dimension}
|
|
2872
|
+
*/
|
|
2873
|
+
get maxWidth() {
|
|
2874
|
+
const ret = wasm.style_maxWidth(this.__wbg_ptr);
|
|
2875
|
+
return ret;
|
|
2876
|
+
}
|
|
2877
|
+
/**
|
|
2878
|
+
* Gets the minimum width
|
|
2879
|
+
*
|
|
2880
|
+
* @returns - The current minimum width as a [`Dimension`](JsDimension)
|
|
2881
|
+
* @returns {Dimension}
|
|
2882
|
+
*/
|
|
2883
|
+
get minWidth() {
|
|
2884
|
+
const ret = wasm.style_minWidth(this.__wbg_ptr);
|
|
2885
|
+
return ret;
|
|
2886
|
+
}
|
|
2042
2887
|
/**
|
|
2043
2888
|
* Sets the inset
|
|
2044
2889
|
*
|
|
@@ -2055,6 +2900,41 @@ export class Style {
|
|
|
2055
2900
|
set inset(val) {
|
|
2056
2901
|
wasm.style_set_inset(this.__wbg_ptr, val);
|
|
2057
2902
|
}
|
|
2903
|
+
/**
|
|
2904
|
+
* Sets the right inset offset
|
|
2905
|
+
*
|
|
2906
|
+
* @param val - The new right offset value
|
|
2907
|
+
*
|
|
2908
|
+
* @example
|
|
2909
|
+
* ```typescript
|
|
2910
|
+
* const style = new Style();
|
|
2911
|
+
* style.position = Position.Absolute;
|
|
2912
|
+
* style.right = 0;
|
|
2913
|
+
* style.right = "10%";
|
|
2914
|
+
* style.right = "auto";
|
|
2915
|
+
* ```
|
|
2916
|
+
* @param {any} val
|
|
2917
|
+
*/
|
|
2918
|
+
set right(val) {
|
|
2919
|
+
wasm.style_set_right(this.__wbg_ptr, val);
|
|
2920
|
+
}
|
|
2921
|
+
/**
|
|
2922
|
+
* Sets the width
|
|
2923
|
+
*
|
|
2924
|
+
* @param val - The new width value
|
|
2925
|
+
*
|
|
2926
|
+
* @example
|
|
2927
|
+
* ```typescript
|
|
2928
|
+
* const style = new Style();
|
|
2929
|
+
* style.width = 200;
|
|
2930
|
+
* style.width = "50%";
|
|
2931
|
+
* style.width = "auto";
|
|
2932
|
+
* ```
|
|
2933
|
+
* @param {Dimension} val
|
|
2934
|
+
*/
|
|
2935
|
+
set width(val) {
|
|
2936
|
+
wasm.style_set_width(this.__wbg_ptr, val);
|
|
2937
|
+
}
|
|
2058
2938
|
}
|
|
2059
2939
|
if (Symbol.dispose) Style.prototype[Symbol.dispose] = Style.prototype.free;
|
|
2060
2940
|
|
|
@@ -3284,6 +4164,10 @@ function __wbg_get_imports() {
|
|
|
3284
4164
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
3285
4165
|
}
|
|
3286
4166
|
};
|
|
4167
|
+
imports.wbg.__wbg_from_29a8414a7a7cd19d = function(arg0) {
|
|
4168
|
+
const ret = Array.from(arg0);
|
|
4169
|
+
return ret;
|
|
4170
|
+
};
|
|
3287
4171
|
imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
|
|
3288
4172
|
const ret = arg0[arg1 >>> 0];
|
|
3289
4173
|
return ret;
|
|
@@ -3438,6 +4322,10 @@ function __wbg_get_imports() {
|
|
|
3438
4322
|
table.set(offset + 2, true);
|
|
3439
4323
|
table.set(offset + 3, false);
|
|
3440
4324
|
};
|
|
4325
|
+
imports.wbg.__wbindgen_object_is_undefined = function(arg0) {
|
|
4326
|
+
const ret = arg0 === undefined;
|
|
4327
|
+
return ret;
|
|
4328
|
+
};
|
|
3441
4329
|
|
|
3442
4330
|
return imports;
|
|
3443
4331
|
}
|