API reference
@searsuite/sear-render
Public rendering facade that composes contexts, nodes, strategies, and registries.
11 exportsderived from source
- classSheetCellMergeRendersource ↗
-
class SheetCellMergeRender extends Plugin<SearCoreSheet, CellProperties, Record<string, never>>Renders merged ranges owned by SheetCellMergePlugin.
constructorconstructor SheetCellMergeRender(cellVisualReaders: SheetCellVisualReaderRegistry): SheetCellMergeRendercellVisualReaders: SheetCellVisualReaderRegistry
propertydepth readonly depth: 1Draw and event ordering hint; lower values run earlier.
propertyinterestedIn 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
propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(): Record<string, never>Applies a transaction to plugin-owned state and returns the next state.
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): { defaultBorderColor: string }Returns this plugin's runtime configuration view for the current core.
searCore: SearCoreSheet
methodonMouseDown onMouseDown(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles the start of a pointer press sequence.
_searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodonMouseMove onMouseMove(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles pointer movement over the host surface.
_searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodonMouseUp onMouseUp(_searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): voidHandles the end of a pointer press sequence.
_searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodregisterConfig registerConfig(): { config: ConfigUnit<{ defaultBorderColor: string }>; key: PluginKey }[]Registers default configuration values owned by this plugin.
methodregisterState registerState(): { key: PluginKey; state: Record<string, never> }Registers one or more plugin-owned state records with the host manager.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Produces scene nodes owned by this plugin for the current core state.
searCore: SearCoreSheetoffset: { x: number; y: number }
Inherited members 24
Inherited from Plugin.
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- classSheetColumnLabelPluginsource ↗
-
class SheetColumnLabelPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetColumnLabel>Renders sticky column header cells for the visible viewport range.
constructorconstructor SheetColumnLabelPlugin(): SheetColumnLabelPluginConstructs the column header plugin.
propertydefaultConfigstatic readonly defaultConfig: { defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }Default visual configuration for column headers.
propertysymbolstatic readonly symbol: symbolDI token for resolving the column header plugin.
methodapply apply(operations: Operation[]): ISheetColumnLabelReturns unchanged plugin state for every transaction.
operations: Operation[]
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): { defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }Reads the column header render configuration from ConfigEngine.
searCore: SearCoreSheet
methodinitialize initialize(): voidInitializes column header runtime state.
methodonResize onResize(): voidColumn header dimensions are recomputed during render after resize.
methodonScroll onScroll(_scrollManagerState: ScrollManagerState): voidColumn header positions are recomputed during render from scroll state.
_scrollManagerState: ScrollManagerState
methodregisterConfig registerConfig(): { config: ConfigUnit<{ defaultBackgroundColor: string; defaultBorderColor: string; defaultHeight: number }>; key: PluginKey }[]Registers default column header configuration.
methodregisterState registerState(): { key: PluginKey; state: ISheetColumnLabel }Registers the stateless column header plugin with PluginManager.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders visible column header cells.
ReturnsRender nodes for visible column headers.
searCore: SearCoreSheetSheet core containing data and render services.
offset: { x: number; y: number }World 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
- classSheetCornerPluginsource ↗
-
class SheetCornerPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetCorner>Renders the sticky sheet corner cell where row and column headers meet.
constructorconstructor SheetCornerPlugin(): SheetCornerPluginConstructs the sheet corner plugin.
propertysymbolstatic readonly symbol: symbolDI token for resolving the sheet corner plugin.
methodapply apply(operations: Operation[]): ISheetCornerReturns unchanged plugin state for every transaction.
operations: Operation[]
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): { backgroundColor: string; borderColor: string; height: number; width: number }Reads the sheet corner render configuration from ConfigEngine.
searCore: SearCoreSheet
methodinitialize initialize(): voidInitializes sheet corner runtime state.
methodonResize onResize(): voidSheet corner dimensions are recomputed during render after resize.
methodonScroll onScroll(_scrollManagerState: ScrollManagerState): voidSheet corner position is recomputed during render from scroll state.
_scrollManagerState: ScrollManagerState
methodregisterConfig registerConfig(): { config: ConfigUnit<{ backgroundColor: string; borderColor: string; height: number; width: number }>; key: PluginKey }[]Registers default sheet corner configuration.
methodregisterState registerState(): { key: PluginKey; state: ISheetCorner }Registers the stateless sheet corner plugin with PluginManager.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders the sheet corner cell.
ReturnsRender nodes for the sheet corner.
searCore: SearCoreSheetSheet core containing render services.
offset: { x: number; y: number }World 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
- classSheetGridPluginsource ↗
-
class SheetGridPlugin extends Plugin<SearCoreSheet, CellProperties, SheetGridState>Composite plugin that assembles sheet chrome, body grid, and merged-cell nodes.
constructorconstructor SheetGridPlugin(sheetCornerPlugin: SheetCornerPlugin, sheetColumnLabelPlugin: SheetColumnLabelPlugin, sheetRowNumberPlugin: SheetRowNumberPlugin, sheetGridRender: SheetGridRender): SheetGridPluginConstructs the grid plugin from its child sheet render plugins.
sheetCornerPlugin: SheetCornerPluginsheetColumnLabelPlugin: SheetColumnLabelPluginsheetRowNumberPlugin: SheetRowNumberPluginsheetGridRender: SheetGridRender
propertyinterestedIn interestedIn: string[]Rebuilds grid geometry when sheet data or dimensions change.
propertysymbolstatic readonly symbol: symbolDI token for resolving the composite sheet grid plugin.
methodapply apply(pluginState: SheetGridState, transaction: Transaction): SheetGridState | nullKeeps composite state unchanged when data transactions cause a re-render.
pluginState: SheetGridStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): nullComposite grid configuration is delegated to child render plugins.
searCore: SearCoreSheet
methodonDblClick onDblClick(earCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidForwards double-click handling to the body grid renderer.
earCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodregisterConfig registerConfig(): { config: ConfigUnit<{ backgroundColor: string; borderColor: string; height: number; width: number }>; key: PluginKey }[]Registers configuration contributed by every child sheet render plugin.
methodregisterState registerState(): { key: PluginKey; state: SheetGridState }Registers only the composite grid state; merged ranges have their own plugin owner.
methodrender 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.
searCore: SearCoreSheetSheet 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
- classSheetGridRendersource ↗
-
class SheetGridRender extends Plugin<SearCoreSheet, CellProperties, ISheetGridRender>Renders visible sheet body cells.
constructorconstructor SheetGridRender(cellVisualReaders: SheetCellVisualReaderRegistry): SheetGridRenderConstructs the body grid renderer.
cellVisualReaders: SheetCellVisualReaderRegistry
propertysymbolstatic readonly symbol: symbolDI token for resolving the body grid renderer.
methodapply apply(operations: Operation[]): ISheetGridRenderReturns unchanged renderer state for every operation list.
operations: Operation[]
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): { defaultBorderColor: string }Reads the body grid render configuration from ConfigEngine.
searCore: SearCoreSheet
methodonDblClick onDblClick(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidHandles double-click interactions on grid cells.
searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodregisterConfig registerConfig(): { config: ConfigUnit<{ defaultBorderColor: string }>; key: PluginKey }[]Registers default body grid configuration.
methodregisterState registerState(): { key: PluginKey; state: ISheetGridRender }Registers the stateless body grid renderer with PluginManager.
methodrender 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.
searCore: SearCoreSheetSheet core containing data and render services.
offset: { x: number; y: number }Offset 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
- classSheetRowNumberPluginsource ↗
-
class SheetRowNumberPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetRowNumber>Renders sticky row header cells for the visible viewport range.
constructorconstructor SheetRowNumberPlugin(): SheetRowNumberPluginConstructs the row header plugin.
propertydefaultConfigstatic readonly defaultConfig: { defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }Default visual configuration for row headers.
propertysymbolstatic readonly symbol: symbolDI token for resolving the row header plugin.
methodapply apply(operations: Operation[]): ISheetRowNumberReturns unchanged plugin state for every transaction.
operations: Operation[]
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): { defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }Reads the row header render configuration from ConfigEngine.
searCore: SearCoreSheet
methodinitialize initialize(): voidInitializes row header runtime state.
methodonResize onResize(): voidRow header dimensions are recomputed during render after resize.
methodonScroll onScroll(_scrollManagerState: ScrollManagerState): voidRow header positions are recomputed during render from scroll state.
_scrollManagerState: ScrollManagerState
methodregisterConfig registerConfig(): { config: ConfigUnit<{ defaultBackgroundColor: string; defaultBorderColor: string; defaultWidth: number }>; key: PluginKey }[]Registers default row header configuration.
methodregisterState registerState(): { key: PluginKey; state: ISheetRowNumber }Registers the stateless row header plugin with PluginManager.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Renders visible row header cells.
ReturnsRender nodes for visible row headers.
searCore: SearCoreSheetSheet core containing data and render services.
offset: { x: number; y: number }World 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
- interfaceSheetRangePositionContextsource ↗
-
interface SheetRangePositionContextExplicit layout inputs required to convert a sheet range to canvas coordinates.
propertycolumnSizes columnSizes: DimensionsCSRMatrixpropertyoffsetX offsetX: numberpropertyoffsetY offsetY: numberpropertyrowSizes rowSizes: DimensionsCSRMatrix - interfaceViewportRangesource ↗
-
interface ViewportRangeComputed 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).
- functionactiveFixedRowOffsetssource ↗
-
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.
fixedRows: FixedRowMatrix | nullrowSizes: DimensionsCSRMatrixscrollY: numberfrozenRows: numberoffsetY: number
- functioncomputeViewportRangesource ↗
-
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.
scrollManager: ScrollManagerThe scroll manager that holds viewport + scroll position
rowSizes: DimensionsCSRMatrixRow dimension matrix (heights with cumulative boundary lookups)
columnSizes: DimensionsCSRMatrixColumn dimension matrix (widths with cumulative boundary lookups)
offset: { x: number; y: number }Render offset (e.g. frozen header offsets), added to viewport origin
- functiongetSheetRangePositionRectsource ↗
-
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.
start: Pointend: Pointcontext: SheetRangePositionContext
No public exports match that search.