← All packages

API reference

@searsuite/sear-domain-ot

Operational-transformation primitives for matrices, rectangles, and rich documents.

66 exportsderived from source

enumMatrixOTActionNamesource ↗
enum MatrixOTActionName

Compact command keys persisted in matrix OT payloads.

enum memberColDelete
ColDelete: "cd"
enum memberColInsert
ColInsert: "ci"
enum memberColMove
ColMove: "cm"
enum memberResizeCol
ResizeCol: "rc"
enum memberResizeRow
ResizeRow: "rr"
enum memberRowDelete
RowDelete: "rd"
enum memberRowInsert
RowInsert: "ri"
enum memberRowMove
RowMove: "rm"
enum memberUpdateCell
UpdateCell: "uc"
enumOTTransformPrioritysource ↗
enum OTTransformPriority

Tie-break direction used when two concurrent operations target the same position.

enum memberLEFT
LEFT: "left"
enum memberRIGHT
RIGHT: "right"
enumRectOTActionNamesource ↗
enum RectOTActionName

Compact command keys persisted in rectangle OT payloads.

enum memberUpdateRect
UpdateRect: "ur"
enumRichDocOTActionNamesource ↗
enum RichDocOTActionName

Compact operation keys persisted in rich-document OT payloads.

enum memberNodeDelete
NodeDelete: "nd"
enum memberNodeInsert
NodeInsert: "ni"
enum memberNodeMove
NodeMove: "nm"
enum memberStringDelete
StringDelete: "sd"
enum memberStringInsert
StringInsert: "si"
enum memberUpdateAttrs
UpdateAttrs: "ua"
classBaseOTsource ↗
class BaseOT

Base class for Operational Transformation implementations.

Concrete domains provide the actual apply, append, compose, and transform semantics while sharing validation and creation helpers here.

constructorconstructor
BaseOT(name: string): BaseOT

Constructs an OT implementation descriptor.

name: string

Stable implementation name.

propertyname
readonly name: string

Human-readable OT implementation name for diagnostics and debugging.

methodappendstatic
append(destination: OTOperation[], current: OTOperation): void

Appends one operation into a composed destination list.

ThrowsSearError until implemented by a concrete OT class.

destination: OTOperation[]
current: OTOperation
methodapplystatic
apply(snapshot: unknown, operations: OTOperation[]): void

Applies operations to a domain snapshot.

ThrowsSearError until implemented by a concrete OT class.

snapshot: unknown
operations: OTOperation[]
methodcheckValidOpstatic
checkValidOp(operations: OTOperation[]): void

Validates the structural contract common to all operations.

ThrowsSearError when an operation is missing its path.

operations: OTOperation[]

Operations that must each carry an array path.

methodcomposestatic
compose(operation1: OTOperation[], operation2: OTOperation[]): OTOperation[]

Composes two sequential operation lists into one equivalent list.

ThrowsSearError until implemented by a concrete OT class.

operation1: OTOperation[]
operation2: OTOperation[]
methodcreatestatic
create(data?: OTOperation[]): OTOperation[]

Creates an operation list snapshot.

ReturnsA mutable operation list detached from the caller's array.

data: OTOperation[]

Optional operations to clone into the new list.

methodtransformstatic
transform(operation: OTOperation[], otherOperation: OTOperation[], type: OTTransformPriority): OTOperation[]

Transforms an operation list against concurrent operations.

ThrowsSearError until implemented by a concrete OT class.

operation: OTOperation[]
otherOperation: OTOperation[]
type: OTTransformPriority
classMatrixOTsource ↗
class MatrixOT extends BaseOT

Operational Transformation implementation for CSRMatrix-backed sheet state.

MatrixOT owns cell updates, row/column structure edits, dimension resize operations, and the transform rules that keep concurrent matrix changes convergent.

constructorconstructor
MatrixOT(): MatrixOT

Creates a MatrixOT descriptor for diagnostics and shared OT registries.

methodappendstatic
append<U>(destination: MatrixOTOperation<U>[], current: MatrixOTOperation<U>): void

Appends one component into a composed matrix operation list.

destination: MatrixOTOperation<U>[]

Composition destination mutated in place.

current: MatrixOTOperation<U>

Operation to append.

methodapplystatic
apply<U, S>(snapshot: S, operations: MatrixOTOperation<U>[]): S

Applies operations to a CSR matrix snapshot.

ReturnsThe same snapshot instance after mutation.

snapshot: S

Mutable CSR-backed state.

operations: MatrixOTOperation<U>[]

Matrix operations to apply.

methodcommonLengthForOpsstatic
commonLengthForOps<U>(operation1: MatrixOTOperation<U>, operation2: MatrixOTOperation<U>): number

Computes the common parent depth used by component transformation.

ReturnsThe depth of the shared parent segment.

operation1: MatrixOTOperation<U>

First operation whose parent path is compared.

operation2: MatrixOTOperation<U>

Second operation whose parent path is compared.

methodcomposestatic
compose<U>(operation1: MatrixOTOperation<U>[], operation2: MatrixOTOperation<U>[]): MatrixOTOperation<U>[]

Composes two sequential matrix operation lists.

ReturnsEquivalent composed operation list.

operation1: MatrixOTOperation<U>[]

Earlier operation list.

operation2: MatrixOTOperation<U>[]

Later operation list.

methodinvertstatic
invert<U>(operations: MatrixOTOperation<U>[]): MatrixOTOperation<U>[]

Inverts an operation list in rollback order.

ReturnsOperations that undo the input when applied in order.

operations: MatrixOTOperation<U>[]

Forward operations to invert.

methodinvertComponentstatic
invertComponent<U>(currentOperation: MatrixOTOperation<U>): MatrixOTOperation<U>

Builds the inverse of one matrix component.

ReturnsA component that restores the previous matrix state.

currentOperation: MatrixOTOperation<U>

Component to invert.

methodtransformstatic
transform<U>(operation: MatrixOTOperation<U>[], otherOperation: MatrixOTOperation<U>[], type: OTTransformPriority): MatrixOTOperation<U>[]

Transforms concurrent Matrix OT operations into a convergent pair.

operation: MatrixOTOperation<U>[]
otherOperation: MatrixOTOperation<U>[]
type: OTTransformPriority
methodtransformComponentstatic
transformComponent<U>(destination: MatrixOTOperation<U>[], currentOperation: MatrixOTOperation<U>, otherOperation: MatrixOTOperation<U>, type: OTTransformPriority): MatrixOTOperation<U>[]

Transforms one matrix component over one concurrent component.

ReturnsThe destination list after appending any transformed component.

destination: MatrixOTOperation<U>[]

Output list receiving the transformed component or no-op.

currentOperation: MatrixOTOperation<U>

Operation being rebased.

otherOperation: MatrixOTOperation<U>

Concurrent operation already applied on the target branch.

type: OTTransformPriority

Tie-break side for equal-position edits.

methodtransformComponentXstatic
transformComponentX<U>(left: MatrixOTOperation<U>, right: MatrixOTOperation<U>, destLeft: MatrixOTOperation<U>[], destRight: MatrixOTOperation<U>[]): void

Transforms one Matrix OT component against another concurrent component.

left: MatrixOTOperation<U>
right: MatrixOTOperation<U>
destLeft: MatrixOTOperation<U>[]
destRight: MatrixOTOperation<U>[]
methodtransformXstatic
transformX<U>(leftOperation: MatrixOTOperation<U>[], rightOperation: MatrixOTOperation<U>[]): MatrixOTOperation<U>[][]

Transforms one Matrix OT operation against a concurrent operation.

leftOperation: MatrixOTOperation<U>[]
rightOperation: MatrixOTOperation<U>[]
Inherited members 3

Inherited from BaseOT.

classRectOTsource ↗
class RectOT extends BaseOT

Operational Transformation implementation for sheet rectangle state.

RectOT applies direct rectangle updates and matrix structure operations that shift row/column coordinates inside the rectangle.

constructorconstructor
RectOT(): RectOT

Creates a RectOT descriptor for diagnostics and shared OT registries.

methodapplystatic
apply<U>(snapshot: Rect, operations: RectOTOperation[]): Rect

Applies rectangle operations to a mutable Rect snapshot.

ReturnsThe same rectangle after mutation.

snapshot: Rect

Rectangle to mutate.

operations: RectOTOperation[]

Operations to apply in order.

methodinvertstatic
invert(operations: RectOTOperation[], beforeRect: Rect): RectOTOperation[]

Inverts a rectangle operation list using the rectangle state before each component.

ReturnsOperations that undo the input when applied in order.

operations: RectOTOperation[]

Forward operations to invert.

beforeRect: Rect

Rectangle state before any forward operations are applied.

methodinvertComponentstatic
invertComponent(currentOperation: RectOTOperation, beforeRect?: Rect): RectOTOperation

Builds the inverse of one rectangle operation.

ReturnsAn operation that restores the previous rectangle state.

currentOperation: RectOTOperation

Operation to invert.

beforeRect: Rect

Rectangle state before the forward update operation.

Inherited members 6

Inherited from BaseOT.

classRichDocOTsource ↗
class RichDocOT extends BaseOT

Operational Transformation implementation for the JSON rich-document model.

RichDocOT applies node, text, and attribute operations and rebases concurrent edits so document trees converge across collaboration clients.

constructorconstructor
RichDocOT(): RichDocOT

Creates a RichDocOT descriptor for diagnostics and shared OT registries.

methodappendstatic
append(destination: RichDocOTOperation[], current: RichDocOTOperation): void

Appends one rich-document operation into a composed destination list.

destination: RichDocOTOperation[]

Composition destination mutated in place.

current: RichDocOTOperation

Operation to append.

methodapplystatic
apply(snapshot: NodeSchema, operations: RichDocOTOperation[]): NodeSchema

Applies rich-document operations to a mutable node snapshot.

ReturnsThe same snapshot instance after mutation.

snapshot: NodeSchema

Root node to mutate.

operations: RichDocOTOperation[]

Operations to apply in order.

methodcomposestatic
compose(operation1: RichDocOTOperation[], operation2: RichDocOTOperation[]): RichDocOTOperation[]

Composes two sequential rich-document operation lists.

ReturnsEquivalent composed operation list.

operation1: RichDocOTOperation[]

Earlier operation list.

operation2: RichDocOTOperation[]

Later operation list.

methodcreatestatic
create(data?: RichDocOTOperation[]): RichDocOTOperation[]

Creates a detached rich-document operation list.

ReturnsA mutable operation list owned by the caller.

data: RichDocOTOperation[]

Optional operation list to clone.

methodinvertstatic
invert(operations: RichDocOTOperation[]): RichDocOTOperation[]

Creates the inverse operation list for a committed rich-document change.

operations: RichDocOTOperation[]
methodtransformstatic
transform(operation: RichDocOTOperation[], otherOperation: RichDocOTOperation[], type: OTTransformPriority): RichDocOTOperation[]

Transforms one rich-document operation list against concurrent operations.

ReturnsThe operation list rebased over otherOperation.

operation: RichDocOTOperation[]

Operation list being rebased.

otherOperation: RichDocOTOperation[]

Concurrent operation list already applied on the target branch.

type: OTTransformPriority

Tie-break side for equal-position edits.

Inherited members 2

Inherited from BaseOT.

classTransactionOTErrorsource ↗
class TransactionOTError extends SearError

Public error for invalid or unavailable transaction OT behavior.

constructorconstructor
TransactionOTError(code: TransactionOTErrorCode, message: string, details?: SearErrorDetails): TransactionOTError
code: TransactionOTErrorCode
message: string
details: SearErrorDetails
propertycode
readonly code: TransactionOTErrorCode

Stable machine-readable identifier for this error category.

Inherited members 9

Inherited from SearError.

classTransactionOTRegistrysource ↗
class TransactionOTRegistry

Local registry of versioned OT families and explicit pair transformations.

constructorconstructor
TransactionOTRegistry(): TransactionOTRegistry
methoddecode
decode(id: string, version: number, payload: unknown): OTOperation[]

Decodes a wire payload through its registered family definition.

id: string
version: number
payload: unknown
methoddestroy
destroy(): void

Permanently clears the registry.

methodencode
encode<OperationType>(definition: TransactionOTDefinition<OperationType>, operations: readonly OperationType[]): OTEncodedValue

Encodes and validates one operation family payload.

definition: TransactionOTDefinition<OperationType>
operations: readonly OperationType[]
methodinvert
invert<OperationType>(definition: TransactionOTDefinition<OperationType>, operations: readonly OperationType[]): OperationType[]

Inverts operations through their family definition.

definition: TransactionOTDefinition<OperationType>
operations: readonly OperationType[]
methodregisterIndependent
registerIndependent(left: TransactionOTDefinition, right: TransactionOTDefinition): (): void

Registers two families as independent, so pair transformation is explicit identity.

left: TransactionOTDefinition
right: TransactionOTDefinition
methodregisterRelation
registerRelation<Left, Right>(relation: OTTransformRelation<Left, Right>): (): void

Registers one explicit relation. Reverse lookup uses the same implementation with swapped branches.

relation: OTTransformRelation<Left, Right>
methodregisterType
registerType<OperationType>(definition: TransactionOTDefinition<OperationType>): (): void

Registers one operation family and returns an idempotent disposer.

definition: TransactionOTDefinition<OperationType>
methodrequireType
requireType(id: string, version: number): TransactionOTDefinition

Resolves a registered operation family.

id: string
version: number
methodtransformPair
transformPair<Left, Right>(leftDefinition: TransactionOTDefinition<Left>, leftOperations: readonly Left[], rightDefinition: TransactionOTDefinition<Right>, rightOperations: readonly Right[], priority: OTTransformPriority): OTTransformPair<Left, Right>

Rebases two concurrent operation lists through their registered relation.

leftDefinition: TransactionOTDefinition<Left>
leftOperations: readonly Left[]
rightDefinition: TransactionOTDefinition<Right>
rightOperations: readonly Right[]
priority: OTTransformPriority
interfaceDeleteColOTOperationsource ↗
interface DeleteColOTOperation<T> extends OTOperation

Deletes one column and carries the deleted column payload for inversion.

propertycd
cd: T | null[]
propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

interfaceDeleteNodeOTOperationsource ↗
interface DeleteNodeOTOperation extends OTOperation

Deletes a node and carries the removed payload for inversion.

propertynd
nd: NodeSchema

Deleted node payload.

propertyp
p: OTOperationPath

Target node path.

interfaceDeleteRowOTOperationsource ↗
interface DeleteRowOTOperation<T> extends OTOperation

Deletes one row and carries the deleted row payload for inversion.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyrd
rd: T | null[]
interfaceDeleteStringOTOperationsource ↗
interface DeleteStringOTOperation extends OTOperation

Deletes text from a leaf text node and carries the removed string.

propertyp
p: OTOperationPath

Path ending in the string offset.

propertysd
sd: string

Deleted string payload.

interfaceInsertColOTOperationsource ↗
interface InsertColOTOperation<T> extends OTOperation

Inserts one column at the target column index.

propertyci
ci: T | null[]
propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

interfaceInsertNodeOTOperationsource ↗
interface InsertNodeOTOperation extends OTOperation

Inserts a node into a parent content array.

propertyni
ni: NodeSchema

Node payload inserted at the target path.

propertyp
p: OTOperationPath

Target insertion path.

interfaceInsertRowOTOperationsource ↗
interface InsertRowOTOperation<T> extends OTOperation

Inserts one row at the target row index.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyri
ri: T | null[]
interfaceInsertStringOTOperationsource ↗
interface InsertStringOTOperation extends OTOperation

Inserts text into a leaf text node.

propertyp
p: OTOperationPath

Path ending in the string offset.

propertysi
si: string

String inserted at the offset.

interfaceMoveColOTOperationsource ↗
interface MoveColOTOperation<T> extends OTOperation

Exchanges the column at the path index with the column index encoded by cm.

propertycm
cm: MatrixOTOperationPath
propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

interfaceMoveNodeOTOperationsource ↗
interface MoveNodeOTOperation extends OTOperation

Moves a node within its parent content array.

propertynm
nm: [number]

Destination sibling index.

propertyp
p: OTOperationPath

Source node path.

interfaceMoveRowOTOperationsource ↗
interface MoveRowOTOperation<T> extends OTOperation

Exchanges the row at the path index with the row index encoded by rm.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyrm
rm: MatrixOTOperationPath
interfaceOTOperationsource ↗
interface OTOperation

Minimal operation contract shared by every domain OT implementation.

propertyp
p: OTOperationPath

Path locating the operation target inside the snapshot.

interfaceOTTransformPairsource ↗
interface OTTransformPair<Left, Right>

Pair transformation result preserving both concurrent branches.

propertyleft
readonly left: Left[]
propertyright
readonly right: Right[]
interfaceOTTransformRelationsource ↗
interface OTTransformRelation<Left, Right>

Domain-specific transformation relation between two operation families.

propertyleft
readonly left: TransactionOTDefinition<Left>
propertyright
readonly right: TransactionOTDefinition<Right>
methodtransformPair
transformPair(left: readonly Left[], right: readonly Right[], priority: OTTransformPriority): OTTransformPair<Left, Right>
left: readonly Left[]
right: readonly Right[]
priority: OTTransformPriority
interfaceReplaceNodeOTOperationsource ↗
interface ReplaceNodeOTOperation extends OTOperation

Replaces one node in a content array while retaining both sides for OT inversion.

propertynd
nd: NodeSchema

Node payload removed from the target path.

propertyni
ni: NodeSchema

Node payload inserted at the target path.

propertyp
p: OTOperationPath

Target node path.

interfaceResizeColOTOperationsource ↗
interface ResizeColOTOperation extends OTOperation

Updates one column dimension in a dimension matrix.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyrc
rc: { prev: number | null; value: number | null }
interfaceResizeRowOTOperationsource ↗
interface ResizeRowOTOperation extends OTOperation

Updates one row dimension in a dimension matrix.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyrr
rr: { prev: number | null; value: number | null }
interfaceTransactionOTDefinitionsource ↗
interface TransactionOTDefinition<OperationType>

Stable, versioned operation family shared by history and collaboration.

propertyid
readonly id: string
propertyversion
readonly version: number
methoddecode
decode(payload: unknown): OperationType[]
payload: unknown
methodencode
encode(operations: readonly OperationType[]): OTEncodedValue
operations: readonly OperationType[]
methodinvert
invert(operations: readonly OperationType[]): OperationType[]
operations: readonly OperationType[]
methodisOperation
isOperation(operation: OTOperation): operation
operation: OTOperation
interfaceUpdateAttrsOTOperationsource ↗
interface UpdateAttrsOTOperation extends OTOperation

Updates one node attribute and carries both previous and next values.

propertyp
p: OTOperationPath

Path ending in the attribute key.

propertyua
ua: { prev: unknown; value: unknown }

New attribute value and previous attribute value.

interfaceUpdateCellOTOperationsource ↗
interface UpdateCellOTOperation<T> extends OTOperation

Updates a single cell and carries both forward and previous values.

propertyp
p: MatrixOTOperationPath

Path locating the operation target inside the snapshot.

propertyuc
uc: { intent?: "relocation"; prev: T | null; value: T | null }
interfaceUpdateRectOTOperationsource ↗
interface UpdateRectOTOperation extends OTOperation

Replaces a rectangle's two corner points.

propertyp
p: MatrixOTOperationPath

Target rectangle path or matrix coordinate path.

propertyur
ur: [Point, Point]

New rectangle range as [startPoint, endPoint].

typeMatrixCellUpdateIntentsource ↗
type MatrixCellUpdateIntent = typeof MatrixCellUpdateIntent[keyof typeof MatrixCellUpdateIntent]

Distinguishes ordinary replacement from relocation that preserves independently owned cell state.

typeMatrixOTOperationsource ↗
type MatrixOTOperation = InsertRowOTOperation<T> | DeleteRowOTOperation<T> | UpdateCellOTOperation<T> | MoveRowOTOperation<T> | InsertColOTOperation<T> | DeleteColOTOperation<T> | MoveColOTOperation<T> | ResizeRowOTOperation | ResizeColOTOperation

Every operation understood by MatrixOT and matrix-backed sheet state.

typeMatrixStructureOTOperationsource ↗
type MatrixStructureOTOperation = InsertRowOTOperation<T> | DeleteRowOTOperation<T> | MoveRowOTOperation<T> | InsertColOTOperation<T> | DeleteColOTOperation<T> | MoveColOTOperation<T>

Structural matrix operations that shift row or column coordinates.

typeOperationsource ↗
type Operation = MatrixOTOperation<unknown> | UpdateRectOTOperation | RichDocOTOperation

Built-in operation union. Third-party callers use OTOperation as their open base contract.

typeOTEncodedValuesource ↗
type OTEncodedValue = null | boolean | number | string | readonly OTEncodedValue[] | { }

JSON-compatible values accepted by collaboration transports.

typeRichDocOTOperationsource ↗
type RichDocOTOperation = InsertNodeOTOperation | DeleteNodeOTOperation | ReplaceNodeOTOperation | MoveNodeOTOperation | InsertStringOTOperation | DeleteStringOTOperation | UpdateAttrsOTOperation

Every operation understood by RichDocOT.

typeRichDocOTOperationPathsource ↗
type RichDocOTOperationPath = OTOperationPath

Path into a rich-document tree; numeric segments address content arrays and string segments address attrs.

typeTransactionOTErrorCodesource ↗
type TransactionOTErrorCode = typeof TransactionOTErrorCode[keyof typeof TransactionOTErrorCode]

Stable errors raised by transaction OT definitions and registries.

variableMatrixCellUpdateIntentsource ↗
MatrixCellUpdateIntent: { Relocation: "relocation" }

Distinguishes ordinary replacement from relocation that preserves independently owned cell state.

variableMatrixTransactionOTsource ↗
MatrixTransactionOT: TransactionOTDefinition<MatrixOTOperation<unknown>>

Built-in MatrixOT family shared by matrix-backed transaction owners.

variableMatrixTransactionOTRelationsource ↗
MatrixTransactionOTRelation: OTTransformRelation<MatrixOTOperation<unknown>, MatrixOTOperation<unknown>>

Matrix-to-matrix pair transformation used by every matrix-backed owner.

variableRichDocTransactionOTsource ↗
RichDocTransactionOT: TransactionOTDefinition<RichDocOTOperation>

Built-in rich-document operation family.

variableRichDocTransactionOTRelationsource ↗
RichDocTransactionOTRelation: OTTransformRelation<RichDocOTOperation, RichDocOTOperation>

Rich-document pair transformation.

variableTransactionOTErrorCodesource ↗
TransactionOTErrorCode: { InvalidDefinition: "SEAR_TRANSACTION_OT_INVALID_DEFINITION"; InvalidPayload: "SEAR_TRANSACTION_OT_INVALID_PAYLOAD"; InvertUnsupported: "SEAR_TRANSACTION_OT_INVERT_UNSUPPORTED"; RegistryDestroyed: "SEAR_TRANSACTION_OT_REGISTRY_DESTROYED"; RelationConflict: "SEAR_TRANSACTION_OT_RELATION_CONFLICT"; RelationNotRegistered: "SEAR_TRANSACTION_OT_RELATION_NOT_REGISTERED"; TypeConflict: "SEAR_TRANSACTION_OT_TYPE_CONFLICT"; TypeNotRegistered: "SEAR_TRANSACTION_OT_TYPE_NOT_REGISTERED" }

Stable errors raised by transaction OT definitions and registries.

functioncreateBuiltinTransactionOTRegistrysource ↗
createBuiltinTransactionOTRegistry(): TransactionOTRegistry

Creates an isolated registry containing all built-in OT definitions and relations.

functioncreateDeleteColOTOperationsource ↗
createDeleteColOTOperation<T>(path: readonly number[], values: readonly T | null[]): DeleteColOTOperation<T>

Creates a semantic column-delete operation carrying the deleted values required for inversion.

path: readonly number[]
values: readonly T | null[]
functioncreateDeleteRowOTOperationsource ↗
createDeleteRowOTOperation<T>(path: readonly number[], values: readonly T | null[]): DeleteRowOTOperation<T>

Creates a semantic row-delete operation carrying the deleted values required for inversion.

path: readonly number[]
values: readonly T | null[]
functioncreateInsertColOTOperationsource ↗
createInsertColOTOperation<T>(path: readonly number[], values: readonly T | null[]): InsertColOTOperation<T>

Creates a semantic column-insert operation without changing the MatrixOT wire shape.

path: readonly number[]
values: readonly T | null[]
functioncreateInsertRowOTOperationsource ↗
createInsertRowOTOperation<T>(path: readonly number[], values: readonly T | null[]): InsertRowOTOperation<T>

Creates a semantic row-insert operation without changing the MatrixOT wire shape.

path: readonly number[]
values: readonly T | null[]
functioncreateMoveColOTOperationsource ↗
createMoveColOTOperation(path: readonly number[], destination: readonly number[]): MoveColOTOperation<unknown>

Creates a semantic column-move operation.

path: readonly number[]
destination: readonly number[]
functioncreateMoveRowOTOperationsource ↗
createMoveRowOTOperation(path: readonly number[], destination: readonly number[]): MoveRowOTOperation<unknown>

Creates a semantic row-move operation.

path: readonly number[]
destination: readonly number[]
functioncreateResizeColOTOperationsource ↗
createResizeColOTOperation(path: readonly number[], value: number | null, previousValue: number | null): ResizeColOTOperation

Creates a semantic column-resize operation.

path: readonly number[]
value: number | null
previousValue: number | null
functioncreateResizeRowOTOperationsource ↗
createResizeRowOTOperation(path: readonly number[], value: number | null, previousValue: number | null): ResizeRowOTOperation

Creates a semantic row-resize operation.

path: readonly number[]
value: number | null
previousValue: number | null
functioncreateUpdateCellOTOperationsource ↗
createUpdateCellOTOperation<T>(path: readonly number[], value: T | null, previousValue: T | null, intent?: "relocation"): UpdateCellOTOperation<T>

Creates a semantic cell-update operation carrying both values required for inversion.

path: readonly number[]
value: T | null
previousValue: T | null
intent: "relocation"
functioncreateUpdateRectOTOperationsource ↗
createUpdateRectOTOperation(path: readonly number[], start: readonly [number, number], end: readonly [number, number]): UpdateRectOTOperation

Creates a semantic rectangle update without changing the RectOT wire shape.

path: readonly number[]
start: readonly [number, number]
end: readonly [number, number]
functiongetAllActionNamessource ↗
getAllActionNames(): Set<string>

Returns a Set of all known OT action name strings. Used by the engine to identify which action types are present in an operation.

functionisMatrixOperationsource ↗
isMatrixOperation(operation: OTOperation): operation

Narrows an operation to any operation understood by MatrixOT.

operation: OTOperation
functionisMatrixStructureOperationsource ↗
isMatrixStructureOperation<T>(operation: OTOperation): operation

Narrows an OT operation to one of the row or column structure operations.

operation: OTOperation
functionisResizeColOperationsource ↗
isResizeColOperation(operation: OTOperation): operation

Narrows an OT operation to a column-resize operation with a present action payload.

operation: OTOperation
functionisResizeRowOperationsource ↗
isResizeRowOperation(operation: OTOperation): operation

Narrows an OT operation to a row-resize operation with a present action payload.

operation: OTOperation
functionisUpdateCellOperationsource ↗
isUpdateCellOperation<T>(operation: OTOperation): operation

Narrows an OT operation to an update-cell operation with a present action payload.

operation: OTOperation
functionOTClonesource ↗
OTClone<T>(object: T): T

Deep-clones JSON-compatible OT payloads before mutation or composition.

object: T
functiontransactionOTTypeKeysource ↗
transactionOTTypeKey(definition: Pick<TransactionOTDefinition, "id" | "version">): string

Returns the wire identity of one versioned OT family.

definition: Pick<TransactionOTDefinition, "id" | "version">
interfaceNodeSchemasource ↗
interface NodeSchema

Persisted rich-document node schema shared by document runtime, commands, and OT.

propertyattrs
attrs?: Record<string, any>

Node attributes for styles, formatting, and feature-owned metadata.

propertycontent
content?: Schema[]

Child rich-document nodes.

propertyid
id?: string

Stable structural identity for layout, retained render nodes, and collaboration mapping.

propertytext
text?: string

Optional text content for leaf text nodes.

propertytype
type: string

Domain node type identifier.

interfaceTextSchemasource ↗
interface TextSchema extends NodeSchema

Persisted text-bearing rich-document node schema.

propertytext
text: string

Optional text content for leaf text nodes.

Inherited members 4

Inherited from NodeSchema.