flexily 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/chunk-CBBoxR_p.mjs +26 -0
  2. package/dist/constants-BNURa6H7.mjs +65 -0
  3. package/dist/constants-BNURa6H7.mjs.map +1 -0
  4. package/dist/constants-D7ythAJC.d.mts +64 -0
  5. package/dist/constants-D7ythAJC.d.mts.map +1 -0
  6. package/{src/classic/node.ts → dist/index-classic.d.mts} +118 -619
  7. package/dist/index-classic.d.mts.map +1 -0
  8. package/dist/index-classic.mjs +1909 -0
  9. package/dist/index-classic.mjs.map +1 -0
  10. package/dist/index.d.mts +195 -0
  11. package/dist/index.d.mts.map +1 -0
  12. package/dist/index.mjs +3279 -0
  13. package/dist/index.mjs.map +1 -0
  14. package/dist/node-zero-75maLs2s.d.mts +762 -0
  15. package/dist/node-zero-75maLs2s.d.mts.map +1 -0
  16. package/dist/src-BWyhokNZ.mjs +692 -0
  17. package/dist/src-BWyhokNZ.mjs.map +1 -0
  18. package/dist/src-DdSLylRA.mjs +816 -0
  19. package/dist/src-DdSLylRA.mjs.map +1 -0
  20. package/dist/testing.d.mts +55 -0
  21. package/dist/testing.d.mts.map +1 -0
  22. package/dist/testing.mjs +154 -0
  23. package/dist/testing.mjs.map +1 -0
  24. package/dist/types--IozHd4V.mjs +283 -0
  25. package/dist/types--IozHd4V.mjs.map +1 -0
  26. package/dist/types-DG1H4DVR.d.mts +157 -0
  27. package/dist/types-DG1H4DVR.d.mts.map +1 -0
  28. package/package.json +33 -24
  29. package/src/CLAUDE.md +0 -527
  30. package/src/classic/layout.ts +0 -1843
  31. package/src/constants.ts +0 -82
  32. package/src/create-flexily.ts +0 -153
  33. package/src/index-classic.ts +0 -110
  34. package/src/index.ts +0 -133
  35. package/src/layout-flex-lines.ts +0 -413
  36. package/src/layout-helpers.ts +0 -160
  37. package/src/layout-measure.ts +0 -259
  38. package/src/layout-stats.ts +0 -41
  39. package/src/layout-traversal.ts +0 -70
  40. package/src/layout-zero.ts +0 -2219
  41. package/src/logger.ts +0 -68
  42. package/src/monospace-measurer.ts +0 -68
  43. package/src/node-zero.ts +0 -1508
  44. package/src/pretext-measurer.ts +0 -86
  45. package/src/test-measurer.ts +0 -219
  46. package/src/testing.ts +0 -215
  47. package/src/text-layout.ts +0 -75
  48. package/src/trace.ts +0 -252
  49. package/src/types.ts +0 -236
  50. package/src/utils.ts +0 -243
@@ -0,0 +1,762 @@
1
+ import { a as Style, i as MeasureFunc, n as FlexInfo, o as Value, r as Layout, t as BaselineFunc } from "./types-DG1H4DVR.mjs";
2
+
3
+ //#region src/node-zero.d.ts
4
+ /**
5
+ * A layout node in the flexbox tree.
6
+ */
7
+ declare class Node {
8
+ private _parent;
9
+ private _children;
10
+ private _style;
11
+ private _measureFunc;
12
+ private _baselineFunc;
13
+ private _m0?;
14
+ private _m1?;
15
+ private _m2?;
16
+ private _m3?;
17
+ private _lc0?;
18
+ private _lc1?;
19
+ private _measureResult;
20
+ private _layoutResult;
21
+ static measureCalls: number;
22
+ static measureCacheHits: number;
23
+ /**
24
+ * Reset measure statistics (call before calculateLayout).
25
+ */
26
+ static resetMeasureStats(): void;
27
+ private _layout;
28
+ private _flex;
29
+ private _isDirty;
30
+ private _hasNewLayout;
31
+ private _lastCalcW;
32
+ private _lastCalcH;
33
+ private _lastCalcDir;
34
+ /**
35
+ * Create a new layout node.
36
+ *
37
+ * @returns A new Node instance
38
+ * @example
39
+ * ```typescript
40
+ * const root = Node.create();
41
+ * root.setWidth(100);
42
+ * root.setHeight(200);
43
+ * ```
44
+ */
45
+ static create(): Node;
46
+ /**
47
+ * Get the number of child nodes.
48
+ *
49
+ * @returns The number of children
50
+ */
51
+ getChildCount(): number;
52
+ /**
53
+ * Get a child node by index.
54
+ *
55
+ * @param index - Zero-based child index
56
+ * @returns The child node at the given index, or undefined if index is out of bounds
57
+ */
58
+ getChild(index: number): Node | undefined;
59
+ /**
60
+ * Get the parent node.
61
+ *
62
+ * @returns The parent node, or null if this is a root node
63
+ */
64
+ getParent(): Node | null;
65
+ /**
66
+ * Insert a child node at the specified index.
67
+ * If the child already has a parent, it will be removed from that parent first.
68
+ * Marks the node as dirty to trigger layout recalculation.
69
+ *
70
+ * @param child - The child node to insert
71
+ * @param index - The index at which to insert the child
72
+ * @example
73
+ * ```typescript
74
+ * const parent = Node.create();
75
+ * const child1 = Node.create();
76
+ * const child2 = Node.create();
77
+ * parent.insertChild(child1, 0);
78
+ * parent.insertChild(child2, 1);
79
+ * ```
80
+ */
81
+ insertChild(child: Node, index: number): void;
82
+ /**
83
+ * Remove a child node from this node.
84
+ * The child's parent reference will be cleared.
85
+ * Marks the node as dirty to trigger layout recalculation.
86
+ * Invalidates layout validity of remaining siblings whose positions may change.
87
+ *
88
+ * @param child - The child node to remove
89
+ */
90
+ removeChild(child: Node): void;
91
+ /**
92
+ * Free this node and clean up all references.
93
+ * Removes the node from its parent, clears all children, and removes the measure function.
94
+ * This does not recursively free child nodes.
95
+ */
96
+ free(): void;
97
+ /**
98
+ * Free this node and all descendants recursively.
99
+ * Each node is detached from its parent and cleaned up.
100
+ * Uses iterative traversal to avoid stack overflow on deep trees.
101
+ */
102
+ freeRecursive(): void;
103
+ /**
104
+ * Dispose the node (calls free)
105
+ */
106
+ [Symbol.dispose](): void;
107
+ /**
108
+ * Set a measure function for intrinsic sizing.
109
+ * The measure function is called during layout to determine the node's natural size.
110
+ * Typically used for text nodes or other content that has an intrinsic size.
111
+ * Marks the node as dirty to trigger layout recalculation.
112
+ *
113
+ * @param measureFunc - Function that returns width and height given available space and constraints
114
+ * @example
115
+ * ```typescript
116
+ * const textNode = Node.create();
117
+ * textNode.setMeasureFunc((width, widthMode, height, heightMode) => {
118
+ * // Measure text and return dimensions
119
+ * return { width: 50, height: 20 };
120
+ * });
121
+ * ```
122
+ */
123
+ setMeasureFunc(measureFunc: MeasureFunc): void;
124
+ /**
125
+ * Remove the measure function from this node.
126
+ * Marks the node as dirty to trigger layout recalculation.
127
+ */
128
+ unsetMeasureFunc(): void;
129
+ /**
130
+ * Check if this node has a measure function.
131
+ *
132
+ * @returns True if a measure function is set
133
+ */
134
+ hasMeasureFunc(): boolean;
135
+ /**
136
+ * Set a baseline function to determine where this node's text baseline is.
137
+ * Used for ALIGN_BASELINE to align text across siblings with different heights.
138
+ *
139
+ * @param baselineFunc - Function that returns baseline offset from top given width and height
140
+ * @example
141
+ * ```typescript
142
+ * textNode.setBaselineFunc((width, height) => {
143
+ * // For a text node, baseline might be at 80% of height
144
+ * return height * 0.8;
145
+ * });
146
+ * ```
147
+ */
148
+ setBaselineFunc(baselineFunc: BaselineFunc): void;
149
+ /**
150
+ * Remove the baseline function from this node.
151
+ * Marks the node as dirty to trigger layout recalculation.
152
+ */
153
+ unsetBaselineFunc(): void;
154
+ /**
155
+ * Check if this node has a baseline function.
156
+ *
157
+ * @returns True if a baseline function is set
158
+ */
159
+ hasBaselineFunc(): boolean;
160
+ /**
161
+ * Call the measure function with caching.
162
+ * Uses a 4-entry numeric cache for fast lookup without allocations.
163
+ * Cache is cleared when markDirty() is called.
164
+ *
165
+ * @returns Measured dimensions or null if no measure function
166
+ */
167
+ cachedMeasure(w: number, wm: number, h: number, hm: number): {
168
+ width: number;
169
+ height: number;
170
+ } | null;
171
+ /**
172
+ * Check layout cache for a previously computed size with same available dimensions.
173
+ * Returns cached (width, height) or null if not found.
174
+ *
175
+ * NaN dimensions are handled specially via Object.is (NaN === NaN is false, but Object.is(NaN, NaN) is true).
176
+ */
177
+ getCachedLayout(availW: number, availH: number): {
178
+ width: number;
179
+ height: number;
180
+ } | null;
181
+ /**
182
+ * Cache a computed layout result for the given available dimensions.
183
+ * Zero-allocation: lazily allocates cache entries once, then reuses.
184
+ */
185
+ setCachedLayout(availW: number, availH: number, computedW: number, computedH: number): void;
186
+ /**
187
+ * Clear layout cache for this node and all descendants.
188
+ * Called at the start of each calculateLayout pass.
189
+ * Zero-allocation: invalidates entries (availW = NaN) rather than deallocating.
190
+ * Uses iterative traversal to avoid stack overflow on deep trees.
191
+ */
192
+ resetLayoutCache(): void;
193
+ /**
194
+ * Check if this node needs layout recalculation.
195
+ *
196
+ * @returns True if the node is dirty and needs layout
197
+ */
198
+ isDirty(): boolean;
199
+ /**
200
+ * Mark this node and all ancestors as dirty.
201
+ * A dirty node needs layout recalculation.
202
+ * This is automatically called by all style setters and tree operations.
203
+ * Uses iterative approach to avoid stack overflow on deep trees.
204
+ */
205
+ markDirty(): void;
206
+ /**
207
+ * Check if this node has new layout results since the last check.
208
+ *
209
+ * @returns True if layout was recalculated since the last call to markLayoutSeen
210
+ */
211
+ hasNewLayout(): boolean;
212
+ /**
213
+ * Mark that the current layout has been seen/processed.
214
+ * Clears the hasNewLayout flag.
215
+ */
216
+ markLayoutSeen(): void;
217
+ /**
218
+ * Calculate layout for this node and all descendants.
219
+ * This runs the flexbox layout algorithm to compute positions and sizes.
220
+ * Only recalculates if the node is marked as dirty.
221
+ *
222
+ * @param width - Available width for layout
223
+ * @param height - Available height for layout
224
+ * @param _direction - Text direction (LTR or RTL), defaults to LTR
225
+ * @example
226
+ * ```typescript
227
+ * const root = Node.create();
228
+ * root.setFlexDirection(FLEX_DIRECTION_ROW);
229
+ * root.setWidth(100);
230
+ * root.setHeight(50);
231
+ *
232
+ * const child = Node.create();
233
+ * child.setFlexGrow(1);
234
+ * root.insertChild(child, 0);
235
+ *
236
+ * root.calculateLayout(100, 50, DIRECTION_LTR);
237
+ *
238
+ * // Now you can read computed layout
239
+ * console.log(child.getComputedWidth());
240
+ * ```
241
+ */
242
+ calculateLayout(width?: number, height?: number, direction?: number): void;
243
+ /**
244
+ * Get the computed left position after layout.
245
+ *
246
+ * @returns The left position in points
247
+ */
248
+ getComputedLeft(): number;
249
+ /**
250
+ * Get the computed top position after layout.
251
+ *
252
+ * @returns The top position in points
253
+ */
254
+ getComputedTop(): number;
255
+ /**
256
+ * Get the computed width after layout.
257
+ *
258
+ * @returns The width in points
259
+ */
260
+ getComputedWidth(): number;
261
+ /**
262
+ * Get the computed height after layout.
263
+ *
264
+ * @returns The height in points
265
+ */
266
+ getComputedHeight(): number;
267
+ /**
268
+ * Get the computed right edge position after layout (left + width).
269
+ *
270
+ * @returns The right edge position in points
271
+ */
272
+ getComputedRight(): number;
273
+ /**
274
+ * Get the computed bottom edge position after layout (top + height).
275
+ *
276
+ * @returns The bottom edge position in points
277
+ */
278
+ getComputedBottom(): number;
279
+ /**
280
+ * Get the computed padding for a specific edge after layout.
281
+ * Returns the resolved padding value (percentage and logical edges resolved).
282
+ *
283
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
284
+ * @returns Padding value in points
285
+ */
286
+ getComputedPadding(edge: number): number;
287
+ /**
288
+ * Get the computed margin for a specific edge after layout.
289
+ * Returns the resolved margin value (percentage and logical edges resolved).
290
+ *
291
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
292
+ * @returns Margin value in points
293
+ */
294
+ getComputedMargin(edge: number): number;
295
+ /**
296
+ * Get the computed border width for a specific edge after layout.
297
+ *
298
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
299
+ * @returns Border width in points
300
+ */
301
+ getComputedBorder(edge: number): number;
302
+ get children(): readonly Node[];
303
+ get style(): Style;
304
+ get layout(): Layout;
305
+ get measureFunc(): MeasureFunc | null;
306
+ get baselineFunc(): BaselineFunc | null;
307
+ get flex(): FlexInfo;
308
+ /**
309
+ * Set the width to a fixed value in points.
310
+ *
311
+ * @param value - Width in points
312
+ */
313
+ setWidth(value: number): void;
314
+ /**
315
+ * Set the width as a percentage of the parent's width.
316
+ *
317
+ * @param value - Width as a percentage (0-100)
318
+ */
319
+ setWidthPercent(value: number): void;
320
+ /**
321
+ * Set the width to auto (determined by layout algorithm).
322
+ */
323
+ setWidthAuto(): void;
324
+ /**
325
+ * Set the width to fit-content mode.
326
+ *
327
+ * CSS fit-content = min(max-content, max(min-content, available-width)).
328
+ * For terminals: min(max-content, available-width) since min-content
329
+ * floor is rarely relevant.
330
+ *
331
+ * The layout algorithm measures unconstrained content width (max-content),
332
+ * then clamps to the available width from the parent.
333
+ */
334
+ setWidthFitContent(): void;
335
+ /**
336
+ * Set the width to snug-content mode.
337
+ *
338
+ * Like fit-content but signals that the consumer wants the tightest
339
+ * possible width (binary-search shrinkwrap). The layout engine treats
340
+ * this identically to fit-content for sizing; the consuming framework
341
+ * (e.g., silvery) can further tighten via its own binary search.
342
+ */
343
+ setWidthSnugContent(): void;
344
+ /**
345
+ * Set the height to a fixed value in points.
346
+ *
347
+ * @param value - Height in points
348
+ */
349
+ setHeight(value: number): void;
350
+ /**
351
+ * Set the height as a percentage of the parent's height.
352
+ *
353
+ * @param value - Height as a percentage (0-100)
354
+ */
355
+ setHeightPercent(value: number): void;
356
+ /**
357
+ * Set the height to auto (determined by layout algorithm).
358
+ */
359
+ setHeightAuto(): void;
360
+ /**
361
+ * Set the minimum width in points.
362
+ *
363
+ * @param value - Minimum width in points
364
+ */
365
+ setMinWidth(value: number): void;
366
+ /**
367
+ * Set the minimum width as a percentage of the parent's width.
368
+ *
369
+ * @param value - Minimum width as a percentage (0-100)
370
+ */
371
+ setMinWidthPercent(value: number): void;
372
+ /**
373
+ * Set the minimum height in points.
374
+ *
375
+ * @param value - Minimum height in points
376
+ */
377
+ setMinHeight(value: number): void;
378
+ /**
379
+ * Set the minimum height as a percentage of the parent's height.
380
+ *
381
+ * @param value - Minimum height as a percentage (0-100)
382
+ */
383
+ setMinHeightPercent(value: number): void;
384
+ /**
385
+ * Set the maximum width in points.
386
+ *
387
+ * @param value - Maximum width in points
388
+ */
389
+ setMaxWidth(value: number): void;
390
+ /**
391
+ * Set the maximum width as a percentage of the parent's width.
392
+ *
393
+ * @param value - Maximum width as a percentage (0-100)
394
+ */
395
+ setMaxWidthPercent(value: number): void;
396
+ /**
397
+ * Set the maximum height in points.
398
+ *
399
+ * @param value - Maximum height in points
400
+ */
401
+ setMaxHeight(value: number): void;
402
+ /**
403
+ * Set the maximum height as a percentage of the parent's height.
404
+ *
405
+ * @param value - Maximum height as a percentage (0-100)
406
+ */
407
+ setMaxHeightPercent(value: number): void;
408
+ /**
409
+ * Set the aspect ratio of the node.
410
+ * When set, the node's width/height relationship is constrained.
411
+ * If width is defined, height = width / aspectRatio.
412
+ * If height is defined, width = height * aspectRatio.
413
+ *
414
+ * @param value - Aspect ratio (width/height). Use NaN to unset.
415
+ */
416
+ setAspectRatio(value: number): void;
417
+ /**
418
+ * Set the flex grow factor.
419
+ * Determines how much the node will grow relative to siblings when there is extra space.
420
+ *
421
+ * @param value - Flex grow factor (typically 0 or 1+)
422
+ * @example
423
+ * ```typescript
424
+ * const child = Node.create();
425
+ * child.setFlexGrow(1); // Will grow to fill available space
426
+ * ```
427
+ */
428
+ setFlexGrow(value: number): void;
429
+ /**
430
+ * Set the flex shrink factor.
431
+ * Determines how much the node will shrink relative to siblings when there is insufficient space.
432
+ *
433
+ * @param value - Flex shrink factor (default is 1)
434
+ */
435
+ setFlexShrink(value: number): void;
436
+ /**
437
+ * Set the flex basis to a fixed value in points.
438
+ * The initial size of the node before flex grow/shrink is applied.
439
+ *
440
+ * @param value - Flex basis in points
441
+ */
442
+ setFlexBasis(value: number): void;
443
+ /**
444
+ * Set the flex basis as a percentage of the parent's size.
445
+ *
446
+ * @param value - Flex basis as a percentage (0-100)
447
+ */
448
+ setFlexBasisPercent(value: number): void;
449
+ /**
450
+ * Set the flex basis to auto (based on the node's width/height).
451
+ */
452
+ setFlexBasisAuto(): void;
453
+ /**
454
+ * Set the flex direction (main axis direction).
455
+ *
456
+ * @param direction - FLEX_DIRECTION_ROW, FLEX_DIRECTION_COLUMN, FLEX_DIRECTION_ROW_REVERSE, or FLEX_DIRECTION_COLUMN_REVERSE
457
+ * @example
458
+ * ```typescript
459
+ * const container = Node.create();
460
+ * container.setFlexDirection(FLEX_DIRECTION_ROW); // Lay out children horizontally
461
+ * ```
462
+ */
463
+ setFlexDirection(direction: number): void;
464
+ /**
465
+ * Set the flex wrap behavior.
466
+ *
467
+ * @param wrap - WRAP_NO_WRAP, WRAP_WRAP, or WRAP_WRAP_REVERSE
468
+ */
469
+ setFlexWrap(wrap: number): void;
470
+ /**
471
+ * Set how children are aligned along the cross axis.
472
+ *
473
+ * @param align - ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH, or ALIGN_BASELINE
474
+ * @example
475
+ * ```typescript
476
+ * const container = Node.create();
477
+ * container.setFlexDirection(FLEX_DIRECTION_ROW);
478
+ * container.setAlignItems(ALIGN_CENTER); // Center children vertically
479
+ * ```
480
+ */
481
+ setAlignItems(align: number): void;
482
+ /**
483
+ * Set how this node is aligned along the parent's cross axis.
484
+ * Overrides the parent's alignItems for this specific child.
485
+ *
486
+ * @param align - ALIGN_AUTO, ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH, or ALIGN_BASELINE
487
+ */
488
+ setAlignSelf(align: number): void;
489
+ /**
490
+ * Set how lines are aligned in a multi-line flex container.
491
+ * Only affects containers with wrap enabled and multiple lines.
492
+ *
493
+ * @param align - ALIGN_FLEX_START, ALIGN_CENTER, ALIGN_FLEX_END, ALIGN_STRETCH, ALIGN_SPACE_BETWEEN, or ALIGN_SPACE_AROUND
494
+ */
495
+ setAlignContent(align: number): void;
496
+ /**
497
+ * Set how children are distributed along the main axis.
498
+ *
499
+ * @param justify - JUSTIFY_FLEX_START, JUSTIFY_CENTER, JUSTIFY_FLEX_END, JUSTIFY_SPACE_BETWEEN, JUSTIFY_SPACE_AROUND, or JUSTIFY_SPACE_EVENLY
500
+ * @example
501
+ * ```typescript
502
+ * const container = Node.create();
503
+ * container.setJustifyContent(JUSTIFY_SPACE_BETWEEN); // Space children evenly with edges at start/end
504
+ * ```
505
+ */
506
+ setJustifyContent(justify: number): void;
507
+ /**
508
+ * Set padding for one or more edges.
509
+ *
510
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
511
+ * @param value - Padding in points
512
+ * @example
513
+ * ```typescript
514
+ * node.setPadding(EDGE_ALL, 10); // Set 10pt padding on all edges
515
+ * node.setPadding(EDGE_HORIZONTAL, 5); // Set 5pt padding on left and right
516
+ * ```
517
+ */
518
+ setPadding(edge: number, value: number): void;
519
+ /**
520
+ * Set padding as a percentage of the parent's width.
521
+ * Per CSS spec, percentage padding always resolves against the containing block's width.
522
+ *
523
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
524
+ * @param value - Padding as a percentage (0-100)
525
+ */
526
+ setPaddingPercent(edge: number, value: number): void;
527
+ /**
528
+ * Set margin for one or more edges.
529
+ *
530
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
531
+ * @param value - Margin in points
532
+ * @example
533
+ * ```typescript
534
+ * node.setMargin(EDGE_ALL, 5); // Set 5pt margin on all edges
535
+ * node.setMargin(EDGE_TOP, 10); // Set 10pt margin on top only
536
+ * ```
537
+ */
538
+ setMargin(edge: number, value: number): void;
539
+ /**
540
+ * Set margin as a percentage of the parent's size.
541
+ *
542
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
543
+ * @param value - Margin as a percentage (0-100)
544
+ */
545
+ setMarginPercent(edge: number, value: number): void;
546
+ /**
547
+ * Set margin to auto (for centering items with margin: auto).
548
+ *
549
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
550
+ */
551
+ setMarginAuto(edge: number): void;
552
+ /**
553
+ * Set border width for one or more edges.
554
+ *
555
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
556
+ * @param value - Border width in points
557
+ */
558
+ setBorder(edge: number, value: number): void;
559
+ /**
560
+ * Set gap between flex items.
561
+ *
562
+ * @param gutter - GUTTER_COLUMN (horizontal gap), GUTTER_ROW (vertical gap), or GUTTER_ALL (both)
563
+ * @param value - Gap size in points
564
+ * @example
565
+ * ```typescript
566
+ * container.setGap(GUTTER_ALL, 8); // Set 8pt gap between all items
567
+ * container.setGap(GUTTER_COLUMN, 10); // Set 10pt horizontal gap only
568
+ * ```
569
+ */
570
+ setGap(gutter: number, value: number): void;
571
+ /**
572
+ * Set the position type.
573
+ *
574
+ * @param positionType - POSITION_TYPE_STATIC, POSITION_TYPE_RELATIVE, or POSITION_TYPE_ABSOLUTE
575
+ * @example
576
+ * ```typescript
577
+ * node.setPositionType(POSITION_TYPE_ABSOLUTE);
578
+ * node.setPosition(EDGE_LEFT, 10);
579
+ * node.setPosition(EDGE_TOP, 20);
580
+ * ```
581
+ */
582
+ setPositionType(positionType: number): void;
583
+ /**
584
+ * Set position offset for one or more edges.
585
+ * Only applies when position type is ABSOLUTE or RELATIVE.
586
+ *
587
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
588
+ * @param value - Position offset in points
589
+ */
590
+ setPosition(edge: number, value: number): void;
591
+ /**
592
+ * Set position offset as a percentage.
593
+ *
594
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, EDGE_BOTTOM, EDGE_HORIZONTAL, EDGE_VERTICAL, or EDGE_ALL
595
+ * @param value - Position offset as a percentage of parent's corresponding dimension
596
+ */
597
+ setPositionPercent(edge: number, value: number): void;
598
+ /**
599
+ * Set the display type.
600
+ *
601
+ * @param display - DISPLAY_FLEX or DISPLAY_NONE
602
+ */
603
+ setDisplay(display: number): void;
604
+ /**
605
+ * Set the overflow behavior.
606
+ *
607
+ * @param overflow - OVERFLOW_VISIBLE, OVERFLOW_HIDDEN, or OVERFLOW_SCROLL
608
+ */
609
+ setOverflow(overflow: number): void;
610
+ /**
611
+ * Get the width style value.
612
+ *
613
+ * @returns Width value with unit (points, percent, or auto)
614
+ */
615
+ getWidth(): Value;
616
+ /**
617
+ * Get the height style value.
618
+ *
619
+ * @returns Height value with unit (points, percent, or auto)
620
+ */
621
+ getHeight(): Value;
622
+ /**
623
+ * Get the minimum width style value.
624
+ *
625
+ * @returns Minimum width value with unit
626
+ */
627
+ getMinWidth(): Value;
628
+ /**
629
+ * Get the minimum height style value.
630
+ *
631
+ * @returns Minimum height value with unit
632
+ */
633
+ getMinHeight(): Value;
634
+ /**
635
+ * Get the maximum width style value.
636
+ *
637
+ * @returns Maximum width value with unit
638
+ */
639
+ getMaxWidth(): Value;
640
+ /**
641
+ * Get the maximum height style value.
642
+ *
643
+ * @returns Maximum height value with unit
644
+ */
645
+ getMaxHeight(): Value;
646
+ /**
647
+ * Get the aspect ratio.
648
+ *
649
+ * @returns Aspect ratio value (NaN if not set)
650
+ */
651
+ getAspectRatio(): number;
652
+ /**
653
+ * Get the flex grow factor.
654
+ *
655
+ * @returns Flex grow value
656
+ */
657
+ getFlexGrow(): number;
658
+ /**
659
+ * Get the flex shrink factor.
660
+ *
661
+ * @returns Flex shrink value
662
+ */
663
+ getFlexShrink(): number;
664
+ /**
665
+ * Get the flex basis style value.
666
+ *
667
+ * @returns Flex basis value with unit
668
+ */
669
+ getFlexBasis(): Value;
670
+ /**
671
+ * Get the flex direction.
672
+ *
673
+ * @returns Flex direction constant
674
+ */
675
+ getFlexDirection(): number;
676
+ /**
677
+ * Get the flex wrap setting.
678
+ *
679
+ * @returns Flex wrap constant
680
+ */
681
+ getFlexWrap(): number;
682
+ /**
683
+ * Get the align items setting.
684
+ *
685
+ * @returns Align items constant
686
+ */
687
+ getAlignItems(): number;
688
+ /**
689
+ * Get the align self setting.
690
+ *
691
+ * @returns Align self constant
692
+ */
693
+ getAlignSelf(): number;
694
+ /**
695
+ * Get the align content setting.
696
+ *
697
+ * @returns Align content constant
698
+ */
699
+ getAlignContent(): number;
700
+ /**
701
+ * Get the justify content setting.
702
+ *
703
+ * @returns Justify content constant
704
+ */
705
+ getJustifyContent(): number;
706
+ /**
707
+ * Get the padding for a specific edge.
708
+ *
709
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
710
+ * @returns Padding value with unit
711
+ */
712
+ getPadding(edge: number): Value;
713
+ /**
714
+ * Get the margin for a specific edge.
715
+ *
716
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
717
+ * @returns Margin value with unit
718
+ */
719
+ getMargin(edge: number): Value;
720
+ /**
721
+ * Get the border width for a specific edge.
722
+ *
723
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
724
+ * @returns Border width in points
725
+ */
726
+ getBorder(edge: number): number;
727
+ /**
728
+ * Get the position offset for a specific edge.
729
+ *
730
+ * @param edge - EDGE_LEFT, EDGE_TOP, EDGE_RIGHT, or EDGE_BOTTOM
731
+ * @returns Position value with unit
732
+ */
733
+ getPosition(edge: number): Value;
734
+ /**
735
+ * Get the position type.
736
+ *
737
+ * @returns Position type constant
738
+ */
739
+ getPositionType(): number;
740
+ /**
741
+ * Get the display type.
742
+ *
743
+ * @returns Display constant
744
+ */
745
+ getDisplay(): number;
746
+ /**
747
+ * Get the overflow setting.
748
+ *
749
+ * @returns Overflow constant
750
+ */
751
+ getOverflow(): number;
752
+ /**
753
+ * Get the gap for column or row.
754
+ *
755
+ * @param gutter - GUTTER_COLUMN or GUTTER_ROW
756
+ * @returns Gap size in points
757
+ */
758
+ getGap(gutter: number): number;
759
+ }
760
+ //#endregion
761
+ export { Node as t };
762
+ //# sourceMappingURL=node-zero-75maLs2s.d.mts.map