@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.
constructor CellFillMatrix(data?: CellFillMatrixData, shape?: [number, number]): CellFillMatrixCreates a sparse cell-fill matrix from serialized CSR data.
method addItem(row: number, col: number, value: templateLiteral | null): thisStores a fill color through the CSR API, removing the entry for null.
method setItem(row: number, col: number, value: templateLiteral | null): thisStores a fill color. Null is represented by removing the sparse entry.
Inherited members 34
Inherited from CSRMatrix.
- name
- ndim
- nnz
- shape
- addColumn
- addListener
- addRow
- clone
- cloneCommittedView
- cloneDetached
- cloneForStaging
- deleteColumns
- deleteRows
- dispatch
- dot
- forEach
- forEachStored
- forEachStoredInRange
- forEachStoredInRow
- fromDense
- getCol
- getDefaultValue
- getItem
- getRow
- lockMutations
- multiply
- removeItem
- removeListener
- setDefaultValue
- sum
- swapColumn
- swapRow
- toArray
- transpose
- interfaceCellFillMatrixData
-
Serialized sparse entries accepted by CellFillMatrix.
property readonly data: string | null[]property readonly indices: number[]property readonly indptr: number[] - typeSheetCellFill
-
type SheetCellFill = HexColorA persisted cell fill color represented as a CSS-compatible hexadecimal color.
- functionassertSheetCellFill
-
assertSheetCellFill(value: unknown): valueAsserts that a value is a supported cell fill color.
- functionisSheetCellFill
-
isSheetCellFill(value: unknown): valueReturns 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.
constructor SheetCellFillPlugin(state: SheetCellFillPluginState): SheetCellFillPluginConstructs the plugin around a shared sparse fill matrix.
property readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>SheetCellFillPlugin owns its persisted state module.
property interestedIn: string[]Fill follows direct updates and all sheet structure changes.
property readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Fill transactions share the registered MatrixOT algebra.
property readonly warnOnDuplicateDepth: falseFill state is data-only and does not use render-depth diagnostics.
property readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>staticDocument-state export contribution for cell fills.
property readonly pluginKey: PluginKeystaticStable plugin key shared by all cell-fill plugin instances.
property readonly symbol: symbolstaticDI token for resolving the cell-fill plugin.
method apply(pluginState: SheetCellFillPluginState, transaction: Transaction): SheetCellFillPluginState | nullApplies direct fill and structural matrix operations.
method getPluginConfig(): nullCell-fill data has no render-time configuration.
method registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidContributes explicit fill colors to the shared Sheet cell visual pipeline.
method registerCommands(commands: SheetCommandBus): voidRegisters the cell-fill command owned by this plugin.
method registerFormatTransfers(registry: SheetFormatTransferRegistry): voidTransfers only this owner's persisted formats.
method registerRangeMoves(registry: SheetRangeMoveRegistry): voidmethod registerRangeReorders(registry: SheetRangeReorderRegistry): voidmethod registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellFillMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellFillPluginState }Registers fill state for commands, projections, and collaboration.
method render(): Node<CellProperties>[]Cell-fill data contributes through grid cell properties, not scene nodes.
Inherited members 25
Inherited from Plugin.
- depth
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceSheetCellFillCommandDataSource
-
interface SheetCellFillCommandDataSource extends CellFillCommandRangeDataSourceState access required by the cell-fill command.
property readonly target: PluginKeymethod readCellFill(row: number, column: number): templateLiteral | nullInherited members 2
- getColumnCount
- getRowCount
- interfaceSheetCellFillPluginState
-
State owned by SheetCellFillPlugin.
property cellFills: CellFillMatrixSparse matrix containing explicit cell fill colors.
- interfaceSheetSetRangeCellFillInput
-
interface SheetSetRangeCellFillInput extends SheetRangeInputPublic input for setting or clearing cell fill in a range.
- 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 | nullReads cell fills published by SheetCellFillPlugin.
- functionregisterSheetCellFillCommand
-
registerSheetCellFillCommand(commands: SheetCommandBus, dataSource: SheetCellFillCommandDataSource): voidRegisters the cell-fill command owned by SheetCellFillPlugin.
No matching API entries.