taffy-wasm 0.9.7 → 0.9.9
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/README.md +108 -12
- package/package.json +1 -1
- package/taffy_wasm.d.ts +308 -6
- package/taffy_wasm.js +543 -12
- package/taffy_wasm_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npm install taffy-js
|
|
|
22
22
|
|
|
23
23
|
## 🚀 Quick Start
|
|
24
24
|
|
|
25
|
-
```
|
|
25
|
+
```typescript
|
|
26
26
|
import {
|
|
27
27
|
loadTaffy,
|
|
28
28
|
TaffyTree,
|
|
@@ -147,26 +147,29 @@ class Style {
|
|
|
147
147
|
// Layout Mode
|
|
148
148
|
display: Display; // Block, Flex, Grid, None
|
|
149
149
|
position: Position; // Relative, Absolute
|
|
150
|
+
boxSizing: BoxSizing; // BorderBox, ContentBox
|
|
151
|
+
overflow: Point<Overflow>; // Overflow handling
|
|
150
152
|
|
|
151
|
-
// Flexbox
|
|
153
|
+
// Flexbox Properties
|
|
152
154
|
flexDirection: FlexDirection; // Row, Column, RowReverse, ColumnReverse
|
|
153
155
|
flexWrap: FlexWrap; // NoWrap, Wrap, WrapReverse
|
|
154
156
|
flexGrow: number; // Growth factor (default: 0)
|
|
155
157
|
flexShrink: number; // Shrink factor (default: 1)
|
|
156
158
|
flexBasis: Dimension; // Initial size
|
|
157
159
|
|
|
158
|
-
// Alignment
|
|
160
|
+
// Alignment Properties
|
|
159
161
|
alignItems: AlignItems | undefined;
|
|
160
162
|
alignSelf: AlignSelf | undefined;
|
|
161
163
|
alignContent: AlignContent | undefined;
|
|
162
164
|
justifyContent: JustifyContent | undefined;
|
|
165
|
+
justifyItems: AlignItems | undefined; // Grid container default justify
|
|
166
|
+
justifySelf: AlignSelf | undefined; // Grid item self-justify
|
|
163
167
|
|
|
164
168
|
// Sizing
|
|
165
169
|
size: Size<Dimension>; // Width and height
|
|
166
170
|
minSize: Size<Dimension>; // Minimum constraints
|
|
167
171
|
maxSize: Size<Dimension>; // Maximum constraints
|
|
168
172
|
aspectRatio: number | undefined; // Width/height ratio
|
|
169
|
-
boxSizing: BoxSizing; // BorderBox, ContentBox
|
|
170
173
|
|
|
171
174
|
// Spacing
|
|
172
175
|
margin: Rect<LengthPercentageAuto>;
|
|
@@ -175,8 +178,25 @@ class Style {
|
|
|
175
178
|
gap: Size<LengthPercentage>; // Row and column gap
|
|
176
179
|
inset: Rect<LengthPercentageAuto>; // For absolute positioning
|
|
177
180
|
|
|
178
|
-
//
|
|
179
|
-
|
|
181
|
+
// Block Layout Properties
|
|
182
|
+
itemIsTable: boolean; // Is this a table element?
|
|
183
|
+
itemIsReplaced: boolean; // Is this a replaced element (img, video)?
|
|
184
|
+
textAlign: TextAlign; // Legacy text alignment
|
|
185
|
+
scrollbarWidth: number; // Scrollbar gutter width in pixels
|
|
186
|
+
|
|
187
|
+
// CSS Grid Container Properties
|
|
188
|
+
gridAutoFlow: GridAutoFlow; // Row, Column, RowDense, ColumnDense
|
|
189
|
+
gridTemplateRows: GridTrack[]; // Track sizing for rows
|
|
190
|
+
gridTemplateColumns: GridTrack[]; // Track sizing for columns
|
|
191
|
+
gridAutoRows: TrackSizing[]; // Size for implicit rows
|
|
192
|
+
gridAutoColumns: TrackSizing[]; // Size for implicit columns
|
|
193
|
+
gridTemplateAreas: GridArea[]; // Named grid areas
|
|
194
|
+
gridTemplateRowNames: string[][]; // Named lines between rows
|
|
195
|
+
gridTemplateColumnNames: string[][]; // Named lines between columns
|
|
196
|
+
|
|
197
|
+
// CSS Grid Item Properties
|
|
198
|
+
gridRow: Line<GridPlacement>; // grid-row (start/end)
|
|
199
|
+
gridColumn: Line<GridPlacement>; // grid-column (start/end)
|
|
180
200
|
}
|
|
181
201
|
```
|
|
182
202
|
|
|
@@ -290,14 +310,26 @@ enum JustifyContent {
|
|
|
290
310
|
}
|
|
291
311
|
enum Overflow {
|
|
292
312
|
Visible,
|
|
313
|
+
Clip,
|
|
293
314
|
Hidden,
|
|
294
315
|
Scroll,
|
|
295
|
-
Auto,
|
|
296
316
|
}
|
|
297
317
|
enum BoxSizing {
|
|
298
318
|
BorderBox,
|
|
299
319
|
ContentBox,
|
|
300
320
|
}
|
|
321
|
+
enum TextAlign {
|
|
322
|
+
Auto,
|
|
323
|
+
LegacyLeft,
|
|
324
|
+
LegacyRight,
|
|
325
|
+
LegacyCenter,
|
|
326
|
+
}
|
|
327
|
+
enum GridAutoFlow {
|
|
328
|
+
Row,
|
|
329
|
+
Column,
|
|
330
|
+
RowDense,
|
|
331
|
+
ColumnDense,
|
|
332
|
+
}
|
|
301
333
|
```
|
|
302
334
|
|
|
303
335
|
### Types
|
|
@@ -327,6 +359,24 @@ interface Point<T> {
|
|
|
327
359
|
// Available space for layout computation
|
|
328
360
|
type AvailableSpace = number | "minContent" | "maxContent";
|
|
329
361
|
|
|
362
|
+
// Grid Placement (CSS grid-row-start / grid-column-start)
|
|
363
|
+
type GridPlacement = "auto" | number | { span: number };
|
|
364
|
+
|
|
365
|
+
// Grid Line (CSS grid-row / grid-column shorthand)
|
|
366
|
+
interface Line<T> {
|
|
367
|
+
start: T;
|
|
368
|
+
end: T;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
// Grid Template Area
|
|
372
|
+
interface GridArea {
|
|
373
|
+
name: string;
|
|
374
|
+
row_start: number;
|
|
375
|
+
row_end: number;
|
|
376
|
+
column_start: number;
|
|
377
|
+
column_end: number;
|
|
378
|
+
}
|
|
379
|
+
|
|
330
380
|
// Measure function for custom content measurement
|
|
331
381
|
type MeasureFunction = (
|
|
332
382
|
knownDimensions: Size<number | undefined>,
|
|
@@ -341,7 +391,7 @@ type MeasureFunction = (
|
|
|
341
391
|
|
|
342
392
|
For text nodes or other content that needs dynamic measurement:
|
|
343
393
|
|
|
344
|
-
```
|
|
394
|
+
```typescript
|
|
345
395
|
const textNode = tree.newLeafWithContext(textStyle, { text: "Hello, World!" });
|
|
346
396
|
|
|
347
397
|
tree.computeLayoutWithMeasure(
|
|
@@ -363,7 +413,7 @@ tree.computeLayoutWithMeasure(
|
|
|
363
413
|
|
|
364
414
|
Methods that can fail throw a `TaffyError` as a JavaScript exception. Use try-catch to handle errors:
|
|
365
415
|
|
|
366
|
-
```
|
|
416
|
+
```typescript
|
|
367
417
|
try {
|
|
368
418
|
const nodeId = tree.newLeaf(style);
|
|
369
419
|
console.log("Created node:", nodeId);
|
|
@@ -386,7 +436,7 @@ Taffy-JS works in all modern browsers that support WebAssembly:
|
|
|
386
436
|
|
|
387
437
|
### Flexbox Row Layout
|
|
388
438
|
|
|
389
|
-
```
|
|
439
|
+
```typescript
|
|
390
440
|
const rowStyle = new Style();
|
|
391
441
|
rowStyle.display = Display.Flex;
|
|
392
442
|
rowStyle.flexDirection = FlexDirection.Row;
|
|
@@ -394,9 +444,46 @@ rowStyle.justifyContent = JustifyContent.SpaceBetween;
|
|
|
394
444
|
rowStyle.gap = { width: 10, height: 0 };
|
|
395
445
|
```
|
|
396
446
|
|
|
447
|
+
### CSS Grid Layout
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
import { Style, Display, GridAutoFlow } from "taffy-js";
|
|
451
|
+
|
|
452
|
+
const gridStyle = new Style();
|
|
453
|
+
gridStyle.display = Display.Grid;
|
|
454
|
+
gridStyle.gridAutoFlow = GridAutoFlow.Row;
|
|
455
|
+
gridStyle.gap = { width: 10, height: 10 };
|
|
456
|
+
|
|
457
|
+
// Grid item placement
|
|
458
|
+
const itemStyle = new Style();
|
|
459
|
+
itemStyle.gridRow = { start: 1, end: 3 }; // Spans 2 rows
|
|
460
|
+
itemStyle.gridColumn = { start: 1, end: { span: 2 } }; // Spans 2 columns
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### Grid Template Areas
|
|
464
|
+
|
|
465
|
+
```typescript
|
|
466
|
+
const gridStyle = new Style();
|
|
467
|
+
gridStyle.display = Display.Grid;
|
|
468
|
+
gridStyle.gridTemplateAreas = [
|
|
469
|
+
{ name: "header", row_start: 1, row_end: 2, column_start: 1, column_end: 4 },
|
|
470
|
+
{ name: "sidebar", row_start: 2, row_end: 4, column_start: 1, column_end: 2 },
|
|
471
|
+
{ name: "main", row_start: 2, row_end: 4, column_start: 2, column_end: 4 },
|
|
472
|
+
{ name: "footer", row_start: 4, row_end: 5, column_start: 1, column_end: 4 },
|
|
473
|
+
];
|
|
474
|
+
|
|
475
|
+
// Named grid lines
|
|
476
|
+
gridStyle.gridTemplateRowNames = [
|
|
477
|
+
["header-start"],
|
|
478
|
+
["header-end", "content-start"],
|
|
479
|
+
["content-end", "footer-start"],
|
|
480
|
+
["footer-end"],
|
|
481
|
+
];
|
|
482
|
+
```
|
|
483
|
+
|
|
397
484
|
### Absolute Positioning
|
|
398
485
|
|
|
399
|
-
```
|
|
486
|
+
```typescript
|
|
400
487
|
const absoluteStyle = new Style();
|
|
401
488
|
absoluteStyle.position = Position.Absolute;
|
|
402
489
|
absoluteStyle.inset = { left: 10, top: 10, right: "auto", bottom: "auto" };
|
|
@@ -405,7 +492,7 @@ absoluteStyle.size = { width: 100, height: 50 };
|
|
|
405
492
|
|
|
406
493
|
### Percentage Sizing
|
|
407
494
|
|
|
408
|
-
```
|
|
495
|
+
```typescript
|
|
409
496
|
const percentStyle = new Style();
|
|
410
497
|
percentStyle.size = {
|
|
411
498
|
width: "50%", // 50% of parent
|
|
@@ -413,6 +500,15 @@ percentStyle.size = {
|
|
|
413
500
|
};
|
|
414
501
|
```
|
|
415
502
|
|
|
503
|
+
### Block Layout with Replaced Elements
|
|
504
|
+
|
|
505
|
+
```typescript
|
|
506
|
+
const imgStyle = new Style();
|
|
507
|
+
imgStyle.itemIsReplaced = true;
|
|
508
|
+
imgStyle.aspectRatio = 16 / 9; // 16:9 aspect ratio
|
|
509
|
+
imgStyle.size = { width: "100%", height: "auto" };
|
|
510
|
+
```
|
|
511
|
+
|
|
416
512
|
## 🏗️ Building from Source
|
|
417
513
|
|
|
418
514
|
```bash
|
package/package.json
CHANGED
package/taffy_wasm.d.ts
CHANGED
|
@@ -405,6 +405,68 @@ export interface DetailedGridItemsInfo {
|
|
|
405
405
|
column_end: number;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
/**
|
|
409
|
+
* Grid placement type for positioning grid items.
|
|
410
|
+
*
|
|
411
|
+
* Specifies how an item is placed on a grid track (row or column).
|
|
412
|
+
* Follows CSS `grid-row-start` / `grid-column-start` specification.
|
|
413
|
+
*
|
|
414
|
+
* @remarks
|
|
415
|
+
* - `"auto"`: Auto-placement using the grid's flow algorithm
|
|
416
|
+
* - `number`: Place at a specific line index (1-indexed, can be negative)
|
|
417
|
+
* - `{ span: number }`: Span a specified number of tracks
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* ```typescript
|
|
421
|
+
* import type { GridPlacement, Line } from 'taffy-js';
|
|
422
|
+
*
|
|
423
|
+
* // Line index (CSS: grid-row-start: 2)
|
|
424
|
+
* const lineIndex: GridPlacement = 2;
|
|
425
|
+
*
|
|
426
|
+
* // Auto placement (CSS: grid-row-start: auto)
|
|
427
|
+
* const auto: GridPlacement = "auto";
|
|
428
|
+
*
|
|
429
|
+
* // Span (CSS: grid-row-start: span 3)
|
|
430
|
+
* const span: GridPlacement = { span: 3 };
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
export type GridPlacement = "auto" | number | { span: number };
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Line type representing start and end positions.
|
|
437
|
+
*
|
|
438
|
+
* A container for start and end values, used for CSS grid-row and grid-column
|
|
439
|
+
* shorthand properties.
|
|
440
|
+
*
|
|
441
|
+
* @typeParam T - The type of start and end values
|
|
442
|
+
*
|
|
443
|
+
* @property start - The starting line/position
|
|
444
|
+
* @property end - The ending line/position
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```typescript
|
|
448
|
+
* import { Style, Display, type Line, type GridPlacement } from 'taffy-js';
|
|
449
|
+
*
|
|
450
|
+
* const style = new Style();
|
|
451
|
+
* style.display = Display.Grid;
|
|
452
|
+
*
|
|
453
|
+
* // CSS: grid-row: 1 / 3
|
|
454
|
+
* style.gridRow = { start: 1, end: 3 };
|
|
455
|
+
*
|
|
456
|
+
* // CSS: grid-column: 1 / span 2
|
|
457
|
+
* style.gridColumn = { start: 1, end: { span: 2 } };
|
|
458
|
+
*
|
|
459
|
+
* // CSS: grid-row: auto / auto
|
|
460
|
+
* style.gridRow = { start: "auto", end: "auto" };
|
|
461
|
+
* ```
|
|
462
|
+
*/
|
|
463
|
+
export interface Line<T> {
|
|
464
|
+
/** The starting position (CSS: *-start) */
|
|
465
|
+
start: T;
|
|
466
|
+
/** The ending position (CSS: *-end) */
|
|
467
|
+
end: T;
|
|
468
|
+
}
|
|
469
|
+
|
|
408
470
|
|
|
409
471
|
|
|
410
472
|
/**
|
|
@@ -677,6 +739,40 @@ export enum FlexWrap {
|
|
|
677
739
|
WrapReverse = 2,
|
|
678
740
|
}
|
|
679
741
|
|
|
742
|
+
/**
|
|
743
|
+
* Grid auto flow enumeration
|
|
744
|
+
*
|
|
745
|
+
* Controls whether grid items are placed row-wise or column-wise, and whether
|
|
746
|
+
* the sparse or dense packing algorithm is used.
|
|
747
|
+
*
|
|
748
|
+
* @example
|
|
749
|
+
* ```typescript
|
|
750
|
+
* import { GridAutoFlow } from 'taffy-js';
|
|
751
|
+
*
|
|
752
|
+
* style.gridAutoFlow = GridAutoFlow.Row; // Fill rows first
|
|
753
|
+
* style.gridAutoFlow = GridAutoFlow.Column; // Fill columns first
|
|
754
|
+
* style.gridAutoFlow = GridAutoFlow.RowDense; // Fill rows, pack densely
|
|
755
|
+
* ```
|
|
756
|
+
*/
|
|
757
|
+
export enum GridAutoFlow {
|
|
758
|
+
/**
|
|
759
|
+
* Items are placed by filling each row in turn, adding new rows as necessary
|
|
760
|
+
*/
|
|
761
|
+
Row = 0,
|
|
762
|
+
/**
|
|
763
|
+
* Items are placed by filling each column in turn, adding new columns as necessary
|
|
764
|
+
*/
|
|
765
|
+
Column = 1,
|
|
766
|
+
/**
|
|
767
|
+
* Combines `Row` with the dense packing algorithm
|
|
768
|
+
*/
|
|
769
|
+
RowDense = 2,
|
|
770
|
+
/**
|
|
771
|
+
* Combines `Column` with the dense packing algorithm
|
|
772
|
+
*/
|
|
773
|
+
ColumnDense = 3,
|
|
774
|
+
}
|
|
775
|
+
|
|
680
776
|
/**
|
|
681
777
|
* Main axis alignment enumeration
|
|
682
778
|
*
|
|
@@ -928,17 +1024,17 @@ export enum Overflow {
|
|
|
928
1024
|
*/
|
|
929
1025
|
Visible = 0,
|
|
930
1026
|
/**
|
|
931
|
-
* Content is clipped at the container boundary
|
|
1027
|
+
* Content is clipped at the container boundary, but unlike Hidden, this forbids all scrolling
|
|
932
1028
|
*/
|
|
933
|
-
|
|
1029
|
+
Clip = 1,
|
|
934
1030
|
/**
|
|
935
|
-
*
|
|
1031
|
+
* Content is clipped at the container boundary
|
|
936
1032
|
*/
|
|
937
|
-
|
|
1033
|
+
Hidden = 2,
|
|
938
1034
|
/**
|
|
939
|
-
*
|
|
1035
|
+
* Always display scrollbars for scrollable content
|
|
940
1036
|
*/
|
|
941
|
-
|
|
1037
|
+
Scroll = 3,
|
|
942
1038
|
}
|
|
943
1039
|
|
|
944
1040
|
/**
|
|
@@ -1042,6 +1138,16 @@ export class Style {
|
|
|
1042
1138
|
* @returns - A `Rect<LengthPercentageAuto>` with left, right, top, bottom margins
|
|
1043
1139
|
*/
|
|
1044
1140
|
margin: Rect<LengthPercentageAuto>;
|
|
1141
|
+
/**
|
|
1142
|
+
* Gets the text-align property
|
|
1143
|
+
*
|
|
1144
|
+
* Used by block layout to implement legacy text alignment behavior.
|
|
1145
|
+
*
|
|
1146
|
+
* @returns - The current [`TextAlign`](JsTextAlign) value
|
|
1147
|
+
*
|
|
1148
|
+
* @defaultValue - `TextAlign.Auto`
|
|
1149
|
+
*/
|
|
1150
|
+
textAlign: TextAlign;
|
|
1045
1151
|
/**
|
|
1046
1152
|
* Gets the align-items property
|
|
1047
1153
|
*
|
|
@@ -1059,6 +1165,15 @@ export class Style {
|
|
|
1059
1165
|
* @returns - The flex shrink factor (default: 1)
|
|
1060
1166
|
*/
|
|
1061
1167
|
flexShrink: number;
|
|
1168
|
+
/**
|
|
1169
|
+
* Gets the grid-column property
|
|
1170
|
+
*
|
|
1171
|
+
* Defines which column in the grid the item should start and end at.
|
|
1172
|
+
* Corresponds to CSS `grid-column` shorthand.
|
|
1173
|
+
*
|
|
1174
|
+
* @returns - A `Line<GridPlacement>` with start and end placements
|
|
1175
|
+
*/
|
|
1176
|
+
gridColumn: Line<GridPlacement>;
|
|
1062
1177
|
/**
|
|
1063
1178
|
* Gets the display mode
|
|
1064
1179
|
*
|
|
@@ -1085,6 +1200,23 @@ export class Style {
|
|
|
1085
1200
|
* @returns - The aspect ratio value, or `undefined` if not set
|
|
1086
1201
|
*/
|
|
1087
1202
|
aspectRatio: number | undefined;
|
|
1203
|
+
/**
|
|
1204
|
+
* Gets the justify-self property
|
|
1205
|
+
*
|
|
1206
|
+
* Overrides the parent's justify-items for this specific element in the inline axis.
|
|
1207
|
+
*
|
|
1208
|
+
* @returns - The current [`AlignSelf`](JsAlignSelf) value (returns `Auto` if not set)
|
|
1209
|
+
*/
|
|
1210
|
+
justifySelf: AlignSelf | undefined;
|
|
1211
|
+
/**
|
|
1212
|
+
* Gets the grid-row property
|
|
1213
|
+
*
|
|
1214
|
+
* Defines which row in the grid the item should start and end at.
|
|
1215
|
+
* Corresponds to CSS `grid-row` shorthand.
|
|
1216
|
+
*
|
|
1217
|
+
* @returns - A `Line<GridPlacement>` with start and end placements
|
|
1218
|
+
*/
|
|
1219
|
+
gridRow: Line<GridPlacement>;
|
|
1088
1220
|
/**
|
|
1089
1221
|
* Gets the maximum size constraints
|
|
1090
1222
|
*
|
|
@@ -1123,6 +1255,25 @@ export class Style {
|
|
|
1123
1255
|
* @returns - The current [`AlignContent`](JsAlignContent) value, or `undefined` if not set
|
|
1124
1256
|
*/
|
|
1125
1257
|
alignContent: AlignContent | undefined;
|
|
1258
|
+
/**
|
|
1259
|
+
* Gets whether this item is a table
|
|
1260
|
+
*
|
|
1261
|
+
* Table children are handled specially in block layout.
|
|
1262
|
+
*
|
|
1263
|
+
* @returns - Whether the item is treated as a table
|
|
1264
|
+
*
|
|
1265
|
+
* @defaultValue - `false`
|
|
1266
|
+
*/
|
|
1267
|
+
itemIsTable: boolean;
|
|
1268
|
+
/**
|
|
1269
|
+
* Gets the justify-items property
|
|
1270
|
+
*
|
|
1271
|
+
* Defines the default justify-self for all children in the inline axis.
|
|
1272
|
+
* This is primarily used for CSS Grid layout.
|
|
1273
|
+
*
|
|
1274
|
+
* @returns - The current [`AlignItems`](JsAlignItems) value, or `undefined` if not set
|
|
1275
|
+
*/
|
|
1276
|
+
justifyItems: AlignItems | undefined;
|
|
1126
1277
|
/**
|
|
1127
1278
|
* Gets the flex grow factor
|
|
1128
1279
|
*
|
|
@@ -1152,6 +1303,24 @@ export class Style {
|
|
|
1152
1303
|
* @defaultValue - `FlexDirection.Row`
|
|
1153
1304
|
*/
|
|
1154
1305
|
flexDirection: FlexDirection;
|
|
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
|
+
*/
|
|
1315
|
+
gridAutoFlow: GridAutoFlow;
|
|
1316
|
+
/**
|
|
1317
|
+
* Gets the grid-auto-rows property
|
|
1318
|
+
*
|
|
1319
|
+
* Defines the size of implicitly created rows.
|
|
1320
|
+
*
|
|
1321
|
+
* @returns - An array of track sizing functions
|
|
1322
|
+
*/
|
|
1323
|
+
gridAutoRows: any;
|
|
1155
1324
|
/**
|
|
1156
1325
|
* Gets the justify-content property
|
|
1157
1326
|
*
|
|
@@ -1160,6 +1329,75 @@ export class Style {
|
|
|
1160
1329
|
* @returns - The current [`JustifyContent`](JsJustifyContent) value, or `undefined` if not set
|
|
1161
1330
|
*/
|
|
1162
1331
|
justifyContent: JustifyContent | undefined;
|
|
1332
|
+
/**
|
|
1333
|
+
* Gets the scrollbar width
|
|
1334
|
+
*
|
|
1335
|
+
* The width of the scrollbar gutter when `overflow` is set to `Scroll`.
|
|
1336
|
+
*
|
|
1337
|
+
* @returns - The scrollbar width in pixels
|
|
1338
|
+
*
|
|
1339
|
+
* @defaultValue - `0`
|
|
1340
|
+
*/
|
|
1341
|
+
scrollbarWidth: number;
|
|
1342
|
+
/**
|
|
1343
|
+
* Gets whether this item is a replaced element
|
|
1344
|
+
*
|
|
1345
|
+
* Replaced elements have special sizing behavior (e.g., `<img>`, `<video>`).
|
|
1346
|
+
*
|
|
1347
|
+
* @returns - Whether the item is a replaced element
|
|
1348
|
+
*
|
|
1349
|
+
* @defaultValue - `false`
|
|
1350
|
+
*/
|
|
1351
|
+
itemIsReplaced: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* Gets the grid-auto-columns property
|
|
1354
|
+
*
|
|
1355
|
+
* Defines the size of implicitly created columns.
|
|
1356
|
+
*
|
|
1357
|
+
* @returns - An array of track sizing functions
|
|
1358
|
+
*/
|
|
1359
|
+
gridAutoColumns: any;
|
|
1360
|
+
/**
|
|
1361
|
+
* Gets the grid-template-rows property
|
|
1362
|
+
*
|
|
1363
|
+
* Defines the track sizing functions (heights) of the grid rows.
|
|
1364
|
+
* Returns Taffy's native serialization format.
|
|
1365
|
+
*
|
|
1366
|
+
* @returns - An array of `GridTrack` values
|
|
1367
|
+
*/
|
|
1368
|
+
gridTemplateRows: GridTrack[];
|
|
1369
|
+
/**
|
|
1370
|
+
* Gets the grid-template-areas property
|
|
1371
|
+
*
|
|
1372
|
+
* Defines named grid areas that can be referenced by grid items.
|
|
1373
|
+
*
|
|
1374
|
+
* @returns - An array of `GridArea` values
|
|
1375
|
+
*/
|
|
1376
|
+
gridTemplateAreas: GridArea[];
|
|
1377
|
+
/**
|
|
1378
|
+
* Gets the grid-template-columns property
|
|
1379
|
+
*
|
|
1380
|
+
* Defines the track sizing functions (widths) of the grid columns.
|
|
1381
|
+
*
|
|
1382
|
+
* @returns - An array of `GridTrack` values
|
|
1383
|
+
*/
|
|
1384
|
+
gridTemplateColumns: GridTrack[];
|
|
1385
|
+
/**
|
|
1386
|
+
* Gets the grid-template-row-names property
|
|
1387
|
+
*
|
|
1388
|
+
* Defines the named lines between the rows.
|
|
1389
|
+
*
|
|
1390
|
+
* @returns - An array of arrays of line names
|
|
1391
|
+
*/
|
|
1392
|
+
gridTemplateRowNames: string[][];
|
|
1393
|
+
/**
|
|
1394
|
+
* Gets the grid-template-column-names property
|
|
1395
|
+
*
|
|
1396
|
+
* Defines the named lines between the columns.
|
|
1397
|
+
*
|
|
1398
|
+
* @returns - An array of arrays of line names
|
|
1399
|
+
*/
|
|
1400
|
+
gridTemplateColumnNames: string[][];
|
|
1163
1401
|
/**
|
|
1164
1402
|
* Gets the gap
|
|
1165
1403
|
*
|
|
@@ -1824,6 +2062,38 @@ export class TaffyTree {
|
|
|
1824
2062
|
setStyle(node: bigint, style: Style): void;
|
|
1825
2063
|
}
|
|
1826
2064
|
|
|
2065
|
+
/**
|
|
2066
|
+
* Text alignment enumeration (for block layout)
|
|
2067
|
+
*
|
|
2068
|
+
* Used by block layout to implement the legacy behaviour of `<center>` and
|
|
2069
|
+
* `<div align="left | right | center">`.
|
|
2070
|
+
*
|
|
2071
|
+
* @example
|
|
2072
|
+
* ```typescript
|
|
2073
|
+
* import { TextAlign } from 'taffy-js';
|
|
2074
|
+
*
|
|
2075
|
+
* style.textAlign = TextAlign.LegacyCenter; // Center block children
|
|
2076
|
+
* ```
|
|
2077
|
+
*/
|
|
2078
|
+
export enum TextAlign {
|
|
2079
|
+
/**
|
|
2080
|
+
* No special legacy text align behaviour
|
|
2081
|
+
*/
|
|
2082
|
+
Auto = 0,
|
|
2083
|
+
/**
|
|
2084
|
+
* Corresponds to `-webkit-left` or `-moz-left` in browsers
|
|
2085
|
+
*/
|
|
2086
|
+
LegacyLeft = 1,
|
|
2087
|
+
/**
|
|
2088
|
+
* Corresponds to `-webkit-right` or `-moz-right` in browsers
|
|
2089
|
+
*/
|
|
2090
|
+
LegacyRight = 2,
|
|
2091
|
+
/**
|
|
2092
|
+
* Corresponds to `-webkit-center` or `-moz-center` in browsers
|
|
2093
|
+
*/
|
|
2094
|
+
LegacyCenter = 3,
|
|
2095
|
+
}
|
|
2096
|
+
|
|
1827
2097
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1828
2098
|
|
|
1829
2099
|
export interface InitOutput {
|
|
@@ -1866,8 +2136,22 @@ export interface InitOutput {
|
|
|
1866
2136
|
readonly style_flexShrink: (a: number) => number;
|
|
1867
2137
|
readonly style_flexWrap: (a: number) => number;
|
|
1868
2138
|
readonly style_gap: (a: number) => any;
|
|
2139
|
+
readonly style_gridAutoColumns: (a: number) => any;
|
|
2140
|
+
readonly style_gridAutoFlow: (a: number) => number;
|
|
2141
|
+
readonly style_gridAutoRows: (a: number) => any;
|
|
2142
|
+
readonly style_gridColumn: (a: number) => any;
|
|
2143
|
+
readonly style_gridRow: (a: number) => any;
|
|
2144
|
+
readonly style_gridTemplateAreas: (a: number) => any;
|
|
2145
|
+
readonly style_gridTemplateColumnNames: (a: number) => any;
|
|
2146
|
+
readonly style_gridTemplateColumns: (a: number) => any;
|
|
2147
|
+
readonly style_gridTemplateRowNames: (a: number) => any;
|
|
2148
|
+
readonly style_gridTemplateRows: (a: number) => any;
|
|
1869
2149
|
readonly style_inset: (a: number) => any;
|
|
2150
|
+
readonly style_itemIsReplaced: (a: number) => number;
|
|
2151
|
+
readonly style_itemIsTable: (a: number) => number;
|
|
1870
2152
|
readonly style_justifyContent: (a: number) => number;
|
|
2153
|
+
readonly style_justifyItems: (a: number) => number;
|
|
2154
|
+
readonly style_justifySelf: (a: number) => number;
|
|
1871
2155
|
readonly style_margin: (a: number) => any;
|
|
1872
2156
|
readonly style_maxSize: (a: number) => any;
|
|
1873
2157
|
readonly style_minSize: (a: number) => any;
|
|
@@ -1875,6 +2159,7 @@ export interface InitOutput {
|
|
|
1875
2159
|
readonly style_overflow: (a: number) => any;
|
|
1876
2160
|
readonly style_padding: (a: number) => any;
|
|
1877
2161
|
readonly style_position: (a: number) => number;
|
|
2162
|
+
readonly style_scrollbarWidth: (a: number) => number;
|
|
1878
2163
|
readonly style_set_alignContent: (a: number, b: any) => void;
|
|
1879
2164
|
readonly style_set_alignItems: (a: number, b: any) => void;
|
|
1880
2165
|
readonly style_set_alignSelf: (a: number, b: any) => void;
|
|
@@ -1888,16 +2173,33 @@ export interface InitOutput {
|
|
|
1888
2173
|
readonly style_set_flexShrink: (a: number, b: number) => void;
|
|
1889
2174
|
readonly style_set_flexWrap: (a: number, b: number) => void;
|
|
1890
2175
|
readonly style_set_gap: (a: number, b: any) => void;
|
|
2176
|
+
readonly style_set_gridAutoColumns: (a: number, b: any) => void;
|
|
2177
|
+
readonly style_set_gridAutoFlow: (a: number, b: number) => void;
|
|
2178
|
+
readonly style_set_gridAutoRows: (a: number, b: any) => void;
|
|
2179
|
+
readonly style_set_gridColumn: (a: number, b: any) => void;
|
|
2180
|
+
readonly style_set_gridRow: (a: number, b: any) => void;
|
|
2181
|
+
readonly style_set_gridTemplateAreas: (a: number, b: any) => void;
|
|
2182
|
+
readonly style_set_gridTemplateColumnNames: (a: number, b: any) => void;
|
|
2183
|
+
readonly style_set_gridTemplateColumns: (a: number, b: any) => void;
|
|
2184
|
+
readonly style_set_gridTemplateRowNames: (a: number, b: any) => void;
|
|
2185
|
+
readonly style_set_gridTemplateRows: (a: number, b: any) => void;
|
|
1891
2186
|
readonly style_set_inset: (a: number, b: any) => void;
|
|
2187
|
+
readonly style_set_itemIsReplaced: (a: number, b: number) => void;
|
|
2188
|
+
readonly style_set_itemIsTable: (a: number, b: number) => void;
|
|
1892
2189
|
readonly style_set_justifyContent: (a: number, b: any) => void;
|
|
2190
|
+
readonly style_set_justifyItems: (a: number, b: any) => void;
|
|
2191
|
+
readonly style_set_justifySelf: (a: number, b: any) => void;
|
|
1893
2192
|
readonly style_set_margin: (a: number, b: any) => void;
|
|
1894
2193
|
readonly style_set_maxSize: (a: number, b: any) => void;
|
|
1895
2194
|
readonly style_set_minSize: (a: number, b: any) => void;
|
|
1896
2195
|
readonly style_set_overflow: (a: number, b: any) => void;
|
|
1897
2196
|
readonly style_set_padding: (a: number, b: any) => void;
|
|
1898
2197
|
readonly style_set_position: (a: number, b: number) => void;
|
|
2198
|
+
readonly style_set_scrollbarWidth: (a: number, b: number) => void;
|
|
1899
2199
|
readonly style_set_size: (a: number, b: any) => void;
|
|
2200
|
+
readonly style_set_textAlign: (a: number, b: number) => void;
|
|
1900
2201
|
readonly style_size: (a: number) => any;
|
|
2202
|
+
readonly style_textAlign: (a: number) => number;
|
|
1901
2203
|
readonly taffyerror_message: (a: number) => [number, number];
|
|
1902
2204
|
readonly taffytree_addChild: (a: number, b: bigint, c: bigint) => [number, number];
|
|
1903
2205
|
readonly taffytree_childCount: (a: number, b: bigint) => number;
|
package/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
|
-
|
|
904
|
+
Clip: 1, "1": "Clip",
|
|
870
905
|
/**
|
|
871
|
-
*
|
|
906
|
+
* Content is clipped at the container boundary
|
|
872
907
|
*/
|
|
873
|
-
|
|
908
|
+
Hidden: 2, "2": "Hidden",
|
|
874
909
|
/**
|
|
875
|
-
*
|
|
910
|
+
* Always display scrollbars for scrollable content
|
|
876
911
|
*/
|
|
877
|
-
|
|
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.
|
|
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);
|
package/taffy_wasm_bg.wasm
CHANGED
|
Binary file
|