@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
truevalues identify fixed rows.constructor FixedRowMatrix(data?: FixedRowMatrixData, shape?: [number, number]): FixedRowMatrixmethod addItem(row: number, column: number, value: boolean | null): thisAdds an item to the matrix at the specified row and column.
ReturnsThe current instance for chaining.
rowThe row index.
valueThe value to add.
method setItem(row: number, column: number, value: boolean | null): thisStores true sparsely; false and null clear the row's fixed state.
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
- classSheetFixedRowPlugin
-
class SheetFixedRowPlugin extends Plugin<unknown, CellProperties, SheetFixedRowPluginState>Owns fixed-row data, commands, structural projections, export, history, and collaboration.
constructor SheetFixedRowPlugin(state: SheetFixedRowPluginState): SheetFixedRowPluginproperty readonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>Document-state export modules owned by this plugin state.
property 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
property readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Shared transaction algebra used by history and collaboration.
property readonly warnOnDuplicateDepth: falseWhether PluginManager should warn when another ordered plugin shares this depth.
property readonly documentState: PluginDocumentStateContribution<SheetFixedRowPluginState, SheetFixedRowPluginState>staticproperty readonly pluginKey: PluginKeystaticproperty readonly symbol: typeof symbolstaticmethod apply(state: SheetFixedRowPluginState, transaction: Transaction): SheetFixedRowPluginState | nullApplies direct fixed-row updates and projects sheet row structure changes.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerCommands(commands: SheetCommandBus): voidRegisters the public command that fixes or unfixes a row range.
method 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.
method render(): Node<CellProperties>[]Produces scene nodes owned by this plugin for the current core state.
Inherited members 25
Inherited from Plugin.
- depth
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceFixedRowMatrixData
-
Serialized sparse storage accepted by FixedRowMatrix.
property readonly data: boolean | null[]property readonly indices: number[]property readonly indptr: number[] - 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.
property readonly target: PluginKeymethod getRowCount(): numbermethod isRowFixed(index: number): boolean - 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 | nullReads the fixed-row matrix published by SheetFixedRowPlugin.
- functionregisterSheetFixedRowCommands
-
registerSheetFixedRowCommands(commands: SheetCommandBus, dataSource: SheetFixedRowCommandDataSource): voidRegisters the fixed-row command against one plugin-owned state source.
No matching API entries.