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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
propertysticky sticky: booleanAffix nodes render in the sticky strategy instead of the scrolled content layer.
Inherited members 42
Inherited from FixBoxNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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 | RichDocNodeText or rich-text value to render.
positionRect: PositionRectProps | undefinedInitial node bounds.
properties: Partial<T>Render properties inherited from the parent cell.
runtime: Container
propertysticky sticky: booleanAffix text renders in the sticky strategy together with its parent.
Inherited members 43
Inherited from TextNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- value
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classBlockManagersource ↗
-
class BlockManager extends RichTextBlockLayoutProviderMeasures rich-document blocks and produces wrapped rich-text layout lines.
constructorconstructor BlockManager(textShaper: TextShaper, inlineStyleRegistry: RichTextInlineStyleRegistry, runRenderRegistry: RichTextRunRenderRegistry, lineBoxRegistry: RichTextLineBoxRegistry, baseFont?: string, paragraphLayoutDefaults?: RichTextParagraphLayoutDefaults): BlockManagerCreates a block manager from the text-shaping and rich-text services.
textShaper: TextShaperinlineStyleRegistry: RichTextInlineStyleRegistryrunRenderRegistry: RichTextRunRenderRegistrylineBoxRegistry: RichTextLineBoxRegistrybaseFont: stringparagraphLayoutDefaults: RichTextParagraphLayoutDefaults
propertymaxWidth maxWidth: numberMaximum measured unwrapped block width.
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving the rich-document block manager.
methodadd add(node: RichDocNode): voidAdds 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(): voidClears all measured blocks and cached size information.
methodcreateDetached createDetached(): BlockManagerCreates an unshared measurement workspace for a read-only layout request.
methodenforceCommandBoundary enforceCommandBoundary(isCommandExecuting: (): boolean): voidCloses direct block writes after the owning editor has assembled.
isCommandExecuting: (): boolean
methodsetBaseFont setBaseFont(font: string): voidSelects 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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
methodclear clear(context: RenderContext): voidClears state owned by BoxNode.
context: RenderContext
methoddrawHit drawHit(context: RenderContext): voidDraws the hit area for this node and all its descendants. This is typically used for hit testing (e.g., detecting mouse clicks).
context: RenderContextThe rendering context used to draw the hit area.
methoddrawScene drawScene(context: RenderContext): voidDraws the scene for this node and all its descendants. This method recursively calls
drawSceneon all child nodes.context: RenderContextThe rendering context used to draw the scene.
Inherited members 40
Inherited from LayoutNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves one item by object identity.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the tree boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- 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: PositionRectPropsproperties: Partial<T>layer: CellVisualLayer
methodclear clear(context: RenderContext): voidClears state owned by Node.
context: RenderContext
methoddrawHit drawHit(): voidAbstract method to draw the node's hit detection representation. Must be implemented by subclasses.
methoddrawScene drawScene(context: RenderContext): voidAbstract method to draw the node's scene representation. Must be implemented by subclasses.
context: RenderContextThe rendering context.
Inherited members 40
Inherited from RenderNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classContainersource ↗
-
class Container extends EventListener<string>Scene node that owns, queries, and serializes an ordered child collection.
constructorconstructor Container(): ContainerCreates a Container instance.
propertyrandomColorKey readonly randomColorKey: templateLiteral | nullUnique random color key for hit detection.
memberchildren children: unknownmethodadd add(child: Container): thisadd(children: Container[]): thisAdds the value.
child: Containerchildren: Container[]
methoddescendants descendants(): never[]Iterates every descendant in scene order.
methodquery query(): voidReturns descendants whose boundaries intersect the supplied rectangle.
methodremove remove(): voidRemoves the value.
methodtoJSON toJSON(): { }Serializes this scene structure into diagnostic JSON.
methodupdateBoundary updateBoundary(): voidUpdates the indexed boundary after geometry changes.
- 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: PositionRectPropsDirty/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): voidClears the line bounds with stroke padding.
context: RenderContextRender context to clear.
methoddrawHit drawHit(): voidDashed lines are visual-only and do not participate in hit testing.
methoddrawScene drawScene(context: RenderContext, clipRegion?: ClipRegion): voidDraws the dashed line into the render context.
context: RenderContextRender context receiving draw commands.
clipRegion: ClipRegion
Inherited members 40
Inherited from RenderNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classDirtyTreesource ↗
-
class DirtyTreeDI token placeholder for the dirty-region spatial index.
constructorconstructor DirtyTree(): DirtyTreepropertysymbolstatic readonly symbol: symbolDI 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[]): booleanTriggers an event, calling all associated handlers in registration order.
Propagation control: If any handler synchronously returns
false, dispatch to subsequent handlers stops. Returningtrue/undefined/voidmeans 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.Returns
falseif a handler actively stopped propagation; otherwisetrue.eventString: CustomEventTypesThe name of the event to trigger.
args: unknown[]Arguments to pass to the event handlers.
methodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void, teardownToken: object): voidCloses registration changes after an owning runtime has assembled.
assertWrite: (): voidteardownToken: object
methodoff off(eventString?: CustomEventTypes, handler?: Function): voidRemoves event handlers for a specific event or all events.
eventString: CustomEventTypesThe 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: CustomEventTypesThe name of the event to listen for.
handler: FunctionThe 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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
methodclear clear(context: RenderContext): voidClears this node's bounds from a raster context using stroke padding.
context: RenderContextRender context to clear.
methoddrawHit drawHit(context: RenderContext): voidDraws the node into the hit-test context unless the node is visual-only.
context: RenderContextHit render context.
methoddrawScene drawScene(context: RenderContext, clipRegion?: ClipRegion): voidDraws the box into the visible render context.
context: RenderContextRender context receiving draw commands.
clipRegion: ClipRegionOptional rectangle or polygon clipping region.
Inherited members 40
Inherited from RenderNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classGenerationalDirtyTrackersource ↗
-
class GenerationalDirtyTrackerFrame-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>>): GenerationalDirtyTrackerCreates a GenerationalDirtyTracker instance.
tree: Tree<PositionRect<templateLiteral>>
propertysymbolstatic readonly symbol: symbolDI token for resolving GenerationalDirtyTracker.
methodclear clear(): voidFrame-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>): voidRecords 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: numberMaximum children retained by the shared tree contract.
methodclear clear(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves an item by matching rectangle bounds.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- classHitColorRegistrysource ↗
-
class HitColorRegistryMaps hit-canvas color keys back to render nodes.
constructorconstructor HitColorRegistry(): HitColorRegistrypropertysymbolstatic readonly symbol: symbolDI token for resolving the hit-color registry.
methodclear clear(): voidClears all registered hit-color mappings.
methoddelete delete(key: templateLiteral): voidRemoves a hit-canvas color key mapping.
key: templateLiteral
methodget get<T>(key: templateLiteral): Node<T> | undefinedResolves the node currently associated with a hit-canvas color key.
key: templateLiteral
methodregister register<T>(key: templateLiteral, node: Node<T>): voidRegisters a node for hit-canvas color lookup.
key: templateLiteralnode: 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: numberRetained for the shared Tree contract.
methodclear clear(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves one item by object identity and rebuilds the experimental tree.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- 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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
Inherited members 43
Inherited from Node.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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: PositionRectPropsprops: 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: numberRender and event ordering depth for Node.
propertyname name: stringName of the node, defaults to the class name.
propertynodeKey readonly nodeKey: stringStable key used by SceneGraph, DataStorage and spatial indexes.
propertyparentKey parentKey: string | nullParent 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 | nullUnique random color key used for hit detection.
propertysticky sticky: booleanWhether this node remains fixed while its scroll container moves.
memberbottom bottom: unknownmemberconfigEngine configEngine: unknownmemberfill fill: unknownmemberheight height: unknownmemberhorizontalAlign horizontalAlign: unknownmemberleft left: unknownmemberlineDash lineDash: unknownmemberright right: unknownmemberstroke stroke: unknownmemberstrokeWidth strokeWidth: unknownmembertop top: unknownmemberverticalAlign verticalAlign: unknownmemberwidth width: unknownmemberx x: unknownmembery y: unknownmethodadd 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): voidAdds an event listener for the specified event type.
type: stringThe event type to listen for.
handler: FunctionThe function to handle the event.
methodbindRuntime bindRuntime(container: Container): voidBinds this node tree to the editor-local services owned by one SceneGraph.
container: Container
methodclear clear(context: RenderContext): voidClears state owned by Node.
context: RenderContext
methoddispose dispose(): voidDisposes 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): voidDraws the node in both the scene and hit detection contexts.
sceneContext: RenderContextThe context for scene rendering.
hitContext: RenderContextThe context for hit detection rendering.
methoddrawHit drawHit(context: RenderContext): voidAbstract method to draw the node's hit detection representation. Must be implemented by subclasses.
context: RenderContextThe rendering context.
methoddrawScene drawScene(context: RenderContext, clipRegion?: ClipRegion): voidAbstract method to draw the node's scene representation. Must be implemented by subclasses.
context: RenderContextThe rendering context.
clipRegion: ClipRegionOptional clipping region: a
PositionRectfor axis-aligned rectangular clip, or aPoint[]polygon (array of[x, y]vertices) for arbitrary shape clip.
methodgetNodeByNodeKey getNodeByNodeKey(key: string): Node<T> | nullFinds a node by its stable render-node key.
ReturnsThe node if found, otherwise null.
key: stringThe stable render node key.
methodgetNodeByRandomColorKey getNodeByRandomColorKey(key: templateLiteral): Node<T> | nullFinds a node by its random color key.
ReturnsThe node if found, otherwise null.
key: templateLiteralThe 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>): voidRemoves a child node from this node and disposes its entire subtree.
child: Node<T>
methodremoveEventListener removeEventListener(type: string): voidRemoves an event listener for the specified event type.
type: stringThe event type to remove.
methodsetStickyTree setStickyTree(sticky: boolean, affix?: Pick<NodeProperties, "top" | "left">): thisMarks this node tree as sticky and applies the supplied affix axes to every descendant.
sticky: booleanaffix: Pick<NodeProperties, "top" | "left">
methodtoJSON toJSON(): { }Converts the node and its properties to a JSON object. Can be extended to recursively serialize children.
- 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(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves one item by object identity.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- classQuadTreesource ↗
-
class QuadTree extends Tree<PositionRect<HexColor>>QuadTree spatial index used by scene and dirty-region lookups.
constructorconstructor QuadTree(boundary: PositionRect<templateLiteral>, capacity: number): QuadTreeConstructs a QuadTree node.
boundary: PositionRect<templateLiteral>Node boundary.
capacity: numberMaximum items before subdivision.
propertybottomleft bottomleft: QuadTree | nullBottom-left child node.
propertybottomright bottomright: QuadTree | nullBottom-right child node.
propertydivided divided: booleanWhether this node has been subdivided into children.
propertyrects rects: PositionRect<templateLiteral>[]Rectangles stored directly in this node.
propertytopleft topleft: QuadTree | nullTop-left child node.
propertytopright topright: QuadTree | nullTop-right child node.
methodclear clear(): voidClears all indexed rectangles and child quadrants.
methodcontains contains(boundary: PositionRect<templateLiteral>, rect: PositionRect<templateLiteral>): booleanReturns 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>): booleanInserts 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>): booleanReturns 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): booleanRemoves matching rectangle entries.
ReturnsTrue when an entry was removed.
data: PositionRect<templateLiteral>Rectangle coordinates to remove.
predicate: (rect: PositionRect<templateLiteral>): booleanOptional predicate for entries with matching bounds.
methodsubdivide subdivide(): voidSplits this node into four child quadrants and redistributes contained items.
methodtoJSON toJSON(): objectSerializes debug data for this tree.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and reinserts existing rectangles.
boundary: PositionRect<templateLiteral>New root boundary.
- 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): QuadTreeCreates a QuadTree.
boundary: PositionRect<templateLiteral>Root spatial boundary.
capacity: numberMaximum 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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
Inherited members 43
Inherited from Node.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classRichTextCaretNodesource ↗
-
class RichTextCaretNode extends RichTextVisualNodeScene 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 }): RichTextCaretNodeCreates 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): voidDraws the caret when the blink state says it is visible.
context: RenderContext
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classRichTextCompositionNodesource ↗
-
class RichTextCompositionNode extends RichTextVisualNodeScene 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 }): RichTextCompositionNodeCreates 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): voidDraws composing text in world or viewport coordinates.
context: RenderContext
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classRichTextContentNodesource ↗
-
class RichTextContentNode extends RichTextVisualNodeScene 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 }): RichTextContentNodeCreates 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): voidDraws every included layout line inside this node's clip.
context: RenderContextclipRegion: ClipRegion
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classRichTextLineRenderersource ↗
-
class RichTextLineRendererPaints laid-out rich-text lines by grouping adjacent characters into runs.
constructorconstructor RichTextLineRenderer(inlineStyles: RichTextInlineStyleRegistry, runRenderer: RichTextRunRenderer): RichTextLineRendererCreates a line renderer with domain style comparison and run rendering.
inlineStyles: RichTextInlineStyleRegistryrunRenderer: RichTextRunRenderer
propertysymbolstatic readonly symbol: typeof symbolDI token for resolving the line renderer.
methodpaint paint(context: RenderContext, input: { font?: string; line: RichTextRenderLine; origin: Pick<PositionRectProps, "x" | "y"> }): voidPaints one laid-out line at the supplied world-space origin.
context: RenderContextinput: { font?: string; line: RichTextRenderLine; origin: Pick<PositionRectProps, "x" | "y"> }
- classRichTextRunRenderersource ↗
-
class RichTextRunRendererPaints one contiguous rich-text run using the registered render contributions.
constructorconstructor RichTextRunRenderer(registry: RichTextRunRenderRegistry): RichTextRunRendererCreates a run renderer backed by the render contribution registry.
registry: RichTextRunRenderRegistry
propertysymbolstatic readonly symbol: typeof symbolDI 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; … }): voidPaints one run and restores all renderer state changed by its style plugins.
context: RenderContextinput: { baselineY: number; font: string; fontAscent: number; fontDescent: number; height: number; style: Readonly<Record<string, unknown>> | undefined; text: string; width: number; … }
- classRichTextRunRenderRegistrysource ↗
-
class RichTextRunRenderRegistryRender-layer registry for plugin-owned rich-text run behavior.
constructorconstructor RichTextRunRenderRegistry(): RichTextRunRenderRegistrypropertysymbolstatic readonly symbol: typeof symbolDI token for resolving the rich-text run render registry.
methodapplyRenderState applyRenderState(context: RenderContext, style: Readonly<Record<string, unknown>> | undefined): voidApplies all registered render-state contributions before text painting.
context: RenderContextstyle: Readonly<Record<string, unknown>> | undefined
methodenforceWriteBoundary enforceWriteBoundary(assertWrite: (): void): voidassertWrite: (): void
methodpaintRun paintRun(input: RichTextRunPaintInput): voidPaints all registered plugin-owned run details.
input: RichTextRunPaintInput
methodregister register(contribution: RichTextRunRenderContribution): (): voidRegisters one render contribution.
contribution: RichTextRunRenderContribution
methodresolveFont resolveFont(font: string, style: Readonly<Record<string, unknown>> | undefined): stringResolves the final font descriptor after all registered contributions run.
font: stringstyle: Readonly<Record<string, unknown>> | undefined
- classRichTextSelectionNodesource ↗
-
class RichTextSelectionNode extends RichTextVisualNodeScene 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 }): RichTextSelectionNodeCreates 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): voidDraws selection rectangles in world or viewport coordinates.
context: RenderContextclipRegion: ClipRegion
methodgetSelectionRects getSelectionRects(): readonly RichTextSelectionRect[]World-space regions where text should be painted above the highlight.
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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): voidRich-text visual node pixels are cleared by strategy-owned dirty rectangles.
_context: RenderContext
methoddrawHit drawHit(_context: RenderContext): voidRich-text visual nodes are ignored by hit testing unless a subclass opts in.
_context: RenderContext
Inherited members 41
Inherited from Node.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves one item by object identity.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- 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: symbolDI token for resolving the scene graph.
methodaddPluginNode addPluginNode(pluginKeyString: string, node: Node<T> | Node<T>[], options?: { markDirty?: boolean }): voidReplaces all scene nodes owned by one plugin.
pluginKeyString: stringStable plugin key.
node: Node<T> | Node<T>[]Node or nodes produced by the plugin render method.
options: { markDirty?: boolean }
methodclear clear(context: RenderContext): voidSceneGraph is cleared through strategy-owned dirty regions.
context: RenderContext
methoddrawHit drawHit(context: RenderContext): voidSceneGraph is a root container and is not drawn into the hit layer directly.
context: RenderContext
methoddrawScene drawScene(context: RenderContext): voidSceneGraph is a root container and is not drawn directly.
context: RenderContext
methodmarkRemovePluginNode markRemovePluginNode(pluginKeyString: string, options?: { markDirty?: boolean }): voidMarks and removes all existing top-level nodes owned by one plugin.
pluginKeyString: stringStable 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 }): voidReconciles 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: stringnode: Node<T> | Node<T>[]options: { markDirty?: boolean; replaceRetainedGeometryChanged?: boolean; replaceRetainedKeys?: ReadonlySet<string>; retainExisting?: boolean; updateRetainedGeometry?: boolean }
Inherited members 40
Inherited from Node.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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: numberLogical size of one hash bucket.
boundary: PositionRect<templateLiteral>Root spatial boundary.
capacity: numberRetained for the shared Tree contract.
methodclear clear(): voidRemoves all indexed items.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the current tree boundary.
methodinsert insert(data: T): booleanInserts 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): booleanRemoves one item from its hashed bucket.
data: T
methodtoJSON toJSON(): objectSerializes debug data for this spatial index.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidReplaces the boundary and clears indexed items.
boundary: PositionRect<templateLiteral>
- 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: PositionRectPropsprops: Partial<T>Partial properties and position for initialization.
runtime: Container
Inherited members 43
Inherited from BoxNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- drawScene
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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 | RichDocNodeText or rich-text value to render.
positionRect: PositionRectProps | undefinedInitial node bounds.
properties: Partial<T>Render properties inherited from the parent cell.
runtime: Container
propertydepth depth: numberText draws above the box background by default.
propertyvalue readonly value: string | RichDocNodeText value rendered by this node.
memberwidth width: unknownmethodclear clear(context: RenderContext): voidText nodes are cleared through their parent box dirty region.
context: RenderContext
methoddrawHit drawHit(context: RenderContext): voidText nodes do not draw separate hit regions; the parent box owns hit testing.
context: RenderContext
methoddrawScene drawScene(context: RenderContext, clipRegion?: ClipRegion): voidDraws text inside the parent node using the parent's alignment and padding.
context: RenderContextRender context receiving text commands.
clipRegion: ClipRegionOptional clipping region inherited from render strategies.
Inherited members 38
Inherited from RenderNode.
- childKeys
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- x
- y
- add
- addEventListener
- bindRuntime
- dispose
- draw
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- 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: numberThe maximum number of entries retained by this spatial node.
propertyparent parent: Tree<T> | nullThe parent spatial node, or null at the root.
propertysymbolstatic readonly symbol: symbolDI token for resolving Tree.
methodclear clear(): voidClears state owned by Tree.
methodgetBoundary getBoundary(): PositionRect<templateLiteral>Returns the boundary.
methodinsert insert(item: T): booleanInserts 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): booleanRemoves the value.
item: Tpredicate: (rect: PositionRect<templateLiteral>): boolean
methodtoJSON toJSON(): objectSerializes this scene structure into diagnostic JSON.
methodupdateBoundary updateBoundary(boundary: PositionRect<templateLiteral>): voidUpdates the indexed boundary after geometry changes.
boundary: PositionRect<templateLiteral>
- interfaceCellVisualLabelsource ↗
-
interface CellVisualLabelOne text label drawn within a feature-contributed visual layer.
- interfaceCellVisualLayersource ↗
-
interface CellVisualLayerA visual rectangle, icon or sequence of labels within its cell bounds.
propertyfill readonly fill?: string | { end: string; start: string }propertyheight readonly height: numberpropertyicon 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?: CellVisualLayerShapepropertyslot readonly slot: stringpropertywidth readonly width: numberpropertyx readonly x: numberpropertyy readonly y: number - interfaceRichTextRenderCharsource ↗
-
interface RichTextRenderCharMinimal rich-text character shape consumed by render nodes.
- interfaceRichTextRunPaintInputsource ↗
-
interface RichTextRunPaintInputGeometry and render state for one contiguous rich-text run.
propertybaselineY readonly baselineY: numberpropertycontext readonly context: RenderContextpropertyfontAscent readonly fontAscent: numberpropertyfontDescent readonly fontDescent: numberpropertyheight readonly height: numberpropertystyle readonly style: Readonly<Record<string, unknown>> | undefinedpropertytext readonly text: stringpropertywidth readonly width: numberpropertyx readonly x: number - interfaceRichTextRunRenderContributionsource ↗
-
interface RichTextRunRenderContributionPlugin-owned render behavior for one inline text-style concern.
propertykey readonly key: stringStable contribution key used for duplicate detection and unregister.
methodapplyRenderState applyRenderState(input: { context: RenderContext; style: Readonly<Record<string, unknown>> | undefined }): voidApplies renderer state before the text run is painted.
input: { context: RenderContext; style: Readonly<Record<string, unknown>> | undefined }
methodpaintRun paintRun(input: RichTextRunPaintInput): voidPaints plugin-owned details for an already painted text run.
input: RichTextRunPaintInput
methodresolveFont resolveFont(input: { font: string; style: Readonly<Record<string, unknown>> | undefined }): stringResolves the font used by shaping and painting for a styled run.
input: { font: string; style: Readonly<Record<string, unknown>> | undefined }
- interfaceRichTextSelectionRectsource ↗
-
interface RichTextSelectionRectRectangle highlighted as part of a rich-text selection.
- interfaceRichTextVisualNodeInputsource ↗
-
interface RichTextVisualNodeInputShared construction options for visual-only rich-text render nodes.
propertyblockId readonly blockId?: stringpropertyblockIndex readonly blockIndex?: numberpropertydepth readonly depth: numberpropertyisEdit readonly isEdit?: booleanpropertynodeKey readonly nodeKey: stringpropertyrect readonly rect: PositionRectPropspropertyrenderRole 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<HexColor>— axis-aligned rectangle clip (common case).Point[]— arbitrary polygon clip; each element is an[x, y]vertex.
- typeHitColorKeysource ↗
-
type HitColorKey = HexColorColor key used only by hit-canvas rendering and pixel-to-node lookup.
- typeNodePropertiessource ↗
-
type NodeProperties = unknownType contract for NodeProperties.
propertybottom bottom?: numberpropertycontentInsetStart contentInsetStart?: numberSpace reserved before projected text for a cell visual.
propertycornerRadius cornerRadius?: [number, number, number, number]propertydepth depth?: numberpropertyfill fill?: stringpropertyfitNumberValue fitNumberValue?: numberRaw General-format number fitted against the actual render width.
propertyhideText hideText?: booleanSuppresses projected text while preserving its underlying value.
propertyhorizontalAlign horizontalAlign?: SheetHorizontalAlignmentpropertyisEdit isEdit?: booleanpropertyleft left?: numberpropertylineDash lineDash?: number[]propertynodeKey nodeKey?: RenderNodeKeyStable 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?: PositionRectPropsOptional 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?: numberpropertysemanticOwner semanticOwner?: stringStable semantic ownership exposed by retained render targets.
propertysemanticRole semanticRole?: stringStable semantic role exposed by retained render targets.
propertyshouldBeClipInDirtyRender shouldBeClipInDirtyRender?: booleanBusiness 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?: booleanVisual-only nodes do not participate in hit canvas.
Background:
FixBoxNode.drawHitfills 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. SettingskipHit: truein properties makesdrawHitskip directly.propertystroke stroke?: stringpropertystrokeWidth strokeWidth?: numberpropertytextColor textColor?: stringForeground color used by text-rendering nodes.
propertytextFillCharacter textFillCharacter?: stringCharacter repeated to fill the remaining inline width of formatted text.
propertytop top?: numberpropertyverticalAlign verticalAlign?: SheetVerticalAlignment - typeRenderNodeKeysource ↗
-
type RenderNodeKey = stringStable key used by SceneGraph, Tree and DataStorage to identify render nodes.
- typeRichTextBlockIdsource ↗
-
type RichTextBlockId = stringStable 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: numberbaselineY: numberwidth: numberheight: numberfontAscent: number
- classRichTextBlockNodesource ↗
-
class RichTextBlockNode extends RichTextVisualNodeScene 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 }): RichTextBlockNodeCreates 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): voidDraws all visible text runs inside this block.
context: RenderContextclipRegion: ClipRegion
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- typeRichTextInlineStylesource ↗
-
type RichTextInlineStyle = Readonly<Record<string, unknown>>Domain-neutral inline style bag carried by measured rich-text chars.
- interfaceRichTextRenderLinesource ↗
-
interface RichTextRenderLineMinimal layout-line shape consumed by rich-text render nodes.
propertychars readonly chars: readonly RichTextRenderChar[]propertycharStartOffset readonly charStartOffset: numberpropertycursorXOffsets readonly cursorXOffsets?: readonly number[]propertyfontAscent readonly fontAscent: numberpropertyheight readonly height: numberpropertytextNodePath readonly textNodePath: readonly number[]propertyx readonly x: numberpropertyy readonly y: number - interfaceRichTextRenderNodePropertiessource ↗
-
interface RichTextRenderNodeProperties extends NodePropertiesRender-node properties used by rich-text scene graphs.
propertyblockId readonly blockId?: stringStable top-level rich-text block id.
propertyblockIndex readonly blockIndex?: numberTop-level rich-text block index.
propertylineIndex readonly lineIndex?: numberLayout 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 RichTextVisualNodeScene 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>>; … }): RichTextRunNodeCreates 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): voidDraws the text run into the active world-space transform.
context: RenderContextclipRegion: ClipRegion
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
- classViewportOverlayNodesource ↗
-
class ViewportOverlayNode extends RichTextVisualNodeViewport 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" }): ViewportOverlayNodeCreates a viewport overlay render node.
input: { depth?: number; drawOverlay: (context: RenderContext): void; nodeKey: string; rect: PositionRectProps; role?: "selection" | "caret" }
methoddrawScene drawScene(context: RenderContext): voidDraws overlay content; the node owns transform isolation for viewport-space plugins.
context: RenderContext
Inherited members 42
Inherited from RichTextVisualNode.
- childKeys
- depth
- name
- nodeKey
- parentKey
- positionRect
- properties
- randomColorKey
- sticky
- bottom
- configEngine
- fill
- height
- horizontalAlign
- left
- lineDash
- right
- stroke
- strokeWidth
- top
- verticalAlign
- width
- x
- y
- add
- addEventListener
- bindRuntime
- clear
- dispose
- draw
- drawHit
- emit
- enforceWriteBoundary
- getNodeByNodeKey
- getNodeByRandomColorKey
- off
- on
- query
- removeChild
- removeEventListener
- setStickyTree
- toJSON
No public exports match that search.