@searsuite/sear-render
Public rendering facade that composes contexts, nodes, strategies, and registries.
Grid and labels
- classSheetCellMergeRender
-
class SheetCellMergeRender extends Plugin<SearCoreSheet, CellProperties, Record<string, never>>Renders merged ranges owned by SheetCellMergePlugin.
constructor SheetCellMergeRender(cellVisualReaders: SheetCellVisualReaderRegistry): SheetCellMergeRenderproperty readonly depth: 1Draw and event ordering hint; lower values run earlier.
property readonly interestedIn: MatrixOTActionName[]Declares which Sheet OT action names this plugin is interested in. The engine will only call
applywhen a transaction contains at least one operation matching these action names, unless the transaction is owned by this plugin.['uc', 'rr', 'rc']— only called for UpdateCell, ResizeRow, ResizeCol['*']— called for any transaction (wildcard)[]— only called for this plugin's own transactions
property readonly pluginKey: PluginKeystaticproperty readonly symbol: typeof symbolstaticmethod apply(): Record<string, never>Applies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(searCore: SearCoreSheet): { defaultBorderColor: string }Returns this plugin's runtime configuration view for the current core.
method onMouseDown(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles the start of a pointer press sequence.
method onMouseMove(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles pointer movement over the host surface.
method onMouseUp(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles the end of a pointer press sequence.
method registerConfig(): { config: ConfigUnit<{ defaultBorderColor: string }>; key: PluginKey }[]Registers default configuration values owned by this plugin.
method registerState(): { key: PluginKey; state: Record<string, never> }Registers one or more plugin-owned state records with the host manager.
method render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Produces scene nodes owned by this plugin for the current core state.
Inherited members 23
Inherited from Plugin.
- documentState
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetColumnLabelPlugin
-
class SheetColumnLabelPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetColumnLabel>Renders sticky column header cells for the visible viewport range.
constructor SheetColumnLabelPlugin(): SheetColumnLabelPluginConstructs the column header plugin.
property readonly defaultConfig: { defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }staticDefault visual configuration for column headers.
property readonly symbol: symbolstaticDI token for resolving the column header plugin.
method apply(operations: Operation[]): ISheetColumnLabelReturns unchanged plugin state for every transaction.
method getPluginConfig(searCore: SearCoreSheet): { defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }Reads the column header render configuration from ConfigEngine.
method initialize(): voidInitializes column header runtime state.
method onResize(): voidColumn header dimensions are recomputed during render after resize.
method onScroll(_scrollManagerState: ScrollManagerState): voidColumn header positions are recomputed during render from scroll state.
method registerConfig(): { config: ConfigUnit<{ defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }>; key: PluginKey }[]Registers default column header configuration.
method registerState(): { key: PluginKey; state: ISheetColumnLabel }Registers the stateless column header plugin with PluginManager.
method render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders visible column header cells.
ReturnsRender nodes for visible column headers.
searCoreSheet core containing data and render services.
offsetWorld offset applied by sticky rendering.
Inherited members 27
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetCornerPlugin
-
class SheetCornerPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetCorner>Renders the sticky sheet corner cell where row and column headers meet.
constructor SheetCornerPlugin(): SheetCornerPluginConstructs the sheet corner plugin.
property readonly symbol: symbolstaticDI token for resolving the sheet corner plugin.
method apply(operations: Operation[]): ISheetCornerReturns unchanged plugin state for every transaction.
method getPluginConfig(searCore: SearCoreSheet): { backgroundColor: string; borderColor: string; height: number; width: number }Reads the sheet corner render configuration from ConfigEngine.
method initialize(): voidInitializes sheet corner runtime state.
method onResize(): voidSheet corner dimensions are recomputed during render after resize.
method onScroll(_scrollManagerState: ScrollManagerState): voidSheet corner position is recomputed during render from scroll state.
method registerConfig(): { config: ConfigUnit<{ backgroundColor: string; borderColor: string; height: number; width: number }>; key: PluginKey }[]Registers default sheet corner configuration.
method registerState(): { key: PluginKey; state: ISheetCorner }Registers the stateless sheet corner plugin with PluginManager.
method render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders the sheet corner cell.
ReturnsRender nodes for the sheet corner.
searCoreSheet core containing render services.
offsetWorld offset applied by sticky rendering.
Inherited members 27
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetGridPlugin
-
class SheetGridPlugin extends Plugin<SearCoreSheet, CellProperties, SheetGridState>Composite plugin that assembles sheet chrome, body grid, and merged-cell nodes.
constructor SheetGridPlugin(sheetCornerPlugin: SheetCornerPlugin, sheetColumnLabelPlugin: SheetColumnLabelPlugin, sheetRowNumberPlugin: SheetRowNumberPlugin, sheetGridRender: SheetGridRender): SheetGridPluginConstructs the grid plugin from its child sheet render plugins.
property interestedIn: string[]Rebuilds grid geometry when sheet data or dimensions change.
property readonly symbol: symbolstaticDI token for resolving the composite sheet grid plugin.
method apply(pluginState: SheetGridState, transaction: Transaction): SheetGridState | nullKeeps composite state unchanged when data transactions cause a re-render.
method getPluginConfig(searCore: SearCoreSheet): nullComposite grid configuration is delegated to child render plugins.
method onDblClick(earCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidForwards double-click handling to the body grid renderer.
method registerConfig(): { config: ConfigUnit<{ backgroundColor: string; borderColor: string; height: number; width: number }>; key: PluginKey }[]Registers configuration contributed by every child sheet render plugin.
method registerState(): { key: PluginKey; state: SheetGridState }Registers only the composite grid state; merged ranges have their own plugin owner.
method render(searCore: SearCoreSheet): Node<CellProperties>[]Renders sheet chrome and body layers in the order expected by the scene graph.
ReturnsRender nodes for corner, headers, merged cells, and grid cells.
searCoreSheet core containing data and render services.
Inherited members 27
Inherited from Plugin.
- depth
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetGridRender
-
class SheetGridRender extends Plugin<SearCoreSheet, CellProperties, ISheetGridRender>Renders visible sheet body cells.
constructor SheetGridRender(cellVisualReaders: SheetCellVisualReaderRegistry): SheetGridRenderConstructs the body grid renderer.
property readonly symbol: symbolstaticDI token for resolving the body grid renderer.
method apply(operations: Operation[]): ISheetGridRenderReturns unchanged renderer state for every operation list.
method getPluginConfig(searCore: SearCoreSheet): { defaultBorderColor: string }Reads the body grid render configuration from ConfigEngine.
method onDblClick(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidHandles double-click interactions on grid cells.
method registerConfig(): { config: ConfigUnit<{ defaultBorderColor: string }>; key: PluginKey }[]Registers default body grid configuration.
method registerState(): { key: PluginKey; state: ISheetGridRender }Registers the stateless body grid renderer with PluginManager.
method render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders visible grid cells, skipping cells covered by merged ranges.
ReturnsRender nodes for visible body cells.
searCoreSheet core containing data and render services.
offsetOffset after accounting for row/column headers.
Inherited members 28
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetRowNumberPlugin
-
class SheetRowNumberPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetRowNumber>Renders sticky row header cells for the visible viewport range.
constructor SheetRowNumberPlugin(): SheetRowNumberPluginConstructs the row header plugin.
property readonly defaultConfig: { defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }staticDefault visual configuration for row headers.
property readonly symbol: symbolstaticDI token for resolving the row header plugin.
method apply(operations: Operation[]): ISheetRowNumberReturns unchanged plugin state for every transaction.
method getPluginConfig(searCore: SearCoreSheet): { defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }Reads the row header render configuration from ConfigEngine.
method initialize(): voidInitializes row header runtime state.
method onResize(): voidRow header dimensions are recomputed during render after resize.
method onScroll(_scrollManagerState: ScrollManagerState): voidRow header positions are recomputed during render from scroll state.
method registerConfig(): { config: ConfigUnit<{ defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }>; key: PluginKey }[]Registers default row header configuration.
method registerState(): { key: PluginKey; state: ISheetRowNumber }Registers the stateless row header plugin with PluginManager.
method render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders visible row header cells.
ReturnsRender nodes for visible row headers.
searCoreSheet core containing data and render services.
offsetWorld offset applied by sticky rendering.
Inherited members 27
Inherited from Plugin.
- depth
- documentState
- interestedIn
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
Viewport geometry
- interfaceSheetRangePositionContext
-
Explicit layout inputs required to convert a sheet range to canvas coordinates.
property columnSizes: DimensionsCSRMatrixproperty offsetX: numberproperty offsetY: numberproperty rowSizes: DimensionsCSRMatrix - interfaceViewportRange
-
Computed visible row/column range within the current viewport. Used as a cross-cutting concern by render plugins to avoid iterating the entire sheet when only a small portion is visible.
Example: 10,000 rows × 100 cols → only ~40 rows × ~20 cols are visible at once. Computing the range costs O(log n) via binary search in DimensionsCSRMatrix, then the render loop iterates only the visible slice — O(visible) instead of O(total).
- functionactiveFixedRowOffsets
-
activeFixedRowOffsets(fixedRows: FixedRowMatrix | null, rowSizes: DimensionsCSRMatrix, scrollY: number, frozenRows: number, offsetY: number): Map<number, number>Fixed rows join the top stack only after the scrolling viewport passes their original position.
- functioncomputeViewportRange
-
computeViewportRange(scrollManager: ScrollManager, rowSizes: DimensionsCSRMatrix, columnSizes: DimensionsCSRMatrix, offset?: { x: number; y: number }): ViewportRangeCompute the visible row/column range from the current scroll state and the dimension matrices (row heights / column widths).
Includes a 1-cell buffer on each side to avoid pop-in artifacts at the edges when scrolling quickly.
scrollManagerThe scroll manager that holds viewport + scroll position
rowSizesRow dimension matrix (heights with cumulative boundary lookups)
columnSizesColumn dimension matrix (widths with cumulative boundary lookups)
offsetRender offset (e.g. frozen header offsets), added to viewport origin
- functiongetSheetRangePositionRect
-
getSheetRangePositionRect(start: Point, end: Point, context: SheetRangePositionContext): PositionRect<undefined> | nullConverts an inclusive sheet cell range into a world-space canvas rectangle. Returns null when the range is invalid or outside the current sheet bounds.
No matching API entries.