← All packages

@searsuite/sear-plugin-cell-fill

Sparse Sheet fill state, commands, visual projection, collaboration, and export.

Fill values

classCellFillMatrix
class CellFillMatrix extends CSRMatrix<SheetCellFill | null>

Sparse cell-fill matrix. An absent cell has no fill.

constructorCellFillMatrix(data?: CellFillMatrixData, shape?: [number, number]): CellFillMatrix

Creates a sparse cell-fill matrix from serialized CSR data.

methodaddItem(row: number, col: number, value: templateLiteral | null): this

Stores a fill color through the CSR API, removing the entry for null.

methodsetItem(row: number, col: number, value: templateLiteral | null): this

Stores a fill color. Null is represented by removing the sparse entry.

Inherited members 34

Inherited from CSRMatrix.

interfaceCellFillMatrixData

Serialized sparse entries accepted by CellFillMatrix.

typeSheetCellFill
type SheetCellFill = HexColor

A persisted cell fill color represented as a CSS-compatible hexadecimal color.

functionassertSheetCellFill
assertSheetCellFill(value: unknown): value

Asserts that a value is a supported cell fill color.

functionisSheetCellFill
isSheetCellFill(value: unknown): value

Returns whether a value is a supported cell fill color.

Set and read fills

classSheetCellFillPlugin
class SheetCellFillPlugin extends Plugin<unknown, CellProperties, SheetCellFillPluginState>

Plugin that owns cell fill data, commands, structural projections, and export.

constructorSheetCellFillPlugin(state: SheetCellFillPluginState): SheetCellFillPlugin

Constructs the plugin around a shared sparse fill matrix.

propertyreadonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>

SheetCellFillPlugin owns its persisted state module.

propertyinterestedIn: string[]

Fill follows direct updates and all sheet structure changes.

propertyreadonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }

Fill transactions share the registered MatrixOT algebra.

propertyreadonly warnOnDuplicateDepth: false

Fill state is data-only and does not use render-depth diagnostics.

propertyreadonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>static

Document-state export contribution for cell fills.

propertyreadonly pluginKey: PluginKeystatic

Stable plugin key shared by all cell-fill plugin instances.

propertyreadonly symbol: symbolstatic

DI token for resolving the cell-fill plugin.

methodapply(pluginState: SheetCellFillPluginState, transaction: Transaction): SheetCellFillPluginState | null

Applies direct fill and structural matrix operations.

methodgetPluginConfig(): null

Cell-fill data has no render-time configuration.

methodregisterCellVisualReaders(registry: SheetCellVisualReaderRegistry): void

Contributes explicit fill colors to the shared Sheet cell visual pipeline.

methodregisterCommands(commands: SheetCommandBus): void

Registers the cell-fill command owned by this plugin.

methodregisterFormatTransfers(registry: SheetFormatTransferRegistry): void

Transfers only this owner's persisted formats.

methodregisterRangeMoves(registry: SheetRangeMoveRegistry): void
methodregisterRangeReorders(registry: SheetRangeReorderRegistry): void
methodregisterState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellFillMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellFillPluginState }

Registers fill state for commands, projections, and collaboration.

methodrender(): Node<CellProperties>[]

Cell-fill data contributes through grid cell properties, not scene nodes.

Inherited members 25

Inherited from Plugin.

interfaceSheetCellFillCommandDataSource
interface SheetCellFillCommandDataSource extends CellFillCommandRangeDataSource

State access required by the cell-fill command.

Inherited members 2
  • getColumnCount
  • getRowCount
interfaceSheetCellFillPluginState

State owned by SheetCellFillPlugin.

propertycellFills: CellFillMatrix

Sparse matrix containing explicit cell fill colors.

interfaceSheetSetRangeCellFillInput
interface SheetSetRangeCellFillInput extends SheetRangeInput

Public input for setting or clearing cell fill in a range.

Inherited members 2

Inherited from SheetRangeInput.

variableSetRangeCellFillCommand
SetRangeCellFillCommand: SheetCommandDefinition<SheetSetRangeCellFillInput, SheetCommandResult>

Public command for setting or clearing cell fill in a range.

variableSheetCellFillFieldKey
SheetCellFillFieldKey: "sheet.cellFill"

DataEngine field owned by SheetCellFillPlugin.

functioncreateSetRangeCellFillOperations
createSetRangeCellFillOperations(input: SheetSetRangeCellFillInput, dataSource: SheetCellFillCommandDataSource): UpdateCellOTOperation<templateLiteral>[]

Creates sparse update operations for a cell-fill range.

functionreadSheetCellFills
readSheetCellFills(dataEngine: DataEngine): CellFillMatrix | null

Reads cell fills published by SheetCellFillPlugin.

functionregisterSheetCellFillCommand
registerSheetCellFillCommand(commands: SheetCommandBus, dataSource: SheetCellFillCommandDataSource): void

Registers the cell-fill command owned by SheetCellFillPlugin.