API reference
@searsuite/sear-plugin-cell-fill
Sparse Sheet fill state, commands, visual projection, collaboration, and export.
14 exportsderived from source
- classCellFillMatrixsource ↗
-
class CellFillMatrix extends CSRMatrix<SheetCellFill | null>Sparse cell-fill matrix. An absent cell has no fill.
constructorconstructor CellFillMatrix(data?: CellFillMatrixData, shape?: [number, number]): CellFillMatrixCreates a sparse cell-fill matrix from serialized CSR data.
data: CellFillMatrixDatashape: [number, number]
methodaddItem addItem(row: number, col: number, value: templateLiteral | null): thisStores a fill color through the CSR API, removing the entry for null.
row: numbercol: numbervalue: templateLiteral | null
methodsetItem setItem(row: number, col: number, value: templateLiteral | null): thisStores a fill color. Null is represented by removing the sparse entry.
row: numbercol: numbervalue: templateLiteral | null
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
- classSheetCellFillPluginsource ↗
-
class SheetCellFillPlugin extends Plugin<unknown, CellProperties, SheetCellFillPluginState>Plugin that owns cell fill data, commands, structural projections, and export.
constructorconstructor SheetCellFillPlugin(state: SheetCellFillPluginState): SheetCellFillPluginConstructs the plugin around a shared sparse fill matrix.
state: SheetCellFillPluginState
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>SheetCellFillPlugin owns its persisted state module.
propertyinterestedIn interestedIn: string[]Fill follows direct updates and all sheet structure changes.
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Fill transactions share the registered MatrixOT algebra.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseFill state is data-only and does not use render-depth diagnostics.
propertydocumentStatestatic readonly documentState: PluginDocumentStateContribution<SheetCellFillPluginState, SheetCellFillPluginState>Document-state export contribution for cell fills.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key shared by all cell-fill plugin instances.
propertysymbolstatic readonly symbol: symbolDI token for resolving the cell-fill plugin.
methodapply apply(pluginState: SheetCellFillPluginState, transaction: Transaction): SheetCellFillPluginState | nullApplies direct fill and structural matrix operations.
pluginState: SheetCellFillPluginStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(): nullCell-fill data has no render-time configuration.
methodregisterCellVisualReaders registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidContributes explicit fill colors to the shared Sheet cell visual pipeline.
registry: SheetCellVisualReaderRegistry
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters the cell-fill command owned by this plugin.
commands: SheetCommandBus
methodregisterFormatTransfers registerFormatTransfers(registry: SheetFormatTransferRegistry): voidTransfers only this owner's persisted formats.
registry: SheetFormatTransferRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidregistry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellFillMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellFillPluginState }Registers fill state for commands, projections, and collaboration.
methodrender render(): Node<CellProperties>[]Cell-fill data contributes through grid cell properties, not scene nodes.
Inherited members 26
Inherited from Plugin.
- depth
- pluginKey
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceCellFillMatrixDatasource ↗
-
interface CellFillMatrixDataSerialized sparse entries accepted by CellFillMatrix.
- interfaceSheetCellFillCommandDataSourcesource ↗
-
interface SheetCellFillCommandDataSource extends CellFillCommandRangeDataSourceState access required by the cell-fill command.
propertytarget readonly target: PluginKeymethodreadCellFill readCellFill(row: number, column: number): templateLiteral | nullrow: numbercolumn: number
Inherited members 2
- getColumnCount
- getRowCount
- interfaceSheetCellFillPluginStatesource ↗
-
interface SheetCellFillPluginStateState owned by SheetCellFillPlugin.
propertycellFills cellFills: CellFillMatrixSparse matrix containing explicit cell fill colors.
- interfaceSheetSetRangeCellFillInputsource ↗
-
interface SheetSetRangeCellFillInput extends SheetRangeInputPublic input for setting or clearing cell fill in a range.
propertyfill readonly fill: templateLiteral | null - typeSheetCellFillsource ↗
-
type SheetCellFill = HexColorA persisted cell fill color represented as a CSS-compatible hexadecimal color.
- variableSetRangeCellFillCommandsource ↗
-
SetRangeCellFillCommand: SheetCommandDefinition<SheetSetRangeCellFillInput, SheetCommandResult>Public command for setting or clearing cell fill in a range.
- variableSheetCellFillFieldKeysource ↗
-
SheetCellFillFieldKey: "sheet.cellFill"DataEngine field owned by SheetCellFillPlugin.
- functionassertSheetCellFillsource ↗
-
assertSheetCellFill(value: unknown): valueAsserts that a value is a supported cell fill color.
value: unknown
- functioncreateSetRangeCellFillOperationssource ↗
-
createSetRangeCellFillOperations(input: SheetSetRangeCellFillInput, dataSource: SheetCellFillCommandDataSource): UpdateCellOTOperation<templateLiteral>[]Creates sparse update operations for a cell-fill range.
input: SheetSetRangeCellFillInputdataSource: SheetCellFillCommandDataSource
- functionisSheetCellFillsource ↗
-
isSheetCellFill(value: unknown): valueReturns whether a value is a supported cell fill color.
value: unknown
- functionreadSheetCellFillssource ↗
-
readSheetCellFills(dataEngine: DataEngine): CellFillMatrix | nullReads cell fills published by SheetCellFillPlugin.
dataEngine: DataEngine
- functionregisterSheetCellFillCommandsource ↗
-
registerSheetCellFillCommand(commands: SheetCommandBus, dataSource: SheetCellFillCommandDataSource): voidRegisters the cell-fill command owned by SheetCellFillPlugin.
commands: SheetCommandBusdataSource: SheetCellFillCommandDataSource
No public exports match that search.