@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAA0B,SAAQ,cAAsB;IACpE;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACxC,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACb,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC1D;YACD,OAAO,OAAO,CAAC;QAChB,CAAC,CAAC,CAAC;QATI,OAAE,GAAF,EAAE,CAAQ;IAUlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IChannelAttributes, IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\n\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory.js\";\nimport { SharedSequence } from \"./sharedSequence.js\";\n\n/**\n * The SharedNumberSequence holds a sequence of numbers. Each number will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n * @internal\n */\nexport class SharedNumberSequenceClass extends SharedSequence<number> {\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 {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, (spec) => {\n\t\t\tconst segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n\t\t\tif (!segment) {\n\t\t\t\tthrow new Error(\"expected `spec` to be valid `ISegment`\");\n\t\t\t}\n\t\t\treturn segment;\n\t\t});\n\t}\n\n\t/**\n\t * @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n\t */\n\tpublic getRange(start: number, end?: number) {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { IChannelAttributes, IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
|
|
6
6
|
import { Serializable } from "@fluidframework/datastore-definitions/internal";
|
|
7
|
-
import { SharedObjectSequenceFactory } from "./sequenceFactory.js";
|
|
8
7
|
import { SharedSequence } from "./sharedSequence.js";
|
|
9
8
|
/**
|
|
10
9
|
* The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored
|
|
@@ -16,28 +15,8 @@ import { SharedSequence } from "./sharedSequence.js";
|
|
|
16
15
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
17
16
|
* @internal
|
|
18
17
|
*/
|
|
19
|
-
export declare class
|
|
18
|
+
export declare class SharedObjectSequenceClass<T> extends SharedSequence<T> {
|
|
20
19
|
id: string;
|
|
21
|
-
/**
|
|
22
|
-
* Create a new shared object sequence
|
|
23
|
-
*
|
|
24
|
-
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
25
|
-
* @param id - optional name of the shared object sequence
|
|
26
|
-
* @returns newly create shared object sequence (but not attached yet)
|
|
27
|
-
*
|
|
28
|
-
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
29
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
30
|
-
*/
|
|
31
|
-
static create<T>(runtime: IFluidDataStoreRuntime, id?: string): SharedObjectSequence<T>;
|
|
32
|
-
/**
|
|
33
|
-
* Get a factory for SharedObjectSequence to register with the data store.
|
|
34
|
-
*
|
|
35
|
-
* @returns a factory that creates and load SharedObjectSequence
|
|
36
|
-
*
|
|
37
|
-
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
38
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
39
|
-
*/
|
|
40
|
-
static getFactory(): SharedObjectSequenceFactory;
|
|
41
20
|
/**
|
|
42
21
|
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
43
22
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAG9E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,qBAAa,yBAAyB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAO1D,EAAE,EAAE,MAAM;IANlB;;;OAGG;gBAEF,QAAQ,EAAE,sBAAsB,EACzB,EAAE,EAAE,MAAM,EACjB,UAAU,EAAE,kBAAkB;IAK/B;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE;CAG/D"}
|
|
@@ -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 object sequence
|
|
20
|
-
*
|
|
21
|
-
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
22
|
-
* @param id - optional name of the shared object sequence
|
|
23
|
-
* @returns newly create shared object sequence (but not attached yet)
|
|
24
|
-
*
|
|
25
|
-
* @deprecated SharedObjectSequence 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, SharedObjectSequenceFactory.Type);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Get a factory for SharedObjectSequence to register with the data store.
|
|
33
|
-
*
|
|
34
|
-
* @returns a factory that creates and load SharedObjectSequence
|
|
35
|
-
*
|
|
36
|
-
* @deprecated SharedObjectSequence 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 SharedObjectSequenceFactory();
|
|
41
|
-
}
|
|
17
|
+
export class SharedObjectSequenceClass extends SharedSequence {
|
|
42
18
|
/**
|
|
43
19
|
* @deprecated SharedObjectSequence 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}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAA6B,SAAQ,cAAiB;IAClE;;;OAGG;IACH,YACC,QAAgC,EACzB,EAAU,EACjB,UAA8B;QAE9B,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,CAAC,eAAsB,CAAC,CAAC;QAH7E,OAAE,GAAF,EAAE,CAAQ;IAIlB,CAAC;IAED;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAClC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IChannelAttributes, IFluidDataStoreRuntime } from \"@fluidframework/datastore-definitions\";\nimport { Serializable } from \"@fluidframework/datastore-definitions/internal\";\n\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory.js\";\nimport { SharedSequence } from \"./sharedSequence.js\";\n\n/**\n * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored\n * at a position within the sequence. See the\n * {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}\n * for details on working with sequences.\n *\n * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n * For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n * @internal\n */\nexport class SharedObjectSequenceClass<T> extends SharedSequence<T> {\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 {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n\t */\n\tconstructor(\n\t\tdocument: IFluidDataStoreRuntime,\n\t\tpublic id: string,\n\t\tattributes: IChannelAttributes,\n\t) {\n\t\tsuper(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n\t}\n\n\t/**\n\t * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.\n\t * For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.\n\t */\n\tpublic getRange(start: number, end?: number): Serializable<T>[] {\n\t\treturn this.getItems(start, end);\n\t}\n}\n"]}
|
package/lib/sparsematrix.d.ts
CHANGED
|
@@ -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,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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AO,EAAE,MAAM;IAQvC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAMvC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIvC,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAIvC,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW;IAK7D,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IAOrD,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,UAAU;CAIlB;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,eAAe,CAAC,YAAY,CAAC;IACxE,OAAc,IAAI,SAA+D;IAEjF,OAAc,UAAU,EAAE,kBAAkB,CAI1C;WAEY,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,QAAQ;IAc3D,IAAW,IAAI,WAEd;IAED,IAAW,UAAU,uBAEpB;IAED;;OAEG;IACU,IAAI,CAChB,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAC5B,OAAO,CAAC,YAAY,CAAC;IAMjB,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,YAAY;CAKzE;AAED;;;;GAIG;AACH,eAAO,MAAM,YAAY,4FAA8C,CAAC;AACxE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC"}
|
package/lib/sparsematrix.js
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import { assert } from "@fluidframework/core-utils/internal";
|
|
6
6
|
import { BaseSegment, } from "@fluidframework/merge-tree/internal";
|
|
7
7
|
import { SharedSegmentSequence } from "@fluidframework/sequence/internal";
|
|
8
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
8
9
|
import { pkgVersion } from "./packageVersion.js";
|
|
9
10
|
import { SubSequence } from "./sharedSequence.js";
|
|
10
11
|
/**
|
|
11
12
|
* An empty segment that occupies 'cachedLength' positions.
|
|
12
|
-
* {@link SparseMatrix} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
13
|
+
* {@link (SparseMatrix:variable)} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
13
14
|
*
|
|
14
15
|
* @deprecated `PaddingSegment` is part of an abandoned prototype.
|
|
15
16
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
@@ -181,29 +182,10 @@ export function positionToRowCol(position) {
|
|
|
181
182
|
return { row, col };
|
|
182
183
|
}
|
|
183
184
|
/**
|
|
184
|
-
* @
|
|
185
|
-
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
185
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
186
186
|
* @internal
|
|
187
187
|
*/
|
|
188
|
-
export class
|
|
189
|
-
/**
|
|
190
|
-
* Create a new sparse matrix
|
|
191
|
-
*
|
|
192
|
-
* @param runtime - data store runtime the new sparse matrix belongs to
|
|
193
|
-
* @param id - optional name of the sparse matrix
|
|
194
|
-
* @returns newly create sparse matrix (but not attached yet)
|
|
195
|
-
*/
|
|
196
|
-
static create(runtime, id) {
|
|
197
|
-
return runtime.createChannel(id, SparseMatrixFactory.Type);
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Get a factory for SharedMap to register with the data store.
|
|
201
|
-
*
|
|
202
|
-
* @returns a factory that creates and load SharedMap
|
|
203
|
-
*/
|
|
204
|
-
static getFactory() {
|
|
205
|
-
return new SparseMatrixFactory();
|
|
206
|
-
}
|
|
188
|
+
export class SparseMatrixClass extends SharedSegmentSequence {
|
|
207
189
|
constructor(document, id, attributes) {
|
|
208
190
|
super(document, id, attributes, SparseMatrixFactory.segmentFromSpec);
|
|
209
191
|
this.id = id;
|
|
@@ -318,12 +300,12 @@ export class SparseMatrixFactory {
|
|
|
318
300
|
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
319
301
|
*/
|
|
320
302
|
async load(runtime, id, services, attributes) {
|
|
321
|
-
const sharedObject = new
|
|
303
|
+
const sharedObject = new SparseMatrixClass(runtime, id, attributes);
|
|
322
304
|
await sharedObject.load(services);
|
|
323
305
|
return sharedObject;
|
|
324
306
|
}
|
|
325
307
|
create(document, id) {
|
|
326
|
-
const sharedObject = new
|
|
308
|
+
const sharedObject = new SparseMatrixClass(document, id, this.attributes);
|
|
327
309
|
sharedObject.initializeLocal();
|
|
328
310
|
return sharedObject;
|
|
329
311
|
}
|
|
@@ -334,4 +316,10 @@ SparseMatrixFactory.Attributes = {
|
|
|
334
316
|
snapshotFormatVersion: "0.1",
|
|
335
317
|
packageVersion: pkgVersion,
|
|
336
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* @deprecated `SparseMatrix` is an abandoned prototype.
|
|
321
|
+
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
export const SparseMatrix = createSharedObjectKind(SparseMatrixFactory);
|
|
337
325
|
//# sourceMappingURL=sparsematrix.js.map
|
package/lib/sparsematrix.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparsematrix.js","sourceRoot":"","sources":["../src/sparsematrix.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAQ7D,OAAO,EACN,WAAW,GAIX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;IAEvC,MAAM,CAAC,EA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,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QAC/D,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrE,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAhDa,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { 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,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAQ7D,OAAO,EACN,WAAW,GAIX,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,OAAO,cAAe,SAAQ,WAAW;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,KAAK,EAAE,IAAI,CAAC,U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AAI,QAAQ,EAAE;YACb,OAAO,QAAQ,CAAC;SAChB;QAED,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxE,CAAC;IAED,IAAW,IAAI;QACd,OAAO,mBAAmB,CAAC,IAAI,CAAC;IACjC,CAAC;IAED,IAAW,UAAU;QACpB,OAAO,mBAAmB,CAAC,UAAU,CAAC;IACvC,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,UAA8B;QAE9B,MAAM,YAAY,GAAG,IAAI,iBAAiB,CAAC,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClC,OAAO,YAAY,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,QAAgC,EAAE,EAAU;QACzD,MAAM,YAAY,GAAG,IAAI,iBAAiB,CAAC,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1E,YAAY,CAAC,eAAe,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAC;IACrB,CAAC;;AAhDa,wBAAI,GAAG,2DAA2D,CAAC;AAEnE,8BAAU,GAAuB;IAC9C,IAAI,EAAE,mBAAmB,CAAC,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,UAAU;CAC1B,CAAC;AA6CH;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,sBAAsB,CAAC,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/tsdoc-metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-experimental/sequence-deprecated",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.4.0.1",
|
|
4
4
|
"description": "Deprecated distributed sequences",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,24 +47,24 @@
|
|
|
47
47
|
"temp-directory": "nyc/.nyc_output"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/core-interfaces": ">=2.0.0-rc.
|
|
51
|
-
"@fluidframework/core-utils": ">=2.0.0-rc.
|
|
52
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-rc.
|
|
53
|
-
"@fluidframework/merge-tree": ">=2.0.0-rc.
|
|
54
|
-
"@fluidframework/sequence": ">=2.0.0-rc.
|
|
55
|
-
"@fluidframework/shared-object-base": ">=2.0.0-rc.
|
|
50
|
+
"@fluidframework/core-interfaces": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
51
|
+
"@fluidframework/core-utils": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
52
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
53
|
+
"@fluidframework/merge-tree": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
54
|
+
"@fluidframework/sequence": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
55
|
+
"@fluidframework/shared-object-base": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
59
59
|
"@biomejs/biome": "^1.6.2",
|
|
60
|
-
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.
|
|
61
|
-
"@fluid-private/test-dds-utils": ">=2.0.0-rc.
|
|
62
|
-
"@fluid-tools/build-cli": "^0.
|
|
60
|
+
"@fluid-internal/mocha-test-setup": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
61
|
+
"@fluid-private/test-dds-utils": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
62
|
+
"@fluid-tools/build-cli": "^0.38.0",
|
|
63
63
|
"@fluidframework/build-common": "^2.0.3",
|
|
64
|
-
"@fluidframework/build-tools": "^0.
|
|
64
|
+
"@fluidframework/build-tools": "^0.38.0",
|
|
65
65
|
"@fluidframework/eslint-config-fluid": "^5.1.0",
|
|
66
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.
|
|
67
|
-
"@microsoft/api-extractor": "^7.
|
|
66
|
+
"@fluidframework/test-runtime-utils": ">=2.0.0-rc.4.0.1 <2.0.0-rc.4.1.0",
|
|
67
|
+
"@microsoft/api-extractor": "^7.43.1",
|
|
68
68
|
"@types/diff": "^3.5.1",
|
|
69
69
|
"@types/mocha": "^9.1.1",
|
|
70
70
|
"@types/node": "^18.19.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
|
|
114
114
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
115
115
|
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
116
|
-
"typetests:gen": "
|
|
116
|
+
"typetests:gen": "flub generate typetests --dir . -v --publicFallback",
|
|
117
117
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
118
118
|
}
|
|
119
119
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
6
|
+
export { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
7
|
+
export { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
8
8
|
export {
|
|
9
9
|
MatrixSegment,
|
|
10
10
|
maxCellPosition,
|
|
@@ -19,6 +19,12 @@ export {
|
|
|
19
19
|
SparseMatrix,
|
|
20
20
|
SparseMatrixFactory,
|
|
21
21
|
SparseMatrixItem,
|
|
22
|
+
SparseMatrixClass,
|
|
22
23
|
} from "./sparsematrix.js";
|
|
23
24
|
export { IJSONRunSegment, SubSequence, SharedSequence } from "./sharedSequence.js";
|
|
24
|
-
export {
|
|
25
|
+
export {
|
|
26
|
+
SharedNumberSequenceFactory,
|
|
27
|
+
SharedObjectSequenceFactory,
|
|
28
|
+
SharedNumberSequence,
|
|
29
|
+
SharedObjectSequence,
|
|
30
|
+
} from "./sequenceFactory.js";
|
package/src/packageVersion.ts
CHANGED
package/src/sequenceFactory.ts
CHANGED
|
@@ -12,10 +12,11 @@ import {
|
|
|
12
12
|
import { IJSONSegment } from "@fluidframework/merge-tree/internal";
|
|
13
13
|
import { IJSONRunSegment, SubSequence } from "@fluidframework/sequence/internal";
|
|
14
14
|
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
15
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
15
16
|
|
|
16
17
|
import { pkgVersion } from "./packageVersion.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
18
|
+
import { SharedNumberSequenceClass } from "./sharedNumberSequence.js";
|
|
19
|
+
import { SharedObjectSequenceClass } from "./sharedObjectSequence.js";
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
@@ -84,7 +85,7 @@ export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
|
84
85
|
services: IChannelServices,
|
|
85
86
|
attributes: IChannelAttributes,
|
|
86
87
|
): Promise<ISharedObject> {
|
|
87
|
-
const sharedSeq = new
|
|
88
|
+
const sharedSeq = new SharedObjectSequenceClass<object>(runtime, id, attributes);
|
|
88
89
|
await sharedSeq.load(services);
|
|
89
90
|
return sharedSeq;
|
|
90
91
|
}
|
|
@@ -94,7 +95,7 @@ export class SharedObjectSequenceFactory implements IChannelFactory {
|
|
|
94
95
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
95
96
|
*/
|
|
96
97
|
public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {
|
|
97
|
-
const sharedString = new
|
|
98
|
+
const sharedString = new SharedObjectSequenceClass(document, id, this.attributes);
|
|
98
99
|
sharedString.initializeLocal();
|
|
99
100
|
return sharedString;
|
|
100
101
|
}
|
|
@@ -167,7 +168,7 @@ export class SharedNumberSequenceFactory implements IChannelFactory {
|
|
|
167
168
|
services: IChannelServices,
|
|
168
169
|
attributes: IChannelAttributes,
|
|
169
170
|
): Promise<ISharedObject> {
|
|
170
|
-
const sharedSeq = new
|
|
171
|
+
const sharedSeq = new SharedNumberSequenceClass(runtime, id, attributes);
|
|
171
172
|
await sharedSeq.load(services);
|
|
172
173
|
return sharedSeq;
|
|
173
174
|
}
|
|
@@ -177,8 +178,30 @@ export class SharedNumberSequenceFactory implements IChannelFactory {
|
|
|
177
178
|
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
178
179
|
*/
|
|
179
180
|
public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {
|
|
180
|
-
const sharedString = new
|
|
181
|
+
const sharedString = new SharedNumberSequenceClass(document, id, this.attributes);
|
|
181
182
|
sharedString.initializeLocal();
|
|
182
183
|
return sharedString;
|
|
183
184
|
}
|
|
184
185
|
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* {@inheritDoc SharedNumberSequenceClass}
|
|
189
|
+
* @internal
|
|
190
|
+
*/
|
|
191
|
+
export const SharedNumberSequence = createSharedObjectKind(SharedNumberSequenceFactory);
|
|
192
|
+
/**
|
|
193
|
+
* {@inheritDoc SharedNumberSequenceClass}
|
|
194
|
+
* @internal
|
|
195
|
+
*/
|
|
196
|
+
export type SharedNumberSequence = SharedNumberSequenceClass;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* {@inheritDoc SharedObjectSequenceClass}
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
202
|
+
export const SharedObjectSequence = createSharedObjectKind(SharedObjectSequenceFactory);
|
|
203
|
+
/**
|
|
204
|
+
* {@inheritDoc SharedObjectSequenceClass}
|
|
205
|
+
* @internal
|
|
206
|
+
*/
|
|
207
|
+
export type SharedObjectSequence<T> = SharedObjectSequenceClass<T>;
|
|
@@ -18,33 +18,7 @@ import { SharedSequence } from "./sharedSequence.js";
|
|
|
18
18
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
19
19
|
* @internal
|
|
20
20
|
*/
|
|
21
|
-
export class
|
|
22
|
-
/**
|
|
23
|
-
* Create a new shared number sequence
|
|
24
|
-
*
|
|
25
|
-
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
26
|
-
* @param id - optional name of the shared number sequence
|
|
27
|
-
* @returns newly create shared number sequence (but not attached yet)
|
|
28
|
-
*
|
|
29
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
30
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
31
|
-
*/
|
|
32
|
-
public static create(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
33
|
-
return runtime.createChannel(id, SharedNumberSequenceFactory.Type) as SharedNumberSequence;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Get a factory for SharedNumberSequence to register with the data store.
|
|
38
|
-
*
|
|
39
|
-
* @returns a factory that creates and load SharedNumberSequence
|
|
40
|
-
*
|
|
41
|
-
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
42
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
43
|
-
*/
|
|
44
|
-
public static getFactory() {
|
|
45
|
-
return new SharedNumberSequenceFactory();
|
|
46
|
-
}
|
|
47
|
-
|
|
21
|
+
export class SharedNumberSequenceClass extends SharedSequence<number> {
|
|
48
22
|
/**
|
|
49
23
|
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
50
24
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|