← All packages

@searsuite/sear-domain-cell

Cell catalogs that compose commit, display, render, and clipboard behavior.

Cell definitions

classCellRenderDefinition

A rendering-only sheet cell definition, such as an editor overlay or header affix.

constructorCellRenderDefinition(): CellRenderDefinition
propertyreadonly type: string | symbol

Stable type key for CellRenderDefinition.

methodcreateRenderer(): CellRendererDefinition

Creates the renderer.

classCellTypeCatalog

Workbook catalog of available persisted cell types and render-only cell roles.

Registering a definition installs all of its capabilities atomically into the specialised registries; disposing it restores the definition it replaced.

constructorCellTypeCatalog(commitStrategies: CellCommitStrategyRegistry, displayTexts: CellDisplayTextRegistry, renderCoordinator: SheetRenderCoordinatorManager, clipboardCodecs: CellClipboardCodecRegistry, formatCodecs?: CellFormatTransferRegistry): CellTypeCatalog

Creates a catalog over the specialised commit, display-text and renderer registries.

propertyreadonly symbol: typeof symbolstatic

DI token for resolving the workbook cell type catalog.

methodget(type: string | symbol): CellRenderDefinition | undefined

Returns the registered definition for a type key.

methodgetAll(): readonly CellRenderDefinition[]

Returns all registered definitions in insertion order.

methodgetDisplayText(cell: CellDisplayData, context: CellDisplayContext): string

Resolves display text through the registered provider for a persisted cell type.

methodregister(definition: CellRenderDefinition): (): void

Registers a definition atomically and returns a disposer that restores the previous definition.

methodunregister(type: string | symbol): boolean

Unregisters a definition by type key.

methodinstall(container: Container): voidstatic

Registers implementation registries without exposing them from the package entry point.

classCellTypeDefinition
class CellTypeDefinition extends CellRenderDefinition

A persisted spreadsheet cell type and all behaviours associated with it.

constructorCellTypeDefinition(): CellTypeDefinition
propertyreadonly type: string

Persisted cell type identifier stored on sheet cell data.

methodcreateClipboardCodec(): CellClipboardCodecDefinition | undefined

Creates clipboard behavior owned by this persisted cell type.

methodcreateCommitStrategies(): readonly CellCommitStrategyDefinition[]

Creates commit strategies associated with this cell type.

methodcreateDisplayTextProvider(): CellDisplayTextProvider | undefined

Creates the display-text provider associated with this cell type.

methodcreateFormatTransferCodec(): CellFormatTransferCodec | undefined

Optional format-transfer behavior owned by this cell type.

methodcreateRenderer(): CellRendererDefinition

Creates the renderer definition associated with this cell type.

methodisStoredValue(_cell: { formula?: unknown; value?: unknown }): boolean

Validates persisted data before it reaches a renderer-specific Cell.

interfaceCellRendererDefinition

Render contribution belonging to one spreadsheet cell definition.

functiondefineCellRenderer
defineCellRenderer<DataType, Properties>(cellType: string | symbol, cell: (data: DataType, positionRect: PositionRectProps, properties: Properties, context?: CellContext): Cell<DataType>): CellRendererDefinition

Creates the standard renderer definition for a Cell subclass.

functionregisterBuiltinCellDefinitions
registerBuiltinCellDefinitions(catalog: CellTypeCatalog): (): void

Registers built-in cell definitions and returns a disposer in reverse order.

Display and transfer

classCellDisplayTextRegistry

Maps persisted cell types to their display-text semantics without creating render Cells.

interfaceCellDisplayContext

Read-only data available while deriving display text.

This deliberately does not reuse a render-cell context: measurement, copy, and search need the same cell semantics without taking a render dependency.

interfaceCellDisplayData

Persisted data required to derive a cell's plain-text representation.

interfaceFormulaResultReader

Minimal formula-result capability required by formula display text.

functioncreateFormulaCellClipboardCodec
createFormulaCellClipboardCodec(): CellClipboardCodecDefinition

Clipboard behavior for formula source text and relative references.

functionregisterTextFormatTransferCodecs
registerTextFormatTransferCodecs(registry: CellFormatTransferRegistry, readFormatting: (): CellDocumentFormatting | undefined): (): void

Text cell type composition; numeric and formula values remain with their own codecs.