@fluidframework/merge-tree 2.100.0 → 2.101.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/sequencePlace.d.ts +13 -0
- package/dist/sequencePlace.d.ts.map +1 -1
- package/dist/sequencePlace.js +17 -4
- package/dist/sequencePlace.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/sequencePlace.d.ts +13 -0
- package/lib/sequencePlace.d.ts.map +1 -1
- package/lib/sequencePlace.js +16 -3
- package/lib/sequencePlace.js.map +1 -1
- package/package.json +16 -16
- package/src/index.ts +1 -0
- package/src/sequencePlace.ts +17 -3
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { type AdjustParams, type IJSONSegment, type IMarkerDef, type IMergeTreeA
|
|
|
17
17
|
export { addProperties, createMap, type MapLike, matchProperties, type PropertySet, } from "./properties.js";
|
|
18
18
|
export { compareReferencePositions, DetachedReferencePosition, maxReferencePosition, minReferencePosition, type ReferencePosition, refGetTileLabels, refHasTileLabel, refHasTileLabels, refTypeIncludesFlag, reservedRangeLabelsKey, reservedTileLabelsKey, } from "./referencePositions.js";
|
|
19
19
|
export { type PropsOrAdjust, copyPropertiesAndManager, PropertiesManager, } from "./segmentPropertiesManager.js";
|
|
20
|
-
export { type InteriorSequencePlace, Side, type SequencePlace, endpointPosAndSide, } from "./sequencePlace.js";
|
|
20
|
+
export { type InteriorSequencePlace, Side, type SequencePlace, defaultSide, endpointPosAndSide, } from "./sequencePlace.js";
|
|
21
21
|
export { SortedSet } from "./sortedSet.js";
|
|
22
22
|
export { SortedSegmentSet, type SortedSegmentSetItem } from "./sortedSegmentSet.js";
|
|
23
23
|
export { type IJSONTextSegment, TextSegment } from "./textSegment.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,sBAAsB,EACtB,gCAAgC,EAChC,0BAA0B,EAC1B,+BAA+B,EAC/B,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,iCAAiC,EACjC,8CAA8C,EAC9C,0DAA0D,GAC1D,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,OAAO,EACP,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,gBAAgB,GACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EACN,oCAAoC,EACpC,wBAAwB,EACxB,KAAK,sBAAsB,EAC3B,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,gBAAgB,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC1B,KAAK,iCAAiC,EACtC,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,wBAAwB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,WAAW,EACX,mBAAmB,EACnB,KAAK,kBAA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BAAoB,EACpB,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,KAAK,aAAa,EAClB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,KAAK,qBAAqB,EAC1B,IAAI,EACJ,KAAK,aAAa,EAClB,WAAW,EACX,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,+BAA+B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
8
|
-
exports.createLocalReconnectingPerspective = exports.revertMergeTreeDeltaRevertibles = exports.isMergeTreeDeltaRevertible = exports.discardMergeTreeDeltaRevertible = void 0;
|
|
7
|
+
exports.TextSegment = exports.SortedSegmentSet = exports.SortedSet = exports.endpointPosAndSide = exports.defaultSide = exports.Side = exports.PropertiesManager = exports.copyPropertiesAndManager = exports.reservedTileLabelsKey = exports.reservedRangeLabelsKey = exports.refTypeIncludesFlag = exports.refHasTileLabels = exports.refHasTileLabel = exports.refGetTileLabels = exports.minReferencePosition = exports.maxReferencePosition = exports.DetachedReferencePosition = exports.compareReferencePositions = exports.matchProperties = exports.createMap = exports.addProperties = exports.ReferenceType = exports.MergeTreeDeltaType = exports.createObliterateRangeOp = exports.createRemoveRangeOp = exports.createInsertSegmentOp = exports.createInsertOp = exports.createGroupOp = exports.createAnnotateRangeOp = exports.TrackingGroupCollection = exports.TrackingGroup = exports.reservedMarkerSimpleTypeKey = exports.reservedMarkerIdKey = exports.Marker = exports.segmentIsRemoved = exports.CollaborationWindow = exports.BaseSegment = exports.MergeTreeMaintenanceType = exports.getSlideToSegoff = exports.SlidingPreference = exports.LocalReferenceCollection = exports.createDetachedLocalReferencePosition = exports.UniversalSequenceNumber = exports.UnassignedSequenceNumber = exports.RedBlackTree = exports.RBColor = exports.Client = exports.createPropertyTrackingAndInsertionAttributionPolicyFactory = exports.createPropertyTrackingAttributionPolicyFactory = exports.createInsertOnlyAttributionPolicy = void 0;
|
|
8
|
+
exports.createLocalReconnectingPerspective = exports.revertMergeTreeDeltaRevertibles = exports.isMergeTreeDeltaRevertible = exports.discardMergeTreeDeltaRevertible = exports.appendToMergeTreeDeltaRevertibles = void 0;
|
|
9
9
|
var attributionPolicy_js_1 = require("./attributionPolicy.js");
|
|
10
10
|
Object.defineProperty(exports, "createInsertOnlyAttributionPolicy", { enumerable: true, get: function () { return attributionPolicy_js_1.createInsertOnlyAttributionPolicy; } });
|
|
11
11
|
Object.defineProperty(exports, "createPropertyTrackingAttributionPolicyFactory", { enumerable: true, get: function () { return attributionPolicy_js_1.createPropertyTrackingAttributionPolicyFactory; } });
|
|
@@ -66,6 +66,7 @@ Object.defineProperty(exports, "copyPropertiesAndManager", { enumerable: true, g
|
|
|
66
66
|
Object.defineProperty(exports, "PropertiesManager", { enumerable: true, get: function () { return segmentPropertiesManager_js_1.PropertiesManager; } });
|
|
67
67
|
var sequencePlace_js_1 = require("./sequencePlace.js");
|
|
68
68
|
Object.defineProperty(exports, "Side", { enumerable: true, get: function () { return sequencePlace_js_1.Side; } });
|
|
69
|
+
Object.defineProperty(exports, "defaultSide", { enumerable: true, get: function () { return sequencePlace_js_1.defaultSide; } });
|
|
69
70
|
Object.defineProperty(exports, "endpointPosAndSide", { enumerable: true, get: function () { return sequencePlace_js_1.endpointPosAndSide; } });
|
|
70
71
|
var sortedSet_js_1 = require("./sortedSet.js");
|
|
71
72
|
Object.defineProperty(exports, "SortedSet", { enumerable: true, get: function () { return sortedSet_js_1.SortedSet; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AASH,+DAIgC;AAH/B,yIAAA,iCAAiC,OAAA;AACjC,sJAAA,8CAA8C,OAAA;AAC9C,kKAAA,0DAA0D,OAAA;AAE3D,yCAAyD;AAAhD,mGAAA,MAAM,OAAA;AACf,mDAcgC;AAL/B,mGAAA,OAAO,OAAA;AAGP,wGAAA,YAAY,OAAA;AAGb,+CAAmF;AAA1E,wHAAA,wBAAwB,OAAA;AAAE,uHAAA,uBAAuB,OAAA;AAC1D,yDAK6B;AAJ5B,yIAAA,oCAAoC,OAAA;AACpC,6HAAA,wBAAwB,OAAA;AAExB,sHAAA,iBAAiB,OAAA;AAElB,+CAMwB;AADvB,gHAAA,gBAAgB,OAAA;AAEjB,yEAQqC;AADpC,qIAAA,wBAAwB,OAAA;AAEzB,yDAW6B;AAV5B,gHAAA,WAAW,OAAA;AACX,wHAAA,mBAAmB,OAAA;AAEnB,qHAAA,gBAAgB,OAAA;AAGhB,2GAAA,MAAM,OAAA;AACN,wHAAA,mBAAmB,OAAA;AACnB,gIAAA,2BAA2B,OAAA;AAG5B,+DAKgC;AAH/B,qHAAA,aAAa,OAAA;AAEb,+HAAA,uBAAuB,OAAA;AAExB,+CAO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B,OAAA;AAC/B,4HAAA,0BAA0B,OAAA;AAG1B,iIAAA,+BAA+B,OAAA;AAGhC,mDAAwF;AAA/E,oIAAA,kCAAkC,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tIAttributionCollection,\n\tIAttributionCollectionSerializer,\n\tIAttributionCollectionSpec,\n\tSerializedAttributionCollection,\n\tSequenceOffsets,\n} from \"./attributionCollection.js\";\nexport {\n\tcreateInsertOnlyAttributionPolicy,\n\tcreatePropertyTrackingAttributionPolicyFactory,\n\tcreatePropertyTrackingAndInsertionAttributionPolicyFactory,\n} from \"./attributionPolicy.js\";\nexport { Client, type IClientEvents } from \"./client.js\";\nexport {\n\ttype ConflictAction,\n\ttype Dictionary,\n\ttype IRBAugmentation,\n\ttype IRBMatcher,\n\ttype KeyComparer,\n\ttype Property,\n\ttype PropertyAction,\n\ttype QProperty,\n\tRBColor,\n\ttype RBNode,\n\ttype RBNodeActions,\n\tRedBlackTree,\n\ttype SortedDictionary,\n} from \"./collections/index.js\";\nexport { UnassignedSequenceNumber, UniversalSequenceNumber } from \"./constants.js\";\nexport {\n\tcreateDetachedLocalReferencePosition,\n\tLocalReferenceCollection,\n\ttype LocalReferencePosition,\n\tSlidingPreference,\n} from \"./localReference.js\";\nexport {\n\ttype AttributionPolicy,\n\ttype IMergeTreeAttributionOptions,\n\ttype IMergeTreeOptions,\n\ttype IMergeTreeOptionsInternal,\n\tgetSlideToSegoff,\n} from \"./mergeTree.js\";\nexport {\n\ttype IMergeTreeDeltaCallbackArgs,\n\ttype IMergeTreeDeltaOpArgs,\n\ttype IMergeTreeMaintenanceCallbackArgs,\n\ttype IMergeTreeSegmentDelta,\n\ttype MergeTreeDeltaOperationType,\n\ttype MergeTreeDeltaOperationTypes,\n\tMergeTreeMaintenanceType,\n} from \"./mergeTreeDeltaCallback.js\";\nexport {\n\tBaseSegment,\n\tCollaborationWindow,\n\ttype IJSONMarkerSegment,\n\tsegmentIsRemoved,\n\ttype ISegment,\n\ttype ISegmentAction,\n\tMarker,\n\treservedMarkerIdKey,\n\treservedMarkerSimpleTypeKey,\n\ttype ISegmentInternal,\n} from \"./mergeTreeNodes.js\";\nexport {\n\ttype Trackable,\n\tTrackingGroup,\n\ttype ITrackingGroup,\n\tTrackingGroupCollection,\n} from \"./mergeTreeTracking.js\";\nexport {\n\tcreateAnnotateRangeOp,\n\tcreateGroupOp,\n\tcreateInsertOp,\n\tcreateInsertSegmentOp,\n\tcreateRemoveRangeOp,\n\tcreateObliterateRangeOp,\n} from \"./opBuilder.js\";\nexport {\n\ttype AdjustParams,\n\ttype IJSONSegment,\n\ttype IMarkerDef,\n\ttype IMergeTreeAnnotateMsg,\n\ttype IMergeTreeDelta,\n\ttype IMergeTreeDeltaOp,\n\ttype IMergeTreeGroupMsg,\n\ttype IMergeTreeInsertMsg,\n\ttype IMergeTreeOp,\n\ttype IMergeTreeRemoveMsg,\n\ttype IMergeTreeAnnotateAdjustMsg,\n\ttype IRelativePosition,\n\tMergeTreeDeltaType,\n\tReferenceType,\n\ttype IMergeTreeObliterateMsg,\n\ttype IMergeTreeObliterateSidedMsg,\n} from \"./ops.js\";\nexport {\n\taddProperties,\n\tcreateMap,\n\ttype MapLike,\n\tmatchProperties,\n\ttype PropertySet,\n} from \"./properties.js\";\nexport {\n\tcompareReferencePositions,\n\tDetachedReferencePosition,\n\tmaxReferencePosition,\n\tminReferencePosition,\n\ttype ReferencePosition,\n\trefGetTileLabels,\n\trefHasTileLabel,\n\trefHasTileLabels,\n\trefTypeIncludesFlag,\n\treservedRangeLabelsKey,\n\treservedTileLabelsKey,\n} from \"./referencePositions.js\";\nexport {\n\ttype PropsOrAdjust,\n\tcopyPropertiesAndManager,\n\tPropertiesManager,\n} from \"./segmentPropertiesManager.js\";\nexport {\n\ttype InteriorSequencePlace,\n\tSide,\n\ttype SequencePlace,\n\tdefaultSide,\n\tendpointPosAndSide,\n} from \"./sequencePlace.js\";\nexport { SortedSet } from \"./sortedSet.js\";\nexport { SortedSegmentSet, type SortedSegmentSetItem } from \"./sortedSegmentSet.js\";\nexport { type IJSONTextSegment, TextSegment } from \"./textSegment.js\";\nexport {\n\tappendToMergeTreeDeltaRevertibles,\n\tdiscardMergeTreeDeltaRevertible,\n\tisMergeTreeDeltaRevertible,\n\ttype MergeTreeDeltaRevertible,\n\ttype MergeTreeRevertibleDriver,\n\trevertMergeTreeDeltaRevertibles,\n} from \"./revertibles.js\";\nexport type { OperationStamp } from \"./stamps.js\";\nexport { createLocalReconnectingPerspective, type Perspective } from \"./perspective.js\";\nexport type { IMergeTreeTextHelper } from \"./MergeTreeTextHelper.js\";\n"]}
|
package/dist/sequencePlace.d.ts
CHANGED
|
@@ -48,6 +48,19 @@ export declare enum Side {
|
|
|
48
48
|
Before = 0,
|
|
49
49
|
After = 1
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* The {@link Side} a bare numeric `SequencePlace` resolves to when no side is
|
|
53
|
+
* explicitly provided. Exported so callers that need to detect "the caller
|
|
54
|
+
* didn't specify a side" (such as serialized op replay) can compare against
|
|
55
|
+
* this without hardcoding `Side.Before`.
|
|
56
|
+
*
|
|
57
|
+
* Note: this only governs the bare-numeric case. The `"start"` and `"end"`
|
|
58
|
+
* literals are normalized by `normalizePlace` with their own conventions
|
|
59
|
+
* (`"start"` → `Side.After`, `"end"` → `Side.Before`) and are unrelated to
|
|
60
|
+
* `defaultSide`.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare const defaultSide = Side.Before;
|
|
51
64
|
/**
|
|
52
65
|
* Returns the position and side of the start and end of a sequence.
|
|
53
66
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencePlace.d.ts","sourceRoot":"","sources":["../src/sequencePlace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GA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GAC5B;IACF,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;CAC7C,CAiBA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,qBAAqB,CAW1E"}
|
package/dist/sequencePlace.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.normalizePlace = exports.endpointPosAndSide = exports.Side = void 0;
|
|
7
|
+
exports.normalizePlace = exports.endpointPosAndSide = exports.defaultSide = exports.Side = void 0;
|
|
8
8
|
/**
|
|
9
9
|
* Defines a side relative to a character in a sequence.
|
|
10
10
|
*
|
|
@@ -16,6 +16,19 @@ var Side;
|
|
|
16
16
|
Side[Side["Before"] = 0] = "Before";
|
|
17
17
|
Side[Side["After"] = 1] = "After";
|
|
18
18
|
})(Side || (exports.Side = Side = {}));
|
|
19
|
+
/**
|
|
20
|
+
* The {@link Side} a bare numeric `SequencePlace` resolves to when no side is
|
|
21
|
+
* explicitly provided. Exported so callers that need to detect "the caller
|
|
22
|
+
* didn't specify a side" (such as serialized op replay) can compare against
|
|
23
|
+
* this without hardcoding `Side.Before`.
|
|
24
|
+
*
|
|
25
|
+
* Note: this only governs the bare-numeric case. The `"start"` and `"end"`
|
|
26
|
+
* literals are normalized by `normalizePlace` with their own conventions
|
|
27
|
+
* (`"start"` → `Side.After`, `"end"` → `Side.Before`) and are unrelated to
|
|
28
|
+
* `defaultSide`.
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
exports.defaultSide = Side.Before;
|
|
19
32
|
/**
|
|
20
33
|
* Returns the position and side of the start and end of a sequence.
|
|
21
34
|
*
|
|
@@ -24,8 +37,8 @@ var Side;
|
|
|
24
37
|
function endpointPosAndSide(start, end) {
|
|
25
38
|
const startIsPlainEndpoint = typeof start === "number" || start === "start" || start === "end";
|
|
26
39
|
const endIsPlainEndpoint = typeof end === "number" || end === "start" || end === "end";
|
|
27
|
-
const startSide = startIsPlainEndpoint ?
|
|
28
|
-
const endSide = endIsPlainEndpoint ?
|
|
40
|
+
const startSide = startIsPlainEndpoint ? exports.defaultSide : start?.side;
|
|
41
|
+
const endSide = endIsPlainEndpoint ? exports.defaultSide : end?.side;
|
|
29
42
|
const startPos = startIsPlainEndpoint ? start : start?.pos;
|
|
30
43
|
const endPos = endIsPlainEndpoint ? end : end?.pos;
|
|
31
44
|
return {
|
|
@@ -41,7 +54,7 @@ exports.endpointPosAndSide = endpointPosAndSide;
|
|
|
41
54
|
*/
|
|
42
55
|
function normalizePlace(place) {
|
|
43
56
|
if (typeof place === "number") {
|
|
44
|
-
return { pos: place, side:
|
|
57
|
+
return { pos: place, side: exports.defaultSide };
|
|
45
58
|
}
|
|
46
59
|
if (place === "start") {
|
|
47
60
|
return { pos: -1, side: Side.After };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencePlace.js","sourceRoot":"","sources":["../src/sequencePlace.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAwCH;;;;;GAKG;AACH,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,mCAAU,CAAA;IACV,iCAAS,CAAA;AACV,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CACjC,KAAgC,EAChC,GAA8B;IAO9B,MAAM,oBAAoB,GACzB,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,KAAK,CAAC;IACnE,MAAM,kBAAkB,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,OAAO,I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Q,EAAE,CAAC;QAC/B,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAW,EAAE,CAAC;IAC1C,CAAC;IACD,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;IACD,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QACrB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAXD,wCAWC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Defines a position and side relative to a character in a sequence.\n *\n * For this purpose, sequences look like:\n *\n * `{start} - {character 0} - {character 1} - ... - {character N} - {end}`\n *\n * Each `{value}` in the diagram is a character within a sequence.\n * Each `-` in the above diagram is a position where text could be inserted.\n * Each position between a `{value}` and a `-` is a `SequencePlace`.\n *\n * The special endpoints `{start}` and `{end}` refer to positions outside the\n * contents of the string.\n *\n * This gives us 2N + 2 possible positions to refer to within a string, where N\n * is the number of characters.\n *\n * If the position is specified with a bare number, the side defaults to\n * `Side.Before`.\n *\n * If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range),\n * the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther.\n * E.g. the start of a range with Side.After is exclusive of the character at the position.\n * @legacy @beta\n */\nexport type SequencePlace = number | \"start\" | \"end\" | InteriorSequencePlace;\n\n/**\n * A sequence place that does not refer to the special endpoint segments.\n *\n * See {@link SequencePlace} for additional context.\n * @legacy @beta\n */\nexport interface InteriorSequencePlace {\n\tpos: number;\n\tside: Side;\n}\n\n/**\n * Defines a side relative to a character in a sequence.\n *\n * @remarks See {@link SequencePlace} for additional context on usage.\n * @legacy @beta\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * The {@link Side} a bare numeric `SequencePlace` resolves to when no side is\n * explicitly provided. Exported so callers that need to detect \"the caller\n * didn't specify a side\" (such as serialized op replay) can compare against\n * this without hardcoding `Side.Before`.\n *\n * Note: this only governs the bare-numeric case. The `\"start\"` and `\"end\"`\n * literals are normalized by `normalizePlace` with their own conventions\n * (`\"start\"` → `Side.After`, `\"end\"` → `Side.Before`) and are unrelated to\n * `defaultSide`.\n * @internal\n */\nexport const defaultSide = Side.Before;\n\n/**\n * Returns the position and side of the start and end of a sequence.\n *\n * @legacy @beta\n */\nexport function endpointPosAndSide(\n\tstart: SequencePlace | undefined,\n\tend: SequencePlace | undefined,\n): {\n\tstartSide: Side | undefined;\n\tendSide: Side | undefined;\n\tstartPos: number | \"start\" | \"end\" | undefined;\n\tendPos: number | \"start\" | \"end\" | undefined;\n} {\n\tconst startIsPlainEndpoint =\n\t\ttypeof start === \"number\" || start === \"start\" || start === \"end\";\n\tconst endIsPlainEndpoint = typeof end === \"number\" || end === \"start\" || end === \"end\";\n\n\tconst startSide = startIsPlainEndpoint ? defaultSide : start?.side;\n\tconst endSide = endIsPlainEndpoint ? defaultSide : end?.side;\n\n\tconst startPos = startIsPlainEndpoint ? start : start?.pos;\n\tconst endPos = endIsPlainEndpoint ? end : end?.pos;\n\n\treturn {\n\t\tstartSide,\n\t\tendSide,\n\t\tstartPos,\n\t\tendPos,\n\t};\n}\n\n/**\n * Returns the given place in InteriorSequencePlace form.\n */\nexport function normalizePlace(place: SequencePlace): InteriorSequencePlace {\n\tif (typeof place === \"number\") {\n\t\treturn { pos: place, side: defaultSide };\n\t}\n\tif (place === \"start\") {\n\t\treturn { pos: -1, side: Side.After };\n\t}\n\tif (place === \"end\") {\n\t\treturn { pos: -1, side: Side.Before };\n\t}\n\treturn place;\n}\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { type AdjustParams, type IJSONSegment, type IMarkerDef, type IMergeTreeA
|
|
|
17
17
|
export { addProperties, createMap, type MapLike, matchProperties, type PropertySet, } from "./properties.js";
|
|
18
18
|
export { compareReferencePositions, DetachedReferencePosition, maxReferencePosition, minReferencePosition, type ReferencePosition, refGetTileLabels, refHasTileLabel, refHasTileLabels, refTypeIncludesFlag, reservedRangeLabelsKey, reservedTileLabelsKey, } from "./referencePositions.js";
|
|
19
19
|
export { type PropsOrAdjust, copyPropertiesAndManager, PropertiesManager, } from "./segmentPropertiesManager.js";
|
|
20
|
-
export { type InteriorSequencePlace, Side, type SequencePlace, endpointPosAndSide, } from "./sequencePlace.js";
|
|
20
|
+
export { type InteriorSequencePlace, Side, type SequencePlace, defaultSide, endpointPosAndSide, } from "./sequencePlace.js";
|
|
21
21
|
export { SortedSet } from "./sortedSet.js";
|
|
22
22
|
export { SortedSegmentSet, type SortedSegmentSetItem } from "./sortedSegmentSet.js";
|
|
23
23
|
export { type IJSONTextSegment, TextSegment } from "./textSegment.js";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,sBAAsB,EACtB,gCAAgC,EAChC,0BAA0B,EAC1B,+BAA+B,EAC/B,eAAe,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,iCAAiC,EACjC,8CAA8C,EAC9C,0DAA0D,GAC1D,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,OAAO,EACP,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,YAAY,EACZ,KAAK,gBAAgB,GACrB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AAC1B,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACxF,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -16,7 +16,7 @@ export { MergeTreeDeltaType, ReferenceType, } from "./ops.js";
|
|
|
16
16
|
export { addProperties, createMap, matchProperties, } from "./properties.js";
|
|
17
17
|
export { compareReferencePositions, DetachedReferencePosition, maxReferencePosition, minReferencePosition, refGetTileLabels, refHasTileLabel, refHasTileLabels, refTypeIncludesFlag, reservedRangeLabelsKey, reservedTileLabelsKey, } from "./referencePositions.js";
|
|
18
18
|
export { copyPropertiesAndManager, PropertiesManager, } from "./segmentPropertiesManager.js";
|
|
19
|
-
export { Side, endpointPosAndSide, } from "./sequencePlace.js";
|
|
19
|
+
export { Side, defaultSide, endpointPosAndSide, } from "./sequencePlace.js";
|
|
20
20
|
export { SortedSet } from "./sortedSet.js";
|
|
21
21
|
export { SortedSegmentSet } from "./sortedSegmentSet.js";
|
|
22
22
|
export { TextSegment } from "./textSegment.js";
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACN,iCAAiC,EACjC,8CAA8C,EAC9C,0DAA0D,GAC1D,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AACzD,OAAO,EASN,OAAO,EAGP,YAAY,GAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EACN,oCAAoC,EACpC,wBAAwB,EAExB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKN,gBAAgB,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAON,wBAAwB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,WAAW,EACX,mBAAmB,EAEnB,gBAAgB,EAGhB,MAAM,EACN,mBAAmB,EACnB,2BAA2B,GAE3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,aAAa,EAEb,uBAAuB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAaN,kBAAkB,EAClB,aAAa,GAGb,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,aAAa,EACb,SAAS,EAET,eAAe,GAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EAEpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEN,IAAI,EAEJ,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAyB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAG1B,+BAA+B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kCAAkC,EAAoB,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tIAttributionCollection,\n\tIAttributionCollectionSerializer,\n\tIAttributionCollectionSpec,\n\tSerializedAttributionCollection,\n\tSequenceOffsets,\n} from \"./attributionCollection.js\";\nexport {\n\tcreateInsertOnlyAttributionPolicy,\n\tcreatePropertyTrackingAttributionPolicyFactory,\n\tcreatePropertyTrackingAndInsertionAttributionPolicyFactory,\n} from \"./attributionPolicy.js\";\nexport { Client, type IClientEvents } from \"./client.js\";\nexport {\n\ttype ConflictAction,\n\ttype Dictionary,\n\ttype IRBAugmentation,\n\ttype IRBMatcher,\n\ttype KeyComparer,\n\ttype Property,\n\ttype PropertyAction,\n\ttype QProperty,\n\tRBColor,\n\ttype RBNode,\n\ttype RBNodeActions,\n\tRedBlackTree,\n\ttype SortedDictionary,\n} from \"./collections/index.js\";\nexport { UnassignedSequenceNumber, UniversalSequenceNumber } from \"./constants.js\";\nexport {\n\tcreateDetachedLocalReferencePosition,\n\tLocalReferenceCollection,\n\ttype LocalReferencePosition,\n\tSlidingPreference,\n} from \"./localReference.js\";\nexport {\n\ttype AttributionPolicy,\n\ttype IMergeTreeAttributionOptions,\n\ttype IMergeTreeOptions,\n\ttype IMergeTreeOptionsInternal,\n\tgetSlideToSegoff,\n} from \"./mergeTree.js\";\nexport {\n\ttype IMergeTreeDeltaCallbackArgs,\n\ttype IMergeTreeDeltaOpArgs,\n\ttype IMergeTreeMaintenanceCallbackArgs,\n\ttype IMergeTreeSegmentDelta,\n\ttype MergeTreeDeltaOperationType,\n\ttype MergeTreeDeltaOperationTypes,\n\tMergeTreeMaintenanceType,\n} from \"./mergeTreeDeltaCallback.js\";\nexport {\n\tBaseSegment,\n\tCollaborationWindow,\n\ttype IJSONMarkerSegment,\n\tsegmentIsRemoved,\n\ttype ISegment,\n\ttype ISegmentAction,\n\tMarker,\n\treservedMarkerIdKey,\n\treservedMarkerSimpleTypeKey,\n\ttype ISegmentInternal,\n} from \"./mergeTreeNodes.js\";\nexport {\n\ttype Trackable,\n\tTrackingGroup,\n\ttype ITrackingGroup,\n\tTrackingGroupCollection,\n} from \"./mergeTreeTracking.js\";\nexport {\n\tcreateAnnotateRangeOp,\n\tcreateGroupOp,\n\tcreateInsertOp,\n\tcreateInsertSegmentOp,\n\tcreateRemoveRangeOp,\n\tcreateObliterateRangeOp,\n} from \"./opBuilder.js\";\nexport {\n\ttype AdjustParams,\n\ttype IJSONSegment,\n\ttype IMarkerDef,\n\ttype IMergeTreeAnnotateMsg,\n\ttype IMergeTreeDelta,\n\ttype IMergeTreeDeltaOp,\n\ttype IMergeTreeGroupMsg,\n\ttype IMergeTreeInsertMsg,\n\ttype IMergeTreeOp,\n\ttype IMergeTreeRemoveMsg,\n\ttype IMergeTreeAnnotateAdjustMsg,\n\ttype IRelativePosition,\n\tMergeTreeDeltaType,\n\tReferenceType,\n\ttype IMergeTreeObliterateMsg,\n\ttype IMergeTreeObliterateSidedMsg,\n} from \"./ops.js\";\nexport {\n\taddProperties,\n\tcreateMap,\n\ttype MapLike,\n\tmatchProperties,\n\ttype PropertySet,\n} from \"./properties.js\";\nexport {\n\tcompareReferencePositions,\n\tDetachedReferencePosition,\n\tmaxReferencePosition,\n\tminReferencePosition,\n\ttype ReferencePosition,\n\trefGetTileLabels,\n\trefHasTileLabel,\n\trefHasTileLabels,\n\trefTypeIncludesFlag,\n\treservedRangeLabelsKey,\n\treservedTileLabelsKey,\n} from \"./referencePositions.js\";\nexport {\n\ttype PropsOrAdjust,\n\tcopyPropertiesAndManager,\n\tPropertiesManager,\n} from \"./segmentPropertiesManager.js\";\nexport {\n\ttype InteriorSequencePlace,\n\tSide,\n\ttype SequencePlace,\n\tendpointPosAndSide,\n} from \"./sequencePlace.js\";\nexport { SortedSet } from \"./sortedSet.js\";\nexport { SortedSegmentSet, type SortedSegmentSetItem } from \"./sortedSegmentSet.js\";\nexport { type IJSONTextSegment, TextSegment } from \"./textSegment.js\";\nexport {\n\tappendToMergeTreeDeltaRevertibles,\n\tdiscardMergeTreeDeltaRevertible,\n\tisMergeTreeDeltaRevertible,\n\ttype MergeTreeDeltaRevertible,\n\ttype MergeTreeRevertibleDriver,\n\trevertMergeTreeDeltaRevertibles,\n} from \"./revertibles.js\";\nexport type { OperationStamp } from \"./stamps.js\";\nexport { createLocalReconnectingPerspective, type Perspective } from \"./perspective.js\";\nexport type { IMergeTreeTextHelper } from \"./MergeTreeTextHelper.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EACN,iCAAiC,EACjC,8CAA8C,EAC9C,0DAA0D,GAC1D,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AACzD,OAAO,EASN,OAAO,EAGP,YAAY,GAEZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EACN,oCAAoC,EACpC,wBAAwB,EAExB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAKN,gBAAgB,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAON,wBAAwB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,WAAW,EACX,mBAAmB,EAEnB,gBAAgB,EAGhB,MAAM,EACN,mBAAmB,EACnB,2BAA2B,GAE3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,aAAa,EAEb,uBAAuB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,GACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAaN,kBAAkB,EAClB,aAAa,GAGb,MAAM,UAAU,CAAC;AAClB,OAAO,EACN,aAAa,EACb,SAAS,EAET,eAAe,GAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EAEpB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEN,IAAI,EAEJ,WAAW,EACX,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAA6B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAyB,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EACN,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAG1B,+BAA+B,GAC/B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,kCAAkC,EAAoB,MAAM,kBAAkB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tIAttributionCollection,\n\tIAttributionCollectionSerializer,\n\tIAttributionCollectionSpec,\n\tSerializedAttributionCollection,\n\tSequenceOffsets,\n} from \"./attributionCollection.js\";\nexport {\n\tcreateInsertOnlyAttributionPolicy,\n\tcreatePropertyTrackingAttributionPolicyFactory,\n\tcreatePropertyTrackingAndInsertionAttributionPolicyFactory,\n} from \"./attributionPolicy.js\";\nexport { Client, type IClientEvents } from \"./client.js\";\nexport {\n\ttype ConflictAction,\n\ttype Dictionary,\n\ttype IRBAugmentation,\n\ttype IRBMatcher,\n\ttype KeyComparer,\n\ttype Property,\n\ttype PropertyAction,\n\ttype QProperty,\n\tRBColor,\n\ttype RBNode,\n\ttype RBNodeActions,\n\tRedBlackTree,\n\ttype SortedDictionary,\n} from \"./collections/index.js\";\nexport { UnassignedSequenceNumber, UniversalSequenceNumber } from \"./constants.js\";\nexport {\n\tcreateDetachedLocalReferencePosition,\n\tLocalReferenceCollection,\n\ttype LocalReferencePosition,\n\tSlidingPreference,\n} from \"./localReference.js\";\nexport {\n\ttype AttributionPolicy,\n\ttype IMergeTreeAttributionOptions,\n\ttype IMergeTreeOptions,\n\ttype IMergeTreeOptionsInternal,\n\tgetSlideToSegoff,\n} from \"./mergeTree.js\";\nexport {\n\ttype IMergeTreeDeltaCallbackArgs,\n\ttype IMergeTreeDeltaOpArgs,\n\ttype IMergeTreeMaintenanceCallbackArgs,\n\ttype IMergeTreeSegmentDelta,\n\ttype MergeTreeDeltaOperationType,\n\ttype MergeTreeDeltaOperationTypes,\n\tMergeTreeMaintenanceType,\n} from \"./mergeTreeDeltaCallback.js\";\nexport {\n\tBaseSegment,\n\tCollaborationWindow,\n\ttype IJSONMarkerSegment,\n\tsegmentIsRemoved,\n\ttype ISegment,\n\ttype ISegmentAction,\n\tMarker,\n\treservedMarkerIdKey,\n\treservedMarkerSimpleTypeKey,\n\ttype ISegmentInternal,\n} from \"./mergeTreeNodes.js\";\nexport {\n\ttype Trackable,\n\tTrackingGroup,\n\ttype ITrackingGroup,\n\tTrackingGroupCollection,\n} from \"./mergeTreeTracking.js\";\nexport {\n\tcreateAnnotateRangeOp,\n\tcreateGroupOp,\n\tcreateInsertOp,\n\tcreateInsertSegmentOp,\n\tcreateRemoveRangeOp,\n\tcreateObliterateRangeOp,\n} from \"./opBuilder.js\";\nexport {\n\ttype AdjustParams,\n\ttype IJSONSegment,\n\ttype IMarkerDef,\n\ttype IMergeTreeAnnotateMsg,\n\ttype IMergeTreeDelta,\n\ttype IMergeTreeDeltaOp,\n\ttype IMergeTreeGroupMsg,\n\ttype IMergeTreeInsertMsg,\n\ttype IMergeTreeOp,\n\ttype IMergeTreeRemoveMsg,\n\ttype IMergeTreeAnnotateAdjustMsg,\n\ttype IRelativePosition,\n\tMergeTreeDeltaType,\n\tReferenceType,\n\ttype IMergeTreeObliterateMsg,\n\ttype IMergeTreeObliterateSidedMsg,\n} from \"./ops.js\";\nexport {\n\taddProperties,\n\tcreateMap,\n\ttype MapLike,\n\tmatchProperties,\n\ttype PropertySet,\n} from \"./properties.js\";\nexport {\n\tcompareReferencePositions,\n\tDetachedReferencePosition,\n\tmaxReferencePosition,\n\tminReferencePosition,\n\ttype ReferencePosition,\n\trefGetTileLabels,\n\trefHasTileLabel,\n\trefHasTileLabels,\n\trefTypeIncludesFlag,\n\treservedRangeLabelsKey,\n\treservedTileLabelsKey,\n} from \"./referencePositions.js\";\nexport {\n\ttype PropsOrAdjust,\n\tcopyPropertiesAndManager,\n\tPropertiesManager,\n} from \"./segmentPropertiesManager.js\";\nexport {\n\ttype InteriorSequencePlace,\n\tSide,\n\ttype SequencePlace,\n\tdefaultSide,\n\tendpointPosAndSide,\n} from \"./sequencePlace.js\";\nexport { SortedSet } from \"./sortedSet.js\";\nexport { SortedSegmentSet, type SortedSegmentSetItem } from \"./sortedSegmentSet.js\";\nexport { type IJSONTextSegment, TextSegment } from \"./textSegment.js\";\nexport {\n\tappendToMergeTreeDeltaRevertibles,\n\tdiscardMergeTreeDeltaRevertible,\n\tisMergeTreeDeltaRevertible,\n\ttype MergeTreeDeltaRevertible,\n\ttype MergeTreeRevertibleDriver,\n\trevertMergeTreeDeltaRevertibles,\n} from \"./revertibles.js\";\nexport type { OperationStamp } from \"./stamps.js\";\nexport { createLocalReconnectingPerspective, type Perspective } from \"./perspective.js\";\nexport type { IMergeTreeTextHelper } from \"./MergeTreeTextHelper.js\";\n"]}
|
package/lib/sequencePlace.d.ts
CHANGED
|
@@ -48,6 +48,19 @@ export declare enum Side {
|
|
|
48
48
|
Before = 0,
|
|
49
49
|
After = 1
|
|
50
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* The {@link Side} a bare numeric `SequencePlace` resolves to when no side is
|
|
53
|
+
* explicitly provided. Exported so callers that need to detect "the caller
|
|
54
|
+
* didn't specify a side" (such as serialized op replay) can compare against
|
|
55
|
+
* this without hardcoding `Side.Before`.
|
|
56
|
+
*
|
|
57
|
+
* Note: this only governs the bare-numeric case. The `"start"` and `"end"`
|
|
58
|
+
* literals are normalized by `normalizePlace` with their own conventions
|
|
59
|
+
* (`"start"` → `Side.After`, `"end"` → `Side.Before`) and are unrelated to
|
|
60
|
+
* `defaultSide`.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
export declare const defaultSide = Side.Before;
|
|
51
64
|
/**
|
|
52
65
|
* Returns the position and side of the start and end of a sequence.
|
|
53
66
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencePlace.d.ts","sourceRoot":"","sources":["../src/sequencePlace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,qBAAqB,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,oBAAY,IAAI;IACf,MAAM,IAAI;IACV,KAAK,IAAI;CACT;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,GAAG,EAAE,aAAa,GAAG,SAAS,GAC5B;IACF,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;CAC7C,CAiBA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,qBAAqB,CAW1E"}
|
|
1
|
+
{"version":3,"file":"sequencePlace.d.ts","sourceRoot":"","sources":["../src/sequencePlace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,qBAAqB,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,oBAAY,IAAI;IACf,MAAM,IAAI;IACV,KAAK,IAAI;CACT;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,cAAc,CAAC;AAEvC;;;;GAIG;AACH,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,GAAG,EAAE,aAAa,GAAG,SAAS,GAC5B;IACF,SAAS,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;IAC/C,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,SAAS,CAAC;CAC7C,CAiBA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,qBAAqB,CAW1E"}
|
package/lib/sequencePlace.js
CHANGED
|
@@ -13,6 +13,19 @@ export var Side;
|
|
|
13
13
|
Side[Side["Before"] = 0] = "Before";
|
|
14
14
|
Side[Side["After"] = 1] = "After";
|
|
15
15
|
})(Side || (Side = {}));
|
|
16
|
+
/**
|
|
17
|
+
* The {@link Side} a bare numeric `SequencePlace` resolves to when no side is
|
|
18
|
+
* explicitly provided. Exported so callers that need to detect "the caller
|
|
19
|
+
* didn't specify a side" (such as serialized op replay) can compare against
|
|
20
|
+
* this without hardcoding `Side.Before`.
|
|
21
|
+
*
|
|
22
|
+
* Note: this only governs the bare-numeric case. The `"start"` and `"end"`
|
|
23
|
+
* literals are normalized by `normalizePlace` with their own conventions
|
|
24
|
+
* (`"start"` → `Side.After`, `"end"` → `Side.Before`) and are unrelated to
|
|
25
|
+
* `defaultSide`.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export const defaultSide = Side.Before;
|
|
16
29
|
/**
|
|
17
30
|
* Returns the position and side of the start and end of a sequence.
|
|
18
31
|
*
|
|
@@ -21,8 +34,8 @@ export var Side;
|
|
|
21
34
|
export function endpointPosAndSide(start, end) {
|
|
22
35
|
const startIsPlainEndpoint = typeof start === "number" || start === "start" || start === "end";
|
|
23
36
|
const endIsPlainEndpoint = typeof end === "number" || end === "start" || end === "end";
|
|
24
|
-
const startSide = startIsPlainEndpoint ?
|
|
25
|
-
const endSide = endIsPlainEndpoint ?
|
|
37
|
+
const startSide = startIsPlainEndpoint ? defaultSide : start?.side;
|
|
38
|
+
const endSide = endIsPlainEndpoint ? defaultSide : end?.side;
|
|
26
39
|
const startPos = startIsPlainEndpoint ? start : start?.pos;
|
|
27
40
|
const endPos = endIsPlainEndpoint ? end : end?.pos;
|
|
28
41
|
return {
|
|
@@ -37,7 +50,7 @@ export function endpointPosAndSide(start, end) {
|
|
|
37
50
|
*/
|
|
38
51
|
export function normalizePlace(place) {
|
|
39
52
|
if (typeof place === "number") {
|
|
40
|
-
return { pos: place, side:
|
|
53
|
+
return { pos: place, side: defaultSide };
|
|
41
54
|
}
|
|
42
55
|
if (place === "start") {
|
|
43
56
|
return { pos: -1, side: Side.After };
|
package/lib/sequencePlace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequencePlace.js","sourceRoot":"","sources":["../src/sequencePlace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwCH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,IAGX;AAHD,WAAY,IAAI;IACf,mCAAU,CAAA;IACV,iCAAS,CAAA;AACV,CAAC,EAHW,IAAI,KAAJ,IAAI,QAGf;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CACjC,KAAg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C,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC;IAEnD,OAAO;QACN,SAAS;QACT,OAAO;QACP,QAAQ;QACR,MAAM;KACN,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAoB;IAClD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;IAC1C,CAAC;IACD,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACtC,CAAC;IACD,IAAI,KAAK,KAAK,KAAK,EAAE,CAAC;QACrB,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;IACvC,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Defines a position and side relative to a character in a sequence.\n *\n * For this purpose, sequences look like:\n *\n * `{start} - {character 0} - {character 1} - ... - {character N} - {end}`\n *\n * Each `{value}` in the diagram is a character within a sequence.\n * Each `-` in the above diagram is a position where text could be inserted.\n * Each position between a `{value}` and a `-` is a `SequencePlace`.\n *\n * The special endpoints `{start}` and `{end}` refer to positions outside the\n * contents of the string.\n *\n * This gives us 2N + 2 possible positions to refer to within a string, where N\n * is the number of characters.\n *\n * If the position is specified with a bare number, the side defaults to\n * `Side.Before`.\n *\n * If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range),\n * the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther.\n * E.g. the start of a range with Side.After is exclusive of the character at the position.\n * @legacy @beta\n */\nexport type SequencePlace = number | \"start\" | \"end\" | InteriorSequencePlace;\n\n/**\n * A sequence place that does not refer to the special endpoint segments.\n *\n * See {@link SequencePlace} for additional context.\n * @legacy @beta\n */\nexport interface InteriorSequencePlace {\n\tpos: number;\n\tside: Side;\n}\n\n/**\n * Defines a side relative to a character in a sequence.\n *\n * @remarks See {@link SequencePlace} for additional context on usage.\n * @legacy @beta\n */\nexport enum Side {\n\tBefore = 0,\n\tAfter = 1,\n}\n\n/**\n * The {@link Side} a bare numeric `SequencePlace` resolves to when no side is\n * explicitly provided. Exported so callers that need to detect \"the caller\n * didn't specify a side\" (such as serialized op replay) can compare against\n * this without hardcoding `Side.Before`.\n *\n * Note: this only governs the bare-numeric case. The `\"start\"` and `\"end\"`\n * literals are normalized by `normalizePlace` with their own conventions\n * (`\"start\"` → `Side.After`, `\"end\"` → `Side.Before`) and are unrelated to\n * `defaultSide`.\n * @internal\n */\nexport const defaultSide = Side.Before;\n\n/**\n * Returns the position and side of the start and end of a sequence.\n *\n * @legacy @beta\n */\nexport function endpointPosAndSide(\n\tstart: SequencePlace | undefined,\n\tend: SequencePlace | undefined,\n): {\n\tstartSide: Side | undefined;\n\tendSide: Side | undefined;\n\tstartPos: number | \"start\" | \"end\" | undefined;\n\tendPos: number | \"start\" | \"end\" | undefined;\n} {\n\tconst startIsPlainEndpoint =\n\t\ttypeof start === \"number\" || start === \"start\" || start === \"end\";\n\tconst endIsPlainEndpoint = typeof end === \"number\" || end === \"start\" || end === \"end\";\n\n\tconst startSide = startIsPlainEndpoint ? defaultSide : start?.side;\n\tconst endSide = endIsPlainEndpoint ? defaultSide : end?.side;\n\n\tconst startPos = startIsPlainEndpoint ? start : start?.pos;\n\tconst endPos = endIsPlainEndpoint ? end : end?.pos;\n\n\treturn {\n\t\tstartSide,\n\t\tendSide,\n\t\tstartPos,\n\t\tendPos,\n\t};\n}\n\n/**\n * Returns the given place in InteriorSequencePlace form.\n */\nexport function normalizePlace(place: SequencePlace): InteriorSequencePlace {\n\tif (typeof place === \"number\") {\n\t\treturn { pos: place, side: defaultSide };\n\t}\n\tif (place === \"start\") {\n\t\treturn { pos: -1, side: Side.After };\n\t}\n\tif (place === \"end\") {\n\t\treturn { pos: -1, side: Side.Before };\n\t}\n\treturn place;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/merge-tree",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.101.0",
|
|
4
4
|
"description": "Merge tree",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -81,30 +81,30 @@
|
|
|
81
81
|
"temp-directory": "nyc/.nyc_output"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@fluid-internal/client-utils": "~2.
|
|
85
|
-
"@fluidframework/container-definitions": "~2.
|
|
86
|
-
"@fluidframework/core-interfaces": "~2.
|
|
87
|
-
"@fluidframework/core-utils": "~2.
|
|
88
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
89
|
-
"@fluidframework/driver-definitions": "~2.
|
|
90
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
91
|
-
"@fluidframework/runtime-utils": "~2.
|
|
92
|
-
"@fluidframework/shared-object-base": "~2.
|
|
93
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
84
|
+
"@fluid-internal/client-utils": "~2.101.0",
|
|
85
|
+
"@fluidframework/container-definitions": "~2.101.0",
|
|
86
|
+
"@fluidframework/core-interfaces": "~2.101.0",
|
|
87
|
+
"@fluidframework/core-utils": "~2.101.0",
|
|
88
|
+
"@fluidframework/datastore-definitions": "~2.101.0",
|
|
89
|
+
"@fluidframework/driver-definitions": "~2.101.0",
|
|
90
|
+
"@fluidframework/runtime-definitions": "~2.101.0",
|
|
91
|
+
"@fluidframework/runtime-utils": "~2.101.0",
|
|
92
|
+
"@fluidframework/shared-object-base": "~2.101.0",
|
|
93
|
+
"@fluidframework/telemetry-utils": "~2.101.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
97
97
|
"@biomejs/biome": "~2.4.5",
|
|
98
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
99
|
-
"@fluid-private/stochastic-test-utils": "~2.
|
|
100
|
-
"@fluid-private/test-pairwise-generator": "~2.
|
|
101
|
-
"@fluid-tools/benchmark": "^0.
|
|
98
|
+
"@fluid-internal/mocha-test-setup": "~2.101.0",
|
|
99
|
+
"@fluid-private/stochastic-test-utils": "~2.101.0",
|
|
100
|
+
"@fluid-private/test-pairwise-generator": "~2.101.0",
|
|
101
|
+
"@fluid-tools/benchmark": "^0.59.0",
|
|
102
102
|
"@fluid-tools/build-cli": "^0.65.0",
|
|
103
103
|
"@fluidframework/build-common": "^2.0.3",
|
|
104
104
|
"@fluidframework/build-tools": "^0.65.0",
|
|
105
105
|
"@fluidframework/eslint-config-fluid": "^9.0.0",
|
|
106
106
|
"@fluidframework/merge-tree-previous": "npm:@fluidframework/merge-tree@2.92.0",
|
|
107
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
107
|
+
"@fluidframework/test-runtime-utils": "~2.101.0",
|
|
108
108
|
"@microsoft/api-extractor": "7.58.1",
|
|
109
109
|
"@types/diff": "^3.5.1",
|
|
110
110
|
"@types/mocha": "^10.0.10",
|
package/src/index.ts
CHANGED
package/src/sequencePlace.ts
CHANGED
|
@@ -52,6 +52,20 @@ export enum Side {
|
|
|
52
52
|
After = 1,
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
/**
|
|
56
|
+
* The {@link Side} a bare numeric `SequencePlace` resolves to when no side is
|
|
57
|
+
* explicitly provided. Exported so callers that need to detect "the caller
|
|
58
|
+
* didn't specify a side" (such as serialized op replay) can compare against
|
|
59
|
+
* this without hardcoding `Side.Before`.
|
|
60
|
+
*
|
|
61
|
+
* Note: this only governs the bare-numeric case. The `"start"` and `"end"`
|
|
62
|
+
* literals are normalized by `normalizePlace` with their own conventions
|
|
63
|
+
* (`"start"` → `Side.After`, `"end"` → `Side.Before`) and are unrelated to
|
|
64
|
+
* `defaultSide`.
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
export const defaultSide = Side.Before;
|
|
68
|
+
|
|
55
69
|
/**
|
|
56
70
|
* Returns the position and side of the start and end of a sequence.
|
|
57
71
|
*
|
|
@@ -70,8 +84,8 @@ export function endpointPosAndSide(
|
|
|
70
84
|
typeof start === "number" || start === "start" || start === "end";
|
|
71
85
|
const endIsPlainEndpoint = typeof end === "number" || end === "start" || end === "end";
|
|
72
86
|
|
|
73
|
-
const startSide = startIsPlainEndpoint ?
|
|
74
|
-
const endSide = endIsPlainEndpoint ?
|
|
87
|
+
const startSide = startIsPlainEndpoint ? defaultSide : start?.side;
|
|
88
|
+
const endSide = endIsPlainEndpoint ? defaultSide : end?.side;
|
|
75
89
|
|
|
76
90
|
const startPos = startIsPlainEndpoint ? start : start?.pos;
|
|
77
91
|
const endPos = endIsPlainEndpoint ? end : end?.pos;
|
|
@@ -89,7 +103,7 @@ export function endpointPosAndSide(
|
|
|
89
103
|
*/
|
|
90
104
|
export function normalizePlace(place: SequencePlace): InteriorSequencePlace {
|
|
91
105
|
if (typeof place === "number") {
|
|
92
|
-
return { pos: place, side:
|
|
106
|
+
return { pos: place, side: defaultSide };
|
|
93
107
|
}
|
|
94
108
|
if (place === "start") {
|
|
95
109
|
return { pos: -1, side: Side.After };
|