Versions in this module Expand all Collapse all v0 v0.0.7 Dec 3, 2026 Changes in this version + const InfiniteBlockSize + func AbsoluteBounds(root *Fragment, target Node) (geometry.Rect, bool) + func ClampHeight(node Node, height int, parentSpace ConstraintSpace) int + func ClampWidth(node Node, width int, parentSpace ConstraintSpace) int + func InfiniteRect() geometry.Rect + func IntrinsicBlockSize(ctx *Context, node Node, availableWidth int) int + func IsInlineLevel(node Node) bool + func MaxScroll(frag *Fragment) (x, y int) + func ReleaseFlexLineBuilder(b *FlexLineBuilder) + func ReleaseGridBuilder(b *GridBuilder) + func ReleaseInlineItemsBuilder(b *InlineItemsBuilder) + func ReleaseLineBreaker(l *LineBreaker) + func ReleaseTableFragmentBuilder(b *TableFragmentBuilder) + func ResolveTrackSizes(templates []style.GridTrackSize, available int, gap int) []int + func ScrolledAbsoluteBounds(root *Fragment, target Node) (rect geometry.Rect, clip geometry.Rect, found bool) + func ScrolledAbsoluteBoundsPath(root *Fragment, target Node, path []Node) (rect geometry.Rect, clip geometry.Rect, found bool) + func ShouldReserveScrollbar(s *style.Computed) (x, y bool) + type Algorithm interface + ComputeMinMaxSizes func(ctx *Context, node Node) MinMaxSizes + Layout func(ctx *Context, node Node, space ConstraintSpace) *Fragment + func GetAlgorithm(node Node) Algorithm + func NewAlgorithm(node Node, space ConstraintSpace) Algorithm + type AnonymousBlock struct + func (a *AnonymousBlock) CachedBlockSize(width int) (int, bool) + func (a *AnonymousBlock) CachedLayout(space ConstraintSpace) *Fragment + func (a *AnonymousBlock) CachedMinMaxSizes() (MinMaxSizes, bool) + func (a *AnonymousBlock) ClearDirtyLayout() + func (a *AnonymousBlock) ComputeMinMaxSizes(ctx *Context) MinMaxSizes + func (a *AnonymousBlock) FirstLayoutChild() Node + func (a *AnonymousBlock) Fragment() *Fragment + func (a *AnonymousBlock) HasChildNeedsPaint() bool + func (a *AnonymousBlock) IsAnonymous() bool + func (a *AnonymousBlock) IsDirtyLayout() bool + func (a *AnonymousBlock) IsDirtyPaint() bool + func (a *AnonymousBlock) Layout(ctx *Context) *Fragment + func (a *AnonymousBlock) LogicalNode() dom.Node + func (a *AnonymousBlock) NextLayoutSibling(child Node) Node + func (a *AnonymousBlock) SetCachedBlockSize(width, height int) + func (a *AnonymousBlock) SetCachedLayout(space ConstraintSpace, frag *Fragment) + func (a *AnonymousBlock) SetCachedMinMaxSizes(sizes MinMaxSizes) + func (a *AnonymousBlock) SetOffset(p geometry.Point) + func (a *AnonymousBlock) Style() *style.Computed + type BlockAlgorithm struct + func (a *BlockAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *BlockAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type BoxFragmentBuilder struct + func AcquireBoxFragmentBuilder(node Node, space ConstraintSpace) *BoxFragmentBuilder + func NewBoxFragmentBuilder(node Node, space ConstraintSpace) *BoxFragmentBuilder + func (b *BoxFragmentBuilder) AddChild(frag *Fragment, offset geometry.Point) + func (b *BoxFragmentBuilder) AdvanceBlockOffset(delta int) + func (b *BoxFragmentBuilder) CurrentBlockOffset() int + func (b *BoxFragmentBuilder) SetBlockOffset(offset int) + func (b *BoxFragmentBuilder) SetBlockSize(height int) + func (b *BoxFragmentBuilder) SetBreakToken(token *BreakToken) + func (b *BoxFragmentBuilder) SetHasScrollbarX(v bool) + func (b *BoxFragmentBuilder) SetHasScrollbarY(v bool) + func (b *BoxFragmentBuilder) SetInlineSize(width int) + func (b *BoxFragmentBuilder) ToFragment() *Fragment + type BreakToken struct + ChildIndex int + InlineToken any + Node Node + type ConstraintSpace struct + AvailableSize geometry.Size + BreakToken *BreakToken + ContainerSpace geometry.Size + ContainingSpace geometry.Size + IsFixedBlockSize bool + IsFixedInlineSize bool + func BuildChildSpace(child Node, containerSpace geometry.Size, containingSpace geometry.Size, ...) ConstraintSpace + type ConstraintSpaceBuilder struct + func NewConstraintSpaceBuilder(availableSize geometry.Size) *ConstraintSpaceBuilder + func (b *ConstraintSpaceBuilder) SetContainerSpace(size geometry.Size) *ConstraintSpaceBuilder + func (b *ConstraintSpaceBuilder) SetContainingSpace(size geometry.Size) *ConstraintSpaceBuilder + func (b *ConstraintSpaceBuilder) SetIsFixedBlockSize(fixed bool) *ConstraintSpaceBuilder + func (b *ConstraintSpaceBuilder) SetIsFixedInlineSize(fixed bool) *ConstraintSpaceBuilder + func (b *ConstraintSpaceBuilder) ToConstraintSpace() ConstraintSpace + type Constraints struct + Max geometry.Size + Min geometry.Size + type Context struct + InlineBuffer []Node + Tracer *trace.Tracer + func (c *Context) Begin(name string) func() + type FlexAlgorithm struct + func (a *FlexAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *FlexAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type FlexItem struct + AlignSelf style.Align + BaseSize int + CrossSize int + Fragment *Fragment + Frozen bool + Grow int + HypotheticalMainSize int + MainSize int + MaxMainSize int + MinMainSize int + Node Node + Offset geometry.Point + Order int + Shrink int + type FlexLine struct + CrossSize int + Items []*FlexItem + MainSize int + type FlexLineBuilder struct + func AcquireFlexLineBuilder(geom flexGeometry, mainGap, crossGap int) *FlexLineBuilder + func NewFlexLineBuilder(geom flexGeometry, mainGap, crossGap int) *FlexLineBuilder + func (b *FlexLineBuilder) AddItem(node Node, baseSize, minSize, maxSize, grow, shrink, order int) + func (b *FlexLineBuilder) AlignCrossAxis(containerCrossSize int, alignContent style.Align, alignItems style.Align) + func (b *FlexLineBuilder) AlignLine(lineIndex int, containerMainSize int, justifyContent style.Justify, ...) + func (b *FlexLineBuilder) ComputeLines(availableMainSize int, wrap bool) + func (b *FlexLineBuilder) Lines() []*FlexLine + func (b *FlexLineBuilder) ResolveFlexibleLengths(lineIndex int, availableMain int) + func (b *FlexLineBuilder) ReverseItems() + func (b *FlexLineBuilder) SortItems() + type Fragment struct + BreakToken *BreakToken + Children []FragmentLink + HasScrollbarX bool + HasScrollbarY bool + Node Node + ParentNode Node + Size geometry.Size + Text []text.Cluster + func (frag *Fragment) ChildViewport(origin geometry.Point, currentClip geometry.Rect) (geometry.Point, geometry.Rect) + type FragmentLink struct + Fragment *Fragment + Offset geometry.Point + type GridAlgorithm struct + func (a *GridAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *GridAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type GridBuilder struct + func AcquireGridBuilder(node Node, space ConstraintSpace) *GridBuilder + func NewGridBuilder(node Node, space ConstraintSpace) *GridBuilder + func (b *GridBuilder) Init(node Node, space ConstraintSpace) + func (b *GridBuilder) PlaceItems() + type InlineItem struct + Node Node + ParentNode Node + Text []text.Cluster + Type InlineItemType + type InlineItemType uint8 + const InlineAtomic + const InlineBr + const InlineBrPlaceholder + const InlineCloseTag + const InlineOpenTag + const InlineText + type InlineItemsBuilder struct + func AcquireInlineItemsBuilder(shaper *text.Shaper, block Node) *InlineItemsBuilder + func NewInlineItemsBuilder(shaper *text.Shaper, block Node) *InlineItemsBuilder + func (b *InlineItemsBuilder) Build(root Node) []InlineItem + func (b *InlineItemsBuilder) Reset() + type InlineLever interface + IsInlineLevel func() bool + type LineBox struct + Children []FragmentLink + Size geometry.Size + func (lb *LineBox) ToFragment() *Fragment + type LineBreaker struct + func AcquireLineBreaker(items []InlineItem, width int, textAlign style.TextAlign, ...) *LineBreaker + func (l *LineBreaker) NextLine(ctx *Context) (*LineBox, bool) + type ListAlgorithm struct + func (a *ListAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *ListAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type MeasureResult struct + Size geometry.Size + type MinMaxSizes struct + Max int + Min int + func ComputeInlineMinMaxSizes(ctx *Context, items []InlineItem) MinMaxSizes + func IntrinsicMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (m *MinMaxSizes) Encompass(other MinMaxSizes) + func (m *MinMaxSizes) EncompassSize(value int) + func (m MinMaxSizes) Add(value int) MinMaxSizes + func (m MinMaxSizes) Constrain(value int) MinMaxSizes + func (m MinMaxSizes) Subtract(value int) MinMaxSizes + type Node interface + CachedBlockSize func(width int) (int, bool) + CachedLayout func(space ConstraintSpace) *Fragment + CachedMinMaxSizes func() (MinMaxSizes, bool) + ClearDirtyLayout func() + FirstLayoutChild func() Node + Fragment func() *Fragment + HasChildNeedsPaint func() bool + IsAnonymous func() bool + IsDirtyLayout func() bool + IsDirtyPaint func() bool + LogicalNode func() dom.Node + NextLayoutSibling func(child Node) Node + SetCachedBlockSize func(width, height int) + SetCachedLayout func(space ConstraintSpace, frag *Fragment) + SetCachedMinMaxSizes func(sizes MinMaxSizes) + SetOffset func(geom.Point) + Style func() *style.Computed + type NoneAlgorithm struct + func (a *NoneAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *NoneAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type OverlayAlgorithm struct + func (a *OverlayAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *OverlayAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type OverlayLever interface + Anchor func() dom.Node + Flip func() bool + Placement func() geom.Placement + type ResolvedDecorations struct + HasScrollbarX bool + HasScrollbarY bool + Insets style.EdgeValues[int] + func ResolveDecorations(node Node, scrollX, scrollY bool) ResolvedDecorations + func (d ResolvedDecorations) ViewportSize(outer geometry.Size) geometry.Size + type ShapedTextCache interface + CachedClusters func() []text.Cluster + CachedText func() string + SetCachedClusters func(text string, clusters []text.Cluster) + type TableAlgorithm struct + func (a *TableAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *TableAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + type TableCellLever interface + ColSpan func() int + RowSpan func() int + type TableFragmentBuilder struct + func AcquireTableFragmentBuilder(node Node, space ConstraintSpace) *TableFragmentBuilder + func NewTableFragmentBuilder(node Node, space ConstraintSpace) *TableFragmentBuilder + func (b *TableFragmentBuilder) AddBodyChild(node Node) + func (b *TableFragmentBuilder) AddFooterChild(node Node) + func (b *TableFragmentBuilder) AddHeaderChild(node Node) + func (b *TableFragmentBuilder) AddNonRowChild(node Node) + func (b *TableFragmentBuilder) AddRowChild(node Node) + func (b *TableFragmentBuilder) AdjustRowOffset(hasTopBorder, hasBottomBorder bool) int + func (b *TableFragmentBuilder) AdvanceBlockOffset(amount int) + func (b *TableFragmentBuilder) BuildGrid(ctx *Context) + func (b *TableFragmentBuilder) CurrentBlockOffset() int + func (b *TableFragmentBuilder) DistributeSpan(ctx *Context, cell Node, colIndex int, colSpan int) + func (b *TableFragmentBuilder) ResolveWidths(resolvedInlineSize int, parentDecorX int) + func (b *TableFragmentBuilder) Sections() []Node + func (b *TableFragmentBuilder) SetBlockSize(size int) + func (b *TableFragmentBuilder) ToFragment() *Fragment + type TableRowAlgorithm struct + func (a *TableRowAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *TableRowAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + func (a *TableRowAlgorithm) LayoutWithData(ctx *Context, node Node, space ConstraintSpace, ...) *Fragment + type TableSectionAlgorithm struct + func (a *TableSectionAlgorithm) ComputeMinMaxSizes(ctx *Context, node Node) MinMaxSizes + func (a *TableSectionAlgorithm) Layout(ctx *Context, node Node, space ConstraintSpace) *Fragment + func (a *TableSectionAlgorithm) LayoutWithData(ctx *Context, node Node, space ConstraintSpace, ...) *Fragment v0.0.6 Nov 6, 2026 v0.0.5 Sep 3, 2026 v0.0.4 Jul 19, 2026 v0.0.3 Jul 9, 2026 v0.0.2 Jul 1, 2026 v0.0.1 Jun 1, 2026