Packages > @fluidframework/merge-tree

@fluidframework/merge-tree Package

Interfaces

Interface Alerts Modifiers Description
AttributionPolicy Legacy sealed Implements policy dictating which kinds of operations should be attributed and how.
IAttributionCollection Legacy
IAttributionCollectionSerializer Legacy sealed
IAttributionCollectionSpec Legacy
IClientEvents Legacy Emitted before this client's merge-tree normalizes its segments on reconnect, potentially ordering them. Useful for DDS-like consumers built atop the merge-tree to compute any information they need for rebasing their ops on reconnection.
IJSONMarkerSegment Legacy
IJSONSegment Legacy
IJSONTextSegment Legacy
IMarkerDef Legacy
IMergeNodeCommon Legacy Common properties for a node in a merge tree.
IMergeTreeAnnotateMsg Legacy
IMergeTreeAttributionOptions Legacy
IMergeTreeDelta Legacy
IMergeTreeDeltaCallbackArgs Legacy
IMergeTreeDeltaOpArgs Legacy
IMergeTreeGroupMsg Deprecated, Legacy
IMergeTreeInsertMsg Legacy
IMergeTreeMaintenanceCallbackArgs Legacy
IMergeTreeObliterateMsg Deprecated, Legacy
IMergeTreeOptions Legacy
IMergeTreeRemoveMsg Legacy
IMergeTreeSegmentDelta Legacy
IMergeTreeTextHelper Deprecated, Legacy
IMoveInfo Legacy

Tracks information about when and where this segment was moved to.

Note that merge-tree does not currently support moving and only supports obliterate. The fields below include "move" in their names to avoid renaming in the future, when moves _are_ supported.

IRelativePosition Legacy A position specified relative to a segment.
IRemovalInfo Legacy Contains removal information associated to an ISegment.
ISegment Legacy A segment representing a portion of the merge tree. Segments are leaf nodes of the merge tree and contain data.
ISegmentAction Legacy
ITrackingGroup Legacy
LocalReferencePosition Legacy sealed
MapLike Legacy Any mapping from a string to values of type T
MergeTreeRevertibleDriver Legacy
ReferencePosition Legacy Represents a reference to a place within a merge tree. This place conceptually remains stable over time by referring to a particular segment and offset within that segment. Thus, this reference's character position changes as the tree is edited.
SegmentGroup Deprecated, Legacy
SequenceOffsets Legacy
SerializedAttributionCollection Legacy

Classes

Class Alerts Modifiers Description
BaseSegment Legacy
Client Deprecated, Legacy
CollaborationWindow Deprecated, Legacy
LocalReferenceCollection Legacy sealed Represents a collection of LocalReferencePositions associated with one segment in a merge-tree. Represents a collection of LocalReferencePositions associated with one segment in a merge-tree.
Marker Legacy

Markers are a special kind of segment that do not hold any content.

Markers with a reference type of Tile support spatially accelerated queries for finding the next marker to the left or right of it in sub-linear time. This is useful, for example, in the case of jumping from the start of a paragraph to the end, assuming a paragraph is bound by markers at the start and end.

MergeNode Deprecated, Legacy
PropertiesManager Legacy
SegmentGroupCollection Legacy
TextSegment Legacy
TrackingGroup Legacy
TrackingGroupCollection Legacy A collection of ITrackingGroup.

Enumerations

Enum Alerts Description
PropertiesRollback Legacy
ReferenceType Legacy Flags enum that dictates behavior of a ReferencePosition

Types

TypeAlias Alerts Description
IMergeTreeDeltaOp Legacy
IMergeTreeOp Legacy
MergeTreeDeltaOperationType Legacy
MergeTreeDeltaOperationTypes Legacy
MergeTreeDeltaRevertible Legacy
MergeTreeDeltaType Legacy
MergeTreeMaintenanceType Legacy
PropertySet Legacy A loosely-typed mapping from strings to any value.
SlidingPreference Legacy Dictates the preferential direction for a ReferencePosition to slide in a merge-tree
Trackable Legacy

Functions

Function Alerts Return Type Description
appendToMergeTreeDeltaRevertibles(deltaArgs, revertibles) Legacy void
discardMergeTreeDeltaRevertible(revertibles) Legacy void
refGetTileLabels(refPos) Legacy string[] | undefined
refHasTileLabel(refPos, label) Legacy boolean
revertMergeTreeDeltaRevertibles(driver, revertibles) Legacy void

Variables

Variable Alerts Modifiers Type Description
MergeTreeDeltaType Legacy readonly { readonly INSERT: 0; readonly REMOVE: 1; readonly ANNOTATE: 2; readonly GROUP: 3; readonly OBLITERATE: 4; }
MergeTreeMaintenanceType Legacy readonly { readonly APPEND: -1; readonly SPLIT: -2; readonly UNLINK: -3; readonly ACKNOWLEDGED: -4; }

Enum-like constant defining the types of "maintenance" events on a merge tree. Maintenance events correspond to structural segment changes or acks of pending segments.

Note: these values are assigned negative integers to avoid clashing with MergeTreeDeltaType.

reservedMarkerIdKey Legacy readonly The special-cased property key that tracks the id of a Marker.
SlidingPreference Legacy readonly { readonly BACKWARD: 0; readonly FORWARD: 1; } Dictates the preferential direction for a ReferencePosition to slide in a merge-tree

Function Details

appendToMergeTreeDeltaRevertibles

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

export declare function appendToMergeTreeDeltaRevertibles(deltaArgs: IMergeTreeDeltaCallbackArgs, revertibles: MergeTreeDeltaRevertible[]): void;

Parameters

Parameter Type Description
deltaArgs IMergeTreeDeltaCallbackArgs
revertibles MergeTreeDeltaRevertible[]

discardMergeTreeDeltaRevertible

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

export declare function discardMergeTreeDeltaRevertible(revertibles: MergeTreeDeltaRevertible[]): void;

Parameters

Parameter Type Description
revertibles MergeTreeDeltaRevertible[]

refGetTileLabels

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

refGetTileLabels: (refPos: ReferencePosition) => string[] | undefined

Parameters

Parameter Type Description
refPos ReferencePosition

Returns

Return type: string[] | undefined

refHasTileLabel

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

export declare function refHasTileLabel(refPos: ReferencePosition, label: string): boolean;

Parameters

Parameter Type Description
refPos ReferencePosition
label string

Returns

Return type: boolean

revertMergeTreeDeltaRevertibles

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

export declare function revertMergeTreeDeltaRevertibles(driver: MergeTreeRevertibleDriver, revertibles: MergeTreeDeltaRevertible[]): void;

Parameters

Parameter Type Description
driver MergeTreeRevertibleDriver
revertibles MergeTreeDeltaRevertible[]

Variable Details

MergeTreeDeltaType

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

MergeTreeDeltaType: {
    readonly INSERT: 0;
    readonly REMOVE: 1;
    readonly ANNOTATE: 2;
    readonly GROUP: 3;
    readonly OBLITERATE: 4;
}

Type: { readonly INSERT: 0; readonly REMOVE: 1; readonly ANNOTATE: 2; readonly GROUP: 3; readonly OBLITERATE: 4; }

MergeTreeMaintenanceType

Enum-like constant defining the types of “maintenance” events on a merge tree. Maintenance events correspond to structural segment changes or acks of pending segments.

Note: these values are assigned negative integers to avoid clashing with MergeTreeDeltaType.

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

MergeTreeMaintenanceType: {
    readonly APPEND: -1;
    readonly SPLIT: -2;
    readonly UNLINK: -3;
    readonly ACKNOWLEDGED: -4;
}

Type: { readonly APPEND: -1; readonly SPLIT: -2; readonly UNLINK: -3; readonly ACKNOWLEDGED: -4; }

reservedMarkerIdKey

The special-cased property key that tracks the id of a Marker .

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

reservedMarkerIdKey = "markerId"

Remarks

In general, marker ids should be accessed using the inherent method Marker.getId. Marker ids should not be updated after creation.

SlidingPreference

Dictates the preferential direction for a ReferencePosition to slide in a merge-tree

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/merge-tree/legacy.

For more information about our API support guarantees, see here .

Signature

SlidingPreference: {
    readonly BACKWARD: 0;
    readonly FORWARD: 1;
}

Type: { readonly BACKWARD: 0; readonly FORWARD: 1; }