API reference
@searsuite/sear-plugin-resize
Sheet row and column dimensions, resize interaction, rendering, and persistence.
45 exportsderived from source
- classSheetResizePluginsource ↗
-
class SheetResizePlugin extends Plugin<SearCoreSheet, CellProperties, ResizeState>Owns row and column resize state, interaction, and visual feedback.
constructorconstructor SheetResizePlugin(coordEngine: CoordinateEngine, cursorEngine: CursorEngine, textShaper: TextShaper, displayTextRegistry: CellDisplayTextReader, pointerCapture: PointerCapture, commands?: SheetCommandBus, platform?: Platform, cursorRegistry?: CursorRegistry, dimensions?: SheetResizeDimensions | null, commandDataEngine?: DataEngine): SheetResizePluginCreates a SheetResizePlugin instance.
coordEngine: CoordinateEnginecursorEngine: CursorEnginetextShaper: TextShaperdisplayTextRegistry: CellDisplayTextReaderpointerCapture: PointerCapturecommands: SheetCommandBusplatform: PlatformcursorRegistry: CursorRegistrydimensions: SheetResizeDimensions | nullcommandDataEngine: DataEngine
propertydepth depth: numberDraw and event ordering hint; lower values run earlier.
propertydocumentState 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.
propertyinterestedIn interestedIn: string[]Resize owns dimension OT and tracks sheet-structure shifts.
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Resize transactions share the registered MatrixOT algebra.
propertydocumentStatestatic 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 }[]Document-state export contributions for resize-owned dimensions.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key shared by all resize plugin instances.
propertysymbolstatic readonly symbol: symbolDI token for resolving SheetResizePlugin.
methodapply 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.
pluginState: ResizeStateCurrent resize plugin state.
transaction: TransactionTransaction containing resize or sheet-structure operations.
methodbeginResizeDrag beginResizeDrag(input: SheetBeginResizeDragInput): voidApplies a command-owned resize drag start to local interaction state.
input: SheetBeginResizeDragInput
methoddirtyRect 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.
searCore: SearCoreSheetSheet core containing render and scroll services.
transaction: TransactionTransaction to inspect for resize operations.
methodendResizeDrag endResizeDrag(): voidClears command-owned resize drag state.
methodgetPluginConfig getPluginConfig(): unknownReturns the plugin config.
methodgetResizeState getResizeState(): ResizeDragStateReturns a detached view of the local drag session.
methodonDblClick onDblClick(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles a double-click pointer event.
searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodonMouseDown onMouseDown(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles the start of a pointer press sequence.
searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodonMouseMove onMouseMove(searCore: SearCoreSheet, _event: EventWithOffsetAndTarget<CellProperties>): boolean | voidHandles pointer movement over the host surface.
searCore: SearCoreSheet_event: EventWithOffsetAndTarget<CellProperties>
methodonMouseUp onMouseUp(searCore: SearCoreSheet, event: EventWithOffsetAndTarget<CellProperties>): voidHandles the end of a pointer press sequence.
searCore: SearCoreSheetevent: EventWithOffsetAndTarget<CellProperties>
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters the commands.
commands: SheetCommandBus
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (resizeState: unknown): unknown; viewKey: string }[] }; key: PluginKey; state: ResizeState }[]Registers the state.
methodrender render(searCore: SearCoreSheet): Node<CellProperties>[] | nullRenders SheetResizePlugin scene output.
searCore: SearCoreSheet
methodsetResizeDimensions setResizeDimensions(dimensions: SheetResizeDimensions): voidInstalls the dimension matrices owned by this resize plugin instance.
dimensions: SheetResizeDimensionsShared row, column, and hidden-size matrices for the sheet.
methodupdateResizeDrag updateResizeDrag(input: SheetUpdateResizeDragInput): voidApplies a command-owned resize drag move to local interaction state.
input: SheetUpdateResizeDragInput
Inherited members 21
Inherited from Plugin.
- pluginKey
- transactionHistory
- warnOnDuplicateDepth
- key
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onInitialDataCell
- onInitialDataComplete
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceSheetBeginResizeDragInputsource ↗
-
interface SheetBeginResizeDragInputPublic input for starting a resize drag session.
propertyaxis readonly axis: SheetResizeAxispropertyinitialSizes readonly initialSizes: readonly SheetResizeDragInitialSize[]propertyprimaryIndex readonly primaryIndex: numberpropertyworld readonly world: { x: number; y: number } - interfaceSheetDimensionResizeInputsource ↗
-
interface SheetDimensionResizeInputOne explicit dimension change used by batch resize commands.
propertyindex readonly index: numberpropertypreviousSize readonly previousSize?: numberpropertysize readonly size: number - interfaceSheetHideColumnsInputsource ↗
-
interface SheetHideColumnsInputPublic input for hiding columns starting at
index. - interfaceSheetHideRowsInputsource ↗
-
interface SheetHideRowsInputPublic input for hiding rows starting at
index. - interfaceSheetResizeColumnsBatchInputsource ↗
-
interface SheetResizeColumnsBatchInputPublic input for resizing arbitrary columns to explicit sizes.
propertysizes readonly sizes: readonly SheetDimensionResizeInput[] - interfaceSheetResizeColumnsRangeInputsource ↗
-
interface SheetResizeColumnsRangeInputPublic input for resizing columns starting at
indexto a shared size. - interfaceSheetResizeDimensionCommandDataSourcesource ↗
-
interface SheetResizeDimensionCommandDataSourceResize-owned data required to create invertible row and column dimension operations.
propertytarget readonly target: PluginKeyPlugin key that owns row and column dimension state.
methodgetColumnCount getColumnCount(): numberCurrent column dimension count.
methodgetDefaultColumnSize getDefaultColumnSize(): numberDefault column width used when no sparse override is stored.
methodgetDefaultRowSize getDefaultRowSize(): numberDefault row height used when no sparse override is stored.
methodgetRowCount getRowCount(): numberCurrent row dimension count.
methodreadColumnSize readColumnSize(index: number): numberReads the current column width at
index.index: number
methodreadRowSize readRowSize(index: number): numberReads the current row height at
index.index: number
- interfaceSheetResizeDimensionssource ↗
-
interface SheetResizeDimensionsResize-owned dimension matrices accepted by SheetResizePlugin during setup.
propertycolumnSizes columnSizes: DimensionsCSRMatrixColumn dimension matrix used for column width state.
propertyrowSizes rowSizes: DimensionsCSRMatrixRow dimension matrix used for row height state.
- interfaceSheetResizeDragCommandControllersource ↗
-
interface SheetResizeDragCommandControllerResize drag-session state controller owned by SheetResizePlugin.
methodbeginResizeDrag beginResizeDrag(input: SheetBeginResizeDragInput): voidinput: SheetBeginResizeDragInput
methodendResizeDrag endResizeDrag(): voidmethodupdateResizeDrag updateResizeDrag(input: SheetUpdateResizeDragInput): voidinput: SheetUpdateResizeDragInput
- interfaceSheetResizeDragInitialSizesource ↗
-
interface SheetResizeDragInitialSizeOne captured size at the start of a resize drag.
- interfaceSheetResizeRowsBatchInputsource ↗
-
interface SheetResizeRowsBatchInputPublic input for resizing arbitrary rows to explicit sizes.
propertysizes readonly sizes: readonly SheetDimensionResizeInput[] - interfaceSheetResizeRowsRangeInputsource ↗
-
interface SheetResizeRowsRangeInputPublic input for resizing rows starting at
indexto a shared size. - interfaceSheetUnhideColumnsInputsource ↗
-
interface SheetUnhideColumnsInputPublic input for unhiding columns starting at
index. - interfaceSheetUnhideRowsInputsource ↗
-
interface SheetUnhideRowsInputPublic input for unhiding rows starting at
index. - interfaceSheetUpdateResizeDragInputsource ↗
-
interface SheetUpdateResizeDragInputPublic input for moving an active resize drag session.
propertyworld readonly world: { x: number; y: number } - typeSheetResizeAxissource ↗
-
type SheetResizeAxis = "row" | "col"Supported resize interaction axis.
- typeSheetResizeColumnsInputsource ↗
-
type SheetResizeColumnsInput = SheetResizeColumnsRangeInput | SheetResizeColumnsBatchInputPublic input for resizing columns.
- typeSheetResizeRowsInputsource ↗
-
type SheetResizeRowsInput = SheetResizeRowsRangeInput | SheetResizeRowsBatchInputPublic input for resizing rows.
- variableBeginSheetResizeDragCommandsource ↗
-
BeginSheetResizeDragCommand: SheetCommandDefinition<SheetBeginResizeDragInput, SheetCommandResult>Command that starts resize drag-session state through the command bus.
- variableEndSheetResizeDragCommandsource ↗
-
EndSheetResizeDragCommand: SheetCommandDefinition<void, SheetCommandResult>Command that clears resize drag-session state through the command bus.
- variableHideSheetColumnsCommandsource ↗
-
HideSheetColumnsCommand: SheetCommandDefinition<SheetHideColumnsInput, SheetCommandResult>Hides one or more columns by resizing them to zero.
- variableHideSheetRowsCommandsource ↗
-
HideSheetRowsCommand: SheetCommandDefinition<SheetHideRowsInput, SheetCommandResult>Hides one or more rows by resizing them to zero.
- variableResizeSheetColumnsCommandsource ↗
-
ResizeSheetColumnsCommand: SheetCommandDefinition<SheetResizeColumnsInput, SheetCommandResult>Resizes one or more column widths.
- variableResizeSheetRowsCommandsource ↗
-
ResizeSheetRowsCommand: SheetCommandDefinition<SheetResizeRowsInput, SheetCommandResult>Resizes one or more row heights.
- variableSheetColumnSizesFieldKeysource ↗
-
SheetColumnSizesFieldKey: "sheet.resize.columnSizes"DataEngine field for column dimensions owned by SheetResizePlugin.
- variableSheetRowSizesFieldKeysource ↗
-
SheetRowSizesFieldKey: "sheet.resize.rowSizes"DataEngine field for row dimensions owned by SheetResizePlugin.
- variableUnhideSheetColumnsCommandsource ↗
-
UnhideSheetColumnsCommand: SheetCommandDefinition<SheetUnhideColumnsInput, SheetCommandResult>Restores one or more hidden columns from resize-owned hidden-size state.
- variableUnhideSheetRowsCommandsource ↗
-
UnhideSheetRowsCommand: SheetCommandDefinition<SheetUnhideRowsInput, SheetCommandResult>Restores one or more hidden rows from resize-owned hidden-size state.
- variableUpdateSheetResizeDragCommandsource ↗
-
UpdateSheetResizeDragCommand: SheetCommandDefinition<SheetUpdateResizeDragInput, SheetCommandResult>Command that updates resize drag-session state through the command bus.
- functioncreateHideColumnOperationssource ↗
-
createHideColumnOperations(input: SheetHideColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">): Operation[]Creates column hide operations from public command input.
input: SheetHideColumnsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">
- functioncreateHideRowOperationssource ↗
-
createHideRowOperations(input: SheetHideRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">): Operation[]Creates row hide operations from public command input.
input: SheetHideRowsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">
- functioncreateResizeColumnOperationssource ↗
-
createResizeColumnOperations(input: SheetResizeColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">): Operation[]Creates column resize operations from public command input.
input: SheetResizeColumnsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "readColumnSize">
- functioncreateResizeRowOperationssource ↗
-
createResizeRowOperations(input: SheetResizeRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">): Operation[]Creates row resize operations from public command input.
input: SheetResizeRowsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "readRowSize">
- functioncreateUnhideColumnOperationssource ↗
-
createUnhideColumnOperations(input: SheetUnhideColumnsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "getDefaultColumnSize" | "readColumnHiddenOriginalSize" | "readColumnSize">): Operation[]Creates column unhide operations from public command input.
input: SheetUnhideColumnsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getColumnCount" | "getDefaultColumnSize" | "readColumnHiddenOriginalSize" | "readColumnSize">
- functioncreateUnhideRowOperationssource ↗
-
createUnhideRowOperations(input: SheetUnhideRowsInput, dataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "getDefaultRowSize" | "readRowHiddenOriginalSize" | "readRowSize">): Operation[]Creates row unhide operations from public command input.
input: SheetUnhideRowsInputdataSource: Pick<SheetResizeDimensionCommandDataSource, "getRowCount" | "getDefaultRowSize" | "readRowHiddenOriginalSize" | "readRowSize">
- functionreadSheetColumnSizessource ↗
-
readSheetColumnSizes(dataEngine: DataEngine): DimensionsCSRMatrix | nullReads column dimensions published by SheetResizePlugin.
dataEngine: DataEngine
- functionreadSheetRowSizessource ↗
-
readSheetRowSizes(dataEngine: DataEngine): DimensionsCSRMatrix | nullReads row dimensions published by SheetResizePlugin.
dataEngine: DataEngine
- functionregisterSheetResizeCommandssource ↗
-
registerSheetResizeCommands(commands: SheetCommandBus, dataSource: SheetResizeDimensionCommandDataSource, controller: SheetResizeDragCommandController): voidRegisters the complete command surface owned by SheetResizePlugin.
commands: SheetCommandBusCommand bus owned by the current sheet editor.
dataSource: SheetResizeDimensionCommandDataSourceResize state reader used by semantic dimension commands.
controller: SheetResizeDragCommandController
- functionregisterSheetResizeDimensionCommandssource ↗
-
registerSheetResizeDimensionCommands(commands: SheetCommandBus, dataSource: SheetResizeDimensionCommandDataSource): voidRegisters row and column dimension commands on one sheet command bus.
commands: SheetCommandBusdataSource: SheetResizeDimensionCommandDataSource
- functionregisterSheetResizeDragCommandssource ↗
-
registerSheetResizeDragCommands(commands: SheetCommandBus, controller: SheetResizeDragCommandController): voidRegisters resize drag-session command factories on one editor command bus.
commands: SheetCommandBusCommand bus owned by the current sheet editor.
controller: SheetResizeDragCommandControllerResize plugin controller that owns local drag-session state.
No public exports match that search.