@fluid-experimental/sequence-deprecated 2.0.0-internal.3.0.2 → 2.0.0-internal.3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +9 -11
- package/.vscode/launch.json +14 -12
- package/api-extractor.json +10 -10
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/sequenceFactory.d.ts.map +1 -1
- package/dist/sequenceFactory.js.map +1 -1
- package/dist/sharedNumberSequence.d.ts.map +1 -1
- package/dist/sharedNumberSequence.js.map +1 -1
- package/dist/sharedObjectSequence.d.ts.map +1 -1
- package/dist/sharedObjectSequence.js.map +1 -1
- package/dist/sparsematrix.d.ts +2 -1
- package/dist/sparsematrix.d.ts.map +1 -1
- package/dist/sparsematrix.js +4 -4
- package/dist/sparsematrix.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/sequenceFactory.d.ts.map +1 -1
- package/lib/sequenceFactory.js.map +1 -1
- package/lib/sharedNumberSequence.d.ts.map +1 -1
- package/lib/sharedNumberSequence.js.map +1 -1
- package/lib/sharedObjectSequence.d.ts.map +1 -1
- package/lib/sharedObjectSequence.js.map +1 -1
- package/lib/sparsematrix.d.ts +2 -1
- package/lib/sparsematrix.d.ts.map +1 -1
- package/lib/sparsematrix.js +4 -4
- package/lib/sparsematrix.js.map +1 -1
- package/package.json +40 -40
- package/prettier.config.cjs +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/sequenceFactory.ts +155 -155
- package/src/sharedNumberSequence.ts +48 -45
- package/src/sharedObjectSequence.ts +50 -39
- package/src/sparsematrix.ts +369 -365
- package/tsconfig.esnext.json +6 -6
- package/tsconfig.json +8 -12
- package/.editorconfig +0 -7
package/.eslintrc.js
CHANGED
|
@@ -4,14 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
}
|
|
7
|
+
extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
|
|
8
|
+
parserOptions: {
|
|
9
|
+
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
"@typescript-eslint/no-use-before-define": "off",
|
|
13
|
+
"@typescript-eslint/strict-boolean-expressions": "off",
|
|
14
|
+
},
|
|
15
|
+
};
|
package/.vscode/launch.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
"version": "0.2.0",
|
|
6
|
+
"configurations": [
|
|
7
|
+
{
|
|
8
|
+
"name": "Sequence Test",
|
|
9
|
+
"type": "node",
|
|
10
|
+
"request": "launch",
|
|
11
|
+
"program": "${workspaceRoot}/../../../node_modules/mocha/bin/_mocha",
|
|
12
|
+
"args": ["dist/test", "--no-timeouts", "--exit"],
|
|
13
|
+
"cwd": "${workspaceRoot}"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
14
16
|
}
|
package/api-extractor.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "@fluidframework/build-common/api-extractor-common-report.json",
|
|
4
|
+
"messages": {
|
|
5
|
+
"extractorMessageReporting": {
|
|
6
|
+
"ae-internal-missing-underscore": {
|
|
7
|
+
"logLevel": "none",
|
|
8
|
+
"addToApiReportFile": false
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
12
|
}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -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.3.0
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.3.2.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/dist/packageVersion.js
CHANGED
|
@@ -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.3.0
|
|
11
|
+
exports.pkgVersion = "2.0.0-internal.3.2.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.3.0
|
|
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.3.2.0\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAmB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKxE;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IAClE;;;OAGG;IACH,OAAc,IAAI,SAAiE;IAEnF;;;OAGG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;IAazE;;;OAGG;IACH,IAAW,IAAI,WAEd;IAED;;;OAGG;IACH,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AAK,EAAE;YAClB,MAAM,GAAG,GAAG,IAAI,sBAAW,CAAS,UAAU,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,UAAU,CAAC,KAAK,EAAE;gBAClB,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aACvC;YACD,OAAO,GAAG,CAAC;SACd;QAED,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAChD,CAAC;IAED;;;OAGG;IACH,IAAW,IAAI;QACX,OAAO,2BAA2B,CAAC,IAAI,CAAC;IAC5C,CAAC;IAED;;;OAGG;IACH,IAAW,UAAU;QACjB,OAAO,2BAA2B,CAAC,UAAU,CAAC;IAClD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CACb,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAC9B,MAAM,SAAS,GAAG,IAAI,2CAAoB,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,SAAS,CAAC;IACrB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAgC,EAAE,EAAU;QACtD,MAAM,YAAY,GAAG,IAAI,2CAAoB,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7E,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACxB,CAAC;;AA1EL,kEA2EC;AA1EG;;;GAGG;AACW,gCAAI,GAAG,6DAA6D,CAAC;AAEnF;;;GAGG;AACoB,sCAAU,GAAuB;IACpD,IAAI,EAAE,2BAA2B,CAAC,IAAI;IACtC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,2BAAU;CAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IChannelAttributes,\n IFluidDataStoreRuntime,\n IChannelServices,\n IChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport {\n IJSONSegment,\n} from \"@fluidframework/merge-tree\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence\";\n\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 SharedObjectSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/object-sequence\";\n\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedObjectSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\n\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object> {\n const runSegment = segSpec as IJSONRunSegment<object>;\n if (runSegment.items) {\n const seg = new SubSequence<object>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\n }\n\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 */\n public get type() {\n return SharedObjectSequenceFactory.Type;\n }\n\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 */\n public get attributes() {\n return SharedObjectSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedObjectSequence<object>(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\n }\n\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedObjectSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\n}\n\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 SharedNumberSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/number-sequence\";\n\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedNumberSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\n\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number> {\n const runSegment = segSpec as IJSONRunSegment<number>;\n if (runSegment.items) {\n const seg = new SubSequence<number>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\n }\n\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 */\n public get type() {\n return SharedNumberSequenceFactory.Type;\n }\n\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 */\n public get attributes() {\n return SharedNumberSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedNumberSequence(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\n }\n\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedNumberSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sequenceFactory.js","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAUH,uDAAwE;AACxE,qDAA8C;AAC9C,iEAA8D;AAC9D,iEAA8D;AAE9D;;;GAGG;AACH,MAAa,2BAA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,2BAA2B,CAAC,IAAI;IACtC,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 {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { IJSONSegment } from \"@fluidframework/merge-tree\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence\";\n\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 SharedObjectSequenceFactory implements IChannelFactory {\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 Type = \"https://graph.microsoft.com/types/mergeTree/object-sequence\";\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 static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedObjectSequenceFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\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 static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object> {\n\t\tconst runSegment = segSpec as IJSONRunSegment<object>;\n\t\tif (runSegment.items) {\n\t\t\tconst seg = new SubSequence<object>(runSegment.items);\n\t\t\tif (runSegment.props) {\n\t\t\t\tseg.addProperties(runSegment.props);\n\t\t\t}\n\t\t\treturn seg;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject`);\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 get type() {\n\t\treturn SharedObjectSequenceFactory.Type;\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 get attributes() {\n\t\treturn SharedObjectSequenceFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 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 sharedSeq = new SharedObjectSequence<object>(runtime, id, attributes);\n\t\tawait sharedSeq.load(services);\n\t\treturn sharedSeq;\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 create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedString = new SharedObjectSequence(document, id, this.attributes);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n\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 SharedNumberSequenceFactory implements IChannelFactory {\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 Type = \"https://graph.microsoft.com/types/mergeTree/number-sequence\";\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 static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedNumberSequenceFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\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 static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number> {\n\t\tconst runSegment = segSpec as IJSONRunSegment<number>;\n\t\tif (runSegment.items) {\n\t\t\tconst seg = new SubSequence<number>(runSegment.items);\n\t\t\tif (runSegment.props) {\n\t\t\t\tseg.addProperties(runSegment.props);\n\t\t\t}\n\t\t\treturn seg;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject`);\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 get type() {\n\t\treturn SharedNumberSequenceFactory.Type;\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 get attributes() {\n\t\treturn SharedNumberSequenceFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 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 sharedSeq = new SharedNumberSequence(runtime, id, attributes);\n\t\tawait sharedSeq.load(services);\n\t\treturn sharedSeq;\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 create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedString = new SharedNumberSequence(document, id, this.attributes);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAiCvD,EAAE,EAAE,MAAM;IAhClB;;;;;;;;;OASG;WACW,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIjE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBAEF,QAAQ,EAAE,sBAAsB,EACzB,EAAE,EAAE,MAAM,EACjB,UAAU,EAAE,kBAAkB;IAW/B;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAG3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAA0D;AAC1D,uDAAgE;AAEhE;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,yBAAsB;
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,uDAA0D;AAC1D,uDAAgE;AAEhE;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,yBAAsB;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 { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAqCrD,EAAE,EAAE,MAAM;IApClB;;;;;;;;;OASG;WAEW,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAOpE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBAEF,QAAQ,EAAE,sBAAsB,EACzB,EAAE,EAAE,MAAM,EACjB,UAAU,EAAE,kBAAkB;IAK/B;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE;CAG/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,uDAA0D;AAC1D,uDAAgE;AAEhE;;;;;;;;GAQG;AACH,MAAa,oBAAwB,SAAQ,yBAAiB;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 { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\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"]}
|
package/dist/sparsematrix.d.ts
CHANGED
|
@@ -121,7 +121,8 @@ export declare class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {
|
|
|
121
121
|
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
122
122
|
get numRows(): number;
|
|
123
123
|
setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet): void;
|
|
124
|
-
getItem(row: number, col: number):
|
|
124
|
+
getItem(row: number, col: number): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports
|
|
125
|
+
Jsonable<string | number | boolean | IFluidHandle> | undefined;
|
|
125
126
|
getTag(row: number, col: number): any;
|
|
126
127
|
setTag(row: number, col: number, tag: any): void;
|
|
127
128
|
insertRows(row: number, numRows: number): void;
|
|
@@ -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,
|
|
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,EACN,WAAW,EAEX,YAAY,EAEZ,QAAQ,EACR,WAAW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
|
}
|
|
56
56
|
// Returns true if entire run removed
|
|
57
57
|
removeRange(start, end) {
|
|
58
|
-
this.cachedLength -=
|
|
59
|
-
return
|
|
58
|
+
this.cachedLength -= end - start;
|
|
59
|
+
return this.cachedLength === 0;
|
|
60
60
|
}
|
|
61
61
|
createSplitSegmentAt(pos) {
|
|
62
62
|
const leftLength = pos;
|
|
@@ -150,7 +150,7 @@ exports.maxCols = exports.maxCol + 1;
|
|
|
150
150
|
* @deprecated `maxRow` is part of an abandoned prototype.
|
|
151
151
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
152
152
|
*/
|
|
153
|
-
exports.maxRow =
|
|
153
|
+
exports.maxRow = 0xffffffff; // X4096 Excel maximum of 1,048,576 rows
|
|
154
154
|
/**
|
|
155
155
|
* @deprecated `maxRows` is part of an abandoned prototype.
|
|
156
156
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
@@ -173,7 +173,7 @@ exports.rowColToPosition = rowColToPosition;
|
|
|
173
173
|
*/
|
|
174
174
|
function positionToRowCol(position) {
|
|
175
175
|
const row = Math.floor(position / exports.maxCols);
|
|
176
|
-
const col = position -
|
|
176
|
+
const col = position - row * exports.maxCols;
|
|
177
177
|
return { row, col };
|
|
178
178
|
}
|
|
179
179
|
exports.positionToRowCol = positionToRowCol;
|
package/dist/sparsematrix.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAEtD,2DAOoC;AASpC,uDAA8E;AAE9E,qDAA8C;AAE9C;;;;;;GAMG;AACH,MAAa,cAAe,SAAQ,wBAAW;IAiB3C,YAAY,IAAY;QACpB,KAAK,EAAE,CAAC;QAHI,SAAI,GAAG,cAAc,CAAC,UAAU,CAAC;QAI7C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAlBM,MAAM,CAAC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,IAAI,YAAY,EAAE;YACd,OAAO,YAAY,CAAC;SACvB;QAED,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,QAAQ,EAAE;YACV,OAAO,QAAQ,CAAC;SACnB;QAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC3E,CAAC;IAED,IAAW,IAAI;QACX,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACpC,CAAC;IAED,IAAW,UAAU;QACjB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CACb,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;IACxB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACtD,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;IACxB,CAAC;;AAjDL,kDAkDC;AAjDiB,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC3C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,2BAAU;CAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/common-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n BaseSegment,\n createGroupOp,\n IJSONSegment,\n IMergeTreeDeltaOp,\n ISegment,\n PropertySet,\n} from \"@fluidframework/merge-tree\";\nimport {\n IChannelAttributes,\n IFluidDataStoreRuntime,\n IChannelServices,\n IChannelFactory,\n Serializable,\n Jsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedSegmentSequence, SubSequence } from \"@fluidframework/sequence\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { pkgVersion } from \"./packageVersion\";\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 public static readonly typeString = \"PaddingSegment\";\n public static is(segment: ISegment): segment is PaddingSegment {\n return segment.type === PaddingSegment.typeString;\n }\n public static fromJSONObject(spec: any) {\n if (spec && typeof spec === \"object\" && \"pad\" in spec) {\n const segment = new PaddingSegment(spec.pad);\n if (spec.props) {\n segment.addProperties(spec.props);\n }\n return segment;\n }\n return undefined;\n }\n public readonly type = PaddingSegment.typeString;\n\n constructor(size: number) {\n super();\n this.cachedLength = size;\n }\n\n public toJSONObject() {\n return { pad: this.cachedLength, props: this.properties };\n }\n\n public clone(start = 0, end?: number) {\n const b = new PaddingSegment(this.cachedLength);\n this.cloneInto(b);\n return b;\n }\n\n public canAppend(segment: ISegment) {\n return PaddingSegment.is(segment);\n }\n\n public toString() {\n return `[padding: ${this.cachedLength}]`;\n }\n\n public append(segment: ISegment) {\n assert(PaddingSegment.is(segment), \"can only append padding segment\");\n super.append(segment);\n }\n\n // Returns true if entire run removed\n public removeRange(start: number, end: number) {\n this.cachedLength -= (end - start);\n return (this.cachedLength === 0);\n }\n\n protected createSplitSegmentAt(pos: number) {\n const leftLength = pos;\n const rightLength = this.cachedLength - pos;\n\n this.cachedLength = leftLength;\n return new PaddingSegment(rightLength);\n }\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 public static readonly typeString = \"RunSegment\";\n public static is(segment: ISegment): segment is RunSegment {\n return segment.type === RunSegment.typeString;\n }\n public static fromJSONObject(spec: any) {\n if (spec && typeof spec === \"object\" && \"items\" in spec) {\n const segment = new RunSegment(spec.items);\n if (spec.props) {\n segment.addProperties(spec.props);\n }\n return segment;\n }\n return undefined;\n }\n public readonly type = RunSegment.typeString;\n\n private tags: any[];\n\n constructor(public items: SparseMatrixItem[]) {\n super(items);\n this.tags = new Array(items.length).fill(undefined);\n }\n\n public clone(start = 0, end?: number) {\n const b = new RunSegment(this.items.slice(start, end));\n if (this.tags) {\n b.tags = this.tags.slice(start, end);\n }\n this.cloneInto(b);\n return b;\n }\n\n public append(segment: ISegment) {\n super.append(segment);\n\n const asRun = segment as RunSegment;\n if (asRun.tags) {\n if (this.tags) {\n this.tags.splice(this.items.length, 0, ...asRun.tags);\n }\n }\n\n return this;\n }\n\n // TODO: retain removed items for undo\n // returns true if entire run removed\n public removeRange(start: number, end: number) {\n this.tags.splice(start, end - start);\n return super.removeRange(start, end);\n }\n\n public getTag(pos: number) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return this.tags[pos];\n }\n\n public setTag(pos: number, tag: any) {\n this.tags[pos] = tag;\n }\n\n protected createSplitSegmentAt(pos: number) {\n if (pos > 0) {\n const remainingItems = this.items.slice(pos);\n this.items = this.items.slice(0, pos);\n this.cachedLength = this.items.length;\n\n const leafSegment = new RunSegment(remainingItems);\n leafSegment.tags = this.tags.slice(pos);\n this.tags.length = pos;\n\n return leafSegment;\n }\n }\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 */\n export const maxCols = maxCol + 1;\n\n /**\n * @deprecated `maxRow` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\n export 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 */\n export const maxRows = maxRow + 1;\n\n /**\n * @deprecated `maxCellPosition` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\n export const maxCellPosition = maxCol * maxRow;\n\n /**\n * @deprecated `positionToRowCol` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n */\n export 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 const row = Math.floor(position / maxCols);\n const col = position - (row * maxCols);\n return { 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 /**\n * Create a new sparse matrix\n *\n * @param runtime - data store runtime the new sparse matrix belongs to\n * @param id - optional name of the sparse matrix\n * @returns newly create sparse matrix (but not attached yet)\n */\n public static create(runtime: IFluidDataStoreRuntime, id?: string) {\n return runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n }\n\n /**\n * Get a factory for SharedMap to register with the data store.\n *\n * @returns a factory that creates and load SharedMap\n */\n public static getFactory(): IChannelFactory {\n return new SparseMatrixFactory();\n }\n\n constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {\n super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);\n }\n\n public get numRows() {\n return positionToRowCol(this.getLength()).row;\n }\n\n public setItems(\n row: number,\n col: number,\n values: SparseMatrixItem[],\n props?: PropertySet,\n ) {\n const start = rowColToPosition(row, col);\n const end = start + values.length;\n const segment = new RunSegment(values);\n if (props) {\n segment.addProperties(props);\n }\n\n this.replaceRange(start, end, segment);\n }\n\n public getItem(row: number, col: number):\n // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n Jsonable<string | number | boolean | IFluidHandle> | undefined {\n const pos = rowColToPosition(row, col);\n const { segment, offset } = this.getContainingSegment(pos);\n if (segment && RunSegment.is(segment)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return segment.items[offset ?? 0];\n } else if (segment && PaddingSegment.is(segment)) {\n return undefined;\n }\n\n throw new Error(`Unrecognized Segment type`);\n }\n\n public getTag(row: number, col: number) {\n const { segment, offset } = this.getSegment(row, col);\n if (segment && RunSegment.is(segment)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return segment.getTag(offset ?? 0);\n }\n return undefined;\n }\n\n public setTag(row: number, col: number, tag: any) {\n const { segment, offset } = this.getSegment(row, col);\n if (segment && RunSegment.is(segment)) {\n segment.setTag(offset ?? 0, tag);\n } else if (tag !== undefined) {\n throw new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n }\n }\n\n public insertRows(row: number, numRows: number) {\n const pos = rowColToPosition(row, 0);\n const size = maxCols * numRows;\n const segment = new PaddingSegment(size);\n\n const insertOp = this.client.insertSegmentLocal(pos, segment);\n if (insertOp) {\n this.submitSequenceMessage(insertOp);\n }\n }\n\n public removeRows(row: number, numRows: number) {\n const pos = rowColToPosition(row, 0);\n const size = maxCols * numRows;\n this.removeRange(pos, pos + size);\n }\n\n public insertCols(col: number, numCols: number) {\n this.moveAsPadding(maxCol - numCols, col, numCols);\n }\n\n public removeCols(col: number, numCols: number) {\n this.moveAsPadding(col, maxCol - numCols, numCols);\n }\n\n public annotatePosition(row: number, col: number, props: PropertySet) {\n const pos = rowColToPosition(row, col);\n this.annotateRange(pos, pos + 1, props);\n }\n\n public getPositionProperties(row: number, col: number) {\n const pos = rowColToPosition(row, col);\n return this.getPropertiesAtPosition(pos);\n }\n\n // For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n // at 'destCol'. Used by insertCols and removeCols.\n private moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n const removeColStart = srcCol;\n const removeColEnd = srcCol + numCols;\n const ops: IMergeTreeDeltaOp[] = [];\n\n for (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n const removeMsg = this.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n if (removeMsg) {\n ops.push(removeMsg);\n }\n const insertPos = rowStart + destCol;\n const segment = new PaddingSegment(numCols);\n const insertMsg = this.client.insertSegmentLocal(insertPos, segment);\n if (insertMsg) {\n ops.push(insertMsg);\n }\n }\n\n this.submitSequenceMessage(createGroupOp(...ops));\n }\n\n private getSegment(row: number, col: number) {\n const pos = rowColToPosition(row, col);\n return this.getContainingSegment(pos);\n }\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n public static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n public static Attributes: IChannelAttributes = {\n type: SparseMatrixFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\n\n public static segmentFromSpec(spec: IJSONSegment): ISegment {\n const maybePadding = PaddingSegment.fromJSONObject(spec);\n if (maybePadding) {\n return maybePadding;\n }\n\n const maybeRun = RunSegment.fromJSONObject(spec);\n if (maybeRun) {\n return maybeRun;\n }\n\n throw new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n }\n\n public get type() {\n return SparseMatrixFactory.Type;\n }\n\n public get attributes() {\n return SparseMatrixFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes,\n ): Promise<ISharedObject> {\n const sharedObject = new SparseMatrix(runtime, id, attributes);\n await sharedObject.load(services);\n return sharedObject;\n }\n\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedObject = new SparseMatrix(document, id, this.attributes);\n sharedObject.initializeLocal();\n return sharedObject;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsD;AAEtD,2DAOoC;AASpC,uDAA8E;AAE9E,qDAA8C;AAE9C;;;;;;GAMG;AACH,MAAa,cAAe,SAAQ,wBAAW;IAiB9C,YAAY,IAAY;QACvB,KAAK,EAAE,CAAC;QAHO,SAAI,GAAG,cAAc,CAAC,UAAU,CAAC;QAIhD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC1B,CAAC;IAlBM,MAAM,CAAC,EAAE,CAAC,OAAiB;QACjC,OAAO,OAAO,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,CAAC;IACnD,CAAC;IACM,MAAM,CAAC,cAAc,CAAC,IAAS;QACrC,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,IAAI,IAAI,EAAE;YACtD,MAAM,OAAO,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC7C,IAAI,IAAI,CAAC,KAAK,EAAE;gBACf,OAAO,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;aAClC;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,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/common-utils\";\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport {\n\tBaseSegment,\n\tcreateGroupOp,\n\tIJSONSegment,\n\tIMergeTreeDeltaOp,\n\tISegment,\n\tPropertySet,\n} from \"@fluidframework/merge-tree\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n\tSerializable,\n\tJsonable,\n} from \"@fluidframework/datastore-definitions\";\nimport { SharedSegmentSequence, SubSequence } from \"@fluidframework/sequence\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { pkgVersion } from \"./packageVersion\";\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), \"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\tconst insertOp = this.client.insertSegmentLocal(pos, segment);\n\t\tif (insertOp) {\n\t\t\tthis.submitSequenceMessage(insertOp);\n\t\t}\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\t\tconst ops: IMergeTreeDeltaOp[] = [];\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tconst removeMsg = this.client.removeRangeLocal(\n\t\t\t\trowStart + removeColStart,\n\t\t\t\trowStart + removeColEnd,\n\t\t\t);\n\t\t\tif (removeMsg) {\n\t\t\t\tops.push(removeMsg);\n\t\t\t}\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tconst insertMsg = this.client.insertSegmentLocal(insertPos, segment);\n\t\t\tif (insertMsg) {\n\t\t\t\tops.push(insertMsg);\n\t\t\t}\n\t\t}\n\n\t\tthis.submitSequenceMessage(createGroupOp(...ops));\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/lib/packageVersion.d.ts
CHANGED
|
@@ -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.3.0
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.3.2.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.js
CHANGED
|
@@ -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.3.0
|
|
8
|
+
export const pkgVersion = "2.0.0-internal.3.2.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.3.0
|
|
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.3.2.0\";\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAmB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKxE;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IAClE;;;OAGG;IACH,OAAc,IAAI,SAAiE;IAEnF;;;OAGG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;IAazE;;;OAGG;IACH,IAAW,IAAI,WAEd;IAED;;;OAGG;IACH,IA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EAAE,UAAU;CAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IChannelAttributes,\n IFluidDataStoreRuntime,\n IChannelServices,\n IChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport {\n IJSONSegment,\n} from \"@fluidframework/merge-tree\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence\";\n\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 SharedObjectSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/object-sequence\";\n\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedObjectSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\n\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object> {\n const runSegment = segSpec as IJSONRunSegment<object>;\n if (runSegment.items) {\n const seg = new SubSequence<object>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\n }\n\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 */\n public get type() {\n return SharedObjectSequenceFactory.Type;\n }\n\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 */\n public get attributes() {\n return SharedObjectSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedObjectSequence<object>(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\n }\n\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedObjectSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\n}\n\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 SharedNumberSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/number-sequence\";\n\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedNumberSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\n\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number> {\n const runSegment = segSpec as IJSONRunSegment<number>;\n if (runSegment.items) {\n const seg = new SubSequence<number>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\n }\n\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 */\n public get type() {\n return SharedNumberSequenceFactory.Type;\n }\n\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 */\n public get attributes() {\n return SharedNumberSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedNumberSequence(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\n }\n\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedNumberSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sequenceFactory.js","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names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AAoB,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7E,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AA1ED;;;GAGG;AACW,gCAAI,GAAG,6DAA6D,CAAC;AAEnF;;;GAGG;AACoB,sCAAU,GAAuB;IACvD,IAAI,EAAE,2BAA2B,CAAC,IAAI;IACtC,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport { IJSONSegment } from \"@fluidframework/merge-tree\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence\";\n\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 SharedObjectSequenceFactory implements IChannelFactory {\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 Type = \"https://graph.microsoft.com/types/mergeTree/object-sequence\";\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 static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedObjectSequenceFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\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 static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object> {\n\t\tconst runSegment = segSpec as IJSONRunSegment<object>;\n\t\tif (runSegment.items) {\n\t\t\tconst seg = new SubSequence<object>(runSegment.items);\n\t\t\tif (runSegment.props) {\n\t\t\t\tseg.addProperties(runSegment.props);\n\t\t\t}\n\t\t\treturn seg;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject`);\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 get type() {\n\t\treturn SharedObjectSequenceFactory.Type;\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 get attributes() {\n\t\treturn SharedObjectSequenceFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 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 sharedSeq = new SharedObjectSequence<object>(runtime, id, attributes);\n\t\tawait sharedSeq.load(services);\n\t\treturn sharedSeq;\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 create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedString = new SharedObjectSequence(document, id, this.attributes);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n\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 SharedNumberSequenceFactory implements IChannelFactory {\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 Type = \"https://graph.microsoft.com/types/mergeTree/number-sequence\";\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 static readonly Attributes: IChannelAttributes = {\n\t\ttype: SharedNumberSequenceFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\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 static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number> {\n\t\tconst runSegment = segSpec as IJSONRunSegment<number>;\n\t\tif (runSegment.items) {\n\t\t\tconst seg = new SubSequence<number>(runSegment.items);\n\t\t\tif (runSegment.props) {\n\t\t\t\tseg.addProperties(runSegment.props);\n\t\t\t}\n\t\t\treturn seg;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject`);\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 get type() {\n\t\treturn SharedNumberSequenceFactory.Type;\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 get attributes() {\n\t\treturn SharedNumberSequenceFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 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 sharedSeq = new SharedNumberSequence(runtime, id, attributes);\n\t\tawait sharedSeq.load(services);\n\t\treturn sharedSeq;\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 create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedString = new SharedNumberSequence(document, id, this.attributes);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAiCvD,EAAE,EAAE,MAAM;IAhClB;;;;;;;;;OASG;WACW,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIjE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBAEF,QAAQ,EAAE,sBAAsB,EACzB,EAAE,EAAE,MAAM,EACjB,UAAU,EAAE,kBAAkB;IAW/B;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAG3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAsB;
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;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 { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAqCrD,EAAE,EAAE,MAAM;IApClB;;;;;;;;;OASG;WAEW,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAOpE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBAEF,QAAQ,EAAE,sBAAsB,EACzB,EAAE,EAAE,MAAM,EACjB,UAAU,EAAE,kBAAkB;IAK/B;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE;CAG/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;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 { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\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"]}
|
package/lib/sparsematrix.d.ts
CHANGED
|
@@ -121,7 +121,8 @@ export declare class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {
|
|
|
121
121
|
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
122
122
|
get numRows(): number;
|
|
123
123
|
setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet): void;
|
|
124
|
-
getItem(row: number, col: number):
|
|
124
|
+
getItem(row: number, col: number): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports
|
|
125
|
+
Jsonable<string | number | boolean | IFluidHandle> | undefined;
|
|
125
126
|
getTag(row: number, col: number): any;
|
|
126
127
|
setTag(row: number, col: number, tag: any): void;
|
|
127
128
|
insertRows(row: number, numRows: number): void;
|