taffy-js 0.2.6 → 0.2.7
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 +16 -29
- package/package.json +1 -1
- package/pkg/README.md +16 -29
- package/pkg/package.json +2 -2
- package/pkg/taffy_wasm.d.ts +65 -172
- package/pkg/taffy_wasm.js +2459 -2646
- package/pkg/taffy_wasm_bg.wasm +0 -0
- package/pkg/taffy_wasm_bg.wasm.d.ts +24 -119
package/README.md
CHANGED
|
@@ -44,18 +44,13 @@ async function main() {
|
|
|
44
44
|
containerStyle.display = Display.Flex;
|
|
45
45
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
46
46
|
containerStyle.alignItems = AlignItems.Center;
|
|
47
|
-
containerStyle.size = { width:
|
|
48
|
-
containerStyle.padding = {
|
|
49
|
-
left: { Length: 10 },
|
|
50
|
-
right: { Length: 10 },
|
|
51
|
-
top: { Length: 10 },
|
|
52
|
-
bottom: { Length: 10 },
|
|
53
|
-
};
|
|
47
|
+
containerStyle.size = { width: 300, height: 200 };
|
|
48
|
+
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
54
49
|
|
|
55
50
|
// Create child styles
|
|
56
51
|
const childStyle = new Style();
|
|
57
52
|
childStyle.flexGrow = 1;
|
|
58
|
-
childStyle.size = { width:
|
|
53
|
+
childStyle.size = { width: "100%", height: "auto" };
|
|
59
54
|
|
|
60
55
|
// Create nodes
|
|
61
56
|
const child1 = tree.newLeaf(childStyle);
|
|
@@ -66,10 +61,7 @@ async function main() {
|
|
|
66
61
|
);
|
|
67
62
|
|
|
68
63
|
// Compute layout
|
|
69
|
-
tree.computeLayout(container, {
|
|
70
|
-
width: { Definite: 300 },
|
|
71
|
-
height: { Definite: 200 },
|
|
72
|
-
});
|
|
64
|
+
tree.computeLayout(container, { width: 300, height: 200 });
|
|
73
65
|
|
|
74
66
|
// Read computed layouts
|
|
75
67
|
const containerLayout = tree.getLayout(container);
|
|
@@ -311,10 +303,10 @@ enum BoxSizing {
|
|
|
311
303
|
### Types
|
|
312
304
|
|
|
313
305
|
```typescript
|
|
314
|
-
// Dimension values
|
|
315
|
-
type Dimension =
|
|
316
|
-
type LengthPercentage =
|
|
317
|
-
type LengthPercentageAuto =
|
|
306
|
+
// Dimension values (CSS-like syntax)
|
|
307
|
+
type Dimension = number | `${number}%` | "auto"; // e.g., 100, "50%", "auto"
|
|
308
|
+
type LengthPercentage = number | `${number}%`; // e.g., 10, "25%"
|
|
309
|
+
type LengthPercentageAuto = number | `${number}%` | "auto";
|
|
318
310
|
|
|
319
311
|
// Geometry
|
|
320
312
|
interface Size<T> {
|
|
@@ -333,7 +325,7 @@ interface Point<T> {
|
|
|
333
325
|
}
|
|
334
326
|
|
|
335
327
|
// Available space for layout computation
|
|
336
|
-
type AvailableSpace =
|
|
328
|
+
type AvailableSpace = number | "MinContent" | "MaxContent";
|
|
337
329
|
|
|
338
330
|
// Measure function for custom content measurement
|
|
339
331
|
type MeasureFunction = (
|
|
@@ -354,7 +346,7 @@ const textNode = tree.newLeafWithContext(textStyle, { text: "Hello, World!" });
|
|
|
354
346
|
|
|
355
347
|
tree.computeLayoutWithMeasure(
|
|
356
348
|
rootNode,
|
|
357
|
-
{ width:
|
|
349
|
+
{ width: 800, height: "MaxContent" },
|
|
358
350
|
(known, available, node, context, style) => {
|
|
359
351
|
if (context?.text) {
|
|
360
352
|
// Your text measurement logic here
|
|
@@ -399,7 +391,7 @@ const rowStyle = new Style();
|
|
|
399
391
|
rowStyle.display = Display.Flex;
|
|
400
392
|
rowStyle.flexDirection = FlexDirection.Row;
|
|
401
393
|
rowStyle.justifyContent = JustifyContent.SpaceBetween;
|
|
402
|
-
rowStyle.gap = { width:
|
|
394
|
+
rowStyle.gap = { width: 10, height: 0 };
|
|
403
395
|
```
|
|
404
396
|
|
|
405
397
|
### Absolute Positioning
|
|
@@ -407,13 +399,8 @@ rowStyle.gap = { width: { Length: 10 }, height: { Length: 0 } };
|
|
|
407
399
|
```javascript
|
|
408
400
|
const absoluteStyle = new Style();
|
|
409
401
|
absoluteStyle.position = Position.Absolute;
|
|
410
|
-
absoluteStyle.inset = {
|
|
411
|
-
|
|
412
|
-
top: { Length: 10 },
|
|
413
|
-
right: "Auto",
|
|
414
|
-
bottom: "Auto",
|
|
415
|
-
};
|
|
416
|
-
absoluteStyle.size = { width: { Length: 100 }, height: { Length: 50 } };
|
|
402
|
+
absoluteStyle.inset = { left: 10, top: 10, right: "auto", bottom: "auto" };
|
|
403
|
+
absoluteStyle.size = { width: 100, height: 50 };
|
|
417
404
|
```
|
|
418
405
|
|
|
419
406
|
### Percentage Sizing
|
|
@@ -421,8 +408,8 @@ absoluteStyle.size = { width: { Length: 100 }, height: { Length: 50 } };
|
|
|
421
408
|
```javascript
|
|
422
409
|
const percentStyle = new Style();
|
|
423
410
|
percentStyle.size = {
|
|
424
|
-
width:
|
|
425
|
-
height:
|
|
411
|
+
width: "50%", // 50% of parent
|
|
412
|
+
height: "100%", // 100% of parent
|
|
426
413
|
};
|
|
427
414
|
```
|
|
428
415
|
|
|
@@ -430,7 +417,7 @@ percentStyle.size = {
|
|
|
430
417
|
|
|
431
418
|
```bash
|
|
432
419
|
# Clone the repository
|
|
433
|
-
git clone https://github.com/
|
|
420
|
+
git clone https://github.com/ByteLandTechnology/taffy-js.git
|
|
434
421
|
cd taffy-js
|
|
435
422
|
|
|
436
423
|
# Install dependencies
|
package/package.json
CHANGED
package/pkg/README.md
CHANGED
|
@@ -44,18 +44,13 @@ async function main() {
|
|
|
44
44
|
containerStyle.display = Display.Flex;
|
|
45
45
|
containerStyle.flexDirection = FlexDirection.Column;
|
|
46
46
|
containerStyle.alignItems = AlignItems.Center;
|
|
47
|
-
containerStyle.size = { width:
|
|
48
|
-
containerStyle.padding = {
|
|
49
|
-
left: { Length: 10 },
|
|
50
|
-
right: { Length: 10 },
|
|
51
|
-
top: { Length: 10 },
|
|
52
|
-
bottom: { Length: 10 },
|
|
53
|
-
};
|
|
47
|
+
containerStyle.size = { width: 300, height: 200 };
|
|
48
|
+
containerStyle.padding = { left: 10, right: 10, top: 10, bottom: 10 };
|
|
54
49
|
|
|
55
50
|
// Create child styles
|
|
56
51
|
const childStyle = new Style();
|
|
57
52
|
childStyle.flexGrow = 1;
|
|
58
|
-
childStyle.size = { width:
|
|
53
|
+
childStyle.size = { width: "100%", height: "auto" };
|
|
59
54
|
|
|
60
55
|
// Create nodes
|
|
61
56
|
const child1 = tree.newLeaf(childStyle);
|
|
@@ -66,10 +61,7 @@ async function main() {
|
|
|
66
61
|
);
|
|
67
62
|
|
|
68
63
|
// Compute layout
|
|
69
|
-
tree.computeLayout(container, {
|
|
70
|
-
width: { Definite: 300 },
|
|
71
|
-
height: { Definite: 200 },
|
|
72
|
-
});
|
|
64
|
+
tree.computeLayout(container, { width: 300, height: 200 });
|
|
73
65
|
|
|
74
66
|
// Read computed layouts
|
|
75
67
|
const containerLayout = tree.getLayout(container);
|
|
@@ -311,10 +303,10 @@ enum BoxSizing {
|
|
|
311
303
|
### Types
|
|
312
304
|
|
|
313
305
|
```typescript
|
|
314
|
-
// Dimension values
|
|
315
|
-
type Dimension =
|
|
316
|
-
type LengthPercentage =
|
|
317
|
-
type LengthPercentageAuto =
|
|
306
|
+
// Dimension values (CSS-like syntax)
|
|
307
|
+
type Dimension = number | `${number}%` | "auto"; // e.g., 100, "50%", "auto"
|
|
308
|
+
type LengthPercentage = number | `${number}%`; // e.g., 10, "25%"
|
|
309
|
+
type LengthPercentageAuto = number | `${number}%` | "auto";
|
|
318
310
|
|
|
319
311
|
// Geometry
|
|
320
312
|
interface Size<T> {
|
|
@@ -333,7 +325,7 @@ interface Point<T> {
|
|
|
333
325
|
}
|
|
334
326
|
|
|
335
327
|
// Available space for layout computation
|
|
336
|
-
type AvailableSpace =
|
|
328
|
+
type AvailableSpace = number | "MinContent" | "MaxContent";
|
|
337
329
|
|
|
338
330
|
// Measure function for custom content measurement
|
|
339
331
|
type MeasureFunction = (
|
|
@@ -354,7 +346,7 @@ const textNode = tree.newLeafWithContext(textStyle, { text: "Hello, World!" });
|
|
|
354
346
|
|
|
355
347
|
tree.computeLayoutWithMeasure(
|
|
356
348
|
rootNode,
|
|
357
|
-
{ width:
|
|
349
|
+
{ width: 800, height: "MaxContent" },
|
|
358
350
|
(known, available, node, context, style) => {
|
|
359
351
|
if (context?.text) {
|
|
360
352
|
// Your text measurement logic here
|
|
@@ -399,7 +391,7 @@ const rowStyle = new Style();
|
|
|
399
391
|
rowStyle.display = Display.Flex;
|
|
400
392
|
rowStyle.flexDirection = FlexDirection.Row;
|
|
401
393
|
rowStyle.justifyContent = JustifyContent.SpaceBetween;
|
|
402
|
-
rowStyle.gap = { width:
|
|
394
|
+
rowStyle.gap = { width: 10, height: 0 };
|
|
403
395
|
```
|
|
404
396
|
|
|
405
397
|
### Absolute Positioning
|
|
@@ -407,13 +399,8 @@ rowStyle.gap = { width: { Length: 10 }, height: { Length: 0 } };
|
|
|
407
399
|
```javascript
|
|
408
400
|
const absoluteStyle = new Style();
|
|
409
401
|
absoluteStyle.position = Position.Absolute;
|
|
410
|
-
absoluteStyle.inset = {
|
|
411
|
-
|
|
412
|
-
top: { Length: 10 },
|
|
413
|
-
right: "Auto",
|
|
414
|
-
bottom: "Auto",
|
|
415
|
-
};
|
|
416
|
-
absoluteStyle.size = { width: { Length: 100 }, height: { Length: 50 } };
|
|
402
|
+
absoluteStyle.inset = { left: 10, top: 10, right: "auto", bottom: "auto" };
|
|
403
|
+
absoluteStyle.size = { width: 100, height: 50 };
|
|
417
404
|
```
|
|
418
405
|
|
|
419
406
|
### Percentage Sizing
|
|
@@ -421,8 +408,8 @@ absoluteStyle.size = { width: { Length: 100 }, height: { Length: 50 } };
|
|
|
421
408
|
```javascript
|
|
422
409
|
const percentStyle = new Style();
|
|
423
410
|
percentStyle.size = {
|
|
424
|
-
width:
|
|
425
|
-
height:
|
|
411
|
+
width: "50%", // 50% of parent
|
|
412
|
+
height: "100%", // 100% of parent
|
|
426
413
|
};
|
|
427
414
|
```
|
|
428
415
|
|
|
@@ -430,7 +417,7 @@ percentStyle.size = {
|
|
|
430
417
|
|
|
431
418
|
```bash
|
|
432
419
|
# Clone the repository
|
|
433
|
-
git clone https://github.com/
|
|
420
|
+
git clone https://github.com/ByteLandTechnology/taffy-js.git
|
|
434
421
|
cd taffy-js
|
|
435
422
|
|
|
436
423
|
# Install dependencies
|
package/pkg/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"ByteLandTechnology <github@byteland.app>"
|
|
6
6
|
],
|
|
7
7
|
"description": "WebAssembly bindings for Taffy layout library",
|
|
8
|
-
"version": "0.9.
|
|
8
|
+
"version": "0.9.5",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
"sideEffects": [
|
|
22
22
|
"./snippets/*"
|
|
23
23
|
]
|
|
24
|
-
}
|
|
24
|
+
}
|
package/pkg/taffy_wasm.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ export type AvailableSpace = number | "minContent" | "maxContent";
|
|
|
56
56
|
* const pixelSize: Size<number> = { width: 200, height: 100 };
|
|
57
57
|
*
|
|
58
58
|
* const dimensionSize: Size<Dimension> = {
|
|
59
|
-
* width:
|
|
60
|
-
* height:
|
|
59
|
+
* width: 200,
|
|
60
|
+
* height: "50%"
|
|
61
61
|
* };
|
|
62
62
|
*
|
|
63
63
|
* const availableSize: Size<AvailableSpace> = {
|
|
@@ -405,6 +405,8 @@ export interface DetailedGridItemsInfo {
|
|
|
405
405
|
column_end: number;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
|
|
409
|
+
|
|
408
410
|
/**
|
|
409
411
|
* Multi-line content alignment enumeration
|
|
410
412
|
*
|
|
@@ -730,14 +732,14 @@ export enum JustifyContent {
|
|
|
730
732
|
|
|
731
733
|
/**
|
|
732
734
|
* Computed layout result containing position, size, and spacing values for a node.
|
|
733
|
-
*
|
|
735
|
+
*
|
|
734
736
|
* This class wraps the native [`taffy::Layout`] and provides read-only access
|
|
735
737
|
* to all computed layout values. All dimensions are in pixels.
|
|
736
|
-
*
|
|
738
|
+
*
|
|
737
739
|
* @example
|
|
738
740
|
* ```typescript
|
|
739
741
|
* const layout = tree.getLayout(node);
|
|
740
|
-
*
|
|
742
|
+
*
|
|
741
743
|
* console.log("Position:", layout.x, layout.y);
|
|
742
744
|
* console.log("Size:", layout.width, layout.height);
|
|
743
745
|
* console.log("Content:", layout.contentWidth, layout.contentHeight);
|
|
@@ -966,10 +968,10 @@ export enum Position {
|
|
|
966
968
|
|
|
967
969
|
/**
|
|
968
970
|
* CSS layout configuration for a node, including flexbox, sizing, spacing, and alignment properties.
|
|
969
|
-
*
|
|
971
|
+
*
|
|
970
972
|
* This class holds all CSS layout properties for a node. Create an instance with
|
|
971
973
|
* `new Style()` and configure properties before passing to `TaffyTree.newLeaf()`.
|
|
972
|
-
*
|
|
974
|
+
*
|
|
973
975
|
* @defaultValue
|
|
974
976
|
* When created, all properties are set to their CSS default values:
|
|
975
977
|
* - `display`: `Display.Block`
|
|
@@ -979,9 +981,9 @@ export enum Position {
|
|
|
979
981
|
* - `flexGrow`: `0`
|
|
980
982
|
* - `flexShrink`: `1`
|
|
981
983
|
* - All alignment properties: `undefined` (use default behavior)
|
|
982
|
-
* - All dimensions: `"
|
|
983
|
-
* - All spacing: `
|
|
984
|
-
*
|
|
984
|
+
* - All dimensions: `"auto"`
|
|
985
|
+
* - All spacing: `0`
|
|
986
|
+
*
|
|
985
987
|
*/
|
|
986
988
|
export class Style {
|
|
987
989
|
free(): void;
|
|
@@ -1021,7 +1023,7 @@ export class Style {
|
|
|
1021
1023
|
*
|
|
1022
1024
|
* The initial size of a flex item before growing/shrinking.
|
|
1023
1025
|
*
|
|
1024
|
-
* @returns - A `Dimension` value (`
|
|
1026
|
+
* @returns - A `Dimension` value (`number`, `\"{number}%\"`, or `\"auto\"`)
|
|
1025
1027
|
*/
|
|
1026
1028
|
flexBasis: Dimension;
|
|
1027
1029
|
/**
|
|
@@ -1184,10 +1186,10 @@ export class Style {
|
|
|
1184
1186
|
|
|
1185
1187
|
/**
|
|
1186
1188
|
* Error class thrown when a Taffy operation fails, containing a human-readable error message.
|
|
1187
|
-
*
|
|
1189
|
+
*
|
|
1188
1190
|
* This class wraps the native [`taffy::TaffyError`] type and exposes it to JavaScript
|
|
1189
1191
|
* with a readable error message. It is thrown as a JavaScript exception on failure.
|
|
1190
|
-
*
|
|
1192
|
+
*
|
|
1191
1193
|
* @example
|
|
1192
1194
|
* ```typescript
|
|
1193
1195
|
* try {
|
|
@@ -1198,7 +1200,7 @@ export class Style {
|
|
|
1198
1200
|
* }
|
|
1199
1201
|
* }
|
|
1200
1202
|
* ```
|
|
1201
|
-
*
|
|
1203
|
+
*
|
|
1202
1204
|
* @remarks
|
|
1203
1205
|
* The underlying Taffy errors include:
|
|
1204
1206
|
* - `InvalidInputNode`: Node ID doesn't exist in the tree
|
|
@@ -1224,10 +1226,10 @@ export class TaffyError {
|
|
|
1224
1226
|
|
|
1225
1227
|
/**
|
|
1226
1228
|
* The main layout tree class for creating nodes, computing layouts, and managing a tree of styled elements.
|
|
1227
|
-
*
|
|
1229
|
+
*
|
|
1228
1230
|
* TaffyTree is the entry point for the Taffy layout engine. It manages
|
|
1229
1231
|
* a tree of nodes and computes their layouts using CSS Flexbox and Grid algorithms.
|
|
1230
|
-
*
|
|
1232
|
+
*
|
|
1231
1233
|
*/
|
|
1232
1234
|
export class TaffyTree {
|
|
1233
1235
|
free(): void;
|
|
@@ -1340,10 +1342,10 @@ export class TaffyTree {
|
|
|
1340
1342
|
* @example
|
|
1341
1343
|
* ```typescript
|
|
1342
1344
|
* // Fixed size container
|
|
1343
|
-
* { width:
|
|
1345
|
+
* { width: 800, height: 600 }
|
|
1344
1346
|
*
|
|
1345
1347
|
* // Flexible width, fixed height
|
|
1346
|
-
* { width: "MaxContent", height:
|
|
1348
|
+
* { width: "MaxContent", height: 600 }
|
|
1347
1349
|
*
|
|
1348
1350
|
* // Minimum content size
|
|
1349
1351
|
* { width: "MinContent", height: "MinContent" }
|
|
@@ -1353,7 +1355,7 @@ export class TaffyTree {
|
|
|
1353
1355
|
*
|
|
1354
1356
|
* @example
|
|
1355
1357
|
* ```typescript
|
|
1356
|
-
* tree.computeLayout(rootId, { width:
|
|
1358
|
+
* tree.computeLayout(rootId, { width: 800, height: 600 });
|
|
1357
1359
|
* ```
|
|
1358
1360
|
*/
|
|
1359
1361
|
computeLayout(node: bigint, available_space: Size<AvailableSpace>): void;
|
|
@@ -1572,11 +1574,7 @@ export class TaffyTree {
|
|
|
1572
1574
|
* tree.removeChildrenRange(parentId, 1, 3);
|
|
1573
1575
|
* ```
|
|
1574
1576
|
*/
|
|
1575
|
-
removeChildrenRange(
|
|
1576
|
-
parent: bigint,
|
|
1577
|
-
start_index: number,
|
|
1578
|
-
end_index: number,
|
|
1579
|
-
): void;
|
|
1577
|
+
removeChildrenRange(parent: bigint, start_index: number, end_index: number): void;
|
|
1580
1578
|
/**
|
|
1581
1579
|
* Replaces a child at a specific index
|
|
1582
1580
|
*
|
|
@@ -1611,7 +1609,7 @@ export class TaffyTree {
|
|
|
1611
1609
|
* ```typescript
|
|
1612
1610
|
* tree.computeLayoutWithMeasure(
|
|
1613
1611
|
* rootId,
|
|
1614
|
-
* { width:
|
|
1612
|
+
* { width: 800, height: "MaxContent" },
|
|
1615
1613
|
* (known, available, node, context, style) => {
|
|
1616
1614
|
* if (context?.text) {
|
|
1617
1615
|
* const measured = measureText(context.text, available.width);
|
|
@@ -1622,11 +1620,7 @@ export class TaffyTree {
|
|
|
1622
1620
|
* );
|
|
1623
1621
|
* ```
|
|
1624
1622
|
*/
|
|
1625
|
-
computeLayoutWithMeasure(
|
|
1626
|
-
node: bigint,
|
|
1627
|
-
available_space: Size<AvailableSpace>,
|
|
1628
|
-
measure_func: MeasureFunction,
|
|
1629
|
-
): void;
|
|
1623
|
+
computeLayoutWithMeasure(node: bigint, available_space: Size<AvailableSpace>, measure_func: MeasureFunction): void;
|
|
1630
1624
|
/**
|
|
1631
1625
|
* Gets context values for multiple nodes at once
|
|
1632
1626
|
*
|
|
@@ -1719,7 +1713,7 @@ export class TaffyTree {
|
|
|
1719
1713
|
*
|
|
1720
1714
|
* @example
|
|
1721
1715
|
* ```typescript
|
|
1722
|
-
* tree.computeLayout(rootId, { width:
|
|
1716
|
+
* tree.computeLayout(rootId, { width: 800, height: 600 });
|
|
1723
1717
|
* const layout: Layout = tree.getLayout(nodeId);
|
|
1724
1718
|
* console.log(`Position: (${layout.x}, ${layout.y}), Size: ${layout.width}x${layout.height}`);
|
|
1725
1719
|
* ```
|
|
@@ -1788,7 +1782,7 @@ export class TaffyTree {
|
|
|
1788
1782
|
* @example
|
|
1789
1783
|
* ```typescript
|
|
1790
1784
|
* const style = new Style();
|
|
1791
|
-
* style.size = { width:
|
|
1785
|
+
* style.size = { width: 100, height: 50 };
|
|
1792
1786
|
* const nodeId: bigint = tree.newLeaf(style);
|
|
1793
1787
|
* ```
|
|
1794
1788
|
*/
|
|
@@ -1830,12 +1824,7 @@ export class TaffyTree {
|
|
|
1830
1824
|
setStyle(node: bigint, style: Style): void;
|
|
1831
1825
|
}
|
|
1832
1826
|
|
|
1833
|
-
export type InitInput =
|
|
1834
|
-
| RequestInfo
|
|
1835
|
-
| URL
|
|
1836
|
-
| Response
|
|
1837
|
-
| BufferSource
|
|
1838
|
-
| WebAssembly.Module;
|
|
1827
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1839
1828
|
|
|
1840
1829
|
export interface InitOutput {
|
|
1841
1830
|
readonly memory: WebAssembly.Memory;
|
|
@@ -1910,131 +1899,42 @@ export interface InitOutput {
|
|
|
1910
1899
|
readonly style_set_size: (a: number, b: any) => void;
|
|
1911
1900
|
readonly style_size: (a: number) => any;
|
|
1912
1901
|
readonly taffyerror_message: (a: number) => [number, number];
|
|
1913
|
-
readonly taffytree_addChild: (
|
|
1914
|
-
a: number,
|
|
1915
|
-
b: bigint,
|
|
1916
|
-
c: bigint,
|
|
1917
|
-
) => [number, number];
|
|
1902
|
+
readonly taffytree_addChild: (a: number, b: bigint, c: bigint) => [number, number];
|
|
1918
1903
|
readonly taffytree_childCount: (a: number, b: bigint) => number;
|
|
1919
|
-
readonly taffytree_children: (
|
|
1920
|
-
a: number,
|
|
1921
|
-
b: bigint,
|
|
1922
|
-
) => [number, number, number, number];
|
|
1904
|
+
readonly taffytree_children: (a: number, b: bigint) => [number, number, number, number];
|
|
1923
1905
|
readonly taffytree_clear: (a: number) => void;
|
|
1924
|
-
readonly taffytree_computeLayout: (
|
|
1925
|
-
|
|
1926
|
-
b: bigint,
|
|
1927
|
-
c: any,
|
|
1928
|
-
) => [number, number];
|
|
1929
|
-
readonly taffytree_computeLayoutWithMeasure: (
|
|
1930
|
-
a: number,
|
|
1931
|
-
b: bigint,
|
|
1932
|
-
c: any,
|
|
1933
|
-
d: any,
|
|
1934
|
-
) => [number, number];
|
|
1906
|
+
readonly taffytree_computeLayout: (a: number, b: bigint, c: any) => [number, number];
|
|
1907
|
+
readonly taffytree_computeLayoutWithMeasure: (a: number, b: bigint, c: any, d: any) => [number, number];
|
|
1935
1908
|
readonly taffytree_dirty: (a: number, b: bigint) => [number, number, number];
|
|
1936
1909
|
readonly taffytree_disableRounding: (a: number) => void;
|
|
1937
1910
|
readonly taffytree_enableRounding: (a: number) => void;
|
|
1938
|
-
readonly taffytree_getChildAtIndex: (
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
) => [
|
|
1943
|
-
readonly
|
|
1944
|
-
|
|
1945
|
-
b: number,
|
|
1946
|
-
c: number,
|
|
1947
|
-
) => [number, number, number, number];
|
|
1948
|
-
readonly taffytree_getLayout: (
|
|
1949
|
-
a: number,
|
|
1950
|
-
b: bigint,
|
|
1951
|
-
) => [number, number, number];
|
|
1952
|
-
readonly taffytree_getNodeContext: (
|
|
1953
|
-
a: number,
|
|
1954
|
-
b: bigint,
|
|
1955
|
-
) => [number, number, number];
|
|
1956
|
-
readonly taffytree_getNodeContextMut: (
|
|
1957
|
-
a: number,
|
|
1958
|
-
b: bigint,
|
|
1959
|
-
) => [number, number, number];
|
|
1960
|
-
readonly taffytree_getStyle: (
|
|
1961
|
-
a: number,
|
|
1962
|
-
b: bigint,
|
|
1963
|
-
) => [number, number, number];
|
|
1964
|
-
readonly taffytree_insertChildAtIndex: (
|
|
1965
|
-
a: number,
|
|
1966
|
-
b: bigint,
|
|
1967
|
-
c: number,
|
|
1968
|
-
d: bigint,
|
|
1969
|
-
) => [number, number];
|
|
1911
|
+
readonly taffytree_getChildAtIndex: (a: number, b: bigint, c: number) => [bigint, number, number];
|
|
1912
|
+
readonly taffytree_getDisjointNodeContextMut: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1913
|
+
readonly taffytree_getLayout: (a: number, b: bigint) => [number, number, number];
|
|
1914
|
+
readonly taffytree_getNodeContext: (a: number, b: bigint) => [number, number, number];
|
|
1915
|
+
readonly taffytree_getNodeContextMut: (a: number, b: bigint) => [number, number, number];
|
|
1916
|
+
readonly taffytree_getStyle: (a: number, b: bigint) => [number, number, number];
|
|
1917
|
+
readonly taffytree_insertChildAtIndex: (a: number, b: bigint, c: number, d: bigint) => [number, number];
|
|
1970
1918
|
readonly taffytree_markDirty: (a: number, b: bigint) => [number, number];
|
|
1971
1919
|
readonly taffytree_new: () => number;
|
|
1972
|
-
readonly taffytree_newLeaf: (
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
) => [bigint, number, number];
|
|
1976
|
-
readonly taffytree_newLeafWithContext: (
|
|
1977
|
-
a: number,
|
|
1978
|
-
b: number,
|
|
1979
|
-
c: any,
|
|
1980
|
-
) => [bigint, number, number];
|
|
1981
|
-
readonly taffytree_newWithChildren: (
|
|
1982
|
-
a: number,
|
|
1983
|
-
b: number,
|
|
1984
|
-
c: number,
|
|
1985
|
-
d: number,
|
|
1986
|
-
) => [bigint, number, number];
|
|
1920
|
+
readonly taffytree_newLeaf: (a: number, b: number) => [bigint, number, number];
|
|
1921
|
+
readonly taffytree_newLeafWithContext: (a: number, b: number, c: any) => [bigint, number, number];
|
|
1922
|
+
readonly taffytree_newWithChildren: (a: number, b: number, c: number, d: number) => [bigint, number, number];
|
|
1987
1923
|
readonly taffytree_parent: (a: number, b: bigint) => [number, bigint];
|
|
1988
1924
|
readonly taffytree_printTree: (a: number, b: bigint) => void;
|
|
1989
1925
|
readonly taffytree_remove: (a: number, b: bigint) => [bigint, number, number];
|
|
1990
|
-
readonly taffytree_removeChild: (
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
readonly
|
|
1996
|
-
|
|
1997
|
-
b: bigint,
|
|
1998
|
-
c: number,
|
|
1999
|
-
) => [bigint, number, number];
|
|
2000
|
-
readonly taffytree_removeChildrenRange: (
|
|
2001
|
-
a: number,
|
|
2002
|
-
b: bigint,
|
|
2003
|
-
c: number,
|
|
2004
|
-
d: number,
|
|
2005
|
-
) => [number, number];
|
|
2006
|
-
readonly taffytree_replaceChildAtIndex: (
|
|
2007
|
-
a: number,
|
|
2008
|
-
b: bigint,
|
|
2009
|
-
c: number,
|
|
2010
|
-
d: bigint,
|
|
2011
|
-
) => [bigint, number, number];
|
|
2012
|
-
readonly taffytree_setChildren: (
|
|
2013
|
-
a: number,
|
|
2014
|
-
b: bigint,
|
|
2015
|
-
c: number,
|
|
2016
|
-
d: number,
|
|
2017
|
-
) => [number, number];
|
|
2018
|
-
readonly taffytree_setNodeContext: (
|
|
2019
|
-
a: number,
|
|
2020
|
-
b: bigint,
|
|
2021
|
-
c: any,
|
|
2022
|
-
) => [number, number];
|
|
2023
|
-
readonly taffytree_setStyle: (
|
|
2024
|
-
a: number,
|
|
2025
|
-
b: bigint,
|
|
2026
|
-
c: number,
|
|
2027
|
-
) => [number, number];
|
|
1926
|
+
readonly taffytree_removeChild: (a: number, b: bigint, c: bigint) => [bigint, number, number];
|
|
1927
|
+
readonly taffytree_removeChildAtIndex: (a: number, b: bigint, c: number) => [bigint, number, number];
|
|
1928
|
+
readonly taffytree_removeChildrenRange: (a: number, b: bigint, c: number, d: number) => [number, number];
|
|
1929
|
+
readonly taffytree_replaceChildAtIndex: (a: number, b: bigint, c: number, d: bigint) => [bigint, number, number];
|
|
1930
|
+
readonly taffytree_setChildren: (a: number, b: bigint, c: number, d: number) => [number, number];
|
|
1931
|
+
readonly taffytree_setNodeContext: (a: number, b: bigint, c: any) => [number, number];
|
|
1932
|
+
readonly taffytree_setStyle: (a: number, b: bigint, c: number) => [number, number];
|
|
2028
1933
|
readonly taffytree_totalNodeCount: (a: number) => number;
|
|
2029
1934
|
readonly taffytree_unroundedLayout: (a: number, b: bigint) => number;
|
|
2030
1935
|
readonly taffytree_withCapacity: (a: number) => number;
|
|
2031
1936
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
2032
|
-
readonly __wbindgen_realloc: (
|
|
2033
|
-
a: number,
|
|
2034
|
-
b: number,
|
|
2035
|
-
c: number,
|
|
2036
|
-
d: number,
|
|
2037
|
-
) => number;
|
|
1937
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
2038
1938
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
2039
1939
|
readonly __externref_table_alloc: () => number;
|
|
2040
1940
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
@@ -2047,28 +1947,21 @@ export interface InitOutput {
|
|
|
2047
1947
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
2048
1948
|
|
|
2049
1949
|
/**
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
export function initSync(
|
|
2058
|
-
module: { module: SyncInitInput } | SyncInitInput,
|
|
2059
|
-
): InitOutput;
|
|
1950
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1951
|
+
* a precompiled `WebAssembly.Module`.
|
|
1952
|
+
*
|
|
1953
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1954
|
+
*
|
|
1955
|
+
* @returns {InitOutput}
|
|
1956
|
+
*/
|
|
1957
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
2060
1958
|
|
|
2061
1959
|
/**
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
export default function __wbg_init(
|
|
2070
|
-
module_or_path?:
|
|
2071
|
-
| { module_or_path: InitInput | Promise<InitInput> }
|
|
2072
|
-
| InitInput
|
|
2073
|
-
| Promise<InitInput>,
|
|
2074
|
-
): Promise<InitOutput>;
|
|
1960
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1961
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1962
|
+
*
|
|
1963
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1964
|
+
*
|
|
1965
|
+
* @returns {Promise<InitOutput>}
|
|
1966
|
+
*/
|
|
1967
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|