API reference
@searsuite/sear-plugin-duplicate
Sparse Sheet duplicate-highlight state and duplicate row commands.
22 exportsderived from source
- classDuplicateMatrixsource ↗
-
class DuplicateMatrix extends CSRMatrix<SheetDuplicateHighlight | null>Sparse duplicate-highlight matrix. An absent cell has no duplicate marker.
constructorconstructor DuplicateMatrix(data?: DuplicateMatrixData, shape?: [number, number]): DuplicateMatrixCreates a sparse duplicate-highlight matrix from serialized CSR data.
data: DuplicateMatrixDatashape: [number, number]
methodaddItem addItem(row: number, col: number, value: templateLiteral | null): thisStores a duplicate highlight through the CSR API, removing the entry for null.
row: numbercol: numbervalue: templateLiteral | null
methodsetItem setItem(row: number, col: number, value: templateLiteral | null): thisStores a duplicate highlight. Null is represented by removing the sparse entry.
row: numbercol: numbervalue: templateLiteral | null
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
- classSheetDuplicatePluginsource ↗
-
class SheetDuplicatePlugin extends Plugin<unknown, CellProperties, SheetDuplicatePluginState>Plugin that owns duplicate-highlight data and duplicate row commands.
constructorconstructor SheetDuplicatePlugin(state: SheetDuplicatePluginState, sheetData: SheetDataPlugin, cellCodecs: CellClipboardCodecRegistry): SheetDuplicatePluginConstructs the plugin around a shared sparse duplicate-highlight matrix.
state: SheetDuplicatePluginStatesheetData: SheetDataPlugincellCodecs: CellClipboardCodecRegistry
propertydocumentState readonly documentState: PluginDocumentStateContribution<SheetDuplicatePluginState, SheetDuplicatePluginState>SheetDuplicatePlugin owns its persisted state module.
propertyinterestedIn interestedIn: string[]Duplicate highlights follow direct updates and all sheet structure changes.
propertytransactionOT readonly transactionOT: { collaborative: boolean; definition: TransactionOTDefinition<MatrixOTOperation<unknown>>; ownerId: string; relations: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>[] }Duplicate-highlight transactions share the registered MatrixOT algebra.
propertywarnOnDuplicateDepth readonly warnOnDuplicateDepth: falseDuplicate state is data-only and does not use render-depth diagnostics.
propertydocumentStatestatic readonly documentState: PluginDocumentStateContribution<SheetDuplicatePluginState, SheetDuplicatePluginState>Document-state export contribution for duplicate highlights.
propertypluginKeystatic readonly pluginKey: PluginKeyStable plugin key shared by all duplicate plugin instances.
propertysymbolstatic readonly symbol: symbolDI token for resolving the duplicate plugin.
methodapply apply(pluginState: SheetDuplicatePluginState, transaction: Transaction): SheetDuplicatePluginState | nullApplies direct duplicate-highlight and structural matrix operations.
pluginState: SheetDuplicatePluginStatetransaction: Transaction
methodgetPluginConfig getPluginConfig(): nullDuplicate state has no render-time configuration.
methodregisterCellVisualReaders registerCellVisualReaders(registry: SheetCellVisualReaderRegistry): voidContributes duplicate highlights to the shared Sheet cell visual pipeline.
registry: SheetCellVisualReaderRegistry
methodregisterCommands registerCommands(commands: SheetCommandBus): voidRegisters duplicate commands owned by this plugin.
commands: SheetCommandBus
methodregisterRangeMoves registerRangeMoves(registry: SheetRangeMoveRegistry): voidContributes this owner's cell state to atomic range moves.
registry: SheetRangeMoveRegistry
methodregisterRangeReorders registerRangeReorders(registry: SheetRangeReorderRegistry): voidregistry: SheetRangeReorderRegistry
methodregisterState registerState(): { dataEngine: { dataView: { fieldKey: string; select: (state: unknown): DuplicateMatrix; viewKey: string }[] }; key: PluginKey; state: SheetDuplicatePluginState }Registers duplicate state for commands, projections, and collaboration.
methodrender render(): Node<CellProperties>[]Duplicate state contributes through grid cell properties, not scene nodes.
Inherited members 26
Inherited from Plugin.
- depth
- 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
- interfaceDuplicateMatrixDatasource ↗
-
interface DuplicateMatrixDataSerialized sparse entries accepted by DuplicateMatrix.
- interfaceSheetDuplicateClearInputsource ↗
-
interface SheetDuplicateClearInput extends SheetRangeInputPublic input for clearing duplicate highlights.
- interfaceSheetDuplicateCommandDataSourcesource ↗
-
interface SheetDuplicateCommandDataSource extends DuplicateRangeDataSourceState access required by duplicate commands.
propertyduplicateTarget readonly duplicateTarget: PluginKeypropertysheetDataTarget readonly sheetDataTarget: PluginKeymethodreadCell readCell(row: number, column: number): CellMatrixElement | nullrow: numbercolumn: number
methodreadCellText readCellText(cell: CellMatrixElement): stringcell: CellMatrixElement
methodreadDuplicateHighlight readDuplicateHighlight(row: number, column: number): templateLiteral | nullrow: numbercolumn: number
Inherited members 2
- getColumnCount
- getRowCount
- interfaceSheetDuplicateDeleteInputsource ↗
-
interface SheetDuplicateDeleteInput extends SheetRangeInputPublic input for duplicate deletion.
- interfaceSheetDuplicateHighlightInputsource ↗
-
interface SheetDuplicateHighlightInput extends SheetRangeInputPublic input for duplicate highlighting.
- interfaceSheetDuplicatePluginStatesource ↗
-
interface SheetDuplicatePluginStateState owned by SheetDuplicatePlugin.
propertyduplicates duplicates: DuplicateMatrixSparse matrix containing duplicate highlight settings.
- typeSheetDuplicateHighlightsource ↗
-
type SheetDuplicateHighlight = HexColorA persisted duplicate-highlight color represented as a hexadecimal color.
- typeSheetDuplicateKeepModesource ↗
-
type SheetDuplicateKeepMode = typeof SheetDuplicateKeepMode[keyof typeof SheetDuplicateKeepMode]Type contract for SheetDuplicateKeepMode.
- variableClearDuplicateHighlightsCommandsource ↗
-
ClearDuplicateHighlightsCommand: SheetCommandDefinition<SheetDuplicateClearInput, SheetCommandResult>Public command for clearing duplicate highlights in a range.
- variableDeleteDuplicateRowsCommandsource ↗
-
DeleteDuplicateRowsCommand: SheetCommandDefinition<SheetDuplicateDeleteInput, SheetCommandResult>Public command for deleting duplicate row contents in a range.
- variableHighlightDuplicateRowsCommandsource ↗
-
HighlightDuplicateRowsCommand: SheetCommandDefinition<SheetDuplicateHighlightInput, SheetCommandResult>Public command for highlighting duplicate cell values in a range.
- variableSheetDuplicateFieldKeysource ↗
-
SheetDuplicateFieldKey: "sheet.duplicateHighlights"DataEngine field owned by SheetDuplicatePlugin.
- variableSheetDuplicateKeepModesource ↗
-
SheetDuplicateKeepMode: { First: "first"; Last: "last" }Retention mode used by DeleteDuplicateRowsCommand.
- functionassertSheetDuplicateHighlightsource ↗
-
assertSheetDuplicateHighlight(value: unknown): valueAsserts that a value is a supported duplicate-highlight color.
value: unknown
- functioncreateClearDuplicateHighlightOperationssource ↗
-
createClearDuplicateHighlightOperations(input: SheetDuplicateClearInput, dataSource: SheetDuplicateCommandDataSource): UpdateCellOTOperation<templateLiteral | null>[]Creates sparse update operations that remove duplicate highlights from a range.
input: SheetDuplicateClearInputdataSource: SheetDuplicateCommandDataSource
- functioncreateDeleteDuplicateRowsOperationssource ↗
-
createDeleteDuplicateRowsOperations(input: SheetDuplicateDeleteInput, dataSource: SheetDuplicateCommandDataSource): DeleteRowOTOperation<CellMatrixElement>[]Creates sheet-data operations that clear duplicate row contents in the selected range.
input: SheetDuplicateDeleteInputdataSource: SheetDuplicateCommandDataSource
- functioncreateHighlightDuplicateOperationssource ↗
-
createHighlightDuplicateOperations(input: SheetDuplicateHighlightInput, dataSource: SheetDuplicateCommandDataSource): UpdateCellOTOperation<templateLiteral | null>[]Creates sparse update operations for duplicate-value highlighting.
input: SheetDuplicateHighlightInputdataSource: SheetDuplicateCommandDataSource
- functionisSheetDuplicateHighlightsource ↗
-
isSheetDuplicateHighlight(value: unknown): valueReturns whether a value is a supported duplicate-highlight color.
value: unknown
- functionreadSheetDuplicateHighlightssource ↗
-
readSheetDuplicateHighlights(dataEngine: DataEngine): DuplicateMatrix | nullReads duplicate highlights published by SheetDuplicatePlugin.
dataEngine: DataEngine
- functionregisterSheetDuplicateCommandssource ↗
-
registerSheetDuplicateCommands(commands: SheetCommandBus, dataSource: SheetDuplicateCommandDataSource): voidRegisters duplicate commands owned by SheetDuplicatePlugin.
commands: SheetCommandBusdataSource: SheetDuplicateCommandDataSource
No public exports match that search.