API reference
@searsuite/sear-plugin-cell-format
Cell number-format state, commands, display projection, and persistence.
16 exportsderived from source
- classCellFormatMatrixsource ↗
-
class CellFormatMatrix extends CSRMatrix<CellFormat | null>Sparse matrix containing explicit per-cell number formats.
constructorconstructor CellFormatMatrix(data?: CellFormatMatrixData, shape?: [number, number]): CellFormatMatrixdata: CellFormatMatrixDatashape: [number, number]
methodaddItem addItem(row: number, column: number, format: CellFormat | null): thisStores a format through the CSR API.
row: numbercolumn: numberformat: CellFormat | null
methodsetItem setItem(row: number, column: number, format: CellFormat | null): thisStores a validated format, or removes the sparse entry for null.
row: numbercolumn: numberformat: CellFormat | 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
- classCellFormatMatrixErrorsource ↗
-
class CellFormatMatrixError extends SearErrorPublic error raised when persisted Sheet cell-format state is invalid.
constructorconstructor CellFormatMatrixError(message: string, details?: SearErrorDetails): CellFormatMatrixErrormessage: stringdetails: SearErrorDetails
propertycode readonly code: "SHEET_CELL_FORMAT_INVALID"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetCellFormatPluginsource ↗
-
class SheetCellFormatPlugin extends Plugin<unknown, CellProperties, SheetCellFormatPluginState>Plugin owning per-cell number formats, their commands, OT, rendering projection, and export.
constructorconstructor SheetCellFormatPlugin(state: SheetCellFormatPluginState): SheetCellFormatPluginstate: SheetCellFormatPluginState
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetCellFormatPluginState, SheetCellFormatPluginState>Document-state export modules owned by this plugin state.
propertyinterestedIn interestedIn: string[]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
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Shared transaction algebra used by history and collaboration.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
propertydocumentStatestatic readonly documentState: PluginDocumentStateContribution<SheetCellFormatPluginState, SheetCellFormatPluginState>propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: symbolmethodapply apply(state: SheetCellFormatPluginState, transaction: Transaction): SheetCellFormatPluginState | nullApplies a transaction to plugin-owned state and returns the next state.
state: SheetCellFormatPluginStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodregisterCellVisualReaders registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidregistry: SheetCellVisualReaderRegistry
methodregisterCommands registerCommands(commands: SheetCommandBus): voidcommands: SheetCommandBus
methodregisterFormatTransfers registerFormatTransfers(registry: SheetFormatTransferRegistry): voidTransfers only this owner's persisted formats.
registry: SheetFormatTransferRegistry
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidqueries: SheetQueryRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidregistry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellFormatMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellFormatPluginState }Registers one or more plugin-owned state records with the host manager.
methodrender render(): Node<CellProperties>[]Produces scene nodes owned by this plugin for the current core state.
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
- interfaceSheetAdjustRangeCellFormatDecimalsInputsource ↗
-
interface SheetAdjustRangeCellFormatDecimalsInput extends SheetRangeInputInput accepted by AdjustRangeCellFormatDecimalPlacesCommand.
propertydelta readonly delta: number - interfaceSheetCellFormatCommandDataSourcesource ↗
-
interface SheetCellFormatCommandDataSource extends CellFormatCommandRangeDataSourceState access required by the cell-format command.
propertytarget readonly target: PluginKeymethodreadCellFormat readCellFormat(row: number, column: number): CellFormat | nullrow: numbercolumn: number
Inherited members 2
- getColumnCount
- getRowCount
- interfaceSheetCellFormatPluginStatesource ↗
-
interface SheetCellFormatPluginStateState exclusively owned by SheetCellFormatPlugin.
propertycellFormats readonly cellFormats: CellFormatMatrix - interfaceSheetCellFormatReadersource ↗
-
interface SheetCellFormatReaderRead-only projection of one Sheet's persisted cell-format matrix.
- interfaceSheetSetRangeCellFormatInputsource ↗
-
interface SheetSetRangeCellFormatInput extends SheetRangeInputInput accepted by SetRangeCellFormatCommand.
propertyformat readonly format: CellFormat | null - variableAdjustRangeCellFormatDecimalPlacesCommandsource ↗
-
AdjustRangeCellFormatDecimalPlacesCommand: SheetCommandDefinition<SheetAdjustRangeCellFormatDecimalsInput, SheetCommandResult>Public command for increasing or decreasing a range's visible decimal places.
- variableReadSheetCellFormatQuerysource ↗
-
ReadSheetCellFormatQuery: SheetQueryDefinition<void, SheetCellFormatReader>Reads the active Sheet's live, read-only cell-format projection.
- variableSetRangeCellFormatCommandsource ↗
-
SetRangeCellFormatCommand: SheetCommandDefinition<SheetSetRangeCellFormatInput, SheetCommandResult>Public command for setting or clearing the number format of a cell range.
- variableSheetCellFormatFieldKeysource ↗
-
SheetCellFormatFieldKey: "sheet.cellFormat"DataEngine field owned by SheetCellFormatPlugin.
- functioncreateAdjustCellFormatDecimalOperationssource ↗
-
createAdjustCellFormatDecimalOperations(input: SheetAdjustRangeCellFormatDecimalsInput, dataSource: SheetCellFormatCommandDataSource): UpdateCellOTOperation<CellFormat>[]Creates sparse MatrixOT updates for a decimal-place adjustment.
input: SheetAdjustRangeCellFormatDecimalsInputdataSource: SheetCellFormatCommandDataSource
- functioncreateSetRangeCellFormatOperationssource ↗
-
createSetRangeCellFormatOperations(input: SheetSetRangeCellFormatInput, dataSource: SheetCellFormatCommandDataSource): UpdateCellOTOperation<CellFormat>[]Creates sparse MatrixOT updates for one format range.
input: SheetSetRangeCellFormatInputdataSource: SheetCellFormatCommandDataSource
- functionreadSheetCellFormatssource ↗
-
readSheetCellFormats(dataEngine: DataEngine): CellFormatMatrix | nullReads the live format matrix published by SheetCellFormatPlugin.
dataEngine: DataEngine
- functionregisterSheetCellFormatCommandsource ↗
-
registerSheetCellFormatCommand(commands: SheetCommandBus, dataSource: SheetCellFormatCommandDataSource): voidRegisters the command owned by SheetCellFormatPlugin.
commands: SheetCommandBusdataSource: SheetCellFormatCommandDataSource
No public exports match that search.