@searsuite/sear-plugin-freeze
Persistent Sheet freeze boundaries and typed command surface.
Freeze state
- classSheetFreezeBoundaryError
-
class SheetFreezeBoundaryError extends SearErrorPublic invalid-boundary error with stable diagnostics.
constructor SheetFreezeBoundaryError(input: SheetFreezeState, rowCount: number, columnCount: number): SheetFreezeBoundaryErrorproperty readonly code: "SHEET_FREEZE_INVALID_BOUNDARY"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classSheetFreezeMatrix
-
class SheetFreezeMatrix extends CSRMatrix<number | null>One row with the frozen row and column counts at columns zero and one.
constructor SheetFreezeMatrix(data?: SheetFreezeMatrixData, shape?: [number, number]): SheetFreezeMatrixCreates or restores a freeze matrix.
method addItem(row: number, column: number, value: number | null): thisAdds a boundary count through the same sparse normalization.
method setItem(row: number, column: number, value: number | null): thisSets a boundary count, removing empty values from sparse storage.
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
- classSheetFreezePlugin
-
class SheetFreezePlugin extends Plugin<unknown, CellProperties, SheetFreezePluginState>Owns the persistent row and column prefix kept visible during scrolling.
constructor SheetFreezePlugin(state: SheetFreezePluginState, shape: (): readonly [number, number]): SheetFreezePluginproperty readonly documentState: PluginDocumentStateContribution<SheetFreezePluginState, SheetFreezePluginState>Document-state export modules owned by this plugin state.
property readonly 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<SheetFreezePluginState, SheetFreezePluginState>staticproperty readonly pluginKey: PluginKeystaticproperty readonly symbol: typeof symbolstaticmethod apply(state: SheetFreezePluginState, transaction: Transaction): SheetFreezePluginState | nullApplies a transaction to plugin-owned state and returns the next state.
method getPluginConfig(): nullReturns this plugin's runtime configuration view for the current core.
method registerCommands(commands: SheetCommandBus): voidmethod registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): SheetFreezeMatrix; viewKey: string }[] }; key: PluginKey; state: SheetFreezePluginState }Registers one or more plugin-owned state records with the host manager.
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
- interfaceSheetFreezeMatrixData
-
Sparse serialization payload accepted by the freeze matrix.
property readonly data: number | null[]Stored boundary counts.
property readonly indices: number[]Sparse row offsets.
property readonly indptr: number[]Stored axis indices.
- interfaceSheetFreezePluginState
-
Document-owned state for one Sheet editor's freeze boundaries.
property readonly freeze: SheetFreezeMatrixSparse freeze boundary matrix.
- interfaceSheetFreezeState
-
Number of leading rows and columns kept visible while scrolling.
property readonly columns: numberFrozen column count.
property readonly rows: numberFrozen row count.
- variableSheetFreezeFieldKey
-
SheetFreezeFieldKey: "sheet.freeze"Plugin-owned data-view field for persistent freeze boundaries.
Set and read freeze boundaries
- interfaceSheetFreezeCommandSource
-
Supplies current boundaries and sheet dimensions to the command factory.
property readonly target: PluginKeyOwner of the persistent freeze matrix.
method read(): SheetFreezeStateReads the currently committed freeze boundaries.
method shape(): readonly [number, number]Reads the current row and column counts.
- variableSetSheetFreezeCommand
-
SetSheetFreezeCommand: SheetCommandDefinition<SheetFreezeState, SheetCommandResult>Replaces both freeze boundaries in one transaction.
- functioncreateSetSheetFreezeOperations
-
createSetSheetFreezeOperations(input: SheetFreezeState, source: SheetFreezeCommandSource): UpdateCellOTOperation<number | null>[]Creates invertible updates for the changed freeze boundaries.
- functionreadSheetFreeze
-
readSheetFreeze(dataEngine: DataEngine): SheetFreezeStateReads freeze boundaries, returning zeroes when the plugin is absent.
No matching API entries.