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​

InterfaceDescription
IIntervalCollectionEvent
IIntervalHelpers
IJSONRunSegment
ISequenceDeltaRangeA range that has changed corresponding to a segment modification.
ISerializableInterval
ISerializedInterval
ISharedIntervalCollection
ISharedSegmentSequenceEventsEvents emitted in response to changes to the sequence data.
ISharedStringFluid object interface describing access methods on a SharedString

Classes​

ClassAlertsDescription
Interval
IntervalCollection
IntervalCollectionIterator
PaddingSegmentDeprecatedAn empty segment that occupies 'cachedLength' positions. SparseMatrix uses PaddingSegment to "pad" a run of unoccupied cells.
RunSegmentDeprecated
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.

SharedIntervalCollectionDeprecated
SharedIntervalCollectionFactoryDeprecatedThe factory that defines the SharedIntervalCollection
SharedNumberSequenceDeprecatedThe 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.
SharedNumberSequenceFactoryDeprecated
SharedObjectSequenceDeprecatedThe 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.
SharedObjectSequenceFactoryDeprecated
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
SparseMatrixDeprecated
SparseMatrixFactoryDeprecated
SubSequence

Enumerations​

EnumDescription
IntervalType

Types​

TypeAliasAlertsDescription
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
MatrixSegmentDeprecated
SharedStringSegment
SparseMatrixItemDeprecated

Functions​

FunctionAlertsReturn TypeDescription
positionToRowCol(position)Deprecated{ row: number; col: number; }

Variables​

VariableAlertsTypeDescription
maxCellPositionDeprecatednumber
maxColDeprecated
maxColsDeprecatednumber
maxRowDeprecated
maxRowsDeprecatednumber
rowColToPositionDeprecated(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​

ParameterTypeDescription
positionnumber

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