← All packages

API reference

@searsuite/sear-plugin-fixed-row

Sparse fixed-row state, structural transforms, visual projection, collaboration, and export.

11 exportsderived from source

classFixedRowMatrixsource ↗
class FixedRowMatrix extends CSRMatrix<boolean | null>

Sparse one-by-row-count matrix whose stored true values identify fixed rows.

constructorconstructor
FixedRowMatrix(data?: FixedRowMatrixData, shape?: [number, number]): FixedRowMatrix
data: FixedRowMatrixData
shape: [number, number]
methodaddItem
addItem(row: number, column: number, value: boolean | null): this

Adds an item to the matrix at the specified row and column.

ReturnsThe current instance for chaining.

row: number

The row index.

column: number
value: boolean | null

The value to add.

methodsetItem
setItem(row: number, column: number, value: boolean | null): this

Stores true sparsely; false and null clear the row's fixed state.

row: number
column: number
value: boolean | null
Inherited members 34

Inherited from CSRMatrix.

classSheetFixedRowPluginsource ↗
class SheetFixedRowPlugin extends Plugin<unknown, CellProperties, SheetFixedRowPluginState>

Owns fixed-row data, commands, structural projections, export, history, and collaboration.

constructorconstructor
SheetFixedRowPlugin(state: SheetFixedRowPluginState): SheetFixedRowPlugin
state: SheetFixedRowPluginState
propertydocumentState
readonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>

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 apply when a transaction contains at least one operation matching these action names, unless the transaction is owned by this plugin.

  • [&#39;uc&#39;, &#39;rr&#39;, &#39;rc&#39;] — only called for UpdateCell, ResizeRow, ResizeCol
  • [&#39;*&#39;] — 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: false

Whether PluginManager should warn when another ordered plugin shares this depth.

propertydocumentStatestatic
readonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>
propertypluginKeystatic
readonly pluginKey: PluginKey
propertysymbolstatic
readonly symbol: typeof symbol
methodapply
apply(state: SheetFixedRowPluginState, transaction: Transaction): SheetFixedRowPluginState | null

Applies direct fixed-row updates and projects sheet row structure changes.

state: SheetFixedRowPluginState
transaction: Transaction
methodgetPluginConfig
getPluginConfig(): null

Returns this plugin's runtime configuration view for the current core.

methodregisterCommands
registerCommands(commands: SheetCommandBus): void

Registers the public command that fixes or unfixes a row range.

commands: SheetCommandBus
methodregisterState
registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): FixedRowMatrix; viewKey: string }[] }; key: PluginKey; state: SheetFixedRowPluginState }

Publishes the plugin-owned matrix as a read-only Sheet data-view field.

methodrender
render(): Node<CellProperties>[]

Produces scene nodes owned by this plugin for the current core state.

Inherited members 26

Inherited from Plugin.

interfaceFixedRowMatrixDatasource ↗
interface FixedRowMatrixData

Serialized sparse storage accepted by FixedRowMatrix.

propertydata
readonly data: boolean | null[]
propertyindices
readonly indices: number[]
propertyindptr
readonly indptr: number[]
interfaceSheetFixedRowCommandDataSourcesource ↗
interface SheetFixedRowCommandDataSource

Fixed-row state needed to validate and create invertible command operations.

propertytarget
readonly target: PluginKey
methodgetRowCount
getRowCount(): number
methodisRowFixed
isRowFixed(index: number): boolean
index: number
interfaceSheetFixedRowPluginStatesource ↗
interface SheetFixedRowPluginState

State owned exclusively by SheetFixedRowPlugin.

propertyfixedRows
readonly fixedRows: FixedRowMatrix
interfaceSheetSetRowsFixedInputsource ↗
interface SheetSetRowsFixedInput

Public input for fixing or unfixing rows.

propertycount
readonly count?: number
propertyfixed
readonly fixed: boolean
propertyindex
readonly index: number
variableSetSheetRowsFixedCommandsource ↗
SetSheetRowsFixedCommand: SheetCommandDefinition<SheetSetRowsFixedInput, SheetCommandResult>

Sets the fixed state for a contiguous row range.

variableSheetFixedRowsFieldKeysource ↗
SheetFixedRowsFieldKey: "sheet.fixedRows"

Stable Sheet data-view field owned by SheetFixedRowPlugin.

functioncreateSetSheetRowsFixedOperationssource ↗
createSetSheetRowsFixedOperations(input: SheetSetRowsFixedInput, dataSource: SheetFixedRowCommandDataSource): UpdateCellOTOperation<boolean>[]

Creates sparse, invertible fixed-row updates for a normalized row range.

input: SheetSetRowsFixedInput
dataSource: SheetFixedRowCommandDataSource
functionreadSheetFixedRowssource ↗
readSheetFixedRows(dataEngine: DataEngine): FixedRowMatrix | null

Reads the fixed-row matrix published by SheetFixedRowPlugin.

dataEngine: DataEngine
functionregisterSheetFixedRowCommandssource ↗
registerSheetFixedRowCommands(commands: SheetCommandBus, dataSource: SheetFixedRowCommandDataSource): void

Registers the fixed-row command against one plugin-owned state source.

commands: SheetCommandBus
dataSource: SheetFixedRowCommandDataSource