← All packages

@searsuite/sear-plugin-fixed-row

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

Fixed row state

classFixedRowMatrix
class FixedRowMatrix extends CSRMatrix<boolean | null>

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

constructorFixedRowMatrix(data?: FixedRowMatrixData, shape?: [number, number]): FixedRowMatrix
methodaddItem(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

The row index.

value

The value to add.

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

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

Inherited members 34

Inherited from CSRMatrix.

classSheetFixedRowPlugin
class SheetFixedRowPlugin extends Plugin<unknown, CellProperties, SheetFixedRowPluginState>

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

constructorSheetFixedRowPlugin(state: SheetFixedRowPluginState): SheetFixedRowPlugin
propertyreadonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>

Document-state export modules owned by this plugin state.

propertyinterestedIn: 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
propertyreadonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }

Shared transaction algebra used by history and collaboration.

propertyreadonly warnOnDuplicateDepth: false

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

propertyreadonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>static
propertyreadonly pluginKey: PluginKeystatic
propertyreadonly symbol: typeof symbolstatic
methodapply(state: SheetFixedRowPluginState, transaction: Transaction): SheetFixedRowPluginState | null

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

methodgetPluginConfig(): null

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

methodregisterCommands(commands: SheetCommandBus): void

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

methodregisterState(): { 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(): Node<CellProperties>[]

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

Inherited members 25

Inherited from Plugin.

interfaceFixedRowMatrixData

Serialized sparse storage accepted by FixedRowMatrix.

interfaceSheetFixedRowPluginState

State owned exclusively by SheetFixedRowPlugin.

variableSheetFixedRowsFieldKey
SheetFixedRowsFieldKey: "sheet.fixedRows"

Stable Sheet data-view field owned by SheetFixedRowPlugin.

Set and read fixed rows

interfaceSheetFixedRowCommandDataSource

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

interfaceSheetSetRowsFixedInput

Public input for fixing or unfixing rows.

variableSetSheetRowsFixedCommand
SetSheetRowsFixedCommand: SheetCommandDefinition<SheetSetRowsFixedInput, SheetCommandResult>

Sets the fixed state for a contiguous row range.

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

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

functionreadSheetFixedRows
readSheetFixedRows(dataEngine: DataEngine): FixedRowMatrix | null

Reads the fixed-row matrix published by SheetFixedRowPlugin.

functionregisterSheetFixedRowCommands
registerSheetFixedRowCommands(commands: SheetCommandBus, dataSource: SheetFixedRowCommandDataSource): void

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