Skip to main content
Version: v1

@fluidframework/sequence Package

Supports distributed data structures which are list-like.

This package's main export is SharedSequence, a DDS for storing and simultaneously editing a sequence of text.

Remarks

Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for working with text.

Interfaces

Interface Description
IIntervalCollectionEvent
IIntervalHelpers
IJSONRunSegment
ISequenceDeltaRange A range that has changed corresponding to a segment modification.
ISerializableInterval
ISerializedInterval
ISharedIntervalCollection
ISharedSegmentSequenceEvents Events emitted in response to changes to the sequence data.
ISharedString Fluid object interface describing access methods on a SharedString

Classes

Class Alerts Description
Interval
IntervalCollection
IntervalCollectionIterator
PaddingSegment Deprecated An empty segment that occupies 'cachedLength' positions. SparseMatrix uses PaddingSegment to "pad" a run of unoccupied cells.
RunSegment Deprecated
SequenceDeltaEvent

The event object returned on sequenceDelta events.

The properties of this object and its sub-objects represent the state of the sequence at the point in time at which the operation was applied. They will not take into consideration any future modifications performed to the underlying sequence and merge tree.

For group ops, each op will get its own event, and the group op property will be set on the op args.

Ops may get multiple events. For instance, an insert-replace will get a remove then an insert event.

SequenceEvent

Base class for SequenceDeltaEvent and SequenceMaintenanceEvent.

The properties of this object and its sub-objects represent the state of the sequence at the point in time at which the operation was applied. They will not take into any future modifications performed to the underlying sequence and merge tree.

SequenceInterval
SequenceMaintenanceEvent

The event object returned on maintenance events.

The properties of this object and its sub-objects represent the state of the sequence at the point in time at which the operation was applied. They will not take into consideration any future modifications performed to the underlying sequence and merge tree.

SharedIntervalCollection Deprecated
SharedIntervalCollectionFactory Deprecated The factory that defines the SharedIntervalCollection
SharedNumberSequence Deprecated The SharedNumberSequence holds a sequence of numbers. Each number will be stored at a position within the sequence. See the sequence documentation for details on working with sequences.
SharedNumberSequenceFactory Deprecated
SharedObjectSequence Deprecated The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored at a position within the sequence. See the sequence documentation for details on working with sequences.
SharedObjectSequenceFactory Deprecated
SharedSegmentSequence
SharedSequence
SharedString

The Shared String is a specialized data structure for handling collaborative text. It is based on a more general Sequence data structure but has additional features that make working with text easier.

In addition to text, a Shared String can also contain markers. Markers can be used to store metadata at positions within the text, like the details of an image or Fluid object that should be rendered with the text.

SharedStringFactory
SparseMatrix Deprecated
SparseMatrixFactory Deprecated
SubSequence

Enumerations

Enum Description
IntervalType

Types

TypeAlias Alerts Description
CompressedSerializedInterval

A size optimization to avoid redundantly storing keys when serializing intervals as JSON. Intervals are of the format:

[start, end, sequenceNumber, intervalType, properties]

DeserializeCallback
MatrixSegment Deprecated
SharedStringSegment
SparseMatrixItem Deprecated

Functions

Function Alerts Return Type Description
positionToRowCol(position) Deprecated { row: number; col: number; }

Variables

Variable Alerts Type Description
maxCellPosition Deprecated number
maxCol Deprecated
maxCols Deprecated number
maxRow Deprecated
maxRows Deprecated number
rowColToPosition Deprecated (row: number, col: number) => number

Function Details

positionToRowCol

This API is deprecated and will be removed in a future release.

positionToRowCol is part of an abandoned prototype. Use SharedMatrix instead.

Signature

export declare function positionToRowCol(position: number): {
row: number;
col: number;
};

Parameters

Parameter Type Description
position number

Returns

Return type: { row: number; col: number; }

Variable Details

maxCellPosition

This API is deprecated and will be removed in a future release.

maxCellPosition is part of an abandoned prototype. Use SharedMatrix instead.

Signature

maxCellPosition: number

Type: number

maxCol

This API is deprecated and will be removed in a future release.

maxCol is part of an abandoned prototype. Use SharedMatrix instead.

Signature

maxCol = 2097152

maxCols

This API is deprecated and will be removed in a future release.

maxCols is part of an abandoned prototype. Use SharedMatrix instead.

Signature

maxCols: number

Type: number

maxRow

This API is deprecated and will be removed in a future release.

maxRow is part of an abandoned prototype. Use SharedMatrix instead.

Signature

maxRow = 4294967295

maxRows

This API is deprecated and will be removed in a future release.

maxRows is part of an abandoned prototype. Use SharedMatrix instead.

Signature

maxRows: number

Type: number

rowColToPosition

This API is deprecated and will be removed in a future release.

positionToRowCol is part of an abandoned prototype. Use SharedMatrix instead.

Signature

rowColToPosition: (row: number, col: number) => number

Type: (row: number, col: number) => number