← All packages

API reference

@searsuite/sear-render-node

Retained scene nodes, rich-text render registries, and spatial indexing.

59 exportsderived from source

classAffixNodesource ↗
class AffixNode<T> extends FixBoxNode<T>

Sticky box node used for row/column headers and other affixed sheet regions.

constructorconstructor
AffixNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): AffixNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
propertysticky
sticky: boolean

Affix nodes render in the sticky strategy instead of the scrolled content layer.

Inherited members 42

Inherited from FixBoxNode.

classAffixTextNodesource ↗
class AffixTextNode<T> extends TextNode<T>

Sticky text node used inside affixed header cells.

constructorconstructor
AffixTextNode<T>(value: string | RichDocNode, positionRect: PositionRectProps | undefined, properties: Partial<T>, runtime?: Container): AffixTextNode<T>

Constructs a text node and measures its width against the active render context.

value: string | RichDocNode

Text or rich-text value to render.

positionRect: PositionRectProps | undefined

Initial node bounds.

properties: Partial<T>

Render properties inherited from the parent cell.

runtime: Container
propertysticky
sticky: boolean

Affix text renders in the sticky strategy together with its parent.

Inherited members 43

Inherited from TextNode.

classBlockManagersource ↗
class BlockManager extends RichTextBlockLayoutProvider

Measures rich-document blocks and produces wrapped rich-text layout lines.

constructorconstructor
BlockManager(textShaper: TextShaper, inlineStyleRegistry: RichTextInlineStyleRegistry, runRenderRegistry: RichTextRunRenderRegistry, lineBoxRegistry: RichTextLineBoxRegistry, baseFont?: string, paragraphLayoutDefaults?: RichTextParagraphLayoutDefaults): BlockManager

Creates a block manager from the text-shaping and rich-text services.

textShaper: TextShaper
inlineStyleRegistry: RichTextInlineStyleRegistry
runRenderRegistry: RichTextRunRenderRegistry
lineBoxRegistry: RichTextLineBoxRegistry
baseFont: string
paragraphLayoutDefaults: RichTextParagraphLayoutDefaults
propertymaxWidth
maxWidth: number

Maximum measured unwrapped block width.

propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving the rich-document block manager.

methodadd
add(node: RichDocNode): void

Adds a rich document block and records its measured size.

node: RichDocNode
methodcalculateLayout
calculateLayout(width: number): RichTextLine[]

Calculates a flattened list of wrapped rich-text lines for all blocks.

width: number
methodcalculateLayoutPerParagraph
calculateLayoutPerParagraph(width: number): RichTextLine[][]

Calculates wrapped rich-text lines per paragraph while preserving paragraph mapping.

width: number
methodclear
clear(): void

Clears all measured blocks and cached size information.

methodcreateDetached
createDetached(): BlockManager

Creates an unshared measurement workspace for a read-only layout request.

methodenforceCommandBoundary
enforceCommandBoundary(isCommandExecuting: (): boolean): void

Closes direct block writes after the owning editor has assembled.

isCommandExecuting: (): boolean
methodsetBaseFont
setBaseFont(font: string): void

Selects the transient base font used for the next layout pass.

font: string
classBoxNodesource ↗
class BoxNode<T> extends LayoutNode<T>

The BoxNode class represents a block-level node in a scene graph. It behaves similarly to an HTML element with position: relative, where its position is determined relative to its parent or siblings.

constructorconstructor
BoxNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): BoxNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
methodclear
clear(context: RenderContext): void

Clears state owned by BoxNode.

context: RenderContext
methoddrawHit
drawHit(context: RenderContext): void

Draws the hit area for this node and all its descendants. This is typically used for hit testing (e.g., detecting mouse clicks).

context: RenderContext

The rendering context used to draw the hit area.

methoddrawScene
drawScene(context: RenderContext): void

Draws the scene for this node and all its descendants. This method recursively calls drawScene on all child nodes.

context: RenderContext

The rendering context used to draw the scene.

Inherited members 40

Inherited from LayoutNode.

classBVHsource ↗
class BVH<T> extends Tree<T>

Simple bounding-volume hierarchy spatial index implementation.

constructorconstructor
BVH<T>(): BVH<T>

Constructs a BVH with a broad default world boundary.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts one item into the root child list.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items whose rectangles intersect the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes one item by object identity.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the tree boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classCellVisualLayerNodesource ↗
class CellVisualLayerNode<T> extends RenderNode<T>

Draws a feature-contributed visual between a cell background and its content.

constructorconstructor
CellVisualLayerNode<T>(rect: PositionRectProps, properties: Partial<T>, layer: CellVisualLayer): CellVisualLayerNode<T>
rect: PositionRectProps
properties: Partial<T>
layer: CellVisualLayer
methodclear
clear(context: RenderContext): void

Clears state owned by Node.

context: RenderContext
methoddrawHit
drawHit(): void

Abstract method to draw the node's hit detection representation. Must be implemented by subclasses.

methoddrawScene
drawScene(context: RenderContext): void

Abstract method to draw the node's scene representation. Must be implemented by subclasses.

context: RenderContext

The rendering context.

Inherited members 40

Inherited from RenderNode.

classContainersource ↗
class Container extends EventListener<string>

Scene node that owns, queries, and serializes an ordered child collection.

constructorconstructor
Container(): Container

Creates a Container instance.

propertyrandomColorKey
readonly randomColorKey: templateLiteral | null

Unique random color key for hit detection.

memberchildren
children: unknown
methodadd
add(child: Container): this add(children: Container[]): this

Adds the value.

child: Container
children: Container[]
methoddescendants
descendants(): never[]

Iterates every descendant in scene order.

methodquery
query(): void

Returns descendants whose boundaries intersect the supplied rectangle.

methodremove
remove(): void

Removes the value.

methodtoJSON
toJSON(): { }

Serializes this scene structure into diagnostic JSON.

methodupdateBoundary
updateBoundary(): void

Updates the indexed boundary after geometry changes.

Inherited members 4

Inherited from EventListener.

classDashedLineNodesource ↗
class DashedLineNode<T> extends RenderNode<T>

Scene node that renders one dashed line segment.

constructorconstructor
DashedLineNode<T>(positionRect: PositionRectProps, props: Partial<T>, line: { x1: number; x2: number; y1: number; y2: number }): DashedLineNode<T>

Constructs a dashed line node.

positionRect: PositionRectProps

Dirty/hit bounds covering the line.

props: Partial<T>

Render properties including stroke and dash pattern.

line: { x1: number; x2: number; y1: number; y2: number }

Exact line segment coordinates.

methodclear
clear(context: RenderContext): void

Clears the line bounds with stroke padding.

context: RenderContext

Render context to clear.

methoddrawHit
drawHit(): void

Dashed lines are visual-only and do not participate in hit testing.

methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws the dashed line into the render context.

context: RenderContext

Render context receiving draw commands.

clipRegion: ClipRegion
Inherited members 40

Inherited from RenderNode.

classDirtyTreesource ↗
class DirtyTree

DI token placeholder for the dirty-region spatial index.

constructorconstructor
DirtyTree(): DirtyTree
propertysymbolstatic
readonly symbol: symbol

DI token used to resolve the dirty tree implementation.

classEventListenersource ↗
class EventListener<CustomEventTypes>

Represents an event listener system that allows adding, removing, and managing event handlers. Supports default event types and allows extension with custom event types.

constructorconstructor
EventListener<CustomEventTypes>(): EventListener<CustomEventTypes>
methodemit
emit(eventString: CustomEventTypes, ...args: unknown[]): boolean

Triggers an event, calling all associated handlers in registration order.

Propagation control: If any handler synchronously returns false, dispatch to subsequent handlers stops. Returning true / undefined / void means dispatch continues.

This enables ordered plugin suppression for the same event (for example, a cell editor can block a selection plugin on dblClick) without direct plugin-to-plugin state mutation.

Returnsfalse if a handler actively stopped propagation; otherwise true.

eventString: CustomEventTypes

The name of the event to trigger.

args: unknown[]

Arguments to pass to the event handlers.

methodenforceWriteBoundary
enforceWriteBoundary(assertWrite: (): void, teardownToken: object): void

Closes registration changes after an owning runtime has assembled.

assertWrite: (): void
teardownToken: object
methodoff
off(eventString?: CustomEventTypes, handler?: Function): void

Removes event handlers for a specific event or all events.

eventString: CustomEventTypes

The name of the event to remove handlers for. If not provided, all event handlers are removed.

handler: Function
methodon
on(eventString: CustomEventTypes, handler: Function): EventListener<CustomEventTypes>

Registers an event handler for a specific event.

ReturnsThe current instance to allow method chaining.

eventString: CustomEventTypes

The name of the event to listen for.

handler: Function

The function to be called when the event is triggered.

classFixBoxNodesource ↗
class FixBoxNode<T> extends RenderNode<T>

Scene node that renders a rectangular box with optional fill, stroke, and clipping.

constructorconstructor
FixBoxNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): FixBoxNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
methodclear
clear(context: RenderContext): void

Clears this node's bounds from a raster context using stroke padding.

context: RenderContext

Render context to clear.

methoddrawHit
drawHit(context: RenderContext): void

Draws the node into the hit-test context unless the node is visual-only.

context: RenderContext

Hit render context.

methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws the box into the visible render context.

context: RenderContext

Render context receiving draw commands.

clipRegion: ClipRegion

Optional rectangle or polygon clipping region.

Inherited members 40

Inherited from RenderNode.

classGenerationalDirtyTrackersource ↗
class GenerationalDirtyTracker

Frame-scoped dirty-region tracker.

A scene mutation may replace several plugins before the render pass starts. Every affected region must therefore remain recorded until DirtyRenderStrategy has consumed the frame. In particular, node replacement must never clear regions recorded by an earlier replacement in that frame.

The class name is retained for DI/API compatibility; its behaviour is no longer generation-based.

constructorconstructor
GenerationalDirtyTracker(tree: Tree<PositionRect<templateLiteral>>): GenerationalDirtyTracker

Creates a GenerationalDirtyTracker instance.

tree: Tree<PositionRect<templateLiteral>>
propertysymbolstatic
readonly symbol: symbol

DI token for resolving GenerationalDirtyTracker.

methodclear
clear(): void

Frame-end full cleanup (called by DirtyRenderStrategy.render()). All items are removed regardless of generation.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the boundary.

methodmark
mark(rect: PositionRect<templateLiteral>): void

Records a region until the current dirty render pass finishes.

rect: PositionRect<templateLiteral>
methodquery
query(range: PositionRect<templateLiteral>): PositionRect<templateLiteral>[]

Returns dirty nodes for the requested render generation.

range: PositionRect<templateLiteral>
classHilbertRTreesource ↗
class HilbertRTree<T> extends Tree<T>

Hilbert-sorted R-tree style spatial index for rectangular data.

constructorconstructor
HilbertRTree<T>(boundary: PositionRect<templateLiteral>, maxChildren?: number): HilbertRTree<T>

Constructs a Hilbert R-tree.

boundary: PositionRect<templateLiteral>

Root spatial boundary.

maxChildren: number

Maximum children retained by the shared tree contract.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts one item and maintains Hilbert ordering.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items whose rectangles intersect the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes an item by matching rectangle bounds.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classHitColorRegistrysource ↗
class HitColorRegistry

Maps hit-canvas color keys back to render nodes.

constructorconstructor
HitColorRegistry(): HitColorRegistry
propertysymbolstatic
readonly symbol: symbol

DI token for resolving the hit-color registry.

methodclear
clear(): void

Clears all registered hit-color mappings.

methoddelete
delete(key: templateLiteral): void

Removes a hit-canvas color key mapping.

key: templateLiteral
methodget
get<T>(key: templateLiteral): Node<T> | undefined

Resolves the node currently associated with a hit-canvas color key.

key: templateLiteral
methodregister
register<T>(key: templateLiteral, node: Node<T>): void

Registers a node for hit-canvas color lookup.

key: templateLiteral
node: Node<T>
classKDTreesource ↗
class KDTree<T> extends Tree<T>

KD-tree spatial index for rectangular scene data.

constructorconstructor
KDTree<T>(boundary?: PositionRect<templateLiteral>, capacity?: number): KDTree<T>

Constructs a KD-tree.

boundary: PositionRect<templateLiteral>

Root spatial boundary.

capacity: number

Retained for the shared Tree contract.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts an item by alternating x/y split axes.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items whose rectangles intersect the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes one item by object identity and rebuilds the experimental tree.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classLayoutNodesource ↗
class LayoutNode<T> extends Node<T>

Abstract class for layout nodes. Extend this for nodes that manage layout.

constructorconstructor
LayoutNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): LayoutNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
Inherited members 43

Inherited from Node.

classNodesource ↗
class Node<T> extends EventListener<string>

Abstract base class for all nodes in the render tree. Handles geometry, appearance, event management, and hierarchical relationships.

constructorconstructor
Node<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): Node<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
propertychildKeys
readonly childKeys: string[]

Keys of direct child nodes registered via add(), used for recursive cleanup.

propertydepth
depth: number

Render and event ordering depth for Node.

propertyname
name: string

Name of the node, defaults to the class name.

propertynodeKey
readonly nodeKey: string

Stable key used by SceneGraph, DataStorage and spatial indexes.

propertyparentKey
parentKey: string | null

Parent node's stable render key, used for tree relationships.

propertypositionRect
readonly positionRect: PositionRect<string>

Rectangle representing the node's position and size.

propertyproperties
properties: Partial<T>

Visual and geometric properties of the node.

propertyrandomColorKey
readonly randomColorKey: templateLiteral | null

Unique random color key used for hit detection.

propertysticky
sticky: boolean

Whether this node remains fixed while its scroll container moves.

memberbottom
bottom: unknown
memberconfigEngine
configEngine: unknown
memberfill
fill: unknown
memberheight
height: unknown
memberhorizontalAlign
horizontalAlign: unknown
memberleft
left: unknown
memberlineDash
lineDash: unknown
memberright
right: unknown
memberstroke
stroke: unknown
memberstrokeWidth
strokeWidth: unknown
membertop
top: unknown
memberverticalAlign
verticalAlign: unknown
memberwidth
width: unknown
memberx
x: unknown
membery
y: unknown
methodadd
add(child: Node<T>): Node<T> add(children: Node<T>[]): Node<T>

Implements the single-node and multiple-node add overloads.

ReturnsThe current node (for chaining).

child: Node<T>

The child node to add.

children: Node<T>[]
methodaddEventListener
addEventListener(type: string, handler: Function): void

Adds an event listener for the specified event type.

type: string

The event type to listen for.

handler: Function

The function to handle the event.

methodbindRuntime
bindRuntime(container: Container): void

Binds this node tree to the editor-local services owned by one SceneGraph.

container: Container
methodclear
clear(context: RenderContext): void

Clears state owned by Node.

context: RenderContext
methoddispose
dispose(): void

Disposes this node and all of its descendants recursively. Removes nodes from DataStorage and positionRectStorage, and releases their hit color keys.

methoddraw
draw(sceneContext: RenderContext, hitContext: RenderContext): void

Draws the node in both the scene and hit detection contexts.

sceneContext: RenderContext

The context for scene rendering.

hitContext: RenderContext

The context for hit detection rendering.

methoddrawHit
drawHit(context: RenderContext): void

Abstract method to draw the node's hit detection representation. Must be implemented by subclasses.

context: RenderContext

The rendering context.

methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Abstract method to draw the node's scene representation. Must be implemented by subclasses.

context: RenderContext

The rendering context.

clipRegion: ClipRegion

Optional clipping region: a PositionRect for axis-aligned rectangular clip, or a Point[] polygon (array of [x, y] vertices) for arbitrary shape clip.

methodgetNodeByNodeKey
getNodeByNodeKey(key: string): Node<T> | null

Finds a node by its stable render-node key.

ReturnsThe node if found, otherwise null.

key: string

The stable render node key.

methodgetNodeByRandomColorKey
getNodeByRandomColorKey(key: templateLiteral): Node<T> | null

Finds a node by its random color key.

ReturnsThe node if found, otherwise null.

key: templateLiteral

The random color key to search for.

methodquery
query(range: PositionRect<templateLiteral>): Node<T>[]

Queries all nodes within a given rectangular range.

ReturnsAn array of nodes found within the range.

range: PositionRect<templateLiteral>

The rectangle to query.

methodremoveChild
removeChild(child: Node<T>): void

Removes a child node from this node and disposes its entire subtree.

child: Node<T>
methodremoveEventListener
removeEventListener(type: string): void

Removes an event listener for the specified event type.

type: string

The event type to remove.

methodsetStickyTree
setStickyTree(sticky: boolean, affix?: Pick<NodeProperties, "top" | "left">): this

Marks this node tree as sticky and applies the supplied affix axes to every descendant.

sticky: boolean
affix: Pick<NodeProperties, "top" | "left">
methodtoJSON
toJSON(): { }

Converts the node and its properties to a JSON object. Can be extended to recursively serialize children.

Inherited members 4

Inherited from EventListener.

classOctreesource ↗
class Octree<T> extends Tree<T>

Simple Octree-shaped spatial index for rectangular scene data.

constructorconstructor
Octree<T>(): Octree<T>

Constructs an Octree with a broad default world boundary.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts one item into the root child list.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items whose rectangles intersect the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes one item by object identity.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classQuadTreesource ↗
class QuadTree extends Tree<PositionRect<HexColor>>

QuadTree spatial index used by scene and dirty-region lookups.

constructorconstructor
QuadTree(boundary: PositionRect<templateLiteral>, capacity: number): QuadTree

Constructs a QuadTree node.

boundary: PositionRect<templateLiteral>

Node boundary.

capacity: number

Maximum items before subdivision.

propertybottomleft
bottomleft: QuadTree | null

Bottom-left child node.

propertybottomright
bottomright: QuadTree | null

Bottom-right child node.

propertydivided
divided: boolean

Whether this node has been subdivided into children.

propertyrects
rects: PositionRect<templateLiteral>[]

Rectangles stored directly in this node.

propertytopleft
topleft: QuadTree | null

Top-left child node.

propertytopright
topright: QuadTree | null

Top-right child node.

methodclear
clear(): void

Clears all indexed rectangles and child quadrants.

methodcontains
contains(boundary: PositionRect<templateLiteral>, rect: PositionRect<templateLiteral>): boolean

Returns whether boundary fully contains rect.

boundary: PositionRect<templateLiteral>
rect: PositionRect<templateLiteral>
methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the root boundary for this tree node.

methodinsert
insert(data: PositionRect<templateLiteral>): boolean

Inserts a rectangle into the tree.

ReturnsTrue when data intersects this tree boundary.

data: PositionRect<templateLiteral>

Rectangle to index.

methodintersects
intersects(a: PositionRect<templateLiteral>, b: PositionRect<templateLiteral>): boolean

Returns whether two rectangles overlap.

a: PositionRect<templateLiteral>
b: PositionRect<templateLiteral>
methodquery
query(range: PositionRect<templateLiteral>, found?: PositionRect<templateLiteral>[]): PositionRect<templateLiteral>[]

Queries rectangles intersecting a range.

ReturnsMatching rectangles.

range: PositionRect<templateLiteral>

Search rectangle.

found: PositionRect<templateLiteral>[]

Accumulator used during recursion.

methodremove
remove(data: PositionRect<templateLiteral>, predicate?: (rect: PositionRect<templateLiteral>): boolean): boolean

Removes matching rectangle entries.

ReturnsTrue when an entry was removed.

data: PositionRect<templateLiteral>

Rectangle coordinates to remove.

predicate: (rect: PositionRect<templateLiteral>): boolean

Optional predicate for entries with matching bounds.

methodsubdivide
subdivide(): void

Splits this node into four child quadrants and redistributes contained items.

methodtoJSON
toJSON(): object

Serializes debug data for this tree.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and reinserts existing rectangles.

boundary: PositionRect<templateLiteral>

New root boundary.

Inherited members 3

Inherited from Tree.

classQuadTreeFactorysource ↗
class QuadTreeFactory<T> extends TreeFactory<PositionRect<HexColor>>

Factory that creates QuadTree spatial indexes for rectangular scene data.

constructorconstructor
QuadTreeFactory<T>(): QuadTreeFactory<T>
methodcreate
create(boundary: PositionRect<templateLiteral>, capacity: number): QuadTree

Creates a QuadTree.

boundary: PositionRect<templateLiteral>

Root spatial boundary.

capacity: number

Maximum items in a leaf before subdivision.

classRenderNodesource ↗
class RenderNode<T> extends Node<T>

Abstract class for render nodes. Extend this for nodes that manage rendering.

constructorconstructor
RenderNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): RenderNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
Inherited members 43

Inherited from Node.

classRichTextCaretNodesource ↗
class RichTextCaretNode extends RichTextVisualNode

Scene node that draws a rich-text caret.

constructorconstructor
RichTextCaretNode(input: { caret: { height: number; pixelOffset?: number; visible: boolean; x: number; y: number }; depth?: number; nodeKey: string; rect: PositionRectProps; scroll?: { x: number; y: number }; viewportOverlay?: boolean }): RichTextCaretNode

Creates a caret overlay node.

input: { caret: { height: number; pixelOffset?: number; visible: boolean; x: number; y: number }; depth?: number; nodeKey: string; rect: PositionRectProps; scroll?: { x: number; y: number }; viewportOverlay?: boolean }
methoddrawScene
drawScene(context: RenderContext): void

Draws the caret when the blink state says it is visible.

context: RenderContext
Inherited members 42

Inherited from RichTextVisualNode.

classRichTextCompositionNodesource ↗
class RichTextCompositionNode extends RichTextVisualNode

Scene node that draws active IME composing text and underline.

constructorconstructor
RichTextCompositionNode(input: { anchor: { height: number; x: number; y: number }; depth?: number; nodeKey: string; rect: PositionRectProps; scroll?: { x: number; y: number }; text: string; viewportOverlay?: boolean }): RichTextCompositionNode

Creates an IME composition overlay node.

input: { anchor: { height: number; x: number; y: number }; depth?: number; nodeKey: string; rect: PositionRectProps; scroll?: { x: number; y: number }; text: string; viewportOverlay?: boolean }
methoddrawScene
drawScene(context: RenderContext): void

Draws composing text in world or viewport coordinates.

context: RenderContext
Inherited members 42

Inherited from RichTextVisualNode.

classRichTextContentNodesource ↗
class RichTextContentNode extends RichTextVisualNode

Scene node that draws laid-out rich-text lines in world coordinates.

constructorconstructor
RichTextContentNode(input: { blockIndexes?: readonly number[]; depth?: number; font?: string; lineRenderer: RichTextLineRenderer; lines: readonly RichTextRenderLine[]; nodeKey: string; origin: Pick<PositionRectProps, "x" | "y">; rect: PositionRectProps }): RichTextContentNode

Creates a rich-text content node from pre-computed layout lines.

input: { blockIndexes?: readonly number[]; depth?: number; font?: string; lineRenderer: RichTextLineRenderer; lines: readonly RichTextRenderLine[]; nodeKey: string; origin: Pick<PositionRectProps, "x" | "y">; rect: PositionRectProps }
methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws every included layout line inside this node's clip.

context: RenderContext
clipRegion: ClipRegion
Inherited members 42

Inherited from RichTextVisualNode.

classRichTextLineRenderersource ↗
class RichTextLineRenderer

Paints laid-out rich-text lines by grouping adjacent characters into runs.

constructorconstructor
RichTextLineRenderer(inlineStyles: RichTextInlineStyleRegistry, runRenderer: RichTextRunRenderer): RichTextLineRenderer

Creates a line renderer with domain style comparison and run rendering.

inlineStyles: RichTextInlineStyleRegistry
runRenderer: RichTextRunRenderer
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving the line renderer.

methodpaint
paint(context: RenderContext, input: { font?: string; line: RichTextRenderLine; origin: Pick<PositionRectProps, "x" | "y"> }): void

Paints one laid-out line at the supplied world-space origin.

context: RenderContext
input: { font?: string; line: RichTextRenderLine; origin: Pick<PositionRectProps, "x" | "y"> }
classRichTextRunRenderersource ↗
class RichTextRunRenderer

Paints one contiguous rich-text run using the registered render contributions.

constructorconstructor
RichTextRunRenderer(registry: RichTextRunRenderRegistry): RichTextRunRenderer

Creates a run renderer backed by the render contribution registry.

registry: RichTextRunRenderRegistry
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving the run renderer.

methodpaint
paint(context: RenderContext, input: { baselineY: number; font: string; fontAscent: number; fontDescent: number; height: number; style: Readonly<Record<string, unknown>> | undefined; text: string; width: number; … }): void

Paints one run and restores all renderer state changed by its style plugins.

context: RenderContext
input: { baselineY: number; font: string; fontAscent: number; fontDescent: number; height: number; style: Readonly<Record<string, unknown>> | undefined; text: string; width: number; … }
classRichTextRunRenderRegistrysource ↗
class RichTextRunRenderRegistry

Render-layer registry for plugin-owned rich-text run behavior.

constructorconstructor
RichTextRunRenderRegistry(): RichTextRunRenderRegistry
propertysymbolstatic
readonly symbol: typeof symbol

DI token for resolving the rich-text run render registry.

methodapplyRenderState
applyRenderState(context: RenderContext, style: Readonly<Record<string, unknown>> | undefined): void

Applies all registered render-state contributions before text painting.

context: RenderContext
style: Readonly<Record<string, unknown>> | undefined
methodenforceWriteBoundary
enforceWriteBoundary(assertWrite: (): void): void
assertWrite: (): void
methodpaintRun
paintRun(input: RichTextRunPaintInput): void

Paints all registered plugin-owned run details.

input: RichTextRunPaintInput
methodregister
register(contribution: RichTextRunRenderContribution): (): void

Registers one render contribution.

contribution: RichTextRunRenderContribution
methodresolveFont
resolveFont(font: string, style: Readonly<Record<string, unknown>> | undefined): string

Resolves the final font descriptor after all registered contributions run.

font: string
style: Readonly<Record<string, unknown>> | undefined
classRichTextSelectionNodesource ↗
class RichTextSelectionNode extends RichTextVisualNode

Scene node that draws rich-text selection rectangles.

constructorconstructor
RichTextSelectionNode(input: { depth?: number; nodeKey: string; offset?: { x: number; y: number }; rect: PositionRectProps; rects: readonly RichTextSelectionRect[]; viewportOverlay?: boolean }): RichTextSelectionNode

Creates a selection overlay node.

input: { depth?: number; nodeKey: string; offset?: { x: number; y: number }; rect: PositionRectProps; rects: readonly RichTextSelectionRect[]; viewportOverlay?: boolean }
methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws selection rectangles in world or viewport coordinates.

context: RenderContext
clipRegion: ClipRegion
methodgetSelectionRects
getSelectionRects(): readonly RichTextSelectionRect[]

World-space regions where text should be painted above the highlight.

Inherited members 42

Inherited from RichTextVisualNode.

classRichTextVisualNodesource ↗
class RichTextVisualNode extends Node<RichTextRenderNodeProperties>

Base class for rich-text nodes that only draw pixels and do not own hit state.

methodclear
clear(_context: RenderContext): void

Rich-text visual node pixels are cleared by strategy-owned dirty rectangles.

_context: RenderContext
methoddrawHit
drawHit(_context: RenderContext): void

Rich-text visual nodes are ignored by hit testing unless a subclass opts in.

_context: RenderContext
Inherited members 41

Inherited from Node.

classRTreesource ↗
class RTree<T> extends Tree<T>

Simple R-tree spatial index for rectangular scene data.

constructorconstructor
RTree<T>(): RTree<T>

Constructs an R-tree with a broad default world boundary.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts one item into the root child list.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items whose rectangles intersect the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes one item by object identity.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classSceneGraphsource ↗
class SceneGraph<T> extends Node<T>

Root scene tree that owns top-level render nodes for each plugin.

constructorconstructor
SceneGraph<T>(container: Container): SceneGraph<T>

Creates a scene graph bound to one editor-local DI runtime.

container: Container
propertysymbolstatic
readonly symbol: symbol

DI token for resolving the scene graph.

methodaddPluginNode
addPluginNode(pluginKeyString: string, node: Node<T> | Node<T>[], options?: { markDirty?: boolean }): void

Replaces all scene nodes owned by one plugin.

pluginKeyString: string

Stable plugin key.

node: Node<T> | Node<T>[]

Node or nodes produced by the plugin render method.

options: { markDirty?: boolean }
methodclear
clear(context: RenderContext): void

SceneGraph is cleared through strategy-owned dirty regions.

context: RenderContext
methoddrawHit
drawHit(context: RenderContext): void

SceneGraph is a root container and is not drawn into the hit layer directly.

context: RenderContext
methoddrawScene
drawScene(context: RenderContext): void

SceneGraph is a root container and is not drawn directly.

context: RenderContext
methodmarkRemovePluginNode
markRemovePluginNode(pluginKeyString: string, options?: { markDirty?: boolean }): void

Marks and removes all existing top-level nodes owned by one plugin.

pluginKeyString: string

Stable plugin key.

options: { markDirty?: boolean }
methodreconcilePluginNodes
reconcilePluginNodes(pluginKeyString: string, node: Node<T> | Node<T>[], options?: { markDirty?: boolean; replaceRetainedGeometryChanged?: boolean; replaceRetainedKeys?: ReadonlySet<string>; retainExisting?: boolean; updateRetainedGeometry?: boolean }): void

Reconciles one plugin's top-level nodes by stable node key.

Existing nodes with keys that are still present can be retained, new keys are inserted, and keys no longer returned by the plugin are removed. This is the block-level retained path used by virtualized document rendering.

pluginKeyString: string
node: Node<T> | Node<T>[]
options: { markDirty?: boolean; replaceRetainedGeometryChanged?: boolean; replaceRetainedKeys?: ReadonlySet<string>; retainExisting?: boolean; updateRetainedGeometry?: boolean }
Inherited members 40

Inherited from Node.

classSpatialHashsource ↗
class SpatialHash<T> extends Tree<T>

Spatial hash index that buckets rectangular items by their top-left cell.

constructorconstructor
SpatialHash<T>(cellSize?: number, boundary?: PositionRect<templateLiteral>, capacity?: number): SpatialHash<T>

Constructs a spatial hash index.

cellSize: number

Logical size of one hash bucket.

boundary: PositionRect<templateLiteral>

Root spatial boundary.

capacity: number

Retained for the shared Tree contract.

methodclear
clear(): void

Removes all indexed items.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the current tree boundary.

methodinsert
insert(data: T): boolean

Inserts an item into the bucket containing its top-left corner.

data: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns items in intersecting buckets whose rectangles overlap the query range.

range: PositionRect<templateLiteral>
methodremove
remove(data: T): boolean

Removes one item from its hashed bucket.

data: T
methodtoJSON
toJSON(): object

Serializes debug data for this spatial index.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Replaces the boundary and clears indexed items.

boundary: PositionRect<templateLiteral>
Inherited members 3

Inherited from Tree.

classStickyNodesource ↗
class StickyNode<T> extends BoxNode<T>

Box node specialization reserved for sticky-layer rendering.

constructorconstructor
StickyNode<T>(positionRect?: PositionRectProps, props?: Partial<T>, runtime?: Container): StickyNode<T>

Constructs a new Node<T> instance with specified properties and position. Updates the boundary in the positionRectStorage if necessary.

positionRect: PositionRectProps
props: Partial<T>

Partial properties and position for initialization.

runtime: Container
Inherited members 43

Inherited from BoxNode.

classTextNodesource ↗
class TextNode<T> extends RenderNode<T>

Scene node that renders plain text derived from string or rich-text content.

constructorconstructor
TextNode<T>(value: string | RichDocNode, positionRect: PositionRectProps | undefined, properties: Partial<T>, runtime?: Container): TextNode<T>

Constructs a text node and measures its width against the active render context.

value: string | RichDocNode

Text or rich-text value to render.

positionRect: PositionRectProps | undefined

Initial node bounds.

properties: Partial<T>

Render properties inherited from the parent cell.

runtime: Container
propertydepth
depth: number

Text draws above the box background by default.

propertyvalue
readonly value: string | RichDocNode

Text value rendered by this node.

memberwidth
width: unknown
methodclear
clear(context: RenderContext): void

Text nodes are cleared through their parent box dirty region.

context: RenderContext
methoddrawHit
drawHit(context: RenderContext): void

Text nodes do not draw separate hit regions; the parent box owns hit testing.

context: RenderContext
methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws text inside the parent node using the parent's alignment and padding.

context: RenderContext

Render context receiving text commands.

clipRegion: ClipRegion

Optional clipping region inherited from render strategies.

Inherited members 38

Inherited from RenderNode.

classTreesource ↗
class Tree<T>

Shared spatial-index contract. The item shape is owned by each index.

constructorconstructor
Tree<T>(boundary: PositionRect<templateLiteral>, capacity: number): Tree<T>

Creates a Tree instance.

boundary: PositionRect<templateLiteral>
capacity: number
propertycapacity
readonly capacity: number

The maximum number of entries retained by this spatial node.

propertyparent
parent: Tree<T> | null

The parent spatial node, or null at the root.

propertysymbolstatic
readonly symbol: symbol

DI token for resolving Tree.

methodclear
clear(): void

Clears state owned by Tree.

methodgetBoundary
getBoundary(): PositionRect<templateLiteral>

Returns the boundary.

methodinsert
insert(item: T): boolean

Inserts a bounded entry into the spatial index.

item: T
methodquery
query(range: PositionRect<templateLiteral>): T[]

Returns indexed entries whose boundaries intersect the supplied rectangle.

range: PositionRect<templateLiteral>
methodremove
remove(item: T, predicate?: (rect: PositionRect<templateLiteral>): boolean): boolean

Removes the value.

item: T
predicate: (rect: PositionRect<templateLiteral>): boolean
methodtoJSON
toJSON(): object

Serializes this scene structure into diagnostic JSON.

methodupdateBoundary
updateBoundary(boundary: PositionRect<templateLiteral>): void

Updates the indexed boundary after geometry changes.

boundary: PositionRect<templateLiteral>
interfaceCellVisualLabelsource ↗
interface CellVisualLabel

One text label drawn within a feature-contributed visual layer.

propertycolor
readonly color?: string
propertyfill
readonly fill: string
propertytext
readonly text: string
interfaceCellVisualLayersource ↗
interface CellVisualLayer

A visual rectangle, icon or sequence of labels within its cell bounds.

propertyfill
readonly fill?: string | { end: string; start: string }
propertyheight
readonly height: number
propertyicon
readonly icon?: { color: string; level?: number; shape: CellVisualIconShape; totalLevels?: number }
propertylabels
readonly labels?: readonly CellVisualLabel[]

Ordered labels, clipped to the layer bounds without changing the cell value.

propertyshape
readonly shape?: CellVisualLayerShape
propertyslot
readonly slot: string
propertywidth
readonly width: number
propertyx
readonly x: number
propertyy
readonly y: number
interfaceRichTextRenderCharsource ↗
interface RichTextRenderChar

Minimal rich-text character shape consumed by render nodes.

propertychar
readonly char: string
propertystyle
readonly style?: Readonly<Record<string, unknown>>
propertywidth
readonly width: number
interfaceRichTextRunPaintInputsource ↗
interface RichTextRunPaintInput

Geometry and render state for one contiguous rich-text run.

propertybaselineY
readonly baselineY: number
propertycontext
readonly context: RenderContext
propertyfontAscent
readonly fontAscent: number
propertyfontDescent
readonly fontDescent: number
propertyheight
readonly height: number
propertystyle
readonly style: Readonly<Record<string, unknown>> | undefined
propertytext
readonly text: string
propertywidth
readonly width: number
propertyx
readonly x: number
interfaceRichTextRunRenderContributionsource ↗
interface RichTextRunRenderContribution

Plugin-owned render behavior for one inline text-style concern.

propertykey
readonly key: string

Stable contribution key used for duplicate detection and unregister.

methodapplyRenderState
applyRenderState(input: { context: RenderContext; style: Readonly<Record<string, unknown>> | undefined }): void

Applies renderer state before the text run is painted.

input: { context: RenderContext; style: Readonly<Record<string, unknown>> | undefined }
methodpaintRun
paintRun(input: RichTextRunPaintInput): void

Paints plugin-owned details for an already painted text run.

input: RichTextRunPaintInput
methodresolveFont
resolveFont(input: { font: string; style: Readonly<Record<string, unknown>> | undefined }): string

Resolves the font used by shaping and painting for a styled run.

input: { font: string; style: Readonly<Record<string, unknown>> | undefined }
interfaceRichTextSelectionRectsource ↗
interface RichTextSelectionRect

Rectangle highlighted as part of a rich-text selection.

propertyheight
readonly height: number
propertywidth
readonly width: number
propertyx
readonly x: number
propertyy
readonly y: number
interfaceRichTextVisualNodeInputsource ↗
interface RichTextVisualNodeInput

Shared construction options for visual-only rich-text render nodes.

propertyblockId
readonly blockId?: string
propertyblockIndex
readonly blockIndex?: number
propertydepth
readonly depth: number
propertyisEdit
readonly isEdit?: boolean
propertynodeKey
readonly nodeKey: string
propertyrect
readonly rect: PositionRectProps
propertyrenderRole
readonly renderRole: NonNullable<"block" | "line" | "page" | "text-run" | "selection" | "caret" | "composition" | undefined>
propertysemanticRole
readonly semanticRole: string
typeCellVisualIconShapesource ↗
type CellVisualIconShape = typeof CellVisualIconShape[keyof typeof CellVisualIconShape]
typeCellVisualLayerShapesource ↗
type CellVisualLayerShape = typeof CellVisualLayerShape[keyof typeof CellVisualLayerShape]

Primitive shapes available to feature-contributed cell layers.

typeClipRegionsource ↗
type ClipRegion = PositionRect<HexColor> | Point[]

Clip region passed to drawScene.

  • PositionRect&lt;HexColor&gt; — axis-aligned rectangle clip (common case).
  • Point[] — arbitrary polygon clip; each element is an [x, y] vertex.
typeHitColorKeysource ↗
type HitColorKey = HexColor

Color key used only by hit-canvas rendering and pixel-to-node lookup.

typeNodePropertiessource ↗
type NodeProperties = unknown

Type contract for NodeProperties.

propertybottom
bottom?: number
propertycontentInsetStart
contentInsetStart?: number

Space reserved before projected text for a cell visual.

propertycornerRadius
cornerRadius?: [number, number, number, number]
propertydepth
depth?: number
propertyfill
fill?: string
propertyfitNumberValue
fitNumberValue?: number

Raw General-format number fitted against the actual render width.

propertyhideText
hideText?: boolean

Suppresses projected text while preserving its underlying value.

propertyhorizontalAlign
horizontalAlign?: SheetHorizontalAlignment
propertyisEdit
isEdit?: boolean
propertyleft
left?: number
propertylineDash
lineDash?: number[]
propertynodeKey
nodeKey?: RenderNodeKey

Stable render-node key.

When omitted, Node falls back to its generated hit color key for backwards compatibility. Semantic render nodes should provide stable ids such as block ids here instead of using hit colors as identity.

propertyoverlayClipRect
overlayClipRect?: PositionRectProps

Optional world-coordinate clip applied by OverlayRenderStrategy. Overlay nodes normally render above sticky UI; this lets a visual stay within a host-defined content region instead (for example, a sheet selection must not draw over row/column headers).

propertyright
right?: number
propertysemanticOwner
semanticOwner?: string

Stable semantic ownership exposed by retained render targets.

propertysemanticRole
semanticRole?: string

Stable semantic role exposed by retained render targets.

propertyshouldBeClipInDirtyRender
shouldBeClipInDirtyRender?: boolean

Business marker: true when selection represents a whole row or whole column range. Dirty render may use this to choose a different redraw shape.

propertyskipHit
skipHit?: boolean

Visual-only nodes do not participate in hit canvas.

Background: FixBoxNode.drawHit fills the entire rect with random color for Hit Canvas lookup. But once visual-only nodes (such as selection strokes and header highlight backgrounds) enter the Hit Canvas, they can cover underlying cell hit colors and block click-through. Setting skipHit: true in properties makes drawHit skip directly.

propertystroke
stroke?: string
propertystrokeWidth
strokeWidth?: number
propertytextColor
textColor?: string

Foreground color used by text-rendering nodes.

propertytextFillCharacter
textFillCharacter?: string

Character repeated to fill the remaining inline width of formatted text.

propertytop
top?: number
propertyverticalAlign
verticalAlign?: SheetVerticalAlignment
typeRenderNodeKeysource ↗
type RenderNodeKey = string

Stable key used by SceneGraph, Tree and DataStorage to identify render nodes.

typeRichTextBlockIdsource ↗
type RichTextBlockId = string

Stable rich-text block identifier.

variableCellVisualIconShapesource ↗
CellVisualIconShape: { Bar: "bar"; Check: "check"; Circle: "circle"; Cross: "cross"; Diamond: "diamond"; Down: "down"; Flag: "flag"; Right: "right"; … }
variableCellVisualLayerShapesource ↗
CellVisualLayerShape: { Rectangle: "rectangle"; TopLeftTriangle: "topLeftTriangle" }

Primitive shapes available to feature-contributed cell layers.

functioncreateDragGuideNodesource ↗
createDragGuideNode<T>(line: { x1: number; x2: number; y1: number; y2: number }, properties: Partial<T>): DashedLineNode<T>

Creates a shared visual-only overlay guide for move and resize gestures.

line: { x1: number; x2: number; y1: number; y2: number }
properties: Partial<T>
functioncreateRichTextRunRectsource ↗
createRichTextRunRect(x: number, baselineY: number, width: number, height: number, fontAscent: number): PositionRect<templateLiteral>

Creates a world-space rectangle for one rich-text line/run.

x: number
baselineY: number
width: number
height: number
fontAscent: number
classRichTextBlockNodesource ↗
class RichTextBlockNode extends RichTextVisualNode

Scene node that indexes and draws one top-level rich-text block.

constructorconstructor
RichTextBlockNode(input: { block: { id: string; index: number }; font: string; lineRenderer: RichTextLineRenderer; lines: readonly RichTextRenderLine[]; origin?: Pick<PositionRectProps, "x" | "y">; rect: PositionRectProps }): RichTextBlockNode

Creates a block-level rich-text scene node.

input: { block: { id: string; index: number }; font: string; lineRenderer: RichTextLineRenderer; lines: readonly RichTextRenderLine[]; origin?: Pick<PositionRectProps, "x" | "y">; rect: PositionRectProps }
methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws all visible text runs inside this block.

context: RenderContext
clipRegion: ClipRegion
Inherited members 42

Inherited from RichTextVisualNode.

typeRichTextInlineStylesource ↗
type RichTextInlineStyle = Readonly<Record<string, unknown>>

Domain-neutral inline style bag carried by measured rich-text chars.

interfaceRichTextRenderLinesource ↗
interface RichTextRenderLine

Minimal layout-line shape consumed by rich-text render nodes.

propertychars
readonly chars: readonly RichTextRenderChar[]
propertycharStartOffset
readonly charStartOffset: number
propertycursorXOffsets
readonly cursorXOffsets?: readonly number[]
propertyfontAscent
readonly fontAscent: number
propertyheight
readonly height: number
propertytextNodePath
readonly textNodePath: readonly number[]
propertyx
readonly x: number
propertyy
readonly y: number
interfaceRichTextRenderNodePropertiessource ↗
interface RichTextRenderNodeProperties extends NodeProperties

Render-node properties used by rich-text scene graphs.

propertyblockId
readonly blockId?: string

Stable top-level rich-text block id.

propertyblockIndex
readonly blockIndex?: number

Top-level rich-text block index.

propertylineIndex
readonly lineIndex?: number

Layout line index inside the full rich-text snapshot.

propertyrenderRole
readonly renderRole?: "block" | "line" | "page" | "text-run" | "selection" | "caret" | "composition"

Semantic role for rich-text render nodes.

Inherited members 24

Inherited from NodeProperties.

classRichTextRunNodesource ↗
class RichTextRunNode extends RichTextVisualNode

Scene node that draws one contiguous styled rich-text run in world coordinates.

constructorconstructor
RichTextRunNode(input: { baselineY: number; font: string; fontAscent: number; fontDescent: number; properties: Partial<RichTextRenderNodeProperties>; rect: PositionRectProps; runRenderer: RichTextRunRenderer; style?: Readonly<Record<string, unknown>>; … }): RichTextRunNode

Creates a text-run scene node.

input: { baselineY: number; font: string; fontAscent: number; fontDescent: number; properties: Partial<RichTextRenderNodeProperties>; rect: PositionRectProps; runRenderer: RichTextRunRenderer; style?: Readonly<Record<string, unknown>>; … }
methoddrawScene
drawScene(context: RenderContext, clipRegion?: ClipRegion): void

Draws the text run into the active world-space transform.

context: RenderContext
clipRegion: ClipRegion
Inherited members 42

Inherited from RichTextVisualNode.

classViewportOverlayNodesource ↗
class ViewportOverlayNode extends RichTextVisualNode

Viewport overlay node that draws transient UI under an identity transform.

constructorconstructor
ViewportOverlayNode(input: { depth?: number; drawOverlay: (context: RenderContext): void; nodeKey: string; rect: PositionRectProps; role?: "selection" | "caret" }): ViewportOverlayNode

Creates a viewport overlay render node.

input: { depth?: number; drawOverlay: (context: RenderContext): void; nodeKey: string; rect: PositionRectProps; role?: "selection" | "caret" }
methoddrawScene
drawScene(context: RenderContext): void

Draws overlay content; the node owns transform isolation for viewport-space plugins.

context: RenderContext
Inherited members 42

Inherited from RichTextVisualNode.