Packages > @fluidframework/merge-tree
@fluidframework/merge-tree Package
Interfaces
Interface | Alerts | Modifiers | Description |
---|---|---|---|
AttributionPolicy |
Legacy , Alpha
|
sealed
|
Implements policy dictating which kinds of operations should be attributed and how.
|
Classes
Class | Alerts | Modifiers | Description |
---|---|---|---|
BaseSegment |
Legacy , Alpha
|
||
Client |
Deprecated , Legacy , Alpha
|
||
CollaborationWindow |
Deprecated , Legacy , Alpha
|
||
LocalReferenceCollection |
Legacy , Alpha
|
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.
|
Enumerations
Enum | Alerts | Description |
---|---|---|
PropertiesRollback |
Legacy , Alpha
|
|
ReferenceType |
Legacy , Alpha
|
Flags enum that dictates behavior of a ReferencePosition
|
Side |
Legacy , Alpha
|
Defines a side relative to a character in a sequence. |
Types
TypeAlias | Alerts | Description |
---|---|---|
IMergeTreeDeltaOp |
Legacy , Alpha
|
|
IMergeTreeOp |
Legacy , Alpha
|
|
MergeTreeDeltaOperationType |
Legacy , Alpha
|
|
MergeTreeDeltaOperationTypes |
Legacy , Alpha
|
|
MergeTreeDeltaRevertible |
Legacy , Alpha
|
|
MergeTreeDeltaType |
Legacy , Alpha
|
|
MergeTreeMaintenanceType |
Legacy , Alpha
|
|
PropertySet |
Legacy , Alpha
|
A loosely-typed mapping from strings to any value. |
SequencePlace |
Legacy , Alpha
|
Defines a position and side relative to a character in a sequence. For this purpose, sequences look like:
Each
The special endpoints This gives us 2N + 2 possible positions to refer to within a string, where N is the number of characters.
If the position is specified with a bare number, the side defaults to
If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range), the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther. E.g. the start of a range with Side.After is exclusive of the character at the position.
|
SlidingPreference |
Legacy , Alpha
|
Dictates the preferential direction for a ReferencePosition to slide in a merge-tree
|
Trackable |
Legacy , Alpha
|
Functions
Function | Alerts | Return Type | Description |
---|---|---|---|
appendToMergeTreeDeltaRevertibles(deltaArgs, revertibles) |
Legacy , Alpha
|
void |
Appends a merge tree delta to the list of revertibles.
|
discardMergeTreeDeltaRevertible(revertibles) |
Legacy , Alpha
|
void |
Removes all revertibles from the list of revertibles.
|
endpointPosAndSide(start, end) |
Legacy , Alpha
|
{ startSide: Side | undefined; endSide: Side | undefined; startPos: number | "start" | "end" | undefined; endPos: number | "start" | "end" | undefined; } |
Returns the position and side of the start and end of a sequence.
|
refGetTileLabels(refPos) |
Legacy , Alpha
|
string[] | undefined |
Gets the tile labels stored in the given reference position.
|
refHasTileLabel(refPos, label) |
Legacy , Alpha
|
boolean |
Determines if a reference position has the given tile label.
|
revertMergeTreeDeltaRevertibles(driver, revertibles) |
Legacy , Alpha
|
void |
Reverts all operations in the list of revertibles.
|
Variables
Variable | Alerts | Modifiers | Type | Description |
---|---|---|---|---|
MergeTreeDeltaType |
Legacy , Alpha
|
readonly
|
{ readonly INSERT: 0; readonly REMOVE: 1; readonly ANNOTATE: 2; readonly GROUP: 3; readonly OBLITERATE: 4; } | |
MergeTreeMaintenanceType |
Legacy , Alpha
|
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 |
reservedMarkerIdKey |
Legacy , Alpha
|
readonly
|
The special-cased property key that tracks the id of a Marker. | |
SlidingPreference |
Legacy , Alpha
|
readonly
|
{ readonly BACKWARD: 0; readonly FORWARD: 1; } |
Dictates the preferential direction for a ReferencePosition to slide in a merge-tree
|
Function Details
appendToMergeTreeDeltaRevertibles
Appends a merge tree delta to the list of revertibles.
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
Removes all revertibles from the list of revertibles.
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[] |
endpointPosAndSide
Returns the position and side of the start and end of a sequence.
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 endpointPosAndSide(start: SequencePlace | undefined, end: SequencePlace | undefined): {
startSide: Side | undefined;
endSide: Side | undefined;
startPos: number | "start" | "end" | undefined;
endPos: number | "start" | "end" | undefined;
};
Parameters
Parameter | Type | Description |
---|---|---|
start | SequencePlace | undefined | |
end | SequencePlace | undefined |
Returns
Return type: { startSide: Side | undefined; endSide: Side | undefined; startPos: number | “start” | “end” | undefined; endPos: number | “start” | “end” | undefined; }
refGetTileLabels
Gets the tile labels stored in the given reference position.
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
Determines if a reference position has the given tile label.
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
Reverts all operations in the list of revertibles.
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; }