fluid-framework 2.62.0-356644 → 2.63.0-358419

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 CHANGED
@@ -1,5 +1,167 @@
1
1
  # fluid-framework
2
2
 
3
+ ## 2.62.0
4
+
5
+ ### Minor Changes
6
+
7
+ - `asTreeViewAlpha` has been deprecated in favor of `asAlpha`. ([#25512](https://github.com/microsoft/FluidFramework/pull/25512)) [7f1cb9174c](https://github.com/microsoft/FluidFramework/commit/7f1cb9174c78c7888d7d7e290ea9320a746784d7)
8
+
9
+ Please replace usages with of `asTreeViewAlpha` with `asAlpha` - the function signature remains the same.
10
+
11
+ - Add configuredSharedTreeBeta ([#25531](https://github.com/microsoft/FluidFramework/pull/25531)) [1e2d48fd8c](https://github.com/microsoft/FluidFramework/commit/1e2d48fd8cf34e63310718c2ffa68bb919d8131a)
12
+
13
+ A limited subset of the options from the existing `@alpha` [`configuredSharedTree`](https://fluidframework.com/docs/api/fluid-framework#configuredsharedtree-function) API have been stabilized to `@beta` in the form of `configuredSharedTreeBeta`.
14
+
15
+ ```typescript
16
+ import {
17
+ configuredSharedTreeBeta,
18
+ ForestTypeExpensiveDebug,
19
+ } from "fluid-framework/beta";
20
+ const SharedTree = configuredSharedTreeBeta({
21
+ forest: ForestTypeExpensiveDebug,
22
+ });
23
+ ```
24
+
25
+ - Remove JsonValidator ([#25381](https://github.com/microsoft/FluidFramework/pull/25381)) [64a9b88b00](https://github.com/microsoft/FluidFramework/commit/64a9b88b001aeed19311d403c7cf2ac304787d90)
26
+
27
+ The `@alpha` API `JsonValidator` has been removed: its replacement `FormatValidator` must now be used.
28
+
29
+ As part of this:
30
+
31
+ - `typeboxValidator` has been replaced with `FormatValidatorBasic`.
32
+ - `noopValidator` has been replaced with `FormatValidatorNoOp`.
33
+
34
+ - Added APIs for tracking observations of SharedTree content for automatic invalidation ([#25459](https://github.com/microsoft/FluidFramework/pull/25459)) [21d45d5948](https://github.com/microsoft/FluidFramework/commit/21d45d5948b961a82c77ed5154fc42e456d85ee4)
35
+
36
+ `TreeAlpha.trackObservations` and `TreeAlpha.trackObservationsOnce` have been added.
37
+ These provide a way to run some operation which reads content from [TreeNodes](https://fluidframework.com/docs/api/tree/treenode-class), then run a call back when anything observed by that operation changes.
38
+
39
+ This functionality has also been exposed in the form of React hooks and React higher order components via the `@fluid-experimental/tree-react-api` package.
40
+ It is now possible to use these utilities to implement React applications which pass TreeNodes in their props and get all necessary invalidation from tree changes handled automatically.
41
+ The recommended pattern for doing this is to use `treeDataObject` or `TreeViewComponent` at the root, then `withTreeObservations` or `withMemoizedTreeObservations` for any sub-components which read from TreeNodes.
42
+ Alternatively more localized changes can be made by using `PropNode` to type erase TreeNodes passed in props, then use one of the `usePropTreeNode` or `usePropTreeRecord` hooks to read from them.
43
+
44
+ These APIs work with both hydrated and [un-hydrated](https://fluidframework.com/docs/api/tree/unhydrated-typealias) TreeNodes.
45
+
46
+ #### React Support
47
+
48
+ Here is a simple example of a React components which has an invalidation bug due to reading a mutable field from a TreeNode that was provided in a prop:
49
+
50
+ ```typescript
51
+ const builder = new SchemaFactory("example");
52
+ class Item extends builder.object("Item", { text: SchemaFactory.string }) {}
53
+ const ItemComponentBug = ({ item }: { item: Item }): JSX.Element => (
54
+ <span>{item.text}</span> // Reading `text`, a mutable value from a React prop, causes an invalidation bug.
55
+ );
56
+ ```
57
+
58
+ This bug can now easily be fixed using `withTreeObservations` or `withMemoizedTreeObservations`:
59
+
60
+ ```typescript
61
+ const ItemComponent = withTreeObservations(
62
+ ({ item }: { item: Item }): JSX.Element => <span>{item.text}</span>,
63
+ );
64
+ ```
65
+
66
+ For components which take in TreeNodes, but merely forward them and do not read their properties, they can use `PropTreeNode` as shown:
67
+
68
+ ```typescript
69
+ const ItemParentComponent = ({ item }: { item: PropTreeNode<Item> }): JSX.Element => (
70
+ <ItemComponent item={item} />
71
+ );
72
+ ```
73
+
74
+ If such a component reads from the TreeNode, it gets a compile error instead of an invalidation bug.
75
+ In this case the invalidation bug would be that if `item.text` is modified, the component would not re-render.
76
+
77
+ ```typescript
78
+ const InvalidItemParentComponent = ({
79
+ item,
80
+ }: { item: PropTreeNode<Item> }): JSX.Element => (
81
+ // @ts-expect-error PropTreeNode turns this invalidation bug into a compile error
82
+ <span>{item.text}</span>
83
+ );
84
+ ```
85
+
86
+ To provide access to TreeNode content in only part of a component the `usePropTreeNode` or `usePropTreeRecord` hooks can be used.
87
+
88
+ #### TreeAlpha.trackObservationsOnce Examples
89
+
90
+ Here is a rather minimal example of how `TreeAlpha.trackObservationsOnce` can be used:
91
+
92
+ ```typescript
93
+ cachedFoo ??= TreeAlpha.trackObservationsOnce(
94
+ () => {
95
+ cachedFoo = undefined;
96
+ },
97
+ () => nodeA.someChild.bar + nodeB.someChild.baz,
98
+ ).result;
99
+ ```
100
+
101
+ That is equivalent to doing the following:
102
+
103
+ ```typescript
104
+ if (cachedFoo === undefined) {
105
+ cachedFoo = nodeA.someChild.bar + nodeB.someChild.baz;
106
+ const invalidate = (): void => {
107
+ cachedFoo = undefined;
108
+ for (const u of unsubscribe) {
109
+ u();
110
+ }
111
+ };
112
+ const unsubscribe: (() => void)[] = [
113
+ TreeBeta.on(nodeA, "nodeChanged", (data) => {
114
+ if (data.changedProperties.has("someChild")) {
115
+ invalidate();
116
+ }
117
+ }),
118
+ TreeBeta.on(nodeB, "nodeChanged", (data) => {
119
+ if (data.changedProperties.has("someChild")) {
120
+ invalidate();
121
+ }
122
+ }),
123
+ TreeBeta.on(nodeA.someChild, "nodeChanged", (data) => {
124
+ if (data.changedProperties.has("bar")) {
125
+ invalidate();
126
+ }
127
+ }),
128
+ TreeBeta.on(nodeB.someChild, "nodeChanged", (data) => {
129
+ if (data.changedProperties.has("baz")) {
130
+ invalidate();
131
+ }
132
+ }),
133
+ ];
134
+ }
135
+ ```
136
+
137
+ Here is more complete example showing how to use `TreeAlpha.trackObservationsOnce` invalidate a property derived from its tree fields.
138
+
139
+ ```typescript
140
+ const factory = new SchemaFactory("com.example");
141
+ class Vector extends factory.object("Vector", {
142
+ x: SchemaFactory.number,
143
+ y: SchemaFactory.number,
144
+ }) {
145
+ #length: number | undefined = undefined;
146
+ public length(): number {
147
+ if (this.#length === undefined) {
148
+ const result = TreeAlpha.trackObservationsOnce(
149
+ () => {
150
+ this.#length = undefined;
151
+ },
152
+ () => Math.hypot(this.x, this.y),
153
+ );
154
+ this.#length = result.result;
155
+ }
156
+ return this.#length;
157
+ }
158
+ }
159
+ const vec = new Vector({ x: 3, y: 4 });
160
+ assert.equal(vec.length(), 5);
161
+ vec.x = 0;
162
+ assert.equal(vec.length(), 4);
163
+ ```
164
+
3
165
  ## 2.61.0
4
166
 
5
167
  Dependency updates only.
package/README.md CHANGED
@@ -8,6 +8,7 @@ There are some packages there are not included as part of this `fluid-framework`
8
8
  - A service client (e.g. `@fluidframework/azure-client`, `@fluidframework/odsp-client (BETA)`, or `@fluidframework/tinylicious-client` for local development) to allow connecting to a Fluid service.
9
9
  - Fluid Framework [developer tools](https://github.com/microsoft/FluidFramework/tree/main/packages/tools/devtools/devtools).
10
10
  - `@fluidframework/app-insights-logger`: to route Fluid telemetry to Azure App Insights.
11
+ - `@fluidframework/react (ALPHA)`: to help integrate Fluid content (mainly SharedTree) into [React](https://react.dev/) applications.
11
12
 
12
13
  <!-- AUTO-GENERATED-CONTENT:START (LIBRARY_README_HEADER) -->
13
14
 
@@ -79,6 +79,9 @@ export const ArrayNodeSchema: {
79
79
  };
80
80
 
81
81
  // @alpha
82
+ export function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewAlpha<TSchema>;
83
+
84
+ // @alpha @deprecated
82
85
  export function asTreeViewAlpha<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewAlpha<TSchema>;
83
86
 
84
87
  // @public
@@ -131,6 +134,9 @@ export type ConciseTree<THandle = IFluidHandle> = Exclude<TreeLeafValue, IFluidH
131
134
  // @alpha
132
135
  export function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree>;
133
136
 
137
+ // @beta
138
+ export function configuredSharedTreeBeta(options: SharedTreeOptionsBeta): SharedObjectKind<ITree>;
139
+
134
140
  // @public
135
141
  export enum ConnectionState {
136
142
  CatchingUp = 1,
@@ -328,13 +334,13 @@ export interface ForestOptions {
328
334
  export interface ForestType extends ErasedType<"ForestType"> {
329
335
  }
330
336
 
331
- // @alpha
337
+ // @beta
332
338
  export const ForestTypeExpensiveDebug: ForestType;
333
339
 
334
- // @alpha
340
+ // @beta
335
341
  export const ForestTypeOptimized: ForestType;
336
342
 
337
- // @alpha
343
+ // @beta
338
344
  export const ForestTypeReference: ForestType;
339
345
 
340
346
  // @alpha @sealed
@@ -367,7 +373,7 @@ export type HandleConverter<TCustom> = (data: IFluidHandle) => TCustom;
367
373
 
368
374
  // @alpha @input
369
375
  export interface ICodecOptions {
370
- readonly jsonValidator: JsonValidator | FormatValidator;
376
+ readonly jsonValidator: FormatValidator;
371
377
  }
372
378
 
373
379
  // @public
@@ -768,6 +774,7 @@ export interface ITreeAlpha extends ITree {
768
774
  createSharedBranch(): string;
769
775
  exportSimpleSchema(): SimpleTreeSchema;
770
776
  exportVerbose(): VerboseTree | undefined;
777
+ getSharedBranchIds(): string[];
771
778
  viewSharedBranchWith<TRoot extends ImplicitFieldSchema>(branchId: string, config: TreeViewConfiguration<TRoot>): TreeView<TRoot>;
772
779
  }
773
780
 
@@ -891,11 +898,6 @@ export type JsonTreeSchema = JsonFieldSchema & {
891
898
  readonly $defs: Record<JsonSchemaId, JsonNodeSchema>;
892
899
  };
893
900
 
894
- // @alpha @input
895
- export interface JsonValidator {
896
- compile<Schema extends TSchema>(schema: Schema): SchemaValidationFunction<Schema>;
897
- }
898
-
899
901
  // @alpha @input
900
902
  export enum KeyEncodingOptions {
901
903
  allStoredKeys = "allStoredKeys",
@@ -1007,9 +1009,6 @@ export interface NodeSchemaOptionsAlpha<out TCustomMetadata = unknown> extends N
1007
1009
  readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
1008
1010
  }
1009
1011
 
1010
- // @alpha
1011
- export const noopValidator: JsonValidator;
1012
-
1013
1012
  // @alpha @sealed
1014
1013
  export interface NormalizedAnnotatedAllowedTypes extends AnnotatedAllowedTypes<TreeNodeSchema> {
1015
1014
  }
@@ -1029,6 +1028,12 @@ export const ObjectNodeSchema: {
1029
1028
  readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ObjectNodeSchema<string, RestrictiveStringRecord<ImplicitAnnotatedFieldSchema>, boolean, unknown>;
1030
1029
  };
1031
1030
 
1031
+ // @alpha @sealed
1032
+ export interface ObservationResults<TResult> {
1033
+ readonly result: TResult;
1034
+ readonly unsubscribe: () => void;
1035
+ }
1036
+
1032
1037
  // @public
1033
1038
  export type Off = () => void;
1034
1039
 
@@ -1270,11 +1275,6 @@ export class SchemaUpgrade {
1270
1275
  protected _typeCheck: MakeNominal;
1271
1276
  }
1272
1277
 
1273
- // @alpha @input
1274
- export interface SchemaValidationFunction<Schema extends TSchema> {
1275
- check(data: unknown): data is Static<Schema>;
1276
- }
1277
-
1278
1278
  // @public @system
1279
1279
  type ScopedSchemaName<TScope extends string | undefined, TName extends number | string> = TScope extends undefined ? `${TName}` : `${TScope}.${TName}`;
1280
1280
 
@@ -1305,7 +1305,10 @@ export const SharedTreeFormatVersion: {
1305
1305
  export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
1306
1306
 
1307
1307
  // @alpha @input
1308
- export type SharedTreeOptions = Partial<CodecWriteOptions> & Partial<SharedTreeFormatOptions> & ForestOptions;
1308
+ export type SharedTreeOptions = Partial<CodecWriteOptions> & Partial<SharedTreeFormatOptions> & SharedTreeOptionsBeta;
1309
+
1310
+ // @beta @input
1311
+ export type SharedTreeOptionsBeta = ForestOptions;
1309
1312
 
1310
1313
  // @alpha @sealed
1311
1314
  export interface SimpleArrayNodeSchema<out TCustomMetadata = unknown> extends SimpleNodeSchemaBaseAlpha<NodeKind.Array, TCustomMetadata> {
@@ -1682,6 +1685,8 @@ export interface TreeAlpha {
1682
1685
  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>;
1683
1686
  importVerbose<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: VerboseTree | undefined, options?: TreeParsingOptions): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
1684
1687
  key2(node: TreeNode): string | number | undefined;
1688
+ trackObservations<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
1689
+ trackObservationsOnce<TResult>(onInvalidation: () => void, trackDuring: () => TResult): ObservationResults<TResult>;
1685
1690
  }
1686
1691
 
1687
1692
  // @alpha
@@ -1947,9 +1952,6 @@ export interface TreeViewEvents {
1947
1952
  schemaChanged(): void;
1948
1953
  }
1949
1954
 
1950
- // @alpha
1951
- export const typeboxValidator: JsonValidator;
1952
-
1953
1955
  // @public @deprecated @system
1954
1956
  const typeNameSymbol: unique symbol;
1955
1957
 
@@ -50,6 +50,9 @@ export interface CommitMetadata {
50
50
  readonly kind: CommitKind;
51
51
  }
52
52
 
53
+ // @beta
54
+ export function configuredSharedTreeBeta(options: SharedTreeOptionsBeta): SharedObjectKind<ITree>;
55
+
53
56
  // @public
54
57
  export enum ConnectionState {
55
58
  CatchingUp = 1,
@@ -174,6 +177,15 @@ export interface ForestOptions {
174
177
  export interface ForestType extends ErasedType<"ForestType"> {
175
178
  }
176
179
 
180
+ // @beta
181
+ export const ForestTypeExpensiveDebug: ForestType;
182
+
183
+ // @beta
184
+ export const ForestTypeOptimized: ForestType;
185
+
186
+ // @beta
187
+ export const ForestTypeReference: ForestType;
188
+
177
189
  // @public
178
190
  export interface IConnection {
179
191
  readonly id: string;
@@ -761,6 +773,9 @@ export interface SharedObjectKind<out TSharedObject = unknown> extends ErasedTyp
761
773
  // @public
762
774
  export const SharedTree: SharedObjectKind<ITree>;
763
775
 
776
+ // @beta @input
777
+ export type SharedTreeOptionsBeta = ForestOptions;
778
+
764
779
  // @public @sealed @system
765
780
  export interface SimpleNodeSchemaBase<out TNodeKind extends NodeKind, out TCustomMetadata = unknown> {
766
781
  readonly kind: TNodeKind;
@@ -50,6 +50,9 @@ export interface CommitMetadata {
50
50
  readonly kind: CommitKind;
51
51
  }
52
52
 
53
+ // @beta
54
+ export function configuredSharedTreeBeta(options: SharedTreeOptionsBeta): SharedObjectKind<ITree>;
55
+
53
56
  // @public
54
57
  export enum ConnectionState {
55
58
  CatchingUp = 1,
@@ -177,6 +180,15 @@ export interface ForestOptions {
177
180
  export interface ForestType extends ErasedType<"ForestType"> {
178
181
  }
179
182
 
183
+ // @beta
184
+ export const ForestTypeExpensiveDebug: ForestType;
185
+
186
+ // @beta
187
+ export const ForestTypeOptimized: ForestType;
188
+
189
+ // @beta
190
+ export const ForestTypeReference: ForestType;
191
+
180
192
  // @beta @legacy
181
193
  export interface IBranchOrigin {
182
194
  id: string;
@@ -1117,6 +1129,9 @@ export type SharedStringSegment = TextSegment | Marker;
1117
1129
  // @public
1118
1130
  export const SharedTree: SharedObjectKind<ITree>;
1119
1131
 
1132
+ // @beta @input
1133
+ export type SharedTreeOptionsBeta = ForestOptions;
1134
+
1120
1135
  export { Side }
1121
1136
 
1122
1137
  // @public @sealed @system
package/dist/alpha.d.ts CHANGED
@@ -138,13 +138,18 @@ export {
138
138
  // #region @beta APIs
139
139
  ForestOptions,
140
140
  ForestType,
141
+ ForestTypeExpensiveDebug,
142
+ ForestTypeOptimized,
143
+ ForestTypeReference,
141
144
  NodeChangedData,
142
145
  PopUnion,
143
146
  SchemaFactoryBeta,
147
+ SharedTreeOptionsBeta,
144
148
  TreeBeta,
145
149
  TreeChangeEventsBeta,
146
150
  UnionToTuple,
147
151
  adaptEnum,
152
+ configuredSharedTreeBeta,
148
153
  enumFromStrings,
149
154
  singletonSchema,
150
155
  // #endregion
@@ -170,9 +175,6 @@ export {
170
175
  FieldSchemaAlphaUnsafe,
171
176
  FixRecursiveArraySchema,
172
177
  FluidClientVersion,
173
- ForestTypeExpensiveDebug,
174
- ForestTypeOptimized,
175
- ForestTypeReference,
176
178
  FormatValidator,
177
179
  FormatValidatorBasic,
178
180
  FormatValidatorNoOp,
@@ -206,7 +208,6 @@ export {
206
208
  JsonSchemaType,
207
209
  JsonStringKeyPatternProperties,
208
210
  JsonTreeSchema,
209
- JsonValidator,
210
211
  KeyEncodingOptions,
211
212
  MapNodeCustomizableSchema,
212
213
  MapNodeCustomizableSchemaUnsafe,
@@ -215,6 +216,7 @@ export {
215
216
  NodeSchemaOptionsAlpha,
216
217
  NormalizedAnnotatedAllowedTypes,
217
218
  ObjectNodeSchema,
219
+ ObservationResults,
218
220
  ReadSchema,
219
221
  ReadableField,
220
222
  RecordNodeCustomizableSchema,
@@ -228,7 +230,6 @@ export {
228
230
  SchemaFactoryObjectOptions,
229
231
  SchemaStaticsAlpha,
230
232
  SchemaUpgrade,
231
- SchemaValidationFunction,
232
233
  SharedTreeFormatOptions,
233
234
  SharedTreeFormatVersion,
234
235
  SharedTreeOptions,
@@ -280,6 +281,7 @@ export {
280
281
  ViewContent,
281
282
  VoidTransactionCallbackStatus,
282
283
  allowUnused,
284
+ asAlpha,
283
285
  asTreeViewAlpha,
284
286
  cloneWithReplacements,
285
287
  comparePersistedSchema,
@@ -294,13 +296,11 @@ export {
294
296
  getSimpleSchema,
295
297
  independentInitializedView,
296
298
  independentView,
297
- noopValidator,
298
299
  onAssertionFailure,
299
300
  persistedToSimpleSchema,
300
301
  replaceConciseTreeHandles,
301
302
  replaceHandles,
302
303
  replaceVerboseTreeHandles,
303
- trackDirtyNodes,
304
- typeboxValidator
304
+ trackDirtyNodes
305
305
  // #endregion
306
306
  } from "./index.js";
package/dist/beta.d.ts CHANGED
@@ -138,13 +138,18 @@ export {
138
138
  // #region @beta APIs
139
139
  ForestOptions,
140
140
  ForestType,
141
+ ForestTypeExpensiveDebug,
142
+ ForestTypeOptimized,
143
+ ForestTypeReference,
141
144
  NodeChangedData,
142
145
  PopUnion,
143
146
  SchemaFactoryBeta,
147
+ SharedTreeOptionsBeta,
144
148
  TreeBeta,
145
149
  TreeChangeEventsBeta,
146
150
  UnionToTuple,
147
151
  adaptEnum,
152
+ configuredSharedTreeBeta,
148
153
  enumFromStrings,
149
154
  singletonSchema
150
155
  // #endregion
package/dist/index.d.ts CHANGED
@@ -37,18 +37,23 @@ export declare const SharedTree: SharedObjectKind<ITree>;
37
37
  /**
38
38
  * {@link SharedTree} but allowing a non-default configuration.
39
39
  * @remarks
40
- * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
40
+ * This is useful for debugging and testing.
41
+ * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.
42
+ *
43
+ * With great care, and knowledge of the support and stability of the options exposed here,
44
+ * this can also be used to opt into some features early or for performance tuning.
45
+ *
41
46
  * @example
42
47
  * ```typescript
43
48
  * import {
44
- * ForestType,
45
49
  * TreeCompressionStrategy,
46
50
  * configuredSharedTree,
47
- * typeboxValidator,
48
- * } from "@fluid-framework/alpha";
51
+ * FormatValidatorBasic,
52
+ * ForestTypeReference,
53
+ * } from "fluid-framework/alpha";
49
54
  * const SharedTree = configuredSharedTree({
50
55
  * forest: ForestTypeReference,
51
- * jsonValidator: typeboxValidator,
56
+ * jsonValidator: FormatValidatorBasic,
52
57
  * treeEncodeType: TreeCompressionStrategy.Uncompressed,
53
58
  * });
54
59
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,E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,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,qBAAqB,GACrB,MAAM,mCAAmC,CAAC;AAE3C,YAAY,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,wBAAwB,GACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,YAAY,EACX,aAAa,EACb,mBAAmB,GACnB,MAAM,6CAA6C,CAAC;AAErD,YAAY,EACX,yBAAyB,EAAE,iCAAiC;AAC5D,aAAa,EAAE,yCAAyC;AACxD,MAAM,GACN,MAAM,6CAA6C,CAAC"}
package/dist/index.js CHANGED
@@ -49,18 +49,23 @@ exports.SharedTree = internal_2.SharedTree;
49
49
  /**
50
50
  * {@link SharedTree} but allowing a non-default configuration.
51
51
  * @remarks
52
- * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
52
+ * This is useful for debugging and testing.
53
+ * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.
54
+ *
55
+ * With great care, and knowledge of the support and stability of the options exposed here,
56
+ * this can also be used to opt into some features early or for performance tuning.
57
+ *
53
58
  * @example
54
59
  * ```typescript
55
60
  * import {
56
- * ForestType,
57
61
  * TreeCompressionStrategy,
58
62
  * configuredSharedTree,
59
- * typeboxValidator,
60
- * } from "@fluid-framework/alpha";
63
+ * FormatValidatorBasic,
64
+ * ForestTypeReference,
65
+ * } from "fluid-framework/alpha";
61
66
  * const SharedTree = configuredSharedTree({
62
67
  * forest: ForestTypeReference,
63
- * jsonValidator: typeboxValidator,
68
+ * jsonValidator: FormatValidatorBasic,
64
69
  * treeEncodeType: TreeCompressionStrategy.Uncompressed,
65
70
  * });
66
71
  * ```
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAiBH,+EAAoE;AAA3D,oHAAA,WAAW,OAAA;AACpB,qEAAmE;AAA1D,mHAAA,eAAe,OAAA;AA0CxB,4GAA4G;AAC5G,gEAAyE;AAAhE,8GAAA,kBAAkB,OAAA;AAI3B,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,6DAA2C;AAU3C,4DAIuC;AAEvC;;;;;;;;;GASG;AACU,QAAA,UAAU,GAA4B,qBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAgB,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,IAAA,+BAA4B,EAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAFD,oDAEC;AAmBD,yDAA0E;AAAjE,2GAAA,eAAe,OAAA;AAAE,qGAAA,SAAS,OAAA;AA4BnC,8DAAiE;AAAxD,wGAAA,YAAY,OAAA;AAarB,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n\t/* eslint-disable import/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import/export */\n} from \"@fluidframework/core-interfaces\";\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n/* eslint-disable-next-line\n\tno-restricted-syntax,\n\timport/no-internal-modules,\n\timport/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * } from \"@fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;AAiBH,+EAAoE;AAA3D,oHAAA,WAAW,OAAA;AACpB,qEAAmE;AAA1D,mHAAA,eAAe,OAAA;AA0CxB,4GAA4G;AAC5G,gEAAyE;AAAhE,8GAAA,kBAAkB,OAAA;AAI3B,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,6DAA2C;AAU3C,4DAIuC;AAEvC;;;;;;;;;GASG;AACU,QAAA,UAAU,GAA4B,qBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,SAAgB,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,IAAA,+BAA4B,EAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAFD,oDAEC;AAmBD,yDAA0E;AAAjE,2GAAA,eAAe,OAAA;AAAE,qGAAA,SAAS,OAAA;AA4BnC,8DAAiE;AAAxD,wGAAA,YAAY,OAAA;AAarB,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n\t/* eslint-disable import/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import/export */\n} from \"@fluidframework/core-interfaces\";\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n/* eslint-disable-next-line\n\tno-restricted-syntax,\n\timport/no-internal-modules,\n\timport/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing.\n * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.\n *\n * With great care, and knowledge of the support and stability of the options exposed here,\n * this can also be used to opt into some features early or for performance tuning.\n *\n * @example\n * ```typescript\n * import {\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \tFormatValidatorBasic,\n * \tForestTypeReference,\n * } from \"fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: FormatValidatorBasic,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
package/dist/legacy.d.ts CHANGED
@@ -145,13 +145,18 @@ export {
145
145
  // #region @beta APIs
146
146
  ForestOptions,
147
147
  ForestType,
148
+ ForestTypeExpensiveDebug,
149
+ ForestTypeOptimized,
150
+ ForestTypeReference,
148
151
  NodeChangedData,
149
152
  PopUnion,
150
153
  SchemaFactoryBeta,
154
+ SharedTreeOptionsBeta,
151
155
  TreeBeta,
152
156
  TreeChangeEventsBeta,
153
157
  UnionToTuple,
154
158
  adaptEnum,
159
+ configuredSharedTreeBeta,
155
160
  enumFromStrings,
156
161
  singletonSchema,
157
162
  // #endregion
package/lib/alpha.d.ts CHANGED
@@ -138,13 +138,18 @@ export {
138
138
  // #region @beta APIs
139
139
  ForestOptions,
140
140
  ForestType,
141
+ ForestTypeExpensiveDebug,
142
+ ForestTypeOptimized,
143
+ ForestTypeReference,
141
144
  NodeChangedData,
142
145
  PopUnion,
143
146
  SchemaFactoryBeta,
147
+ SharedTreeOptionsBeta,
144
148
  TreeBeta,
145
149
  TreeChangeEventsBeta,
146
150
  UnionToTuple,
147
151
  adaptEnum,
152
+ configuredSharedTreeBeta,
148
153
  enumFromStrings,
149
154
  singletonSchema,
150
155
  // #endregion
@@ -170,9 +175,6 @@ export {
170
175
  FieldSchemaAlphaUnsafe,
171
176
  FixRecursiveArraySchema,
172
177
  FluidClientVersion,
173
- ForestTypeExpensiveDebug,
174
- ForestTypeOptimized,
175
- ForestTypeReference,
176
178
  FormatValidator,
177
179
  FormatValidatorBasic,
178
180
  FormatValidatorNoOp,
@@ -206,7 +208,6 @@ export {
206
208
  JsonSchemaType,
207
209
  JsonStringKeyPatternProperties,
208
210
  JsonTreeSchema,
209
- JsonValidator,
210
211
  KeyEncodingOptions,
211
212
  MapNodeCustomizableSchema,
212
213
  MapNodeCustomizableSchemaUnsafe,
@@ -215,6 +216,7 @@ export {
215
216
  NodeSchemaOptionsAlpha,
216
217
  NormalizedAnnotatedAllowedTypes,
217
218
  ObjectNodeSchema,
219
+ ObservationResults,
218
220
  ReadSchema,
219
221
  ReadableField,
220
222
  RecordNodeCustomizableSchema,
@@ -228,7 +230,6 @@ export {
228
230
  SchemaFactoryObjectOptions,
229
231
  SchemaStaticsAlpha,
230
232
  SchemaUpgrade,
231
- SchemaValidationFunction,
232
233
  SharedTreeFormatOptions,
233
234
  SharedTreeFormatVersion,
234
235
  SharedTreeOptions,
@@ -280,6 +281,7 @@ export {
280
281
  ViewContent,
281
282
  VoidTransactionCallbackStatus,
282
283
  allowUnused,
284
+ asAlpha,
283
285
  asTreeViewAlpha,
284
286
  cloneWithReplacements,
285
287
  comparePersistedSchema,
@@ -294,13 +296,11 @@ export {
294
296
  getSimpleSchema,
295
297
  independentInitializedView,
296
298
  independentView,
297
- noopValidator,
298
299
  onAssertionFailure,
299
300
  persistedToSimpleSchema,
300
301
  replaceConciseTreeHandles,
301
302
  replaceHandles,
302
303
  replaceVerboseTreeHandles,
303
- trackDirtyNodes,
304
- typeboxValidator
304
+ trackDirtyNodes
305
305
  // #endregion
306
306
  } from "./index.js";
package/lib/beta.d.ts CHANGED
@@ -138,13 +138,18 @@ export {
138
138
  // #region @beta APIs
139
139
  ForestOptions,
140
140
  ForestType,
141
+ ForestTypeExpensiveDebug,
142
+ ForestTypeOptimized,
143
+ ForestTypeReference,
141
144
  NodeChangedData,
142
145
  PopUnion,
143
146
  SchemaFactoryBeta,
147
+ SharedTreeOptionsBeta,
144
148
  TreeBeta,
145
149
  TreeChangeEventsBeta,
146
150
  UnionToTuple,
147
151
  adaptEnum,
152
+ configuredSharedTreeBeta,
148
153
  enumFromStrings,
149
154
  singletonSchema
150
155
  // #endregion
package/lib/index.d.ts CHANGED
@@ -37,18 +37,23 @@ export declare const SharedTree: SharedObjectKind<ITree>;
37
37
  /**
38
38
  * {@link SharedTree} but allowing a non-default configuration.
39
39
  * @remarks
40
- * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
40
+ * This is useful for debugging and testing.
41
+ * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.
42
+ *
43
+ * With great care, and knowledge of the support and stability of the options exposed here,
44
+ * this can also be used to opt into some features early or for performance tuning.
45
+ *
41
46
  * @example
42
47
  * ```typescript
43
48
  * import {
44
- * ForestType,
45
49
  * TreeCompressionStrategy,
46
50
  * configuredSharedTree,
47
- * typeboxValidator,
48
- * } from "@fluid-framework/alpha";
51
+ * FormatValidatorBasic,
52
+ * ForestTypeReference,
53
+ * } from "fluid-framework/alpha";
49
54
  * const SharedTree = configuredSharedTree({
50
55
  * forest: ForestTypeReference,
51
- * jsonValidator: typeboxValidator,
56
+ * jsonValidator: FormatValidatorBasic,
52
57
  * treeEncodeType: TreeCompressionStrategy.Uncompressed,
53
58
  * });
54
59
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAMH,YAAY,EACX,eAAe,IAAI,mBAAmB,EAAE,0CAA0C;AAClF,uBAAuB,GACvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,YAAY,EACX,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,MAAM,GACN,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,YAAY,EACX,UAAU,EACV,cAAc,EACd,WAAW,EACX,MAAM,EACN,qBAAqB,EACrB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,8BAA8B,EAC9B,MAA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edTree} but allowing a non-default configuration.
31
31
  * @remarks
32
- * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
32
+ * This is useful for debugging and testing.
33
+ * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.
34
+ *
35
+ * With great care, and knowledge of the support and stability of the options exposed here,
36
+ * this can also be used to opt into some features early or for performance tuning.
37
+ *
33
38
  * @example
34
39
  * ```typescript
35
40
  * import {
36
- * ForestType,
37
41
  * TreeCompressionStrategy,
38
42
  * configuredSharedTree,
39
- * typeboxValidator,
40
- * } from "@fluid-framework/alpha";
43
+ * FormatValidatorBasic,
44
+ * ForestTypeReference,
45
+ * } from "fluid-framework/alpha";
41
46
  * const SharedTree = configuredSharedTree({
42
47
  * forest: ForestTypeReference,
43
- * jsonValidator: typeboxValidator,
48
+ * jsonValidator: FormatValidatorBasic,
44
49
  * treeEncodeType: TreeCompressionStrategy.Uncompressed,
45
50
  * });
46
51
  * ```
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AA0CnE,4GAA4G;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAIzE,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,cAAc,4BAA4B,CAAC;AAU3C,OAAO,EACN,UAAU,IAAI,kBAAkB,EAChC,oBAAoB,IAAI,4BAA4B,GAEpD,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAA4B,kBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAmBD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AA4B1E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAajE,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n\t/* eslint-disable import/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import/export */\n} from \"@fluidframework/core-interfaces\";\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n/* eslint-disable-next-line\n\tno-restricted-syntax,\n\timport/no-internal-modules,\n\timport/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.\n * @example\n * ```typescript\n * import {\n * \tForestType,\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \ttypeboxValidator,\n * } from \"@fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: typeboxValidator,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AA0CnE,4GAA4G;AAC5G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAIzE,mDAAmD;AACnD,4FAA4F;AAC5F;;;;MAIG;AACH,cAAc,4BAA4B,CAAC;AAU3C,OAAO,EACN,UAAU,IAAI,kBAAkB,EAChC,oBAAoB,IAAI,4BAA4B,GAEpD,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,UAAU,GAA4B,kBAAkB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA0B;IAC9D,OAAO,4BAA4B,CAAC,OAAO,CAAC,CAAC;AAC9C,CAAC;AAmBD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AA4B1E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAajE,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Bundles a collection of Fluid Framework client libraries for easy use when paired with a corresponding service client\n * package (e.g. `@fluidframework/azure-client`, `@fluidframework/tinylicious-client`, or `@fluidframework/odsp-client (BETA)`).\n *\n * @packageDocumentation\n */\n\n// ===============================================================\n// #region Public, Beta and Alpha (non-legacy) exports\n// #region Basic re-exports\n\nexport type {\n\tConnectionState as ConnectionStateType, // TODO: deduplicate ConnectionState types\n\tICriticalContainerError,\n} from \"@fluidframework/container-definitions\";\nexport { AttachState } from \"@fluidframework/container-definitions\";\nexport { ConnectionState } from \"@fluidframework/container-loader\";\nexport type {\n\tContainerAttachProps,\n\tContainerSchema,\n\tIConnection,\n\tIFluidContainer,\n\tIFluidContainerEvents,\n\tIMember,\n\tInitialObjects,\n\tIServiceAudience,\n\tIServiceAudienceEvents,\n\tMemberChangedListener,\n\tMyself,\n} from \"@fluidframework/fluid-static\";\nexport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nexport type {\n\tIErrorBase,\n\tIEventProvider,\n\tIDisposable,\n\tIEvent,\n\tIEventThisPlaceHolder,\n\tIErrorEvent,\n\tErasedType,\n\tIFluidHandle,\n\tIFluidLoadable,\n\tITelemetryBaseProperties,\n\tIEventTransformer,\n\tIProvideFluidLoadable,\n\tIFluidHandleErased,\n\tTransformedEvent,\n\tTelemetryBaseEventPropertyType,\n\tTagged,\n\tReplaceIEventThisPlaceHolder,\n\tFluidObject, // Linked in doc comment\n\tFluidObjectProviderKeys, // Used by FluidObject\n\t/* eslint-disable import/export -- The event APIs are known to conflict, and this is intended as the exports via `@fluidframework/core-interfaces` are preferred over the deprecated ones from `@fluidframework/tree`. */\n\tListeners,\n\tIsListener,\n\tListenable,\n\tOff,\n\t/* eslint-enable import/export */\n} from \"@fluidframework/core-interfaces\";\n// This is an alpha API, but this package doesn't have an alpha entry point so its imported from \"internal\".\nexport { onAssertionFailure } from \"@fluidframework/core-utils/internal\";\n\nexport type { isFluidHandle } from \"@fluidframework/runtime-utils\";\n\n// Let the tree package manage its own API surface.\n// Note: this only surfaces the `@public, @beta and @alpha` API items from the tree package.\n/* eslint-disable-next-line\n\tno-restricted-syntax,\n\timport/no-internal-modules,\n\timport/export -- This re-exports all non-conflicting APIs from `@fluidframework/tree`. In cases where * exports conflict with named exports, the named exports take precedence per https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html#sec-getexportednames. This does trigger the `import/export` lint warning (which is intentionally disabled here). This approach ensures that the non-deprecated versions of the event APIs from `@fluidframework/core-interfaces` (provided as named indirect exports) eclipse the deprecated ones from `@fluidframework/tree`. The preferred versions of the event APIs are those exported via `@fluidframework/core-interfaces`.\n\t*/\nexport * from \"@fluidframework/tree/alpha\";\n\n// End of basic public+beta+alpha exports - nothing above this line should\n// depend on an /internal path.\n// #endregion Basic re-exports\n// ---------------------------------------------------------------\n// #region Custom re-exports\n\nimport type { SharedObjectKind } from \"@fluidframework/shared-object-base\";\nimport type { ITree } from \"@fluidframework/tree\";\nimport {\n\tSharedTree as OriginalSharedTree,\n\tconfiguredSharedTree as originalConfiguredSharedTree,\n\ttype SharedTreeOptions,\n} from \"@fluidframework/tree/internal\";\n\n/**\n * A hierarchical data structure for collaboratively editing strongly typed JSON-like trees\n * of objects, arrays, and other data types.\n * @privateRemarks\n * Here we reexport SharedTree, but with the `@alpha` types (`ISharedObjectKind`) removed, just keeping the `SharedObjectKind`.\n * Doing this requires creating this new typed export rather than relying on a reexport directly from the tree package.\n * The tree package itself does not do this because it's API needs to be usable from the encapsulated API which requires `ISharedObjectKind`.\n * This package however is not intended for use by users of the encapsulated API, and therefor it can discard that interface.\n * @public\n */\nexport const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;\n\n/**\n * {@link SharedTree} but allowing a non-default configuration.\n * @remarks\n * This is useful for debugging and testing.\n * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.\n *\n * With great care, and knowledge of the support and stability of the options exposed here,\n * this can also be used to opt into some features early or for performance tuning.\n *\n * @example\n * ```typescript\n * import {\n * \tTreeCompressionStrategy,\n * \tconfiguredSharedTree,\n * \tFormatValidatorBasic,\n * \tForestTypeReference,\n * } from \"fluid-framework/alpha\";\n * const SharedTree = configuredSharedTree({\n * \tforest: ForestTypeReference,\n * \tjsonValidator: FormatValidatorBasic,\n * \ttreeEncodeType: TreeCompressionStrategy.Uncompressed,\n * });\n * ```\n * @alpha\n */\nexport function configuredSharedTree(options: SharedTreeOptions): SharedObjectKind<ITree> {\n\treturn originalConfiguredSharedTree(options);\n}\n\n// #endregion Custom re-exports\n// #endregion\n\n// ===============================================================\n// #region Legacy exports\n\nexport type {\n\tIDirectory,\n\tIDirectoryEvents,\n\tIDirectoryValueChanged,\n\tISharedDirectory,\n\tISharedDirectoryEvents,\n\tISharedMap,\n\tISharedMapEvents,\n\tIValueChanged,\n} from \"@fluidframework/map/internal\";\n\nexport { SharedDirectory, SharedMap } from \"@fluidframework/map/internal\";\n\nexport type {\n\tDeserializeCallback,\n\tInteriorSequencePlace,\n\tIInterval,\n\tIntervalStickiness,\n\tISequenceDeltaRange,\n\tISerializedInterval,\n\tISharedSegmentSequenceEvents,\n\tISharedString,\n\tSequencePlace,\n\tSharedStringSegment,\n\tSide,\n\tISharedSegmentSequence,\n\tISequenceIntervalCollection,\n\tISequenceIntervalCollectionEvents,\n\tSequenceIntervalIndex,\n} from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tIntervalType,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceInterval,\n\tSequenceMaintenanceEvent,\n} from \"@fluidframework/sequence/internal\";\n\nexport { SharedString } from \"@fluidframework/sequence/internal\";\n\nexport type {\n\tISharedObject,\n\tISharedObjectEvents,\n} from \"@fluidframework/shared-object-base/internal\";\n\nexport type {\n\tISequencedDocumentMessage, // Leaked via ISharedObjectEvents\n\tIBranchOrigin, // Required for ISequencedDocumentMessage\n\tITrace, // Required for ISequencedDocumentMessage\n} from \"@fluidframework/driver-definitions/internal\";\n\n// #endregion Legacy exports\n"]}
package/lib/legacy.d.ts CHANGED
@@ -145,13 +145,18 @@ export {
145
145
  // #region @beta APIs
146
146
  ForestOptions,
147
147
  ForestType,
148
+ ForestTypeExpensiveDebug,
149
+ ForestTypeOptimized,
150
+ ForestTypeReference,
148
151
  NodeChangedData,
149
152
  PopUnion,
150
153
  SchemaFactoryBeta,
154
+ SharedTreeOptionsBeta,
151
155
  TreeBeta,
152
156
  TreeChangeEventsBeta,
153
157
  UnionToTuple,
154
158
  adaptEnum,
159
+ configuredSharedTreeBeta,
155
160
  enumFromStrings,
156
161
  singletonSchema,
157
162
  // #endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-framework",
3
- "version": "2.62.0-356644",
3
+ "version": "2.63.0-358419",
4
4
  "description": "The main entry point into Fluid Framework public packages",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -57,17 +57,17 @@
57
57
  "main": "lib/index.js",
58
58
  "types": "lib/public.d.ts",
59
59
  "dependencies": {
60
- "@fluidframework/container-definitions": "2.62.0-356644",
61
- "@fluidframework/container-loader": "2.62.0-356644",
62
- "@fluidframework/core-interfaces": "2.62.0-356644",
63
- "@fluidframework/core-utils": "2.62.0-356644",
64
- "@fluidframework/driver-definitions": "2.62.0-356644",
65
- "@fluidframework/fluid-static": "2.62.0-356644",
66
- "@fluidframework/map": "2.62.0-356644",
67
- "@fluidframework/runtime-utils": "2.62.0-356644",
68
- "@fluidframework/sequence": "2.62.0-356644",
69
- "@fluidframework/shared-object-base": "2.62.0-356644",
70
- "@fluidframework/tree": "2.62.0-356644"
60
+ "@fluidframework/container-definitions": "2.63.0-358419",
61
+ "@fluidframework/container-loader": "2.63.0-358419",
62
+ "@fluidframework/core-interfaces": "2.63.0-358419",
63
+ "@fluidframework/core-utils": "2.63.0-358419",
64
+ "@fluidframework/driver-definitions": "2.63.0-358419",
65
+ "@fluidframework/fluid-static": "2.63.0-358419",
66
+ "@fluidframework/map": "2.63.0-358419",
67
+ "@fluidframework/runtime-utils": "2.63.0-358419",
68
+ "@fluidframework/sequence": "2.63.0-358419",
69
+ "@fluidframework/shared-object-base": "2.63.0-358419",
70
+ "@fluidframework/tree": "2.63.0-358419"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "^0.17.1",
package/src/index.ts CHANGED
@@ -104,18 +104,23 @@ export const SharedTree: SharedObjectKind<ITree> = OriginalSharedTree;
104
104
  /**
105
105
  * {@link SharedTree} but allowing a non-default configuration.
106
106
  * @remarks
107
- * This is useful for debugging and testing to opt into extra validation or see if opting out of some optimizations fixes an issue.
107
+ * This is useful for debugging and testing.
108
+ * For example, it can be used to opt into extra validation or see if opting out of some optimizations fixes an issue.
109
+ *
110
+ * With great care, and knowledge of the support and stability of the options exposed here,
111
+ * this can also be used to opt into some features early or for performance tuning.
112
+ *
108
113
  * @example
109
114
  * ```typescript
110
115
  * import {
111
- * ForestType,
112
116
  * TreeCompressionStrategy,
113
117
  * configuredSharedTree,
114
- * typeboxValidator,
115
- * } from "@fluid-framework/alpha";
118
+ * FormatValidatorBasic,
119
+ * ForestTypeReference,
120
+ * } from "fluid-framework/alpha";
116
121
  * const SharedTree = configuredSharedTree({
117
122
  * forest: ForestTypeReference,
118
- * jsonValidator: typeboxValidator,
123
+ * jsonValidator: FormatValidatorBasic,
119
124
  * treeEncodeType: TreeCompressionStrategy.Uncompressed,
120
125
  * });
121
126
  * ```