Internal_Internal_See _floatLeft.
True if any descendant has been marked dirty (even if dirty propagation
was stopped by a relayout boundary before reaching this node). Used by
the root cache-hit path to skip layoutChildren for subtrees that have
no mutations at all — not just subtrees where this node itself is clean.
Invariant: _dirtyFlags !== 0 implies _hasDirtyDescendant on the parent (if any).
Cleared by clearDirty() after each calculateLayout().
Readonly Internal_Unique integer ID for typed-array indexing in the LayoutPool. Assigned at construction; recycled via FinalizationRegistry when this Node is garbage-collected.
Readonly Internal_Backing storage for layout. Written by the algorithm in this package
(see algorithm/); read externally via the public layout getter or
the safer getComputedLayout() snapshot.
Optional Internal_Lazy-allocated layout-cache. Created the first time layoutChildren
(or calculateLayout at the root) stores a result. Cleared by
markDirty(). Read by layoutChildren and the root
calculateLayout path in algorithm/.
Optional Internal_Lazy-allocated measure-func result cache. Created the first time
setMeasureFunc() installs a measurer. Cleared by markDirty()
(which fires on every style/tree mutation) and by re-installing
the measure function. Read by callMeasureFunc() in
algorithm/main-axis.ts.
Readonly_Horizontal scroll offset. Mutable; defaults to 0. Read by the renderer
when painting children of an overflow !== 'visible' node — children's
paint origin is translated by (-scrollLeft, -scrollTop). NOT clamped
by this class — bounds clamping is the consumer's job (<ScrollView>
clamps before writing). Direct mutation does not mark the node dirty
because scroll offset is a paint-time concern, not layout.
See scrollLeft.
Read-only view of this node's most recently computed layout. Use
getComputedLayout() for a stable copy if you need to retain it past
the next calculateLayout() call.
Read-only view of _layout.scrollHeight.
Read-only view of _layout.scrollWidth. See scrollLeft.
Read-only view of this node's style. Mutating the returned object is
blocked at the type level — call setX() methods to change style so
markDirty() runs.
InternalSet dirty + clear caches + propagate up unconditionally, bypassing
the layout-boundary short-circuit in markDirty(). Used only by
markDirtyDeep in algorithm/cache.ts for differential-mode and
fuzzer validation that need to force the full tree onto the cold
path regardless of boundary semantics.
Compute layout for this node and its descendants.
If availableWidth / availableHeight are omitted the node's own
width / height style is used. If those are also 'auto' the
algorithm treats the missing axis as 0.
Implementation lives in ./algorithm/. This method delegates so that
Node remains a focused state holder.
OptionalavailableWidth: numberOptionalavailableHeight: numberInternalCalled by the algorithm once layout is fresh. Not part of the public API — consumers should treat layout cleanliness as derived state and never reach in to clear the flag themselves.
Snapshot of children — mutating the returned array does not affect the tree.
Returns the most recently computed layout box for this node, in cells, relative to the parent's top-left corner.
Before calculateLayout() has run, all values are 0.
InternalSet specific dirty flag(s) on this node. Propagates upward through ancestors. Used by individual setters to indicate the granular nature of the change; cache layers consume the flag to decide whether to invalidate.
Pass undefined to clear the constraint. Must be a positive finite
number when set. See style.ts for the full derivation rules.
CSS flex shorthand: grow=value, shrink=1, basis=0 (when value > 0).
Note that the implied shrink: 1 follows CSS, not Yoga: Yoga's
default flexShrink is 0, and setFlex(N) in Yoga also leaves
shrink at 0. Pilates intentionally tracks CSS here so consumers
who think in CSS terms get the result they expect; consumers
porting from Ink (which wraps Yoga) should call setFlexShrink(0)
after setFlex if they need the Yoga behaviour.
Pass undefined to remove an upper bound.
Pass undefined to remove an upper bound.
Pass undefined to leave that edge unconstrained.
StaticcreateConstruct via Node.create() to mirror Yoga's factory style.
Pre-rounding (float) left/top position of this node within its parent, as computed by the flex algorithm BEFORE
roundLayoutconverts positions to integers.Written by the position-write helpers in
algorithm/main-axis.tsat the same time as_layout.left/top. AfterroundLayoutruns,_layout.left/topbecome integers but_floatLeft/Topretain the float values. These are captured bysnapshotForCacheand restored byrestoreFromCacheso thatroundLayoutSubtreecan compute the correct absolute float coordinate for a re-laid-out boundary node's children.Initialized to 0 (same as
_layout.left/top).