@fluidframework/matrix 2.0.0-internal.6.3.3 → 2.0.0-internal.7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/handletable.js +2 -2
- package/dist/handletable.js.map +1 -1
- package/dist/matrix.d.ts +1 -1
- package/dist/matrix.d.ts.map +1 -1
- package/dist/matrix.js +25 -23
- package/dist/matrix.js.map +1 -1
- package/dist/ops.js +1 -1
- package/dist/ops.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/permutationvector.d.ts.map +1 -1
- package/dist/permutationvector.js +17 -16
- package/dist/permutationvector.js.map +1 -1
- package/dist/sparsearray2d.d.ts +5 -5
- package/dist/sparsearray2d.d.ts.map +1 -1
- package/dist/sparsearray2d.js +3 -7
- package/dist/sparsearray2d.js.map +1 -1
- package/dist/tsdoc-metadata.json +1 -1
- package/lib/handletable.js +2 -2
- package/lib/handletable.js.map +1 -1
- package/lib/matrix.d.ts +1 -1
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +25 -23
- package/lib/matrix.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/permutationvector.d.ts.map +1 -1
- package/lib/permutationvector.js +17 -16
- package/lib/permutationvector.js.map +1 -1
- package/lib/sparsearray2d.d.ts +5 -5
- package/lib/sparsearray2d.d.ts.map +1 -1
- package/lib/sparsearray2d.js +3 -7
- package/lib/sparsearray2d.js.map +1 -1
- package/package.json +20 -21
- package/src/matrix.ts +15 -6
- package/src/packageVersion.ts +1 -1
- package/src/permutationvector.ts +1 -0
- package/src/sparsearray2d.ts +3 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/matrix",
|
|
3
|
-
"version": "2.0.0-internal.
|
|
3
|
+
"version": "2.0.0-internal.7.0.0",
|
|
4
4
|
"description": "Distributed matrix",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -31,32 +31,32 @@
|
|
|
31
31
|
"temp-directory": "nyc/.nyc_output"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@fluid-internal/client-utils": ">=2.0.0-internal.
|
|
35
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.
|
|
36
|
-
"@fluidframework/core-utils": ">=2.0.0-internal.
|
|
37
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.
|
|
38
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.
|
|
39
|
-
"@fluidframework/merge-tree": ">=2.0.0-internal.
|
|
40
|
-
"@fluidframework/protocol-definitions": "^
|
|
41
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.
|
|
42
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.
|
|
43
|
-
"@fluidframework/shared-object-base": ">=2.0.0-internal.
|
|
44
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.
|
|
34
|
+
"@fluid-internal/client-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
35
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
36
|
+
"@fluidframework/core-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
37
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
38
|
+
"@fluidframework/driver-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
39
|
+
"@fluidframework/merge-tree": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
40
|
+
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
41
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
42
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
43
|
+
"@fluidframework/shared-object-base": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
44
|
+
"@fluidframework/telemetry-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
45
45
|
"@tiny-calc/nano": "0.0.0-alpha.5",
|
|
46
46
|
"events": "^3.1.0",
|
|
47
47
|
"tslib": "^1.10.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@fluid-internal/test-dds-utils": ">=2.0.0-internal.
|
|
50
|
+
"@fluid-internal/test-dds-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
51
51
|
"@fluid-tools/benchmark": "^0.48.0",
|
|
52
|
-
"@fluid-tools/build-cli": "^0.
|
|
52
|
+
"@fluid-tools/build-cli": "^0.24.0",
|
|
53
53
|
"@fluidframework/build-common": "^2.0.0",
|
|
54
|
-
"@fluidframework/build-tools": "^0.
|
|
54
|
+
"@fluidframework/build-tools": "^0.24.0",
|
|
55
55
|
"@fluidframework/eslint-config-fluid": "^2.1.0",
|
|
56
|
-
"@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.0.0-internal.6.3.
|
|
57
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.
|
|
58
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.
|
|
59
|
-
"@microsoft/api-extractor": "^7.
|
|
56
|
+
"@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.0.0-internal.6.3.0",
|
|
57
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
58
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
|
|
59
|
+
"@microsoft/api-extractor": "^7.37.0",
|
|
60
60
|
"@tiny-calc/micro": "0.0.0-alpha.5",
|
|
61
61
|
"@types/mocha": "^9.1.1",
|
|
62
62
|
"@types/node": "^16.18.38",
|
|
@@ -72,9 +72,8 @@
|
|
|
72
72
|
"moment": "^2.21.0",
|
|
73
73
|
"prettier": "~2.6.2",
|
|
74
74
|
"rimraf": "^4.4.0",
|
|
75
|
-
"source-map-support": "^0.5.16",
|
|
76
75
|
"ts-node": "^10.9.1",
|
|
77
|
-
"typescript": "~
|
|
76
|
+
"typescript": "~5.1.6",
|
|
78
77
|
"uuid": "^9.0.0"
|
|
79
78
|
},
|
|
80
79
|
"typeValidation": {
|
package/src/matrix.ts
CHANGED
|
@@ -752,10 +752,16 @@ export class SharedMatrix<T = any>
|
|
|
752
752
|
* {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
|
|
753
753
|
*/
|
|
754
754
|
protected applyStashedOp(content: any): unknown {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
755
|
+
const parsedContent = parseHandles(content, this.serializer);
|
|
756
|
+
if (
|
|
757
|
+
parsedContent.target === SnapshotPath.cols ||
|
|
758
|
+
parsedContent.target === SnapshotPath.rows
|
|
759
|
+
) {
|
|
760
|
+
const op = parsedContent as IMergeTreeOp;
|
|
761
|
+
const currentVector =
|
|
762
|
+
parsedContent.target === SnapshotPath.cols ? this.cols : this.rows;
|
|
763
|
+
const oppositeVector =
|
|
764
|
+
parsedContent.target === SnapshotPath.cols ? this.rows : this.cols;
|
|
759
765
|
const metadata = currentVector.applyStashedOp(op);
|
|
760
766
|
const localSeq = currentVector.getCollabWindow().localSeq;
|
|
761
767
|
const oppositeWindow = oppositeVector.getCollabWindow();
|
|
@@ -770,9 +776,12 @@ export class SharedMatrix<T = any>
|
|
|
770
776
|
|
|
771
777
|
return metadata;
|
|
772
778
|
} else {
|
|
773
|
-
assert(
|
|
779
|
+
assert(
|
|
780
|
+
parsedContent.type === MatrixOp.set,
|
|
781
|
+
0x2da /* "Unknown SharedMatrix 'op' type." */,
|
|
782
|
+
);
|
|
774
783
|
|
|
775
|
-
const setOp =
|
|
784
|
+
const setOp = parsedContent as ISetOp<T>;
|
|
776
785
|
const rowHandle = this.rows.getAllocatedHandle(setOp.row);
|
|
777
786
|
const colHandle = this.cols.getAllocatedHandle(setOp.col);
|
|
778
787
|
const rowsRefSeq = this.rows.getCollabWindow().currentSeq;
|
package/src/packageVersion.ts
CHANGED
package/src/permutationvector.ts
CHANGED
package/src/sparsearray2d.ts
CHANGED
|
@@ -60,12 +60,8 @@ export class SparseArray2D<T>
|
|
|
60
60
|
{
|
|
61
61
|
constructor(private readonly root: UA<UA<UA<UA<UA<T>>>>> = [undefined]) {}
|
|
62
62
|
|
|
63
|
-
public
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
public get colCount() {
|
|
67
|
-
return 0xffffffff;
|
|
68
|
-
}
|
|
63
|
+
public readonly rowCount = 0xffffffff;
|
|
64
|
+
public readonly colCount = 0xffffffff;
|
|
69
65
|
|
|
70
66
|
public getCell(row: number, col: number): T | undefined {
|
|
71
67
|
const keyHi = r0c0ToMorton2x16(row >>> 16, col >>> 16);
|
|
@@ -226,7 +222,7 @@ export class SparseArray2D<T>
|
|
|
226
222
|
private getLevel<T>(parent: UA<UA<T>>, subKey: number) {
|
|
227
223
|
const level = parent[subKey];
|
|
228
224
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
229
|
-
return level
|
|
225
|
+
return level ?? (parent[subKey] = new Array(256).fill(undefined));
|
|
230
226
|
}
|
|
231
227
|
|
|
232
228
|
public snapshot() {
|