fluid-framework 2.10.0-307399 → 2.11.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 +201 -0
- package/api-report/fluid-framework.alpha.api.md +43 -3
- package/api-report/fluid-framework.beta.api.md +1 -1
- package/api-report/fluid-framework.legacy.alpha.api.md +2 -1
- package/api-report/fluid-framework.legacy.public.api.md +1 -1
- package/api-report/fluid-framework.public.api.md +1 -1
- package/dist/alpha.d.ts +9 -0
- package/lib/alpha.d.ts +9 -0
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,206 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Revertible objects can now be cloned using `RevertibleAlpha.clone()` ([#23044](https://github.com/microsoft/FluidFramework/pull/23044)) [5abfa015af](https://github.com/microsoft/FluidFramework/commit/5abfa015aff9d639d82830f3ad828324d5680bd7)
|
|
8
|
+
|
|
9
|
+
The `DisposableRevertible` interface has been replaced with `RevertibleAlpha`. The new `RevertibleAlpha` interface extends `Revertible` and includes a `clone(branch: TreeBranch)` method to facilitate cloning a Revertible to a specified target branch. The source branch where the `RevertibleAlpha` was created must share revision logs with the target branch where the `RevertibleAlpha` is being cloned. If this condition is not met, the operation will throw an error.
|
|
10
|
+
|
|
11
|
+
- Providing unused properties in object literals for building empty ObjectNodes no longer compiles ([#23162](https://github.com/microsoft/FluidFramework/pull/23162)) [dc3c30019e](https://github.com/microsoft/FluidFramework/commit/dc3c30019ef869b27b9468bff59f10434d3c5c68)
|
|
12
|
+
|
|
13
|
+
ObjectNodes with no fields will now emit a compiler error if constructed from an object literal with fields.
|
|
14
|
+
This matches the behavior of non-empty ObjectNodes which already gave errors when unexpected properties were provided.
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
class A extends schemaFactory.object("A", {}) {}
|
|
18
|
+
const a = new A({ thisDoesNotExist: 5 }); // This now errors.
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- ✨ New! Alpha APIs for indexing ([#22491](https://github.com/microsoft/FluidFramework/pull/22491)) [cd95357ba8](https://github.com/microsoft/FluidFramework/commit/cd95357ba8f8cea6615f4fb0e9a62743770dce83)
|
|
22
|
+
|
|
23
|
+
SharedTree now supports indexing via two new APIs, `createSimpleTreeIndex` and `createIdentifierIndex`.
|
|
24
|
+
|
|
25
|
+
`createSimpleTreeIndex` is used to create a `SimpleTreeIndex` which indexes nodes based on their schema.
|
|
26
|
+
Depending on the schema, the user specifies which field to key the node on.
|
|
27
|
+
|
|
28
|
+
The following example indexes `IndexableParent`s and `IndexableChild`s and returns the first node of a particular key:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
function isStringKey(key: TreeIndexKey): key is string {
|
|
32
|
+
return typeof key === "string";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const index = createSimpleTreeIndex(
|
|
36
|
+
view,
|
|
37
|
+
new Map([
|
|
38
|
+
[IndexableParent, parentKey],
|
|
39
|
+
[IndexableChild, childKey],
|
|
40
|
+
]),
|
|
41
|
+
(nodes) => nodes[0],
|
|
42
|
+
isStringKey,
|
|
43
|
+
[IndexableParent, IndexableChild],
|
|
44
|
+
);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`createIdentifierIndex` is used to create an `IdentifierIndex` which provides an efficient way to retrieve nodes using the node identifier.
|
|
48
|
+
|
|
49
|
+
Example:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
const identifierIndex = createIdentifierIndex(view);
|
|
53
|
+
const node = identifierIndex.get("node12345");
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 2.10.0
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- Unsupported merge-tree types and related exposed internals have been removed ([#22696](https://github.com/microsoft/FluidFramework/pull/22696)) [7a032533a6](https://github.com/microsoft/FluidFramework/commit/7a032533a6ee6a6f76fe154ef65dfa33f87e5a7b)
|
|
61
|
+
|
|
62
|
+
As part of ongoing improvements, several internal types and related APIs have been removed. These types are unnecessary for any supported scenarios and could lead to errors if used. Since directly using these types would likely result in errors, these changes are not likely to impact any Fluid Framework consumers.
|
|
63
|
+
|
|
64
|
+
Removed types:
|
|
65
|
+
|
|
66
|
+
- IMergeTreeTextHelper
|
|
67
|
+
- MergeNode
|
|
68
|
+
- ObliterateInfo
|
|
69
|
+
- PropertiesManager
|
|
70
|
+
- PropertiesRollback
|
|
71
|
+
- SegmentGroup
|
|
72
|
+
- SegmentGroupCollection
|
|
73
|
+
|
|
74
|
+
In addition to removing the above types, they are no longer exposed through the following interfaces and their implementations: `ISegment`, `ReferencePosition`, and `ISerializableInterval`.
|
|
75
|
+
|
|
76
|
+
Removed functions:
|
|
77
|
+
|
|
78
|
+
- addProperties
|
|
79
|
+
- ack
|
|
80
|
+
|
|
81
|
+
Removed properties:
|
|
82
|
+
|
|
83
|
+
- propertyManager
|
|
84
|
+
- segmentGroups
|
|
85
|
+
|
|
86
|
+
The initial deprecations of the now changed or removed types were announced in Fluid Framework v2.2.0:
|
|
87
|
+
[Fluid Framework v2.2.0](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.2.0.md)
|
|
88
|
+
|
|
89
|
+
- Fix typing bug in `adaptEnum` and `enumFromStrings` ([#23077](https://github.com/microsoft/FluidFramework/pull/23077)) [cfb68388cb](https://github.com/microsoft/FluidFramework/commit/cfb68388cb6b88a0ef670633b3afa46a82c99972)
|
|
90
|
+
|
|
91
|
+
When using the return value from [`adaptEnum`](https://fluidframework.com/docs/api/v2/tree#adaptenum-function) as a function, passing in a value who's type is a union no longer produced an incorrectly typed return value. This has been fixed.
|
|
92
|
+
|
|
93
|
+
Additionally [`enumFromStrings`](https://fluidframework.com/docs/api/v2/tree#enumfromstrings-function) has improved the typing of its schema, ensuring the returned object's members have sufficiently specific types.
|
|
94
|
+
Part of this improvement was fixing the `.schema` property to be a tuple over each of the schema where it was previously a tuple of a single combined schema due to a bug.
|
|
95
|
+
|
|
96
|
+
One side-effect of these fixes is that narrowing of the `value` field of a node typed from the `.schema` behaves slightly different, such that the node type is now a union instead of it being a single type with a `.value` that is a union.
|
|
97
|
+
This means that narrowing based on `.value` property narrows which node type you have, not just the value property.
|
|
98
|
+
This mainly matters when matching all cases like the switch statement below:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
const Mode = enumFromStrings(schema, ["Fun", "Bonus"]);
|
|
102
|
+
type Mode = TreeNodeFromImplicitAllowedTypes<typeof Mode.schema>;
|
|
103
|
+
const node = new Mode.Bonus() as Mode;
|
|
104
|
+
|
|
105
|
+
switch (node.value) {
|
|
106
|
+
case "Fun": {
|
|
107
|
+
assert.fail();
|
|
108
|
+
}
|
|
109
|
+
case "Bonus": {
|
|
110
|
+
// This one runs
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
default:
|
|
114
|
+
// Before this change, "node.value" was never here, now "node" is never.
|
|
115
|
+
unreachableCase(node);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
- SharedTree event listeners that implement `Listenable` now allow deregistration of event listeners via an `off()` function. ([#23046](https://github.com/microsoft/FluidFramework/pull/23046)) [c59225db03](https://github.com/microsoft/FluidFramework/commit/c59225db033a516ee20e459ae31567d97ce8776c)
|
|
120
|
+
|
|
121
|
+
The ability to deregister events via a callback returned by `on()` remains the same.
|
|
122
|
+
Both strategies will remain supported and consumers of SharedTree events may choose which method of deregistration they prefer in a given instance.
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
// The new behavior
|
|
126
|
+
function deregisterViaOff(view: TreeView<MySchema>): {
|
|
127
|
+
const listener = () => { /* ... */ };
|
|
128
|
+
view.events.on("commitApplied", listener); // Register
|
|
129
|
+
view.events.off("commitApplied", listener); // Deregister
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// The existing behavior (still supported)
|
|
133
|
+
function deregisterViaCallback(view: TreeView<MySchema>): {
|
|
134
|
+
const off = view.events.on("commitApplied", () => { /* ... */ }); // Register
|
|
135
|
+
off(); // Deregister
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- Allow constructing recursive maps from objects ([#23070](https://github.com/microsoft/FluidFramework/pull/23070)) [0185a08c6f](https://github.com/microsoft/FluidFramework/commit/0185a08c6f8bf6e922a6467f11da049503c4d215)
|
|
140
|
+
|
|
141
|
+
Previously only non-recursive maps could be constructed from objects.
|
|
142
|
+
Now all maps nodes can constructed from objects:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
class MapRecursive extends sf.mapRecursive("Map", [() => MapRecursive]) {}
|
|
146
|
+
{
|
|
147
|
+
type _check = ValidateRecursiveSchema<typeof MapRecursive>;
|
|
148
|
+
}
|
|
149
|
+
// New:
|
|
150
|
+
const fromObject = new MapRecursive({ x: new MapRecursive() });
|
|
151
|
+
// Existing:
|
|
152
|
+
const fromIterator = new MapRecursive([["x", new MapRecursive()]]);
|
|
153
|
+
const fromMap = new MapRecursive(new Map([["x", new MapRecursive()]]));
|
|
154
|
+
const fromNothing = new MapRecursive();
|
|
155
|
+
const fromUndefined = new MapRecursive(undefined);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
- SharedString DDS annotateAdjustRange ([#22751](https://github.com/microsoft/FluidFramework/pull/22751)) [d54b9dde14](https://github.com/microsoft/FluidFramework/commit/d54b9dde14e9e0e5eb7999db8ebf6da98fdfb526)
|
|
159
|
+
|
|
160
|
+
This update introduces a new feature to the `SharedString` DDS, allowing for the adjustment of properties over a specified range. The `annotateAdjustRange` method enables users to apply adjustments to properties within a given range, providing more flexibility and control over property modifications.
|
|
161
|
+
|
|
162
|
+
An adjustment is a modification applied to a property value within a specified range. Adjustments can be used to increment or decrement property values dynamically. They are particularly useful in scenarios where property values need to be updated based on user interactions or other events. For example, in a rich text editor, adjustments can be used for modifying indentation levels or font sizes, where multiple users could apply differing numerical adjustments.
|
|
163
|
+
|
|
164
|
+
### Key Features and Use Cases:
|
|
165
|
+
|
|
166
|
+
- **Adjustments with Constraints**: Adjustments can include optional minimum and maximum constraints to ensure the final value falls within specified bounds. This is particularly useful for maintaining consistent formatting in rich text editors.
|
|
167
|
+
- **Consistent Property Changes**: The feature ensures that property changes are consistent, managing both local and remote changes effectively. This is essential for collaborative rich text editing where multiple users may be making adjustments simultaneously.
|
|
168
|
+
- **Rich Text Formatting**: Adjustments can be used to modify text properties such as font size, indentation, or other formatting attributes dynamically based on user actions.
|
|
169
|
+
|
|
170
|
+
### Configuration and Compatibility Requirements:
|
|
171
|
+
|
|
172
|
+
This feature is only available when the configuration `Fluid.Sequence.mergeTreeEnableAnnotateAdjust` is set to `true`. Additionally, all collaborating clients must have this feature enabled to use it. If any client does not have this feature enabled, it will lead to the client exiting collaboration. A future major version of Fluid will enable this feature by default.
|
|
173
|
+
|
|
174
|
+
### Usage Example:
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
sharedString.annotateAdjustRange(start, end, {
|
|
178
|
+
key: { value: 5, min: 0, max: 10 },
|
|
179
|
+
});
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- MergeTree `Client` Legacy API Removed ([#22697](https://github.com/microsoft/FluidFramework/pull/22697)) [2aa0b5e794](https://github.com/microsoft/FluidFramework/commit/2aa0b5e7941efe52386782595f96ff847c786fc3)
|
|
183
|
+
|
|
184
|
+
The `Client` class in the merge-tree package has been removed. Types that directly or indirectly expose the merge-tree `Client` class have also been removed.
|
|
185
|
+
|
|
186
|
+
The removed types were not meant to be used directly, and direct usage was not supported:
|
|
187
|
+
|
|
188
|
+
- AttributionPolicy
|
|
189
|
+
- IClientEvents
|
|
190
|
+
- IMergeTreeAttributionOptions
|
|
191
|
+
- SharedSegmentSequence
|
|
192
|
+
- SharedStringClass
|
|
193
|
+
|
|
194
|
+
Some classes that referenced the `Client` class have been transitioned to interfaces. Direct instantiation of these classes was not supported or necessary for any supported scenario, so the change to an interface should not impact usage. This applies to the following types:
|
|
195
|
+
|
|
196
|
+
- SequenceInterval
|
|
197
|
+
- SequenceEvent
|
|
198
|
+
- SequenceDeltaEvent
|
|
199
|
+
- SequenceMaintenanceEvent
|
|
200
|
+
|
|
201
|
+
The initial deprecations of the now changed or removed types were announced in Fluid Framework v2.4.0:
|
|
202
|
+
[Several MergeTree Client Legacy APIs are now deprecated](https://github.com/microsoft/FluidFramework/blob/main/RELEASE_NOTES/2.4.0.md#several-mergetree-client-legacy-apis-are-now-deprecated-22629)
|
|
203
|
+
|
|
3
204
|
## 2.5.0
|
|
4
205
|
|
|
5
206
|
### Minor Changes
|
|
@@ -103,6 +103,21 @@ export interface ContainerSchema {
|
|
|
103
103
|
readonly initialObjects: Record<string, SharedObjectKind>;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
// @alpha
|
|
107
|
+
export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): IdentifierIndex;
|
|
108
|
+
|
|
109
|
+
// @alpha
|
|
110
|
+
export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): SimpleTreeIndex<TKey, TValue>;
|
|
111
|
+
|
|
112
|
+
// @alpha
|
|
113
|
+
export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): SimpleTreeIndex<TKey, TValue>;
|
|
114
|
+
|
|
115
|
+
// @alpha
|
|
116
|
+
export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): SimpleTreeIndex<TKey, TValue>;
|
|
117
|
+
|
|
118
|
+
// @alpha
|
|
119
|
+
export function createSimpleTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): SimpleTreeIndex<TKey, TValue>;
|
|
120
|
+
|
|
106
121
|
// @public @sealed
|
|
107
122
|
interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
|
|
108
123
|
}
|
|
@@ -253,6 +268,9 @@ export interface IConnection {
|
|
|
253
268
|
// @public
|
|
254
269
|
export type ICriticalContainerError = IErrorBase;
|
|
255
270
|
|
|
271
|
+
// @alpha
|
|
272
|
+
export type IdentifierIndex = SimpleTreeIndex<string, TreeNode>;
|
|
273
|
+
|
|
256
274
|
// @public @sealed
|
|
257
275
|
export interface IDisposable {
|
|
258
276
|
dispose(error?: Error): void;
|
|
@@ -534,7 +552,7 @@ TSchema
|
|
|
534
552
|
] extends [ImplicitFieldSchema] ? InsertableTreeFieldFromImplicitField<TSchema> : [TSchema] extends [UnsafeUnknownSchema] ? InsertableContent | undefined : never;
|
|
535
553
|
|
|
536
554
|
// @public
|
|
537
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
|
|
555
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = Record<string, never> extends T ? Record<string, never> : FlattenKeys<{
|
|
538
556
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
539
557
|
} & {
|
|
540
558
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
@@ -892,6 +910,14 @@ export interface Revertible {
|
|
|
892
910
|
readonly status: RevertibleStatus;
|
|
893
911
|
}
|
|
894
912
|
|
|
913
|
+
// @alpha @sealed
|
|
914
|
+
export interface RevertibleAlpha extends Revertible {
|
|
915
|
+
clone: (branch: TreeBranch) => RevertibleAlpha;
|
|
916
|
+
}
|
|
917
|
+
|
|
918
|
+
// @alpha @sealed
|
|
919
|
+
export type RevertibleAlphaFactory = (onRevertibleDisposed?: (revertible: RevertibleAlpha) => void) => RevertibleAlpha;
|
|
920
|
+
|
|
895
921
|
// @public @sealed
|
|
896
922
|
export type RevertibleFactory = (onRevertibleDisposed?: (revertible: Revertible) => void) => Revertible;
|
|
897
923
|
|
|
@@ -998,6 +1024,9 @@ export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
|
|
|
998
1024
|
// @alpha
|
|
999
1025
|
export type SharedTreeOptions = Partial<ICodecOptions> & Partial<SharedTreeFormatOptions> & ForestOptions;
|
|
1000
1026
|
|
|
1027
|
+
// @alpha
|
|
1028
|
+
export type SimpleTreeIndex<TKey extends TreeIndexKey, TValue> = TreeIndex<TKey, TValue>;
|
|
1029
|
+
|
|
1001
1030
|
// @alpha
|
|
1002
1031
|
export function singletonSchema<TScope extends string, TName extends string | number>(factory: SchemaFactory<TScope, TName>, name: TName): TreeNodeSchemaClass<ScopedSchemaName<TScope, TName>, NodeKind.Object, TreeNode & {
|
|
1003
1032
|
readonly value: TName;
|
|
@@ -1098,8 +1127,8 @@ export interface TreeBranch extends IDisposable {
|
|
|
1098
1127
|
|
|
1099
1128
|
// @alpha @sealed
|
|
1100
1129
|
export interface TreeBranchEvents {
|
|
1101
|
-
changed(data: CommitMetadata, getRevertible?:
|
|
1102
|
-
commitApplied(data: CommitMetadata, getRevertible?:
|
|
1130
|
+
changed(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
1131
|
+
commitApplied(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
1103
1132
|
schemaChanged(): void;
|
|
1104
1133
|
}
|
|
1105
1134
|
|
|
@@ -1131,6 +1160,17 @@ export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = Fie
|
|
|
1131
1160
|
// @public
|
|
1132
1161
|
type TreeFieldFromImplicitFieldUnsafe<TSchema extends Unenforced<ImplicitFieldSchema>> = TSchema extends FieldSchemaUnsafe<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypesUnsafe<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypesUnsafe<TSchema> : unknown;
|
|
1133
1162
|
|
|
1163
|
+
// @alpha
|
|
1164
|
+
export interface TreeIndex<TKey extends TreeIndexKey, TValue> extends ReadonlyMap<TKey, TValue> {
|
|
1165
|
+
dispose(): void;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
// @alpha
|
|
1169
|
+
export type TreeIndexKey = number | string | boolean | IFluidHandle | null;
|
|
1170
|
+
|
|
1171
|
+
// @alpha
|
|
1172
|
+
export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
|
|
1173
|
+
|
|
1134
1174
|
// @public
|
|
1135
1175
|
export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
|
|
1136
1176
|
|
|
@@ -417,7 +417,7 @@ type _InlineTrick = 0;
|
|
|
417
417
|
export type Input<T extends never> = T;
|
|
418
418
|
|
|
419
419
|
// @public
|
|
420
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
|
|
420
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = Record<string, never> extends T ? Record<string, never> : FlattenKeys<{
|
|
421
421
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
422
422
|
} & {
|
|
423
423
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
@@ -517,7 +517,7 @@ type _InlineTrick = 0;
|
|
|
517
517
|
export type Input<T extends never> = T;
|
|
518
518
|
|
|
519
519
|
// @public
|
|
520
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
|
|
520
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = Record<string, never> extends T ? Record<string, never> : FlattenKeys<{
|
|
521
521
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
522
522
|
} & {
|
|
523
523
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
@@ -756,6 +756,7 @@ export interface ISharedObjectEvents extends IErrorEvent {
|
|
|
756
756
|
|
|
757
757
|
// @alpha (undocumented)
|
|
758
758
|
export interface ISharedSegmentSequence<T extends ISegment> extends ISharedObject<ISharedSegmentSequenceEvents>, ISharedIntervalCollection<SequenceInterval>, MergeTreeRevertibleDriver {
|
|
759
|
+
annotateAdjustRange(start: number, end: number, adjust: MapLike<AdjustParams>): void;
|
|
759
760
|
annotateRange(start: number, end: number, props: PropertySet): void;
|
|
760
761
|
createLocalReferencePosition(segment: T, offset: number, refType: ReferenceType, properties: PropertySet | undefined, slidingPreference?: SlidingPreference, canSlideToEndpoint?: boolean): LocalReferencePosition;
|
|
761
762
|
getContainingSegment(pos: number): {
|
|
@@ -445,7 +445,7 @@ type _InlineTrick = 0;
|
|
|
445
445
|
export type Input<T extends never> = T;
|
|
446
446
|
|
|
447
447
|
// @public
|
|
448
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
|
|
448
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = Record<string, never> extends T ? Record<string, never> : FlattenKeys<{
|
|
449
449
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
450
450
|
} & {
|
|
451
451
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
@@ -417,7 +417,7 @@ type _InlineTrick = 0;
|
|
|
417
417
|
export type Input<T extends never> = T;
|
|
418
418
|
|
|
419
419
|
// @public
|
|
420
|
-
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = FlattenKeys<{
|
|
420
|
+
type InsertableObjectFromSchemaRecord<T extends RestrictiveStringRecord<ImplicitFieldSchema>> = Record<string, never> extends T ? Record<string, never> : FlattenKeys<{
|
|
421
421
|
readonly [Property in keyof T]?: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
|
422
422
|
} & {
|
|
423
423
|
readonly [Property in keyof T as FieldHasDefault<T[Property & string]> extends false ? Property : never]: InsertableTreeFieldFromImplicitField<T[Property & string]>;
|
package/dist/alpha.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export {
|
|
|
148
148
|
ForestOptions,
|
|
149
149
|
ForestType,
|
|
150
150
|
ICodecOptions,
|
|
151
|
+
IdentifierIndex,
|
|
151
152
|
Insertable,
|
|
152
153
|
InsertableContent,
|
|
153
154
|
InsertableField,
|
|
@@ -172,15 +173,21 @@ export {
|
|
|
172
173
|
PopUnion,
|
|
173
174
|
ReadSchema,
|
|
174
175
|
ReadableField,
|
|
176
|
+
RevertibleAlpha,
|
|
177
|
+
RevertibleAlphaFactory,
|
|
175
178
|
SchemaValidationFunction,
|
|
176
179
|
SharedTreeFormatOptions,
|
|
177
180
|
SharedTreeFormatVersion,
|
|
178
181
|
SharedTreeOptions,
|
|
182
|
+
SimpleTreeIndex,
|
|
179
183
|
TreeAlpha,
|
|
180
184
|
TreeBranch,
|
|
181
185
|
TreeBranchEvents,
|
|
182
186
|
TreeBranchFork,
|
|
183
187
|
TreeCompressionStrategy,
|
|
188
|
+
TreeIndex,
|
|
189
|
+
TreeIndexKey,
|
|
190
|
+
TreeIndexNodes,
|
|
184
191
|
TreeViewAlpha,
|
|
185
192
|
UnionToTuple,
|
|
186
193
|
UnsafeUnknownSchema,
|
|
@@ -191,6 +198,8 @@ export {
|
|
|
191
198
|
asTreeViewAlpha,
|
|
192
199
|
comparePersistedSchema,
|
|
193
200
|
configuredSharedTree,
|
|
201
|
+
createIdentifierIndex,
|
|
202
|
+
createSimpleTreeIndex,
|
|
194
203
|
enumFromStrings,
|
|
195
204
|
extractPersistedSchema,
|
|
196
205
|
getBranch,
|
package/lib/alpha.d.ts
CHANGED
|
@@ -148,6 +148,7 @@ export {
|
|
|
148
148
|
ForestOptions,
|
|
149
149
|
ForestType,
|
|
150
150
|
ICodecOptions,
|
|
151
|
+
IdentifierIndex,
|
|
151
152
|
Insertable,
|
|
152
153
|
InsertableContent,
|
|
153
154
|
InsertableField,
|
|
@@ -172,15 +173,21 @@ export {
|
|
|
172
173
|
PopUnion,
|
|
173
174
|
ReadSchema,
|
|
174
175
|
ReadableField,
|
|
176
|
+
RevertibleAlpha,
|
|
177
|
+
RevertibleAlphaFactory,
|
|
175
178
|
SchemaValidationFunction,
|
|
176
179
|
SharedTreeFormatOptions,
|
|
177
180
|
SharedTreeFormatVersion,
|
|
178
181
|
SharedTreeOptions,
|
|
182
|
+
SimpleTreeIndex,
|
|
179
183
|
TreeAlpha,
|
|
180
184
|
TreeBranch,
|
|
181
185
|
TreeBranchEvents,
|
|
182
186
|
TreeBranchFork,
|
|
183
187
|
TreeCompressionStrategy,
|
|
188
|
+
TreeIndex,
|
|
189
|
+
TreeIndexKey,
|
|
190
|
+
TreeIndexNodes,
|
|
184
191
|
TreeViewAlpha,
|
|
185
192
|
UnionToTuple,
|
|
186
193
|
UnsafeUnknownSchema,
|
|
@@ -191,6 +198,8 @@ export {
|
|
|
191
198
|
asTreeViewAlpha,
|
|
192
199
|
comparePersistedSchema,
|
|
193
200
|
configuredSharedTree,
|
|
201
|
+
createIdentifierIndex,
|
|
202
|
+
createSimpleTreeIndex,
|
|
194
203
|
enumFromStrings,
|
|
195
204
|
extractPersistedSchema,
|
|
196
205
|
getBranch,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,16 +57,16 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "2.
|
|
61
|
-
"@fluidframework/container-loader": "2.
|
|
62
|
-
"@fluidframework/core-interfaces": "2.
|
|
63
|
-
"@fluidframework/driver-definitions": "2.
|
|
64
|
-
"@fluidframework/fluid-static": "2.
|
|
65
|
-
"@fluidframework/map": "2.
|
|
66
|
-
"@fluidframework/runtime-utils": "2.
|
|
67
|
-
"@fluidframework/sequence": "2.
|
|
68
|
-
"@fluidframework/shared-object-base": "2.
|
|
69
|
-
"@fluidframework/tree": "2.
|
|
60
|
+
"@fluidframework/container-definitions": "~2.11.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.11.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.11.0",
|
|
63
|
+
"@fluidframework/driver-definitions": "~2.11.0",
|
|
64
|
+
"@fluidframework/fluid-static": "~2.11.0",
|
|
65
|
+
"@fluidframework/map": "~2.11.0",
|
|
66
|
+
"@fluidframework/runtime-utils": "~2.11.0",
|
|
67
|
+
"@fluidframework/sequence": "~2.11.0",
|
|
68
|
+
"@fluidframework/shared-object-base": "~2.11.0",
|
|
69
|
+
"@fluidframework/tree": "~2.11.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@arethetypeswrong/cli": "^0.16.4",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@fluid-tools/build-cli": "^0.51.0",
|
|
75
75
|
"@fluidframework/build-common": "^2.0.3",
|
|
76
76
|
"@fluidframework/build-tools": "^0.51.0",
|
|
77
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
77
|
+
"@fluidframework/eslint-config-fluid": "^5.6.0",
|
|
78
78
|
"@microsoft/api-extractor": "7.47.8",
|
|
79
79
|
"@types/node": "^18.19.0",
|
|
80
80
|
"concurrently": "^8.2.1",
|