41 KiB
41 KiB
API Report File for "@fluidframework/merge-tree"
Do not edit this file. It is a report generated by API Extractor.
import { IChannelStorageService } from '@fluidframework/datastore-definitions';
import type { IEventThisPlaceHolder } from '@fluidframework/common-definitions';
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
import { IFluidHandle } from '@fluidframework/core-interfaces';
import { IFluidSerializer } from '@fluidframework/shared-object-base';
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
import type { ITelemetryLogger } from '@fluidframework/common-definitions';
import { TypedEventEmitter } from '@fluidframework/common-utils';
// @public (undocumented)
export function addProperties(oldProps: PropertySet | undefined, newProps: PropertySet, op?: ICombiningOp, seq?: number): PropertySet;
// @alpha
export function appendToMergeTreeDeltaRevertibles(driver: MergeTreeRevertibleDriver, deltaArgs: IMergeTreeDeltaCallbackArgs, revertibles: MergeTreeDeltaRevertible[]): void;
// @alpha (undocumented)
export interface AttributionKey {
// (undocumented)
seq: number;
type: "op";
}
// @public (undocumented)
export abstract class BaseSegment extends MergeNode implements ISegment {
// (undocumented)
ack(segmentGroup: SegmentGroup, opArgs: IMergeTreeDeltaOpArgs): boolean;
// (undocumented)
addProperties(newProps: PropertySet, op?: ICombiningOp, seq?: number, collabWindow?: CollaborationWindow, rollback?: PropertiesRollback): PropertySet | undefined;
// (undocumented)
protected addSerializedProps(jseg: IJSONSegment): void;
// (undocumented)
append(other: ISegment): void;
// @alpha (undocumented)
attribution?: IAttributionCollection<AttributionKey>;
// (undocumented)
canAppend(segment: ISegment): boolean;
// (undocumented)
clientId: number;
// (undocumented)
abstract clone(): ISegment;
// (undocumented)
protected cloneInto(b: ISegment): void;
// (undocumented)
protected abstract createSplitSegmentAt(pos: number): BaseSegment | undefined;
// (undocumented)
hasProperty(key: string): boolean;
// (undocumented)
isLeaf(): boolean;
// (undocumented)
localRefs?: LocalReferenceCollection;
// (undocumented)
localRemovedSeq?: number;
// (undocumented)
localSeq?: number;
// (undocumented)
properties?: PropertySet;
// (undocumented)
propertyManager?: PropertiesManager;
// (undocumented)
removedClientIds?: number[];
// (undocumented)
removedSeq?: number;
// (undocumented)
readonly segmentGroups: SegmentGroupCollection;
// (undocumented)
seq: number;
// (undocumented)
splitAt(pos: number): ISegment | undefined;
// (undocumented)
abstract toJSONObject(): any;
// (undocumented)
readonly trackingCollection: TrackingGroupCollection;
// (undocumented)
abstract readonly type: string;
}
// @public (undocumented)
export interface BlockAction<TClientData> {
// (undocumented)
(block: IMergeBlock, pos: number, refSeq: number, clientId: number, start: number | undefined, end: number | undefined, accum: TClientData): boolean;
}
// @public (undocumented)
export interface BlockUpdateActions {
// (undocumented)
child: (block: IMergeBlock, index: number) => void;
}
// Warning: (ae-forgotten-export) The symbol "IClientEvents" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export class Client extends TypedEventEmitter<IClientEvents> {
constructor(specToSegment: (spec: IJSONSegment) => ISegment, logger: ITelemetryLogger, options?: PropertySet);
// (undocumented)
addLongClientId(longClientId: string): void;
annotateMarker(marker: Marker, props: PropertySet, combiningOp?: ICombiningOp): IMergeTreeAnnotateMsg | undefined;
annotateMarkerNotifyConsensus(marker: Marker, props: PropertySet, consensusCallback: (m: Marker) => void): IMergeTreeAnnotateMsg | undefined;
annotateRangeLocal(start: number, end: number, props: PropertySet, combiningOp: ICombiningOp | undefined): IMergeTreeAnnotateMsg | undefined;
// (undocumented)
applyMsg(msg: ISequencedDocumentMessage, local?: boolean): void;
// (undocumented)
applyStashedOp(op: IMergeTreeDeltaOp): SegmentGroup;
// (undocumented)
applyStashedOp(op: IMergeTreeGroupMsg): SegmentGroup[];
// (undocumented)
applyStashedOp(op: IMergeTreeOp): SegmentGroup | SegmentGroup[];
// (undocumented)
cloneFromSegments(): Client;
createLocalReferencePosition(segment: ISegment, offset: number | undefined, refType: ReferenceType, properties: PropertySet | undefined): LocalReferencePosition;
// (undocumented)
createTextHelper(): IMergeTreeTextHelper;
findReconnectionPosition(segment: ISegment, localSeq: number): number;
// (undocumented)
findTile(startPos: number, tileLabel: string, preceding?: boolean): {
tile: ReferencePosition;
pos: number;
} | undefined;
// (undocumented)
getClientId(): number;
// (undocumented)
getCollabWindow(): CollaborationWindow;
// (undocumented)
getContainingSegment<T extends ISegment>(pos: number, sequenceArgs?: Pick<ISequencedDocumentMessage, "referenceSequenceNumber" | "clientId">, localSeq?: number): {
segment: T | undefined;
offset: number | undefined;
};
// (undocumented)
getCurrentSeq(): number;
// (undocumented)
getLength(): number;
// (undocumented)
getLongClientId(shortClientId: number): string;
// (undocumented)
getMarkerFromId(id: string): ISegment | undefined;
// (undocumented)
getOrAddShortClientId(longClientId: string): number;
getPosition(segment: ISegment | undefined, localSeq?: number): number;
// (undocumented)
getPropertiesAtPosition(pos: number): PropertySet | undefined;
// (undocumented)
getRangeExtentsOfPosition(pos: number): {
posStart: number | undefined;
posAfterEnd: number | undefined;
};
// (undocumented)
getShortClientId(longClientId: string): number;
getSlideToSegment(segoff: {
segment: ISegment | undefined;
offset: number | undefined;
}): {
segment: ISegment | undefined;
offset: number | undefined;
};
// (undocumented)
getStackContext(startPos: number, rangeLabels: string[]): RangeStackMap;
// (undocumented)
insertAtReferencePositionLocal(refPos: ReferencePosition, segment: ISegment): IMergeTreeInsertMsg | undefined;
// (undocumented)
insertSegmentLocal(pos: number, segment: ISegment): IMergeTreeInsertMsg | undefined;
// (undocumented)
load(runtime: IFluidDataStoreRuntime, storage: IChannelStorageService, serializer: IFluidSerializer): Promise<{
catchupOpsP: Promise<ISequencedDocumentMessage[]>;
}>;
localReferencePositionToPosition(lref: ReferencePosition): number;
// (undocumented)
localTransaction(groupOp: IMergeTreeGroupMsg): void;
// (undocumented)
readonly logger: ITelemetryLogger;
// (undocumented)
longClientId: string | undefined;
peekPendingSegmentGroups(count?: number): SegmentGroup | SegmentGroup[] | undefined;
posFromRelativePos(relativePos: IRelativePosition): number;
regeneratePendingOp(resetOp: IMergeTreeOp, segmentGroup: SegmentGroup | SegmentGroup[]): IMergeTreeOp;
removeLocalReferencePosition(lref: LocalReferencePosition): LocalReferencePosition | undefined;
removeRangeLocal(start: number, end: number): IMergeTreeRemoveMsg;
resolveRemoteClientPosition(remoteClientPosition: number, remoteClientRefSeq: number, remoteClientId: string): number | undefined;
rollback?(op: any, localOpMetadata: unknown): void;
serializeGCData(handle: IFluidHandle, handleCollectingSerializer: IFluidSerializer): void;
// (undocumented)
readonly specToSegment: (spec: IJSONSegment) => ISegment;
// (undocumented)
startOrUpdateCollaboration(longClientId: string | undefined, minSeq?: number, currentSeq?: number): void;
// (undocumented)
summarize(runtime: IFluidDataStoreRuntime, handle: IFluidHandle, serializer: IFluidSerializer, catchUpMsgs: ISequencedDocumentMessage[]): ISummaryTreeWithStats;
// (undocumented)
updateConsensusProperty(op: IMergeTreeAnnotateMsg, msg: ISequencedDocumentMessage): void;
// (undocumented)
updateMinSeq(minSeq: number): void;
// (undocumented)
updateSeqNumbers(min: number, seq: number): void;
// (undocumented)
protected walkAllSegments<TClientData>(action: (segment: ISegment, accum?: TClientData) => boolean, accum?: TClientData): boolean;
// (undocumented)
walkSegments<TClientData>(handler: ISegmentAction<TClientData>, start: number | undefined, end: number | undefined, accum: TClientData, splitRange?: boolean): void;
// (undocumented)
walkSegments<undefined>(handler: ISegmentAction<undefined>, start?: number, end?: number, accum?: undefined, splitRange?: boolean): void;
}
// @public (undocumented)
export function clone<T>(extension: MapLike<T> | undefined): MapLike<T> | undefined;
// @public (undocumented)
export class CollaborationWindow {
// (undocumented)
clientId: number;
// (undocumented)
collaborating: boolean;
// (undocumented)
currentSeq: number;
// (undocumented)
loadFrom(a: CollaborationWindow): void;
// (undocumented)
localSeq: number;
// (undocumented)
minSeq: number;
}
// @public (undocumented)
export function combine(combiningInfo: ICombiningOp, currentValue: any, newValue: any, seq?: number): any;
// @public (undocumented)
export const compareNumbers: (a: number, b: number) => number;
// @public (undocumented)
export function compareReferencePositions(a: ReferencePosition, b: ReferencePosition): number;
// @public (undocumented)
export const compareStrings: (a: string, b: string) => number;
// @internal (undocumented)
export type ConflictAction<TKey, TData> = (key: TKey, currentKey: TKey, data: TData, currentData: TData) => QProperty<TKey, TData>;
// @public
export function createAnnotateMarkerOp(marker: Marker, props: PropertySet, combiningOp?: ICombiningOp): IMergeTreeAnnotateMsg | undefined;
// @public
export function createAnnotateRangeOp(start: number, end: number, props: PropertySet, combiningOp: ICombiningOp | undefined): IMergeTreeAnnotateMsg;
// @public (undocumented)
export function createDetachedLocalReferencePosition(refType?: ReferenceType): LocalReferencePosition;
// @public (undocumented)
export function createGroupOp(...ops: IMergeTreeDeltaOp[]): IMergeTreeGroupMsg;
// @public (undocumented)
export function createInsertOp(pos: number, segSpec: any): IMergeTreeInsertMsg;
// @public (undocumented)
export function createInsertSegmentOp(pos: number, segment: ISegment): IMergeTreeInsertMsg;
// @public (undocumented)
export function createMap<T>(): MapLike<T>;
// @public
export function createRemoveRangeOp(start: number, end: number): IMergeTreeRemoveMsg;
// @public (undocumented)
export function debugMarkerToString(marker: Marker): string;
// @public (undocumented)
export const DetachedReferencePosition = -1;
// @internal (undocumented)
export interface Dictionary<TKey, TData> {
// (undocumented)
get(key: TKey): Property<TKey, TData> | undefined;
// (undocumented)
map<TAccum>(action: PropertyAction<TKey, TData>, accum?: TAccum): void;
// (undocumented)
put(key: TKey, data: TData, conflict?: ConflictAction<TKey, TData>): void;
// (undocumented)
remove(key: TKey): void;
}
// @alpha
export function discardMergeTreeDeltaRevertible(revertibles: MergeTreeDeltaRevertible[]): void;
// @public (undocumented)
export function extend<T>(base: MapLike<T>, extension: MapLike<T> | undefined, combiningOp?: ICombiningOp, seq?: number): MapLike<T>;
// @public (undocumented)
export function extendIfUndefined<T>(base: MapLike<T>, extension: MapLike<T> | undefined): MapLike<T>;
// @alpha (undocumented)
export interface IAttributionCollection<T> {
// @internal (undocumented)
append(other: IAttributionCollection<T>): void;
// @internal (undocumented)
clone(): IAttributionCollection<T>;
// @internal
getAll(): Iterable<{
offset: number;
key: T;
}>;
getAtOffset(offset: number): T;
readonly length: number;
// @internal (undocumented)
splitAt(pos: number): IAttributionCollection<T>;
}
// @public (undocumented)
export interface ICombiningOp {
// (undocumented)
defaultValue?: any;
// (undocumented)
maxValue?: any;
// (undocumented)
minValue?: any;
// (undocumented)
name: string;
}
// @public (undocumented)
export interface IConsensusInfo {
// (undocumented)
callback: (m: Marker) => void;
// (undocumented)
marker: Marker;
}
// @public (undocumented)
export interface IConsensusValue {
// (undocumented)
seq: number;
// (undocumented)
value: any;
}
// @public (undocumented)
export interface IHierBlock extends IMergeBlock {
// (undocumented)
hierToString(indentCount: number): string;
// (undocumented)
leftmostTiles: MapLike<ReferencePosition>;
// (undocumented)
rangeStacks: RangeStackMap;
// (undocumented)
rightmostTiles: MapLike<ReferencePosition>;
}
// @internal @deprecated
export interface IIntegerRange {
// (undocumented)
end: number;
// (undocumented)
start: number;
}
// @public (undocumented)
export interface IJSONMarkerSegment extends IJSONSegment {
// (undocumented)
marker: IMarkerDef;
}
// @public (undocumented)
export interface IJSONSegment {
// (undocumented)
props?: Record<string, any>;
}
// @public (undocumented)
export interface IJSONTextSegment extends IJSONSegment {
// (undocumented)
text: string;
}
// @public (undocumented)
export interface IMarkerDef {
// (undocumented)
refType?: ReferenceType;
}
// @public (undocumented)
export interface IMarkerModifiedAction {
// (undocumented)
(marker: Marker): void;
}
// @public
export interface IMergeBlock extends IMergeNodeCommon {
// (undocumented)
assignChild(child: IMergeNode, index: number, updateOrdinal?: boolean): void;
childCount: number;
children: IMergeNode[];
// (undocumented)
hierBlock(): IHierBlock | undefined;
// (undocumented)
needsScour?: boolean;
// Warning: (ae-forgotten-export) The symbol "PartialSequenceLengths" needs to be exported by the entry point index.d.ts
partialLengths?: PartialSequenceLengths;
// (undocumented)
setOrdinal(child: IMergeNode, index: number): void;
}
// @public (undocumented)
export type IMergeNode = IMergeBlock | ISegment;
// @public
export interface IMergeNodeCommon {
cachedLength: number;
index: number;
// (undocumented)
isLeaf(): this is ISegment;
ordinal: string;
// (undocumented)
parent?: IMergeBlock;
}
// @public (undocumented)
export interface IMergeTreeAnnotateMsg extends IMergeTreeDelta {
// (undocumented)
combiningOp?: ICombiningOp;
// (undocumented)
pos1?: number;
// (undocumented)
pos2?: number;
// (undocumented)
props: Record<string, any>;
// (undocumented)
relativePos1?: IRelativePosition;
// (undocumented)
relativePos2?: IRelativePosition;
// (undocumented)
type: typeof MergeTreeDeltaType.ANNOTATE;
}
// @public (undocumented)
export interface IMergeTreeAttributionOptions {
track?: boolean;
}
// @public (undocumented)
export interface IMergeTreeClientSequenceArgs {
// (undocumented)
readonly clientId: number;
// (undocumented)
readonly referenceSequenceNumber: number;
// (undocumented)
readonly sequenceNumber: number;
}
// @public (undocumented)
export interface IMergeTreeDelta {
type: MergeTreeDeltaType;
}
// @public (undocumented)
export interface IMergeTreeDeltaCallbackArgs<TOperationType extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationType> {
// (undocumented)
readonly deltaSegments: IMergeTreeSegmentDelta[];
// (undocumented)
readonly operation: TOperationType;
}
// @public (undocumented)
export type IMergeTreeDeltaOp = IMergeTreeInsertMsg | IMergeTreeRemoveMsg | IMergeTreeAnnotateMsg;
// @public (undocumented)
export interface IMergeTreeDeltaOpArgs {
readonly groupOp?: IMergeTreeGroupMsg;
readonly op: IMergeTreeOp;
readonly sequencedMessage?: ISequencedDocumentMessage;
}
// @public (undocumented)
export interface IMergeTreeGroupMsg extends IMergeTreeDelta {
// (undocumented)
ops: IMergeTreeDeltaOp[];
// (undocumented)
type: typeof MergeTreeDeltaType.GROUP;
}
// @public (undocumented)
export interface IMergeTreeInsertMsg extends IMergeTreeDelta {
// (undocumented)
pos1?: number;
// (undocumented)
pos2?: number;
// (undocumented)
relativePos1?: IRelativePosition;
// (undocumented)
relativePos2?: IRelativePosition;
// (undocumented)
seg?: any;
// (undocumented)
type: typeof MergeTreeDeltaType.INSERT;
}
// @public (undocumented)
export interface IMergeTreeMaintenanceCallbackArgs extends IMergeTreeDeltaCallbackArgs<MergeTreeMaintenanceType> {
}
// @public (undocumented)
export type IMergeTreeOp = IMergeTreeDeltaOp | IMergeTreeGroupMsg;
// @public (undocumented)
export interface IMergeTreeOptions {
attribution?: IMergeTreeAttributionOptions;
// (undocumented)
catchUpBlobName?: string;
// (undocumented)
mergeTreeSnapshotChunkSize?: number;
mergeTreeUseNewLengthCalculations?: boolean;
newMergeTreeSnapshotFormat?: boolean;
}
// @public (undocumented)
export interface IMergeTreeRemoveMsg extends IMergeTreeDelta {
// (undocumented)
pos1?: number;
// (undocumented)
pos2?: number;
// (undocumented)
relativePos1?: IRelativePosition;
// (undocumented)
relativePos2?: IRelativePosition;
// (undocumented)
type: typeof MergeTreeDeltaType.REMOVE;
}
// @public (undocumented)
export interface IMergeTreeSegmentDelta {
// (undocumented)
propertyDeltas?: PropertySet;
// (undocumented)
segment: ISegment;
}
// @public (undocumented)
export interface IMergeTreeTextHelper {
// (undocumented)
getText(refSeq: number, clientId: number, placeholder: string, start?: number, end?: number): string;
}
// @public (undocumented)
export interface IncrementalBlockAction<TContext> {
// (undocumented)
(state: IncrementalMapState<TContext>): any;
}
// @public (undocumented)
export enum IncrementalExecOp {
// (undocumented)
Go = 0,
// (undocumented)
Stop = 1,
// (undocumented)
Yield = 2
}
// @public (undocumented)
export class IncrementalMapState<TContext> {
constructor(block: IMergeBlock, actions: IncrementalSegmentActions<TContext>, pos: number, refSeq: number, clientId: number, context: TContext, start: number, end: number, childIndex?: number);
// (undocumented)
actions: IncrementalSegmentActions<TContext>;
// (undocumented)
block: IMergeBlock;
// (undocumented)
childIndex: number;
// (undocumented)
clientId: number;
// (undocumented)
context: TContext;
// (undocumented)
end: number;
// (undocumented)
op: IncrementalExecOp;
// (undocumented)
pos: number;
// (undocumented)
refSeq: number;
// (undocumented)
start: number;
}
// @public (undocumented)
export interface IncrementalSegmentAction<TContext> {
// (undocumented)
(segment: ISegment, state: IncrementalMapState<TContext>): any;
}
// @public (undocumented)
export interface IncrementalSegmentActions<TContext> {
// (undocumented)
leaf: IncrementalSegmentAction<TContext>;
// (undocumented)
post?: IncrementalBlockAction<TContext>;
// (undocumented)
pre?: IncrementalBlockAction<TContext>;
}
// @public (undocumented)
export interface InsertContext {
// (undocumented)
candidateSegment?: ISegment;
// (undocumented)
continuePredicate?: (continueFromBlock: IMergeBlock) => boolean;
// (undocumented)
leaf: (segment: ISegment | undefined, pos: number, ic: InsertContext) => ISegmentChanges;
// (undocumented)
prepareEvents?: boolean;
// (undocumented)
structureChange?: boolean;
}
// @public (undocumented)
export function internedSpaces(n: number): string;
// @internal (undocumented)
export interface IRBAugmentation<TKey, TData> {
// (undocumented)
update(node: RBNode<TKey, TData>): void;
}
// @internal (undocumented)
export interface IRBMatcher<TKey, TData> {
// (undocumented)
continueSubtree(node: RBNode<TKey, TData> | undefined, key: TKey): boolean;
// (undocumented)
matchNode(node: RBNode<TKey, TData> | undefined, key: TKey): boolean;
}
// @public
export interface IRelativePosition {
before?: boolean;
id?: string;
offset?: number;
}
// @public
export interface IRemovalInfo {
localRemovedSeq?: number;
removedClientIds: number[];
removedSeq: number;
}
// @public
export interface ISegment extends IMergeNodeCommon, Partial<IRemovalInfo> {
ack(segmentGroup: SegmentGroup, opArgs: IMergeTreeDeltaOpArgs): boolean;
// (undocumented)
addProperties(newProps: PropertySet, op?: ICombiningOp, seq?: number, collabWindow?: CollaborationWindow, rollback?: PropertiesRollback): PropertySet | undefined;
// (undocumented)
append(segment: ISegment): void;
// @alpha
attribution?: IAttributionCollection<AttributionKey>;
// (undocumented)
canAppend(segment: ISegment): boolean;
clientId: number;
// (undocumented)
clone(): ISegment;
localRefs?: LocalReferenceCollection;
localRemovedSeq?: number;
localSeq?: number;
properties?: PropertySet;
propertyManager?: PropertiesManager;
// (undocumented)
readonly segmentGroups: SegmentGroupCollection;
seq?: number;
// (undocumented)
splitAt(pos: number): ISegment | undefined;
// (undocumented)
toJSONObject(): any;
// (undocumented)
readonly trackingCollection: TrackingGroupCollection;
// (undocumented)
readonly type: string;
}
// @public (undocumented)
export interface ISegmentAction<TClientData> {
// (undocumented)
(segment: ISegment, pos: number, refSeq: number, clientId: number, start: number, end: number, accum: TClientData): boolean;
}
// @public (undocumented)
export interface ISegmentChanges {
// (undocumented)
next?: ISegment;
// (undocumented)
replaceCurrent?: ISegment;
}
// @internal (undocumented)
export interface KeyComparer<TKey> {
// (undocumented)
(a: TKey, b: TKey): number;
}
// @public (undocumented)
export const LocalClientId = -1;
// @public
export class LocalReferenceCollection {
// @internal (undocumented)
[Symbol.iterator](): {
next(): IteratorResult<LocalReferencePosition>;
[Symbol.iterator](): any;
};
// Warning: (ae-forgotten-export) The symbol "IRefsAtOffset" needs to be exported by the entry point index.d.ts
//
// @internal
constructor(
segment: ISegment, initialRefsByfOffset?: (IRefsAtOffset | undefined)[]);
// @internal (undocumented)
addAfterTombstones(...refs: Iterable<LocalReferencePosition>[]): void;
// @internal (undocumented)
addBeforeTombstones(...refs: Iterable<LocalReferencePosition>[]): void;
// @internal (undocumented)
addLocalRef(lref: LocalReferencePosition, offset: number): void;
// (undocumented)
static append(seg1: ISegment, seg2: ISegment): void;
// @internal
append(other: LocalReferenceCollection): void;
// @internal (undocumented)
clear(): void;
// @internal (undocumented)
createLocalRef(offset: number, refType: ReferenceType, properties: PropertySet | undefined): LocalReferencePosition;
// @internal (undocumented)
get empty(): boolean;
// @internal
has(lref: ReferencePosition): boolean;
// @internal (undocumented)
hierRefCount: number;
// @internal (undocumented)
isAfterTombstone(lref: LocalReferencePosition): boolean;
// @internal (undocumented)
removeLocalRef(lref: LocalReferencePosition): LocalReferencePosition | undefined;
// @internal
split(offset: number, splitSeg: ISegment): void;
// @internal (undocumented)
walkReferences(visitor: (lref: LocalReferencePosition) => boolean | void | undefined, start?: LocalReferencePosition, forward?: boolean): boolean;
}
// @public @sealed (undocumented)
export interface LocalReferencePosition extends ReferencePosition {
// (undocumented)
callbacks?: Partial<Record<"beforeSlide" | "afterSlide", (ref: LocalReferencePosition) => void>>;
// (undocumented)
readonly trackingCollection: TrackingGroupCollection;
}
// @public (undocumented)
export interface MapLike<T> {
// (undocumented)
[index: string]: T;
}
// @public (undocumented)
export class Marker extends BaseSegment implements ReferencePosition {
constructor(refType: ReferenceType);
// (undocumented)
append(): void;
// (undocumented)
canAppend(segment: ISegment): boolean;
// (undocumented)
clone(): Marker;
// (undocumented)
protected createSplitSegmentAt(pos: number): undefined;
// (undocumented)
static fromJSONObject(spec: any): Marker | undefined;
// (undocumented)
getId(): string | undefined;
// (undocumented)
getOffset(): number;
// (undocumented)
getProperties(): PropertySet | undefined;
// (undocumented)
getSegment(): this;
// (undocumented)
hasSimpleType(simpleTypeName: string): boolean;
// (undocumented)
static is(segment: ISegment): segment is Marker;
// (undocumented)
static make(refType: ReferenceType, props?: PropertySet): Marker;
// (undocumented)
refType: ReferenceType;
// (undocumented)
toJSONObject(): IJSONMarkerSegment;
// (undocumented)
toString(): string;
// (undocumented)
static readonly type = "Marker";
// (undocumented)
readonly type = "Marker";
}
// @public (undocumented)
export function matchProperties(a: PropertySet | undefined, b: PropertySet | undefined): boolean;
// @public (undocumented)
export const MaxNodesInBlock = 8;
// @public (undocumented)
export function maxReferencePosition<T extends ReferencePosition>(a: T, b: T): T;
// @public (undocumented)
export class MergeBlock extends MergeNode implements IMergeBlock {
constructor(childCount: number);
// (undocumented)
assignChild(child: IMergeNode, index: number, updateOrdinal?: boolean): void;
// (undocumented)
childCount: number;
// (undocumented)
children: IMergeNode[];
// (undocumented)
hierBlock(): IHierBlock | undefined;
// (undocumented)
setOrdinal(child: IMergeNode, index: number): void;
}
// @public (undocumented)
export class MergeNode implements IMergeNodeCommon {
// (undocumented)
cachedLength: number;
// (undocumented)
index: number;
// (undocumented)
isLeaf(): boolean;
// (undocumented)
ordinal: string;
// (undocumented)
parent?: IMergeBlock;
}
// @public (undocumented)
export type MergeTreeDeltaCallback = (opArgs: IMergeTreeDeltaOpArgs, deltaArgs: IMergeTreeDeltaCallbackArgs) => void;
// @public (undocumented)
export type MergeTreeDeltaOperationType = typeof MergeTreeDeltaType.ANNOTATE | typeof MergeTreeDeltaType.INSERT | typeof MergeTreeDeltaType.REMOVE;
// @public (undocumented)
export type MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationType | MergeTreeMaintenanceType;
// @alpha
export type MergeTreeDeltaRevertible = {
operation: typeof MergeTreeDeltaType.INSERT;
trackingGroup: TrackingGroup;
} | {
operation: typeof MergeTreeDeltaType.REMOVE;
trackingGroup: TrackingGroup;
} | {
operation: typeof MergeTreeDeltaType.ANNOTATE;
trackingGroup: TrackingGroup;
propertyDeltas: PropertySet;
};
// @public (undocumented)
export const MergeTreeDeltaType: {
readonly INSERT: 0;
readonly REMOVE: 1;
readonly ANNOTATE: 2;
readonly GROUP: 3;
};
// @public (undocumented)
export type MergeTreeDeltaType = typeof MergeTreeDeltaType[keyof typeof MergeTreeDeltaType];
// @public (undocumented)
export type MergeTreeMaintenanceCallback = (MaintenanceArgs: IMergeTreeMaintenanceCallbackArgs, opArgs: IMergeTreeDeltaOpArgs | undefined) => void;
// @public
export const MergeTreeMaintenanceType: {
readonly APPEND: -1;
readonly SPLIT: -2;
readonly UNLINK: -3;
readonly ACKNOWLEDGED: -4;
};
// @public (undocumented)
export type MergeTreeMaintenanceType = typeof MergeTreeMaintenanceType[keyof typeof MergeTreeMaintenanceType];
// @alpha
export interface MergeTreeRevertibleDriver {
// (undocumented)
annotateRange(start: number, end: number, props: PropertySet): any;
// (undocumented)
createLocalReferencePosition(segment: ISegment, offset: number, refType: ReferenceType, properties: PropertySet | undefined): LocalReferencePosition;
// (undocumented)
getContainingSegment(pos: number): {
segment: ISegment | undefined;
offset: number | undefined;
};
// (undocumented)
getPosition(segment: ISegment): number;
// (undocumented)
insertFromSpec(pos: number, spec: IJSONSegment): any;
// (undocumented)
localReferencePositionToPosition(lref: LocalReferencePosition): number;
// (undocumented)
removeRange(start: number, end: number): any;
}
// @public (undocumented)
export interface MinListener {
// (undocumented)
minRequired: number;
// (undocumented)
onMinGE(minSeq: number): void;
}
// @public (undocumented)
export function minReferencePosition<T extends ReferencePosition>(a: T, b: T): T;
// @public (undocumented)
export interface NodeAction<TClientData> {
// (undocumented)
(node: IMergeNode, pos: number, refSeq: number, clientId: number, start: number | undefined, end: number | undefined, clientData: TClientData): boolean;
}
// @public (undocumented)
export const NonCollabClient = -2;
// @public (undocumented)
export function ordinalToArray(ord: string): number[];
// @public (undocumented)
export class PropertiesManager {
constructor();
// (undocumented)
ackPendingProperties(annotateOp: IMergeTreeAnnotateMsg): void;
// (undocumented)
addProperties(oldProps: PropertySet, newProps: PropertySet, op?: ICombiningOp, seq?: number, collaborating?: boolean, rollback?: PropertiesRollback): PropertySet | undefined;
// (undocumented)
copyTo(oldProps: PropertySet, newProps: PropertySet | undefined, newManager: PropertiesManager): PropertySet | undefined;
// (undocumented)
hasPendingProperties(): boolean;
}
// @public (undocumented)
export enum PropertiesRollback {
None = 0,
Rewrite = 2,
Rollback = 1
}
// @internal (undocumented)
export interface Property<TKey, TData> {
// (undocumented)
data: TData;
// (undocumented)
key: TKey;
}
// @internal (undocumented)
export interface PropertyAction<TKey, TData> {
// (undocumented)
<TAccum>(p: Property<TKey, TData>, accum?: TAccum): boolean;
}
// @public (undocumented)
export type PropertySet = MapLike<any>;
// @internal (undocumented)
export interface QProperty<TKey, TData> {
// (undocumented)
data?: TData;
// (undocumented)
key?: TKey;
}
// @public (undocumented)
export type RangeStackMap = MapLike<Stack<ReferencePosition>>;
// @internal (undocumented)
export const RBColor: {
readonly RED: 0;
readonly BLACK: 1;
};
// @internal (undocumented)
export type RBColor = typeof RBColor[keyof typeof RBColor];
// @internal (undocumented)
export interface RBNode<TKey, TData> {
// (undocumented)
color: RBColor;
// (undocumented)
data: TData;
// (undocumented)
key: TKey;
// (undocumented)
left: RBNode<TKey, TData> | undefined;
// (undocumented)
right: RBNode<TKey, TData> | undefined;
// (undocumented)
size: number;
}
// @internal (undocumented)
export interface RBNodeActions<TKey, TData> {
// (undocumented)
infix?(node: RBNode<TKey, TData>): boolean;
// (undocumented)
post?(node: RBNode<TKey, TData>): boolean;
// (undocumented)
pre?(node: RBNode<TKey, TData>): boolean;
// (undocumented)
showStructure?: boolean;
}
// @internal (undocumented)
export class RedBlackTree<TKey, TData> implements SortedDictionary<TKey, TData> {
constructor(compareKeys: KeyComparer<TKey>, aug?: IRBAugmentation<TKey, TData> | undefined);
// (undocumented)
ceil(key: TKey): RBNode<TKey, TData> | undefined;
// (undocumented)
floor(key: TKey): RBNode<TKey, TData> | undefined;
// (undocumented)
gather(key: TKey, matcher: IRBMatcher<TKey, TData>): RBNode<TKey, TData>[];
// (undocumented)
get(key: TKey): RBNode<TKey, TData> | undefined;
// (undocumented)
isEmpty(): boolean;
// (undocumented)
keys(): TKey[];
// (undocumented)
map<TAccum>(action: PropertyAction<TKey, TData>, accum?: TAccum): void;
// (undocumented)
mapRange<TAccum>(action: PropertyAction<TKey, TData>, accum?: TAccum, start?: TKey, end?: TKey): void;
// (undocumented)
max(): RBNode<TKey, TData> | undefined;
// (undocumented)
min(): RBNode<TKey, TData> | undefined;
// (undocumented)
put(key: TKey, data: TData, conflict?: ConflictAction<TKey, TData>): void;
// (undocumented)
remove(key: TKey): void;
// (undocumented)
removeExisting(key: TKey): void;
// (undocumented)
size(): number;
walk(actions: RBNodeActions<TKey, TData>): void;
// (undocumented)
walkBackward(actions: RBNodeActions<TKey, TData>): void;
// (undocumented)
walkExactMatchesBackward(compareFn: (node: RBNode<TKey, TData>) => number, actionFn: (node: RBNode<TKey, TData>) => void, continueLeftFn: (number: number) => boolean, continueRightFn: (number: number) => boolean): void;
// (undocumented)
walkExactMatchesForward(compareFn: (node: RBNode<TKey, TData>) => number, actionFn: (node: RBNode<TKey, TData>) => void, continueLeftFn: (number: number) => boolean, continueRightFn: (number: number) => boolean): void;
}
// @public (undocumented)
export interface ReferencePosition {
// (undocumented)
addProperties(newProps: PropertySet, op?: ICombiningOp): void;
// (undocumented)
getOffset(): number;
// (undocumented)
getSegment(): ISegment | undefined;
// (undocumented)
isLeaf(): this is ISegment;
// (undocumented)
properties?: PropertySet;
// (undocumented)
refType: ReferenceType;
}
// @public
export enum ReferenceType {
// (undocumented)
NestBegin = 2,
// (undocumented)
NestEnd = 4,
// (undocumented)
RangeBegin = 16,
// (undocumented)
RangeEnd = 32,
// (undocumented)
Simple = 0,
SlideOnRemove = 64,
StayOnRemove = 128,
Tile = 1,
Transient = 256
}
// @public (undocumented)
export const refGetRangeLabels: (refPos: ReferencePosition) => string[] | undefined;
// @public (undocumented)
export const refGetTileLabels: (refPos: ReferencePosition) => string[] | undefined;
// @public (undocumented)
export function refHasRangeLabel(refPos: ReferencePosition, label: string): boolean;
// @public (undocumented)
export function refHasRangeLabels(refPos: ReferencePosition): boolean;
// @public (undocumented)
export function refHasTileLabel(refPos: ReferencePosition, label: string): boolean;
// @public (undocumented)
export function refHasTileLabels(refPos: ReferencePosition): boolean;
// @public (undocumented)
export function refTypeIncludesFlag(refPosOrType: ReferencePosition | ReferenceType, flags: ReferenceType): boolean;
// @public (undocumented)
export const reservedMarkerIdKey = "markerId";
// @public (undocumented)
export const reservedMarkerSimpleTypeKey = "markerSimpleType";
// @public (undocumented)
export const reservedRangeLabelsKey = "referenceRangeLabels";
// @public (undocumented)
export const reservedTileLabelsKey = "referenceTileLabels";
// @alpha
export function revertMergeTreeDeltaRevertibles(driver: MergeTreeRevertibleDriver, revertibles: MergeTreeDeltaRevertible[]): void;
// @public (undocumented)
export interface SearchResult {
// (undocumented)
pos: number;
// (undocumented)
text: string;
}
// @public (undocumented)
export interface SegmentAccumulator {
// (undocumented)
segments: ISegment[];
}
// @public (undocumented)
export interface SegmentActions<TClientData> {
// (undocumented)
contains?: NodeAction<TClientData>;
// (undocumented)
leaf?: ISegmentAction<TClientData>;
// (undocumented)
post?: BlockAction<TClientData>;
// (undocumented)
pre?: BlockAction<TClientData>;
// (undocumented)
shift?: NodeAction<TClientData>;
}
// @public (undocumented)
export interface SegmentGroup {
// (undocumented)
localSeq: number;
// (undocumented)
previousProps?: PropertySet[];
// (undocumented)
refSeq: number;
// (undocumented)
segments: ISegment[];
}
// @public (undocumented)
export class SegmentGroupCollection {
constructor(segment: ISegment);
// @deprecated (undocumented)
clear(): void;
// (undocumented)
copyTo(segment: ISegment): void;
// (undocumented)
dequeue(): SegmentGroup | undefined;
// (undocumented)
get empty(): boolean;
// (undocumented)
enqueue(segmentGroup: SegmentGroup): void;
// (undocumented)
pop?(): SegmentGroup | undefined;
// (undocumented)
get size(): number;
}
// @internal (undocumented)
export interface SortedDictionary<TKey, TData> extends Dictionary<TKey, TData> {
// (undocumented)
mapRange<TAccum>(action: PropertyAction<TKey, TData>, accum?: TAccum, start?: TKey, end?: TKey): void;
// (undocumented)
max(): Property<TKey, TData> | undefined;
// (undocumented)
min(): Property<TKey, TData> | undefined;
}
// @public
export class SortedSegmentSet<T extends SortedSegmentSetItem = ISegment> extends SortedSet<T, string> {
// (undocumented)
protected findItemPosition(item: T): {
exists: boolean;
index: number;
};
// (undocumented)
protected getKey(item: T): string;
}
// @public (undocumented)
export type SortedSegmentSetItem = ISegment | LocalReferencePosition | {
readonly segment: ISegment;
};
// @public (undocumented)
export abstract class SortedSet<T, U extends string | number> {
// (undocumented)
addOrUpdate(newItem: T, update?: (existingItem: T, newItem: T) => void): void;
// (undocumented)
protected findItemPosition(item: T): {
exists: boolean;
index: number;
};
// (undocumented)
protected abstract getKey(t: T): U;
// (undocumented)
has(item: T): boolean;
// (undocumented)
get items(): readonly T[];
// (undocumented)
protected readonly keySortedItems: T[];
// (undocumented)
remove(item: T): boolean;
// (undocumented)
get size(): number;
}
// @public (undocumented)
export class Stack<T> {
// (undocumented)
empty(): boolean;
// (undocumented)
items: T[];
// (undocumented)
pop(): T | undefined;
// (undocumented)
push(val: T): void;
// (undocumented)
top(): T | undefined;
}
// @public (undocumented)
export class TextSegment extends BaseSegment {
constructor(text: string);
// (undocumented)
append(segment: ISegment): void;
// (undocumented)
canAppend(segment: ISegment): boolean;
// (undocumented)
clone(start?: number, end?: number): TextSegment;
// (undocumented)
protected createSplitSegmentAt(pos: number): TextSegment | undefined;
// (undocumented)
static fromJSONObject(spec: any): TextSegment | undefined;
// (undocumented)
static is(segment: ISegment): segment is TextSegment;
// (undocumented)
static make(text: string, props?: PropertySet): TextSegment;
// (undocumented)
removeRange(start: number, end: number): boolean;
// (undocumented)
text: string;
// (undocumented)
toJSONObject(): string | {
text: string;
props: PropertySet;
};
// (undocumented)
toString(): string;
// (undocumented)
static readonly type = "TextSegment";
// (undocumented)
readonly type = "TextSegment";
}
// @public (undocumented)
export function toRemovalInfo(maybe: Partial<IRemovalInfo> | undefined): IRemovalInfo | undefined;
// @public (undocumented)
export type Trackable = ISegment | LocalReferencePosition;
// @public (undocumented)
export class TrackingGroup {
constructor();
// (undocumented)
has(trackable: Trackable): boolean;
// (undocumented)
link(trackable: Trackable): void;
// @deprecated (undocumented)
get segments(): readonly ISegment[];
// (undocumented)
get size(): number;
// (undocumented)
get tracked(): readonly Trackable[];
// (undocumented)
unlink(trackable: Trackable): boolean;
}
// @public (undocumented)
export class TrackingGroupCollection {
constructor(trackable: Trackable);
// (undocumented)
copyTo(trackable: Trackable): void;
// (undocumented)
get empty(): boolean;
// (undocumented)
link(trackingGroup: TrackingGroup): void;
// (undocumented)
matches(trackingCollection: TrackingGroupCollection): boolean;
// (undocumented)
readonly trackingGroups: Set<TrackingGroup>;
// (undocumented)
unlink(trackingGroup: TrackingGroup): boolean;
}
// @public (undocumented)
export const TreeMaintenanceSequenceNumber = -2;
// @public (undocumented)
export const UnassignedSequenceNumber = -1;
// @public
export const UniversalSequenceNumber = 0;
// (No @packageDocumentation comment for this package)