taffy-js 0.1.0 → 0.1.2
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/package.json +13 -27
- package/taffy_js.d.ts +1142 -0
- package/taffy_js.js +2413 -0
- package/taffy_js_bg.wasm +0 -0
package/taffy_js.d.ts
ADDED
|
@@ -0,0 +1,1142 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* How lines of content are aligned along the cross axis when there is extra space.
|
|
6
|
+
*/
|
|
7
|
+
export enum AlignContent {
|
|
8
|
+
/**
|
|
9
|
+
* Lines are packed toward the start of the cross axis.
|
|
10
|
+
*/
|
|
11
|
+
Start = 0,
|
|
12
|
+
/**
|
|
13
|
+
* Lines are packed toward the end of the cross axis.
|
|
14
|
+
*/
|
|
15
|
+
End = 1,
|
|
16
|
+
/**
|
|
17
|
+
* Lines are packed toward the start of the flex-direction cross axis.
|
|
18
|
+
*/
|
|
19
|
+
FlexStart = 2,
|
|
20
|
+
/**
|
|
21
|
+
* Lines are packed toward the end of the flex-direction cross axis.
|
|
22
|
+
*/
|
|
23
|
+
FlexEnd = 3,
|
|
24
|
+
/**
|
|
25
|
+
* Lines are packed toward the center of the cross axis.
|
|
26
|
+
*/
|
|
27
|
+
Center = 4,
|
|
28
|
+
/**
|
|
29
|
+
* Lines are evenly distributed; the first line is at the start, the last at the end.
|
|
30
|
+
*/
|
|
31
|
+
SpaceBetween = 5,
|
|
32
|
+
/**
|
|
33
|
+
* Lines are evenly distributed with equal space around them.
|
|
34
|
+
*/
|
|
35
|
+
SpaceAround = 6,
|
|
36
|
+
/**
|
|
37
|
+
* Lines are evenly distributed with equal space between them.
|
|
38
|
+
*/
|
|
39
|
+
SpaceEvenly = 7,
|
|
40
|
+
/**
|
|
41
|
+
* Lines are stretched to take up the remaining space.
|
|
42
|
+
*/
|
|
43
|
+
Stretch = 8,
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* How items are aligned along the cross axis.
|
|
48
|
+
*/
|
|
49
|
+
export enum AlignItems {
|
|
50
|
+
/**
|
|
51
|
+
* Items are aligned at the start of the cross axis.
|
|
52
|
+
*/
|
|
53
|
+
Start = 0,
|
|
54
|
+
/**
|
|
55
|
+
* Items are aligned at the end of the cross axis.
|
|
56
|
+
*/
|
|
57
|
+
End = 1,
|
|
58
|
+
/**
|
|
59
|
+
* Items are aligned at the start of the flex-direction cross axis.
|
|
60
|
+
*/
|
|
61
|
+
FlexStart = 2,
|
|
62
|
+
/**
|
|
63
|
+
* Items are aligned at the end of the flex-direction cross axis.
|
|
64
|
+
*/
|
|
65
|
+
FlexEnd = 3,
|
|
66
|
+
/**
|
|
67
|
+
* Items are aligned at the center of the cross axis.
|
|
68
|
+
*/
|
|
69
|
+
Center = 4,
|
|
70
|
+
/**
|
|
71
|
+
* Items are aligned based on their baselines.
|
|
72
|
+
*/
|
|
73
|
+
Baseline = 5,
|
|
74
|
+
/**
|
|
75
|
+
* Items are stretched to fill the container along the cross axis.
|
|
76
|
+
*/
|
|
77
|
+
Stretch = 6,
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* How a single item is aligned along the cross axis, overriding `AlignItems`.
|
|
82
|
+
*/
|
|
83
|
+
export enum AlignSelf {
|
|
84
|
+
/**
|
|
85
|
+
* items are aligned at the start of the cross axis.
|
|
86
|
+
*/
|
|
87
|
+
Start = 0,
|
|
88
|
+
/**
|
|
89
|
+
* Items are aligned at the end of the cross axis.
|
|
90
|
+
*/
|
|
91
|
+
End = 1,
|
|
92
|
+
/**
|
|
93
|
+
* Items are aligned at the start of the flex-direction cross axis.
|
|
94
|
+
*/
|
|
95
|
+
FlexStart = 2,
|
|
96
|
+
/**
|
|
97
|
+
* Items are aligned at the end of the flex-direction cross axis.
|
|
98
|
+
*/
|
|
99
|
+
FlexEnd = 3,
|
|
100
|
+
/**
|
|
101
|
+
* Items are aligned at the center of the cross axis.
|
|
102
|
+
*/
|
|
103
|
+
Center = 4,
|
|
104
|
+
/**
|
|
105
|
+
* Items are aligned based on their baselines.
|
|
106
|
+
*/
|
|
107
|
+
Baseline = 5,
|
|
108
|
+
/**
|
|
109
|
+
* Items are stretched to fill the container along the cross axis.
|
|
110
|
+
*/
|
|
111
|
+
Stretch = 6,
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export class AvailableSpace {
|
|
115
|
+
private constructor();
|
|
116
|
+
free(): void;
|
|
117
|
+
[Symbol.dispose](): void;
|
|
118
|
+
/**
|
|
119
|
+
* The available width (None means undefined/max-content).
|
|
120
|
+
*/
|
|
121
|
+
get width(): number | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* The available width (None means undefined/max-content).
|
|
124
|
+
*/
|
|
125
|
+
set width(value: number | null | undefined);
|
|
126
|
+
/**
|
|
127
|
+
* The available height (None means undefined/max-content).
|
|
128
|
+
*/
|
|
129
|
+
get height(): number | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* The available height (None means undefined/max-content).
|
|
132
|
+
*/
|
|
133
|
+
set height(value: number | null | undefined);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export class Dimension {
|
|
137
|
+
private constructor();
|
|
138
|
+
free(): void;
|
|
139
|
+
[Symbol.dispose](): void;
|
|
140
|
+
/**
|
|
141
|
+
* The numeric value of the dimension.
|
|
142
|
+
* - For `Pixels`, this is the number of pixels.
|
|
143
|
+
* - For `Percent`, this is the percentage value (0.0 to 100.0, or sometimes 0.0 to 1.0 depending on context, handled by internal logic).
|
|
144
|
+
* - For `Auto`, this value is typically ignored.
|
|
145
|
+
*/
|
|
146
|
+
value: number;
|
|
147
|
+
/**
|
|
148
|
+
* The unit of the dimension.
|
|
149
|
+
*/
|
|
150
|
+
unit: DimensionUnit;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The unit of a dimension.
|
|
155
|
+
*/
|
|
156
|
+
export enum DimensionUnit {
|
|
157
|
+
/**
|
|
158
|
+
* The dimension is specified in logical pixels.
|
|
159
|
+
*/
|
|
160
|
+
Pixels = 0,
|
|
161
|
+
/**
|
|
162
|
+
* The dimension is specified as a percentage of the parent's size.
|
|
163
|
+
*/
|
|
164
|
+
Percent = 1,
|
|
165
|
+
/**
|
|
166
|
+
* The dimension is determined automatically based on content or context.
|
|
167
|
+
*/
|
|
168
|
+
Auto = 2,
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* The display style of a node.
|
|
173
|
+
*/
|
|
174
|
+
export enum Display {
|
|
175
|
+
/**
|
|
176
|
+
* The node is hidden and does not take up space.
|
|
177
|
+
*/
|
|
178
|
+
None = 0,
|
|
179
|
+
/**
|
|
180
|
+
* The node behaves as a flex container.
|
|
181
|
+
*/
|
|
182
|
+
Flex = 1,
|
|
183
|
+
/**
|
|
184
|
+
* The node behaves as a grid container.
|
|
185
|
+
*/
|
|
186
|
+
Grid = 2,
|
|
187
|
+
/**
|
|
188
|
+
* The node behaves as a block element.
|
|
189
|
+
*/
|
|
190
|
+
Block = 3,
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The direction of the main axis for a flex container.
|
|
195
|
+
*/
|
|
196
|
+
export enum FlexDirection {
|
|
197
|
+
/**
|
|
198
|
+
* Items are placed horizontally from left to right.
|
|
199
|
+
*/
|
|
200
|
+
Row = 0,
|
|
201
|
+
/**
|
|
202
|
+
* Items are placed vertically from top to bottom.
|
|
203
|
+
*/
|
|
204
|
+
Column = 1,
|
|
205
|
+
/**
|
|
206
|
+
* Items are placed horizontally from right to left.
|
|
207
|
+
*/
|
|
208
|
+
RowReverse = 2,
|
|
209
|
+
/**
|
|
210
|
+
* Items are placed vertically from bottom to top.
|
|
211
|
+
*/
|
|
212
|
+
ColumnReverse = 3,
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Whether flex items are forced into a single line or can wrap onto multiple lines.
|
|
217
|
+
*/
|
|
218
|
+
export enum FlexWrap {
|
|
219
|
+
/**
|
|
220
|
+
* Items are forced into a single line.
|
|
221
|
+
*/
|
|
222
|
+
NoWrap = 0,
|
|
223
|
+
/**
|
|
224
|
+
* Items wrap onto multiple lines.
|
|
225
|
+
*/
|
|
226
|
+
Wrap = 1,
|
|
227
|
+
/**
|
|
228
|
+
* Items wrap onto multiple lines in reverse order.
|
|
229
|
+
*/
|
|
230
|
+
WrapReverse = 2,
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Grid auto-placement algorithm controls how auto-placed items get flowed into the grid.
|
|
235
|
+
*/
|
|
236
|
+
export enum GridAutoFlow {
|
|
237
|
+
/**
|
|
238
|
+
* Items are placed by filling each row in turn, adding new rows as necessary.
|
|
239
|
+
*/
|
|
240
|
+
Row = 0,
|
|
241
|
+
/**
|
|
242
|
+
* Items are placed by filling each column in turn, adding new columns as necessary.
|
|
243
|
+
*/
|
|
244
|
+
Column = 1,
|
|
245
|
+
/**
|
|
246
|
+
* Items are placed by filling each row, attempting to fill holes earlier in the grid.
|
|
247
|
+
*/
|
|
248
|
+
RowDense = 2,
|
|
249
|
+
/**
|
|
250
|
+
* Items are placed by filling each column, attempting to fill holes earlier in the grid.
|
|
251
|
+
*/
|
|
252
|
+
ColumnDense = 3,
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* How items are distributed along the main axis.
|
|
257
|
+
*/
|
|
258
|
+
export enum JustifyContent {
|
|
259
|
+
/**
|
|
260
|
+
* Items are packed toward the start of the layout direction.
|
|
261
|
+
*/
|
|
262
|
+
Start = 0,
|
|
263
|
+
/**
|
|
264
|
+
* Items are packed toward the end of the layout direction.
|
|
265
|
+
*/
|
|
266
|
+
End = 1,
|
|
267
|
+
/**
|
|
268
|
+
* Items are packed toward the start of the flex-direction.
|
|
269
|
+
*/
|
|
270
|
+
FlexStart = 2,
|
|
271
|
+
/**
|
|
272
|
+
* Items are packed toward the end of the flex-direction.
|
|
273
|
+
*/
|
|
274
|
+
FlexEnd = 3,
|
|
275
|
+
/**
|
|
276
|
+
* Items are centered along the line.
|
|
277
|
+
*/
|
|
278
|
+
Center = 4,
|
|
279
|
+
/**
|
|
280
|
+
* Items are evenly distributed; the first item is at the start, the last at the end.
|
|
281
|
+
*/
|
|
282
|
+
SpaceBetween = 5,
|
|
283
|
+
/**
|
|
284
|
+
* Items are evenly distributed with equal space around them.
|
|
285
|
+
*/
|
|
286
|
+
SpaceAround = 6,
|
|
287
|
+
/**
|
|
288
|
+
* Items are evenly distributed with equal space between them using the same gap at ends.
|
|
289
|
+
*/
|
|
290
|
+
SpaceEvenly = 7,
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
export class Layout {
|
|
294
|
+
private constructor();
|
|
295
|
+
free(): void;
|
|
296
|
+
[Symbol.dispose](): void;
|
|
297
|
+
/**
|
|
298
|
+
* The absolute x-coordinate of the node relative to its parent.
|
|
299
|
+
*/
|
|
300
|
+
x: number;
|
|
301
|
+
/**
|
|
302
|
+
* The absolute y-coordinate of the node relative to its parent.
|
|
303
|
+
*/
|
|
304
|
+
y: number;
|
|
305
|
+
/**
|
|
306
|
+
* The computed width of the node.
|
|
307
|
+
*/
|
|
308
|
+
width: number;
|
|
309
|
+
/**
|
|
310
|
+
* The computed height of the node.
|
|
311
|
+
*/
|
|
312
|
+
height: number;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export class Line {
|
|
316
|
+
private constructor();
|
|
317
|
+
free(): void;
|
|
318
|
+
[Symbol.dispose](): void;
|
|
319
|
+
/**
|
|
320
|
+
* The start line index (1-based).
|
|
321
|
+
*/
|
|
322
|
+
get start(): number | undefined;
|
|
323
|
+
/**
|
|
324
|
+
* The start line index (1-based).
|
|
325
|
+
*/
|
|
326
|
+
set start(value: number | null | undefined);
|
|
327
|
+
/**
|
|
328
|
+
* The end line index (1-based).
|
|
329
|
+
*/
|
|
330
|
+
get end(): number | undefined;
|
|
331
|
+
/**
|
|
332
|
+
* The end line index (1-based).
|
|
333
|
+
*/
|
|
334
|
+
set end(value: number | null | undefined);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export class Point {
|
|
338
|
+
private constructor();
|
|
339
|
+
free(): void;
|
|
340
|
+
[Symbol.dispose](): void;
|
|
341
|
+
/**
|
|
342
|
+
* The x-coordinate (horizontal).
|
|
343
|
+
*/
|
|
344
|
+
x: number;
|
|
345
|
+
/**
|
|
346
|
+
* The y-coordinate (vertical).
|
|
347
|
+
*/
|
|
348
|
+
y: number;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Positioning strategy for a node.
|
|
353
|
+
*/
|
|
354
|
+
export enum Position {
|
|
355
|
+
/**
|
|
356
|
+
* Relative to its normal position in the flow.
|
|
357
|
+
*/
|
|
358
|
+
Static = 0,
|
|
359
|
+
/**
|
|
360
|
+
* Relative to its normal position in the flow.
|
|
361
|
+
*/
|
|
362
|
+
Relative = 1,
|
|
363
|
+
/**
|
|
364
|
+
* Removed from the flow and positioned relative to its containing block.
|
|
365
|
+
*/
|
|
366
|
+
Absolute = 2,
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export class Rect {
|
|
370
|
+
private constructor();
|
|
371
|
+
free(): void;
|
|
372
|
+
[Symbol.dispose](): void;
|
|
373
|
+
/**
|
|
374
|
+
* The left edge value.
|
|
375
|
+
*/
|
|
376
|
+
left: number;
|
|
377
|
+
/**
|
|
378
|
+
* The right edge value.
|
|
379
|
+
*/
|
|
380
|
+
right: number;
|
|
381
|
+
/**
|
|
382
|
+
* The top edge value.
|
|
383
|
+
*/
|
|
384
|
+
top: number;
|
|
385
|
+
/**
|
|
386
|
+
* The bottom edge value.
|
|
387
|
+
*/
|
|
388
|
+
bottom: number;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export class Size {
|
|
392
|
+
private constructor();
|
|
393
|
+
free(): void;
|
|
394
|
+
[Symbol.dispose](): void;
|
|
395
|
+
/**
|
|
396
|
+
* The width dimension.
|
|
397
|
+
*/
|
|
398
|
+
width: number;
|
|
399
|
+
/**
|
|
400
|
+
* The height dimension.
|
|
401
|
+
*/
|
|
402
|
+
height: number;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
export class Style {
|
|
406
|
+
private constructor();
|
|
407
|
+
free(): void;
|
|
408
|
+
[Symbol.dispose](): void;
|
|
409
|
+
/**
|
|
410
|
+
* The display mode of the node (e.g. Flex, Grid, None).
|
|
411
|
+
*/
|
|
412
|
+
get display(): Display | undefined;
|
|
413
|
+
/**
|
|
414
|
+
* The display mode of the node (e.g. Flex, Grid, None).
|
|
415
|
+
*/
|
|
416
|
+
set display(value: Display | null | undefined);
|
|
417
|
+
/**
|
|
418
|
+
* The positioning strategy (e.g. Relative, Absolute).
|
|
419
|
+
*/
|
|
420
|
+
get position(): Position | undefined;
|
|
421
|
+
/**
|
|
422
|
+
* The positioning strategy (e.g. Relative, Absolute).
|
|
423
|
+
*/
|
|
424
|
+
set position(value: Position | null | undefined);
|
|
425
|
+
/**
|
|
426
|
+
* The width of the node.
|
|
427
|
+
*/
|
|
428
|
+
get width(): Dimension | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* The width of the node.
|
|
431
|
+
*/
|
|
432
|
+
set width(value: Dimension | null | undefined);
|
|
433
|
+
/**
|
|
434
|
+
* The height of the node.
|
|
435
|
+
*/
|
|
436
|
+
get height(): Dimension | undefined;
|
|
437
|
+
/**
|
|
438
|
+
* The height of the node.
|
|
439
|
+
*/
|
|
440
|
+
set height(value: Dimension | null | undefined);
|
|
441
|
+
/**
|
|
442
|
+
* The minimum width of the node.
|
|
443
|
+
*/
|
|
444
|
+
get min_width(): Dimension | undefined;
|
|
445
|
+
/**
|
|
446
|
+
* The minimum width of the node.
|
|
447
|
+
*/
|
|
448
|
+
set min_width(value: Dimension | null | undefined);
|
|
449
|
+
/**
|
|
450
|
+
* The minimum height of the node.
|
|
451
|
+
*/
|
|
452
|
+
get min_height(): Dimension | undefined;
|
|
453
|
+
/**
|
|
454
|
+
* The minimum height of the node.
|
|
455
|
+
*/
|
|
456
|
+
set min_height(value: Dimension | null | undefined);
|
|
457
|
+
/**
|
|
458
|
+
* The maximum width of the node.
|
|
459
|
+
*/
|
|
460
|
+
get max_width(): Dimension | undefined;
|
|
461
|
+
/**
|
|
462
|
+
* The maximum width of the node.
|
|
463
|
+
*/
|
|
464
|
+
set max_width(value: Dimension | null | undefined);
|
|
465
|
+
/**
|
|
466
|
+
* The maximum height of the node.
|
|
467
|
+
*/
|
|
468
|
+
get max_height(): Dimension | undefined;
|
|
469
|
+
/**
|
|
470
|
+
* The maximum height of the node.
|
|
471
|
+
*/
|
|
472
|
+
set max_height(value: Dimension | null | undefined);
|
|
473
|
+
/**
|
|
474
|
+
* The offset from the left edge (used with Position::Absolute/Relative).
|
|
475
|
+
*/
|
|
476
|
+
get left(): Dimension | undefined;
|
|
477
|
+
/**
|
|
478
|
+
* The offset from the left edge (used with Position::Absolute/Relative).
|
|
479
|
+
*/
|
|
480
|
+
set left(value: Dimension | null | undefined);
|
|
481
|
+
/**
|
|
482
|
+
* The offset from the right edge.
|
|
483
|
+
*/
|
|
484
|
+
get right(): Dimension | undefined;
|
|
485
|
+
/**
|
|
486
|
+
* The offset from the right edge.
|
|
487
|
+
*/
|
|
488
|
+
set right(value: Dimension | null | undefined);
|
|
489
|
+
/**
|
|
490
|
+
* The offset from the top edge.
|
|
491
|
+
*/
|
|
492
|
+
get top(): Dimension | undefined;
|
|
493
|
+
/**
|
|
494
|
+
* The offset from the top edge.
|
|
495
|
+
*/
|
|
496
|
+
set top(value: Dimension | null | undefined);
|
|
497
|
+
/**
|
|
498
|
+
* The offset from the bottom edge.
|
|
499
|
+
*/
|
|
500
|
+
get bottom(): Dimension | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* The offset from the bottom edge.
|
|
503
|
+
*/
|
|
504
|
+
set bottom(value: Dimension | null | undefined);
|
|
505
|
+
/**
|
|
506
|
+
* The margin on the left side.
|
|
507
|
+
*/
|
|
508
|
+
get margin_left(): Dimension | undefined;
|
|
509
|
+
/**
|
|
510
|
+
* The margin on the left side.
|
|
511
|
+
*/
|
|
512
|
+
set margin_left(value: Dimension | null | undefined);
|
|
513
|
+
/**
|
|
514
|
+
* The margin on the right side.
|
|
515
|
+
*/
|
|
516
|
+
get margin_right(): Dimension | undefined;
|
|
517
|
+
/**
|
|
518
|
+
* The margin on the right side.
|
|
519
|
+
*/
|
|
520
|
+
set margin_right(value: Dimension | null | undefined);
|
|
521
|
+
/**
|
|
522
|
+
* The margin on the top side.
|
|
523
|
+
*/
|
|
524
|
+
get margin_top(): Dimension | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* The margin on the top side.
|
|
527
|
+
*/
|
|
528
|
+
set margin_top(value: Dimension | null | undefined);
|
|
529
|
+
/**
|
|
530
|
+
* The margin on the bottom side.
|
|
531
|
+
*/
|
|
532
|
+
get margin_bottom(): Dimension | undefined;
|
|
533
|
+
/**
|
|
534
|
+
* The margin on the bottom side.
|
|
535
|
+
*/
|
|
536
|
+
set margin_bottom(value: Dimension | null | undefined);
|
|
537
|
+
/**
|
|
538
|
+
* The padding on the left side.
|
|
539
|
+
*/
|
|
540
|
+
get padding_left(): Dimension | undefined;
|
|
541
|
+
/**
|
|
542
|
+
* The padding on the left side.
|
|
543
|
+
*/
|
|
544
|
+
set padding_left(value: Dimension | null | undefined);
|
|
545
|
+
/**
|
|
546
|
+
* The padding on the right side.
|
|
547
|
+
*/
|
|
548
|
+
get padding_right(): Dimension | undefined;
|
|
549
|
+
/**
|
|
550
|
+
* The padding on the right side.
|
|
551
|
+
*/
|
|
552
|
+
set padding_right(value: Dimension | null | undefined);
|
|
553
|
+
/**
|
|
554
|
+
* The padding on the top side.
|
|
555
|
+
*/
|
|
556
|
+
get padding_top(): Dimension | undefined;
|
|
557
|
+
/**
|
|
558
|
+
* The padding on the top side.
|
|
559
|
+
*/
|
|
560
|
+
set padding_top(value: Dimension | null | undefined);
|
|
561
|
+
/**
|
|
562
|
+
* The padding on the bottom side.
|
|
563
|
+
*/
|
|
564
|
+
get padding_bottom(): Dimension | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* The padding on the bottom side.
|
|
567
|
+
*/
|
|
568
|
+
set padding_bottom(value: Dimension | null | undefined);
|
|
569
|
+
/**
|
|
570
|
+
* The flex direction (e.g. Row, Column).
|
|
571
|
+
*/
|
|
572
|
+
get flex_direction(): FlexDirection | undefined;
|
|
573
|
+
/**
|
|
574
|
+
* The flex direction (e.g. Row, Column).
|
|
575
|
+
*/
|
|
576
|
+
set flex_direction(value: FlexDirection | null | undefined);
|
|
577
|
+
/**
|
|
578
|
+
* Whether flex items should wrap.
|
|
579
|
+
*/
|
|
580
|
+
get flex_wrap(): FlexWrap | undefined;
|
|
581
|
+
/**
|
|
582
|
+
* Whether flex items should wrap.
|
|
583
|
+
*/
|
|
584
|
+
set flex_wrap(value: FlexWrap | null | undefined);
|
|
585
|
+
/**
|
|
586
|
+
* How much the item will grow relative to the rest of the flexible items.
|
|
587
|
+
*/
|
|
588
|
+
get flex_grow(): number | undefined;
|
|
589
|
+
/**
|
|
590
|
+
* How much the item will grow relative to the rest of the flexible items.
|
|
591
|
+
*/
|
|
592
|
+
set flex_grow(value: number | null | undefined);
|
|
593
|
+
/**
|
|
594
|
+
* How much the item will shrink relative to the rest of the flexible items.
|
|
595
|
+
*/
|
|
596
|
+
get flex_shrink(): number | undefined;
|
|
597
|
+
/**
|
|
598
|
+
* How much the item will shrink relative to the rest of the flexible items.
|
|
599
|
+
*/
|
|
600
|
+
set flex_shrink(value: number | null | undefined);
|
|
601
|
+
/**
|
|
602
|
+
* The initial main size of a flex item.
|
|
603
|
+
*/
|
|
604
|
+
get flex_basis(): Dimension | undefined;
|
|
605
|
+
/**
|
|
606
|
+
* The initial main size of a flex item.
|
|
607
|
+
*/
|
|
608
|
+
set flex_basis(value: Dimension | null | undefined);
|
|
609
|
+
/**
|
|
610
|
+
* How items are distributed along the main axis.
|
|
611
|
+
*/
|
|
612
|
+
get justify_content(): JustifyContent | undefined;
|
|
613
|
+
/**
|
|
614
|
+
* How items are distributed along the main axis.
|
|
615
|
+
*/
|
|
616
|
+
set justify_content(value: JustifyContent | null | undefined);
|
|
617
|
+
/**
|
|
618
|
+
* How items are aligned along the cross axis.
|
|
619
|
+
*/
|
|
620
|
+
get align_items(): AlignItems | undefined;
|
|
621
|
+
/**
|
|
622
|
+
* How items are aligned along the cross axis.
|
|
623
|
+
*/
|
|
624
|
+
set align_items(value: AlignItems | null | undefined);
|
|
625
|
+
/**
|
|
626
|
+
* How a single item is aligned along the cross axis.
|
|
627
|
+
*/
|
|
628
|
+
get align_self(): AlignSelf | undefined;
|
|
629
|
+
/**
|
|
630
|
+
* How a single item is aligned along the cross axis.
|
|
631
|
+
*/
|
|
632
|
+
set align_self(value: AlignSelf | null | undefined);
|
|
633
|
+
/**
|
|
634
|
+
* How lines of content are aligned along the cross axis.
|
|
635
|
+
*/
|
|
636
|
+
get align_content(): AlignContent | undefined;
|
|
637
|
+
/**
|
|
638
|
+
* How lines of content are aligned along the cross axis.
|
|
639
|
+
*/
|
|
640
|
+
set align_content(value: AlignContent | null | undefined);
|
|
641
|
+
/**
|
|
642
|
+
* The gap between rows (flex/grid).
|
|
643
|
+
*/
|
|
644
|
+
get row_gap(): Dimension | undefined;
|
|
645
|
+
/**
|
|
646
|
+
* The gap between rows (flex/grid).
|
|
647
|
+
*/
|
|
648
|
+
set row_gap(value: Dimension | null | undefined);
|
|
649
|
+
/**
|
|
650
|
+
* The gap between columns (flex/grid).
|
|
651
|
+
*/
|
|
652
|
+
get column_gap(): Dimension | undefined;
|
|
653
|
+
/**
|
|
654
|
+
* The gap between columns (flex/grid).
|
|
655
|
+
*/
|
|
656
|
+
set column_gap(value: Dimension | null | undefined);
|
|
657
|
+
/**
|
|
658
|
+
* Algorithm for auto-placing items in the grid.
|
|
659
|
+
*/
|
|
660
|
+
get grid_auto_flow(): GridAutoFlow | undefined;
|
|
661
|
+
/**
|
|
662
|
+
* Algorithm for auto-placing items in the grid.
|
|
663
|
+
*/
|
|
664
|
+
set grid_auto_flow(value: GridAutoFlow | null | undefined);
|
|
665
|
+
/**
|
|
666
|
+
* Text alignment.
|
|
667
|
+
*/
|
|
668
|
+
get text_align(): TextAlign | undefined;
|
|
669
|
+
/**
|
|
670
|
+
* Text alignment.
|
|
671
|
+
*/
|
|
672
|
+
set text_align(value: TextAlign | null | undefined);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
export class TaffyNode {
|
|
676
|
+
free(): void;
|
|
677
|
+
[Symbol.dispose](): void;
|
|
678
|
+
get_layout(): Layout;
|
|
679
|
+
remove_child(child: TaffyNode): void;
|
|
680
|
+
set_children(children: Uint32Array): void;
|
|
681
|
+
compute_layout(available_space: any): void;
|
|
682
|
+
constructor(style: any);
|
|
683
|
+
free(): void;
|
|
684
|
+
style(): any;
|
|
685
|
+
add_child(child: TaffyNode): void;
|
|
686
|
+
set_style(style: any): void;
|
|
687
|
+
id: number;
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Text alignment within a node (mostly ignored in flex/grid layout but preserved for compatibility).
|
|
692
|
+
*/
|
|
693
|
+
export enum TextAlign {
|
|
694
|
+
Auto = 0,
|
|
695
|
+
Left = 1,
|
|
696
|
+
Right = 2,
|
|
697
|
+
Center = 3,
|
|
698
|
+
Justify = 4,
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export class TrackDefinition {
|
|
702
|
+
private constructor();
|
|
703
|
+
free(): void;
|
|
704
|
+
[Symbol.dispose](): void;
|
|
705
|
+
/**
|
|
706
|
+
* The numeric value of the track size.
|
|
707
|
+
*/
|
|
708
|
+
value: number;
|
|
709
|
+
/**
|
|
710
|
+
* The unit of the track size.
|
|
711
|
+
*/
|
|
712
|
+
unit: TrackUnit;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* The unit for a grid track definition.
|
|
717
|
+
*/
|
|
718
|
+
export enum TrackUnit {
|
|
719
|
+
/**
|
|
720
|
+
* The track size is specified in logical pixels.
|
|
721
|
+
*/
|
|
722
|
+
Pixels = 0,
|
|
723
|
+
/**
|
|
724
|
+
* The track size is specified as a percentage of the container.
|
|
725
|
+
*/
|
|
726
|
+
Percent = 1,
|
|
727
|
+
/**
|
|
728
|
+
* The track size is a fraction of the remaining free space (fr unit).
|
|
729
|
+
*/
|
|
730
|
+
Fraction = 2,
|
|
731
|
+
/**
|
|
732
|
+
* The track size is determined automatically.
|
|
733
|
+
*/
|
|
734
|
+
Auto = 3,
|
|
735
|
+
/**
|
|
736
|
+
* The track size is the minimum size needed to fit the content.
|
|
737
|
+
*/
|
|
738
|
+
MinContent = 4,
|
|
739
|
+
/**
|
|
740
|
+
* The track size is the maximum size needed to fit the content.
|
|
741
|
+
*/
|
|
742
|
+
MaxContent = 5,
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Adds a child node to a parent node.
|
|
747
|
+
*
|
|
748
|
+
* # Arguments
|
|
749
|
+
*
|
|
750
|
+
* * `parent` - The ID of the parent node.
|
|
751
|
+
* * `child` - The ID of the child node to add.
|
|
752
|
+
*
|
|
753
|
+
* # Errors
|
|
754
|
+
*
|
|
755
|
+
* Returns a `JsValue` error if the operation fails (e.g., recursive hierarchy).
|
|
756
|
+
*/
|
|
757
|
+
export function add_child(parent: number, child: number): void;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Auto dimension constant
|
|
761
|
+
*/
|
|
762
|
+
export function auto(): Dimension;
|
|
763
|
+
|
|
764
|
+
/**
|
|
765
|
+
* Clear all nodes
|
|
766
|
+
*/
|
|
767
|
+
export function clear(): void;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Computes the layout for a tree starting from the specified root node.
|
|
771
|
+
*
|
|
772
|
+
* # Arguments
|
|
773
|
+
*
|
|
774
|
+
* * `root` - The ID of the root node of the tree to lay out.
|
|
775
|
+
* * `available_space` - The available space constraints for the layout.
|
|
776
|
+
*
|
|
777
|
+
* # Errors
|
|
778
|
+
*
|
|
779
|
+
* Returns a `JsValue` error if the layout computation fails.
|
|
780
|
+
*/
|
|
781
|
+
export function compute_layout(root: number, available_space: any): void;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Helper function to create a dimension
|
|
785
|
+
*/
|
|
786
|
+
export function dimension(value: number, unit: DimensionUnit): Dimension;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Retrieves the list of children IDs for a given node.
|
|
790
|
+
*
|
|
791
|
+
* # Arguments
|
|
792
|
+
*
|
|
793
|
+
* * `parent` - The ID of the parent node.
|
|
794
|
+
*
|
|
795
|
+
* # Returns
|
|
796
|
+
*
|
|
797
|
+
* A boxed array of child node IDs (`Box<[u32]>`).
|
|
798
|
+
*
|
|
799
|
+
* # Errors
|
|
800
|
+
*
|
|
801
|
+
* Returns a `JsValue` error if the node does not exist.
|
|
802
|
+
*/
|
|
803
|
+
export function get_children(parent: number): Uint32Array;
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Retrieves the computed layout information for a specific node.
|
|
807
|
+
*
|
|
808
|
+
* # Arguments
|
|
809
|
+
*
|
|
810
|
+
* * `node` - The ID of the node to query.
|
|
811
|
+
*
|
|
812
|
+
* # Returns
|
|
813
|
+
*
|
|
814
|
+
* A `Layout` object containing the x, y, width, and height of the node.
|
|
815
|
+
*
|
|
816
|
+
* # Errors
|
|
817
|
+
*
|
|
818
|
+
* Returns a `JsValue` error if the node does not exist or layout information is unavailable.
|
|
819
|
+
*/
|
|
820
|
+
export function get_layout(node: number): any;
|
|
821
|
+
|
|
822
|
+
/**
|
|
823
|
+
* Retrieves the parent ID of a given node.
|
|
824
|
+
*
|
|
825
|
+
* # Arguments
|
|
826
|
+
*
|
|
827
|
+
* * `node` - The ID of the node to query.
|
|
828
|
+
*
|
|
829
|
+
* # Returns
|
|
830
|
+
*
|
|
831
|
+
* An `Option<u32>` containing the parent ID if it exists, or `None` if the node is a root or orphan.
|
|
832
|
+
*
|
|
833
|
+
* # Errors
|
|
834
|
+
*
|
|
835
|
+
* Returns a `JsValue` error if internal tree access fails.
|
|
836
|
+
*/
|
|
837
|
+
export function get_parent(node: number): number | undefined;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Initialize console error panic hook
|
|
841
|
+
*/
|
|
842
|
+
export function init(): void;
|
|
843
|
+
|
|
844
|
+
/**
|
|
845
|
+
* Marks a node and its ancestors as dirty, requiring a layout re-computation.
|
|
846
|
+
*
|
|
847
|
+
* # Arguments
|
|
848
|
+
*
|
|
849
|
+
* * `node` - The ID of the node to mark dirty.
|
|
850
|
+
*
|
|
851
|
+
* # Errors
|
|
852
|
+
*
|
|
853
|
+
* Returns a `JsValue` error if the node does not exist.
|
|
854
|
+
*/
|
|
855
|
+
export function mark_dirty(node: number): void;
|
|
856
|
+
|
|
857
|
+
/**
|
|
858
|
+
* Creates a new leaf node with the specified style.
|
|
859
|
+
*
|
|
860
|
+
* # Arguments
|
|
861
|
+
*
|
|
862
|
+
* * `style` - The style object to apply to the new node.
|
|
863
|
+
*
|
|
864
|
+
* # Returns
|
|
865
|
+
*
|
|
866
|
+
* The ID of the created node as a `u32`.
|
|
867
|
+
*
|
|
868
|
+
* # Errors
|
|
869
|
+
*
|
|
870
|
+
* Returns a `JsValue` error if the style cannot be deserialized or if node creation fails.
|
|
871
|
+
*/
|
|
872
|
+
export function new_leaf(style: any): number;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* Creates a new node with children and the specified style.
|
|
876
|
+
*
|
|
877
|
+
* # Arguments
|
|
878
|
+
*
|
|
879
|
+
* * `style` - The style object to apply to the new node.
|
|
880
|
+
* * `children` - An array of child node IDs (`u32`) to attach to this node.
|
|
881
|
+
*
|
|
882
|
+
* # Returns
|
|
883
|
+
*
|
|
884
|
+
* The ID of the created node as a `u32`.
|
|
885
|
+
*
|
|
886
|
+
* # Errors
|
|
887
|
+
*
|
|
888
|
+
* Returns a `JsValue` error if the style cannot be deserialized or if node creation fails.
|
|
889
|
+
*/
|
|
890
|
+
export function new_with_children(style: any, children: Uint32Array): number;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Get the total number of nodes
|
|
894
|
+
*/
|
|
895
|
+
export function node_count(): number;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* Helper function to create a percent dimension
|
|
899
|
+
*/
|
|
900
|
+
export function percent(value: number): Dimension;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Helper function to create a pixel dimension
|
|
904
|
+
*/
|
|
905
|
+
export function px(value: number): Dimension;
|
|
906
|
+
|
|
907
|
+
/**
|
|
908
|
+
* Removes a child node from a parent node.
|
|
909
|
+
*
|
|
910
|
+
* # Arguments
|
|
911
|
+
*
|
|
912
|
+
* * `parent` - The ID of the parent node.
|
|
913
|
+
* * `child` - The ID of the child node to remove.
|
|
914
|
+
*
|
|
915
|
+
* # Errors
|
|
916
|
+
*
|
|
917
|
+
* Returns a `JsValue` error if the child is not found in the parent.
|
|
918
|
+
*/
|
|
919
|
+
export function remove_child(parent: number, child: number): void;
|
|
920
|
+
|
|
921
|
+
/**
|
|
922
|
+
* Removes a node from the tree and frees its resources.
|
|
923
|
+
*
|
|
924
|
+
* # Arguments
|
|
925
|
+
*
|
|
926
|
+
* * `node` - The ID of the node to remove.
|
|
927
|
+
*
|
|
928
|
+
* # Errors
|
|
929
|
+
*
|
|
930
|
+
* Returns a `JsValue` error if the node does not exist or cannot be removed.
|
|
931
|
+
*/
|
|
932
|
+
export function remove_node(node: number): void;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Sets the children of a node, replacing any existing children.
|
|
936
|
+
*
|
|
937
|
+
* # Arguments
|
|
938
|
+
*
|
|
939
|
+
* * `parent` - The ID of the parent node.
|
|
940
|
+
* * `children` - An array of child node IDs to set.
|
|
941
|
+
*
|
|
942
|
+
* # Errors
|
|
943
|
+
*
|
|
944
|
+
* Returns a `JsValue` error if the operation fails.
|
|
945
|
+
*/
|
|
946
|
+
export function set_children(parent: number, children: Uint32Array): void;
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* Updates the style of an existing node.
|
|
950
|
+
*
|
|
951
|
+
* # Arguments
|
|
952
|
+
*
|
|
953
|
+
* * `node` - The ID of the node to update.
|
|
954
|
+
* * `style` - The new style object to apply.
|
|
955
|
+
*
|
|
956
|
+
* # Errors
|
|
957
|
+
*
|
|
958
|
+
* Returns a `JsValue` error if the style cannot be deserialized or if the node does not exist.
|
|
959
|
+
*/
|
|
960
|
+
export function set_style(node: number, style: any): void;
|
|
961
|
+
|
|
962
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
963
|
+
|
|
964
|
+
export interface InitOutput {
|
|
965
|
+
readonly memory: WebAssembly.Memory;
|
|
966
|
+
readonly __wbg_availablespace_free: (a: number, b: number) => void;
|
|
967
|
+
readonly __wbg_dimension_free: (a: number, b: number) => void;
|
|
968
|
+
readonly __wbg_get_availablespace_height: (a: number) => number;
|
|
969
|
+
readonly __wbg_get_availablespace_width: (a: number) => number;
|
|
970
|
+
readonly __wbg_get_dimension_unit: (a: number) => number;
|
|
971
|
+
readonly __wbg_get_dimension_value: (a: number) => number;
|
|
972
|
+
readonly __wbg_get_layout_height: (a: number) => number;
|
|
973
|
+
readonly __wbg_get_layout_width: (a: number) => number;
|
|
974
|
+
readonly __wbg_get_layout_y: (a: number) => number;
|
|
975
|
+
readonly __wbg_get_line_end: (a: number) => number;
|
|
976
|
+
readonly __wbg_get_line_start: (a: number) => number;
|
|
977
|
+
readonly __wbg_get_style_align_content: (a: number) => number;
|
|
978
|
+
readonly __wbg_get_style_align_items: (a: number) => number;
|
|
979
|
+
readonly __wbg_get_style_align_self: (a: number) => number;
|
|
980
|
+
readonly __wbg_get_style_bottom: (a: number) => number;
|
|
981
|
+
readonly __wbg_get_style_column_gap: (a: number) => number;
|
|
982
|
+
readonly __wbg_get_style_display: (a: number) => number;
|
|
983
|
+
readonly __wbg_get_style_flex_basis: (a: number) => number;
|
|
984
|
+
readonly __wbg_get_style_flex_direction: (a: number) => number;
|
|
985
|
+
readonly __wbg_get_style_flex_wrap: (a: number) => number;
|
|
986
|
+
readonly __wbg_get_style_grid_auto_flow: (a: number) => number;
|
|
987
|
+
readonly __wbg_get_style_height: (a: number) => number;
|
|
988
|
+
readonly __wbg_get_style_justify_content: (a: number) => number;
|
|
989
|
+
readonly __wbg_get_style_left: (a: number) => number;
|
|
990
|
+
readonly __wbg_get_style_margin_bottom: (a: number) => number;
|
|
991
|
+
readonly __wbg_get_style_margin_left: (a: number) => number;
|
|
992
|
+
readonly __wbg_get_style_margin_right: (a: number) => number;
|
|
993
|
+
readonly __wbg_get_style_margin_top: (a: number) => number;
|
|
994
|
+
readonly __wbg_get_style_max_height: (a: number) => number;
|
|
995
|
+
readonly __wbg_get_style_max_width: (a: number) => number;
|
|
996
|
+
readonly __wbg_get_style_min_height: (a: number) => number;
|
|
997
|
+
readonly __wbg_get_style_min_width: (a: number) => number;
|
|
998
|
+
readonly __wbg_get_style_padding_bottom: (a: number) => number;
|
|
999
|
+
readonly __wbg_get_style_padding_left: (a: number) => number;
|
|
1000
|
+
readonly __wbg_get_style_padding_right: (a: number) => number;
|
|
1001
|
+
readonly __wbg_get_style_padding_top: (a: number) => number;
|
|
1002
|
+
readonly __wbg_get_style_position: (a: number) => number;
|
|
1003
|
+
readonly __wbg_get_style_right: (a: number) => number;
|
|
1004
|
+
readonly __wbg_get_style_row_gap: (a: number) => number;
|
|
1005
|
+
readonly __wbg_get_style_text_align: (a: number) => number;
|
|
1006
|
+
readonly __wbg_get_style_top: (a: number) => number;
|
|
1007
|
+
readonly __wbg_get_style_width: (a: number) => number;
|
|
1008
|
+
readonly __wbg_get_taffynode_id: (a: number) => number;
|
|
1009
|
+
readonly __wbg_get_trackdefinition_unit: (a: number) => number;
|
|
1010
|
+
readonly __wbg_line_free: (a: number, b: number) => void;
|
|
1011
|
+
readonly __wbg_point_free: (a: number, b: number) => void;
|
|
1012
|
+
readonly __wbg_set_availablespace_height: (a: number, b: number) => void;
|
|
1013
|
+
readonly __wbg_set_availablespace_width: (a: number, b: number) => void;
|
|
1014
|
+
readonly __wbg_set_dimension_unit: (a: number, b: number) => void;
|
|
1015
|
+
readonly __wbg_set_dimension_value: (a: number, b: number) => void;
|
|
1016
|
+
readonly __wbg_set_layout_height: (a: number, b: number) => void;
|
|
1017
|
+
readonly __wbg_set_layout_width: (a: number, b: number) => void;
|
|
1018
|
+
readonly __wbg_set_layout_y: (a: number, b: number) => void;
|
|
1019
|
+
readonly __wbg_set_line_end: (a: number, b: number) => void;
|
|
1020
|
+
readonly __wbg_set_line_start: (a: number, b: number) => void;
|
|
1021
|
+
readonly __wbg_set_style_align_content: (a: number, b: number) => void;
|
|
1022
|
+
readonly __wbg_set_style_align_items: (a: number, b: number) => void;
|
|
1023
|
+
readonly __wbg_set_style_align_self: (a: number, b: number) => void;
|
|
1024
|
+
readonly __wbg_set_style_bottom: (a: number, b: number) => void;
|
|
1025
|
+
readonly __wbg_set_style_column_gap: (a: number, b: number) => void;
|
|
1026
|
+
readonly __wbg_set_style_display: (a: number, b: number) => void;
|
|
1027
|
+
readonly __wbg_set_style_flex_basis: (a: number, b: number) => void;
|
|
1028
|
+
readonly __wbg_set_style_flex_direction: (a: number, b: number) => void;
|
|
1029
|
+
readonly __wbg_set_style_flex_wrap: (a: number, b: number) => void;
|
|
1030
|
+
readonly __wbg_set_style_grid_auto_flow: (a: number, b: number) => void;
|
|
1031
|
+
readonly __wbg_set_style_height: (a: number, b: number) => void;
|
|
1032
|
+
readonly __wbg_set_style_justify_content: (a: number, b: number) => void;
|
|
1033
|
+
readonly __wbg_set_style_left: (a: number, b: number) => void;
|
|
1034
|
+
readonly __wbg_set_style_margin_bottom: (a: number, b: number) => void;
|
|
1035
|
+
readonly __wbg_set_style_margin_left: (a: number, b: number) => void;
|
|
1036
|
+
readonly __wbg_set_style_margin_right: (a: number, b: number) => void;
|
|
1037
|
+
readonly __wbg_set_style_margin_top: (a: number, b: number) => void;
|
|
1038
|
+
readonly __wbg_set_style_max_height: (a: number, b: number) => void;
|
|
1039
|
+
readonly __wbg_set_style_max_width: (a: number, b: number) => void;
|
|
1040
|
+
readonly __wbg_set_style_min_height: (a: number, b: number) => void;
|
|
1041
|
+
readonly __wbg_set_style_min_width: (a: number, b: number) => void;
|
|
1042
|
+
readonly __wbg_set_style_padding_bottom: (a: number, b: number) => void;
|
|
1043
|
+
readonly __wbg_set_style_padding_left: (a: number, b: number) => void;
|
|
1044
|
+
readonly __wbg_set_style_padding_right: (a: number, b: number) => void;
|
|
1045
|
+
readonly __wbg_set_style_padding_top: (a: number, b: number) => void;
|
|
1046
|
+
readonly __wbg_set_style_position: (a: number, b: number) => void;
|
|
1047
|
+
readonly __wbg_set_style_right: (a: number, b: number) => void;
|
|
1048
|
+
readonly __wbg_set_style_row_gap: (a: number, b: number) => void;
|
|
1049
|
+
readonly __wbg_set_style_text_align: (a: number, b: number) => void;
|
|
1050
|
+
readonly __wbg_set_style_top: (a: number, b: number) => void;
|
|
1051
|
+
readonly __wbg_set_style_width: (a: number, b: number) => void;
|
|
1052
|
+
readonly __wbg_set_taffynode_id: (a: number, b: number) => void;
|
|
1053
|
+
readonly __wbg_set_trackdefinition_unit: (a: number, b: number) => void;
|
|
1054
|
+
readonly __wbg_style_free: (a: number, b: number) => void;
|
|
1055
|
+
readonly __wbg_taffynode_free: (a: number, b: number) => void;
|
|
1056
|
+
readonly __wbg_trackdefinition_free: (a: number, b: number) => void;
|
|
1057
|
+
readonly add_child: (a: number, b: number) => [number, number];
|
|
1058
|
+
readonly auto: () => number;
|
|
1059
|
+
readonly clear: () => [number, number];
|
|
1060
|
+
readonly compute_layout: (a: number, b: any) => [number, number];
|
|
1061
|
+
readonly dimension: (a: number, b: number) => number;
|
|
1062
|
+
readonly get_children: (a: number) => [number, number, number, number];
|
|
1063
|
+
readonly get_layout: (a: number) => [number, number, number];
|
|
1064
|
+
readonly get_parent: (a: number) => [number, number, number];
|
|
1065
|
+
readonly init: () => void;
|
|
1066
|
+
readonly mark_dirty: (a: number) => [number, number];
|
|
1067
|
+
readonly new_leaf: (a: any) => [number, number, number];
|
|
1068
|
+
readonly new_with_children: (a: any, b: number, c: number) => [number, number, number];
|
|
1069
|
+
readonly node_count: () => number;
|
|
1070
|
+
readonly percent: (a: number) => number;
|
|
1071
|
+
readonly px: (a: number) => number;
|
|
1072
|
+
readonly remove_child: (a: number, b: number) => [number, number];
|
|
1073
|
+
readonly remove_node: (a: number) => [number, number];
|
|
1074
|
+
readonly set_children: (a: number, b: number, c: number) => [number, number];
|
|
1075
|
+
readonly set_style: (a: number, b: any) => [number, number];
|
|
1076
|
+
readonly taffynode_add_child: (a: number, b: number) => [number, number];
|
|
1077
|
+
readonly taffynode_compute_layout: (a: number, b: any) => [number, number];
|
|
1078
|
+
readonly taffynode_free: (a: number) => [number, number];
|
|
1079
|
+
readonly taffynode_get_layout: (a: number) => [number, number, number];
|
|
1080
|
+
readonly taffynode_new: (a: any) => [number, number, number];
|
|
1081
|
+
readonly taffynode_remove_child: (a: number, b: number) => [number, number];
|
|
1082
|
+
readonly taffynode_set_children: (a: number, b: number, c: number) => [number, number];
|
|
1083
|
+
readonly taffynode_set_style: (a: number, b: any) => [number, number];
|
|
1084
|
+
readonly taffynode_style: (a: number) => [number, number, number];
|
|
1085
|
+
readonly __wbg_set_layout_x: (a: number, b: number) => void;
|
|
1086
|
+
readonly __wbg_set_point_x: (a: number, b: number) => void;
|
|
1087
|
+
readonly __wbg_set_point_y: (a: number, b: number) => void;
|
|
1088
|
+
readonly __wbg_set_rect_bottom: (a: number, b: number) => void;
|
|
1089
|
+
readonly __wbg_set_rect_left: (a: number, b: number) => void;
|
|
1090
|
+
readonly __wbg_set_rect_right: (a: number, b: number) => void;
|
|
1091
|
+
readonly __wbg_set_rect_top: (a: number, b: number) => void;
|
|
1092
|
+
readonly __wbg_set_size_height: (a: number, b: number) => void;
|
|
1093
|
+
readonly __wbg_set_size_width: (a: number, b: number) => void;
|
|
1094
|
+
readonly __wbg_set_trackdefinition_value: (a: number, b: number) => void;
|
|
1095
|
+
readonly __wbg_set_style_flex_grow: (a: number, b: number) => void;
|
|
1096
|
+
readonly __wbg_set_style_flex_shrink: (a: number, b: number) => void;
|
|
1097
|
+
readonly __wbg_get_style_flex_grow: (a: number) => number;
|
|
1098
|
+
readonly __wbg_get_style_flex_shrink: (a: number) => number;
|
|
1099
|
+
readonly __wbg_get_layout_x: (a: number) => number;
|
|
1100
|
+
readonly __wbg_get_point_x: (a: number) => number;
|
|
1101
|
+
readonly __wbg_get_point_y: (a: number) => number;
|
|
1102
|
+
readonly __wbg_get_rect_bottom: (a: number) => number;
|
|
1103
|
+
readonly __wbg_get_rect_left: (a: number) => number;
|
|
1104
|
+
readonly __wbg_get_rect_right: (a: number) => number;
|
|
1105
|
+
readonly __wbg_get_rect_top: (a: number) => number;
|
|
1106
|
+
readonly __wbg_get_size_height: (a: number) => number;
|
|
1107
|
+
readonly __wbg_get_size_width: (a: number) => number;
|
|
1108
|
+
readonly __wbg_get_trackdefinition_value: (a: number) => number;
|
|
1109
|
+
readonly __wbg_rect_free: (a: number, b: number) => void;
|
|
1110
|
+
readonly __wbg_layout_free: (a: number, b: number) => void;
|
|
1111
|
+
readonly __wbg_size_free: (a: number, b: number) => void;
|
|
1112
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1113
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1114
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1115
|
+
readonly __externref_table_alloc: () => number;
|
|
1116
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1117
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1118
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
1119
|
+
readonly __wbindgen_start: () => void;
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1126
|
+
* a precompiled `WebAssembly.Module`.
|
|
1127
|
+
*
|
|
1128
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1129
|
+
*
|
|
1130
|
+
* @returns {InitOutput}
|
|
1131
|
+
*/
|
|
1132
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1136
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1137
|
+
*
|
|
1138
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1139
|
+
*
|
|
1140
|
+
* @returns {Promise<InitOutput>}
|
|
1141
|
+
*/
|
|
1142
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|