@fluidframework/sequence 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.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.
Files changed (94) hide show
  1. package/.eslintrc.js +9 -12
  2. package/.mocharc.js +2 -2
  3. package/.vscode/launch.json +15 -14
  4. package/README.md +188 -179
  5. package/api-extractor.json +2 -2
  6. package/dist/defaultMap.d.ts.map +1 -1
  7. package/dist/defaultMap.js +5 -4
  8. package/dist/defaultMap.js.map +1 -1
  9. package/dist/defaultMapInterfaces.d.ts.map +1 -1
  10. package/dist/defaultMapInterfaces.js.map +1 -1
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/intervalCollection.d.ts.map +1 -1
  15. package/dist/intervalCollection.js +50 -36
  16. package/dist/intervalCollection.js.map +1 -1
  17. package/dist/intervalTree.d.ts.map +1 -1
  18. package/dist/intervalTree.js.map +1 -1
  19. package/dist/localValues.d.ts.map +1 -1
  20. package/dist/localValues.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/dist/sequence.d.ts +1 -1
  25. package/dist/sequence.d.ts.map +1 -1
  26. package/dist/sequence.js +13 -17
  27. package/dist/sequence.js.map +1 -1
  28. package/dist/sequenceDeltaEvent.d.ts.map +1 -1
  29. package/dist/sequenceDeltaEvent.js.map +1 -1
  30. package/dist/sequenceFactory.d.ts.map +1 -1
  31. package/dist/sequenceFactory.js.map +1 -1
  32. package/dist/sharedIntervalCollection.d.ts.map +1 -1
  33. package/dist/sharedIntervalCollection.js.map +1 -1
  34. package/dist/sharedSequence.d.ts.map +1 -1
  35. package/dist/sharedSequence.js +3 -3
  36. package/dist/sharedSequence.js.map +1 -1
  37. package/dist/sharedString.d.ts.map +1 -1
  38. package/dist/sharedString.js +5 -4
  39. package/dist/sharedString.js.map +1 -1
  40. package/lib/defaultMap.d.ts.map +1 -1
  41. package/lib/defaultMap.js +6 -5
  42. package/lib/defaultMap.js.map +1 -1
  43. package/lib/defaultMapInterfaces.d.ts.map +1 -1
  44. package/lib/defaultMapInterfaces.js.map +1 -1
  45. package/lib/index.d.ts +2 -2
  46. package/lib/index.d.ts.map +1 -1
  47. package/lib/index.js +2 -2
  48. package/lib/index.js.map +1 -1
  49. package/lib/intervalCollection.d.ts.map +1 -1
  50. package/lib/intervalCollection.js +50 -36
  51. package/lib/intervalCollection.js.map +1 -1
  52. package/lib/intervalTree.d.ts.map +1 -1
  53. package/lib/intervalTree.js.map +1 -1
  54. package/lib/localValues.d.ts.map +1 -1
  55. package/lib/localValues.js +1 -1
  56. package/lib/localValues.js.map +1 -1
  57. package/lib/packageVersion.d.ts +1 -1
  58. package/lib/packageVersion.js +1 -1
  59. package/lib/packageVersion.js.map +1 -1
  60. package/lib/sequence.d.ts +1 -1
  61. package/lib/sequence.d.ts.map +1 -1
  62. package/lib/sequence.js +15 -19
  63. package/lib/sequence.js.map +1 -1
  64. package/lib/sequenceDeltaEvent.d.ts.map +1 -1
  65. package/lib/sequenceDeltaEvent.js.map +1 -1
  66. package/lib/sequenceFactory.d.ts.map +1 -1
  67. package/lib/sequenceFactory.js +1 -1
  68. package/lib/sequenceFactory.js.map +1 -1
  69. package/lib/sharedIntervalCollection.d.ts.map +1 -1
  70. package/lib/sharedIntervalCollection.js.map +1 -1
  71. package/lib/sharedSequence.d.ts.map +1 -1
  72. package/lib/sharedSequence.js +4 -4
  73. package/lib/sharedSequence.js.map +1 -1
  74. package/lib/sharedString.d.ts.map +1 -1
  75. package/lib/sharedString.js +5 -4
  76. package/lib/sharedString.js.map +1 -1
  77. package/package.json +55 -55
  78. package/prettier.config.cjs +1 -1
  79. package/src/defaultMap.ts +406 -405
  80. package/src/defaultMapInterfaces.ts +120 -115
  81. package/src/index.ts +27 -17
  82. package/src/intervalCollection.ts +2198 -1997
  83. package/src/intervalTree.ts +139 -139
  84. package/src/localValues.ts +64 -73
  85. package/src/packageVersion.ts +1 -1
  86. package/src/sequence.ts +739 -694
  87. package/src/sequenceDeltaEvent.ts +143 -137
  88. package/src/sequenceFactory.ts +48 -46
  89. package/src/sharedIntervalCollection.ts +150 -136
  90. package/src/sharedSequence.ts +165 -160
  91. package/src/sharedString.ts +385 -343
  92. package/tsconfig.esnext.json +6 -6
  93. package/tsconfig.json +8 -12
  94. package/.editorconfig +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"defaultMap.js","sourceRoot":"","sources":["../src/defaultMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,2EAK4C;AAC5C,+DAAyE;AACzE,+CAGuB;AAgFvB;;;;;;GAMG;AACH,MAAa,UAAU;IAkBnB;;;;;;;OAOG;IACH,YACqB,UAA4B,EAC5B,MAAoB,EACpB,aAA2E,EAC3E,IAAmB,EACpB,eAAe,IAAI,gCAAiB,EAA2B;QAJ9D,eAAU,GAAV,UAAU,CAAkB;QAC5B,WAAM,GAAN,MAAM,CAAc;QACpB,kBAAa,GAAb,aAAa,CAA8D;QAC3E,SAAI,GAAJ,IAAI,CAAe;QACpB,iBAAY,GAAZ,YAAY,CAAmD;QAvBnF;;WAEG;QACc,oBAAe,GAA4C,IAAI,GAAG,EAAE,CAAC;QAEtF;;WAEG;QACc,SAAI,GAAG,IAAI,GAAG,EAAkC,CAAC;QAiB9D,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACrD,CAAC;IAjCD;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1B,CAAC;IA8BD;;;OAGG;IACI,IAAI;QACP,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,OAAO;QACV,MAAM,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;QACj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EAAE,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,CAAC;SACJ,CAAC,CAAC;QAEP,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACK,qBAAqB,CAAC,GAAW;QACrC,MAAM,IAAI,GAAG,CAAC,MAAc,EAAE,aAAkB,EAAE,MAAW,EAAE,eAAyC,EAAE,EAAE;YACxG,MAAM,gBAAgB,GAAG,IAAA,4CAAuB,EAC5C,MAAM,EACN,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,MAAM,CAAC,CAAC;YAEjB,MAAM,EAAE,GAA2B;gBAC/B,GAAG;gBACH,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE;oBACH,MAAM;oBACN,KAAK,EAAE,gBAAgB;iBAC1B;aACJ,CAAC;YAEF,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,eAAe,CAAC,CAAC;YAExC,MAAM,KAAK,GAAkB,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QACjF,CAAC,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,CAAC;IACpB,CAAC;CACJ;AA7VD,gCA6VC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n IFluidSerializer,\n makeHandlesSerializable,\n parseHandles,\n ValueType,\n} from \"@fluidframework/shared-object-base\";\nimport { assert, TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport {\n makeSerializable,\n ValueTypeLocalValue,\n} from \"./localValues\";\nimport {\n ISerializableValue,\n ISerializedValue,\n IValueChanged,\n IValueOpEmitter,\n IValueType,\n IValueTypeOperationValue,\n ISharedDefaultMapEvents,\n IMapMessageLocalMetadata,\n} from \"./defaultMapInterfaces\";\n\n/**\n * Defines the means to process and submit a given op on a map.\n */\ninterface IMapMessageHandler {\n /**\n * Apply the given operation.\n * @param op - The map operation to apply\n * @param local - Whether the message originated from the local client\n * @param message - The full message. Not provided for stashed ops.\n * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n * For messages from a remote client, this will be undefined.\n */\n process(\n op: IMapOperation,\n local: boolean,\n message: ISequencedDocumentMessage | undefined,\n localOpMetadata: IMapMessageLocalMetadata,\n ): void;\n\n /**\n * Communicate the operation to remote clients.\n * @param op - The map operation to submit\n */\n submit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n resubmit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n getStashedOpLocalMetadata(op: IMapOperation): unknown;\n}\n\n/**\n * Describes an operation specific to a value type.\n */\nexport interface IMapValueTypeOperation {\n /**\n * String identifier of the operation type.\n */\n type: \"act\";\n\n /**\n * Map key being modified.\n */\n key: string;\n\n /**\n * Value of the operation, specific to the value type.\n * @alpha\n */\n value: IValueTypeOperationValue;\n}\n\n/**\n * Description of a map delta operation\n */\nexport type IMapOperation = IMapValueTypeOperation;\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse\n */\nexport interface IMapDataObjectSerializable {\n [key: string]: ISerializableValue;\n}\n\nexport interface IMapDataObjectSerialized {\n [key: string]: ISerializedValue;\n}\n\n/**\n * A DefaultMap is a map-like distributed data structure, supporting operations on values stored by\n * string key locations.\n *\n * Creation of values is implicit on access (either via `get` or a remote op application referring to\n * a collection that wasn't previously known)\n */\nexport class DefaultMap<T> {\n /**\n * The number of key/value pairs stored in the map.\n */\n public get size(): number {\n return this.data.size;\n }\n\n /**\n * Mapping of op types to message handlers.\n */\n private readonly messageHandlers: ReadonlyMap<string, IMapMessageHandler> = new Map();\n\n /**\n * The in-memory data the map is storing.\n */\n private readonly data = new Map<string, ValueTypeLocalValue<T>>();\n\n /**\n * Create a new default map.\n * @param serializer - The serializer to serialize / parse handles\n * @param handle - The handle of the shared object using the kernel\n * @param submitMessage - A callback to submit a message through the shared object\n * @param type - The value type to create at values of this map\n * @param eventEmitter - The object that will emit map events\n */\n constructor(\n private readonly serializer: IFluidSerializer,\n private readonly handle: IFluidHandle,\n private readonly submitMessage: (op: any, localOpMetadata: IMapMessageLocalMetadata) => void,\n private readonly type: IValueType<T>,\n public readonly eventEmitter = new TypedEventEmitter<ISharedDefaultMapEvents>(),\n ) {\n this.messageHandlers = this.getMessageHandlers();\n }\n\n /**\n * Get an iterator over the keys in this map.\n * @returns The iterator\n */\n public keys(): IterableIterator<string> {\n return this.data.keys();\n }\n\n /**\n * Get an iterator over the entries in this map.\n * @returns The iterator\n */\n public entries(): IterableIterator<[string, any]> {\n const localEntriesIterator = this.data.entries();\n const iterator = {\n next(): IteratorResult<[string, any]> {\n const nextVal = localEntriesIterator.next();\n return nextVal.done\n ? { value: undefined, done: true }\n : { value: [nextVal.value[0], nextVal.value[1].value], done: false }; // Unpack the stored value\n },\n [Symbol.iterator]() {\n return this;\n },\n };\n return iterator;\n }\n\n /**\n * Get an iterator over the values in this map.\n * @returns The iterator\n */\n public values(): IterableIterator<any> {\n const localValuesIterator = this.data.values();\n const iterator = {\n next(): IteratorResult<any> {\n const nextVal = localValuesIterator.next();\n return nextVal.done\n ? { value: undefined, done: true }\n : { value: nextVal.value.value, done: false }; // Unpack the stored value\n },\n [Symbol.iterator]() {\n return this;\n },\n };\n return iterator;\n }\n\n /**\n * Get an iterator over the entries in this map.\n * @returns The iterator\n */\n public [Symbol.iterator](): IterableIterator<[string, any]> {\n return this.entries();\n }\n\n /**\n * Executes the given callback on each entry in the map.\n * @param callbackFn - Callback function\n */\n public forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void {\n this.data.forEach((localValue, key, m) => {\n callbackFn(localValue.value, key, m);\n });\n }\n\n /**\n * {@inheritDoc ISharedMap.get}\n */\n public get(key: string): T {\n const localValue = this.data.get(key) ?? this.createCore(key, true);\n\n return localValue.value;\n }\n\n /**\n * Check if a key exists in the map.\n * @param key - The key to check\n * @returns True if the key exists, false otherwise\n */\n public has(key: string): boolean {\n return this.data.has(key);\n }\n\n /**\n * Serializes the data stored in the shared map to a JSON string\n * @param serializer - The serializer to use to serialize handles in its values.\n * @returns A JSON string containing serialized map data\n */\n public getSerializedStorage(serializer: IFluidSerializer): IMapDataObjectSerialized {\n const serializableMapData: IMapDataObjectSerialized = {};\n this.data.forEach((localValue, key) => {\n serializableMapData[key] = localValue.makeSerialized(serializer, this.handle);\n });\n return serializableMapData;\n }\n\n public getSerializableStorage(serializer: IFluidSerializer): IMapDataObjectSerializable {\n const serializableMapData: IMapDataObjectSerializable = {};\n this.data.forEach((localValue, key) => {\n serializableMapData[key] = makeSerializable(localValue, serializer, this.handle);\n });\n return serializableMapData;\n }\n\n public serialize(serializer: IFluidSerializer): string {\n return JSON.stringify(this.getSerializableStorage(serializer));\n }\n\n /**\n * Populate the kernel with the given map data.\n * @param data - A JSON string containing serialized map data\n */\n public populateFromSerializable(json: IMapDataObjectSerializable): void {\n for (const [key, serializable] of Object.entries(json)) {\n // Back-compat: legacy documents may have handles to an intervalCollection map kernel.\n // These collections should be empty, and ValueTypes are no longer supported.\n if (serializable.type === ValueType[ValueType.Plain]\n || serializable.type === ValueType[ValueType.Shared]) {\n continue;\n }\n\n // Back-compat: Sequence previously arbitrarily prefixed all interval collection keys with\n // \"intervalCollections/\". This would burden users trying to iterate the collection and\n // access its value, as well as those trying to match a create message to its underlying\n // collection. See https://github.com/microsoft/FluidFramework/issues/10557 for more context.\n const normalizedKey = key.startsWith(\"intervalCollections/\") ? key.substring(20) : key;\n\n const localValue = {\n key: normalizedKey,\n value: this.makeLocal(key, serializable),\n };\n\n this.data.set(localValue.key, localValue.value);\n }\n }\n\n public populate(json: string): void {\n this.populateFromSerializable(JSON.parse(json) as IMapDataObjectSerializable);\n }\n\n /**\n * Submit the given op if a handler is registered.\n * @param op - The operation to attempt to submit\n * @param localOpMetadata - The local metadata associated with the op. This is kept locally by the runtime\n * and not sent to the server. This will be sent back when this message is received back from the server. This is\n * also sent if we are asked to resubmit the message.\n * @returns True if the operation was submitted, false otherwise.\n */\n public tryResubmitMessage(op: any, localOpMetadata: IMapMessageLocalMetadata): boolean {\n const type: string = op.type;\n const handler = this.messageHandlers.get(type);\n if (handler !== undefined) {\n handler.resubmit(op as IMapOperation, localOpMetadata);\n return true;\n }\n return false;\n }\n\n public tryGetStashedOpLocalMetadata(op: any): unknown {\n const type: string = op.type;\n if (this.messageHandlers.has(type)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this.messageHandlers.get(type)!.getStashedOpLocalMetadata(op as IMapOperation);\n }\n throw new Error(\"no apply stashed op handler\");\n }\n\n /**\n * Process the given op if a handler is registered.\n * @param message - The message to process\n * @param local - Whether the message originated from the local client\n * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n * For messages from a remote client, this will be undefined.\n * @returns True if the operation was processed, false otherwise.\n */\n public tryProcessMessage(\n op: IMapOperation,\n local: boolean,\n message: ISequencedDocumentMessage | undefined,\n localOpMetadata: unknown,\n ): boolean {\n const handler = this.messageHandlers.get(op.type);\n if (handler !== undefined) {\n handler.process(op, local, message, localOpMetadata as IMapMessageLocalMetadata);\n return true;\n }\n return false;\n }\n\n /**\n * Initializes a default ValueType at the provided key.\n * Should be used when a map operation incurs creation.\n * @param key - The key being initialized\n * @param local - Whether the message originated from the local client\n */\n private createCore(key: string, local: boolean): ValueTypeLocalValue<T> {\n const localValue = new ValueTypeLocalValue(\n this.type.factory.load(this.makeMapValueOpEmitter(key), undefined),\n this.type,\n );\n const previousValue = this.data.get(key);\n this.data.set(key, localValue);\n const event: IValueChanged = { key, previousValue };\n this.eventEmitter.emit(\"create\", event, local, this.eventEmitter);\n return localValue;\n }\n\n /**\n * The remote ISerializableValue we're receiving (either as a result of a load or an incoming set op) will\n * have the information we need to create a real object, but will not be the real object yet. For example,\n * we might know it's a map and the map's ID but not have the actual map or its data yet. makeLocal's\n * job is to convert that information into a real object for local usage.\n * @param key - The key that the caller intends to store the local value into (used for ops later). But\n * doesn't actually store the local value into that key. So better not lie!\n * @param serializable - The remote information that we can convert into a real object\n * @returns The local value that was produced\n */\n private makeLocal(key: string, serializable: ISerializableValue): ValueTypeLocalValue<T> {\n assert(serializable.type !== ValueType[ValueType.Plain] && serializable.type !== ValueType[ValueType.Shared],\n 0x2e1 /* \"Support for plain value types removed.\" */);\n\n serializable.value = parseHandles(serializable.value, this.serializer);\n const localValue = this.type.factory.load(\n this.makeMapValueOpEmitter(key),\n serializable.value,\n );\n return new ValueTypeLocalValue(localValue, this.type);\n }\n\n /**\n * Get the message handlers for the map.\n * @returns A map of string op names to IMapMessageHandlers for those ops\n */\n private getMessageHandlers() {\n const messageHandlers = new Map<string, IMapMessageHandler>();\n // Ops with type \"act\" describe actions taken by custom value type handlers of whatever item is\n // being addressed. These custom handlers can be retrieved from the ValueTypeLocalValue which has\n // stashed its valueType (and therefore its handlers). We also emit a valueChanged for anyone\n // watching for manipulations of that item.\n messageHandlers.set(\n \"act\",\n {\n process: (op: IMapValueTypeOperation, local, message, localOpMetadata) => {\n const localValue = this.data.get(op.key) ?? this.createCore(op.key, local);\n const handler = localValue.getOpHandler(op.value.opName);\n const previousValue = localValue.value;\n const translatedValue = parseHandles(\n op.value.value,\n this.serializer);\n handler.process(previousValue, translatedValue, local, message, localOpMetadata);\n const event: IValueChanged = { key: op.key, previousValue };\n this.eventEmitter.emit(\"valueChanged\", event, local, message, this.eventEmitter);\n },\n submit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n this.submitMessage(\n op,\n localOpMetadata,\n );\n },\n resubmit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n const localValue = this.data.get(op.key);\n\n assert(localValue !== undefined, 0x3f8 /* Local value expected on resubmission */);\n\n const handler = localValue.getOpHandler(op.value.opName);\n const {\n rebasedOp,\n rebasedLocalOpMetadata,\n } = handler.rebase(localValue.value, op.value, localOpMetadata);\n this.submitMessage(\n { ...op, value: rebasedOp },\n rebasedLocalOpMetadata,\n );\n },\n getStashedOpLocalMetadata: (op: IMapValueTypeOperation) => {\n assert(false, 0x016 /* \"apply stashed op not implemented for custom value type ops\" */);\n },\n });\n\n return messageHandlers;\n }\n\n /**\n * Create an emitter for a value type to emit ops from the given key.\n * @alpha\n * @param key - The key of the map that the value type will be stored on\n * @returns A value op emitter for the given key\n */\n private makeMapValueOpEmitter(key: string): IValueOpEmitter {\n const emit = (opName: string, previousValue: any, params: any, localOpMetadata: IMapMessageLocalMetadata) => {\n const translatedParams = makeHandlesSerializable(\n params,\n this.serializer,\n this.handle);\n\n const op: IMapValueTypeOperation = {\n key,\n type: \"act\",\n value: {\n opName,\n value: translatedParams,\n },\n };\n\n this.submitMessage(op, localOpMetadata);\n\n const event: IValueChanged = { key, previousValue };\n this.eventEmitter.emit(\"valueChanged\", event, true, null, this.eventEmitter);\n };\n\n return { emit };\n }\n}\n"]}
1
+ {"version":3,"file":"defaultMap.js","sourceRoot":"","sources":["../src/defaultMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,2EAK4C;AAC5C,+DAAyE;AACzE,+CAAsE;AAgFtE;;;;;;GAMG;AACH,MAAa,UAAU;IAkBtB;;;;;;;OAOG;IACH,YACkB,UAA4B,EAC5B,MAAoB,EACpB,aAGR,EACQ,IAAmB,EACpB,eAAe,IAAI,gCAAiB,EAA2B;QAP9D,eAAU,GAAV,UAAU,CAAkB;QAC5B,WAAM,GAAN,MAAM,CAAc;QACpB,kBAAa,GAAb,aAAa,CAGrB;QACQ,SAAI,GAAJ,IAAI,CAAe;QACpB,iBAAY,GAAZ,YAAY,CAAmD;QA1BhF;;WAEG;QACc,oBAAe,GAA4C,IAAI,GAAG,EAAE,CAAC;QAEtF;;WAEG;QACc,SAAI,GAAG,IAAI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ors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIFluidSerializer,\n\tmakeHandlesSerializable,\n\tparseHandles,\n\tValueType,\n} from \"@fluidframework/shared-object-base\";\nimport { assert, TypedEventEmitter } from \"@fluidframework/common-utils\";\nimport { makeSerializable, ValueTypeLocalValue } from \"./localValues\";\nimport {\n\tISerializableValue,\n\tISerializedValue,\n\tIValueChanged,\n\tIValueOpEmitter,\n\tIValueType,\n\tIValueTypeOperationValue,\n\tISharedDefaultMapEvents,\n\tIMapMessageLocalMetadata,\n} from \"./defaultMapInterfaces\";\n\n/**\n * Defines the means to process and submit a given op on a map.\n */\ninterface IMapMessageHandler {\n\t/**\n\t * Apply the given operation.\n\t * @param op - The map operation to apply\n\t * @param local - Whether the message originated from the local client\n\t * @param message - The full message. Not provided for stashed ops.\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t */\n\tprocess(\n\t\top: IMapOperation,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): void;\n\n\t/**\n\t * Communicate the operation to remote clients.\n\t * @param op - The map operation to submit\n\t */\n\tsubmit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n\tresubmit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n\tgetStashedOpLocalMetadata(op: IMapOperation): unknown;\n}\n\n/**\n * Describes an operation specific to a value type.\n */\nexport interface IMapValueTypeOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"act\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value of the operation, specific to the value type.\n\t * @alpha\n\t */\n\tvalue: IValueTypeOperationValue;\n}\n\n/**\n * Description of a map delta operation\n */\nexport type IMapOperation = IMapValueTypeOperation;\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse\n */\nexport interface IMapDataObjectSerializable {\n\t[key: string]: ISerializableValue;\n}\n\nexport interface IMapDataObjectSerialized {\n\t[key: string]: ISerializedValue;\n}\n\n/**\n * A DefaultMap is a map-like distributed data structure, supporting operations on values stored by\n * string key locations.\n *\n * Creation of values is implicit on access (either via `get` or a remote op application referring to\n * a collection that wasn't previously known)\n */\nexport class DefaultMap<T> {\n\t/**\n\t * The number of key/value pairs stored in the map.\n\t */\n\tpublic get size(): number {\n\t\treturn this.data.size;\n\t}\n\n\t/**\n\t * Mapping of op types to message handlers.\n\t */\n\tprivate readonly messageHandlers: ReadonlyMap<string, IMapMessageHandler> = new Map();\n\n\t/**\n\t * The in-memory data the map is storing.\n\t */\n\tprivate readonly data = new Map<string, ValueTypeLocalValue<T>>();\n\n\t/**\n\t * Create a new default map.\n\t * @param serializer - The serializer to serialize / parse handles\n\t * @param handle - The handle of the shared object using the kernel\n\t * @param submitMessage - A callback to submit a message through the shared object\n\t * @param type - The value type to create at values of this map\n\t * @param eventEmitter - The object that will emit map events\n\t */\n\tconstructor(\n\t\tprivate readonly serializer: IFluidSerializer,\n\t\tprivate readonly handle: IFluidHandle,\n\t\tprivate readonly submitMessage: (\n\t\t\top: any,\n\t\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t\t) => void,\n\t\tprivate readonly type: IValueType<T>,\n\t\tpublic readonly eventEmitter = new TypedEventEmitter<ISharedDefaultMapEvents>(),\n\t) {\n\t\tthis.messageHandlers = this.getMessageHandlers();\n\t}\n\n\t/**\n\t * Get an iterator over the keys in this map.\n\t * @returns The iterator\n\t */\n\tpublic keys(): IterableIterator<string> {\n\t\treturn this.data.keys();\n\t}\n\n\t/**\n\t * Get an iterator over the entries in this map.\n\t * @returns The iterator\n\t */\n\tpublic entries(): IterableIterator<[string, any]> {\n\t\tconst localEntriesIterator = this.data.entries();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<[string, any]> {\n\t\t\t\tconst nextVal = localEntriesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: [nextVal.value[0], nextVal.value[1].value], done: false }; // Unpack the stored value\n\t\t\t},\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the values in this map.\n\t * @returns The iterator\n\t */\n\tpublic values(): IterableIterator<any> {\n\t\tconst localValuesIterator = this.data.values();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<any> {\n\t\t\t\tconst nextVal = localValuesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: nextVal.value.value, done: false }; // Unpack the stored value\n\t\t\t},\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the entries in this map.\n\t * @returns The iterator\n\t */\n\tpublic [Symbol.iterator](): IterableIterator<[string, any]> {\n\t\treturn this.entries();\n\t}\n\n\t/**\n\t * Executes the given callback on each entry in the map.\n\t * @param callbackFn - Callback function\n\t */\n\tpublic forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void {\n\t\tthis.data.forEach((localValue, key, m) => {\n\t\t\tcallbackFn(localValue.value, key, m);\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedMap.get}\n\t */\n\tpublic get(key: string): T {\n\t\tconst localValue = this.data.get(key) ?? this.createCore(key, true);\n\n\t\treturn localValue.value;\n\t}\n\n\t/**\n\t * Check if a key exists in the map.\n\t * @param key - The key to check\n\t * @returns True if the key exists, false otherwise\n\t */\n\tpublic has(key: string): boolean {\n\t\treturn this.data.has(key);\n\t}\n\n\t/**\n\t * Serializes the data stored in the shared map to a JSON string\n\t * @param serializer - The serializer to use to serialize handles in its values.\n\t * @returns A JSON string containing serialized map data\n\t */\n\tpublic getSerializedStorage(serializer: IFluidSerializer): IMapDataObjectSerialized {\n\t\tconst serializableMapData: IMapDataObjectSerialized = {};\n\t\tthis.data.forEach((localValue, key) => {\n\t\t\tserializableMapData[key] = localValue.makeSerialized(serializer, this.handle);\n\t\t});\n\t\treturn serializableMapData;\n\t}\n\n\tpublic getSerializableStorage(serializer: IFluidSerializer): IMapDataObjectSerializable {\n\t\tconst serializableMapData: IMapDataObjectSerializable = {};\n\t\tthis.data.forEach((localValue, key) => {\n\t\t\tserializableMapData[key] = makeSerializable(localValue, serializer, this.handle);\n\t\t});\n\t\treturn serializableMapData;\n\t}\n\n\tpublic serialize(serializer: IFluidSerializer): string {\n\t\treturn JSON.stringify(this.getSerializableStorage(serializer));\n\t}\n\n\t/**\n\t * Populate the kernel with the given map data.\n\t * @param data - A JSON string containing serialized map data\n\t */\n\tpublic populateFromSerializable(json: IMapDataObjectSerializable): void {\n\t\tfor (const [key, serializable] of Object.entries(json)) {\n\t\t\t// Back-compat: legacy documents may have handles to an intervalCollection map kernel.\n\t\t\t// These collections should be empty, and ValueTypes are no longer supported.\n\t\t\tif (\n\t\t\t\tserializable.type === ValueType[ValueType.Plain] ||\n\t\t\t\tserializable.type === ValueType[ValueType.Shared]\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Back-compat: Sequence previously arbitrarily prefixed all interval collection keys with\n\t\t\t// \"intervalCollections/\". This would burden users trying to iterate the collection and\n\t\t\t// access its value, as well as those trying to match a create message to its underlying\n\t\t\t// collection. See https://github.com/microsoft/FluidFramework/issues/10557 for more context.\n\t\t\tconst normalizedKey = key.startsWith(\"intervalCollections/\") ? key.substring(20) : key;\n\n\t\t\tconst localValue = {\n\t\t\t\tkey: normalizedKey,\n\t\t\t\tvalue: this.makeLocal(key, serializable),\n\t\t\t};\n\n\t\t\tthis.data.set(localValue.key, localValue.value);\n\t\t}\n\t}\n\n\tpublic populate(json: string): void {\n\t\tthis.populateFromSerializable(JSON.parse(json) as IMapDataObjectSerializable);\n\t}\n\n\t/**\n\t * Submit the given op if a handler is registered.\n\t * @param op - The operation to attempt to submit\n\t * @param localOpMetadata - The local metadata associated with the op. This is kept locally by the runtime\n\t * and not sent to the server. This will be sent back when this message is received back from the server. This is\n\t * also sent if we are asked to resubmit the message.\n\t * @returns True if the operation was submitted, false otherwise.\n\t */\n\tpublic tryResubmitMessage(op: any, localOpMetadata: IMapMessageLocalMetadata): boolean {\n\t\tconst type: string = op.type;\n\t\tconst handler = this.messageHandlers.get(type);\n\t\tif (handler !== undefined) {\n\t\t\thandler.resubmit(op as IMapOperation, localOpMetadata);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic tryGetStashedOpLocalMetadata(op: any): unknown {\n\t\tconst type: string = op.type;\n\t\tif (this.messageHandlers.has(type)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\treturn this.messageHandlers.get(type)!.getStashedOpLocalMetadata(op as IMapOperation);\n\t\t}\n\t\tthrow new Error(\"no apply stashed op handler\");\n\t}\n\n\t/**\n\t * Process the given op if a handler is registered.\n\t * @param message - The message to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @returns True if the operation was processed, false otherwise.\n\t */\n\tpublic tryProcessMessage(\n\t\top: IMapOperation,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: unknown,\n\t): boolean {\n\t\tconst handler = this.messageHandlers.get(op.type);\n\t\tif (handler !== undefined) {\n\t\t\thandler.process(op, local, message, localOpMetadata as IMapMessageLocalMetadata);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Initializes a default ValueType at the provided key.\n\t * Should be used when a map operation incurs creation.\n\t * @param key - The key being initialized\n\t * @param local - Whether the message originated from the local client\n\t */\n\tprivate createCore(key: string, local: boolean): ValueTypeLocalValue<T> {\n\t\tconst localValue = new ValueTypeLocalValue(\n\t\t\tthis.type.factory.load(this.makeMapValueOpEmitter(key), undefined),\n\t\t\tthis.type,\n\t\t);\n\t\tconst previousValue = this.data.get(key);\n\t\tthis.data.set(key, localValue);\n\t\tconst event: IValueChanged = { key, previousValue };\n\t\tthis.eventEmitter.emit(\"create\", event, local, this.eventEmitter);\n\t\treturn localValue;\n\t}\n\n\t/**\n\t * The remote ISerializableValue we're receiving (either as a result of a load or an incoming set op) will\n\t * have the information we need to create a real object, but will not be the real object yet. For example,\n\t * we might know it's a map and the map's ID but not have the actual map or its data yet. makeLocal's\n\t * job is to convert that information into a real object for local usage.\n\t * @param key - The key that the caller intends to store the local value into (used for ops later). But\n\t * doesn't actually store the local value into that key. So better not lie!\n\t * @param serializable - The remote information that we can convert into a real object\n\t * @returns The local value that was produced\n\t */\n\tprivate makeLocal(key: string, serializable: ISerializableValue): ValueTypeLocalValue<T> {\n\t\tassert(\n\t\t\tserializable.type !== ValueType[ValueType.Plain] &&\n\t\t\t\tserializable.type !== ValueType[ValueType.Shared],\n\t\t\t0x2e1 /* \"Support for plain value types removed.\" */,\n\t\t);\n\n\t\tserializable.value = parseHandles(serializable.value, this.serializer);\n\t\tconst localValue = this.type.factory.load(\n\t\t\tthis.makeMapValueOpEmitter(key),\n\t\t\tserializable.value,\n\t\t);\n\t\treturn new ValueTypeLocalValue(localValue, this.type);\n\t}\n\n\t/**\n\t * Get the message handlers for the map.\n\t * @returns A map of string op names to IMapMessageHandlers for those ops\n\t */\n\tprivate getMessageHandlers() {\n\t\tconst messageHandlers = new Map<string, IMapMessageHandler>();\n\t\t// Ops with type \"act\" describe actions taken by custom value type handlers of whatever item is\n\t\t// being addressed. These custom handlers can be retrieved from the ValueTypeLocalValue which has\n\t\t// stashed its valueType (and therefore its handlers). We also emit a valueChanged for anyone\n\t\t// watching for manipulations of that item.\n\t\tmessageHandlers.set(\"act\", {\n\t\t\tprocess: (op: IMapValueTypeOperation, local, message, localOpMetadata) => {\n\t\t\t\tconst localValue = this.data.get(op.key) ?? this.createCore(op.key, local);\n\t\t\t\tconst handler = localValue.getOpHandler(op.value.opName);\n\t\t\t\tconst previousValue = localValue.value;\n\t\t\t\tconst translatedValue = parseHandles(op.value.value, this.serializer);\n\t\t\t\thandler.process(previousValue, translatedValue, local, message, localOpMetadata);\n\t\t\t\tconst event: IValueChanged = { key: op.key, previousValue };\n\t\t\t\tthis.eventEmitter.emit(\"valueChanged\", event, local, message, this.eventEmitter);\n\t\t\t},\n\t\t\tsubmit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n\t\t\t\tthis.submitMessage(op, localOpMetadata);\n\t\t\t},\n\t\t\tresubmit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n\t\t\t\tconst localValue = this.data.get(op.key);\n\n\t\t\t\tassert(localValue !== undefined, 0x3f8 /* Local value expected on resubmission */);\n\n\t\t\t\tconst handler = localValue.getOpHandler(op.value.opName);\n\t\t\t\tconst { rebasedOp, rebasedLocalOpMetadata } = handler.rebase(\n\t\t\t\t\tlocalValue.value,\n\t\t\t\t\top.value,\n\t\t\t\t\tlocalOpMetadata,\n\t\t\t\t);\n\t\t\t\tthis.submitMessage({ ...op, value: rebasedOp }, rebasedLocalOpMetadata);\n\t\t\t},\n\t\t\tgetStashedOpLocalMetadata: (op: IMapValueTypeOperation) => {\n\t\t\t\tassert(\n\t\t\t\t\tfalse,\n\t\t\t\t\t0x016 /* \"apply stashed op not implemented for custom value type ops\" */,\n\t\t\t\t);\n\t\t\t},\n\t\t});\n\n\t\treturn messageHandlers;\n\t}\n\n\t/**\n\t * Create an emitter for a value type to emit ops from the given key.\n\t * @alpha\n\t * @param key - The key of the map that the value type will be stored on\n\t * @returns A value op emitter for the given key\n\t */\n\tprivate makeMapValueOpEmitter(key: string): IValueOpEmitter {\n\t\tconst emit = (\n\t\t\topName: string,\n\t\t\tpreviousValue: any,\n\t\t\tparams: any,\n\t\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t\t) => {\n\t\t\tconst translatedParams = makeHandlesSerializable(params, this.serializer, this.handle);\n\n\t\t\tconst op: IMapValueTypeOperation = {\n\t\t\t\tkey,\n\t\t\t\ttype: \"act\",\n\t\t\t\tvalue: {\n\t\t\t\t\topName,\n\t\t\t\t\tvalue: translatedParams,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tthis.submitMessage(op, localOpMetadata);\n\n\t\t\tconst event: IValueChanged = { key, previousValue };\n\t\t\tthis.eventEmitter.emit(\"valueChanged\", event, true, null, this.eventEmitter);\n\t\t};\n\n\t\treturn { emit };\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"defaultMapInterfaces.d.ts","sourceRoot":"","sources":["../src/defaultMapInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAE3E;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;;;OAOG;IACH,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,eAAe,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAC1G;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC;IAC5B;;;;;;;OAOG;IAC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;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n /**\n * The key storing the value that changed.\n */\n key: string;\n\n /**\n * The value that was stored at the key prior to the change.\n */\n previousValue: any;\n}\n\n/**\n * Value types are given an IValueOpEmitter to emit their ops through the container type that holds them.\n * @internal\n */\nexport interface IValueOpEmitter {\n /**\n * Called by the value type to emit a value type operation through the container type holding it.\n * @param opName - Name of the emitted operation\n * @param previousValue - JSONable previous value as defined by the value type\n * @param params - JSONable params for the operation as defined by the value type\n * @param localOpMetadata - JSONable local metadata which should be submitted with the op\n * @internal\n */\n emit(opName: string, previousValue: any, params: any, localOpMetadata: IMapMessageLocalMetadata): void;\n}\n\n/**\n * @internal\n */\nexport interface IMapMessageLocalMetadata {\n localSeq: number;\n}\n\n/**\n * A value factory is used to serialize/deserialize value types to a map\n * @alpha\n */\nexport interface IValueFactory<T> {\n /**\n * Create a new value type. Used both in creation of new value types, as well as in loading existing ones\n * from remote.\n * @param emitter - Emitter object that the created value type will use to emit operations\n * @param raw - Initialization parameters as defined by the value type\n * @returns The new value type\n * @alpha\n */\n load(emitter: IValueOpEmitter, raw: any): T;\n\n /**\n * Given a value type, provides a JSONable form of its data to be used for snapshotting. This data must be\n * loadable using the load method of its factory.\n * @param value - The value type to serialize\n * @returns The JSONable form of the value type\n * @alpha\n */\n store(value: T): any;\n}\n\n/**\n * Defines an operation that a value type is able to handle.\n * @alpha\n */\nexport interface IValueOperation<T> {\n /**\n * Performs the actual processing on the incoming operation.\n * @param value - The current value stored at the given key, which should be the value type\n * @param params - The params on the incoming operation\n * @param local - Whether the operation originated from this client\n * @param message - The operation itself\n * @param localOpMetadata - any local metadata submitted by `IValueOpEmitter.emit`.\n * @alpha\n */\n process(\n value: T,\n params: any,\n local: boolean,\n message: ISequencedDocumentMessage | undefined,\n localOpMetadata: IMapMessageLocalMetadata | undefined\n );\n\n /**\n * Rebases an `op` on `value` from its original perspective (ref/local seq) to the current\n * perspective. Should be invoked on reconnection.\n * @param value - The current value stored at the given key, which should be the value type.\n * @param op - The op to be rebased.\n * @param localOpMetadata - Any local metadata that was originally submitted with the op.\n * @returns A rebased version of the op and any local metadata that should be submitted with it.\n */\n rebase(\n value: T,\n op: IValueTypeOperationValue,\n localOpMetadata: IMapMessageLocalMetadata\n ): { rebasedOp: IValueTypeOperationValue; rebasedLocalOpMetadata: IMapMessageLocalMetadata; };\n}\n\n/**\n * Defines a value type that can be registered on a container type.\n */\nexport interface IValueType<T> {\n /**\n * Name of the value type.\n * @alpha\n */\n name: string;\n\n /**\n * Factory method used to convert to/from a JSON form of the type.\n * @alpha\n */\n factory: IValueFactory<T>;\n\n /**\n * Operations that can be applied to the value type.\n * @alpha\n */\n ops: Map<string, IValueOperation<T>>;\n}\n\nexport interface ISharedDefaultMapEvents extends ISharedObjectEvents {\n (event: \"valueChanged\" | \"create\", listener: (\n changed: IValueChanged,\n local: boolean,\n target: IEventThisPlaceHolder) => void);\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * The DefaultMap impelmentation for sequence has been specialized to only support a single ValueType, which serializes\n * and deserializes via .store() and .load().\n */\nexport interface ISerializableValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * The JSONable representation of the value.\n */\n value: any;\n}\n\nexport interface ISerializedValue {\n /**\n * A type annotation to help indicate how the value serializes.\n */\n type: string;\n\n /**\n * String representation of the value.\n */\n value: string | undefined;\n}\n\n/**\n * ValueTypes handle ops slightly differently from SharedObjects or plain JS objects. Since the Map/Directory doesn't\n * know how to handle the ValueType's ops, those ops are instead passed along to the ValueType for processing.\n * IValueTypeOperationValue is that passed-along op. The opName on it is the ValueType-specific operation and the\n * value is whatever params the ValueType needs to complete that operation. Similar to ISerializableValue, it is\n * serializable via JSON.stringify/parse but differs in that it has no equivalency with an in-memory value - rather\n * it just describes an operation to be applied to an already-in-memory value.\n * @alpha\n */\nexport interface IValueTypeOperationValue {\n /**\n * The name of the operation.\n */\n opName: string;\n\n /**\n * The payload that is submitted along with the operation.\n */\n value: any;\n}\n"]}
1
+ {"version":3,"file":"defaultMapInterfaces.js","sourceRoot":"","sources":["../src/defaultMapInterfaces.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IEventThisPlaceHolder } from \"@fluidframework/common-definitions\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\tpreviousValue: any;\n}\n\n/**\n * Value types are given an IValueOpEmitter to emit their ops through the container type that holds them.\n * @internal\n */\nexport interface IValueOpEmitter {\n\t/**\n\t * Called by the value type to emit a value type operation through the container type holding it.\n\t * @param opName - Name of the emitted operation\n\t * @param previousValue - JSONable previous value as defined by the value type\n\t * @param params - JSONable params for the operation as defined by the value type\n\t * @param localOpMetadata - JSONable local metadata which should be submitted with the op\n\t * @internal\n\t */\n\temit(\n\t\topName: string,\n\t\tpreviousValue: any,\n\t\tparams: any,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport interface IMapMessageLocalMetadata {\n\tlocalSeq: number;\n}\n\n/**\n * A value factory is used to serialize/deserialize value types to a map\n * @alpha\n */\nexport interface IValueFactory<T> {\n\t/**\n\t * Create a new value type. Used both in creation of new value types, as well as in loading existing ones\n\t * from remote.\n\t * @param emitter - Emitter object that the created value type will use to emit operations\n\t * @param raw - Initialization parameters as defined by the value type\n\t * @returns The new value type\n\t * @alpha\n\t */\n\tload(emitter: IValueOpEmitter, raw: any): T;\n\n\t/**\n\t * Given a value type, provides a JSONable form of its data to be used for snapshotting. This data must be\n\t * loadable using the load method of its factory.\n\t * @param value - The value type to serialize\n\t * @returns The JSONable form of the value type\n\t * @alpha\n\t */\n\tstore(value: T): any;\n}\n\n/**\n * Defines an operation that a value type is able to handle.\n * @alpha\n */\nexport interface IValueOperation<T> {\n\t/**\n\t * Performs the actual processing on the incoming operation.\n\t * @param value - The current value stored at the given key, which should be the value type\n\t * @param params - The params on the incoming operation\n\t * @param local - Whether the operation originated from this client\n\t * @param message - The operation itself\n\t * @param localOpMetadata - any local metadata submitted by `IValueOpEmitter.emit`.\n\t * @alpha\n\t */\n\tprocess(\n\t\tvalue: T,\n\t\tparams: any,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata | undefined,\n\t);\n\n\t/**\n\t * Rebases an `op` on `value` from its original perspective (ref/local seq) to the current\n\t * perspective. Should be invoked on reconnection.\n\t * @param value - The current value stored at the given key, which should be the value type.\n\t * @param op - The op to be rebased.\n\t * @param localOpMetadata - Any local metadata that was originally submitted with the op.\n\t * @returns A rebased version of the op and any local metadata that should be submitted with it.\n\t */\n\trebase(\n\t\tvalue: T,\n\t\top: IValueTypeOperationValue,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): { rebasedOp: IValueTypeOperationValue; rebasedLocalOpMetadata: IMapMessageLocalMetadata };\n}\n\n/**\n * Defines a value type that can be registered on a container type.\n */\nexport interface IValueType<T> {\n\t/**\n\t * Name of the value type.\n\t * @alpha\n\t */\n\tname: string;\n\n\t/**\n\t * Factory method used to convert to/from a JSON form of the type.\n\t * @alpha\n\t */\n\tfactory: IValueFactory<T>;\n\n\t/**\n\t * Operations that can be applied to the value type.\n\t * @alpha\n\t */\n\tops: Map<string, IValueOperation<T>>;\n}\n\nexport interface ISharedDefaultMapEvents extends ISharedObjectEvents {\n\t(\n\t\tevent: \"valueChanged\" | \"create\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t);\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * The DefaultMap impelmentation for sequence has been specialized to only support a single ValueType, which serializes\n * and deserializes via .store() and .load().\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\tvalue: any;\n}\n\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t */\n\tvalue: string | undefined;\n}\n\n/**\n * ValueTypes handle ops slightly differently from SharedObjects or plain JS objects. Since the Map/Directory doesn't\n * know how to handle the ValueType's ops, those ops are instead passed along to the ValueType for processing.\n * IValueTypeOperationValue is that passed-along op. The opName on it is the ValueType-specific operation and the\n * value is whatever params the ValueType needs to complete that operation. Similar to ISerializableValue, it is\n * serializable via JSON.stringify/parse but differs in that it has no equivalency with an in-memory value - rather\n * it just describes an operation to be applied to an already-in-memory value.\n * @alpha\n */\nexport interface IValueTypeOperationValue {\n\t/**\n\t * The name of the operation.\n\t */\n\topName: string;\n\n\t/**\n\t * The payload that is submitted along with the operation.\n\t */\n\tvalue: any;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -18,9 +18,9 @@ export { IMapMessageLocalMetadata, IValueOpEmitter } from "./defaultMapInterface
18
18
  export { DeserializeCallback, IIntervalCollectionEvent, IIntervalHelpers, Interval, IntervalCollection, IntervalCollectionIterator, IntervalLocator, intervalLocatorFromEndpoint, IntervalType, ISerializableInterval, ISerializedInterval, SequenceInterval, ISerializedIntervalCollectionV2, CompressedSerializedInterval, SerializedIntervalDelta, } from "./intervalCollection";
19
19
  export { IInterval, IntervalConflictResolver } from "./intervalTree";
20
20
  export { ISharedSegmentSequenceEvents, SharedSegmentSequence } from "./sequence";
21
- export { ISequenceDeltaRange, SequenceDeltaEvent, SequenceEvent, SequenceMaintenanceEvent } from "./sequenceDeltaEvent";
21
+ export { ISequenceDeltaRange, SequenceDeltaEvent, SequenceEvent, SequenceMaintenanceEvent, } from "./sequenceDeltaEvent";
22
22
  export { SharedStringFactory } from "./sequenceFactory";
23
- export { getTextAndMarkers, ISharedString, SharedString, SharedStringSegment } from "./sharedString";
23
+ export { getTextAndMarkers, ISharedString, SharedString, SharedStringSegment, } from "./sharedString";
24
24
  export { ISharedIntervalCollection, SharedIntervalCollection, SharedIntervalCollectionFactory, } from "./sharedIntervalCollection";
25
25
  export { IJSONRunSegment, SharedSequence, SubSequence } from "./sharedSequence";
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EACH,mBAAmB,EACnB,wBAAwB,EACxB,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EACl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YAAY,CAAC;AACjF,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EACN,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,mBAAmB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,yBAAyB,EACzB,wBAAwB,EACxB,+BAA+B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH,2DAgB8B;AAZ1B,8GAAA,QAAQ,OAAA;AACR,wHAAA,kBAAkB,OAAA;AAClB,gIAAA,0BAA0B,OAAA;AAE1B,iIAAA,2BAA2B,OAAA;AAC3B,kHAAA,YAAY,OAAA;AAGZ,sHAAA,gBAAgB,OAAA;AAMpB,uCAAiF;AAA1C,iHAAA,qBAAqB,OAAA;AAC5D,2DAAwH;AAA1F,wHAAA,kBAAkB,OAAA;AAAE,mHAAA,aAAa,OAAA;AAAE,8HAAA,wBAAwB,OAAA;AACzF,qDAAwD;AAA/C,sHAAA,mBAAmB,OAAA;AAC5B,+CAAqG;AAA5F,iHAAA,iBAAiB,OAAA;AAAiB,4GAAA,YAAY,OAAA;AACvD,uEAIoC;AAFnC,oIAAA,wBAAwB,OAAA;AACxB,2IAAA,+BAA+B,OAAA;AAEhC,mDAAgF;AAAtD,gHAAA,cAAc,OAAA;AAAE,6GAAA,WAAW,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Supports distributed data structures which are list-like.\n *\n * This library's main export is {@link SharedString}, a DDS for storing and simultaneously editing a sequence of\n * text.\n *\n * See the package's README for a high-level introduction to `SharedString`'s feature set.\n * @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for\n * working with text.\n *\n * @packageDocumentation\n */\nexport { IMapMessageLocalMetadata, IValueOpEmitter } from \"./defaultMapInterfaces\";\nexport {\n DeserializeCallback,\n IIntervalCollectionEvent,\n IIntervalHelpers,\n Interval,\n IntervalCollection,\n IntervalCollectionIterator,\n IntervalLocator,\n intervalLocatorFromEndpoint,\n IntervalType,\n ISerializableInterval,\n ISerializedInterval,\n SequenceInterval,\n ISerializedIntervalCollectionV2,\n CompressedSerializedInterval,\n SerializedIntervalDelta,\n} from \"./intervalCollection\";\nexport { IInterval, IntervalConflictResolver } from \"./intervalTree\";\nexport { ISharedSegmentSequenceEvents, SharedSegmentSequence } from \"./sequence\";\nexport { ISequenceDeltaRange, SequenceDeltaEvent, SequenceEvent, SequenceMaintenanceEvent } from \"./sequenceDeltaEvent\";\nexport { SharedStringFactory } from \"./sequenceFactory\";\nexport { getTextAndMarkers, ISharedString, SharedString, SharedStringSegment } from \"./sharedString\";\nexport {\n\tISharedIntervalCollection,\n\tSharedIntervalCollection,\n\tSharedIntervalCollectionFactory,\n} from \"./sharedIntervalCollection\";\nexport { IJSONRunSegment, SharedSequence, SubSequence } from \"./sharedSequence\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH,2DAgB8B;AAZ7B,8GAAA,QAAQ,OAAA;AACR,wHAAA,kBAAkB,OAAA;AAClB,gIAAA,0BAA0B,OAAA;AAE1B,iIAAA,2BAA2B,OAAA;AAC3B,kHAAA,YAAY,OAAA;AAGZ,sHAAA,gBAAgB,OAAA;AAMjB,uCAAiF;AAA1C,iHAAA,qBAAqB,OAAA;AAC5D,2DAK8B;AAH7B,wHAAA,kBAAkB,OAAA;AAClB,mHAAA,aAAa,OAAA;AACb,8HAAA,wBAAwB,OAAA;AAEzB,qDAAwD;AAA/C,sHAAA,mBAAmB,OAAA;AAC5B,+CAKwB;AAJvB,iHAAA,iBAAiB,OAAA;AAEjB,4GAAA,YAAY,OAAA;AAGb,uEAIoC;AAFnC,oIAAA,wBAAwB,OAAA;AACxB,2IAAA,+BAA+B,OAAA;AAEhC,mDAAgF;AAAtD,gHAAA,cAAc,OAAA;AAAE,6GAAA,WAAW,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Supports distributed data structures which are list-like.\n *\n * This library's main export is {@link SharedString}, a DDS for storing and simultaneously editing a sequence of\n * text.\n *\n * See the package's README for a high-level introduction to `SharedString`'s feature set.\n * @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for\n * working with text.\n *\n * @packageDocumentation\n */\nexport { IMapMessageLocalMetadata, IValueOpEmitter } from \"./defaultMapInterfaces\";\nexport {\n\tDeserializeCallback,\n\tIIntervalCollectionEvent,\n\tIIntervalHelpers,\n\tInterval,\n\tIntervalCollection,\n\tIntervalCollectionIterator,\n\tIntervalLocator,\n\tintervalLocatorFromEndpoint,\n\tIntervalType,\n\tISerializableInterval,\n\tISerializedInterval,\n\tSequenceInterval,\n\tISerializedIntervalCollectionV2,\n\tCompressedSerializedInterval,\n\tSerializedIntervalDelta,\n} from \"./intervalCollection\";\nexport { IInterval, IntervalConflictResolver } from \"./intervalTree\";\nexport { ISharedSegmentSequenceEvents, SharedSegmentSequence } from \"./sequence\";\nexport {\n\tISequenceDeltaRange,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceMaintenanceEvent,\n} from \"./sequenceDeltaEvent\";\nexport { SharedStringFactory } from \"./sequenceFactory\";\nexport {\n\tgetTextAndMarkers,\n\tISharedString,\n\tSharedString,\n\tSharedStringSegment,\n} from \"./sharedString\";\nexport {\n\tISharedIntervalCollection,\n\tSharedIntervalCollection,\n\tSharedIntervalCollectionFactory,\n} from \"./sharedIntervalCollection\";\nexport { IJSONRunSegment, SharedSequence, SubSequence } from \"./sharedSequence\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"intervalCollection.d.ts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAU,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAEH,MAAM,EAIN,YAAY,EAIZ,iBAAiB,EACjB,WAAW,EAEX,sBAAsB,EAQzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,OAAO,EACH,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,eAAe,EACf,UAAU,EAEb,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,wBAAwB,EAA8B,MAAM,gBAAgB,CAAC;AAIjG,oBAAY,YAAY;IACpB,MAAM,IAAM;IACZ,IAAI,IAAM;IAEV;;;;;OAKG;IACH,aAAa,IAAM;IAEnB;;;OAGG;IACH,SAAS,IAAM;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;;OAMG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,GAAG,EAAE,MAAM,CAAC;IACZ,8BAA8B;IAC9B,YAAY,EAAE,YAAY,CAAC;IAC3B,sCAAsC;IACtC,UAAU,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED;;;;GAIG;AACH,oBAAY,uBAAuB,GAC/B,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,KAAK,GAAG,YAAY,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,KAAK,GAAG,YAAY,CAAC,CAAC,CAAC;AAEzE;;;;;;;GAOG;AACH,oBAAY,4BAA4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AC1C,iBAAiB,EAAE,sBAAsB,GACvC,eAAe,GAAG,SAAS,CAM7B"}
@@ -177,8 +177,7 @@ class Interval {
177
177
  * {@inheritDoc IInterval.overlaps}
178
178
  */
179
179
  overlaps(b) {
180
- const result = (this.start <= b.end) &&
181
- (this.end >= b.start);
180
+ const result = this.start <= b.end && this.end >= b.start;
182
181
  return result;
183
182
  }
184
183
  /**
@@ -265,8 +264,8 @@ class SequenceInterval {
265
264
  beforePositionChange,
266
265
  afterPositionChange,
267
266
  };
268
- const startCbs = (_a = (_c = this.start).callbacks) !== null && _a !== void 0 ? _a : (_c.callbacks = {});
269
- const endCbs = (_b = (_d = this.end).callbacks) !== null && _b !== void 0 ? _b : (_d.callbacks = {});
267
+ const startCbs = ((_a = (_c = this.start).callbacks) !== null && _a !== void 0 ? _a : (_c.callbacks = {}));
268
+ const endCbs = ((_b = (_d = this.end).callbacks) !== null && _b !== void 0 ? _b : (_d.callbacks = {}));
270
269
  startCbs.beforeSlide = endCbs.beforeSlide = beforePositionChange;
271
270
  startCbs.afterSlide = endCbs.afterSlide = afterPositionChange;
272
271
  }
@@ -348,8 +347,8 @@ class SequenceInterval {
348
347
  * {@inheritDoc IInterval.overlaps}
349
348
  */
350
349
  overlaps(b) {
351
- const result = ((0, merge_tree_1.compareReferencePositions)(this.start, b.end) <= 0) &&
352
- ((0, merge_tree_1.compareReferencePositions)(this.end, b.start) >= 0);
350
+ const result = (0, merge_tree_1.compareReferencePositions)(this.start, b.end) <= 0 &&
351
+ (0, merge_tree_1.compareReferencePositions)(this.end, b.start) >= 0;
353
352
  return result;
354
353
  }
355
354
  /**
@@ -383,7 +382,7 @@ class SequenceInterval {
383
382
  overlapsPos(bstart, bend) {
384
383
  const startPos = this.client.localReferencePositionToPosition(this.start);
385
384
  const endPos = this.client.localReferencePositionToPosition(this.end);
386
- return (endPos > bstart) && (startPos < bend);
385
+ return endPos > bstart && startPos < bend;
387
386
  }
388
387
  /**
389
388
  * {@inheritDoc IInterval.modify}
@@ -447,7 +446,10 @@ function createPositionReference(client, pos, refType, op, fromSnapshot, localSe
447
446
  let segoff;
448
447
  if (op) {
449
448
  (0, common_utils_1.assert)((refType & merge_tree_1.ReferenceType.SlideOnRemove) !== 0, 0x2f5 /* op create references must be SlideOnRemove */);
450
- segoff = client.getContainingSegment(pos, { referenceSequenceNumber: op.referenceSequenceNumber, clientId: op.clientId });
449
+ segoff = client.getContainingSegment(pos, {
450
+ referenceSequenceNumber: op.referenceSequenceNumber,
451
+ clientId: op.clientId,
452
+ });
451
453
  segoff = client.getSlideToSegment(segoff);
452
454
  }
453
455
  else {
@@ -526,14 +528,13 @@ class LocalIntervalCollection {
526
528
  }
527
529
  addConflictResolver(conflictResolver) {
528
530
  this.conflictResolver = conflictResolver;
529
- this.endConflictResolver =
530
- (key, currentKey) => {
531
- const ival = conflictResolver(key, currentKey);
532
- return {
533
- data: ival,
534
- key: ival,
535
- };
531
+ this.endConflictResolver = (key, currentKey) => {
532
+ const ival = conflictResolver(key, currentKey);
533
+ return {
534
+ data: ival,
535
+ key: ival,
536
536
  };
537
+ };
537
538
  }
538
539
  map(fn) {
539
540
  this.intervalTree.map(fn);
@@ -613,11 +614,11 @@ class LocalIntervalCollection {
613
614
  else {
614
615
  // Start and (possibly) end provided. Walk the subtrees that may contain
615
616
  // this start position.
616
- const compareFn = end === undefined ?
617
- (node) => {
617
+ const compareFn = end === undefined
618
+ ? (node) => {
618
619
  return transientInterval.compareStart(node.key);
619
- } :
620
- (node) => {
620
+ }
621
+ : (node) => {
621
622
  return transientInterval.compare(node.key);
622
623
  };
623
624
  const continueLeftFn = (cmpResult) => cmpResult <= 0;
@@ -855,7 +856,8 @@ function makeOpsMap() {
855
856
  const rebasedOp = Object.assign(Object.assign({}, op), { value: rebasedValue });
856
857
  return { rebasedOp, rebasedLocalOpMetadata: localOpMetadata };
857
858
  };
858
- return new Map([[
859
+ return new Map([
860
+ [
859
861
  "add",
860
862
  {
861
863
  process: (collection, params, local, op, localOpMetadata) => {
@@ -897,7 +899,8 @@ function makeOpsMap() {
897
899
  },
898
900
  rebase,
899
901
  },
900
- ]]);
902
+ ],
903
+ ]);
901
904
  }
902
905
  exports.makeOpsMap = makeOpsMap;
903
906
  class IntervalCollectionIterator {
@@ -951,7 +954,10 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
951
954
  throw new telemetry_utils_1.LoggingError("mergeTree client must exist");
952
955
  }
953
956
  const { clientId } = this.client.getCollabWindow();
954
- const { segment, offset } = this.client.getContainingSegment(pos, { referenceSequenceNumber: seqNumberFrom, clientId: this.client.getLongClientId(clientId) }, localSeq);
957
+ const { segment, offset } = this.client.getContainingSegment(pos, {
958
+ referenceSequenceNumber: seqNumberFrom,
959
+ clientId: this.client.getLongClientId(clientId),
960
+ }, localSeq);
955
961
  // if segment is undefined, it slid off the string
956
962
  (0, common_utils_1.assert)(segment !== undefined, 0x54e /* No segment found */);
957
963
  const segoff = (_a = this.client.getSlideToSegment({ segment, offset })) !== null && _a !== void 0 ? _a : segment;
@@ -981,7 +987,7 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
981
987
  if (this.attached) {
982
988
  throw new telemetry_utils_1.LoggingError("Only supports one Sequence attach");
983
989
  }
984
- if ((client === undefined) && (this.requiresClient)) {
990
+ if (client === undefined && this.requiresClient) {
985
991
  throw new telemetry_utils_1.LoggingError("Client required for this collection");
986
992
  }
987
993
  // Instantiate the local interval collection based on the saved intervals
@@ -1087,7 +1093,9 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1087
1093
  if (interval) {
1088
1094
  // Local ops get submitted to the server. Remote ops have the deserializer run.
1089
1095
  if (local) {
1090
- this.emitter.emit("delete", undefined, interval.serialize(), { localSeq: this.getNextLocalSeq() });
1096
+ this.emitter.emit("delete", undefined, interval.serialize(), {
1097
+ localSeq: this.getNextLocalSeq(),
1098
+ });
1091
1099
  }
1092
1100
  else {
1093
1101
  if (this.onDeserialize) {
@@ -1122,7 +1130,7 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1122
1130
  if (!this.attached) {
1123
1131
  throw new telemetry_utils_1.LoggingError("Attach must be called before accessing intervals");
1124
1132
  }
1125
- if (typeof (id) !== "string") {
1133
+ if (typeof id !== "string") {
1126
1134
  throw new telemetry_utils_1.LoggingError("Change API requires an ID that is a string");
1127
1135
  }
1128
1136
  if (!props) {
@@ -1157,7 +1165,7 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1157
1165
  throw new telemetry_utils_1.LoggingError("Attach must be called before accessing intervals");
1158
1166
  }
1159
1167
  // Force id to be a string.
1160
- if (typeof (id) !== "string") {
1168
+ if (typeof id !== "string") {
1161
1169
  throw new telemetry_utils_1.LoggingError("Change API requires an ID that is a string");
1162
1170
  }
1163
1171
  const interval = this.getIntervalById(id);
@@ -1170,10 +1178,9 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1170
1178
  serializedInterval.start = start;
1171
1179
  serializedInterval.end = end;
1172
1180
  // Emit a property bag containing only the ID, as we don't intend for this op to change any properties.
1173
- serializedInterval.properties =
1174
- {
1175
- [reservedIntervalIdKey]: interval.getIntervalId(),
1176
- };
1181
+ serializedInterval.properties = {
1182
+ [reservedIntervalIdKey]: interval.getIntervalId(),
1183
+ };
1177
1184
  const localSeq = this.getNextLocalSeq();
1178
1185
  this.localSeqToSerializedInterval.set(localSeq, serializedInterval);
1179
1186
  this.emitter.emit("change", undefined, serializedInterval, { localSeq });
@@ -1278,7 +1285,8 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1278
1285
  if (start !== undefined || end !== undefined) {
1279
1286
  // If changeInterval gives us a new interval, work with that one. Otherwise keep working with
1280
1287
  // the one we originally found in the tree.
1281
- newInterval = (_d = this.localCollection.changeInterval(interval, start, end, op)) !== null && _d !== void 0 ? _d : interval;
1288
+ newInterval =
1289
+ (_d = this.localCollection.changeInterval(interval, start, end, op)) !== null && _d !== void 0 ? _d : interval;
1282
1290
  }
1283
1291
  const deltaProps = newInterval.addProperties(newProps, true, op.sequenceNumber);
1284
1292
  if (this.onDeserialize) {
@@ -1339,12 +1347,14 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1339
1347
  sequenceNumber: (_d = (_c = this.client) === null || _c === void 0 ? void 0 : _c.getCurrentSeq()) !== null && _d !== void 0 ? _d : 0,
1340
1348
  properties,
1341
1349
  };
1342
- if (opName === "change" && (this.hasPendingChangeStart(intervalId) || this.hasPendingChangeEnd(intervalId))) {
1350
+ if (opName === "change" &&
1351
+ (this.hasPendingChangeStart(intervalId) || this.hasPendingChangeEnd(intervalId))) {
1343
1352
  this.removePendingChange(serializedInterval);
1344
1353
  this.addPendingChange(intervalId, rebased);
1345
1354
  }
1346
1355
  // if the interval slid off the string, rebase the op to be a noop and delete the interval.
1347
- if (startRebased === merge_tree_1.DetachedReferencePosition || endRebased === merge_tree_1.DetachedReferencePosition) {
1356
+ if (startRebased === merge_tree_1.DetachedReferencePosition ||
1357
+ endRebased === merge_tree_1.DetachedReferencePosition) {
1348
1358
  if (localInterval) {
1349
1359
  (_e = this.localCollection) === null || _e === void 0 ? void 0 : _e.removeExistingInterval(localInterval);
1350
1360
  }
@@ -1369,7 +1379,9 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
1369
1379
  return undefined;
1370
1380
  }
1371
1381
  const newSegoff = this.client.getSlideToSegment(segoff);
1372
- const value = (segoff.segment === newSegoff.segment && segoff.offset === newSegoff.offset) ? undefined : newSegoff;
1382
+ const value = segoff.segment === newSegoff.segment && segoff.offset === newSegoff.offset
1383
+ ? undefined
1384
+ : newSegoff;
1373
1385
  return value;
1374
1386
  }
1375
1387
  setSlideOnRemove(lref) {
@@ -1584,8 +1596,10 @@ exports.IntervalCollection = IntervalCollection;
1584
1596
  */
1585
1597
  function intervalLocatorFromEndpoint(potentialEndpoint) {
1586
1598
  var _a;
1587
- const { interval, [merge_tree_1.reservedRangeLabelsKey]: collectionNameArray, } = (_a = potentialEndpoint.properties) !== null && _a !== void 0 ? _a : {};
1588
- return (interval && (collectionNameArray === null || collectionNameArray === void 0 ? void 0 : collectionNameArray.length) === 1) ? { label: collectionNameArray[0], interval } : undefined;
1599
+ const { interval, [merge_tree_1.reservedRangeLabelsKey]: collectionNameArray } = (_a = potentialEndpoint.properties) !== null && _a !== void 0 ? _a : {};
1600
+ return interval && (collectionNameArray === null || collectionNameArray === void 0 ? void 0 : collectionNameArray.length) === 1
1601
+ ? { label: collectionNameArray[0], interval }
1602
+ : undefined;
1589
1603
  }
1590
1604
  exports.intervalLocatorFromEndpoint = intervalLocatorFromEndpoint;
1591
1605
  //# sourceMappingURL=intervalCollection.js.map