@fluid-experimental/sequence-deprecated 2.0.0-dev.2.2.0.111723
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/.editorconfig +7 -0
- package/.eslintrc.js +17 -0
- package/.vscode/launch.json +14 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/api-extractor.json +12 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +24 -0
- package/dist/index.js.map +1 -0
- package/dist/packageVersion.d.ts +9 -0
- package/dist/packageVersion.d.ts.map +1 -0
- package/dist/packageVersion.js +12 -0
- package/dist/packageVersion.js.map +1 -0
- package/dist/sequenceFactory.d.ts +95 -0
- package/dist/sequenceFactory.d.ts.map +1 -0
- package/dist/sequenceFactory.js +152 -0
- package/dist/sequenceFactory.js.map +1 -0
- package/dist/sharedNumberSequence.d.ts +50 -0
- package/dist/sharedNumberSequence.d.ts.map +1 -0
- package/dist/sharedNumberSequence.js +67 -0
- package/dist/sharedNumberSequence.js.map +1 -0
- package/dist/sharedObjectSequence.d.ts +50 -0
- package/dist/sharedObjectSequence.d.ts.map +1 -0
- package/dist/sharedObjectSequence.js +61 -0
- package/dist/sharedObjectSequence.js.map +1 -0
- package/dist/sparsematrix.d.ts +152 -0
- package/dist/sparsematrix.d.ts.map +1 -0
- package/dist/sparsematrix.js +345 -0
- package/dist/sparsematrix.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/packageVersion.d.ts +9 -0
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/packageVersion.js +9 -0
- package/lib/packageVersion.js.map +1 -0
- package/lib/sequenceFactory.d.ts +95 -0
- package/lib/sequenceFactory.d.ts.map +1 -0
- package/lib/sequenceFactory.js +147 -0
- package/lib/sequenceFactory.js.map +1 -0
- package/lib/sharedNumberSequence.d.ts +50 -0
- package/lib/sharedNumberSequence.d.ts.map +1 -0
- package/lib/sharedNumberSequence.js +63 -0
- package/lib/sharedNumberSequence.js.map +1 -0
- package/lib/sharedObjectSequence.d.ts +50 -0
- package/lib/sharedObjectSequence.d.ts.map +1 -0
- package/lib/sharedObjectSequence.js +57 -0
- package/lib/sharedObjectSequence.js.map +1 -0
- package/lib/sparsematrix.d.ts +152 -0
- package/lib/sparsematrix.d.ts.map +1 -0
- package/lib/sparsematrix.js +336 -0
- package/lib/sparsematrix.js.map +1 -0
- package/package.json +97 -0
- package/src/index.ts +22 -0
- package/src/packageVersion.ts +9 -0
- package/src/sequenceFactory.ts +181 -0
- package/src/sharedNumberSequence.ts +68 -0
- package/src/sharedObjectSequence.ts +62 -0
- package/src/sparsematrix.ts +434 -0
- package/tsconfig.esnext.json +7 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export declare const pkgName = "@fluid-experimental/sequence-deprecated";
|
|
8
|
+
export declare const pkgVersion = "2.0.0-dev.2.2.0.111723";
|
|
9
|
+
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,4CAA4C,CAAC;AACjE,eAAO,MAAM,UAAU,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
|
+
*/
|
|
7
|
+
export const pkgName = "@fluid-experimental/sequence-deprecated";
|
|
8
|
+
export const pkgVersion = "2.0.0-dev.2.2.0.111723";
|
|
9
|
+
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -0,0 +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,wBAAwB,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-dev.2.2.0.111723\";\n"]}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IChannelAttributes, IFluidDataStoreRuntime, IChannelServices, IChannelFactory } from "@fluidframework/datastore-definitions";
|
|
6
|
+
import { IJSONSegment } from "@fluidframework/merge-tree";
|
|
7
|
+
import { ISharedObject } from "@fluidframework/shared-object-base";
|
|
8
|
+
import { SubSequence } from "@fluidframework/sequence";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
11
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
12
|
+
*/
|
|
13
|
+
export declare class SharedObjectSequenceFactory implements IChannelFactory {
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
16
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
17
|
+
*/
|
|
18
|
+
static Type: string;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
21
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
22
|
+
*/
|
|
23
|
+
static readonly Attributes: IChannelAttributes;
|
|
24
|
+
/**
|
|
25
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
26
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
27
|
+
*/
|
|
28
|
+
static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object>;
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
31
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
32
|
+
*/
|
|
33
|
+
get type(): string;
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
36
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
37
|
+
*/
|
|
38
|
+
get attributes(): IChannelAttributes;
|
|
39
|
+
/**
|
|
40
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
41
|
+
*
|
|
42
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
43
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
44
|
+
*/
|
|
45
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
48
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
49
|
+
*/
|
|
50
|
+
create(document: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
54
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
55
|
+
*/
|
|
56
|
+
export declare class SharedNumberSequenceFactory implements IChannelFactory {
|
|
57
|
+
/**
|
|
58
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
59
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
60
|
+
*/
|
|
61
|
+
static Type: string;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
64
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
65
|
+
*/
|
|
66
|
+
static readonly Attributes: IChannelAttributes;
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
69
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
70
|
+
*/
|
|
71
|
+
static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number>;
|
|
72
|
+
/**
|
|
73
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
74
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
75
|
+
*/
|
|
76
|
+
get type(): string;
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
79
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
80
|
+
*/
|
|
81
|
+
get attributes(): IChannelAttributes;
|
|
82
|
+
/**
|
|
83
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
84
|
+
*
|
|
85
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
86
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
87
|
+
*/
|
|
88
|
+
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<ISharedObject>;
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
91
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
92
|
+
*/
|
|
93
|
+
create(document: IFluidDataStoreRuntime, id: string): ISharedObject;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=sequenceFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequenceFactory.d.ts","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACH,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,eAAe,EAClB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACH,YAAY,EACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAmB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKxE;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IAC/D;;;OAGG;IACH,OAAc,IAAI,SAAiE;IAEnF;;;OAGG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;IAazE;;;OAGG;IACH,IAAW,IAAI,WAEd;IAED;;;OAGG;IACH,IAAW,UAAU,uBAEpB;IAED;;;;;OAKG;IACU,IAAI,CACb,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAM3D;;;OAGG;IACI,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAK7E;AAED;;;GAGG;AACH,qBAAa,2BAA4B,YAAW,eAAe;IAC/D;;;OAGG;IACH,OAAc,IAAI,SAAiE;IAEnF;;;OAGG;IACH,gBAAuB,UAAU,EAAE,kBAAkB,CAInD;IAEF;;;OAGG;WACW,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC;IAazE;;;OAGG;IACH,IAAW,IAAI,WAEd;IAED;;;OAGG;IACH,IAAW,UAAU,uBAEpB;IAED;;;;;OAKG;IACU,IAAI,CACb,OAAO,EAAE,sBAAsB,EAC/B,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,gBAAgB,EAC1B,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAM3D;;;OAGG;IACI,MAAM,CAAC,QAAQ,EAAE,sBAAsB,EAAE,EAAE,EAAE,MAAM,GAAG,aAAa;CAK7E"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { SubSequence } from "@fluidframework/sequence";
|
|
6
|
+
import { pkgVersion } from "./packageVersion";
|
|
7
|
+
import { SharedNumberSequence } from "./sharedNumberSequence";
|
|
8
|
+
import { SharedObjectSequence } from "./sharedObjectSequence";
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
11
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
12
|
+
*/
|
|
13
|
+
export class SharedObjectSequenceFactory {
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
16
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
17
|
+
*/
|
|
18
|
+
static segmentFromSpec(segSpec) {
|
|
19
|
+
const runSegment = segSpec;
|
|
20
|
+
if (runSegment.items) {
|
|
21
|
+
const seg = new SubSequence(runSegment.items);
|
|
22
|
+
if (runSegment.props) {
|
|
23
|
+
seg.addProperties(runSegment.props);
|
|
24
|
+
}
|
|
25
|
+
return seg;
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`Unrecognized IJSONObject`);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
31
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
32
|
+
*/
|
|
33
|
+
get type() {
|
|
34
|
+
return SharedObjectSequenceFactory.Type;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
38
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
39
|
+
*/
|
|
40
|
+
get attributes() {
|
|
41
|
+
return SharedObjectSequenceFactory.Attributes;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
45
|
+
*
|
|
46
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
47
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
48
|
+
*/
|
|
49
|
+
async load(runtime, id, services, attributes) {
|
|
50
|
+
const sharedSeq = new SharedObjectSequence(runtime, id, attributes);
|
|
51
|
+
await sharedSeq.load(services);
|
|
52
|
+
return sharedSeq;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
56
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
57
|
+
*/
|
|
58
|
+
create(document, id) {
|
|
59
|
+
const sharedString = new SharedObjectSequence(document, id, this.attributes);
|
|
60
|
+
sharedString.initializeLocal();
|
|
61
|
+
return sharedString;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
66
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
67
|
+
*/
|
|
68
|
+
SharedObjectSequenceFactory.Type = "https://graph.microsoft.com/types/mergeTree/object-sequence";
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
71
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
72
|
+
*/
|
|
73
|
+
SharedObjectSequenceFactory.Attributes = {
|
|
74
|
+
type: SharedObjectSequenceFactory.Type,
|
|
75
|
+
snapshotFormatVersion: "0.1",
|
|
76
|
+
packageVersion: pkgVersion,
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
80
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
81
|
+
*/
|
|
82
|
+
export class SharedNumberSequenceFactory {
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
85
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
86
|
+
*/
|
|
87
|
+
static segmentFromSpec(segSpec) {
|
|
88
|
+
const runSegment = segSpec;
|
|
89
|
+
if (runSegment.items) {
|
|
90
|
+
const seg = new SubSequence(runSegment.items);
|
|
91
|
+
if (runSegment.props) {
|
|
92
|
+
seg.addProperties(runSegment.props);
|
|
93
|
+
}
|
|
94
|
+
return seg;
|
|
95
|
+
}
|
|
96
|
+
throw new Error(`Unrecognized IJSONObject`);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
100
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
101
|
+
*/
|
|
102
|
+
get type() {
|
|
103
|
+
return SharedNumberSequenceFactory.Type;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
107
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
108
|
+
*/
|
|
109
|
+
get attributes() {
|
|
110
|
+
return SharedNumberSequenceFactory.Attributes;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
|
|
114
|
+
*
|
|
115
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
116
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
117
|
+
*/
|
|
118
|
+
async load(runtime, id, services, attributes) {
|
|
119
|
+
const sharedSeq = new SharedNumberSequence(runtime, id, attributes);
|
|
120
|
+
await sharedSeq.load(services);
|
|
121
|
+
return sharedSeq;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
125
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
126
|
+
*/
|
|
127
|
+
create(document, id) {
|
|
128
|
+
const sharedString = new SharedNumberSequence(document, id, this.attributes);
|
|
129
|
+
sharedString.initializeLocal();
|
|
130
|
+
return sharedString;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
135
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
136
|
+
*/
|
|
137
|
+
SharedNumberSequenceFactory.Type = "https://graph.microsoft.com/types/mergeTree/number-sequence";
|
|
138
|
+
/**
|
|
139
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
140
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
141
|
+
*/
|
|
142
|
+
SharedNumberSequenceFactory.Attributes = {
|
|
143
|
+
type: SharedNumberSequenceFactory.Type,
|
|
144
|
+
snapshotFormatVersion: "0.1",
|
|
145
|
+
packageVersion: pkgVersion,
|
|
146
|
+
};
|
|
147
|
+
//# sourceMappingURL=sequenceFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sequenceFactory.js","sourceRoot":"","sources":["../src/sequenceFactory.ts"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n IChannelAttributes,\n IFluidDataStoreRuntime,\n IChannelServices,\n IChannelFactory,\n} from \"@fluidframework/datastore-definitions\";\nimport {\n IJSONSegment,\n} from \"@fluidframework/merge-tree\";\nimport { ISharedObject } from \"@fluidframework/shared-object-base\";\nimport { IJSONRunSegment, SubSequence } from \"@fluidframework/sequence\";\nimport { pkgVersion } from \"./packageVersion\";\nimport { SharedNumberSequence } from \"./sharedNumberSequence\";\nimport { SharedObjectSequence } from \"./sharedObjectSequence\";\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 */\nexport class SharedObjectSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/object-sequence\";\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedObjectSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\n };\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<object> {\n const runSegment = segSpec as IJSONRunSegment<object>;\n if (runSegment.items) {\n const seg = new SubSequence<object>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\n }\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 */\n public get type() {\n return SharedObjectSequenceFactory.Type;\n }\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 */\n public get attributes() {\n return SharedObjectSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedObjectSequence<object>(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\n }\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedObjectSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\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 */\nexport class SharedNumberSequenceFactory implements IChannelFactory {\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 */\n public static Type = \"https://graph.microsoft.com/types/mergeTree/number-sequence\";\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 */\n public static readonly Attributes: IChannelAttributes = {\n type: SharedNumberSequenceFactory.Type,\n snapshotFormatVersion: \"0.1\",\n packageVersion: pkgVersion,\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 */\n public static segmentFromSpec(segSpec: IJSONSegment): SubSequence<number> {\n const runSegment = segSpec as IJSONRunSegment<number>;\n if (runSegment.items) {\n const seg = new SubSequence<number>(runSegment.items);\n if (runSegment.props) {\n seg.addProperties(runSegment.props);\n }\n return seg;\n }\n\n throw new Error(`Unrecognized IJSONObject`);\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 */\n public get type() {\n return SharedNumberSequenceFactory.Type;\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 */\n public get attributes() {\n return SharedNumberSequenceFactory.Attributes;\n }\n\n /**\n * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}\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 */\n public async load(\n runtime: IFluidDataStoreRuntime,\n id: string,\n services: IChannelServices,\n attributes: IChannelAttributes): Promise<ISharedObject> {\n const sharedSeq = new SharedNumberSequence(runtime, id, attributes);\n await sharedSeq.load(services);\n return sharedSeq;\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 */\n public create(document: IFluidDataStoreRuntime, id: string): ISharedObject {\n const sharedString = new SharedNumberSequence(document, id, this.attributes);\n sharedString.initializeLocal();\n return sharedString;\n }\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IFluidDataStoreRuntime, IChannelAttributes } from "@fluidframework/datastore-definitions";
|
|
6
|
+
import { SharedSequence } from "@fluidframework/sequence";
|
|
7
|
+
import { SharedNumberSequenceFactory } from "./sequenceFactory";
|
|
8
|
+
/**
|
|
9
|
+
* The SharedNumberSequence holds a sequence of numbers. Each number will be stored
|
|
10
|
+
* at a position within the sequence. See the
|
|
11
|
+
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
12
|
+
* for details on working with sequences.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
15
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
16
|
+
*/
|
|
17
|
+
export declare class SharedNumberSequence extends SharedSequence<number> {
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Create a new shared number sequence
|
|
21
|
+
*
|
|
22
|
+
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
23
|
+
* @param id - optional name of the shared number sequence
|
|
24
|
+
* @returns newly create shared number sequence (but not attached yet)
|
|
25
|
+
*
|
|
26
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
27
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
28
|
+
*/
|
|
29
|
+
static create(runtime: IFluidDataStoreRuntime, id?: string): SharedNumberSequence;
|
|
30
|
+
/**
|
|
31
|
+
* Get a factory for SharedNumberSequence to register with the data store.
|
|
32
|
+
*
|
|
33
|
+
* @returns a factory that creates and load SharedNumberSequence
|
|
34
|
+
*
|
|
35
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
36
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
37
|
+
*/
|
|
38
|
+
static getFactory(): SharedNumberSequenceFactory;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
41
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
42
|
+
*/
|
|
43
|
+
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
46
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
47
|
+
*/
|
|
48
|
+
getRange(start: number, end?: number): number[];
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=sharedNumberSequence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.d.ts","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAgCP,EAAE,EAAE,MAAM;IA/B/D;;;;;;;;;OASG;WACW,MAAM,CAAC,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAKjE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBACS,QAAQ,EAAE,sBAAsB,EAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB;IAU/F;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;CAG9C"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { SharedSequence } from "@fluidframework/sequence";
|
|
6
|
+
import { SharedNumberSequenceFactory } from "./sequenceFactory";
|
|
7
|
+
/**
|
|
8
|
+
* The SharedNumberSequence holds a sequence of numbers. Each number will be stored
|
|
9
|
+
* at a position within the sequence. See the
|
|
10
|
+
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
11
|
+
* for details on working with sequences.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
14
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
15
|
+
*/
|
|
16
|
+
export class SharedNumberSequence extends SharedSequence {
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
19
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
20
|
+
*/
|
|
21
|
+
constructor(document, id, attributes) {
|
|
22
|
+
super(document, id, attributes, (spec) => {
|
|
23
|
+
const segment = SharedNumberSequenceFactory.segmentFromSpec(spec);
|
|
24
|
+
if (!segment) {
|
|
25
|
+
throw new Error("expected `spec` to be valid `ISegment`");
|
|
26
|
+
}
|
|
27
|
+
return segment;
|
|
28
|
+
});
|
|
29
|
+
this.id = id;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a new shared number sequence
|
|
33
|
+
*
|
|
34
|
+
* @param runtime - data store runtime the new shared number sequence belongs to
|
|
35
|
+
* @param id - optional name of the shared number sequence
|
|
36
|
+
* @returns newly create shared number sequence (but not attached yet)
|
|
37
|
+
*
|
|
38
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
39
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
40
|
+
*/
|
|
41
|
+
static create(runtime, id) {
|
|
42
|
+
return runtime.createChannel(id, SharedNumberSequenceFactory.Type);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get a factory for SharedNumberSequence to register with the data store.
|
|
46
|
+
*
|
|
47
|
+
* @returns a factory that creates and load SharedNumberSequence
|
|
48
|
+
*
|
|
49
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
50
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
51
|
+
*/
|
|
52
|
+
static getFactory() {
|
|
53
|
+
return new SharedNumberSequenceFactory();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated SharedNumberSequence is not recommended for use and will be removed in an upcoming release.
|
|
57
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
58
|
+
*/
|
|
59
|
+
getRange(start, end) {
|
|
60
|
+
return this.getItems(start, end);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=sharedNumberSequence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedNumberSequence.js","sourceRoot":"","sources":["../src/sharedNumberSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAqB,SAAQ,cAAsB;IA4B5D;;;OAGG;IACH,YAAY,QAAgC,EAAS,EAAU,EAAE,UAA8B;QAC3F,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACrC,MAAM,OAAO,GAAG,2BAA2B,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAClE,IAAI,CAAC,OAAO,EAAE;gBACV,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;aAC7D;YACD,OAAO,OAAO,CAAC;QACnB,CAAC,CAAC,CAAC;QAP8C,OAAE,GAAF,EAAE,CAAQ;IAQ/D,CAAC;IAvCD;;;;;;;;;OASG;IACI,MAAM,CAAC,MAAM,CAAC,OAA+B,EAAE,EAAW;QAC7D,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAC3B,2BAA2B,CAAC,IAAI,CAAyB,CAAC;IAClE,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACpB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC7C,CAAC;IAgBD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes } from \"@fluidframework/datastore-definitions\";\nimport { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedNumberSequenceFactory } from \"./sequenceFactory\";\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 [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedNumberSequence extends SharedSequence<number> {\n /**\n * Create a new shared number sequence\n *\n * @param runtime - data store runtime the new shared number sequence belongs to\n * @param id - optional name of the shared number sequence\n * @returns newly create shared number sequence (but not attached yet)\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 */\n public static create(runtime: IFluidDataStoreRuntime, id?: string) {\n return runtime.createChannel(id,\n SharedNumberSequenceFactory.Type) as SharedNumberSequence;\n }\n\n /**\n * Get a factory for SharedNumberSequence to register with the data store.\n *\n * @returns a factory that creates and load SharedNumberSequence\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 */\n public static getFactory() {\n return new SharedNumberSequenceFactory();\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 */\n constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {\n super(document, id, attributes, (spec) => {\n const segment = SharedNumberSequenceFactory.segmentFromSpec(spec);\n if (!segment) {\n throw new Error(\"expected `spec` to be valid `ISegment`\");\n }\n return segment;\n });\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 */\n public getRange(start: number, end?: number) {\n return this.getItems(start, end);\n }\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { IFluidDataStoreRuntime, IChannelAttributes, Serializable } from "@fluidframework/datastore-definitions";
|
|
6
|
+
import { SharedSequence } from "@fluidframework/sequence";
|
|
7
|
+
import { SharedObjectSequenceFactory } from "./sequenceFactory";
|
|
8
|
+
/**
|
|
9
|
+
* The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored
|
|
10
|
+
* at a position within the sequence. See the
|
|
11
|
+
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
12
|
+
* for details on working with sequences.
|
|
13
|
+
*
|
|
14
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
15
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
16
|
+
*/
|
|
17
|
+
export declare class SharedObjectSequence<T> extends SharedSequence<T> {
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Create a new shared object sequence
|
|
21
|
+
*
|
|
22
|
+
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
23
|
+
* @param id - optional name of the shared object sequence
|
|
24
|
+
* @returns newly create shared object sequence (but not attached yet)
|
|
25
|
+
*
|
|
26
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
27
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
28
|
+
*/
|
|
29
|
+
static create<T>(runtime: IFluidDataStoreRuntime, id?: string): SharedObjectSequence<T>;
|
|
30
|
+
/**
|
|
31
|
+
* Get a factory for SharedObjectSequence to register with the data store.
|
|
32
|
+
*
|
|
33
|
+
* @returns a factory that creates and load SharedObjectSequence
|
|
34
|
+
*
|
|
35
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
36
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
37
|
+
*/
|
|
38
|
+
static getFactory(): SharedObjectSequenceFactory;
|
|
39
|
+
/**
|
|
40
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
41
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
42
|
+
*/
|
|
43
|
+
constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
|
|
44
|
+
/**
|
|
45
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
46
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
47
|
+
*/
|
|
48
|
+
getRange(start: number, end?: number): Serializable<T>[];
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=sharedObjectSequence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.d.ts","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACjH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;IAgCL,EAAE,EAAE,MAAM;IA/B/D;;;;;;;;;OASG;WAEW,MAAM,CAAC,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,EAAE,CAAC,EAAE,MAAM;IAIpE;;;;;;;OAOG;WACW,UAAU;IAIxB;;;OAGG;gBACS,QAAQ,EAAE,sBAAsB,EAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,kBAAkB;IAI/F;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,EAAE;CAGlE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import { SharedSequence } from "@fluidframework/sequence";
|
|
6
|
+
import { SharedObjectSequenceFactory } from "./sequenceFactory";
|
|
7
|
+
/**
|
|
8
|
+
* The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored
|
|
9
|
+
* at a position within the sequence. See the
|
|
10
|
+
* {@link https://fluidframework.com/docs/data-structures/sequences/ | sequence documentation}
|
|
11
|
+
* for details on working with sequences.
|
|
12
|
+
*
|
|
13
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
14
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
15
|
+
*/
|
|
16
|
+
export class SharedObjectSequence extends SharedSequence {
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
19
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
20
|
+
*/
|
|
21
|
+
constructor(document, id, attributes) {
|
|
22
|
+
super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec);
|
|
23
|
+
this.id = id;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a new shared object sequence
|
|
27
|
+
*
|
|
28
|
+
* @param runtime - data store runtime the new shared object sequence belongs to
|
|
29
|
+
* @param id - optional name of the shared object sequence
|
|
30
|
+
* @returns newly create shared object sequence (but not attached yet)
|
|
31
|
+
*
|
|
32
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
33
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
34
|
+
*/
|
|
35
|
+
static create(runtime, id) {
|
|
36
|
+
return runtime.createChannel(id, SharedObjectSequenceFactory.Type);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get a factory for SharedObjectSequence to register with the data store.
|
|
40
|
+
*
|
|
41
|
+
* @returns a factory that creates and load SharedObjectSequence
|
|
42
|
+
*
|
|
43
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
44
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
45
|
+
*/
|
|
46
|
+
static getFactory() {
|
|
47
|
+
return new SharedObjectSequenceFactory();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
|
|
51
|
+
* For more info, please see [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)
|
|
52
|
+
*/
|
|
53
|
+
getRange(start, end) {
|
|
54
|
+
return this.getItems(start, end);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=sharedObjectSequence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sharedObjectSequence.js","sourceRoot":"","sources":["../src/sharedObjectSequence.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAEhE;;;;;;;;GAQG;AACH,MAAM,OAAO,oBAAwB,SAAQ,cAAiB;IA4B1D;;;OAGG;IACH,YAAY,QAAgC,EAAS,EAAU,EAAE,UAA8B;QAC3F,KAAK,CAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,2BAA2B,CAAC,eAAsB,CAAC,CAAC;QADnC,OAAE,GAAF,EAAE,CAAQ;IAE/D,CAAC;IAjCD;;;;;;;;;OASG;IAEI,MAAM,CAAC,MAAM,CAAI,OAA+B,EAAE,EAAW;QAChE,OAAO,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,2BAA2B,CAAC,IAAI,CAA4B,CAAC;IAClG,CAAC;IAED;;;;;;;OAOG;IACI,MAAM,CAAC,UAAU;QACpB,OAAO,IAAI,2BAA2B,EAAE,CAAC;IAC7C,CAAC;IAUD;;;OAGG;IACI,QAAQ,CAAC,KAAa,EAAE,GAAY;QACvC,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACrC,CAAC;CACJ","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidDataStoreRuntime, IChannelAttributes, Serializable } from \"@fluidframework/datastore-definitions\";\nimport { SharedSequence } from \"@fluidframework/sequence\";\nimport { SharedObjectSequenceFactory } from \"./sequenceFactory\";\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 [Github issue 8526](https://github.com/microsoft/FluidFramework/issues/8526)\n */\nexport class SharedObjectSequence<T> extends SharedSequence<T> {\n /**\n * Create a new shared object sequence\n *\n * @param runtime - data store runtime the new shared object sequence belongs to\n * @param id - optional name of the shared object sequence\n * @returns newly create shared object sequence (but not attached yet)\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 */\n\n public static create<T>(runtime: IFluidDataStoreRuntime, id?: string) {\n return runtime.createChannel(id, SharedObjectSequenceFactory.Type) as SharedObjectSequence<T>;\n }\n\n /**\n * Get a factory for SharedObjectSequence to register with the data store.\n *\n * @returns a factory that creates and load SharedObjectSequence\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 */\n public static getFactory() {\n return new SharedObjectSequenceFactory();\n }\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 */\n constructor(document: IFluidDataStoreRuntime, public id: string, attributes: IChannelAttributes) {\n super(document, id, attributes, SharedObjectSequenceFactory.segmentFromSpec as any);\n }\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 */\n public getRange(start: number, end?: number): Serializable<T>[] {\n return this.getItems(start, end);\n }\n}\n"]}
|