@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
|
@@ -19,37 +19,7 @@ import { SharedSequence } from "./sharedSequence.js";
|
|
|
19
19
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export class
|
|
23
|
-
/**
|
|
24
|
-
* Create a new shared object sequence
|
|
25
|
-
*
|
|
26
|
-
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
27
|
-
* @param id - optional name of the shared object sequence
|
|
28
|
-
* @returns newly create shared object sequence (but not attached yet)
|
|
29
|
-
*
|
|
30
|
-
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
31
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
public static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
35
|
-
return runtime.createChannel(
|
|
36
|
-
id,
|
|
37
|
-
SharedObjectSequenceFactory.Type,
|
|
38
|
-
) as SharedObjectSequence<T>;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Get a factory for SharedObjectSequence to register with the data store.
|
|
43
|
-
*
|
|
44
|
-
* @returns a factory that creates and load SharedObjectSequence
|
|
45
|
-
*
|
|
46
|
-
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
47
|
-
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
|
48
|
-
*/
|
|
49
|
-
public static getFactory() {
|
|
50
|
-
return new SharedObjectSequenceFactory();
|
|
51
|
-
}
|
|
52
|
-
|
|
22
|
+
export class SharedObjectSequenceClass<T> extends SharedSequence<T> {
|
|
53
23
|
/**
|
|
54
24
|
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
55
25
|
* For more info, please see {@link https://github.com/microsoft/FluidFramework/issues/8526 | Github issue 8526}.
|
package/src/sparsematrix.ts
CHANGED
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
PropertySet,
|
|
20
20
|
} from "@fluidframework/merge-tree/internal";
|
|
21
21
|
import { SharedSegmentSequence } from "@fluidframework/sequence/internal";
|
|
22
|
-
import {
|
|
22
|
+
import { createSharedObjectKind } from "@fluidframework/shared-object-base/internal";
|
|
23
23
|
|
|
24
24
|
import { pkgVersion } from "./packageVersion.js";
|
|
25
25
|
import { SubSequence } from "./sharedSequence.js";
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* An empty segment that occupies 'cachedLength' positions.
|
|
29
|
-
* {@link SparseMatrix} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
29
|
+
* {@link (SparseMatrix:variable)} uses `PaddingSegment` to "pad" a run of unoccupied cells.
|
|
30
30
|
*
|
|
31
31
|
* @deprecated `PaddingSegment` is part of an abandoned prototype.
|
|
32
32
|
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
@@ -242,31 +242,10 @@ export function positionToRowCol(position: number) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
|
-
* @
|
|
246
|
-
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
245
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
247
246
|
* @internal
|
|
248
247
|
*/
|
|
249
|
-
export class
|
|
250
|
-
/**
|
|
251
|
-
* Create a new sparse matrix
|
|
252
|
-
*
|
|
253
|
-
* @param runtime - data store runtime the new sparse matrix belongs to
|
|
254
|
-
* @param id - optional name of the sparse matrix
|
|
255
|
-
* @returns newly create sparse matrix (but not attached yet)
|
|
256
|
-
*/
|
|
257
|
-
public static create(runtime: IFluidDataStoreRuntime, id?: string) {
|
|
258
|
-
return runtime.createChannel(id, SparseMatrixFactory.Type) as SparseMatrix;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Get a factory for SharedMap to register with the data store.
|
|
263
|
-
*
|
|
264
|
-
* @returns a factory that creates and load SharedMap
|
|
265
|
-
*/
|
|
266
|
-
public static getFactory(): IChannelFactory {
|
|
267
|
-
return new SparseMatrixFactory();
|
|
268
|
-
}
|
|
269
|
-
|
|
248
|
+
export class SparseMatrixClass extends SharedSegmentSequence<MatrixSegment> {
|
|
270
249
|
constructor(
|
|
271
250
|
document: IFluidDataStoreRuntime,
|
|
272
251
|
public id: string,
|
|
@@ -382,7 +361,7 @@ export class SparseMatrix extends SharedSegmentSequence<MatrixSegment> {
|
|
|
382
361
|
* Use {@link @fluidframework/matrix#SharedMatrixFactory} instead.
|
|
383
362
|
* @internal
|
|
384
363
|
*/
|
|
385
|
-
export class SparseMatrixFactory implements IChannelFactory {
|
|
364
|
+
export class SparseMatrixFactory implements IChannelFactory<SparseMatrix> {
|
|
386
365
|
public static Type = "https://graph.microsoft.com/types/mergeTree/sparse-matrix";
|
|
387
366
|
|
|
388
367
|
public static Attributes: IChannelAttributes = {
|
|
@@ -421,15 +400,27 @@ export class SparseMatrixFactory implements IChannelFactory {
|
|
|
421
400
|
id: string,
|
|
422
401
|
services: IChannelServices,
|
|
423
402
|
attributes: IChannelAttributes,
|
|
424
|
-
): Promise<
|
|
425
|
-
const sharedObject = new
|
|
403
|
+
): Promise<SparseMatrix> {
|
|
404
|
+
const sharedObject = new SparseMatrixClass(runtime, id, attributes);
|
|
426
405
|
await sharedObject.load(services);
|
|
427
406
|
return sharedObject;
|
|
428
407
|
}
|
|
429
408
|
|
|
430
|
-
public create(document: IFluidDataStoreRuntime, id: string):
|
|
431
|
-
const sharedObject = new
|
|
409
|
+
public create(document: IFluidDataStoreRuntime, id: string): SparseMatrix {
|
|
410
|
+
const sharedObject = new SparseMatrixClass(document, id, this.attributes);
|
|
432
411
|
sharedObject.initializeLocal();
|
|
433
412
|
return sharedObject;
|
|
434
413
|
}
|
|
435
414
|
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* @deprecated `SparseMatrix` is an abandoned prototype.
|
|
418
|
+
* Use {@link @fluidframework/matrix#SharedMatrix} instead.
|
|
419
|
+
* @internal
|
|
420
|
+
*/
|
|
421
|
+
export const SparseMatrix = createSharedObjectKind(SparseMatrixFactory);
|
|
422
|
+
/**
|
|
423
|
+
* {@inheritDoc (SparseMatrix:variable)}
|
|
424
|
+
* @internal
|
|
425
|
+
*/
|
|
426
|
+
export type SparseMatrix = SparseMatrixClass;
|