@fluid-experimental/tree 2.0.0-internal.8.0.0 → 2.0.0-rc.1.0.0
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 +34 -0
- package/api-extractor-lint.json +1 -10
- package/api-extractor.json +0 -9
- package/api-report/experimental-tree.api.md +131 -130
- package/dist/ChangeTypes.d.ts +15 -15
- package/dist/ChangeTypes.js +4 -4
- package/dist/ChangeTypes.js.map +1 -1
- package/dist/Checkout.d.ts +4 -4
- package/dist/Checkout.js +3 -3
- package/dist/Checkout.js.map +1 -1
- package/dist/Common.d.ts +1 -1
- package/dist/Common.d.ts.map +1 -1
- package/dist/Common.js.map +1 -1
- package/dist/EagerCheckout.d.ts +1 -1
- package/dist/EagerCheckout.js +1 -1
- package/dist/EagerCheckout.js.map +1 -1
- package/dist/EditLog.d.ts +3 -2
- package/dist/EditLog.d.ts.map +1 -1
- package/dist/EditLog.js +3 -5
- package/dist/EditLog.js.map +1 -1
- package/dist/EditUtilities.d.ts +5 -5
- package/dist/EditUtilities.js +2 -2
- package/dist/EditUtilities.js.map +1 -1
- package/dist/EventTypes.d.ts +1 -1
- package/dist/EventTypes.js +1 -1
- package/dist/EventTypes.js.map +1 -1
- package/dist/Forest.d.ts +4 -4
- package/dist/Forest.js +3 -6
- package/dist/Forest.js.map +1 -1
- package/dist/Identifiers.d.ts +14 -14
- package/dist/Identifiers.js.map +1 -1
- package/dist/InitialTree.d.ts +1 -1
- package/dist/InitialTree.js +1 -1
- package/dist/InitialTree.js.map +1 -1
- package/dist/LogViewer.d.ts +2 -2
- package/dist/LogViewer.js +1 -1
- package/dist/LogViewer.js.map +1 -1
- package/dist/NodeIdUtilities.d.ts +3 -3
- package/dist/NodeIdUtilities.js.map +1 -1
- package/dist/PayloadUtilities.d.ts +1 -1
- package/dist/PayloadUtilities.js +1 -1
- package/dist/PayloadUtilities.js.map +1 -1
- package/dist/ReconciliationPath.d.ts +3 -3
- package/dist/ReconciliationPath.js.map +1 -1
- package/dist/RevisionValueCache.d.ts +1 -1
- package/dist/RevisionValueCache.js +2 -2
- package/dist/RevisionValueCache.js.map +1 -1
- package/dist/RevisionView.d.ts +2 -2
- package/dist/RevisionView.js +2 -2
- package/dist/RevisionView.js.map +1 -1
- package/dist/SharedTree.d.ts +14 -14
- package/dist/SharedTree.js +2 -2
- package/dist/SharedTree.js.map +1 -1
- package/dist/Transaction.d.ts +3 -3
- package/dist/Transaction.js +2 -2
- package/dist/Transaction.js.map +1 -1
- package/dist/TransactionInternal.d.ts +17 -17
- package/dist/TransactionInternal.js +3 -3
- package/dist/TransactionInternal.js.map +1 -1
- package/dist/TreeView.d.ts +7 -7
- package/dist/TreeView.js +1 -1
- package/dist/TreeView.js.map +1 -1
- package/dist/id-compressor/IdCompressor.js +2 -5
- package/dist/id-compressor/IdCompressor.js.map +1 -1
- package/dist/migration-shim/migrationShim.d.ts +3 -3
- package/dist/migration-shim/migrationShim.d.ts.map +1 -1
- package/dist/migration-shim/migrationShim.js +9 -5
- package/dist/migration-shim/migrationShim.js.map +1 -1
- package/dist/migration-shim/migrationShimFactory.d.ts +2 -2
- package/dist/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/migrationShimFactory.js.map +1 -1
- package/dist/migration-shim/sharedTreeShim.d.ts +4 -4
- package/dist/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShim.js +1 -1
- package/dist/migration-shim/sharedTreeShim.js.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.d.ts +1 -2
- package/dist/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/dist/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.d.ts +16 -0
- package/dist/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/dist/migration-shim/shimDeltaConnection.js +16 -2
- package/dist/migration-shim/shimDeltaConnection.js.map +1 -1
- package/dist/migration-shim/types.d.ts +1 -1
- package/dist/migration-shim/types.d.ts.map +1 -1
- package/dist/migration-shim/types.js.map +1 -1
- package/dist/persisted-types/0.0.2.d.ts +24 -24
- package/dist/persisted-types/0.0.2.js +5 -5
- package/dist/persisted-types/0.0.2.js.map +1 -1
- package/dist/persisted-types/0.1.1.d.ts +14 -14
- package/dist/persisted-types/0.1.1.js +3 -3
- package/dist/persisted-types/0.1.1.js.map +1 -1
- package/dist/tree-alpha.d.ts +2674 -119
- package/dist/tree-beta.d.ts +1 -50
- package/dist/tree-public.d.ts +1 -52
- package/dist/tree-untrimmed.d.ts +142 -143
- package/lib/ChangeTypes.d.ts +15 -15
- package/lib/ChangeTypes.js +4 -4
- package/lib/ChangeTypes.js.map +1 -1
- package/lib/Checkout.d.ts +4 -4
- package/lib/Checkout.js +3 -3
- package/lib/Checkout.js.map +1 -1
- package/lib/Common.d.ts +1 -1
- package/lib/Common.d.ts.map +1 -1
- package/lib/Common.js.map +1 -1
- package/lib/EagerCheckout.d.ts +1 -1
- package/lib/EagerCheckout.js +1 -1
- package/lib/EagerCheckout.js.map +1 -1
- package/lib/EditLog.d.ts +3 -2
- package/lib/EditLog.d.ts.map +1 -1
- package/lib/EditLog.js +2 -1
- package/lib/EditLog.js.map +1 -1
- package/lib/EditUtilities.d.ts +5 -5
- package/lib/EditUtilities.js +2 -2
- package/lib/EditUtilities.js.map +1 -1
- package/lib/EventTypes.d.ts +1 -1
- package/lib/EventTypes.js +1 -1
- package/lib/EventTypes.js.map +1 -1
- package/lib/Forest.d.ts +4 -4
- package/lib/Forest.js +2 -2
- package/lib/Forest.js.map +1 -1
- package/lib/Identifiers.d.ts +14 -14
- package/lib/Identifiers.js.map +1 -1
- package/lib/InitialTree.d.ts +1 -1
- package/lib/InitialTree.js +1 -1
- package/lib/InitialTree.js.map +1 -1
- package/lib/LogViewer.d.ts +2 -2
- package/lib/LogViewer.js +1 -1
- package/lib/LogViewer.js.map +1 -1
- package/lib/NodeIdUtilities.d.ts +3 -3
- package/lib/NodeIdUtilities.js.map +1 -1
- package/lib/PayloadUtilities.d.ts +1 -1
- package/lib/PayloadUtilities.js +1 -1
- package/lib/PayloadUtilities.js.map +1 -1
- package/lib/ReconciliationPath.d.ts +3 -3
- package/lib/ReconciliationPath.js.map +1 -1
- package/lib/RevisionValueCache.d.ts +1 -1
- package/lib/RevisionValueCache.js +1 -1
- package/lib/RevisionValueCache.js.map +1 -1
- package/lib/RevisionView.d.ts +2 -2
- package/lib/RevisionView.js +2 -2
- package/lib/RevisionView.js.map +1 -1
- package/lib/SharedTree.d.ts +14 -14
- package/lib/SharedTree.js +2 -2
- package/lib/SharedTree.js.map +1 -1
- package/lib/Transaction.d.ts +3 -3
- package/lib/Transaction.js +2 -2
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionInternal.d.ts +17 -17
- package/lib/TransactionInternal.js +3 -3
- package/lib/TransactionInternal.js.map +1 -1
- package/lib/TreeView.d.ts +7 -7
- package/lib/TreeView.js +1 -1
- package/lib/TreeView.js.map +1 -1
- package/lib/id-compressor/IdCompressor.js +1 -1
- package/lib/id-compressor/IdCompressor.js.map +1 -1
- package/lib/migration-shim/migrationShim.d.ts +3 -3
- package/lib/migration-shim/migrationShim.d.ts.map +1 -1
- package/lib/migration-shim/migrationShim.js +9 -5
- package/lib/migration-shim/migrationShim.js.map +1 -1
- package/lib/migration-shim/migrationShimFactory.d.ts +2 -2
- package/lib/migration-shim/migrationShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/migrationShimFactory.js.map +1 -1
- package/lib/migration-shim/sharedTreeShim.d.ts +4 -4
- package/lib/migration-shim/sharedTreeShim.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShim.js +1 -1
- package/lib/migration-shim/sharedTreeShim.js.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.d.ts +1 -2
- package/lib/migration-shim/sharedTreeShimFactory.d.ts.map +1 -1
- package/lib/migration-shim/sharedTreeShimFactory.js.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.d.ts +16 -0
- package/lib/migration-shim/shimDeltaConnection.d.ts.map +1 -1
- package/lib/migration-shim/shimDeltaConnection.js +16 -2
- package/lib/migration-shim/shimDeltaConnection.js.map +1 -1
- package/lib/migration-shim/types.d.ts +1 -1
- package/lib/migration-shim/types.d.ts.map +1 -1
- package/lib/migration-shim/types.js.map +1 -1
- package/lib/persisted-types/0.0.2.d.ts +24 -24
- package/lib/persisted-types/0.0.2.js +5 -5
- package/lib/persisted-types/0.0.2.js.map +1 -1
- package/lib/persisted-types/0.1.1.d.ts +14 -14
- package/lib/persisted-types/0.1.1.js +3 -3
- package/lib/persisted-types/0.1.1.js.map +1 -1
- package/lib/test/utilities/TestUtilities.d.ts +1 -2
- package/lib/test/utilities/TestUtilities.d.ts.map +1 -1
- package/lib/test/utilities/TestUtilities.js.map +1 -1
- package/package.json +25 -25
- package/src/ChangeTypes.ts +15 -15
- package/src/Checkout.ts +4 -4
- package/src/Common.ts +1 -1
- package/src/EagerCheckout.ts +1 -1
- package/src/EditLog.ts +4 -3
- package/src/EditUtilities.ts +5 -5
- package/src/EventTypes.ts +1 -1
- package/src/Forest.ts +5 -5
- package/src/Identifiers.ts +14 -14
- package/src/InitialTree.ts +1 -1
- package/src/LogViewer.ts +2 -2
- package/src/NodeIdUtilities.ts +3 -3
- package/src/PayloadUtilities.ts +1 -1
- package/src/ReconciliationPath.ts +3 -3
- package/src/RevisionValueCache.ts +2 -2
- package/src/RevisionView.ts +2 -2
- package/src/SharedTree.ts +14 -14
- package/src/Transaction.ts +3 -3
- package/src/TransactionInternal.ts +17 -17
- package/src/TreeView.ts +7 -7
- package/src/id-compressor/IdCompressor.ts +1 -1
- package/src/migration-shim/migrationShim.ts +17 -9
- package/src/migration-shim/migrationShimFactory.ts +2 -2
- package/src/migration-shim/sharedTreeShim.ts +6 -5
- package/src/migration-shim/sharedTreeShimFactory.ts +1 -2
- package/src/migration-shim/shimDeltaConnection.ts +16 -2
- package/src/migration-shim/types.ts +1 -1
- package/src/persisted-types/0.0.2.ts +24 -24
- package/src/persisted-types/0.1.1.ts +14 -14
|
@@ -25,24 +25,23 @@ import { ITelemetryBaseEvent } from '@fluidframework/core-interfaces';
|
|
|
25
25
|
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
26
26
|
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
27
27
|
import { ITelemetryProperties } from '@fluidframework/core-interfaces';
|
|
28
|
-
import { ITree } from '@
|
|
28
|
+
import { ITree } from '@fluidframework/tree';
|
|
29
29
|
import { SharedObject } from '@fluidframework/shared-object-base';
|
|
30
|
-
import { TreeFactory } from '@fluid-experimental/tree2';
|
|
31
30
|
import { TypedEventEmitter } from '@fluid-internal/client-utils';
|
|
32
31
|
|
|
33
32
|
// @internal
|
|
34
33
|
export function areRevisionViewsSemanticallyEqual(treeViewA: TreeView, idConverterA: NodeIdConverter, treeViewB: TreeView, idConverterB: NodeIdConverter): boolean;
|
|
35
34
|
|
|
36
|
-
// @
|
|
35
|
+
// @alpha
|
|
37
36
|
export type AttributionId = UuidString;
|
|
38
37
|
|
|
39
|
-
// @
|
|
38
|
+
// @alpha
|
|
40
39
|
export type BadPlaceValidationResult = Exclude<PlaceValidationResult, PlaceValidationResult.Valid>;
|
|
41
40
|
|
|
42
|
-
// @
|
|
41
|
+
// @alpha
|
|
43
42
|
export type BadRangeValidationResult = Exclude<RangeValidationResult, RangeValidationResultKind.Valid>;
|
|
44
43
|
|
|
45
|
-
// @
|
|
44
|
+
// @alpha
|
|
46
45
|
export interface Build {
|
|
47
46
|
// (undocumented)
|
|
48
47
|
readonly destination: number;
|
|
@@ -52,13 +51,13 @@ export interface Build {
|
|
|
52
51
|
readonly type: typeof ChangeType.Build;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
// @
|
|
54
|
+
// @alpha
|
|
56
55
|
export interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {
|
|
57
56
|
// (undocumented)
|
|
58
57
|
readonly source: TreeNodeSequence<BuildNodeInternal>;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
// @
|
|
60
|
+
// @alpha
|
|
62
61
|
export interface BuildInternal_0_0_2 {
|
|
63
62
|
// (undocumented)
|
|
64
63
|
readonly destination: DetachedSequenceId;
|
|
@@ -68,16 +67,16 @@ export interface BuildInternal_0_0_2 {
|
|
|
68
67
|
readonly type: typeof ChangeTypeInternal.Build;
|
|
69
68
|
}
|
|
70
69
|
|
|
71
|
-
// @
|
|
70
|
+
// @alpha
|
|
72
71
|
export type BuildNode = BuildTreeNode | number;
|
|
73
72
|
|
|
74
|
-
// @
|
|
73
|
+
// @alpha
|
|
75
74
|
export type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;
|
|
76
75
|
|
|
77
|
-
// @
|
|
76
|
+
// @alpha
|
|
78
77
|
export type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;
|
|
79
78
|
|
|
80
|
-
// @
|
|
79
|
+
// @alpha
|
|
81
80
|
export interface BuildTreeNode extends HasVariadicTraits<BuildNode> {
|
|
82
81
|
// (undocumented)
|
|
83
82
|
definition: string;
|
|
@@ -87,10 +86,10 @@ export interface BuildTreeNode extends HasVariadicTraits<BuildNode> {
|
|
|
87
86
|
payload?: Payload;
|
|
88
87
|
}
|
|
89
88
|
|
|
90
|
-
// @
|
|
89
|
+
// @alpha
|
|
91
90
|
export type Change = Insert | Detach | Build | SetValue | Constraint;
|
|
92
91
|
|
|
93
|
-
// @
|
|
92
|
+
// @alpha (undocumented)
|
|
94
93
|
export const Change: {
|
|
95
94
|
build: (source: BuildNode | TreeNodeSequence<BuildNode>, destination: number) => Build;
|
|
96
95
|
insert: (source: number, destination: StablePlace) => Insert;
|
|
@@ -103,10 +102,10 @@ export const Change: {
|
|
|
103
102
|
move: (source: StableRange, destination: StablePlace) => Change[];
|
|
104
103
|
};
|
|
105
104
|
|
|
106
|
-
// @
|
|
105
|
+
// @alpha
|
|
107
106
|
export type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;
|
|
108
107
|
|
|
109
|
-
// @
|
|
108
|
+
// @alpha (undocumented)
|
|
110
109
|
export const ChangeInternal: {
|
|
111
110
|
build: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId) => BuildInternal;
|
|
112
111
|
insert: (source: DetachedSequenceId, destination: StablePlaceInternal) => InsertInternal;
|
|
@@ -122,13 +121,13 @@ export const ChangeInternal: {
|
|
|
122
121
|
// @internal
|
|
123
122
|
export type ChangeNode = TreeNode<ChangeNode, NodeId>;
|
|
124
123
|
|
|
125
|
-
// @
|
|
124
|
+
// @alpha
|
|
126
125
|
export type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;
|
|
127
126
|
|
|
128
127
|
// @internal
|
|
129
128
|
export type ChangeResult = Result<TransactionView, TransactionFailure>;
|
|
130
129
|
|
|
131
|
-
// @
|
|
130
|
+
// @alpha
|
|
132
131
|
export enum ChangeType {
|
|
133
132
|
// (undocumented)
|
|
134
133
|
Build = 2,
|
|
@@ -142,7 +141,7 @@ export enum ChangeType {
|
|
|
142
141
|
SetValue = 3
|
|
143
142
|
}
|
|
144
143
|
|
|
145
|
-
// @
|
|
144
|
+
// @alpha
|
|
146
145
|
export enum ChangeTypeInternal {
|
|
147
146
|
// (undocumented)
|
|
148
147
|
Build = 2,
|
|
@@ -158,7 +157,7 @@ export enum ChangeTypeInternal {
|
|
|
158
157
|
SetValue = 3
|
|
159
158
|
}
|
|
160
159
|
|
|
161
|
-
// @
|
|
160
|
+
// @alpha
|
|
162
161
|
export abstract class Checkout extends EventEmitterWithErrorHandling<ICheckoutEvents> implements IDisposable {
|
|
163
162
|
protected constructor(tree: SharedTree, currentView: RevisionView, onEditCommitted: EditCommittedHandler);
|
|
164
163
|
abortEdit(): void;
|
|
@@ -198,18 +197,18 @@ export abstract class Checkout extends EventEmitterWithErrorHandling<ICheckoutEv
|
|
|
198
197
|
abstract waitForPendingUpdates(): Promise<void>;
|
|
199
198
|
}
|
|
200
199
|
|
|
201
|
-
// @
|
|
200
|
+
// @alpha
|
|
202
201
|
export enum CheckoutEvent {
|
|
203
202
|
ViewChange = "viewChange"
|
|
204
203
|
}
|
|
205
204
|
|
|
206
|
-
// @
|
|
205
|
+
// @alpha (undocumented)
|
|
207
206
|
export function comparePayloads(a: Payload, b: Payload): boolean;
|
|
208
207
|
|
|
209
|
-
// @
|
|
208
|
+
// @alpha
|
|
210
209
|
export type CompressedId = FinalCompressedId | LocalCompressedId;
|
|
211
210
|
|
|
212
|
-
// @
|
|
211
|
+
// @alpha
|
|
213
212
|
export interface Constraint {
|
|
214
213
|
readonly contentHash?: UuidString;
|
|
215
214
|
readonly effect: ConstraintEffect;
|
|
@@ -221,20 +220,20 @@ export interface Constraint {
|
|
|
221
220
|
readonly type: typeof ChangeType.Constraint;
|
|
222
221
|
}
|
|
223
222
|
|
|
224
|
-
// @
|
|
223
|
+
// @alpha
|
|
225
224
|
export enum ConstraintEffect {
|
|
226
225
|
InvalidAndDiscard = 0,
|
|
227
226
|
InvalidRetry = 1,
|
|
228
227
|
ValidRetry = 2
|
|
229
228
|
}
|
|
230
229
|
|
|
231
|
-
// @
|
|
230
|
+
// @alpha
|
|
232
231
|
export interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {
|
|
233
232
|
readonly parentNode?: NodeId;
|
|
234
233
|
readonly toConstrain: StableRangeInternal;
|
|
235
234
|
}
|
|
236
235
|
|
|
237
|
-
// @
|
|
236
|
+
// @alpha
|
|
238
237
|
export interface ConstraintInternal_0_0_2 {
|
|
239
238
|
readonly contentHash?: UuidString;
|
|
240
239
|
readonly effect: ConstraintEffect;
|
|
@@ -246,19 +245,19 @@ export interface ConstraintInternal_0_0_2 {
|
|
|
246
245
|
readonly type: typeof ChangeTypeInternal.Constraint;
|
|
247
246
|
}
|
|
248
247
|
|
|
249
|
-
// @
|
|
248
|
+
// @alpha
|
|
250
249
|
export type Definition = UuidString & {
|
|
251
250
|
readonly Definition: 'c0ef9488-2a78-482d-aeed-37fba996354c';
|
|
252
251
|
};
|
|
253
252
|
|
|
254
|
-
// @
|
|
253
|
+
// @alpha
|
|
255
254
|
export interface Delta<NodeId> {
|
|
256
255
|
readonly added: readonly NodeId[];
|
|
257
256
|
readonly changed: readonly NodeId[];
|
|
258
257
|
readonly removed: readonly NodeId[];
|
|
259
258
|
}
|
|
260
259
|
|
|
261
|
-
// @
|
|
260
|
+
// @alpha
|
|
262
261
|
export interface Detach {
|
|
263
262
|
// (undocumented)
|
|
264
263
|
readonly destination?: number;
|
|
@@ -268,18 +267,18 @@ export interface Detach {
|
|
|
268
267
|
readonly type: typeof ChangeType.Detach;
|
|
269
268
|
}
|
|
270
269
|
|
|
271
|
-
// @
|
|
270
|
+
// @alpha
|
|
272
271
|
export type DetachedSequenceId = number & {
|
|
273
272
|
readonly DetachedSequenceId: 'f7d7903a-194e-45e7-8e82-c9ef4333577d';
|
|
274
273
|
};
|
|
275
274
|
|
|
276
|
-
// @
|
|
275
|
+
// @alpha
|
|
277
276
|
export interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {
|
|
278
277
|
// (undocumented)
|
|
279
278
|
readonly source: StableRangeInternal;
|
|
280
279
|
}
|
|
281
280
|
|
|
282
|
-
// @
|
|
281
|
+
// @alpha
|
|
283
282
|
export interface DetachInternal_0_0_2 {
|
|
284
283
|
// (undocumented)
|
|
285
284
|
readonly destination?: DetachedSequenceId;
|
|
@@ -289,7 +288,7 @@ export interface DetachInternal_0_0_2 {
|
|
|
289
288
|
readonly type: typeof ChangeTypeInternal.Detach;
|
|
290
289
|
}
|
|
291
290
|
|
|
292
|
-
// @
|
|
291
|
+
// @alpha @sealed
|
|
293
292
|
export class EagerCheckout extends Checkout {
|
|
294
293
|
constructor(tree: SharedTree);
|
|
295
294
|
// (undocumented)
|
|
@@ -300,12 +299,12 @@ export class EagerCheckout extends Checkout {
|
|
|
300
299
|
waitForPendingUpdates(): Promise<void>;
|
|
301
300
|
}
|
|
302
301
|
|
|
303
|
-
// @
|
|
302
|
+
// @alpha
|
|
304
303
|
export interface Edit<TChange> extends EditBase<TChange> {
|
|
305
304
|
readonly id: EditId;
|
|
306
305
|
}
|
|
307
306
|
|
|
308
|
-
// @
|
|
307
|
+
// @alpha
|
|
309
308
|
export type EditApplicationOutcome = {
|
|
310
309
|
readonly view: RevisionView;
|
|
311
310
|
readonly status: EditStatus.Applied;
|
|
@@ -314,20 +313,20 @@ export type EditApplicationOutcome = {
|
|
|
314
313
|
readonly status: EditStatus.Invalid | EditStatus.Malformed;
|
|
315
314
|
};
|
|
316
315
|
|
|
317
|
-
// @
|
|
316
|
+
// @alpha
|
|
318
317
|
export interface EditBase<TChange> {
|
|
319
318
|
readonly changes: readonly TChange[];
|
|
320
319
|
readonly pastAttemptCount?: number;
|
|
321
320
|
}
|
|
322
321
|
|
|
323
|
-
// @
|
|
322
|
+
// @alpha
|
|
324
323
|
export interface EditCommittedEventArguments {
|
|
325
324
|
readonly editId: EditId;
|
|
326
325
|
readonly local: boolean;
|
|
327
326
|
readonly tree: SharedTree;
|
|
328
327
|
}
|
|
329
328
|
|
|
330
|
-
// @
|
|
329
|
+
// @alpha
|
|
331
330
|
export type EditCommittedHandler = (args: EditCommittedEventArguments) => void;
|
|
332
331
|
|
|
333
332
|
// @internal @deprecated
|
|
@@ -338,7 +337,7 @@ export interface EditHandle<TChange> {
|
|
|
338
337
|
readonly get: () => Promise<EditWithoutId<TChange>[]>;
|
|
339
338
|
}
|
|
340
339
|
|
|
341
|
-
// @
|
|
340
|
+
// @alpha
|
|
342
341
|
export type EditId = UuidString & {
|
|
343
342
|
readonly EditId: '56897beb-53e4-4e66-85da-4bf5cd5d0d49';
|
|
344
343
|
};
|
|
@@ -346,7 +345,7 @@ export type EditId = UuidString & {
|
|
|
346
345
|
// @internal
|
|
347
346
|
export type EditingResult = FailedEditingResult | ValidEditingResult;
|
|
348
347
|
|
|
349
|
-
// @
|
|
348
|
+
// @alpha
|
|
350
349
|
export interface EditingResultBase {
|
|
351
350
|
readonly before: RevisionView;
|
|
352
351
|
readonly changes: readonly ChangeInternal[];
|
|
@@ -363,14 +362,14 @@ export interface EditLogSummary<TChange, THandle> {
|
|
|
363
362
|
readonly editIds: readonly EditId[];
|
|
364
363
|
}
|
|
365
364
|
|
|
366
|
-
// @
|
|
365
|
+
// @alpha
|
|
367
366
|
export enum EditStatus {
|
|
368
367
|
Applied = 2,
|
|
369
368
|
Invalid = 1,
|
|
370
369
|
Malformed = 0
|
|
371
370
|
}
|
|
372
371
|
|
|
373
|
-
// @
|
|
372
|
+
// @alpha
|
|
374
373
|
export enum EditValidationResult {
|
|
375
374
|
Invalid = 1,
|
|
376
375
|
Malformed = 0,
|
|
@@ -397,7 +396,7 @@ export interface FailingTransactionState extends TransactionFailure {
|
|
|
397
396
|
readonly view: TransactionView;
|
|
398
397
|
}
|
|
399
398
|
|
|
400
|
-
// @
|
|
399
|
+
// @alpha
|
|
401
400
|
export type FinalCompressedId = number & {
|
|
402
401
|
readonly FinalCompressedId: '5d83d1e2-98b7-4e4e-a889-54c855cfa73d';
|
|
403
402
|
readonly OpNormalized: '9209432d-a959-4df7-b2ad-767ead4dbcae';
|
|
@@ -411,7 +410,7 @@ export interface FluidEditHandle {
|
|
|
411
410
|
readonly get: () => Promise<ArrayBuffer>;
|
|
412
411
|
}
|
|
413
412
|
|
|
414
|
-
// @
|
|
413
|
+
// @alpha
|
|
415
414
|
export class Forest {
|
|
416
415
|
add(nodes: Iterable<ForestNode>): Forest;
|
|
417
416
|
assertConsistent(): void;
|
|
@@ -438,7 +437,7 @@ export class Forest {
|
|
|
438
437
|
tryGetParent(id: NodeId): ParentData | undefined;
|
|
439
438
|
}
|
|
440
439
|
|
|
441
|
-
// @
|
|
440
|
+
// @alpha
|
|
442
441
|
export interface ForestNode extends NodeData<NodeId> {
|
|
443
442
|
// (undocumented)
|
|
444
443
|
readonly traits: ReadonlyMap<TraitLabel, readonly NodeId[]>;
|
|
@@ -476,13 +475,13 @@ export { getSerializedUploadedEditChunkContents as getUploadedEditChunkContents
|
|
|
476
475
|
// @internal
|
|
477
476
|
export function getTraitLocationOfRange(view: TreeView, range: StableRange): TraitLocation;
|
|
478
477
|
|
|
479
|
-
// @
|
|
478
|
+
// @alpha
|
|
480
479
|
export interface HasTraits<TChild> {
|
|
481
480
|
// (undocumented)
|
|
482
481
|
readonly traits: TraitMap<TChild>;
|
|
483
482
|
}
|
|
484
483
|
|
|
485
|
-
// @
|
|
484
|
+
// @alpha
|
|
486
485
|
export interface HasVariadicTraits<TChild> {
|
|
487
486
|
// (undocumented)
|
|
488
487
|
readonly traits?: {
|
|
@@ -490,7 +489,7 @@ export interface HasVariadicTraits<TChild> {
|
|
|
490
489
|
};
|
|
491
490
|
}
|
|
492
491
|
|
|
493
|
-
// @
|
|
492
|
+
// @alpha
|
|
494
493
|
export interface ICheckoutEvents extends IErrorEvent {
|
|
495
494
|
// (undocumented)
|
|
496
495
|
(event: 'viewChange', listener: (before: TreeView, after: TreeView) => void): any;
|
|
@@ -501,10 +500,10 @@ export interface IMigrationEvent extends IEvent {
|
|
|
501
500
|
(event: 'migrated', listener: () => void): any;
|
|
502
501
|
}
|
|
503
502
|
|
|
504
|
-
// @
|
|
503
|
+
// @alpha
|
|
505
504
|
export const initialTree: ChangeNode_0_0_2;
|
|
506
505
|
|
|
507
|
-
// @
|
|
506
|
+
// @alpha
|
|
508
507
|
export interface Insert {
|
|
509
508
|
// (undocumented)
|
|
510
509
|
readonly destination: StablePlace;
|
|
@@ -514,13 +513,13 @@ export interface Insert {
|
|
|
514
513
|
readonly type: typeof ChangeType.Insert;
|
|
515
514
|
}
|
|
516
515
|
|
|
517
|
-
// @
|
|
516
|
+
// @alpha
|
|
518
517
|
export interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {
|
|
519
518
|
// (undocumented)
|
|
520
519
|
readonly destination: StablePlaceInternal;
|
|
521
520
|
}
|
|
522
521
|
|
|
523
|
-
// @
|
|
522
|
+
// @alpha
|
|
524
523
|
export interface InsertInternal_0_0_2 {
|
|
525
524
|
// (undocumented)
|
|
526
525
|
readonly destination: StablePlaceInternal_0_0_2;
|
|
@@ -530,7 +529,7 @@ export interface InsertInternal_0_0_2 {
|
|
|
530
529
|
readonly type: typeof ChangeTypeInternal.Insert;
|
|
531
530
|
}
|
|
532
531
|
|
|
533
|
-
// @
|
|
532
|
+
// @alpha
|
|
534
533
|
export interface InternalizedChange {
|
|
535
534
|
// (undocumented)
|
|
536
535
|
InternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';
|
|
@@ -544,7 +543,7 @@ export type InternedStringId = number & {
|
|
|
544
543
|
// @internal
|
|
545
544
|
export function isDetachedSequenceId(node: DetachedSequenceId | object): node is DetachedSequenceId;
|
|
546
545
|
|
|
547
|
-
// @
|
|
546
|
+
// @alpha
|
|
548
547
|
export interface ISharedTreeEvents extends ISharedObjectEvents {
|
|
549
548
|
// (undocumented)
|
|
550
549
|
(event: 'committedEdit', listener: EditCommittedHandler): any;
|
|
@@ -578,12 +577,12 @@ export class LazyCheckout extends Checkout {
|
|
|
578
577
|
waitForPendingUpdates(): Promise<void>;
|
|
579
578
|
}
|
|
580
579
|
|
|
581
|
-
// @
|
|
580
|
+
// @alpha
|
|
582
581
|
export type LocalCompressedId = number & {
|
|
583
582
|
readonly LocalCompressedId: '6fccb42f-e2a4-4243-bd29-f13d12b9c6d1';
|
|
584
583
|
} & SessionUnique;
|
|
585
584
|
|
|
586
|
-
// @
|
|
585
|
+
// @alpha
|
|
587
586
|
export interface LogViewer {
|
|
588
587
|
// @deprecated
|
|
589
588
|
getRevisionView(revision: Revision): Promise<RevisionView>;
|
|
@@ -620,7 +619,7 @@ export interface MergeHealthStats {
|
|
|
620
619
|
|
|
621
620
|
// @internal
|
|
622
621
|
export class MigrationShim extends EventEmitterWithErrorHandling<IMigrationEvent> implements IShim {
|
|
623
|
-
constructor(id: string, runtime: IFluidDataStoreRuntime, legacyTreeFactory: SharedTreeFactory, newTreeFactory:
|
|
622
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, legacyTreeFactory: SharedTreeFactory, newTreeFactory: IChannelFactory, populateNewSharedObjectFn: (legacyTree: SharedTree, newTree: ITree) => void);
|
|
624
623
|
// (undocumented)
|
|
625
624
|
get attributes(): IChannelAttributes;
|
|
626
625
|
// (undocumented)
|
|
@@ -651,34 +650,34 @@ export class MigrationShim extends EventEmitterWithErrorHandling<IMigrationEvent
|
|
|
651
650
|
|
|
652
651
|
// @internal @sealed
|
|
653
652
|
export class MigrationShimFactory implements IChannelFactory {
|
|
654
|
-
constructor(oldFactory: SharedTreeFactory, newFactory:
|
|
653
|
+
constructor(oldFactory: SharedTreeFactory, newFactory: IChannelFactory, populateNewChannelFn: (oldChannel: SharedTree, newChannel: ITree) => void);
|
|
655
654
|
get attributes(): IChannelAttributes;
|
|
656
655
|
create(runtime: IFluidDataStoreRuntime, id: string): MigrationShim;
|
|
657
656
|
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<MigrationShim>;
|
|
658
657
|
get type(): string;
|
|
659
658
|
}
|
|
660
659
|
|
|
661
|
-
// @
|
|
660
|
+
// @alpha
|
|
662
661
|
export interface NodeData<TId> {
|
|
663
662
|
readonly definition: Definition;
|
|
664
663
|
readonly identifier: TId;
|
|
665
664
|
readonly payload?: Payload;
|
|
666
665
|
}
|
|
667
666
|
|
|
668
|
-
// @
|
|
667
|
+
// @alpha
|
|
669
668
|
export type NodeId = number & SessionSpaceCompressedId & NodeIdBrand;
|
|
670
669
|
|
|
671
|
-
// @
|
|
670
|
+
// @alpha (undocumented)
|
|
672
671
|
export interface NodeIdBrand {
|
|
673
672
|
// (undocumented)
|
|
674
673
|
readonly NodeId: 'e53e7d6b-c8b9-431a-8805-4843fc639342';
|
|
675
674
|
}
|
|
676
675
|
|
|
677
|
-
// @
|
|
676
|
+
// @alpha
|
|
678
677
|
export interface NodeIdContext extends NodeIdGenerator, NodeIdConverter {
|
|
679
678
|
}
|
|
680
679
|
|
|
681
|
-
// @
|
|
680
|
+
// @alpha
|
|
682
681
|
export interface NodeIdConverter {
|
|
683
682
|
convertToNodeId(id: StableNodeId): NodeId;
|
|
684
683
|
convertToStableNodeId(id: NodeId): StableNodeId;
|
|
@@ -686,7 +685,7 @@ export interface NodeIdConverter {
|
|
|
686
685
|
tryConvertToStableNodeId(id: NodeId): StableNodeId | undefined;
|
|
687
686
|
}
|
|
688
687
|
|
|
689
|
-
// @
|
|
688
|
+
// @alpha
|
|
690
689
|
export interface NodeIdGenerator {
|
|
691
690
|
generateNodeId(override?: string): NodeId;
|
|
692
691
|
}
|
|
@@ -699,7 +698,7 @@ export interface NodeInTrait {
|
|
|
699
698
|
readonly trait: TraitLocation;
|
|
700
699
|
}
|
|
701
700
|
|
|
702
|
-
// @
|
|
701
|
+
// @alpha @sealed
|
|
703
702
|
export interface OrderedEditSet<TChange = unknown> {
|
|
704
703
|
readonly editIds: readonly EditId[];
|
|
705
704
|
// @deprecated (undocumented)
|
|
@@ -721,7 +720,7 @@ export interface OrderedEditSet<TChange = unknown> {
|
|
|
721
720
|
tryGetIndexOfId(editId: EditId): number | undefined;
|
|
722
721
|
}
|
|
723
722
|
|
|
724
|
-
// @
|
|
723
|
+
// @alpha
|
|
725
724
|
export interface ParentData {
|
|
726
725
|
// (undocumented)
|
|
727
726
|
readonly parentId: NodeId;
|
|
@@ -729,7 +728,7 @@ export interface ParentData {
|
|
|
729
728
|
readonly traitParent: TraitLabel;
|
|
730
729
|
}
|
|
731
730
|
|
|
732
|
-
// @
|
|
731
|
+
// @alpha
|
|
733
732
|
export type Payload = any;
|
|
734
733
|
|
|
735
734
|
// @internal
|
|
@@ -738,12 +737,12 @@ export function placeFromStablePlace(view: TreeView, stablePlace: StablePlace):
|
|
|
738
737
|
// @internal
|
|
739
738
|
export type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPlaceholder>, NodeId> | TPlaceholder;
|
|
740
739
|
|
|
741
|
-
// @
|
|
740
|
+
// @alpha
|
|
742
741
|
export type PlaceIndex = number & {
|
|
743
742
|
readonly PlaceIndex: unique symbol;
|
|
744
743
|
};
|
|
745
744
|
|
|
746
|
-
// @
|
|
745
|
+
// @alpha
|
|
747
746
|
export enum PlaceValidationResult {
|
|
748
747
|
// (undocumented)
|
|
749
748
|
Malformed = "Malformed",
|
|
@@ -760,14 +759,14 @@ export enum PlaceValidationResult {
|
|
|
760
759
|
// @internal
|
|
761
760
|
export function rangeFromStableRange(view: TreeView, range: StableRange): TreeViewRange;
|
|
762
761
|
|
|
763
|
-
// @
|
|
762
|
+
// @alpha
|
|
764
763
|
export type RangeValidationResult = RangeValidationResultKind.Valid | RangeValidationResultKind.PlacesInDifferentTraits | RangeValidationResultKind.Inverted | {
|
|
765
764
|
kind: RangeValidationResultKind.BadPlace;
|
|
766
765
|
place: StablePlaceInternal;
|
|
767
766
|
placeFailure: BadPlaceValidationResult;
|
|
768
767
|
};
|
|
769
768
|
|
|
770
|
-
// @
|
|
769
|
+
// @alpha
|
|
771
770
|
export enum RangeValidationResultKind {
|
|
772
771
|
// (undocumented)
|
|
773
772
|
BadPlace = "BadPlace",
|
|
@@ -779,13 +778,13 @@ export enum RangeValidationResultKind {
|
|
|
779
778
|
Valid = "Valid"
|
|
780
779
|
}
|
|
781
780
|
|
|
782
|
-
// @
|
|
781
|
+
// @alpha
|
|
783
782
|
export interface ReconciliationChange {
|
|
784
783
|
readonly after: TransactionView;
|
|
785
784
|
readonly resolvedChange: ChangeInternal;
|
|
786
785
|
}
|
|
787
786
|
|
|
788
|
-
// @
|
|
787
|
+
// @alpha
|
|
789
788
|
export interface ReconciliationEdit {
|
|
790
789
|
readonly [index: number]: ReconciliationChange;
|
|
791
790
|
readonly after: TreeView;
|
|
@@ -793,7 +792,7 @@ export interface ReconciliationEdit {
|
|
|
793
792
|
readonly length: number;
|
|
794
793
|
}
|
|
795
794
|
|
|
796
|
-
// @
|
|
795
|
+
// @alpha
|
|
797
796
|
export interface ReconciliationPath {
|
|
798
797
|
readonly [index: number]: ReconciliationEdit;
|
|
799
798
|
readonly length: number;
|
|
@@ -828,10 +827,10 @@ export namespace Result {
|
|
|
828
827
|
}
|
|
829
828
|
}
|
|
830
829
|
|
|
831
|
-
// @
|
|
830
|
+
// @alpha
|
|
832
831
|
export type Revision = number;
|
|
833
832
|
|
|
834
|
-
// @
|
|
833
|
+
// @alpha
|
|
835
834
|
export class RevisionView extends TreeView {
|
|
836
835
|
// (undocumented)
|
|
837
836
|
equals(view: TreeView): boolean;
|
|
@@ -840,7 +839,7 @@ export class RevisionView extends TreeView {
|
|
|
840
839
|
openForTransaction(): TransactionView;
|
|
841
840
|
}
|
|
842
841
|
|
|
843
|
-
// @
|
|
842
|
+
// @alpha
|
|
844
843
|
export interface SequencedEditAppliedEventArguments {
|
|
845
844
|
readonly edit: Edit<ChangeInternal>;
|
|
846
845
|
readonly logger: ITelemetryLoggerExt;
|
|
@@ -850,13 +849,13 @@ export interface SequencedEditAppliedEventArguments {
|
|
|
850
849
|
readonly wasLocal: boolean;
|
|
851
850
|
}
|
|
852
851
|
|
|
853
|
-
// @
|
|
852
|
+
// @alpha
|
|
854
853
|
export type SequencedEditAppliedHandler = (args: SequencedEditAppliedEventArguments) => void;
|
|
855
854
|
|
|
856
|
-
// @
|
|
855
|
+
// @alpha
|
|
857
856
|
export type SessionSpaceCompressedId = CompressedId & SessionUnique;
|
|
858
857
|
|
|
859
|
-
// @
|
|
858
|
+
// @alpha
|
|
860
859
|
export interface SessionUnique {
|
|
861
860
|
// (undocumented)
|
|
862
861
|
readonly SessionUnique: 'cea55054-6b82-4cbf-ad19-1fa645ea3b3e';
|
|
@@ -865,7 +864,7 @@ export interface SessionUnique {
|
|
|
865
864
|
// @internal
|
|
866
865
|
export function setTrait(trait: TraitLocation, nodes: BuildNode | TreeNodeSequence<BuildNode>): Change[];
|
|
867
866
|
|
|
868
|
-
// @
|
|
867
|
+
// @alpha
|
|
869
868
|
export interface SetValue {
|
|
870
869
|
// (undocumented)
|
|
871
870
|
readonly nodeToModify: NodeId;
|
|
@@ -874,13 +873,13 @@ export interface SetValue {
|
|
|
874
873
|
readonly type: typeof ChangeType.SetValue;
|
|
875
874
|
}
|
|
876
875
|
|
|
877
|
-
// @
|
|
876
|
+
// @alpha
|
|
878
877
|
export interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {
|
|
879
878
|
// (undocumented)
|
|
880
879
|
readonly nodeToModify: NodeId;
|
|
881
880
|
}
|
|
882
881
|
|
|
883
|
-
// @
|
|
882
|
+
// @alpha
|
|
884
883
|
export interface SetValueInternal_0_0_2 {
|
|
885
884
|
// (undocumented)
|
|
886
885
|
readonly nodeToModify: StableNodeId;
|
|
@@ -889,7 +888,7 @@ export interface SetValueInternal_0_0_2 {
|
|
|
889
888
|
readonly type: typeof ChangeTypeInternal.SetValue;
|
|
890
889
|
}
|
|
891
890
|
|
|
892
|
-
// @
|
|
891
|
+
// @alpha
|
|
893
892
|
export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeIdContext {
|
|
894
893
|
constructor(runtime: IFluidDataStoreRuntime, id: string, ...args: SharedTreeArgs<WriteFormat.v0_0_2>);
|
|
895
894
|
constructor(runtime: IFluidDataStoreRuntime, id: string, ...args: SharedTreeArgs<WriteFormat.v0_1_1>);
|
|
@@ -944,13 +943,13 @@ export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeI
|
|
|
944
943
|
tryConvertToStableNodeId(id: NodeId): StableNodeId | undefined;
|
|
945
944
|
}
|
|
946
945
|
|
|
947
|
-
// @
|
|
946
|
+
// @alpha
|
|
948
947
|
export type SharedTreeArgs<WF extends WriteFormat = WriteFormat> = [writeFormat: WF, options?: SharedTreeOptions<WF>];
|
|
949
948
|
|
|
950
949
|
// @internal
|
|
951
950
|
export const sharedTreeAssertionErrorType = "SharedTreeAssertion";
|
|
952
951
|
|
|
953
|
-
// @
|
|
952
|
+
// @alpha
|
|
954
953
|
export interface SharedTreeBaseOptions {
|
|
955
954
|
editEvictionFrequency?: number;
|
|
956
955
|
inMemoryHistorySize?: number;
|
|
@@ -967,13 +966,13 @@ export enum SharedTreeDiagnosticEvent {
|
|
|
967
966
|
WriteVersionChanged = "writeVersionChanged"
|
|
968
967
|
}
|
|
969
968
|
|
|
970
|
-
// @
|
|
969
|
+
// @alpha
|
|
971
970
|
export enum SharedTreeEvent {
|
|
972
971
|
EditCommitted = "committedEdit",
|
|
973
972
|
SequencedEditApplied = "sequencedEditApplied"
|
|
974
973
|
}
|
|
975
974
|
|
|
976
|
-
// @
|
|
975
|
+
// @alpha
|
|
977
976
|
export class SharedTreeFactory implements IChannelFactory {
|
|
978
977
|
constructor(...args: SharedTreeArgs);
|
|
979
978
|
// (undocumented)
|
|
@@ -1002,15 +1001,15 @@ export class SharedTreeMergeHealthTelemetryHeartbeat {
|
|
|
1002
1001
|
stopHeartbeat(): void;
|
|
1003
1002
|
}
|
|
1004
1003
|
|
|
1005
|
-
// @
|
|
1004
|
+
// @alpha
|
|
1006
1005
|
export type SharedTreeOptions<WF extends WriteFormat, HistoryCompatibility extends 'Forwards' | 'None' = 'Forwards'> = SharedTreeBaseOptions & Omit<WF extends WriteFormat.v0_0_2 ? SharedTreeOptions_0_0_2 : WF extends WriteFormat.v0_1_1 ? SharedTreeOptions_0_1_1 : never, HistoryCompatibility extends 'Forwards' ? 'summarizeHistory' : never>;
|
|
1007
1006
|
|
|
1008
|
-
// @
|
|
1007
|
+
// @alpha
|
|
1009
1008
|
export interface SharedTreeOptions_0_0_2 {
|
|
1010
1009
|
summarizeHistory?: boolean;
|
|
1011
1010
|
}
|
|
1012
1011
|
|
|
1013
|
-
// @
|
|
1012
|
+
// @alpha
|
|
1014
1013
|
export interface SharedTreeOptions_0_1_1 {
|
|
1015
1014
|
attributionId?: AttributionId;
|
|
1016
1015
|
summarizeHistory?: false | {
|
|
@@ -1020,7 +1019,7 @@ export interface SharedTreeOptions_0_1_1 {
|
|
|
1020
1019
|
|
|
1021
1020
|
// @internal
|
|
1022
1021
|
export class SharedTreeShim implements IShim {
|
|
1023
|
-
constructor(id: string, runtime: IFluidDataStoreRuntime, sharedTreeFactory:
|
|
1022
|
+
constructor(id: string, runtime: IFluidDataStoreRuntime, sharedTreeFactory: IChannelFactory);
|
|
1024
1023
|
// (undocumented)
|
|
1025
1024
|
get attributes(): IChannelAttributes;
|
|
1026
1025
|
// (undocumented)
|
|
@@ -1046,26 +1045,26 @@ export class SharedTreeShim implements IShim {
|
|
|
1046
1045
|
// (undocumented)
|
|
1047
1046
|
readonly runtime: IFluidDataStoreRuntime;
|
|
1048
1047
|
// (undocumented)
|
|
1049
|
-
readonly sharedTreeFactory:
|
|
1048
|
+
readonly sharedTreeFactory: IChannelFactory;
|
|
1050
1049
|
// (undocumented)
|
|
1051
1050
|
summarize(fullTree?: boolean | undefined, trackState?: boolean | undefined, telemetryContext?: ITelemetryContext | undefined, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined): Promise<ISummaryTreeWithStats>;
|
|
1052
1051
|
}
|
|
1053
1052
|
|
|
1054
1053
|
// @internal @sealed
|
|
1055
1054
|
export class SharedTreeShimFactory implements IChannelFactory {
|
|
1056
|
-
constructor(factory:
|
|
1055
|
+
constructor(factory: IChannelFactory);
|
|
1057
1056
|
get attributes(): IChannelAttributes;
|
|
1058
1057
|
create(runtime: IFluidDataStoreRuntime, id: string): SharedTreeShim;
|
|
1059
1058
|
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<SharedTreeShim>;
|
|
1060
1059
|
get type(): string;
|
|
1061
1060
|
}
|
|
1062
1061
|
|
|
1063
|
-
// @
|
|
1062
|
+
// @alpha
|
|
1064
1063
|
export interface SharedTreeSummaryBase {
|
|
1065
1064
|
readonly version: WriteFormat;
|
|
1066
1065
|
}
|
|
1067
1066
|
|
|
1068
|
-
// @
|
|
1067
|
+
// @alpha
|
|
1069
1068
|
export enum Side {
|
|
1070
1069
|
// (undocumented)
|
|
1071
1070
|
After = 1,
|
|
@@ -1073,19 +1072,19 @@ export enum Side {
|
|
|
1073
1072
|
Before = 0
|
|
1074
1073
|
}
|
|
1075
1074
|
|
|
1076
|
-
// @
|
|
1075
|
+
// @alpha
|
|
1077
1076
|
export type StableNodeId = string & {
|
|
1078
1077
|
readonly StableNodeId: 'a0843b38-699d-4bb2-aa7a-16c502a71151';
|
|
1079
1078
|
};
|
|
1080
1079
|
|
|
1081
|
-
// @
|
|
1080
|
+
// @alpha
|
|
1082
1081
|
export interface StablePlace {
|
|
1083
1082
|
readonly referenceSibling?: NodeId;
|
|
1084
1083
|
readonly referenceTrait?: TraitLocation;
|
|
1085
1084
|
readonly side: Side;
|
|
1086
1085
|
}
|
|
1087
1086
|
|
|
1088
|
-
// @
|
|
1087
|
+
// @alpha (undocumented)
|
|
1089
1088
|
export const StablePlace: {
|
|
1090
1089
|
before: (node: NodeData<NodeId> | NodeId) => StablePlace;
|
|
1091
1090
|
after: (node: NodeData<NodeId> | NodeId) => StablePlace;
|
|
@@ -1093,13 +1092,13 @@ export const StablePlace: {
|
|
|
1093
1092
|
atEndOf: (trait: TraitLocation) => StablePlace;
|
|
1094
1093
|
};
|
|
1095
1094
|
|
|
1096
|
-
// @
|
|
1095
|
+
// @alpha
|
|
1097
1096
|
export interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {
|
|
1098
1097
|
readonly referenceSibling?: NodeId;
|
|
1099
1098
|
readonly referenceTrait?: TraitLocationInternal;
|
|
1100
1099
|
}
|
|
1101
1100
|
|
|
1102
|
-
// @
|
|
1101
|
+
// @alpha (undocumented)
|
|
1103
1102
|
export const StablePlaceInternal: {
|
|
1104
1103
|
before: (node: NodeData<NodeId> | NodeId) => StablePlaceInternal;
|
|
1105
1104
|
after: (node: NodeData<NodeId> | NodeId) => StablePlaceInternal;
|
|
@@ -1107,14 +1106,14 @@ export const StablePlaceInternal: {
|
|
|
1107
1106
|
atEndOf: (trait: TraitLocationInternal) => StablePlaceInternal;
|
|
1108
1107
|
};
|
|
1109
1108
|
|
|
1110
|
-
// @
|
|
1109
|
+
// @alpha
|
|
1111
1110
|
export interface StablePlaceInternal_0_0_2 {
|
|
1112
1111
|
readonly referenceSibling?: StableNodeId;
|
|
1113
1112
|
readonly referenceTrait?: TraitLocationInternal_0_0_2;
|
|
1114
1113
|
readonly side: Side;
|
|
1115
1114
|
}
|
|
1116
1115
|
|
|
1117
|
-
// @
|
|
1116
|
+
// @alpha
|
|
1118
1117
|
export interface StableRange {
|
|
1119
1118
|
// (undocumented)
|
|
1120
1119
|
readonly end: StablePlace;
|
|
@@ -1122,7 +1121,7 @@ export interface StableRange {
|
|
|
1122
1121
|
readonly start: StablePlace;
|
|
1123
1122
|
}
|
|
1124
1123
|
|
|
1125
|
-
// @
|
|
1124
|
+
// @alpha (undocumented)
|
|
1126
1125
|
export const StableRange: {
|
|
1127
1126
|
from: (start: StablePlace) => {
|
|
1128
1127
|
to: (end: StablePlace) => StableRange;
|
|
@@ -1131,7 +1130,7 @@ export const StableRange: {
|
|
|
1131
1130
|
all: (trait: TraitLocation) => StableRange;
|
|
1132
1131
|
};
|
|
1133
1132
|
|
|
1134
|
-
// @
|
|
1133
|
+
// @alpha
|
|
1135
1134
|
export interface StableRangeInternal {
|
|
1136
1135
|
// (undocumented)
|
|
1137
1136
|
readonly end: StablePlaceInternal;
|
|
@@ -1139,7 +1138,7 @@ export interface StableRangeInternal {
|
|
|
1139
1138
|
readonly start: StablePlaceInternal;
|
|
1140
1139
|
}
|
|
1141
1140
|
|
|
1142
|
-
// @
|
|
1141
|
+
// @alpha (undocumented)
|
|
1143
1142
|
export const StableRangeInternal: {
|
|
1144
1143
|
from: (start: StablePlaceInternal) => {
|
|
1145
1144
|
to: (end: StablePlaceInternal) => StableRangeInternal;
|
|
@@ -1148,7 +1147,7 @@ export const StableRangeInternal: {
|
|
|
1148
1147
|
all: (trait: TraitLocationInternal) => StableRangeInternal;
|
|
1149
1148
|
};
|
|
1150
1149
|
|
|
1151
|
-
// @
|
|
1150
|
+
// @alpha
|
|
1152
1151
|
export interface StableRangeInternal_0_0_2 {
|
|
1153
1152
|
// (undocumented)
|
|
1154
1153
|
readonly end: StablePlaceInternal_0_0_2;
|
|
@@ -1156,7 +1155,7 @@ export interface StableRangeInternal_0_0_2 {
|
|
|
1156
1155
|
readonly start: StablePlaceInternal_0_0_2;
|
|
1157
1156
|
}
|
|
1158
1157
|
|
|
1159
|
-
// @
|
|
1158
|
+
// @alpha
|
|
1160
1159
|
export interface StashedLocalOpMetadata {
|
|
1161
1160
|
transformedEdit?: Edit<ChangeInternal>;
|
|
1162
1161
|
}
|
|
@@ -1171,7 +1170,7 @@ export interface StringInterner {
|
|
|
1171
1170
|
getString(internedId: number): string;
|
|
1172
1171
|
}
|
|
1173
1172
|
|
|
1174
|
-
// @
|
|
1173
|
+
// @alpha
|
|
1175
1174
|
export interface SucceedingTransactionState {
|
|
1176
1175
|
readonly changes: readonly ChangeInternal[];
|
|
1177
1176
|
readonly status: EditStatus.Applied;
|
|
@@ -1179,12 +1178,12 @@ export interface SucceedingTransactionState {
|
|
|
1179
1178
|
readonly view: TransactionView;
|
|
1180
1179
|
}
|
|
1181
1180
|
|
|
1182
|
-
// @
|
|
1181
|
+
// @alpha
|
|
1183
1182
|
export type TraitLabel = UuidString & {
|
|
1184
1183
|
readonly TraitLabel: '613826ed-49cc-4df3-b2b8-bfc6866af8e3';
|
|
1185
1184
|
};
|
|
1186
1185
|
|
|
1187
|
-
// @
|
|
1186
|
+
// @alpha
|
|
1188
1187
|
export interface TraitLocation {
|
|
1189
1188
|
// (undocumented)
|
|
1190
1189
|
readonly label: TraitLabel;
|
|
@@ -1192,13 +1191,13 @@ export interface TraitLocation {
|
|
|
1192
1191
|
readonly parent: NodeId;
|
|
1193
1192
|
}
|
|
1194
1193
|
|
|
1195
|
-
// @
|
|
1194
|
+
// @alpha
|
|
1196
1195
|
export interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {
|
|
1197
1196
|
// (undocumented)
|
|
1198
1197
|
readonly parent: NodeId;
|
|
1199
1198
|
}
|
|
1200
1199
|
|
|
1201
|
-
// @
|
|
1200
|
+
// @alpha
|
|
1202
1201
|
export interface TraitLocationInternal_0_0_2 {
|
|
1203
1202
|
// (undocumented)
|
|
1204
1203
|
readonly label: TraitLabel;
|
|
@@ -1206,18 +1205,18 @@ export interface TraitLocationInternal_0_0_2 {
|
|
|
1206
1205
|
readonly parent: StableNodeId;
|
|
1207
1206
|
}
|
|
1208
1207
|
|
|
1209
|
-
// @
|
|
1208
|
+
// @alpha
|
|
1210
1209
|
export interface TraitMap<TChild> {
|
|
1211
1210
|
// (undocumented)
|
|
1212
1211
|
readonly [key: string]: TreeNodeSequence<TChild>;
|
|
1213
1212
|
}
|
|
1214
1213
|
|
|
1215
|
-
// @
|
|
1214
|
+
// @alpha
|
|
1216
1215
|
export type TraitNodeIndex = number & {
|
|
1217
1216
|
readonly TraitNodeIndex: unique symbol;
|
|
1218
1217
|
};
|
|
1219
1218
|
|
|
1220
|
-
// @
|
|
1219
|
+
// @alpha
|
|
1221
1220
|
export class Transaction extends TypedEventEmitter<TransactionEvents> {
|
|
1222
1221
|
constructor(tree: SharedTree);
|
|
1223
1222
|
apply(...changes: readonly Change[]): EditStatus;
|
|
@@ -1232,12 +1231,12 @@ export class Transaction extends TypedEventEmitter<TransactionEvents> {
|
|
|
1232
1231
|
readonly tree: SharedTree;
|
|
1233
1232
|
}
|
|
1234
1233
|
|
|
1235
|
-
// @
|
|
1234
|
+
// @alpha
|
|
1236
1235
|
export enum TransactionEvent {
|
|
1237
1236
|
ViewChange = "viewChange"
|
|
1238
1237
|
}
|
|
1239
1238
|
|
|
1240
|
-
// @
|
|
1239
|
+
// @alpha
|
|
1241
1240
|
export interface TransactionEvents extends IErrorEvent {
|
|
1242
1241
|
// (undocumented)
|
|
1243
1242
|
(event: TransactionEvent.ViewChange, listener: (before: TreeView, after: TreeView) => void): any;
|
|
@@ -1249,7 +1248,7 @@ export interface TransactionFailure {
|
|
|
1249
1248
|
readonly status: EditStatus.Invalid | EditStatus.Malformed;
|
|
1250
1249
|
}
|
|
1251
1250
|
|
|
1252
|
-
// @
|
|
1251
|
+
// @alpha
|
|
1253
1252
|
export namespace TransactionInternal {
|
|
1254
1253
|
export interface BadPlaceFailure {
|
|
1255
1254
|
readonly change: ChangeInternal;
|
|
@@ -1302,6 +1301,7 @@ export namespace TransactionInternal {
|
|
|
1302
1301
|
readonly id: NodeId;
|
|
1303
1302
|
readonly kind: FailureKind.DuplicateIdInBuild;
|
|
1304
1303
|
}
|
|
1304
|
+
// @internal
|
|
1305
1305
|
export function factory(view: RevisionView): GenericTransaction;
|
|
1306
1306
|
export type Failure = UnusedDetachedSequenceFailure | DetachedSequenceIdAlreadyInUseFailure | DetachedSequenceNotFoundFailure | DuplicateIdInBuildFailure | IdAlreadyInUseFailure | UnknownIdFailure | BadPlaceFailure | BadRangeFailure | ConstraintViolationFailure;
|
|
1307
1307
|
export enum FailureKind {
|
|
@@ -1320,6 +1320,7 @@ export namespace TransactionInternal {
|
|
|
1320
1320
|
readonly id: NodeId;
|
|
1321
1321
|
readonly kind: FailureKind.IdAlreadyInUse;
|
|
1322
1322
|
}
|
|
1323
|
+
// @internal
|
|
1323
1324
|
export class Policy implements GenericTransactionPolicy {
|
|
1324
1325
|
protected createViewNodesForTree(sequence: Iterable<BuildNodeInternal>, onCreateNode: (stableId: NodeId, node: TreeViewNode) => boolean, onInvalidDetachedId: (sequenceId: DetachedSequenceId) => void): NodeId[] | undefined;
|
|
1325
1326
|
protected readonly detached: Map<DetachedSequenceId, readonly NodeId[]>;
|
|
@@ -1344,7 +1345,7 @@ export namespace TransactionInternal {
|
|
|
1344
1345
|
// @internal
|
|
1345
1346
|
export type TransactionState = SucceedingTransactionState | FailingTransactionState;
|
|
1346
1347
|
|
|
1347
|
-
// @
|
|
1348
|
+
// @alpha
|
|
1348
1349
|
export class TransactionView extends TreeView {
|
|
1349
1350
|
addNodes(sequence: Iterable<TreeViewNode>): TransactionView;
|
|
1350
1351
|
attachRange(nodesToAttach: readonly NodeId[], place: TreeViewPlace): TransactionView;
|
|
@@ -1359,7 +1360,7 @@ export class TransactionView extends TreeView {
|
|
|
1359
1360
|
setNodeValue(nodeId: NodeId, value: Payload): TransactionView;
|
|
1360
1361
|
}
|
|
1361
1362
|
|
|
1362
|
-
// @
|
|
1363
|
+
// @alpha
|
|
1363
1364
|
export interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {
|
|
1364
1365
|
}
|
|
1365
1366
|
|
|
@@ -1377,10 +1378,10 @@ export class TreeNodeHandle implements TreeNode<TreeNodeHandle, NodeId> {
|
|
|
1377
1378
|
get traits(): TraitMap<TreeNodeHandle>;
|
|
1378
1379
|
}
|
|
1379
1380
|
|
|
1380
|
-
// @
|
|
1381
|
+
// @alpha
|
|
1381
1382
|
export type TreeNodeSequence<TChild> = readonly TChild[];
|
|
1382
1383
|
|
|
1383
|
-
// @
|
|
1384
|
+
// @alpha
|
|
1384
1385
|
export abstract class TreeView {
|
|
1385
1386
|
// (undocumented)
|
|
1386
1387
|
[Symbol.iterator](): IterableIterator<TreeViewNode>;
|
|
@@ -1425,13 +1426,13 @@ export abstract class TreeView {
|
|
|
1425
1426
|
tryGetViewNode(id: NodeId): TreeViewNode | undefined;
|
|
1426
1427
|
}
|
|
1427
1428
|
|
|
1428
|
-
// @
|
|
1429
|
+
// @alpha
|
|
1429
1430
|
export interface TreeViewNode extends NodeData<NodeId> {
|
|
1430
1431
|
readonly parentage?: TraitLocation;
|
|
1431
1432
|
readonly traits: ReadonlyMap<TraitLabel, readonly NodeId[]>;
|
|
1432
1433
|
}
|
|
1433
1434
|
|
|
1434
|
-
// @
|
|
1435
|
+
// @alpha
|
|
1435
1436
|
export interface TreeViewPlace {
|
|
1436
1437
|
// (undocumented)
|
|
1437
1438
|
readonly sibling?: NodeId;
|
|
@@ -1441,7 +1442,7 @@ export interface TreeViewPlace {
|
|
|
1441
1442
|
readonly trait: TraitLocation;
|
|
1442
1443
|
}
|
|
1443
1444
|
|
|
1444
|
-
// @
|
|
1445
|
+
// @alpha
|
|
1445
1446
|
export interface TreeViewRange {
|
|
1446
1447
|
// (undocumented)
|
|
1447
1448
|
readonly end: TreeViewPlace;
|
|
@@ -1454,18 +1455,18 @@ export function useFailedSequencedEditTelemetry(tree: SharedTree): {
|
|
|
1454
1455
|
disable: () => void;
|
|
1455
1456
|
};
|
|
1456
1457
|
|
|
1457
|
-
// @
|
|
1458
|
+
// @alpha
|
|
1458
1459
|
export type UuidString = string & {
|
|
1459
1460
|
readonly UuidString: '9d40d0ae-90d9-44b1-9482-9f55d59d5465';
|
|
1460
1461
|
};
|
|
1461
1462
|
|
|
1462
|
-
// @
|
|
1463
|
+
// @alpha
|
|
1463
1464
|
export interface ValidEditingResult extends EditingResultBase {
|
|
1464
1465
|
readonly after: RevisionView;
|
|
1465
1466
|
readonly status: EditStatus.Applied;
|
|
1466
1467
|
}
|
|
1467
1468
|
|
|
1468
|
-
// @
|
|
1469
|
+
// @alpha
|
|
1469
1470
|
export enum WriteFormat {
|
|
1470
1471
|
v0_0_2 = "0.0.2",
|
|
1471
1472
|
v0_1_1 = "0.1.1"
|