@fluid-experimental/sequence-deprecated 2.0.0-internal.6.4.0 → 2.0.0-internal.7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluid-experimental/sequence-deprecated
2
2
 
3
+ ## 2.0.0-internal.7.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
8
+
9
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
10
+
3
11
  ## 2.0.0-internal.6.4.0
4
12
 
5
13
  Dependency updates only.
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/sequence-deprecated";
8
- export declare const pkgVersion = "2.0.0-internal.6.4.0";
8
+ export declare const pkgVersion = "2.0.0-internal.7.0.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluid-experimental/sequence-deprecated";
11
- exports.pkgVersion = "2.0.0-internal.6.4.0";
11
+ exports.pkgVersion = "2.0.0-internal.7.0.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,yCAAyC,CAAC;AACpD,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/sequence-deprecated\";\nexport const pkgVersion = \"2.0.0-internal.6.4.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,yCAAyC,CAAC;AACpD,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/sequence-deprecated\";\nexport const pkgVersion = \"2.0.0-internal.7.0.0\";\n"]}
@@ -17,20 +17,6 @@ const sharedSequence_1 = require("./sharedSequence");
17
17
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
18
18
  */
19
19
  class SharedNumberSequence extends sharedSequence_1.SharedSequence {
20
- /**
21
- * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
22
- * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
23
- */
24
- constructor(document, id, attributes) {
25
- super(document, id, attributes, (spec) => {
26
- const segment = sequenceFactory_1.SharedNumberSequenceFactory.segmentFromSpec(spec);
27
- if (!segment) {
28
- throw new Error("expected `spec` to be valid `ISegment`");
29
- }
30
- return segment;
31
- });
32
- this.id = id;
33
- }
34
20
  /**
35
21
  * Create a new shared number sequence
36
22
  *
@@ -55,6 +41,20 @@ class SharedNumberSequence extends sharedSequence_1.SharedSequence {
55
41
  static getFactory() {
56
42
  return new sequenceFactory_1.SharedNumberSequenceFactory();
57
43
  }
44
+ /**
45
+ * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
46
+ * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
47
+ */
48
+ constructor(document, id, attributes) {
49
+ super(document, id, attributes, (spec) => {
50
+ const segment = sequenceFactory_1.SharedNumberSequenceFactory.segmentFromSpec(spec);
51
+ if (!segment) {
52
+ throw new Error("expected `spec` to be valid `ISegment`");
53
+ }
54
+ return segment;
55
+ });
56
+ this.id = id;
57
+ }
58
58
  /**
59
59
  * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
60
60
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
@@ -1 +1 @@
1
- {"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAAgE;AAChE,qDAAkD;AAElD;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,+BAAsB;IA2B/D;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,6CAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC1D;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;QATI,OAAE,GAAF,EAAE,CAAQ;IAUlB,CAAC;IA1CD;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,6CAA2B,CAAC,IAAI,CAAyB,CAAC;IAC5F,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,6CAA2B,EAAE,CAAC;IAC1C,CAAC;IAoBD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD;AApDD,oDAoDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes } from \"@fluidframework/datastore-definitions\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedNumberSequence holds a sequence of numbers. Each number will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedNumberSequence extends SharedSequence<number> {\n\t/**\n\t * Create a new shared number sequence\n\t *\n\t * @param runtime - data store runtime the new shared number sequence belongs to\n\t * @param id - optional name of the shared number sequence\n\t * @returns newly create shared number sequence (but not attached yet)\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedNumberSequenceFactory.Type) as SharedNumberSequence;\n\t}\n\n\t/**\n\t * Get a factory for SharedNumberSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedNumberSequence\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedNumberSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, (spec) => {\n\t\t\tconst segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n\t\t\tif (!segment) {\n\t\t\t\tthrow new Error(\"expected `spec` to be valid `ISegment`\");\n\t\t\t}\n\t\t\treturn segment;\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number) {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAAgE;AAChE,qDAAkD;AAElD;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,+BAAsB;IAC/D;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,6CAA2B,CAAC,IAAI,CAAyB,CAAC;IAC5F,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,6CAA2B,EAAE,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,6CAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC1D;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;QATI,OAAE,GAAF,EAAE,CAAQ;IAUlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD;AApDD,oDAoDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes } from \"@fluidframework/datastore-definitions\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedNumberSequence holds a sequence of numbers. Each number will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedNumberSequence extends SharedSequence<number> {\n\t/**\n\t * Create a new shared number sequence\n\t *\n\t * @param runtime - data store runtime the new shared number sequence belongs to\n\t * @param id - optional name of the shared number sequence\n\t * @returns newly create shared number sequence (but not attached yet)\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedNumberSequenceFactory.Type) as SharedNumberSequence;\n\t}\n\n\t/**\n\t * Get a factory for SharedNumberSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedNumberSequence\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedNumberSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, (spec) => {\n\t\t\tconst segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n\t\t\tif (!segment) {\n\t\t\t\tthrow new Error(\"expected `spec` to be valid `ISegment`\");\n\t\t\t}\n\t\t\treturn segment;\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number) {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
@@ -17,14 +17,6 @@ const sharedSequence_1 = require("./sharedSequence");
17
17
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
18
18
  */
19
19
  class SharedObjectSequence extends sharedSequence_1.SharedSequence {
20
- /**
21
- * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
22
- * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
23
- */
24
- constructor(document, id, attributes) {
25
- super(document, id, attributes, sequenceFactory_1.SharedObjectSequenceFactory.segmentFromSpec);
26
- this.id = id;
27
- }
28
20
  /**
29
21
  * Create a new shared object sequence
30
22
  *
@@ -49,6 +41,14 @@ class SharedObjectSequence extends sharedSequence_1.SharedSequence {
49
41
  static getFactory() {
50
42
  return new sequenceFactory_1.SharedObjectSequenceFactory();
51
43
  }
44
+ /**
45
+ * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
46
+ * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
47
+ */
48
+ constructor(document, id, attributes) {
49
+ super(document, id, attributes, sequenceFactory_1.SharedObjectSequenceFactory.segmentFromSpec);
50
+ this.id = id;
51
+ }
52
52
  /**
53
53
  * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
54
54
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
@@ -1 +1 @@
1
- {"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,uDAAgE;AAChE,qDAAkD;AAElD;;;;;;;;GAQG;AACH,MAAa,oBAAwB,SAAQ,+BAAiB;IA+B7D;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,6CAA2B,CAAC,eAAsB,CAAC,CAAC;QAH7E,OAAE,GAAF,EAAE,CAAQ;IAIlB,CAAC;IAxCD;;;;;;;;;OASG;IAEI,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QACnE,OAAO,OAAO,CAAC,aAAa,CAC3B,EAAE,EACF,6CAA2B,CAAC,IAAI,CACL,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,6CAA2B,EAAE,CAAC;IAC1C,CAAC;IAcD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD;AAlDD,oDAkDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelAttributes,\n\tSerializable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n\t/**\n\t * Create a new shared object sequence\n\t *\n\t * @param runtime - data store runtime the new shared object sequence belongs to\n\t * @param id - optional name of the shared object sequence\n\t * @returns newly create shared object sequence (but not attached yet)\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\n\tpublic static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tSharedObjectSequenceFactory.Type,\n\t\t) as SharedObjectSequence<T>;\n\t}\n\n\t/**\n\t * Get a factory for SharedObjectSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedObjectSequence\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedObjectSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number): Serializable<T>[] {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,uDAAgE;AAChE,qDAAkD;AAElD;;;;;;;;GAQG;AACH,MAAa,oBAAwB,SAAQ,+BAAiB;IAC7D;;;;;;;;;OASG;IAEI,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QACnE,OAAO,OAAO,CAAC,aAAa,CAC3B,EAAE,EACF,6CAA2B,CAAC,IAAI,CACL,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,6CAA2B,EAAE,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,6CAA2B,CAAC,eAAsB,CAAC,CAAC;QAH7E,OAAE,GAAF,EAAE,CAAQ;IAIlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD;AAlDD,oDAkDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelAttributes,\n\tSerializable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n\t/**\n\t * Create a new shared object sequence\n\t *\n\t * @param runtime - data store runtime the new shared object sequence belongs to\n\t * @param id - optional name of the shared object sequence\n\t * @returns newly create shared object sequence (but not attached yet)\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\n\tpublic static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tSharedObjectSequenceFactory.Type,\n\t\t) as SharedObjectSequence<T>;\n\t}\n\n\t/**\n\t * Get a factory for SharedObjectSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedObjectSequence\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedObjectSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number): Serializable<T>[] {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
@@ -36,7 +36,7 @@ export declare class PaddingSegment extends BaseSegment {
36
36
  * @deprecated `SparseMatrixItem` is part of an abandoned prototype.
37
37
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
38
38
  */
39
- export declare type SparseMatrixItem = Serializable;
39
+ export type SparseMatrixItem = Serializable;
40
40
  /**
41
41
  * @deprecated `RunSegment` is part of an abandoned prototype.
42
42
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
@@ -60,7 +60,7 @@ export declare class RunSegment extends SubSequence<SparseMatrixItem> {
60
60
  * @deprecated `MatrixSegment` is part of an abandoned prototype.
61
61
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
62
62
  */
63
- export declare type MatrixSegment = RunSegment | PaddingSegment;
63
+ export type MatrixSegment = RunSegment | PaddingSegment;
64
64
  /**
65
65
  * @deprecated `maxCol` is part of an abandoned prototype.
66
66
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
@@ -1 +1 @@
1
- {"version":3,"file":"sparsematrix.d.ts","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC9C,gBAAuB,UAAU,oBAAoB;WACvC,EAAE,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,IAAI,cAAc;WAGhD,cAAc,CAAC,IAAI,EAAE,GAAG;IAUtC,SAAgB,IAAI,oBAA6B;gBAErC,IAAI,EAAE,MAAM;IAKjB,YAAY;;;;IAIZ,KAAK,CAAC,KAAK,SAAI,EAAE,GAAG,CAAC,EA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AAE,MAAM;IAIvC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAK7D,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAOrD,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,UAAU;CAIlB;AAED;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,OAAc,IAAI,SAA+D;IAEjF,OAAc,UAAU,EAAE,kBAAkB,CAI1C;WAEY,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ;IAc3D,IAAW,IAAI,WAEd;IAED,IAAW,UAAU,uBAEpB;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAMlB,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAK1E"}
@@ -18,11 +18,6 @@ const sharedSequence_1 = require("./sharedSequence");
18
18
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
19
19
  */
20
20
  class PaddingSegment extends merge_tree_1.BaseSegment {
21
- constructor(size) {
22
- super();
23
- this.type = PaddingSegment.typeString;
24
- this.cachedLength = size;
25
- }
26
21
  static is(segment) {
27
22
  return segment.type === PaddingSegment.typeString;
28
23
  }
@@ -36,6 +31,11 @@ class PaddingSegment extends merge_tree_1.BaseSegment {
36
31
  }
37
32
  return undefined;
38
33
  }
34
+ constructor(size) {
35
+ super();
36
+ this.type = PaddingSegment.typeString;
37
+ this.cachedLength = size;
38
+ }
39
39
  toJSONObject() {
40
40
  return { pad: this.cachedLength, props: this.properties };
41
41
  }
@@ -73,12 +73,6 @@ PaddingSegment.typeString = "PaddingSegment";
73
73
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
74
74
  */
75
75
  class RunSegment extends sharedSequence_1.SubSequence {
76
- constructor(items) {
77
- super(items);
78
- this.items = items;
79
- this.type = RunSegment.typeString;
80
- this.tags = new Array(items.length).fill(undefined);
81
- }
82
76
  static is(segment) {
83
77
  return segment.type === RunSegment.typeString;
84
78
  }
@@ -92,6 +86,12 @@ class RunSegment extends sharedSequence_1.SubSequence {
92
86
  }
93
87
  return undefined;
94
88
  }
89
+ constructor(items) {
90
+ super(items);
91
+ this.items = items;
92
+ this.type = RunSegment.typeString;
93
+ this.tags = new Array(items.length).fill(undefined);
94
+ }
95
95
  clone(start = 0, end) {
96
96
  const b = new RunSegment(this.items.slice(start, end));
97
97
  if (this.tags) {
@@ -183,10 +183,6 @@ exports.positionToRowCol = positionToRowCol;
183
183
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
184
184
  */
185
185
  class SparseMatrix extends sequence_1.SharedSegmentSequence {
186
- constructor(document, id, attributes) {
187
- super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
188
- this.id = id;
189
- }
190
186
  /**
191
187
  * Create a new sparse matrix
192
188
  *
@@ -205,6 +201,10 @@ class SparseMatrix extends sequence_1.SharedSegmentSequence {
205
201
  static getFactory() {
206
202
  return new SparseMatrixFactory();
207
203
  }
204
+ constructor(document, id, attributes) {
205
+ super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
206
+ this.id = id;
207
+ }
208
208
  get numRows() {
209
209
  return positionToRowCol(this.getLength()).row;
210
210
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AAEpD,2DAA8F;AAU9F,uDAAiE;AACjE,qDAA8C;AAC9C,qDAA+C;AAE/C;;;;;;GAMG;AACH,MAAa,cAAe,SAAQ,wBAAW;IAiB9C,YAAY,IAAY;QACvB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;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAjDF,kDAkDC;AAjDc,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,2BAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { BaseSegment, IJSONSegment, ISegment, PropertySet } from \"@fluidframework/merge-tree\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n\tSerializable,\n\tJsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SubSequence } from \"./sharedSequence\";\n\n/**\n * An empty segment that occupies 'cachedLength' positions.\n * {@link SparseMatrix} uses `PaddingSegment` to \"pad\" a run of unoccupied cells.\n *\n * @deprecated `PaddingSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type SparseMatrixItem = Serializable;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class RunSegment extends SubSequence<SparseMatrixItem> {\n\tpublic static readonly typeString = \"RunSegment\";\n\tpublic static is(segment: ISegment): segment is RunSegment {\n\t\treturn segment.type === RunSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"items\" in spec) {\n\t\t\tconst segment = new RunSegment(spec.items);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = RunSegment.typeString;\n\n\tprivate tags: any[];\n\n\tconstructor(public items: SparseMatrixItem[]) {\n\t\tsuper(items);\n\t\tthis.tags = new Array(items.length).fill(undefined);\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new RunSegment(this.items.slice(start, end));\n\t\tif (this.tags) {\n\t\t\tb.tags = this.tags.slice(start, end);\n\t\t}\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tsuper.append(segment);\n\n\t\tconst asRun = segment as RunSegment;\n\t\tif (asRun.tags) {\n\t\t\tif (this.tags) {\n\t\t\t\tthis.tags.splice(this.items.length, 0, ...asRun.tags);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t// TODO: retain removed items for undo\n\t// returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.tags.splice(start, end - start);\n\t\treturn super.removeRange(start, end);\n\t}\n\n\tpublic getTag(pos: number) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn this.tags[pos];\n\t}\n\n\tpublic setTag(pos: number, tag: any) {\n\t\tthis.tags[pos] = tag;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tif (pos > 0) {\n\t\t\tconst remainingItems = this.items.slice(pos);\n\t\t\tthis.items = this.items.slice(0, pos);\n\t\t\tthis.cachedLength = this.items.length;\n\n\t\t\tconst leafSegment = new RunSegment(remainingItems);\n\t\t\tleafSegment.tags = this.tags.slice(pos);\n\t\t\tthis.tags.length = pos;\n\n\t\t\treturn leafSegment;\n\t\t}\n\t}\n}\n\n/**\n * @deprecated `MatrixSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type MatrixSegment = RunSegment | PaddingSegment;\n\n/**\n * @deprecated `maxCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCol = 0x200000; // X128 Excel maximum of 16,384 columns\n\n/**\n * @deprecated `maxCols` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCols = maxCol + 1;\n\n/**\n * @deprecated `maxRow` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRow = 0xffffffff; // X4096 Excel maximum of 1,048,576 rows\n\n/**\n * @deprecated `maxRows` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRows = maxRow + 1;\n\n/**\n * @deprecated `maxCellPosition` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCellPosition = maxCol * maxRow;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const rowColToPosition = (row: number, col: number) => row * maxCols + col;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport function positionToRowCol(position: number) {\n\tconst row = Math.floor(position / maxCols);\n\tconst col = position - row * maxCols;\n\treturn { row, col };\n}\n\n/**\n * @deprecated `SparseMatrix` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {\n\t/**\n\t * Create a new sparse matrix\n\t *\n\t * @param runtime - data store runtime the new sparse matrix belongs to\n\t * @param id - optional name of the sparse matrix\n\t * @returns newly create sparse matrix (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n\t}\n\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedMap\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SparseMatrixFactory();\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, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n\tpublic static Attributes: IChannelAttributes = {\n\t\ttype: SparseMatrixFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic static segmentFromSpec(spec: IJSONSegment): ISegment {\n\t\tconst maybePadding = PaddingSegment.fromJSONObject(spec);\n\t\tif (maybePadding) {\n\t\t\treturn maybePadding;\n\t\t}\n\n\t\tconst maybeRun = RunSegment.fromJSONObject(spec);\n\t\tif (maybeRun) {\n\t\t\treturn maybeRun;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n\t}\n\n\tpublic get type() {\n\t\treturn SparseMatrixFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn SparseMatrixFactory.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<ISharedObject> {\n\t\tconst sharedObject = new SparseMatrix(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedObject = new SparseMatrix(document, id, this.attributes);\n\t\tsharedObject.initializeLocal();\n\t\treturn sharedObject;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sparsematrix.js","sourceRo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8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAED,IAAW,IAAI;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAjDF,kDAkDC;AAjDc,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,2BAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { BaseSegment, IJSONSegment, ISegment, PropertySet } from \"@fluidframework/merge-tree\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n\tSerializable,\n\tJsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SubSequence } from \"./sharedSequence\";\n\n/**\n * An empty segment that occupies 'cachedLength' positions.\n * {@link SparseMatrix} uses `PaddingSegment` to \"pad\" a run of unoccupied cells.\n *\n * @deprecated `PaddingSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type SparseMatrixItem = Serializable;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class RunSegment extends SubSequence<SparseMatrixItem> {\n\tpublic static readonly typeString = \"RunSegment\";\n\tpublic static is(segment: ISegment): segment is RunSegment {\n\t\treturn segment.type === RunSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"items\" in spec) {\n\t\t\tconst segment = new RunSegment(spec.items);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = RunSegment.typeString;\n\n\tprivate tags: any[];\n\n\tconstructor(public items: SparseMatrixItem[]) {\n\t\tsuper(items);\n\t\tthis.tags = new Array(items.length).fill(undefined);\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new RunSegment(this.items.slice(start, end));\n\t\tif (this.tags) {\n\t\t\tb.tags = this.tags.slice(start, end);\n\t\t}\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tsuper.append(segment);\n\n\t\tconst asRun = segment as RunSegment;\n\t\tif (asRun.tags) {\n\t\t\tif (this.tags) {\n\t\t\t\tthis.tags.splice(this.items.length, 0, ...asRun.tags);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t// TODO: retain removed items for undo\n\t// returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.tags.splice(start, end - start);\n\t\treturn super.removeRange(start, end);\n\t}\n\n\tpublic getTag(pos: number) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn this.tags[pos];\n\t}\n\n\tpublic setTag(pos: number, tag: any) {\n\t\tthis.tags[pos] = tag;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tif (pos > 0) {\n\t\t\tconst remainingItems = this.items.slice(pos);\n\t\t\tthis.items = this.items.slice(0, pos);\n\t\t\tthis.cachedLength = this.items.length;\n\n\t\t\tconst leafSegment = new RunSegment(remainingItems);\n\t\t\tleafSegment.tags = this.tags.slice(pos);\n\t\t\tthis.tags.length = pos;\n\n\t\t\treturn leafSegment;\n\t\t}\n\t}\n}\n\n/**\n * @deprecated `MatrixSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type MatrixSegment = RunSegment | PaddingSegment;\n\n/**\n * @deprecated `maxCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCol = 0x200000; // X128 Excel maximum of 16,384 columns\n\n/**\n * @deprecated `maxCols` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCols = maxCol + 1;\n\n/**\n * @deprecated `maxRow` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRow = 0xffffffff; // X4096 Excel maximum of 1,048,576 rows\n\n/**\n * @deprecated `maxRows` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRows = maxRow + 1;\n\n/**\n * @deprecated `maxCellPosition` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCellPosition = maxCol * maxRow;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const rowColToPosition = (row: number, col: number) => row * maxCols + col;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport function positionToRowCol(position: number) {\n\tconst row = Math.floor(position / maxCols);\n\tconst col = position - row * maxCols;\n\treturn { row, col };\n}\n\n/**\n * @deprecated `SparseMatrix` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {\n\t/**\n\t * Create a new sparse matrix\n\t *\n\t * @param runtime - data store runtime the new sparse matrix belongs to\n\t * @param id - optional name of the sparse matrix\n\t * @returns newly create sparse matrix (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n\t}\n\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedMap\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SparseMatrixFactory();\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, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n\tpublic static Attributes: IChannelAttributes = {\n\t\ttype: SparseMatrixFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic static segmentFromSpec(spec: IJSONSegment): ISegment {\n\t\tconst maybePadding = PaddingSegment.fromJSONObject(spec);\n\t\tif (maybePadding) {\n\t\t\treturn maybePadding;\n\t\t}\n\n\t\tconst maybeRun = RunSegment.fromJSONObject(spec);\n\t\tif (maybeRun) {\n\t\t\treturn maybeRun;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n\t}\n\n\tpublic get type() {\n\t\treturn SparseMatrixFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn SparseMatrixFactory.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<ISharedObject> {\n\t\tconst sharedObject = new SparseMatrix(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedObject = new SparseMatrix(document, id, this.attributes);\n\t\tsharedObject.initializeLocal();\n\t\treturn sharedObject;\n\t}\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.34.9"
8
+ "packageVersion": "7.37.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/sequence-deprecated";
8
- export declare const pkgVersion = "2.0.0-internal.6.4.0";
8
+ export declare const pkgVersion = "2.0.0-internal.7.0.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluid-experimental/sequence-deprecated";
8
- export const pkgVersion = "2.0.0-internal.6.4.0";
8
+ export const pkgVersion = "2.0.0-internal.7.0.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/sequence-deprecated\";\nexport const pkgVersion = \"2.0.0-internal.6.4.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,yCAAyC,CAAC;AACjE,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/sequence-deprecated\";\nexport const pkgVersion = \"2.0.0-internal.7.0.0\";\n"]}
@@ -14,20 +14,6 @@ import { SharedSequence } from "./sharedSequence";
14
14
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
15
15
  */
16
16
  export class SharedNumberSequence extends SharedSequence {
17
- /**
18
- * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
19
- * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
20
- */
21
- constructor(document, id, attributes) {
22
- super(document, id, attributes, (spec) => {
23
- const segment = SharedNumberSequenceFactory.segmentFromSpec(spec);
24
- if (!segment) {
25
- throw new Error("expected `spec` to be valid `ISegment`");
26
- }
27
- return segment;
28
- });
29
- this.id = id;
30
- }
31
17
  /**
32
18
  * Create a new shared number sequence
33
19
  *
@@ -52,6 +38,20 @@ export class SharedNumberSequence extends SharedSequence {
52
38
  static getFactory() {
53
39
  return new SharedNumberSequenceFactory();
54
40
  }
41
+ /**
42
+ * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
43
+ * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
44
+ */
45
+ constructor(document, id, attributes) {
46
+ super(document, id, attributes, (spec) => {
47
+ const segment = SharedNumberSequenceFactory.segmentFromSpec(spec);
48
+ if (!segment) {
49
+ throw new Error("expected `spec` to be valid `ISegment`");
50
+ }
51
+ return segment;
52
+ });
53
+ this.id = id;
54
+ }
55
55
  /**
56
56
  * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
57
57
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
@@ -1 +1 @@
1
- {"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAsB;IA2B/D;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC1D;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;QATI,OAAE,GAAF,EAAE,CAAQ;IAUlB,CAAC;IA1CD;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,2BAA2B,CAAC,IAAI,CAAyB,CAAC;IAC5F,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC1C,CAAC;IAoBD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes } from \"@fluidframework/datastore-definitions\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedNumberSequence holds a sequence of numbers. Each number will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedNumberSequence extends SharedSequence<number> {\n\t/**\n\t * Create a new shared number sequence\n\t *\n\t * @param runtime - data store runtime the new shared number sequence belongs to\n\t * @param id - optional name of the shared number sequence\n\t * @returns newly create shared number sequence (but not attached yet)\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedNumberSequenceFactory.Type) as SharedNumberSequence;\n\t}\n\n\t/**\n\t * Get a factory for SharedNumberSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedNumberSequence\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedNumberSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, (spec) => {\n\t\t\tconst segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n\t\t\tif (!segment) {\n\t\t\t\tthrow new Error(\"expected `spec` to be valid `ISegment`\");\n\t\t\t}\n\t\t\treturn segment;\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number) {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAsB;IAC/D;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,2BAA2B,CAAC,IAAI,CAAyB,CAAC;IAC5F,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC1D;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;QATI,OAAE,GAAF,EAAE,CAAQ;IAUlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes } from \"@fluidframework/datastore-definitions\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedNumberSequence holds a sequence of numbers. Each number will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedNumberSequence extends SharedSequence<number> {\n\t/**\n\t * Create a new shared number sequence\n\t *\n\t * @param runtime - data store runtime the new shared number sequence belongs to\n\t * @param id - optional name of the shared number sequence\n\t * @returns newly create shared number sequence (but not attached yet)\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SharedNumberSequenceFactory.Type) as SharedNumberSequence;\n\t}\n\n\t/**\n\t * Get a factory for SharedNumberSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedNumberSequence\n\t *\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedNumberSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, (spec) => {\n\t\t\tconst segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n\t\t\tif (!segment) {\n\t\t\t\tthrow new Error(\"expected `spec` to be valid `ISegment`\");\n\t\t\t}\n\t\t\treturn segment;\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number) {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
@@ -14,14 +14,6 @@ import { SharedSequence } from "./sharedSequence";
14
14
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
15
15
  */
16
16
  export class SharedObjectSequence extends SharedSequence {
17
- /**
18
- * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
19
- * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
20
- */
21
- constructor(document, id, attributes) {
22
- super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);
23
- this.id = id;
24
- }
25
17
  /**
26
18
  * Create a new shared object sequence
27
19
  *
@@ -46,6 +38,14 @@ export class SharedObjectSequence extends SharedSequence {
46
38
  static getFactory() {
47
39
  return new SharedObjectSequenceFactory();
48
40
  }
41
+ /**
42
+ * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
43
+ * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
44
+ */
45
+ constructor(document, id, attributes) {
46
+ super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);
47
+ this.id = id;
48
+ }
49
49
  /**
50
50
  * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
51
51
  * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
@@ -1 +1 @@
1
- {"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAwB,SAAQ,cAAiB;IA+B7D;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,CAAC,eAAsB,CAAC,CAAC;QAH7E,OAAE,GAAF,EAAE,CAAQ;IAIlB,CAAC;IAxCD;;;;;;;;;OASG;IAEI,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QACnE,OAAO,OAAO,CAAC,aAAa,CAC3B,EAAE,EACF,2BAA2B,CAAC,IAAI,CACL,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC1C,CAAC;IAcD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelAttributes,\n\tSerializable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n\t/**\n\t * Create a new shared object sequence\n\t *\n\t * @param runtime - data store runtime the new shared object sequence belongs to\n\t * @param id - optional name of the shared object sequence\n\t * @returns newly create shared object sequence (but not attached yet)\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\n\tpublic static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tSharedObjectSequenceFactory.Type,\n\t\t) as SharedObjectSequence<T>;\n\t}\n\n\t/**\n\t * Get a factory for SharedObjectSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedObjectSequence\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedObjectSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number): Serializable<T>[] {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAwB,SAAQ,cAAiB;IAC7D;;;;;;;;;OASG;IAEI,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QACnE,OAAO,OAAO,CAAC,aAAa,CAC3B,EAAE,EACF,2BAA2B,CAAC,IAAI,CACL,CAAC;IAC9B,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACvB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC1C,CAAC;IAED;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,CAAC,eAAsB,CAAC,CAAC;QAH7E,OAAE,GAAF,EAAE,CAAQ;IAIlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIFluidDataStoreRuntime,\n\tIChannelAttributes,\n\tSerializable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\nimport { SharedSequence } from \"./sharedSequence\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n\t/**\n\t * Create a new shared object sequence\n\t *\n\t * @param runtime - data store runtime the new shared object sequence belongs to\n\t * @param id - optional name of the shared object sequence\n\t * @returns newly create shared object sequence (but not attached yet)\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\n\tpublic static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(\n\t\t\tid,\n\t\t\tSharedObjectSequenceFactory.Type,\n\t\t) as SharedObjectSequence<T>;\n\t}\n\n\t/**\n\t * Get a factory for SharedObjectSequence to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedObjectSequence\n\t *\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic static getFactory() {\n\t\treturn new SharedObjectSequenceFactory();\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n\t */\n\tpublic getRange(start: number, end?: number): Serializable<T>[] {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
@@ -36,7 +36,7 @@ export declare class PaddingSegment extends BaseSegment {
36
36
  * @deprecated `SparseMatrixItem` is part of an abandoned prototype.
37
37
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
38
38
  */
39
- export declare type SparseMatrixItem = Serializable;
39
+ export type SparseMatrixItem = Serializable;
40
40
  /**
41
41
  * @deprecated `RunSegment` is part of an abandoned prototype.
42
42
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
@@ -60,7 +60,7 @@ export declare class RunSegment extends SubSequence<SparseMatrixItem> {
60
60
  * @deprecated `MatrixSegment` is part of an abandoned prototype.
61
61
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
62
62
  */
63
- export declare type MatrixSegment = RunSegment | PaddingSegment;
63
+ export type MatrixSegment = RunSegment | PaddingSegment;
64
64
  /**
65
65
  * @deprecated `maxCol` is part of an abandoned prototype.
66
66
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
@@ -1 +1 @@
1
- {"version":3,"file":"sparsematrix.d.ts","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,QAAQ,EACR,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;GAMG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC9C,gBAAuB,UAAU,oBAAoB;WACvC,EAAE,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,IAAI,cAAc;WAGhD,cAAc,CAAC,IAAI,EAAE,GAAG;IAUtC,SAAgB,IAAI,oBAA6B;gBAErC,IAAI,EAAE,MAAM;IAKjB,YAAY;;;;IAIZ,KAAK,CAAC,KAAK,SAAI,E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MAAM,EAAE,OAAO,EAAE,MAAM;IAIvC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAK7D,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAOrD,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,UAAU;CAIlB;AAED;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IAC1D,OAAc,IAAI,SAA+D;IAEjF,OAAc,UAAU,EAAE,kBAAkB,CAI1C;WAEY,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ;IAc3D,IAAW,IAAI,WAEd;IAED,IAAW,UAAU,uBAEpB;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAMlB,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAK1E"}
@@ -15,11 +15,6 @@ import { SubSequence } from "./sharedSequence";
15
15
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
16
16
  */
17
17
  export class PaddingSegment extends BaseSegment {
18
- constructor(size) {
19
- super();
20
- this.type = PaddingSegment.typeString;
21
- this.cachedLength = size;
22
- }
23
18
  static is(segment) {
24
19
  return segment.type === PaddingSegment.typeString;
25
20
  }
@@ -33,6 +28,11 @@ export class PaddingSegment extends BaseSegment {
33
28
  }
34
29
  return undefined;
35
30
  }
31
+ constructor(size) {
32
+ super();
33
+ this.type = PaddingSegment.typeString;
34
+ this.cachedLength = size;
35
+ }
36
36
  toJSONObject() {
37
37
  return { pad: this.cachedLength, props: this.properties };
38
38
  }
@@ -69,12 +69,6 @@ PaddingSegment.typeString = "PaddingSegment";
69
69
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
70
70
  */
71
71
  export class RunSegment extends SubSequence {
72
- constructor(items) {
73
- super(items);
74
- this.items = items;
75
- this.type = RunSegment.typeString;
76
- this.tags = new Array(items.length).fill(undefined);
77
- }
78
72
  static is(segment) {
79
73
  return segment.type === RunSegment.typeString;
80
74
  }
@@ -88,6 +82,12 @@ export class RunSegment extends SubSequence {
88
82
  }
89
83
  return undefined;
90
84
  }
85
+ constructor(items) {
86
+ super(items);
87
+ this.items = items;
88
+ this.type = RunSegment.typeString;
89
+ this.tags = new Array(items.length).fill(undefined);
90
+ }
91
91
  clone(start = 0, end) {
92
92
  const b = new RunSegment(this.items.slice(start, end));
93
93
  if (this.tags) {
@@ -176,10 +176,6 @@ export function positionToRowCol(position) {
176
176
  * Use {@link @fluidframework/matrix#SharedMatrix} instead.
177
177
  */
178
178
  export class SparseMatrix extends SharedSegmentSequence {
179
- constructor(document, id, attributes) {
180
- super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
181
- this.id = id;
182
- }
183
179
  /**
184
180
  * Create a new sparse matrix
185
181
  *
@@ -198,6 +194,10 @@ export class SparseMatrix extends SharedSegmentSequence {
198
194
  static getFactory() {
199
195
  return new SparseMatrixFactory();
200
196
  }
197
+ constructor(document, id, attributes) {
198
+ super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
199
+ this.id = id;
200
+ }
201
201
  get numRows() {
202
202
  return positionToRowCol(this.getLength()).row;
203
203
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAuC,MAAM,4BAA4B,CAAC;AAU9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,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,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAhDa,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,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 { assert } from \"@fluidframework/core-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { BaseSegment, IJSONSegment, ISegment, PropertySet } from \"@fluidframework/merge-tree\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n\tSerializable,\n\tJsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SubSequence } from \"./sharedSequence\";\n\n/**\n * An empty segment that occupies 'cachedLength' positions.\n * {@link SparseMatrix} uses `PaddingSegment` to \"pad\" a run of unoccupied cells.\n *\n * @deprecated `PaddingSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type SparseMatrixItem = Serializable;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class RunSegment extends SubSequence<SparseMatrixItem> {\n\tpublic static readonly typeString = \"RunSegment\";\n\tpublic static is(segment: ISegment): segment is RunSegment {\n\t\treturn segment.type === RunSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"items\" in spec) {\n\t\t\tconst segment = new RunSegment(spec.items);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = RunSegment.typeString;\n\n\tprivate tags: any[];\n\n\tconstructor(public items: SparseMatrixItem[]) {\n\t\tsuper(items);\n\t\tthis.tags = new Array(items.length).fill(undefined);\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new RunSegment(this.items.slice(start, end));\n\t\tif (this.tags) {\n\t\t\tb.tags = this.tags.slice(start, end);\n\t\t}\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tsuper.append(segment);\n\n\t\tconst asRun = segment as RunSegment;\n\t\tif (asRun.tags) {\n\t\t\tif (this.tags) {\n\t\t\t\tthis.tags.splice(this.items.length, 0, ...asRun.tags);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t// TODO: retain removed items for undo\n\t// returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.tags.splice(start, end - start);\n\t\treturn super.removeRange(start, end);\n\t}\n\n\tpublic getTag(pos: number) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn this.tags[pos];\n\t}\n\n\tpublic setTag(pos: number, tag: any) {\n\t\tthis.tags[pos] = tag;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tif (pos > 0) {\n\t\t\tconst remainingItems = this.items.slice(pos);\n\t\t\tthis.items = this.items.slice(0, pos);\n\t\t\tthis.cachedLength = this.items.length;\n\n\t\t\tconst leafSegment = new RunSegment(remainingItems);\n\t\t\tleafSegment.tags = this.tags.slice(pos);\n\t\t\tthis.tags.length = pos;\n\n\t\t\treturn leafSegment;\n\t\t}\n\t}\n}\n\n/**\n * @deprecated `MatrixSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type MatrixSegment = RunSegment | PaddingSegment;\n\n/**\n * @deprecated `maxCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCol = 0x200000; // X128 Excel maximum of 16,384 columns\n\n/**\n * @deprecated `maxCols` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCols = maxCol + 1;\n\n/**\n * @deprecated `maxRow` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRow = 0xffffffff; // X4096 Excel maximum of 1,048,576 rows\n\n/**\n * @deprecated `maxRows` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRows = maxRow + 1;\n\n/**\n * @deprecated `maxCellPosition` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCellPosition = maxCol * maxRow;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const rowColToPosition = (row: number, col: number) => row * maxCols + col;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport function positionToRowCol(position: number) {\n\tconst row = Math.floor(position / maxCols);\n\tconst col = position - row * maxCols;\n\treturn { row, col };\n}\n\n/**\n * @deprecated `SparseMatrix` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {\n\t/**\n\t * Create a new sparse matrix\n\t *\n\t * @param runtime - data store runtime the new sparse matrix belongs to\n\t * @param id - optional name of the sparse matrix\n\t * @returns newly create sparse matrix (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n\t}\n\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedMap\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SparseMatrixFactory();\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, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n\tpublic static Attributes: IChannelAttributes = {\n\t\ttype: SparseMatrixFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic static segmentFromSpec(spec: IJSONSegment): ISegment {\n\t\tconst maybePadding = PaddingSegment.fromJSONObject(spec);\n\t\tif (maybePadding) {\n\t\t\treturn maybePadding;\n\t\t}\n\n\t\tconst maybeRun = RunSegment.fromJSONObject(spec);\n\t\tif (maybeRun) {\n\t\t\treturn maybeRun;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n\t}\n\n\tpublic get type() {\n\t\treturn SparseMatrixFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn SparseMatrixFactory.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<ISharedObject> {\n\t\tconst sharedObject = new SparseMatrix(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedObject = new SparseMatrix(document, id, this.attributes);\n\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,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,YAAY,EAAE;YACjB,OAAO,YAAY,CAAC;SACpB;QAED,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,QAAQ,EAAE;YACb,OAAO,QAAQ,CAAC;SAChB;QAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAED,IAAW,IAAI;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAhDa,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,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 { assert } from \"@fluidframework/core-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { BaseSegment, IJSONSegment, ISegment, PropertySet } from \"@fluidframework/merge-tree\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n\tSerializable,\n\tJsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SubSequence } from \"./sharedSequence\";\n\n/**\n * An empty segment that occupies 'cachedLength' positions.\n * {@link SparseMatrix} uses `PaddingSegment` to \"pad\" a run of unoccupied cells.\n *\n * @deprecated `PaddingSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type SparseMatrixItem = Serializable;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class RunSegment extends SubSequence<SparseMatrixItem> {\n\tpublic static readonly typeString = \"RunSegment\";\n\tpublic static is(segment: ISegment): segment is RunSegment {\n\t\treturn segment.type === RunSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"items\" in spec) {\n\t\t\tconst segment = new RunSegment(spec.items);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = RunSegment.typeString;\n\n\tprivate tags: any[];\n\n\tconstructor(public items: SparseMatrixItem[]) {\n\t\tsuper(items);\n\t\tthis.tags = new Array(items.length).fill(undefined);\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new RunSegment(this.items.slice(start, end));\n\t\tif (this.tags) {\n\t\t\tb.tags = this.tags.slice(start, end);\n\t\t}\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tsuper.append(segment);\n\n\t\tconst asRun = segment as RunSegment;\n\t\tif (asRun.tags) {\n\t\t\tif (this.tags) {\n\t\t\t\tthis.tags.splice(this.items.length, 0, ...asRun.tags);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n\n\t// TODO: retain removed items for undo\n\t// returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.tags.splice(start, end - start);\n\t\treturn super.removeRange(start, end);\n\t}\n\n\tpublic getTag(pos: number) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\treturn this.tags[pos];\n\t}\n\n\tpublic setTag(pos: number, tag: any) {\n\t\tthis.tags[pos] = tag;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tif (pos > 0) {\n\t\t\tconst remainingItems = this.items.slice(pos);\n\t\t\tthis.items = this.items.slice(0, pos);\n\t\t\tthis.cachedLength = this.items.length;\n\n\t\t\tconst leafSegment = new RunSegment(remainingItems);\n\t\t\tleafSegment.tags = this.tags.slice(pos);\n\t\t\tthis.tags.length = pos;\n\n\t\t\treturn leafSegment;\n\t\t}\n\t}\n}\n\n/**\n * @deprecated `MatrixSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport type MatrixSegment = RunSegment | PaddingSegment;\n\n/**\n * @deprecated `maxCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCol = 0x200000; // X128 Excel maximum of 16,384 columns\n\n/**\n * @deprecated `maxCols` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCols = maxCol + 1;\n\n/**\n * @deprecated `maxRow` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRow = 0xffffffff; // X4096 Excel maximum of 1,048,576 rows\n\n/**\n * @deprecated `maxRows` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxRows = maxRow + 1;\n\n/**\n * @deprecated `maxCellPosition` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const maxCellPosition = maxCol * maxRow;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport const rowColToPosition = (row: number, col: number) => row * maxCols + col;\n\n/**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport function positionToRowCol(position: number) {\n\tconst row = Math.floor(position / maxCols);\n\tconst col = position - row * maxCols;\n\treturn { row, col };\n}\n\n/**\n * @deprecated `SparseMatrix` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\nexport class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {\n\t/**\n\t * Create a new sparse matrix\n\t *\n\t * @param runtime - data store runtime the new sparse matrix belongs to\n\t * @param id - optional name of the sparse matrix\n\t * @returns newly create sparse matrix (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n\t}\n\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedMap\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SparseMatrixFactory();\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, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n\tpublic static Attributes: IChannelAttributes = {\n\t\ttype: SparseMatrixFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic static segmentFromSpec(spec: IJSONSegment): ISegment {\n\t\tconst maybePadding = PaddingSegment.fromJSONObject(spec);\n\t\tif (maybePadding) {\n\t\t\treturn maybePadding;\n\t\t}\n\n\t\tconst maybeRun = RunSegment.fromJSONObject(spec);\n\t\tif (maybeRun) {\n\t\t\treturn maybeRun;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n\t}\n\n\tpublic get type() {\n\t\treturn SparseMatrixFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn SparseMatrixFactory.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<ISharedObject> {\n\t\tconst sharedObject = new SparseMatrix(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedObject = new SparseMatrix(document, id, this.attributes);\n\t\tsharedObject.initializeLocal();\n\t\treturn sharedObject;\n\t}\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/sequence-deprecated",
3
- "version": "2.0.0-internal.6.4.0",
3
+ "version": "2.0.0-internal.7.0.0",
4
4
  "description": "Deprecated distributed sequences",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,22 +35,22 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluidframework/core-interfaces": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
39
- "@fluidframework/core-utils": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
40
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
41
- "@fluidframework/merge-tree": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
42
- "@fluidframework/sequence": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
43
- "@fluidframework/shared-object-base": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0"
38
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
39
+ "@fluidframework/core-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
40
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
41
+ "@fluidframework/merge-tree": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
42
+ "@fluidframework/sequence": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
43
+ "@fluidframework/shared-object-base": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@fluid-internal/test-dds-utils": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
47
- "@fluid-tools/build-cli": "^0.22.0",
46
+ "@fluid-internal/test-dds-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
47
+ "@fluid-tools/build-cli": "^0.24.0",
48
48
  "@fluidframework/build-common": "^2.0.0",
49
- "@fluidframework/build-tools": "^0.22.0",
49
+ "@fluidframework/build-tools": "^0.24.0",
50
50
  "@fluidframework/eslint-config-fluid": "^2.1.0",
51
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
52
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.6.4.0 <2.0.0-internal.6.5.0",
53
- "@microsoft/api-extractor": "^7.34.4",
51
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
52
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
53
+ "@microsoft/api-extractor": "^7.37.0",
54
54
  "@types/diff": "^3.5.1",
55
55
  "@types/mocha": "^9.1.1",
56
56
  "@types/node": "^16.18.38",
@@ -65,7 +65,7 @@
65
65
  "moment": "^2.21.0",
66
66
  "prettier": "~2.6.2",
67
67
  "rimraf": "^4.4.0",
68
- "typescript": "~4.5.5"
68
+ "typescript": "~5.1.6"
69
69
  },
70
70
  "typeValidation": {
71
71
  "disabled": true,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluid-experimental/sequence-deprecated";
9
- export const pkgVersion = "2.0.0-internal.6.4.0";
9
+ export const pkgVersion = "2.0.0-internal.7.0.0";