@searsuite/sear-plugin-resize
Drag to resize
Begin, update, and end commands keep a drag interaction separate from the final size change.
- interfaceSheetBeginResizeDragInput
-
Public input for starting a resize drag session.
- interfaceSheetResizeDragCommandController
-
Resize drag-session state controller owned by SheetResizePlugin.
- interfaceSheetResizeDragInitialSize
-
One captured size at the start of a resize drag.
property readonly index: numberproperty readonly size: number - interfaceSheetUpdateResizeDragInput
-
Public input for moving an active resize drag session.
- variableBeginSheetResizeDragCommand
-
BeginSheetResizeDragCommand: SheetCommandDefinition<SheetBeginResizeDragInput, SheetCommandResult>Command that starts resize drag-session state through the command bus.
- variableEndSheetResizeDragCommand
-
EndSheetResizeDragCommand: SheetCommandDefinition<void, SheetCommandResult>Command that clears resize drag-session state through the command bus.
- variableUpdateSheetResizeDragCommand
-
UpdateSheetResizeDragCommand: SheetCommandDefinition<SheetUpdateResizeDragInput, SheetCommandResult>Command that updates resize drag-session state through the command bus.
- functionregisterSheetResizeDragCommands
-
registerSheetResizeDragCommands(commands: SheetCommandBus, controller: SheetResizeDragCommandController): voidRegisters resize drag-session command factories on one editor command bus.
commandsCommand bus owned by the current sheet editor.
controllerResize plugin controller that owns local drag-session state.
Hide and unhide rows or columns
Hide commands retain the original dimensions so an unhide operation can restore them.
- interfaceSheetHideColumnsInput
-
Public input for hiding columns starting at
index.property readonly count?: numberproperty readonly index: number - interfaceSheetHideRowsInput
-
Public input for hiding rows starting at
index.property readonly count?: numberproperty readonly index: number - interfaceSheetUnhideColumnsInput
-
Public input for unhiding columns starting at
index.property readonly count?: numberproperty readonly index: number - interfaceSheetUnhideRowsInput
-
Public input for unhiding rows starting at
index.property readonly count?: numberproperty readonly index: number - variableHideSheetColumnsCommand
-
HideSheetColumnsCommand: SheetCommandDefinition<SheetHideColumnsInput, SheetCommandResult>Hides one or more columns by resizing them to zero.
- variableHideSheetRowsCommand
-
HideSheetRowsCommand: SheetCommandDefinition<SheetHideRowsInput, SheetCommandResult>Hides one or more rows by resizing them to zero.
- variableUnhideSheetColumnsCommand
-
UnhideSheetColumnsCommand: SheetCommandDefinition<SheetUnhideColumnsInput, SheetCommandResult>Restores one or more hidden columns from resize-owned hidden-size state.
- variableUnhideSheetRowsCommand
-
UnhideSheetRowsCommand: SheetCommandDefinition<SheetUnhideRowsInput, SheetCommandResult>Restores one or more hidden rows from resize-owned hidden-size state.
- functioncreateHideColumnOperations
-
createHideColumnOperations(input: SheetHideColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">): Operation[]Creates column hide operations from public command input.
- functioncreateHideRowOperations
-
createHideRowOperations(input: SheetHideRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">): Operation[]Creates row hide operations from public command input.
- functioncreateUnhideColumnOperations
-
createUnhideColumnOperations(input: SheetUnhideColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "getDefaultColumnSize" | "readColumnHiddenOriginalSize" | "readColumnSize">): Operation[]Creates column unhide operations from public command input.
- functioncreateUnhideRowOperations
-
createUnhideRowOperations(input: SheetUnhideRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "getDefaultRowSize" | "readRowHiddenOriginalSize" | "readRowSize">): Operation[]Creates row unhide operations from public command input.
Set row and column sizes
Resize commands write row or column dimensions; read helpers expose the values used by rendering.
- classSheetResizePlugin
-
class SheetResizePlugin extends Plugin<SearCoreSheet, CellProperties, ResizeState>Owns row and column resize state, interaction, and visual feedback.
constructor SheetResizePlugin(coordEngine: CoordinateEngine, cursorEngine: CursorEngine, textShaper: TextShaper, displayTextRegistry: CellDisplayTextReader, pointerCapture: PointerCapture, commands?: SheetCommandBus, platform?: Platform, cursorRegistry?: CursorRegistry, dimensions?: SheetResizeDimensions | null, commandDataEngine?: DataEngine): SheetResizePluginproperty depth: numberDraw and event ordering hint; lower values run earlier.
property readonly documentState: { capture: (state: ResizeState): { rowSizes: RowShapeDimensionsCSRMatrix } | undefined; codec: { deserialize: (payload: unknown, path: string): { rowSizes: RowShapeDimensionsCSRMatrix }; key: string; serialize: (state: RowSizesDocumentState): SerializedSparseMatrix<number> }; key: string } | { capture: (state: ResizeState): { columnSizes: ColumnShapeDimensionsCSRMatrix } | undefined; codec: { deserialize: (payload: unknown, path: string): { columnSizes: ColumnShapeDimensionsCSRMatrix }; key: string; serialize: (state: ColumnSizesDocumentState): SerializedSparseMatrix<number> }; key: string } | { capture: (state: ResizeState): { rowHiddenOriginalSizes: CSRMatrix<unknown> } | undefined; codec: { deserialize: (payload: unknown, path: string): { rowHiddenOriginalSizes: CSRMatrix<unknown> }; key: string; serialize: (state: RowHiddenOriginalSizesDocumentState): SerializedSparseMatrix<unknown> | undefined }; key: string } | { capture: (state: ResizeState): { columnHiddenOriginalSizes: CSRMatrix<unknown> } | undefined; codec: { deserialize: (payload: unknown, path: string): { columnHiddenOriginalSizes: CSRMatrix<unknown> }; key: string; serialize: (state: ColumnHiddenOriginalSizesDocumentState): SerializedSparseMatrix<unknown> | undefined }; key: string }[]SheetResizePlugin owns persisted dimension export modules.
property interestedIn: string[]Resize owns dimension OT and tracks sheet-structure shifts.
property readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Resize transactions share the registered MatrixOT algebra.
property readonly documentState: { capture: (state: ResizeState): { rowSizes: RowShapeDimensionsCSRMatrix } | undefined; codec: { deserialize: (payload: unknown, path: string): { rowSizes: RowShapeDimensionsCSRMatrix }; key: string; serialize: (state: RowSizesDocumentState): SerializedSparseMatrix<number> }; key: string } | { capture: (state: ResizeState): { columnSizes: ColumnShapeDimensionsCSRMatrix } | undefined; codec: { deserialize: (payload: unknown, path: string): { columnSizes: ColumnShapeDimensionsCSRMatrix }; key: string; serialize: (state: ColumnSizesDocumentState): SerializedSparseMatrix<number> }; key: string } | { capture: (state: ResizeState): { rowHiddenOriginalSizes: CSRMatrix<unknown> } | undefined; codec: { deserialize: (payload: unknown, path: string): { rowHiddenOriginalSizes: CSRMatrix<unknown> }; key: string; serialize: (state: RowHiddenOriginalSizesDocumentState): SerializedSparseMatrix<unknown> | undefined }; key: string } | { capture: (state: ResizeState): { columnHiddenOriginalSizes: CSRMatrix<unknown> } | undefined; codec: { deserialize: (payload: unknown, path: string): { columnHiddenOriginalSizes: CSRMatrix<unknown> }; key: string; serialize: (state: ColumnHiddenOriginalSizesDocumentState): SerializedSparseMatrix<unknown> | undefined }; key: string }[]staticDocument-state export contributions for resize-owned dimensions.
property readonly pluginKey: PluginKeystaticStable plugin key shared by all resize plugin instances.
property readonly symbol: symbolstaticDI token for resolving SheetResizePlugin.
method apply(pluginState: ResizeState, transaction: Transaction): ResizeState | nullApplies dimension and hidden-size operations owned by the resize plugin.
ReturnsUpdated plugin state, or null when the transaction does not affect dimensions.
pluginStateCurrent resize plugin state.
transactionTransaction containing resize or sheet-structure operations.
method beginResizeDrag(input: SheetBeginResizeDragInput): voidApplies a command-owned resize drag start to local interaction state.
method dirtyRect(searCore: SearCoreSheet, transaction: Transaction): PositionRect<unknown> | nullMarks the visible viewport dirty after row or column resize operations.
ReturnsViewport dirty rectangle when a resize occurred, otherwise null.
searCoreSheet core containing render and scroll services.
transactionTransaction to inspect for resize operations.
method endResizeDrag(): voidClears command-owned resize drag state.
method getPluginConfig(): unknownReturns the plugin config.
method getResizeState(): ResizeDragStateReturns a detached view of the local drag session.
method onDblClick(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles a double-click pointer event.
method onMouseDown(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles the start of a pointer press sequence.
method onMouseMove(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles pointer movement over the host surface.
method onMouseUp(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidHandles the end of a pointer press sequence.
method registerCommands(commands: SheetCommandBus): voidRegisters the commands.
method registerState(): { dataEngine: { dataView: { fieldKey: string; select: (resizeState: unknown): unknown; viewKey: string }[] }; key: PluginKey; state: ResizeState }[]Registers the state.
method render(searCore: SearCoreSheet): Node<CellProperties>[] | nullRenders SheetResizePlugin scene output.
method setResizeDimensions(dimensions: SheetResizeDimensions): voidInstalls the dimension matrices owned by this resize plugin instance.
dimensionsShared row, column, and hidden-size matrices for the sheet.
method updateResizeDrag(input: SheetUpdateResizeDragInput): voidApplies a command-owned resize drag move to local interaction state.
Inherited members 20
Inherited from Plugin.
- transactionHistory
- warnOnDuplicateDepth
- key
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onInitialDataCell
- onInitialDataComplete
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceSheetDimensionResizeInput
-
One explicit dimension change used by batch resize commands.
- interfaceSheetResizeColumnsBatchInput
-
Public input for resizing arbitrary columns to explicit sizes.
- interfaceSheetResizeColumnsRangeInput
-
Public input for resizing columns starting at
indexto a shared size. - interfaceSheetResizeDimensionCommandDataSource
-
Resize-owned data required to create invertible row and column dimension operations.
property readonly target: PluginKeyPlugin key that owns row and column dimension state.
method getColumnCount(): numberCurrent column dimension count.
method getDefaultColumnSize(): numberDefault column width used when no sparse override is stored.
method getDefaultRowSize(): numberDefault row height used when no sparse override is stored.
method getRowCount(): numberCurrent row dimension count.
method readColumnSize(index: number): numberReads the current column width at
index.method readRowSize(index: number): numberReads the current row height at
index. - interfaceSheetResizeDimensions
-
Resize-owned dimension matrices accepted by SheetResizePlugin during setup.
property columnSizes: DimensionsCSRMatrixColumn dimension matrix used for column width state.
property rowSizes: DimensionsCSRMatrixRow dimension matrix used for row height state.
- interfaceSheetResizeRowsBatchInput
-
Public input for resizing arbitrary rows to explicit sizes.
- interfaceSheetResizeRowsRangeInput
-
Public input for resizing rows starting at
indexto a shared size. - typeSheetResizeAxis
-
type SheetResizeAxis = "row" | "col"Supported resize interaction axis.
- typeSheetResizeColumnsInput
-
type SheetResizeColumnsInput = SheetResizeColumnsRangeInput | SheetResizeColumnsBatchInputPublic input for resizing columns.
- typeSheetResizeRowsInput
-
type SheetResizeRowsInput = SheetResizeRowsRangeInput | SheetResizeRowsBatchInputPublic input for resizing rows.
- variableResizeSheetColumnsCommand
-
ResizeSheetColumnsCommand: SheetCommandDefinition<SheetResizeColumnsInput, SheetCommandResult>Resizes one or more column widths.
- variableResizeSheetRowsCommand
-
ResizeSheetRowsCommand: SheetCommandDefinition<SheetResizeRowsInput, SheetCommandResult>Resizes one or more row heights.
- variableSheetColumnSizesFieldKey
-
SheetColumnSizesFieldKey: "sheet.resize.columnSizes"DataEngine field for column dimensions owned by SheetResizePlugin.
- variableSheetRowSizesFieldKey
-
SheetRowSizesFieldKey: "sheet.resize.rowSizes"DataEngine field for row dimensions owned by SheetResizePlugin.
- functioncreateResizeColumnOperations
-
createResizeColumnOperations(input: SheetResizeColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">): Operation[]Creates column resize operations from public command input.
- functioncreateResizeRowOperations
-
createResizeRowOperations(input: SheetResizeRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">): Operation[]Creates row resize operations from public command input.
- functionreadSheetColumnSizes
-
readSheetColumnSizes(dataEngine: DataEngine): DimensionsCSRMatrix | nullReads column dimensions published by SheetResizePlugin.
- functionreadSheetRowSizes
-
readSheetRowSizes(dataEngine: DataEngine): DimensionsCSRMatrix | nullReads row dimensions published by SheetResizePlugin.
- functionregisterSheetResizeCommands
-
registerSheetResizeCommands(commands: SheetCommandBus, dataSource: SheetResizeDimensionCommandDataSource, controller: SheetResizeDragCommandController): voidRegisters the complete command surface owned by SheetResizePlugin.
commandsCommand bus owned by the current sheet editor.
dataSourceResize state reader used by semantic dimension commands.
- functionregisterSheetResizeDimensionCommands
-
registerSheetResizeDimensionCommands(commands: SheetCommandBus, dataSource: SheetResizeDimensionCommandDataSource): voidRegisters row and column dimension commands on one sheet command bus.
No matching API entries.