API reference
@searsuite/sear-plugin-cell-border
Independent Sheet cell borders, commands, rendering, history and collaboration.
20 exportsderived from source
- classCellBorderErrorsource ↗
-
class CellBorderError extends SearErrorTyped error for invalid border commands or document values.
constructorconstructor CellBorderError(message: string, details?: Record<string, unknown>): CellBorderErrormessage: stringdetails: Record<string, unknown>
propertycode readonly code: "SHEET_CELL_BORDER_INVALID"Stable machine-readable identifier for this error category.
Inherited members 9
Inherited from SearError.
- classCellBorderMatrixsource ↗
-
class CellBorderMatrix extends CSRMatrix<SheetCellBorder | null>Feature-owned sparse matrix; empty edge records are represented by absence.
constructorconstructor CellBorderMatrix(data?: CellBorderMatrixData, shape?: [number, number]): CellBorderMatrixdata: CellBorderMatrixDatashape: [number, number]
methodaddItem addItem(row: number, column: number, value: Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | null): thisAdds an item to the matrix at the specified row and column.
ReturnsThe current instance for chaining.
row: numberThe row index.
column: numbervalue: Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | nullThe value to add.
methodclone clone(): thisCreates an independent copy of this value and its mutable data.
methodgetItem getItem(row: number, column: number): Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | nullRetrieves an item from the matrix at the specified row and column.
ReturnsThe item at the specified position or null if not present.
row: numberThe row index.
column: number
methodsetItem setItem(row: number, column: number, value: Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | null): thisStores an isolated edge record or clears its sparse entry.
row: numbercolumn: numbervalue: Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | null
Inherited members 32
Inherited from CSRMatrix.
- name
- ndim
- nnz
- shape
- addColumn
- addListener
- addRow
- cloneCommittedView
- cloneDetached
- cloneForStaging
- deleteColumns
- deleteRows
- dispatch
- dot
- forEach
- forEachStored
- forEachStoredInRange
- forEachStoredInRow
- fromDense
- getCol
- getDefaultValue
- getRow
- lockMutations
- multiply
- removeItem
- removeListener
- setDefaultValue
- sum
- swapColumn
- swapRow
- toArray
- transpose
- classSheetCellBorderPluginsource ↗
-
class SheetCellBorderPlugin extends Plugin<SearCoreSheet, CellProperties, SheetCellBorderPluginState>Plugin that owns cell border data, commands, structural projections, and export.
constructorconstructor SheetCellBorderPlugin(state: SheetCellBorderPluginState): SheetCellBorderPluginConstructs the plugin around its independently owned sparse border matrix.
state: SheetCellBorderPluginState
propertydepth readonly depth: 2Border nodes are painted after base cells and merged-cell backgrounds.
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetCellBorderPluginState, Partial<SheetCellBorderPluginState>>SheetCellBorderPlugin owns its persisted state module.
propertyinterestedIn interestedIn: string[]Border follows direct updates and all sheet structure changes.
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Border transactions share the registered MatrixOT algebra.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseMultiple extension layers may share the same depth.
propertydocumentStatestatic readonly documentState: PluginDocumentStateContribution<SheetCellBorderPluginState, Partial<SheetCellBorderPluginState>>Document-state export contribution for cell borders.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key shared by all cell-border plugin instances.
propertysymbolstatic readonly symbol: symbolDI token for resolving the cell-border plugin.
methodapply apply(pluginState: SheetCellBorderPluginState, transaction: Transaction): SheetCellBorderPluginState | nullApplies direct border and structural matrix operations.
pluginState: SheetCellBorderPluginStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(): nullCell-border data has no render-time configuration.
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters the cell-border command owned by this plugin.
commands: SheetCommandBus
methodregisterFormatTransfers registerFormatTransfers(registry: SheetFormatTransferRegistry): voidTransfers only this owner's persisted formats.
registry: SheetFormatTransferRegistry
methodregisterQueries registerQueries(queries: SheetQueryRegistry): voidPublishes the border owner's typed read-only queries.
queries: SheetQueryRegistry
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidregistry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): CellBorderMatrix; viewKey: string }[] }; key: PluginKey; state: SheetCellBorderPluginState }Registers border state for commands, projections, and collaboration.
methodrender render(core: SearCoreSheet): Node<CellProperties>[]Contributes custom strokes without teaching the grid about border state.
core: SearCoreSheet
Inherited members 25
Inherited from Plugin.
- pluginKey
- transactionHistory
- key
- dirtyRect
- enforceRuntimeWriteBoundary
- enforceStateWriteBoundary
- getState
- hasStateWriteBoundary
- lockCommittedState
- onClick
- onDblClick
- onInitialDataCell
- onInitialDataComplete
- onMouseDown
- onMouseMove
- onMouseUp
- onResize
- onScroll
- onTransactionCommitted
- projectTransaction
- registerConfig
- sealRuntimeMetadata
- sealRuntimeMethods
- sealRuntimeWrites
- setState
- interfaceBorderLinePaintsource ↗
-
interface BorderLinePaintPaint projection of one persisted border style.
- interfaceCellBorderMatrixDatasource ↗
-
interface CellBorderMatrixDataSerialized sparse border entries.
- interfaceSheetBorderStrokesource ↗
-
interface SheetBorderStrokeOne explicit persisted border stroke.
- interfaceSheetCellBorderPluginStatesource ↗
-
interface SheetCellBorderPluginStateState owned by SheetCellBorderPlugin.
propertycellBorders cellBorders: CellBorderMatrixSparse matrix containing explicit per-cell edge strokes.
- interfaceSheetSetRangeCellBorderInputsource ↗
-
interface SheetSetRangeCellBorderInput extends SheetRangeInputPublic range-border input.
- typeSheetBorderLineStylesource ↗
-
type SheetBorderLineStyle = typeof SheetBorderLineStyle[keyof typeof SheetBorderLineStyle]Border line style input contract.
- typeSheetBorderPresetsource ↗
-
type SheetBorderPreset = typeof SheetBorderPreset[keyof typeof SheetBorderPreset]Border preset input contract.
- typeSheetBorderSidesource ↗
-
type SheetBorderSide = typeof SheetBorderSide[keyof typeof SheetBorderSide]Cell border edge contract.
- typeSheetCellBordersource ↗
-
type SheetCellBorder = Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>>Explicit edges belonging to one cell; omitted edges have no custom border.
- variableBorderLinePaintsource ↗
-
BorderLinePaint: Readonly<Record<SheetBorderLineStyle, BorderLinePaint>>Shared style projection used by scene nodes and host previews.
- variableReadSheetCellBorderQuerysource ↗
-
ReadSheetCellBorderQuery: SheetQueryDefinition<{ column: number; row: number }, Readonly<Partial<Record<SheetBorderSide, SheetBorderStroke>>> | null>Typed read of the explicit edges at one cell.
- variableSetRangeCellBorderCommandsource ↗
-
SetRangeCellBorderCommand: SheetCommandDefinition<SheetSetRangeCellBorderInput, SheetCommandResult>Range-border command; all neighbor changes belong to the same transaction.
- variableSheetBorderLineStylesource ↗
-
SheetBorderLineStyle: { DashDot: "dashDot"; DashDotDot: "dashDotDot"; Dashed: "dashed"; Dotted: "dotted"; Double: "double"; Hair: "hair"; Medium: "medium"; MediumDashDot: "mediumDashDot"; … }Persisted line styles, shared by commands, rendering and hosts.
- variableSheetBorderPresetsource ↗
-
SheetBorderPreset: { All: "all"; Bottom: "bottom"; Horizontal: "horizontal"; Inside: "inside"; Left: "left"; None: "none"; Outside: "outside"; Right: "right"; … }Supported border presets for an inclusive Sheet range.
- variableSheetBorderSidesource ↗
-
SheetBorderSide: { Bottom: "bottom"; Left: "left"; Right: "right"; Top: "top" }Canonical edge names stored in a cell border record.
- variableSheetCellBorderFieldKeysource ↗
-
SheetCellBorderFieldKey: "sheet.cellBorder"Stable data-view field owned by the border plugin.
- functionreadSheetCellBorderssource ↗
-
readSheetCellBorders(dataEngine: DataEngine): CellBorderMatrix | nullReads the border owner's projection, when that plugin is installed.
dataEngine: DataEngine
No public exports match that search.