fluid-framework 2.91.0 → 2.92.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 +118 -0
- package/alpha.d.ts +1 -1
- package/api-report/fluid-framework.alpha.api.md +60 -22
- package/beta.d.ts +1 -1
- package/dist/alpha.d.ts +11 -4
- package/dist/beta.d.ts +1 -1
- package/dist/legacy.d.ts +1 -1
- package/dist/public.d.ts +1 -1
- package/legacy.d.ts +1 -1
- package/lib/alpha.d.ts +11 -4
- package/lib/beta.d.ts +1 -1
- package/lib/legacy.d.ts +1 -1
- package/lib/public.d.ts +1 -1
- package/package.json +17 -34
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,123 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.92.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- The deprecated getBranch API has been removed ([#26796](https://github.com/microsoft/FluidFramework/pull/26796)) [e80a48e25e](https://github.com/microsoft/FluidFramework/commit/e80a48e25ebab540ce9a0093edc12b9aa5ab03fb)
|
|
8
|
+
|
|
9
|
+
To obtain a branch-like object, create a view from your tree via `viewWith`.
|
|
10
|
+
Or, use `TreeAlpha.context` to get a view from a `TreeNode`.
|
|
11
|
+
|
|
12
|
+
- Array node nodeChanged events now include a delta payload (via TreeAlpha) ([#26677](https://github.com/microsoft/FluidFramework/pull/26677)) [bf02e33aed](https://github.com/microsoft/FluidFramework/commit/bf02e33aed74295840ffa5b6ef889860d58f5654)
|
|
13
|
+
|
|
14
|
+
The `nodeChanged` event for array nodes (accessed via `TreeAlpha.on`) now provides a `delta` field, a sequence of `ArrayNodeDeltaOp` values that describe exactly what changed in the array. This lets you efficiently sync an external representation with tree changes, without taking a snapshot of the old state or diffing the entire array.
|
|
15
|
+
|
|
16
|
+
The delta follows [Quill](https://quilljs.com/docs/)-style semantics: each op covers a contiguous run of positions in the array before the change.
|
|
17
|
+
- `{ type: "retain", count: N }`—N elements stayed in place. Their positions are unchanged, though their contents may have changed (which would fire separate `nodeChanged` events on those elements).
|
|
18
|
+
- `{ type: "insert", count: N }`—N elements were inserted; read their values from the current tree at these positions.
|
|
19
|
+
- `{ type: "remove", count: N }`—N elements were removed.
|
|
20
|
+
|
|
21
|
+
Trailing unchanged elements are not represented by a trailing `"retain"` op.
|
|
22
|
+
|
|
23
|
+
Use `TreeAlpha.on` to subscribe to the richer alpha events. The data passed to the callback is typed as `NodeChangedDataAlpha<TNode>`:
|
|
24
|
+
- Object, map, and record nodes receive `NodeChangedDataProperties` (with a required `changedProperties` set).
|
|
25
|
+
- Array nodes receive `NodeChangedDataDelta` (with a `delta` field).
|
|
26
|
+
|
|
27
|
+
`TreeBeta.on` is unchanged and does not include delta information.
|
|
28
|
+
|
|
29
|
+
#### Example: Applying a Delta to a Plain Array Mirror
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// Walk the delta to keep a plain JS array in sync with an array node.
|
|
33
|
+
// retain = advance past unchanged elements,
|
|
34
|
+
// insert = splice in new elements,
|
|
35
|
+
// remove = splice out removed elements.
|
|
36
|
+
const mirror: number[] = [1, 2, 3];
|
|
37
|
+
|
|
38
|
+
TreeAlpha.on(myArrayNode, "nodeChanged", ({ delta }) => {
|
|
39
|
+
let readPos = 0; // position in the current (post-change) tree
|
|
40
|
+
let writePos = 0; // position in the mirror array
|
|
41
|
+
|
|
42
|
+
for (const op of delta ?? []) {
|
|
43
|
+
if (op.type === "retain") {
|
|
44
|
+
writePos += op.count;
|
|
45
|
+
readPos += op.count;
|
|
46
|
+
} else if (op.type === "insert") {
|
|
47
|
+
const newItems = Array.from(
|
|
48
|
+
{ length: op.count },
|
|
49
|
+
(_, i) => myArrayNode[readPos + i],
|
|
50
|
+
);
|
|
51
|
+
mirror.splice(writePos, 0, ...newItems);
|
|
52
|
+
writePos += op.count;
|
|
53
|
+
readPos += op.count;
|
|
54
|
+
} else if (op.type === "remove") {
|
|
55
|
+
mirror.splice(writePos, op.count);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### Example: Narrowing the Union in a Generic Handler
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
TreeAlpha.on(node as TreeNode, "nodeChanged", (data) => {
|
|
65
|
+
if ("delta" in data) {
|
|
66
|
+
// Array node — data is NodeChangedDataDelta
|
|
67
|
+
console.log("array changed, delta:", data.delta);
|
|
68
|
+
} else {
|
|
69
|
+
// Object/map/record node — data is NodeChangedDataProperties
|
|
70
|
+
console.log("properties changed:", data.changedProperties);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
> **Note:** The `delta` value may be `undefined` in two cases:
|
|
76
|
+
>
|
|
77
|
+
> - The node was created locally and has not yet been inserted into a document tree (a known temporary limitation).
|
|
78
|
+
> - The document was updated in a way that required multiple internal change passes in a single operation (for example, a data change combined with a schema upgrade).
|
|
79
|
+
|
|
80
|
+
- Add TreeArrayNodeAlpha with a new splice method ([#26740](https://github.com/microsoft/FluidFramework/pull/26740)) [f2b0cf9176](https://github.com/microsoft/FluidFramework/commit/f2b0cf917609b84952db2b9492867e70e0d57981)
|
|
81
|
+
|
|
82
|
+
Adds a `splice` method on `TreeArrayNodeAlpha` that supports removing and inserting items in a single operation to align with JavaScript's Array splice API.
|
|
83
|
+
Returns the removed items as an array.
|
|
84
|
+
Supports negative `start` indices (wraps from end).
|
|
85
|
+
Optional `deleteCount` (omitting removes everything from `start` onward).
|
|
86
|
+
The alpha API is accessible by an `asAlpha` cast on existing TreeArrayNodes, or using `schemaFactoryAlpha`.
|
|
87
|
+
`arrayAlpha` nodes are accepted wherever `TreeArrayNode` is expected, but not the reverse.
|
|
88
|
+
`asAlpha` is bidirectional since it's the same underlying schema.
|
|
89
|
+
|
|
90
|
+
#### Usage
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import {
|
|
94
|
+
SchemaFactory,
|
|
95
|
+
SchemaFactoryAlpha,
|
|
96
|
+
asAlpha,
|
|
97
|
+
} from "@fluidframework/tree";
|
|
98
|
+
|
|
99
|
+
// Using asAlpha to cast an existing TreeArrayNode
|
|
100
|
+
const sf = new SchemaFactory("example");
|
|
101
|
+
const Inventory = sf.array("Inventory", sf.string);
|
|
102
|
+
const inventory = new Inventory(["Apples", "Bananas", "Pears"]);
|
|
103
|
+
const inventoryAlpha = asAlpha(inventory);
|
|
104
|
+
|
|
105
|
+
// Using SchemaFactoryAlpha so splice is available directly
|
|
106
|
+
const sf = new SchemaFactoryAlpha("example");
|
|
107
|
+
const Inventory = sf.arrayAlpha("Inventory", sf.string);
|
|
108
|
+
const inventoryAlpha = new Inventory(["Apples", "Bananas", "Pears"]);
|
|
109
|
+
|
|
110
|
+
// Remove 2 items starting at index 0, insert new items in their place
|
|
111
|
+
const removed = inventoryAlpha.splice(0, 2, "Oranges", "Grapes");
|
|
112
|
+
// removed: ["Apples", "Bananas"]
|
|
113
|
+
// inventory: ["Oranges", "Grapes", "Pears"]
|
|
114
|
+
|
|
115
|
+
// Removed everything from index 1 onward (omitting deleteCount)
|
|
116
|
+
const rest = inventoryAlpha.splice(1);
|
|
117
|
+
// rest: ["Grapes", "Pears"]
|
|
118
|
+
// inventory: ["Oranges"]
|
|
119
|
+
```
|
|
120
|
+
|
|
3
121
|
## 2.91.0
|
|
4
122
|
|
|
5
123
|
### Minor Changes
|
package/alpha.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export * from "./lib/alpha.js";
|
|
@@ -96,16 +96,47 @@ Kind
|
|
|
96
96
|
export interface ArrayNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Array, TreeArrayNode<T> & WithType<TName, NodeKind.Array, T>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
// @alpha @sealed @system
|
|
100
|
+
export interface ArrayNodeCustomizableSchemaAlpha<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Array, TreeArrayNodeAlpha<T> & WithType<TName, NodeKind.Array, T>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
101
|
+
}
|
|
102
|
+
|
|
99
103
|
// @alpha @sealed @system
|
|
100
104
|
export interface ArrayNodeCustomizableSchemaUnsafe<out TName extends string, in out T extends System_Unsafe.ImplicitAllowedTypesUnsafe, out TCustomMetadata> extends TreeNodeSchemaClass<TName, NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<T> & WithType<TName, NodeKind.Array, T>, {
|
|
101
105
|
[Symbol.iterator](): Iterator<System_Unsafe.InsertableTreeNodeFromImplicitAllowedTypesUnsafe<T>>;
|
|
102
106
|
}, false, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
103
107
|
}
|
|
104
108
|
|
|
109
|
+
// @alpha @sealed
|
|
110
|
+
export type ArrayNodeDeltaOp = ArrayNodeRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
|
|
111
|
+
|
|
112
|
+
// @alpha @sealed
|
|
113
|
+
export interface ArrayNodeInsertOp {
|
|
114
|
+
// (undocumented)
|
|
115
|
+
readonly count: number;
|
|
116
|
+
// (undocumented)
|
|
117
|
+
readonly type: "insert";
|
|
118
|
+
}
|
|
119
|
+
|
|
105
120
|
// @alpha @sealed @system
|
|
106
121
|
export interface ArrayNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Array, TreeArrayNode<T> & WithType<TName, NodeKind.Array, T>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleArrayNodeSchema<SchemaType.View, TCustomMetadata> {
|
|
107
122
|
}
|
|
108
123
|
|
|
124
|
+
// @alpha @sealed
|
|
125
|
+
export interface ArrayNodeRemoveOp {
|
|
126
|
+
// (undocumented)
|
|
127
|
+
readonly count: number;
|
|
128
|
+
// (undocumented)
|
|
129
|
+
readonly type: "remove";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// @alpha @sealed
|
|
133
|
+
export interface ArrayNodeRetainOp {
|
|
134
|
+
// (undocumented)
|
|
135
|
+
readonly count: number;
|
|
136
|
+
// (undocumented)
|
|
137
|
+
readonly type: "retain";
|
|
138
|
+
}
|
|
139
|
+
|
|
109
140
|
// @alpha
|
|
110
141
|
export type ArrayNodeSchema = ArrayNodeCustomizableSchema | ArrayNodePojoEmulationSchema;
|
|
111
142
|
|
|
@@ -125,6 +156,9 @@ export function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSch
|
|
|
125
156
|
// @alpha
|
|
126
157
|
export function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeViewConfiguration<TSchema>): TreeViewConfigurationAlpha<TSchema>;
|
|
127
158
|
|
|
159
|
+
// @alpha
|
|
160
|
+
export function asAlpha<TAllowedTypes extends ImplicitAllowedTypes>(node: TreeArrayNode<TAllowedTypes>): TreeArrayNodeAlpha<TAllowedTypes>;
|
|
161
|
+
|
|
128
162
|
// @beta
|
|
129
163
|
export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;
|
|
130
164
|
|
|
@@ -138,14 +172,6 @@ export enum AttachState {
|
|
|
138
172
|
Detached = "Detached"
|
|
139
173
|
}
|
|
140
174
|
|
|
141
|
-
// @alpha @sealed
|
|
142
|
-
export interface BranchableTree extends ViewableTree {
|
|
143
|
-
branch(): TreeBranchFork;
|
|
144
|
-
merge(branch: TreeBranchFork): void;
|
|
145
|
-
merge(branch: TreeBranchFork, disposeMerged: boolean): void;
|
|
146
|
-
rebase(branch: TreeBranchFork): void;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
175
|
// @alpha @sealed
|
|
150
176
|
export type ChangeMetadata = LocalChangeMetadata | RemoteChangeMetadata;
|
|
151
177
|
|
|
@@ -524,12 +550,6 @@ export type FormatVersion = number | string | undefined;
|
|
|
524
550
|
// @alpha
|
|
525
551
|
export function generateSchemaFromSimpleSchema(simple: SimpleTreeSchema): TreeSchema;
|
|
526
552
|
|
|
527
|
-
// @alpha @deprecated
|
|
528
|
-
export function getBranch(tree: ITree): BranchableTree;
|
|
529
|
-
|
|
530
|
-
// @alpha @deprecated
|
|
531
|
-
export function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(view: TreeViewAlpha<T>): BranchableTree;
|
|
532
|
-
|
|
533
553
|
// @alpha
|
|
534
554
|
export function getJsonSchema(schema: ImplicitAllowedTypes, options: Required<TreeSchemaEncodingOptions>): JsonTreeSchema;
|
|
535
555
|
|
|
@@ -1186,6 +1206,19 @@ export interface NodeChangedData<TNode extends TreeNode = TreeNode> {
|
|
|
1186
1206
|
readonly changedProperties?: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
1187
1207
|
}
|
|
1188
1208
|
|
|
1209
|
+
// @alpha
|
|
1210
|
+
export type NodeChangedDataAlpha<TNode extends TreeNode = TreeNode> = TNode extends WithType<string, NodeKind.Array> ? NodeChangedDataDelta : TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record> ? NodeChangedDataProperties<TNode> : NodeChangedDataProperties<TNode> | NodeChangedDataDelta;
|
|
1211
|
+
|
|
1212
|
+
// @alpha @sealed
|
|
1213
|
+
export interface NodeChangedDataDelta {
|
|
1214
|
+
readonly delta: readonly ArrayNodeDeltaOp[] | undefined;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
// @alpha @sealed
|
|
1218
|
+
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> {
|
|
1219
|
+
readonly changedProperties: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1189
1222
|
// @public
|
|
1190
1223
|
export type NodeFromSchema<T extends TreeNodeSchema> = T extends TreeNodeSchemaClass<string, NodeKind, infer TNode> ? TNode : T extends TreeNodeSchemaNonClass<string, NodeKind, infer TNode> ? TNode : never;
|
|
1191
1224
|
|
|
@@ -1436,7 +1469,7 @@ export const SchemaFactory_base: SchemaStatics & (new () => SchemaStatics);
|
|
|
1436
1469
|
|
|
1437
1470
|
// @alpha
|
|
1438
1471
|
export class SchemaFactoryAlpha<out TScope extends string | undefined = string | undefined, TName extends number | string = string> extends SchemaFactoryBeta<TScope, TName> {
|
|
1439
|
-
arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>):
|
|
1472
|
+
arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaAlpha<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
|
|
1440
1473
|
arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
|
|
1441
1474
|
static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
|
|
1442
1475
|
static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema<SchemaType>];
|
|
@@ -2002,6 +2035,7 @@ export interface TreeAlpha {
|
|
|
2002
2035
|
importConcise<const TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(schema: UnsafeUnknownSchema extends TSchema ? ImplicitFieldSchema : TSchema & ImplicitFieldSchema, data: ConciseTree | undefined): Unhydrated<TSchema extends ImplicitFieldSchema ? TreeFieldFromImplicitField<TSchema> : TreeNode | TreeLeafValue | undefined>;
|
|
2003
2036
|
importVerbose<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: VerboseTree | undefined, options?: TreeParsingOptions): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
|
|
2004
2037
|
key2(node: TreeNode): string | number | undefined;
|
|
2038
|
+
on<K extends keyof TreeChangeEventsAlpha<TNode>, TNode extends TreeNode>(node: TNode, eventName: K, listener: NoInfer<TreeChangeEventsAlpha<TNode>[K]>): () => void;
|
|
2005
2039
|
tagContentSchema<TSchema extends TreeNodeSchema, TContent extends InsertableField<TSchema>>(schema: TSchema, content: TContent): TContent;
|
|
2006
2040
|
trackObservations<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
|
|
2007
2041
|
trackObservationsOnce<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
|
|
@@ -2038,6 +2072,11 @@ export const TreeArrayNode: {
|
|
|
2038
2072
|
readonly spread: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;
|
|
2039
2073
|
};
|
|
2040
2074
|
|
|
2075
|
+
// @alpha @sealed
|
|
2076
|
+
export interface TreeArrayNodeAlpha<TAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes, out T = [TAllowedTypes] extends [ImplicitAllowedTypes] ? TreeNodeFromImplicitAllowedTypes<TAllowedTypes> : TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>, in TNew = [TAllowedTypes] extends [ImplicitAllowedTypes] ? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes> : InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>> extends TreeArrayNode<TAllowedTypes, T, TNew> {
|
|
2077
|
+
splice(start: number, deleteCount?: number, ...items: readonly (TNew | IterableTreeArrayContent<TNew>)[]): T[];
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2041
2080
|
// @beta @sealed
|
|
2042
2081
|
export interface TreeBeta {
|
|
2043
2082
|
clone<const TSchema extends ImplicitFieldSchema>(node: TreeFieldFromImplicitField<TSchema>): TreeFieldFromImplicitField<TSchema>;
|
|
@@ -2073,14 +2112,8 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
|
|
|
2073
2112
|
}
|
|
2074
2113
|
|
|
2075
2114
|
// @alpha @sealed
|
|
2076
|
-
export interface TreeBranchEvents
|
|
2115
|
+
export interface TreeBranchEvents {
|
|
2077
2116
|
changed(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
2078
|
-
commitApplied(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
// @alpha @sealed
|
|
2082
|
-
export interface TreeBranchFork extends BranchableTree, IDisposable {
|
|
2083
|
-
rebaseOnto(branch: BranchableTree): void;
|
|
2084
2117
|
}
|
|
2085
2118
|
|
|
2086
2119
|
// @public @sealed
|
|
@@ -2089,6 +2122,11 @@ export interface TreeChangeEvents {
|
|
|
2089
2122
|
treeChanged(): void;
|
|
2090
2123
|
}
|
|
2091
2124
|
|
|
2125
|
+
// @alpha @sealed
|
|
2126
|
+
export interface TreeChangeEventsAlpha<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
|
|
2127
|
+
nodeChanged: (data: NodeChangedDataAlpha<TNode>) => void;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2092
2130
|
// @beta @sealed
|
|
2093
2131
|
export interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
|
|
2094
2132
|
nodeChanged: (data: NodeChangedData<TNode> & (TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record> ? Required<Pick<NodeChangedData<TNode>, "changedProperties">> : unknown)) => void;
|
package/beta.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export * from "./lib/beta.js";
|
package/dist/alpha.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -198,11 +198,15 @@ export {
|
|
|
198
198
|
// #region @alpha APIs
|
|
199
199
|
AllowedTypesFullUnsafe,
|
|
200
200
|
ArrayNodeCustomizableSchema,
|
|
201
|
+
ArrayNodeCustomizableSchemaAlpha,
|
|
201
202
|
ArrayNodeCustomizableSchemaUnsafe,
|
|
203
|
+
ArrayNodeDeltaOp,
|
|
204
|
+
ArrayNodeInsertOp,
|
|
202
205
|
ArrayNodePojoEmulationSchema,
|
|
206
|
+
ArrayNodeRemoveOp,
|
|
207
|
+
ArrayNodeRetainOp,
|
|
203
208
|
ArrayNodeSchema,
|
|
204
209
|
ArrayPlaceAnchor,
|
|
205
|
-
BranchableTree,
|
|
206
210
|
ChangeMetadata,
|
|
207
211
|
CodecName,
|
|
208
212
|
CodecWriteOptions,
|
|
@@ -260,6 +264,9 @@ export {
|
|
|
260
264
|
MapNodePojoEmulationSchema,
|
|
261
265
|
MapNodeSchema,
|
|
262
266
|
NoChangeConstraint,
|
|
267
|
+
NodeChangedDataAlpha,
|
|
268
|
+
NodeChangedDataDelta,
|
|
269
|
+
NodeChangedDataProperties,
|
|
263
270
|
NodeProvider,
|
|
264
271
|
NodeSchemaOptionsAlpha,
|
|
265
272
|
ObjectNodeSchema,
|
|
@@ -300,9 +307,10 @@ export {
|
|
|
300
307
|
TransactionResultFailed,
|
|
301
308
|
TransactionResultSuccess,
|
|
302
309
|
TreeAlpha,
|
|
310
|
+
TreeArrayNodeAlpha,
|
|
303
311
|
TreeBranchAlpha,
|
|
304
312
|
TreeBranchEvents,
|
|
305
|
-
|
|
313
|
+
TreeChangeEventsAlpha,
|
|
306
314
|
TreeCompressionStrategy,
|
|
307
315
|
TreeContextAlpha,
|
|
308
316
|
TreeIdentifierUtils,
|
|
@@ -342,7 +350,6 @@ export {
|
|
|
342
350
|
exportCompatibilitySchemaSnapshot,
|
|
343
351
|
extractPersistedSchema,
|
|
344
352
|
generateSchemaFromSimpleSchema,
|
|
345
|
-
getBranch,
|
|
346
353
|
getJsonSchema,
|
|
347
354
|
getSimpleSchema,
|
|
348
355
|
importCompatibilitySchemaSnapshot,
|
package/dist/beta.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/legacy.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/dist/public.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/legacy.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
export * from "./lib/legacy.js";
|
package/lib/alpha.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -198,11 +198,15 @@ export {
|
|
|
198
198
|
// #region @alpha APIs
|
|
199
199
|
AllowedTypesFullUnsafe,
|
|
200
200
|
ArrayNodeCustomizableSchema,
|
|
201
|
+
ArrayNodeCustomizableSchemaAlpha,
|
|
201
202
|
ArrayNodeCustomizableSchemaUnsafe,
|
|
203
|
+
ArrayNodeDeltaOp,
|
|
204
|
+
ArrayNodeInsertOp,
|
|
202
205
|
ArrayNodePojoEmulationSchema,
|
|
206
|
+
ArrayNodeRemoveOp,
|
|
207
|
+
ArrayNodeRetainOp,
|
|
203
208
|
ArrayNodeSchema,
|
|
204
209
|
ArrayPlaceAnchor,
|
|
205
|
-
BranchableTree,
|
|
206
210
|
ChangeMetadata,
|
|
207
211
|
CodecName,
|
|
208
212
|
CodecWriteOptions,
|
|
@@ -260,6 +264,9 @@ export {
|
|
|
260
264
|
MapNodePojoEmulationSchema,
|
|
261
265
|
MapNodeSchema,
|
|
262
266
|
NoChangeConstraint,
|
|
267
|
+
NodeChangedDataAlpha,
|
|
268
|
+
NodeChangedDataDelta,
|
|
269
|
+
NodeChangedDataProperties,
|
|
263
270
|
NodeProvider,
|
|
264
271
|
NodeSchemaOptionsAlpha,
|
|
265
272
|
ObjectNodeSchema,
|
|
@@ -300,9 +307,10 @@ export {
|
|
|
300
307
|
TransactionResultFailed,
|
|
301
308
|
TransactionResultSuccess,
|
|
302
309
|
TreeAlpha,
|
|
310
|
+
TreeArrayNodeAlpha,
|
|
303
311
|
TreeBranchAlpha,
|
|
304
312
|
TreeBranchEvents,
|
|
305
|
-
|
|
313
|
+
TreeChangeEventsAlpha,
|
|
306
314
|
TreeCompressionStrategy,
|
|
307
315
|
TreeContextAlpha,
|
|
308
316
|
TreeIdentifierUtils,
|
|
@@ -342,7 +350,6 @@ export {
|
|
|
342
350
|
exportCompatibilitySchemaSnapshot,
|
|
343
351
|
extractPersistedSchema,
|
|
344
352
|
generateSchemaFromSimpleSchema,
|
|
345
|
-
getBranch,
|
|
346
353
|
getJsonSchema,
|
|
347
354
|
getSimpleSchema,
|
|
348
355
|
importCompatibilitySchemaSnapshot,
|
package/lib/beta.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/lib/legacy.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/lib/public.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
8
|
-
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
|
|
8
|
+
* Generated by "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat" in @fluid-tools/build-cli.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.92.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,25 +57,25 @@
|
|
|
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/core-utils": "~2.
|
|
64
|
-
"@fluidframework/driver-definitions": "~2.
|
|
65
|
-
"@fluidframework/fluid-static": "~2.
|
|
66
|
-
"@fluidframework/map": "~2.
|
|
67
|
-
"@fluidframework/runtime-utils": "~2.
|
|
68
|
-
"@fluidframework/sequence": "~2.
|
|
69
|
-
"@fluidframework/shared-object-base": "~2.
|
|
70
|
-
"@fluidframework/tree": "~2.
|
|
60
|
+
"@fluidframework/container-definitions": "~2.92.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.92.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.92.0",
|
|
63
|
+
"@fluidframework/core-utils": "~2.92.0",
|
|
64
|
+
"@fluidframework/driver-definitions": "~2.92.0",
|
|
65
|
+
"@fluidframework/fluid-static": "~2.92.0",
|
|
66
|
+
"@fluidframework/map": "~2.92.0",
|
|
67
|
+
"@fluidframework/runtime-utils": "~2.92.0",
|
|
68
|
+
"@fluidframework/sequence": "~2.92.0",
|
|
69
|
+
"@fluidframework/shared-object-base": "~2.92.0",
|
|
70
|
+
"@fluidframework/tree": "~2.92.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
74
74
|
"@biomejs/biome": "~2.4.5",
|
|
75
|
-
"@fluid-tools/build-cli": "^0.
|
|
75
|
+
"@fluid-tools/build-cli": "^0.64.0",
|
|
76
76
|
"@fluidframework/build-common": "^2.0.3",
|
|
77
|
-
"@fluidframework/build-tools": "^0.
|
|
78
|
-
"@fluidframework/eslint-config-fluid": "
|
|
77
|
+
"@fluidframework/build-tools": "^0.64.0",
|
|
78
|
+
"@fluidframework/eslint-config-fluid": "^9.0.0",
|
|
79
79
|
"@microsoft/api-extractor": "7.52.11",
|
|
80
80
|
"@types/node": "~20.19.30",
|
|
81
81
|
"concurrently": "^9.2.1",
|
|
@@ -85,24 +85,9 @@
|
|
|
85
85
|
"rimraf": "^6.1.3",
|
|
86
86
|
"typescript": "~5.4.5"
|
|
87
87
|
},
|
|
88
|
-
"fluidBuild": {
|
|
89
|
-
"tasks": {
|
|
90
|
-
"build:esnext": [
|
|
91
|
-
"...",
|
|
92
|
-
"typetests:gen"
|
|
93
|
-
],
|
|
94
|
-
"tsc": [
|
|
95
|
-
"...",
|
|
96
|
-
"typetests:gen"
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"typeValidation": {
|
|
101
|
-
"disabled": true
|
|
102
|
-
},
|
|
103
88
|
"scripts": {
|
|
104
89
|
"api": "fluid-build . --task api",
|
|
105
|
-
"api-extractor:commonjs": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./dist",
|
|
90
|
+
"api-extractor:commonjs": "flub generate entrypoints --resolutionConditions require --outFileLegacyBeta legacy --outDir ./dist",
|
|
106
91
|
"api-extractor:esnext": "flub generate entrypoints --outFileLegacyBeta legacy --outDir ./lib --node10TypeCompat",
|
|
107
92
|
"build": "fluid-build . --task build",
|
|
108
93
|
"build:api-reports": "concurrently \"npm:build:api-reports:*\"",
|
|
@@ -136,8 +121,6 @@
|
|
|
136
121
|
"format:biome": "biome check . --write",
|
|
137
122
|
"lint": "fluid-build . --task lint",
|
|
138
123
|
"lint:fix": "fluid-build . --task eslint:fix --task format",
|
|
139
|
-
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist"
|
|
140
|
-
"typetests:gen": "flub generate typetests --dir . -v",
|
|
141
|
-
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
124
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist"
|
|
142
125
|
}
|
|
143
126
|
}
|