API reference
@searsuite/sear-plugin-cell-merge
Merged-range state, structural transforms, commands, rendering, and persistence.
24 exportsderived from source
- classCellMergeMatrixsource ↗
-
class CellMergeMatrix extends CSRMatrix<SheetCellMerge | null>Sparse matrix containing one end coordinate at every merged-range anchor.
constructorconstructor CellMergeMatrix(data?: CellMergeMatrixData, shape?: [number, number]): CellMergeMatrixdata: CellMergeMatrixDatashape: [number, number]
methodaddItem addItem(row: number, column: number, value: SheetCellMerge | null): thisAdds an item to the matrix at the specified row and column.
ReturnsThe current instance for chaining.
row: numberThe row index.
column: numbervalue: SheetCellMerge | nullThe value to add.
methodclone clone(): thisDeep-clones stored merge values.
methodfindRange findRange(row: number, column: number): Rect | nullFinds the merged range containing one sheet cell.
row: numbercolumn: number
methodforEachStored forEachStored(callback: (value: SheetCellMerge | null, row: number, col: number): void): voidVisits actual anchors only, locating their rows through CSR pointer binary search.
callback: (value: SheetCellMerge | null, row: number, col: number): void
methodgetItem getItem(row: number, column: number): SheetCellMerge | nullReturns an isolated value so callers cannot mutate persisted matrix state.
row: numbercolumn: number
methodgetRanges getRanges(): Rect[]Returns all merged ranges in matrix traversal order.
methodreplaceRanges replaceRanges(ranges: readonly Rect[]): thisRebuilds sparse entries from normalized ranges while preserving matrix shape.
ranges: readonly Rect[]
methodsetItem setItem(row: number, column: number, value: SheetCellMerge | null): thisStores or clears a merged range anchored at the supplied cell.
row: numbercolumn: numbervalue: SheetCellMerge | null
Inherited members 31
Inherited from CSRMatrix.
- name
- ndim
- nnz
- shape
- addColumn
- addListener
- addRow
- cloneCommittedView
- cloneDetached
- cloneForStaging
- deleteColumns
- deleteRows
- dispatch
- dot
- forEach
- forEachStoredInRange
- forEachStoredInRow
- fromDense
- getCol
- getDefaultValue
- getRow
- lockMutations
- multiply
- removeItem
- removeListener
- setDefaultValue
- sum
- swapColumn
- swapRow
- toArray
- transpose
- classSheetCellMergeConfirmationErrorsource ↗
-
class SheetCellMergeConfirmationError extends SearErrorBase class for errors intentionally exposed by SearSuite packages.
Packages may throw this generic form while they do not need a more specific public error type. Domain-specific subclasses override
code.constructorconstructor SheetCellMergeConfirmationError(reason: "required" | "changed"): SheetCellMergeConfirmationErrorreason: "required" | "changed"
propertycode readonly code: "SHEET_MERGE_CONFIRMATION_REQUIRED"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetCellMergePluginsource ↗
-
class SheetCellMergePlugin extends Plugin<unknown, CellProperties, SheetCellMergePluginState>Owns sparse merged-cell state, commands, structure projection, collaboration, and export.
constructorconstructor SheetCellMergePlugin(state: SheetCellMergePluginState, cellContent?: SheetCellMergeContentSource): SheetCellMergePluginstate: SheetCellMergePluginStatecellContent: SheetCellMergeContentSource
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetCellMergePluginState, SheetCellMergePluginState>Document-state export modules owned by this plugin state.
propertyinterestedIn interestedIn: MatrixOTActionName[]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<SheetCellMergePluginState, SheetCellMergePluginState>propertypluginKeystatic readonly pluginKey: PluginKeypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(pluginState: SheetCellMergePluginState, transaction: Transaction): SheetCellMergePluginState | nullApplies a transaction to plugin-owned state and returns the next state.
pluginState: SheetCellMergePluginStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
methodisMergedCell isMergedCell(row: number, column: number): Rect | nullrow: numbercolumn: number
methodregisterCommands registerCommands(commands: SheetCommandBus): voidcommands: SheetCommandBus
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidqueries: SheetQueryRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidMoves complete merged ranges and rejects moves that split a merge.
registry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellMergeMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellMergePluginState }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
- classSheetMergeRangeMoveErrorsource ↗
-
class SheetMergeRangeMoveError extends SearErrorA cell move that would split an existing merged range.
constructorconstructor SheetMergeRangeMoveError(context: SheetRangeMoveContext): SheetMergeRangeMoveErrorcontext: SheetRangeMoveContext
propertycode readonly code: "SHEET_MOVE_SPLIT_MERGE"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetMergeStructureMoveErrorsource ↗
-
class SheetMergeStructureMoveError extends SearErrorA structure permutation would leave a merged range noncontiguous.
constructorconstructor SheetMergeStructureMoveError(range: readonly readonly number[][]): SheetMergeStructureMoveErrorrange: readonly readonly number[][]
propertycode readonly code: "SHEET_STRUCTURE_MOVE_SPLIT_MERGE"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- interfaceCellMergeMatrixDatasource ↗
-
interface CellMergeMatrixDataSerialized CSR entries accepted by CellMergeMatrix.
- interfaceSheetCellMergesource ↗
-
interface SheetCellMergeSparse value stored only at the top-left cell of a merged range.
- interfaceSheetCellMergeActionDataSourcesource ↗
-
interface SheetCellMergeActionDataSource extends SheetCellMergeCommandDataSourcepropertycellContent readonly cellContent: SheetCellMergeContentSource - interfaceSheetCellMergeCommandDataSourcesource ↗
-
interface SheetCellMergeCommandDataSourcepropertytarget readonly target: PluginKeymethodreadMatrix readMatrix(): CellMergeMatrix - interfaceSheetCellMergeContentSourcesource ↗
-
interface SheetCellMergeContentSource - interfaceSheetCellMergePluginStatesource ↗
-
interface SheetCellMergePluginStatepropertycellMerges cellMerges: CellMergeMatrix - interfaceSheetMergeAnalysissource ↗
-
interface SheetMergeAnalysispropertydiscardedCells readonly discardedCells: readonly SheetMergeDiscardedCell[]propertyend readonly end: readonly [number, number]propertyretainedCell readonly retainedCell: SheetMergeDiscardedCell | nullpropertystart readonly start: readonly [number, number] - interfaceSheetMergeInputsource ↗
-
interface SheetMergeInput extends SheetRangeInputCommon range input accepted by explicit range commands.
propertyconfirmation readonly confirmation?: SheetMergeAnalysis - variableAnalyzeMergeCellsQuerysource ↗
-
AnalyzeMergeCellsQuery: SheetQueryDefinition<SheetRangeInput, SheetMergeAnalysis | null> - variableMergeCellsCommandsource ↗
-
MergeCellsCommand: SheetCommandDefinition<SheetMergeInput, SheetCommandResult> - variableSheetCellMergeFieldKeysource ↗
-
SheetCellMergeFieldKey: "sheet.cellMerge"DataEngine field owned by SheetCellMergePlugin.
- variableToggleMergeCellsCommandsource ↗
-
ToggleMergeCellsCommand: SheetCommandDefinition<SheetMergeInput, SheetCommandResult> - variableUnmergeCellsCommandsource ↗
-
UnmergeCellsCommand: SheetCommandDefinition<SheetRangeInput, SheetCommandResult> - functionanalyzeMergeCellssource ↗
-
analyzeMergeCells(input: SheetRangeInput, dataSource: SheetCellMergeActionDataSource): SheetMergeAnalysis | nullinput: SheetRangeInputdataSource: SheetCellMergeActionDataSource
- functioncreateMergeCellsOperationssource ↗
-
createMergeCellsOperations(input: SheetRangeInput, dataSource: SheetCellMergeCommandDataSource): UpdateCellOTOperation<SheetCellMerge>[]input: SheetRangeInputdataSource: SheetCellMergeCommandDataSource
- functioncreateUnmergeCellsOperationssource ↗
-
createUnmergeCellsOperations(input: SheetRangeInput, dataSource: SheetCellMergeCommandDataSource): UpdateCellOTOperation<SheetCellMerge>[]input: SheetRangeInputdataSource: SheetCellMergeCommandDataSource
- functionreadSheetCellMergessource ↗
-
readSheetCellMerges(dataEngine: DataEngine): CellMergeMatrix | nullReads merged-cell state published by SheetCellMergePlugin.
dataEngine: DataEngine
- functionregisterSheetCellMergeCommandssource ↗
-
registerSheetCellMergeCommands(commands: SheetCommandBus, dataSource: SheetCellMergeActionDataSource): voidRegisters every command owned by SheetCellMergePlugin.
commands: SheetCommandBusdataSource: SheetCellMergeActionDataSource
- functionregisterSheetCellMergeQueriessource ↗
-
registerSheetCellMergeQueries(queries: SheetQueryRegistry, dataSource: SheetCellMergeActionDataSource): voidqueries: SheetQueryRegistrydataSource: SheetCellMergeActionDataSource
No public exports match that search.