API reference
@searsuite/sear-domain-cell-types
Built-in cell identities and commit strategies for text, numbers, formulas, and rich text.
50 exportsderived from source
- namespaceICellFormatLocaleProvidersource ↗
-
ICellFormatLocaleProvider: unknownDI token for resolving the current sheet's cell-format locale provider.
variablesymbol symbol: typeof symbol - enumSheetHorizontalAlignmentsource ↗
-
enum SheetHorizontalAlignmentHorizontal alignment values supported by the built-in Sheet alignment feature.
- enumSheetVerticalAlignmentsource ↗
-
enum SheetVerticalAlignmentVertical alignment values supported by the built-in Sheet alignment feature.
- classBooleanCellCommitStrategysource ↗
-
class BooleanCellCommitStrategy extends CellCommitStrategyRecognizes directly entered spreadsheet logical literals.
constructorconstructor BooleanCellCommitStrategy(): BooleanCellCommitStrategypropertykey readonly key: "boolean"Stable identifier for this commit strategy.
propertypriority readonly priority: 20Ordering priority used when more than one strategy matches.
methodcommit commit(context: CellCommitContext): CellMatrixElementConverts matching edit input into a persisted cell value.
context: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether this strategy can commit the supplied input.
context: CellCommitContext
- classCellClipboardCodecRegistrysource ↗
-
class CellClipboardCodecRegistryEditor-local registry for cell-type-owned clipboard behavior.
constructorconstructor CellClipboardCodecRegistry(): CellClipboardCodecRegistrypropertysymbolstatic readonly symbol: typeof symbolmethoddecode decode(payload: CellClipboardCellPayload, context: CellClipboardDecodeContext): CellMatrixElement | nullpayload: CellClipboardCellPayloadcontext: CellClipboardDecodeContext
methoddecodePlainText decodePlainText(text: string): CellMatrixElement | nulltext: string
methodencode encode(cell: CellMatrixElement): CellClipboardCellPayloadcell: CellMatrixElement
methodget get(cellType: string): CellClipboardCodecDefinition | undefinedcellType: string
methodregister register(codec: CellClipboardCodecDefinition): (): voidcodec: CellClipboardCodecDefinition
methodtoPlainText toPlainText(cell: CellMatrixElement): stringcell: CellMatrixElement
- classCellCommitStrategysource ↗
-
class CellCommitStrategy extends CellCommitStrategyDefinitionBase class for reusable strategies; plain definitions can also be registered.
constructorconstructor CellCommitStrategy(): CellCommitStrategypropertykey readonly key: stringStable identifier for this commit strategy.
propertypriority readonly priority: numberOrdering priority used when more than one strategy matches.
methodcommit commit(context: CellCommitContext): CellMatrixElement | nullConverts matching edit input into a persisted cell value.
context: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether this strategy can commit the supplied input.
context: CellCommitContext
- classCellCommitStrategyRegistrysource ↗
-
class CellCommitStrategyRegistryExtensible value-type registry. Hosts and plugins can add or replace input classifiers without coupling their domain types to the cell editor.
constructorconstructor CellCommitStrategyRegistry(): CellCommitStrategyRegistrypropertysymbolstatic readonly symbol: typeof symbolDI token for resolving CellCommitStrategyRegistry.
methodcommit commit(context: CellCommitContext): CellMatrixElement | nullSelects a matching strategy and commits the supplied edit input.
context: CellCommitContext
methodcommitWithFormat commitWithFormat(context: CellCommitContext): { cell: CellMatrixElement | null; format: CellFormat | null }Commits a value and returns any format inferred by its owning strategy.
context: CellCommitContext
methodget get(key: string): CellCommitStrategyDefinition | undefinedReturns the value.
key: string
methodgetAll getAll(): readonly CellCommitStrategyDefinition[]Returns the all.
methodregister register(strategy: CellCommitStrategyDefinition): (): voidRegisters or replaces a strategy. The returned disposer restores the replaced strategy when this registration remains active.
strategy: CellCommitStrategyDefinition
methodunregister unregister(key: string): booleanUnregisters the value.
key: string
- classCellFormatTransferRegistrysource ↗
-
class CellFormatTransferRegistryEditor-local cell-format codecs; unregistered types preserve their payload verbatim.
constructorconstructor CellFormatTransferRegistry(): CellFormatTransferRegistrypropertysymbolstatic readonly symbol: typeof symbolmethodapply apply(cell: CellMatrixElement | null, format: Readonly<Record<string, unknown>>): CellMatrixElement | nullcell: CellMatrixElement | nullformat: Readonly<Record<string, unknown>>
methodcapture capture(cell: CellMatrixElement | null): Readonly<Record<string, unknown>>cell: CellMatrixElement | null
methoddestroy destroy(): voidmethodregister register(codec: CellFormatTransferCodec): (): voidcodec: CellFormatTransferCodec
- classDefaultStringCellCommitStrategysource ↗
-
class DefaultStringCellCommitStrategy extends CellCommitStrategyFinal fallback: persist otherwise-unclassified input as plain text.
constructorconstructor DefaultStringCellCommitStrategy(): DefaultStringCellCommitStrategypropertykey readonly key: "fallback-string"Stable identifier for the default string strategy.
propertypriority readonly priority: 0Ordering priority for the default string fallback.
methodcommit commit(context: CellCommitContext): CellMatrixElementPersists unmatched input as a string cell.
context: CellCommitContext
methodmatches matches(): booleanMatches input not claimed by a more specific strategy.
- classEmptyCellCommitStrategysource ↗
-
class EmptyCellCommitStrategy extends CellCommitStrategyRemoves a cell when its editor document has no semantic text.
constructorconstructor EmptyCellCommitStrategy(): EmptyCellCommitStrategypropertykey readonly key: "empty"Stable identifier for the empty-cell strategy.
propertypriority readonly priority: 100Ordering priority for empty input.
methodcommit commit(): nullConverts empty input into an absent cell value.
methodmatches matches(context: CellCommitContext): booleanReports whether the input should clear the cell.
context: CellCommitContext
- classFormulaCellCommitStrategysource ↗
-
class FormulaCellCommitStrategy extends CellCommitStrategyRecognizes formula source and normalizes it before persistence.
constructorconstructor FormulaCellCommitStrategy(): FormulaCellCommitStrategypropertykey readonly key: "formula"Stable identifier for the formula strategy.
propertypriority readonly priority: 90Ordering priority for formula input.
methodcommit commit(context: CellCommitContext): CellMatrixElementPersists formula source without evaluating it.
context: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether the input is formula source.
context: CellCommitContext
- classNumberCellCommitStrategysource ↗
-
class NumberCellCommitStrategy extends CellCommitStrategyInfers numeric values after more-specific domain types have had a chance to match.
constructorconstructor NumberCellCommitStrategy(): NumberCellCommitStrategypropertykey readonly key: "number"Stable identifier for the number strategy.
propertypriority readonly priority: 10Ordering priority for numeric input.
methodcommit commit(context: CellCommitContext): CellMatrixElementPersists input as a numeric cell.
context: CellCommitContext
methodinferFormat inferFormat(context: CellCommitContext): CellFormat | nullcontext: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether the input is a valid numeric value.
context: CellCommitContext
- classRichTextCellCommitStrategysource ↗
-
class RichTextCellCommitStrategy extends CellCommitStrategyPersists the document tree only when it contains durable inline/block semantics.
constructorconstructor RichTextCellCommitStrategy(): RichTextCellCommitStrategypropertykey readonly key: "richtext"Stable identifier for the rich-text strategy.
propertypriority readonly priority: 110Ordering priority for rich-text input.
methodcommit commit(context: CellCommitContext): CellMatrixElementPersists a cloned rich-document snapshot.
context: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether the input is a rich-document snapshot.
context: CellCommitContext
- classSheetCellInputValidationRegistrysource ↗
-
class SheetCellInputValidationRegistryEditor-local validation contributions, evaluated before a cell edit commits.
constructorconstructor SheetCellInputValidationRegistry(): SheetCellInputValidationRegistrypropertysymbolstatic readonly symbol: typeof symbolmethodbeginTeardown beginTeardown(token: object): voidAllows owner-controlled cleanup after command dispatch has ended.
token: object
methodenforceCommandBoundary enforceCommandBoundary(isExecuting: (): boolean, dispatchRemoval: (id: number): void, teardownToken: object): voidCloses direct writes once the editor finishes starting.
isExecuting: (): booleandispatchRemoval: (id: number): voidteardownToken: object
methodregister register(id: string, validator: SheetCellInputValidator): (): voidid: stringvalidator: SheetCellInputValidator
methodunregister unregister(registrationId: number): voidRemoves one registration, dispatching through its command after assembly.
registrationId: number
methodvalidate validate(row: number, column: number, text: string): SheetCellInputValidationResultrow: numbercolumn: numbertext: string
- classSheetDisplayedValueChangessource ↗
-
class SheetDisplayedValueChangesEditor-local fanout for changes to displayed cell values.
constructorconstructor SheetDisplayedValueChanges(warn: (error: unknown): void): SheetDisplayedValueChangeswarn: (error: unknown): void
propertysymbolstatic readonly symbol: typeof symbolmethoddispose dispose(): voidmethodenforceCommandBoundary enforceCommandBoundary(isExecuting: (): boolean, runWithoutMutationAuthority: <Value>(callback: (): Value): Value): voidSeals publishing after startup while keeping host listeners outside command authority.
isExecuting: (): booleanrunWithoutMutationAuthority: <Value>(callback: (): Value): Value
methodpublish publish(cells: readonly SheetDisplayedValueCoordinate[]): voidcells: readonly SheetDisplayedValueCoordinate[]
methodsubscribe subscribe(listener: SheetDisplayedValueChangeListener): (): voidlistener: SheetDisplayedValueChangeListener
- classTextCellCommitStrategysource ↗
-
class TextCellCommitStrategy extends CellCommitStrategyHandles explicit text input: Text-format cells and apostrophe-prefixed values.
constructorconstructor TextCellCommitStrategy(): TextCellCommitStrategypropertykey readonly key: "string"Stable identifier for the explicit text strategy.
propertypriority readonly priority: 80Ordering priority for explicit text input.
methodcommit commit(context: CellCommitContext): CellMatrixElementPersists input as an explicit text cell.
context: CellCommitContext
methodmatches matches(context: CellCommitContext): booleanReports whether the input is explicitly typed as text.
context: CellCommitContext
- interfaceCellClipboardCellPayloadsource ↗
-
interface CellClipboardCellPayloadJSON-safe representation owned by the cell type that produced it.
- interfaceCellClipboardCodecDefinitionsource ↗
-
interface CellClipboardCodecDefinitionClipboard behavior contributed by one persisted cell type.
propertycellType readonly cellType: stringmethoddecode decode(data: unknown, context: CellClipboardDecodeContext): CellMatrixElement | nulldata: unknowncontext: CellClipboardDecodeContext
methoddecodePlainText decodePlainText(text: string): CellMatrixElement | nulltext: string
methodencode encode(cell: CellMatrixElement): unknowncell: CellMatrixElement
methodrebase rebase(cell: CellMatrixElement, context: CellClipboardDecodeContext): CellMatrixElementcell: CellMatrixElementcontext: CellClipboardDecodeContext
methodtoPlainText toPlainText(cell: CellMatrixElement): stringcell: CellMatrixElement
- interfaceCellClipboardDecodeContextsource ↗
-
interface CellClipboardDecodeContextContext used by a cell type when a native clipboard cell is pasted elsewhere.
propertycolumnDelta readonly columnDelta: numberpropertyrowDelta readonly rowDelta: number - interfaceCellCommitContextsource ↗
-
interface CellCommitContextInput available when the cell editor commits one edited cell.
propertycol col: numberpropertyformat format?: CellFormat | nullExplicit format read from the Sheet cell-format state owner.
propertyformatLocale formatLocale?: CellFormatLocaleLocale used to interpret the formatted editor text.
propertyplainText plainText: stringpropertyprevious previous: CellMatrixElement | nullpropertyrichText richText: RichDocNode[]propertyrow row: number - interfaceCellCommitStrategyDefinitionsource ↗
-
interface CellCommitStrategyDefinitionContract for deciding how editor input becomes persisted cell data.
propertykey readonly key: stringpropertypriority readonly priority: numbermethodcommit commit(context: CellCommitContext): CellMatrixElement | nullcontext: CellCommitContext
methodinferFormat inferFormat(context: CellCommitContext): CellFormat | nullcontext: CellCommitContext
methodmatches matches(context: CellCommitContext): booleancontext: CellCommitContext
- interfaceCellFormatLocalesource ↗
-
interface CellFormatLocaleLocale defaults used when a cell format does not declare explicit display settings.
propertydatePattern readonly datePattern: stringpropertydateTimePattern readonly dateTimePattern: stringpropertydecimalSeparator readonly decimalSeparator?: stringpropertygroupSeparator readonly groupSeparator?: stringpropertylocale readonly locale: stringpropertytimePattern readonly timePattern: string - interfaceCellFormatTransferCodecsource ↗
-
interface CellFormatTransferCodecType-owned format projection that never substitutes source values for target values.
propertycellType readonly cellType: stringmethodapply apply(cell: CellMatrixElement, format: Readonly<Record<string, unknown>>): CellMatrixElementcell: CellMatrixElementformat: Readonly<Record<string, unknown>>
methodcapture capture(cell: CellMatrixElement): Readonly<Record<string, unknown>>cell: CellMatrixElement
- interfaceICellFormatLocaleProvidersource ↗
-
interface ICellFormatLocaleProviderProvides sheet-local defaults for number and date/time display formatting.
methodgetCellFormatLocale getCellFormatLocale(): CellFormatLocale - interfaceSheetCellInputValidationResultsource ↗
-
interface SheetCellInputValidationResultResult of validating a proposed cell edit.
- interfaceSheetDisplayedValueCoordinatesource ↗
-
interface SheetDisplayedValueCoordinateA cell whose displayed value changed after a derived value update.
- typeCellFormatsource ↗
-
type CellFormat = { kind: "general" } | { kind: "text" } | { code: string; kind: "excelCode" } | { kind: "number"; locale?: string; maximumFractionDigits?: number; minimumFractionDigits?: number; useGrouping?: boolean } | { kind: "percent"; locale?: string; maximumFractionDigits?: number; minimumFractionDigits?: number } | { currency: string; kind: "currency"; locale?: string; maximumFractionDigits?: number; minimumFractionDigits?: number } | { kind: "date"; pattern?: string } | { kind: "time"; pattern?: string } | { kind: "dateTime"; pattern?: string }Cell formatting changes input interpretation and display only, never the raw value for display purposes.
- typeCellTypesource ↗
-
type CellType = typeof CellType[keyof typeof CellType]Type contract for CellType.
- typeSheetCellInputValidatorsource ↗
-
type SheetCellInputValidator = (row: number, column: number, text: string): SheetCellInputValidationResult - typeSheetDisplayedValueChangeListenersource ↗
-
type SheetDisplayedValueChangeListener = (cells: readonly SheetDisplayedValueCoordinate[]): void - variableCellFormatssource ↗
-
CellFormats: { date: { kind: "date" }; dateTime: { kind: "dateTime" }; general: { kind: "general" }; number: { kind: "number" }; percent: { kind: "percent" }; text: { kind: "text" }; time: { kind: "time" }; currency: unknown; … } - variableCellTypesource ↗
-
CellType: { Boolean: "boolean"; Empty: "empty"; Formula: "formula"; Number: "number"; RichText: "richtext"; String: "string" }Built-in persisted cell type identifiers.
Consumers may use arbitrary strings for their own types; these constants keep the built-in values consistent across editing, rendering and formulas.
- variableDefaultCellFormatLocalesource ↗
-
DefaultCellFormatLocale: CellFormatLocaleExcel-compatible formatting defaults used when no i18n plugin is installed.
- functionadjustCellFormatDecimalPlacessource ↗
-
adjustCellFormatDecimalPlaces(format: unknown, delta: number): CellFormatAdjusts the visible decimal-place count of numeric built-in formats.
format: unknowndelta: number
- functionassertCellExtensionWritesource ↗
-
assertCellExtensionWrite(owner: object): voidChecks registration changes only; cell reads and rendering stay on their existing hot paths.
owner: object
- functionassertSheetHorizontalAlignmentsource ↗
-
assertSheetHorizontalAlignment(value: unknown): valueAsserts that a value is one of the supported Sheet horizontal alignments.
value: unknown
- functionassertSheetVerticalAlignmentsource ↗
-
assertSheetVerticalAlignment(value: unknown): valueAsserts that a value is one of the supported Sheet vertical alignments.
value: unknown
- functioncellFormatToExcelCodesource ↗
-
cellFormatToExcelCode(format: unknown): string | undefinedConverts an explicit cell format into the Excel-style code exposed to formula metadata readers.
format: unknown
- functioncreateDefaultCellFormatLocaleProvidersource ↗
-
createDefaultCellFormatLocaleProvider(): ICellFormatLocaleProviderCreates the default cell-format locale provider.
- functioncreateGeneralNumberDisplayCandidatessource ↗
-
createGeneralNumberDisplayCandidates(value: number): readonly string[]Returns General-format candidates from most informative to most compact.
value: number
- functionformatCellNumbersource ↗
-
formatCellNumber(value: number, format: unknown, locale?: CellFormatLocale): stringRuns the format cell number helper.
value: numberformat: unknownlocale: CellFormatLocale
- functionformatCellNumberDisplaysource ↗
-
formatCellNumberDisplay(value: number, format: unknown, locale?: CellFormatLocale): SpreadsheetFormatDisplayFormats one numeric cell and preserves format-section visual metadata.
value: numberformat: unknownlocale: CellFormatLocale
- functionformatCellTextsource ↗
-
formatCellText(value: string, format: unknown, locale?: CellFormatLocale): stringApplies the fourth custom-format section to a text cell.
value: stringformat: unknownlocale: CellFormatLocale
- functioninterpretNumberInputsource ↗
-
interpretNumberInput(source: string, currentFormat: CellFormat | null | undefined, locale?: CellFormatLocale): { format?: CellFormat; value: number } | nullParses direct numeric/date input and suggests a display format for General cells.
source: stringcurrentFormat: CellFormat | null | undefinedlocale: CellFormatLocale
- functionisSheetHorizontalAlignmentsource ↗
-
isSheetHorizontalAlignment(value: unknown): valueReturns whether an unknown value is a supported Sheet horizontal alignment.
value: unknown
- functionisSheetVerticalAlignmentsource ↗
-
isSheetVerticalAlignment(value: unknown): valueReturns whether an unknown value is a supported Sheet vertical alignment.
value: unknown
- functionnormalizeCellFormatsource ↗
-
normalizeCellFormat(value: unknown): CellFormatNormalizes a public CellFormat object, falling back to General for invalid input.
value: unknown
- functionparseFormattedNumbersource ↗
-
parseFormattedNumber(text: string, format: unknown, locale?: CellFormatLocale): number | undefinedRuns the parse formatted number helper.
text: stringformat: unknownlocale: CellFormatLocale
- functionsealCellExtensionWritessource ↗
-
sealCellExtensionWrites(owner: object, assertWrite: (): void): voidSeals an editor-local cell extension owner after setup contributions are registered.
owner: objectassertWrite: (): void
- interfaceCellMatrixElementsource ↗
-
interface CellMatrixElementPersisted cell payload stored in the sheet matrix.
propertyformula formula?: stringFormula source text for formula cells; calculated results live in formula plugin state.
propertyformulaEvaluationMode formulaEvaluationMode?: "dynamic" | "legacy"Array evaluation mode used when the formula was entered.
propertytype type: stringCell type identifier owned by the cell type catalog.
propertyvalue value?: unknownRaw value whose shape is owned by the cell type.
No public exports match that search.