@fluidframework/sequence 2.0.0-dev-rc.2.0.0.246488 → 2.0.0-dev-rc.3.0.0.250606

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 (182) hide show
  1. package/README.md +1 -1
  2. package/dist/IntervalCollectionValues.d.ts +2 -2
  3. package/dist/IntervalCollectionValues.d.ts.map +1 -1
  4. package/dist/IntervalCollectionValues.js.map +1 -1
  5. package/dist/intervalCollection.d.ts +3 -3
  6. package/dist/intervalCollection.d.ts.map +1 -1
  7. package/dist/intervalCollection.js +31 -31
  8. package/dist/intervalCollection.js.map +1 -1
  9. package/dist/intervalCollectionMap.d.ts +3 -3
  10. package/dist/intervalCollectionMap.d.ts.map +1 -1
  11. package/dist/intervalCollectionMap.js +1 -1
  12. package/dist/intervalCollectionMap.js.map +1 -1
  13. package/dist/intervalCollectionMapInterfaces.d.ts +2 -2
  14. package/dist/intervalCollectionMapInterfaces.d.ts.map +1 -1
  15. package/dist/intervalCollectionMapInterfaces.js.map +1 -1
  16. package/dist/intervalIndex/idIntervalIndex.d.ts.map +1 -1
  17. package/dist/intervalIndex/idIntervalIndex.js.map +1 -1
  18. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +2 -2
  19. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -1
  20. package/dist/intervalIndex/overlappingIntervalsIndex.js +2 -2
  21. package/dist/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  22. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -1
  23. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  24. package/dist/intervalTree.d.ts +1 -1
  25. package/dist/intervalTree.d.ts.map +1 -1
  26. package/dist/intervalTree.js.map +1 -1
  27. package/dist/intervals/interval.d.ts.map +1 -1
  28. package/dist/intervals/interval.js +1 -1
  29. package/dist/intervals/interval.js.map +1 -1
  30. package/dist/intervals/sequenceInterval.d.ts.map +1 -1
  31. package/dist/intervals/sequenceInterval.js +1 -1
  32. package/dist/intervals/sequenceInterval.js.map +1 -1
  33. package/dist/packageVersion.d.ts +1 -1
  34. package/dist/packageVersion.js +1 -1
  35. package/dist/packageVersion.js.map +1 -1
  36. package/dist/revertibles.d.ts +1 -1
  37. package/dist/revertibles.d.ts.map +1 -1
  38. package/dist/revertibles.js.map +1 -1
  39. package/dist/sequence.d.ts +5 -5
  40. package/dist/sequence.d.ts.map +1 -1
  41. package/dist/sequence.js +5 -5
  42. package/dist/sequence.js.map +1 -1
  43. package/dist/sequenceFactory.d.ts +1 -1
  44. package/dist/sequenceFactory.d.ts.map +1 -1
  45. package/dist/sequenceFactory.js.map +1 -1
  46. package/dist/sharedIntervalCollection.d.ts +2 -2
  47. package/dist/sharedIntervalCollection.d.ts.map +1 -1
  48. package/dist/sharedIntervalCollection.js.map +1 -1
  49. package/dist/sharedSequence.d.ts +1 -1
  50. package/dist/sharedSequence.d.ts.map +1 -1
  51. package/dist/sharedSequence.js.map +1 -1
  52. package/dist/sharedString.d.ts +1 -1
  53. package/dist/sharedString.d.ts.map +1 -1
  54. package/dist/sharedString.js.map +1 -1
  55. package/lib/IntervalCollectionValues.d.ts +2 -2
  56. package/lib/IntervalCollectionValues.d.ts.map +1 -1
  57. package/lib/IntervalCollectionValues.js.map +1 -1
  58. package/lib/intervalCollection.d.ts +3 -3
  59. package/lib/intervalCollection.d.ts.map +1 -1
  60. package/lib/intervalCollection.js +2 -2
  61. package/lib/intervalCollection.js.map +1 -1
  62. package/lib/intervalCollectionMap.d.ts +3 -3
  63. package/lib/intervalCollectionMap.d.ts.map +1 -1
  64. package/lib/intervalCollectionMap.js +3 -3
  65. package/lib/intervalCollectionMap.js.map +1 -1
  66. package/lib/intervalCollectionMapInterfaces.d.ts +2 -2
  67. package/lib/intervalCollectionMapInterfaces.d.ts.map +1 -1
  68. package/lib/intervalCollectionMapInterfaces.js.map +1 -1
  69. package/lib/intervalIndex/idIntervalIndex.d.ts.map +1 -1
  70. package/lib/intervalIndex/idIntervalIndex.js.map +1 -1
  71. package/lib/intervalIndex/overlappingIntervalsIndex.d.ts +2 -2
  72. package/lib/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -1
  73. package/lib/intervalIndex/overlappingIntervalsIndex.js +2 -2
  74. package/lib/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  75. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -1
  76. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js +1 -1
  77. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  78. package/lib/intervalTree.d.ts +1 -1
  79. package/lib/intervalTree.d.ts.map +1 -1
  80. package/lib/intervalTree.js.map +1 -1
  81. package/lib/intervals/interval.d.ts.map +1 -1
  82. package/lib/intervals/interval.js +1 -1
  83. package/lib/intervals/interval.js.map +1 -1
  84. package/lib/intervals/sequenceInterval.d.ts.map +1 -1
  85. package/lib/intervals/sequenceInterval.js +1 -1
  86. package/lib/intervals/sequenceInterval.js.map +1 -1
  87. package/lib/packageVersion.d.ts +1 -1
  88. package/lib/packageVersion.js +1 -1
  89. package/lib/packageVersion.js.map +1 -1
  90. package/lib/revertibles.d.ts +1 -1
  91. package/lib/revertibles.d.ts.map +1 -1
  92. package/lib/revertibles.js +2 -2
  93. package/lib/revertibles.js.map +1 -1
  94. package/lib/sequence.d.ts +5 -5
  95. package/lib/sequence.d.ts.map +1 -1
  96. package/lib/sequence.js +7 -7
  97. package/lib/sequence.js.map +1 -1
  98. package/lib/sequenceFactory.d.ts +1 -1
  99. package/lib/sequenceFactory.d.ts.map +1 -1
  100. package/lib/sequenceFactory.js.map +1 -1
  101. package/lib/sharedIntervalCollection.d.ts +2 -2
  102. package/lib/sharedIntervalCollection.d.ts.map +1 -1
  103. package/lib/sharedIntervalCollection.js +1 -1
  104. package/lib/sharedIntervalCollection.js.map +1 -1
  105. package/lib/sharedSequence.d.ts +1 -1
  106. package/lib/sharedSequence.d.ts.map +1 -1
  107. package/lib/sharedSequence.js.map +1 -1
  108. package/lib/sharedString.d.ts +1 -1
  109. package/lib/sharedString.d.ts.map +1 -1
  110. package/lib/sharedString.js +1 -1
  111. package/lib/sharedString.js.map +1 -1
  112. package/lib/test/createSnapshotFiles.js +1 -1
  113. package/lib/test/createSnapshotFiles.js.map +1 -1
  114. package/lib/test/fuzz/fuzzUtils.js +3 -3
  115. package/lib/test/fuzz/fuzzUtils.js.map +1 -1
  116. package/lib/test/fuzz/intervalCollection.fuzz.spec.js +1 -1
  117. package/lib/test/fuzz/intervalCollection.fuzz.spec.js.map +1 -1
  118. package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js +2 -2
  119. package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js.map +1 -1
  120. package/lib/test/fuzz/sharedString.fuzz.spec.js +1 -1
  121. package/lib/test/fuzz/sharedString.fuzz.spec.js.map +1 -1
  122. package/lib/test/generateSharedStrings.js +2 -2
  123. package/lib/test/generateSharedStrings.js.map +1 -1
  124. package/lib/test/intervalCollection.detached.spec.js.map +1 -1
  125. package/lib/test/intervalCollection.events.spec.js +4 -4
  126. package/lib/test/intervalCollection.events.spec.js.map +1 -1
  127. package/lib/test/intervalCollection.perf.spec.js +1 -1
  128. package/lib/test/intervalCollection.perf.spec.js.map +1 -1
  129. package/lib/test/intervalCollection.snapshot.spec.js +5 -5
  130. package/lib/test/intervalCollection.snapshot.spec.js.map +1 -1
  131. package/lib/test/intervalCollection.spec.js +4 -4
  132. package/lib/test/intervalCollection.spec.js.map +1 -1
  133. package/lib/test/intervalIndexTestUtils.js.map +1 -1
  134. package/lib/test/intervalRebasing.spec.js +3 -3
  135. package/lib/test/intervalRebasing.spec.js.map +1 -1
  136. package/lib/test/intervalStashedOps.spec.js +3 -3
  137. package/lib/test/intervalStashedOps.spec.js.map +1 -1
  138. package/lib/test/intervalTestUtils.js.map +1 -1
  139. package/lib/test/memory/sharedSequence.spec.js.map +1 -1
  140. package/lib/test/memory/sharedString.spec.js +2 -2
  141. package/lib/test/memory/sharedString.spec.js.map +1 -1
  142. package/lib/test/overlappingSequenceIntervalsIndex.spec.js +4 -4
  143. package/lib/test/overlappingSequenceIntervalsIndex.spec.js.map +1 -1
  144. package/lib/test/partialLoad.spec.js +2 -2
  145. package/lib/test/partialLoad.spec.js.map +1 -1
  146. package/lib/test/rebasing.spec.js +3 -3
  147. package/lib/test/rebasing.spec.js.map +1 -1
  148. package/lib/test/reentrancy.spec.js +3 -3
  149. package/lib/test/reentrancy.spec.js.map +1 -1
  150. package/lib/test/revertibles.spec.js +4 -4
  151. package/lib/test/revertibles.spec.js.map +1 -1
  152. package/lib/test/sequenceDeltaEvent.spec.js +1 -1
  153. package/lib/test/sequenceDeltaEvent.spec.js.map +1 -1
  154. package/lib/test/sharedIntervalCollection.spec.js +2 -2
  155. package/lib/test/sharedIntervalCollection.spec.js.map +1 -1
  156. package/lib/test/sharedString.spec.js +3 -3
  157. package/lib/test/sharedString.spec.js.map +1 -1
  158. package/lib/test/snapshotEmptyProps.spec.js +2 -2
  159. package/lib/test/snapshotEmptyProps.spec.js.map +1 -1
  160. package/lib/test/snapshotVersion.spec.js +2 -2
  161. package/lib/test/snapshotVersion.spec.js.map +1 -1
  162. package/lib/test/subSequence.spec.js.map +1 -1
  163. package/lib/test/v1IntervalCollectionHelpers.js +1 -1
  164. package/lib/test/v1IntervalCollectionHelpers.js.map +1 -1
  165. package/package.json +23 -20
  166. package/src/IntervalCollectionValues.ts +4 -4
  167. package/src/intervalCollection.ts +24 -24
  168. package/src/intervalCollectionMap.ts +15 -15
  169. package/src/intervalCollectionMapInterfaces.ts +4 -4
  170. package/src/intervalIndex/idIntervalIndex.ts +1 -1
  171. package/src/intervalIndex/overlappingIntervalsIndex.ts +4 -4
  172. package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +2 -2
  173. package/src/intervalTree.ts +2 -2
  174. package/src/intervals/interval.ts +1 -1
  175. package/src/intervals/sequenceInterval.ts +1 -1
  176. package/src/packageVersion.ts +1 -1
  177. package/src/revertibles.ts +7 -7
  178. package/src/sequence.ts +19 -19
  179. package/src/sequenceFactory.ts +2 -2
  180. package/src/sharedIntervalCollection.ts +7 -7
  181. package/src/sharedSequence.ts +1 -1
  182. package/src/sharedString.ts +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"v1IntervalCollectionHelpers.js","sourceRoot":"","sources":["../../src/test/v1IntervalCollectionHelpers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAOpE,OAAO,EACN,kBAAkB,EAElB,UAAU,GAEV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAKN,sBAAsB,GAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AASlD,MAAM,OAAO,oBAEX,SAAQ,kBAAoC;IAF9C;;QAGC,WAAM,GAAG,IAAgE,CAAC;IAC3E,CAAC;CAAA;AAED,MAAM,mCAAmC;IACjC,IAAI,CACV,OAAwB,EACxB,MAA+D,EAAE;QAEjE,MAAM,OAAO,GAAuC;YACnD,MAAM,EAAE,sBAAsB;SAC9B,CAAC;QACF,OAAO,IAAI,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IAClE,CAAC;IACM,KAAK,CACX,KAA6C;QAE7C,OAAO,KAAK,CAAC,IAAI,CAChB,KAAK,EACL,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,CACW,CAAC;IACjD,CAAC;CACD;AAED,MAAM,OAAO,qCAAqC;IAKjD,IAAW,IAAI;QACd,OAAO,qCAAqC,CAAC,IAAI,CAAC;IACnD,CAAC;IAED,IAAW,OAAO;QACjB,OAAO,qCAAqC,CAAC,QAAQ,CAAC;IACvD,CAAC;IAED,IAAW,GAAG;QACb,OAAO,qCAAqC,CAAC,IAAI,CAAC;IACnD,CAAC;;AAZa,0CAAI,GAAG,gCAAgC,CAAC;AAc9B,8CAAQ,GAC/B,IAAI,mCAAmC,EAAE,CAAC;AAEnB,0CAAI,GAAG,UAAU,EAAoB,CAAC;AAO/D,MAAM,OAAO,oCAAqC,SAAQ,YAAY;IACrE;;;;;OAKG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAC3B,EAAE,EACF,uCAAuC,CAAC,IAAI,CACJ,CAAC;IAC3C,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,uCAAuC,EAAE,CAAC;IACtD,CAAC;IAED,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAHzB,OAAE,GAAF,EAAE,CAAQ;QAIhB,IAAyC,CAAC,mBAAmB,GAAG,IAAI,qBAAqB,CACzF,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,MAAM,EACX,CAAC,EAAE,EAAE,eAAe,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE,eAAe,CAAC,EACrE,IAAI,qCAAqC,EAAE,EAC3C,EAAE,CACF,CAAC;IACH,CAAC;CACD;AAED,MAAM,OAAO,uCAAuC;IAWnD,IAAW,IAAI;QACd,OAAO,uCAAuC,CAAC,IAAI,CAAC;IACrD,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,uCAAuC,CAAC,UAAU,CAAC;IAC3D,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,oCAAoC,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QACvF,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CACZ,QAAgC,EAChC,EAAU;QAEV,MAAM,YAAY,GAAG,IAAI,oCAAoC,CAC5D,QAAQ,EACR,EAAE,EACF,IAAI,CAAC,UAAU,CACf,CAAC;QACF,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AA3CD,+GAA+G;AAC/G,gEAAgE;AAClD,4CAAI,GAAG,6CAA6C,CAAC;AAE5C,kDAAU,GAAuB;IACvD,IAAI,EAAE,uCAAuC,CAAC,IAAI;IAClD,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelFactory,\n\tIChannelServices,\n\tIChannelAttributes,\n} from \"@fluidframework/datastore-definitions\";\nimport { Client } from \"@fluidframework/merge-tree\";\nimport { IntervalCollectionMap } from \"../intervalCollectionMap.js\";\nimport {\n\tIIntervalCollectionFactory,\n\tIValueOpEmitter,\n\tIIntervalCollectionType,\n\tIIntervalCollectionOperation,\n} from \"../intervalCollectionMapInterfaces.js\";\nimport {\n\tIntervalCollection,\n\tISerializedIntervalCollectionV2,\n\tmakeOpsMap,\n\tLocalIntervalCollection,\n} from \"../intervalCollection.js\";\nimport {\n\tISerializableInterval,\n\tISerializedInterval,\n\tSequenceInterval,\n\tIIntervalHelpers,\n\tcreateSequenceInterval,\n\tIntervalOpType,\n} from \"../intervals/index.js\";\nimport { pkgVersion } from \"../packageVersion.js\";\nimport { SharedString } from \"../sharedString.js\";\n\nexport interface IntervalCollectionInternals<TInterval extends ISerializableInterval> {\n\tclient: Client;\n\tsavedSerializedIntervals?: ISerializedInterval[];\n\tlocalCollection: LocalIntervalCollection<SequenceInterval>;\n\tgetNextLocalSeq(): number;\n}\n\nexport class V1IntervalCollection<\n\tTInterval extends ISerializableInterval,\n> extends IntervalCollection<SequenceInterval> {\n\tcasted = this as unknown as IntervalCollectionInternals<SequenceInterval>;\n}\n\nclass V1SequenceIntervalCollectionFactory implements IIntervalCollectionFactory<SequenceInterval> {\n\tpublic load(\n\t\temitter: IValueOpEmitter,\n\t\traw: ISerializedInterval[] | ISerializedIntervalCollectionV2 = [],\n\t): V1IntervalCollection<SequenceInterval> {\n\t\tconst helpers: IIntervalHelpers<SequenceInterval> = {\n\t\t\tcreate: createSequenceInterval,\n\t\t};\n\t\treturn new V1IntervalCollection(helpers, true, emitter, raw, {});\n\t}\n\tpublic store(\n\t\tvalue: V1IntervalCollection<SequenceInterval>,\n\t): ISerializedInterval[] | ISerializedIntervalCollectionV2 {\n\t\treturn Array.from(\n\t\t\tvalue,\n\t\t\t(interval) => interval?.serialize(),\n\t\t) as unknown as ISerializedIntervalCollectionV2;\n\t}\n}\n\nexport class V1SequenceIntervalCollectionValueType\n\timplements IIntervalCollectionType<SequenceInterval>\n{\n\tpublic static Name = \"sharedStringIntervalCollection\";\n\n\tpublic get name(): string {\n\t\treturn V1SequenceIntervalCollectionValueType.Name;\n\t}\n\n\tpublic get factory(): IIntervalCollectionFactory<SequenceInterval> {\n\t\treturn V1SequenceIntervalCollectionValueType._factory;\n\t}\n\n\tpublic get ops(): Map<IntervalOpType, IIntervalCollectionOperation<SequenceInterval>> {\n\t\treturn V1SequenceIntervalCollectionValueType._ops;\n\t}\n\n\tprivate static readonly _factory: IIntervalCollectionFactory<SequenceInterval> =\n\t\tnew V1SequenceIntervalCollectionFactory();\n\n\tprivate static readonly _ops = makeOpsMap<SequenceInterval>();\n}\n\ninterface SharedStringInternals {\n\tintervalCollections: IntervalCollectionMap<SequenceInterval>;\n}\n\nexport class SharedStringWithV1IntervalCollection extends SharedString {\n\t/**\n\t * Create a new shared string.\n\t * @param runtime - data store runtime the new shared string belongs to\n\t * @param id - optional name of the shared string\n\t * @returns newly create shared string (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tV1IntervalCollectionSharedStringFactory.Type,\n\t\t) as SharedStringWithV1IntervalCollection;\n\t}\n\n\t/**\n\t * Get a factory for SharedString to register with the data store.\n\t * @returns a factory that creates and load SharedString\n\t */\n\tpublic static getFactory() {\n\t\treturn new V1IntervalCollectionSharedStringFactory();\n\t}\n\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes);\n\t\t(this as unknown as SharedStringInternals).intervalCollections = new IntervalCollectionMap(\n\t\t\tthis.serializer,\n\t\t\tthis.handle,\n\t\t\t(op, localOpMetadata) => this.submitLocalMessage(op, localOpMetadata),\n\t\t\tnew V1SequenceIntervalCollectionValueType(),\n\t\t\t{},\n\t\t);\n\t}\n}\n\nexport class V1IntervalCollectionSharedStringFactory implements IChannelFactory {\n\t// TODO rename back to https://graph.microsoft.com/types/mergeTree/string once paparazzi is able to dynamically\n\t// load code (UPDATE: paparazzi is gone... anything to do here?)\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: V1IntervalCollectionSharedStringFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic get type() {\n\t\treturn V1IntervalCollectionSharedStringFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn V1IntervalCollectionSharedStringFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<SharedStringWithV1IntervalCollection> {\n\t\tconst sharedString = new SharedStringWithV1IntervalCollection(runtime, id, attributes);\n\t\tawait sharedString.load(services);\n\t\treturn sharedString;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t): SharedStringWithV1IntervalCollection {\n\t\tconst sharedString = new SharedStringWithV1IntervalCollection(\n\t\t\tdocument,\n\t\t\tid,\n\t\t\tthis.attributes,\n\t\t);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n"]}
1
+ {"version":3,"file":"v1IntervalCollectionHelpers.js","sourceRoot":"","sources":["../../src/test/v1IntervalCollectionHelpers.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIChannelServices,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { Client } from \"@fluidframework/merge-tree\";\nimport {\n\tISerializedIntervalCollectionV2,\n\tIntervalCollection,\n\tLocalIntervalCollection,\n\tmakeOpsMap,\n} from \"../intervalCollection.js\";\nimport { IntervalCollectionMap } from \"../intervalCollectionMap.js\";\nimport {\n\tIIntervalCollectionFactory,\n\tIIntervalCollectionOperation,\n\tIIntervalCollectionType,\n\tIValueOpEmitter,\n} from \"../intervalCollectionMapInterfaces.js\";\nimport {\n\tIIntervalHelpers,\n\tISerializableInterval,\n\tISerializedInterval,\n\tIntervalOpType,\n\tSequenceInterval,\n\tcreateSequenceInterval,\n} from \"../intervals/index.js\";\nimport { pkgVersion } from \"../packageVersion.js\";\nimport { SharedString } from \"../sharedString.js\";\n\nexport interface IntervalCollectionInternals<TInterval extends ISerializableInterval> {\n\tclient: Client;\n\tsavedSerializedIntervals?: ISerializedInterval[];\n\tlocalCollection: LocalIntervalCollection<SequenceInterval>;\n\tgetNextLocalSeq(): number;\n}\n\nexport class V1IntervalCollection<\n\tTInterval extends ISerializableInterval,\n> extends IntervalCollection<SequenceInterval> {\n\tcasted = this as unknown as IntervalCollectionInternals<SequenceInterval>;\n}\n\nclass V1SequenceIntervalCollectionFactory implements IIntervalCollectionFactory<SequenceInterval> {\n\tpublic load(\n\t\temitter: IValueOpEmitter,\n\t\traw: ISerializedInterval[] | ISerializedIntervalCollectionV2 = [],\n\t): V1IntervalCollection<SequenceInterval> {\n\t\tconst helpers: IIntervalHelpers<SequenceInterval> = {\n\t\t\tcreate: createSequenceInterval,\n\t\t};\n\t\treturn new V1IntervalCollection(helpers, true, emitter, raw, {});\n\t}\n\tpublic store(\n\t\tvalue: V1IntervalCollection<SequenceInterval>,\n\t): ISerializedInterval[] | ISerializedIntervalCollectionV2 {\n\t\treturn Array.from(\n\t\t\tvalue,\n\t\t\t(interval) => interval?.serialize(),\n\t\t) as unknown as ISerializedIntervalCollectionV2;\n\t}\n}\n\nexport class V1SequenceIntervalCollectionValueType\n\timplements IIntervalCollectionType<SequenceInterval>\n{\n\tpublic static Name = \"sharedStringIntervalCollection\";\n\n\tpublic get name(): string {\n\t\treturn V1SequenceIntervalCollectionValueType.Name;\n\t}\n\n\tpublic get factory(): IIntervalCollectionFactory<SequenceInterval> {\n\t\treturn V1SequenceIntervalCollectionValueType._factory;\n\t}\n\n\tpublic get ops(): Map<IntervalOpType, IIntervalCollectionOperation<SequenceInterval>> {\n\t\treturn V1SequenceIntervalCollectionValueType._ops;\n\t}\n\n\tprivate static readonly _factory: IIntervalCollectionFactory<SequenceInterval> =\n\t\tnew V1SequenceIntervalCollectionFactory();\n\n\tprivate static readonly _ops = makeOpsMap<SequenceInterval>();\n}\n\ninterface SharedStringInternals {\n\tintervalCollections: IntervalCollectionMap<SequenceInterval>;\n}\n\nexport class SharedStringWithV1IntervalCollection extends SharedString {\n\t/**\n\t * Create a new shared string.\n\t * @param runtime - data store runtime the new shared string belongs to\n\t * @param id - optional name of the shared string\n\t * @returns newly create shared string (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tV1IntervalCollectionSharedStringFactory.Type,\n\t\t) as SharedStringWithV1IntervalCollection;\n\t}\n\n\t/**\n\t * Get a factory for SharedString to register with the data store.\n\t * @returns a factory that creates and load SharedString\n\t */\n\tpublic static getFactory() {\n\t\treturn new V1IntervalCollectionSharedStringFactory();\n\t}\n\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes);\n\t\t(this as unknown as SharedStringInternals).intervalCollections = new IntervalCollectionMap(\n\t\t\tthis.serializer,\n\t\t\tthis.handle,\n\t\t\t(op, localOpMetadata) => this.submitLocalMessage(op, localOpMetadata),\n\t\t\tnew V1SequenceIntervalCollectionValueType(),\n\t\t\t{},\n\t\t);\n\t}\n}\n\nexport class V1IntervalCollectionSharedStringFactory implements IChannelFactory {\n\t// TODO rename back to https://graph.microsoft.com/types/mergeTree/string once paparazzi is able to dynamically\n\t// load code (UPDATE: paparazzi is gone... anything to do here?)\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree\";\n\n\tpublic static readonly Attributes: IChannelAttributes = {\n\t\ttype: V1IntervalCollectionSharedStringFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic get type() {\n\t\treturn V1IntervalCollectionSharedStringFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn V1IntervalCollectionSharedStringFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<SharedStringWithV1IntervalCollection> {\n\t\tconst sharedString = new SharedStringWithV1IntervalCollection(runtime, id, attributes);\n\t\tawait sharedString.load(services);\n\t\treturn sharedString;\n\t}\n\n\tpublic create(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tid: string,\n\t): SharedStringWithV1IntervalCollection {\n\t\tconst sharedString = new SharedStringWithV1IntervalCollection(\n\t\t\tdocument,\n\t\t\tid,\n\t\t\tthis.attributes,\n\t\t);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/sequence",
3
- "version": "2.0.0-dev-rc.2.0.0.246488",
3
+ "version": "2.0.0-dev-rc.3.0.0.250606",
4
4
  "description": "Distributed sequence",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -97,32 +97,33 @@
97
97
  "temp-directory": "nyc/.nyc_output"
98
98
  },
99
99
  "dependencies": {
100
- "@fluid-internal/client-utils": "2.0.0-dev-rc.2.0.0.246488",
101
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.2.0.0.246488",
102
- "@fluidframework/core-utils": "2.0.0-dev-rc.2.0.0.246488",
103
- "@fluidframework/datastore-definitions": "2.0.0-dev-rc.2.0.0.246488",
104
- "@fluidframework/merge-tree": "2.0.0-dev-rc.2.0.0.246488",
100
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.250606",
101
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.250606",
102
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.250606",
103
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.250606",
104
+ "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.250606",
105
105
  "@fluidframework/protocol-definitions": "^3.2.0",
106
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.2.0.0.246488",
107
- "@fluidframework/runtime-utils": "2.0.0-dev-rc.2.0.0.246488",
108
- "@fluidframework/shared-object-base": "2.0.0-dev-rc.2.0.0.246488",
109
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.2.0.0.246488",
106
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.250606",
107
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.3.0.0.250606",
108
+ "@fluidframework/shared-object-base": "2.0.0-dev-rc.3.0.0.250606",
109
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.250606",
110
110
  "double-ended-queue": "^2.1.0-0",
111
111
  "uuid": "^9.0.0"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@arethetypeswrong/cli": "^0.13.3",
115
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.2.0.0.246488",
116
- "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.2.0.0.246488",
117
- "@fluid-private/test-dds-utils": "2.0.0-dev-rc.2.0.0.246488",
115
+ "@biomejs/biome": "^1.6.2",
116
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.250606",
117
+ "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.3.0.0.250606",
118
+ "@fluid-private/test-dds-utils": "2.0.0-dev-rc.3.0.0.250606",
118
119
  "@fluid-tools/benchmark": "^0.48.0",
119
120
  "@fluid-tools/build-cli": "^0.34.0",
120
121
  "@fluidframework/build-common": "^2.0.3",
121
122
  "@fluidframework/build-tools": "^0.34.0",
122
- "@fluidframework/container-definitions": "2.0.0-dev-rc.2.0.0.246488",
123
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.250606",
123
124
  "@fluidframework/eslint-config-fluid": "^5.1.0",
124
125
  "@fluidframework/sequence-previous": "npm:@fluidframework/sequence@2.0.0-internal.8.0.0",
125
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.2.0.0.246488",
126
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.250606",
126
127
  "@microsoft/api-extractor": "^7.42.3",
127
128
  "@types/diff": "^3.5.1",
128
129
  "@types/double-ended-queue": "^2.1.0",
@@ -184,18 +185,20 @@
184
185
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
185
186
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
186
187
  "check:are-the-types-wrong": "attw --pack . --entrypoints .",
188
+ "check:biome": "biome check .",
189
+ "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
187
190
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
188
191
  "ci:build:docs": "api-extractor run",
189
192
  "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
190
193
  "eslint": "eslint --format stylish src",
191
194
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
192
- "format": "npm run prettier:fix",
193
- "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
194
- "lint:fix": "npm run prettier:fix && npm run eslint:fix",
195
+ "format": "fluid-build --task format .",
196
+ "format:biome": "biome check --apply .",
197
+ "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
198
+ "lint": "fluid-build . --task lint",
199
+ "lint:fix": "fluid-build . --task eslint:fix --task format",
195
200
  "perf": "cross-env FLUID_TEST_VERBOSE=1 mocha \"lib/**/*.spec.*js\" --node-option unhandled-rejections=strict,expose-gc --exit --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 30000",
196
201
  "perf:measure": "npm run perf -- --fgrep @Measurement",
197
- "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
198
- "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
199
202
  "test": "npm run test:mocha",
200
203
  "test:benchmark:report": "mocha \"lib/test/*.perf.spec.*js\" --node-option unhandled-rejections=strict,expose-gc --exit --perfMode --fgrep @Benchmark -r @fluid-internal/mocha-test-setup --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 60000",
201
204
  "test:coverage": "c8 npm test",
@@ -5,14 +5,14 @@
5
5
 
6
6
  import { IFluidHandle } from "@fluidframework/core-interfaces";
7
7
  import { IFluidSerializer, serializeHandles } from "@fluidframework/shared-object-base";
8
+ import type { IntervalCollection } from "./intervalCollection.js";
8
9
  import {
9
- ISerializableIntervalCollection,
10
- ISerializedIntervalCollection,
11
10
  IIntervalCollectionOperation,
12
11
  IIntervalCollectionType,
12
+ ISerializableIntervalCollection,
13
+ ISerializedIntervalCollection,
13
14
  } from "./intervalCollectionMapInterfaces.js";
14
- import { IntervalOpType, type ISerializableInterval } from "./intervals/index.js";
15
- import type { IntervalCollection } from "./intervalCollection.js";
15
+ import { type ISerializableInterval, IntervalOpType } from "./intervals/index.js";
16
16
 
17
17
  /**
18
18
  * A local value to be stored in a container type DDS.
@@ -7,62 +7,62 @@
7
7
  /* eslint-disable import/no-deprecated */
8
8
 
9
9
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
10
- import { assert } from "@fluidframework/core-utils";
11
10
  import { IEvent } from "@fluidframework/core-interfaces";
11
+ import { assert } from "@fluidframework/core-utils";
12
12
  import {
13
- addProperties,
14
13
  Client,
15
- createMap,
16
- getSlideToSegoff,
14
+ DetachedReferencePosition,
17
15
  ISegment,
16
+ LocalReferencePosition,
18
17
  MergeTreeDeltaType,
19
18
  PropertySet,
20
- LocalReferencePosition,
21
19
  ReferenceType,
22
- refTypeIncludesFlag,
23
- reservedRangeLabelsKey,
20
+ SlidingPreference,
24
21
  UnassignedSequenceNumber,
25
- DetachedReferencePosition,
26
22
  UniversalSequenceNumber,
27
- SlidingPreference,
23
+ addProperties,
24
+ createMap,
25
+ getSlideToSegoff,
26
+ refTypeIncludesFlag,
27
+ reservedRangeLabelsKey,
28
28
  } from "@fluidframework/merge-tree";
29
29
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
30
30
  import { LoggingError, UsageError } from "@fluidframework/telemetry-utils";
31
31
  import { v4 as uuid } from "uuid";
32
32
  import {
33
- IMapMessageLocalMetadata,
34
33
  IIntervalCollectionFactory,
35
- IValueOpEmitter,
36
34
  IIntervalCollectionOperation,
37
35
  IIntervalCollectionType,
36
+ IMapMessageLocalMetadata,
37
+ IValueOpEmitter,
38
38
  SequenceOptions,
39
39
  } from "./intervalCollectionMapInterfaces.js";
40
+ import {
41
+ EndpointIndex,
42
+ IEndpointIndex,
43
+ IIdIntervalIndex,
44
+ IOverlappingIntervalsIndex,
45
+ IntervalIndex,
46
+ OverlappingIntervalsIndex,
47
+ createIdIntervalIndex,
48
+ } from "./intervalIndex/index.js";
40
49
  import {
41
50
  CompressedSerializedInterval,
42
51
  IIntervalHelpers,
52
+ ISerializableInterval,
53
+ ISerializedInterval,
43
54
  Interval,
44
55
  IntervalOpType,
45
56
  IntervalStickiness,
46
57
  IntervalType,
47
- ISerializableInterval,
48
- ISerializedInterval,
49
58
  SequenceInterval,
50
59
  SerializedIntervalDelta,
60
+ createInterval,
51
61
  createPositionReferenceFromSegoff,
52
62
  endReferenceSlidingPreference,
53
- startReferenceSlidingPreference,
54
63
  sequenceIntervalHelpers,
55
- createInterval,
64
+ startReferenceSlidingPreference,
56
65
  } from "./intervals/index.js";
57
- import {
58
- EndpointIndex,
59
- IEndpointIndex,
60
- IIdIntervalIndex,
61
- IOverlappingIntervalsIndex,
62
- IntervalIndex,
63
- OverlappingIntervalsIndex,
64
- createIdIntervalIndex,
65
- } from "./intervalIndex/index.js";
66
66
 
67
67
  /**
68
68
  * Defines a position and side relative to a character in a sequence.
@@ -3,34 +3,34 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { TypedEventEmitter } from "@fluid-internal/client-utils";
6
7
  import { IFluidHandle } from "@fluidframework/core-interfaces";
8
+ import { assert } from "@fluidframework/core-utils";
7
9
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
8
10
  import { IFluidSerializer, ValueType } from "@fluidframework/shared-object-base";
9
- import { TypedEventEmitter } from "@fluid-internal/client-utils";
10
- import { assert } from "@fluidframework/core-utils";
11
- import { makeSerializable, IntervalCollectionTypeLocalValue } from "./IntervalCollectionValues.js";
11
+ import { IntervalCollectionTypeLocalValue, makeSerializable } from "./IntervalCollectionValues.js";
12
+ import {
13
+ type IntervalCollection,
14
+ reservedIntervalIdKey,
15
+ toOptionalSequencePlace,
16
+ toSequencePlace,
17
+ } from "./intervalCollection.js";
12
18
  import {
19
+ IIntervalCollectionType,
20
+ IIntervalCollectionTypeOperationValue,
21
+ IMapMessageLocalMetadata,
13
22
  ISerializableIntervalCollection,
23
+ ISharedDefaultMapEvents,
14
24
  IValueChanged,
15
25
  // eslint-disable-next-line import/no-deprecated
16
26
  IValueOpEmitter,
17
- IIntervalCollectionType,
18
- ISharedDefaultMapEvents,
19
- IMapMessageLocalMetadata,
20
27
  SequenceOptions,
21
- IIntervalCollectionTypeOperationValue,
22
28
  } from "./intervalCollectionMapInterfaces.js";
23
29
  import {
24
- SerializedIntervalDelta,
25
- IntervalDeltaOpType,
26
30
  type ISerializableInterval,
31
+ IntervalDeltaOpType,
32
+ SerializedIntervalDelta,
27
33
  } from "./intervals/index.js";
28
- import {
29
- toSequencePlace,
30
- toOptionalSequencePlace,
31
- reservedIntervalIdKey,
32
- type IntervalCollection,
33
- } from "./intervalCollection.js";
34
34
 
35
35
  function isMapOperation(op: unknown): op is IMapOperation {
36
36
  return typeof op === "object" && op !== null && "type" in op && op.type === "act";
@@ -3,17 +3,17 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
6
7
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
7
8
  import { ISharedObjectEvents } from "@fluidframework/shared-object-base";
8
- import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
9
+ import type { IntervalCollection } from "./intervalCollection.js";
9
10
  import {
11
+ type ISerializableInterval,
10
12
  ISerializedInterval,
13
+ IntervalDeltaOpType,
11
14
  IntervalOpType,
12
15
  SerializedIntervalDelta,
13
- IntervalDeltaOpType,
14
- type ISerializableInterval,
15
16
  } from "./intervals/index.js";
16
- import type { IntervalCollection } from "./intervalCollection.js";
17
17
 
18
18
  /**
19
19
  * Type of "valueChanged" event parameter.
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils";
7
- import { ISerializableInterval } from "../intervals/index.js";
8
7
  import { reservedIntervalIdKey } from "../intervalCollection.js";
8
+ import { ISerializableInterval } from "../intervals/index.js";
9
9
  import { IntervalIndex } from "./intervalIndex.js";
10
10
 
11
11
  /**
@@ -6,16 +6,16 @@
6
6
  /* eslint-disable import/no-deprecated */
7
7
 
8
8
  import { Client } from "@fluidframework/merge-tree";
9
+ import { SequencePlace, endpointPosAndSide } from "../intervalCollection.js";
10
+ import { IntervalNode, IntervalTree } from "../intervalTree.js";
9
11
  import {
10
- IntervalType,
11
12
  IIntervalHelpers,
12
13
  ISerializableInterval,
13
- sequenceIntervalHelpers,
14
+ IntervalType,
14
15
  SequenceInterval,
16
+ sequenceIntervalHelpers,
15
17
  } from "../intervals/index.js";
16
- import { IntervalNode, IntervalTree } from "../intervalTree.js";
17
18
  import { SharedString } from "../sharedString.js";
18
- import { SequencePlace, endpointPosAndSide } from "../intervalCollection.js";
19
19
  import { IntervalIndex } from "./intervalIndex.js";
20
20
 
21
21
  /**
@@ -13,14 +13,14 @@ import {
13
13
  reservedRangeLabelsKey,
14
14
  } from "@fluidframework/merge-tree";
15
15
  import {
16
- sequenceIntervalHelpers,
17
16
  IntervalType,
18
17
  SequenceInterval,
19
18
  createPositionReferenceFromSegoff,
19
+ sequenceIntervalHelpers,
20
20
  } from "../intervals/index.js";
21
21
  import { SharedString } from "../sharedString.js";
22
- import { SequenceIntervalIndexes } from "./sequenceIntervalIndexes.js";
23
22
  import { OverlappingIntervalsIndex } from "./overlappingIntervalsIndex.js";
23
+ import { SequenceIntervalIndexes } from "./sequenceIntervalIndexes.js";
24
24
 
25
25
  /**
26
26
  * @public
@@ -4,11 +4,11 @@
4
4
  */
5
5
 
6
6
  import {
7
- RBNode,
8
7
  IRBAugmentation,
9
8
  IRBMatcher,
10
- RedBlackTree,
9
+ RBNode,
11
10
  RBNodeActions,
11
+ RedBlackTree,
12
12
  } from "@fluidframework/merge-tree";
13
13
  import { IInterval } from "./intervals/index.js";
14
14
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  /* eslint-disable import/no-deprecated */
7
7
 
8
+ import { assert } from "@fluidframework/core-utils";
8
9
  import {
9
10
  PropertiesManager,
10
11
  PropertySet,
@@ -12,7 +13,6 @@ import {
12
13
  reservedRangeLabelsKey,
13
14
  } from "@fluidframework/merge-tree";
14
15
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
15
- import { assert } from "@fluidframework/core-utils";
16
16
  import { UsageError } from "@fluidframework/telemetry-utils";
17
17
  import { SequencePlace, reservedIntervalIdKey } from "../intervalCollection.js";
18
18
  import { IIntervalHelpers, ISerializableInterval, ISerializedInterval } from "./intervalUtils.js";
@@ -6,6 +6,7 @@
6
6
  /* eslint-disable no-bitwise */
7
7
  /* eslint-disable import/no-deprecated */
8
8
 
9
+ import { assert } from "@fluidframework/core-utils";
9
10
  import {
10
11
  Client,
11
12
  ISegment,
@@ -23,7 +24,6 @@ import {
23
24
  refTypeIncludesFlag,
24
25
  reservedRangeLabelsKey,
25
26
  } from "@fluidframework/merge-tree";
26
- import { assert } from "@fluidframework/core-utils";
27
27
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
28
28
  import { UsageError } from "@fluidframework/telemetry-utils";
29
29
  import {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/sequence";
9
- export const pkgVersion = "2.0.0-dev-rc.2.0.0.246488";
9
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.250606";
@@ -7,26 +7,26 @@
7
7
 
8
8
  import { assert, unreachableCase } from "@fluidframework/core-utils";
9
9
  import {
10
- appendToMergeTreeDeltaRevertibles,
11
- discardMergeTreeDeltaRevertible,
12
- isMergeTreeDeltaRevertible,
13
10
  LocalReferencePosition,
14
11
  MergeTreeDeltaOperationType,
15
12
  MergeTreeDeltaRevertible,
16
13
  MergeTreeDeltaType,
17
14
  PropertySet,
18
15
  ReferenceType,
19
- refTypeIncludesFlag,
20
- revertMergeTreeDeltaRevertibles,
16
+ SlidingPreference,
21
17
  // eslint-disable-next-line import/no-deprecated
22
18
  SortedSet,
19
+ appendToMergeTreeDeltaRevertibles,
20
+ discardMergeTreeDeltaRevertible,
23
21
  getSlideToSegoff,
24
- SlidingPreference,
22
+ isMergeTreeDeltaRevertible,
23
+ refTypeIncludesFlag,
24
+ revertMergeTreeDeltaRevertibles,
25
25
  } from "@fluidframework/merge-tree";
26
26
  import { InteriorSequencePlace, Side } from "./intervalCollection.js";
27
27
  import { IntervalOpType, SequenceInterval } from "./intervals/index.js";
28
- import { SharedString, SharedStringSegment } from "./sharedString.js";
29
28
  import { ISequenceDeltaRange, SequenceDeltaEvent } from "./sequenceDeltaEvent.js";
29
+ import { SharedString, SharedStringSegment } from "./sharedString.js";
30
30
 
31
31
  /**
32
32
  * Data for undoing edits on SharedStrings and Intervals.
package/src/sequence.ts CHANGED
@@ -3,57 +3,57 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import Deque from "double-ended-queue";
7
- import { assert, Deferred } from "@fluidframework/core-utils";
8
6
  import { bufferToString } from "@fluid-internal/client-utils";
9
- import { LoggingError, createChildLogger } from "@fluidframework/telemetry-utils";
10
- import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
7
+ import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
8
+ import { assert, Deferred } from "@fluidframework/core-utils";
11
9
  import {
12
10
  IChannelAttributes,
13
- IFluidDataStoreRuntime,
14
11
  IChannelStorageService,
12
+ IFluidDataStoreRuntime,
15
13
  } from "@fluidframework/datastore-definitions";
16
14
  import {
17
15
  // eslint-disable-next-line import/no-deprecated
18
16
  Client,
19
- createAnnotateRangeOp,
20
- // eslint-disable-next-line import/no-deprecated
21
- createGroupOp,
22
- createInsertOp,
23
- createRemoveRangeOp,
24
17
  IJSONSegment,
25
18
  IMergeTreeAnnotateMsg,
26
19
  IMergeTreeDeltaOp,
27
20
  IMergeTreeGroupMsg,
21
+ IMergeTreeObliterateMsg,
28
22
  IMergeTreeOp,
29
23
  IMergeTreeRemoveMsg,
30
24
  IRelativePosition,
31
25
  ISegment,
32
26
  ISegmentAction,
33
27
  LocalReferencePosition,
34
- matchProperties,
35
28
  MergeTreeDeltaType,
29
+ MergeTreeRevertibleDriver,
36
30
  PropertySet,
37
31
  ReferencePosition,
38
32
  ReferenceType,
39
- MergeTreeRevertibleDriver,
40
33
  SegmentGroup,
41
- IMergeTreeObliterateMsg,
42
- createObliterateRangeOp,
43
34
  SlidingPreference,
35
+ createAnnotateRangeOp,
36
+ // eslint-disable-next-line import/no-deprecated
37
+ createGroupOp,
38
+ createInsertOp,
39
+ createObliterateRangeOp,
40
+ createRemoveRangeOp,
41
+ matchProperties,
44
42
  } from "@fluidframework/merge-tree";
43
+ import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
44
+ import { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
45
45
  import { ObjectStoragePartition, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
46
46
  import {
47
47
  IFluidSerializer,
48
- SharedObject,
49
48
  ISharedObjectEvents,
49
+ SharedObject,
50
50
  } from "@fluidframework/shared-object-base";
51
- import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
52
- import { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
53
- import { IntervalCollectionMap, IMapOperation } from "./intervalCollectionMap.js";
51
+ import { LoggingError, createChildLogger } from "@fluidframework/telemetry-utils";
52
+ import Deque from "double-ended-queue";
53
+ import { IIntervalCollection, SequenceIntervalCollectionValueType } from "./intervalCollection.js";
54
+ import { IMapOperation, IntervalCollectionMap } from "./intervalCollectionMap.js";
54
55
  import { IMapMessageLocalMetadata, IValueChanged } from "./intervalCollectionMapInterfaces.js";
55
56
  import { SequenceInterval } from "./intervals/index.js";
56
- import { IIntervalCollection, SequenceIntervalCollectionValueType } from "./intervalCollection.js";
57
57
  import { SequenceDeltaEvent, SequenceMaintenanceEvent } from "./sequenceDeltaEvent.js";
58
58
  import { ISharedIntervalCollection } from "./sharedIntervalCollection.js";
59
59
 
@@ -5,9 +5,9 @@
5
5
 
6
6
  import {
7
7
  IChannelAttributes,
8
- IFluidDataStoreRuntime,
9
- IChannelServices,
10
8
  IChannelFactory,
9
+ IChannelServices,
10
+ IFluidDataStoreRuntime,
11
11
  } from "@fluidframework/datastore-definitions";
12
12
  import { Marker, TextSegment } from "@fluidframework/merge-tree";
13
13
  import { pkgVersion } from "./packageVersion.js";
@@ -6,23 +6,23 @@
6
6
  import { bufferToString } from "@fluid-internal/client-utils";
7
7
  import {
8
8
  IChannelAttributes,
9
- IFluidDataStoreRuntime,
10
- IChannelStorageService,
11
- IChannelServices,
12
9
  IChannelFactory,
10
+ IChannelServices,
11
+ IChannelStorageService,
12
+ IFluidDataStoreRuntime,
13
13
  } from "@fluidframework/datastore-definitions";
14
14
  import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
15
15
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
16
16
  import {
17
- createSingleBlobSummary,
18
17
  IFluidSerializer,
19
18
  SharedObject,
19
+ createSingleBlobSummary,
20
20
  } from "@fluidframework/shared-object-base";
21
- import { Interval, ISerializableInterval } from "./intervals/index.js";
22
21
  import { IIntervalCollection, IntervalCollectionValueType } from "./intervalCollection.js";
23
- import { IntervalCollectionMap, IMapOperation } from "./intervalCollectionMap.js";
24
- import { pkgVersion } from "./packageVersion.js";
22
+ import { IMapOperation, IntervalCollectionMap } from "./intervalCollectionMap.js";
25
23
  import { IMapMessageLocalMetadata } from "./intervalCollectionMapInterfaces.js";
24
+ import { ISerializableInterval, Interval } from "./intervals/index.js";
25
+ import { pkgVersion } from "./packageVersion.js";
26
26
 
27
27
  const snapshotFileName = "header";
28
28
 
@@ -4,12 +4,12 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils";
7
- import { BaseSegment, IJSONSegment, ISegment, PropertySet } from "@fluidframework/merge-tree";
8
7
  import {
9
8
  IChannelAttributes,
10
9
  IFluidDataStoreRuntime,
11
10
  Serializable,
12
11
  } from "@fluidframework/datastore-definitions";
12
+ import { BaseSegment, IJSONSegment, ISegment, PropertySet } from "@fluidframework/merge-tree";
13
13
  import { SharedSegmentSequence } from "./sequence.js";
14
14
 
15
15
  const MaxRun = 128;
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { IChannelAttributes, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
6
7
  import {
7
8
  IMergeTreeTextHelper,
8
9
  IRelativePosition,
@@ -11,10 +12,9 @@ import {
11
12
  Marker,
12
13
  PropertySet,
13
14
  ReferenceType,
14
- refHasTileLabel,
15
15
  TextSegment,
16
+ refHasTileLabel,
16
17
  } from "@fluidframework/merge-tree";
17
- import { IFluidDataStoreRuntime, IChannelAttributes } from "@fluidframework/datastore-definitions";
18
18
  import { SharedSegmentSequence } from "./sequence.js";
19
19
  import { SharedStringFactory } from "./sequenceFactory.js";
20
20