API reference
@searsuite/sear-plugin-header-highlight
Header highlight behavior derived from Sheet selections.
2 exportsderived from source
- classSheetHeaderHighlightPluginsource ↗
-
class SheetHeaderHighlightPlugin extends Plugin<SearCoreSheet, CellProperties, ISheetHeaderHighlight>Row-header / column-header selection highlight plugin.
The plugin reads selection from DataEngine during render and uses AffixCell nodes with explicit depths so highlights stay between header backgrounds, header text and the primary selection box.
constructorconstructor SheetHeaderHighlightPlugin(sheetSelectionPlugin: SheetSelectionPlugin, sheetCornerPlugin: SheetCornerPlugin): SheetHeaderHighlightPluginCreates a SheetHeaderHighlightPlugin instance.
sheetSelectionPlugin: SheetSelectionPluginsheetCornerPlugin: SheetCornerPlugin
propertydepth depth: numberBase render depth for plugin-generated nodes.
The plugin places highlight background at
depth + 1.5and emphasis bars atdepth + 3to guarantee stable stacking relative to default header nodes.propertyinterestedIn interestedIn: MatrixOTActionName | RectOTActionName[]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: PluginKeyStable plugin key for SheetHeaderHighlightPlugin.
propertysymbolstatic readonly symbol: symbolDI token for resolving SheetHeaderHighlightPlugin.
methodapply apply(pluginState: ISheetHeaderHighlight, _transaction: Transaction): ISheetHeaderHighlightApplies a transaction to SheetHeaderHighlightPlugin state.
pluginState: ISheetHeaderHighlight_transaction: Transaction
methodgetPluginConfig getPluginConfig(searCore: SearCoreSheet): nullReturns plugin-specific configuration.
This plugin currently reads config directly from
configEngineduring render.searCore: SearCoreSheet
methodregisterConfig registerConfig(): { config: ConfigUnit<{ columnHeaderHeight: number; headerHighlightActiveBarThickness: number; headerHighlightActiveBorderColor: string; headerHighlightBackgroundColor: string; headerHighlightBorderColor: string; mode: SheetHeaderHighlightMode }>; key: PluginKey }[]Registers default configuration for this plugin.
methodregisterState registerState(): { key: PluginKey; state: ISheetHeaderHighlight }Registers plugin state into the host state store.
methodrender render(searCore: SearCoreSheet, offset?: { x: number; y: number }): Node<CellProperties>[]Builds highlight nodes for row and column headers based on current selection and mode.
Rendering flow:
- Resolve selection state from
SheetSelectionPlugin. - Early-return when selection is empty.
- Resolve table dimensions and plugin config.
- Compose offsets to match header layout around the corner region.
- Delegate to range/cross mode builders.
ReturnsFlat list of nodes to add into the stage for this frame.
searCore: SearCoreSheetActive core sheet instance.
offset: { x: number; y: number }World-space offset propagated by the render pipeline.
Inherited members 27
Inherited from Plugin.
- documentState
- pluginKey
- transactionHistory
- transactionOT
- warnOnDuplicateDepth
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- typeSheetHeaderHighlightModesource ↗
-
type SheetHeaderHighlightMode = "selection-range" | "cross-active"Controls how header highlighting is computed.
selection-range: highlight all row/column headers covered by the selection bounding box.cross-active: highlight only the active row and active column around the selection anchor.
No public exports match that search.