@fluid-experimental/sequence-deprecated 2.0.0-rc.3.0.3 → 2.0.0-rc.4.0.1
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 +13 -0
- package/api-report/sequence-deprecated.api.md +27 -16
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.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/sequenceFactory.d.ts +22 -0
- package/dist/sequenceFactory.d.ts.map +1 -1
- package/dist/sequenceFactory.js +16 -5
- package/dist/sequenceFactory.js.map +1 -1
- package/dist/sharedNumberSequence.d.ts +1 -22
- package/dist/sharedNumberSequence.d.ts.map +1 -1
- package/dist/sharedNumberSequence.js +3 -27
- package/dist/sharedNumberSequence.js.map +1 -1
- package/dist/sharedObjectSequence.d.ts +1 -22
- package/dist/sharedObjectSequence.d.ts.map +1 -1
- package/dist/sharedObjectSequence.js +3 -27
- package/dist/sharedObjectSequence.js.map +1 -1
- package/dist/sparsematrix.d.ts +17 -22
- package/dist/sparsematrix.d.ts.map +1 -1
- package/dist/sparsematrix.js +14 -26
- package/dist/sparsematrix.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.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 +22 -0
- package/lib/sequenceFactory.d.ts.map +1 -1
- package/lib/sequenceFactory.js +17 -6
- package/lib/sequenceFactory.js.map +1 -1
- package/lib/sharedNumberSequence.d.ts +1 -22
- package/lib/sharedNumberSequence.d.ts.map +1 -1
- package/lib/sharedNumberSequence.js +1 -25
- package/lib/sharedNumberSequence.js.map +1 -1
- package/lib/sharedObjectSequence.d.ts +1 -22
- package/lib/sharedObjectSequence.d.ts.map +1 -1
- package/lib/sharedObjectSequence.js +1 -25
- package/lib/sharedObjectSequence.js.map +1 -1
- package/lib/sparsematrix.d.ts +17 -22
- package/lib/sparsematrix.d.ts.map +1 -1
- package/lib/sparsematrix.js +12 -24
- package/lib/sparsematrix.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +14 -14
- package/src/index.ts +9 -3
- package/src/packageVersion.ts +1 -1
- package/src/sequenceFactory.ts +29 -6
- package/src/sharedNumberSequence.ts +1 -27
- package/src/sharedObjectSequence.ts +1 -31
- package/src/sparsematrix.ts +21 -30
package/dist/sparsematrix.d.ts
CHANGED
|
@@ -7,11 +7,10 @@ import { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreR
|
|
|
7
7
|
import { Jsonable } from "@fluidframework/datastore-definitions/internal";
|
|
8
8
|
import { BaseSegment, IJSONSegment, ISegment, PropertySet } from "@fluidframework/merge-tree/internal";
|
|
9
9
|
import { SharedSegmentSequence } from "@fluidframework/sequence/internal";
|
|
10
|
-
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
11
10
|
import { SubSequence } from "./sharedSequence.js";
|
|
12
11
|
/**
|
|
13
12
|
* An empty segment that occupies 'cachedLength' positions.
|
|
14
|
-
* {@link SparseMatrix} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
13
|
+
* {@link (SparseMatrix:variable)} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
15
14
|
*
|
|
16
15
|
* @deprecated `PaddingSegment` is part of an abandoned prototype.
|
|
17
16
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
@@ -112,26 +111,11 @@ export declare function positionToRowCol(position: number): {
|
|
|
112
111
|
col: number;
|
|
113
112
|
};
|
|
114
113
|
/**
|
|
115
|
-
* @
|
|
116
|
-
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
114
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
117
115
|
* @internal
|
|
118
116
|
*/
|
|
119
|
-
export declare class
|
|
117
|
+
export declare class SparseMatrixClass extends SharedSegmentSequence<MatrixSegment> {
|
|
120
118
|
id: string;
|
|
121
|
-
/**
|
|
122
|
-
* Create a new sparse matrix
|
|
123
|
-
*
|
|
124
|
-
* @param runtime - data store runtime the new sparse matrix belongs to
|
|
125
|
-
* @param id - optional name of the sparse matrix
|
|
126
|
-
* @returns newly create sparse matrix (but not attached yet)
|
|
127
|
-
*/
|
|
128
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string): SparseMatrix;
|
|
129
|
-
/**
|
|
130
|
-
* Get a factory for SharedMap to register with the data store.
|
|
131
|
-
*
|
|
132
|
-
* @returns a factory that creates and load SharedMap
|
|
133
|
-
*/
|
|
134
|
-
static getFactory(): IChannelFactory;
|
|
135
119
|
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
136
120
|
get numRows(): number;
|
|
137
121
|
setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet): void;
|
|
@@ -153,7 +137,7 @@ export declare class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {
|
|
|
153
137
|
* Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.
|
|
154
138
|
* @internal
|
|
155
139
|
*/
|
|
156
|
-
export declare class SparseMatrixFactory implements IChannelFactory {
|
|
140
|
+
export declare class SparseMatrixFactory implements IChannelFactory<SparseMatrix> {
|
|
157
141
|
static Type: string;
|
|
158
142
|
static Attributes: IChannelAttributes;
|
|
159
143
|
static segmentFromSpec(spec: IJSONSegment): ISegment;
|
|
@@ -162,7 +146,18 @@ export declare class SparseMatrixFactory implements IChannelFactory {
|
|
|
162
146
|
/**
|
|
163
147
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
164
148
|
*/
|
|
165
|
-
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<
|
|
166
|
-
create(document: IFluidDataStoreRuntime, id: string):
|
|
149
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<SparseMatrix>;
|
|
150
|
+
create(document: IFluidDataStoreRuntime, id: string): SparseMatrix;
|
|
167
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated `SparseMatrix` is an abandoned prototype.
|
|
154
|
+
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
export declare const SparseMatrix: import("@fluidframework/shared-object-base/internal").ISharedObjectKind<SparseMatrixClass>;
|
|
158
|
+
/**
|
|
159
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
export type SparseMatrix = SparseMatrixClass;
|
|
168
163
|
//# sourceMappingURL=sparsematrix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparsematrix.d.ts","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAC1E,OAAO,EACN,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"sparsematrix.d.ts","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,MAAM,uCAAu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|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.SparseMatrixFactory = exports.
|
|
7
|
+
exports.SparseMatrix = exports.SparseMatrixFactory = exports.SparseMatrixClass = exports.positionToRowCol = exports.rowColToPosition = exports.maxCellPosition = exports.maxRows = exports.maxRow = exports.maxCols = exports.maxCol = exports.RunSegment = exports.PaddingSegment = void 0;
|
|
8
8
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
9
9
|
const internal_2 = require("@fluidframework/merge-tree/internal");
|
|
10
10
|
const internal_3 = require("@fluidframework/sequence/internal");
|
|
11
|
+
const internal_4 = require("@fluidframework/shared-object-base/internal");
|
|
11
12
|
const packageVersion_js_1 = require("./packageVersion.js");
|
|
12
13
|
const sharedSequence_js_1 = require("./sharedSequence.js");
|
|
13
14
|
/**
|
|
14
15
|
* An empty segment that occupies 'cachedLength' positions.
|
|
15
|
-
* {@link SparseMatrix} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
16
|
+
* {@link (SparseMatrix:variable)} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
16
17
|
*
|
|
17
18
|
* @deprecated `PaddingSegment` is part of an abandoned prototype.
|
|
18
19
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
@@ -188,29 +189,10 @@ function positionToRowCol(position) {
|
|
|
188
189
|
}
|
|
189
190
|
exports.positionToRowCol = positionToRowCol;
|
|
190
191
|
/**
|
|
191
|
-
* @
|
|
192
|
-
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
192
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
193
193
|
* @internal
|
|
194
194
|
*/
|
|
195
|
-
class
|
|
196
|
-
/**
|
|
197
|
-
* Create a new sparse matrix
|
|
198
|
-
*
|
|
199
|
-
* @param runtime - data store runtime the new sparse matrix belongs to
|
|
200
|
-
* @param id - optional name of the sparse matrix
|
|
201
|
-
* @returns newly create sparse matrix (but not attached yet)
|
|
202
|
-
*/
|
|
203
|
-
static create(runtime, id) {
|
|
204
|
-
return runtime.createChannel(id, SparseMatrixFactory.Type);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Get a factory for SharedMap to register with the data store.
|
|
208
|
-
*
|
|
209
|
-
* @returns a factory that creates and load SharedMap
|
|
210
|
-
*/
|
|
211
|
-
static getFactory() {
|
|
212
|
-
return new SparseMatrixFactory();
|
|
213
|
-
}
|
|
195
|
+
class SparseMatrixClass extends internal_3.SharedSegmentSequence {
|
|
214
196
|
constructor(document, id, attributes) {
|
|
215
197
|
super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
|
|
216
198
|
this.id = id;
|
|
@@ -298,7 +280,7 @@ class SparseMatrix extends internal_3.SharedSegmentSequence {
|
|
|
298
280
|
return this.getContainingSegment(pos);
|
|
299
281
|
}
|
|
300
282
|
}
|
|
301
|
-
exports.
|
|
283
|
+
exports.SparseMatrixClass = SparseMatrixClass;
|
|
302
284
|
/**
|
|
303
285
|
* @deprecated `SparseMatrixFactory` is an abandoned prototype.
|
|
304
286
|
* Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.
|
|
@@ -326,12 +308,12 @@ class SparseMatrixFactory {
|
|
|
326
308
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
327
309
|
*/
|
|
328
310
|
async load(runtime, id, services, attributes) {
|
|
329
|
-
const sharedObject = new
|
|
311
|
+
const sharedObject = new SparseMatrixClass(runtime, id, attributes);
|
|
330
312
|
await sharedObject.load(services);
|
|
331
313
|
return sharedObject;
|
|
332
314
|
}
|
|
333
315
|
create(document, id) {
|
|
334
|
-
const sharedObject = new
|
|
316
|
+
const sharedObject = new SparseMatrixClass(document, id, this.attributes);
|
|
335
317
|
sharedObject.initializeLocal();
|
|
336
318
|
return sharedObject;
|
|
337
319
|
}
|
|
@@ -343,4 +325,10 @@ SparseMatrixFactory.Attributes = {
|
|
|
343
325
|
snapshotFormatVersion: "0.1",
|
|
344
326
|
packageVersion: packageVersion_js_1.pkgVersion,
|
|
345
327
|
};
|
|
328
|
+
/**
|
|
329
|
+
* @deprecated `SparseMatrix` is an abandoned prototype.
|
|
330
|
+
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
331
|
+
* @internal
|
|
332
|
+
*/
|
|
333
|
+
exports.SparseMatrix = (0, internal_4.createSharedObjectKind)(SparseMatrixFactory);
|
|
346
334
|
//# sourceMappingURL=sparsematrix.js.map
|
package/dist/sparsematrix.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAQ7D,kEAK6C;AAC7C,gEAA0E;AAG1E,2DAAiD;AACjD,2DAAkD;AAElD;;;;;;;GAOG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAEvC,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;YACD,OAAO,OAAO,CAAC;SACf;QACD,OAAO,SAAS,CAAC;IAClB,CAAC;IAGD,YAAY,IAAY;QACvB,KAAK,EAAE,CAAC;QAHO,SAAI,GAAG,cAAc,CAAC,UAAU,CAAC;QAIhD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC1B,CAAC;IAEM,YAAY;QAClB,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,YAAY,EAAE,K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8BAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIChannelServices,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tBaseSegment,\n\tIJSONSegment,\n\tISegment,\n\tPropertySet,\n} from \"@fluidframework/merge-tree/internal\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SubSequence } from \"./sharedSequence.js\";\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 * @internal\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n * @internal\n */\nexport type SparseMatrixItem = any;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\n */\nexport class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {\n\t/**\n\t * Create a new sparse matrix\n\t *\n\t * @param runtime - data store runtime the new sparse matrix belongs to\n\t * @param id - optional name of the sparse matrix\n\t * @returns newly create sparse matrix (but not attached yet)\n\t */\n\tpublic static create(runtime: IFluidDataStoreRuntime, id?: string) {\n\t\treturn runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;\n\t}\n\n\t/**\n\t * Get a factory for SharedMap to register with the data store.\n\t *\n\t * @returns a factory that creates and load SharedMap\n\t */\n\tpublic static getFactory(): IChannelFactory {\n\t\treturn new SparseMatrixFactory();\n\t}\n\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n * @internal\n */\nexport class SparseMatrixFactory implements IChannelFactory {\n\tpublic static Type = \"https://graph.microsoft.com/types/mergeTree/sparse-matrix\";\n\n\tpublic static Attributes: IChannelAttributes = {\n\t\ttype: SparseMatrixFactory.Type,\n\t\tsnapshotFormatVersion: \"0.1\",\n\t\tpackageVersion: pkgVersion,\n\t};\n\n\tpublic static segmentFromSpec(spec: IJSONSegment): ISegment {\n\t\tconst maybePadding = PaddingSegment.fromJSONObject(spec);\n\t\tif (maybePadding) {\n\t\t\treturn maybePadding;\n\t\t}\n\n\t\tconst maybeRun = RunSegment.fromJSONObject(spec);\n\t\tif (maybeRun) {\n\t\t\treturn maybeRun;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized IJSONObject: '${JSON.stringify(spec)}'`);\n\t}\n\n\tpublic get type() {\n\t\treturn SparseMatrixFactory.Type;\n\t}\n\n\tpublic get attributes() {\n\t\treturn SparseMatrixFactory.Attributes;\n\t}\n\n\t/**\n\t * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\n\t */\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tattributes: IChannelAttributes,\n\t): Promise<ISharedObject> {\n\t\tconst sharedObject = new SparseMatrix(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n\t\tconst sharedObject = new SparseMatrix(document, id, this.attributes);\n\t\tsharedObject.initializeLocal();\n\t\treturn sharedObject;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAQ7D,kEAK6C;AAC7C,gEAA0E;AAC1E,0EAAqF;AAErF,2DAAiD;AACjD,2DAAkD;AAElD;;;;;;;GAOG;AACH,MAAa,cAAe,SAAQ,sBAAW;IAEvC,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,CA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jDF,kDAkDC;AAjDc,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,8BAAU;CAC1B,CAAC;AA6CH;;;;GAIG;AACU,QAAA,YAAY,GAAG,IAAA,iCAAsB,EAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIChannelServices,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { Jsonable } from \"@fluidframework/datastore-definitions/internal\";\nimport {\n\tBaseSegment,\n\tIJSONSegment,\n\tISegment,\n\tPropertySet,\n} from \"@fluidframework/merge-tree/internal\";\nimport { SharedSegmentSequence } from \"@fluidframework/sequence/internal\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SubSequence } from \"./sharedSequence.js\";\n\n/**\n * An empty segment that occupies 'cachedLength' positions.\n * {@link (SparseMatrix:variable)} 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 * @internal\n */\nexport class PaddingSegment extends BaseSegment {\n\tpublic static readonly typeString = \"PaddingSegment\";\n\tpublic static is(segment: ISegment): segment is PaddingSegment {\n\t\treturn segment.type === PaddingSegment.typeString;\n\t}\n\tpublic static fromJSONObject(spec: any) {\n\t\tif (spec && typeof spec === \"object\" && \"pad\" in spec) {\n\t\t\tconst segment = new PaddingSegment(spec.pad);\n\t\t\tif (spec.props) {\n\t\t\t\tsegment.addProperties(spec.props);\n\t\t\t}\n\t\t\treturn segment;\n\t\t}\n\t\treturn undefined;\n\t}\n\tpublic readonly type = PaddingSegment.typeString;\n\n\tconstructor(size: number) {\n\t\tsuper();\n\t\tthis.cachedLength = size;\n\t}\n\n\tpublic toJSONObject() {\n\t\treturn { pad: this.cachedLength, props: this.properties };\n\t}\n\n\tpublic clone(start = 0, end?: number) {\n\t\tconst b = new PaddingSegment(this.cachedLength);\n\t\tthis.cloneInto(b);\n\t\treturn b;\n\t}\n\n\tpublic canAppend(segment: ISegment) {\n\t\treturn PaddingSegment.is(segment);\n\t}\n\n\tpublic toString() {\n\t\treturn `[padding: ${this.cachedLength}]`;\n\t}\n\n\tpublic append(segment: ISegment) {\n\t\tassert(PaddingSegment.is(segment), 0x5f7 /* can only append padding segment */);\n\t\tsuper.append(segment);\n\t}\n\n\t// Returns true if entire run removed\n\tpublic removeRange(start: number, end: number) {\n\t\tthis.cachedLength -= end - start;\n\t\treturn this.cachedLength === 0;\n\t}\n\n\tprotected createSplitSegmentAt(pos: number) {\n\t\tconst leftLength = pos;\n\t\tconst rightLength = this.cachedLength - pos;\n\n\t\tthis.cachedLength = leftLength;\n\t\treturn new PaddingSegment(rightLength);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixItem` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n * @internal\n */\nexport type SparseMatrixItem = any;\n\n/**\n * @deprecated `RunSegment` is part of an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * @internal\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 * {@inheritDoc (SparseMatrix:variable)}\n * @internal\n */\nexport class SparseMatrixClass extends SharedSegmentSequence<MatrixSegment> {\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SparseMatrixFactory.segmentFromSpec);\n\t}\n\n\tpublic get numRows() {\n\t\treturn positionToRowCol(this.getLength()).row;\n\t}\n\n\tpublic setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet) {\n\t\tconst start = rowColToPosition(row, col);\n\t\tconst end = start + values.length;\n\t\tconst segment = new RunSegment(values);\n\t\tif (props) {\n\t\t\tsegment.addProperties(props);\n\t\t}\n\n\t\tthis.replaceRange(start, end, segment);\n\t}\n\n\tpublic getItem(\n\t\trow: number,\n\t\tcol: number,\n\t): // The return type is defined explicitly here to prevent TypeScript from generating dynamic imports\n\tJsonable<string | number | boolean | IFluidHandle> | undefined {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tconst { segment, offset } = this.getContainingSegment(pos);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.items[offset ?? 0];\n\t\t} else if (segment && PaddingSegment.is(segment)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tthrow new Error(`Unrecognized Segment type`);\n\t}\n\n\tpublic getTag(row: number, col: number) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\t\t\treturn segment.getTag(offset ?? 0);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tpublic setTag(row: number, col: number, tag: any) {\n\t\tconst { segment, offset } = this.getSegment(row, col);\n\t\tif (segment && RunSegment.is(segment)) {\n\t\t\tsegment.setTag(offset ?? 0, tag);\n\t\t} else if (tag !== undefined) {\n\t\t\tthrow new Error(`Must not attempt to set tags on '${segment?.constructor.name}'.`);\n\t\t}\n\t}\n\n\tpublic insertRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tconst segment = new PaddingSegment(size);\n\n\t\tthis.client.insertSegmentLocal(pos, segment);\n\t}\n\n\tpublic removeRows(row: number, numRows: number) {\n\t\tconst pos = rowColToPosition(row, 0);\n\t\tconst size = maxCols * numRows;\n\t\tthis.removeRange(pos, pos + size);\n\t}\n\n\tpublic insertCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(maxCol - numCols, col, numCols);\n\t}\n\n\tpublic removeCols(col: number, numCols: number) {\n\t\tthis.moveAsPadding(col, maxCol - numCols, numCols);\n\t}\n\n\tpublic annotatePosition(row: number, col: number, props: PropertySet) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\tthis.annotateRange(pos, pos + 1, props);\n\t}\n\n\tpublic getPositionProperties(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getPropertiesAtPosition(pos);\n\t}\n\n\t// For each row, moves 'numCols' items starting from 'srcCol' and inserts 'numCols' padding\n\t// at 'destCol'. Used by insertCols and removeCols.\n\tprivate moveAsPadding(srcCol: number, destCol: number, numCols: number) {\n\t\tconst removeColStart = srcCol;\n\t\tconst removeColEnd = srcCol + numCols;\n\n\t\tfor (let r = 0, rowStart = 0; r < this.numRows; r++, rowStart += maxCols) {\n\t\t\tthis.client.removeRangeLocal(rowStart + removeColStart, rowStart + removeColEnd);\n\t\t\tconst insertPos = rowStart + destCol;\n\t\t\tconst segment = new PaddingSegment(numCols);\n\t\t\tthis.client.insertSegmentLocal(insertPos, segment);\n\t\t}\n\t}\n\n\tprivate getSegment(row: number, col: number) {\n\t\tconst pos = rowColToPosition(row, col);\n\t\treturn this.getContainingSegment(pos);\n\t}\n}\n\n/**\n * @deprecated `SparseMatrixFactory` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.\n * @internal\n */\nexport class SparseMatrixFactory implements IChannelFactory<SparseMatrix> {\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<SparseMatrix> {\n\t\tconst sharedObject = new SparseMatrixClass(runtime, id, attributes);\n\t\tawait sharedObject.load(services);\n\t\treturn sharedObject;\n\t}\n\n\tpublic create(document: IFluidDataStoreRuntime, id: string): SparseMatrix {\n\t\tconst sharedObject = new SparseMatrixClass(document, id, this.attributes);\n\t\tsharedObject.initializeLocal();\n\t\treturn sharedObject;\n\t}\n}\n\n/**\n * @deprecated `SparseMatrix` is an abandoned prototype.\n * Use {@link @fluidframework/matrix#SharedMatrix} instead.\n * @internal\n */\nexport const SparseMatrix = createSharedObjectKind(SparseMatrixFactory);\n/**\n * {@inheritDoc (SparseMatrix:variable)}\n * @internal\n */\nexport type SparseMatrix = SparseMatrixClass;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { MatrixSegment, maxCellPosition, maxCol, maxCols, maxRow, maxRows, PaddingSegment, positionToRowCol, rowColToPosition, RunSegment, SparseMatrix, SparseMatrixFactory, SparseMatrixItem, } from "./sparsematrix.js";
|
|
5
|
+
export { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
6
|
+
export { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
7
|
+
export { MatrixSegment, maxCellPosition, maxCol, maxCols, maxRow, maxRows, PaddingSegment, positionToRowCol, rowColToPosition, RunSegment, SparseMatrix, SparseMatrixFactory, SparseMatrixItem, SparseMatrixClass, } from "./sparsematrix.js";
|
|
8
8
|
export { IJSONRunSegment, SubSequence, SharedSequence } from "./sharedSequence.js";
|
|
9
|
-
export { SharedNumberSequenceFactory, SharedObjectSequenceFactory } from "./sequenceFactory.js";
|
|
9
|
+
export { SharedNumberSequenceFactory, SharedObjectSequenceFactory, SharedNumberSequence, SharedObjectSequence, } from "./sequenceFactory.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EACN,aAAa,EACb,eAAe,EACf,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,GACpB,MAAM,sBAAsB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export { maxCellPosition, maxCol, maxCols, maxRow, maxRows, PaddingSegment, positionToRowCol, rowColToPosition, RunSegment, SparseMatrix, SparseMatrixFactory, } from "./sparsematrix.js";
|
|
5
|
+
export { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
6
|
+
export { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
7
|
+
export { maxCellPosition, maxCol, maxCols, maxRow, maxRows, PaddingSegment, positionToRowCol, rowColToPosition, RunSegment, SparseMatrix, SparseMatrixFactory, SparseMatrixClass, } from "./sparsematrix.js";
|
|
8
8
|
export { SubSequence, SharedSequence } from "./sharedSequence.js";
|
|
9
|
-
export { SharedNumberSequenceFactory, SharedObjectSequenceFactory } from "./sequenceFactory.js";
|
|
9
|
+
export { SharedNumberSequenceFactory, SharedObjectSequenceFactory, SharedNumberSequence, SharedObjectSequence, } from "./sequenceFactory.js";
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAEN,eAAe,EACf,MAAM,EACN,OAAO,EACP,MAAM,EACN,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,mBAAmB,EAEnB,iBAAiB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAmB,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EACN,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,GACpB,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { SharedNumberSequenceClass } from \"./sharedNumberSequence.js\";\nexport { SharedObjectSequenceClass } from \"./sharedObjectSequence.js\";\nexport {\n\tMatrixSegment,\n\tmaxCellPosition,\n\tmaxCol,\n\tmaxCols,\n\tmaxRow,\n\tmaxRows,\n\tPaddingSegment,\n\tpositionToRowCol,\n\trowColToPosition,\n\tRunSegment,\n\tSparseMatrix,\n\tSparseMatrixFactory,\n\tSparseMatrixItem,\n\tSparseMatrixClass,\n} from \"./sparsematrix.js\";\nexport { IJSONRunSegment, SubSequence, SharedSequence } from \"./sharedSequence.js\";\nexport {\n\tSharedNumberSequenceFactory,\n\tSharedObjectSequenceFactory,\n\tSharedNumberSequence,\n\tSharedObjectSequence,\n} from \"./sequenceFactory.js\";\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-rc.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-rc.4.0.1";
|
|
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-rc.
|
|
8
|
+
export const pkgVersion = "2.0.0-rc.4.0.1";
|
|
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,gBAAgB,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-rc.
|
|
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,gBAAgB,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-rc.4.0.1\";\n"]}
|
package/lib/sequenceFactory.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import { IChannelAttributes, IChannelFactory, IChannelServices, IFluidDataStoreR
|
|
|
6
6
|
import { IJSONSegment } from "@fluidframework/merge-tree/internal";
|
|
7
7
|
import { SubSequence } from "@fluidframework/sequence/internal";
|
|
8
8
|
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
9
|
+
import { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
10
|
+
import { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
9
11
|
/**
|
|
10
12
|
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
11
13
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
@@ -94,4 +96,24 @@ export declare class SharedNumberSequenceFactory implements IChannelFactory {
|
|
|
94
96
|
*/
|
|
95
97
|
create(document: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
96
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* {@inheritDoc SharedNumberSequenceClass}
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
export declare const SharedNumberSequence: import("@fluidframework/shared-object-base").ISharedObjectKind<ISharedObject<import("@fluidframework/shared-object-base").ISharedObjectEvents>>;
|
|
104
|
+
/**
|
|
105
|
+
* {@inheritDoc SharedNumberSequenceClass}
|
|
106
|
+
* @internal
|
|
107
|
+
*/
|
|
108
|
+
export type SharedNumberSequence = SharedNumberSequenceClass;
|
|
109
|
+
/**
|
|
110
|
+
* {@inheritDoc SharedObjectSequenceClass}
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
export declare const SharedObjectSequence: import("@fluidframework/shared-object-base").ISharedObjectKind<ISharedObject<import("@fluidframework/shared-object-base").ISharedObjectEvents>>;
|
|
114
|
+
/**
|
|
115
|
+
* {@inheritDoc SharedObjectSequenceClass}
|
|
116
|
+
* @internal
|
|
117
|
+
*/
|
|
118
|
+
export type SharedObjectSequence<T> = SharedObjectSequenceClass<T>;
|
|
97
119
|
//# sourceMappingURL=sequenceFactory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAmB,WAAW,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,aAAa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AAG,WAAW,CAAC,MAAM,CAAC;IAazE;;;OAGG;IACH,IAAW,IAAI,WAEd;IAED;;;OAGG;IACH,IAAW,UAAU,uBAEpB;IAED;;;;;OAKG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,aAAa,CAAC;IAMzB;;;OAGG;IACI,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAK1E;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iJAAsD,CAAC;AACxF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,oBAAoB,iJAAsD,CAAC;AACxF;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,yBAAyB,CAAC,CAAC,CAAC,CAAC"}
|
package/lib/sequenceFactory.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { SubSequence } from "@fluidframework/sequence/internal";
|
|
6
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
6
7
|
import { pkgVersion } from "./packageVersion.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
9
|
+
import { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
9
10
|
/**
|
|
10
11
|
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
11
12
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
@@ -48,7 +49,7 @@ export class SharedObjectSequenceFactory {
|
|
|
48
49
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
49
50
|
*/
|
|
50
51
|
async load(runtime, id, services, attributes) {
|
|
51
|
-
const sharedSeq = new
|
|
52
|
+
const sharedSeq = new SharedObjectSequenceClass(runtime, id, attributes);
|
|
52
53
|
await sharedSeq.load(services);
|
|
53
54
|
return sharedSeq;
|
|
54
55
|
}
|
|
@@ -57,7 +58,7 @@ export class SharedObjectSequenceFactory {
|
|
|
57
58
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
58
59
|
*/
|
|
59
60
|
create(document, id) {
|
|
60
|
-
const sharedString = new
|
|
61
|
+
const sharedString = new SharedObjectSequenceClass(document, id, this.attributes);
|
|
61
62
|
sharedString.initializeLocal();
|
|
62
63
|
return sharedString;
|
|
63
64
|
}
|
|
@@ -118,7 +119,7 @@ export class SharedNumberSequenceFactory {
|
|
|
118
119
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
119
120
|
*/
|
|
120
121
|
async load(runtime, id, services, attributes) {
|
|
121
|
-
const sharedSeq = new
|
|
122
|
+
const sharedSeq = new SharedNumberSequenceClass(runtime, id, attributes);
|
|
122
123
|
await sharedSeq.load(services);
|
|
123
124
|
return sharedSeq;
|
|
124
125
|
}
|
|
@@ -127,7 +128,7 @@ export class SharedNumberSequenceFactory {
|
|
|
127
128
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
128
129
|
*/
|
|
129
130
|
create(document, id) {
|
|
130
|
-
const sharedString = new
|
|
131
|
+
const sharedString = new SharedNumberSequenceClass(document, id, this.attributes);
|
|
131
132
|
sharedString.initializeLocal();
|
|
132
133
|
return sharedString;
|
|
133
134
|
}
|
|
@@ -146,4 +147,14 @@ SharedNumberSequenceFactory.Attributes = {
|
|
|
146
147
|
snapshotFormatVersion: "0.1",
|
|
147
148
|
packageVersion: pkgVersion,
|
|
148
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* {@inheritDoc SharedNumberSequenceClass}
|
|
152
|
+
* @internal
|
|
153
|
+
*/
|
|
154
|
+
export const SharedNumberSequence = createSharedObjectKind(SharedNumberSequenceFactory);
|
|
155
|
+
/**
|
|
156
|
+
* {@inheritDoc SharedObjectSequenceClass}
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
export const SharedObjectSequence = createSharedObjectKind(SharedObjectSequenceFactory);
|
|
149
160
|
//# sourceMappingURL=sequenceFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequenceFactory.js","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAmB,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAGjF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;GAIG;AACH,MAAM,OAAO,2BAA2B;IAiBvC;;;OAGG;IACI,MAAM,CAAC,eAAe,CAAC,OAAqB;QAClD,MAAM,UAAU,GAAG,OAAkC,CAAC;QACtD,IAAI,UAAU,CAAC,KAAK,EAAE;YACrB,MAAM,GAAG,GAAG,IAAI,WAAW,CAAS,UAAU,CAAC,KAAK,CAAC,CAAC;YACtD,IAAI,UAAU,CAAC,KAAK,EAAE;gBACrB,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aACpC;YACD,OAAO,GAAG,CAAC;SACX;QAED,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,IAAW,IAAI;QACd,OAAO,2BAA2B,CAAC,IAAI,CAAC;IACzC,CAAC;IAED;;;OAGG;IACH,IAAW,UAAU;QACpB,OAAO,2BAA2B,CAAC,UAAU,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAChB,OAA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;IAED;;;;;OAKG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,SAAS,GAAG,IAAI,oBAAoB,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,oBAAoB,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\tIChannelFactory,\n\tIChannelServices,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { IJSONSegment } from \"@fluidframework/merge-tree/internal\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence.js\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence.js\";\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 * @internal\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 * @internal\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
|
+
{"version":3,"file":"sequenceFactory.js","sourceRoot":"","sources":["../src/sequenceFact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M,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,yBAAyB,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAClF,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;AA+DH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;AAOxF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,2BAA2B,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIChannelServices,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { IJSONSegment } from \"@fluidframework/merge-tree/internal\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence/internal\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { createSharedObjectKind } from \"@fluidframework/shared-object-base/internal\";\n\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { SharedNumberSequenceClass } from \"./sharedNumberSequence.js\";\nimport { SharedObjectSequenceClass } from \"./sharedObjectSequence.js\";\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 * @internal\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 SharedObjectSequenceClass<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 SharedObjectSequenceClass(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 * @internal\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 SharedNumberSequenceClass(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 SharedNumberSequenceClass(document, id, this.attributes);\n\t\tsharedString.initializeLocal();\n\t\treturn sharedString;\n\t}\n}\n\n/**\n * {@inheritDoc SharedNumberSequenceClass}\n * @internal\n */\nexport const SharedNumberSequence = createSharedObjectKind(SharedNumberSequenceFactory);\n/**\n * {@inheritDoc SharedNumberSequenceClass}\n * @internal\n */\nexport type SharedNumberSequence = SharedNumberSequenceClass;\n\n/**\n * {@inheritDoc SharedObjectSequenceClass}\n * @internal\n */\nexport const SharedObjectSequence = createSharedObjectKind(SharedObjectSequenceFactory);\n/**\n * {@inheritDoc SharedObjectSequenceClass}\n * @internal\n */\nexport type SharedObjectSequence<T> = SharedObjectSequenceClass<T>;\n"]}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { IChannelAttributes, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
6
|
-
import { SharedNumberSequenceFactory } from "./sequenceFactory.js";
|
|
7
6
|
import { SharedSequence } from "./sharedSequence.js";
|
|
8
7
|
/**
|
|
9
8
|
* The SharedNumberSequence holds a sequence of numbers. Each number will be stored
|
|
@@ -15,28 +14,8 @@ import { SharedSequence } from "./sharedSequence.js";
|
|
|
15
14
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
16
15
|
* @internal
|
|
17
16
|
*/
|
|
18
|
-
export declare class
|
|
17
|
+
export declare class SharedNumberSequenceClass extends SharedSequence<number> {
|
|
19
18
|
id: string;
|
|
20
|
-
/**
|
|
21
|
-
* Create a new shared number sequence
|
|
22
|
-
*
|
|
23
|
-
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
24
|
-
* @param id - optional name of the shared number sequence
|
|
25
|
-
* @returns newly create shared number sequence (but not attached yet)
|
|
26
|
-
*
|
|
27
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
28
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
29
|
-
*/
|
|
30
|
-
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedNumberSequence;
|
|
31
|
-
/**
|
|
32
|
-
* Get a factory for SharedNumberSequence to register with the data store.
|
|
33
|
-
*
|
|
34
|
-
* @returns a factory that creates and load SharedNumberSequence
|
|
35
|
-
*
|
|
36
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
37
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
38
|
-
*/
|
|
39
|
-
static getFactory(): SharedNumberSequenceFactory;
|
|
40
19
|
/**
|
|
41
20
|
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
42
21
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAGnG,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,qBAAa,yBAA0B,SAAQ,cAAc,CAAC,MAAM,CAAC;IAO5D,EAAE,EAAE,MAAM;IANlB;;;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"}
|
|
@@ -14,31 +14,7 @@ import { SharedSequence } from "./sharedSequence.js";
|
|
|
14
14
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
15
15
|
* @internal
|
|
16
16
|
*/
|
|
17
|
-
export class
|
|
18
|
-
/**
|
|
19
|
-
* Create a new shared number sequence
|
|
20
|
-
*
|
|
21
|
-
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
22
|
-
* @param id - optional name of the shared number sequence
|
|
23
|
-
* @returns newly create shared number sequence (but not attached yet)
|
|
24
|
-
*
|
|
25
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
26
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
27
|
-
*/
|
|
28
|
-
static create(runtime, id) {
|
|
29
|
-
return runtime.createChannel(id, SharedNumberSequenceFactory.Type);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get a factory for SharedNumberSequence to register with the data store.
|
|
33
|
-
*
|
|
34
|
-
* @returns a factory that creates and load SharedNumberSequence
|
|
35
|
-
*
|
|
36
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
37
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
38
|
-
*/
|
|
39
|
-
static getFactory() {
|
|
40
|
-
return new SharedNumberSequenceFactory();
|
|
41
|
-
}
|
|
17
|
+
export class SharedNumberSequenceClass extends SharedSequence {
|
|
42
18
|
/**
|
|
43
19
|
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
44
20
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|