@fluid-experimental/tree 2.0.0-internal.8.0.1 → 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
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
type IChannelServices,
|
|
11
11
|
type IChannelFactory,
|
|
12
12
|
} from '@fluidframework/datastore-definitions';
|
|
13
|
-
import { type
|
|
13
|
+
import { type ITree } from '@fluidframework/tree';
|
|
14
14
|
import { type SharedTreeFactory as LegacySharedTreeFactory, type SharedTree as LegacySharedTree } from '../SharedTree';
|
|
15
15
|
import { MigrationShim } from './migrationShim.js';
|
|
16
16
|
import { attributesMatch } from './utils.js';
|
|
@@ -30,7 +30,7 @@ import { attributesMatch } from './utils.js';
|
|
|
30
30
|
export class MigrationShimFactory implements IChannelFactory {
|
|
31
31
|
public constructor(
|
|
32
32
|
private readonly oldFactory: LegacySharedTreeFactory,
|
|
33
|
-
private readonly newFactory:
|
|
33
|
+
private readonly newFactory: IChannelFactory,
|
|
34
34
|
private readonly populateNewChannelFn: (oldChannel: LegacySharedTree, newChannel: ITree) => void
|
|
35
35
|
) {}
|
|
36
36
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { type IFluidHandle, type IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
6
6
|
import {
|
|
7
|
+
type IChannelFactory,
|
|
7
8
|
type IChannelAttributes,
|
|
8
9
|
type IChannelServices,
|
|
9
10
|
type IFluidDataStoreRuntime,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
type ITelemetryContext,
|
|
15
16
|
type ISummaryTreeWithStats,
|
|
16
17
|
} from '@fluidframework/runtime-definitions';
|
|
17
|
-
import { type ITree
|
|
18
|
+
import { type ITree } from '@fluidframework/tree';
|
|
18
19
|
import { AttachState } from '@fluidframework/container-definitions';
|
|
19
20
|
import { assert } from '@fluidframework/core-utils';
|
|
20
21
|
import { type IShimChannelServices, NoDeltasChannelServices } from './shimChannelServices.js';
|
|
@@ -38,7 +39,7 @@ export class SharedTreeShim implements IShim {
|
|
|
38
39
|
public constructor(
|
|
39
40
|
public readonly id: string,
|
|
40
41
|
public readonly runtime: IFluidDataStoreRuntime,
|
|
41
|
-
public readonly sharedTreeFactory:
|
|
42
|
+
public readonly sharedTreeFactory: IChannelFactory
|
|
42
43
|
) {
|
|
43
44
|
this.newTreeShimDeltaHandler = new SharedTreeShimDeltaHandler(sharedTreeFactory.attributes);
|
|
44
45
|
this.handle = new ShimHandle<SharedTreeShim>(this);
|
|
@@ -91,16 +92,16 @@ export class SharedTreeShim implements IShim {
|
|
|
91
92
|
this.runtime.attachState === AttachState.Detached
|
|
92
93
|
? new NoDeltasChannelServices(services)
|
|
93
94
|
: this.generateShimServicesOnce(services);
|
|
94
|
-
this._currentTree = await this.sharedTreeFactory.load(
|
|
95
|
+
this._currentTree = (await this.sharedTreeFactory.load(
|
|
95
96
|
this.runtime,
|
|
96
97
|
this.id,
|
|
97
98
|
shimServices,
|
|
98
99
|
this.sharedTreeFactory.attributes
|
|
99
|
-
);
|
|
100
|
+
)) as ITree;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
public create(): void {
|
|
103
|
-
this._currentTree = this.sharedTreeFactory.create(this.runtime, this.id);
|
|
104
|
+
this._currentTree = this.sharedTreeFactory.create(this.runtime, this.id) as ITree;
|
|
104
105
|
}
|
|
105
106
|
|
|
106
107
|
private generateShimServicesOnce(services: IChannelServices): IShimChannelServices {
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
type IChannelFactory,
|
|
12
12
|
} from '@fluidframework/datastore-definitions';
|
|
13
13
|
|
|
14
|
-
import { type TreeFactory } from '@fluid-experimental/tree2';
|
|
15
14
|
import { SharedTreeShim } from './sharedTreeShim.js';
|
|
16
15
|
import { attributesMatch } from './utils.js';
|
|
17
16
|
|
|
@@ -29,7 +28,7 @@ import { attributesMatch } from './utils.js';
|
|
|
29
28
|
* @internal
|
|
30
29
|
*/
|
|
31
30
|
export class SharedTreeShimFactory implements IChannelFactory {
|
|
32
|
-
public constructor(private readonly factory:
|
|
31
|
+
public constructor(private readonly factory: IChannelFactory) {}
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
* Can only load the new SharedTree - this allows our snapshots to be simple. We do not have to consider any new
|
|
@@ -61,7 +61,14 @@ export class PreMigrationDeltaConnection implements IDeltaConnection {
|
|
|
61
61
|
this.deltaConnection.dirty();
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
/**
|
|
65
|
+
* Passes through to the underlying delta connection.
|
|
66
|
+
*
|
|
67
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
68
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
69
|
+
*
|
|
70
|
+
* @privateRemarks This needs to be more thoroughly thought through. What happens when the source handle is changed?
|
|
71
|
+
*/
|
|
65
72
|
public addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void {
|
|
66
73
|
this.deltaConnection.addedGCOutboundReference?.(srcHandle, outboundHandle);
|
|
67
74
|
}
|
|
@@ -112,7 +119,14 @@ export class StampDeltaConnection implements IDeltaConnection {
|
|
|
112
119
|
this.deltaConnection.dirty();
|
|
113
120
|
}
|
|
114
121
|
|
|
115
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Passes through to the underlying delta connection.
|
|
124
|
+
*
|
|
125
|
+
* @deprecated There is no replacement for this, its functionality is no longer needed at this layer.
|
|
126
|
+
* It will be removed in a future release, sometime after 2.0.0-internal.8.0.0
|
|
127
|
+
*
|
|
128
|
+
* @privateRemarks This needs to be more thoroughly thought through. What happens when the source handle is changed?
|
|
129
|
+
*/
|
|
116
130
|
public addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void {
|
|
117
131
|
this.deltaConnection.addedGCOutboundReference?.(srcHandle, outboundHandle);
|
|
118
132
|
}
|
|
@@ -30,7 +30,7 @@ import type {
|
|
|
30
30
|
* Each place can be specified, (aka 'anchored') in two ways (relative to the sibling before or after):
|
|
31
31
|
* the choice of which way to anchor a place only matters when the kept across an edit, and thus evaluated in multiple contexts where the
|
|
32
32
|
* two place description may no longer evaluate to the same place.
|
|
33
|
-
* @
|
|
33
|
+
* @alpha
|
|
34
34
|
*/
|
|
35
35
|
export enum Side {
|
|
36
36
|
Before = 0,
|
|
@@ -40,7 +40,7 @@ export enum Side {
|
|
|
40
40
|
/**
|
|
41
41
|
* A collection of changes to the tree that are applied atomically along with a unique identifier for the edit.
|
|
42
42
|
* If any individual change fails to apply, the entire Edit will fail to apply.
|
|
43
|
-
* @
|
|
43
|
+
* @alpha
|
|
44
44
|
*/
|
|
45
45
|
export interface Edit<TChange> extends EditBase<TChange> {
|
|
46
46
|
/**
|
|
@@ -64,7 +64,7 @@ export interface EditWithoutId<TChange> extends EditBase<TChange> {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* The information included in an edit.
|
|
67
|
-
* @
|
|
67
|
+
* @alpha
|
|
68
68
|
*/
|
|
69
69
|
export interface EditBase<TChange> {
|
|
70
70
|
/**
|
|
@@ -91,7 +91,7 @@ export interface EditBase<TChange> {
|
|
|
91
91
|
* See {@link comparePayloads} for equality semantics and related details (like what is allowed to be lost when serializing)
|
|
92
92
|
*
|
|
93
93
|
* TODO:#51984: Allow opting into heuristic blobbing in snapshots with a special IFluid key.
|
|
94
|
-
* @
|
|
94
|
+
* @alpha
|
|
95
95
|
*/
|
|
96
96
|
export type Payload = any;
|
|
97
97
|
|
|
@@ -99,7 +99,7 @@ export type Payload = any;
|
|
|
99
99
|
* Json compatible map as object.
|
|
100
100
|
* Keys are TraitLabels,
|
|
101
101
|
* Values are the content of the trait specified by the key.
|
|
102
|
-
* @
|
|
102
|
+
* @alpha
|
|
103
103
|
*/
|
|
104
104
|
export interface TraitMap<TChild> {
|
|
105
105
|
readonly [key: string]: TreeNodeSequence<TChild>;
|
|
@@ -107,13 +107,13 @@ export interface TraitMap<TChild> {
|
|
|
107
107
|
|
|
108
108
|
/**
|
|
109
109
|
* A sequence of Nodes that make up a trait under a Node
|
|
110
|
-
* @
|
|
110
|
+
* @alpha
|
|
111
111
|
*/
|
|
112
112
|
export type TreeNodeSequence<TChild> = readonly TChild[];
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* An object which may have traits with children of the given type underneath it
|
|
116
|
-
* @
|
|
116
|
+
* @alpha
|
|
117
117
|
*/
|
|
118
118
|
export interface HasTraits<TChild> {
|
|
119
119
|
readonly traits: TraitMap<TChild>;
|
|
@@ -121,7 +121,7 @@ export interface HasTraits<TChild> {
|
|
|
121
121
|
|
|
122
122
|
/**
|
|
123
123
|
* The fields required by a node in a tree
|
|
124
|
-
* @
|
|
124
|
+
* @alpha
|
|
125
125
|
*/
|
|
126
126
|
export interface NodeData<TId> {
|
|
127
127
|
/**
|
|
@@ -143,7 +143,7 @@ export interface NodeData<TId> {
|
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
145
|
* Satisfies `NodeData` and may contain children under traits (which may or may not be `TreeNodes`)
|
|
146
|
-
* @
|
|
146
|
+
* @alpha
|
|
147
147
|
*/
|
|
148
148
|
export interface TreeNode<TChild, TId> extends NodeData<TId>, HasTraits<TChild> {}
|
|
149
149
|
|
|
@@ -155,7 +155,7 @@ export type PlaceholderTree<TPlaceholder = never> = TreeNode<PlaceholderTree<TPl
|
|
|
155
155
|
|
|
156
156
|
/**
|
|
157
157
|
* Specifies the location of a trait (a labeled sequence of nodes) within the tree.
|
|
158
|
-
* @
|
|
158
|
+
* @alpha
|
|
159
159
|
*/
|
|
160
160
|
export interface TraitLocationInternal_0_0_2 {
|
|
161
161
|
readonly parent: StableNodeId;
|
|
@@ -164,13 +164,13 @@ export interface TraitLocationInternal_0_0_2 {
|
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
166
|
* JSON-compatible Node type. Objects of this type will be persisted in internal change objects (under Edits) in the SharedTree history.
|
|
167
|
-
* @
|
|
167
|
+
* @alpha
|
|
168
168
|
*/
|
|
169
169
|
export type ChangeNode_0_0_2 = TreeNode<ChangeNode_0_0_2, StableNodeId>;
|
|
170
170
|
|
|
171
171
|
/**
|
|
172
172
|
* The status code of an attempt to apply the changes in an Edit.
|
|
173
|
-
* @
|
|
173
|
+
* @alpha
|
|
174
174
|
*/
|
|
175
175
|
export enum EditStatus {
|
|
176
176
|
/**
|
|
@@ -245,7 +245,7 @@ export interface SharedTreeEditOp_0_0_2 extends VersionedOp<WriteFormat.v0_0_2>
|
|
|
245
245
|
|
|
246
246
|
/**
|
|
247
247
|
* Format versions that SharedTree supports writing. Changes to op or summary formats necessitate updates.
|
|
248
|
-
* @
|
|
248
|
+
* @alpha
|
|
249
249
|
*/
|
|
250
250
|
export enum WriteFormat {
|
|
251
251
|
/** Stores all edits in their raw format. */
|
|
@@ -256,7 +256,7 @@ export enum WriteFormat {
|
|
|
256
256
|
|
|
257
257
|
/**
|
|
258
258
|
* The minimal information on a SharedTree summary. Contains the summary format version.
|
|
259
|
-
* @
|
|
259
|
+
* @alpha
|
|
260
260
|
*/
|
|
261
261
|
export interface SharedTreeSummaryBase {
|
|
262
262
|
/**
|
|
@@ -282,7 +282,7 @@ export interface SharedTreeSummary_0_0_2 extends SharedTreeSummaryBase {
|
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
284
|
* {@inheritdoc ChangeType}
|
|
285
|
-
* @
|
|
285
|
+
* @alpha
|
|
286
286
|
*/
|
|
287
287
|
export enum ChangeTypeInternal {
|
|
288
288
|
Insert,
|
|
@@ -306,13 +306,13 @@ export type ChangeInternal_0_0_2 =
|
|
|
306
306
|
|
|
307
307
|
/**
|
|
308
308
|
* {@inheritdoc BuildNode}
|
|
309
|
-
* @
|
|
309
|
+
* @alpha
|
|
310
310
|
*/
|
|
311
311
|
export type BuildNodeInternal_0_0_2 = TreeNode<BuildNodeInternal_0_0_2, StableNodeId> | DetachedSequenceId;
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
314
|
* {@inheritdoc Build}
|
|
315
|
-
* @
|
|
315
|
+
* @alpha
|
|
316
316
|
*/
|
|
317
317
|
export interface BuildInternal_0_0_2 {
|
|
318
318
|
/** {@inheritdoc Build.destination } */
|
|
@@ -325,7 +325,7 @@ export interface BuildInternal_0_0_2 {
|
|
|
325
325
|
|
|
326
326
|
/**
|
|
327
327
|
* {@inheritdoc (Insert:interface)}
|
|
328
|
-
* @
|
|
328
|
+
* @alpha
|
|
329
329
|
*/
|
|
330
330
|
export interface InsertInternal_0_0_2 {
|
|
331
331
|
/** {@inheritdoc (Insert:interface).destination } */
|
|
@@ -338,7 +338,7 @@ export interface InsertInternal_0_0_2 {
|
|
|
338
338
|
|
|
339
339
|
/**
|
|
340
340
|
* {@inheritdoc Detach}
|
|
341
|
-
* @
|
|
341
|
+
* @alpha
|
|
342
342
|
*/
|
|
343
343
|
export interface DetachInternal_0_0_2 {
|
|
344
344
|
/** {@inheritdoc Detach.destination } */
|
|
@@ -351,7 +351,7 @@ export interface DetachInternal_0_0_2 {
|
|
|
351
351
|
|
|
352
352
|
/**
|
|
353
353
|
* {@inheritdoc SetValue}
|
|
354
|
-
* @
|
|
354
|
+
* @alpha
|
|
355
355
|
*/
|
|
356
356
|
export interface SetValueInternal_0_0_2 {
|
|
357
357
|
/** {@inheritdoc SetValue.nodeToModify } */
|
|
@@ -365,7 +365,7 @@ export interface SetValueInternal_0_0_2 {
|
|
|
365
365
|
|
|
366
366
|
/**
|
|
367
367
|
* What to do when a Constraint is violated.
|
|
368
|
-
* @
|
|
368
|
+
* @alpha
|
|
369
369
|
*/
|
|
370
370
|
export enum ConstraintEffect {
|
|
371
371
|
/**
|
|
@@ -388,7 +388,7 @@ export enum ConstraintEffect {
|
|
|
388
388
|
|
|
389
389
|
/**
|
|
390
390
|
* {@inheritdoc Constraint}
|
|
391
|
-
* @
|
|
391
|
+
* @alpha
|
|
392
392
|
*/
|
|
393
393
|
export interface ConstraintInternal_0_0_2 {
|
|
394
394
|
/** {@inheritdoc Constraint.toConstrain } */
|
|
@@ -411,7 +411,7 @@ export interface ConstraintInternal_0_0_2 {
|
|
|
411
411
|
|
|
412
412
|
/**
|
|
413
413
|
* {@inheritdoc (StablePlace:interface) }
|
|
414
|
-
* @
|
|
414
|
+
* @alpha
|
|
415
415
|
*/
|
|
416
416
|
export interface StablePlaceInternal_0_0_2 {
|
|
417
417
|
/**
|
|
@@ -432,7 +432,7 @@ export interface StablePlaceInternal_0_0_2 {
|
|
|
432
432
|
|
|
433
433
|
/**
|
|
434
434
|
* {@inheritdoc (StableRange:interface) }
|
|
435
|
-
* @
|
|
435
|
+
* @alpha
|
|
436
436
|
*/
|
|
437
437
|
export interface StableRangeInternal_0_0_2 {
|
|
438
438
|
/** {@inheritdoc (StableRange:interface).start } */
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* Specifies the location of a trait (a labeled sequence of nodes) within the tree.
|
|
53
|
-
* @
|
|
53
|
+
* @alpha
|
|
54
54
|
*/
|
|
55
55
|
export interface TraitLocationInternal extends Omit<TraitLocationInternal_0_0_2, 'parent'> {
|
|
56
56
|
readonly parent: NodeId;
|
|
@@ -206,7 +206,7 @@ export type CompressedBuildNode<TId extends OpSpaceNodeId> = CompressedPlacehold
|
|
|
206
206
|
* This type should be used as an opaque handle in the public API for `ChangeInternal` objects.
|
|
207
207
|
* This is useful for supporting public APIs which involve working with a tree's edit history,
|
|
208
208
|
* which will involve changes that have already been internalized.
|
|
209
|
-
* @
|
|
209
|
+
* @alpha
|
|
210
210
|
*/
|
|
211
211
|
export interface InternalizedChange {
|
|
212
212
|
InternalChangeBrand: '2cae1045-61cf-4ef7-a6a3-8ad920cb7ab3';
|
|
@@ -214,19 +214,19 @@ export interface InternalizedChange {
|
|
|
214
214
|
|
|
215
215
|
/**
|
|
216
216
|
* {@inheritdoc (Change:type)}
|
|
217
|
-
* @
|
|
217
|
+
* @alpha
|
|
218
218
|
*/
|
|
219
219
|
export type ChangeInternal = InsertInternal | DetachInternal | BuildInternal | SetValueInternal | ConstraintInternal;
|
|
220
220
|
|
|
221
221
|
/**
|
|
222
222
|
* {@inheritdoc BuildNode}
|
|
223
|
-
* @
|
|
223
|
+
* @alpha
|
|
224
224
|
*/
|
|
225
225
|
export type BuildNodeInternal = TreeNode<BuildNodeInternal, NodeId> | DetachedSequenceId;
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* {@inheritdoc Build}
|
|
229
|
-
* @
|
|
229
|
+
* @alpha
|
|
230
230
|
*/
|
|
231
231
|
export interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {
|
|
232
232
|
readonly source: TreeNodeSequence<BuildNodeInternal>;
|
|
@@ -234,7 +234,7 @@ export interface BuildInternal extends Omit<BuildInternal_0_0_2, 'source'> {
|
|
|
234
234
|
|
|
235
235
|
/**
|
|
236
236
|
* {@inheritdoc (Insert:interface)}
|
|
237
|
-
* @
|
|
237
|
+
* @alpha
|
|
238
238
|
*/
|
|
239
239
|
export interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'> {
|
|
240
240
|
/** {@inheritdoc (Insert:interface).destination } */
|
|
@@ -243,7 +243,7 @@ export interface InsertInternal extends Omit<InsertInternal_0_0_2, 'destination'
|
|
|
243
243
|
|
|
244
244
|
/**
|
|
245
245
|
* {@inheritdoc Detach}
|
|
246
|
-
* @
|
|
246
|
+
* @alpha
|
|
247
247
|
*/
|
|
248
248
|
export interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {
|
|
249
249
|
/** {@inheritdoc Detach.source } */
|
|
@@ -252,7 +252,7 @@ export interface DetachInternal extends Omit<DetachInternal_0_0_2, 'source'> {
|
|
|
252
252
|
|
|
253
253
|
/**
|
|
254
254
|
* {@inheritdoc SetValue}
|
|
255
|
-
* @
|
|
255
|
+
* @alpha
|
|
256
256
|
*/
|
|
257
257
|
export interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToModify'> {
|
|
258
258
|
/** {@inheritdoc SetValue.nodeToModify } */
|
|
@@ -261,7 +261,7 @@ export interface SetValueInternal extends Omit<SetValueInternal_0_0_2, 'nodeToMo
|
|
|
261
261
|
|
|
262
262
|
/**
|
|
263
263
|
* {@inheritdoc Constraint}
|
|
264
|
-
* @
|
|
264
|
+
* @alpha
|
|
265
265
|
*/
|
|
266
266
|
export interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toConstrain' | 'parentNode'> {
|
|
267
267
|
/** {@inheritdoc Constraint.toConstrain } */
|
|
@@ -272,7 +272,7 @@ export interface ConstraintInternal extends Omit<ConstraintInternal_0_0_2, 'toCo
|
|
|
272
272
|
|
|
273
273
|
// Note: Documentation of this constant is merged with documentation of the `ChangeInternal` interface.
|
|
274
274
|
/**
|
|
275
|
-
* @
|
|
275
|
+
* @alpha
|
|
276
276
|
*/
|
|
277
277
|
export const ChangeInternal = {
|
|
278
278
|
build: (source: TreeNodeSequence<BuildNodeInternal>, destination: DetachedSequenceId): BuildInternal => ({
|
|
@@ -343,7 +343,7 @@ export const ChangeInternal = {
|
|
|
343
343
|
|
|
344
344
|
/**
|
|
345
345
|
* {@inheritdoc (StablePlace:interface) }
|
|
346
|
-
* @
|
|
346
|
+
* @alpha
|
|
347
347
|
*/
|
|
348
348
|
export interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 'referenceSibling' | 'referenceTrait'> {
|
|
349
349
|
/**
|
|
@@ -359,7 +359,7 @@ export interface StablePlaceInternal extends Omit<StablePlaceInternal_0_0_2, 're
|
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
361
|
* {@inheritdoc (StableRange:interface) }
|
|
362
|
-
* @
|
|
362
|
+
* @alpha
|
|
363
363
|
*/
|
|
364
364
|
export interface StableRangeInternal {
|
|
365
365
|
/** {@inheritdoc (StableRange:interface).start } */
|
|
@@ -374,7 +374,7 @@ export interface StableRangeInternal {
|
|
|
374
374
|
*/
|
|
375
375
|
|
|
376
376
|
/**
|
|
377
|
-
* @
|
|
377
|
+
* @alpha
|
|
378
378
|
*/
|
|
379
379
|
export const StablePlaceInternal = {
|
|
380
380
|
/**
|
|
@@ -408,7 +408,7 @@ export const StablePlaceInternal = {
|
|
|
408
408
|
};
|
|
409
409
|
|
|
410
410
|
/**
|
|
411
|
-
* @
|
|
411
|
+
* @alpha
|
|
412
412
|
*/
|
|
413
413
|
export const StableRangeInternal = {
|
|
414
414
|
/**
|