@fluidframework/matrix 2.0.0-dev-rc.3.0.0.254513 → 2.0.0-dev-rc.3.0.0.254866

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.
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ IRevertible,
13
+ ISharedMatrix,
14
+ ISharedMatrixEvents,
15
+ IUndoConsumer,
16
+ MatrixItem,
17
+ SharedMatrix,
18
+ SharedMatrixFactory
19
+ } from "./index.js";
package/dist/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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 = "@fluidframework/matrix";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254866";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/matrix";
11
- exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
11
+ exports.pkgVersion = "2.0.0-dev-rc.3.0.0.254866";
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,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,2BAA2B,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 = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254513\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,2BAA2B,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 = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254866\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/lib/alpha.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
10
+ export {
11
+ // alpha APIs
12
+ IRevertible,
13
+ ISharedMatrix,
14
+ ISharedMatrixEvents,
15
+ IUndoConsumer,
16
+ MatrixItem,
17
+ SharedMatrix,
18
+ SharedMatrixFactory
19
+ } from "./index.js";
package/lib/beta.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
@@ -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 = "@fluidframework/matrix";
8
- export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export declare const pkgVersion = "2.0.0-dev-rc.3.0.0.254866";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/matrix";
8
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
8
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254866";
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,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,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 = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254513\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,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 = \"@fluidframework/matrix\";\nexport const pkgVersion = \"2.0.0-dev-rc.3.0.0.254866\";\n"]}
@@ -0,0 +1,9 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /*
7
+ * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
8
+ * Generated by "flub generate entrypoints" in @fluidframework/build-tools.
9
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/matrix",
3
- "version": "2.0.0-dev-rc.3.0.0.254513",
3
+ "version": "2.0.0-dev-rc.3.0.0.254866",
4
4
  "description": "Distributed matrix",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/matrix-public.d.ts",
18
+ "types": "./lib/public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/matrix-public.d.ts",
22
+ "types": "./dist/public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
26
  "./alpha": {
27
27
  "import": {
28
- "types": "./lib/matrix-alpha.d.ts",
28
+ "types": "./lib/alpha.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/matrix-alpha.d.ts",
32
+ "types": "./dist/alpha.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -45,7 +45,7 @@
45
45
  }
46
46
  },
47
47
  "main": "dist/index.js",
48
- "types": "./dist/matrix-public.d.ts",
48
+ "types": "./dist/public.d.ts",
49
49
  "c8": {
50
50
  "all": true,
51
51
  "cache-dir": "nyc/.cache",
@@ -63,17 +63,17 @@
63
63
  "temp-directory": "nyc/.nyc_output"
64
64
  },
65
65
  "dependencies": {
66
- "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254513",
67
- "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254513",
68
- "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254513",
69
- "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254513",
70
- "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254513",
71
- "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254513",
66
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.3.0.0.254866",
67
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.3.0.0.254866",
68
+ "@fluidframework/core-utils": "2.0.0-dev-rc.3.0.0.254866",
69
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.3.0.0.254866",
70
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.3.0.0.254866",
71
+ "@fluidframework/merge-tree": "2.0.0-dev-rc.3.0.0.254866",
72
72
  "@fluidframework/protocol-definitions": "^3.2.0",
73
- "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254513",
74
- "@fluidframework/runtime-utils": "2.0.0-dev-rc.3.0.0.254513",
75
- "@fluidframework/shared-object-base": "2.0.0-dev-rc.3.0.0.254513",
76
- "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254513",
73
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.3.0.0.254866",
74
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.3.0.0.254866",
75
+ "@fluidframework/shared-object-base": "2.0.0-dev-rc.3.0.0.254866",
76
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.3.0.0.254866",
77
77
  "@tiny-calc/nano": "0.0.0-alpha.5",
78
78
  "double-ended-queue": "^2.1.0-0",
79
79
  "tslib": "^1.10.0"
@@ -81,17 +81,17 @@
81
81
  "devDependencies": {
82
82
  "@arethetypeswrong/cli": "^0.15.2",
83
83
  "@biomejs/biome": "^1.6.2",
84
- "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254513",
85
- "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.3.0.0.254513",
86
- "@fluid-private/test-dds-utils": "2.0.0-dev-rc.3.0.0.254513",
84
+ "@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.3.0.0.254866",
85
+ "@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.3.0.0.254866",
86
+ "@fluid-private/test-dds-utils": "2.0.0-dev-rc.3.0.0.254866",
87
87
  "@fluid-tools/benchmark": "^0.48.0",
88
88
  "@fluid-tools/build-cli": "^0.35.0",
89
89
  "@fluidframework/build-common": "^2.0.3",
90
90
  "@fluidframework/build-tools": "^0.35.0",
91
- "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254513",
91
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.3.0.0.254866",
92
92
  "@fluidframework/eslint-config-fluid": "^5.1.0",
93
93
  "@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.0.0-internal.8.0.0",
94
- "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254513",
94
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.3.0.0.254866",
95
95
  "@microsoft/api-extractor": "^7.42.3",
96
96
  "@tiny-calc/micro": "0.0.0-alpha.5",
97
97
  "@types/double-ended-queue": "^2.1.0",
@@ -113,31 +113,19 @@
113
113
  "ts-node": "^10.9.1",
114
114
  "typescript": "~5.1.6"
115
115
  },
116
- "fluidBuild": {
117
- "tasks": {
118
- "build:docs": {
119
- "dependsOn": [
120
- "...",
121
- "api-extractor:commonjs",
122
- "api-extractor:esnext"
123
- ],
124
- "script": false
125
- }
126
- }
127
- },
128
116
  "typeValidation": {
129
117
  "broken": {}
130
118
  },
131
119
  "scripts": {
132
120
  "api": "fluid-build . --task api",
133
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
134
- "api-extractor:esnext": "api-extractor run --local",
121
+ "api-extractor:commonjs": "flub generate entrypoints --outDir ./dist",
122
+ "api-extractor:esnext": "flub generate entrypoints --outDir ./lib",
135
123
  "bench": "cd bench && node --expose-gc -r ts-node/register src/index.ts",
136
124
  "bench:profile": "cd bench && node -r ts-node/register --prof --logfile=profile.log --no-logfile-per-isolate src/index.ts --runInBand && node --prof-process profile.log > profile.txt && rimraf profile.log && echo See results in bench/profile.txt",
137
125
  "build": "fluid-build . --task build",
138
126
  "build:commonjs": "fluid-build . --task commonjs",
139
127
  "build:compile": "fluid-build . --task compile",
140
- "build:docs": "fluid-build . --task api",
128
+ "build:docs": "api-extractor run --local",
141
129
  "build:esnext": "tsc --project ./tsconfig.json",
142
130
  "build:genver": "gen-version",
143
131
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/matrix";
9
- export const pkgVersion = "2.0.0-dev-rc.3.0.0.254513";
9
+ export const pkgVersion = "2.0.0-dev-rc.3.0.0.254866";
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,235 +0,0 @@
1
- import { IChannel } from '@fluidframework/datastore-definitions';
2
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
3
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
4
- import { IChannelServices } from '@fluidframework/datastore-definitions';
5
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
6
- import { IEvent } from '@fluidframework/core-interfaces';
7
- import { IEventProvider } from '@fluidframework/core-interfaces';
8
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
9
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
10
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
11
- import { IJSONSegment } from '@fluidframework/merge-tree/internal';
12
- import { IMatrixConsumer } from '@tiny-calc/nano';
13
- import { IMatrixProducer } from '@tiny-calc/nano';
14
- import { IMatrixReader } from '@tiny-calc/nano';
15
- import { IMatrixWriter } from '@tiny-calc/nano';
16
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
17
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
18
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
19
- import { Serializable } from '@fluidframework/datastore-definitions/internal';
20
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
21
-
22
- /**
23
- * @alpha
24
- */
25
- export declare interface IRevertible {
26
- revert(): void;
27
- discard(): void;
28
- }
29
-
30
- /** @alpha */
31
- export declare interface ISharedMatrix<T = any> extends IEventProvider<ISharedMatrixEvents<T>>, IMatrixProducer<MatrixItem<T>>, IMatrixReader<MatrixItem<T>>, IMatrixWriter<MatrixItem<T>> {
32
- insertCols(colStart: number, count: number): void;
33
- removeCols(colStart: number, count: number): void;
34
- insertRows(rowStart: number, count: number): void;
35
- removeRows(rowStart: number, count: number): void;
36
- openUndo(consumer: IUndoConsumer): void;
37
- }
38
-
39
- /**
40
- * Events emitted by Shared Matrix.
41
- * @alpha
42
- */
43
- export declare interface ISharedMatrixEvents<T> extends IEvent {
44
- /**
45
- * This event is only emitted when the SetCell Resolution Policy is First Write Win(FWW).
46
- * This is emitted when two clients race and send changes without observing each other changes,
47
- * the changes that gets sequenced last would be rejected, and only client who's changes rejected
48
- * would be notified via this event, with expectation that it will merge its changes back by
49
- * accounting new information (state from winner of the race).
50
- *
51
- * @remarks Listener parameters:
52
- *
53
- * - `row` - Row number at which conflict happened.
54
- *
55
- * - `col` - Col number at which conflict happened.
56
- *
57
- * - `currentValue` - The current value of the cell.
58
- *
59
- * - `conflictingValue` - The value that this client tried to set in the cell and got ignored due to conflict.
60
- *
61
- * - `target` - The {@link SharedMatrix} itself.
62
- */
63
- (event: "conflict", listener: (row: number, col: number, currentValue: MatrixItem<T>, conflictingValue: MatrixItem<T>, target: IEventThisPlaceHolder) => void): void;
64
- }
65
-
66
- /**
67
- * @alpha
68
- */
69
- export declare interface IUndoConsumer {
70
- pushToCurrentOperation(revertible: IRevertible): void;
71
- }
72
-
73
- /**
74
- * A matrix cell value may be undefined (indicating an empty cell) or any serializable type,
75
- * excluding null. (However, nulls may be embedded inside objects and arrays.)
76
- * @alpha
77
- */
78
- export declare type MatrixItem<T> = Serializable<Exclude<T, null>> | undefined;
79
-
80
- /**
81
- * A SharedMatrix holds a rectangular 2D array of values. Supported operations
82
- * include setting values and inserting/removing rows and columns.
83
- *
84
- * Matrix values may be any Fluid serializable type, which is the set of JSON
85
- * serializable types extended to include IFluidHandles.
86
- *
87
- * Fluid's SharedMatrix implementation works equally well for dense and sparse
88
- * matrix data and physically stores data in Z-order to leverage CPU caches and
89
- * prefetching when reading in either row or column major order. (See README.md
90
- * for more details.)
91
- * @alpha
92
- */
93
- export declare class SharedMatrix<T = any> extends SharedObject<ISharedMatrixEvents<T> & ISharedObjectEvents> implements ISharedMatrix<T> {
94
- id: string;
95
- private readonly consumers;
96
- static getFactory(): SharedMatrixFactory;
97
- /**
98
- * Note: this field only provides a lower-bound on the reference sequence numbers for in-flight ops.
99
- * The exact reason isn't understood, but some e2e tests suggest that the runtime may sometimes process
100
- * incoming leave/join ops before putting an op that this DDS submits over the wire.
101
- *
102
- * E.g. SharedMatrix submits an op while deltaManager has lastSequenceNumber = 10, but before the runtime
103
- * puts this op over the wire, it processes a client join/leave op with sequence number 11, so the referenceSequenceNumber
104
- * on the SharedMatrix op is 11.
105
- */
106
- private readonly inFlightRefSeqs;
107
- private readonly rows;
108
- private readonly cols;
109
- private cells;
110
- private readonly pending;
111
- private cellLastWriteTracker;
112
- private setCellLwwToFwwPolicySwitchOpSeqNumber;
113
- private userSwitchedSetCellPolicy;
114
- private reentrantCount;
115
- /**
116
- * Constructor for the Shared Matrix
117
- * @param runtime - DataStore runtime.
118
- * @param id - id of the dds
119
- * @param attributes - channel attributes
120
- * @param _isSetCellConflictResolutionPolicyFWW - Conflict resolution for Matrix set op is First Writer Win in case of
121
- * race condition. Client can still overwrite values in case of no race.
122
- */
123
- constructor(runtime: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, _isSetCellConflictResolutionPolicyFWW?: boolean);
124
- private undo?;
125
- /**
126
- * Subscribes the given IUndoConsumer to the matrix.
127
- */
128
- openUndo(consumer: IUndoConsumer): void;
129
- private get rowHandles();
130
- private get colHandles();
131
- /**
132
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
133
- */
134
- static create<T>(runtime: IFluidDataStoreRuntime, id?: string): SharedMatrix<T>;
135
- openMatrix(consumer: IMatrixConsumer<MatrixItem<T>>): IMatrixReader<MatrixItem<T>>;
136
- closeMatrix(consumer: IMatrixConsumer<MatrixItem<T>>): void;
137
- get rowCount(): number;
138
- get colCount(): number;
139
- isSetCellConflictResolutionPolicyFWW(): boolean;
140
- getCell(row: number, col: number): MatrixItem<T>;
141
- get matrixProducer(): IMatrixProducer<MatrixItem<T>>;
142
- setCell(row: number, col: number, value: MatrixItem<T>): void;
143
- setCells(rowStart: number, colStart: number, colCount: number, values: readonly MatrixItem<T>[]): void;
144
- private setCellCore;
145
- private createOpMetadataLocalRef;
146
- private sendSetCellOp;
147
- /**
148
- * This makes sure that the code inside the callback is not reentrant. We need to do that because we raise notifications
149
- * to the consumers telling about these changes and they can try to change the matrix while listening to those notifications
150
- * which can make the shared matrix to be in bad state. For example, we are raising notification for a setCell changes and
151
- * a consumer tries to delete that row/col on receiving that notification which can lead to this matrix trying to setCell in
152
- * a deleted row/col.
153
- * @param callback - code that needs to protected against reentrancy.
154
- */
155
- private protectAgainstReentrancy;
156
- private submitVectorMessage;
157
- private submitColMessage;
158
- insertCols(colStart: number, count: number): void;
159
- removeCols(colStart: number, count: number): void;
160
- private submitRowMessage;
161
- insertRows(rowStart: number, count: number): void;
162
- removeRows(rowStart: number, count: number): void;
163
- _undoRemoveRows(rowStart: number, spec: IJSONSegment): void;
164
- /***/ _undoRemoveCols(colStart: number, spec: IJSONSegment): void;
165
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
166
- /**
167
- * Runs serializer on the GC data for this SharedMatrix.
168
- * All the IFluidHandle's stored in the cells represent routes to other objects.
169
- */
170
- protected processGCDataCore(serializer: IFluidSerializer): void;
171
- /**
172
- * Advances the 'localSeq' counter for the cell data operation currently being queued.
173
- *
174
- * Do not use with 'submitColMessage()/submitRowMessage()' as these helpers + the MergeTree will
175
- * automatically advance 'localSeq'.
176
- */
177
- private nextLocalSeq;
178
- protected submitLocalMessage(message: any, localOpMetadata?: any): void;
179
- protected didAttach(): void;
180
- protected onConnect(): void;
181
- private rebasePosition;
182
- protected reSubmitCore(incoming: unknown, localOpMetadata: unknown): void;
183
- protected onDisconnect(): void;
184
- /**
185
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
186
- */
187
- protected loadCore(storage: IChannelStorageService): Promise<void>;
188
- /**
189
- * Tells whether the setCell op should be applied or not based on First Write Win policy. It assumes
190
- * we are in FWW mode.
191
- */
192
- private shouldSetCellBasedOnFWW;
193
- protected processCore(msg: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
194
- private readonly onRowDelta;
195
- private readonly onColDelta;
196
- private readonly onRowHandlesRecycled;
197
- private readonly onColHandlesRecycled;
198
- /**
199
- * Api to switch Set Op policy from Last Writer Win to First Writer Win. It only switches from LWW to FWW
200
- * and not from FWW to LWW. The next SetOp which is sent will communicate this policy to other clients.
201
- */
202
- switchSetCellPolicy(): void;
203
- /**
204
- * Returns true if the latest pending write to the cell indicated by the given row/col handles
205
- * matches the given 'localSeq'.
206
- *
207
- * A return value of `true` indicates that there are no later local operations queued that will
208
- * clobber the write op at the given 'localSeq'. This includes later ops that overwrite the cell
209
- * with a different value as well as row/col removals that might recycled the given row/col handles.
210
- */
211
- private isLatestPendingWrite;
212
- toString(): string;
213
- /**
214
- * {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
215
- */
216
- protected applyStashedOp(_content: unknown): void;
217
- }
218
-
219
- /**
220
- * {@link @fluidframework/datastore-definitions#IChannelFactory} for {@link SharedMatrix}.
221
- * @alpha
222
- */
223
- export declare class SharedMatrixFactory implements IChannelFactory<ISharedMatrix> {
224
- static Type: string;
225
- static readonly Attributes: IChannelAttributes;
226
- get type(): string;
227
- get attributes(): IChannelAttributes;
228
- /**
229
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
230
- */
231
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedMatrix & IChannel>;
232
- create(document: IFluidDataStoreRuntime, id: string): ISharedMatrix & IChannel;
233
- }
234
-
235
- export { }
@@ -1,42 +0,0 @@
1
- import { IChannel } from '@fluidframework/datastore-definitions';
2
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
3
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
4
- import { IChannelServices } from '@fluidframework/datastore-definitions';
5
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
6
- import { IEvent } from '@fluidframework/core-interfaces';
7
- import { IEventProvider } from '@fluidframework/core-interfaces';
8
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
9
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
10
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
11
- import { IJSONSegment } from '@fluidframework/merge-tree/internal';
12
- import { IMatrixConsumer } from '@tiny-calc/nano';
13
- import { IMatrixProducer } from '@tiny-calc/nano';
14
- import { IMatrixReader } from '@tiny-calc/nano';
15
- import { IMatrixWriter } from '@tiny-calc/nano';
16
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
17
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
18
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
19
- import { Serializable } from '@fluidframework/datastore-definitions/internal';
20
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
21
-
22
- /* Excluded from this release type: IJSONSegment */
23
-
24
- /* Excluded from this release type: IRevertible */
25
-
26
- /* Excluded from this release type: ISharedMatrix */
27
-
28
- /* Excluded from this release type: ISharedMatrixEvents */
29
-
30
- /* Excluded from this release type: IUndoConsumer */
31
-
32
- /* Excluded from this release type: MatrixItem */
33
-
34
- /* Excluded from this release type: Serializable */
35
-
36
- /* Excluded from this release type: SharedMatrix */
37
-
38
- /* Excluded from this release type: SharedMatrixFactory */
39
-
40
- /* Excluded from this release type: SharedObject */
41
-
42
- export { }
@@ -1,42 +0,0 @@
1
- import { IChannel } from '@fluidframework/datastore-definitions';
2
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
3
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
4
- import { IChannelServices } from '@fluidframework/datastore-definitions';
5
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
6
- import { IEvent } from '@fluidframework/core-interfaces';
7
- import { IEventProvider } from '@fluidframework/core-interfaces';
8
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
9
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
10
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
11
- import { IJSONSegment } from '@fluidframework/merge-tree/internal';
12
- import { IMatrixConsumer } from '@tiny-calc/nano';
13
- import { IMatrixProducer } from '@tiny-calc/nano';
14
- import { IMatrixReader } from '@tiny-calc/nano';
15
- import { IMatrixWriter } from '@tiny-calc/nano';
16
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
17
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
18
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
19
- import { Serializable } from '@fluidframework/datastore-definitions/internal';
20
- import { SharedObject } from '@fluidframework/shared-object-base/internal';
21
-
22
- /* Excluded from this release type: IJSONSegment */
23
-
24
- /* Excluded from this release type: IRevertible */
25
-
26
- /* Excluded from this release type: ISharedMatrix */
27
-
28
- /* Excluded from this release type: ISharedMatrixEvents */
29
-
30
- /* Excluded from this release type: IUndoConsumer */
31
-
32
- /* Excluded from this release type: MatrixItem */
33
-
34
- /* Excluded from this release type: Serializable */
35
-
36
- /* Excluded from this release type: SharedMatrix */
37
-
38
- /* Excluded from this release type: SharedMatrixFactory */
39
-
40
- /* Excluded from this release type: SharedObject */
41
-
42
- export { }